@shopify/create-app 3.34.0 → 3.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,18 +1,19 @@
1
- import { file, path } from '@shopify/cli-kit';
1
+ import { rmdir, glob } from '@shopify/cli-kit/node/fs';
2
+ import { joinPath } from '@shopify/cli-kit/node/path';
2
3
  export default async function cleanup(webOutputDirectory) {
3
- const gitPaths = await path.glob([
4
- path.join(webOutputDirectory, '**', '.git'),
5
- path.join(webOutputDirectory, '**', '.github'),
6
- path.join(webOutputDirectory, '**', '.gitmodules'),
7
- path.join(webOutputDirectory, 'LICENSE*'),
8
- path.join(webOutputDirectory, '**', 'frontend/LICENSE*'),
9
- path.join(webOutputDirectory, 'package.json.cli2'),
4
+ const gitPaths = await glob([
5
+ joinPath(webOutputDirectory, '**', '.git'),
6
+ joinPath(webOutputDirectory, '**', '.github'),
7
+ joinPath(webOutputDirectory, '**', '.gitmodules'),
8
+ joinPath(webOutputDirectory, 'LICENSE*'),
9
+ joinPath(webOutputDirectory, '**', 'frontend/LICENSE*'),
10
+ joinPath(webOutputDirectory, 'package.json.cli2'),
10
11
  ], {
11
12
  dot: true,
12
13
  onlyFiles: false,
13
14
  onlyDirectories: false,
14
15
  ignore: ['**/node_modules/**'],
15
16
  });
16
- return Promise.all(gitPaths.map((path) => file.rmdir(path, { force: true }))).then(() => { });
17
+ return Promise.all(gitPaths.map((path) => rmdir(path, { force: true }))).then(() => { });
17
18
  }
18
19
  //# sourceMappingURL=cleanup.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cleanup.js","sourceRoot":"","sources":["../../../src/utils/template/cleanup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAE,IAAI,EAAC,MAAM,kBAAkB,CAAA;AAE3C,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,OAAO,CAAC,kBAA0B;IAC9D,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAC9B;QACE,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,IAAI,EAAE,MAAM,CAAC;QAC3C,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,IAAI,EAAE,SAAS,CAAC;QAC9C,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,IAAI,EAAE,aAAa,CAAC;QAClD,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,UAAU,CAAC;QACzC,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,IAAI,EAAE,mBAAmB,CAAC;QACxD,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,mBAAmB,CAAC;KACnD,EACD;QACE,GAAG,EAAE,IAAI;QACT,SAAS,EAAE,KAAK;QAChB,eAAe,EAAE,KAAK;QACtB,MAAM,EAAE,CAAC,oBAAoB,CAAC;KAC/B,CACF,CAAA;IAED,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,EAAC,KAAK,EAAE,IAAI,EAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAA;AAC5F,CAAC","sourcesContent":["import {file, path} from '@shopify/cli-kit'\n\nexport default async function cleanup(webOutputDirectory: string) {\n const gitPaths = await path.glob(\n [\n path.join(webOutputDirectory, '**', '.git'),\n path.join(webOutputDirectory, '**', '.github'),\n path.join(webOutputDirectory, '**', '.gitmodules'),\n path.join(webOutputDirectory, 'LICENSE*'),\n path.join(webOutputDirectory, '**', 'frontend/LICENSE*'),\n path.join(webOutputDirectory, 'package.json.cli2'),\n ],\n {\n dot: true,\n onlyFiles: false,\n onlyDirectories: false,\n ignore: ['**/node_modules/**'],\n },\n )\n\n return Promise.all(gitPaths.map((path) => file.rmdir(path, {force: true}))).then(() => {})\n}\n"]}
1
+ {"version":3,"file":"cleanup.js","sourceRoot":"","sources":["../../../src/utils/template/cleanup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAE,IAAI,EAAC,MAAM,0BAA0B,CAAA;AACpD,OAAO,EAAC,QAAQ,EAAC,MAAM,4BAA4B,CAAA;AAEnD,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,OAAO,CAAC,kBAA0B;IAC9D,MAAM,QAAQ,GAAG,MAAM,IAAI,CACzB;QACE,QAAQ,CAAC,kBAAkB,EAAE,IAAI,EAAE,MAAM,CAAC;QAC1C,QAAQ,CAAC,kBAAkB,EAAE,IAAI,EAAE,SAAS,CAAC;QAC7C,QAAQ,CAAC,kBAAkB,EAAE,IAAI,EAAE,aAAa,CAAC;QACjD,QAAQ,CAAC,kBAAkB,EAAE,UAAU,CAAC;QACxC,QAAQ,CAAC,kBAAkB,EAAE,IAAI,EAAE,mBAAmB,CAAC;QACvD,QAAQ,CAAC,kBAAkB,EAAE,mBAAmB,CAAC;KAClD,EACD;QACE,GAAG,EAAE,IAAI;QACT,SAAS,EAAE,KAAK;QAChB,eAAe,EAAE,KAAK;QACtB,MAAM,EAAE,CAAC,oBAAoB,CAAC;KAC/B,CACF,CAAA;IAED,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,EAAC,KAAK,EAAE,IAAI,EAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAA;AACvF,CAAC","sourcesContent":["import {rmdir, glob} from '@shopify/cli-kit/node/fs'\nimport {joinPath} from '@shopify/cli-kit/node/path'\n\nexport default async function cleanup(webOutputDirectory: string) {\n const gitPaths = await glob(\n [\n joinPath(webOutputDirectory, '**', '.git'),\n joinPath(webOutputDirectory, '**', '.github'),\n joinPath(webOutputDirectory, '**', '.gitmodules'),\n joinPath(webOutputDirectory, 'LICENSE*'),\n joinPath(webOutputDirectory, '**', 'frontend/LICENSE*'),\n joinPath(webOutputDirectory, 'package.json.cli2'),\n ],\n {\n dot: true,\n onlyFiles: false,\n onlyDirectories: false,\n ignore: ['**/node_modules/**'],\n },\n )\n\n return Promise.all(gitPaths.map((path) => rmdir(path, {force: true}))).then(() => {})\n}\n"]}
@@ -1,14 +1,13 @@
1
- import { ui, npm } from '@shopify/cli-kit';
2
- import { PackageManager } from '@shopify/cli-kit/node/node-package-manager';
1
+ import { PackageManager, PackageJson } from '@shopify/cli-kit/node/node-package-manager';
2
+ import { Task } from '@shopify/cli-kit/src/private/node/ui/components/Tasks.js';
3
3
  interface UpdateCLIDependenciesOptions {
4
4
  directory: string;
5
- packageJSON: npm.PackageJSON;
5
+ packageJSON: PackageJson;
6
6
  local: boolean;
7
7
  }
8
- export declare function updateCLIDependencies({ packageJSON, local, }: UpdateCLIDependenciesOptions): Promise<npm.PackageJSON>;
9
- export declare function getDeepInstallNPMTasks({ from, packageManager, didInstallEverything, }: {
8
+ export declare function updateCLIDependencies({ packageJSON, local }: UpdateCLIDependenciesOptions): Promise<PackageJson>;
9
+ export declare function getDeepInstallNPMTasks({ from, packageManager, }: {
10
10
  from: string;
11
11
  packageManager: PackageManager;
12
- didInstallEverything(): void;
13
- }): Promise<ui.ListrTask[]>;
12
+ }): Promise<Task[]>;
14
13
  export {};
@@ -1,13 +1,12 @@
1
- import { path, constants } from '@shopify/cli-kit';
2
1
  import { installNodeModules } from '@shopify/cli-kit/node/node-package-manager';
3
- import { Writable } from 'stream';
2
+ import { CLI_KIT_VERSION } from '@shopify/cli-kit/common/version';
3
+ import { joinPath, moduleDirectory, normalizePath } from '@shopify/cli-kit/node/path';
4
+ import { glob, findPathUp } from '@shopify/cli-kit/node/fs';
4
5
  import { platform } from 'os';
5
- export async function updateCLIDependencies({ packageJSON, local, }) {
6
- const cliKitVersion = await constants.versions.cliKit();
7
- const moduleDirectory = path.moduleDirectory(import.meta.url);
6
+ export async function updateCLIDependencies({ packageJSON, local }) {
8
7
  packageJSON.dependencies = packageJSON.dependencies || {};
9
- packageJSON.dependencies['@shopify/cli'] = cliKitVersion;
10
- packageJSON.dependencies['@shopify/app'] = cliKitVersion;
8
+ packageJSON.dependencies['@shopify/cli'] = CLI_KIT_VERSION;
9
+ packageJSON.dependencies['@shopify/app'] = CLI_KIT_VERSION;
11
10
  if (local) {
12
11
  const cliPath = await packagePath('cli');
13
12
  const appPath = await packagePath('app');
@@ -33,44 +32,32 @@ export async function updateCLIDependencies({ packageJSON, local, }) {
33
32
  return packageJSON;
34
33
  }
35
34
  async function packagePath(packageName) {
36
- const packageAbsolutePath = (await path.findUp(`packages/${packageName}`, {
35
+ const packageAbsolutePath = (await findPathUp(`packages/${packageName}`, {
37
36
  type: 'directory',
38
- cwd: path.moduleDirectory(import.meta.url),
37
+ cwd: moduleDirectory(import.meta.url),
39
38
  }));
40
39
  return `file:${packageAbsolutePath}`;
41
40
  }
42
- export async function getDeepInstallNPMTasks({ from, packageManager, didInstallEverything, }) {
43
- const root = path.normalize(from);
44
- const packageJSONFiles = await path.glob([path.join(root, '**/package.json')]);
45
- let foldersInstalled = 0;
41
+ export async function getDeepInstallNPMTasks({ from, packageManager, }) {
42
+ const root = normalizePath(from);
43
+ const packageJSONFiles = await glob([joinPath(root, '**/package.json')]);
46
44
  return packageJSONFiles.map((filePath) => {
47
45
  const folderPath = filePath.replace('package.json', '');
48
46
  const titlePath = folderPath.replace(root, '');
47
+ /**
48
+ * Installation of dependencies using Yarn on Windows might lead
49
+ * to "EPERM: operation not permitted, unlink" errors when Yarn tries
50
+ * to access the cache. By limiting the network concurrency we mitigate the
51
+ * error:
52
+ *
53
+ * Failing scenario: https://github.com/Shopify/cli/runs/7913938724
54
+ * Reported issue: https://github.com/yarnpkg/yarn/issues/7212
55
+ */
56
+ const args = platform() === 'win32' && packageManager === 'yarn' ? ['--network-concurrency', '1'] : [];
49
57
  return {
50
58
  title: `Installing dependencies in ${titlePath}`,
51
- task: async (_, task) => {
52
- const output = new Writable({
53
- write(chunk, _, next) {
54
- task.output = chunk.toString();
55
- next();
56
- },
57
- });
58
- /**
59
- * Installation of dependencies using Yarn on Windows might lead
60
- * to "EPERM: operation not permitted, unlink" errors when Yarn tries
61
- * to access the cache. By limiting the network concurrency we mitigate the
62
- * error:
63
- *
64
- * Failing scenario: https://github.com/Shopify/cli/runs/7913938724
65
- * Reported issue: https://github.com/yarnpkg/yarn/issues/7212
66
- */
67
- const args = platform() === 'win32' && packageManager === 'yarn' ? ['--network-concurrency', '1'] : [];
68
- await installNodeModules({ directory: folderPath, packageManager, stdout: output, stderr: output, args });
69
- task.title = `Installed dependencies in ${titlePath}`;
70
- foldersInstalled++;
71
- if (foldersInstalled === packageJSONFiles.length) {
72
- didInstallEverything();
73
- }
59
+ task: async () => {
60
+ await installNodeModules({ directory: folderPath, packageManager, args });
74
61
  },
75
62
  };
76
63
  });
@@ -1 +1 @@
1
- {"version":3,"file":"npm.js","sourceRoot":"","sources":["../../../src/utils/template/npm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAW,SAAS,EAAC,MAAM,kBAAkB,CAAA;AACzD,OAAO,EAAiB,kBAAkB,EAAC,MAAM,4CAA4C,CAAA;AAC7F,OAAO,EAAC,QAAQ,EAAC,MAAM,QAAQ,CAAA;AAC/B,OAAO,EAAC,QAAQ,EAAC,MAAM,IAAI,CAAA;AAQ3B,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,EAC1C,WAAW,EACX,KAAK,GACwB;IAC7B,MAAM,aAAa,GAAG,MAAM,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAA;IACvD,MAAM,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IAE7D,WAAW,CAAC,YAAY,GAAG,WAAW,CAAC,YAAY,IAAI,EAAE,CAAA;IACzD,WAAW,CAAC,YAAY,CAAC,cAAc,CAAC,GAAG,aAAa,CAAA;IACxD,WAAW,CAAC,YAAY,CAAC,cAAc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6B,SAAS,EAAE,CAAA;gBAErD,gBAAgB,EAAE,CAAA;gBAElB,IAAI,gBAAgB,KAAK,gBAAgB,CAAC,MAAM,EAAE;oBAChD,oBAAoB,EAAE,CAAA;iBACvB;YACH,CAAC;SACF,CAAA;IACH,CAAC,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import {path, ui, npm, constants} from '@shopify/cli-kit'\nimport {PackageManager, installNodeModules} from '@shopify/cli-kit/node/node-package-manager'\nimport {Writable} from 'stream'\nimport {platform} from 'os'\n\ninterface UpdateCLIDependenciesOptions {\n directory: string\n packageJSON: npm.PackageJSON\n local: boolean\n}\n\nexport async function updateCLIDependencies({\n packageJSON,\n local,\n}: UpdateCLIDependenciesOptions): Promise<npm.PackageJSON> {\n const cliKitVersion = await constants.versions.cliKit()\n const moduleDirectory = path.moduleDirectory(import.meta.url)\n\n packageJSON.dependencies = packageJSON.dependencies || {}\n packageJSON.dependencies['@shopify/cli'] = cliKitVersion\n packageJSON.dependencies['@shopify/app'] = cliKitVersion\n\n if (local) {\n const cliPath = await packagePath('cli')\n const appPath = await packagePath('app')\n const cliKitPath = await packagePath('cli-kit')\n const pluginNgrokPath = await packagePath('plugin-ngrok')\n\n // eslint-disable-next-line require-atomic-updates\n packageJSON.dependencies['@shopify/cli'] = cliPath\n // eslint-disable-next-line require-atomic-updates\n packageJSON.dependencies['@shopify/app'] = appPath\n\n const dependencyOverrides = {\n '@shopify/cli': cliPath,\n '@shopify/app': appPath,\n '@shopify/cli-kit': cliKitPath,\n '@shopify/plugin-ngrok': pluginNgrokPath,\n }\n\n packageJSON.overrides = packageJSON.overrides\n ? {...packageJSON.overrides, ...dependencyOverrides}\n : dependencyOverrides\n\n packageJSON.resolutions = packageJSON.resolutions\n ? {...packageJSON.resolutions, ...dependencyOverrides}\n : dependencyOverrides\n }\n\n return packageJSON\n}\n\nasync function packagePath(packageName: string): Promise<string> {\n const packageAbsolutePath = (await path.findUp(`packages/${packageName}`, {\n type: 'directory',\n cwd: path.moduleDirectory(import.meta.url),\n })) as string\n return `file:${packageAbsolutePath}`\n}\n\nexport async function getDeepInstallNPMTasks({\n from,\n packageManager,\n didInstallEverything,\n}: {\n from: string\n packageManager: PackageManager\n didInstallEverything(): void\n}): Promise<ui.ListrTask[]> {\n const root = path.normalize(from)\n const packageJSONFiles = await path.glob([path.join(root, '**/package.json')])\n let foldersInstalled = 0\n\n return packageJSONFiles.map((filePath) => {\n const folderPath = filePath.replace('package.json', '')\n const titlePath = folderPath.replace(root, '')\n\n return {\n title: `Installing dependencies in ${titlePath}`,\n task: async (_, task) => {\n const output = new Writable({\n write(chunk, _, next) {\n task.output = chunk.toString()\n next()\n },\n })\n /**\n * Installation of dependencies using Yarn on Windows might lead\n * to \"EPERM: operation not permitted, unlink\" errors when Yarn tries\n * to access the cache. By limiting the network concurrency we mitigate the\n * error:\n *\n * Failing scenario: https://github.com/Shopify/cli/runs/7913938724\n * Reported issue: https://github.com/yarnpkg/yarn/issues/7212\n */\n const args = platform() === 'win32' && packageManager === 'yarn' ? ['--network-concurrency', '1'] : []\n await installNodeModules({directory: folderPath, packageManager, stdout: output, stderr: output, args})\n\n task.title = `Installed dependencies in ${titlePath}`\n\n foldersInstalled++\n\n if (foldersInstalled === packageJSONFiles.length) {\n didInstallEverything()\n }\n },\n }\n })\n}\n"]}
1
+ {"version":3,"file":"npm.js","sourceRoot":"","sources":["../../../src/utils/template/npm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,kBAAkB,EAAc,MAAM,4CAA4C,CAAA;AAC1G,OAAO,EAAC,eAAe,EAAC,MAAM,iCAAiC,CAAA;AAE/D,OAAO,EAAC,QAAQ,EAAE,eAAe,EAAE,aAAa,EAAC,MAAM,4BAA4B,CAAA;AACnF,OAAO,EAAC,IAAI,EAAE,UAAU,EAAC,MAAM,0BAA0B,CAAA;AACzD,OAAO,EAAC,QAAQ,EAAC,MAAM,IAAI,CAAA;AAQ3B,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,EAAC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,EAAE;QACvE,IAAI,EAAE,WAAW;QACjB,GAAG,EAAE,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;KACtC,CAAC,CAAW,CAAA;IACb,OAAO,QAAQ,mBAAmB,EAAE,CAAA;AACtC,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAAC,EAC3C,IAAI,EACJ,cAAc,GAIf;IACC,MAAM,IAAI,GAAG,aAAa,CAAC,IAAI,CAAC,CAAA;IAChC,MAAM,gBAAgB,GAAG,MAAM,IAAI,CAAC,CAAC,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAA;IAExE,OAAO,gBAAgB,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE;QACvC,MAAM,UAAU,GAAG,QAAQ,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC,CAAA;QACvD,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAA;QAE9C;;;;;;;;WAQG;QACH,MAAM,IAAI,GAAG,QAAQ,EAAE,KAAK,OAAO,IAAI,cAAc,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,uBAAuB,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;QACtG,OAAO;YACL,KAAK,EAAE,8BAA8B,SAAS,EAAE;YAChD,IAAI,EAAE,KAAK,IAAI,EAAE;gBACf,MAAM,kBAAkB,CAAC,EAAC,SAAS,EAAE,UAAU,EAAE,cAAc,EAAE,IAAI,EAAC,CAAC,CAAA;YACzE,CAAC;SACF,CAAA;IACH,CAAC,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import {PackageManager, installNodeModules, PackageJson} from '@shopify/cli-kit/node/node-package-manager'\nimport {CLI_KIT_VERSION} from '@shopify/cli-kit/common/version'\nimport {Task} from '@shopify/cli-kit/src/private/node/ui/components/Tasks.js'\nimport {joinPath, moduleDirectory, normalizePath} from '@shopify/cli-kit/node/path'\nimport {glob, findPathUp} from '@shopify/cli-kit/node/fs'\nimport {platform} from 'os'\n\ninterface UpdateCLIDependenciesOptions {\n directory: string\n packageJSON: PackageJson\n local: boolean\n}\n\nexport async function updateCLIDependencies({packageJSON, local}: UpdateCLIDependenciesOptions): Promise<PackageJson> {\n packageJSON.dependencies = packageJSON.dependencies || {}\n packageJSON.dependencies['@shopify/cli'] = CLI_KIT_VERSION\n packageJSON.dependencies['@shopify/app'] = CLI_KIT_VERSION\n\n if (local) {\n const cliPath = await packagePath('cli')\n const appPath = await packagePath('app')\n const cliKitPath = await packagePath('cli-kit')\n const pluginNgrokPath = await packagePath('plugin-ngrok')\n\n // eslint-disable-next-line require-atomic-updates\n packageJSON.dependencies['@shopify/cli'] = cliPath\n // eslint-disable-next-line require-atomic-updates\n packageJSON.dependencies['@shopify/app'] = appPath\n\n const dependencyOverrides = {\n '@shopify/cli': cliPath,\n '@shopify/app': appPath,\n '@shopify/cli-kit': cliKitPath,\n '@shopify/plugin-ngrok': pluginNgrokPath,\n }\n\n packageJSON.overrides = packageJSON.overrides\n ? {...packageJSON.overrides, ...dependencyOverrides}\n : dependencyOverrides\n\n packageJSON.resolutions = packageJSON.resolutions\n ? {...packageJSON.resolutions, ...dependencyOverrides}\n : dependencyOverrides\n }\n\n return packageJSON\n}\n\nasync function packagePath(packageName: string): Promise<string> {\n const packageAbsolutePath = (await findPathUp(`packages/${packageName}`, {\n type: 'directory',\n cwd: moduleDirectory(import.meta.url),\n })) as string\n return `file:${packageAbsolutePath}`\n}\n\nexport async function getDeepInstallNPMTasks({\n from,\n packageManager,\n}: {\n from: string\n packageManager: PackageManager\n}): Promise<Task[]> {\n const root = normalizePath(from)\n const packageJSONFiles = await glob([joinPath(root, '**/package.json')])\n\n return packageJSONFiles.map((filePath) => {\n const folderPath = filePath.replace('package.json', '')\n const titlePath = folderPath.replace(root, '')\n\n /**\n * Installation of dependencies using Yarn on Windows might lead\n * to \"EPERM: operation not permitted, unlink\" errors when Yarn tries\n * to access the cache. By limiting the network concurrency we mitigate the\n * error:\n *\n * Failing scenario: https://github.com/Shopify/cli/runs/7913938724\n * Reported issue: https://github.com/yarnpkg/yarn/issues/7212\n */\n const args = platform() === 'win32' && packageManager === 'yarn' ? ['--network-concurrency', '1'] : []\n return {\n title: `Installing dependencies in ${titlePath}`,\n task: async () => {\n await installNodeModules({directory: folderPath, packageManager, args})\n },\n }\n })\n}\n"]}
@@ -1,19 +1,21 @@
1
- import { file, path, error } from '@shopify/cli-kit';
1
+ import { error } from '@shopify/cli-kit';
2
+ import { readFile, findPathUp } from '@shopify/cli-kit/node/fs';
3
+ import { dirname } from '@shopify/cli-kit/node/path';
2
4
  import { fileURLToPath } from 'url';
3
5
  export async function cliVersion() {
4
- const cliPackageJsonpath = (await path.findUp('@shopify/cli/package.json', {
5
- cwd: path.dirname(fileURLToPath(import.meta.url)),
6
+ const cliPackageJsonpath = (await findPathUp('@shopify/cli/package.json', {
7
+ cwd: dirname(fileURLToPath(import.meta.url)),
6
8
  type: 'file',
7
9
  allowSymlinks: true,
8
10
  })) ??
9
- (await path.findUp('packages/cli/package.json', {
10
- cwd: path.dirname(fileURLToPath(import.meta.url)),
11
+ (await findPathUp('packages/cli/package.json', {
12
+ cwd: dirname(fileURLToPath(import.meta.url)),
11
13
  type: 'file',
12
14
  }));
13
15
  if (!cliPackageJsonpath) {
14
16
  throw new error.Bug("Couldn't determine the version of the CLI");
15
17
  }
16
- const packageJson = JSON.parse(await file.read(cliPackageJsonpath));
18
+ const packageJson = JSON.parse(await readFile(cliPackageJsonpath));
17
19
  return packageJson.version;
18
20
  }
19
21
  //# sourceMappingURL=versions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"versions.js","sourceRoot":"","sources":["../../src/utils/versions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAC,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAAC,aAAa,EAAC,MAAM,KAAK,CAAA;AAEjC,MAAM,CAAC,KAAK,UAAU,UAAU;IAC9B,MAAM,kBAAkB,GACtB,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,2BAA2B,EAAE;QAC9C,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACjD,IAAI,EAAE,MAAM;QACZ,aAAa,EAAE,IAAI;KACpB,CAAC,CAAC;QACH,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,2BAA2B,EAAE;YAC9C,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACjD,IAAI,EAAE,MAAM;SACb,CAAC,CAAC,CAAA;IACL,IAAI,CAAC,kBAAkB,EAAE;QACvB,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,2CAA2C,CAAC,CAAA;KACjE;IACD,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAA;IACnE,OAAO,WAAW,CAAC,OAAO,CAAA;AAC5B,CAAC","sourcesContent":["import {file, path, error} from '@shopify/cli-kit'\nimport {fileURLToPath} from 'url'\n\nexport async function cliVersion(): Promise<string> {\n const cliPackageJsonpath =\n (await path.findUp('@shopify/cli/package.json', {\n cwd: path.dirname(fileURLToPath(import.meta.url)),\n type: 'file',\n allowSymlinks: true,\n })) ??\n (await path.findUp('packages/cli/package.json', {\n cwd: path.dirname(fileURLToPath(import.meta.url)),\n type: 'file',\n }))\n if (!cliPackageJsonpath) {\n throw new error.Bug(\"Couldn't determine the version of the CLI\")\n }\n const packageJson = JSON.parse(await file.read(cliPackageJsonpath))\n return packageJson.version\n}\n"]}
1
+ {"version":3,"file":"versions.js","sourceRoot":"","sources":["../../src/utils/versions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,kBAAkB,CAAA;AACtC,OAAO,EAAC,QAAQ,EAAE,UAAU,EAAC,MAAM,0BAA0B,CAAA;AAC7D,OAAO,EAAC,OAAO,EAAC,MAAM,4BAA4B,CAAA;AAClD,OAAO,EAAC,aAAa,EAAC,MAAM,KAAK,CAAA;AAEjC,MAAM,CAAC,KAAK,UAAU,UAAU;IAC9B,MAAM,kBAAkB,GACtB,CAAC,MAAM,UAAU,CAAC,2BAA2B,EAAE;QAC7C,GAAG,EAAE,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC5C,IAAI,EAAE,MAAM;QACZ,aAAa,EAAE,IAAI;KACpB,CAAC,CAAC;QACH,CAAC,MAAM,UAAU,CAAC,2BAA2B,EAAE;YAC7C,GAAG,EAAE,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAC5C,IAAI,EAAE,MAAM;SACb,CAAC,CAAC,CAAA;IACL,IAAI,CAAC,kBAAkB,EAAE;QACvB,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,2CAA2C,CAAC,CAAA;KACjE;IACD,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,QAAQ,CAAC,kBAAkB,CAAC,CAAC,CAAA;IAClE,OAAO,WAAW,CAAC,OAAO,CAAA;AAC5B,CAAC","sourcesContent":["import {error} from '@shopify/cli-kit'\nimport {readFile, findPathUp} from '@shopify/cli-kit/node/fs'\nimport {dirname} from '@shopify/cli-kit/node/path'\nimport {fileURLToPath} from 'url'\n\nexport async function cliVersion(): Promise<string> {\n const cliPackageJsonpath =\n (await findPathUp('@shopify/cli/package.json', {\n cwd: dirname(fileURLToPath(import.meta.url)),\n type: 'file',\n allowSymlinks: true,\n })) ??\n (await findPathUp('packages/cli/package.json', {\n cwd: dirname(fileURLToPath(import.meta.url)),\n type: 'file',\n }))\n if (!cliPackageJsonpath) {\n throw new error.Bug(\"Couldn't determine the version of the CLI\")\n }\n const packageJson = JSON.parse(await readFile(cliPackageJsonpath))\n return packageJson.version\n}\n"]}
@@ -1 +1 @@
1
- {"version":"3.34.0","commands":{"init":{"id":"init","strict":true,"pluginName":"@shopify/create-app","pluginAlias":"@shopify/create-app","pluginType":"core","aliases":["create-app"],"flags":{"preset":{"name":"preset","type":"option","description":"The preset to apply to the current command.","hidden":true,"multiple":false},"verbose":{"name":"verbose","type":"boolean","description":"Increase the verbosity of the logs.","hidden":false,"allowNo":false},"name":{"name":"name","type":"option","char":"n","hidden":false,"multiple":false},"path":{"name":"path","type":"option","char":"p","hidden":false,"multiple":false},"template":{"name":"template","type":"option","description":"The app template. Accepts one of the following:\n - <node|php|ruby>\n - Any GitHub repo with optional branch and subpath, e.g., https://github.com/Shopify/<repository>/[subpath]#[branch]","multiple":false},"package-manager":{"name":"package-manager","type":"option","char":"d","hidden":false,"multiple":false,"options":["npm","yarn","pnpm"]},"local":{"name":"local","type":"boolean","char":"l","hidden":true,"allowNo":false}},"args":[]}}}
1
+ {"version":"3.36.0","commands":{"init":{"id":"init","strict":true,"pluginName":"@shopify/create-app","pluginAlias":"@shopify/create-app","pluginType":"core","aliases":["create-app"],"flags":{"preset":{"name":"preset","type":"option","description":"The preset to apply to the current command.","hidden":true,"multiple":false},"verbose":{"name":"verbose","type":"boolean","description":"Increase the verbosity of the logs.","hidden":false,"allowNo":false},"name":{"name":"name","type":"option","char":"n","hidden":false,"multiple":false},"path":{"name":"path","type":"option","char":"p","hidden":false,"multiple":false},"template":{"name":"template","type":"option","description":"The app template. Accepts one of the following:\n - <node|php|ruby>\n - Any GitHub repo with optional branch and subpath, e.g., https://github.com/Shopify/<repository>/[subpath]#[branch]","multiple":false},"package-manager":{"name":"package-manager","type":"option","char":"d","hidden":false,"multiple":false,"options":["npm","yarn","pnpm"]},"local":{"name":"local","type":"boolean","char":"l","hidden":true,"allowNo":false}},"args":[]}}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopify/create-app",
3
- "version": "3.34.0",
3
+ "version": "3.36.0",
4
4
  "private": false,
5
5
  "description": "A CLI tool to create a new Shopify app.",
6
6
  "keywords": [
@@ -40,7 +40,7 @@
40
40
  },
41
41
  "dependencies": {
42
42
  "@oclif/core": "1.21.0",
43
- "@shopify/cli-kit": "3.34.0"
43
+ "@shopify/cli-kit": "3.36.0"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@types/node": "14.17.0",