@shopify/create-app 4.2.0 → 4.3.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.
Files changed (94) hide show
  1. package/dist/{acorn-7AGUHU7X.js → acorn-MAWEBG4K.js} +2 -2
  2. package/dist/analytics-3PMXYIP7.js +39 -0
  3. package/dist/analytics-UKSMSQBS.js +33 -0
  4. package/dist/{angular-WQAMH4CA.js → angular-75GZFSHJ.js} +2 -2
  5. package/dist/{babel-ANYZPGZG.js → babel-KZNQAA3R.js} +2 -2
  6. package/dist/{chokidar-HTKREZL3.js → chokidar-JYHMNWDF.js} +4 -4
  7. package/dist/{chunk-W3I47I43.js → chunk-3HO4OGB2.js} +4 -4
  8. package/dist/{chunk-PKR7KJ6P.js → chunk-3XNI6LP4.js} +13 -4
  9. package/dist/{chunk-EYELFNC7.js → chunk-5UUZHSUY.js} +5 -5
  10. package/dist/{chunk-KAVGZDPZ.js → chunk-76IXOUER.js} +4 -4
  11. package/dist/{chunk-DJW2W7VA.js → chunk-7OHJH7BF.js} +2 -2
  12. package/dist/{chunk-SAVFAAHX.js → chunk-BEUNBVME.js} +16 -16
  13. package/dist/{chunk-M2UQMZTP.js → chunk-BL35W5EH.js} +17 -17
  14. package/dist/{chunk-ZPFFIMXV.js → chunk-BLEIVACU.js} +30 -21
  15. package/dist/{chunk-ACS6S42W.js → chunk-C3J4HVUN.js} +2 -2
  16. package/dist/{chunk-OO33NRTL.js → chunk-D6NYWNY2.js} +2 -2
  17. package/dist/{chunk-HDGI2UBV.js → chunk-EBLNNEPP.js} +13 -13
  18. package/dist/{chunk-VBBBCVMH.js → chunk-G53O4PDO.js} +2 -2
  19. package/dist/{chunk-BGBNK6AD.js → chunk-GYXZK243.js} +3 -3
  20. package/dist/{chunk-7IK72W75.js → chunk-HABWQC37.js} +2 -2
  21. package/dist/{chunk-F6LQTIYO.js → chunk-HIWQ3G6P.js} +8 -8
  22. package/dist/{chunk-RXMZPVTQ.js → chunk-HJATSDRW.js} +12 -12
  23. package/dist/{chunk-PES3XMQM.js → chunk-JGGOQOPO.js} +2 -2
  24. package/dist/{chunk-325YJ3GA.js → chunk-KWG6VAVE.js} +6 -6
  25. package/dist/{chunk-G2ZZKGSV.js → chunk-LBXDGVFS.js} +2 -2
  26. package/dist/{chunk-CJMNB2EJ.js → chunk-LDYT4FTV.js} +2 -2
  27. package/dist/{chunk-S2C3LKO2.js → chunk-LQOISCOF.js} +11 -11
  28. package/dist/{chunk-JCETIRLI.js → chunk-MSED5ZFM.js} +2 -2
  29. package/dist/{chunk-X2WZCKNE.js → chunk-ODCXYGJ2.js} +3 -3
  30. package/dist/{chunk-AROS7RI6.js → chunk-OE3FSIHW.js} +3 -3
  31. package/dist/{chunk-6ZCMRIIK.js → chunk-OFTMFPMR.js} +6 -6
  32. package/dist/{chunk-7FVFOTP5.js → chunk-OQ3KXXGH.js} +2 -2
  33. package/dist/{chunk-X7YTIMNN.js → chunk-RIQNGBMO.js} +2 -2
  34. package/dist/{chunk-RWI7QPAN.js → chunk-WJSRZNB2.js} +10 -10
  35. package/dist/{chunk-AJMNFS2U.js → chunk-ZNNK6ZF5.js} +7 -7
  36. package/dist/{chunk-IEVOZUJ7.js → chunk-ZTXAANY4.js} +3 -3
  37. package/dist/{conf-store-A3JOFSUU.js → conf-store-HDH4Y2F3.js} +15 -15
  38. package/dist/{custom-oclif-loader-5SWH4GTV.js → custom-oclif-loader-7BTLNXYR.js} +8 -8
  39. package/dist/{deprecations-2ELX7ROT.js → deprecations-AREYHAI7.js} +19 -19
  40. package/dist/{devtools-FXOPST2H.js → devtools-MQLG4C6G.js} +3 -3
  41. package/dist/{dist-U3FLPMJE.js → dist-CECUBBYR.js} +2 -2
  42. package/dist/environments-C3Z4TCZS.js +26 -0
  43. package/dist/error-handler-C3IHDYS6.js +37 -0
  44. package/dist/{estree-E53K34OK.js → estree-5HWY3OB4.js} +2 -2
  45. package/dist/{flow-LFBHZSUI.js → flow-2RRPTAWK.js} +2 -2
  46. package/dist/{fs-O3X2BDXD.js → fs-BANPZ2MD.js} +8 -8
  47. package/dist/{glimmer-CVQMANCJ.js → glimmer-CEC5WUBW.js} +2 -2
  48. package/dist/{graphql-ZOTIIZAG.js → graphql-HWYKHSDS.js} +2 -2
  49. package/dist/hooks/postrun.js +9 -9
  50. package/dist/hooks/prerun.js +7 -7
  51. package/dist/{html-WQ23J64T.js → html-QFC3GCRO.js} +2 -2
  52. package/dist/{http-proxy-node16-XB2DSBCB.js → http-proxy-node16-5LMQ6YXS.js} +4 -4
  53. package/dist/index.js +1022 -1010
  54. package/dist/index.test.js +2 -2
  55. package/dist/{is-global-ET3YL7TT.js → is-global-G56KES2Y.js} +8 -8
  56. package/dist/{is-wsl-BJRAPRQU.js → is-wsl-63MHD6QC.js} +2 -2
  57. package/dist/{latest-version-KKU2QQZW.js → latest-version-6X5NXQEO.js} +4 -4
  58. package/dist/lib-NKDE2QNY.js +11 -0
  59. package/dist/{local-QWRI6OFV.js → local-JBCA7C7D.js} +4 -4
  60. package/dist/{magic-string.es-TVG7HRZ2.js → magic-string.es-PUBJJZST.js} +2 -2
  61. package/dist/{markdown-OIW6O7KK.js → markdown-4ZM5GKW2.js} +2 -2
  62. package/dist/{meriyah-KMVSYB54.js → meriyah-SUZXHXAS.js} +2 -2
  63. package/dist/{metadata-VZBMAQQC.js → metadata-FSAZEGLO.js} +5 -5
  64. package/dist/{multipart-parser-WKKMXACL.js → multipart-parser-QFOUP2TT.js} +3 -3
  65. package/dist/{node-package-manager-W33EW2VU.js → node-package-manager-MQEWWORU.js} +20 -20
  66. package/dist/notifications-system-LRNZSYSG.js +40 -0
  67. package/dist/{open-BHIF7E3E.js → open-JSCXNUDN.js} +3 -3
  68. package/dist/out-B5JNCU2S.js +7 -0
  69. package/dist/{output-5PDIDYKG.js → output-SAJPYFUY.js} +8 -8
  70. package/dist/{path-EOPO7QNL.js → path-2WA5R6GG.js} +3 -3
  71. package/dist/{postcss-WSM6XINW.js → postcss-JKZFHYDB.js} +2 -2
  72. package/dist/{prettier-3LMT6EEA.js → prettier-SS3RRDXK.js} +3 -3
  73. package/dist/system-ERPUEL46.js +47 -0
  74. package/dist/tsconfig.tsbuildinfo +1 -1
  75. package/dist/typescript-4FFXOVC6.js +6 -0
  76. package/dist/{typescript-Q4XZM2A4.js → typescript-HLNUID2L.js} +2 -2
  77. package/dist/{ui-IN56X5S4.js → ui-SD2MSDNB.js} +18 -18
  78. package/dist/{upgrade-OAFAJX4I.js → upgrade-UCWZU5UX.js} +26 -26
  79. package/dist/version-ODTNTG3P.js +8 -0
  80. package/dist/version-ZWXWXLYG.js +30 -0
  81. package/dist/{yaml-NI5GGQLI.js → yaml-Y6GPRGAB.js} +2 -2
  82. package/oclif.manifest.json +1 -1
  83. package/package.json +4 -4
  84. package/dist/analytics-DXTA2BTW.js +0 -39
  85. package/dist/analytics-VN37446T.js +0 -33
  86. package/dist/environments-XMNHPGBO.js +0 -26
  87. package/dist/error-handler-YHPBH53J.js +0 -37
  88. package/dist/lib-QBGNJ3PZ.js +0 -11
  89. package/dist/notifications-system-ZFKFHX3O.js +0 -40
  90. package/dist/out-JJWXGPI4.js +0 -7
  91. package/dist/system-X6HCVR7P.js +0 -47
  92. package/dist/typescript-TKTDYKKG.js +0 -6
  93. package/dist/version-D3H6OPFX.js +0 -30
  94. package/dist/version-QYHHSKFX.js +0 -8
package/dist/index.js CHANGED
@@ -1,21 +1,21 @@
1
1
  import {
2
2
  require_normalize_path
3
- } from "./chunk-X7YTIMNN.js";
3
+ } from "./chunk-RIQNGBMO.js";
4
4
  import {
5
5
  index_exports,
6
6
  init_prettier
7
- } from "./chunk-SAVFAAHX.js";
7
+ } from "./chunk-BEUNBVME.js";
8
8
  import {
9
9
  TomlFile,
10
10
  TomlFileError,
11
11
  loadEnvironment,
12
12
  require_toml_patch
13
- } from "./chunk-F6LQTIYO.js";
13
+ } from "./chunk-HIWQ3G6P.js";
14
14
  import {
15
15
  getCurrentCommandId,
16
16
  setCurrentCommandId,
17
17
  showNotificationsIfNeeded
18
- } from "./chunk-S2C3LKO2.js";
18
+ } from "./chunk-LQOISCOF.js";
19
19
  import {
20
20
  ClientError,
21
21
  DevServerCore,
@@ -92,10 +92,10 @@ import {
92
92
  setPathValue,
93
93
  shopifyFetch,
94
94
  storeAdminUrl
95
- } from "./chunk-ZPFFIMXV.js";
95
+ } from "./chunk-BLEIVACU.js";
96
96
  import {
97
97
  setNextDeprecationDate
98
- } from "./chunk-JCETIRLI.js";
98
+ } from "./chunk-MSED5ZFM.js";
99
99
  import {
100
100
  UnknownPackageManagerError,
101
101
  addNPMDependenciesIfNeeded,
@@ -114,22 +114,22 @@ import {
114
114
  usesWorkspaces,
115
115
  versionSatisfies,
116
116
  writePackageJSON
117
- } from "./chunk-RWI7QPAN.js";
117
+ } from "./chunk-WJSRZNB2.js";
118
118
  import {
119
119
  CLI_KIT_VERSION
120
- } from "./chunk-IEVOZUJ7.js";
121
- import "./chunk-VBBBCVMH.js";
120
+ } from "./chunk-ZTXAANY4.js";
121
+ import "./chunk-G53O4PDO.js";
122
122
  import {
123
123
  LocalStorage,
124
124
  require_ajv,
125
125
  runAtMinimumInterval,
126
126
  serviceEnvironment
127
- } from "./chunk-AJMNFS2U.js";
127
+ } from "./chunk-ZNNK6ZF5.js";
128
128
  import {
129
129
  globalCLIVersion,
130
130
  isPreReleaseVersion,
131
131
  localCLIVersion
132
- } from "./chunk-W3I47I43.js";
132
+ } from "./chunk-3HO4OGB2.js";
133
133
  import {
134
134
  AbortController as AbortController2,
135
135
  AbortSignal,
@@ -170,35 +170,35 @@ import {
170
170
  useAbortSignal,
171
171
  useConcurrentOutputContext,
172
172
  username
173
- } from "./chunk-HDGI2UBV.js";
173
+ } from "./chunk-EBLNNEPP.js";
174
174
  import {
175
175
  addPublicMetadata,
176
176
  addSensitiveMetadata,
177
177
  createRuntimeMetadataContainer,
178
178
  runWithTimer
179
- } from "./chunk-KAVGZDPZ.js";
179
+ } from "./chunk-76IXOUER.js";
180
180
  import {
181
181
  AbortError,
182
182
  AbortSilentError,
183
183
  BugError,
184
184
  CancelExecution,
185
185
  import_ts_error
186
- } from "./chunk-6ZCMRIIK.js";
186
+ } from "./chunk-OFTMFPMR.js";
187
187
  import {
188
188
  require_commonjs,
189
189
  require_lib
190
- } from "./chunk-325YJ3GA.js";
191
- import "./chunk-X2WZCKNE.js";
192
- import "./chunk-G2ZZKGSV.js";
193
- import "./chunk-OO33NRTL.js";
194
- import "./chunk-PES3XMQM.js";
195
- import "./chunk-7FVFOTP5.js";
190
+ } from "./chunk-KWG6VAVE.js";
191
+ import "./chunk-ODCXYGJ2.js";
192
+ import "./chunk-LBXDGVFS.js";
193
+ import "./chunk-D6NYWNY2.js";
194
+ import "./chunk-JGGOQOPO.js";
195
+ import "./chunk-OQ3KXXGH.js";
196
196
  import {
197
197
  waitForPostRunHookAndExit
198
- } from "./chunk-M2UQMZTP.js";
198
+ } from "./chunk-BL35W5EH.js";
199
199
  import {
200
200
  treeKill
201
- } from "./chunk-BGBNK6AD.js";
201
+ } from "./chunk-GYXZK243.js";
202
202
  import {
203
203
  Box_default,
204
204
  Link,
@@ -305,7 +305,7 @@ import {
305
305
  use_stdout_default,
306
306
  writeFile,
307
307
  writeFileSync
308
- } from "./chunk-RXMZPVTQ.js";
308
+ } from "./chunk-HJATSDRW.js";
309
309
  import {
310
310
  codespacePortForwardingDomain,
311
311
  codespaceURL,
@@ -321,8 +321,8 @@ import {
321
321
  isUnitTest,
322
322
  isVerbose,
323
323
  themeKitAccessDomain
324
- } from "./chunk-EYELFNC7.js";
325
- import "./chunk-DJW2W7VA.js";
324
+ } from "./chunk-5UUZHSUY.js";
325
+ import "./chunk-7OHJH7BF.js";
326
326
  import {
327
327
  basename,
328
328
  cwd,
@@ -339,12 +339,12 @@ import {
339
339
  resolvePath,
340
340
  sanitizeRelativePath,
341
341
  sniffForJson
342
- } from "./chunk-ACS6S42W.js";
343
- import "./chunk-AROS7RI6.js";
344
- import "./chunk-7IK72W75.js";
342
+ } from "./chunk-C3J4HVUN.js";
343
+ import "./chunk-OE3FSIHW.js";
344
+ import "./chunk-HABWQC37.js";
345
345
  import {
346
346
  import_websocket_server
347
- } from "./chunk-CJMNB2EJ.js";
347
+ } from "./chunk-LDYT4FTV.js";
348
348
  import {
349
349
  __commonJS,
350
350
  __esm,
@@ -353,625 +353,7 @@ import {
353
353
  __toCommonJS,
354
354
  __toESM,
355
355
  init_cjs_shims
356
- } from "./chunk-PKR7KJ6P.js";
357
-
358
- // ../../node_modules/.pnpm/graphql-tag@2.12.6_graphql@16.14.2/node_modules/graphql-tag/lib/graphql-tag.umd.js
359
- var require_graphql_tag_umd = __commonJS({
360
- "../../node_modules/.pnpm/graphql-tag@2.12.6_graphql@16.14.2/node_modules/graphql-tag/lib/graphql-tag.umd.js"(exports, module) {
361
- init_cjs_shims();
362
- (function(global2, factory) {
363
- typeof exports == "object" && typeof module < "u" ? factory(exports, (init_tslib_es6(), __toCommonJS(tslib_es6_exports)), require_graphql()) : typeof define == "function" && define.amd ? define(["exports", "tslib", "graphql"], factory) : (global2 = typeof globalThis < "u" ? globalThis : global2 || self, factory(global2["graphql-tag"] = {}, global2.tslib, global2.graphql));
364
- })(exports, (function(exports2, tslib, graphql) {
365
- "use strict";
366
- var docCache = /* @__PURE__ */ new Map(), fragmentSourceMap = /* @__PURE__ */ new Map(), printFragmentWarnings = !0, experimentalFragmentVariables = !1;
367
- function normalize(string) {
368
- return string.replace(/[\s,]+/g, " ").trim();
369
- }
370
- function cacheKeyFromLoc(loc) {
371
- return normalize(loc.source.body.substring(loc.start, loc.end));
372
- }
373
- function processFragments(ast) {
374
- var seenKeys = /* @__PURE__ */ new Set(), definitions = [];
375
- return ast.definitions.forEach(function(fragmentDefinition) {
376
- if (fragmentDefinition.kind === "FragmentDefinition") {
377
- var fragmentName = fragmentDefinition.name.value, sourceKey = cacheKeyFromLoc(fragmentDefinition.loc), sourceKeySet = fragmentSourceMap.get(fragmentName);
378
- sourceKeySet && !sourceKeySet.has(sourceKey) ? printFragmentWarnings && console.warn("Warning: fragment with name " + fragmentName + ` already exists.
379
- graphql-tag enforces all fragment names across your application to be unique; read more about
380
- this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`) : sourceKeySet || fragmentSourceMap.set(fragmentName, sourceKeySet = /* @__PURE__ */ new Set()), sourceKeySet.add(sourceKey), seenKeys.has(sourceKey) || (seenKeys.add(sourceKey), definitions.push(fragmentDefinition));
381
- } else
382
- definitions.push(fragmentDefinition);
383
- }), tslib.__assign(tslib.__assign({}, ast), { definitions });
384
- }
385
- function stripLoc(doc) {
386
- var workSet = new Set(doc.definitions);
387
- workSet.forEach(function(node) {
388
- node.loc && delete node.loc, Object.keys(node).forEach(function(key) {
389
- var value = node[key];
390
- value && typeof value == "object" && workSet.add(value);
391
- });
392
- });
393
- var loc = doc.loc;
394
- return loc && (delete loc.startToken, delete loc.endToken), doc;
395
- }
396
- function parseDocument(source) {
397
- var cacheKey = normalize(source);
398
- if (!docCache.has(cacheKey)) {
399
- var parsed = graphql.parse(source, {
400
- experimentalFragmentVariables,
401
- allowLegacyFragmentVariables: experimentalFragmentVariables
402
- });
403
- if (!parsed || parsed.kind !== "Document")
404
- throw new Error("Not a valid GraphQL document.");
405
- docCache.set(cacheKey, stripLoc(processFragments(parsed)));
406
- }
407
- return docCache.get(cacheKey);
408
- }
409
- function gql2(literals) {
410
- for (var args = [], _i = 1; _i < arguments.length; _i++)
411
- args[_i - 1] = arguments[_i];
412
- typeof literals == "string" && (literals = [literals]);
413
- var result = literals[0];
414
- return args.forEach(function(arg, i) {
415
- arg && arg.kind === "Document" ? result += arg.loc.source.body : result += arg, result += literals[i + 1];
416
- }), parseDocument(result);
417
- }
418
- function resetCaches() {
419
- docCache.clear(), fragmentSourceMap.clear();
420
- }
421
- function disableFragmentWarnings() {
422
- printFragmentWarnings = !1;
423
- }
424
- function enableExperimentalFragmentVariables() {
425
- experimentalFragmentVariables = !0;
426
- }
427
- function disableExperimentalFragmentVariables() {
428
- experimentalFragmentVariables = !1;
429
- }
430
- var extras = {
431
- gql: gql2,
432
- resetCaches,
433
- disableFragmentWarnings,
434
- enableExperimentalFragmentVariables,
435
- disableExperimentalFragmentVariables
436
- };
437
- (function(gql_1) {
438
- gql_1.gql = extras.gql, gql_1.resetCaches = extras.resetCaches, gql_1.disableFragmentWarnings = extras.disableFragmentWarnings, gql_1.enableExperimentalFragmentVariables = extras.enableExperimentalFragmentVariables, gql_1.disableExperimentalFragmentVariables = extras.disableExperimentalFragmentVariables;
439
- })(gql2 || (gql2 = {})), gql2.default = gql2;
440
- var gql$1 = gql2;
441
- exports2.default = gql$1, exports2.disableExperimentalFragmentVariables = disableExperimentalFragmentVariables, exports2.disableFragmentWarnings = disableFragmentWarnings, exports2.enableExperimentalFragmentVariables = enableExperimentalFragmentVariables, exports2.gql = gql2, exports2.resetCaches = resetCaches, Object.defineProperty(exports2, "__esModule", { value: !0 });
442
- }));
443
- }
444
- });
445
-
446
- // ../../node_modules/.pnpm/graphql-tag@2.12.6_graphql@16.14.2/node_modules/graphql-tag/main.js
447
- var require_main = __commonJS({
448
- "../../node_modules/.pnpm/graphql-tag@2.12.6_graphql@16.14.2/node_modules/graphql-tag/main.js"(exports, module) {
449
- init_cjs_shims();
450
- module.exports = require_graphql_tag_umd().gql;
451
- }
452
- });
453
-
454
- // ../../node_modules/.pnpm/@luckycatfactory+esbuild-graphql-loader@3.8.1_esbuild@0.28.0_graphql-tag@2.12.6_graphql@16.14.2__graphql@16.14.2/node_modules/@luckycatfactory/esbuild-graphql-loader/lib/index.js
455
- var require_lib5 = __commonJS({
456
- "../../node_modules/.pnpm/@luckycatfactory+esbuild-graphql-loader@3.8.1_esbuild@0.28.0_graphql-tag@2.12.6_graphql@16.14.2__graphql@16.14.2/node_modules/@luckycatfactory/esbuild-graphql-loader/lib/index.js"(exports) {
457
- init_cjs_shims();
458
- var __create = Object.create, __defProp = Object.defineProperty, __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty, __getOwnPropNames = Object.getOwnPropertyNames, __getOwnPropDesc = Object.getOwnPropertyDescriptor, __markAsModule = (target) => __defProp(target, "__esModule", { value: !0 }), __export2 = (target, all) => {
459
- __markAsModule(target);
460
- for (var name in all)
461
- __defProp(target, name, { get: all[name], enumerable: !0 });
462
- }, __exportStar = (target, module2, desc) => {
463
- if (__markAsModule(target), module2 && typeof module2 == "object" || typeof module2 == "function")
464
- for (let key of __getOwnPropNames(module2))
465
- !__hasOwnProp.call(target, key) && key !== "default" && __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
466
- return target;
467
- }, __toModule = (module2) => module2 && module2.__esModule ? module2 : __exportStar(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", { value: module2, enumerable: !0 }), module2);
468
- __export2(exports, {
469
- default: () => src_default,
470
- generateContentsFromGraphqlString: () => generateContentsFromGraphqlString,
471
- generateGraphQLString: () => generateGraphQLString
472
- });
473
- var fs4 = __toModule(__require("fs")), graphql_tag = __toModule(require_main()), readline2 = __toModule(__require("readline")), path = __toModule(__require("path")), generateDocumentNodeString = (graphqlDocument, mapDocumentNode) => {
474
- let documentNodeToUse = mapDocumentNode ? mapDocumentNode(graphqlDocument) : graphqlDocument;
475
- return JSON.stringify(documentNodeToUse, (key, value) => value === void 0 ? "__undefined" : value).replace(/"__undefined"/g, "undefined");
476
- }, topologicallySortParsedFiles = (parsedFiles, cache) => {
477
- let visitedFiles = /* @__PURE__ */ new Set(), sorted = [], visitFile = (file) => {
478
- visitedFiles.has(file) || (visitedFiles.add(file), file.imports.forEach((importFileEntry) => {
479
- let importedFile = cache[importFileEntry.absolutePath];
480
- visitFile(importedFile);
481
- }), sorted.unshift(file));
482
- };
483
- return parsedFiles.forEach(visitFile), sorted;
484
- }, parseGraphQLFile = (filePath) => new Promise((resolve) => {
485
- let readInterface = readline2.default.createInterface({
486
- input: fs4.default.createReadStream(filePath)
487
- }), body = "", imports = [], hasExhaustedImports = !1, parseImportAndCapture = (importCommentPrefix, line) => {
488
- let relativePath2 = line.replace(importCommentPrefix, ""), relativePathWithoutQuotations = relativePath2.replace(/"|'/g, ""), absolutePath = path.default.join(path.default.dirname(filePath), relativePathWithoutQuotations);
489
- imports.push({
490
- absolutePath,
491
- relativePath: relativePath2
492
- });
493
- };
494
- readInterface.on("line", (line) => {
495
- line.startsWith("#import ") ? parseImportAndCapture("#import ", line) : line.startsWith("# import ") ? parseImportAndCapture("# import ", line) : hasExhaustedImports ? body += line + `
496
- ` : line[0] !== "#" && line !== "" && (hasExhaustedImports = !0, body += line + `
497
- `);
498
- }), readInterface.on("close", () => {
499
- resolve({ body: body.trim(), filePath, imports });
500
- });
501
- }), generateGraphQLString = (entryPointPath) => {
502
- let cache = {}, parsePromises = [], seenImportPaths = /* @__PURE__ */ new Set(), visitAndParse = (filePath) => cache[filePath] ? Promise.resolve(null) : new Promise((resolve) => {
503
- parseGraphQLFile(filePath).then((parsedFile) => {
504
- cache[parsedFile.filePath] = parsedFile, parsedFile.imports.forEach((importEntry) => {
505
- seenImportPaths.has(importEntry.absolutePath) || (seenImportPaths.add(importEntry.absolutePath), parsePromises.push(visitAndParse(importEntry.absolutePath)));
506
- });
507
- let nextPromise = parsePromises.shift();
508
- return nextPromise ? nextPromise.then(resolve) : resolve(null);
509
- });
510
- });
511
- return visitAndParse(entryPointPath).then(() => topologicallySortParsedFiles(Object.values(cache), cache).reduce((accumulator, file) => file.body + `
512
-
513
- ` + accumulator, ""));
514
- }, generateDocumentNodeStringForOperationDefinition = (operationDefinition, fragments, mapDocumentNode) => {
515
- let operationDocument = {
516
- kind: "Document",
517
- definitions: [operationDefinition, ...fragments]
518
- };
519
- return generateDocumentNodeString(operationDocument, mapDocumentNode);
520
- }, collectAllFragmentDefinitions = (documentNode) => ((nodes, accumulator) => (nodes.forEach((node) => {
521
- node.kind === "FragmentDefinition" && (accumulator[node.name.value] = node);
522
- }), accumulator))(documentNode.definitions, {}), collectAllFragmentReferences = (node, allFragments) => {
523
- let references = [], handleSelectionNode = (selection) => {
524
- if (selection.kind === "FragmentSpread") {
525
- let fragment = allFragments[selection.name.value], innerFragmentReferences = collectAllFragmentReferences(fragment, allFragments);
526
- references.push(...innerFragmentReferences, selection.name.value);
527
- }
528
- };
529
- return node.kind === "OperationDefinition" ? node.selectionSet.selections.forEach((selection) => {
530
- var _a49;
531
- selection.kind === "Field" && ((_a49 = selection.selectionSet) == null || _a49.selections.forEach(handleSelectionNode));
532
- }) : node.selectionSet.selections.forEach(handleSelectionNode), references;
533
- }, generateContentsFromGraphqlString = (graphqlString, mapDocumentNode) => {
534
- let graphqlDocument = graphql_tag.default(graphqlString), documentNodeAsString = generateDocumentNodeString(graphqlDocument, mapDocumentNode), allFragments = collectAllFragmentDefinitions(graphqlDocument), lines = graphqlDocument.definitions.reduce((accumulator, definition) => {
535
- if (definition.kind === "OperationDefinition" && definition.name && definition.name.value) {
536
- let name = definition.name.value, fragments = collectAllFragmentReferences(definition, allFragments).map((fragmentForOperation) => {
537
- let fragment = allFragments[fragmentForOperation];
538
- if (!fragment)
539
- throw new Error(`Expected to find fragment definition for ${fragmentForOperation}`);
540
- return fragment;
541
- }), operationDocumentString = generateDocumentNodeStringForOperationDefinition(definition, fragments, mapDocumentNode);
542
- accumulator.push(`export const ${name} = ${operationDocumentString};`);
543
- }
544
- return accumulator;
545
- }, [`const documentNode = ${documentNodeAsString};`]);
546
- return lines.push("export default documentNode;"), lines.join(`
547
- `);
548
- }, graphqlLoaderPlugin2 = (options = {}) => ({
549
- name: "graphql-loader",
550
- setup(build2) {
551
- build2.onLoad({ filter: options.filterRegex || /\.graphql$|\.gql$/ }, (args) => generateGraphQLString(args.path).then((graphqlString) => ({
552
- contents: generateContentsFromGraphqlString(graphqlString, options.mapDocumentNode)
553
- })));
554
- }
555
- }), src_default = graphqlLoaderPlugin2;
556
- }
557
- });
558
-
559
- // ../../node_modules/.pnpm/retry@0.12.0/node_modules/retry/lib/retry_operation.js
560
- var require_retry_operation = __commonJS({
561
- "../../node_modules/.pnpm/retry@0.12.0/node_modules/retry/lib/retry_operation.js"(exports, module) {
562
- init_cjs_shims();
563
- function RetryOperation(timeouts, options) {
564
- typeof options == "boolean" && (options = { forever: options }), this._originalTimeouts = JSON.parse(JSON.stringify(timeouts)), this._timeouts = timeouts, this._options = options || {}, this._maxRetryTime = options && options.maxRetryTime || 1 / 0, this._fn = null, this._errors = [], this._attempts = 1, this._operationTimeout = null, this._operationTimeoutCb = null, this._timeout = null, this._operationStart = null, this._options.forever && (this._cachedTimeouts = this._timeouts.slice(0));
565
- }
566
- module.exports = RetryOperation;
567
- RetryOperation.prototype.reset = function() {
568
- this._attempts = 1, this._timeouts = this._originalTimeouts;
569
- };
570
- RetryOperation.prototype.stop = function() {
571
- this._timeout && clearTimeout(this._timeout), this._timeouts = [], this._cachedTimeouts = null;
572
- };
573
- RetryOperation.prototype.retry = function(err2) {
574
- if (this._timeout && clearTimeout(this._timeout), !err2)
575
- return !1;
576
- var currentTime = (/* @__PURE__ */ new Date()).getTime();
577
- if (err2 && currentTime - this._operationStart >= this._maxRetryTime)
578
- return this._errors.unshift(new Error("RetryOperation timeout occurred")), !1;
579
- this._errors.push(err2);
580
- var timeout = this._timeouts.shift();
581
- if (timeout === void 0)
582
- if (this._cachedTimeouts)
583
- this._errors.splice(this._errors.length - 1, this._errors.length), this._timeouts = this._cachedTimeouts.slice(0), timeout = this._timeouts.shift();
584
- else
585
- return !1;
586
- var self2 = this, timer = setTimeout(function() {
587
- self2._attempts++, self2._operationTimeoutCb && (self2._timeout = setTimeout(function() {
588
- self2._operationTimeoutCb(self2._attempts);
589
- }, self2._operationTimeout), self2._options.unref && self2._timeout.unref()), self2._fn(self2._attempts);
590
- }, timeout);
591
- return this._options.unref && timer.unref(), !0;
592
- };
593
- RetryOperation.prototype.attempt = function(fn, timeoutOps) {
594
- this._fn = fn, timeoutOps && (timeoutOps.timeout && (this._operationTimeout = timeoutOps.timeout), timeoutOps.cb && (this._operationTimeoutCb = timeoutOps.cb));
595
- var self2 = this;
596
- this._operationTimeoutCb && (this._timeout = setTimeout(function() {
597
- self2._operationTimeoutCb();
598
- }, self2._operationTimeout)), this._operationStart = (/* @__PURE__ */ new Date()).getTime(), this._fn(this._attempts);
599
- };
600
- RetryOperation.prototype.try = function(fn) {
601
- console.log("Using RetryOperation.try() is deprecated"), this.attempt(fn);
602
- };
603
- RetryOperation.prototype.start = function(fn) {
604
- console.log("Using RetryOperation.start() is deprecated"), this.attempt(fn);
605
- };
606
- RetryOperation.prototype.start = RetryOperation.prototype.try;
607
- RetryOperation.prototype.errors = function() {
608
- return this._errors;
609
- };
610
- RetryOperation.prototype.attempts = function() {
611
- return this._attempts;
612
- };
613
- RetryOperation.prototype.mainError = function() {
614
- if (this._errors.length === 0)
615
- return null;
616
- for (var counts = {}, mainError = null, mainErrorCount = 0, i = 0; i < this._errors.length; i++) {
617
- var error = this._errors[i], message = error.message, count = (counts[message] || 0) + 1;
618
- counts[message] = count, count >= mainErrorCount && (mainError = error, mainErrorCount = count);
619
- }
620
- return mainError;
621
- };
622
- }
623
- });
624
-
625
- // ../../node_modules/.pnpm/retry@0.12.0/node_modules/retry/lib/retry.js
626
- var require_retry = __commonJS({
627
- "../../node_modules/.pnpm/retry@0.12.0/node_modules/retry/lib/retry.js"(exports) {
628
- init_cjs_shims();
629
- var RetryOperation = require_retry_operation();
630
- exports.operation = function(options) {
631
- var timeouts = exports.timeouts(options);
632
- return new RetryOperation(timeouts, {
633
- forever: options && options.forever,
634
- unref: options && options.unref,
635
- maxRetryTime: options && options.maxRetryTime
636
- });
637
- };
638
- exports.timeouts = function(options) {
639
- if (options instanceof Array)
640
- return [].concat(options);
641
- var opts = {
642
- retries: 10,
643
- factor: 2,
644
- minTimeout: 1 * 1e3,
645
- maxTimeout: 1 / 0,
646
- randomize: !1
647
- };
648
- for (var key in options)
649
- opts[key] = options[key];
650
- if (opts.minTimeout > opts.maxTimeout)
651
- throw new Error("minTimeout is greater than maxTimeout");
652
- for (var timeouts = [], i = 0; i < opts.retries; i++)
653
- timeouts.push(this.createTimeout(i, opts));
654
- return options && options.forever && !timeouts.length && timeouts.push(this.createTimeout(i, opts)), timeouts.sort(function(a2, b) {
655
- return a2 - b;
656
- }), timeouts;
657
- };
658
- exports.createTimeout = function(attempt, opts) {
659
- var random = opts.randomize ? Math.random() + 1 : 1, timeout = Math.round(random * opts.minTimeout * Math.pow(opts.factor, attempt));
660
- return timeout = Math.min(timeout, opts.maxTimeout), timeout;
661
- };
662
- exports.wrap = function(obj, options, methods) {
663
- if (options instanceof Array && (methods = options, options = null), !methods) {
664
- methods = [];
665
- for (var key in obj)
666
- typeof obj[key] == "function" && methods.push(key);
667
- }
668
- for (var i = 0; i < methods.length; i++) {
669
- var method = methods[i], original = obj[method];
670
- obj[method] = function(original2) {
671
- var op = exports.operation(options), args = Array.prototype.slice.call(arguments, 1), callback = args.pop();
672
- args.push(function(err2) {
673
- op.retry(err2) || (err2 && (arguments[0] = op.mainError()), callback.apply(this, arguments));
674
- }), op.attempt(function() {
675
- original2.apply(obj, args);
676
- });
677
- }.bind(obj, original), obj[method].options = options;
678
- }
679
- };
680
- }
681
- });
682
-
683
- // ../../node_modules/.pnpm/retry@0.12.0/node_modules/retry/index.js
684
- var require_retry2 = __commonJS({
685
- "../../node_modules/.pnpm/retry@0.12.0/node_modules/retry/index.js"(exports, module) {
686
- init_cjs_shims();
687
- module.exports = require_retry();
688
- }
689
- });
690
-
691
- // ../../node_modules/.pnpm/proper-lockfile@4.1.2/node_modules/proper-lockfile/lib/mtime-precision.js
692
- var require_mtime_precision = __commonJS({
693
- "../../node_modules/.pnpm/proper-lockfile@4.1.2/node_modules/proper-lockfile/lib/mtime-precision.js"(exports, module) {
694
- "use strict";
695
- init_cjs_shims();
696
- var cacheSymbol = /* @__PURE__ */ Symbol();
697
- function probe(file, fs4, callback) {
698
- let cachedPrecision = fs4[cacheSymbol];
699
- if (cachedPrecision)
700
- return fs4.stat(file, (err2, stat) => {
701
- if (err2)
702
- return callback(err2);
703
- callback(null, stat.mtime, cachedPrecision);
704
- });
705
- let mtime = new Date(Math.ceil(Date.now() / 1e3) * 1e3 + 5);
706
- fs4.utimes(file, mtime, mtime, (err2) => {
707
- if (err2)
708
- return callback(err2);
709
- fs4.stat(file, (err3, stat) => {
710
- if (err3)
711
- return callback(err3);
712
- let precision = stat.mtime.getTime() % 1e3 === 0 ? "s" : "ms";
713
- Object.defineProperty(fs4, cacheSymbol, { value: precision }), callback(null, stat.mtime, precision);
714
- });
715
- });
716
- }
717
- function getMtime(precision) {
718
- let now = Date.now();
719
- return precision === "s" && (now = Math.ceil(now / 1e3) * 1e3), new Date(now);
720
- }
721
- module.exports.probe = probe;
722
- module.exports.getMtime = getMtime;
723
- }
724
- });
725
-
726
- // ../../node_modules/.pnpm/proper-lockfile@4.1.2/node_modules/proper-lockfile/lib/lockfile.js
727
- var require_lockfile = __commonJS({
728
- "../../node_modules/.pnpm/proper-lockfile@4.1.2/node_modules/proper-lockfile/lib/lockfile.js"(exports, module) {
729
- "use strict";
730
- init_cjs_shims();
731
- var path = __require("path"), fs4 = require_graceful_fs(), retry = require_retry2(), onExit = require_signal_exit(), mtimePrecision = require_mtime_precision(), locks = {};
732
- function getLockFile(file, options) {
733
- return options.lockfilePath || `${file}.lock`;
734
- }
735
- function resolveCanonicalPath(file, options, callback) {
736
- if (!options.realpath)
737
- return callback(null, path.resolve(file));
738
- options.fs.realpath(file, callback);
739
- }
740
- function acquireLock(file, options, callback) {
741
- let lockfilePath = getLockFile(file, options);
742
- options.fs.mkdir(lockfilePath, (err2) => {
743
- if (!err2)
744
- return mtimePrecision.probe(lockfilePath, options.fs, (err3, mtime, mtimePrecision2) => {
745
- if (err3)
746
- return options.fs.rmdir(lockfilePath, () => {
747
- }), callback(err3);
748
- callback(null, mtime, mtimePrecision2);
749
- });
750
- if (err2.code !== "EEXIST")
751
- return callback(err2);
752
- if (options.stale <= 0)
753
- return callback(Object.assign(new Error("Lock file is already being held"), { code: "ELOCKED", file }));
754
- options.fs.stat(lockfilePath, (err3, stat) => {
755
- if (err3)
756
- return err3.code === "ENOENT" ? acquireLock(file, { ...options, stale: 0 }, callback) : callback(err3);
757
- if (!isLockStale(stat, options))
758
- return callback(Object.assign(new Error("Lock file is already being held"), { code: "ELOCKED", file }));
759
- removeLock(file, options, (err4) => {
760
- if (err4)
761
- return callback(err4);
762
- acquireLock(file, { ...options, stale: 0 }, callback);
763
- });
764
- });
765
- });
766
- }
767
- function isLockStale(stat, options) {
768
- return stat.mtime.getTime() < Date.now() - options.stale;
769
- }
770
- function removeLock(file, options, callback) {
771
- options.fs.rmdir(getLockFile(file, options), (err2) => {
772
- if (err2 && err2.code !== "ENOENT")
773
- return callback(err2);
774
- callback();
775
- });
776
- }
777
- function updateLock(file, options) {
778
- let lock2 = locks[file];
779
- lock2.updateTimeout || (lock2.updateDelay = lock2.updateDelay || options.update, lock2.updateTimeout = setTimeout(() => {
780
- lock2.updateTimeout = null, options.fs.stat(lock2.lockfilePath, (err2, stat) => {
781
- let isOverThreshold = lock2.lastUpdate + options.stale < Date.now();
782
- if (err2)
783
- return err2.code === "ENOENT" || isOverThreshold ? setLockAsCompromised(file, lock2, Object.assign(err2, { code: "ECOMPROMISED" })) : (lock2.updateDelay = 1e3, updateLock(file, options));
784
- if (!(lock2.mtime.getTime() === stat.mtime.getTime()))
785
- return setLockAsCompromised(
786
- file,
787
- lock2,
788
- Object.assign(
789
- new Error("Unable to update lock within the stale threshold"),
790
- { code: "ECOMPROMISED" }
791
- )
792
- );
793
- let mtime = mtimePrecision.getMtime(lock2.mtimePrecision);
794
- options.fs.utimes(lock2.lockfilePath, mtime, mtime, (err3) => {
795
- let isOverThreshold2 = lock2.lastUpdate + options.stale < Date.now();
796
- if (!lock2.released) {
797
- if (err3)
798
- return err3.code === "ENOENT" || isOverThreshold2 ? setLockAsCompromised(file, lock2, Object.assign(err3, { code: "ECOMPROMISED" })) : (lock2.updateDelay = 1e3, updateLock(file, options));
799
- lock2.mtime = mtime, lock2.lastUpdate = Date.now(), lock2.updateDelay = null, updateLock(file, options);
800
- }
801
- });
802
- });
803
- }, lock2.updateDelay), lock2.updateTimeout.unref && lock2.updateTimeout.unref());
804
- }
805
- function setLockAsCompromised(file, lock2, err2) {
806
- lock2.released = !0, lock2.updateTimeout && clearTimeout(lock2.updateTimeout), locks[file] === lock2 && delete locks[file], lock2.options.onCompromised(err2);
807
- }
808
- function lock(file, options, callback) {
809
- options = {
810
- stale: 1e4,
811
- update: null,
812
- realpath: !0,
813
- retries: 0,
814
- fs: fs4,
815
- onCompromised: (err2) => {
816
- throw err2;
817
- },
818
- ...options
819
- }, options.retries = options.retries || 0, options.retries = typeof options.retries == "number" ? { retries: options.retries } : options.retries, options.stale = Math.max(options.stale || 0, 2e3), options.update = options.update == null ? options.stale / 2 : options.update || 0, options.update = Math.max(Math.min(options.update, options.stale / 2), 1e3), resolveCanonicalPath(file, options, (err2, file2) => {
820
- if (err2)
821
- return callback(err2);
822
- let operation = retry.operation(options.retries);
823
- operation.attempt(() => {
824
- acquireLock(file2, options, (err3, mtime, mtimePrecision2) => {
825
- if (operation.retry(err3))
826
- return;
827
- if (err3)
828
- return callback(operation.mainError());
829
- let lock2 = locks[file2] = {
830
- lockfilePath: getLockFile(file2, options),
831
- mtime,
832
- mtimePrecision: mtimePrecision2,
833
- options,
834
- lastUpdate: Date.now()
835
- };
836
- updateLock(file2, options), callback(null, (releasedCallback) => {
837
- if (lock2.released)
838
- return releasedCallback && releasedCallback(Object.assign(new Error("Lock is already released"), { code: "ERELEASED" }));
839
- unlock(file2, { ...options, realpath: !1 }, releasedCallback);
840
- });
841
- });
842
- });
843
- });
844
- }
845
- function unlock(file, options, callback) {
846
- options = {
847
- fs: fs4,
848
- realpath: !0,
849
- ...options
850
- }, resolveCanonicalPath(file, options, (err2, file2) => {
851
- if (err2)
852
- return callback(err2);
853
- let lock2 = locks[file2];
854
- if (!lock2)
855
- return callback(Object.assign(new Error("Lock is not acquired/owned by you"), { code: "ENOTACQUIRED" }));
856
- lock2.updateTimeout && clearTimeout(lock2.updateTimeout), lock2.released = !0, delete locks[file2], removeLock(file2, options, callback);
857
- });
858
- }
859
- function check2(file, options, callback) {
860
- options = {
861
- stale: 1e4,
862
- realpath: !0,
863
- fs: fs4,
864
- ...options
865
- }, options.stale = Math.max(options.stale || 0, 2e3), resolveCanonicalPath(file, options, (err2, file2) => {
866
- if (err2)
867
- return callback(err2);
868
- options.fs.stat(getLockFile(file2, options), (err3, stat) => err3 ? err3.code === "ENOENT" ? callback(null, !1) : callback(err3) : callback(null, !isLockStale(stat, options)));
869
- });
870
- }
871
- function getLocks() {
872
- return locks;
873
- }
874
- onExit(() => {
875
- for (let file in locks) {
876
- let options = locks[file].options;
877
- try {
878
- options.fs.rmdirSync(getLockFile(file, options));
879
- } catch {
880
- }
881
- }
882
- });
883
- module.exports.lock = lock;
884
- module.exports.unlock = unlock;
885
- module.exports.check = check2;
886
- module.exports.getLocks = getLocks;
887
- }
888
- });
889
-
890
- // ../../node_modules/.pnpm/proper-lockfile@4.1.2/node_modules/proper-lockfile/lib/adapter.js
891
- var require_adapter = __commonJS({
892
- "../../node_modules/.pnpm/proper-lockfile@4.1.2/node_modules/proper-lockfile/lib/adapter.js"(exports, module) {
893
- "use strict";
894
- init_cjs_shims();
895
- var fs4 = require_graceful_fs();
896
- function createSyncFs(fs5) {
897
- let methods = ["mkdir", "realpath", "stat", "rmdir", "utimes"], newFs = { ...fs5 };
898
- return methods.forEach((method) => {
899
- newFs[method] = (...args) => {
900
- let callback = args.pop(), ret;
901
- try {
902
- ret = fs5[`${method}Sync`](...args);
903
- } catch (err2) {
904
- return callback(err2);
905
- }
906
- callback(null, ret);
907
- };
908
- }), newFs;
909
- }
910
- function toPromise(method) {
911
- return (...args) => new Promise((resolve, reject) => {
912
- args.push((err2, result) => {
913
- err2 ? reject(err2) : resolve(result);
914
- }), method(...args);
915
- });
916
- }
917
- function toSync(method) {
918
- return (...args) => {
919
- let err2, result;
920
- if (args.push((_err, _result) => {
921
- err2 = _err, result = _result;
922
- }), method(...args), err2)
923
- throw err2;
924
- return result;
925
- };
926
- }
927
- function toSyncOptions(options) {
928
- if (options = { ...options }, options.fs = createSyncFs(options.fs || fs4), typeof options.retries == "number" && options.retries > 0 || options.retries && typeof options.retries.retries == "number" && options.retries.retries > 0)
929
- throw Object.assign(new Error("Cannot use retries with the sync api"), { code: "ESYNC" });
930
- return options;
931
- }
932
- module.exports = {
933
- toPromise,
934
- toSync,
935
- toSyncOptions
936
- };
937
- }
938
- });
939
-
940
- // ../../node_modules/.pnpm/proper-lockfile@4.1.2/node_modules/proper-lockfile/index.js
941
- var require_proper_lockfile = __commonJS({
942
- "../../node_modules/.pnpm/proper-lockfile@4.1.2/node_modules/proper-lockfile/index.js"(exports, module) {
943
- "use strict";
944
- init_cjs_shims();
945
- var lockfile2 = require_lockfile(), { toPromise, toSync, toSyncOptions } = require_adapter();
946
- async function lock(file, options) {
947
- let release2 = await toPromise(lockfile2.lock)(file, options);
948
- return toPromise(release2);
949
- }
950
- function lockSync(file, options) {
951
- let release2 = toSync(lockfile2.lock)(file, toSyncOptions(options));
952
- return toSync(release2);
953
- }
954
- function unlock(file, options) {
955
- return toPromise(lockfile2.unlock)(file, options);
956
- }
957
- function unlockSync(file, options) {
958
- return toSync(lockfile2.unlock)(file, toSyncOptions(options));
959
- }
960
- function check2(file, options) {
961
- return toPromise(lockfile2.check)(file, options);
962
- }
963
- function checkSync(file, options) {
964
- return toSync(lockfile2.check)(file, toSyncOptions(options));
965
- }
966
- module.exports = lock;
967
- module.exports.lock = lock;
968
- module.exports.unlock = unlock;
969
- module.exports.lockSync = lockSync;
970
- module.exports.unlockSync = unlockSync;
971
- module.exports.check = check2;
972
- module.exports.checkSync = checkSync;
973
- }
974
- });
356
+ } from "./chunk-3XNI6LP4.js";
975
357
 
976
358
  // ../../node_modules/.pnpm/@shopify+theme-check-common@3.26.1/node_modules/@shopify/theme-check-common/dist/utils/object.js
977
359
  var require_object = __commonJS({
@@ -20823,7 +20205,7 @@ var LIB, URI2, Utils, init_esm = __esm({
20823
20205
  });
20824
20206
 
20825
20207
  // ../../node_modules/.pnpm/@vscode+l10n@0.0.18/node_modules/@vscode/l10n/dist/main.js
20826
- var require_main2 = __commonJS({
20208
+ var require_main = __commonJS({
20827
20209
  "../../node_modules/.pnpm/@vscode+l10n@0.0.18/node_modules/@vscode/l10n/dist/main.js"(exports, module) {
20828
20210
  "use strict";
20829
20211
  init_cjs_shims();
@@ -21630,7 +21012,7 @@ var l10n, formats, ASTNodeImpl, NullASTNodeImpl, BooleanASTNodeImpl, ArrayASTNod
21630
21012
  init_strings();
21631
21013
  init_jsonLanguageTypes();
21632
21014
  init_esm();
21633
- l10n = __toESM(require_main2()), formats = {
21015
+ l10n = __toESM(require_main()), formats = {
21634
21016
  "color-hex": { errorMessage: l10n.t("Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA."), pattern: /^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/ },
21635
21017
  "date-time": { errorMessage: l10n.t("String is not a RFC3339 date-time."), pattern: /^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i },
21636
21018
  date: { errorMessage: l10n.t("String is not a RFC3339 date."), pattern: /^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i },
@@ -21850,7 +21232,7 @@ var l10n2, valueCommitCharacters, propertyCommitCharacters, JSONCompletion, init
21850
21232
  init_strings();
21851
21233
  init_objects();
21852
21234
  init_jsonLanguageTypes();
21853
- l10n2 = __toESM(require_main2()), valueCommitCharacters = [",", "}", "]"], propertyCommitCharacters = [":"], JSONCompletion = class {
21235
+ l10n2 = __toESM(require_main()), valueCommitCharacters = [",", "}", "]"], propertyCommitCharacters = [":"], JSONCompletion = class {
21854
21236
  constructor(schemaService, contributions = [], promiseConstructor = Promise, clientCapabilities = {}) {
21855
21237
  this.schemaService = schemaService, this.contributions = contributions, this.promiseConstructor = promiseConstructor, this.clientCapabilities = clientCapabilities;
21856
21238
  }
@@ -22552,7 +21934,7 @@ var l10n3, JSONValidation, idCounter, init_jsonValidation = __esm({
22552
21934
  "../../node_modules/.pnpm/vscode-json-languageservice@5.7.2/node_modules/vscode-json-languageservice/lib/umd/services/jsonValidation.js"() {
22553
21935
  init_cjs_shims();
22554
21936
  init_jsonLanguageTypes();
22555
- l10n3 = __toESM(require_main2());
21937
+ l10n3 = __toESM(require_main());
22556
21938
  init_objects();
22557
21939
  JSONValidation = class {
22558
21940
  constructor(jsonSchemaService, promiseConstructor) {
@@ -22678,7 +22060,7 @@ var l10n4, JSONDocumentSymbols, init_jsonDocumentSymbols = __esm({
22678
22060
  init_jsonParser();
22679
22061
  init_strings();
22680
22062
  init_colors();
22681
- l10n4 = __toESM(require_main2());
22063
+ l10n4 = __toESM(require_main());
22682
22064
  init_jsonLanguageTypes();
22683
22065
  JSONDocumentSymbols = class {
22684
22066
  constructor(schemaService) {
@@ -23440,7 +22822,7 @@ var l10n5, schemaContributions, descriptions, init_configuration = __esm({
23440
22822
  init_cjs_shims();
23441
22823
  init_draft_2019_09_flat();
23442
22824
  init_draft_2020_12_flat();
23443
- l10n5 = __toESM(require_main2()), schemaContributions = {
22825
+ l10n5 = __toESM(require_main()), schemaContributions = {
23444
22826
  schemaAssociations: [],
23445
22827
  schemas: {
23446
22828
  // bundle the schema-schema to include (localized) descriptions
@@ -24051,7 +23433,7 @@ var l10n6, BANG, PATH_SEP, FilePatternAssociation, SchemaHandle, UnresolvedSchem
24051
23433
  init_strings();
24052
23434
  init_jsonParser();
24053
23435
  init_jsonLanguageTypes();
24054
- l10n6 = __toESM(require_main2());
23436
+ l10n6 = __toESM(require_main());
24055
23437
  init_glob();
24056
23438
  init_objects();
24057
23439
  init_main2();
@@ -48102,6 +47484,624 @@ var require_dist7 = __commonJS({
48102
47484
  }
48103
47485
  });
48104
47486
 
47487
+ // ../../node_modules/.pnpm/graphql-tag@2.12.6_graphql@16.14.2/node_modules/graphql-tag/lib/graphql-tag.umd.js
47488
+ var require_graphql_tag_umd = __commonJS({
47489
+ "../../node_modules/.pnpm/graphql-tag@2.12.6_graphql@16.14.2/node_modules/graphql-tag/lib/graphql-tag.umd.js"(exports, module) {
47490
+ init_cjs_shims();
47491
+ (function(global2, factory) {
47492
+ typeof exports == "object" && typeof module < "u" ? factory(exports, (init_tslib_es6(), __toCommonJS(tslib_es6_exports)), require_graphql()) : typeof define == "function" && define.amd ? define(["exports", "tslib", "graphql"], factory) : (global2 = typeof globalThis < "u" ? globalThis : global2 || self, factory(global2["graphql-tag"] = {}, global2.tslib, global2.graphql));
47493
+ })(exports, (function(exports2, tslib, graphql) {
47494
+ "use strict";
47495
+ var docCache = /* @__PURE__ */ new Map(), fragmentSourceMap = /* @__PURE__ */ new Map(), printFragmentWarnings = !0, experimentalFragmentVariables = !1;
47496
+ function normalize(string) {
47497
+ return string.replace(/[\s,]+/g, " ").trim();
47498
+ }
47499
+ function cacheKeyFromLoc(loc) {
47500
+ return normalize(loc.source.body.substring(loc.start, loc.end));
47501
+ }
47502
+ function processFragments(ast) {
47503
+ var seenKeys = /* @__PURE__ */ new Set(), definitions = [];
47504
+ return ast.definitions.forEach(function(fragmentDefinition) {
47505
+ if (fragmentDefinition.kind === "FragmentDefinition") {
47506
+ var fragmentName = fragmentDefinition.name.value, sourceKey = cacheKeyFromLoc(fragmentDefinition.loc), sourceKeySet = fragmentSourceMap.get(fragmentName);
47507
+ sourceKeySet && !sourceKeySet.has(sourceKey) ? printFragmentWarnings && console.warn("Warning: fragment with name " + fragmentName + ` already exists.
47508
+ graphql-tag enforces all fragment names across your application to be unique; read more about
47509
+ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`) : sourceKeySet || fragmentSourceMap.set(fragmentName, sourceKeySet = /* @__PURE__ */ new Set()), sourceKeySet.add(sourceKey), seenKeys.has(sourceKey) || (seenKeys.add(sourceKey), definitions.push(fragmentDefinition));
47510
+ } else
47511
+ definitions.push(fragmentDefinition);
47512
+ }), tslib.__assign(tslib.__assign({}, ast), { definitions });
47513
+ }
47514
+ function stripLoc(doc) {
47515
+ var workSet = new Set(doc.definitions);
47516
+ workSet.forEach(function(node) {
47517
+ node.loc && delete node.loc, Object.keys(node).forEach(function(key) {
47518
+ var value = node[key];
47519
+ value && typeof value == "object" && workSet.add(value);
47520
+ });
47521
+ });
47522
+ var loc = doc.loc;
47523
+ return loc && (delete loc.startToken, delete loc.endToken), doc;
47524
+ }
47525
+ function parseDocument(source) {
47526
+ var cacheKey = normalize(source);
47527
+ if (!docCache.has(cacheKey)) {
47528
+ var parsed = graphql.parse(source, {
47529
+ experimentalFragmentVariables,
47530
+ allowLegacyFragmentVariables: experimentalFragmentVariables
47531
+ });
47532
+ if (!parsed || parsed.kind !== "Document")
47533
+ throw new Error("Not a valid GraphQL document.");
47534
+ docCache.set(cacheKey, stripLoc(processFragments(parsed)));
47535
+ }
47536
+ return docCache.get(cacheKey);
47537
+ }
47538
+ function gql2(literals) {
47539
+ for (var args = [], _i = 1; _i < arguments.length; _i++)
47540
+ args[_i - 1] = arguments[_i];
47541
+ typeof literals == "string" && (literals = [literals]);
47542
+ var result = literals[0];
47543
+ return args.forEach(function(arg, i) {
47544
+ arg && arg.kind === "Document" ? result += arg.loc.source.body : result += arg, result += literals[i + 1];
47545
+ }), parseDocument(result);
47546
+ }
47547
+ function resetCaches() {
47548
+ docCache.clear(), fragmentSourceMap.clear();
47549
+ }
47550
+ function disableFragmentWarnings() {
47551
+ printFragmentWarnings = !1;
47552
+ }
47553
+ function enableExperimentalFragmentVariables() {
47554
+ experimentalFragmentVariables = !0;
47555
+ }
47556
+ function disableExperimentalFragmentVariables() {
47557
+ experimentalFragmentVariables = !1;
47558
+ }
47559
+ var extras = {
47560
+ gql: gql2,
47561
+ resetCaches,
47562
+ disableFragmentWarnings,
47563
+ enableExperimentalFragmentVariables,
47564
+ disableExperimentalFragmentVariables
47565
+ };
47566
+ (function(gql_1) {
47567
+ gql_1.gql = extras.gql, gql_1.resetCaches = extras.resetCaches, gql_1.disableFragmentWarnings = extras.disableFragmentWarnings, gql_1.enableExperimentalFragmentVariables = extras.enableExperimentalFragmentVariables, gql_1.disableExperimentalFragmentVariables = extras.disableExperimentalFragmentVariables;
47568
+ })(gql2 || (gql2 = {})), gql2.default = gql2;
47569
+ var gql$1 = gql2;
47570
+ exports2.default = gql$1, exports2.disableExperimentalFragmentVariables = disableExperimentalFragmentVariables, exports2.disableFragmentWarnings = disableFragmentWarnings, exports2.enableExperimentalFragmentVariables = enableExperimentalFragmentVariables, exports2.gql = gql2, exports2.resetCaches = resetCaches, Object.defineProperty(exports2, "__esModule", { value: !0 });
47571
+ }));
47572
+ }
47573
+ });
47574
+
47575
+ // ../../node_modules/.pnpm/graphql-tag@2.12.6_graphql@16.14.2/node_modules/graphql-tag/main.js
47576
+ var require_main2 = __commonJS({
47577
+ "../../node_modules/.pnpm/graphql-tag@2.12.6_graphql@16.14.2/node_modules/graphql-tag/main.js"(exports, module) {
47578
+ init_cjs_shims();
47579
+ module.exports = require_graphql_tag_umd().gql;
47580
+ }
47581
+ });
47582
+
47583
+ // ../../node_modules/.pnpm/@luckycatfactory+esbuild-graphql-loader@3.8.1_esbuild@0.28.1_graphql-tag@2.12.6_graphql@16.14.2__graphql@16.14.2/node_modules/@luckycatfactory/esbuild-graphql-loader/lib/index.js
47584
+ var require_lib5 = __commonJS({
47585
+ "../../node_modules/.pnpm/@luckycatfactory+esbuild-graphql-loader@3.8.1_esbuild@0.28.1_graphql-tag@2.12.6_graphql@16.14.2__graphql@16.14.2/node_modules/@luckycatfactory/esbuild-graphql-loader/lib/index.js"(exports) {
47586
+ init_cjs_shims();
47587
+ var __create = Object.create, __defProp = Object.defineProperty, __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty, __getOwnPropNames = Object.getOwnPropertyNames, __getOwnPropDesc = Object.getOwnPropertyDescriptor, __markAsModule = (target) => __defProp(target, "__esModule", { value: !0 }), __export2 = (target, all) => {
47588
+ __markAsModule(target);
47589
+ for (var name in all)
47590
+ __defProp(target, name, { get: all[name], enumerable: !0 });
47591
+ }, __exportStar = (target, module2, desc) => {
47592
+ if (__markAsModule(target), module2 && typeof module2 == "object" || typeof module2 == "function")
47593
+ for (let key of __getOwnPropNames(module2))
47594
+ !__hasOwnProp.call(target, key) && key !== "default" && __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
47595
+ return target;
47596
+ }, __toModule = (module2) => module2 && module2.__esModule ? module2 : __exportStar(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", { value: module2, enumerable: !0 }), module2);
47597
+ __export2(exports, {
47598
+ default: () => src_default,
47599
+ generateContentsFromGraphqlString: () => generateContentsFromGraphqlString,
47600
+ generateGraphQLString: () => generateGraphQLString
47601
+ });
47602
+ var fs4 = __toModule(__require("fs")), graphql_tag = __toModule(require_main2()), readline2 = __toModule(__require("readline")), path = __toModule(__require("path")), generateDocumentNodeString = (graphqlDocument, mapDocumentNode) => {
47603
+ let documentNodeToUse = mapDocumentNode ? mapDocumentNode(graphqlDocument) : graphqlDocument;
47604
+ return JSON.stringify(documentNodeToUse, (key, value) => value === void 0 ? "__undefined" : value).replace(/"__undefined"/g, "undefined");
47605
+ }, topologicallySortParsedFiles = (parsedFiles, cache) => {
47606
+ let visitedFiles = /* @__PURE__ */ new Set(), sorted = [], visitFile = (file) => {
47607
+ visitedFiles.has(file) || (visitedFiles.add(file), file.imports.forEach((importFileEntry) => {
47608
+ let importedFile = cache[importFileEntry.absolutePath];
47609
+ visitFile(importedFile);
47610
+ }), sorted.unshift(file));
47611
+ };
47612
+ return parsedFiles.forEach(visitFile), sorted;
47613
+ }, parseGraphQLFile = (filePath) => new Promise((resolve) => {
47614
+ let readInterface = readline2.default.createInterface({
47615
+ input: fs4.default.createReadStream(filePath)
47616
+ }), body = "", imports = [], hasExhaustedImports = !1, parseImportAndCapture = (importCommentPrefix, line) => {
47617
+ let relativePath2 = line.replace(importCommentPrefix, ""), relativePathWithoutQuotations = relativePath2.replace(/"|'/g, ""), absolutePath = path.default.join(path.default.dirname(filePath), relativePathWithoutQuotations);
47618
+ imports.push({
47619
+ absolutePath,
47620
+ relativePath: relativePath2
47621
+ });
47622
+ };
47623
+ readInterface.on("line", (line) => {
47624
+ line.startsWith("#import ") ? parseImportAndCapture("#import ", line) : line.startsWith("# import ") ? parseImportAndCapture("# import ", line) : hasExhaustedImports ? body += line + `
47625
+ ` : line[0] !== "#" && line !== "" && (hasExhaustedImports = !0, body += line + `
47626
+ `);
47627
+ }), readInterface.on("close", () => {
47628
+ resolve({ body: body.trim(), filePath, imports });
47629
+ });
47630
+ }), generateGraphQLString = (entryPointPath) => {
47631
+ let cache = {}, parsePromises = [], seenImportPaths = /* @__PURE__ */ new Set(), visitAndParse = (filePath) => cache[filePath] ? Promise.resolve(null) : new Promise((resolve) => {
47632
+ parseGraphQLFile(filePath).then((parsedFile) => {
47633
+ cache[parsedFile.filePath] = parsedFile, parsedFile.imports.forEach((importEntry) => {
47634
+ seenImportPaths.has(importEntry.absolutePath) || (seenImportPaths.add(importEntry.absolutePath), parsePromises.push(visitAndParse(importEntry.absolutePath)));
47635
+ });
47636
+ let nextPromise = parsePromises.shift();
47637
+ return nextPromise ? nextPromise.then(resolve) : resolve(null);
47638
+ });
47639
+ });
47640
+ return visitAndParse(entryPointPath).then(() => topologicallySortParsedFiles(Object.values(cache), cache).reduce((accumulator, file) => file.body + `
47641
+
47642
+ ` + accumulator, ""));
47643
+ }, generateDocumentNodeStringForOperationDefinition = (operationDefinition, fragments, mapDocumentNode) => {
47644
+ let operationDocument = {
47645
+ kind: "Document",
47646
+ definitions: [operationDefinition, ...fragments]
47647
+ };
47648
+ return generateDocumentNodeString(operationDocument, mapDocumentNode);
47649
+ }, collectAllFragmentDefinitions = (documentNode) => ((nodes, accumulator) => (nodes.forEach((node) => {
47650
+ node.kind === "FragmentDefinition" && (accumulator[node.name.value] = node);
47651
+ }), accumulator))(documentNode.definitions, {}), collectAllFragmentReferences = (node, allFragments) => {
47652
+ let references = [], handleSelectionNode = (selection) => {
47653
+ if (selection.kind === "FragmentSpread") {
47654
+ let fragment = allFragments[selection.name.value], innerFragmentReferences = collectAllFragmentReferences(fragment, allFragments);
47655
+ references.push(...innerFragmentReferences, selection.name.value);
47656
+ }
47657
+ };
47658
+ return node.kind === "OperationDefinition" ? node.selectionSet.selections.forEach((selection) => {
47659
+ var _a49;
47660
+ selection.kind === "Field" && ((_a49 = selection.selectionSet) == null || _a49.selections.forEach(handleSelectionNode));
47661
+ }) : node.selectionSet.selections.forEach(handleSelectionNode), references;
47662
+ }, generateContentsFromGraphqlString = (graphqlString, mapDocumentNode) => {
47663
+ let graphqlDocument = graphql_tag.default(graphqlString), documentNodeAsString = generateDocumentNodeString(graphqlDocument, mapDocumentNode), allFragments = collectAllFragmentDefinitions(graphqlDocument), lines = graphqlDocument.definitions.reduce((accumulator, definition) => {
47664
+ if (definition.kind === "OperationDefinition" && definition.name && definition.name.value) {
47665
+ let name = definition.name.value, fragments = collectAllFragmentReferences(definition, allFragments).map((fragmentForOperation) => {
47666
+ let fragment = allFragments[fragmentForOperation];
47667
+ if (!fragment)
47668
+ throw new Error(`Expected to find fragment definition for ${fragmentForOperation}`);
47669
+ return fragment;
47670
+ }), operationDocumentString = generateDocumentNodeStringForOperationDefinition(definition, fragments, mapDocumentNode);
47671
+ accumulator.push(`export const ${name} = ${operationDocumentString};`);
47672
+ }
47673
+ return accumulator;
47674
+ }, [`const documentNode = ${documentNodeAsString};`]);
47675
+ return lines.push("export default documentNode;"), lines.join(`
47676
+ `);
47677
+ }, graphqlLoaderPlugin2 = (options = {}) => ({
47678
+ name: "graphql-loader",
47679
+ setup(build2) {
47680
+ build2.onLoad({ filter: options.filterRegex || /\.graphql$|\.gql$/ }, (args) => generateGraphQLString(args.path).then((graphqlString) => ({
47681
+ contents: generateContentsFromGraphqlString(graphqlString, options.mapDocumentNode)
47682
+ })));
47683
+ }
47684
+ }), src_default = graphqlLoaderPlugin2;
47685
+ }
47686
+ });
47687
+
47688
+ // ../../node_modules/.pnpm/retry@0.12.0/node_modules/retry/lib/retry_operation.js
47689
+ var require_retry_operation = __commonJS({
47690
+ "../../node_modules/.pnpm/retry@0.12.0/node_modules/retry/lib/retry_operation.js"(exports, module) {
47691
+ init_cjs_shims();
47692
+ function RetryOperation(timeouts, options) {
47693
+ typeof options == "boolean" && (options = { forever: options }), this._originalTimeouts = JSON.parse(JSON.stringify(timeouts)), this._timeouts = timeouts, this._options = options || {}, this._maxRetryTime = options && options.maxRetryTime || 1 / 0, this._fn = null, this._errors = [], this._attempts = 1, this._operationTimeout = null, this._operationTimeoutCb = null, this._timeout = null, this._operationStart = null, this._options.forever && (this._cachedTimeouts = this._timeouts.slice(0));
47694
+ }
47695
+ module.exports = RetryOperation;
47696
+ RetryOperation.prototype.reset = function() {
47697
+ this._attempts = 1, this._timeouts = this._originalTimeouts;
47698
+ };
47699
+ RetryOperation.prototype.stop = function() {
47700
+ this._timeout && clearTimeout(this._timeout), this._timeouts = [], this._cachedTimeouts = null;
47701
+ };
47702
+ RetryOperation.prototype.retry = function(err2) {
47703
+ if (this._timeout && clearTimeout(this._timeout), !err2)
47704
+ return !1;
47705
+ var currentTime = (/* @__PURE__ */ new Date()).getTime();
47706
+ if (err2 && currentTime - this._operationStart >= this._maxRetryTime)
47707
+ return this._errors.unshift(new Error("RetryOperation timeout occurred")), !1;
47708
+ this._errors.push(err2);
47709
+ var timeout = this._timeouts.shift();
47710
+ if (timeout === void 0)
47711
+ if (this._cachedTimeouts)
47712
+ this._errors.splice(this._errors.length - 1, this._errors.length), this._timeouts = this._cachedTimeouts.slice(0), timeout = this._timeouts.shift();
47713
+ else
47714
+ return !1;
47715
+ var self2 = this, timer = setTimeout(function() {
47716
+ self2._attempts++, self2._operationTimeoutCb && (self2._timeout = setTimeout(function() {
47717
+ self2._operationTimeoutCb(self2._attempts);
47718
+ }, self2._operationTimeout), self2._options.unref && self2._timeout.unref()), self2._fn(self2._attempts);
47719
+ }, timeout);
47720
+ return this._options.unref && timer.unref(), !0;
47721
+ };
47722
+ RetryOperation.prototype.attempt = function(fn, timeoutOps) {
47723
+ this._fn = fn, timeoutOps && (timeoutOps.timeout && (this._operationTimeout = timeoutOps.timeout), timeoutOps.cb && (this._operationTimeoutCb = timeoutOps.cb));
47724
+ var self2 = this;
47725
+ this._operationTimeoutCb && (this._timeout = setTimeout(function() {
47726
+ self2._operationTimeoutCb();
47727
+ }, self2._operationTimeout)), this._operationStart = (/* @__PURE__ */ new Date()).getTime(), this._fn(this._attempts);
47728
+ };
47729
+ RetryOperation.prototype.try = function(fn) {
47730
+ console.log("Using RetryOperation.try() is deprecated"), this.attempt(fn);
47731
+ };
47732
+ RetryOperation.prototype.start = function(fn) {
47733
+ console.log("Using RetryOperation.start() is deprecated"), this.attempt(fn);
47734
+ };
47735
+ RetryOperation.prototype.start = RetryOperation.prototype.try;
47736
+ RetryOperation.prototype.errors = function() {
47737
+ return this._errors;
47738
+ };
47739
+ RetryOperation.prototype.attempts = function() {
47740
+ return this._attempts;
47741
+ };
47742
+ RetryOperation.prototype.mainError = function() {
47743
+ if (this._errors.length === 0)
47744
+ return null;
47745
+ for (var counts = {}, mainError = null, mainErrorCount = 0, i = 0; i < this._errors.length; i++) {
47746
+ var error = this._errors[i], message = error.message, count = (counts[message] || 0) + 1;
47747
+ counts[message] = count, count >= mainErrorCount && (mainError = error, mainErrorCount = count);
47748
+ }
47749
+ return mainError;
47750
+ };
47751
+ }
47752
+ });
47753
+
47754
+ // ../../node_modules/.pnpm/retry@0.12.0/node_modules/retry/lib/retry.js
47755
+ var require_retry = __commonJS({
47756
+ "../../node_modules/.pnpm/retry@0.12.0/node_modules/retry/lib/retry.js"(exports) {
47757
+ init_cjs_shims();
47758
+ var RetryOperation = require_retry_operation();
47759
+ exports.operation = function(options) {
47760
+ var timeouts = exports.timeouts(options);
47761
+ return new RetryOperation(timeouts, {
47762
+ forever: options && options.forever,
47763
+ unref: options && options.unref,
47764
+ maxRetryTime: options && options.maxRetryTime
47765
+ });
47766
+ };
47767
+ exports.timeouts = function(options) {
47768
+ if (options instanceof Array)
47769
+ return [].concat(options);
47770
+ var opts = {
47771
+ retries: 10,
47772
+ factor: 2,
47773
+ minTimeout: 1 * 1e3,
47774
+ maxTimeout: 1 / 0,
47775
+ randomize: !1
47776
+ };
47777
+ for (var key in options)
47778
+ opts[key] = options[key];
47779
+ if (opts.minTimeout > opts.maxTimeout)
47780
+ throw new Error("minTimeout is greater than maxTimeout");
47781
+ for (var timeouts = [], i = 0; i < opts.retries; i++)
47782
+ timeouts.push(this.createTimeout(i, opts));
47783
+ return options && options.forever && !timeouts.length && timeouts.push(this.createTimeout(i, opts)), timeouts.sort(function(a2, b) {
47784
+ return a2 - b;
47785
+ }), timeouts;
47786
+ };
47787
+ exports.createTimeout = function(attempt, opts) {
47788
+ var random = opts.randomize ? Math.random() + 1 : 1, timeout = Math.round(random * opts.minTimeout * Math.pow(opts.factor, attempt));
47789
+ return timeout = Math.min(timeout, opts.maxTimeout), timeout;
47790
+ };
47791
+ exports.wrap = function(obj, options, methods) {
47792
+ if (options instanceof Array && (methods = options, options = null), !methods) {
47793
+ methods = [];
47794
+ for (var key in obj)
47795
+ typeof obj[key] == "function" && methods.push(key);
47796
+ }
47797
+ for (var i = 0; i < methods.length; i++) {
47798
+ var method = methods[i], original = obj[method];
47799
+ obj[method] = function(original2) {
47800
+ var op = exports.operation(options), args = Array.prototype.slice.call(arguments, 1), callback = args.pop();
47801
+ args.push(function(err2) {
47802
+ op.retry(err2) || (err2 && (arguments[0] = op.mainError()), callback.apply(this, arguments));
47803
+ }), op.attempt(function() {
47804
+ original2.apply(obj, args);
47805
+ });
47806
+ }.bind(obj, original), obj[method].options = options;
47807
+ }
47808
+ };
47809
+ }
47810
+ });
47811
+
47812
+ // ../../node_modules/.pnpm/retry@0.12.0/node_modules/retry/index.js
47813
+ var require_retry2 = __commonJS({
47814
+ "../../node_modules/.pnpm/retry@0.12.0/node_modules/retry/index.js"(exports, module) {
47815
+ init_cjs_shims();
47816
+ module.exports = require_retry();
47817
+ }
47818
+ });
47819
+
47820
+ // ../../node_modules/.pnpm/proper-lockfile@4.1.2/node_modules/proper-lockfile/lib/mtime-precision.js
47821
+ var require_mtime_precision = __commonJS({
47822
+ "../../node_modules/.pnpm/proper-lockfile@4.1.2/node_modules/proper-lockfile/lib/mtime-precision.js"(exports, module) {
47823
+ "use strict";
47824
+ init_cjs_shims();
47825
+ var cacheSymbol = /* @__PURE__ */ Symbol();
47826
+ function probe(file, fs4, callback) {
47827
+ let cachedPrecision = fs4[cacheSymbol];
47828
+ if (cachedPrecision)
47829
+ return fs4.stat(file, (err2, stat) => {
47830
+ if (err2)
47831
+ return callback(err2);
47832
+ callback(null, stat.mtime, cachedPrecision);
47833
+ });
47834
+ let mtime = new Date(Math.ceil(Date.now() / 1e3) * 1e3 + 5);
47835
+ fs4.utimes(file, mtime, mtime, (err2) => {
47836
+ if (err2)
47837
+ return callback(err2);
47838
+ fs4.stat(file, (err3, stat) => {
47839
+ if (err3)
47840
+ return callback(err3);
47841
+ let precision = stat.mtime.getTime() % 1e3 === 0 ? "s" : "ms";
47842
+ Object.defineProperty(fs4, cacheSymbol, { value: precision }), callback(null, stat.mtime, precision);
47843
+ });
47844
+ });
47845
+ }
47846
+ function getMtime(precision) {
47847
+ let now = Date.now();
47848
+ return precision === "s" && (now = Math.ceil(now / 1e3) * 1e3), new Date(now);
47849
+ }
47850
+ module.exports.probe = probe;
47851
+ module.exports.getMtime = getMtime;
47852
+ }
47853
+ });
47854
+
47855
+ // ../../node_modules/.pnpm/proper-lockfile@4.1.2/node_modules/proper-lockfile/lib/lockfile.js
47856
+ var require_lockfile = __commonJS({
47857
+ "../../node_modules/.pnpm/proper-lockfile@4.1.2/node_modules/proper-lockfile/lib/lockfile.js"(exports, module) {
47858
+ "use strict";
47859
+ init_cjs_shims();
47860
+ var path = __require("path"), fs4 = require_graceful_fs(), retry = require_retry2(), onExit = require_signal_exit(), mtimePrecision = require_mtime_precision(), locks = {};
47861
+ function getLockFile(file, options) {
47862
+ return options.lockfilePath || `${file}.lock`;
47863
+ }
47864
+ function resolveCanonicalPath(file, options, callback) {
47865
+ if (!options.realpath)
47866
+ return callback(null, path.resolve(file));
47867
+ options.fs.realpath(file, callback);
47868
+ }
47869
+ function acquireLock(file, options, callback) {
47870
+ let lockfilePath = getLockFile(file, options);
47871
+ options.fs.mkdir(lockfilePath, (err2) => {
47872
+ if (!err2)
47873
+ return mtimePrecision.probe(lockfilePath, options.fs, (err3, mtime, mtimePrecision2) => {
47874
+ if (err3)
47875
+ return options.fs.rmdir(lockfilePath, () => {
47876
+ }), callback(err3);
47877
+ callback(null, mtime, mtimePrecision2);
47878
+ });
47879
+ if (err2.code !== "EEXIST")
47880
+ return callback(err2);
47881
+ if (options.stale <= 0)
47882
+ return callback(Object.assign(new Error("Lock file is already being held"), { code: "ELOCKED", file }));
47883
+ options.fs.stat(lockfilePath, (err3, stat) => {
47884
+ if (err3)
47885
+ return err3.code === "ENOENT" ? acquireLock(file, { ...options, stale: 0 }, callback) : callback(err3);
47886
+ if (!isLockStale(stat, options))
47887
+ return callback(Object.assign(new Error("Lock file is already being held"), { code: "ELOCKED", file }));
47888
+ removeLock(file, options, (err4) => {
47889
+ if (err4)
47890
+ return callback(err4);
47891
+ acquireLock(file, { ...options, stale: 0 }, callback);
47892
+ });
47893
+ });
47894
+ });
47895
+ }
47896
+ function isLockStale(stat, options) {
47897
+ return stat.mtime.getTime() < Date.now() - options.stale;
47898
+ }
47899
+ function removeLock(file, options, callback) {
47900
+ options.fs.rmdir(getLockFile(file, options), (err2) => {
47901
+ if (err2 && err2.code !== "ENOENT")
47902
+ return callback(err2);
47903
+ callback();
47904
+ });
47905
+ }
47906
+ function updateLock(file, options) {
47907
+ let lock2 = locks[file];
47908
+ lock2.updateTimeout || (lock2.updateDelay = lock2.updateDelay || options.update, lock2.updateTimeout = setTimeout(() => {
47909
+ lock2.updateTimeout = null, options.fs.stat(lock2.lockfilePath, (err2, stat) => {
47910
+ let isOverThreshold = lock2.lastUpdate + options.stale < Date.now();
47911
+ if (err2)
47912
+ return err2.code === "ENOENT" || isOverThreshold ? setLockAsCompromised(file, lock2, Object.assign(err2, { code: "ECOMPROMISED" })) : (lock2.updateDelay = 1e3, updateLock(file, options));
47913
+ if (!(lock2.mtime.getTime() === stat.mtime.getTime()))
47914
+ return setLockAsCompromised(
47915
+ file,
47916
+ lock2,
47917
+ Object.assign(
47918
+ new Error("Unable to update lock within the stale threshold"),
47919
+ { code: "ECOMPROMISED" }
47920
+ )
47921
+ );
47922
+ let mtime = mtimePrecision.getMtime(lock2.mtimePrecision);
47923
+ options.fs.utimes(lock2.lockfilePath, mtime, mtime, (err3) => {
47924
+ let isOverThreshold2 = lock2.lastUpdate + options.stale < Date.now();
47925
+ if (!lock2.released) {
47926
+ if (err3)
47927
+ return err3.code === "ENOENT" || isOverThreshold2 ? setLockAsCompromised(file, lock2, Object.assign(err3, { code: "ECOMPROMISED" })) : (lock2.updateDelay = 1e3, updateLock(file, options));
47928
+ lock2.mtime = mtime, lock2.lastUpdate = Date.now(), lock2.updateDelay = null, updateLock(file, options);
47929
+ }
47930
+ });
47931
+ });
47932
+ }, lock2.updateDelay), lock2.updateTimeout.unref && lock2.updateTimeout.unref());
47933
+ }
47934
+ function setLockAsCompromised(file, lock2, err2) {
47935
+ lock2.released = !0, lock2.updateTimeout && clearTimeout(lock2.updateTimeout), locks[file] === lock2 && delete locks[file], lock2.options.onCompromised(err2);
47936
+ }
47937
+ function lock(file, options, callback) {
47938
+ options = {
47939
+ stale: 1e4,
47940
+ update: null,
47941
+ realpath: !0,
47942
+ retries: 0,
47943
+ fs: fs4,
47944
+ onCompromised: (err2) => {
47945
+ throw err2;
47946
+ },
47947
+ ...options
47948
+ }, options.retries = options.retries || 0, options.retries = typeof options.retries == "number" ? { retries: options.retries } : options.retries, options.stale = Math.max(options.stale || 0, 2e3), options.update = options.update == null ? options.stale / 2 : options.update || 0, options.update = Math.max(Math.min(options.update, options.stale / 2), 1e3), resolveCanonicalPath(file, options, (err2, file2) => {
47949
+ if (err2)
47950
+ return callback(err2);
47951
+ let operation = retry.operation(options.retries);
47952
+ operation.attempt(() => {
47953
+ acquireLock(file2, options, (err3, mtime, mtimePrecision2) => {
47954
+ if (operation.retry(err3))
47955
+ return;
47956
+ if (err3)
47957
+ return callback(operation.mainError());
47958
+ let lock2 = locks[file2] = {
47959
+ lockfilePath: getLockFile(file2, options),
47960
+ mtime,
47961
+ mtimePrecision: mtimePrecision2,
47962
+ options,
47963
+ lastUpdate: Date.now()
47964
+ };
47965
+ updateLock(file2, options), callback(null, (releasedCallback) => {
47966
+ if (lock2.released)
47967
+ return releasedCallback && releasedCallback(Object.assign(new Error("Lock is already released"), { code: "ERELEASED" }));
47968
+ unlock(file2, { ...options, realpath: !1 }, releasedCallback);
47969
+ });
47970
+ });
47971
+ });
47972
+ });
47973
+ }
47974
+ function unlock(file, options, callback) {
47975
+ options = {
47976
+ fs: fs4,
47977
+ realpath: !0,
47978
+ ...options
47979
+ }, resolveCanonicalPath(file, options, (err2, file2) => {
47980
+ if (err2)
47981
+ return callback(err2);
47982
+ let lock2 = locks[file2];
47983
+ if (!lock2)
47984
+ return callback(Object.assign(new Error("Lock is not acquired/owned by you"), { code: "ENOTACQUIRED" }));
47985
+ lock2.updateTimeout && clearTimeout(lock2.updateTimeout), lock2.released = !0, delete locks[file2], removeLock(file2, options, callback);
47986
+ });
47987
+ }
47988
+ function check2(file, options, callback) {
47989
+ options = {
47990
+ stale: 1e4,
47991
+ realpath: !0,
47992
+ fs: fs4,
47993
+ ...options
47994
+ }, options.stale = Math.max(options.stale || 0, 2e3), resolveCanonicalPath(file, options, (err2, file2) => {
47995
+ if (err2)
47996
+ return callback(err2);
47997
+ options.fs.stat(getLockFile(file2, options), (err3, stat) => err3 ? err3.code === "ENOENT" ? callback(null, !1) : callback(err3) : callback(null, !isLockStale(stat, options)));
47998
+ });
47999
+ }
48000
+ function getLocks() {
48001
+ return locks;
48002
+ }
48003
+ onExit(() => {
48004
+ for (let file in locks) {
48005
+ let options = locks[file].options;
48006
+ try {
48007
+ options.fs.rmdirSync(getLockFile(file, options));
48008
+ } catch {
48009
+ }
48010
+ }
48011
+ });
48012
+ module.exports.lock = lock;
48013
+ module.exports.unlock = unlock;
48014
+ module.exports.check = check2;
48015
+ module.exports.getLocks = getLocks;
48016
+ }
48017
+ });
48018
+
48019
+ // ../../node_modules/.pnpm/proper-lockfile@4.1.2/node_modules/proper-lockfile/lib/adapter.js
48020
+ var require_adapter = __commonJS({
48021
+ "../../node_modules/.pnpm/proper-lockfile@4.1.2/node_modules/proper-lockfile/lib/adapter.js"(exports, module) {
48022
+ "use strict";
48023
+ init_cjs_shims();
48024
+ var fs4 = require_graceful_fs();
48025
+ function createSyncFs(fs5) {
48026
+ let methods = ["mkdir", "realpath", "stat", "rmdir", "utimes"], newFs = { ...fs5 };
48027
+ return methods.forEach((method) => {
48028
+ newFs[method] = (...args) => {
48029
+ let callback = args.pop(), ret;
48030
+ try {
48031
+ ret = fs5[`${method}Sync`](...args);
48032
+ } catch (err2) {
48033
+ return callback(err2);
48034
+ }
48035
+ callback(null, ret);
48036
+ };
48037
+ }), newFs;
48038
+ }
48039
+ function toPromise(method) {
48040
+ return (...args) => new Promise((resolve, reject) => {
48041
+ args.push((err2, result) => {
48042
+ err2 ? reject(err2) : resolve(result);
48043
+ }), method(...args);
48044
+ });
48045
+ }
48046
+ function toSync(method) {
48047
+ return (...args) => {
48048
+ let err2, result;
48049
+ if (args.push((_err, _result) => {
48050
+ err2 = _err, result = _result;
48051
+ }), method(...args), err2)
48052
+ throw err2;
48053
+ return result;
48054
+ };
48055
+ }
48056
+ function toSyncOptions(options) {
48057
+ if (options = { ...options }, options.fs = createSyncFs(options.fs || fs4), typeof options.retries == "number" && options.retries > 0 || options.retries && typeof options.retries.retries == "number" && options.retries.retries > 0)
48058
+ throw Object.assign(new Error("Cannot use retries with the sync api"), { code: "ESYNC" });
48059
+ return options;
48060
+ }
48061
+ module.exports = {
48062
+ toPromise,
48063
+ toSync,
48064
+ toSyncOptions
48065
+ };
48066
+ }
48067
+ });
48068
+
48069
+ // ../../node_modules/.pnpm/proper-lockfile@4.1.2/node_modules/proper-lockfile/index.js
48070
+ var require_proper_lockfile = __commonJS({
48071
+ "../../node_modules/.pnpm/proper-lockfile@4.1.2/node_modules/proper-lockfile/index.js"(exports, module) {
48072
+ "use strict";
48073
+ init_cjs_shims();
48074
+ var lockfile2 = require_lockfile(), { toPromise, toSync, toSyncOptions } = require_adapter();
48075
+ async function lock(file, options) {
48076
+ let release2 = await toPromise(lockfile2.lock)(file, options);
48077
+ return toPromise(release2);
48078
+ }
48079
+ function lockSync(file, options) {
48080
+ let release2 = toSync(lockfile2.lock)(file, toSyncOptions(options));
48081
+ return toSync(release2);
48082
+ }
48083
+ function unlock(file, options) {
48084
+ return toPromise(lockfile2.unlock)(file, options);
48085
+ }
48086
+ function unlockSync(file, options) {
48087
+ return toSync(lockfile2.unlock)(file, toSyncOptions(options));
48088
+ }
48089
+ function check2(file, options) {
48090
+ return toPromise(lockfile2.check)(file, options);
48091
+ }
48092
+ function checkSync(file, options) {
48093
+ return toSync(lockfile2.check)(file, toSyncOptions(options));
48094
+ }
48095
+ module.exports = lock;
48096
+ module.exports.lock = lock;
48097
+ module.exports.unlock = unlock;
48098
+ module.exports.lockSync = lockSync;
48099
+ module.exports.unlockSync = unlockSync;
48100
+ module.exports.check = check2;
48101
+ module.exports.checkSync = checkSync;
48102
+ }
48103
+ });
48104
+
48105
48105
  // ../../node_modules/.pnpm/dotenv@16.6.1/node_modules/dotenv/package.json
48106
48106
  var require_package = __commonJS({
48107
48107
  "../../node_modules/.pnpm/dotenv@16.6.1/node_modules/dotenv/package.json"(exports, module) {
@@ -53860,7 +53860,7 @@ var require_prettier = __commonJS({
53860
53860
  "src/main/version.evaluate.js"() {
53861
53861
  version_evaluate_default = "3.8.4";
53862
53862
  }
53863
- }), prettierPromise = import("./prettier-3LMT6EEA.js"), functionNames = [
53863
+ }), prettierPromise = import("./prettier-SS3RRDXK.js"), functionNames = [
53864
53864
  "formatWithCursor",
53865
53865
  "format",
53866
53866
  "check",
@@ -87630,7 +87630,7 @@ var l10n7, CSSIssueType, ParseError, init_cssErrors = __esm({
87630
87630
  "../../node_modules/.pnpm/vscode-css-languageservice@6.3.2/node_modules/vscode-css-languageservice/lib/umd/parser/cssErrors.js"() {
87631
87631
  "use strict";
87632
87632
  init_cjs_shims();
87633
- l10n7 = __toESM(require_main2()), CSSIssueType = class {
87633
+ l10n7 = __toESM(require_main()), CSSIssueType = class {
87634
87634
  constructor(id, message) {
87635
87635
  this.id = id, this.message = message;
87636
87636
  }
@@ -87980,7 +87980,7 @@ var l10n8, hexColorRegExp, colorFunctions, colorFunctionNameRegExp, colors, colo
87980
87980
  "../../node_modules/.pnpm/vscode-css-languageservice@6.3.2/node_modules/vscode-css-languageservice/lib/umd/languageFacts/colors.js"() {
87981
87981
  init_cjs_shims();
87982
87982
  init_cssNodes();
87983
- l10n8 = __toESM(require_main2()), hexColorRegExp = /(^#([0-9A-F]{3}){1,2}$)|(^#([0-9A-F]{4}){1,2}$)/i, colorFunctions = [
87983
+ l10n8 = __toESM(require_main()), hexColorRegExp = /(^#([0-9A-F]{3}){1,2}$)|(^#([0-9A-F]{4}){1,2}$)/i, colorFunctions = [
87984
87984
  {
87985
87985
  label: "rgb",
87986
87986
  func: "rgb($red, $green, $blue)",
@@ -89956,7 +89956,7 @@ var l10n9, SnippetFormat, retriggerCommand, SortTexts, CSSCompletion, Set2, Colo
89956
89956
  init_facts();
89957
89957
  init_strings2();
89958
89958
  init_cssLanguageTypes();
89959
- l10n9 = __toESM(require_main2());
89959
+ l10n9 = __toESM(require_main());
89960
89960
  init_objects2();
89961
89961
  init_pathCompletion();
89962
89962
  SnippetFormat = InsertTextFormat.Snippet, retriggerCommand = {
@@ -90769,7 +90769,7 @@ var l10n10, Element2, RootElement, LabelElement, MarkedStringPrinter, quotes, Sp
90769
90769
  init_cjs_shims();
90770
90770
  init_cssNodes();
90771
90771
  init_cssScanner();
90772
- l10n10 = __toESM(require_main2());
90772
+ l10n10 = __toESM(require_main());
90773
90773
  init_cssParser();
90774
90774
  Element2 = class _Element {
90775
90775
  constructor() {
@@ -91193,7 +91193,7 @@ var l10n11, startsWithSchemeRegex, startsWithData, CSSNavigation, init_cssNaviga
91193
91193
  "use strict";
91194
91194
  init_cjs_shims();
91195
91195
  init_cssLanguageTypes();
91196
- l10n11 = __toESM(require_main2());
91196
+ l10n11 = __toESM(require_main());
91197
91197
  init_cssNodes();
91198
91198
  init_cssSymbolScope();
91199
91199
  init_facts();
@@ -91473,7 +91473,7 @@ var l10n12, Warning, Error2, Ignore, Rule, Setting, Rules, Settings, LintConfigu
91473
91473
  "use strict";
91474
91474
  init_cjs_shims();
91475
91475
  init_cssNodes();
91476
- l10n12 = __toESM(require_main2()), Warning = Level.Warning, Error2 = Level.Error, Ignore = Level.Ignore, Rule = class {
91476
+ l10n12 = __toESM(require_main()), Warning = Level.Warning, Error2 = Level.Error, Ignore = Level.Ignore, Rule = class {
91477
91477
  constructor(id, message, defaultValue) {
91478
91478
  this.id = id, this.message = message, this.defaultValue = defaultValue;
91479
91479
  }
@@ -91531,7 +91531,7 @@ var l10n13, CSSCodeActions, init_cssCodeActions = __esm({
91531
91531
  init_strings2();
91532
91532
  init_lintRules();
91533
91533
  init_cssLanguageTypes();
91534
- l10n13 = __toESM(require_main2()), CSSCodeActions = class {
91534
+ l10n13 = __toESM(require_main()), CSSCodeActions = class {
91535
91535
  constructor(cssDataManager) {
91536
91536
  this.cssDataManager = cssDataManager;
91537
91537
  }
@@ -91727,7 +91727,7 @@ var l10n14, NodesByRootMap, LintVisitor, init_lint = __esm({
91727
91727
  "../../node_modules/.pnpm/vscode-css-languageservice@6.3.2/node_modules/vscode-css-languageservice/lib/umd/services/lint.js"() {
91728
91728
  "use strict";
91729
91729
  init_cjs_shims();
91730
- l10n14 = __toESM(require_main2());
91730
+ l10n14 = __toESM(require_main());
91731
91731
  init_facts();
91732
91732
  init_cssNodes();
91733
91733
  init_arrays();
@@ -92154,7 +92154,7 @@ var l10n15, SCSSIssueType, SCSSParseError, init_scssErrors = __esm({
92154
92154
  "../../node_modules/.pnpm/vscode-css-languageservice@6.3.2/node_modules/vscode-css-languageservice/lib/umd/parser/scssErrors.js"() {
92155
92155
  "use strict";
92156
92156
  init_cjs_shims();
92157
- l10n15 = __toESM(require_main2()), SCSSIssueType = class {
92157
+ l10n15 = __toESM(require_main()), SCSSIssueType = class {
92158
92158
  constructor(id, message) {
92159
92159
  this.id = id, this.message = message;
92160
92160
  }
@@ -92625,7 +92625,7 @@ var l10n16, sassDocumentationName, SCSSCompletion, init_scssCompletion = __esm({
92625
92625
  init_cssCompletion();
92626
92626
  init_cssNodes();
92627
92627
  init_cssLanguageTypes();
92628
- l10n16 = __toESM(require_main2()), sassDocumentationName = l10n16.t("Sass documentation"), SCSSCompletion = class _SCSSCompletion extends CSSCompletion {
92628
+ l10n16 = __toESM(require_main()), sassDocumentationName = l10n16.t("Sass documentation"), SCSSCompletion = class _SCSSCompletion extends CSSCompletion {
92629
92629
  constructor(lsServiceOptions, cssDataManager) {
92630
92630
  super("$", lsServiceOptions, cssDataManager), addReferencesToDocumentation(_SCSSCompletion.scssModuleLoaders), addReferencesToDocumentation(_SCSSCompletion.scssModuleBuiltIns);
92631
92631
  }
@@ -93322,7 +93322,7 @@ var l10n17, LESSCompletion, init_lessCompletion = __esm({
93322
93322
  init_cjs_shims();
93323
93323
  init_cssCompletion();
93324
93324
  init_cssLanguageTypes();
93325
- l10n17 = __toESM(require_main2()), LESSCompletion = class _LESSCompletion extends CSSCompletion {
93325
+ l10n17 = __toESM(require_main()), LESSCompletion = class _LESSCompletion extends CSSCompletion {
93326
93326
  constructor(lsOptions, cssDataManager) {
93327
93327
  super("@", lsOptions, cssDataManager);
93328
93328
  }
@@ -193106,297 +193106,6 @@ var metadata = createRuntimeMetadataContainer({
193106
193106
  // ../app/dist/cli/models/extensions/extension-instance.js
193107
193107
  init_cjs_shims();
193108
193108
 
193109
- // ../app/dist/cli/services/build/extension.js
193110
- init_cjs_shims();
193111
-
193112
- // ../app/dist/cli/services/build/bundle-size.js
193113
- init_cjs_shims();
193114
- import { deflate } from "node:zlib";
193115
- import { promisify } from "node:util";
193116
- var deflateAsync = promisify(deflate);
193117
- async function getBundleSize(filePath) {
193118
- let content = await readFile(filePath), rawBytes = Buffer.byteLength(content), compressedBytes = (await deflateAsync(Buffer.from(content))).byteLength;
193119
- return { path: filePath, rawBytes, compressedBytes };
193120
- }
193121
- function formatSize(bytes) {
193122
- return bytes >= 1024 * 1024 ? `${(bytes / (1024 * 1024)).toFixed(2)} MB` : `${(bytes / 1024).toFixed(1)} KB`;
193123
- }
193124
- async function formatBundleSize(filePath) {
193125
- try {
193126
- let { rawBytes, compressedBytes } = await getBundleSize(filePath);
193127
- return ` (${formatSize(rawBytes)} original, ~${formatSize(compressedBytes)} compressed)`;
193128
- } catch (error) {
193129
- return outputDebug(`Failed to get bundle size for ${filePath}: ${error}`), "";
193130
- }
193131
- }
193132
-
193133
- // ../app/dist/cli/services/extensions/bundle.js
193134
- init_cjs_shims();
193135
-
193136
- // ../app/dist/cli/utilities/extensions/theme.js
193137
- init_cjs_shims();
193138
- import { createInterface } from "readline";
193139
- var ignoredFilePatterns = [
193140
- ".git",
193141
- ".hg",
193142
- ".bzr",
193143
- ".svn",
193144
- "_darcs",
193145
- "CVS",
193146
- ".sublime-(project|workspace)",
193147
- ".DS_Store",
193148
- ".sass-cache",
193149
- "Thumbs.db",
193150
- "desktop.ini",
193151
- "config.yml",
193152
- "node_modules",
193153
- ".gitkeep",
193154
- ".shopifyignore",
193155
- "*.toml"
193156
- ];
193157
- async function themeExtensionFiles(themeExtension) {
193158
- let filepath = joinPath(themeExtension.directory, ".shopifyignore"), ignore4 = ignoredFilePatterns.map((pattern) => joinPath("*", pattern));
193159
- if (fileExistsSync(filepath)) {
193160
- let patterns = await parseIgnoreFile(filepath);
193161
- ignore4.push(...patterns);
193162
- }
193163
- return glob("*/*", {
193164
- absolute: !0,
193165
- cwd: themeExtension.directory,
193166
- ignore: ignore4
193167
- });
193168
- }
193169
- function parseIgnoreFile(filepath) {
193170
- return new Promise((resolve, reject) => {
193171
- let patterns = [], readLineInterface = createInterface({
193172
- input: createFileReadStream(filepath),
193173
- crlfDelay: 1 / 0
193174
- });
193175
- readLineInterface.on("line", (line) => {
193176
- let trimmedLine = line.trim();
193177
- trimmedLine.length > 0 && !trimmedLine.startsWith("#") && patterns.push(trimmedLine);
193178
- }), readLineInterface.on("close", () => {
193179
- resolve(patterns);
193180
- }), readLineInterface.on("error", (error) => {
193181
- reject(error);
193182
- });
193183
- });
193184
- }
193185
-
193186
- // ../app/dist/cli/services/extensions/bundle.js
193187
- import { context as esContext, formatMessagesSync } from "esbuild";
193188
- var import_esbuild_graphql_loader = __toESM(require_lib5(), 1);
193189
- async function bundleExtension2(options, processEnv = process.env) {
193190
- let esbuildOptions = getESBuildOptions2(options, processEnv), context = await esContext(esbuildOptions), result = await context.rebuild();
193191
- onResult(result, options), await writeMetafile(result, options.outputPath), await context.dispose();
193192
- }
193193
- async function bundleThemeExtension(extension, options) {
193194
- options.stdout.write(`Bundling theme extension ${extension.localIdentifier}...`);
193195
- let files = await themeExtensionFiles(extension);
193196
- await Promise.all(files.map(function(filepath) {
193197
- let relativePathName = relativePath(extension.directory, filepath), outputFile = joinPath(extension.outputPath, relativePathName);
193198
- if (filepath !== outputFile)
193199
- return copyFile(filepath, outputFile);
193200
- }));
193201
- }
193202
- async function writeMetafile(result, outputPath) {
193203
- if (!result?.metafile)
193204
- return;
193205
- let { dir, name } = parsePath(outputPath), metafilePath = joinPath(dir, `${name}.metafile.json`);
193206
- try {
193207
- await writeFile(metafilePath, JSON.stringify(result.metafile));
193208
- } catch (error) {
193209
- outputWarn(`Failed to write metafile to ${metafilePath}: ${error}`);
193210
- }
193211
- }
193212
- function onResult(result, options) {
193213
- let warnings = result?.warnings ?? [], errors = result?.errors ?? [];
193214
- warnings.length > 0 && formatMessagesSync(warnings, { kind: "warning" }).forEach((warning) => {
193215
- options.stdout.write(warning);
193216
- }), errors.length > 0 && formatMessagesSync(errors, { kind: "error" }).forEach((error) => {
193217
- options.stderr.write(error);
193218
- });
193219
- }
193220
- function getESBuildOptions2(options, processEnv = process.env) {
193221
- let validEnvs = pickBy(processEnv, (value, key) => EsbuildEnvVarRegex.test(key) && value), env = { ...options.env, ...validEnvs }, define2 = Object.keys(env || {}).reduce((acc, key) => ({
193222
- ...acc,
193223
- [`process.env.${key}`]: JSON.stringify(env[key])
193224
- }), { "process.env.NODE_ENV": JSON.stringify(options.environment) }), esbuildOptions = {
193225
- outfile: options.outputPath,
193226
- stdin: options.stdin,
193227
- bundle: !0,
193228
- define: define2,
193229
- jsx: "automatic",
193230
- logLevel: options.logLevel ?? "error",
193231
- loader: {
193232
- ".esnext": "ts",
193233
- ".js": "jsx"
193234
- },
193235
- legalComments: "none",
193236
- minify: options.minify,
193237
- plugins: getPlugins(options.stdin.resolveDir, processEnv),
193238
- target: "es6",
193239
- resolveExtensions: [".tsx", ".ts", ".js", ".json", ".esnext", ".mjs", ".ejs"]
193240
- };
193241
- if (options.sourceMaps && (esbuildOptions.sourcemap = !0, esbuildOptions.sourceRoot = `${options.stdin.resolveDir}/src`), options.environment === "production" && (esbuildOptions.metafile = !0), options.environment === "development") {
193242
- let disableMinificationOnDev = env[environmentVariableNames.disableMinificationOnDev];
193243
- esbuildOptions.minify = !isTruthy(disableMinificationOnDev), esbuildOptions.logLevel = "silent";
193244
- }
193245
- return esbuildOptions;
193246
- }
193247
- function getPlugins(resolveDir, processEnv = process.env) {
193248
- let plugins = [import_esbuild_graphql_loader.default.default()], skipReactDeduplication = isTruthy(processEnv[environmentVariableNames.skipEsbuildReactDedeuplication]);
193249
- if (resolveDir && !skipReactDeduplication) {
193250
- let resolvedReactPath;
193251
- try {
193252
- resolvedReactPath = __require.resolve("react", { paths: [resolveDir] });
193253
- } catch {
193254
- outputDebug(`Unable to load React in ${resolveDir}, skipping React de-duplication`);
193255
- }
193256
- resolvedReactPath && (outputDebug(`Deduplicating React dependency for ${resolveDir}, using ${resolvedReactPath}`), plugins.push(deduplicateReactPlugin(resolvedReactPath)));
193257
- }
193258
- return plugins;
193259
- }
193260
- function deduplicateReactPlugin(resolvedReactPath) {
193261
- return {
193262
- name: "shopify:deduplicate-react",
193263
- setup({ onResolve }) {
193264
- onResolve({ filter: /^react$/ }, (_args) => ({
193265
- path: resolvedReactPath
193266
- }));
193267
- }
193268
- };
193269
- }
193270
-
193271
- // ../app/dist/cli/services/function/schema-version.js
193272
- init_cjs_shims();
193273
- var SCHEMA_VERSION_MARKER_PREFIX = "# api_version: ";
193274
- function prependSchemaVersionHeader(definition, apiVersion) {
193275
- return `${SCHEMA_VERSION_MARKER_PREFIX}${apiVersion}
193276
-
193277
- ${definition}`;
193278
- }
193279
- async function readSchemaApiVersion(filePath) {
193280
- if (!await fileExists(filePath)) {
193281
- outputDebug(`Could not determine api_version: schema file not found at ${filePath}.`);
193282
- return;
193283
- }
193284
- let firstLine = (await readFile(filePath)).split(`
193285
- `, 1)[0];
193286
- if (firstLine.startsWith(SCHEMA_VERSION_MARKER_PREFIX))
193287
- return firstLine.slice(SCHEMA_VERSION_MARKER_PREFIX.length).trim();
193288
- outputDebug(`Could not determine api_version from ${filePath}: missing '${SCHEMA_VERSION_MARKER_PREFIX}' marker on the first line.`);
193289
- }
193290
- async function validateSchemaApiVersion({ directory, localIdentifier, apiVersion }) {
193291
- let schemaPath = joinPath(directory, "schema.graphql"), versionFromSchema = await readSchemaApiVersion(schemaPath);
193292
- if (versionFromSchema !== void 0 && versionFromSchema !== apiVersion)
193293
- throw new AbortError(outputContent`The ${outputToken.cyan("schema.graphql")} file for ${outputToken.cyan(localIdentifier)} was generated for api_version ${outputToken.yellow(versionFromSchema)} but your function is now on api_version ${outputToken.yellow(apiVersion)}.`, outputContent`Run ${outputToken.genericShellCommand("shopify app function schema")} to refresh it.`);
193294
- }
193295
-
193296
- // ../app/dist/cli/services/build/extension.js
193297
- var import_proper_lockfile = __toESM(require_proper_lockfile(), 1);
193298
- async function buildUIExtension(extension, options) {
193299
- options.stdout.write(`Bundling UI extension ${extension.localIdentifier}...`);
193300
- let env = options.app.dotenv?.variables ?? {};
193301
- options.appURL && (env.APP_URL = options.appURL);
193302
- let buildDirectory = options.buildDirectory ?? "", localOutputPath = joinPath(extension.directory, buildDirectory, extension.outputRelativePath), { main, assets } = extension.getBundleExtensionStdinContent(), startTime = performance.now();
193303
- try {
193304
- await bundleExtension2({
193305
- minify: !0,
193306
- outputPath: localOutputPath,
193307
- stdin: {
193308
- contents: main,
193309
- resolveDir: extension.directory,
193310
- loader: "tsx"
193311
- },
193312
- environment: options.environment,
193313
- env,
193314
- stderr: options.stderr,
193315
- stdout: options.stdout,
193316
- sourceMaps: extension.isSourceMapGeneratingExtension
193317
- }), assets && await Promise.all(assets.map(async (asset) => {
193318
- await bundleExtension2({
193319
- minify: !0,
193320
- outputPath: joinPath(dirname(localOutputPath), asset.outputFileName),
193321
- stdin: {
193322
- contents: asset.content,
193323
- resolveDir: extension.directory,
193324
- loader: "tsx"
193325
- },
193326
- environment: options.environment,
193327
- env,
193328
- stderr: options.stderr,
193329
- stdout: options.stdout
193330
- });
193331
- }));
193332
- } catch (extensionBundlingError) {
193333
- let errorMessage = extensionBundlingError.message ?? "Unknown error occurred", newError = new AbortError(`Failed to bundle extension ${extension.localIdentifier}. Please check the extension source code for errors.`, errorMessage);
193334
- throw newError.errors = extensionBundlingError.errors, newError;
193335
- }
193336
- await extension.buildValidation({ outputPath: localOutputPath });
193337
- let duration = Math.round(performance.now() - startTime), sizeInfo = await formatBundleSize(localOutputPath);
193338
- return options.stdout.write(`${extension.localIdentifier} successfully built in ${duration}ms${sizeInfo}`), localOutputPath;
193339
- }
193340
- async function buildFunctionExtension(extension, options) {
193341
- let lockfilePath = joinPath(extension.directory, ".build-lock"), releaseLock;
193342
- try {
193343
- releaseLock = await import_proper_lockfile.default.lock(extension.directory, { retries: 20, lockfilePath });
193344
- } catch (error) {
193345
- throw outputDebug(`Failed to acquire function build lock: ${error.message}`), new AbortError("Failed to build function.", "This is likely due to another in-progress build.", [
193346
- "Ensure there are no other function builds in-progress.",
193347
- "Delete the `.build-lock` file in your function directory."
193348
- ]);
193349
- }
193350
- try {
193351
- let functionConfiguration = extension.configuration, bundlePath = extension.outputPath, relativeBuildPath = functionConfiguration.build?.path ?? extension.outputRelativePath;
193352
- extension.outputPath = joinPath(extension.directory, relativeBuildPath), await validateSchemaApiVersion({
193353
- directory: extension.directory,
193354
- localIdentifier: extension.localIdentifier,
193355
- apiVersion: functionConfiguration.api_version
193356
- }), extension.isJavaScript ? await runCommandOrBuildJSFunction(extension, options) : await buildOtherFunction(extension, options);
193357
- let wasmOpt = extension.configuration.build?.wasm_opt;
193358
- fileExistsSync(extension.outputPath) && wasmOpt && await runWasmOpt(extension.outputPath), fileExistsSync(extension.outputPath) && await runTrampoline(extension.outputPath);
193359
- let projectOutputPath = joinPath(extension.directory, extension.outputRelativePath);
193360
- fileExistsSync(extension.outputPath) && bundlePath !== extension.outputPath && bundlePath !== projectOutputPath && dirname(bundlePath) !== dirname(extension.outputPath) && await bundleFunctionExtension(extension.outputPath, bundlePath);
193361
- } catch (error) {
193362
- if (error instanceof AbortError)
193363
- throw error;
193364
- let errorMessage = error.message ?? "Unknown error occurred", newError = new AbortError("Failed to build function.", errorMessage);
193365
- throw newError.errors = error.errors, newError;
193366
- } finally {
193367
- await releaseLock();
193368
- }
193369
- }
193370
- async function bundleFunctionExtension(wasmPath, bundlePath) {
193371
- outputDebug(`Converting WASM from ${wasmPath} to base64 in ${bundlePath}`);
193372
- let base64Contents = await readFile(wasmPath, { encoding: "base64" });
193373
- await touchFile(bundlePath), await writeFile(bundlePath, base64Contents);
193374
- }
193375
- async function runCommandOrBuildJSFunction(extension, options) {
193376
- return extension.buildCommand ? (extension.typegenCommand && await buildGraphqlTypes(extension, options), runCommand(extension.buildCommand, extension, options)) : buildJSFunction(extension, options);
193377
- }
193378
- async function buildOtherFunction(extension, options) {
193379
- if (!extension.buildCommand)
193380
- throw options.stderr.write(`The function extension ${extension.localIdentifier} doesn't have a build command or it's empty`), options.stderr.write(`
193381
- Edit the shopify.function.extension.toml configuration file and set how to build the extension.
193382
-
193383
- [build]
193384
- command = "{COMMAND}"
193385
-
193386
- Note that the command must output a dist/index.wasm file.
193387
- `), new AbortSilentError();
193388
- return extension.typegenCommand && await buildGraphqlTypes(extension, options), runCommand(extension.buildCommand, extension, options);
193389
- }
193390
- async function runCommand(buildCommand, extension, options) {
193391
- let buildCommandComponents = buildCommand.split(" ");
193392
- options.stdout.write(`Building function ${extension.localIdentifier}...`), await exec(buildCommandComponents[0], buildCommandComponents.slice(1), {
193393
- stdout: options.stdout,
193394
- stderr: options.stderr,
193395
- cwd: extension.directory,
193396
- signal: options.signal
193397
- });
193398
- }
193399
-
193400
193109
  // ../app/dist/cli/services/build/client-steps.js
193401
193110
  init_cjs_shims();
193402
193111
 
@@ -193783,6 +193492,58 @@ async function executeBuildThemeStep(_step, context) {
193783
193492
 
193784
193493
  // ../app/dist/cli/services/build/steps/bundle-theme-step.js
193785
193494
  init_cjs_shims();
193495
+
193496
+ // ../app/dist/cli/utilities/extensions/theme.js
193497
+ init_cjs_shims();
193498
+ import { createInterface } from "readline";
193499
+ var ignoredFilePatterns = [
193500
+ ".git",
193501
+ ".hg",
193502
+ ".bzr",
193503
+ ".svn",
193504
+ "_darcs",
193505
+ "CVS",
193506
+ ".sublime-(project|workspace)",
193507
+ ".DS_Store",
193508
+ ".sass-cache",
193509
+ "Thumbs.db",
193510
+ "desktop.ini",
193511
+ "config.yml",
193512
+ "node_modules",
193513
+ ".gitkeep",
193514
+ ".shopifyignore",
193515
+ "*.toml"
193516
+ ];
193517
+ async function themeExtensionFiles(themeExtension) {
193518
+ let filepath = joinPath(themeExtension.directory, ".shopifyignore"), ignore4 = ignoredFilePatterns.map((pattern) => joinPath("*", pattern));
193519
+ if (fileExistsSync(filepath)) {
193520
+ let patterns = await parseIgnoreFile(filepath);
193521
+ ignore4.push(...patterns);
193522
+ }
193523
+ return glob("*/*", {
193524
+ absolute: !0,
193525
+ cwd: themeExtension.directory,
193526
+ ignore: ignore4
193527
+ });
193528
+ }
193529
+ function parseIgnoreFile(filepath) {
193530
+ return new Promise((resolve, reject) => {
193531
+ let patterns = [], readLineInterface = createInterface({
193532
+ input: createFileReadStream(filepath),
193533
+ crlfDelay: 1 / 0
193534
+ });
193535
+ readLineInterface.on("line", (line) => {
193536
+ let trimmedLine = line.trim();
193537
+ trimmedLine.length > 0 && !trimmedLine.startsWith("#") && patterns.push(trimmedLine);
193538
+ }), readLineInterface.on("close", () => {
193539
+ resolve(patterns);
193540
+ }), readLineInterface.on("error", (error) => {
193541
+ reject(error);
193542
+ });
193543
+ });
193544
+ }
193545
+
193546
+ // ../app/dist/cli/services/build/steps/bundle-theme-step.js
193786
193547
  async function executeBundleThemeStep(_step, context) {
193787
193548
  let { extension, options } = context;
193788
193549
  options.stdout.write(`Bundling theme extension ${extension.localIdentifier}...`);
@@ -193795,6 +193556,241 @@ async function executeBundleThemeStep(_step, context) {
193795
193556
 
193796
193557
  // ../app/dist/cli/services/build/steps/bundle-ui-step.js
193797
193558
  init_cjs_shims();
193559
+
193560
+ // ../app/dist/cli/services/build/extension.js
193561
+ init_cjs_shims();
193562
+
193563
+ // ../app/dist/cli/services/build/bundle-size.js
193564
+ init_cjs_shims();
193565
+ import { deflate } from "node:zlib";
193566
+ import { promisify } from "node:util";
193567
+ var deflateAsync = promisify(deflate);
193568
+ async function getBundleSize(filePath) {
193569
+ let content = await readFile(filePath), rawBytes = Buffer.byteLength(content), compressedBytes = (await deflateAsync(Buffer.from(content))).byteLength;
193570
+ return { path: filePath, rawBytes, compressedBytes };
193571
+ }
193572
+ function formatSize(bytes) {
193573
+ return bytes >= 1024 * 1024 ? `${(bytes / (1024 * 1024)).toFixed(2)} MB` : `${(bytes / 1024).toFixed(1)} KB`;
193574
+ }
193575
+ async function formatBundleSize(filePath) {
193576
+ try {
193577
+ let { rawBytes, compressedBytes } = await getBundleSize(filePath);
193578
+ return ` (${formatSize(rawBytes)} original, ~${formatSize(compressedBytes)} compressed)`;
193579
+ } catch (error) {
193580
+ return outputDebug(`Failed to get bundle size for ${filePath}: ${error}`), "";
193581
+ }
193582
+ }
193583
+
193584
+ // ../app/dist/cli/services/extensions/bundle.js
193585
+ init_cjs_shims();
193586
+ import { context as esContext, formatMessagesSync } from "esbuild";
193587
+ var import_esbuild_graphql_loader = __toESM(require_lib5(), 1);
193588
+ async function bundleExtension2(options, processEnv = process.env) {
193589
+ let esbuildOptions = getESBuildOptions2(options, processEnv), context = await esContext(esbuildOptions), result = await context.rebuild();
193590
+ onResult(result, options), await writeMetafile(result, options.outputPath), await context.dispose();
193591
+ }
193592
+ async function writeMetafile(result, outputPath) {
193593
+ if (!result?.metafile)
193594
+ return;
193595
+ let { dir, name } = parsePath(outputPath), metafilePath = joinPath(dir, `${name}.metafile.json`);
193596
+ try {
193597
+ await writeFile(metafilePath, JSON.stringify(result.metafile));
193598
+ } catch (error) {
193599
+ outputWarn(`Failed to write metafile to ${metafilePath}: ${error}`);
193600
+ }
193601
+ }
193602
+ function onResult(result, options) {
193603
+ let warnings = result?.warnings ?? [], errors = result?.errors ?? [];
193604
+ warnings.length > 0 && formatMessagesSync(warnings, { kind: "warning" }).forEach((warning) => {
193605
+ options.stdout.write(warning);
193606
+ }), errors.length > 0 && formatMessagesSync(errors, { kind: "error" }).forEach((error) => {
193607
+ options.stderr.write(error);
193608
+ });
193609
+ }
193610
+ function getESBuildOptions2(options, processEnv = process.env) {
193611
+ let validEnvs = pickBy(processEnv, (value, key) => EsbuildEnvVarRegex.test(key) && value), env = { ...options.env, ...validEnvs }, define2 = Object.keys(env || {}).reduce((acc, key) => ({
193612
+ ...acc,
193613
+ [`process.env.${key}`]: JSON.stringify(env[key])
193614
+ }), { "process.env.NODE_ENV": JSON.stringify(options.environment) }), esbuildOptions = {
193615
+ outfile: options.outputPath,
193616
+ stdin: options.stdin,
193617
+ bundle: !0,
193618
+ define: define2,
193619
+ jsx: "automatic",
193620
+ logLevel: options.logLevel ?? "error",
193621
+ loader: {
193622
+ ".esnext": "ts",
193623
+ ".js": "jsx"
193624
+ },
193625
+ legalComments: "none",
193626
+ minify: options.minify,
193627
+ plugins: getPlugins(options.stdin.resolveDir, processEnv),
193628
+ target: "es6",
193629
+ resolveExtensions: [".tsx", ".ts", ".js", ".json", ".esnext", ".mjs", ".ejs"]
193630
+ };
193631
+ if (options.sourceMaps && (esbuildOptions.sourcemap = !0, esbuildOptions.sourceRoot = `${options.stdin.resolveDir}/src`), options.environment === "production" && (esbuildOptions.metafile = !0), options.environment === "development") {
193632
+ let disableMinificationOnDev = env[environmentVariableNames.disableMinificationOnDev];
193633
+ esbuildOptions.minify = !isTruthy(disableMinificationOnDev), esbuildOptions.logLevel = "silent";
193634
+ }
193635
+ return esbuildOptions;
193636
+ }
193637
+ function getPlugins(resolveDir, processEnv = process.env) {
193638
+ let plugins = [import_esbuild_graphql_loader.default.default()], skipReactDeduplication = isTruthy(processEnv[environmentVariableNames.skipEsbuildReactDedeuplication]);
193639
+ if (resolveDir && !skipReactDeduplication) {
193640
+ let resolvedReactPath;
193641
+ try {
193642
+ resolvedReactPath = __require.resolve("react", { paths: [resolveDir] });
193643
+ } catch {
193644
+ outputDebug(`Unable to load React in ${resolveDir}, skipping React de-duplication`);
193645
+ }
193646
+ resolvedReactPath && (outputDebug(`Deduplicating React dependency for ${resolveDir}, using ${resolvedReactPath}`), plugins.push(deduplicateReactPlugin(resolvedReactPath)));
193647
+ }
193648
+ return plugins;
193649
+ }
193650
+ function deduplicateReactPlugin(resolvedReactPath) {
193651
+ return {
193652
+ name: "shopify:deduplicate-react",
193653
+ setup({ onResolve }) {
193654
+ onResolve({ filter: /^react$/ }, (_args) => ({
193655
+ path: resolvedReactPath
193656
+ }));
193657
+ }
193658
+ };
193659
+ }
193660
+
193661
+ // ../app/dist/cli/services/function/schema-version.js
193662
+ init_cjs_shims();
193663
+ var SCHEMA_VERSION_MARKER_PREFIX = "# api_version: ";
193664
+ function prependSchemaVersionHeader(definition, apiVersion) {
193665
+ return `${SCHEMA_VERSION_MARKER_PREFIX}${apiVersion}
193666
+
193667
+ ${definition}`;
193668
+ }
193669
+ async function readSchemaApiVersion(filePath) {
193670
+ if (!await fileExists(filePath)) {
193671
+ outputDebug(`Could not determine api_version: schema file not found at ${filePath}.`);
193672
+ return;
193673
+ }
193674
+ let firstLine = (await readFile(filePath)).split(`
193675
+ `, 1)[0];
193676
+ if (firstLine.startsWith(SCHEMA_VERSION_MARKER_PREFIX))
193677
+ return firstLine.slice(SCHEMA_VERSION_MARKER_PREFIX.length).trim();
193678
+ outputDebug(`Could not determine api_version from ${filePath}: missing '${SCHEMA_VERSION_MARKER_PREFIX}' marker on the first line.`);
193679
+ }
193680
+ async function validateSchemaApiVersion({ directory, localIdentifier, apiVersion }) {
193681
+ let schemaPath = joinPath(directory, "schema.graphql"), versionFromSchema = await readSchemaApiVersion(schemaPath);
193682
+ if (versionFromSchema !== void 0 && versionFromSchema !== apiVersion)
193683
+ throw new AbortError(outputContent`The ${outputToken.cyan("schema.graphql")} file for ${outputToken.cyan(localIdentifier)} was generated for api_version ${outputToken.yellow(versionFromSchema)} but your function is now on api_version ${outputToken.yellow(apiVersion)}.`, outputContent`Run ${outputToken.genericShellCommand("shopify app function schema")} to refresh it.`);
193684
+ }
193685
+
193686
+ // ../app/dist/cli/services/build/extension.js
193687
+ var import_proper_lockfile = __toESM(require_proper_lockfile(), 1);
193688
+ async function buildUIExtension(extension, options) {
193689
+ options.stdout.write(`Bundling UI extension ${extension.localIdentifier}...`);
193690
+ let env = options.app.dotenv?.variables ?? {};
193691
+ options.appURL && (env.APP_URL = options.appURL);
193692
+ let buildDirectory = options.buildDirectory ?? "", localOutputPath = joinPath(extension.directory, buildDirectory, extension.outputRelativePath), { main, assets } = extension.getBundleExtensionStdinContent(), startTime = performance.now();
193693
+ if (!options.skipBuild)
193694
+ try {
193695
+ await bundleExtension2({
193696
+ minify: !0,
193697
+ outputPath: localOutputPath,
193698
+ stdin: {
193699
+ contents: main,
193700
+ resolveDir: extension.directory,
193701
+ loader: "tsx"
193702
+ },
193703
+ environment: options.environment,
193704
+ env,
193705
+ stderr: options.stderr,
193706
+ stdout: options.stdout,
193707
+ sourceMaps: extension.isSourceMapGeneratingExtension
193708
+ }), assets && await Promise.all(assets.map(async (asset) => {
193709
+ await bundleExtension2({
193710
+ minify: !0,
193711
+ outputPath: joinPath(dirname(localOutputPath), asset.outputFileName),
193712
+ stdin: {
193713
+ contents: asset.content,
193714
+ resolveDir: extension.directory,
193715
+ loader: "tsx"
193716
+ },
193717
+ environment: options.environment,
193718
+ env,
193719
+ stderr: options.stderr,
193720
+ stdout: options.stdout
193721
+ });
193722
+ }));
193723
+ } catch (extensionBundlingError) {
193724
+ let errorMessage = extensionBundlingError.message ?? "Unknown error occurred", newError = new AbortError(`Failed to bundle extension ${extension.localIdentifier}. Please check the extension source code for errors.`, errorMessage);
193725
+ throw newError.errors = extensionBundlingError.errors, newError;
193726
+ }
193727
+ await extension.buildValidation({ outputPath: localOutputPath });
193728
+ let duration = Math.round(performance.now() - startTime), sizeInfo = await formatBundleSize(localOutputPath);
193729
+ return options.stdout.write(`${extension.localIdentifier} successfully built in ${duration}ms${sizeInfo}`), localOutputPath;
193730
+ }
193731
+ async function buildFunctionExtension(extension, options) {
193732
+ let lockfilePath = joinPath(extension.directory, ".build-lock"), releaseLock;
193733
+ try {
193734
+ releaseLock = await import_proper_lockfile.default.lock(extension.directory, { retries: 20, lockfilePath });
193735
+ } catch (error) {
193736
+ throw outputDebug(`Failed to acquire function build lock: ${error.message}`), new AbortError("Failed to build function.", "This is likely due to another in-progress build.", [
193737
+ "Ensure there are no other function builds in-progress.",
193738
+ "Delete the `.build-lock` file in your function directory."
193739
+ ]);
193740
+ }
193741
+ try {
193742
+ let functionConfiguration = extension.configuration, bundlePath = extension.outputPath, relativeBuildPath = functionConfiguration.build?.path ?? extension.outputRelativePath;
193743
+ if (extension.outputPath = joinPath(extension.directory, relativeBuildPath), await validateSchemaApiVersion({
193744
+ directory: extension.directory,
193745
+ localIdentifier: extension.localIdentifier,
193746
+ apiVersion: functionConfiguration.api_version
193747
+ }), !options.skipBuild) {
193748
+ extension.isJavaScript ? await runCommandOrBuildJSFunction(extension, options) : await buildOtherFunction(extension, options);
193749
+ let wasmOpt = extension.configuration.build?.wasm_opt;
193750
+ fileExistsSync(extension.outputPath) && wasmOpt && await runWasmOpt(extension.outputPath), fileExistsSync(extension.outputPath) && await runTrampoline(extension.outputPath);
193751
+ }
193752
+ let projectOutputPath = joinPath(extension.directory, extension.outputRelativePath);
193753
+ fileExistsSync(extension.outputPath) && bundlePath !== extension.outputPath && bundlePath !== projectOutputPath && dirname(bundlePath) !== dirname(extension.outputPath) && await bundleFunctionExtension(extension.outputPath, bundlePath);
193754
+ } catch (error) {
193755
+ if (error instanceof AbortError)
193756
+ throw error;
193757
+ let errorMessage = error.message ?? "Unknown error occurred", newError = new AbortError("Failed to build function.", errorMessage);
193758
+ throw newError.errors = error.errors, newError;
193759
+ } finally {
193760
+ await releaseLock();
193761
+ }
193762
+ }
193763
+ async function bundleFunctionExtension(wasmPath, bundlePath) {
193764
+ outputDebug(`Converting WASM from ${wasmPath} to base64 in ${bundlePath}`);
193765
+ let base64Contents = await readFile(wasmPath, { encoding: "base64" });
193766
+ await touchFile(bundlePath), await writeFile(bundlePath, base64Contents);
193767
+ }
193768
+ async function runCommandOrBuildJSFunction(extension, options) {
193769
+ return extension.buildCommand ? (extension.typegenCommand && await buildGraphqlTypes(extension, options), runCommand(extension.buildCommand, extension, options)) : buildJSFunction(extension, options);
193770
+ }
193771
+ async function buildOtherFunction(extension, options) {
193772
+ if (!extension.buildCommand)
193773
+ throw options.stderr.write(`The function extension ${extension.localIdentifier} doesn't have a build command or it's empty`), options.stderr.write(`
193774
+ Edit the shopify.function.extension.toml configuration file and set how to build the extension.
193775
+
193776
+ [build]
193777
+ command = "{COMMAND}"
193778
+
193779
+ Note that the command must output a dist/index.wasm file.
193780
+ `), new AbortSilentError();
193781
+ return extension.typegenCommand && await buildGraphqlTypes(extension, options), runCommand(extension.buildCommand, extension, options);
193782
+ }
193783
+ async function runCommand(buildCommand, extension, options) {
193784
+ let buildCommandComponents = buildCommand.split(" ");
193785
+ options.stdout.write(`Building function ${extension.localIdentifier}...`), await exec(buildCommandComponents[0], buildCommandComponents.slice(1), {
193786
+ stdout: options.stdout,
193787
+ stderr: options.stderr,
193788
+ cwd: extension.directory,
193789
+ signal: options.signal
193790
+ });
193791
+ }
193792
+
193793
+ // ../app/dist/cli/services/build/steps/bundle-ui-step.js
193798
193794
  async function executeBundleUIStep(step, context) {
193799
193795
  let config2 = context.extension.configuration;
193800
193796
  context.options.buildDirectory = step.config?.bundleFolder ?? void 0;
@@ -194230,10 +194226,6 @@ var DEFAULT_WATCH_IGNORE = [
194230
194226
  let bundleInputPath = joinPath(bundleDirectory, this.getOutputFolderId(outputId));
194231
194227
  await this.keepBuiltSourcemapsLocally(bundleInputPath);
194232
194228
  }
194233
- async copyIntoBundle(options, bundleDirectory, extensionUuid) {
194234
- let defaultOutputPath = this.outputPath;
194235
- this.outputPath = this.getOutputPathForDirectory(bundleDirectory, extensionUuid), this.isThemeExtension ? await bundleThemeExtension(this, options) : this.hasDeploySteps && (outputDebug(`Will copy pre-built file from ${defaultOutputPath} to ${this.outputPath}`), await fileExists(defaultOutputPath) && (await copyFile(defaultOutputPath, this.outputPath), this.isFunctionExtension && await bundleFunctionExtension(this.outputPath, this.outputPath)));
194236
- }
194237
194229
  getOutputPathForDirectory(directory, outputId) {
194238
194230
  let id = this.getOutputFolderId(outputId);
194239
194231
  return joinPath(directory, id, this.outputRelativePath);
@@ -194413,12 +194405,12 @@ init_cjs_shims();
194413
194405
 
194414
194406
  // ../app/dist/cli/models/extensions/specifications/validation/common.js
194415
194407
  init_cjs_shims();
194416
- var httpsRegex = /^(https:\/\/)/, pubSubRegex = /^pubsub:\/\/(?<gcp_project_id>[^:]+):(?<gcp_topic>.+)$/, arnRegex = /^arn:aws:events:(?<aws_region>[a-z]{2}-[a-z]+-[0-9]+)::event-source\/aws\.partner\/shopify\.com(\.test)?\/(?<api_client_id>\d+)\/(?<event_source_name>.+)$/;
194408
+ var httpsRegex = /^(https:\/\/)/, pubSubRegex = /^pubsub:\/\/(?<gcp_project_id>[^:]+):(?<gcp_topic>.+)$/, arnRegex = /^arn:aws:events:(?<aws_region>[a-z]{2}-[a-z]+-[0-9]+)::event-source\/aws\.partner\/shopify\.com(\.test)?\/(?<api_client_id>\d+)\/(?<event_source_name>.+)$/, kafkaRegex = /^kafka:\/\/(?<kafka_topic>[a-zA-Z0-9_.-]+)$/;
194417
194409
  function removeTrailingSlash(arg) {
194418
194410
  return typeof arg == "string" && arg.endsWith("/") ? arg.replace(/\/+$/, "") : arg;
194419
194411
  }
194420
- var WebhookSubscriptionUriValidation = external_exports.string({ invalid_type_error: "Value must be string" }).refine((uri) => uri.startsWith("/") ? !0 : httpsRegex.test(uri) || pubSubRegex.test(uri) || arnRegex.test(uri), {
194421
- message: "URI format isn't correct. Valid formats include: relative path starting with a slash, HTTPS URL, pubsub://{project-id}:{topic-id} or Eventbridge ARN"
194412
+ var WebhookSubscriptionUriValidation = external_exports.string({ invalid_type_error: "Value must be string" }).refine((uri) => uri.startsWith("/") ? !0 : httpsRegex.test(uri) || pubSubRegex.test(uri) || arnRegex.test(uri) || kafkaRegex.test(uri), {
194413
+ message: "URI format isn't correct. Valid formats include: relative path starting with a slash, HTTPS URL, pubsub://{project-id}:{topic-id}, kafka://{topic-id} or Eventbridge ARN"
194422
194414
  });
194423
194415
 
194424
194416
  // ../app/dist/cli/models/extensions/specifications/validation/url_prepender.js
@@ -195272,8 +195264,13 @@ function loadFwConfigFile(rootPath, fwConfigFileName, fwConfigFiles = {}) {
195272
195264
 
195273
195265
  // ../app/dist/cli/models/app/loader.js
195274
195266
  var import_ignore = __toESM(require_ignore2(), 1);
195267
+ function tomlObjectArrayHint(error) {
195268
+ if (error.file.endsWith(".toml") && error.message === "Expected object, received array")
195269
+ return "Use a TOML table instead of an array. [table] defines a single table; [[table]] defines an array of tables.";
195270
+ }
195275
195271
  function formatConfigurationError(error) {
195276
- return error.path?.length ? `[${error.path.join(".")}]: ${error.message}` : error.message;
195272
+ let hint = tomlObjectArrayHint(error), message = hint ? `${error.message}. ${hint}` : error.message;
195273
+ return error.path?.length ? `[${error.path.join(".")}]: ${message}` : message;
195277
195274
  }
195278
195275
  async function parseConfigurationFile(schema, filepath, preloadedContent) {
195279
195276
  let content = preloadedContent;
@@ -195702,15 +195699,16 @@ function isWebType(web2, type) {
195702
195699
  return web2.configuration.roles.includes(type);
195703
195700
  }
195704
195701
  async function logMetadataForLoadedApp(app, usesWorkspaces2, loadingStrategy) {
195705
- let webs = app.webs, extensionsToAddToMetrics = app.allExtensions.filter((ext) => ext.isSentToMetrics()), appName = app.name, appDirectory = app.directory, sortedAppScopes = getAppScopesArray(app.configuration).sort();
195706
- await logMetadataForLoadedAppUsingRawValues(webs, extensionsToAddToMetrics, loadingStrategy, appName, appDirectory, sortedAppScopes, usesWorkspaces2);
195702
+ let webs = app.webs, extensionsToAddToMetrics = app.allExtensions.filter((ext) => ext.isSentToMetrics()), appName = app.name, appDirectory = app.directory, clientId = app.configuration.client_id, sortedAppScopes = getAppScopesArray(app.configuration).sort();
195703
+ await logMetadataForLoadedAppUsingRawValues(webs, extensionsToAddToMetrics, loadingStrategy, appName, appDirectory, clientId, sortedAppScopes, usesWorkspaces2);
195707
195704
  }
195708
- async function logMetadataForLoadedAppUsingRawValues(webs, extensionsToAddToMetrics, loadingStrategy, appName, appDirectory, sortedAppScopes, appUsesWorkspaces) {
195705
+ async function logMetadataForLoadedAppUsingRawValues(webs, extensionsToAddToMetrics, loadingStrategy, appName, appDirectory, clientId, sortedAppScopes, appUsesWorkspaces) {
195709
195706
  await metadata_default.addPublicMetadata(async () => {
195710
195707
  let projectType = await getProjectType(webs), extensionFunctionCount = extensionsToAddToMetrics.filter((extension) => extension.isFunctionExtension).length, extensionUICount = extensionsToAddToMetrics.filter((extension) => extension.isESBuildExtension).length, extensionThemeCount = extensionsToAddToMetrics.filter((extension) => extension.isThemeExtension).length, extensionTotalCount = extensionsToAddToMetrics.length, webBackendCount = webs.filter((web2) => isWebType(web2, WebType.Backend)).length, webBackendFramework = webBackendCount === 1 ? webs.find((web2) => isWebType(web2, WebType.Backend))?.framework : void 0, webFrontendCount = webs.filter((web2) => isWebType(web2, WebType.Frontend)).length, extensionsBreakdownMapping = {};
195711
195708
  for (let extension of extensionsToAddToMetrics)
195712
195709
  extensionsBreakdownMapping[extension.type] === void 0 ? extensionsBreakdownMapping[extension.type] = 1 : extensionsBreakdownMapping[extension.type]++;
195713
195710
  return {
195711
+ api_key: clientId,
195714
195712
  project_type: projectType,
195715
195713
  app_extensions_any: extensionTotalCount > 0,
195716
195714
  app_extensions_breakdown: JSON.stringify(extensionsBreakdownMapping),
@@ -197084,7 +197082,7 @@ var PartnersClient = class _PartnersClient {
197084
197082
  surface: features?.argo?.surface
197085
197083
  }));
197086
197084
  }
197087
- async templateSpecifications({ apiKey }) {
197085
+ async templateSpecifications({ apiKey }, _options = {}) {
197088
197086
  let variables = { apiKey }, templates2 = (await this.request(RemoteTemplateSpecificationsQuery, variables)).templateSpecifications.map((template) => {
197089
197087
  let { types, ...rest } = template;
197090
197088
  return {
@@ -199686,20 +199684,26 @@ function encodeGid(gid) {
199686
199684
 
199687
199685
  // ../organizations/dist/cli/services/fetch.js
199688
199686
  async function fetchOrganizations() {
199689
- let token = await ensureAuthenticatedBusinessPlatform(), result = await businessPlatformRequestDoc({
199687
+ return (await fetchOrganizationsWithAccessInfo()).organizations;
199688
+ }
199689
+ async function fetchOrganizationsWithAccessInfo(token) {
199690
+ let resolvedToken = token ?? await ensureAuthenticatedBusinessPlatform(), result = await businessPlatformRequestDoc({
199690
199691
  query: ListOrganizations,
199691
- token,
199692
+ token: resolvedToken,
199692
199693
  unauthorizedHandler: {
199693
199694
  type: "token_refresh",
199694
199695
  handler: async () => ({ token: await ensureAuthenticatedBusinessPlatform() })
199695
199696
  }
199696
199697
  });
199697
- return result.currentUserAccount ? result.currentUserAccount.organizationsWithAccessToDestination.nodes.map((org) => {
199698
- let id = numericIdFromEncodedGid(org.id);
199699
- if (id === void 0)
199700
- throw new AbortError(`Failed to decode organization ID from: ${org.id}`);
199701
- return { id, businessName: org.name };
199702
- }) : [];
199698
+ return result.currentUserAccount ? {
199699
+ organizations: result.currentUserAccount.organizationsWithAccessToDestination.nodes.map((org) => {
199700
+ let id = numericIdFromEncodedGid(org.id);
199701
+ if (id === void 0)
199702
+ throw new AbortError(`Failed to decode organization ID from: ${org.id}`);
199703
+ return { id, businessName: org.name };
199704
+ }),
199705
+ currentUserResolved: !0
199706
+ } : { organizations: [], currentUserResolved: !1 };
199703
199707
  }
199704
199708
 
199705
199709
  // ../organizations/dist/cli/services/select.js
@@ -200008,7 +200012,7 @@ var TEMPLATE_JSON_URL = "https://cdn.shopify.com/static/cli/extensions/templates
200008
200012
  validationSchema: spec2.validationSchema
200009
200013
  }));
200010
200014
  }
200011
- async templateSpecifications({ organizationId }) {
200015
+ async templateSpecifications({ organizationId }, options = {}) {
200012
200016
  let templates2, { templatesJsonPath } = environmentVariableNames, overrideFile = process.env[templatesJsonPath];
200013
200017
  if (overrideFile) {
200014
200018
  if (!await fileExists(overrideFile))
@@ -200026,7 +200030,7 @@ var TEMPLATE_JSON_URL = "https://cdn.shopify.com/static/cli/extensions/templates
200026
200030
  "This likely means a problem with your internet connection."
200027
200031
  ]);
200028
200032
  }
200029
- let counter = 0, filteredTemplates = (await allowedTemplates(templates2, async (betaFlags) => this.organizationBetaFlags(organizationId, betaFlags), async (expFlags) => this.organizationExpFlags(organizationId, expFlags))).map((template) => ({ ...template, sortPriority: counter++ })), groupOrder = [];
200033
+ let counter = 0, requestedTemplates = options.requestedTemplate ? templates2.filter((template) => template.identifier === options.requestedTemplate) : void 0, templatesToFilter = requestedTemplates && requestedTemplates.length > 0 ? requestedTemplates : templates2, filteredTemplates = (await allowedTemplates(templatesToFilter, async (betaFlags) => this.organizationBetaFlags(organizationId, betaFlags), async (expFlags) => this.organizationExpFlags(organizationId, expFlags))).map((template) => ({ ...template, sortPriority: counter++ })), groupOrder = [];
200030
200034
  for (let template of templates2)
200031
200035
  template.group && !groupOrder.includes(template.group) && groupOrder.push(template.group);
200032
200036
  return {
@@ -201846,7 +201850,9 @@ async function fetchOrCreateOrganizationApp(options) {
201846
201850
  }
201847
201851
  async function selectOrg2() {
201848
201852
  let orgs = await fetchOrganizations2();
201849
- return await selectOrganizationPrompt(orgs);
201853
+ if (orgs.length === 0)
201854
+ throw new AbortError("No organizations found.", "Make sure you have access to a Shopify organization.");
201855
+ return selectOrganizationPrompt(orgs);
201850
201856
  }
201851
201857
  function showReusedDevValues({ organization, app, remoteApp, selectedStore, tunnelMode }) {
201852
201858
  if (sniffForJson())
@@ -203211,7 +203217,7 @@ init_cjs_shims();
203211
203217
  var import_json_schema_to_typescript = __toESM(require_src(), 1);
203212
203218
  import { createRequire } from "module";
203213
203219
  async function loadTypeScript() {
203214
- let mod = await import("./typescript-TKTDYKKG.js");
203220
+ let mod = await import("./typescript-4FFXOVC6.js");
203215
203221
  return mod.default ?? mod;
203216
203222
  }
203217
203223
  var require2 = createRequire(import.meta.url), uiExtensionsPackage = "@shopify/ui-extensions";
@@ -204198,6 +204204,12 @@ function jsonSchemaValidate(subject, schema, handleInvalidAdditionalProperties,
204198
204204
  rawErrors: void 0
204199
204205
  };
204200
204206
  }
204207
+ function getJsonSchemaValueType(value) {
204208
+ return Array.isArray(value) ? "array" : value === null ? "null" : typeof value;
204209
+ }
204210
+ function getJsonSchemaErrorValue(subject, path) {
204211
+ return path.length === 0 ? subject : getPathValue(subject, path);
204212
+ }
204201
204213
  function convertJsonSchemaErrors(rawErrors, subject, schema) {
204202
204214
  return simplifyUnionErrors(rawErrors, subject, schema).map((error) => {
204203
204215
  let path = error.instancePath.split("/").slice(1);
@@ -204206,20 +204218,20 @@ function convertJsonSchemaErrors(rawErrors, subject, schema) {
204206
204218
  return { path: [...path, missingProperty], message: "Required" };
204207
204219
  }
204208
204220
  if (error.params.type) {
204209
- let expectedType = Array.isArray(error.params.type) ? error.params.type.join(", ") : error.params.type, actualType = getPathValue(subject, path.join("."));
204210
- return { path, message: `Expected ${expectedType}, received ${typeof actualType}` };
204221
+ let expectedType = Array.isArray(error.params.type) ? error.params.type.join(", ") : error.params.type, actualType = getJsonSchemaErrorValue(subject, path);
204222
+ return { path, message: `Expected ${expectedType}, received ${getJsonSchemaValueType(actualType)}` };
204211
204223
  }
204212
204224
  if (error.keyword === "anyOf" || error.keyword === "oneOf")
204213
204225
  return { path, message: "Invalid input" };
204214
204226
  if (error.params.allowedValues) {
204215
- let allowedValues = error.params.allowedValues, actualValue = getPathValue(subject, path.join("."));
204227
+ let allowedValues = error.params.allowedValues, actualValue = getJsonSchemaErrorValue(subject, path);
204216
204228
  return {
204217
204229
  path,
204218
204230
  message: `Invalid enum value. Expected ${allowedValues.map((value) => JSON.stringify(value)).join(" | ")}, received ${JSON.stringify(actualValue)}`.replace(/"/g, "'")
204219
204231
  };
204220
204232
  }
204221
204233
  if (error.params.comparison) {
204222
- let comparison = error.params.comparison, limit = error.params.limit, actualValue = getPathValue(subject, path.join(".")), comparisonText = comparison;
204234
+ let comparison = error.params.comparison, limit = error.params.limit, actualValue = getJsonSchemaErrorValue(subject, path), comparisonText = comparison;
204223
204235
  switch (comparison) {
204224
204236
  case "<=":
204225
204237
  comparisonText = "less than or equal to";
@@ -204259,14 +204271,14 @@ function simplifyUnionErrors(rawErrors, subject, schema) {
204259
204271
  let unionError = errors.filter((error) => (error.keyword === "oneOf" || error.keyword === "anyOf") && !resolvedUnionErrors.has(error.instancePath))[0];
204260
204272
  if (unionError === void 0)
204261
204273
  break;
204262
- let unrelatedErrors = errors.filter((error) => !error.instancePath.startsWith(unionError.instancePath)), simplifiedUnionRelatedErrors = [unionError], dottedSchemaPath = unionError.schemaPath.replace("#/", "").replace(/\//g, "."), unionSchemas = getPathValue(schema, dottedSchemaPath), subjectValue = getPathValue(subject, unionError.instancePath.split("/").slice(1).join("."));
204274
+ let unrelatedErrors = errors.filter((error) => !error.instancePath.startsWith(unionError.instancePath)), simplifiedUnionRelatedErrors = [unionError], dottedSchemaPath = unionError.schemaPath.replace("#/", "").replace(/\//g, "."), unionSchemas = getPathValue(schema, dottedSchemaPath), subjectValue = getJsonSchemaErrorValue(subject, unionError.instancePath.split("/").slice(1));
204263
204275
  if (unionSchemas !== void 0 && subjectValue !== void 0) {
204264
204276
  let correctValuesAndErrors = unionSchemas.map((candidateSchemaFromUnion) => {
204265
204277
  let candidateSchemaValidator = createAjvValidator("fail", candidateSchemaFromUnion);
204266
204278
  candidateSchemaValidator(subjectValue);
204267
204279
  let score = 0;
204268
204280
  return candidateSchemaFromUnion.type === "object" && (score = Object.keys(candidateSchemaFromUnion.properties).reduce((acc, propertyName) => {
204269
- let subSchema = candidateSchemaFromUnion.properties[propertyName], subjectValueSlice = getPathValue(subjectValue, propertyName);
204281
+ let subSchema = candidateSchemaFromUnion.properties[propertyName], subjectValueSlice = getJsonSchemaErrorValue(subjectValue, [propertyName]);
204270
204282
  return createAjvValidator("fail", subSchema)(subjectValueSlice) ? acc + 1 : acc;
204271
204283
  }, score)), [score, candidateSchemaValidator.errors];
204272
204284
  }).sort(([scoreA], [scoreB]) => scoreA - scoreB);
@@ -204694,8 +204706,8 @@ async function logMetadata(app, organization, resetUsed) {
204694
204706
  cmd_app_reset_used: resetUsed
204695
204707
  }));
204696
204708
  }
204697
- async function localAppContext({ directory, userProvidedConfigName }) {
204698
- let { project, activeConfig } = await getAppConfigurationContext(directory, userProvidedConfigName);
204709
+ async function localAppContext({ directory, userProvidedConfigName, skipPrompts = !1 }) {
204710
+ let { project, activeConfig } = await getAppConfigurationContext(directory, userProvidedConfigName, { skipPrompts });
204699
204711
  if (activeConfig.file.errors.length > 0)
204700
204712
  throw new AbortError(activeConfig.file.errors.map((err2) => err2.message).join(`
204701
204713
  `));
@@ -204724,16 +204736,16 @@ var import_core2 = __toESM(require_lib()), BaseCommand = class extends import_co
204724
204736
  }
204725
204737
  async catch(error) {
204726
204738
  error.skipOclifErrorHandling = !0;
204727
- let { errorHandler } = await import("./error-handler-YHPBH53J.js");
204739
+ let { errorHandler } = await import("./error-handler-C3IHDYS6.js");
204728
204740
  return await errorHandler(error, this.config), import_core2.Errors.handle(error);
204729
204741
  }
204730
204742
  async init() {
204731
204743
  if (this.exitWithTimestampWhenEnvVariablePresent(), setCurrentCommandId(this.id ?? ""), !isDevelopment()) {
204732
- let { registerCleanBugsnagErrorsFromWithinPlugins } = await import("./error-handler-YHPBH53J.js");
204744
+ let { registerCleanBugsnagErrorsFromWithinPlugins } = await import("./error-handler-C3IHDYS6.js");
204733
204745
  await registerCleanBugsnagErrorsFromWithinPlugins(this.config);
204734
204746
  }
204735
204747
  await removeDuplicatedPlugins(this.config), this.showNpmFlagWarning();
204736
- let { showNotificationsIfNeeded: showNotificationsIfNeeded2 } = await import("./notifications-system-ZFKFHX3O.js");
204748
+ let { showNotificationsIfNeeded: showNotificationsIfNeeded2 } = await import("./notifications-system-LRNZSYSG.js");
204737
204749
  return await showNotificationsIfNeeded2(), super.init();
204738
204750
  }
204739
204751
  // NPM creates an environment variable for every flag passed to a script.
@@ -204741,7 +204753,7 @@ var import_core2 = __toESM(require_lib()), BaseCommand = class extends import_co
204741
204753
  // and warns the user to use the `--` separator.
204742
204754
  showNpmFlagWarning() {
204743
204755
  let commandVariables = this.constructor;
204744
- Object.keys(commandVariables.flags || {}).map((key) => `npm_config_${underscore(key).replace(/^no_/, "")}`).some((flag) => process.env[flag] !== void 0) && import("./ui-IN56X5S4.js").then(({ renderWarning: renderWarning2 }) => {
204756
+ Object.keys(commandVariables.flags || {}).map((key) => `npm_config_${underscore(key).replace(/^no_/, "")}`).some((flag) => process.env[flag] !== void 0) && import("./ui-SD2MSDNB.js").then(({ renderWarning: renderWarning2 }) => {
204745
204757
  renderWarning2({
204746
204758
  body: [
204747
204759
  "NPM scripts require an extra",
@@ -204779,7 +204791,7 @@ This flag is required in non-interactive terminal environments, such as a CI env
204779
204791
  let flags = originalResult.flags, environmentsFileName = this.environmentsFilename();
204780
204792
  if (!environmentsFileName)
204781
204793
  return originalResult;
204782
- let { environmentFilePath } = await import("./environments-XMNHPGBO.js"), environmentFileExists = await environmentFilePath(environmentsFileName, { from: flags.path }), environments = [];
204794
+ let { environmentFilePath } = await import("./environments-C3Z4TCZS.js"), environmentFileExists = await environmentFilePath(environmentsFileName, { from: flags.path }), environments = [];
204783
204795
  flags.environment && (environments = Array.isArray(flags.environment) ? flags.environment : [flags.environment]);
204784
204796
  let environmentSpecified = environments.length > 0;
204785
204797
  if (!environmentFileExists && !environmentSpecified || environmentSpecified && environments.length > 1)
@@ -204800,7 +204812,7 @@ This flag is required in non-interactive terminal environments, such as a CI env
204800
204812
  * is specified it will try to load a default environment.
204801
204813
  */
204802
204814
  async loadEnvironmentForCommand(path, environmentsFileName, specifiedEnvironment) {
204803
- let { loadEnvironment: loadEnvironment2 } = await import("./environments-XMNHPGBO.js");
204815
+ let { loadEnvironment: loadEnvironment2 } = await import("./environments-C3Z4TCZS.js");
204804
204816
  return specifiedEnvironment ? { environment: await loadEnvironment2(specifiedEnvironment, environmentsFileName, { from: path }), isDefaultEnvironment: !1 } : { environment: await loadEnvironment2("default", environmentsFileName, { from: path, silent: !0 }), isDefaultEnvironment: !0 };
204805
204817
  }
204806
204818
  };
@@ -204824,7 +204836,7 @@ function reportEnvironmentApplication(noDefaultsFlags, flagsWithEnvironments, en
204824
204836
  if (Object.keys(changes).length === 0)
204825
204837
  return;
204826
204838
  let items = Object.entries(changes).map(([name, value]) => `${name}: ${value}`);
204827
- import("./ui-IN56X5S4.js").then(({ renderInfo: renderInfo2 }) => {
204839
+ import("./ui-SD2MSDNB.js").then(({ renderInfo: renderInfo2 }) => {
204828
204840
  renderInfo2({
204829
204841
  headline: ["Using applicable flags from", { userInput: environmentName }, "environment:"],
204830
204842
  body: [{ list: { items } }]
@@ -204861,7 +204873,7 @@ async function removeDuplicatedPlugins(config2) {
204861
204873
  let plugins = Array.from(config2.plugins.values()), bundlePlugins = ["@shopify/app", "@shopify/plugin-cloudflare"], pluginsToRemove = plugins.filter((plugin) => bundlePlugins.includes(plugin.name));
204862
204874
  if (pluginsToRemove.length > 0) {
204863
204875
  let commandsToRun = pluginsToRemove.map((plugin) => ` - shopify plugins remove ${plugin.name}`).join(`
204864
- `), { renderWarning: renderWarning2 } = await import("./ui-IN56X5S4.js");
204876
+ `), { renderWarning: renderWarning2 } = await import("./ui-SD2MSDNB.js");
204865
204877
  renderWarning2({
204866
204878
  headline: `Unsupported plugins detected: ${pluginsToRemove.map((plugin) => plugin.name).join(", ")}`,
204867
204879
  body: [
@@ -204897,13 +204909,13 @@ init_cjs_shims();
204897
204909
  init_cjs_shims();
204898
204910
  import { fileURLToPath as fileURLToPath2 } from "node:url";
204899
204911
  async function launchCLI(options) {
204900
- let { isDevelopment: isDevelopment2 } = await import("./local-QWRI6OFV.js"), { ShopifyConfig } = await import("./custom-oclif-loader-5SWH4GTV.js"), oclifModule = await import("./lib-QBGNJ3PZ.js"), { run, flush, Errors: Errors2, settings } = oclifModule.default ?? oclifModule;
204912
+ let { isDevelopment: isDevelopment2 } = await import("./local-JBCA7C7D.js"), { ShopifyConfig } = await import("./custom-oclif-loader-7BTLNXYR.js"), oclifModule = await import("./lib-NKDE2QNY.js"), { run, flush, Errors: Errors2, settings } = oclifModule.default ?? oclifModule;
204901
204913
  isDevelopment2() && (settings.debug = !0);
204902
204914
  try {
204903
204915
  let config2 = new ShopifyConfig({ root: fileURLToPath2(options.moduleURL) });
204904
204916
  await config2.load(), options.lazyCommandLoader && config2.setLazyCommandLoader(options.lazyCommandLoader), await run(options.argv, config2), await flush();
204905
204917
  } catch (error) {
204906
- let { errorHandler } = await import("./error-handler-YHPBH53J.js");
204918
+ let { errorHandler } = await import("./error-handler-C3IHDYS6.js");
204907
204919
  return await errorHandler(error), Errors2.handle(error);
204908
204920
  }
204909
204921
  }
@@ -204913,7 +204925,7 @@ var import_core3 = __toESM(require_lib());
204913
204925
  async function exitIfOldNodeVersion(versions2 = process.versions) {
204914
204926
  let nodeVersion = versions2.node, nodeMajorVersion = Number(nodeVersion.split(".")[0]);
204915
204927
  if (nodeMajorVersion < 18) {
204916
- let { renderError: renderError2 } = await import("./ui-IN56X5S4.js");
204928
+ let { renderError: renderError2 } = await import("./ui-SD2MSDNB.js");
204917
204929
  renderError2({
204918
204930
  headline: "Upgrade to a supported Node version now.",
204919
204931
  body: [
@@ -204940,7 +204952,7 @@ async function runCLI(options, launchCLI2 = launchCLI, argv = process.argv, env
204940
204952
  return setupEnvironmentVariables(options, argv, env), options.runInCreateMode && await addInitToArgvWhenRunningCreateCLI(options, argv), forceNoColor(argv, env), await exitIfOldNodeVersion(versions2), launchCLI2({ moduleURL: options.moduleURL, lazyCommandLoader: options.lazyCommandLoader });
204941
204953
  }
204942
204954
  async function addInitToArgvWhenRunningCreateCLI(options, argv = process.argv) {
204943
- let { findUpAndReadPackageJson: findUpAndReadPackageJson2 } = await import("./node-package-manager-W33EW2VU.js"), { moduleDirectory: moduleDirectory2 } = await import("./path-EOPO7QNL.js"), name = (await findUpAndReadPackageJson2(moduleDirectory2(options.moduleURL))).content.name.replace("@shopify/create-", "");
204955
+ let { findUpAndReadPackageJson: findUpAndReadPackageJson2 } = await import("./node-package-manager-MQEWWORU.js"), { moduleDirectory: moduleDirectory2 } = await import("./path-2WA5R6GG.js"), name = (await findUpAndReadPackageJson2(moduleDirectory2(options.moduleURL))).content.name.replace("@shopify/create-", "");
204944
204956
  if (argv.findIndex((arg) => arg.includes("init")) === -1) {
204945
204957
  let initIndex2 = argv.findIndex((arg) => arg.match(new RegExp(`bin(\\/|\\\\)+(create-${name}|dev|run)`))) + 1;
204946
204958
  argv.splice(initIndex2, 0, "init");
@@ -205907,7 +205919,7 @@ var import_ignore2 = __toESM(require_ignore2(), 1), DEFAULT_DEBOUNCE_TIME_IN_MS
205907
205919
  }));
205908
205920
  let watchPaths = [this.app.configPath, ...fullExtensionDirectories], allWatchedFiles = this.getAllWatchedFiles();
205909
205921
  watchPaths.push(...allWatchedFiles), this.close();
205910
- let { default: chokidar } = await import("./chokidar-HTKREZL3.js");
205922
+ let { default: chokidar } = await import("./chokidar-JYHMNWDF.js");
205911
205923
  this.watcher = chokidar.watch(watchPaths, {
205912
205924
  ignored: ["**/node_modules/**", "**/.git/**"],
205913
205925
  persistent: !0,
@@ -206563,7 +206575,7 @@ async function bundleAndBuildExtensions(options) {
206563
206575
  prefix: extension.localIdentifier,
206564
206576
  action: async (stdout, stderr, signal) => {
206565
206577
  let outputId = options.isDevDashboardApp ? void 0 : options.identifiers?.extensions[extension.localIdentifier];
206566
- options.skipBuild ? await extension.copyIntoBundle({ stderr, stdout, signal, app: options.app, environment: "production" }, bundleDirectory, outputId) : await extension.buildForBundle({ stderr, stdout, signal, app: options.app, environment: "production" }, bundleDirectory, outputId);
206578
+ await extension.buildForBundle({ stderr, stdout, signal, app: options.app, environment: "production", skipBuild: options.skipBuild }, bundleDirectory, outputId);
206567
206579
  }
206568
206580
  }));
206569
206581
  if (await renderConcurrent({
@@ -212177,7 +212189,7 @@ function mountThemeExtensionFileSystem(root) {
212177
212189
  eventEmitter2.on(eventName, cb);
212178
212190
  },
212179
212191
  startWatcher: async () => {
212180
- let { default: chokidar } = await import("./chokidar-HTKREZL3.js");
212192
+ let { default: chokidar } = await import("./chokidar-JYHMNWDF.js");
212181
212193
  chokidar.watch([...directoriesToWatch], {
212182
212194
  ignored: DEFAULT_IGNORE_PATTERNS,
212183
212195
  persistent: !process.env.SHOPIFY_UNIT_TEST,
@@ -213644,7 +213656,7 @@ function mountThemeFileSystem(root, options) {
213644
213656
  eventEmitter2.on(eventName, cb);
213645
213657
  },
213646
213658
  startWatcher: async (themeId, adminSession) => {
213647
- let { default: chokidar } = await import("./chokidar-HTKREZL3.js"), watcher = chokidar.watch([...directoriesToWatch], {
213659
+ let { default: chokidar } = await import("./chokidar-JYHMNWDF.js"), watcher = chokidar.watch([...directoriesToWatch], {
213648
213660
  ignored: DEFAULT_IGNORE_PATTERNS,
213649
213661
  persistent: !process.env.SHOPIFY_UNIT_TEST,
213650
213662
  ignoreInitial: !0
@@ -219211,7 +219223,7 @@ function isAggregateError(err2) {
219211
219223
  return "errors" in err2 && Array.isArray(err2.errors);
219212
219224
  }
219213
219225
  async function getProxyingWebServer(rules, abortSignal, localhostCert, stdout) {
219214
- let proxy = (await import("./http-proxy-node16-XB2DSBCB.js")).default.createProxyServer(), requestListener = getProxyServerRequestListener(rules, proxy, stdout), server = localhostCert ? https.createServer(localhostCert, requestListener) : http.createServer(requestListener);
219226
+ let proxy = (await import("./http-proxy-node16-5LMQ6YXS.js")).default.createProxyServer(), requestListener = getProxyServerRequestListener(rules, proxy, stdout), server = localhostCert ? https.createServer(localhostCert, requestListener) : http.createServer(requestListener);
219215
219227
  return server.on("upgrade", getProxyServerWebsocketUpgradeListener(rules, proxy, stdout)), abortSignal.addEventListener("abort", () => {
219216
219228
  outputDebug("Closing reverse HTTP proxy"), server.close();
219217
219229
  }), { server };
@@ -222693,8 +222705,8 @@ init_cjs_shims();
222693
222705
 
222694
222706
  // ../app/dist/cli/services/generate/fetch-template-specifications.js
222695
222707
  init_cjs_shims();
222696
- async function fetchExtensionTemplates(developerPlatformClient, app, availableSpecifications) {
222697
- let { templates: remoteTemplates, groupOrder } = await developerPlatformClient.templateSpecifications(app);
222708
+ async function fetchExtensionTemplates(developerPlatformClient, app, availableSpecifications, options = {}) {
222709
+ let { templates: remoteTemplates, groupOrder } = await developerPlatformClient.templateSpecifications(app, options);
222698
222710
  return {
222699
222711
  templates: remoteTemplates.filter((template) => availableSpecifications.includes(template.identifier) || availableSpecifications.includes(template.type)),
222700
222712
  groupOrder
@@ -222938,7 +222950,7 @@ var extension_default = generateExtensionPrompts;
222938
222950
 
222939
222951
  // ../app/dist/cli/services/generate.js
222940
222952
  async function generate(options) {
222941
- let { app, developerPlatformClient, remoteApp, specifications, template } = options, availableSpecifications = specifications.map((spec2) => spec2.identifier), { templates: extensionTemplates, groupOrder } = await fetchExtensionTemplates(developerPlatformClient, remoteApp, availableSpecifications), promptOptions = await buildPromptOptions(extensionTemplates, groupOrder, specifications, app, options), promptAnswers = await extension_default(promptOptions);
222953
+ let { app, developerPlatformClient, remoteApp, specifications, template } = options, availableSpecifications = specifications.map((spec2) => spec2.identifier), { templates: extensionTemplates, groupOrder } = await fetchExtensionTemplates(developerPlatformClient, remoteApp, availableSpecifications, { requestedTemplate: template }), promptOptions = await buildPromptOptions(extensionTemplates, groupOrder, specifications, app, options), promptAnswers = await extension_default(promptOptions);
222942
222954
  await saveAnalyticsMetadata(promptAnswers, template);
222943
222955
  let generateExtensionOptions = buildGenerateOptions(promptAnswers, app, options, developerPlatformClient), generatedExtension = await generateExtensionTemplate(generateExtensionOptions);
222944
222956
  renderSuccessMessage2(generatedExtension, options.project.packageManager);