npm package diff
Package: @forge/cli
Versions: 10.5.1-next.6-experimental-22c15de - 10.6.0-next.13
File: package/out/service/resource-packaging-service.js
Index: package/out/service/resource-packaging-service.js
===================================================================
--- package/out/service/resource-packaging-service.js
+++ package/out/service/resource-packaging-service.js
@@ -1,8 +1,9 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ResourcePackagingService = exports.DetailedMalformedHtmlEntrypointError = exports.DetailedMissingHtmlEntrypointError = exports.MissingHtmlEntrypointError = exports.MalformedHtmlEntrypointError = exports.ResourceDirectoryEmptyError = exports.ResourceDirectoryMissingError = void 0;
const cli_shared_1 = require("@forge/cli-shared");
+const i18n_1 = require("@forge/i18n");
const path_1 = require("path");
const hidefile_1 = require("hidefile");
const CUSTOM_UI_ENTRYPOINT = 'index.html';
class ResourceDirectoryMissingError extends cli_shared_1.UserError {
@@ -103,16 +104,22 @@
}
}));
return archiver.finalise();
}
- async zipResources(resources, modules) {
+ 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 zipResources(resources, i18nResourceBundle, modules) {
const transformedResources = this.transformRelativeResourcePathsToAbsolute(this.appDir, resources);
const resourcesInformation = await this.getResourcesInformation(transformedResources);
const archives = {};
await Promise.all(resourcesInformation.map(async ({ key, filePaths, directory, resourceType }) => {
try {
this.validateResourceContents({ key, directory, filePaths, resourceType });
const archiver = this.archiverFactory();
+ this.packageI18nResources(archiver, i18nResourceBundle);
const archivePath = await this.createResourceArchive(archiver, filePaths, directory);
archives[key] = {
zipPath: archivePath,
rawSize: this.fileSystemReader.bytesToMb(await this.fileSystemReader.getFolderSizeAsync(directory)),