@shopify/cli 3.75.4 → 3.76.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/{chunk-NNHELYN3.js → chunk-247SAMPG.js} +3 -3
- package/dist/{chunk-KRPDLCMT.js → chunk-2LCBNWGB.js} +11 -11
- package/dist/{chunk-3FPXLCF5.js → chunk-3HWN5QZP.js} +3 -3
- package/dist/{chunk-WCTQ65EF.js → chunk-7MKO46I5.js} +3 -3
- package/dist/{chunk-QGAHQAXG.js → chunk-AS4YOVZB.js} +3 -3
- package/dist/{chunk-HV2KH53A.js → chunk-AW63CHBD.js} +3 -3
- package/dist/{chunk-Y3V7CDDP.js → chunk-CUEBFCNF.js} +4 -4
- package/dist/{chunk-CBIPUP4Q.js → chunk-DSEDXHIL.js} +3 -3
- package/dist/{chunk-EFDLFMUG.js → chunk-F5WG7YRC.js} +2 -2
- package/dist/{chunk-O5UY3K6F.js → chunk-FKVY6WNT.js} +4 -4
- package/dist/{chunk-DFK6H6Q2.js → chunk-FSL57OBM.js} +59 -19
- package/dist/{chunk-VH3W76GN.js → chunk-FVI46GAE.js} +3 -3
- package/dist/{chunk-3CB5D2ZO.js → chunk-GDAGNYN6.js} +2 -2
- package/dist/{chunk-LH3QC4DP.js → chunk-GSC3DSZN.js} +4 -3
- package/dist/{chunk-OSDKLELI.js → chunk-IB2GR2NI.js} +4 -4
- package/dist/{chunk-LRTITZPZ.js → chunk-IGXCBQCI.js} +2 -2
- package/dist/{chunk-EPSGPKFO.js → chunk-IV3Z7KW6.js} +5 -5
- package/dist/{chunk-LWZVD7VH.js → chunk-KRBTUAPG.js} +3 -3
- package/dist/{chunk-4IY25QPC.js → chunk-LQLKKAEX.js} +3 -3
- package/dist/{chunk-R6ST4Q4K.js → chunk-M7TO4P43.js} +2 -2
- package/dist/{chunk-R2KFJZQF.js → chunk-NGMTB27N.js} +36 -15
- package/dist/{chunk-DLW5TTAO.js → chunk-OAIHYIZM.js} +3 -3
- package/dist/{chunk-2OX7ESM2.js → chunk-OLVUPFMV.js} +6 -6
- package/dist/{chunk-R27Y5T4H.js → chunk-QFEXM6TL.js} +2 -2
- package/dist/{chunk-V4FD5VKG.js → chunk-R3OLOJM7.js} +74 -11
- package/dist/{chunk-37RGPUOL.js → chunk-SPTKJZLQ.js} +3 -3
- package/dist/{chunk-IROHTJ5D.js → chunk-VCFDSABQ.js} +6 -6
- package/dist/{chunk-ARR2ZV5X.js → chunk-WF3LQ6VY.js} +3 -3
- package/dist/{chunk-TPUB2CUK.js → chunk-WJRSLVVW.js} +2 -2
- package/dist/{chunk-WHYTGJJU.js → chunk-WRB46MIH.js} +10 -9
- package/dist/{chunk-VIMSAJBK.js → chunk-WXEVFXY4.js} +93 -163
- package/dist/{chunk-7DRESMZH.js → chunk-Y5V7ZNMS.js} +3 -3
- package/dist/{chunk-IAFN3BTU.js → chunk-YJUMZEX7.js} +2 -2
- package/dist/{chunk-7DV7FO6D.js → chunk-YWGDPGEE.js} +7 -6
- package/dist/cli/commands/auth/logout.js +11 -12
- package/dist/cli/commands/auth/logout.test.js +12 -13
- package/dist/cli/commands/cache/clear.js +10 -11
- package/dist/cli/commands/debug/command-flags.js +10 -11
- package/dist/cli/commands/docs/generate.js +10 -11
- package/dist/cli/commands/docs/generate.test.js +10 -11
- package/dist/cli/commands/help.js +10 -11
- package/dist/cli/commands/kitchen-sink/async.js +11 -12
- package/dist/cli/commands/kitchen-sink/async.test.js +11 -12
- package/dist/cli/commands/kitchen-sink/index.js +13 -14
- package/dist/cli/commands/kitchen-sink/index.test.js +13 -14
- package/dist/cli/commands/kitchen-sink/prompts.js +11 -12
- package/dist/cli/commands/kitchen-sink/prompts.test.js +11 -12
- package/dist/cli/commands/kitchen-sink/static.js +11 -12
- package/dist/cli/commands/kitchen-sink/static.test.js +11 -12
- package/dist/cli/commands/notifications/generate.js +11 -12
- package/dist/cli/commands/notifications/list.js +11 -12
- package/dist/cli/commands/search.js +11 -12
- package/dist/cli/commands/upgrade.js +11 -12
- package/dist/cli/commands/version.js +11 -12
- package/dist/cli/commands/version.test.js +11 -12
- package/dist/cli/services/commands/notifications.js +6 -6
- package/dist/cli/services/commands/search.js +2 -2
- package/dist/cli/services/commands/search.test.js +2 -2
- package/dist/cli/services/commands/version.js +3 -3
- package/dist/cli/services/commands/version.test.js +4 -4
- package/dist/cli/services/kitchen-sink/async.js +2 -2
- package/dist/cli/services/kitchen-sink/prompts.js +2 -2
- package/dist/cli/services/kitchen-sink/static.js +2 -2
- package/dist/cli/services/upgrade.js +3 -3
- package/dist/cli/services/upgrade.test.js +5 -7
- package/dist/{custom-oclif-loader-24E7DVTH.js → custom-oclif-loader-K3EL2OAR.js} +2 -2
- package/dist/{error-handler-7V7HCPFM.js → error-handler-BADTRHFV.js} +8 -9
- package/dist/hooks/postrun.js +8 -8
- package/dist/hooks/prerun.js +10 -8
- package/dist/index.js +7204 -6858
- package/dist/{local-WHLQPZNS.js → local-OPE3NHTK.js} +2 -2
- package/dist/{node-AJELTNRR.js → node-KXPRSMZI.js} +12 -13
- package/dist/{node-package-manager-KULBOPYH.js → node-package-manager-I364XLRB.js} +3 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-B4IIF7YO.js → ui-OLBMRQ45.js} +2 -2
- package/dist/{workerd-PWW3BB6B.js → workerd-U7MSRKWK.js} +12 -13
- package/oclif.manifest.json +46 -22
- package/package.json +6 -6
- package/dist/chunk-VTTVH23Q.js +0 -63
|
@@ -1,20 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
platformAndArch
|
|
3
|
-
} from "./chunk-VTTVH23Q.js";
|
|
4
1
|
import {
|
|
5
2
|
allAPIs,
|
|
6
|
-
buildHeaders,
|
|
7
3
|
shopifyFetch,
|
|
8
4
|
z
|
|
9
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FKVY6WNT.js";
|
|
10
6
|
import {
|
|
11
|
-
cacheRetrieveOrRepopulate,
|
|
12
7
|
getPackageManager,
|
|
13
8
|
getSession,
|
|
14
9
|
packageManagerFromUserAgent,
|
|
15
10
|
removeSession,
|
|
16
11
|
setSession
|
|
17
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-GSC3DSZN.js";
|
|
18
13
|
import {
|
|
19
14
|
AbortError,
|
|
20
15
|
BugError,
|
|
@@ -44,12 +39,12 @@ import {
|
|
|
44
39
|
outputDebug,
|
|
45
40
|
outputInfo,
|
|
46
41
|
outputToken,
|
|
42
|
+
platformAndArch,
|
|
47
43
|
serviceEnvironment,
|
|
48
44
|
sessionConstants,
|
|
49
45
|
spinFqdn,
|
|
50
|
-
themeKitAccessDomain,
|
|
51
46
|
themeToken
|
|
52
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-R3OLOJM7.js";
|
|
53
48
|
import {
|
|
54
49
|
cwd
|
|
55
50
|
} from "./chunk-57Q6OQG4.js";
|
|
@@ -180,7 +175,90 @@ function validateCachedIdentityTokenStructure(identityToken) {
|
|
|
180
175
|
return IdentityTokenSchema.safeParse(identityToken).success;
|
|
181
176
|
}
|
|
182
177
|
|
|
183
|
-
// ../cli-kit/dist/private/node/session/
|
|
178
|
+
// ../cli-kit/dist/private/node/session/validate.js
|
|
179
|
+
function validateScopes(requestedScopes, identity) {
|
|
180
|
+
let currentScopes = identity.scopes;
|
|
181
|
+
return firstPartyDev() !== currentScopes.includes("employee") ? !1 : requestedScopes.every((scope) => currentScopes.includes(scope));
|
|
182
|
+
}
|
|
183
|
+
async function validateSession(scopes, applications, session) {
|
|
184
|
+
if (!session || !validateScopes(scopes, session.identity))
|
|
185
|
+
return "needs_full_auth";
|
|
186
|
+
let tokensAreExpired = isTokenExpired(session.identity);
|
|
187
|
+
if (applications.partnersApi) {
|
|
188
|
+
let appId = applicationId("partners"), token = session.applications[appId];
|
|
189
|
+
tokensAreExpired = tokensAreExpired || isTokenExpired(token);
|
|
190
|
+
}
|
|
191
|
+
if (applications.appManagementApi) {
|
|
192
|
+
let appId = applicationId("app-management"), token = session.applications[appId];
|
|
193
|
+
tokensAreExpired = tokensAreExpired || isTokenExpired(token);
|
|
194
|
+
}
|
|
195
|
+
if (applications.storefrontRendererApi) {
|
|
196
|
+
let appId = applicationId("storefront-renderer"), token = session.applications[appId];
|
|
197
|
+
tokensAreExpired = tokensAreExpired || isTokenExpired(token);
|
|
198
|
+
}
|
|
199
|
+
if (applications.adminApi) {
|
|
200
|
+
let appId = applicationId("admin"), realAppId = `${applications.adminApi.storeFqdn}-${appId}`, token = session.applications[realAppId];
|
|
201
|
+
tokensAreExpired = tokensAreExpired || isTokenExpired(token);
|
|
202
|
+
}
|
|
203
|
+
return outputDebug(`- Token validation -> It's expired: ${tokensAreExpired}`), validateCachedIdentityTokenStructure(session.identity) ? tokensAreExpired ? "needs_refresh" : "ok" : "needs_full_auth";
|
|
204
|
+
}
|
|
205
|
+
function isTokenExpired(token) {
|
|
206
|
+
return token ? token.expiresAt < expireThreshold() : !0;
|
|
207
|
+
}
|
|
208
|
+
function expireThreshold() {
|
|
209
|
+
return new Date(Date.now() + sessionConstants.expirationTimeMarginInMinutes * 60 * 1e3);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// ../cli-kit/dist/private/node/session/scopes.js
|
|
213
|
+
init_cjs_shims();
|
|
214
|
+
function allDefaultScopes(extraScopes = []) {
|
|
215
|
+
let scopes = allAPIs.map((api) => defaultApiScopes(api)).flat();
|
|
216
|
+
return scopes = ["openid", ...scopes, ...extraScopes].map(scopeTransform), Array.from(new Set(scopes));
|
|
217
|
+
}
|
|
218
|
+
function apiScopes(api, extraScopes = []) {
|
|
219
|
+
let scopes = [...defaultApiScopes(api), ...extraScopes.map(scopeTransform)].map(scopeTransform);
|
|
220
|
+
return Array.from(new Set(scopes));
|
|
221
|
+
}
|
|
222
|
+
function defaultApiScopes(api) {
|
|
223
|
+
switch (api) {
|
|
224
|
+
case "admin":
|
|
225
|
+
return ["graphql", "themes", "collaborator"];
|
|
226
|
+
case "storefront-renderer":
|
|
227
|
+
return ["devtools"];
|
|
228
|
+
case "partners":
|
|
229
|
+
return ["cli"];
|
|
230
|
+
case "business-platform":
|
|
231
|
+
return ["destinations", "store-management"];
|
|
232
|
+
case "app-management":
|
|
233
|
+
return ["app-management"];
|
|
234
|
+
default:
|
|
235
|
+
throw new BugError(`Unknown API: ${api}`);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
function scopeTransform(scope) {
|
|
239
|
+
switch (scope) {
|
|
240
|
+
case "graphql":
|
|
241
|
+
return "https://api.shopify.com/auth/shop.admin.graphql";
|
|
242
|
+
case "themes":
|
|
243
|
+
return "https://api.shopify.com/auth/shop.admin.themes";
|
|
244
|
+
case "collaborator":
|
|
245
|
+
return "https://api.shopify.com/auth/partners.collaborator-relationships.readonly";
|
|
246
|
+
case "cli":
|
|
247
|
+
return "https://api.shopify.com/auth/partners.app.cli.access";
|
|
248
|
+
case "devtools":
|
|
249
|
+
return "https://api.shopify.com/auth/shop.storefront-renderer.devtools";
|
|
250
|
+
case "destinations":
|
|
251
|
+
return "https://api.shopify.com/auth/destinations.readonly";
|
|
252
|
+
case "store-management":
|
|
253
|
+
return "https://api.shopify.com/auth/organization.store-management";
|
|
254
|
+
case "app-management":
|
|
255
|
+
return "https://api.shopify.com/auth/organization.apps.manage";
|
|
256
|
+
default:
|
|
257
|
+
return scope;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
// ../cli-kit/dist/private/node/session/exchange.js
|
|
184
262
|
init_cjs_shims();
|
|
185
263
|
|
|
186
264
|
// ../cli-kit/dist/public/node/context/fqdn.js
|
|
@@ -505,139 +583,6 @@ var ok = (value) => new Ok(value), err = (err2) => new Err(err2), Ok = class {
|
|
|
505
583
|
}
|
|
506
584
|
};
|
|
507
585
|
|
|
508
|
-
// ../cli-kit/dist/private/node/session/identity-token-validation.js
|
|
509
|
-
async function validateIdentityToken(token) {
|
|
510
|
-
if (isSpin() && firstPartyDev())
|
|
511
|
-
return !0;
|
|
512
|
-
try {
|
|
513
|
-
return withIntrospectionURL(async (introspectionURL) => {
|
|
514
|
-
let options = {
|
|
515
|
-
method: "POST",
|
|
516
|
-
headers: { Authorization: `Bearer ${token}`, "Content-Type": "application/json" },
|
|
517
|
-
body: JSON.stringify({ token })
|
|
518
|
-
};
|
|
519
|
-
outputDebug(`Sending Identity Introspection request to URL: ${introspectionURL}`);
|
|
520
|
-
let response = await shopifyFetch(introspectionURL, options);
|
|
521
|
-
if (response.ok && response.headers.get("content-type")?.includes("json")) {
|
|
522
|
-
let json = await response.json();
|
|
523
|
-
return outputDebug(`The identity token is valid: ${json.valid}`), ok(json.valid);
|
|
524
|
-
} else {
|
|
525
|
-
if (response.status === 404 || response.status > 500)
|
|
526
|
-
return err(new AbortError(`The introspection endpoint returned a ${response.status}: ${introspectionURL}`));
|
|
527
|
-
{
|
|
528
|
-
let text = await response.text();
|
|
529
|
-
return outputDebug(`The Introspection request failed with:
|
|
530
|
-
- status: ${response.status}
|
|
531
|
-
- www-authenticate header: ${JSON.stringify(response.headers.get("www-authenticate"))}
|
|
532
|
-
- body: ${JSON.stringify(text)}`), ok(!1);
|
|
533
|
-
}
|
|
534
|
-
}
|
|
535
|
-
});
|
|
536
|
-
} catch (error) {
|
|
537
|
-
return outputDebug(`The identity token is invalid: ${error}`), !1;
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
|
-
async function withIntrospectionURL(fn) {
|
|
541
|
-
let cacheKey = `identity-introspection-url-${await identityFqdn()}`, introspectionURL = await cacheRetrieveOrRepopulate(cacheKey, getIntrospectionURL, 6048e5), result = await fn(introspectionURL);
|
|
542
|
-
if (result.isErr() && (introspectionURL = await cacheRetrieveOrRepopulate(cacheKey, getIntrospectionURL, 0), result = await fn(introspectionURL)), result.isErr())
|
|
543
|
-
throw result.error;
|
|
544
|
-
return result.value;
|
|
545
|
-
}
|
|
546
|
-
async function getIntrospectionURL() {
|
|
547
|
-
return (await (await shopifyFetch(`https://${await identityFqdn()}/.well-known/openid-configuration.json`)).json()).introspection_endpoint;
|
|
548
|
-
}
|
|
549
|
-
|
|
550
|
-
// ../cli-kit/dist/private/node/session/validate.js
|
|
551
|
-
function validateScopes(requestedScopes, identity) {
|
|
552
|
-
let currentScopes = identity.scopes;
|
|
553
|
-
return firstPartyDev() !== currentScopes.includes("employee") ? !1 : requestedScopes.every((scope) => currentScopes.includes(scope));
|
|
554
|
-
}
|
|
555
|
-
async function validateSession(scopes, applications, session) {
|
|
556
|
-
if (!session || !validateScopes(scopes, session.identity))
|
|
557
|
-
return "needs_full_auth";
|
|
558
|
-
let tokensAreExpired = isTokenExpired(session.identity);
|
|
559
|
-
if (applications.partnersApi) {
|
|
560
|
-
let appId = applicationId("partners"), token = session.applications[appId];
|
|
561
|
-
tokensAreExpired = tokensAreExpired || isTokenExpired(token);
|
|
562
|
-
}
|
|
563
|
-
if (applications.appManagementApi) {
|
|
564
|
-
let appId = applicationId("app-management"), token = session.applications[appId];
|
|
565
|
-
tokensAreExpired = tokensAreExpired || isTokenExpired(token);
|
|
566
|
-
}
|
|
567
|
-
if (applications.storefrontRendererApi) {
|
|
568
|
-
let appId = applicationId("storefront-renderer"), token = session.applications[appId];
|
|
569
|
-
tokensAreExpired = tokensAreExpired || isTokenExpired(token);
|
|
570
|
-
}
|
|
571
|
-
if (applications.adminApi) {
|
|
572
|
-
let appId = applicationId("admin"), realAppId = `${applications.adminApi.storeFqdn}-${appId}`, token = session.applications[realAppId];
|
|
573
|
-
tokensAreExpired = tokensAreExpired || isTokenExpired(token);
|
|
574
|
-
}
|
|
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";
|
|
581
|
-
}
|
|
582
|
-
function isTokenExpired(token) {
|
|
583
|
-
return token ? token.expiresAt < expireThreshold() : !0;
|
|
584
|
-
}
|
|
585
|
-
function expireThreshold() {
|
|
586
|
-
return new Date(Date.now() + sessionConstants.expirationTimeMarginInMinutes * 60 * 1e3);
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
// ../cli-kit/dist/private/node/session/scopes.js
|
|
590
|
-
init_cjs_shims();
|
|
591
|
-
function allDefaultScopes(extraScopes = []) {
|
|
592
|
-
let scopes = allAPIs.map((api) => defaultApiScopes(api)).flat();
|
|
593
|
-
return scopes = ["openid", ...scopes, ...extraScopes].map(scopeTransform), Array.from(new Set(scopes));
|
|
594
|
-
}
|
|
595
|
-
function apiScopes(api, extraScopes = []) {
|
|
596
|
-
let scopes = [...defaultApiScopes(api), ...extraScopes.map(scopeTransform)].map(scopeTransform);
|
|
597
|
-
return Array.from(new Set(scopes));
|
|
598
|
-
}
|
|
599
|
-
function defaultApiScopes(api) {
|
|
600
|
-
switch (api) {
|
|
601
|
-
case "admin":
|
|
602
|
-
return ["graphql", "themes", "collaborator"];
|
|
603
|
-
case "storefront-renderer":
|
|
604
|
-
return ["devtools"];
|
|
605
|
-
case "partners":
|
|
606
|
-
return ["cli"];
|
|
607
|
-
case "business-platform":
|
|
608
|
-
return ["destinations", "store-management"];
|
|
609
|
-
case "app-management":
|
|
610
|
-
return ["app-management"];
|
|
611
|
-
default:
|
|
612
|
-
throw new BugError(`Unknown API: ${api}`);
|
|
613
|
-
}
|
|
614
|
-
}
|
|
615
|
-
function scopeTransform(scope) {
|
|
616
|
-
switch (scope) {
|
|
617
|
-
case "graphql":
|
|
618
|
-
return "https://api.shopify.com/auth/shop.admin.graphql";
|
|
619
|
-
case "themes":
|
|
620
|
-
return "https://api.shopify.com/auth/shop.admin.themes";
|
|
621
|
-
case "collaborator":
|
|
622
|
-
return "https://api.shopify.com/auth/partners.collaborator-relationships.readonly";
|
|
623
|
-
case "cli":
|
|
624
|
-
return "https://api.shopify.com/auth/partners.app.cli.access";
|
|
625
|
-
case "devtools":
|
|
626
|
-
return "https://api.shopify.com/auth/shop.storefront-renderer.devtools";
|
|
627
|
-
case "destinations":
|
|
628
|
-
return "https://api.shopify.com/auth/destinations.readonly";
|
|
629
|
-
case "store-management":
|
|
630
|
-
return "https://api.shopify.com/auth/organization.store-management";
|
|
631
|
-
case "app-management":
|
|
632
|
-
return "https://api.shopify.com/auth/organization.apps.manage";
|
|
633
|
-
default:
|
|
634
|
-
return scope;
|
|
635
|
-
}
|
|
636
|
-
}
|
|
637
|
-
|
|
638
|
-
// ../cli-kit/dist/private/node/session/exchange.js
|
|
639
|
-
init_cjs_shims();
|
|
640
|
-
|
|
641
586
|
// ../../node_modules/.pnpm/jose@5.9.6/node_modules/jose/dist/node/esm/index.js
|
|
642
587
|
init_cjs_shims();
|
|
643
588
|
|
|
@@ -851,8 +796,10 @@ async function requestDeviceAuthorization(scopes) {
|
|
|
851
796
|
To run this command, log in to Shopify.`), !isTTY())
|
|
852
797
|
throw new AbortError("Authorization is required to continue, but the current environment does not support interactive prompts.", "To resolve this, specify credentials in your environment, or run the command in an interactive environment such as your local terminal.");
|
|
853
798
|
outputInfo(outputContent`User verification code: ${jsonResult.user_code}`);
|
|
854
|
-
let linkToken = outputToken.link(jsonResult.verification_uri_complete)
|
|
855
|
-
|
|
799
|
+
let linkToken = outputToken.link(jsonResult.verification_uri_complete), cloudMessage = () => {
|
|
800
|
+
outputInfo(outputContent`👉 Open this link to start the auth process: ${linkToken}`);
|
|
801
|
+
};
|
|
802
|
+
return isCloudEnvironment() ? cloudMessage() : (outputInfo("\u{1F449} Press any key to open the login page on your browser"), await keypress(), await openURL(jsonResult.verification_uri_complete) ? outputInfo(outputContent`Opened link to start the auth process: ${linkToken}`) : cloudMessage()), {
|
|
856
803
|
deviceCode: jsonResult.device_code,
|
|
857
804
|
userCode: jsonResult.user_code,
|
|
858
805
|
verificationUri: jsonResult.verification_uri,
|
|
@@ -899,20 +846,6 @@ function convertRequestToParams(queryParams) {
|
|
|
899
846
|
|
|
900
847
|
// ../cli-kit/dist/private/node/api/rest.js
|
|
901
848
|
init_cjs_shims();
|
|
902
|
-
function restRequestBody(requestBody) {
|
|
903
|
-
if (requestBody)
|
|
904
|
-
return JSON.stringify(requestBody);
|
|
905
|
-
}
|
|
906
|
-
function restRequestUrl(session, apiVersion, path, searchParams = {}) {
|
|
907
|
-
let url = new URL(isThemeAccessSession(session) ? `https://${themeKitAccessDomain}/cli/admin/api/${apiVersion}${path}.json` : `https://${session.storeFqdn}/admin/api/${apiVersion}${path}.json`);
|
|
908
|
-
return Object.entries(searchParams).forEach(([name, value]) => {
|
|
909
|
-
url.searchParams.set(name, value);
|
|
910
|
-
}), url.toString();
|
|
911
|
-
}
|
|
912
|
-
function restRequestHeaders(session) {
|
|
913
|
-
let store2 = session.storeFqdn, token = session.token, headers = buildHeaders(session.token);
|
|
914
|
-
return isThemeAccessSession(session) && (headers["X-Shopify-Shop"] = store2, headers["X-Shopify-Access-Token"] = token), headers;
|
|
915
|
-
}
|
|
916
849
|
function isThemeAccessSession(session) {
|
|
917
850
|
return session.token.startsWith("shptka_");
|
|
918
851
|
}
|
|
@@ -1123,9 +1056,6 @@ export {
|
|
|
1123
1056
|
err,
|
|
1124
1057
|
exchangeCustomPartnerToken,
|
|
1125
1058
|
remove,
|
|
1126
|
-
restRequestBody,
|
|
1127
|
-
restRequestUrl,
|
|
1128
|
-
restRequestHeaders,
|
|
1129
1059
|
isThemeAccessSession,
|
|
1130
1060
|
getLastSeenUserIdAfterAuth,
|
|
1131
1061
|
setLastSeenUserIdAfterAuth,
|
|
@@ -1135,4 +1065,4 @@ export {
|
|
|
1135
1065
|
getEnvironmentData,
|
|
1136
1066
|
getSensitiveEnvironmentData
|
|
1137
1067
|
};
|
|
1138
|
-
//# sourceMappingURL=chunk-
|
|
1068
|
+
//# sourceMappingURL=chunk-WXEVFXY4.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
findUpAndReadPackageJson,
|
|
5
5
|
getPackageManager,
|
|
6
6
|
usesWorkspaces
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-GSC3DSZN.js";
|
|
8
8
|
import {
|
|
9
9
|
AbortError,
|
|
10
10
|
exec,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
outputSuccess,
|
|
16
16
|
outputToken,
|
|
17
17
|
outputWarn
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-R3OLOJM7.js";
|
|
19
19
|
import {
|
|
20
20
|
dirname,
|
|
21
21
|
joinPath,
|
|
@@ -139,4 +139,4 @@ function usingPackageManager({ env } = { env: process.env }) {
|
|
|
139
139
|
export {
|
|
140
140
|
upgrade
|
|
141
141
|
};
|
|
142
|
-
//# sourceMappingURL=chunk-
|
|
142
|
+
//# sourceMappingURL=chunk-Y5V7ZNMS.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
clearCollectedLogs,
|
|
3
3
|
collectedLogs
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-R3OLOJM7.js";
|
|
5
5
|
import {
|
|
6
6
|
init_cjs_shims
|
|
7
7
|
} from "./chunk-PKR7KJ6P.js";
|
|
@@ -33,4 +33,4 @@ function mockAndCaptureOutput() {
|
|
|
33
33
|
export {
|
|
34
34
|
mockAndCaptureOutput
|
|
35
35
|
};
|
|
36
|
-
//# sourceMappingURL=chunk-
|
|
36
|
+
//# sourceMappingURL=chunk-YJUMZEX7.js.map
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
|
+
fetchNotifications,
|
|
2
3
|
getNotifications,
|
|
3
4
|
stringifyFilters
|
|
4
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-NGMTB27N.js";
|
|
5
6
|
import {
|
|
6
7
|
CLI_KIT_VERSION
|
|
7
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-F5WG7YRC.js";
|
|
8
9
|
import {
|
|
9
10
|
outputInfo,
|
|
10
11
|
randomUUID,
|
|
@@ -13,7 +14,7 @@ import {
|
|
|
13
14
|
renderTable,
|
|
14
15
|
renderTextPrompt,
|
|
15
16
|
writeFile
|
|
16
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-R3OLOJM7.js";
|
|
17
18
|
import {
|
|
18
19
|
init_cjs_shims
|
|
19
20
|
} from "./chunk-PKR7KJ6P.js";
|
|
@@ -81,14 +82,14 @@ async function generate() {
|
|
|
81
82
|
notifications.notifications.push(notification), await writeFile("./notifications.json", JSON.stringify(notifications)), renderSuccess({ headline: "notifications.json file updated successfully." });
|
|
82
83
|
}
|
|
83
84
|
async function list() {
|
|
84
|
-
let notifications = await
|
|
85
|
+
let notifications = await fetchNotifications(), columns = {
|
|
85
86
|
type: { header: "Type", color: "dim" },
|
|
86
87
|
title: { header: "Title", color: "dim" },
|
|
87
88
|
message: { header: "Message", color: "dim" },
|
|
88
89
|
filters: { header: "Filters", color: "dim" }
|
|
89
90
|
}, rows = notifications.notifications.map((notification) => ({
|
|
90
91
|
type: notification.type,
|
|
91
|
-
title: notification.title
|
|
92
|
+
title: notification.title ?? "",
|
|
92
93
|
message: notification.message,
|
|
93
94
|
filters: stringifyFilters(notification)
|
|
94
95
|
}));
|
|
@@ -100,4 +101,4 @@ export {
|
|
|
100
101
|
generate,
|
|
101
102
|
list
|
|
102
103
|
};
|
|
103
|
-
//# sourceMappingURL=chunk-
|
|
104
|
+
//# sourceMappingURL=chunk-YWGDPGEE.js.map
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Logout
|
|
3
|
-
} from "../../../chunk-
|
|
4
|
-
import "../../../chunk-
|
|
5
|
-
import "../../../chunk-
|
|
6
|
-
import "../../../chunk-
|
|
3
|
+
} from "../../../chunk-CUEBFCNF.js";
|
|
4
|
+
import "../../../chunk-247SAMPG.js";
|
|
5
|
+
import "../../../chunk-WRB46MIH.js";
|
|
6
|
+
import "../../../chunk-VCFDSABQ.js";
|
|
7
7
|
import "../../../chunk-SHWOPMLQ.js";
|
|
8
|
-
import "../../../chunk-
|
|
9
|
-
import "../../../chunk-
|
|
10
|
-
import "../../../chunk-
|
|
11
|
-
import "../../../chunk-
|
|
12
|
-
import "../../../chunk-O5UY3K6F.js";
|
|
8
|
+
import "../../../chunk-OLVUPFMV.js";
|
|
9
|
+
import "../../../chunk-WXEVFXY4.js";
|
|
10
|
+
import "../../../chunk-NGMTB27N.js";
|
|
11
|
+
import "../../../chunk-FKVY6WNT.js";
|
|
13
12
|
import "../../../chunk-25IMI7TH.js";
|
|
14
|
-
import "../../../chunk-
|
|
15
|
-
import "../../../chunk-
|
|
13
|
+
import "../../../chunk-F5WG7YRC.js";
|
|
14
|
+
import "../../../chunk-GSC3DSZN.js";
|
|
16
15
|
import "../../../chunk-HMDWNGIV.js";
|
|
17
|
-
import "../../../chunk-
|
|
16
|
+
import "../../../chunk-R3OLOJM7.js";
|
|
18
17
|
import "../../../chunk-B5EXYCV3.js";
|
|
19
18
|
import "../../../chunk-75LV6AQS.js";
|
|
20
19
|
import "../../../chunk-57Q6OQG4.js";
|
|
@@ -1,31 +1,30 @@
|
|
|
1
1
|
import {
|
|
2
2
|
mockAndCaptureOutput
|
|
3
|
-
} from "../../../chunk-
|
|
3
|
+
} from "../../../chunk-YJUMZEX7.js";
|
|
4
4
|
import {
|
|
5
5
|
Logout
|
|
6
|
-
} from "../../../chunk-
|
|
6
|
+
} from "../../../chunk-CUEBFCNF.js";
|
|
7
7
|
import {
|
|
8
8
|
logout
|
|
9
|
-
} from "../../../chunk-
|
|
9
|
+
} from "../../../chunk-247SAMPG.js";
|
|
10
10
|
import {
|
|
11
11
|
describe,
|
|
12
12
|
globalExpect,
|
|
13
13
|
test,
|
|
14
14
|
vi
|
|
15
15
|
} from "../../../chunk-Y53XECL6.js";
|
|
16
|
-
import "../../../chunk-
|
|
17
|
-
import "../../../chunk-
|
|
16
|
+
import "../../../chunk-WRB46MIH.js";
|
|
17
|
+
import "../../../chunk-VCFDSABQ.js";
|
|
18
18
|
import "../../../chunk-SHWOPMLQ.js";
|
|
19
|
-
import "../../../chunk-
|
|
20
|
-
import "../../../chunk-
|
|
21
|
-
import "../../../chunk-
|
|
22
|
-
import "../../../chunk-
|
|
23
|
-
import "../../../chunk-O5UY3K6F.js";
|
|
19
|
+
import "../../../chunk-OLVUPFMV.js";
|
|
20
|
+
import "../../../chunk-WXEVFXY4.js";
|
|
21
|
+
import "../../../chunk-NGMTB27N.js";
|
|
22
|
+
import "../../../chunk-FKVY6WNT.js";
|
|
24
23
|
import "../../../chunk-25IMI7TH.js";
|
|
25
|
-
import "../../../chunk-
|
|
26
|
-
import "../../../chunk-
|
|
24
|
+
import "../../../chunk-F5WG7YRC.js";
|
|
25
|
+
import "../../../chunk-GSC3DSZN.js";
|
|
27
26
|
import "../../../chunk-HMDWNGIV.js";
|
|
28
|
-
import "../../../chunk-
|
|
27
|
+
import "../../../chunk-R3OLOJM7.js";
|
|
29
28
|
import "../../../chunk-B5EXYCV3.js";
|
|
30
29
|
import "../../../chunk-75LV6AQS.js";
|
|
31
30
|
import "../../../chunk-57Q6OQG4.js";
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ClearCache
|
|
3
|
-
} from "../../../chunk-
|
|
4
|
-
import "../../../chunk-
|
|
5
|
-
import "../../../chunk-
|
|
3
|
+
} from "../../../chunk-2LCBNWGB.js";
|
|
4
|
+
import "../../../chunk-WRB46MIH.js";
|
|
5
|
+
import "../../../chunk-VCFDSABQ.js";
|
|
6
6
|
import "../../../chunk-SHWOPMLQ.js";
|
|
7
|
-
import "../../../chunk-
|
|
8
|
-
import "../../../chunk-
|
|
9
|
-
import "../../../chunk-
|
|
10
|
-
import "../../../chunk-
|
|
11
|
-
import "../../../chunk-O5UY3K6F.js";
|
|
7
|
+
import "../../../chunk-OLVUPFMV.js";
|
|
8
|
+
import "../../../chunk-WXEVFXY4.js";
|
|
9
|
+
import "../../../chunk-NGMTB27N.js";
|
|
10
|
+
import "../../../chunk-FKVY6WNT.js";
|
|
12
11
|
import "../../../chunk-25IMI7TH.js";
|
|
13
|
-
import "../../../chunk-
|
|
14
|
-
import "../../../chunk-
|
|
12
|
+
import "../../../chunk-F5WG7YRC.js";
|
|
13
|
+
import "../../../chunk-GSC3DSZN.js";
|
|
15
14
|
import "../../../chunk-HMDWNGIV.js";
|
|
16
|
-
import "../../../chunk-
|
|
15
|
+
import "../../../chunk-R3OLOJM7.js";
|
|
17
16
|
import "../../../chunk-B5EXYCV3.js";
|
|
18
17
|
import "../../../chunk-75LV6AQS.js";
|
|
19
18
|
import "../../../chunk-57Q6OQG4.js";
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CommandFlags
|
|
3
|
-
} from "../../../chunk-
|
|
4
|
-
import "../../../chunk-
|
|
5
|
-
import "../../../chunk-
|
|
3
|
+
} from "../../../chunk-7MKO46I5.js";
|
|
4
|
+
import "../../../chunk-WRB46MIH.js";
|
|
5
|
+
import "../../../chunk-VCFDSABQ.js";
|
|
6
6
|
import "../../../chunk-SHWOPMLQ.js";
|
|
7
|
-
import "../../../chunk-
|
|
8
|
-
import "../../../chunk-
|
|
9
|
-
import "../../../chunk-
|
|
10
|
-
import "../../../chunk-
|
|
11
|
-
import "../../../chunk-O5UY3K6F.js";
|
|
7
|
+
import "../../../chunk-OLVUPFMV.js";
|
|
8
|
+
import "../../../chunk-WXEVFXY4.js";
|
|
9
|
+
import "../../../chunk-NGMTB27N.js";
|
|
10
|
+
import "../../../chunk-FKVY6WNT.js";
|
|
12
11
|
import "../../../chunk-25IMI7TH.js";
|
|
13
|
-
import "../../../chunk-
|
|
14
|
-
import "../../../chunk-
|
|
12
|
+
import "../../../chunk-F5WG7YRC.js";
|
|
13
|
+
import "../../../chunk-GSC3DSZN.js";
|
|
15
14
|
import "../../../chunk-HMDWNGIV.js";
|
|
16
|
-
import "../../../chunk-
|
|
15
|
+
import "../../../chunk-R3OLOJM7.js";
|
|
17
16
|
import "../../../chunk-B5EXYCV3.js";
|
|
18
17
|
import "../../../chunk-75LV6AQS.js";
|
|
19
18
|
import "../../../chunk-57Q6OQG4.js";
|
|
@@ -4,20 +4,19 @@ import {
|
|
|
4
4
|
writeCommandDocumentation,
|
|
5
5
|
writeCommandFlagInterface,
|
|
6
6
|
writeCommandUsageExampleFile
|
|
7
|
-
} from "../../../chunk-
|
|
8
|
-
import "../../../chunk-
|
|
9
|
-
import "../../../chunk-
|
|
7
|
+
} from "../../../chunk-OAIHYIZM.js";
|
|
8
|
+
import "../../../chunk-WRB46MIH.js";
|
|
9
|
+
import "../../../chunk-VCFDSABQ.js";
|
|
10
10
|
import "../../../chunk-SHWOPMLQ.js";
|
|
11
|
-
import "../../../chunk-
|
|
12
|
-
import "../../../chunk-
|
|
13
|
-
import "../../../chunk-
|
|
14
|
-
import "../../../chunk-
|
|
15
|
-
import "../../../chunk-O5UY3K6F.js";
|
|
11
|
+
import "../../../chunk-OLVUPFMV.js";
|
|
12
|
+
import "../../../chunk-WXEVFXY4.js";
|
|
13
|
+
import "../../../chunk-NGMTB27N.js";
|
|
14
|
+
import "../../../chunk-FKVY6WNT.js";
|
|
16
15
|
import "../../../chunk-25IMI7TH.js";
|
|
17
|
-
import "../../../chunk-
|
|
18
|
-
import "../../../chunk-
|
|
16
|
+
import "../../../chunk-F5WG7YRC.js";
|
|
17
|
+
import "../../../chunk-GSC3DSZN.js";
|
|
19
18
|
import "../../../chunk-HMDWNGIV.js";
|
|
20
|
-
import "../../../chunk-
|
|
19
|
+
import "../../../chunk-R3OLOJM7.js";
|
|
21
20
|
import "../../../chunk-B5EXYCV3.js";
|
|
22
21
|
import "../../../chunk-75LV6AQS.js";
|
|
23
22
|
import "../../../chunk-57Q6OQG4.js";
|
|
@@ -3,28 +3,27 @@ import {
|
|
|
3
3
|
writeCommandDocumentation,
|
|
4
4
|
writeCommandFlagInterface,
|
|
5
5
|
writeCommandUsageExampleFile
|
|
6
|
-
} from "../../../chunk-
|
|
6
|
+
} from "../../../chunk-OAIHYIZM.js";
|
|
7
7
|
import {
|
|
8
8
|
describe,
|
|
9
9
|
globalExpect,
|
|
10
10
|
test,
|
|
11
11
|
vi
|
|
12
12
|
} from "../../../chunk-Y53XECL6.js";
|
|
13
|
-
import "../../../chunk-
|
|
14
|
-
import "../../../chunk-
|
|
13
|
+
import "../../../chunk-WRB46MIH.js";
|
|
14
|
+
import "../../../chunk-VCFDSABQ.js";
|
|
15
15
|
import "../../../chunk-SHWOPMLQ.js";
|
|
16
|
-
import "../../../chunk-
|
|
17
|
-
import "../../../chunk-
|
|
18
|
-
import "../../../chunk-
|
|
19
|
-
import "../../../chunk-
|
|
20
|
-
import "../../../chunk-O5UY3K6F.js";
|
|
16
|
+
import "../../../chunk-OLVUPFMV.js";
|
|
17
|
+
import "../../../chunk-WXEVFXY4.js";
|
|
18
|
+
import "../../../chunk-NGMTB27N.js";
|
|
19
|
+
import "../../../chunk-FKVY6WNT.js";
|
|
21
20
|
import "../../../chunk-25IMI7TH.js";
|
|
22
|
-
import "../../../chunk-
|
|
23
|
-
import "../../../chunk-
|
|
21
|
+
import "../../../chunk-F5WG7YRC.js";
|
|
22
|
+
import "../../../chunk-GSC3DSZN.js";
|
|
24
23
|
import "../../../chunk-HMDWNGIV.js";
|
|
25
24
|
import {
|
|
26
25
|
writeFile
|
|
27
|
-
} from "../../../chunk-
|
|
26
|
+
} from "../../../chunk-R3OLOJM7.js";
|
|
28
27
|
import "../../../chunk-B5EXYCV3.js";
|
|
29
28
|
import "../../../chunk-75LV6AQS.js";
|
|
30
29
|
import "../../../chunk-57Q6OQG4.js";
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
HelpCommand
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
3
|
+
} from "../../chunk-WJRSLVVW.js";
|
|
4
|
+
import "../../chunk-WRB46MIH.js";
|
|
5
|
+
import "../../chunk-VCFDSABQ.js";
|
|
6
6
|
import "../../chunk-SHWOPMLQ.js";
|
|
7
|
-
import "../../chunk-
|
|
8
|
-
import "../../chunk-
|
|
9
|
-
import "../../chunk-
|
|
10
|
-
import "../../chunk-
|
|
11
|
-
import "../../chunk-O5UY3K6F.js";
|
|
7
|
+
import "../../chunk-OLVUPFMV.js";
|
|
8
|
+
import "../../chunk-WXEVFXY4.js";
|
|
9
|
+
import "../../chunk-NGMTB27N.js";
|
|
10
|
+
import "../../chunk-FKVY6WNT.js";
|
|
12
11
|
import "../../chunk-25IMI7TH.js";
|
|
13
|
-
import "../../chunk-
|
|
14
|
-
import "../../chunk-
|
|
12
|
+
import "../../chunk-F5WG7YRC.js";
|
|
13
|
+
import "../../chunk-GSC3DSZN.js";
|
|
15
14
|
import "../../chunk-HMDWNGIV.js";
|
|
16
|
-
import "../../chunk-
|
|
15
|
+
import "../../chunk-R3OLOJM7.js";
|
|
17
16
|
import "../../chunk-B5EXYCV3.js";
|
|
18
17
|
import "../../chunk-75LV6AQS.js";
|
|
19
18
|
import "../../chunk-57Q6OQG4.js";
|