@shopify/cli 3.74.0 → 3.75.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.
- package/dist/assets/hydrogen/starter/CHANGELOG.md +99 -0
- package/dist/assets/hydrogen/starter/app/components/ProductForm.tsx +2 -1
- package/dist/assets/hydrogen/starter/app/root.tsx +12 -2
- package/dist/assets/hydrogen/starter/app/routes/collections._index.tsx +1 -0
- package/dist/assets/hydrogen/starter/package.json +10 -10
- package/dist/assets/hydrogen/starter/tsconfig.json +1 -1
- package/dist/assets/hydrogen/starter/vite.config.ts +1 -0
- package/dist/assets/hydrogen/tailwind/package.json +1 -1
- package/dist/assets/hydrogen/tailwind/tailwind.css +1 -1
- package/dist/assets/hydrogen/vite/package.json +1 -1
- package/dist/assets/hydrogen/vite/vite.config.js +1 -0
- package/dist/{chunk-FCWD4NEK.js → chunk-2B5C3QFS.js} +3 -3
- package/dist/{chunk-MDJOXUMQ.js → chunk-2FZJER24.js} +4 -4
- package/dist/{chunk-IYQNHNNP.js → chunk-57EEPGQZ.js} +3 -3
- package/dist/{chunk-R7RENZQC.js → chunk-5KSWCELC.js} +3 -3
- package/dist/{chunk-QRARFXIM.js → chunk-6HBKMQLD.js} +15 -14
- package/dist/{chunk-5JC3BUPR.js → chunk-6W5TMCT3.js} +3 -3
- package/dist/{chunk-MSBZRBI5.js → chunk-6XBYMBOQ.js} +4 -4
- package/dist/{chunk-UB7RN523.js → chunk-B7ABTOI4.js} +6 -6
- package/dist/{chunk-WKO4CJCL.js → chunk-BDLU7EEZ.js} +14 -10
- package/dist/{chunk-XJNTFQIK.js → chunk-BTMRJLQ7.js} +5 -5
- package/dist/{chunk-76NEANNG.js → chunk-DV2H7WDY.js} +430 -207
- package/dist/{chunk-FMXC2O6H.js → chunk-ESYWXFSK.js} +2 -2
- package/dist/{chunk-WBTJ7MQU.js → chunk-GMHA2S7O.js} +3 -3
- package/dist/{chunk-BWBSJLZN.js → chunk-GQIMWIIF.js} +9970 -9968
- package/dist/{chunk-WNUVUNTL.js → chunk-I3WJF5NM.js} +7 -7
- package/dist/{chunk-B27LGWRZ.js → chunk-IAM7IYO3.js} +3 -3
- package/dist/{chunk-5JWRABV2.js → chunk-ILXYHK4Q.js} +8 -8
- package/dist/{chunk-VI4NVMJH.js → chunk-IML7XVTM.js} +2 -2
- package/dist/{chunk-53WQGP7S.js → chunk-KMPW66LQ.js} +4 -4
- package/dist/{chunk-I6YWZKVU.js → chunk-L656JYPI.js} +2 -2
- package/dist/{chunk-7T4EKFVU.js → chunk-MN33EVV7.js} +2 -2
- package/dist/{chunk-LH6BHL6J.js → chunk-MOZOZ3LN.js} +3 -3
- package/dist/{chunk-5CLGH5PH.js → chunk-MP5RLDFN.js} +15 -8
- package/dist/{chunk-GVMUVIT5.js → chunk-OK2LJ3F3.js} +6 -6
- package/dist/{chunk-J673ZU5S.js → chunk-ORGKANED.js} +3 -3
- package/dist/{chunk-6JNRBEP6.js → chunk-QJQSCN3A.js} +5 -5
- package/dist/{chunk-NUW6LQU4.js → chunk-S4YW77H4.js} +4 -4
- package/dist/{chunk-ACIVN2Q4.js → chunk-S576QAPY.js} +2 -2
- package/dist/{chunk-JWRRKMF2.js → chunk-S6L5743K.js} +2 -2
- package/dist/{chunk-D5AR5HKB.js → chunk-SWQM7ICR.js} +2 -2
- package/dist/{chunk-XBIDXV7B.js → chunk-T35HYPVZ.js} +3 -3
- package/dist/{chunk-QEUQO265.js → chunk-T4WJXSDW.js} +4 -4
- package/dist/{chunk-4QRIOWN3.js → chunk-TJDZDZWG.js} +2 -2
- package/dist/{chunk-4W33LVQQ.js → chunk-VM4XPRZK.js} +3 -3
- package/dist/{chunk-CDQA3SST.js → chunk-VSKRQ3JT.js} +33 -29
- package/dist/{chunk-PMOQBQSE.js → chunk-W6IJP4MY.js} +3 -3
- package/dist/{chunk-L3FVJFIT.js → chunk-X3CFSDHA.js} +94 -17
- package/dist/{chunk-AKL7T64Q.js → chunk-Y53XECL6.js} +34 -34
- package/dist/{chunk-2GCE2GUM.js → chunk-YVTRJWYT.js} +3 -3
- package/dist/cli/commands/auth/logout.js +14 -15
- package/dist/cli/commands/auth/logout.test.js +16 -17
- package/dist/cli/commands/cache/clear.js +13 -14
- package/dist/cli/commands/debug/command-flags.js +13 -14
- package/dist/cli/commands/docs/generate.js +13 -14
- package/dist/cli/commands/docs/generate.test.js +14 -15
- package/dist/cli/commands/help.js +13 -14
- package/dist/cli/commands/kitchen-sink/async.js +14 -15
- package/dist/cli/commands/kitchen-sink/async.test.js +15 -16
- package/dist/cli/commands/kitchen-sink/index.js +16 -17
- package/dist/cli/commands/kitchen-sink/index.test.js +17 -18
- package/dist/cli/commands/kitchen-sink/prompts.js +14 -15
- package/dist/cli/commands/kitchen-sink/prompts.test.js +15 -16
- package/dist/cli/commands/kitchen-sink/static.js +14 -15
- package/dist/cli/commands/kitchen-sink/static.test.js +15 -16
- package/dist/cli/commands/notifications/generate.js +14 -15
- package/dist/cli/commands/notifications/list.js +14 -15
- package/dist/cli/commands/search.js +14 -15
- package/dist/cli/commands/upgrade.js +14 -15
- package/dist/cli/commands/upgrade.test.js +1 -2
- package/dist/cli/commands/version.js +14 -15
- package/dist/cli/commands/version.test.js +15 -16
- package/dist/cli/services/commands/notifications.js +8 -9
- package/dist/cli/services/commands/search.js +4 -5
- package/dist/cli/services/commands/search.test.js +5 -6
- package/dist/cli/services/commands/version.js +5 -6
- package/dist/cli/services/commands/version.test.js +7 -8
- package/dist/cli/services/kitchen-sink/async.js +4 -5
- package/dist/cli/services/kitchen-sink/prompts.js +4 -5
- package/dist/cli/services/kitchen-sink/static.js +4 -5
- package/dist/cli/services/upgrade.js +5 -6
- package/dist/cli/services/upgrade.test.js +8 -9
- package/dist/{custom-oclif-loader-ZY5GUSB3.js → custom-oclif-loader-MPQ33GKJ.js} +4 -5
- package/dist/{del-FBU5JYXS.js → del-2SYBVRHB.js} +2 -2
- package/dist/devtools-BA4WST2D.js +72 -0
- package/dist/{error-handler-YRN4E6SY.js → error-handler-ABXDEJNM.js} +11 -12
- package/dist/hooks/postrun.js +9 -10
- package/dist/hooks/prerun.js +9 -10
- package/dist/index.js +28943 -12546
- package/dist/{lib-E2DSNKUX.js → lib-SGEWXU7Z.js} +3 -3
- package/dist/{local-VTZT5Q4L.js → local-DGW3VZG7.js} +6 -5
- package/dist/{magic-string.es-PJMYOE6F.js → magic-string.es-BSVDQOZI.js} +32 -20
- package/dist/{morph-ACVSDUS7.js → morph-BTANDGVW.js} +9 -9
- package/dist/{node-ONVZF27D.js → node-GVOKD67H.js} +17 -18
- package/dist/{node-package-manager-BZNXJETD.js → node-package-manager-WEN6FJ7Z.js} +5 -6
- package/dist/{npa-JAX2F6CO.js → npa-E675GQOI.js} +123 -33
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-3RKZNTJR.js → ui-TWIKWYG2.js} +4 -5
- package/dist/{workerd-PSNADDQA.js → workerd-SK47YSGA.js} +16 -17
- package/oclif.manifest.json +33 -62
- package/package.json +11 -10
- package/dist/chunk-CFIKVUNW.js +0 -45
|
@@ -1,5 +1,104 @@
|
|
|
1
1
|
# skeleton
|
|
2
2
|
|
|
3
|
+
## 2025.1.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Bump vite, Remix versions and tailwind v4 alpha to beta ([#2696](https://github.com/Shopify/hydrogen/pull/2696)) by [@wizardlyhel](https://github.com/wizardlyhel)
|
|
8
|
+
|
|
9
|
+
- Workaround for "Error: failed to execute 'insertBefore' on 'Node'" that sometimes happen during development. ([#2701](https://github.com/Shopify/hydrogen/pull/2701)) by [@wizardlyhel](https://github.com/wizardlyhel)
|
|
10
|
+
|
|
11
|
+
```diff
|
|
12
|
+
// root.tsx
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* The main and reset stylesheets are added in the Layout component
|
|
16
|
+
* to prevent a bug in development HMR updates.
|
|
17
|
+
*
|
|
18
|
+
* This avoids the "failed to execute 'insertBefore' on 'Node'" error
|
|
19
|
+
* that occurs after editing and navigating to another page.
|
|
20
|
+
*
|
|
21
|
+
* It's a temporary fix until the issue is resolved.
|
|
22
|
+
* https://github.com/remix-run/remix/issues/9242
|
|
23
|
+
*/
|
|
24
|
+
export function links() {
|
|
25
|
+
return [
|
|
26
|
+
- {rel: 'stylesheet', href: resetStyles},
|
|
27
|
+
- {rel: 'stylesheet', href: appStyles},
|
|
28
|
+
{
|
|
29
|
+
rel: 'preconnect',
|
|
30
|
+
href: 'https://cdn.shopify.com',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
rel: 'preconnect',
|
|
34
|
+
href: 'https://shop.app',
|
|
35
|
+
},
|
|
36
|
+
{rel: 'icon', type: 'image/svg+xml', href: favicon},
|
|
37
|
+
];
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
...
|
|
41
|
+
|
|
42
|
+
export function Layout({children}: {children?: React.ReactNode}) {
|
|
43
|
+
const nonce = useNonce();
|
|
44
|
+
const data = useRouteLoaderData<RootLoader>('root');
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
<html lang="en">
|
|
48
|
+
<head>
|
|
49
|
+
<meta charSet="utf-8" />
|
|
50
|
+
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
|
51
|
+
+ <link rel="stylesheet" href={resetStyles}></link>
|
|
52
|
+
+ <link rel="stylesheet" href={appStyles}></link>
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
- Turn on future flag `v3_lazyRouteDiscovery` ([#2702](https://github.com/Shopify/hydrogen/pull/2702)) by [@wizardlyhel](https://github.com/wizardlyhel)
|
|
57
|
+
|
|
58
|
+
In your vite.config.ts, add the following line:
|
|
59
|
+
|
|
60
|
+
```diff
|
|
61
|
+
export default defineConfig({
|
|
62
|
+
plugins: [
|
|
63
|
+
hydrogen(),
|
|
64
|
+
oxygen(),
|
|
65
|
+
remix({
|
|
66
|
+
presets: [hydrogen.preset()],
|
|
67
|
+
future: {
|
|
68
|
+
v3_fetcherPersist: true,
|
|
69
|
+
v3_relativeSplatPath: true,
|
|
70
|
+
v3_throwAbortReason: true,
|
|
71
|
+
+ v3_lazyRouteDiscovery: true,
|
|
72
|
+
},
|
|
73
|
+
}),
|
|
74
|
+
tsconfigPaths(),
|
|
75
|
+
],
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Test your app by running `npm run dev` and nothing should break
|
|
79
|
+
|
|
80
|
+
- Fix image size warnings on collections page ([#2703](https://github.com/Shopify/hydrogen/pull/2703)) by [@wizardlyhel](https://github.com/wizardlyhel)
|
|
81
|
+
|
|
82
|
+
- Bump cli version ([#2732](https://github.com/Shopify/hydrogen/pull/2732)) by [@wizardlyhel](https://github.com/wizardlyhel)
|
|
83
|
+
|
|
84
|
+
- Bump SFAPI to 2025-01 ([#2715](https://github.com/Shopify/hydrogen/pull/2715)) by [@rbshop](https://github.com/rbshop)
|
|
85
|
+
|
|
86
|
+
- Updated dependencies [[`fdab06f5`](https://github.com/Shopify/hydrogen/commit/fdab06f5d34076b526d406698bdf6fca6787660b), [`ae6d71f0`](https://github.com/Shopify/hydrogen/commit/ae6d71f0976f520ca177c69ff677f852af63859e), [`650d57b3`](https://github.com/Shopify/hydrogen/commit/650d57b3e07125661e23900e73c0bb3027ddbcde), [`064de138`](https://github.com/Shopify/hydrogen/commit/064de13890c68cabb1c3fdbe7f77409a0cf1c384)]:
|
|
87
|
+
- @shopify/remix-oxygen@2.0.10
|
|
88
|
+
- @shopify/hydrogen@2025.1.0
|
|
89
|
+
|
|
90
|
+
## 2024.10.4
|
|
91
|
+
|
|
92
|
+
### Patch Changes
|
|
93
|
+
|
|
94
|
+
- Bump cli version ([#2694](https://github.com/Shopify/hydrogen/pull/2694)) by [@wizardlyhel](https://github.com/wizardlyhel)
|
|
95
|
+
|
|
96
|
+
## 2024.10.3
|
|
97
|
+
|
|
98
|
+
### Patch Changes
|
|
99
|
+
|
|
100
|
+
- Prevent scroll reset on variant change ([#2672](https://github.com/Shopify/hydrogen/pull/2672)) by [@scottdixon](https://github.com/scottdixon)
|
|
101
|
+
|
|
3
102
|
## 2024.10.2
|
|
4
103
|
|
|
5
104
|
### Patch Changes
|
|
@@ -86,6 +86,7 @@ export function ProductForm({
|
|
|
86
86
|
if (!selected) {
|
|
87
87
|
navigate(`?${variantUriQuery}`, {
|
|
88
88
|
replace: true,
|
|
89
|
+
preventScrollReset: true,
|
|
89
90
|
});
|
|
90
91
|
}
|
|
91
92
|
}}
|
|
@@ -98,7 +99,7 @@ export function ProductForm({
|
|
|
98
99
|
</div>
|
|
99
100
|
<br />
|
|
100
101
|
</div>
|
|
101
|
-
)
|
|
102
|
+
);
|
|
102
103
|
})}
|
|
103
104
|
<AddToCartButton
|
|
104
105
|
disabled={!selectedVariant || !selectedVariant.availableForSale}
|
|
@@ -37,10 +37,18 @@ export const shouldRevalidate: ShouldRevalidateFunction = ({
|
|
|
37
37
|
return defaultShouldRevalidate;
|
|
38
38
|
};
|
|
39
39
|
|
|
40
|
+
/**
|
|
41
|
+
* The main and reset stylesheets are added in the Layout component
|
|
42
|
+
* to prevent a bug in development HMR updates.
|
|
43
|
+
*
|
|
44
|
+
* This avoids the "failed to execute 'insertBefore' on 'Node'" error
|
|
45
|
+
* that occurs after editing and navigating to another page.
|
|
46
|
+
*
|
|
47
|
+
* It's a temporary fix until the issue is resolved.
|
|
48
|
+
* https://github.com/remix-run/remix/issues/9242
|
|
49
|
+
*/
|
|
40
50
|
export function links() {
|
|
41
51
|
return [
|
|
42
|
-
{rel: 'stylesheet', href: resetStyles},
|
|
43
|
-
{rel: 'stylesheet', href: appStyles},
|
|
44
52
|
{
|
|
45
53
|
rel: 'preconnect',
|
|
46
54
|
href: 'https://cdn.shopify.com',
|
|
@@ -138,6 +146,8 @@ export function Layout({children}: {children?: React.ReactNode}) {
|
|
|
138
146
|
<head>
|
|
139
147
|
<meta charSet="utf-8" />
|
|
140
148
|
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
|
149
|
+
<link rel="stylesheet" href={resetStyles}></link>
|
|
150
|
+
<link rel="stylesheet" href={appStyles}></link>
|
|
141
151
|
<Meta />
|
|
142
152
|
<Links />
|
|
143
153
|
</head>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "skeleton",
|
|
3
3
|
"private": true,
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "2025.1.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build": "shopify hydrogen build --codegen",
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
},
|
|
15
15
|
"prettier": "@shopify/prettier-config",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@remix-run/react": "^2.
|
|
18
|
-
"@remix-run/server-runtime": "^2.
|
|
19
|
-
"@shopify/hydrogen": "
|
|
20
|
-
"@shopify/remix-oxygen": "^2.0.
|
|
17
|
+
"@remix-run/react": "^2.15.2",
|
|
18
|
+
"@remix-run/server-runtime": "^2.15.2",
|
|
19
|
+
"@shopify/hydrogen": "2025.1.0",
|
|
20
|
+
"@shopify/remix-oxygen": "^2.0.10",
|
|
21
21
|
"graphql": "^16.6.0",
|
|
22
22
|
"graphql-tag": "^2.12.6",
|
|
23
23
|
"isbot": "^3.8.0",
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@graphql-codegen/cli": "5.0.2",
|
|
29
|
-
"@remix-run/dev": "^2.
|
|
30
|
-
"@remix-run/eslint-config": "^2.
|
|
31
|
-
"@shopify/cli": "~3.
|
|
29
|
+
"@remix-run/dev": "^2.15.2",
|
|
30
|
+
"@remix-run/eslint-config": "^2.15.2",
|
|
31
|
+
"@shopify/cli": "~3.74.1",
|
|
32
32
|
"@shopify/hydrogen-codegen": "^0.3.2",
|
|
33
|
-
"@shopify/mini-oxygen": "^3.1.
|
|
33
|
+
"@shopify/mini-oxygen": "^3.1.1",
|
|
34
34
|
"@shopify/oxygen-workers-types": "^4.1.2",
|
|
35
35
|
"@shopify/prettier-config": "^1.1.2",
|
|
36
36
|
"@total-typescript/ts-reset": "^0.4.2",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"eslint-plugin-hydrogen": "0.12.2",
|
|
42
42
|
"prettier": "^2.8.4",
|
|
43
43
|
"typescript": "^5.2.2",
|
|
44
|
-
"vite": "^5.1.
|
|
44
|
+
"vite": "^5.1.8",
|
|
45
45
|
"vite-tsconfig-paths": "^4.3.1"
|
|
46
46
|
},
|
|
47
47
|
"engines": {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
packageManagerFromUserAgent
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-S576QAPY.js";
|
|
4
4
|
import {
|
|
5
5
|
currentProcessIsGlobal,
|
|
6
6
|
inferPackageManagerForGlobalCLI,
|
|
7
7
|
outputContent,
|
|
8
8
|
outputToken
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-X3CFSDHA.js";
|
|
10
10
|
import {
|
|
11
11
|
init_cjs_shims
|
|
12
12
|
} from "./chunk-PKR7KJ6P.js";
|
|
@@ -25,4 +25,4 @@ export {
|
|
|
25
25
|
cliInstallCommand,
|
|
26
26
|
getOutputUpdateCLIReminder
|
|
27
27
|
};
|
|
28
|
-
//# sourceMappingURL=chunk-
|
|
28
|
+
//# sourceMappingURL=chunk-2B5C3QFS.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
base_command_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QJQSCN3A.js";
|
|
4
4
|
import {
|
|
5
5
|
renderTable,
|
|
6
6
|
renderText
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-X3CFSDHA.js";
|
|
8
8
|
import {
|
|
9
9
|
require_lib
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-VSKRQ3JT.js";
|
|
11
11
|
import {
|
|
12
12
|
__toESM,
|
|
13
13
|
init_cjs_shims
|
|
@@ -83,4 +83,4 @@ var import_core = __toESM(require_lib(), 1), CommandFlags = class _CommandFlags
|
|
|
83
83
|
export {
|
|
84
84
|
CommandFlags
|
|
85
85
|
};
|
|
86
|
-
//# sourceMappingURL=chunk-
|
|
86
|
+
//# sourceMappingURL=chunk-2FZJER24.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
base_command_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QJQSCN3A.js";
|
|
4
4
|
import {
|
|
5
5
|
mkdir,
|
|
6
6
|
outputInfo,
|
|
7
7
|
rmdir,
|
|
8
8
|
writeFile
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-X3CFSDHA.js";
|
|
10
10
|
import {
|
|
11
11
|
cwd,
|
|
12
12
|
joinPath
|
|
@@ -115,4 +115,4 @@ export {
|
|
|
115
115
|
writeCommandFlagInterface,
|
|
116
116
|
writeCommandUsageExampleFile
|
|
117
117
|
};
|
|
118
|
-
//# sourceMappingURL=chunk-
|
|
118
|
+
//# sourceMappingURL=chunk-57EEPGQZ.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
versionService
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-IAM7IYO3.js";
|
|
4
4
|
import {
|
|
5
5
|
base_command_default
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-QJQSCN3A.js";
|
|
7
7
|
import {
|
|
8
8
|
init_cjs_shims
|
|
9
9
|
} from "./chunk-PKR7KJ6P.js";
|
|
@@ -22,4 +22,4 @@ var Version = class extends base_command_default {
|
|
|
22
22
|
export {
|
|
23
23
|
Version
|
|
24
24
|
};
|
|
25
|
-
//# sourceMappingURL=chunk-
|
|
25
|
+
//# sourceMappingURL=chunk-5KSWCELC.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
platformAndArch
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TJDZDZWG.js";
|
|
4
4
|
import {
|
|
5
5
|
allAPIs,
|
|
6
6
|
buildHeaders,
|
|
7
7
|
shopifyFetch,
|
|
8
8
|
z
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-GQIMWIIF.js";
|
|
10
10
|
import {
|
|
11
11
|
cacheRetrieveOrRepopulate,
|
|
12
12
|
getPackageManager,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
packageManagerFromUserAgent,
|
|
15
15
|
removeSession,
|
|
16
16
|
setSession
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-S576QAPY.js";
|
|
18
18
|
import {
|
|
19
19
|
AbortError,
|
|
20
20
|
BugError,
|
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
FatalError,
|
|
23
23
|
addPublicMetadata,
|
|
24
24
|
addSensitiveMetadata,
|
|
25
|
+
blockPartnersAccess,
|
|
25
26
|
ciPlatform,
|
|
26
27
|
cloudEnvironment,
|
|
27
28
|
currentProcessIsGlobal,
|
|
@@ -48,7 +49,7 @@ import {
|
|
|
48
49
|
spinFqdn,
|
|
49
50
|
themeKitAccessDomain,
|
|
50
51
|
themeToken
|
|
51
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-X3CFSDHA.js";
|
|
52
53
|
import {
|
|
53
54
|
cwd
|
|
54
55
|
} from "./chunk-57Q6OQG4.js";
|
|
@@ -320,6 +321,8 @@ var DevServer = class {
|
|
|
320
321
|
// ../cli-kit/dist/public/node/context/fqdn.js
|
|
321
322
|
var CouldntObtainPartnersSpinFQDNError = new AbortError("Couldn't obtain the Spin FQDN for Partners when the CLI is not running from a Spin environment."), CouldntObtainIdentitySpinFQDNError = new AbortError("Couldn't obtain the Spin FQDN for Identity when the CLI is not running from a Spin environment."), CouldntObtainShopifySpinFQDNError = new AbortError("Couldn't obtain the Spin FQDN for Shopify when the CLI is not running from a Spin environment."), NotProvidedStoreFQDNError = new AbortError("Couldn't obtain the Shopify FQDN because the store FQDN was not provided.");
|
|
322
323
|
async function partnersFqdn() {
|
|
324
|
+
if (blockPartnersAccess())
|
|
325
|
+
throw new BugError("Partners API is blocked by the SHOPIFY_CLI_NEVER_USE_PARTNERS_API environment variable.");
|
|
323
326
|
let environment = serviceEnvironment(), productionFqdn = "partners.shopify.com";
|
|
324
327
|
switch (environment) {
|
|
325
328
|
case "local":
|
|
@@ -550,10 +553,7 @@ function validateScopes(requestedScopes, identity) {
|
|
|
550
553
|
return firstPartyDev() !== currentScopes.includes("employee") ? !1 : requestedScopes.every((scope) => currentScopes.includes(scope));
|
|
551
554
|
}
|
|
552
555
|
async function validateSession(scopes, applications, session) {
|
|
553
|
-
if (!session)
|
|
554
|
-
return "needs_full_auth";
|
|
555
|
-
let scopesAreValid = validateScopes(scopes, session.identity), identityIsValid = await validateIdentityToken(session.identity.accessToken);
|
|
556
|
-
if (!scopesAreValid)
|
|
556
|
+
if (!session || !validateScopes(scopes, session.identity))
|
|
557
557
|
return "needs_full_auth";
|
|
558
558
|
let tokensAreExpired = isTokenExpired(session.identity);
|
|
559
559
|
if (applications.partnersApi) {
|
|
@@ -572,11 +572,12 @@ async function validateSession(scopes, applications, session) {
|
|
|
572
572
|
let appId = applicationId("admin"), realAppId = `${applications.adminApi.storeFqdn}-${appId}`, token = session.applications[realAppId];
|
|
573
573
|
tokensAreExpired = tokensAreExpired || isTokenExpired(token);
|
|
574
574
|
}
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
575
|
+
if (outputDebug(`- Token validation -> It's expired: ${tokensAreExpired}`), !validateCachedIdentityTokenStructure(session.identity))
|
|
576
|
+
return "needs_full_auth";
|
|
577
|
+
if (tokensAreExpired)
|
|
578
|
+
return "needs_refresh";
|
|
579
|
+
let identityIsValid = await validateIdentityToken(session.identity.accessToken);
|
|
580
|
+
return outputDebug(`- Token validation -> It's invalid in identity: ${!identityIsValid}`), identityIsValid ? "ok" : "needs_full_auth";
|
|
580
581
|
}
|
|
581
582
|
function isTokenExpired(token) {
|
|
582
583
|
return token ? token.expiresAt < expireThreshold() : !0;
|
|
@@ -1134,4 +1135,4 @@ export {
|
|
|
1134
1135
|
getEnvironmentData,
|
|
1135
1136
|
getSensitiveEnvironmentData
|
|
1136
1137
|
};
|
|
1137
|
-
//# sourceMappingURL=chunk-
|
|
1138
|
+
//# sourceMappingURL=chunk-6HBKMQLD.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
base_command_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QJQSCN3A.js";
|
|
4
4
|
import {
|
|
5
5
|
require_lib
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-VSKRQ3JT.js";
|
|
7
7
|
import {
|
|
8
8
|
__toESM,
|
|
9
9
|
init_cjs_shims
|
|
@@ -43,4 +43,4 @@ var HelpCommand = class _HelpCommand extends base_command_default {
|
|
|
43
43
|
export {
|
|
44
44
|
HelpCommand
|
|
45
45
|
};
|
|
46
|
-
//# sourceMappingURL=chunk-
|
|
46
|
+
//# sourceMappingURL=chunk-6W5TMCT3.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
logout
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BDLU7EEZ.js";
|
|
4
4
|
import {
|
|
5
5
|
base_command_default
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-QJQSCN3A.js";
|
|
7
7
|
import {
|
|
8
8
|
outputSuccess
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-X3CFSDHA.js";
|
|
10
10
|
import {
|
|
11
11
|
init_cjs_shims
|
|
12
12
|
} from "./chunk-PKR7KJ6P.js";
|
|
@@ -25,4 +25,4 @@ var Logout = class extends base_command_default {
|
|
|
25
25
|
export {
|
|
26
26
|
Logout
|
|
27
27
|
};
|
|
28
|
-
//# sourceMappingURL=chunk-
|
|
28
|
+
//# sourceMappingURL=chunk-6XBYMBOQ.js.map
|
|
@@ -2,16 +2,16 @@ import {
|
|
|
2
2
|
getEnvironmentData,
|
|
3
3
|
getLastSeenUserIdAfterAuth,
|
|
4
4
|
getSensitiveEnvironmentData
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-6HBKMQLD.js";
|
|
6
6
|
import {
|
|
7
7
|
fetch
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-GQIMWIIF.js";
|
|
9
9
|
import {
|
|
10
10
|
CLI_KIT_VERSION
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-S6L5743K.js";
|
|
12
12
|
import {
|
|
13
13
|
runWithRateLimit
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-S576QAPY.js";
|
|
15
15
|
import {
|
|
16
16
|
alwaysLogAnalytics,
|
|
17
17
|
alwaysLogMetrics,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
outputDebug,
|
|
29
29
|
outputToken,
|
|
30
30
|
reportingRateLimit
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-X3CFSDHA.js";
|
|
32
32
|
import {
|
|
33
33
|
__commonJS,
|
|
34
34
|
__esm,
|
|
@@ -15930,4 +15930,4 @@ export {
|
|
|
15930
15930
|
requestIdsCollection,
|
|
15931
15931
|
reportAnalyticsEvent
|
|
15932
15932
|
};
|
|
15933
|
-
//# sourceMappingURL=chunk-
|
|
15933
|
+
//# sourceMappingURL=chunk-B7ABTOI4.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
remove,
|
|
7
7
|
setLastSeenAuthMethod,
|
|
8
8
|
setLastSeenUserIdAfterAuth
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-6HBKMQLD.js";
|
|
10
10
|
import {
|
|
11
11
|
BugError,
|
|
12
12
|
getPartnersToken,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
outputContent,
|
|
15
15
|
outputDebug,
|
|
16
16
|
outputToken
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-X3CFSDHA.js";
|
|
18
18
|
import {
|
|
19
19
|
init_cjs_shims
|
|
20
20
|
} from "./chunk-PKR7KJ6P.js";
|
|
@@ -35,14 +35,18 @@ ${outputToken.json(scopes)}
|
|
|
35
35
|
throw new BugError("No partners token found after ensuring authenticated");
|
|
36
36
|
return { token: tokens.partners, userId: tokens.userId };
|
|
37
37
|
}
|
|
38
|
-
async function
|
|
38
|
+
async function ensureAuthenticatedAppManagementAndBusinessPlatform(options = {}, appManagementScopes = [], businessPlatformScopes = [], env = process.env) {
|
|
39
39
|
outputDebug(outputContent`Ensuring that the user is authenticated with the App Management API with the following scopes:
|
|
40
|
-
${outputToken.json(
|
|
40
|
+
${outputToken.json(appManagementScopes)}
|
|
41
41
|
`);
|
|
42
|
-
let tokens = await ensureAuthenticated({ appManagementApi: { scopes } }, env, options);
|
|
43
|
-
if (!tokens)
|
|
44
|
-
throw new BugError("No App Management token found after ensuring authenticated");
|
|
45
|
-
return {
|
|
42
|
+
let tokens = await ensureAuthenticated({ appManagementApi: { scopes: appManagementScopes }, businessPlatformApi: { scopes: businessPlatformScopes } }, env, options);
|
|
43
|
+
if (!tokens.appManagement || !tokens.businessPlatform)
|
|
44
|
+
throw new BugError("No App Management or Business Platform token found after ensuring authenticated");
|
|
45
|
+
return {
|
|
46
|
+
appManagementToken: tokens.appManagement,
|
|
47
|
+
userId: tokens.userId,
|
|
48
|
+
businessPlatformToken: tokens.businessPlatform
|
|
49
|
+
};
|
|
46
50
|
}
|
|
47
51
|
async function ensureAuthenticatedStorefront(scopes = [], password = void 0, forceRefresh = !1) {
|
|
48
52
|
if (password) {
|
|
@@ -93,11 +97,11 @@ function logout() {
|
|
|
93
97
|
|
|
94
98
|
export {
|
|
95
99
|
ensureAuthenticatedPartners,
|
|
96
|
-
|
|
100
|
+
ensureAuthenticatedAppManagementAndBusinessPlatform,
|
|
97
101
|
ensureAuthenticatedStorefront,
|
|
98
102
|
ensureAuthenticatedAdmin,
|
|
99
103
|
ensureAuthenticatedThemes,
|
|
100
104
|
ensureAuthenticatedBusinessPlatform,
|
|
101
105
|
logout
|
|
102
106
|
};
|
|
103
|
-
//# sourceMappingURL=chunk-
|
|
107
|
+
//# sourceMappingURL=chunk-BDLU7EEZ.js.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
prompts
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-IML7XVTM.js";
|
|
4
4
|
import {
|
|
5
5
|
staticService
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MN33EVV7.js";
|
|
7
7
|
import {
|
|
8
8
|
asyncTasks
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-SWQM7ICR.js";
|
|
10
10
|
import {
|
|
11
11
|
base_command_default
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-QJQSCN3A.js";
|
|
13
13
|
import {
|
|
14
14
|
init_cjs_shims
|
|
15
15
|
} from "./chunk-PKR7KJ6P.js";
|
|
@@ -34,4 +34,4 @@ var KitchenSinkAll = class extends base_command_default {
|
|
|
34
34
|
export {
|
|
35
35
|
KitchenSinkAll
|
|
36
36
|
};
|
|
37
|
-
//# sourceMappingURL=chunk-
|
|
37
|
+
//# sourceMappingURL=chunk-BTMRJLQ7.js.map
|