@shopify/cli 3.89.0 → 3.90.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 (78) hide show
  1. package/dist/{chunk-TLGBKEEX.js → chunk-3AY5VBOI.js} +5 -5
  2. package/dist/{chunk-Y3HY6QD7.js → chunk-3OKBQXPB.js} +5 -5
  3. package/dist/{chunk-EAEHP4CZ.js → chunk-4K7TRR4V.js} +3 -3
  4. package/dist/{chunk-TRR5QJRW.js → chunk-5MLYI7UO.js} +4 -4
  5. package/dist/{chunk-EQO4QA4E.js → chunk-5OJ67VLD.js} +8 -4
  6. package/dist/{chunk-GT7PA6E6.js → chunk-66SSN4NK.js} +2 -2
  7. package/dist/{chunk-2OJBOBH2.js → chunk-6DIWINGB.js} +3 -3
  8. package/dist/{chunk-WF5BWNFE.js → chunk-6OAKJOUE.js} +5 -5
  9. package/dist/{chunk-TWYT4DFD.js → chunk-A2DCUFP3.js} +2 -2
  10. package/dist/{chunk-Y2BHJWKT.js → chunk-A7QWFDBY.js} +2 -2
  11. package/dist/{chunk-NJR5IH3H.js → chunk-AJVHCUVQ.js} +3 -3
  12. package/dist/{chunk-P3SM4EEQ.js → chunk-B2EZE3X5.js} +3 -3
  13. package/dist/{chunk-XLMH6DBR.js → chunk-BDQNCT7P.js} +3 -3
  14. package/dist/{chunk-TPPRDIBF.js → chunk-ELXP2SNA.js} +3 -3
  15. package/dist/{chunk-LJHVLE3R.js → chunk-ERCZ3NEG.js} +2 -2
  16. package/dist/{chunk-36WMFQ3S.js → chunk-FPXVU77M.js} +3 -3
  17. package/dist/{chunk-WSX6K4TT.js → chunk-GH4DMIMI.js} +3 -3
  18. package/dist/{chunk-R7OKLQB6.js → chunk-GY37RRX5.js} +4 -4
  19. package/dist/{chunk-2CNWYFWQ.js → chunk-HVSHUE2B.js} +5 -5
  20. package/dist/{chunk-ZM543XCR.js → chunk-ITXKKYMN.js} +3 -3
  21. package/dist/{chunk-JYBBGVIM.js → chunk-K2EOH7QQ.js} +3 -3
  22. package/dist/{chunk-5PAHFSKT.js → chunk-L5BSIB4A.js} +3 -3
  23. package/dist/{chunk-GSUL4KBP.js → chunk-LKMGT2DW.js} +7 -2
  24. package/dist/{chunk-6YASM3HI.js → chunk-LSGITB3O.js} +4 -4
  25. package/dist/{chunk-EYUOBXKH.js → chunk-MZX7G4LN.js} +3 -3
  26. package/dist/{chunk-V2ZY6OP3.js → chunk-O74JPOMN.js} +5 -5
  27. package/dist/{chunk-GFYDB5LD.js → chunk-QHDQYVAG.js} +3 -3
  28. package/dist/{chunk-6KFJWCTP.js → chunk-R2VQQFNU.js} +2 -2
  29. package/dist/{chunk-PYPPUTUV.js → chunk-RYFPG44L.js} +2 -2
  30. package/dist/{chunk-CUCT627W.js → chunk-SE3EASHO.js} +7 -7
  31. package/dist/{chunk-2QVJ6J2X.js → chunk-U52M2SBG.js} +5 -5
  32. package/dist/{chunk-B5Q2Q4B3.js → chunk-UISDI2NJ.js} +2 -2
  33. package/dist/{chunk-YETFHMCK.js → chunk-XUHEOC7Y.js} +6 -6
  34. package/dist/cli/commands/auth/login.js +8 -8
  35. package/dist/cli/commands/auth/login.test.js +9 -9
  36. package/dist/cli/commands/auth/logout.js +8 -8
  37. package/dist/cli/commands/auth/logout.test.js +9 -9
  38. package/dist/cli/commands/cache/clear.js +8 -8
  39. package/dist/cli/commands/debug/command-flags.js +8 -8
  40. package/dist/cli/commands/docs/generate.js +8 -8
  41. package/dist/cli/commands/docs/generate.test.js +8 -8
  42. package/dist/cli/commands/help.js +8 -8
  43. package/dist/cli/commands/kitchen-sink/async.js +9 -9
  44. package/dist/cli/commands/kitchen-sink/async.test.js +9 -9
  45. package/dist/cli/commands/kitchen-sink/index.js +11 -11
  46. package/dist/cli/commands/kitchen-sink/index.test.js +11 -11
  47. package/dist/cli/commands/kitchen-sink/prompts.js +9 -9
  48. package/dist/cli/commands/kitchen-sink/prompts.test.js +9 -9
  49. package/dist/cli/commands/kitchen-sink/static.js +9 -9
  50. package/dist/cli/commands/kitchen-sink/static.test.js +9 -9
  51. package/dist/cli/commands/notifications/generate.js +9 -9
  52. package/dist/cli/commands/notifications/list.js +9 -9
  53. package/dist/cli/commands/search.js +9 -9
  54. package/dist/cli/commands/upgrade.js +9 -9
  55. package/dist/cli/commands/version.js +9 -9
  56. package/dist/cli/commands/version.test.js +9 -9
  57. package/dist/cli/services/commands/notifications.js +6 -6
  58. package/dist/cli/services/commands/search.js +2 -2
  59. package/dist/cli/services/commands/search.test.js +2 -2
  60. package/dist/cli/services/commands/version.js +3 -3
  61. package/dist/cli/services/commands/version.test.js +4 -4
  62. package/dist/cli/services/kitchen-sink/async.js +2 -2
  63. package/dist/cli/services/kitchen-sink/prompts.js +2 -2
  64. package/dist/cli/services/kitchen-sink/static.js +2 -2
  65. package/dist/cli/services/upgrade.js +3 -3
  66. package/dist/cli/services/upgrade.test.js +4 -4
  67. package/dist/{custom-oclif-loader-TLTSWHLS.js → custom-oclif-loader-H4CDTFND.js} +2 -2
  68. package/dist/{error-handler-JWFNITM6.js → error-handler-JLUD7HQX.js} +6 -6
  69. package/dist/hooks/postrun.js +5 -5
  70. package/dist/hooks/prerun.js +6 -6
  71. package/dist/index.js +255 -92
  72. package/dist/{local-4NMXX5NP.js → local-Q5P3JTHB.js} +4 -2
  73. package/dist/{node-package-manager-SHRILTY3.js → node-package-manager-JQCYAVNE.js} +3 -3
  74. package/dist/tsconfig.tsbuildinfo +1 -1
  75. package/dist/{ui-MKDRI4FX.js → ui-2P2WEBXY.js} +2 -2
  76. package/dist/{workerd-BHG6KDEK.js → workerd-5QLA2QUA.js} +9 -9
  77. package/oclif.manifest.json +5 -1
  78. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -116,7 +116,7 @@ import {
116
116
  supressNodeExperimentalWarnings,
117
117
  unsetStorefront,
118
118
  waitForJob
119
- } from "./chunk-2QVJ6J2X.js";
119
+ } from "./chunk-U52M2SBG.js";
120
120
  import {
121
121
  require_normalize_path
122
122
  } from "./chunk-X7YTIMNN.js";
@@ -129,83 +129,83 @@ import {
129
129
  import "./chunk-EFOOQV72.js";
130
130
  import {
131
131
  postRunHookHasCompleted
132
- } from "./chunk-EYUOBXKH.js";
132
+ } from "./chunk-MZX7G4LN.js";
133
133
  import {
134
134
  import_websocket_server
135
135
  } from "./chunk-3GXB4ZRP.js";
136
136
  import {
137
137
  Generate
138
- } from "./chunk-XLMH6DBR.js";
138
+ } from "./chunk-BDQNCT7P.js";
139
139
  import {
140
140
  List
141
- } from "./chunk-6YASM3HI.js";
142
- import "./chunk-Y3HY6QD7.js";
141
+ } from "./chunk-LSGITB3O.js";
142
+ import "./chunk-3OKBQXPB.js";
143
143
  import {
144
144
  Search
145
- } from "./chunk-TPPRDIBF.js";
146
- import "./chunk-Y2BHJWKT.js";
145
+ } from "./chunk-ELXP2SNA.js";
146
+ import "./chunk-A7QWFDBY.js";
147
147
  import {
148
148
  Upgrade
149
- } from "./chunk-TRR5QJRW.js";
150
- import "./chunk-36WMFQ3S.js";
149
+ } from "./chunk-5MLYI7UO.js";
150
+ import "./chunk-FPXVU77M.js";
151
151
  import {
152
152
  Version
153
- } from "./chunk-2OJBOBH2.js";
154
- import "./chunk-P3SM4EEQ.js";
153
+ } from "./chunk-6DIWINGB.js";
154
+ import "./chunk-B2EZE3X5.js";
155
155
  import {
156
156
  HelpCommand
157
- } from "./chunk-B5Q2Q4B3.js";
157
+ } from "./chunk-UISDI2NJ.js";
158
158
  import {
159
159
  KitchenSinkAsync
160
- } from "./chunk-ZM543XCR.js";
160
+ } from "./chunk-ITXKKYMN.js";
161
161
  import {
162
162
  KitchenSinkAll
163
- } from "./chunk-2CNWYFWQ.js";
164
- import "./chunk-LJHVLE3R.js";
163
+ } from "./chunk-HVSHUE2B.js";
164
+ import "./chunk-ERCZ3NEG.js";
165
165
  import {
166
166
  KitchenSinkPrompts
167
- } from "./chunk-WSX6K4TT.js";
168
- import "./chunk-GT7PA6E6.js";
167
+ } from "./chunk-GH4DMIMI.js";
168
+ import "./chunk-66SSN4NK.js";
169
169
  import {
170
170
  KitchenSinkStatic
171
- } from "./chunk-5PAHFSKT.js";
172
- import "./chunk-TWYT4DFD.js";
171
+ } from "./chunk-L5BSIB4A.js";
172
+ import "./chunk-A2DCUFP3.js";
173
173
  import {
174
174
  Login
175
- } from "./chunk-V2ZY6OP3.js";
175
+ } from "./chunk-O74JPOMN.js";
176
176
  import {
177
177
  Logout
178
- } from "./chunk-R7OKLQB6.js";
178
+ } from "./chunk-GY37RRX5.js";
179
179
  import {
180
180
  ClearCache,
181
181
  globalFlags,
182
182
  jsonFlag,
183
183
  runCLI
184
- } from "./chunk-CUCT627W.js";
184
+ } from "./chunk-SE3EASHO.js";
185
185
  import {
186
186
  CommandFlags
187
- } from "./chunk-NJR5IH3H.js";
187
+ } from "./chunk-AJVHCUVQ.js";
188
188
  import {
189
189
  DocsGenerate
190
- } from "./chunk-EAEHP4CZ.js";
190
+ } from "./chunk-4K7TRR4V.js";
191
191
  import {
192
192
  base_command_default,
193
193
  decodeToml,
194
194
  encodeToml,
195
195
  loadEnvironment,
196
196
  noDefaultsOptions
197
- } from "./chunk-TLGBKEEX.js";
197
+ } from "./chunk-3AY5VBOI.js";
198
198
  import {
199
199
  require_bugsnag,
200
200
  require_end_of_stream,
201
201
  require_pump
202
- } from "./chunk-WF5BWNFE.js";
202
+ } from "./chunk-6OAKJOUE.js";
203
203
  import {
204
204
  require_once
205
205
  } from "./chunk-SHWOPMLQ.js";
206
206
  import {
207
207
  showNotificationsIfNeeded
208
- } from "./chunk-YETFHMCK.js";
208
+ } from "./chunk-XUHEOC7Y.js";
209
209
  import {
210
210
  ClientError,
211
211
  DevServerCore,
@@ -286,7 +286,7 @@ import {
286
286
  setPathValue,
287
287
  shopifyFetch,
288
288
  z
289
- } from "./chunk-EQO4QA4E.js";
289
+ } from "./chunk-5OJ67VLD.js";
290
290
  import "./chunk-XD3LXUGW.js";
291
291
  import {
292
292
  LocalStorage,
@@ -310,10 +310,10 @@ import {
310
310
  usesWorkspaces,
311
311
  versionSatisfies,
312
312
  writePackageJSON
313
- } from "./chunk-GFYDB5LD.js";
313
+ } from "./chunk-QHDQYVAG.js";
314
314
  import {
315
315
  CLI_KIT_VERSION
316
- } from "./chunk-6KFJWCTP.js";
316
+ } from "./chunk-R2VQQFNU.js";
317
317
  import {
318
318
  AbortController as AbortController2,
319
319
  AbortError,
@@ -472,6 +472,7 @@ import {
472
472
  rmdir,
473
473
  runWithTimer,
474
474
  shouldDisplayColors,
475
+ skipLocalDevConsole,
475
476
  sleep,
476
477
  sliceAnsi,
477
478
  slugify,
@@ -505,7 +506,7 @@ import {
505
506
  wrapAnsi,
506
507
  writeFile,
507
508
  writeFileSync
508
- } from "./chunk-GSUL4KBP.js";
509
+ } from "./chunk-LKMGT2DW.js";
509
510
  import {
510
511
  require_ansis,
511
512
  require_commonjs,
@@ -201725,7 +201726,7 @@ function pollThemeEditorChanges(targetTheme, session, remoteChecksum, localFileS
201725
201726
  });
201726
201727
  }
201727
201728
  async function pollRemoteJsonChanges(targetTheme, currentSession, remoteChecksums, localFileSystem, options) {
201728
- let previousChecksums = applyFileFilters(remoteChecksums, localFileSystem), latestChecksums = await fetchChecksums(targetTheme.id, currentSession).then((checksums) => applyFileFilters(checksums, localFileSystem)), changedAssets = getAssetsChangedOnRemote(previousChecksums, latestChecksums), deletedAssets = getAssetsDeletedFromRemote(latestChecksums, previousChecksums);
201729
+ let currentUnsyncedKeys = new Set(localFileSystem.unsyncedFileKeys), previousChecksums = applyFileFilters(remoteChecksums, localFileSystem, currentUnsyncedKeys), latestChecksums = await fetchChecksums(targetTheme.id, currentSession).then((checksums) => applyFileFilters(checksums, localFileSystem, currentUnsyncedKeys)), changedAssets = getAssetsChangedOnRemote(previousChecksums, latestChecksums), deletedAssets = getAssetsDeletedFromRemote(latestChecksums, previousChecksums);
201729
201730
  return await abortIfMultipleSourcesChange(localFileSystem, changedAssets), await syncChangedAssets(targetTheme, currentSession, localFileSystem, changedAssets), await deleteRemovedAssets(localFileSystem, deletedAssets, options), latestChecksums;
201730
201731
  }
201731
201732
  function getAssetsDeletedFromRemote(latestChecksums, previousChecksums) {
@@ -201764,8 +201765,8 @@ async function abortIfMultipleSourcesChange(localFileSystem, assetsChangedOnRemo
201764
201765
  throw new PollingError(`Detected changes to the file '${asset.key}' on both local and remote sources. Aborting...`);
201765
201766
  }
201766
201767
  }
201767
- function applyFileFilters(files, localThemeFileSystem) {
201768
- return localThemeFileSystem.applyIgnoreFilters(files).filter((file) => file.key.endsWith(".json")).filter((file) => !localThemeFileSystem.unsyncedFileKeys.has(file.key));
201768
+ function applyFileFilters(files, localThemeFileSystem, unsyncedKeys) {
201769
+ return localThemeFileSystem.applyIgnoreFilters(files).filter((file) => file.key.endsWith(".json")).filter((file) => !unsyncedKeys.has(file.key));
201769
201770
  }
201770
201771
 
201771
201772
  // ../theme/dist/cli/utilities/theme-environment/theme-reconciliation.js
@@ -209604,7 +209605,7 @@ var import_core27 = __toESM(require_lib5(), 1);
209604
209605
  // ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.5_@graphql-codegen+cli@5.0.4_@parcel+watcher@2.5.1_@types+no_1dab9937c446c9bfba7229e66e4ca808/node_modules/@shopify/cli-hydrogen/dist/lib/mini-oxygen/index.js
209605
209606
  init_cjs_shims();
209606
209607
  async function startMiniOxygen(options) {
209607
- let { startWorkerdServer } = await import("./workerd-BHG6KDEK.js");
209608
+ let { startWorkerdServer } = await import("./workerd-5QLA2QUA.js");
209608
209609
  return startWorkerdServer(options);
209609
209610
  }
209610
209611
 
@@ -211013,6 +211014,8 @@ var MAX_EXTENSION_HANDLE_LENGTH = 50, MAX_UID_LENGTH = 250, MetafieldSchema = z.
211013
211014
  api_access: z.boolean().optional(),
211014
211015
  collect_buyer_consent: CollectBuyerConsentCapabilitySchema.optional(),
211015
211016
  iframe: IframeCapabilitySchema.optional()
211017
+ }), SupportedFeaturesSchema = z.object({
211018
+ offline_mode: z.boolean().optional()
211016
211019
  }), ExtensionsArraySchema = z.object({
211017
211020
  type: z.string().optional(),
211018
211021
  extensions: z.array(z.any()).optional()
@@ -211056,6 +211059,7 @@ var MAX_EXTENSION_HANDLE_LENGTH = 50, MAX_UID_LENGTH = 250, MetafieldSchema = z.
211056
211059
  api_version: ApiVersionSchema.optional(),
211057
211060
  extension_points: z.any().optional(),
211058
211061
  capabilities: CapabilitiesSchema.optional(),
211062
+ supported_features: SupportedFeaturesSchema.optional(),
211059
211063
  settings: SettingsSchema.optional()
211060
211064
  }), BaseSchemaWithHandle = BaseSchema.extend({
211061
211065
  handle: HandleSchema
@@ -212844,6 +212848,7 @@ var dependency2 = "@shopify/checkout-ui-extensions", CheckoutSchema = BaseSchema
212844
212848
  deployConfig: async (config2, directory) => ({
212845
212849
  extension_points: config2.extension_points,
212846
212850
  capabilities: config2.capabilities,
212851
+ supported_features: config2.supported_features,
212847
212852
  metafields: config2.metafields ?? [],
212848
212853
  name: config2.name,
212849
212854
  settings: config2.settings,
@@ -214113,7 +214118,6 @@ var dependency5 = "@shopify/checkout-ui-extensions", validatePoints = (config2)
214113
214118
  }
214114
214119
  };
214115
214120
  return {
214116
- tools: targeting.tools,
214117
214121
  target: targeting.target,
214118
214122
  module: targeting.module,
214119
214123
  metafields: targeting.metafields ?? config2.metafields ?? [],
@@ -214121,7 +214125,9 @@ var dependency5 = "@shopify/checkout-ui-extensions", validatePoints = (config2)
214121
214125
  urls: targeting.urls ?? {},
214122
214126
  capabilities: targeting.capabilities,
214123
214127
  preloads: targeting.preloads ?? {},
214124
- build_manifest: buildManifest
214128
+ build_manifest: buildManifest,
214129
+ tools: targeting.tools,
214130
+ instructions: targeting.instructions
214125
214131
  };
214126
214132
  });
214127
214133
  return { ...config2, extension_points: extensionPoints };
@@ -214141,6 +214147,7 @@ var dependency5 = "@shopify/checkout-ui-extensions", validatePoints = (config2)
214141
214147
  api_version: config2.api_version,
214142
214148
  extension_points: transformedExtensionPoints,
214143
214149
  capabilities: config2.capabilities,
214150
+ supported_features: config2.supported_features,
214144
214151
  name: config2.name,
214145
214152
  description: config2.description,
214146
214153
  settings: config2.settings,
@@ -214151,13 +214158,8 @@ var dependency5 = "@shopify/checkout-ui-extensions", validatePoints = (config2)
214151
214158
  let shouldIncludeShopifyExtend = isRemoteDomExtension(config2), extensionPoints = config2.extension_points || [], main = extensionPoints.map(({ target, module }, index) => shouldIncludeShopifyExtend ? `import Target_${index} from '${module}';shopify.extend('${target}', (...args) => Target_${index}(...args));` : `import '${module}';`).join(`
214152
214159
  `), assets = {};
214153
214160
  extensionPoints.forEach((extensionPoint) => {
214154
- Object.entries(extensionPoint.build_manifest.assets).forEach(([identifier, asset]) => {
214155
- identifier !== AssetIdentifier.Main && (asset.static && asset.module || (assets[identifier] = {
214156
- identifier,
214157
- outputFileName: asset.filepath,
214158
- content: shouldIncludeShopifyExtend ? `import shouldRender from '${asset.module}';shopify.extend('${getShouldRenderTarget(extensionPoint.target)}', (...args) => shouldRender(...args));` : `import '${asset.module}'`
214159
- }));
214160
- });
214161
+ let shouldRenderAsset = buildShouldRenderAsset(extensionPoint, shouldIncludeShopifyExtend);
214162
+ shouldRenderAsset && (assets[AssetIdentifier.ShouldRender] = shouldRenderAsset);
214161
214163
  });
214162
214164
  let assetsArray = Object.values(assets);
214163
214165
  return {
@@ -214166,7 +214168,7 @@ var dependency5 = "@shopify/checkout-ui-extensions", validatePoints = (config2)
214166
214168
  };
214167
214169
  },
214168
214170
  copyStaticAssets: async (config2, directory, outputPath) => {
214169
- isRemoteDomExtension(config2) && await Promise.all(config2.extension_points.map((extensionPoint) => "build_manifest" in extensionPoint ? Object.entries(extensionPoint.build_manifest.assets).map(([_4, asset]) => {
214171
+ isRemoteDomExtension(config2) && await Promise.all(config2.extension_points.flatMap((extensionPoint) => "build_manifest" in extensionPoint ? Object.entries(extensionPoint.build_manifest.assets).map(([_4, asset]) => {
214170
214172
  if (asset.static && asset.module) {
214171
214173
  let sourceFile = joinPath(directory, asset.module), outputFilePath = joinPath(dirname(outputPath), asset.filepath);
214172
214174
  return copyFile(sourceFile, outputFilePath).catch((error) => {
@@ -214174,7 +214176,7 @@ var dependency5 = "@shopify/checkout-ui-extensions", validatePoints = (config2)
214174
214176
  });
214175
214177
  }
214176
214178
  return Promise.resolve();
214177
- }) : Promise.resolve()));
214179
+ }) : []));
214178
214180
  },
214179
214181
  hasExtensionPointTarget: (config2, requestedTarget) => config2.extension_points?.find((extensionPoint) => extensionPoint.target === requestedTarget) !== void 0,
214180
214182
  contributeToSharedTypeFile: async (extension, typeDefinitionsByFile) => {
@@ -214298,6 +214300,15 @@ function isRemoteDomExtension(config2) {
214298
214300
  function getShouldRenderTarget(target) {
214299
214301
  return target.replace(/\.render$/, ".should-render");
214300
214302
  }
214303
+ function buildShouldRenderAsset(extensionPoint, shouldIncludeShopifyExtend) {
214304
+ let shouldRenderAsset = extensionPoint.build_manifest.assets[AssetIdentifier.ShouldRender];
214305
+ if (shouldRenderAsset)
214306
+ return {
214307
+ identifier: AssetIdentifier.ShouldRender,
214308
+ outputFileName: shouldRenderAsset.filepath,
214309
+ content: shouldIncludeShopifyExtend ? `import shouldRender from '${shouldRenderAsset.module}';shopify.extend('${getShouldRenderTarget(extensionPoint.target)}', (...args) => shouldRender(...args));` : `import '${shouldRenderAsset.module}'`
214310
+ };
214311
+ }
214301
214312
  var ui_extension_default = uiExtensionSpec;
214302
214313
 
214303
214314
  // ../app/dist/cli/models/extensions/specifications/web_pixel_extension.js
@@ -216794,6 +216805,71 @@ function organizationBetaFlagsQuery(flags) {
216794
216805
  }`;
216795
216806
  }
216796
216807
 
216808
+ // ../app/dist/cli/api/graphql/business-platform-organizations/generated/organization_exp_flags.js
216809
+ init_cjs_shims();
216810
+ var OrganizationExpFlags = {
216811
+ kind: "Document",
216812
+ definitions: [
216813
+ {
216814
+ kind: "OperationDefinition",
216815
+ operation: "query",
216816
+ name: { kind: "Name", value: "OrganizationExpFlags" },
216817
+ variableDefinitions: [
216818
+ {
216819
+ kind: "VariableDefinition",
216820
+ variable: { kind: "Variable", name: { kind: "Name", value: "organizationId" } },
216821
+ type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "OrganizationID" } } }
216822
+ },
216823
+ {
216824
+ kind: "VariableDefinition",
216825
+ variable: { kind: "Variable", name: { kind: "Name", value: "flagHandles" } },
216826
+ type: {
216827
+ kind: "NonNullType",
216828
+ type: {
216829
+ kind: "ListType",
216830
+ type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }
216831
+ }
216832
+ }
216833
+ }
216834
+ ],
216835
+ selectionSet: {
216836
+ kind: "SelectionSet",
216837
+ selections: [
216838
+ {
216839
+ kind: "Field",
216840
+ name: { kind: "Name", value: "organization" },
216841
+ arguments: [
216842
+ {
216843
+ kind: "Argument",
216844
+ name: { kind: "Name", value: "organizationId" },
216845
+ value: { kind: "Variable", name: { kind: "Name", value: "organizationId" } }
216846
+ }
216847
+ ],
216848
+ selectionSet: {
216849
+ kind: "SelectionSet",
216850
+ selections: [
216851
+ { kind: "Field", name: { kind: "Name", value: "id" } },
216852
+ {
216853
+ kind: "Field",
216854
+ name: { kind: "Name", value: "enabledFlags" },
216855
+ arguments: [
216856
+ {
216857
+ kind: "Argument",
216858
+ name: { kind: "Name", value: "flagHandles" },
216859
+ value: { kind: "Variable", name: { kind: "Name", value: "flagHandles" } }
216860
+ }
216861
+ ]
216862
+ },
216863
+ { kind: "Field", name: { kind: "Name", value: "__typename" } }
216864
+ ]
216865
+ }
216866
+ }
216867
+ ]
216868
+ }
216869
+ }
216870
+ ]
216871
+ };
216872
+
216797
216873
  // ../app/dist/cli/api/graphql/business-platform-destinations/generated/organizations.js
216798
216874
  init_cjs_shims();
216799
216875
  var ListOrganizations = {
@@ -216871,6 +216947,11 @@ var DevSessionCreate = {
216871
216947
  kind: "VariableDefinition",
216872
216948
  variable: { kind: "Variable", name: { kind: "Name", value: "assetsUrl" } },
216873
216949
  type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }
216950
+ },
216951
+ {
216952
+ kind: "VariableDefinition",
216953
+ variable: { kind: "Variable", name: { kind: "Name", value: "websocketUrl" } },
216954
+ type: { kind: "NamedType", name: { kind: "Name", value: "String" } }
216874
216955
  }
216875
216956
  ],
216876
216957
  selectionSet: {
@@ -216889,6 +216970,11 @@ var DevSessionCreate = {
216889
216970
  kind: "Argument",
216890
216971
  name: { kind: "Name", value: "assetsUrl" },
216891
216972
  value: { kind: "Variable", name: { kind: "Name", value: "assetsUrl" } }
216973
+ },
216974
+ {
216975
+ kind: "Argument",
216976
+ name: { kind: "Name", value: "websocketUrl" },
216977
+ value: { kind: "Variable", name: { kind: "Name", value: "websocketUrl" } }
216892
216978
  }
216893
216979
  ],
216894
216980
  selectionSet: {
@@ -219178,7 +219264,7 @@ var TEMPLATE_JSON_URL = "https://cdn.shopify.com/static/cli/extensions/templates
219178
219264
  "This likely means a problem with your internet connection."
219179
219265
  ]);
219180
219266
  }
219181
- let counter = 0, filteredTemplates = (await allowedTemplates(templates2, async (betaFlags) => this.organizationBetaFlags(organizationId, betaFlags))).map((template) => ({ ...template, sortPriority: counter++ })), groupOrder = [];
219267
+ 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 = [];
219182
219268
  for (let template of templates2)
219183
219269
  template.group && !groupOrder.includes(template.group) && groupOrder.push(template.group);
219184
219270
  return {
@@ -219521,12 +219607,12 @@ var TEMPLATE_JSON_URL = "https://cdn.shopify.com/static/cli/extensions/templates
219521
219607
  async appDeepLink({ id, organizationId }) {
219522
219608
  return appDeepLink({ id, organizationId });
219523
219609
  }
219524
- async devSessionCreate({ appId, assetsUrl, shopFqdn }) {
219610
+ async devSessionCreate({ appId, assetsUrl, shopFqdn, websocketUrl }) {
219525
219611
  let appIdNumber = String(numberFromGid(appId));
219526
219612
  return this.appDevRequest({
219527
219613
  query: DevSessionCreate,
219528
219614
  shopFqdn,
219529
- variables: { appId: appIdNumber, assetsUrl: assetsUrl ?? "" },
219615
+ variables: { appId: appIdNumber, assetsUrl: assetsUrl ?? "", websocketUrl },
219530
219616
  requestOptions: { requestMode: "slow-request" }
219531
219617
  });
219532
219618
  }
@@ -219567,6 +219653,21 @@ var TEMPLATE_JSON_URL = "https://cdn.shopify.com/static/cli/extensions/templates
219567
219653
  result[flag] = !!flagsResult.organization[`flag_${flag}`];
219568
219654
  }), result;
219569
219655
  }
219656
+ async organizationExpFlags(organizationId, allExpFlags) {
219657
+ let variables = {
219658
+ organizationId: encodedGidFromOrganizationIdForBP(organizationId),
219659
+ flagHandles: allExpFlags
219660
+ }, flagsResult = await businessPlatformOrganizationsRequestDoc({
219661
+ query: OrganizationExpFlags,
219662
+ token: await this.businessPlatformToken(),
219663
+ organizationId,
219664
+ variables,
219665
+ unauthorizedHandler: this.createUnauthorizedHandler()
219666
+ }), result = {}, enabledFlags = flagsResult.organization?.enabledFlags ?? [];
219667
+ return allExpFlags.forEach((flag, index) => {
219668
+ result[flag] = !!enabledFlags[index];
219669
+ }), result;
219670
+ }
219570
219671
  async appManagementRequest(options) {
219571
219672
  return appManagementRequestDoc({
219572
219673
  ...options,
@@ -219680,11 +219781,14 @@ function diffAppModules({ currentModules, selectedVersionModules }) {
219680
219781
  let currentModuleUids = currentModules.map((mod) => mod.userIdentifier), selectedVersionModuleUids = selectedVersionModules.map((mod) => mod.userIdentifier), added = selectedVersionModules.filter((mod) => !currentModuleUids.includes(mod.userIdentifier)), removed = currentModules.filter((mod) => !selectedVersionModuleUids.includes(mod.userIdentifier)), removedUids = removed.map((mod) => mod.userIdentifier), updated = currentModules.filter((mod) => !removedUids.includes(mod.userIdentifier));
219681
219782
  return { added, removed, updated };
219682
219783
  }
219683
- async function allowedTemplates(templates2, betaFlagsFetcher, version = CLI_KIT_VERSION) {
219684
- let allBetaFlags = Array.from(new Set(templates2.map((ext) => ext.organizationBetaFlags ?? []).flat())), enabledBetaFlags = await betaFlagsFetcher(allBetaFlags);
219784
+ async function allowedTemplates(templates2, betaFlagsFetcher, expFlagsFetcher, version = CLI_KIT_VERSION) {
219785
+ let allBetaFlags = Array.from(new Set(templates2.map((ext) => ext.organizationBetaFlags ?? []).flat())), allExpFlags = Array.from(new Set(templates2.map((ext) => ext.organizationExpFlags ?? []).flat())), [enabledBetaFlags, enabledExpFlags] = await Promise.all([
219786
+ allBetaFlags.length > 0 ? betaFlagsFetcher(allBetaFlags) : Promise.resolve({}),
219787
+ allExpFlags.length > 0 ? expFlagsFetcher(allExpFlags) : Promise.resolve({})
219788
+ ]);
219685
219789
  return templates2.filter((ext) => {
219686
- let hasAnyNeededBetas = !ext.organizationBetaFlags || ext.organizationBetaFlags.every((flag) => enabledBetaFlags[flag]), satisfiesMinCliVersion = !ext.minimumCliVersion || versionSatisfies(version, `>=${ext.minimumCliVersion}`), satisfiesDeprecatedFromCliVersion = !ext.deprecatedFromCliVersion || versionSatisfies(version, `<${ext.deprecatedFromCliVersion}`), satisfiesVersion = satisfiesMinCliVersion && satisfiesDeprecatedFromCliVersion, satisfiesPreReleaseVersion = isPreReleaseVersion(version) && ext.deprecatedFromCliVersion === void 0;
219687
- return hasAnyNeededBetas && (satisfiesVersion || satisfiesPreReleaseVersion);
219790
+ let hasNeededBetaFlags = !ext.organizationBetaFlags || ext.organizationBetaFlags.every((flag) => enabledBetaFlags[flag]), hasNeededExpFlags = !ext.organizationExpFlags || ext.organizationExpFlags.every((flag) => enabledExpFlags[flag]), satisfiesMinCliVersion = !ext.minimumCliVersion || versionSatisfies(version, `>=${ext.minimumCliVersion}`), satisfiesDeprecatedFromCliVersion = !ext.deprecatedFromCliVersion || versionSatisfies(version, `<${ext.deprecatedFromCliVersion}`), satisfiesVersion = satisfiesMinCliVersion && satisfiesDeprecatedFromCliVersion, satisfiesPreReleaseVersion = isPreReleaseVersion(version) && ext.deprecatedFromCliVersion === void 0;
219791
+ return hasNeededBetaFlags && hasNeededExpFlags && (satisfiesVersion || satisfiesPreReleaseVersion);
219688
219792
  });
219689
219793
  }
219690
219794
  function experience(identifier) {
@@ -221731,13 +221835,16 @@ async function prepareAppStoreContext(flags) {
221731
221835
  }
221732
221836
  async function prepareExecuteContext(flags) {
221733
221837
  let query;
221734
- if (flags.query)
221838
+ if (flags.query !== void 0) {
221839
+ if (!flags.query.trim())
221840
+ throw new AbortError("The --query flag value is empty. Please provide a valid GraphQL query or mutation.");
221735
221841
  query = flags.query;
221736
- else if (flags["query-file"]) {
221842
+ } else if (flags["query-file"]) {
221737
221843
  let queryFile = flags["query-file"];
221738
221844
  if (!await fileExists(queryFile))
221739
221845
  throw new AbortError(outputContent`Query file not found at ${outputToken.path(queryFile)}. Please check the path and try again.`);
221740
- query = await readFile(queryFile, { encoding: "utf8" });
221846
+ if (query = await readFile(queryFile, { encoding: "utf8" }), !query.trim())
221847
+ throw new AbortError(outputContent`Query file at ${outputToken.path(queryFile)} is empty. Please provide a valid GraphQL query or mutation.`);
221741
221848
  }
221742
221849
  if (!query)
221743
221850
  throw new BugError("Query should have been provided via --query or --query-file flags due to exactlyOne constraint. This indicates the oclif flag validation failed.");
@@ -223791,7 +223898,8 @@ Deploy2.flags = {
223791
223898
  hidden: !1,
223792
223899
  description: "Creates a version but doesn't release it - it's not made available to merchants. With this flag, a user confirmation is not required.",
223793
223900
  env: "SHOPIFY_FLAG_NO_RELEASE",
223794
- default: !1
223901
+ default: !1,
223902
+ exclusive: ["allow-updates", "allow-deletes"]
223795
223903
  }),
223796
223904
  "no-build": import_core35.Flags.boolean({
223797
223905
  description: "Use with caution: Skips building any elements of the app that require building. You should ensure your app has been prepared in advance, such as by running `shopify app build` or by caching build artifacts.",
@@ -224052,6 +224160,9 @@ async function getUIExtensionPayload(extension, bundlePath, options) {
224052
224160
  lastUpdated: await fileLastUpdatedTimestamp(extensionOutputPath) ?? 0
224053
224161
  }
224054
224162
  },
224163
+ supportedFeatures: {
224164
+ offlineMode: extension.configuration.supported_features?.offline_mode ?? !1
224165
+ },
224055
224166
  capabilities: {
224056
224167
  blockProgress: extension.configuration.capabilities?.block_progress ?? !1,
224057
224168
  networkAccess: extension.configuration.capabilities?.network_access ?? !1,
@@ -224098,34 +224209,43 @@ async function getUIExtensionPayload(extension, bundlePath, options) {
224098
224209
  async function getExtensionPoints(extension, url) {
224099
224210
  let extensionPoints = extension.configuration.extension_points;
224100
224211
  return extension.type === "checkout_post_purchase" && (extensionPoints = [{ target: "purchase.post.render" }]), isNewExtensionPointsSchema(extensionPoints) ? Promise.all(extensionPoints.map(async (extensionPoint) => {
224101
- let { target, resource } = extensionPoint;
224102
- return {
224212
+ let { target, resource } = extensionPoint, payload = {
224103
224213
  ...extensionPoint,
224104
- ...extensionPoint.build_manifest ? { assets: await extractAssetsFromBuildManifest(extensionPoint.build_manifest, url, extension) } : {},
224105
224214
  surface: getExtensionPointTargetSurface(target),
224106
224215
  root: {
224107
224216
  url: `${url}/${target}`
224108
224217
  },
224109
224218
  resource: resource || { url: "" }
224110
224219
  };
224220
+ return "build_manifest" in extensionPoint ? {
224221
+ ...payload,
224222
+ ...await mapBuildManifestToPayload(extensionPoint.build_manifest, extensionPoint, url, extension)
224223
+ } : payload;
224111
224224
  })) : extensionPoints;
224112
224225
  }
224113
- async function extractAssetsFromBuildManifest(buildManifest, url, extension) {
224114
- if (!buildManifest?.assets)
224115
- return {};
224116
- let assets = {};
224117
- for (let [name, asset] of Object.entries(buildManifest.assets))
224118
- assets[name] = {
224119
- name,
224120
- url: `${url}${joinPath("/assets/", asset.filepath)}`,
224121
- // eslint-disable-next-line no-await-in-loop
224122
- lastUpdated: await fileLastUpdatedTimestamp(joinPath(dirname(extension.outputPath), asset.filepath)) ?? 0
224123
- };
224124
- return assets;
224226
+ async function defaultAssetMapper({ identifier, asset, url, extension }) {
224227
+ let payload = await getAssetPayload(identifier, asset, url, extension);
224228
+ return {
224229
+ assets: { [payload.name]: payload }
224230
+ };
224231
+ }
224232
+ async function mapBuildManifestToPayload(buildManifest, _extensionPoint, url, extension) {
224233
+ return buildManifest?.assets ? (await Promise.all(Object.entries(buildManifest.assets).map(async ([identifier, asset]) => defaultAssetMapper({ identifier, asset, url, extension })))).reduce((acc, result) => ({
224234
+ ...acc,
224235
+ ...result,
224236
+ assets: { ...acc.assets, ...result.assets }
224237
+ }), {}) : {};
224125
224238
  }
224126
224239
  function isNewExtensionPointsSchema(extensionPoints) {
224127
224240
  return Array.isArray(extensionPoints) && extensionPoints.every((extensionPoint) => typeof extensionPoint == "object");
224128
224241
  }
224242
+ async function getAssetPayload(name, asset, url, extension) {
224243
+ return {
224244
+ name,
224245
+ url: `${url}${joinPath("/assets/", asset.filepath)}`,
224246
+ lastUpdated: await fileLastUpdatedTimestamp(joinPath(dirname(extension.outputPath), asset.filepath)) ?? 0
224247
+ };
224248
+ }
224129
224249
 
224130
224250
  // ../app/dist/cli/utilities/app/app-url.js
224131
224251
  init_cjs_shims();
@@ -224999,7 +225119,7 @@ function getExtensionPayloadMiddleware({ devOptions, getExtensions: getExtension
224999
225119
  url: new URL("/extensions", devOptions.url).toString()
225000
225120
  },
225001
225121
  socket: {
225002
- url: getWebsocketUrl(devOptions)
225122
+ url: getWebSocketUrl(devOptions.url)
225003
225123
  },
225004
225124
  devConsole: {
225005
225125
  url: new URL("/extensions/dev-console", devOptions.url).toString()
@@ -225031,10 +225151,6 @@ function getExtensionPointMiddleware({ devOptions, getExtensions: getExtensions2
225031
225151
  await sendRedirect(response.event, url, 307);
225032
225152
  };
225033
225153
  }
225034
- function getWebsocketUrl(devOptions) {
225035
- let socket = new URL("/extensions", devOptions.url);
225036
- return socket.protocol = "wss:", socket.toString();
225037
- }
225038
225154
 
225039
225155
  // ../app/dist/cli/services/dev/extension/server.js
225040
225156
  import { createServer as createServer4 } from "http";
@@ -225708,7 +225824,7 @@ function graphiqlTemplate({ apiVersion, apiVersions, appName, appUrl, key, store
225708
225824
  {query: "{%if query.preface %}{{query.preface}}\\n{% endif %}{{query.query}}", variables: "{{query.variables}}"},
225709
225825
  {%endfor%}
225710
225826
  ],
225711
- isHeadersEditorEnabled: false,
225827
+ isHeadersEditorEnabled: true,
225712
225828
  }),
225713
225829
  document.getElementById('graphiql-explorer'),
225714
225830
  )
@@ -225932,6 +226048,35 @@ var import_react6 = __toESM(require_react(), 1), import_server8 = __toESM(requir
225932
226048
  </html>
225933
226049
  `;
225934
226050
 
226051
+ // ../app/dist/cli/services/dev/graphiql/utilities.js
226052
+ init_cjs_shims();
226053
+ var BLOCKED_HEADERS = /* @__PURE__ */ new Set([
226054
+ // Hop-by-hop headers (RFC 7230 Section 6.1)
226055
+ "connection",
226056
+ "keep-alive",
226057
+ "proxy-authenticate",
226058
+ "proxy-authorization",
226059
+ "te",
226060
+ "trailer",
226061
+ "transfer-encoding",
226062
+ "upgrade",
226063
+ // Headers the proxy controls
226064
+ "host",
226065
+ "content-length",
226066
+ "content-type",
226067
+ "accept",
226068
+ "user-agent",
226069
+ "authorization",
226070
+ "cookie",
226071
+ "x-shopify-access-token"
226072
+ ]);
226073
+ function filterCustomHeaders(headers) {
226074
+ let customHeaders = {};
226075
+ for (let [key, value] of Object.entries(headers))
226076
+ !BLOCKED_HEADERS.has(key.toLowerCase()) && typeof value == "string" && (customHeaders[key] = value);
226077
+ return customHeaders;
226078
+ }
226079
+
225935
226080
  // ../app/dist/cli/services/dev/graphiql/server.js
225936
226081
  var import_express = __toESM(require_express2(), 1), import_body_parser = __toESM(require_body_parser(), 1);
225937
226082
  import { createRequire as createRequire5 } from "module";
@@ -226025,8 +226170,9 @@ function setupGraphiQLServer({ stdout, port, appName, appUrl, apiKey, apiSecret,
226025
226170
  return;
226026
226171
  let graphqlUrl = adminUrl(storeFqdn, req.query.api_version);
226027
226172
  try {
226028
- let reqBody = JSON.stringify(req.body), runRequest = async () => {
226173
+ let reqBody = JSON.stringify(req.body), customHeaders = filterCustomHeaders(req.headers), runRequest = async () => {
226029
226174
  let headers = {
226175
+ ...customHeaders,
226030
226176
  Accept: "application/json",
226031
226177
  "Content-Type": "application/json",
226032
226178
  "X-Shopify-Access-Token": await token(),
@@ -226357,10 +226503,11 @@ var DevSession = class _DevSession {
226357
226503
  /**
226358
226504
  * Update the preview URL, it only changes if we move between a non-previewable state and a previewable state.
226359
226505
  * (i.e. if we go from a state with no extensions to a state with ui-extensions or vice versa)
226506
+ * Skip the dev console only when BOTH: SHOPIFY_CLI_1P_DEV is NOT enabled AND SHOPIFY_SKIP_LOCAL_DEV_CONSOLE is set.
226360
226507
  * @param event - The app event
226361
226508
  */
226362
226509
  updatePreviewURL(event) {
226363
- let newPreviewURL = event.app.allExtensions.filter((ext) => ext.isPreviewable).length > 0 ? this.options.appLocalProxyURL : this.options.appPreviewURL;
226510
+ let hasPreview = event.app.allExtensions.filter((ext) => ext.isPreviewable).length > 0, newPreviewURL = !(!firstPartyDev() && skipLocalDevConsole()) && hasPreview ? this.options.appLocalProxyURL : this.options.appPreviewURL;
226364
226511
  this.statusManager.updateStatus({ previewURL: newPreviewURL });
226365
226512
  }
226366
226513
  /**
@@ -226382,14 +226529,25 @@ var DevSession = class _DevSession {
226382
226529
  */
226383
226530
  async bundleExtensionsAndUpload(appEvent) {
226384
226531
  try {
226385
- let { manifest, inheritedModuleUids, assets } = await this.createManifest(appEvent), signedURL = await this.uploadAssetsIfNeeded(assets, !this.statusManager.status.isReady), payload = {
226386
- shopFqdn: this.options.storeFqdn,
226387
- appId: this.options.appId,
226388
- assetsUrl: signedURL,
226389
- manifest,
226390
- inheritedModuleUids
226391
- };
226392
- return this.statusManager.status.isReady ? this.devSessionUpdateWithRetry(payload) : this.devSessionCreateWithRetry(payload);
226532
+ let { manifest, inheritedModuleUids, assets } = await this.createManifest(appEvent), signedURL = await this.uploadAssetsIfNeeded(assets, !this.statusManager.status.isReady), websocketUrl = getWebSocketUrl(this.options.url);
226533
+ if (this.statusManager.status.isReady) {
226534
+ let payload = {
226535
+ shopFqdn: this.options.storeFqdn,
226536
+ appId: this.options.appId,
226537
+ assetsUrl: signedURL,
226538
+ manifest,
226539
+ inheritedModuleUids
226540
+ };
226541
+ return this.devSessionUpdateWithRetry(payload);
226542
+ } else {
226543
+ let payload = {
226544
+ shopFqdn: this.options.storeFqdn,
226545
+ appId: this.options.appId,
226546
+ assetsUrl: signedURL,
226547
+ websocketUrl
226548
+ };
226549
+ return this.devSessionCreateWithRetry(payload);
226550
+ }
226393
226551
  } catch (error) {
226394
226552
  if (error.statusCode === 401)
226395
226553
  throw new Error("Unauthorized");
@@ -227119,7 +227277,7 @@ function match(rules, req, websocket = !1) {
227119
227277
 
227120
227278
  // ../app/dist/cli/services/dev/processes/setup-dev-processes.js
227121
227279
  async function setupDevProcesses({ localApp, remoteAppUpdated, developerPlatformClient, remoteApp, storeFqdn, storeId, commandOptions, network, graphiqlPort, graphiqlKey }) {
227122
- let apiKey = remoteApp.apiKey, apiSecret = remoteApp.apiSecretKeys[0]?.secret ?? "", appPreviewUrl = buildAppURLForWeb(storeFqdn, apiKey), env4 = getEnvironmentVariables(), shouldRenderGraphiQL = !isTruthy(env4[environmentVariableNames.disableGraphiQLExplorer]), reloadedApp = await reloadApp(localApp), appWatcher = new AppEventWatcher(reloadedApp, network.proxyUrl), anyPreviewableExtensions = reloadedApp.allExtensions.some((ext) => ext.isPreviewable), devConsoleURL = `${network.proxyUrl}/extensions/dev-console`, previewURL = anyPreviewableExtensions ? devConsoleURL : appPreviewUrl, graphiqlURL = shouldRenderGraphiQL ? `http://localhost:${graphiqlPort}/graphiql${graphiqlKey ? `?key=${graphiqlKey}` : ""}` : void 0, devSessionStatusManager = new DevSessionStatusManager({ isReady: !1, previewURL, graphiqlURL }), processes = [
227280
+ let apiKey = remoteApp.apiKey, apiSecret = remoteApp.apiSecretKeys[0]?.secret ?? "", appPreviewUrl = buildAppURLForWeb(storeFqdn, apiKey), env4 = getEnvironmentVariables(), shouldRenderGraphiQL = !isTruthy(env4[environmentVariableNames.disableGraphiQLExplorer]), reloadedApp = await reloadApp(localApp), appWatcher = new AppEventWatcher(reloadedApp, network.proxyUrl), anyPreviewableExtensions = reloadedApp.allExtensions.some((ext) => ext.isPreviewable), devConsoleURL = `${network.proxyUrl}/extensions/dev-console`, previewURL = !(!firstPartyDev() && skipLocalDevConsole()) && anyPreviewableExtensions ? devConsoleURL : appPreviewUrl, graphiqlURL = shouldRenderGraphiQL ? `http://localhost:${graphiqlPort}/graphiql${graphiqlKey ? `?key=${graphiqlKey}` : ""}` : void 0, devSessionStatusManager = new DevSessionStatusManager({ isReady: !1, previewURL, graphiqlURL }), processes = [
227123
227281
  ...await setupWebProcesses({
227124
227282
  webs: reloadedApp.webs,
227125
227283
  proxyUrl: network.proxyUrl,
@@ -229083,8 +229241,7 @@ var StagedUploadsCreate = {
229083
229241
 
229084
229242
  // ../app/dist/cli/services/bulk-operations/stage-file.js
229085
229243
  async function stageFile(options) {
229086
- let { adminSession, variablesJsonl } = options, buffer = Buffer.from(variablesJsonl ? `${variablesJsonl}
229087
- ` : "", "utf-8"), filename = "bulk-variables.jsonl", size = buffer.length, response = await requestStagedUpload(adminSession, filename, size), target = validateStagedUploadResponse(response);
229244
+ let { adminSession, variablesJsonl } = options, buffer = Buffer.from(variablesJsonl ?? "", "utf-8"), filename = "bulk-variables.jsonl", size = buffer.length, response = await requestStagedUpload(adminSession, filename, size), target = validateStagedUploadResponse(response);
229088
229245
  return await uploadFileToStagedUrl(buffer, target.url, target.parameters, filename), target.stagedUploadKey;
229089
229246
  }
229090
229247
  async function requestStagedUpload(adminSession, filename, size) {
@@ -229389,7 +229546,11 @@ async function executeBulkOperation(input) {
229389
229546
  }) : await renderBulkOperationResult(operation, outputFile);
229390
229547
  } else {
229391
229548
  let operation = await shortBulkOperationPoll(adminSession, createdOperation.id);
229392
- await renderBulkOperationResult(operation, outputFile);
229549
+ ["FAILED", "CANCELED", "EXPIRED"].includes(operation.status) ? await renderBulkOperationResult(operation, outputFile) : renderSuccess({
229550
+ headline: "Bulk operation is running.",
229551
+ body: statusCommandHelpMessage(operation.id),
229552
+ customSections: [{ body: [{ list: { items: [outputContent`ID: ${outputToken.cyan(operation.id)}`.value] } }] }]
229553
+ });
229393
229554
  }
229394
229555
  else
229395
229556
  throw renderWarning({
@@ -229450,6 +229611,8 @@ function resultsContainUserErrors(results) {
229450
229611
  });
229451
229612
  }
229452
229613
  function validateBulkOperationVariables(graphqlOperation, variablesJsonl) {
229614
+ if (isMutation(graphqlOperation) && !variablesJsonl)
229615
+ throw new AbortError(outputContent`Bulk mutations require variables. Provide a JSONL file with ${outputToken.yellow("--variable-file")} or individual JSON objects with ${outputToken.yellow("--variables")}.`);
229453
229616
  if (!isMutation(graphqlOperation) && variablesJsonl)
229454
229617
  throw new AbortError(outputContent`The ${outputToken.yellow("--variables")} and ${outputToken.yellow("--variable-file")} flags can only be used with mutations, not queries.`);
229455
229618
  }