@forge/cli
13.3.0-next.20-experimental-cf2ad4c13.3.0-next.12-experimental-4b981ef-experimental-5b8eb3c
out/deploy/packager/packager.js~
out/deploy/packager/packager.jsModified+3−24
Index: package/out/deploy/packager/packager.js
===================================================================
--- package/out/deploy/packager/packager.js
+++ package/out/deploy/packager/packager.js
@@ -13,50 +13,29 @@
this.nativeUiBundler = nativeUiBundler;
this.logger = logger;
this.analyticsClient = analyticsClient;
}
- async package({ handlers, resources, allResources, packageConfig, i18nResourceBundle, i18nConfig }) {
+ async package(handlers, resources, packageConfig, i18nResourceBundle, i18nConfig) {
this.logger.info(cli_shared_1.Text.deploy.taskPackage.title);
const runtimeBundle = await this.runtimeBundler.bundle(handlers, i18nResourceBundle, packageConfig);
const nativeUiBundle = await this.nativeUiBundler.bundleResources(resources, i18nConfig);
- const metadata = this.getAppMetadata((0, bundler_1.mergeMetadata)(runtimeBundle.metadata, nativeUiBundle.metadata), {
- allResources,
- packageConfig
- });
+ const metadata = this.getAppMetadata((0, bundler_1.mergeMetadata)(runtimeBundle.metadata, nativeUiBundle.metadata));
await this.analyticsClient.reportAppPackaged(metadata);
return {
runtimeArchivePath: runtimeBundle.runtimeArchivePath,
moduleList: runtimeBundle.metadata.modules,
...nativeUiBundle
};
}
- getAppMetadata(bundleMetadata, options) {
- let uiKitResources = 0;
- let customUIResources = 0;
- let uiKitManualResources = 0;
- for (const resource of options.allResources) {
- if (resource.resourceType === 'nativeUI') {
- uiKitResources++;
- if (resource.package) {
- uiKitManualResources++;
- }
- }
- else if (resource.resourceType === 'customUI') {
- customUIResources++;
- }
- }
+ getAppMetadata(bundleMetadata) {
return {
jsFiles: bundleMetadata.jsFiles,
tsFiles: bundleMetadata.tsFiles,
esm: bundleMetadata.esm,
dependencies: Array.from(bundleMetadata.dependencies),
sdkImports: Array.from(bundleMetadata.sdkImports),
errors: bundleMetadata.errors,
isCI: process.env.CI === 'true',
- extraFiles: Boolean(options.packageConfig?.extraFiles?.length),
- uiKitResources,
- customUIResources,
- uiKitManualResources,
bundler: bundleMetadata.bundler
};
}
}