@forge/bundler

7.0.2-next.3-experimental-fda9df67.0.2-next.6
~

Modified (15 files)

Index: package/out/dependencies.js
===================================================================
--- package/out/dependencies.js
+++ package/out/dependencies.js
@@ -1,6 +1,8 @@
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
+exports.DEFAULT_COPY_DEPENDENCIES_OPTIONS = void 0;
+exports.getProductionDependencies = getProductionDependencies;
 exports.copyProductionDependencies = copyProductionDependencies;
 const tslib_1 = require("tslib");
 const fs_1 = require("fs");
 const promises_1 = require("fs/promises");
@@ -24,13 +26,17 @@
         }
     }
     return null;
 }
-function transplantDir(source, destination, directory) {
-    const relative = path_1.default.relative(source, directory);
-    return path_1.default.join(destination, relative);
+exports.DEFAULT_COPY_DEPENDENCIES_OPTIONS = {
+    exclude: ['@forge/react', '@forge/bridge']
+};
+async function getProductionDependencies(moduleDir, options) {
+    const result = new Map();
+    await enumerateProductionDependencies(moduleDir, options ?? {}, moduleDir, result, new Set());
+    return result;
 }
-async function copyProductionDependencies(moduleDir, target, options) {
+async function enumerateProductionDependencies(moduleDir, options, root, result, visited) {
     const packageDef = await readPackageJSON(moduleDir);
     if (!packageDef) {
         return;
     }
@@ -40,15 +46,25 @@
             continue;
         }
         const source = await dependencyDir(moduleDir, dependency);
         if (source) {
-            const destination = transplantDir(moduleDir, target, source);
-            if ((0, fs_1.existsSync)(destination)) {
+            const destination = path_1.default.relative(root, source);
+            if (visited.has(destination)) {
                 continue;
             }
-            await (0, fs_extra_1.copy)(source, destination, {
-                filter: (src) => path_1.default.basename(src) !== common_1.NODE_MODULES_DIR
-            });
-            await copyProductionDependencies(source, destination, options);
+            visited.add(destination);
+            for (const entry of await (0, promises_1.readdir)(source)) {
+                if (entry === common_1.NODE_MODULES_DIR) {
+                    continue;
+                }
+                result.set(path_1.default.join(destination, entry), path_1.default.join(source, entry));
+            }
+            await enumerateProductionDependencies(source, options, root, result, visited);
         }
     }
 }
+async function copyProductionDependencies(moduleDir, target, options) {
+    const dependencies = await getProductionDependencies(moduleDir, options);
+    for (const [destination, source] of dependencies.entries()) {
+        await (0, fs_extra_1.copy)(source, path_1.default.join(target, destination));
+    }
+}
Index: package/out/lint.js
===================================================================
--- package/out/lint.js
+++ package/out/lint.js
@@ -17,21 +17,10 @@
         fileSystemReader.recursiveReadDir('./src', exclude),
         ...UIKitDirectories.map((directory) => fileSystemReader.recursiveReadDir(directory, exclude))
     ]);
     const UIKitFilesToLint = UIKitFilesByDirectory.reduce((allFiles, directoryFiles) => allFiles.concat(directoryFiles), []);
-    const ui = new cli_shared_1.CommandLineUI(() => false, undefined, undefined, undefined, () => false);
-    const createGraphQLClient = (auth) => {
-        const minimalGraphQLRunner = new cli_shared_1.MinimalGraphQLRunner(auth, graphqlGateway, undefined);
-        const graphQLRunner = new cli_shared_1.DebuggingGraphqlRunner(minimalGraphQLRunner, graphqlGateway, ui);
-        return new cli_shared_1.MutationAwareGraphQLClient(graphQLRunner);
-    };
-    const userRepository = new cli_shared_1.UserRepositoryImpl(createGraphQLClient, ui);
-    const credentialStore = (0, cli_shared_1.getCredentialStore)(ui, userRepository);
-    const authenticator = new cli_shared_1.PersonalTokenAuthenticator(credentialStore);
-    const graphqlGateway = (0, cli_shared_1.getGraphqlGateway)();
-    const graphQLClient = createGraphQLClient(authenticator);
     try {
-        const lintResults = await (0, lint_1.lint)([...filesToLint, ...UIKitFilesToLint], manifest, 'development', logger, statsigService, graphQLClient);
+        const lintResults = await (0, lint_1.lint)([...filesToLint, ...UIKitFilesToLint], manifest, 'development', logger, statsigService);
         if (lintResults.some((result) => result.size())) {
             logger.info('');
             (0, lint_1.reportLintResults)(logger, lintResults);
         }
Index: package/out/runtime.js
===================================================================
--- package/out/runtime.js
+++ package/out/runtime.js
@@ -1,8 +1,7 @@
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.NODE_RUNTIME_CODE_FILE = void 0;
-exports.userCodePath = userCodePath;
 exports.getNodeBundler = getNodeBundler;
 const tslib_1 = require("tslib");
 const path_1 = tslib_1.__importDefault(require("path"));
 const promises_1 = tslib_1.__importDefault(require("fs/promises"));
@@ -17,12 +16,8 @@
 exports.NODE_RUNTIME_CODE_FILE = '__forge__.cjs';
 const NODE_RUNTIME_BACKUP_WRAPPER_FILE = '__forge_wrapper__.cjs';
 const NODE_RUNTIME_USE_LOCAL_WRAPPER_FILE = '__forge_use_local_wrapper.txt';
 const NODE_RUNTIME_VERSION_FILE = 'runtime.json';
-const NODE_WEBPACK_USER_CODE_DIR = 'bundled';
-function userCodePath(entryKey) {
-    return path_1.default.join(path_1.default.dirname(entryKey), NODE_WEBPACK_USER_CODE_DIR, path_1.default.basename(entryKey));
-}
 async function emitWrapperFiles(provider, emit) {
     const wrapper = await provider.getNodeRuntimeWrapper();
     const loader = await provider.getNodeRuntimeLoader();
     let entrypointScript;
@@ -81,10 +76,10 @@
     constructor(logger, wrapperProvider) {
         super(logger);
         this.wrapperProvider = wrapperProvider;
     }
-    async getResult(args, outputDir, output) {
-        const result = await super.getResult(args, outputDir, output);
+    async getResult(args, outputDir, output, additionalOutputs) {
+        const result = await super.getResult(args, outputDir, output, additionalOutputs);
         const emit = async (name, contents) => {
             const outputPath = path_1.default.join(outputDir, name);
             await promises_1.default.mkdir(path_1.default.dirname(outputPath), { recursive: true });
             await promises_1.default.writeFile(outputPath, contents);
Index: package/out/typescript.js
===================================================================
--- package/out/typescript.js
+++ package/out/typescript.js
@@ -11,11 +11,8 @@
 const dependencies_1 = require("./dependencies");
 const text_1 = require("./text");
 const types_1 = require("./types");
 const metadata_1 = require("./metadata");
-const COPY_DEPENDENCIES_OPTIONS = {
-    exclude: ['@forge/react', '@forge/bridge']
-};
 class TypeScriptBundler {
     logger;
     constructor(logger) {
         this.logger = logger;
@@ -47,9 +44,9 @@
             return null;
         }
         return line;
     }
-    async getResult(args, outputDir, output) {
+    async getResult(args, outputDir, output, additionalOutputs) {
         let metadata;
         if (output) {
             const files = new Set();
             for (const line of output.split('\n')) {
@@ -63,13 +60,13 @@
         else {
             metadata = (0, types_1.emptyMetadata)();
         }
         metadata.bundler = 'typescript';
-        return { outputDir, metadata };
+        return { outputDir, metadata, additionalOutputs };
     }
     async bundle(args) {
         const outputDir = (0, common_1.getOutputDir)(args);
-        await (0, dependencies_1.copyProductionDependencies)(args.appDirectory, outputDir, COPY_DEPENDENCIES_OPTIONS);
+        const additionalOutputs = await (0, dependencies_1.getProductionDependencies)(args.appDirectory, dependencies_1.DEFAULT_COPY_DEPENDENCIES_OPTIONS);
         const compiler = this.runTypeScript(args, outputDir);
         let output = '';
         compiler.stdout.on('data', (data) => (output += data.toString()));
         return new Promise((resolve, reject) => compiler.on('exit', async (code) => {
@@ -77,9 +74,9 @@
                 if (code !== 0) {
                     const errors = output.split('\n').filter((line) => !this.isListedFile(line));
                     throw new cli_shared_1.BundlerTSError(text_1.Text.typescriptError(errors));
                 }
-                const result = await this.getResult(args, outputDir, output);
+                const result = await this.getResult(args, outputDir, output, additionalOutputs);
                 resolve(result);
             }
             catch (e) {
                 reject(e);
@@ -87,9 +84,9 @@
         }));
     }
     async watch(args, watch) {
         const outputDir = (0, common_1.getOutputDir)(args);
-        await (0, dependencies_1.copyProductionDependencies)(args.appDirectory, outputDir, COPY_DEPENDENCIES_OPTIONS);
+        await (0, dependencies_1.copyProductionDependencies)(args.appDirectory, outputDir, dependencies_1.DEFAULT_COPY_DEPENDENCIES_OPTIONS);
         const compiler = this.runTypeScript(args, outputDir);
         let isFirstRun = true;
         const output = [];
         return new Promise((resolve, reject) => {
Index: package/package.json
===================================================================
--- package/package.json
+++ package/package.json
@@ -1,7 +1,7 @@
 {
   "name": "@forge/bundler",
-  "version": "7.0.2-next.3-experimental-fda9df6",
+  "version": "7.0.2-next.6",
   "description": "Default bundler for Forge apps",
   "license": "SEE LICENSE IN LICENSE.txt",
   "author": "Atlassian",
   "main": "out/index.js",
@@ -20,12 +20,12 @@
     "@babel/plugin-transform-optional-chaining": "^7.23.4",
     "@babel/plugin-transform-react-jsx": "^7.23.4",
     "@babel/traverse": "^7.24.0",
     "@babel/types": "^7.24.0",
-    "@forge/cli-shared": "9.2.0-next.3-experimental-fda9df6",
+    "@forge/cli-shared": "9.2.0-next.6",
     "@forge/i18n": "1.0.0",
-    "@forge/lint": "6.0.2-next.3-experimental-fda9df6",
-    "@forge/manifest": "13.1.1-next.2-experimental-fda9df6",
+    "@forge/lint": "6.0.2-next.6",
+    "@forge/manifest": "13.1.1-next.2",
     "babel-loader": "^8.3.0",
     "cheerio": "^1.2.0",
     "cross-spawn": "^7.0.6",
     "fs-extra": "^11.2.0",
Index: package/out/dependencies.d.ts.map
===================================================================
--- package/out/dependencies.d.ts.map
+++ package/out/dependencies.d.ts.map
@@ -1,1 +1,1 @@
-{"version":3,"file":"dependencies.d.ts","sourceRoot":"","sources":["../src/dependencies.ts"],"names":[],"mappings":"AAwDA,KAAK,eAAe,GAAG;IACrB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AAaF,wBAAsB,0BAA0B,CAC9C,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,IAAI,CAAC,CAuBf"}
\ No newline at end of file
+{"version":3,"file":"dependencies.d.ts","sourceRoot":"","sources":["../src/dependencies.ts"],"names":[],"mappings":"AA2CA,KAAK,eAAe,GAAG;IACrB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AAyBF,eAAO,MAAM,iCAAiC;;CAE7C,CAAC;AAYF,wBAAsB,yBAAyB,CAC7C,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAI9B;AAoDD,wBAAsB,0BAA0B,CAC9C,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,IAAI,CAAC,CAKf"}
\ No newline at end of file
Index: package/out/lint.d.ts.map
===================================================================
--- package/out/lint.d.ts.map
+++ package/out/lint.d.ts.map
@@ -1,1 +1,1 @@
-{"version":3,"file":"lint.d.ts","sourceRoot":"","sources":["../src/lint.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,gBAAgB,EAGhB,gBAAgB,EAEhB,cAAc,EAWf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAA2B,UAAU,EAAE,MAAM,aAAa,CAAC;AAIlE,wBAAsB,SAAS,CAC7B,cAAc,EAAE,cAAc,EAE9B,MAAM,GAAE,UAAkC,EAC1C,gBAAgB,mBAAyB,EACzC,gBAAgB,mBAAyB,GACxC,OAAO,CAAC,IAAI,CAAC,CA0Df"}
\ No newline at end of file
+{"version":3,"file":"lint.d.ts","sourceRoot":"","sources":["../src/lint.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,gBAAgB,EAGhB,gBAAgB,EAEhB,cAAc,EACf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAA2B,UAAU,EAAE,MAAM,aAAa,CAAC;AAIlE,wBAAsB,SAAS,CAC7B,cAAc,EAAE,cAAc,EAE9B,MAAM,GAAE,UAAkC,EAC1C,gBAAgB,mBAAyB,EACzC,gBAAgB,mBAAyB,GACxC,OAAO,CAAC,IAAI,CAAC,CAqCf"}
\ No newline at end of file
Index: package/out/runtime.d.ts.map
===================================================================
--- package/out/runtime.d.ts.map
+++ package/out/runtime.d.ts.map
@@ -1,1 +1,1 @@
-{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,YAAY,EAEZ,MAAM,EAEN,cAAc,EAEf,MAAM,mBAAmB,CAAC;AAI3B,OAAO,EAAE,OAAO,EAAkF,MAAM,SAAS,CAAC;AAGlH,OAAO,EAAiB,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAMpE,eAAO,MAAM,sBAAsB,kBAAkB,CAAC;AAoBtD,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAErD;AA6JD,wBAAgB,cAAc,CAC5B,MAAM,EAAE,MAAM,EACd,eAAe,EAAE,eAAe,EAChC,YAAY,EAAE,YAAY,EAC1B,cAAc,EAAE,cAAc,GAC7B,OAAO,CAET"}
\ No newline at end of file
+{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,YAAY,EAEZ,MAAM,EAEN,cAAc,EAEf,MAAM,mBAAmB,CAAC;AAI3B,OAAO,EAAE,OAAO,EAAkF,MAAM,SAAS,CAAC;AAGlH,OAAO,EAAiB,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAMpE,eAAO,MAAM,sBAAsB,kBAAkB,CAAC;AAkLtD,wBAAgB,cAAc,CAC5B,MAAM,EAAE,MAAM,EACd,eAAe,EAAE,eAAe,EAChC,YAAY,EAAE,YAAY,EAC1B,cAAc,EAAE,cAAc,GAC7B,OAAO,CAET"}
\ No newline at end of file
Index: package/out/types.d.ts.map
===================================================================
--- package/out/types.d.ts.map
+++ package/out/types.d.ts.map
@@ -1,1 +1,1 @@
-{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,OAAO,CAAC;IACb,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC1B,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,wBAAgB,aA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;CACxB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,UAAU,CAAC,EAAE,YAAY,CAAC;IAC1B,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;CACzC,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,WAAW,GACxC,QAAQ,CAAC,IAAI,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,GAAG;IACzC,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEJ,MAAM,MAAM,YAAY,GAAG;IACzB,gBAAgB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,eAAe,EAAE,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,aAAa,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;CAC1G,CAAC;AAEF,MAAM,WAAW,cAAc;IAC7B,IAAI,IAAI,IAAI,CAAC;CACd;AAED,MAAM,MAAM,kBAAkB,GAAG,cAAc,GAAG;IAChD,MAAM,EAAE,aAAa,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG;IACpB,MAAM,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IAClD,KAAK,CAAC,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;CACjF,CAAC;AAEF,qBAAa,YAAa,SAAQ,SAAS;CAAG"}
\ No newline at end of file
Index: package/out/typescript.d.ts.map
===================================================================
--- package/out/typescript.d.ts.map
+++ package/out/typescript.d.ts.map
@@ -1,1 +1,1 @@
-{"version":3,"file":"typescript.d.ts","sourceRoot":"","sources":["../src/typescript.ts"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AAgB,EAChB,kBAAkB,EAEnB,MAAM,SAAS,CAAC;AAGjB,KAAK,aAAa,GAAG,mBAAmB,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;AAE/D,8BAAsB,iBAAkB,YAAW,OAAO;IAC5C,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM;gBAAd,MAAM,EAAE,MAAM;IAE7C,SAAS,CAAC,aAAa,CAAC,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,GAAG,aAAa;IAwB5E,SAAS,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;cAWnC,SAAS,CACvB,IAAI,EAAE,WAAW,EACjB,SAAS,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,MAAM,EACf,iBAAiB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GACtC,OAAO,CAAC,aAAa,CAAC;IAkBnB,MAAM,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC;IA4BjD,KAAK,CAAC,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,kBAAkB,CAAC;CA2DtF"}
\ No newline at end of file
File too large for inline diff
Index: package/out/dependencies.d.ts
===================================================================
--- package/out/dependencies.d.ts
+++ package/out/dependencies.d.ts
@@ -1,6 +1,10 @@
 type CopyDepsOptions = {
     exclude?: string[];
 };
+export declare const DEFAULT_COPY_DEPENDENCIES_OPTIONS: {
+    exclude: string[];
+};
+export declare function getProductionDependencies(moduleDir: string, options?: CopyDepsOptions): Promise<Map<string, string>>;
 export declare function copyProductionDependencies(moduleDir: string, target: string, options?: CopyDepsOptions): Promise<void>;
 export {};
 //# sourceMappingURL=dependencies.d.ts.map
\ No newline at end of file
Index: package/out/runtime.d.ts
===================================================================
--- package/out/runtime.d.ts
+++ package/out/runtime.d.ts
@@ -1,7 +1,6 @@
 import { ConfigReader, Logger, StatsigService } from '@forge/cli-shared';
 import { Bundler } from './types';
 import { WrapperProvider } from './wrapper-provider';
 export declare const NODE_RUNTIME_CODE_FILE = "__forge__.cjs";
-export declare function userCodePath(entryKey: string): string;
 export declare function getNodeBundler(logger: Logger, wrapperProvider: WrapperProvider, configReader: ConfigReader, statsigService: StatsigService): Bundler;
 //# sourceMappingURL=runtime.d.ts.map
\ No newline at end of file
Index: package/out/types.d.ts
===================================================================
--- package/out/types.d.ts
+++ package/out/types.d.ts
@@ -13,8 +13,9 @@
 export declare function emptyMetadata(): BundlerMetadata;
 export declare function mergeMetadata(metadata1: BundlerMetadata, metadata2: BundlerMetadata): BundlerMetadata;
 export interface BundlerOutput {
     outputDir: string;
+    additionalOutputs?: Map<string, string>;
     metadata?: BundlerMetadata;
 }
 export type BundlerWatchMode = 'watch' | 'debug';
 export type EntryPoint = {
Index: package/out/typescript.d.ts
===================================================================
--- package/out/typescript.d.ts
+++ package/out/typescript.d.ts
@@ -7,9 +7,9 @@
     protected readonly logger: Logger;
     constructor(logger: Logger);
     protected runTypeScript(args: BundlerArgs, outputDir: string): OutputProcess;
     protected isListedFile(line: string): string | null;
-    protected getResult(args: BundlerArgs, outputDir: string, output?: string): Promise<BundlerOutput>;
+    protected getResult(args: BundlerArgs, outputDir: string, output?: string, additionalOutputs?: Map<string, string>): Promise<BundlerOutput>;
     bundle(args: BundlerArgs): Promise<BundlerOutput>;
     watch(args: BundlerWatchArgs, watch: BundlerWatch): Promise<BundlerWatchOutput>;
 }
 export {};