@shopify/create-app 3.65.2 → 3.66.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 (86) hide show
  1. package/dist/chunk-2RSJVBMF.js +5625 -0
  2. package/dist/{chunk-Z65QJ5D7.js → chunk-4DRC2PSU.js} +17 -30
  3. package/dist/chunk-4OD45DDO.js +31508 -0
  4. package/dist/chunk-522OB3EU.js +45 -0
  5. package/dist/{chunk-JTKTLA7L.js → chunk-5U24TEX5.js} +5434 -10324
  6. package/dist/{chunk-GJPZCXGT.js → chunk-6A7MXLVB.js} +159 -405
  7. package/dist/{chunk-ZYKRTO5P.js → chunk-7ZCQLP5Y.js} +3 -3
  8. package/dist/{chunk-5LBEKXRW.js → chunk-FIJKOZJF.js} +19 -55
  9. package/dist/{chunk-QSKQTKTB.js → chunk-FT6PCF6E.js} +2441 -5551
  10. package/dist/chunk-GIUM5DCQ.js +2144 -0
  11. package/dist/chunk-HIAKHDLR.js +54 -0
  12. package/dist/chunk-LLSRDN3T.js +15352 -0
  13. package/dist/chunk-LTDD2GRL.js +111 -0
  14. package/dist/{chunk-63QVG2CD.js → chunk-NGBYQF44.js} +9 -9
  15. package/dist/chunk-NLC7NBUB.js +80 -0
  16. package/dist/{chunk-FMKVOTQK.js → chunk-O5K4AU7Q.js} +18 -34
  17. package/dist/chunk-OMDEA7TV.js +10615 -0
  18. package/dist/chunk-PNN7RS7Y.js +105 -0
  19. package/dist/{chunk-ZPL24Y2D.js → chunk-POZ5MGPT.js} +13 -18
  20. package/dist/chunk-T7T35H4F.js +108 -0
  21. package/dist/chunk-UBB7JKND.js +55 -0
  22. package/dist/chunk-VSLR7ET4.js +3034 -0
  23. package/dist/{chunk-SAO7C4LP.js → chunk-VZVGAREJ.js} +46821 -101962
  24. package/dist/{chunk-KDNBKIH4.js → chunk-WBQF4CSV.js} +12 -22
  25. package/dist/chunk-XVNW332R.js +524 -0
  26. package/dist/{chunk-YB6D4XQ7.js → chunk-Y4ECGRAF.js} +13 -23
  27. package/dist/chunk-ZAUZQLNO.js +3774 -0
  28. package/dist/chunk-ZULFH3SL.js +1847 -0
  29. package/dist/commands/init.d.ts +0 -1
  30. package/dist/commands/init.js +27 -27
  31. package/dist/commands/init.test.js +51 -70
  32. package/dist/{constants-24TFXZKQ.js → constants-WG7I7G3O.js} +5 -5
  33. package/dist/custom-oclif-loader-JKRJZ56E.js +47 -0
  34. package/dist/del-NW5KFKFP.js +1820 -0
  35. package/dist/devtools-UBOREV57.js +2572 -0
  36. package/dist/error-handler-26SLAJTC.js +35 -0
  37. package/dist/hooks/postrun.js +35 -42
  38. package/dist/hooks/prerun.js +58 -36
  39. package/dist/index.js +7 -7
  40. package/dist/lib-3K5QYF3J.js +9 -0
  41. package/dist/{local-3VUKCW4R.js → local-H6TW5MNX.js} +13 -13
  42. package/dist/magic-string.es-3RXPUXZF.js +843 -0
  43. package/dist/multipart-parser-QKUAJJP5.js +193 -0
  44. package/dist/{node-package-manager-HYZRZNU6.js → node-package-manager-QAUN6HGS.js} +16 -14
  45. package/dist/open-MZGVNFZO.js +197 -0
  46. package/dist/out-KDGAD475.js +6 -0
  47. package/dist/{path-CFPIDSWV.js → path-L375JOQ2.js} +4 -4
  48. package/dist/prompts/init.js +13 -13
  49. package/dist/prompts/init.test.js +42 -59
  50. package/dist/services/init.js +20 -20
  51. package/dist/services/init.test.js +5 -5
  52. package/dist/system-ZI2HKAKO.js +26 -0
  53. package/dist/tsconfig.tsbuildinfo +1 -1
  54. package/dist/{ui-7NEDEALP.js → ui-727JEZUX.js} +13 -13
  55. package/dist/utils/template/cleanup.js +13 -13
  56. package/dist/utils/template/cleanup.test.js +18 -30
  57. package/dist/utils/template/npm.js +15 -15
  58. package/dist/utils/template/npm.test.js +48 -87
  59. package/oclif.manifest.json +1 -1
  60. package/package.json +3 -4
  61. package/dist/chunk-3US34ZNP.js +0 -145
  62. package/dist/chunk-3XYIOBQ2.js +0 -22131
  63. package/dist/chunk-6IZMEXPW.js +0 -105
  64. package/dist/chunk-7DRS5WXI.js +0 -7843
  65. package/dist/chunk-DL3MKXVR.js +0 -4754
  66. package/dist/chunk-HDVJ5FPK.js +0 -63
  67. package/dist/chunk-IKO7JBOJ.js +0 -14788
  68. package/dist/chunk-LSCXQWNO.js +0 -822
  69. package/dist/chunk-M2VKB6RG.js +0 -146
  70. package/dist/chunk-MCED27CG.js +0 -5626
  71. package/dist/chunk-SWNRLCC6.js +0 -61
  72. package/dist/chunk-T5LLJYYS.js +0 -195
  73. package/dist/chunk-U5LTJVWL.js +0 -3185
  74. package/dist/chunk-WR7YKB6H.js +0 -44962
  75. package/dist/chunk-YC4FLMDD.js +0 -74
  76. package/dist/chunk-ZRUHMMSQ.js +0 -2477
  77. package/dist/custom-oclif-loader-5KBN3RSN.js +0 -83
  78. package/dist/del-ZCPTGWOA.js +0 -2847
  79. package/dist/devtools-5N4JAP3R.js +0 -3588
  80. package/dist/error-handler-GTW2KSRC.js +0 -35
  81. package/dist/lib-CTSCLPNV.js +0 -9
  82. package/dist/magic-string.es-ATGURXGQ.js +0 -1353
  83. package/dist/multipart-parser-KYOHF24X.js +0 -360
  84. package/dist/open-JRS7RW22.js +0 -291
  85. package/dist/out-OKI3G7I5.js +0 -6
  86. package/dist/system-4S4YXUXZ.js +0 -26
@@ -0,0 +1,111 @@
1
+ import {
2
+ init_cjs_shims
3
+ } from "./chunk-POZ5MGPT.js";
4
+
5
+ // ../cli-kit/src/public/node/context/utilities.ts
6
+ init_cjs_shims();
7
+ function isTruthy(variable) {
8
+ return variable ? ["1", "true", "TRUE", "yes", "YES"].includes(variable) : !1;
9
+ }
10
+
11
+ // ../cli-kit/src/private/node/demo-recorder.ts
12
+ init_cjs_shims();
13
+ var DemoRecorder = class {
14
+ constructor() {
15
+ this.recorded = [], this.sleepStart = Date.now(), this.command = ["shopify", ...process.argv.slice(2)].join(" ");
16
+ }
17
+ addEvent({ type, properties }) {
18
+ type === "taskbar" ? this.resetSleep() : this.addSleep(), this.recorded.push({ type, properties: JSON.parse(JSON.stringify(properties)) }), this.sleepStart = Date.now();
19
+ }
20
+ recordedEventsJson() {
21
+ return JSON.stringify(
22
+ {
23
+ command: this.command,
24
+ steps: this.withFormattedConcurrent(this.recorded)
25
+ },
26
+ null,
27
+ 2
28
+ );
29
+ }
30
+ addSleep() {
31
+ let duration = (Date.now() - this.sleepStart) / 1e3;
32
+ this.sleepStart = Date.now(), duration > 0.1 && this.recorded.push({ type: "sleep", properties: { duration } });
33
+ }
34
+ resetSleep() {
35
+ this.sleepStart = Date.now();
36
+ }
37
+ addOrUpdateConcurrentOutput({ prefix, index, output }) {
38
+ let last = this.recorded[this.recorded.length - 1];
39
+ if (last?.type === "concurrent")
40
+ this.resetSleep();
41
+ else {
42
+ let eventProperties = {
43
+ type: "concurrent",
44
+ properties: { processes: [], concurrencyStart: Date.now() }
45
+ };
46
+ this.addEvent(eventProperties), last = this.recorded[this.recorded.length - 1];
47
+ }
48
+ let { processes } = last.properties;
49
+ for (; processes.length <= index; )
50
+ processes.push({ prefix: "", steps: [] });
51
+ processes[index].prefix = prefix, processes[index].steps.push({ timestamp: Date.now(), endMessage: output });
52
+ }
53
+ withFormattedConcurrent(recorded) {
54
+ return recorded.map((event) => {
55
+ if (event.type === "concurrent") {
56
+ let { processes, footer, concurrencyStart } = event.properties, formatted = processes.map(({ prefix, steps }) => {
57
+ let mostRecentTimestamp = concurrencyStart, formattedSteps = steps.map(({ timestamp, endMessage }) => {
58
+ let duration = (timestamp - mostRecentTimestamp) / 1e3;
59
+ return mostRecentTimestamp = timestamp, { duration, endMessage };
60
+ });
61
+ return { prefix, steps: formattedSteps };
62
+ });
63
+ return { type: "concurrent", properties: { footer, processes: formatted } };
64
+ }
65
+ return event;
66
+ });
67
+ }
68
+ }, NoopDemoRecorder = class {
69
+ addEvent(_event) {
70
+ }
71
+ recordedEventsJson() {
72
+ return JSON.stringify({ steps: [] }, null, 2);
73
+ }
74
+ addSleep() {
75
+ }
76
+ resetSleep() {
77
+ }
78
+ addOrUpdateConcurrentOutput(..._args) {
79
+ }
80
+ }, _instance;
81
+ function ensureInstance() {
82
+ _instance || (isRecording() ? _instance = new DemoRecorder() : _instance = new NoopDemoRecorder());
83
+ }
84
+ function initDemoRecorder() {
85
+ ensureInstance();
86
+ }
87
+ function recordUIEvent(event) {
88
+ ensureInstance(), _instance.addEvent(event);
89
+ }
90
+ function resetRecordedSleep() {
91
+ ensureInstance(), _instance.resetSleep();
92
+ }
93
+ function printEventsJson() {
94
+ isRecording() && (ensureInstance(), _instance.addSleep(), console.log(_instance.recordedEventsJson()));
95
+ }
96
+ function addOrUpdateConcurrentUIEventOutput(data) {
97
+ ensureInstance(), _instance.addOrUpdateConcurrentOutput(data);
98
+ }
99
+ function isRecording() {
100
+ return isTruthy(process.env.RECORD_DEMO);
101
+ }
102
+
103
+ export {
104
+ isTruthy,
105
+ initDemoRecorder,
106
+ recordUIEvent,
107
+ resetRecordedSleep,
108
+ printEventsJson,
109
+ addOrUpdateConcurrentUIEventOutput
110
+ };
111
+ //# sourceMappingURL=chunk-LTDD2GRL.js.map
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  glob,
3
3
  rmdir
4
- } from "./chunk-WR7YKB6H.js";
4
+ } from "./chunk-4OD45DDO.js";
5
5
  import {
6
6
  joinPath
7
- } from "./chunk-Z65QJ5D7.js";
7
+ } from "./chunk-4DRC2PSU.js";
8
8
  import {
9
9
  init_cjs_shims
10
- } from "./chunk-ZPL24Y2D.js";
10
+ } from "./chunk-POZ5MGPT.js";
11
11
 
12
12
  // src/utils/template/cleanup.ts
13
13
  init_cjs_shims();
14
14
  async function cleanup(webOutputDirectory) {
15
- const gitPaths = await glob(
15
+ let gitPaths = await glob(
16
16
  [
17
17
  joinPath(webOutputDirectory, "**", ".git"),
18
18
  joinPath(webOutputDirectory, "**", ".github"),
@@ -22,17 +22,17 @@ async function cleanup(webOutputDirectory) {
22
22
  joinPath(webOutputDirectory, "package.json.cli2")
23
23
  ],
24
24
  {
25
- dot: true,
26
- onlyFiles: false,
27
- onlyDirectories: false,
25
+ dot: !0,
26
+ onlyFiles: !1,
27
+ onlyDirectories: !1,
28
28
  ignore: ["**/node_modules/**"]
29
29
  }
30
30
  );
31
- return Promise.all(gitPaths.map((path) => rmdir(path, { force: true }))).then(() => {
31
+ return Promise.all(gitPaths.map((path) => rmdir(path, { force: !0 }))).then(() => {
32
32
  });
33
33
  }
34
34
 
35
35
  export {
36
36
  cleanup
37
37
  };
38
- //# sourceMappingURL=chunk-63QVG2CD.js.map
38
+ //# sourceMappingURL=chunk-NGBYQF44.js.map
@@ -0,0 +1,80 @@
1
+ import {
2
+ isTruthy,
3
+ printEventsJson
4
+ } from "./chunk-LTDD2GRL.js";
5
+ import {
6
+ require_lib
7
+ } from "./chunk-VZVGAREJ.js";
8
+ import {
9
+ __toESM,
10
+ init_cjs_shims
11
+ } from "./chunk-POZ5MGPT.js";
12
+
13
+ // ../cli-kit/src/public/node/cli.ts
14
+ init_cjs_shims();
15
+ var import_core = __toESM(require_lib(), 1);
16
+ import { fileURLToPath } from "url";
17
+ async function warnIfOldNodeVersion() {
18
+ let nodeVersion = process.versions.node, nodeMajorVersion = Number(nodeVersion.split(".")[0]);
19
+ if (nodeMajorVersion < 18) {
20
+ let { renderWarning } = await import("./ui-727JEZUX.js");
21
+ renderWarning({
22
+ headline: "Upgrade to a supported Node version now.",
23
+ body: [
24
+ `Node ${nodeMajorVersion} has reached end-of-life and poses security risks. When you upgrade to a`,
25
+ {
26
+ link: {
27
+ url: "https://nodejs.dev/en/about/previous-releases",
28
+ label: "supported version"
29
+ }
30
+ },
31
+ { char: "," },
32
+ "you'll be able to use Shopify CLI without interruption."
33
+ ]
34
+ });
35
+ }
36
+ }
37
+ function setupEnvironmentVariables(options) {
38
+ process.argv.includes("--verbose") && (process.env.DEBUG = process.env.DEBUG ?? "*"), options.development && (process.env.SHOPIFY_CLI_ENV = process.env.SHOPIFY_CLI_ENV ?? "development");
39
+ }
40
+ function forceNoColor() {
41
+ (process.argv.includes("--no-color") || isTruthy(process.env.NO_COLOR) || isTruthy(process.env.SHOPIFY_FLAG_NO_COLOR) || process.env.TERM === "dumb") && (process.env.FORCE_COLOR = "0");
42
+ }
43
+ async function runCLI(options) {
44
+ setupEnvironmentVariables(options), forceNoColor(), await warnIfOldNodeVersion();
45
+ let { errorHandler } = await import("./error-handler-26SLAJTC.js"), { isDevelopment } = await import("./local-H6TW5MNX.js"), oclif = await import("./lib-3K5QYF3J.js"), { ShopifyConfig } = await import("./custom-oclif-loader-JKRJZ56E.js");
46
+ isDevelopment() && (oclif.default.settings.debug = !0);
47
+ try {
48
+ let config = new ShopifyConfig({ root: fileURLToPath(options.moduleURL) });
49
+ await config.load(), await oclif.default.run(void 0, config), await oclif.default.flush(), printEventsJson();
50
+ } catch (error) {
51
+ return await errorHandler(error), oclif.default.Errors.handle(error);
52
+ }
53
+ }
54
+ async function runCreateCLI(options) {
55
+ setupEnvironmentVariables(options);
56
+ let { findUpAndReadPackageJson } = await import("./node-package-manager-QAUN6HGS.js"), { moduleDirectory } = await import("./path-L375JOQ2.js"), name = (await findUpAndReadPackageJson(moduleDirectory(options.moduleURL))).content.name.replace("@shopify/create-", "");
57
+ if (process.argv.findIndex((arg) => arg.includes("init")) === -1) {
58
+ let initIndex2 = process.argv.findIndex((arg) => arg.match(new RegExp(`bin(\\/|\\\\)+(create-${name}|dev|run)`))) + 1;
59
+ process.argv.splice(initIndex2, 0, "init");
60
+ }
61
+ await runCLI(options);
62
+ }
63
+ var globalFlags = {
64
+ "no-color": import_core.Flags.boolean({
65
+ hidden: !1,
66
+ description: "Disable color output.",
67
+ env: "SHOPIFY_FLAG_NO_COLOR"
68
+ }),
69
+ verbose: import_core.Flags.boolean({
70
+ hidden: !1,
71
+ description: "Increase the verbosity of the output.",
72
+ env: "SHOPIFY_FLAG_VERBOSE"
73
+ })
74
+ };
75
+
76
+ export {
77
+ runCreateCLI,
78
+ globalFlags
79
+ };
80
+ //# sourceMappingURL=chunk-NLC7NBUB.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  __commonJS,
3
3
  init_cjs_shims
4
- } from "./chunk-ZPL24Y2D.js";
4
+ } from "./chunk-POZ5MGPT.js";
5
5
 
6
6
  // ../../node_modules/.pnpm/wrappy@1.0.2/node_modules/wrappy/wrappy.js
7
7
  var require_wrappy = __commonJS({
@@ -11,25 +11,18 @@ var require_wrappy = __commonJS({
11
11
  function wrappy(fn, cb) {
12
12
  if (fn && cb)
13
13
  return wrappy(fn)(cb);
14
- if (typeof fn !== "function")
14
+ if (typeof fn != "function")
15
15
  throw new TypeError("need wrapper function");
16
- Object.keys(fn).forEach(function(k) {
16
+ return Object.keys(fn).forEach(function(k) {
17
17
  wrapper[k] = fn[k];
18
- });
19
- return wrapper;
18
+ }), wrapper;
20
19
  function wrapper() {
21
- var args = new Array(arguments.length);
22
- for (var i = 0; i < args.length; i++) {
20
+ for (var args = new Array(arguments.length), i = 0; i < args.length; i++)
23
21
  args[i] = arguments[i];
24
- }
25
- var ret = fn.apply(this, args);
26
- var cb2 = args[args.length - 1];
27
- if (typeof ret === "function" && ret !== cb2) {
28
- Object.keys(cb2).forEach(function(k) {
29
- ret[k] = cb2[k];
30
- });
31
- }
32
- return ret;
22
+ var ret = fn.apply(this, args), cb2 = args[args.length - 1];
23
+ return typeof ret == "function" && ret !== cb2 && Object.keys(cb2).forEach(function(k) {
24
+ ret[k] = cb2[k];
25
+ }), ret;
33
26
  }
34
27
  }
35
28
  }
@@ -47,36 +40,27 @@ var require_once = __commonJS({
47
40
  value: function() {
48
41
  return once(this);
49
42
  },
50
- configurable: true
51
- });
52
- Object.defineProperty(Function.prototype, "onceStrict", {
43
+ configurable: !0
44
+ }), Object.defineProperty(Function.prototype, "onceStrict", {
53
45
  value: function() {
54
46
  return onceStrict(this);
55
47
  },
56
- configurable: true
48
+ configurable: !0
57
49
  });
58
50
  });
59
51
  function once(fn) {
60
52
  var f = function() {
61
- if (f.called)
62
- return f.value;
63
- f.called = true;
64
- return f.value = fn.apply(this, arguments);
53
+ return f.called ? f.value : (f.called = !0, f.value = fn.apply(this, arguments));
65
54
  };
66
- f.called = false;
67
- return f;
55
+ return f.called = !1, f;
68
56
  }
69
57
  function onceStrict(fn) {
70
58
  var f = function() {
71
59
  if (f.called)
72
60
  throw new Error(f.onceError);
73
- f.called = true;
74
- return f.value = fn.apply(this, arguments);
75
- };
76
- var name = fn.name || "Function wrapped with `once`";
77
- f.onceError = name + " shouldn't be called more than once";
78
- f.called = false;
79
- return f;
61
+ return f.called = !0, f.value = fn.apply(this, arguments);
62
+ }, name = fn.name || "Function wrapped with `once`";
63
+ return f.onceError = name + " shouldn't be called more than once", f.called = !1, f;
80
64
  }
81
65
  }
82
66
  });
@@ -85,4 +69,4 @@ export {
85
69
  require_wrappy,
86
70
  require_once
87
71
  };
88
- //# sourceMappingURL=chunk-FMKVOTQK.js.map
72
+ //# sourceMappingURL=chunk-O5K4AU7Q.js.map