create-zephyr-apps 0.0.7 → 0.0.39

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.
package/dist/index.cjs DELETED
@@ -1,266 +0,0 @@
1
- #!/usr/bin/env node
2
- "use strict";
3
- var __webpack_require__ = {};
4
- (()=>{
5
- __webpack_require__.n = function(module) {
6
- var getter = module && module.__esModule ? function() {
7
- return module['default'];
8
- } : function() {
9
- return module;
10
- };
11
- __webpack_require__.d(getter, {
12
- a: getter
13
- });
14
- return getter;
15
- };
16
- })();
17
- (()=>{
18
- __webpack_require__.d = function(exports1, definition) {
19
- for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
20
- enumerable: true,
21
- get: definition[key]
22
- });
23
- };
24
- })();
25
- (()=>{
26
- __webpack_require__.o = function(obj, prop) {
27
- return Object.prototype.hasOwnProperty.call(obj, prop);
28
- };
29
- })();
30
- var __webpack_exports__ = {};
31
- const promises_namespaceObject = require("node:timers/promises");
32
- const external_node_child_process_namespaceObject = require("node:child_process");
33
- const external_chalk_namespaceObject = require("chalk");
34
- var external_chalk_default = /*#__PURE__*/ __webpack_require__.n(external_chalk_namespaceObject);
35
- const external_child_process_namespaceObject = require("child_process");
36
- const prompts_namespaceObject = require("@clack/prompts");
37
- function end_note({ project }) {
38
- try {
39
- (0, external_child_process_namespaceObject.exec)("git config user.name", (err, stdout, stderr)=>{
40
- const user_name = stdout.toString().trim();
41
- const repo_name = project.path.split('/').pop();
42
- let next_steps;
43
- next_steps = 'web' === project.type ? [
44
- `cd ${repo_name}`,
45
- "pnpm install",
46
- "rm -rf .git",
47
- "git init",
48
- `git remote add origin https://github.com/${user_name.length >= 1 ? user_name : 'YourUsername'}/${repo_name}.git`,
49
- "git add .",
50
- 'git commit -m "Initial commit"',
51
- "pnpm run build"
52
- ] : [
53
- `cd ${repo_name}`,
54
- "pnpm install",
55
- "rm -rf .git",
56
- "git init",
57
- external_chalk_default().magenta(`git remote add origin https://github.com/${user_name.length >= 1 ? user_name : 'YourUsername'}/${repo_name}.git`),
58
- "git add .",
59
- 'git commit -m "Initial commit"',
60
- "ZC=1 pnpm run start",
61
- `\n--------------------------------\n`,
62
- "Make your first commit and link it to the remote repository!",
63
- `Read more about how Module Federation works with Zephyr and why steps above are required: ${external_chalk_default().underline(external_chalk_default().cyan('https://docs.zephyr-cloud.io/how-to/mf-guide'))}`
64
- ];
65
- (0, prompts_namespaceObject.note)(external_chalk_default().cyan(next_steps.join('\n')), 'Next steps.');
66
- });
67
- } catch (error) {
68
- console.error(error);
69
- } finally{
70
- const end_notes = [
71
- `Discord: ${external_chalk_default().underline(external_chalk_default().cyan('https://zephyr-cloud.io/discord'))}`,
72
- `Documentation: ${'web' === project.type ? external_chalk_default().underline(external_chalk_default().cyan('https://docs.zephyr-cloud.io/recipes')) : external_chalk_default().underline(external_chalk_default().cyan('https://docs.zephyr-cloud.io/recipes/repack-mf'))}`,
73
- `Open an issue: ${external_chalk_default().underline(external_chalk_default().cyan('https://github.com/ZephyrCloudIO/create-zephyr-apps/issues'))}`
74
- ];
75
- (0, prompts_namespaceObject.note)(Object.values(end_notes).join('\n'), 'Problems?');
76
- }
77
- }
78
- const TEMPLATES = {
79
- 'rspack-project': {
80
- label: 'React + Rspack',
81
- hint: 'A simple application build by Rspack.',
82
- framework: 'react'
83
- },
84
- 'react-vite-ts': {
85
- label: 'A simple React application build by Vite',
86
- hint: 'You will be building React app powered by Vite.',
87
- framework: 'react'
88
- },
89
- 'react-vite-mf': {
90
- label: 'React + Vite + Webpack + Rspack',
91
- hint: 'You will be building federated React apps powered by Vite, Webpack and Rspack.',
92
- framework: 'react'
93
- },
94
- 'angular-vite': {
95
- label: 'Angular app with Vite',
96
- hint: 'You will be building an Angular app powered by Vite.',
97
- framework: 'angular'
98
- },
99
- 'react-webpack-mf': {
100
- label: 'React + Webpack',
101
- hint: 'A React application with Module Federation, using Webpack as the bundler.',
102
- framework: 'react'
103
- },
104
- 'nx-rspack-mf': {
105
- label: 'React + Nx + Rspack',
106
- hint: 'A React application with Module Federation, using Nx as Monorepo manager and Rspack as the bundler.',
107
- framework: 'react'
108
- },
109
- 'nx-webpack-mf': {
110
- label: 'React + Nx + Webpack',
111
- hint: 'React applications with Module Federation, using Nx as Monorepo manager and Webpack as the bundler.',
112
- framework: 'react'
113
- },
114
- 'ng-nx': {
115
- label: 'Angular app with Nx',
116
- hint: 'An Angular application with Nx as Monorepo manager.',
117
- framework: 'angular'
118
- },
119
- 'qwik-1.5': {
120
- label: 'Qwik + Vite',
121
- hint: 'A Qwik v1.5 app using Vite as the bundler.',
122
- framework: 'qwik'
123
- },
124
- 'react-rspack-tractor-2.0': {
125
- label: 'React + Rspack + Tractor 2.0',
126
- hint: 'A React application using Rspack as the bundler and Tractor 2.0 as the module federation manager.',
127
- framework: 'react'
128
- },
129
- 'turbo-rspack-mf': {
130
- label: 'Turbo + Rspack + Module Federation',
131
- hint: 'A monorepo using Turborepo, React, and Rspack as the bundler.',
132
- framework: 'react'
133
- }
134
- };
135
- const external_tempy_namespaceObject = require("tempy");
136
- const external_path_namespaceObject = require("path");
137
- var external_path_default = /*#__PURE__*/ __webpack_require__.n(external_path_namespaceObject);
138
- const external_node_fs_namespaceObject = require("node:fs");
139
- async function main() {
140
- console.clear();
141
- await (0, promises_namespaceObject.setTimeout)(1000);
142
- (0, prompts_namespaceObject.updateSettings)({
143
- aliases: {
144
- w: 'up',
145
- s: 'down',
146
- a: 'left',
147
- d: 'right'
148
- }
149
- });
150
- (0, prompts_namespaceObject.note)('npx create-zephyr-apps@latest');
151
- (0, prompts_namespaceObject.intro)(`${external_chalk_default().bgCyan(external_chalk_default().black(' Create federated applications with Zephyr '))}`);
152
- const project = await (0, prompts_namespaceObject.group)({
153
- path: ({ results })=>(0, prompts_namespaceObject.text)({
154
- message: 'Where should we create your project?',
155
- placeholder: './sparkling-solid',
156
- validate: (value)=>{
157
- if (!value) return 'Please enter a path.';
158
- if ('.' !== value[0]) return 'Please enter a relative path.';
159
- }
160
- }),
161
- type: ()=>(0, prompts_namespaceObject.select)({
162
- message: 'What type of project you are creating?',
163
- initialValue: 'web',
164
- options: [
165
- {
166
- value: 'web',
167
- label: 'Web',
168
- hint: 'You will be choosing from a selection of templates provided by us.'
169
- },
170
- {
171
- value: 'react-native',
172
- label: 'React Native',
173
- hint: 'This is a comprehensive example project provided by us. You will be building React Native powered by Re.Pack.'
174
- }
175
- ]
176
- }),
177
- templates: ({ results })=>{
178
- if ('web' === results.type) return (0, prompts_namespaceObject.select)({
179
- message: 'Pick a template: ',
180
- initialValue: 'react-rspack-mf',
181
- maxItems: 5,
182
- options: Object.keys(TEMPLATES).map((template)=>({
183
- value: template,
184
- label: external_chalk_default().cyan(TEMPLATES[template].label),
185
- hint: TEMPLATES[template].hint
186
- }))
187
- });
188
- }
189
- }, {
190
- onCancel: ()=>{
191
- (0, prompts_namespaceObject.cancel)('Operation cancelled.');
192
- process.exit(0);
193
- }
194
- });
195
- const temp_dir = external_tempy_namespaceObject.temporaryDirectory();
196
- const command_web = `git clone --depth 1 https://github.com/ZephyrCloudIO/zephyr-examples.git -b main ${temp_dir}`;
197
- const command_react_native = `git clone --depth 1 https://github.com/ZephyrCloudIO/zephyr-repack-example.git -b main ${temp_dir}`;
198
- const project_path = project.path.replace('./', '').trim();
199
- const s = (0, prompts_namespaceObject.spinner)();
200
- s.start(external_chalk_default().cyan(`Creating project in ${project_path}`));
201
- if ('web' === project.type) (0, external_node_child_process_namespaceObject.exec)(command_web, async (err, stdout, stderr)=>{
202
- if (err) {
203
- s.stop(external_chalk_default().bgRed(external_chalk_default().black(`Error cloning ${command_web} to ${project_path}...`)));
204
- console.error(err);
205
- process.exit(0);
206
- }
207
- if (!err) {
208
- const outputPath = external_path_default().join(process.cwd(), project.path);
209
- const clonedPath = external_path_default().join(temp_dir, 'examples', project.templates);
210
- try {
211
- await external_node_fs_namespaceObject.promises.cp(clonedPath, outputPath, {
212
- recursive: true,
213
- force: true
214
- });
215
- s.stop(external_chalk_default().green(`Project successfully created at ${external_chalk_default().underline(project_path)}`));
216
- } catch (error) {
217
- console.error(external_chalk_default().bgRed(external_chalk_default().black(`Error cloning to ${project_path}...`)));
218
- console.error(error);
219
- process.exit(2);
220
- } finally{
221
- await external_node_fs_namespaceObject.promises.rm(temp_dir, {
222
- recursive: true,
223
- force: true
224
- });
225
- end_note({
226
- project
227
- });
228
- }
229
- }
230
- });
231
- if ('react-native' === project.type) (0, external_node_child_process_namespaceObject.exec)(command_react_native, async (err, stdout, stderr)=>{
232
- if (err) {
233
- s.stop(external_chalk_default().bgRed(external_chalk_default().black(`Error cloning to ${project_path}...`)));
234
- console.error(err);
235
- process.exit(2);
236
- }
237
- if (!err) {
238
- const outputPath = external_path_default().join(process.cwd(), project.path);
239
- try {
240
- await external_node_fs_namespaceObject.promises.cp(temp_dir, outputPath, {
241
- recursive: true,
242
- force: true
243
- });
244
- s.stop(external_chalk_default().green(`Project successfully created at ${external_chalk_default().underline(project_path)}`));
245
- } catch (error) {
246
- s.stop(external_chalk_default().bgRed(external_chalk_default().black(`Error clonin to ${project_path}`)));
247
- console.error(error);
248
- process.exit(2);
249
- } finally{
250
- await external_node_fs_namespaceObject.promises.rm(temp_dir, {
251
- recursive: true,
252
- force: true
253
- });
254
- end_note({
255
- project
256
- });
257
- }
258
- }
259
- });
260
- }
261
- main().catch(console.error);
262
- var __webpack_export_target__ = exports;
263
- for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
264
- if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
265
- value: true
266
- });
package/dist/index.mjs DELETED
@@ -1,230 +0,0 @@
1
- #!/usr/bin/env node
2
- import * as __WEBPACK_EXTERNAL_MODULE_node_timers_promises_aedbf14c__ from "node:timers/promises";
3
- import * as __WEBPACK_EXTERNAL_MODULE_node_child_process_27f17141__ from "node:child_process";
4
- import * as __WEBPACK_EXTERNAL_MODULE_chalk__ from "chalk";
5
- import * as __WEBPACK_EXTERNAL_MODULE_child_process__ from "child_process";
6
- import * as __WEBPACK_EXTERNAL_MODULE__clack_prompts_3cae1695__ from "@clack/prompts";
7
- import * as __WEBPACK_EXTERNAL_MODULE_tempy__ from "tempy";
8
- import * as __WEBPACK_EXTERNAL_MODULE_path__ from "path";
9
- import * as __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__ from "node:fs";
10
- function end_note({ project }) {
11
- try {
12
- (0, __WEBPACK_EXTERNAL_MODULE_child_process__.exec)("git config user.name", (err, stdout, stderr)=>{
13
- const user_name = stdout.toString().trim();
14
- const repo_name = project.path.split('/').pop();
15
- let next_steps;
16
- next_steps = 'web' === project.type ? [
17
- `cd ${repo_name}`,
18
- "pnpm install",
19
- "rm -rf .git",
20
- "git init",
21
- `git remote add origin https://github.com/${user_name.length >= 1 ? user_name : 'YourUsername'}/${repo_name}.git`,
22
- "git add .",
23
- 'git commit -m "Initial commit"',
24
- "pnpm run build"
25
- ] : [
26
- `cd ${repo_name}`,
27
- "pnpm install",
28
- "rm -rf .git",
29
- "git init",
30
- __WEBPACK_EXTERNAL_MODULE_chalk__["default"].magenta(`git remote add origin https://github.com/${user_name.length >= 1 ? user_name : 'YourUsername'}/${repo_name}.git`),
31
- "git add .",
32
- 'git commit -m "Initial commit"',
33
- "ZC=1 pnpm run start",
34
- `\n--------------------------------\n`,
35
- "Make your first commit and link it to the remote repository!",
36
- `Read more about how Module Federation works with Zephyr and why steps above are required: ${__WEBPACK_EXTERNAL_MODULE_chalk__["default"].underline(__WEBPACK_EXTERNAL_MODULE_chalk__["default"].cyan('https://docs.zephyr-cloud.io/how-to/mf-guide'))}`
37
- ];
38
- (0, __WEBPACK_EXTERNAL_MODULE__clack_prompts_3cae1695__.note)(__WEBPACK_EXTERNAL_MODULE_chalk__["default"].cyan(next_steps.join('\n')), 'Next steps.');
39
- });
40
- } catch (error) {
41
- console.error(error);
42
- } finally{
43
- const end_notes = [
44
- `Discord: ${__WEBPACK_EXTERNAL_MODULE_chalk__["default"].underline(__WEBPACK_EXTERNAL_MODULE_chalk__["default"].cyan('https://zephyr-cloud.io/discord'))}`,
45
- `Documentation: ${'web' === project.type ? __WEBPACK_EXTERNAL_MODULE_chalk__["default"].underline(__WEBPACK_EXTERNAL_MODULE_chalk__["default"].cyan('https://docs.zephyr-cloud.io/recipes')) : __WEBPACK_EXTERNAL_MODULE_chalk__["default"].underline(__WEBPACK_EXTERNAL_MODULE_chalk__["default"].cyan('https://docs.zephyr-cloud.io/recipes/repack-mf'))}`,
46
- `Open an issue: ${__WEBPACK_EXTERNAL_MODULE_chalk__["default"].underline(__WEBPACK_EXTERNAL_MODULE_chalk__["default"].cyan('https://github.com/ZephyrCloudIO/create-zephyr-apps/issues'))}`
47
- ];
48
- (0, __WEBPACK_EXTERNAL_MODULE__clack_prompts_3cae1695__.note)(Object.values(end_notes).join('\n'), 'Problems?');
49
- }
50
- }
51
- const TEMPLATES = {
52
- 'rspack-project': {
53
- label: 'React + Rspack',
54
- hint: 'A simple application build by Rspack.',
55
- framework: 'react'
56
- },
57
- 'react-vite-ts': {
58
- label: 'A simple React application build by Vite',
59
- hint: 'You will be building React app powered by Vite.',
60
- framework: 'react'
61
- },
62
- 'react-vite-mf': {
63
- label: 'React + Vite + Webpack + Rspack',
64
- hint: 'You will be building federated React apps powered by Vite, Webpack and Rspack.',
65
- framework: 'react'
66
- },
67
- 'angular-vite': {
68
- label: 'Angular app with Vite',
69
- hint: 'You will be building an Angular app powered by Vite.',
70
- framework: 'angular'
71
- },
72
- 'react-webpack-mf': {
73
- label: 'React + Webpack',
74
- hint: 'A React application with Module Federation, using Webpack as the bundler.',
75
- framework: 'react'
76
- },
77
- 'nx-rspack-mf': {
78
- label: 'React + Nx + Rspack',
79
- hint: 'A React application with Module Federation, using Nx as Monorepo manager and Rspack as the bundler.',
80
- framework: 'react'
81
- },
82
- 'nx-webpack-mf': {
83
- label: 'React + Nx + Webpack',
84
- hint: 'React applications with Module Federation, using Nx as Monorepo manager and Webpack as the bundler.',
85
- framework: 'react'
86
- },
87
- 'ng-nx': {
88
- label: 'Angular app with Nx',
89
- hint: 'An Angular application with Nx as Monorepo manager.',
90
- framework: 'angular'
91
- },
92
- 'qwik-1.5': {
93
- label: 'Qwik + Vite',
94
- hint: 'A Qwik v1.5 app using Vite as the bundler.',
95
- framework: 'qwik'
96
- },
97
- 'react-rspack-tractor-2.0': {
98
- label: 'React + Rspack + Tractor 2.0',
99
- hint: 'A React application using Rspack as the bundler and Tractor 2.0 as the module federation manager.',
100
- framework: 'react'
101
- },
102
- 'turbo-rspack-mf': {
103
- label: 'Turbo + Rspack + Module Federation',
104
- hint: 'A monorepo using Turborepo, React, and Rspack as the bundler.',
105
- framework: 'react'
106
- }
107
- };
108
- async function main() {
109
- console.clear();
110
- await (0, __WEBPACK_EXTERNAL_MODULE_node_timers_promises_aedbf14c__.setTimeout)(1000);
111
- (0, __WEBPACK_EXTERNAL_MODULE__clack_prompts_3cae1695__.updateSettings)({
112
- aliases: {
113
- w: 'up',
114
- s: 'down',
115
- a: 'left',
116
- d: 'right'
117
- }
118
- });
119
- (0, __WEBPACK_EXTERNAL_MODULE__clack_prompts_3cae1695__.note)('npx create-zephyr-apps@latest');
120
- (0, __WEBPACK_EXTERNAL_MODULE__clack_prompts_3cae1695__.intro)(`${__WEBPACK_EXTERNAL_MODULE_chalk__["default"].bgCyan(__WEBPACK_EXTERNAL_MODULE_chalk__["default"].black(' Create federated applications with Zephyr '))}`);
121
- const project = await (0, __WEBPACK_EXTERNAL_MODULE__clack_prompts_3cae1695__.group)({
122
- path: ({ results })=>(0, __WEBPACK_EXTERNAL_MODULE__clack_prompts_3cae1695__.text)({
123
- message: 'Where should we create your project?',
124
- placeholder: './sparkling-solid',
125
- validate: (value)=>{
126
- if (!value) return 'Please enter a path.';
127
- if ('.' !== value[0]) return 'Please enter a relative path.';
128
- }
129
- }),
130
- type: ()=>(0, __WEBPACK_EXTERNAL_MODULE__clack_prompts_3cae1695__.select)({
131
- message: 'What type of project you are creating?',
132
- initialValue: 'web',
133
- options: [
134
- {
135
- value: 'web',
136
- label: 'Web',
137
- hint: 'You will be choosing from a selection of templates provided by us.'
138
- },
139
- {
140
- value: 'react-native',
141
- label: 'React Native',
142
- hint: 'This is a comprehensive example project provided by us. You will be building React Native powered by Re.Pack.'
143
- }
144
- ]
145
- }),
146
- templates: ({ results })=>{
147
- if ('web' === results.type) return (0, __WEBPACK_EXTERNAL_MODULE__clack_prompts_3cae1695__.select)({
148
- message: 'Pick a template: ',
149
- initialValue: 'react-rspack-mf',
150
- maxItems: 5,
151
- options: Object.keys(TEMPLATES).map((template)=>({
152
- value: template,
153
- label: __WEBPACK_EXTERNAL_MODULE_chalk__["default"].cyan(TEMPLATES[template].label),
154
- hint: TEMPLATES[template].hint
155
- }))
156
- });
157
- }
158
- }, {
159
- onCancel: ()=>{
160
- (0, __WEBPACK_EXTERNAL_MODULE__clack_prompts_3cae1695__.cancel)('Operation cancelled.');
161
- process.exit(0);
162
- }
163
- });
164
- const temp_dir = __WEBPACK_EXTERNAL_MODULE_tempy__.temporaryDirectory();
165
- const command_web = `git clone --depth 1 https://github.com/ZephyrCloudIO/zephyr-examples.git -b main ${temp_dir}`;
166
- const command_react_native = `git clone --depth 1 https://github.com/ZephyrCloudIO/zephyr-repack-example.git -b main ${temp_dir}`;
167
- const project_path = project.path.replace('./', '').trim();
168
- const s = (0, __WEBPACK_EXTERNAL_MODULE__clack_prompts_3cae1695__.spinner)();
169
- s.start(__WEBPACK_EXTERNAL_MODULE_chalk__["default"].cyan(`Creating project in ${project_path}`));
170
- if ('web' === project.type) (0, __WEBPACK_EXTERNAL_MODULE_node_child_process_27f17141__.exec)(command_web, async (err, stdout, stderr)=>{
171
- if (err) {
172
- s.stop(__WEBPACK_EXTERNAL_MODULE_chalk__["default"].bgRed(__WEBPACK_EXTERNAL_MODULE_chalk__["default"].black(`Error cloning ${command_web} to ${project_path}...`)));
173
- console.error(err);
174
- process.exit(0);
175
- }
176
- if (!err) {
177
- const outputPath = __WEBPACK_EXTERNAL_MODULE_path__["default"].join(process.cwd(), project.path);
178
- const clonedPath = __WEBPACK_EXTERNAL_MODULE_path__["default"].join(temp_dir, 'examples', project.templates);
179
- try {
180
- await __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__.promises.cp(clonedPath, outputPath, {
181
- recursive: true,
182
- force: true
183
- });
184
- s.stop(__WEBPACK_EXTERNAL_MODULE_chalk__["default"].green(`Project successfully created at ${__WEBPACK_EXTERNAL_MODULE_chalk__["default"].underline(project_path)}`));
185
- } catch (error) {
186
- console.error(__WEBPACK_EXTERNAL_MODULE_chalk__["default"].bgRed(__WEBPACK_EXTERNAL_MODULE_chalk__["default"].black(`Error cloning to ${project_path}...`)));
187
- console.error(error);
188
- process.exit(2);
189
- } finally{
190
- await __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__.promises.rm(temp_dir, {
191
- recursive: true,
192
- force: true
193
- });
194
- end_note({
195
- project
196
- });
197
- }
198
- }
199
- });
200
- if ('react-native' === project.type) (0, __WEBPACK_EXTERNAL_MODULE_node_child_process_27f17141__.exec)(command_react_native, async (err, stdout, stderr)=>{
201
- if (err) {
202
- s.stop(__WEBPACK_EXTERNAL_MODULE_chalk__["default"].bgRed(__WEBPACK_EXTERNAL_MODULE_chalk__["default"].black(`Error cloning to ${project_path}...`)));
203
- console.error(err);
204
- process.exit(2);
205
- }
206
- if (!err) {
207
- const outputPath = __WEBPACK_EXTERNAL_MODULE_path__["default"].join(process.cwd(), project.path);
208
- try {
209
- await __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__.promises.cp(temp_dir, outputPath, {
210
- recursive: true,
211
- force: true
212
- });
213
- s.stop(__WEBPACK_EXTERNAL_MODULE_chalk__["default"].green(`Project successfully created at ${__WEBPACK_EXTERNAL_MODULE_chalk__["default"].underline(project_path)}`));
214
- } catch (error) {
215
- s.stop(__WEBPACK_EXTERNAL_MODULE_chalk__["default"].bgRed(__WEBPACK_EXTERNAL_MODULE_chalk__["default"].black(`Error clonin to ${project_path}`)));
216
- console.error(error);
217
- process.exit(2);
218
- } finally{
219
- await __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__.promises.rm(temp_dir, {
220
- recursive: true,
221
- force: true
222
- });
223
- end_note({
224
- project
225
- });
226
- }
227
- }
228
- });
229
- }
230
- main().catch(console.error);
@@ -1,63 +0,0 @@
1
- declare const REPO_OWNER = "ZephyrCloudIO";
2
- declare const REPO_NAME = "zephyr-examples";
3
- declare const REPACK_REPO = "zephyr-repack-example";
4
- declare const BASE_REPO = "ZephyrCloudIO/zephyr-examples";
5
- declare const REPACK_REPO_PATH = "ZephyrCloudIO/zephyr-repack-example";
6
- declare const TEMPLATES: {
7
- 'rspack-project': {
8
- label: string;
9
- hint: string;
10
- framework: string;
11
- };
12
- 'react-vite-ts': {
13
- label: string;
14
- hint: string;
15
- framework: string;
16
- };
17
- 'react-vite-mf': {
18
- label: string;
19
- hint: string;
20
- framework: string;
21
- };
22
- 'angular-vite': {
23
- label: string;
24
- hint: string;
25
- framework: string;
26
- };
27
- 'react-webpack-mf': {
28
- label: string;
29
- hint: string;
30
- framework: string;
31
- };
32
- 'nx-rspack-mf': {
33
- label: string;
34
- hint: string;
35
- framework: string;
36
- };
37
- 'nx-webpack-mf': {
38
- label: string;
39
- hint: string;
40
- framework: string;
41
- };
42
- 'ng-nx': {
43
- label: string;
44
- hint: string;
45
- framework: string;
46
- };
47
- 'qwik-1.5': {
48
- label: string;
49
- hint: string;
50
- framework: string;
51
- };
52
- 'react-rspack-tractor-2.0': {
53
- label: string;
54
- hint: string;
55
- framework: string;
56
- };
57
- 'turbo-rspack-mf': {
58
- label: string;
59
- hint: string;
60
- framework: string;
61
- };
62
- };
63
- export { REPO_OWNER, REPO_NAME, REPACK_REPO, BASE_REPO, REPACK_REPO_PATH, TEMPLATES };
@@ -1,4 +0,0 @@
1
- import { CLIOptions } from './types';
2
- export default function end_note({ project }: {
3
- project: CLIOptions;
4
- }): void;
@@ -1,24 +0,0 @@
1
- export interface GithubTreeItem {
2
- path: string;
3
- type: 'tree' | 'blob';
4
- }
5
- export interface ExampleMetadata {
6
- name: string;
7
- description: string;
8
- path: string;
9
- }
10
- export interface WebCreationOptions {
11
- path: string;
12
- template: string;
13
- framework: string;
14
- }
15
- export interface ReactNativeCreationOptions {
16
- path: string;
17
- }
18
- export interface CLIOptions {
19
- path: string;
20
- type: 'web' | 'react-native';
21
- /** At the moment, if users opt for web they will only be asked for a template without host name and remote_name */
22
- templates: string | undefined;
23
- install: boolean;
24
- }
@@ -1,2 +0,0 @@
1
- declare const _default: import("@rslib/core").RslibConfig;
2
- export default _default;