npm package diff

Package: @forge/cli

Versions: 10.5.1-next.6-experimental-22c15de - 10.6.0-next.13

File: 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
@@ -3,10 +3,12 @@
 exports.NodeRuntimeBundler = exports.SandboxRuntimeBundler = exports.RuntimeBundler = void 0;
 const fs_1 = require("fs");
 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");
 class RuntimeBundler {
     archiverFactory;
     logger;
     bundler;
@@ -63,23 +65,29 @@
         const moduleList = await this.packageCode(archiver, entryPoints);
         await this.packageDependencies(archiver);
         return moduleList;
     }
-    async bundle(handlers, packageConfig) {
+    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);
+        });
+    }
+    async bundle(handlers, i18nResourceBundle, packageConfig) {
         const archiver = this.archiverFactory();
         const moduleList = await this.packageAll(archiver, handlers, packageConfig);
+        this.packageI18nResources(archiver, i18nResourceBundle);
         const archivePath = await archiver.finalise();
         this.logger.debug(cli_shared_1.Text.deploy.taskPackage.archiveCreated(archivePath));
         return { runtimeArchivePath: archivePath, moduleList };
     }
 }
 exports.RuntimeBundler = RuntimeBundler;
 class SandboxRuntimeBundler extends RuntimeBundler {
-    async bundle(handlers, packageConfig) {
+    async bundle(handlers, i18nResourceBundle, packageConfig) {
         if (packageConfig) {
             throw new packager_1.BundlerError(cli_shared_1.Text.deploy.taskPackage.packageOptionsNotSupported);
         }
-        return await super.bundle(handlers, packageConfig);
+        return await super.bundle(handlers, i18nResourceBundle, packageConfig);
     }
 }
 exports.SandboxRuntimeBundler = SandboxRuntimeBundler;
 class NodeRuntimeBundler extends RuntimeBundler {