@shopify/create-app 3.65.3 → 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-S57LLFKK.js → chunk-5U24TEX5.js} +5434 -10324
  6. package/dist/{chunk-GJPZCXGT.js → chunk-6A7MXLVB.js} +159 -405
  7. package/dist/{chunk-FUPW7TWB.js → chunk-7ZCQLP5Y.js} +3 -3
  8. package/dist/{chunk-5LBEKXRW.js → chunk-FIJKOZJF.js} +19 -55
  9. package/dist/{chunk-2JG3TU4D.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-56H6ULTJ.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-C34SFNV7.js → chunk-WBQF4CSV.js} +12 -22
  25. package/dist/chunk-XVNW332R.js +524 -0
  26. package/dist/{chunk-AB7PVDZA.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-IEMPZHFX.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-LYYU5SQZ.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-SSXOUA2N.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-3G24M6S4.js +0 -3185
  62. package/dist/chunk-44DJDCJW.js +0 -7843
  63. package/dist/chunk-B3EA2BEZ.js +0 -22131
  64. package/dist/chunk-DL3MKXVR.js +0 -4754
  65. package/dist/chunk-EJ67NGP2.js +0 -105
  66. package/dist/chunk-G4XEYGTB.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-NSNRZPBN.js +0 -145
  72. package/dist/chunk-P5J3HFWZ.js +0 -44962
  73. package/dist/chunk-RAQ4Z7GU.js +0 -2477
  74. package/dist/chunk-SWNRLCC6.js +0 -61
  75. package/dist/chunk-T5LLJYYS.js +0 -195
  76. package/dist/chunk-YC4FLMDD.js +0 -74
  77. package/dist/custom-oclif-loader-B7KCOFFE.js +0 -83
  78. package/dist/del-ZCPTGWOA.js +0 -2847
  79. package/dist/devtools-5N4JAP3R.js +0 -3588
  80. package/dist/error-handler-6K3LQUFG.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-23HIJRP3.js +0 -26
@@ -1,145 +0,0 @@
1
- import {
2
- generateRandomNameForSubdirectory,
3
- installGlobalCLIPrompt,
4
- renderSelectPrompt,
5
- renderText,
6
- renderTextPrompt
7
- } from "./chunk-P5J3HFWZ.js";
8
- import {
9
- __export,
10
- init_cjs_shims
11
- } from "./chunk-ZPL24Y2D.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: true,
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: true
39
- },
40
- node: {
41
- url: "https://github.com/Shopify/shopify-app-template-node",
42
- visible: false
43
- },
44
- php: {
45
- url: "https://github.com/Shopify/shopify-app-template-php",
46
- visible: false
47
- },
48
- ruby: {
49
- url: "https://github.com/Shopify/shopify-app-template-ruby",
50
- visible: false
51
- }
52
- };
53
- var allTemplates = Object.keys(templates);
54
- var visibleTemplates = allTemplates.filter((key) => templates[key].visible);
55
- var templateOptionsInOrder = ["remix", "none"];
56
- var init = async (options) => {
57
- let name = options.name;
58
- let template = options.template;
59
- const flavor = options.flavor;
60
- const defaults = {
61
- name: await generateRandomNameForSubdirectory({ suffix: "app", directory: options.directory }),
62
- template: templates.remix.url
63
- };
64
- let welcomed = false;
65
- if (!name) {
66
- renderText({ text: "\nWelcome. Let\u2019s get started by naming your app project. You can change it later." });
67
- welcomed = true;
68
- name = await renderTextPrompt({
69
- message: "Your project name?",
70
- defaultValue: defaults.name,
71
- validate: (value) => {
72
- if (value.length === 0) {
73
- return "App name can't be empty";
74
- }
75
- if (value.length > 30) {
76
- return "Enter a shorter name (30 character max.)";
77
- }
78
- if (value.toLowerCase().includes("shopify")) {
79
- return "App name can't include the word 'shopify'";
80
- }
81
- }
82
- });
83
- }
84
- if (!template) {
85
- if (!welcomed) {
86
- renderText({ text: "\nWelcome. Let\u2019s get started by choosing a template for your app project." });
87
- welcomed = true;
88
- }
89
- template = await renderSelectPrompt({
90
- choices: templateOptionsInOrder.map((key) => {
91
- return {
92
- label: templates[key].label || key,
93
- value: key
94
- };
95
- }),
96
- message: "Get started building your app:",
97
- defaultValue: allTemplates.find((key) => templates[key].url === defaults.template)
98
- });
99
- }
100
- const answers = {
101
- ...options,
102
- name,
103
- template,
104
- templateType: isPredefinedTemplate(template) ? template : "custom",
105
- globalCLIResult: { install: false, alreadyInstalled: false }
106
- };
107
- let selectedUrl;
108
- let branch;
109
- if (answers.templateType !== "custom") {
110
- const selectedTemplate = templates[answers.templateType];
111
- selectedUrl = selectedTemplate.url;
112
- if (selectedTemplate.branches) {
113
- if (flavor) {
114
- branch = selectedTemplate.branches.options[flavor]?.branch;
115
- } else {
116
- branch = await renderSelectPrompt({
117
- message: selectedTemplate.branches.prompt || "Choose a flavor:",
118
- choices: Object.entries(selectedTemplate.branches.options).map(([_key, branch2]) => ({
119
- value: branch2.branch,
120
- label: branch2.label
121
- }))
122
- });
123
- }
124
- }
125
- }
126
- if (branch) {
127
- selectedUrl += `#${branch}`;
128
- }
129
- answers.template = selectedUrl || answers.template || defaults.template;
130
- answers.globalCLIResult = await installGlobalCLIPrompt();
131
- return answers;
132
- };
133
- var init_default = init;
134
- function isPredefinedTemplate(template) {
135
- return allTemplates.includes(template);
136
- }
137
-
138
- export {
139
- templates,
140
- visibleTemplates,
141
- init_default,
142
- isPredefinedTemplate,
143
- init_exports
144
- };
145
- //# sourceMappingURL=chunk-NSNRZPBN.js.map