@shopify/cli 3.61.0 → 3.61.2
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/dist/assets/hydrogen/starter/.eslintrc.cjs +1 -0
- package/dist/assets/hydrogen/starter/CHANGELOG.md +65 -65
- package/dist/assets/hydrogen/starter/app/components/Footer.tsx +3 -3
- package/dist/assets/hydrogen/starter/app/components/PageLayout.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/lib/session.ts +5 -0
- package/dist/assets/hydrogen/starter/app/root.tsx +84 -51
- package/dist/assets/hydrogen/starter/app/routes/_index.tsx +62 -25
- package/dist/assets/hydrogen/starter/app/routes/account.$.tsx +1 -5
- package/dist/assets/hydrogen/starter/app/routes/account.addresses.tsx +12 -70
- package/dist/assets/hydrogen/starter/app/routes/account.orders.$id.tsx +7 -14
- package/dist/assets/hydrogen/starter/app/routes/account.orders._index.tsx +1 -8
- package/dist/assets/hydrogen/starter/app/routes/account.profile.tsx +5 -22
- package/dist/assets/hydrogen/starter/app/routes/account.tsx +0 -1
- package/dist/assets/hydrogen/starter/app/routes/blogs.$blogHandle.$articleHandle.tsx +32 -6
- package/dist/assets/hydrogen/starter/app/routes/blogs.$blogHandle._index.tsx +36 -10
- package/dist/assets/hydrogen/starter/app/routes/blogs._index.tsx +35 -12
- package/dist/assets/hydrogen/starter/app/routes/cart.tsx +0 -2
- package/dist/assets/hydrogen/starter/app/routes/collections.$handle.tsx +40 -7
- package/dist/assets/hydrogen/starter/app/routes/collections._index.tsx +32 -6
- package/dist/assets/hydrogen/starter/app/routes/collections.all.tsx +31 -6
- package/dist/assets/hydrogen/starter/app/routes/pages.$handle.tsx +36 -8
- package/dist/assets/hydrogen/starter/app/routes/products.$handle.tsx +50 -11
- package/dist/assets/hydrogen/starter/package.json +6 -7
- package/dist/assets/hydrogen/starter/server.ts +4 -0
- package/dist/assets/hydrogen/virtual-routes/components/RequestDetails.jsx +1 -2
- package/dist/assets/hydrogen/virtual-routes/components/RequestTable.jsx +1 -2
- package/dist/assets/hydrogen/virtual-routes/routes/index.jsx +1 -2
- package/dist/{chunk-ZOTASNQ2.js → chunk-3RM5SOXY.js} +1 -1
- package/dist/{chunk-Q7PY7LVL.js → chunk-4757GPBG.js} +3 -3
- package/dist/{chunk-FFHJRSIP.js → chunk-4L37JOS5.js} +1 -1
- package/dist/{chunk-V67RXPI6.js → chunk-4TTAP7NN.js} +3 -3
- package/dist/{chunk-IIVL4DYB.js → chunk-5B2D56W6.js} +2 -2
- package/dist/{chunk-QX3YP6O5.js → chunk-5KRK4DLX.js} +2598 -795
- package/dist/{chunk-FWKRA64T.js → chunk-5MODHNUE.js} +3 -3
- package/dist/{chunk-LXXUWZRO.js → chunk-7IZTLXJ5.js} +2 -2
- package/dist/{chunk-AL4KPZUN.js → chunk-BUWM6JUU.js} +2 -2
- package/dist/{chunk-WNXHHHLZ.js → chunk-BYFLATOA.js} +3 -3
- package/dist/{chunk-4IXC46ZA.js → chunk-CK7MF3LY.js} +4 -4
- package/dist/{chunk-2AH5EBXL.js → chunk-CTETXMMM.js} +4 -4
- package/dist/{chunk-7YJH7P7B.js → chunk-CWYZA7C7.js} +1 -1
- package/dist/{chunk-463OPQAS.js → chunk-EHF6FVWH.js} +1 -1
- package/dist/{chunk-CMFKWJDJ.js → chunk-ETSILRIY.js} +3 -3
- package/dist/{chunk-EDVQGTOL.js → chunk-G4EQLT5B.js} +4 -4
- package/dist/{chunk-DWXXFI3U.js → chunk-JQPQJN44.js} +6 -6
- package/dist/{chunk-YZIPQNOG.js → chunk-KBXWK6XB.js} +2 -2
- package/dist/{chunk-EFL5CN6M.js → chunk-M73YMW2C.js} +4 -4
- package/dist/{chunk-HJ2JCW7E.js → chunk-NBIE3DNN.js} +2 -2
- package/dist/{chunk-2RKUO75O.js → chunk-NJP5GFNN.js} +129 -125
- package/dist/{chunk-TXDYKQZT.js → chunk-NJTSDTDU.js} +4 -4
- package/dist/{chunk-UJQBYPRO.js → chunk-OC4AY5G7.js} +1 -1
- package/dist/{chunk-75BJ33EP.js → chunk-Q3KADKQA.js} +2 -2
- package/dist/{chunk-LY6UIYOG.js → chunk-QDZF6IG4.js} +2 -2
- package/dist/{chunk-XDCNK2SU.js → chunk-QLLSCNEC.js} +2 -2
- package/dist/{chunk-O53XNGJU.js → chunk-QQP6JS5H.js} +1 -1
- package/dist/{chunk-2Q7SKRRM.js → chunk-QSO3GQEK.js} +162 -132
- package/dist/{chunk-5NBS5LAW.js → chunk-QTBH3GO6.js} +1 -1
- package/dist/{chunk-JZ5DN7RX.js → chunk-RPRKZ6JC.js} +2509 -728
- package/dist/{chunk-ONJCU4C5.js → chunk-TXXQWILO.js} +2 -2
- package/dist/{chunk-B4KDQK3X.js → chunk-UPM6XNBH.js} +2 -2
- package/dist/{chunk-3W2QB2OC.js → chunk-VC6CC75R.js} +2 -2
- package/dist/{chunk-XRFOYWYI.js → chunk-WZBNLCJ5.js} +2 -2
- package/dist/{chunk-63QEL3SZ.js → chunk-XMJDBJPP.js} +4 -4
- package/dist/{chunk-OOAZSPYS.js → chunk-YP5UVIUW.js} +3 -3
- package/dist/{chunk-LUGC3D2G.js → chunk-YWPV7MV2.js} +6 -6
- package/dist/{chunk-ABZKHSZ5.js → chunk-YZGLFVKK.js} +1 -1
- package/dist/{chunk-RW6YXHBL.js → chunk-ZE2ZPLYI.js} +12 -12
- package/dist/cli/commands/auth/logout.js +18 -18
- package/dist/cli/commands/auth/logout.test.js +19 -19
- package/dist/cli/commands/debug/command-flags.js +17 -17
- package/dist/cli/commands/demo/catalog.js +18 -18
- package/dist/cli/commands/demo/generate-file.js +18 -18
- package/dist/cli/commands/demo/index.js +17 -17
- package/dist/cli/commands/demo/print-ai-prompt.js +18 -18
- package/dist/cli/commands/docs/generate.js +17 -17
- package/dist/cli/commands/docs/generate.test.js +17 -17
- package/dist/cli/commands/help.js +17 -17
- package/dist/cli/commands/kitchen-sink/async.js +18 -18
- package/dist/cli/commands/kitchen-sink/async.test.js +18 -18
- package/dist/cli/commands/kitchen-sink/index.js +20 -20
- package/dist/cli/commands/kitchen-sink/index.test.js +20 -20
- package/dist/cli/commands/kitchen-sink/prompts.js +18 -18
- package/dist/cli/commands/kitchen-sink/prompts.test.js +18 -18
- package/dist/cli/commands/kitchen-sink/static.js +18 -18
- package/dist/cli/commands/kitchen-sink/static.test.js +18 -18
- package/dist/cli/commands/search.js +18 -18
- package/dist/cli/commands/upgrade.js +17 -17
- package/dist/cli/commands/version.js +18 -18
- package/dist/cli/commands/version.test.js +18 -18
- package/dist/cli/services/commands/search.js +8 -8
- package/dist/cli/services/commands/search.test.js +8 -8
- package/dist/cli/services/commands/version.js +11 -11
- package/dist/cli/services/commands/version.test.js +12 -12
- package/dist/cli/services/demo.js +8 -8
- package/dist/cli/services/demo.test.js +8 -8
- package/dist/cli/services/kitchen-sink/async.js +8 -8
- package/dist/cli/services/kitchen-sink/prompts.js +8 -8
- package/dist/cli/services/kitchen-sink/static.js +8 -8
- package/dist/cli/services/upgrade.js +10 -10
- package/dist/cli/services/upgrade.test.js +11 -11
- package/dist/{custom-oclif-loader-KLTAWG4B-VOMMA3PO.js → custom-oclif-loader-4SQGUQ7D-P5C4NLSX.js} +4 -4
- package/dist/{chunk-5R5656YY.js → custom-oclif-loader-OD47SFAU.js} +18 -3
- package/dist/{error-handler-UJK7WNJE.js → error-handler-EPMFPTYX.js} +10 -10
- package/dist/{error-handler-ND7WBMC3-CRFJKAS4.js → error-handler-WI4YVJIS-U3BMMYNJ.js} +6 -6
- package/dist/{error-handler-FUQWOW4J.js → error-handler-WL3Q25NI.js} +15 -15
- package/dist/hooks/postrun.js +13 -13
- package/dist/hooks/prerun.js +10 -10
- package/dist/index.js +1137 -1104
- package/dist/{lib-76RCE6WZ-AR3SQY6Y.js → lib-76RCE6WZ-5IYGTKKK.js} +2 -2
- package/dist/{lib-MWSNLG5P.js → lib-UYK3ZLZK.js} +3 -3
- package/dist/{local-5OND5PI5.js → local-KISH2IRF.js} +7 -7
- package/dist/{local-3LWDOA7J-UFWE2V6L.js → local-YKOG4EUR-XRRBWLSI.js} +4 -4
- package/dist/{morph-FQNWYET7.js → morph-DCIZUK2Q.js} +25 -8
- package/dist/{node-WNJUHXTR.js → node-3DKQAOFU.js} +14 -14
- package/dist/{node-package-manager-ISP2P5R3.js → node-package-manager-HYTHPJBI.js} +9 -9
- package/dist/{node-package-manager-TFY2ROCP-DDJAU44T.js → node-package-manager-S7TSAUJZ-KKDY6KSF.js} +5 -5
- package/dist/{system-G445DF53.js → system-LIP7AECY.js} +7 -7
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-ITQVVPJU.js → ui-5LSDG3C5.js} +7 -7
- package/dist/{ui-MUGCNPLG-UG4N3GMV.js → ui-FUZYK6S3-PVVDPVD5.js} +4 -4
- package/dist/{workerd-EZVOCUQW.js → workerd-TFH7T6NI.js} +13 -13
- package/oclif.manifest.json +1 -1
- package/package.json +4 -5
- package/dist/custom-oclif-loader-PJJ3H2WB.js +0 -28
- package/dist/hooks/init.d.ts +0 -12
- package/dist/hooks/init.js +0 -66
- package/dist/hooks/init.js.map +0 -1
- package/dist/{chunk-67MDUPX5.js → chunk-I434ZJQI.js} +7 -7
- package/dist/{chunk-74JT4RJX.js → chunk-VF4VWJWS.js} +3 -3
|
@@ -16,21 +16,21 @@ import {
|
|
|
16
16
|
renderText,
|
|
17
17
|
renderTextPrompt,
|
|
18
18
|
renderWarning
|
|
19
|
-
} from "./chunk-
|
|
20
|
-
import "./chunk-
|
|
19
|
+
} from "./chunk-CK7MF3LY.js";
|
|
20
|
+
import "./chunk-YWPV7MV2.js";
|
|
21
21
|
import "./chunk-FQIRJADJ.js";
|
|
22
|
-
import "./chunk-FBB6KUZG.js";
|
|
23
22
|
import "./chunk-PCQFWMMD.js";
|
|
24
23
|
import "./chunk-SZQX5J7X.js";
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-PBFWVFAQ.js";
|
|
24
|
+
import "./chunk-I434ZJQI.js";
|
|
27
25
|
import "./chunk-FWGRGI4R.js";
|
|
28
26
|
import "./chunk-BE73NZXB.js";
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-6SL33DOA.js";
|
|
27
|
+
import "./chunk-PBFWVFAQ.js";
|
|
31
28
|
import "./chunk-WCNR75S2.js";
|
|
32
29
|
import "./chunk-MHMFNQE3.js";
|
|
33
30
|
import "./chunk-3PIGYQSE.js";
|
|
31
|
+
import "./chunk-FBB6KUZG.js";
|
|
32
|
+
import "./chunk-VQZ2SHRY.js";
|
|
33
|
+
import "./chunk-6SL33DOA.js";
|
|
34
34
|
import "./chunk-BZJX2NV6.js";
|
|
35
35
|
import "./chunk-RQ24VTW4.js";
|
|
36
36
|
import "./chunk-3JLUTHGR.js";
|
|
@@ -16,19 +16,19 @@ import {
|
|
|
16
16
|
renderText,
|
|
17
17
|
renderTextPrompt,
|
|
18
18
|
renderWarning
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-M73YMW2C.js";
|
|
20
20
|
import "./chunk-UV4APOMB.js";
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-3LWRRBH5.js";
|
|
21
|
+
import "./chunk-VF4VWJWS.js";
|
|
23
22
|
import "./chunk-ZZGXXS5X.js";
|
|
24
23
|
import "./chunk-J4I3URIN.js";
|
|
25
24
|
import "./chunk-RTZHOWFC.js";
|
|
25
|
+
import "./chunk-3LWRRBH5.js";
|
|
26
26
|
import "./chunk-ZLGRKPW3.js";
|
|
27
27
|
import {
|
|
28
28
|
init_cjs_shims
|
|
29
29
|
} from "./chunk-M63RTPGR.js";
|
|
30
30
|
|
|
31
|
-
// ../create-app/dist/ui-
|
|
31
|
+
// ../create-app/dist/ui-FUZYK6S3.js
|
|
32
32
|
init_cjs_shims();
|
|
33
33
|
export {
|
|
34
34
|
handleCtrlC,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
importLocal,
|
|
11
11
|
logRequestLine,
|
|
12
12
|
setConstructors
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-QSO3GQEK.js";
|
|
14
14
|
import {
|
|
15
15
|
AbortError,
|
|
16
16
|
createFileReadStream,
|
|
@@ -19,30 +19,30 @@ import {
|
|
|
19
19
|
readFile,
|
|
20
20
|
renderSuccess,
|
|
21
21
|
resolvePath
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import "./chunk-
|
|
22
|
+
} from "./chunk-NJP5GFNN.js";
|
|
23
|
+
import "./chunk-OC4AY5G7.js";
|
|
24
24
|
import "./chunk-LAY4AEXX.js";
|
|
25
25
|
import "./chunk-4XNS74OG.js";
|
|
26
26
|
import "./chunk-CKKROMZF.js";
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-QX3YP6O5.js";
|
|
27
|
+
import "./chunk-5KRK4DLX.js";
|
|
29
28
|
import "./chunk-HTYJDJRZ.js";
|
|
30
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-LKGDG6WW.js";
|
|
30
|
+
import "./chunk-CWYZA7C7.js";
|
|
31
31
|
import "./chunk-FAFQQMD4.js";
|
|
32
32
|
import {
|
|
33
33
|
source_default
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-YWPV7MV2.js";
|
|
35
35
|
import "./chunk-FQIRJADJ.js";
|
|
36
|
-
import "./chunk-FBB6KUZG.js";
|
|
37
36
|
import "./chunk-SZQX5J7X.js";
|
|
38
|
-
import "./chunk-
|
|
39
|
-
import "./chunk-PBFWVFAQ.js";
|
|
37
|
+
import "./chunk-I434ZJQI.js";
|
|
40
38
|
import "./chunk-FWGRGI4R.js";
|
|
41
39
|
import "./chunk-BE73NZXB.js";
|
|
42
|
-
import "./chunk-
|
|
43
|
-
import "./chunk-6SL33DOA.js";
|
|
40
|
+
import "./chunk-PBFWVFAQ.js";
|
|
44
41
|
import "./chunk-WCNR75S2.js";
|
|
45
42
|
import "./chunk-3PIGYQSE.js";
|
|
43
|
+
import "./chunk-FBB6KUZG.js";
|
|
44
|
+
import "./chunk-VQZ2SHRY.js";
|
|
45
|
+
import "./chunk-6SL33DOA.js";
|
|
46
46
|
import "./chunk-BZJX2NV6.js";
|
|
47
47
|
import "./chunk-RQ24VTW4.js";
|
|
48
48
|
import "./chunk-3JLUTHGR.js";
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
init_cjs_shims
|
|
52
52
|
} from "./chunk-M63RTPGR.js";
|
|
53
53
|
|
|
54
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@0.0.0-next-
|
|
54
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@0.0.0-next-9eb60d7-20240607102913_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/mini-oxygen/workerd.js
|
|
55
55
|
init_cjs_shims();
|
|
56
56
|
import { createRequire } from "node:module";
|
|
57
57
|
async function startWorkerdServer({
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shopify/cli",
|
|
3
|
-
"version": "3.61.
|
|
3
|
+
"version": "3.61.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A CLI tool to build for the Shopify platform",
|
|
6
6
|
"keywords": [
|
|
@@ -89,8 +89,8 @@
|
|
|
89
89
|
"@parcel/watcher": "2.4.1"
|
|
90
90
|
},
|
|
91
91
|
"devDependencies": {
|
|
92
|
-
"@shopify/app": "3.61.
|
|
93
|
-
"@shopify/theme": "3.61.
|
|
92
|
+
"@shopify/app": "3.61.2",
|
|
93
|
+
"@shopify/theme": "3.61.2",
|
|
94
94
|
"@types/node": "18.19.3",
|
|
95
95
|
"@vitest/coverage-istanbul": "^0.34.3",
|
|
96
96
|
"esbuild-plugin-copy": "^2.1.1",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"vitest": "^0.34.3"
|
|
99
99
|
},
|
|
100
100
|
"engines": {
|
|
101
|
-
"node": "
|
|
101
|
+
"node": "^18.20.0 || >=20.10.0"
|
|
102
102
|
},
|
|
103
103
|
"os": [
|
|
104
104
|
"darwin",
|
|
@@ -154,7 +154,6 @@
|
|
|
154
154
|
],
|
|
155
155
|
"hooks": {
|
|
156
156
|
"init": [
|
|
157
|
-
"./dist/hooks/init.js",
|
|
158
157
|
{
|
|
159
158
|
"target": "./dist/index.js",
|
|
160
159
|
"identifier": "AppInitHook"
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ShopifyConfig,
|
|
3
|
-
sniffForPath
|
|
4
|
-
} from "./chunk-5R5656YY.js";
|
|
5
|
-
import "./chunk-4IXC46ZA.js";
|
|
6
|
-
import "./chunk-LUGC3D2G.js";
|
|
7
|
-
import "./chunk-FQIRJADJ.js";
|
|
8
|
-
import "./chunk-FBB6KUZG.js";
|
|
9
|
-
import "./chunk-PCQFWMMD.js";
|
|
10
|
-
import "./chunk-SZQX5J7X.js";
|
|
11
|
-
import "./chunk-67MDUPX5.js";
|
|
12
|
-
import "./chunk-PBFWVFAQ.js";
|
|
13
|
-
import "./chunk-FWGRGI4R.js";
|
|
14
|
-
import "./chunk-BE73NZXB.js";
|
|
15
|
-
import "./chunk-VQZ2SHRY.js";
|
|
16
|
-
import "./chunk-6SL33DOA.js";
|
|
17
|
-
import "./chunk-WCNR75S2.js";
|
|
18
|
-
import "./chunk-MHMFNQE3.js";
|
|
19
|
-
import "./chunk-3PIGYQSE.js";
|
|
20
|
-
import "./chunk-BZJX2NV6.js";
|
|
21
|
-
import "./chunk-RQ24VTW4.js";
|
|
22
|
-
import "./chunk-3JLUTHGR.js";
|
|
23
|
-
import "./chunk-GXPKATXW.js";
|
|
24
|
-
import "./chunk-M63RTPGR.js";
|
|
25
|
-
export {
|
|
26
|
-
ShopifyConfig,
|
|
27
|
-
sniffForPath
|
|
28
|
-
};
|
package/dist/hooks/init.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Hook } from '@oclif/core';
|
|
2
|
-
/**
|
|
3
|
-
* When running a Hydrogen command (except hydrogen:init), check if the current directory is a Hydrogen project.
|
|
4
|
-
* If it's not, show a warning and exit. We need to do this here because some hydrogen commands depend on some peerDependencies
|
|
5
|
-
* that are loaded dynamically from the project's package.json.
|
|
6
|
-
*
|
|
7
|
-
* To check if the project is a Hydrogen one, we look for the presence of the \@shopify/hydrogen dependency in the project's package.json.
|
|
8
|
-
*
|
|
9
|
-
* @param options - The options passed to the hook.
|
|
10
|
-
*/
|
|
11
|
-
declare const hook: Hook<'init'>;
|
|
12
|
-
export default hook;
|
package/dist/hooks/init.js
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
sniffForPath
|
|
3
|
-
} from "../chunk-5R5656YY.js";
|
|
4
|
-
import {
|
|
5
|
-
fileExistsSync,
|
|
6
|
-
renderWarning
|
|
7
|
-
} from "../chunk-4IXC46ZA.js";
|
|
8
|
-
import "../chunk-LUGC3D2G.js";
|
|
9
|
-
import "../chunk-FQIRJADJ.js";
|
|
10
|
-
import "../chunk-FBB6KUZG.js";
|
|
11
|
-
import "../chunk-PCQFWMMD.js";
|
|
12
|
-
import "../chunk-SZQX5J7X.js";
|
|
13
|
-
import "../chunk-67MDUPX5.js";
|
|
14
|
-
import "../chunk-PBFWVFAQ.js";
|
|
15
|
-
import "../chunk-FWGRGI4R.js";
|
|
16
|
-
import "../chunk-BE73NZXB.js";
|
|
17
|
-
import "../chunk-VQZ2SHRY.js";
|
|
18
|
-
import "../chunk-6SL33DOA.js";
|
|
19
|
-
import "../chunk-WCNR75S2.js";
|
|
20
|
-
import {
|
|
21
|
-
cwd,
|
|
22
|
-
joinPath
|
|
23
|
-
} from "../chunk-MHMFNQE3.js";
|
|
24
|
-
import "../chunk-3PIGYQSE.js";
|
|
25
|
-
import "../chunk-BZJX2NV6.js";
|
|
26
|
-
import "../chunk-RQ24VTW4.js";
|
|
27
|
-
import "../chunk-3JLUTHGR.js";
|
|
28
|
-
import "../chunk-GXPKATXW.js";
|
|
29
|
-
import {
|
|
30
|
-
init_cjs_shims
|
|
31
|
-
} from "../chunk-M63RTPGR.js";
|
|
32
|
-
|
|
33
|
-
// src/hooks/init.ts
|
|
34
|
-
init_cjs_shims();
|
|
35
|
-
import { readFileSync } from "fs";
|
|
36
|
-
var hook = async (options) => {
|
|
37
|
-
const isHydrogenCommand = options.id?.startsWith("hydrogen:") ?? false;
|
|
38
|
-
const isHydrogenInitCommand = options.id?.startsWith("hydrogen:init") ?? false;
|
|
39
|
-
if (isHydrogenCommand && !isHydrogenInitCommand) {
|
|
40
|
-
const path = sniffForPath() ?? cwd();
|
|
41
|
-
const packageJsonPath = joinPath(path, "package.json");
|
|
42
|
-
if (!fileExistsSync(packageJsonPath))
|
|
43
|
-
showWarningAndExit();
|
|
44
|
-
const packageJsonContent = readFileSync(packageJsonPath, "utf8");
|
|
45
|
-
const packageJson = JSON.parse(packageJsonContent);
|
|
46
|
-
const packageJsonDependencies = packageJson.dependencies;
|
|
47
|
-
const dependenciesIncludeHydrogen = packageJsonDependencies["@shopify/hydrogen"] !== void 0;
|
|
48
|
-
if (!dependenciesIncludeHydrogen)
|
|
49
|
-
showWarningAndExit();
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
function showWarningAndExit() {
|
|
53
|
-
renderWarning({
|
|
54
|
-
body: [
|
|
55
|
-
`Looks like you're trying to run a Hydrogen command outside of a Hydrogen project.`,
|
|
56
|
-
"Run",
|
|
57
|
-
{ command: "shopify hydrogen init" },
|
|
58
|
-
"to create a new Hydrogen project."
|
|
59
|
-
]
|
|
60
|
-
});
|
|
61
|
-
process.exit();
|
|
62
|
-
}
|
|
63
|
-
var init_default = hook;
|
|
64
|
-
export {
|
|
65
|
-
init_default as default
|
|
66
|
-
};
|
package/dist/hooks/init.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/hooks/init.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,YAAY,EAAC,MAAM,2CAA2C,CAAA;AACtE,OAAO,EAAC,cAAc,EAAC,MAAM,0BAA0B,CAAA;AACvD,OAAO,EAAC,GAAG,EAAE,QAAQ,EAAC,MAAM,4BAA4B,CAAA;AACxD,OAAO,EAAC,aAAa,EAAC,MAAM,0BAA0B,CAAA;AACtD,OAAO,EAAC,YAAY,EAAC,MAAM,IAAI,CAAA;AAE/B;;;;;;;;GAQG;AACH,MAAM,IAAI,GAAiB,KAAK,EAAE,OAAO,EAAE,EAAE;IAC3C,MAAM,iBAAiB,GAAG,OAAO,CAAC,EAAE,EAAE,UAAU,CAAC,WAAW,CAAC,IAAI,KAAK,CAAA;IACtE,MAAM,qBAAqB,GAAG,OAAO,CAAC,EAAE,EAAE,UAAU,CAAC,eAAe,CAAC,IAAI,KAAK,CAAA;IAC9E,IAAI,iBAAiB,IAAI,CAAC,qBAAqB,EAAE;QAC/C,MAAM,IAAI,GAAG,YAAY,EAAE,IAAI,GAAG,EAAE,CAAA;QACpC,MAAM,eAAe,GAAG,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC,CAAA;QACtD,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC;YAAE,kBAAkB,EAAE,CAAA;QAC1D,MAAM,kBAAkB,GAAG,YAAY,CAAC,eAAe,EAAE,MAAM,CAAC,CAAA;QAChE,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAA;QAClD,MAAM,uBAAuB,GAAG,WAAW,CAAC,YAAuC,CAAA;QACnF,MAAM,2BAA2B,GAAG,uBAAuB,CAAC,mBAAmB,CAAC,KAAK,SAAS,CAAA;QAC9F,IAAI,CAAC,2BAA2B;YAAE,kBAAkB,EAAE,CAAA;KACvD;AACH,CAAC,CAAA;AAED,SAAS,kBAAkB;IACzB,aAAa,CAAC;QACZ,IAAI,EAAE;YACJ,mFAAmF;YACnF,KAAK;YACL,EAAC,OAAO,EAAE,uBAAuB,EAAC;YAClC,mCAAmC;SACpC;KACF,CAAC,CAAA;IACF,OAAO,CAAC,IAAI,EAAE,CAAA;AAChB,CAAC;AAED,eAAe,IAAI,CAAA","sourcesContent":["import {Hook} from '@oclif/core'\nimport {sniffForPath} from '@shopify/cli-kit/node/custom-oclif-loader'\nimport {fileExistsSync} from '@shopify/cli-kit/node/fs'\nimport {cwd, joinPath} from '@shopify/cli-kit/node/path'\nimport {renderWarning} from '@shopify/cli-kit/node/ui'\nimport {readFileSync} from 'fs'\n\n/**\n * When running a Hydrogen command (except hydrogen:init), check if the current directory is a Hydrogen project.\n * If it's not, show a warning and exit. We need to do this here because some hydrogen commands depend on some peerDependencies\n * that are loaded dynamically from the project's package.json.\n *\n * To check if the project is a Hydrogen one, we look for the presence of the \\@shopify/hydrogen dependency in the project's package.json.\n *\n * @param options - The options passed to the hook.\n */\nconst hook: Hook<'init'> = async (options) => {\n const isHydrogenCommand = options.id?.startsWith('hydrogen:') ?? false\n const isHydrogenInitCommand = options.id?.startsWith('hydrogen:init') ?? false\n if (isHydrogenCommand && !isHydrogenInitCommand) {\n const path = sniffForPath() ?? cwd()\n const packageJsonPath = joinPath(path, 'package.json')\n if (!fileExistsSync(packageJsonPath)) showWarningAndExit()\n const packageJsonContent = readFileSync(packageJsonPath, 'utf8')\n const packageJson = JSON.parse(packageJsonContent)\n const packageJsonDependencies = packageJson.dependencies as {[key: string]: string}\n const dependenciesIncludeHydrogen = packageJsonDependencies['@shopify/hydrogen'] !== undefined\n if (!dependenciesIncludeHydrogen) showWarningAndExit()\n }\n}\n\nfunction showWarningAndExit() {\n renderWarning({\n body: [\n `Looks like you're trying to run a Hydrogen command outside of a Hydrogen project.`,\n 'Run',\n {command: 'shopify hydrogen init'},\n 'to create a new Hydrogen project.',\n ],\n })\n process.exit()\n}\n\nexport default hook\n"]}
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
require_brace_expansion,
|
|
3
|
-
require_source_map_support
|
|
4
|
-
} from "./chunk-PBFWVFAQ.js";
|
|
5
1
|
import {
|
|
6
2
|
require_has_flag,
|
|
7
3
|
require_src,
|
|
@@ -11,12 +7,16 @@ import {
|
|
|
11
7
|
require_isexe
|
|
12
8
|
} from "./chunk-BE73NZXB.js";
|
|
13
9
|
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
} from "./chunk-
|
|
10
|
+
require_brace_expansion,
|
|
11
|
+
require_source_map_support
|
|
12
|
+
} from "./chunk-PBFWVFAQ.js";
|
|
17
13
|
import {
|
|
18
14
|
require_is_wsl
|
|
19
15
|
} from "./chunk-WCNR75S2.js";
|
|
16
|
+
import {
|
|
17
|
+
require_globby,
|
|
18
|
+
require_indent_string
|
|
19
|
+
} from "./chunk-VQZ2SHRY.js";
|
|
20
20
|
import {
|
|
21
21
|
__commonJS,
|
|
22
22
|
__require,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
require_is_wsl
|
|
3
|
-
} from "./chunk-3LWRRBH5.js";
|
|
4
1
|
import {
|
|
5
2
|
require_balanced_match,
|
|
6
3
|
require_globby,
|
|
7
4
|
require_indent_string
|
|
8
5
|
} from "./chunk-J4I3URIN.js";
|
|
6
|
+
import {
|
|
7
|
+
require_is_wsl
|
|
8
|
+
} from "./chunk-3LWRRBH5.js";
|
|
9
9
|
import {
|
|
10
10
|
__commonJS,
|
|
11
11
|
__require,
|