npm package diff

Package: @forge/cli-shared

Versions: 6.7.1-next.2-experimental-611b366 - 6.8.0-next.3

File: package/out/apps/create-an-app.js

Index: package/out/apps/create-an-app.js
===================================================================
--- package/out/apps/create-an-app.js
+++ package/out/apps/create-an-app.js
@@ -11,17 +11,20 @@
 class CreateAppCommand {
     templater;
     registerAppCommand;
     packageInstaller;
-    constructor(templater, registerAppCommand, packageInstaller) {
+    statsig;
+    constructor(templater, registerAppCommand, packageInstaller, statsig) {
         this.templater = templater;
         this.registerAppCommand = registerAppCommand;
         this.packageInstaller = packageInstaller;
+        this.statsig = statsig;
     }
-    async execute({ name, description, template, directory }) {
+    async execute({ name, description, template, directory, requiredProduct }) {
         await this.templater.downloadAndExtract(template, directory);
         const result = await this.registerAppCommand.registerApp({ name, description }, directory, {
-            shouldPrependAppName: true
+            shouldPrependAppName: true,
+            requiredProduct
         });
         await this.packageInstaller.install(directory);
         return {
             analytics: { template, appId: result.id, appName: name },
@@ -34,6 +37,20 @@
             throw new NoTemplatesError();
         }
         return availableTemplates;
     }
+    async filterAvailableProducts(products, teamworkGraph, crossContext) {
+        const useTeamworkGraph = await this.statsig.isTeamworkGraphProductSupported();
+        const useCrossProduct = await this.statsig.enableCrossProductAppInstallation();
+        return products.filter((product) => {
+            switch (product) {
+                case teamworkGraph:
+                    return useTeamworkGraph;
+                case crossContext:
+                    return useCrossProduct;
+                default:
+                    return true;
+            }
+        });
+    }
 }
 exports.CreateAppCommand = CreateAppCommand;