npm package diff

Package: @forge/cli

Versions: 10.6.0-next.14 - 10.6.0-next.15

Modified:package/out/command-line/dependency-injection.js

Index: package/out/command-line/dependency-injection.js
===================================================================
--- package/out/command-line/dependency-injection.js
+++ package/out/command-line/dependency-injection.js
@@ -147,10 +147,10 @@
     const archiveUploader = new deploy_1.AppArchiveUploader(assertiveAppConfigReader, uploaderArtifactClient, fileUploader, ui, new resources_uploader_service_1.ResourcesUploaderService(fileReader));
     const deployer = new deploy_1.ArtifactDeployer(assertiveAppConfigReader, triggerDeployClient, deployMonitorClient, cli_shared_1.pause, ui);
     const sandboxBundle = (0, bundler_1.getSandboxBundler)();
     const nodeBundle = (0, bundler_1.getNodeBundler)((0, bundler_1.getWrapperProvider)({ fileSystemReader: fileReader }));
-    const sandboxRuntimeBundler = new runtime_bundler_1.SandboxRuntimeBundler(archiverFactory, ui, sandboxBundle, configFile);
-    const nodeRuntimeBundler = new runtime_bundler_1.NodeRuntimeBundler(archiverFactory, ui, nodeBundle, configFile);
+    const sandboxRuntimeBundler = new runtime_bundler_1.SandboxRuntimeBundler(archiverFactory, ui, sandboxBundle, fileReader, configFile);
+    const nodeRuntimeBundler = new runtime_bundler_1.NodeRuntimeBundler(archiverFactory, ui, nodeBundle, fileReader, configFile);
     const nativeUiBundler = new nativeui_bundler_1.NativeUIBundler(ui, bundler_1.nativeUiBundle);
     const sandboxAppPackager = new deploy_1.AppPackager(sandboxRuntimeBundler, nativeUiBundler, ui);
     const nodeAppPackager = new deploy_1.AppPackager(nodeRuntimeBundler, nativeUiBundler, ui);
     const getWebTriggerURLCommand = new get_webtrigger_url_1.GetWebTriggerURLCommand(assertiveAppConfigReader, installationsClient, appEnvironmentClient, webTriggerGraphqlClient);

Modified:package/out/deploy/packager/nativeui-bundler.js

Index: package/out/deploy/packager/nativeui-bundler.js
===================================================================
--- package/out/deploy/packager/nativeui-bundler.js
+++ package/out/deploy/packager/nativeui-bundler.js
@@ -17,9 +17,9 @@
         const nativeUiBundlesDetails = [];
         if (entryPoints.length > 0) {
             let bundlerOutputs;
             try {
-                bundlerOutputs = await Promise.all(entryPoints.map((entrypoint) => this.bundler(this.logger, [entrypoint], i18nConfig)));
+                bundlerOutputs = await Promise.all(entryPoints.map((entrypoint) => this.bundler(this.logger, '', [entrypoint], i18nConfig)));
             }
             catch (e) {
                 throw new packager_1.BundlerError(e.message);
             }

Modified:package/out/deploy/packager/runtime-bundler.js

Index: package/out/deploy/packager/runtime-bundler.js
===================================================================
--- package/out/deploy/packager/runtime-bundler.js
+++ package/out/deploy/packager/runtime-bundler.js
@@ -1,23 +1,26 @@
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.NodeRuntimeBundler = exports.SandboxRuntimeBundler = exports.RuntimeBundler = void 0;
-const fs_1 = require("fs");
+const tslib_1 = require("tslib");
+const path_1 = tslib_1.__importDefault(require("path"));
 const bundler_1 = require("@forge/bundler");
 const cli_shared_1 = require("@forge/cli-shared");
 const i18n_1 = require("@forge/i18n");
 const packager_1 = require("./packager");
 const node_1 = require("@forge/bundler/out/config/node");
-const path_1 = require("path");
+const path_2 = require("path");
 class RuntimeBundler {
     archiverFactory;
     logger;
     bundler;
+    fileSystemReader;
     configFile;
-    constructor(archiverFactory, logger, bundler, configFile) {
+    constructor(archiverFactory, logger, bundler, fileSystemReader, configFile) {
         this.archiverFactory = archiverFactory;
         this.logger = logger;
         this.bundler = bundler;
+        this.fileSystemReader = fileSystemReader;
         this.configFile = configFile;
     }
     async packageCode(archiver, entryPoints) {
         const moduleList = [];
@@ -28,9 +31,9 @@
             }
             catch (e) {
                 throw new packager_1.BundlerError(e.message);
             }
-            const { output, sourceMap = {}, metadata } = bundlerResponse;
+            const { outputDir, metadata } = bundlerResponse;
             if (metadata) {
                 if (metadata.modules) {
                     moduleList.push(...metadata.modules);
                 }
@@ -38,26 +41,20 @@
                     archiver.addFile(node_1.NODE_RUNTIME_VERSION_FILE, Buffer.from(metadata.nodeRuntimeVersion));
                 }
             }
             this.logger.debug(cli_shared_1.Text.deploy.taskPackage.packageBundledFiles);
-            for (const name in output) {
-                archiver.addFile(name, Buffer.from(output[name]));
+            for (const name of await this.fileSystemReader.getFileGlobList([`${outputDir}/**`])) {
+                archiver.addFileFrom(path_1.default.relative(outputDir, name), name);
             }
-            for (const name in sourceMap) {
-                archiver.addFile(name, Buffer.from(sourceMap[name]));
-            }
         }
         return moduleList;
     }
     async packageDependencies(archiver) {
+        archiver.addFile(cli_shared_1.manifestFileName, Buffer.from(this.configFile.readConfigAsString()));
         for (const fileName of cli_shared_1.dependencyFileNames) {
-            if (!(0, fs_1.existsSync)(fileName)) {
+            if (!this.fileSystemReader.fileExists(fileName)) {
                 continue;
             }
-            if (fileName === cli_shared_1.manifestFileName) {
-                archiver.addFile(fileName, Buffer.from(this.configFile.readConfigAsString()));
-                continue;
-            }
             archiver.addFileFrom(fileName, fileName);
         }
     }
     async packageAll(archiver, handlers, packageConfig) {
@@ -67,9 +64,9 @@
         return moduleList;
     }
     packageI18nResources(archiver, i18nResourceBundle) {
         (0, cli_shared_1.listFilesInI18nResourceBundle)(i18nResourceBundle).forEach(([fileName, filePath]) => {
-            archiver.addFileFrom((0, path_1.join)(i18n_1.I18N_BUNDLE_FOLDER_NAME, fileName), filePath);
+            archiver.addFileFrom((0, path_2.join)(i18n_1.I18N_BUNDLE_FOLDER_NAME, fileName), filePath);
         });
     }
     async bundle(handlers, i18nResourceBundle, packageConfig) {
         const archiver = this.archiverFactory();
@@ -92,12 +89,12 @@
 exports.SandboxRuntimeBundler = SandboxRuntimeBundler;
 class NodeRuntimeBundler extends RuntimeBundler {
     async packageAll(archiver, handlers, packageConfig) {
         const moduleList = await super.packageAll(archiver, handlers, packageConfig);
-        const files = await new cli_shared_1.FileSystemReader().getFileGlobList(packageConfig?.extraFiles ?? []);
-        files.forEach((fileName) => {
+        const files = await this.fileSystemReader.getFileGlobList(packageConfig?.extraFiles ?? []);
+        for (const fileName of files) {
             archiver.addFileFrom(fileName, fileName);
-        });
+        }
         return moduleList;
     }
 }
 exports.NodeRuntimeBundler = NodeRuntimeBundler;

Modified:package/npm-shrinkwrap.json

too-big

Modified:package/package.json

Index: package/package.json
===================================================================
--- package/package.json
+++ package/package.json
@@ -1,7 +1,7 @@
 {
   "name": "@forge/cli",
-  "version": "10.6.0-next.14",
+  "version": "10.6.0-next.15",
   "description": "A command line interface for managing Atlassian-hosted apps",
   "author": "Atlassian",
   "license": "UNLICENSED",
   "bin": {
@@ -17,18 +17,18 @@
     "postbuild": "chmod +x out/bin/*.js && ts-node scripts/configureAutocomplete.ts",
     "postinstall": "node -e \"fs.existsSync('./out/bin/postinstall.js') && require('./out/bin/postinstall.js')\""
   },
   "dependencies": {
-    "@forge/bundler": "4.19.0-next.13",
-    "@forge/cli-shared": "5.5.0-next.12",
+    "@forge/bundler": "4.19.0-next.14",
+    "@forge/cli-shared": "5.5.0-next.13",
     "@forge/egress": "1.2.13",
-    "@forge/lint": "5.3.3-next.12",
-    "@forge/manifest": "7.7.0-next.12",
+    "@forge/lint": "5.3.3-next.13",
+    "@forge/manifest": "7.7.0-next.13",
     "@forge/runtime": "5.10.1",
-    "@forge/tunnel": "5.5.0-next.13",
+    "@forge/tunnel": "5.5.0-next.14",
     "@forge/util": "1.4.4",
     "@sentry/node": "7.100.1",
-    "@forge/i18n": "0.0.1-next.11",
+    "@forge/i18n": "0.0.1-next.12",
     "ajv": "^8.12.0",
     "archiver": "^6.0.2",
     "case": "^1.6.3",
     "chalk": "^4.1.2",

Modified:package/out/deploy/packager/nativeui-bundler.d.ts.map

Index: package/out/deploy/packager/nativeui-bundler.d.ts.map
===================================================================
--- package/out/deploy/packager/nativeui-bundler.d.ts.map
+++ package/out/deploy/packager/nativeui-bundler.d.ts.map
@@ -1,1 +1,1 @@
-{"version":3,"file":"nativeui-bundler.d.ts","sourceRoot":"","sources":["../../../src/deploy/packager/nativeui-bundler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAG/C,MAAM,WAAW,oBAAoB;IACnC,sBAAsB,EAAE,eAAe,EAAE,CAAC;CAC3C;AAED,qBAAa,eAAe;IAExB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,OAAO;gBADP,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,aAAa;IAG5B,MAAM,CAAC,SAAS,EAAE,eAAe,EAAE,EAAE,UAAU,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,oBAAoB,CAAC;CAgC5G"}
\ No newline at end of file
+{"version":3,"file":"nativeui-bundler.d.ts","sourceRoot":"","sources":["../../../src/deploy/packager/nativeui-bundler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAc,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAG/C,MAAM,WAAW,oBAAoB;IACnC,sBAAsB,EAAE,eAAe,EAAE,CAAC;CAC3C;AAED,qBAAa,eAAe;IAExB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,OAAO;gBADP,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO;IAGtB,MAAM,CAAC,SAAS,EAAE,eAAe,EAAE,EAAE,UAAU,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,oBAAoB,CAAC;CAgC5G"}
\ No newline at end of file

Modified:package/out/deploy/packager/runtime-bundler.d.ts.map

Index: package/out/deploy/packager/runtime-bundler.d.ts.map
===================================================================
--- package/out/deploy/packager/runtime-bundler.d.ts.map
+++ package/out/deploy/packager/runtime-bundler.d.ts.map
@@ -1,1 +1,1 @@
-{"version":3,"file":"runtime-bundler.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AE,MAAM,EACd,OAAO,EAAE,OAAO,EACd,gBAAgB,EAAE,gBAAgB,EACpC,UAAU,EAAE,UAAU;cAGzB,WAAW,CAAC,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;cAkC7E,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;cAatD,UAAU,CACxB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,OAAO,EAAE,EACnB,aAAa,EAAE,GAAG,CAAC,SAAS,CAAC,GAC5B,OAAO,CAAC,MAAM,EAAE,CAAC;IAUpB,SAAS,CAAC,oBAAoB,CAAC,QAAQ,EAAE,QAAQ,EAAE,kBAAkB,EAAE,kBAAkB,GAAG,IAAI;IAMnF,MAAM,CACjB,QAAQ,EAAE,OAAO,EAAE,EACnB,kBAAkB,EAAE,kBAAkB,EACtC,aAAa,CAAC,EAAE,GAAG,CAAC,SAAS,CAAC,GAC7B,OAAO,CAAC,mBAAmB,CAAC;CAWhC;AAED,qBAAa,qBAAsB,SAAQ,cAAc;IAC1C,MAAM,CACjB,QAAQ,EAAE,OAAO,EAAE,EACnB,kBAAkB,EAAE,kBAAkB,EACtC,aAAa,CAAC,EAAE,GAAG,CAAC,SAAS,CAAC,GAC7B,OAAO,CAAC,mBAAmB,CAAC;CAMhC;AAED,qBAAa,kBAAmB,SAAQ,cAAc;cACpC,UAAU,CACxB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,OAAO,EAAE,EACnB,aAAa,EAAE,GAAG,CAAC,SAAS,CAAC,GAC5B,OAAO,CAAC,MAAM,EAAE,CAAC;CASrB"}
\ No newline at end of file

Modified:package/CHANGELOG.md

too-big

Modified:package/out/deploy/packager/nativeui-bundler.d.ts

Index: package/out/deploy/packager/nativeui-bundler.d.ts
===================================================================
--- package/out/deploy/packager/nativeui-bundler.d.ts
+++ package/out/deploy/packager/nativeui-bundler.d.ts
@@ -1,13 +1,13 @@
-import { InDiskBundler } from '@forge/bundler';
+import { Bundler } from '@forge/bundler';
 import { Logger, ResourceDetails } from '@forge/cli-shared';
 import { Translations } from '@forge/manifest';
 export interface NativeUIBundleResult {
     nativeUiBundlesDetails: ResourceDetails[];
 }
 export declare class NativeUIBundler {
     private readonly logger;
     private readonly bundler;
-    constructor(logger: Logger, bundler: InDiskBundler);
+    constructor(logger: Logger, bundler: Bundler);
     bundle(resources: ResourceDetails[], i18nConfig?: Translations): Promise<NativeUIBundleResult>;
 }
 //# sourceMappingURL=nativeui-bundler.d.ts.map
\ No newline at end of file

Modified:package/out/deploy/packager/runtime-bundler.d.ts

Index: package/out/deploy/packager/runtime-bundler.d.ts
===================================================================
--- package/out/deploy/packager/runtime-bundler.d.ts
+++ package/out/deploy/packager/runtime-bundler.d.ts
@@ -1,6 +1,6 @@
-import { Bundler, FunctionsEntryPoint } from '@forge/bundler';
-import { Handler, Logger, ConfigFile, type I18nResourceBundle } from '@forge/cli-shared';
+import { Bundler, EntryPoint } from '@forge/bundler';
+import { Handler, Logger, FileSystemReader, ConfigFile, type I18nResourceBundle } from '@forge/cli-shared';
 import { App } from '@forge/manifest';
 import { Archiver } from './archiver';
 export interface RuntimeBundleResult {
     runtimeArchivePath: string;
@@ -9,11 +9,12 @@
 export declare class RuntimeBundler {
     private readonly archiverFactory;
     private readonly logger;
     private readonly bundler;
+    protected readonly fileSystemReader: FileSystemReader;
     private readonly configFile;
-    constructor(archiverFactory: () => Archiver, logger: Logger, bundler: Bundler<FunctionsEntryPoint>, configFile: ConfigFile);
-    protected packageCode(archiver: Archiver, entryPoints: FunctionsEntryPoint[]): Promise<string[]>;
+    constructor(archiverFactory: () => Archiver, logger: Logger, bundler: Bundler, fileSystemReader: FileSystemReader, configFile: ConfigFile);
+    protected packageCode(archiver: Archiver, entryPoints: EntryPoint[]): Promise<string[]>;
     protected packageDependencies(archiver: Archiver): Promise<void>;
     protected packageAll(archiver: Archiver, handlers: Handler[], packageConfig: App['package']): Promise<string[]>;
     protected packageI18nResources(archiver: Archiver, i18nResourceBundle: I18nResourceBundle): void;
     bundle(handlers: Handler[], i18nResourceBundle: I18nResourceBundle, packageConfig?: App['package']): Promise<RuntimeBundleResult>;