@shopify/cli 3.91.1 → 3.92.1
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.
- package/bin/run.js +2 -2
- package/dist/assets/dev-console/extensions/dev-console/assets/{index-0hw3R_TS.css → index-DISeE29z.css} +1 -1
- package/dist/assets/dev-console/extensions/dev-console/assets/{index-C12jKScn.js → index-WDo4Zf8i.js} +10 -10
- package/dist/assets/dev-console/index.html +2 -2
- package/dist/{chunk-5JYQJQ2E.js → chunk-42GAT4OC.js} +2 -2
- package/dist/{chunk-FKP67FZI.js → chunk-67BH5NUT.js} +3 -3
- package/dist/{chunk-RKFRXKFE.js → chunk-6FKKSH4P.js} +3 -3
- package/dist/{chunk-E4GUDBAR.js → chunk-6O2ILC2V.js} +17171 -13653
- package/dist/{chunk-OIUDJFV2.js → chunk-7H2O5J4R.js} +12 -5
- package/dist/{chunk-VUYVHHZY.js → chunk-7QAT7P3M.js} +4 -4
- package/dist/{chunk-Z5FK5H2M.js → chunk-AVEWTIFC.js} +7 -7
- package/dist/{chunk-VRUH5BDH.js → chunk-C74PXA4B.js} +4 -4
- package/dist/{chunk-E44JKFB6.js → chunk-CLJTWTB3.js} +2 -2
- package/dist/{chunk-K52ORY26.js → chunk-DM56XRBC.js} +7 -7
- package/dist/{chunk-77BDQRQW.js → chunk-E7IWFBAC.js} +6 -6
- package/dist/{chunk-TY5YKCUW.js → chunk-ESKZOJHR.js} +5 -5
- package/dist/{chunk-HTGTTXQL.js → chunk-EURIZXCA.js} +7 -17
- package/dist/{chunk-CEUL3KX5.js → chunk-EZZRDRCA.js} +7757 -6910
- package/dist/{chunk-SUFC4ISB.js → chunk-FESVG7HJ.js} +6 -6
- package/dist/{chunk-ZLV2A27J.js → chunk-FNFU6QXG.js} +2 -2
- package/dist/{chunk-PCNR4TMY.js → chunk-GUCQ3JUX.js} +5 -5
- package/dist/{chunk-EG6MBBEN.js → chunk-H4D3T5OG.js} +14 -1
- package/dist/{chunk-SJXHR42U.js → chunk-HG2B3F2E.js} +2 -2
- package/dist/{chunk-5ZDTGPNX.js → chunk-HOCBMVPF.js} +3 -3
- package/dist/{chunk-DUNGALP3.js → chunk-IJLB2OZD.js} +3 -3
- package/dist/{chunk-WDYPK6VH.js → chunk-JOUJHIPW.js} +5 -5
- package/dist/{chunk-QFO7QSBW.js → chunk-JW4Y5WPI.js} +4 -4
- package/dist/{chunk-I23GZAC4.js → chunk-KQU2IAXJ.js} +6 -7
- package/dist/{chunk-SVV4RJVX.js → chunk-LM5QFSME.js} +4 -4
- package/dist/{chunk-ATQVKUJC.js → chunk-M7TUKQMY.js} +4 -4
- package/dist/{chunk-RLJICWO6.js → chunk-NE5FI6FS.js} +4 -4
- package/dist/{chunk-LFMBIRVC.js → chunk-NG44KZZS.js} +3 -3
- package/dist/{chunk-HOIU6WRE.js → chunk-NK4SILXH.js} +3 -3
- package/dist/{chunk-IUKBWIQY.js → chunk-NQTUC6ZO.js} +3 -3
- package/dist/{chunk-HAG3HJ2V.js → chunk-O3GDENDY.js} +35 -47
- package/dist/{chunk-54FE2FGU.js → chunk-Q7FGFF32.js} +2 -2
- package/dist/{chunk-ITTNM7I4.js → chunk-QJQS7BBK.js} +2 -2
- package/dist/{chunk-DR5R5UTE.js → chunk-SMO4IV7V.js} +6 -6
- package/dist/{chunk-NYP3N62G.js → chunk-T5M3A5TW.js} +2 -2
- package/dist/{chunk-2YAGQHB2.js → chunk-TC5DUCXE.js} +3 -3
- package/dist/{chunk-XDCBS7SY.js → chunk-UL2FJ5NI.js} +3 -3
- package/dist/{chunk-KV3364EL.js → chunk-USGISM5H.js} +1 -1
- package/dist/{chunk-R622IPZN.js → chunk-WXB4MZ4Q.js} +3 -3
- package/dist/{chunk-K45ALTZ7.js → chunk-YDQVL7CP.js} +3 -3
- package/dist/{chunk-463KYFYO.js → chunk-YUJEBN2A.js} +2 -2
- package/dist/{chunk-TH7ZYYDZ.js → chunk-ZN7BY463.js} +1144 -79
- package/dist/{chunk-A2CZGTAP.js → chunk-ZVE6VSBX.js} +109 -165
- package/dist/cli/commands/auth/login.js +10 -10
- package/dist/cli/commands/auth/login.test.js +12 -12
- package/dist/cli/commands/auth/logout.js +10 -10
- package/dist/cli/commands/auth/logout.test.js +12 -12
- package/dist/cli/commands/cache/clear.js +11 -11
- package/dist/cli/commands/debug/command-flags.js +10 -10
- package/dist/cli/commands/docs/generate.js +10 -10
- package/dist/cli/commands/docs/generate.test.js +11 -11
- package/dist/cli/commands/doctor-release/doctor-release.js +10 -10
- package/dist/cli/commands/doctor-release/theme/index.js +16 -16
- package/dist/cli/commands/help.js +10 -10
- package/dist/cli/commands/kitchen-sink/async.js +11 -11
- package/dist/cli/commands/kitchen-sink/async.test.js +12 -12
- package/dist/cli/commands/kitchen-sink/index.js +13 -13
- package/dist/cli/commands/kitchen-sink/index.test.js +14 -14
- package/dist/cli/commands/kitchen-sink/prompts.js +11 -11
- package/dist/cli/commands/kitchen-sink/prompts.test.js +12 -12
- package/dist/cli/commands/kitchen-sink/static.js +11 -11
- package/dist/cli/commands/kitchen-sink/static.test.js +12 -12
- package/dist/cli/commands/notifications/generate.js +11 -11
- package/dist/cli/commands/notifications/list.js +11 -11
- package/dist/cli/commands/search.js +11 -11
- package/dist/cli/commands/upgrade.js +11 -11
- package/dist/cli/commands/upgrade.test.js +1 -1
- package/dist/cli/commands/version.js +11 -11
- package/dist/cli/commands/version.test.js +12 -12
- package/dist/cli/services/commands/notifications.js +9 -9
- package/dist/cli/services/commands/search.js +5 -5
- package/dist/cli/services/commands/search.test.js +6 -6
- package/dist/cli/services/commands/version.js +6 -6
- package/dist/cli/services/commands/version.test.js +8 -8
- package/dist/cli/services/doctor-release/context.js +2 -2
- package/dist/cli/services/doctor-release/theme/runner.js +9 -9
- package/dist/cli/services/doctor-release/theme/tests/init.js +6 -6
- package/dist/cli/services/doctor-release/theme/tests/push.js +6 -6
- package/dist/cli/services/kitchen-sink/async.js +5 -5
- package/dist/cli/services/kitchen-sink/prompts.js +5 -5
- package/dist/cli/services/kitchen-sink/static.js +5 -5
- package/dist/{custom-oclif-loader-AAJZ7WBW.js → custom-oclif-loader-MKZUUH3S.js} +5 -5
- package/dist/{devtools-BAOTGU3O.js → devtools-PI7DMKVT.js} +4 -4
- package/dist/{error-handler-GSQRFK57.js → error-handler-STUDJHBV.js} +8 -8
- package/dist/hooks/postrun.js +8 -8
- package/dist/hooks/prerun.js +9 -9
- package/dist/index.js +68763 -58537
- package/dist/{lib-HAW436ZI.js → lib-R4TQWF6K.js} +3 -3
- package/dist/{local-GOP2BHNI.js → local-SJCC5BYA.js} +5 -5
- package/dist/{morph-7WAMUK6I.js → morph-32Y5BUJM.js} +9 -9
- package/dist/{node-package-manager-W4R4DUTE.js → node-package-manager-2L2NJGLS.js} +6 -6
- package/dist/{path-GB4VIEM6.js → path-H3TILUQU.js} +4 -2
- package/dist/{prettier-5ODD6NHV.js → prettier-4RCJTIXY.js} +2 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-VRLRLHWH.js → ui-ER5WOAGG.js} +5 -5
- package/dist/{workerd-AO3T6IIJ.js → workerd-KQSXBLVM.js} +13 -13
- package/oclif.manifest.json +6 -6
- package/package.json +7 -59
- package/dist/chunk-2EQNSO7C.js +0 -142
- package/dist/cli/services/upgrade.d.ts +0 -5
- package/dist/cli/services/upgrade.js +0 -21
- package/dist/cli/services/upgrade.test.js +0 -171
|
@@ -17,18 +17,18 @@ import {
|
|
|
17
17
|
renderTasks,
|
|
18
18
|
renderTextPrompt,
|
|
19
19
|
renderWarning
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-6O2ILC2V.js";
|
|
21
21
|
import "./chunk-6NVYATES.js";
|
|
22
22
|
import "./chunk-CTFDRWUN.js";
|
|
23
23
|
import "./chunk-7IK72W75.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-EZZRDRCA.js";
|
|
25
25
|
import "./chunk-KUJQ4AB6.js";
|
|
26
26
|
import "./chunk-UMUTXITN.js";
|
|
27
|
-
import "./chunk-G2ZZKGSV.js";
|
|
28
27
|
import "./chunk-UV5N2VL7.js";
|
|
29
28
|
import "./chunk-XE5EOEBL.js";
|
|
30
29
|
import "./chunk-Q2H6D2MH.js";
|
|
31
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-G2ZZKGSV.js";
|
|
31
|
+
import "./chunk-H4D3T5OG.js";
|
|
32
32
|
import "./chunk-PKR7KJ6P.js";
|
|
33
33
|
export {
|
|
34
34
|
handleCtrlC,
|
|
@@ -50,4 +50,4 @@ export {
|
|
|
50
50
|
renderTextPrompt,
|
|
51
51
|
renderWarning
|
|
52
52
|
};
|
|
53
|
-
//# sourceMappingURL=ui-
|
|
53
|
+
//# sourceMappingURL=ui-ER5WOAGG.js.map
|
|
@@ -10,16 +10,16 @@ import {
|
|
|
10
10
|
importLocal,
|
|
11
11
|
logRequestLine,
|
|
12
12
|
setConstructors
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-ZN7BY463.js";
|
|
14
|
+
import "./chunk-USGISM5H.js";
|
|
15
15
|
import "./chunk-56ELYGPH.js";
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-KQU2IAXJ.js";
|
|
17
|
+
import "./chunk-FESVG7HJ.js";
|
|
18
|
+
import "./chunk-ZVE6VSBX.js";
|
|
19
19
|
import "./chunk-SHWOPMLQ.js";
|
|
20
20
|
import "./chunk-VBBBCVMH.js";
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-O3GDENDY.js";
|
|
22
|
+
import "./chunk-T5M3A5TW.js";
|
|
23
23
|
import {
|
|
24
24
|
AbortError,
|
|
25
25
|
createFileReadStream,
|
|
@@ -27,26 +27,26 @@ import {
|
|
|
27
27
|
readFile,
|
|
28
28
|
renderSuccess,
|
|
29
29
|
source_default
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-6O2ILC2V.js";
|
|
31
31
|
import "./chunk-6NVYATES.js";
|
|
32
32
|
import "./chunk-CTFDRWUN.js";
|
|
33
33
|
import "./chunk-7IK72W75.js";
|
|
34
|
-
import "./chunk-
|
|
34
|
+
import "./chunk-EZZRDRCA.js";
|
|
35
35
|
import "./chunk-KUJQ4AB6.js";
|
|
36
36
|
import "./chunk-UMUTXITN.js";
|
|
37
|
-
import "./chunk-G2ZZKGSV.js";
|
|
38
37
|
import "./chunk-UV5N2VL7.js";
|
|
39
38
|
import "./chunk-XE5EOEBL.js";
|
|
40
39
|
import "./chunk-Q2H6D2MH.js";
|
|
40
|
+
import "./chunk-G2ZZKGSV.js";
|
|
41
41
|
import {
|
|
42
42
|
dirname,
|
|
43
43
|
resolvePath
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-H4D3T5OG.js";
|
|
45
45
|
import {
|
|
46
46
|
init_cjs_shims
|
|
47
47
|
} from "./chunk-PKR7KJ6P.js";
|
|
48
48
|
|
|
49
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.10_@graphql-codegen+cli@5.0.4_@parcel+watcher@2.5.1_@types+
|
|
49
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.10_@graphql-codegen+cli@5.0.4_@parcel+watcher@2.5.1_@types+n_224b49f683ddd0894a6efb2678941bc0/node_modules/@shopify/cli-hydrogen/dist/lib/mini-oxygen/workerd.js
|
|
50
50
|
init_cjs_shims();
|
|
51
51
|
import { createRequire } from "node:module";
|
|
52
52
|
async function startWorkerdServer({
|
|
@@ -163,4 +163,4 @@ async function startWorkerdServer({
|
|
|
163
163
|
export {
|
|
164
164
|
startWorkerdServer
|
|
165
165
|
};
|
|
166
|
-
//# sourceMappingURL=workerd-
|
|
166
|
+
//# sourceMappingURL=workerd-KQSXBLVM.js.map
|
package/oclif.manifest.json
CHANGED
|
@@ -1867,8 +1867,8 @@
|
|
|
1867
1867
|
"args": {
|
|
1868
1868
|
},
|
|
1869
1869
|
"customPluginName": "@shopify/app",
|
|
1870
|
-
"description": "Creates GraphQL types based on your \"input query\" (https://shopify.dev/docs/apps/functions/input-output#input) for a function
|
|
1871
|
-
"descriptionWithMarkdown": "Creates GraphQL types based on your [input query](https://shopify.dev/docs/apps/functions/input-output#input) for a function
|
|
1870
|
+
"description": "Creates GraphQL types based on your \"input query\" (https://shopify.dev/docs/apps/functions/input-output#input) for a function. Supports JavaScript functions out of the box, or any language via the `build.typegen_command` configuration.",
|
|
1871
|
+
"descriptionWithMarkdown": "Creates GraphQL types based on your [input query](https://shopify.dev/docs/apps/functions/input-output#input) for a function. Supports JavaScript functions out of the box, or any language via the `build.typegen_command` configuration.",
|
|
1872
1872
|
"flags": {
|
|
1873
1873
|
"client-id": {
|
|
1874
1874
|
"description": "The Client ID of your app.",
|
|
@@ -1938,7 +1938,7 @@
|
|
|
1938
1938
|
"pluginName": "@shopify/cli",
|
|
1939
1939
|
"pluginType": "core",
|
|
1940
1940
|
"strict": true,
|
|
1941
|
-
"summary": "Generate GraphQL types for a
|
|
1941
|
+
"summary": "Generate GraphQL types for a function."
|
|
1942
1942
|
},
|
|
1943
1943
|
"app:generate:extension": {
|
|
1944
1944
|
"aliases": [
|
|
@@ -1946,8 +1946,8 @@
|
|
|
1946
1946
|
"args": {
|
|
1947
1947
|
},
|
|
1948
1948
|
"customPluginName": "@shopify/app",
|
|
1949
|
-
"description": "Generates a new \"app extension\" (https://shopify.dev/docs/apps/app-extensions). For a list of app extensions that you can generate using this command, refer to \"Supported extensions\" (https://shopify.dev/docs/apps/
|
|
1950
|
-
"descriptionWithMarkdown": "Generates a new [app extension](https://shopify.dev/docs/apps/app-extensions). For a list of app extensions that you can generate using this command, refer to [Supported extensions](https://shopify.dev/docs/apps/
|
|
1949
|
+
"description": "Generates a new \"app extension\" (https://shopify.dev/docs/apps/build/app-extensions). For a list of app extensions that you can generate using this command, refer to \"Supported extensions\" (https://shopify.dev/docs/apps/build/app-extensions/list-of-app-extensions).\n\n Each new app extension is created in a folder under `extensions/`. To learn more about the extensions file structure, refer to \"App structure\" (https://shopify.dev/docs/apps/build/cli-for-apps/app-structure) and the documentation for your extension.\n ",
|
|
1950
|
+
"descriptionWithMarkdown": "Generates a new [app extension](https://shopify.dev/docs/apps/build/app-extensions). For a list of app extensions that you can generate using this command, refer to [Supported extensions](https://shopify.dev/docs/apps/build/app-extensions/list-of-app-extensions).\n\n Each new app extension is created in a folder under `extensions/`. To learn more about the extensions file structure, refer to [App structure](https://shopify.dev/docs/apps/build/cli-for-apps/app-structure) and the documentation for your extension.\n ",
|
|
1951
1951
|
"flags": {
|
|
1952
1952
|
"client-id": {
|
|
1953
1953
|
"description": "The Client ID of your app.",
|
|
@@ -7933,5 +7933,5 @@
|
|
|
7933
7933
|
"summary": "Trigger delivery of a sample webhook topic payload to a designated address."
|
|
7934
7934
|
}
|
|
7935
7935
|
},
|
|
7936
|
-
"version": "3.
|
|
7936
|
+
"version": "3.92.1"
|
|
7937
7937
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shopify/cli",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.92.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A CLI tool to build for the Shopify platform",
|
|
6
6
|
"keywords": [
|
|
@@ -39,56 +39,6 @@
|
|
|
39
39
|
"/dist",
|
|
40
40
|
"/oclif.manifest.json"
|
|
41
41
|
],
|
|
42
|
-
"eslintConfig": {
|
|
43
|
-
"extends": [
|
|
44
|
-
"../../.eslintrc.cjs"
|
|
45
|
-
],
|
|
46
|
-
"overrides": [
|
|
47
|
-
{
|
|
48
|
-
"files": [
|
|
49
|
-
"**/bin/*.js"
|
|
50
|
-
],
|
|
51
|
-
"parser": "espree",
|
|
52
|
-
"extends": [
|
|
53
|
-
"plugin:@typescript-eslint/disable-type-checked"
|
|
54
|
-
],
|
|
55
|
-
"rules": {
|
|
56
|
-
"@typescript-eslint/naming-convention": "off",
|
|
57
|
-
"@typescript-eslint/no-floating-promises": "off",
|
|
58
|
-
"@typescript-eslint/no-misused-promises": "off",
|
|
59
|
-
"@typescript-eslint/no-unnecessary-type-assertion": "off",
|
|
60
|
-
"@typescript-eslint/switch-exhaustiveness-check": "off",
|
|
61
|
-
"import/first": "off",
|
|
62
|
-
"import/no-unresolved": "off",
|
|
63
|
-
"node/shebang": "off",
|
|
64
|
-
"@shopify/cli/specific-imports-in-bootstrap-code": [
|
|
65
|
-
"error",
|
|
66
|
-
{
|
|
67
|
-
"static": [
|
|
68
|
-
"../dist/index.js"
|
|
69
|
-
]
|
|
70
|
-
}
|
|
71
|
-
],
|
|
72
|
-
"@typescript-eslint/consistent-type-assertions": "off"
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
"files": [
|
|
77
|
-
"src/index.ts"
|
|
78
|
-
],
|
|
79
|
-
"rules": {
|
|
80
|
-
"@shopify/cli/specific-imports-in-bootstrap-code": [
|
|
81
|
-
"error",
|
|
82
|
-
{
|
|
83
|
-
"static": [
|
|
84
|
-
"@shopify/cli-kit/node/cli"
|
|
85
|
-
]
|
|
86
|
-
}
|
|
87
|
-
]
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
]
|
|
91
|
-
},
|
|
92
42
|
"dependencies": {
|
|
93
43
|
"@ast-grep/napi": "0.33.0",
|
|
94
44
|
"esbuild": "0.27.2",
|
|
@@ -98,17 +48,15 @@
|
|
|
98
48
|
"@oclif/core": "4.5.3",
|
|
99
49
|
"@oclif/plugin-commands": "4.1.33",
|
|
100
50
|
"@oclif/plugin-plugins": "5.4.47",
|
|
101
|
-
"@shopify/app": "3.
|
|
102
|
-
"@shopify/cli-kit": "3.
|
|
103
|
-
"@shopify/plugin-cloudflare": "3.
|
|
104
|
-
"@shopify/plugin-did-you-mean": "3.
|
|
105
|
-
"@shopify/theme": "3.
|
|
51
|
+
"@shopify/app": "3.92.1",
|
|
52
|
+
"@shopify/cli-kit": "3.92.1",
|
|
53
|
+
"@shopify/plugin-cloudflare": "3.92.1",
|
|
54
|
+
"@shopify/plugin-did-you-mean": "3.92.1",
|
|
55
|
+
"@shopify/theme": "3.92.1",
|
|
106
56
|
"@shopify/cli-hydrogen": "11.1.10",
|
|
107
57
|
"@types/global-agent": "3.0.0",
|
|
108
|
-
"@typescript-eslint/eslint-plugin": "7.13.1",
|
|
109
58
|
"@vitest/coverage-istanbul": "^3.1.4",
|
|
110
|
-
"esbuild-plugin-copy": "^2.1.1"
|
|
111
|
-
"espree": "9.6.1"
|
|
59
|
+
"esbuild-plugin-copy": "^2.1.1"
|
|
112
60
|
},
|
|
113
61
|
"engines": {
|
|
114
62
|
"node": ">=20.10.0"
|
package/dist/chunk-2EQNSO7C.js
DELETED
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
addNPMDependencies,
|
|
3
|
-
checkForNewVersion,
|
|
4
|
-
findUpAndReadPackageJson,
|
|
5
|
-
getPackageManager,
|
|
6
|
-
usesWorkspaces
|
|
7
|
-
} from "./chunk-HAG3HJ2V.js";
|
|
8
|
-
import {
|
|
9
|
-
AbortError,
|
|
10
|
-
exec,
|
|
11
|
-
findPathUp,
|
|
12
|
-
glob,
|
|
13
|
-
outputContent,
|
|
14
|
-
outputInfo,
|
|
15
|
-
outputSuccess,
|
|
16
|
-
outputToken,
|
|
17
|
-
outputWarn
|
|
18
|
-
} from "./chunk-E4GUDBAR.js";
|
|
19
|
-
import {
|
|
20
|
-
dirname,
|
|
21
|
-
joinPath,
|
|
22
|
-
moduleDirectory
|
|
23
|
-
} from "./chunk-EG6MBBEN.js";
|
|
24
|
-
import {
|
|
25
|
-
init_cjs_shims
|
|
26
|
-
} from "./chunk-PKR7KJ6P.js";
|
|
27
|
-
|
|
28
|
-
// src/cli/services/upgrade.ts
|
|
29
|
-
init_cjs_shims();
|
|
30
|
-
var globalPlugins = ["@shopify/theme"];
|
|
31
|
-
async function upgrade(directory, currentVersion, { env } = { env: process.env }) {
|
|
32
|
-
let newestVersion, projectDir = await getProjectDir(directory);
|
|
33
|
-
if (projectDir)
|
|
34
|
-
newestVersion = await upgradeLocalShopify(projectDir, currentVersion);
|
|
35
|
-
else {
|
|
36
|
-
if (usingPackageManager({ env }))
|
|
37
|
-
throw new AbortError(
|
|
38
|
-
outputContent`Couldn't find an app toml file at ${outputToken.path(
|
|
39
|
-
directory
|
|
40
|
-
)}, is this a Shopify project directory?`
|
|
41
|
-
);
|
|
42
|
-
newestVersion = await upgradeGlobalShopify(currentVersion, { env });
|
|
43
|
-
}
|
|
44
|
-
newestVersion && outputSuccess(`Upgraded Shopify CLI to version ${newestVersion}`);
|
|
45
|
-
}
|
|
46
|
-
async function getProjectDir(directory) {
|
|
47
|
-
let configFiles = ["shopify.app{,.*}.toml", "hydrogen.config.js", "hydrogen.config.ts"], configFile = await findPathUp(async (directory2) => {
|
|
48
|
-
let configPaths = await glob(configFiles.map((file) => joinPath(directory2, file)));
|
|
49
|
-
return configPaths.length > 0 ? configPaths[0] : void 0;
|
|
50
|
-
}, {
|
|
51
|
-
cwd: directory,
|
|
52
|
-
type: "file"
|
|
53
|
-
});
|
|
54
|
-
if (configFile) return dirname(configFile);
|
|
55
|
-
}
|
|
56
|
-
async function upgradeLocalShopify(projectDir, currentVersion) {
|
|
57
|
-
let packageJson = (await findUpAndReadPackageJson(projectDir)).content, packageJsonDependencies = packageJson.dependencies || {}, packageJsonDevDependencies = packageJson.devDependencies || {}, allDependencies = { ...packageJsonDependencies, ...packageJsonDevDependencies }, resolvedCLIVersion = allDependencies[await cliDependency()], resolvedAppVersion = allDependencies["@shopify/app"]?.replace(/[\^~]/, "");
|
|
58
|
-
resolvedCLIVersion.slice(0, 1).match(/[\^~]/) && (resolvedCLIVersion = currentVersion);
|
|
59
|
-
let newestCLIVersion = await checkForNewVersion(await cliDependency(), resolvedCLIVersion), newestAppVersion = resolvedAppVersion ? await checkForNewVersion("@shopify/app", resolvedAppVersion) : void 0;
|
|
60
|
-
if (newestCLIVersion)
|
|
61
|
-
outputUpgradeMessage(resolvedCLIVersion, newestCLIVersion);
|
|
62
|
-
else if (resolvedAppVersion && newestAppVersion)
|
|
63
|
-
outputUpgradeMessage(resolvedAppVersion, newestAppVersion);
|
|
64
|
-
else {
|
|
65
|
-
outputWontInstallMessage(resolvedCLIVersion);
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
return await installJsonDependencies("prod", packageJsonDependencies, projectDir), await installJsonDependencies("dev", packageJsonDevDependencies, projectDir), newestCLIVersion ?? newestAppVersion;
|
|
69
|
-
}
|
|
70
|
-
async function upgradeGlobalShopify(currentVersion, { env } = { env: process.env }) {
|
|
71
|
-
let newestVersion = await checkForNewVersion(await cliDependency(), currentVersion);
|
|
72
|
-
if (!newestVersion) {
|
|
73
|
-
outputWontInstallMessage(currentVersion);
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
outputUpgradeMessage(currentVersion, newestVersion);
|
|
77
|
-
let homebrewPackage = env.SHOPIFY_HOMEBREW_FORMULA;
|
|
78
|
-
try {
|
|
79
|
-
if (homebrewPackage)
|
|
80
|
-
throw new AbortError(
|
|
81
|
-
outputContent`Upgrade only works for packages managed by a Node package manager (e.g. npm). Run ${outputToken.genericShellCommand(
|
|
82
|
-
"brew upgrade && brew update"
|
|
83
|
-
)} instead`
|
|
84
|
-
);
|
|
85
|
-
await upgradeGlobalViaNpm();
|
|
86
|
-
} catch (err) {
|
|
87
|
-
throw outputWarn("Upgrade failed!"), err;
|
|
88
|
-
}
|
|
89
|
-
return newestVersion;
|
|
90
|
-
}
|
|
91
|
-
async function upgradeGlobalViaNpm() {
|
|
92
|
-
let args = [
|
|
93
|
-
"install",
|
|
94
|
-
"-g",
|
|
95
|
-
`${await cliDependency()}@latest`,
|
|
96
|
-
...globalPlugins.map((plugin) => `${plugin}@latest`)
|
|
97
|
-
];
|
|
98
|
-
outputInfo(
|
|
99
|
-
outputContent`Attempting to upgrade via ${outputToken.genericShellCommand(["npm", ...args].join(" "))}...`
|
|
100
|
-
), await exec("npm", args, { stdio: "inherit" });
|
|
101
|
-
}
|
|
102
|
-
function outputWontInstallMessage(currentVersion) {
|
|
103
|
-
outputInfo(outputContent`You're on the latest version, ${outputToken.yellow(currentVersion)}, no need to upgrade!`);
|
|
104
|
-
}
|
|
105
|
-
function outputUpgradeMessage(currentVersion, newestVersion) {
|
|
106
|
-
outputInfo(
|
|
107
|
-
outputContent`Upgrading CLI from ${outputToken.yellow(currentVersion)} to ${outputToken.yellow(newestVersion)}...`
|
|
108
|
-
);
|
|
109
|
-
}
|
|
110
|
-
async function installJsonDependencies(depsEnv, deps, directory) {
|
|
111
|
-
let packagesToUpdate = [await cliDependency(), ...await oclifPlugins()].filter((pkg) => !!deps[pkg]).map((pkg) => ({ name: pkg, version: "latest" })), appUsesWorkspaces = await usesWorkspaces(directory);
|
|
112
|
-
packagesToUpdate.length > 0 && await addNPMDependencies(packagesToUpdate, {
|
|
113
|
-
packageManager: await getPackageManager(directory),
|
|
114
|
-
type: depsEnv,
|
|
115
|
-
directory,
|
|
116
|
-
stdout: process.stdout,
|
|
117
|
-
stderr: process.stderr,
|
|
118
|
-
addToRootDirectory: appUsesWorkspaces
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
async function cliDependency() {
|
|
122
|
-
return (await packageJsonContents()).name;
|
|
123
|
-
}
|
|
124
|
-
async function oclifPlugins() {
|
|
125
|
-
return (await packageJsonContents())?.oclif?.plugins || [];
|
|
126
|
-
}
|
|
127
|
-
var _packageJsonContents;
|
|
128
|
-
async function packageJsonContents() {
|
|
129
|
-
if (!_packageJsonContents) {
|
|
130
|
-
let packageJson = await findUpAndReadPackageJson(moduleDirectory(import.meta.url));
|
|
131
|
-
_packageJsonContents = _packageJsonContents || packageJson.content;
|
|
132
|
-
}
|
|
133
|
-
return _packageJsonContents;
|
|
134
|
-
}
|
|
135
|
-
function usingPackageManager({ env } = { env: process.env }) {
|
|
136
|
-
return !!env.npm_config_user_agent;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
export {
|
|
140
|
-
upgrade
|
|
141
|
-
};
|
|
142
|
-
//# sourceMappingURL=chunk-2EQNSO7C.js.map
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
upgrade
|
|
3
|
-
} from "../../chunk-2EQNSO7C.js";
|
|
4
|
-
import "../../chunk-HAG3HJ2V.js";
|
|
5
|
-
import "../../chunk-E4GUDBAR.js";
|
|
6
|
-
import "../../chunk-6NVYATES.js";
|
|
7
|
-
import "../../chunk-CTFDRWUN.js";
|
|
8
|
-
import "../../chunk-7IK72W75.js";
|
|
9
|
-
import "../../chunk-CEUL3KX5.js";
|
|
10
|
-
import "../../chunk-KUJQ4AB6.js";
|
|
11
|
-
import "../../chunk-UMUTXITN.js";
|
|
12
|
-
import "../../chunk-G2ZZKGSV.js";
|
|
13
|
-
import "../../chunk-UV5N2VL7.js";
|
|
14
|
-
import "../../chunk-XE5EOEBL.js";
|
|
15
|
-
import "../../chunk-Q2H6D2MH.js";
|
|
16
|
-
import "../../chunk-EG6MBBEN.js";
|
|
17
|
-
import "../../chunk-PKR7KJ6P.js";
|
|
18
|
-
export {
|
|
19
|
-
upgrade
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=upgrade.js.map
|
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
upgrade
|
|
3
|
-
} from "../../chunk-2EQNSO7C.js";
|
|
4
|
-
import {
|
|
5
|
-
mockAndCaptureOutput
|
|
6
|
-
} from "../../chunk-E44JKFB6.js";
|
|
7
|
-
import {
|
|
8
|
-
afterEach,
|
|
9
|
-
beforeEach,
|
|
10
|
-
describe,
|
|
11
|
-
globalExpect,
|
|
12
|
-
test,
|
|
13
|
-
vi
|
|
14
|
-
} from "../../chunk-HTGTTXQL.js";
|
|
15
|
-
import {
|
|
16
|
-
node_package_manager_exports
|
|
17
|
-
} from "../../chunk-HAG3HJ2V.js";
|
|
18
|
-
import {
|
|
19
|
-
AbortError,
|
|
20
|
-
captureOutput,
|
|
21
|
-
exec,
|
|
22
|
-
inTemporaryDirectory,
|
|
23
|
-
platformAndArch,
|
|
24
|
-
touchFile,
|
|
25
|
-
writeFile
|
|
26
|
-
} from "../../chunk-E4GUDBAR.js";
|
|
27
|
-
import "../../chunk-6NVYATES.js";
|
|
28
|
-
import "../../chunk-CTFDRWUN.js";
|
|
29
|
-
import "../../chunk-7IK72W75.js";
|
|
30
|
-
import "../../chunk-CEUL3KX5.js";
|
|
31
|
-
import "../../chunk-KUJQ4AB6.js";
|
|
32
|
-
import "../../chunk-UMUTXITN.js";
|
|
33
|
-
import "../../chunk-G2ZZKGSV.js";
|
|
34
|
-
import "../../chunk-UV5N2VL7.js";
|
|
35
|
-
import "../../chunk-XE5EOEBL.js";
|
|
36
|
-
import "../../chunk-Q2H6D2MH.js";
|
|
37
|
-
import {
|
|
38
|
-
joinPath,
|
|
39
|
-
normalizePath
|
|
40
|
-
} from "../../chunk-EG6MBBEN.js";
|
|
41
|
-
import {
|
|
42
|
-
init_cjs_shims
|
|
43
|
-
} from "../../chunk-PKR7KJ6P.js";
|
|
44
|
-
|
|
45
|
-
// src/cli/services/upgrade.test.ts
|
|
46
|
-
init_cjs_shims();
|
|
47
|
-
var oldCliVersion = "3.0.0", currentCliVersion = "3.10.0";
|
|
48
|
-
vi.mock("@shopify/cli-kit/node/os", async () => ({
|
|
49
|
-
platformAndArch: vi.fn()
|
|
50
|
-
}));
|
|
51
|
-
vi.mock("@shopify/cli-kit/node/system");
|
|
52
|
-
beforeEach(async () => {
|
|
53
|
-
vi.mocked(platformAndArch).mockReturnValue({ platform: "windows", arch: "amd64" });
|
|
54
|
-
});
|
|
55
|
-
afterEach(() => {
|
|
56
|
-
mockAndCaptureOutput().clear();
|
|
57
|
-
});
|
|
58
|
-
describe("upgrade global CLI", () => {
|
|
59
|
-
test("does not upgrade globally if the latest version is found", async () => {
|
|
60
|
-
await inTemporaryDirectory(async (tmpDir) => {
|
|
61
|
-
let outputMock = mockAndCaptureOutput();
|
|
62
|
-
vi.spyOn(node_package_manager_exports, "checkForNewVersion").mockResolvedValue(void 0), await upgrade(tmpDir, currentCliVersion, { env: {} }), globalExpect(outputMock.info()).toMatchInlineSnapshot(`
|
|
63
|
-
"You're on the latest version, ${currentCliVersion}, no need to upgrade!"
|
|
64
|
-
`);
|
|
65
|
-
});
|
|
66
|
-
}), test("upgrades globally using npm if the latest version is not found", async () => {
|
|
67
|
-
await inTemporaryDirectory(async (tmpDir) => {
|
|
68
|
-
let outputMock = mockAndCaptureOutput();
|
|
69
|
-
vi.spyOn(node_package_manager_exports, "checkForNewVersion").mockResolvedValue(currentCliVersion), await upgrade(tmpDir, oldCliVersion, { env: {} }), globalExpect(vi.mocked(exec)).toHaveBeenCalledWith(
|
|
70
|
-
"npm",
|
|
71
|
-
["install", "-g", "@shopify/cli@latest", "@shopify/theme@latest"],
|
|
72
|
-
{ stdio: "inherit" }
|
|
73
|
-
), globalExpect(outputMock.info()).toMatchInlineSnapshot(`
|
|
74
|
-
"Upgrading CLI from ${oldCliVersion} to ${currentCliVersion}...
|
|
75
|
-
Attempting to upgrade via \`npm install -g @shopify/cli@latest @shopify/theme@latest\`..."
|
|
76
|
-
`), globalExpect(outputMock.success()).toMatchInlineSnapshot(`
|
|
77
|
-
"Upgraded Shopify CLI to version ${currentCliVersion}"
|
|
78
|
-
`);
|
|
79
|
-
});
|
|
80
|
-
}), ["shopify-cli", "shopify-cli@3"].forEach((homebrewPackageName) => {
|
|
81
|
-
test("upgrades globally using Homebrew if the latest version is not found and the CLI was installed via Homebrew", async () => {
|
|
82
|
-
await inTemporaryDirectory(async (tmpDir) => {
|
|
83
|
-
vi.spyOn(node_package_manager_exports, "checkForNewVersion").mockResolvedValue(currentCliVersion), await globalExpect(async () => {
|
|
84
|
-
await upgrade(tmpDir, oldCliVersion, { env: { SHOPIFY_HOMEBREW_FORMULA: homebrewPackageName } });
|
|
85
|
-
}).rejects.toThrowError(AbortError);
|
|
86
|
-
});
|
|
87
|
-
});
|
|
88
|
-
});
|
|
89
|
-
});
|
|
90
|
-
describe("upgrade local CLI", () => {
|
|
91
|
-
test("throws an error if a valid app config file is missing", async () => {
|
|
92
|
-
await inTemporaryDirectory(async (tmpDir) => {
|
|
93
|
-
await Promise.all([
|
|
94
|
-
writeFile(
|
|
95
|
-
joinPath(tmpDir, "package.json"),
|
|
96
|
-
JSON.stringify({ dependencies: { "@shopify/cli": currentCliVersion, "@shopify/app": currentCliVersion } })
|
|
97
|
-
),
|
|
98
|
-
touchFile(joinPath(tmpDir, "shopify.wrongapp.toml"))
|
|
99
|
-
]);
|
|
100
|
-
let outputMock = mockAndCaptureOutput();
|
|
101
|
-
vi.spyOn(node_package_manager_exports, "checkForNewVersion").mockResolvedValue(void 0), await globalExpect(upgrade(tmpDir, currentCliVersion, { env: { npm_config_user_agent: "npm" } })).rejects.toBeInstanceOf(
|
|
102
|
-
AbortError
|
|
103
|
-
);
|
|
104
|
-
});
|
|
105
|
-
}), test("does not upgrade locally if the latest version is found", async () => {
|
|
106
|
-
await inTemporaryDirectory(async (tmpDir) => {
|
|
107
|
-
await Promise.all([
|
|
108
|
-
writeFile(
|
|
109
|
-
joinPath(tmpDir, "package.json"),
|
|
110
|
-
JSON.stringify({ dependencies: { "@shopify/cli": currentCliVersion, "@shopify/app": currentCliVersion } })
|
|
111
|
-
),
|
|
112
|
-
touchFile(joinPath(tmpDir, "shopify.app.toml"))
|
|
113
|
-
]);
|
|
114
|
-
let outputMock = mockAndCaptureOutput();
|
|
115
|
-
vi.spyOn(node_package_manager_exports, "checkForNewVersion").mockResolvedValue(void 0), await upgrade(tmpDir, currentCliVersion, { env: { npm_config_user_agent: "npm" } }), globalExpect(outputMock.info()).toMatchInlineSnapshot(`
|
|
116
|
-
"You're on the latest version, ${currentCliVersion}, no need to upgrade!"
|
|
117
|
-
`);
|
|
118
|
-
});
|
|
119
|
-
}), test("upgrades locally if the latest version is not found", async () => {
|
|
120
|
-
await inTemporaryDirectory(async (tmpDir) => {
|
|
121
|
-
await Promise.all([
|
|
122
|
-
writeFile(
|
|
123
|
-
joinPath(tmpDir, "package.json"),
|
|
124
|
-
JSON.stringify({ dependencies: { "@shopify/cli": oldCliVersion, "@shopify/app": oldCliVersion } })
|
|
125
|
-
),
|
|
126
|
-
touchFile(joinPath(tmpDir, "shopify.app.toml"))
|
|
127
|
-
]), vi.mocked(captureOutput).mockResolvedValueOnce(tmpDir);
|
|
128
|
-
let outputMock = mockAndCaptureOutput();
|
|
129
|
-
vi.spyOn(node_package_manager_exports, "checkForNewVersion").mockResolvedValueOnce(currentCliVersion);
|
|
130
|
-
let addNPMDependenciesMock = vi.spyOn(node_package_manager_exports, "addNPMDependencies").mockResolvedValue(void 0);
|
|
131
|
-
await upgrade(tmpDir, oldCliVersion, { env: {} }), globalExpect(captureOutput).toHaveBeenCalledWith("npm", ["prefix"], { cwd: normalizePath(tmpDir) }), globalExpect(outputMock.info()).toMatchInlineSnapshot(`
|
|
132
|
-
"Upgrading CLI from ${oldCliVersion} to ${currentCliVersion}..."
|
|
133
|
-
`), globalExpect(addNPMDependenciesMock).toHaveBeenCalledWith([{ name: "@shopify/cli", version: "latest" }], {
|
|
134
|
-
packageManager: "npm",
|
|
135
|
-
type: "prod",
|
|
136
|
-
directory: normalizePath(tmpDir),
|
|
137
|
-
stdout: process.stdout,
|
|
138
|
-
stderr: process.stderr,
|
|
139
|
-
addToRootDirectory: !1
|
|
140
|
-
}), globalExpect(outputMock.success()).toMatchInlineSnapshot(`
|
|
141
|
-
"Upgraded Shopify CLI to version ${currentCliVersion}"
|
|
142
|
-
`);
|
|
143
|
-
});
|
|
144
|
-
}), test("upgrades locally if CLI is on latest version but APP isnt", async () => {
|
|
145
|
-
await inTemporaryDirectory(async (tmpDir) => {
|
|
146
|
-
await Promise.all([
|
|
147
|
-
writeFile(
|
|
148
|
-
joinPath(tmpDir, "package.json"),
|
|
149
|
-
JSON.stringify({ dependencies: { "@shopify/cli": currentCliVersion, "@shopify/app": oldCliVersion } })
|
|
150
|
-
),
|
|
151
|
-
touchFile(joinPath(tmpDir, "shopify.app.nondefault.toml"))
|
|
152
|
-
]), vi.mocked(captureOutput).mockResolvedValueOnce(tmpDir);
|
|
153
|
-
let outputMock = mockAndCaptureOutput();
|
|
154
|
-
vi.spyOn(node_package_manager_exports, "checkForNewVersion").mockResolvedValueOnce(void 0).mockResolvedValueOnce(currentCliVersion);
|
|
155
|
-
let addNPMDependenciesMock = vi.spyOn(node_package_manager_exports, "addNPMDependencies").mockResolvedValue(void 0);
|
|
156
|
-
await upgrade(tmpDir, oldCliVersion, { env: {} }), globalExpect(captureOutput).toHaveBeenCalledWith("npm", ["prefix"], { cwd: normalizePath(tmpDir) }), globalExpect(outputMock.info()).toMatchInlineSnapshot(`
|
|
157
|
-
"Upgrading CLI from ${oldCliVersion} to ${currentCliVersion}..."
|
|
158
|
-
`), globalExpect(addNPMDependenciesMock).toHaveBeenCalledWith([{ name: "@shopify/cli", version: "latest" }], {
|
|
159
|
-
packageManager: "npm",
|
|
160
|
-
type: "prod",
|
|
161
|
-
directory: normalizePath(tmpDir),
|
|
162
|
-
stdout: process.stdout,
|
|
163
|
-
stderr: process.stderr,
|
|
164
|
-
addToRootDirectory: !1
|
|
165
|
-
}), globalExpect(outputMock.success()).toMatchInlineSnapshot(`
|
|
166
|
-
"Upgraded Shopify CLI to version ${currentCliVersion}"
|
|
167
|
-
`);
|
|
168
|
-
});
|
|
169
|
-
});
|
|
170
|
-
});
|
|
171
|
-
//# sourceMappingURL=upgrade.test.js.map
|