@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,105 @@
1
+ import {
2
+ init_cjs_shims
3
+ } from "./chunk-POZ5MGPT.js";
4
+
5
+ // ../../node_modules/.pnpm/pathe@1.1.1/node_modules/pathe/dist/shared/pathe.92c04245.mjs
6
+ init_cjs_shims();
7
+ function normalizeWindowsPath(input = "") {
8
+ return !input || !input.includes("\\") ? input : input.replace(/\\/g, "/");
9
+ }
10
+ var _UNC_REGEX = /^[/\\]{2}/, _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/, _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
11
+ var normalize = function(path2) {
12
+ if (path2.length === 0)
13
+ return ".";
14
+ path2 = normalizeWindowsPath(path2);
15
+ let isUNCPath = path2.match(_UNC_REGEX), isPathAbsolute = isAbsolute(path2), trailingSeparator = path2[path2.length - 1] === "/";
16
+ return path2 = normalizeString(path2, !isPathAbsolute), path2.length === 0 ? isPathAbsolute ? "/" : trailingSeparator ? "./" : "." : (trailingSeparator && (path2 += "/"), _DRIVE_LETTER_RE.test(path2) && (path2 += "/"), isUNCPath ? isPathAbsolute ? `//${path2}` : `//./${path2}` : isPathAbsolute && !isAbsolute(path2) ? `/${path2}` : path2);
17
+ }, join = function(...arguments_) {
18
+ if (arguments_.length === 0)
19
+ return ".";
20
+ let joined;
21
+ for (let argument of arguments_)
22
+ argument && argument.length > 0 && (joined === void 0 ? joined = argument : joined += `/${argument}`);
23
+ return joined === void 0 ? "." : normalize(joined.replace(/\/\/+/g, "/"));
24
+ };
25
+ function cwd() {
26
+ return typeof process < "u" ? process.cwd().replace(/\\/g, "/") : "/";
27
+ }
28
+ var resolve = function(...arguments_) {
29
+ arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
30
+ let resolvedPath = "", resolvedAbsolute = !1;
31
+ for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
32
+ let path2 = index >= 0 ? arguments_[index] : cwd();
33
+ !path2 || path2.length === 0 || (resolvedPath = `${path2}/${resolvedPath}`, resolvedAbsolute = isAbsolute(path2));
34
+ }
35
+ return resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute), resolvedAbsolute && !isAbsolute(resolvedPath) ? `/${resolvedPath}` : resolvedPath.length > 0 ? resolvedPath : ".";
36
+ };
37
+ function normalizeString(path2, allowAboveRoot) {
38
+ let res = "", lastSegmentLength = 0, lastSlash = -1, dots = 0, char = null;
39
+ for (let index = 0; index <= path2.length; ++index) {
40
+ if (index < path2.length)
41
+ char = path2[index];
42
+ else {
43
+ if (char === "/")
44
+ break;
45
+ char = "/";
46
+ }
47
+ if (char === "/") {
48
+ if (!(lastSlash === index - 1 || dots === 1))
49
+ if (dots === 2) {
50
+ if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
51
+ if (res.length > 2) {
52
+ let lastSlashIndex = res.lastIndexOf("/");
53
+ lastSlashIndex === -1 ? (res = "", lastSegmentLength = 0) : (res = res.slice(0, lastSlashIndex), lastSegmentLength = res.length - 1 - res.lastIndexOf("/")), lastSlash = index, dots = 0;
54
+ continue;
55
+ } else if (res.length > 0) {
56
+ res = "", lastSegmentLength = 0, lastSlash = index, dots = 0;
57
+ continue;
58
+ }
59
+ }
60
+ allowAboveRoot && (res += res.length > 0 ? "/.." : "..", lastSegmentLength = 2);
61
+ } else
62
+ res.length > 0 ? res += `/${path2.slice(lastSlash + 1, index)}` : res = path2.slice(lastSlash + 1, index), lastSegmentLength = index - lastSlash - 1;
63
+ lastSlash = index, dots = 0;
64
+ } else
65
+ char === "." && dots !== -1 ? ++dots : dots = -1;
66
+ }
67
+ return res;
68
+ }
69
+ var isAbsolute = function(p) {
70
+ return _IS_ABSOLUTE_RE.test(p);
71
+ };
72
+ var _EXTNAME_RE = /.(\.[^./]+)$/, extname = function(p) {
73
+ let match = _EXTNAME_RE.exec(normalizeWindowsPath(p));
74
+ return match && match[1] || "";
75
+ }, relative = function(from, to) {
76
+ let _from = resolve(from).split("/"), _to = resolve(to).split("/"), _fromCopy = [..._from];
77
+ for (let segment of _fromCopy) {
78
+ if (_to[0] !== segment)
79
+ break;
80
+ _from.shift(), _to.shift();
81
+ }
82
+ return [..._from.map(() => ".."), ..._to].join("/");
83
+ }, dirname = function(p) {
84
+ let segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
85
+ return segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0]) && (segments[0] += "/"), segments.join("/") || (isAbsolute(p) ? "/" : ".");
86
+ };
87
+ var basename = function(p, extension) {
88
+ let lastSegment = normalizeWindowsPath(p).split("/").pop();
89
+ return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
90
+ };
91
+
92
+ // ../../node_modules/.pnpm/pathe@1.1.1/node_modules/pathe/dist/index.mjs
93
+ init_cjs_shims();
94
+
95
+ export {
96
+ normalize,
97
+ join,
98
+ resolve,
99
+ isAbsolute,
100
+ extname,
101
+ relative,
102
+ dirname,
103
+ basename
104
+ };
105
+ //# sourceMappingURL=chunk-PNN7RS7Y.js.map
@@ -2,31 +2,27 @@ var __create = Object.create;
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
8
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
5
+ var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __require = /* @__PURE__ */ ((x) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(x, {
7
+ get: (a, b) => (typeof require < "u" ? require : a)[b]
9
8
  }) : x)(function(x) {
10
- if (typeof require !== "undefined")
9
+ if (typeof require < "u")
11
10
  return require.apply(this, arguments);
12
11
  throw Error('Dynamic require of "' + x + '" is not supported');
13
12
  });
14
- var __esm = (fn, res) => function __init() {
13
+ var __esm = (fn, res) => function() {
15
14
  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
16
15
  };
17
- var __commonJS = (cb, mod) => function __require2() {
16
+ var __commonJS = (cb, mod) => function() {
18
17
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
19
18
  };
20
19
  var __export = (target, all) => {
21
20
  for (var name in all)
22
- __defProp(target, name, { get: all[name], enumerable: true });
23
- };
24
- var __copyProps = (to, from, except, desc) => {
25
- if (from && typeof from === "object" || typeof from === "function") {
21
+ __defProp(target, name, { get: all[name], enumerable: !0 });
22
+ }, __copyProps = (to, from, except, desc) => {
23
+ if (from && typeof from == "object" || typeof from == "function")
26
24
  for (let key of __getOwnPropNames(from))
27
- if (!__hasOwnProp.call(to, key) && key !== except)
28
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
29
- }
25
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
30
26
  return to;
31
27
  };
32
28
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
@@ -34,10 +30,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
34
30
  // file that has been converted to a CommonJS file using a Babel-
35
31
  // compatible transform (i.e. "__esModule" has not been set), then set
36
32
  // "default" to the CommonJS "module.exports" for node compatibility.
37
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
33
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
38
34
  mod
39
- ));
40
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
35
+ )), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
41
36
 
42
37
  // ../../bin/bundling/cjs-shims.js
43
38
  import { createRequire } from "node:module";
@@ -61,4 +56,4 @@ export {
61
56
  __toCommonJS,
62
57
  init_cjs_shims
63
58
  };
64
- //# sourceMappingURL=chunk-ZPL24Y2D.js.map
59
+ //# sourceMappingURL=chunk-POZ5MGPT.js.map
@@ -0,0 +1,108 @@
1
+ import {
2
+ generateRandomNameForSubdirectory,
3
+ installGlobalCLIPrompt,
4
+ renderSelectPrompt,
5
+ renderText,
6
+ renderTextPrompt
7
+ } from "./chunk-4OD45DDO.js";
8
+ import {
9
+ __export,
10
+ init_cjs_shims
11
+ } from "./chunk-POZ5MGPT.js";
12
+
13
+ // src/prompts/init.ts
14
+ var init_exports = {};
15
+ __export(init_exports, {
16
+ default: () => init_default,
17
+ isPredefinedTemplate: () => isPredefinedTemplate,
18
+ templates: () => templates,
19
+ visibleTemplates: () => visibleTemplates
20
+ });
21
+ init_cjs_shims();
22
+ var templates = {
23
+ remix: {
24
+ url: "https://github.com/Shopify/shopify-app-template-remix",
25
+ label: "Start with Remix (recommended)",
26
+ visible: !0,
27
+ branches: {
28
+ prompt: "For your Remix template, which language do you want?",
29
+ options: {
30
+ javascript: { branch: "javascript", label: "JavaScript" },
31
+ typescript: { branch: "main", label: "TypeScript" }
32
+ }
33
+ }
34
+ },
35
+ none: {
36
+ url: "https://github.com/Shopify/shopify-app-template-none",
37
+ label: "Start by adding your first extension",
38
+ visible: !0
39
+ },
40
+ node: {
41
+ url: "https://github.com/Shopify/shopify-app-template-node",
42
+ visible: !1
43
+ },
44
+ php: {
45
+ url: "https://github.com/Shopify/shopify-app-template-php",
46
+ visible: !1
47
+ },
48
+ ruby: {
49
+ url: "https://github.com/Shopify/shopify-app-template-ruby",
50
+ visible: !1
51
+ }
52
+ }, allTemplates = Object.keys(templates), visibleTemplates = allTemplates.filter((key) => templates[key].visible), templateOptionsInOrder = ["remix", "none"], init = async (options) => {
53
+ let name = options.name, template = options.template, flavor = options.flavor, defaults = {
54
+ name: await generateRandomNameForSubdirectory({ suffix: "app", directory: options.directory }),
55
+ template: templates.remix.url
56
+ }, welcomed = !1;
57
+ name || (renderText({ text: `
58
+ Welcome. Let\u2019s get started by naming your app project. You can change it later.` }), welcomed = !0, name = await renderTextPrompt({
59
+ message: "Your project name?",
60
+ defaultValue: defaults.name,
61
+ validate: (value) => {
62
+ if (value.length === 0)
63
+ return "App name can't be empty";
64
+ if (value.length > 30)
65
+ return "Enter a shorter name (30 character max.)";
66
+ if (value.toLowerCase().includes("shopify"))
67
+ return "App name can't include the word 'shopify'";
68
+ }
69
+ })), template || (welcomed || (renderText({ text: `
70
+ Welcome. Let\u2019s get started by choosing a template for your app project.` }), welcomed = !0), template = await renderSelectPrompt({
71
+ choices: templateOptionsInOrder.map((key) => ({
72
+ label: templates[key].label || key,
73
+ value: key
74
+ })),
75
+ message: "Get started building your app:",
76
+ defaultValue: allTemplates.find((key) => templates[key].url === defaults.template)
77
+ }));
78
+ let answers = {
79
+ ...options,
80
+ name,
81
+ template,
82
+ templateType: isPredefinedTemplate(template) ? template : "custom",
83
+ globalCLIResult: { install: !1, alreadyInstalled: !1 }
84
+ }, selectedUrl, branch;
85
+ if (answers.templateType !== "custom") {
86
+ let selectedTemplate = templates[answers.templateType];
87
+ selectedUrl = selectedTemplate.url, selectedTemplate.branches && (flavor ? branch = selectedTemplate.branches.options[flavor]?.branch : branch = await renderSelectPrompt({
88
+ message: selectedTemplate.branches.prompt || "Choose a flavor:",
89
+ choices: Object.entries(selectedTemplate.branches.options).map(([_key, branch2]) => ({
90
+ value: branch2.branch,
91
+ label: branch2.label
92
+ }))
93
+ }));
94
+ }
95
+ return branch && (selectedUrl += `#${branch}`), answers.template = selectedUrl || answers.template || defaults.template, answers.globalCLIResult = await installGlobalCLIPrompt(), answers;
96
+ }, init_default = init;
97
+ function isPredefinedTemplate(template) {
98
+ return allTemplates.includes(template);
99
+ }
100
+
101
+ export {
102
+ templates,
103
+ visibleTemplates,
104
+ init_default,
105
+ isPredefinedTemplate,
106
+ init_exports
107
+ };
108
+ //# sourceMappingURL=chunk-T7T35H4F.js.map
@@ -0,0 +1,55 @@
1
+ import {
2
+ __commonJS,
3
+ __require,
4
+ init_cjs_shims
5
+ } from "./chunk-POZ5MGPT.js";
6
+
7
+ // ../../node_modules/.pnpm/is-docker@2.2.1/node_modules/is-docker/index.js
8
+ var require_is_docker = __commonJS({
9
+ "../../node_modules/.pnpm/is-docker@2.2.1/node_modules/is-docker/index.js"(exports, module) {
10
+ "use strict";
11
+ init_cjs_shims();
12
+ var fs = __require("fs"), isDocker;
13
+ function hasDockerEnv() {
14
+ try {
15
+ return fs.statSync("/.dockerenv"), !0;
16
+ } catch {
17
+ return !1;
18
+ }
19
+ }
20
+ function hasDockerCGroup() {
21
+ try {
22
+ return fs.readFileSync("/proc/self/cgroup", "utf8").includes("docker");
23
+ } catch {
24
+ return !1;
25
+ }
26
+ }
27
+ module.exports = () => (isDocker === void 0 && (isDocker = hasDockerEnv() || hasDockerCGroup()), isDocker);
28
+ }
29
+ });
30
+
31
+ // ../../node_modules/.pnpm/is-wsl@2.2.0/node_modules/is-wsl/index.js
32
+ var require_is_wsl = __commonJS({
33
+ "../../node_modules/.pnpm/is-wsl@2.2.0/node_modules/is-wsl/index.js"(exports, module) {
34
+ "use strict";
35
+ init_cjs_shims();
36
+ var os = __require("os"), fs = __require("fs"), isDocker = require_is_docker(), isWsl = () => {
37
+ if (process.platform !== "linux")
38
+ return !1;
39
+ if (os.release().toLowerCase().includes("microsoft"))
40
+ return !isDocker();
41
+ try {
42
+ return fs.readFileSync("/proc/version", "utf8").toLowerCase().includes("microsoft") ? !isDocker() : !1;
43
+ } catch {
44
+ return !1;
45
+ }
46
+ };
47
+ process.env.__IS_WSL_TEST__ ? module.exports = isWsl : module.exports = isWsl();
48
+ }
49
+ });
50
+
51
+ export {
52
+ require_is_docker,
53
+ require_is_wsl
54
+ };
55
+ //# sourceMappingURL=chunk-UBB7JKND.js.map