@shopify/create-hydrogen 3.0.23 โ†’ 3.0.26

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.
@@ -0,0 +1,71 @@
1
+ import { ui, github, string } from '@shopify/cli-kit';
2
+ const TEMPLATE_BASE = 'https://github.com/Shopify/hydrogen/templates/';
3
+ const BRANCH = `dist`;
4
+ const TEMPLATE_DATA = {
5
+ /* eslint-disable @typescript-eslint/naming-convention */
6
+ 'demo-store-js': {
7
+ description: 'Demo Store',
8
+ },
9
+ 'demo-store-ts': {
10
+ description: 'Demo Store (TypeScript)',
11
+ },
12
+ 'hello-world-js': {
13
+ description: 'Hello World',
14
+ },
15
+ 'hello-world-ts': {
16
+ description: 'Hello World (TypeScript)',
17
+ },
18
+ /* eslint-enable @typescript-eslint/naming-convention */
19
+ };
20
+ const TEMPLATE_NAMES = Object.keys(TEMPLATE_DATA);
21
+ function toHydrogenTemplateName(key) {
22
+ const normalized = string.hyphenize(key).toLocaleLowerCase();
23
+ const withExtension = normalized.endsWith('-ts') || normalized.endsWith('-js') ? normalized : `${normalized}-js`;
24
+ return TEMPLATE_NAMES.includes(withExtension) ? withExtension : false;
25
+ }
26
+ function toHydrogenTemplateUrl(key) {
27
+ return `${TEMPLATE_BASE}${key}#${BRANCH}`;
28
+ }
29
+ const init = async (options, prompt = ui.prompt) => {
30
+ const questions = [];
31
+ if (!options.name) {
32
+ questions.push({
33
+ type: 'input',
34
+ name: 'name',
35
+ message: 'Name your new Hydrogen storefront',
36
+ default: 'hydrogen-app',
37
+ });
38
+ }
39
+ let explicitTemplate = options.template;
40
+ if (explicitTemplate) {
41
+ const hydrogenTemplate = toHydrogenTemplateName(explicitTemplate);
42
+ if (hydrogenTemplate) {
43
+ const url = toHydrogenTemplateUrl(hydrogenTemplate);
44
+ explicitTemplate = url;
45
+ }
46
+ const parsedTemplate = github.parseRepoUrl(explicitTemplate);
47
+ const missingBranch = !parsedTemplate.ref;
48
+ const looksLikeHydrogenTemplate = parsedTemplate.name === 'hydrogen' &&
49
+ parsedTemplate.user === 'Shopify' &&
50
+ parsedTemplate.subDirectory.startsWith('templates/');
51
+ explicitTemplate =
52
+ looksLikeHydrogenTemplate && missingBranch ? `${parsedTemplate.full}#${BRANCH}` : parsedTemplate.full;
53
+ }
54
+ else {
55
+ questions.push({
56
+ type: 'select',
57
+ name: 'template',
58
+ message: 'Choose a template',
59
+ choices: Object.keys(TEMPLATE_DATA).map((value) => ({
60
+ name: TEMPLATE_DATA[value].description,
61
+ value,
62
+ })),
63
+ default: TEMPLATE_NAMES[0],
64
+ result: toHydrogenTemplateUrl,
65
+ });
66
+ }
67
+ const { template = explicitTemplate, ...promptOutput } = await prompt(questions);
68
+ return { ...options, ...promptOutput, template };
69
+ };
70
+ export default init;
71
+ //# sourceMappingURL=init.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/prompts/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAC,MAAM,kBAAkB,CAAA;AAEnD,MAAM,aAAa,GAAG,gDAAgD,CAAA;AACtE,MAAM,MAAM,GAAG,MAAM,CAAA;AACrB,MAAM,aAAa,GAAG;IACpB,yDAAyD;IACzD,eAAe,EAAE;QACf,WAAW,EAAE,YAAY;KAC1B;IACD,eAAe,EAAE;QACf,WAAW,EAAE,yBAAyB;KACvC;IACD,gBAAgB,EAAE;QAChB,WAAW,EAAE,aAAa;KAC3B;IACD,gBAAgB,EAAE;QAChB,WAAW,EAAE,0BAA0B;KACxC;IACD,wDAAwD;CACzD,CAAA;AAED,MAAM,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;AAEjD,SAAS,sBAAsB,CAAC,GAAW;IACzC,MAAM,UAAU,GAAG,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,iBAAiB,EAAE,CAAA;IAC5D,MAAM,aAAa,GAAG,UA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AEtD,gBAAgB;YACd,yBAAyB,IAAI,aAAa,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,IAAI,IAAI,MAAM,EAAE,CAAC,CAAC,CAAC,cAAc,CAAC,IAAI,CAAA;KACxG;SAAM;QACL,SAAS,CAAC,IAAI,CAAC;YACb,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,UAAU;YAChB,OAAO,EAAE,mBAAmB;YAC5B,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;gBAClD,IAAI,EAAE,aAAa,CAAC,KAAmC,CAAC,CAAC,WAAW;gBACpE,KAAK;aACN,CAAC,CAAC;YACH,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC;YAC1B,MAAM,EAAE,qBAAqB;SAC9B,CAAC,CAAA;KACH;IAED,MAAM,EAAC,QAAQ,GAAG,gBAAgB,EAAE,GAAG,YAAY,EAAC,GAAgB,MAAM,MAAM,CAAC,SAAS,CAAC,CAAA;IAE3F,OAAO,EAAC,GAAG,OAAO,EAAE,GAAG,YAAY,EAAE,QAAQ,EAA0B,CAAA;AACzE,CAAC,CAAA;AAED,eAAe,IAAI,CAAA","sourcesContent":["import {ui, github, string} from '@shopify/cli-kit'\n\nconst TEMPLATE_BASE = 'https://github.com/Shopify/hydrogen/templates/'\nconst BRANCH = `dist`\nconst TEMPLATE_DATA = {\n /* eslint-disable @typescript-eslint/naming-convention */\n 'demo-store-js': {\n description: 'Demo Store',\n },\n 'demo-store-ts': {\n description: 'Demo Store (TypeScript)',\n },\n 'hello-world-js': {\n description: 'Hello World',\n },\n 'hello-world-ts': {\n description: 'Hello World (TypeScript)',\n },\n /* eslint-enable @typescript-eslint/naming-convention */\n}\n\nconst TEMPLATE_NAMES = Object.keys(TEMPLATE_DATA)\n\nfunction toHydrogenTemplateName(key: string) {\n const normalized = string.hyphenize(key).toLocaleLowerCase()\n const withExtension = normalized.endsWith('-ts') || normalized.endsWith('-js') ? normalized : `${normalized}-js`\n\n return TEMPLATE_NAMES.includes(withExtension) ? withExtension : false\n}\n\nfunction toHydrogenTemplateUrl(key: string) {\n return `${TEMPLATE_BASE}${key}#${BRANCH}`\n}\n\ninterface InitOptions {\n name?: string\n template?: string\n}\n\nconst init = async (options: InitOptions, prompt = ui.prompt): Promise<Required<InitOptions>> => {\n const questions: ui.Question[] = []\n if (!options.name) {\n questions.push({\n type: 'input',\n name: 'name',\n message: 'Name your new Hydrogen storefront',\n default: 'hydrogen-app',\n })\n }\n\n let explicitTemplate = options.template\n\n if (explicitTemplate) {\n const hydrogenTemplate = toHydrogenTemplateName(explicitTemplate)\n\n if (hydrogenTemplate) {\n const url = toHydrogenTemplateUrl(hydrogenTemplate)\n explicitTemplate = url\n }\n\n const parsedTemplate = github.parseRepoUrl(explicitTemplate)\n const missingBranch = !parsedTemplate.ref\n const looksLikeHydrogenTemplate =\n parsedTemplate.name === 'hydrogen' &&\n parsedTemplate.user === 'Shopify' &&\n parsedTemplate.subDirectory.startsWith('templates/')\n\n explicitTemplate =\n looksLikeHydrogenTemplate && missingBranch ? `${parsedTemplate.full}#${BRANCH}` : parsedTemplate.full\n } else {\n questions.push({\n type: 'select',\n name: 'template',\n message: 'Choose a template',\n choices: Object.keys(TEMPLATE_DATA).map((value) => ({\n name: TEMPLATE_DATA[value as keyof typeof TEMPLATE_DATA].description,\n value,\n })),\n default: TEMPLATE_NAMES[0],\n result: toHydrogenTemplateUrl,\n })\n }\n\n const {template = explicitTemplate, ...promptOutput}: InitOptions = await prompt(questions)\n\n return {...options, ...promptOutput, template} as Required<InitOptions>\n}\n\nexport default init\n"]}
@@ -0,0 +1,12 @@
1
+ interface InitOptions {
2
+ name: string;
3
+ template: string;
4
+ directory: string;
5
+ dependencyManager?: string;
6
+ shopifyCliVersion?: string;
7
+ cliHydrogenPackageVersion?: string;
8
+ hydrogenVersion?: string;
9
+ local: boolean;
10
+ }
11
+ declare function init(options: InitOptions): Promise<void>;
12
+ export default init;
@@ -0,0 +1,204 @@
1
+ import { string, path, error, file, output, os, ui, npm, dependency, environment, github, template, git, constants, version, } from '@shopify/cli-kit';
2
+ import { Writable } from 'stream';
3
+ const suggestHydrogenSupport = () => `
4
+ Help us make Hydrogen better by reporting this error so we can improve this message and/or fix the error.
5
+ - Chat with us on Discord: https://discord.com/invite/ppSbThrFaS
6
+ - Create an issue in GitHub: https://github.com/Shopify/hydrogen/issues/new
7
+ `;
8
+ async function init(options) {
9
+ const hydrogenVersion = await version.findPackageVersionUp({ fromModuleURL: import.meta.url });
10
+ const user = (await os.username()) ?? '';
11
+ const cliPackageVersion = options.shopifyCliVersion ?? (await constants.versions.cliKit());
12
+ const cliHydrogenPackageVersion = options.cliHydrogenPackageVersion ?? hydrogenVersion;
13
+ const hydrogenPackageVersion = options.hydrogenVersion;
14
+ const dependencyManager = inferDependencyManager(options.dependencyManager);
15
+ const hyphenizedName = string.hyphenize(options.name);
16
+ const outputDirectory = path.join(options.directory, hyphenizedName);
17
+ await ui.nonEmptyDirectoryPrompt(outputDirectory);
18
+ await file.inTemporaryDirectory(async (tmpDir) => {
19
+ const templateDownloadDir = path.join(tmpDir, 'download');
20
+ const templateScaffoldDir = path.join(tmpDir, 'app');
21
+ await file.mkdir(templateDownloadDir);
22
+ await file.mkdir(templateScaffoldDir);
23
+ let tasks = [];
24
+ const templateInfo = await github.parseRepoUrl(options.template);
25
+ const branch = templateInfo.ref ? `#${templateInfo.ref}` : '';
26
+ const templatePath = templateInfo.subDirectory
27
+ ? path.join(templateDownloadDir, templateInfo.subDirectory)
28
+ : templateDownloadDir;
29
+ tasks = tasks.concat([
30
+ {
31
+ title: 'Downloading template',
32
+ task: async (_, task) => {
33
+ const url = `${templateInfo.http}${branch}`;
34
+ await git.downloadRepository({
35
+ repoUrl: url,
36
+ destination: templateDownloadDir,
37
+ shallow: true,
38
+ progressUpdater: (statusString) => {
39
+ const taskOutput = `Cloning template from ${url}:\n${statusString}`;
40
+ task.output = taskOutput;
41
+ },
42
+ });
43
+ if (!(await file.exists(path.join(templatePath, 'package.json')))) {
44
+ throw new error.Abort(`The template ${templatePath} was not found.`, suggestHydrogenSupport());
45
+ }
46
+ task.title = 'Template downloaded';
47
+ },
48
+ },
49
+ {
50
+ title: `Initializing your app ${hyphenizedName}`,
51
+ task: async (_, parentTask) => {
52
+ return parentTask.newListr([
53
+ {
54
+ title: 'Parsing template files',
55
+ task: async (_, task) => {
56
+ const templateData = {
57
+ name: hyphenizedName,
58
+ // eslint-disable-next-line @typescript-eslint/naming-convention
59
+ shopify_cli_version: cliPackageVersion,
60
+ // eslint-disable-next-line @typescript-eslint/naming-convention
61
+ hydrogen_version: hydrogenPackageVersion,
62
+ author: user,
63
+ // eslint-disable-next-line @typescript-eslint/naming-convention
64
+ dependency_manager: options.dependencyManager,
65
+ };
66
+ await template.recursiveDirectoryCopy(templatePath, templateScaffoldDir, templateData);
67
+ task.title = 'Template files parsed';
68
+ },
69
+ },
70
+ {
71
+ title: 'Updating package.json',
72
+ task: async (_, task) => {
73
+ const packageJSON = await npm.readPackageJSON(templateScaffoldDir);
74
+ const cliVersion = await constants.versions.cliKit();
75
+ await npm.updateAppData(packageJSON, hyphenizedName);
76
+ await updateCLIDependencies(packageJSON, options.local, {
77
+ dependencies: {
78
+ // eslint-disable-next-line @typescript-eslint/naming-convention
79
+ '@shopify/hydrogen': hydrogenPackageVersion,
80
+ },
81
+ devDependencies: {
82
+ // eslint-disable-next-line @typescript-eslint/naming-convention
83
+ '@shopify/cli-hydrogen': cliHydrogenPackageVersion,
84
+ // eslint-disable-next-line @typescript-eslint/naming-convention
85
+ '@shopify/cli': cliVersion,
86
+ },
87
+ });
88
+ await updateCLIScripts(packageJSON);
89
+ await npm.writePackageJSON(templateScaffoldDir, packageJSON);
90
+ task.title = 'Package.json updated';
91
+ parentTask.title = 'App initialized';
92
+ },
93
+ },
94
+ ], { concurrent: false });
95
+ },
96
+ },
97
+ ]);
98
+ if (await environment.local.isShopify()) {
99
+ tasks.push({
100
+ title: "[Shopifolks-only] Configuring the project's NPM registry",
101
+ task: async (_, task) => {
102
+ const npmrcPath = path.join(templateScaffoldDir, '.npmrc');
103
+ const npmrcContent = `@shopify:registry=https://registry.npmjs.org`;
104
+ await file.write(npmrcPath, npmrcContent);
105
+ task.title = "[Shopifolks-only] Project's NPM registry configured.";
106
+ },
107
+ });
108
+ }
109
+ tasks = tasks.concat([
110
+ {
111
+ title: `Installing dependencies with ${dependencyManager}`,
112
+ task: async (_, task) => {
113
+ const stdout = new Writable({
114
+ write(chunk, encoding, next) {
115
+ task.output = chunk.toString();
116
+ next();
117
+ },
118
+ });
119
+ await installDependencies(templateScaffoldDir, dependencyManager, stdout);
120
+ },
121
+ },
122
+ {
123
+ title: 'Cleaning up',
124
+ task: async (_, task) => {
125
+ await cleanup(templateScaffoldDir);
126
+ task.title = 'Completed clean up';
127
+ },
128
+ },
129
+ ]);
130
+ const list = ui.newListr(tasks, {
131
+ concurrent: false,
132
+ rendererOptions: { collapse: false },
133
+ rendererSilent: environment.local.isUnitTest(),
134
+ });
135
+ await list.run();
136
+ await file.move(templateScaffoldDir, outputDirectory);
137
+ });
138
+ output.info(output.content `
139
+ โœจ ${hyphenizedName} is ready to build!
140
+ ๐Ÿš€ Run ${output.token.packagejsonScript(dependencyManager, 'dev')} to start your local development server and start building.
141
+
142
+ ๐Ÿ“š Docs: ${output.token.link('Quick start guide', 'https://shopify.dev/custom-storefronts/hydrogen')}`);
143
+ output.info(output.content `
144
+ ๐Ÿ‘‹ Note: your project will display inventory from the Hydrogen Demo Store.\
145
+ To connect this project to your Shopify storeโ€™s inventory instead,\
146
+ update ${output.token.yellow(`${hyphenizedName}/hydrogen.config.js`)} with your\
147
+ store ID and Storefront API key.\n`);
148
+ }
149
+ function inferDependencyManager(optionsDependencyManager) {
150
+ if (optionsDependencyManager &&
151
+ dependency.dependencyManager.includes(optionsDependencyManager)) {
152
+ return optionsDependencyManager;
153
+ }
154
+ return dependency.dependencyManagerUsedForCreating();
155
+ }
156
+ export default init;
157
+ async function updateCLIScripts(packageJSON) {
158
+ packageJSON.scripts.dev = `shopify hydrogen dev`;
159
+ return packageJSON;
160
+ }
161
+ async function updateCLIDependencies(packageJSON, local, packageDependencies) {
162
+ const { devDependencies, dependencies } = packageDependencies;
163
+ packageJSON.devDependencies = packageJSON.devDependencies || {};
164
+ packageJSON.dependencies = packageJSON.dependencies || {};
165
+ Object.keys(devDependencies).forEach((key) => {
166
+ packageJSON.devDependencies[key] = devDependencies[key] || packageJSON.devDependencies[key];
167
+ });
168
+ Object.keys(dependencies).forEach((key) => {
169
+ packageJSON.dependencies[key] = dependencies[key] || packageJSON.dependencies[key];
170
+ });
171
+ if (local) {
172
+ const devDependencyOverrides = {
173
+ // eslint-disable-next-line @typescript-eslint/naming-convention
174
+ '@shopify/cli': `file:${(await path.findUp('packages/cli-main', { type: 'directory' }))}`,
175
+ // eslint-disable-next-line @typescript-eslint/naming-convention
176
+ '@shopify/cli-hydrogen': `file:${(await path.findUp('packages/cli-hydrogen', { type: 'directory' }))}`,
177
+ };
178
+ packageJSON.overrides = packageJSON.overrides
179
+ ? { ...packageJSON.overrides, ...devDependencyOverrides }
180
+ : devDependencyOverrides;
181
+ packageJSON.resolutions = packageJSON.resolutions
182
+ ? { ...packageJSON.resolutions, ...devDependencyOverrides }
183
+ : devDependencyOverrides;
184
+ }
185
+ return packageJSON;
186
+ }
187
+ async function installDependencies(directory, dependencyManager, stdout) {
188
+ await dependency.install(directory, dependencyManager, stdout);
189
+ }
190
+ async function cleanup(webOutputDirectory) {
191
+ const gitPaths = await path.glob([
192
+ path.join(webOutputDirectory, '**', '.git'),
193
+ path.join(webOutputDirectory, '**', '.github'),
194
+ path.join(webOutputDirectory, '**', '.gitmodules'),
195
+ path.join(webOutputDirectory, '.stackblitzrc'),
196
+ ], {
197
+ dot: true,
198
+ onlyFiles: false,
199
+ onlyDirectories: false,
200
+ ignore: ['**/node_modules/**'],
201
+ });
202
+ return Promise.all(gitPaths.map((path) => file.rmdir(path, { force: true }))).then(() => { });
203
+ }
204
+ //# sourceMappingURL=init.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/services/init.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,MAAM,EACN,EAAE,EACF,EAAE,EACF,GAAG,EACH,UAAU,EACV,WAAW,EACX,MAAM,EACN,QAAQ,EACR,GAAG,EACH,SAAS,EACT,OAAO,GACR,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EAAC,QAAQ,EAAC,MAAM,QAAQ,CAAA;AAa/B,MAAM,sBAAsB,GAAG,GAAG,EAAE,CAAC;;;;CAIpC,CAAA;AAED,KAAK,UAAU,IAAI,CAAC,OAAoB;IACtC,MAAM,eAAe,GAAG,MAAM,OAAO,CAAC,oBAAoB,CAAC,EAAC,aAAa,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,EAAC,CAAC,CAAA;IAC5F,MAAM,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAA;IACxC,MAAM,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,IAAI,CAAC,MAAM,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAA;IAC1F,MAAM,yBAAyB,GAAG,OAAO,CAAC,yBAAyB,IAAI,eAAe,CAAA;IACtF,MAAM,sBAAsB,GAAG,OAAO,CAAC,eAAe,CAAA;IACtD,MAAM,iBAAiB,GAAG,sBAAsB,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAA;IAC3E,MAAM,cAAc,GAAG,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IACrD,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,cAAc,CAAC,CAAA;IAEpE,MAAM,EAAE,CAAC,uBAAuB,CAAC,e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AAA;IAED,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,EAAC,KAAK,EAAE,IAAI,EAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAA;AAC5F,CAAC","sourcesContent":["import {\n string,\n path,\n error,\n file,\n output,\n os,\n ui,\n npm,\n dependency,\n environment,\n github,\n template,\n git,\n constants,\n version,\n} from '@shopify/cli-kit'\n\nimport {Writable} from 'stream'\n\ninterface InitOptions {\n name: string\n template: string\n directory: string\n dependencyManager?: string\n shopifyCliVersion?: string\n cliHydrogenPackageVersion?: string\n hydrogenVersion?: string\n local: boolean\n}\n\nconst suggestHydrogenSupport = () => `\nHelp us make Hydrogen better by reporting this error so we can improve this message and/or fix the error.\n - Chat with us on Discord: https://discord.com/invite/ppSbThrFaS\n - Create an issue in GitHub: https://github.com/Shopify/hydrogen/issues/new\n`\n\nasync function init(options: InitOptions) {\n const hydrogenVersion = await version.findPackageVersionUp({fromModuleURL: import.meta.url})\n const user = (await os.username()) ?? ''\n const cliPackageVersion = options.shopifyCliVersion ?? (await constants.versions.cliKit())\n const cliHydrogenPackageVersion = options.cliHydrogenPackageVersion ?? hydrogenVersion\n const hydrogenPackageVersion = options.hydrogenVersion\n const dependencyManager = inferDependencyManager(options.dependencyManager)\n const hyphenizedName = string.hyphenize(options.name)\n const outputDirectory = path.join(options.directory, hyphenizedName)\n\n await ui.nonEmptyDirectoryPrompt(outputDirectory)\n\n await file.inTemporaryDirectory(async (tmpDir) => {\n const templateDownloadDir = path.join(tmpDir, 'download')\n const templateScaffoldDir = path.join(tmpDir, 'app')\n\n await file.mkdir(templateDownloadDir)\n await file.mkdir(templateScaffoldDir)\n\n let tasks: ui.ListrTasks = []\n\n const templateInfo = await github.parseRepoUrl(options.template)\n const branch = templateInfo.ref ? `#${templateInfo.ref}` : ''\n const templatePath = templateInfo.subDirectory\n ? path.join(templateDownloadDir, templateInfo.subDirectory)\n : templateDownloadDir\n\n tasks = tasks.concat([\n {\n title: 'Downloading template',\n\n task: async (_, task) => {\n const url = `${templateInfo.http}${branch}`\n await git.downloadRepository({\n repoUrl: url,\n destination: templateDownloadDir,\n shallow: true,\n progressUpdater: (statusString: string) => {\n const taskOutput = `Cloning template from ${url}:\\n${statusString}`\n task.output = taskOutput\n },\n })\n\n if (!(await file.exists(path.join(templatePath, 'package.json')))) {\n throw new error.Abort(`The template ${templatePath} was not found.`, suggestHydrogenSupport())\n }\n task.title = 'Template downloaded'\n },\n },\n\n {\n title: `Initializing your app ${hyphenizedName}`,\n task: async (_, parentTask) => {\n return parentTask.newListr(\n [\n {\n title: 'Parsing template files',\n task: async (_, task) => {\n const templateData = {\n name: hyphenizedName,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n shopify_cli_version: cliPackageVersion,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n hydrogen_version: hydrogenPackageVersion,\n author: user,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n dependency_manager: options.dependencyManager,\n }\n await template.recursiveDirectoryCopy(templatePath, templateScaffoldDir, templateData)\n\n task.title = 'Template files parsed'\n },\n },\n {\n title: 'Updating package.json',\n task: async (_, task) => {\n const packageJSON = await npm.readPackageJSON(templateScaffoldDir)\n const cliVersion = await constants.versions.cliKit()\n await npm.updateAppData(packageJSON, hyphenizedName)\n await updateCLIDependencies(packageJSON, options.local, {\n dependencies: {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n '@shopify/hydrogen': hydrogenPackageVersion,\n },\n devDependencies: {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n '@shopify/cli-hydrogen': cliHydrogenPackageVersion,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n '@shopify/cli': cliVersion,\n },\n })\n await updateCLIScripts(packageJSON)\n await npm.writePackageJSON(templateScaffoldDir, packageJSON)\n\n task.title = 'Package.json updated'\n parentTask.title = 'App initialized'\n },\n },\n ],\n {concurrent: false},\n )\n },\n },\n ])\n\n if (await environment.local.isShopify()) {\n tasks.push({\n title: \"[Shopifolks-only] Configuring the project's NPM registry\",\n task: async (_, task) => {\n const npmrcPath = path.join(templateScaffoldDir, '.npmrc')\n const npmrcContent = `@shopify:registry=https://registry.npmjs.org`\n await file.write(npmrcPath, npmrcContent)\n task.title = \"[Shopifolks-only] Project's NPM registry configured.\"\n },\n })\n }\n\n tasks = tasks.concat([\n {\n title: `Installing dependencies with ${dependencyManager}`,\n task: async (_, task) => {\n const stdout = new Writable({\n write(chunk, encoding, next) {\n task.output = chunk.toString()\n next()\n },\n })\n await installDependencies(templateScaffoldDir, dependencyManager, stdout)\n },\n },\n {\n title: 'Cleaning up',\n task: async (_, task) => {\n await cleanup(templateScaffoldDir)\n\n task.title = 'Completed clean up'\n },\n },\n ])\n\n const list = ui.newListr(tasks, {\n concurrent: false,\n rendererOptions: {collapse: false},\n rendererSilent: environment.local.isUnitTest(),\n })\n\n await list.run()\n\n await file.move(templateScaffoldDir, outputDirectory)\n })\n\n output.info(output.content`\nโœจ ${hyphenizedName} is ready to build!\n๐Ÿš€ Run ${output.token.packagejsonScript(\n dependencyManager,\n 'dev',\n )} to start your local development server and start building.\n\n๐Ÿ“š Docs: ${output.token.link('Quick start guide', 'https://shopify.dev/custom-storefronts/hydrogen')}`)\n\n output.info(output.content`\n๐Ÿ‘‹ Note: your project will display inventory from the Hydrogen Demo Store.\\\n To connect this project to your Shopify storeโ€™s inventory instead,\\\n update ${output.token.yellow(`${hyphenizedName}/hydrogen.config.js`)} with your\\\n store ID and Storefront API key.\\n`)\n}\n\nfunction inferDependencyManager(optionsDependencyManager: string | undefined): dependency.DependencyManager {\n if (\n optionsDependencyManager &&\n dependency.dependencyManager.includes(optionsDependencyManager as dependency.DependencyManager)\n ) {\n return optionsDependencyManager as dependency.DependencyManager\n }\n return dependency.dependencyManagerUsedForCreating()\n}\n\nexport default init\n\ninterface PackageDependencies {\n devDependencies: {[key: string]: string | undefined}\n dependencies: {[key: string]: string | undefined}\n}\n\nasync function updateCLIScripts(packageJSON: npm.PackageJSON): Promise<npm.PackageJSON> {\n packageJSON.scripts.dev = `shopify hydrogen dev`\n\n return packageJSON\n}\n\nasync function updateCLIDependencies(\n packageJSON: npm.PackageJSON,\n local: boolean,\n packageDependencies: PackageDependencies,\n): Promise<npm.PackageJSON> {\n const {devDependencies, dependencies} = packageDependencies\n\n packageJSON.devDependencies = packageJSON.devDependencies || {}\n packageJSON.dependencies = packageJSON.dependencies || {}\n\n Object.keys(devDependencies).forEach((key) => {\n packageJSON.devDependencies[key] = devDependencies[key] || packageJSON.devDependencies[key]\n })\n\n Object.keys(dependencies).forEach((key) => {\n packageJSON.dependencies[key] = dependencies[key] || packageJSON.dependencies[key]\n })\n\n if (local) {\n const devDependencyOverrides = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n '@shopify/cli': `file:${(await path.findUp('packages/cli-main', {type: 'directory'})) as string}`,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n '@shopify/cli-hydrogen': `file:${(await path.findUp('packages/cli-hydrogen', {type: 'directory'})) as string}`,\n }\n\n packageJSON.overrides = packageJSON.overrides\n ? {...packageJSON.overrides, ...devDependencyOverrides}\n : devDependencyOverrides\n\n packageJSON.resolutions = packageJSON.resolutions\n ? {...packageJSON.resolutions, ...devDependencyOverrides}\n : devDependencyOverrides\n }\n\n return packageJSON\n}\n\nasync function installDependencies(\n directory: string,\n dependencyManager: dependency.DependencyManager,\n stdout: Writable,\n): Promise<void> {\n await dependency.install(directory, dependencyManager, stdout)\n}\n\nasync function cleanup(webOutputDirectory: string) {\n const gitPaths = await path.glob(\n [\n path.join(webOutputDirectory, '**', '.git'),\n path.join(webOutputDirectory, '**', '.github'),\n path.join(webOutputDirectory, '**', '.gitmodules'),\n path.join(webOutputDirectory, '.stackblitzrc'),\n ],\n {\n dot: true,\n onlyFiles: false,\n onlyDirectories: false,\n ignore: ['**/node_modules/**'],\n },\n )\n\n return Promise.all(gitPaths.map((path) => file.rmdir(path, {force: true}))).then(() => {})\n}\n"]}