@forge/cli

13.3.0-next.12-experimental-4b981ef-experimental-5b8eb3c13.3.0-next.25
out/deploy/packager/packager.js
~out/deploy/packager/packager.jsModified
+24−3
Index: package/out/deploy/packager/packager.js
===================================================================
--- package/out/deploy/packager/packager.js
+++ package/out/deploy/packager/packager.js
@@ -13,29 +13,50 @@
         this.nativeUiBundler = nativeUiBundler;
         this.logger = logger;
         this.analyticsClient = analyticsClient;
     }
-    async package(handlers, resources, packageConfig, i18nResourceBundle, i18nConfig) {
+    async package({ handlers, resources, allResources, 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));
+        const metadata = this.getAppMetadata((0, bundler_1.mergeMetadata)(runtimeBundle.metadata, nativeUiBundle.metadata), {
+            allResources,
+            packageConfig
+        });
         await this.analyticsClient.reportAppPackaged(metadata);
         return {
             runtimeArchivePath: runtimeBundle.runtimeArchivePath,
             moduleList: runtimeBundle.metadata.modules,
             ...nativeUiBundle
         };
     }
-    getAppMetadata(bundleMetadata) {
+    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.bundler) {
+                    uiKitManualResources++;
+                }
+            }
+            else if (resource.resourceType === 'customUI') {
+                customUIResources++;
+            }
+        }
         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
         };
     }
 }