npm package diff

Package: @forge/cli-shared

Versions: 6.8.0-next.12 - 6.8.0-next.13

Modified: package/out/shared/test.js

Index: package/out/shared/test.js
===================================================================
--- package/out/shared/test.js
+++ package/out/shared/test.js
@@ -18,13 +18,14 @@
         snapshotLog: jest.fn()
     };
 }
 exports.mockLogger = mockLogger;
-async function createTestApp({ userCode, packages, withI18nBundle = false }) {
+async function createTestApp({ userCode, userCodeFilename = 'index', packages, withI18nBundle = false }) {
     const appDirectory = (0, directories_1.tmpDir)();
-    const srcDirectory = path_1.default.join(appDirectory, 'src');
-    await (0, fs_extra_1.ensureDir)(srcDirectory);
-    const userCodePath = path_1.default.join(srcDirectory, 'index.ts');
+    const userCodeDir = path_1.default.join(appDirectory, 'src', path_1.default.dirname(userCodeFilename));
+    const userCodeBaseName = path_1.default.basename(userCodeFilename);
+    await (0, fs_extra_1.ensureDir)(userCodeDir);
+    const userCodePath = path_1.default.join(userCodeDir, `${userCodeBaseName}.ts`);
     await (0, promises_1.writeFile)(userCodePath, userCode);
     await (0, promises_1.writeFile)(path_1.default.join(appDirectory, 'tsconfig.json'), JSON.stringify({}));
     const allPackages = ['@types/node', ...(packages ?? [])];
     await (0, promises_1.writeFile)(path_1.default.join(appDirectory, 'package.json'), JSON.stringify({
@@ -50,8 +51,8 @@
         await (0, promises_1.writeFile)(path_1.default.join(appDirectory, localeFolder, 'en-US.json'), JSON.stringify({ title: 'i18n' }));
     }
     return {
         appDirectory,
-        entryPoints: [{ name: 'main', path: userCodePath }]
+        entryPoints: [{ name: userCodeFilename, path: path_1.default.join(userCodeDir, userCodeBaseName) }]
     };
 }
 exports.createTestApp = createTestApp;

Modified: package/package.json

Index: package/package.json
===================================================================
--- package/package.json
+++ package/package.json
@@ -1,7 +1,7 @@
 {
   "name": "@forge/cli-shared",
-  "version": "6.8.0-next.12",
+  "version": "6.8.0-next.13",
   "description": "Common functionality for Forge CLI",
   "author": "Atlassian",
   "license": "SEE LICENSE IN LICENSE.txt",
   "main": "out/index.js",

Modified: package/out/graphql/graphql-types.d.ts.map

Large diffs are not rendered by default.

Modified: package/out/shared/test.d.ts.map

Index: package/out/shared/test.d.ts.map
===================================================================
--- package/out/shared/test.d.ts.map
+++ package/out/shared/test.d.ts.map
@@ -1,1 +1,1 @@
-{"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../../src/shared/test.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAG/B,wBAAgB,UAAU,CAAC,YAAY,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,GAAG,MAAM,CAW/E;AAED,aAAK,OAAO,GAAG;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC/C,CAAC;AAEF,wBAAsB,aAAa,CAAC,EAClC,QAAQ,EACR,QAAQ,EACR,cAAsB,EACvB,EAAE;IACD,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,GAAG,OAAO,CAAC,OAAO,CAAC,CA8CnB"}
\ No newline at end of file
+{"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../../src/shared/test.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAG/B,wBAAgB,UAAU,CAAC,YAAY,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,GAAG,MAAM,CAW/E;AAED,aAAK,OAAO,GAAG;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC/C,CAAC;AAEF,wBAAsB,aAAa,CAAC,EAClC,QAAQ,EACR,gBAA0B,EAC1B,QAAQ,EACR,cAAsB,EACvB,EAAE;IACD,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,GAAG,OAAO,CAAC,OAAO,CAAC,CA+CnB"}
\ No newline at end of file

Modified: package/CHANGELOG.md

Large diffs are not rendered by default.

Modified: package/out/graphql/graphql-types.d.ts

Large diffs are not rendered by default.

Modified: package/out/shared/test.d.ts

Index: package/out/shared/test.d.ts
===================================================================
--- package/out/shared/test.d.ts
+++ package/out/shared/test.d.ts
@@ -6,10 +6,11 @@
         name: string;
         path: string;
     }[];
 };
-export declare function createTestApp({ userCode, packages, withI18nBundle }: {
+export declare function createTestApp({ userCode, userCodeFilename, packages, withI18nBundle }: {
     userCode: string;
+    userCodeFilename?: string;
     packages?: string[];
     withI18nBundle?: boolean;
 }): Promise<TestApp>;
 export {};