lucy-cli 2.0.0-beta.13 → 2.0.0-beta.14

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 (172) hide show
  1. package/package.json +7 -2
  2. package/.cursorignore +0 -4
  3. package/.eslintrc.cjs +0 -96
  4. package/.github/funding.yml +0 -2
  5. package/.nvmrc +0 -1
  6. package/.stylelintrc.js +0 -8
  7. package/.wix/debug.log +0 -10
  8. package/.yarnrc.yml +0 -2
  9. package/files/sync-data/data/test.csv +0 -17
  10. package/files/sync-data/files/lucy.jpg +0 -0
  11. package/files/sync-data/schema/test.json +0 -11
  12. package/lucy.jpg +0 -0
  13. package/mitarbeiter-login.html +0 -188
  14. package/old/Gulpfile.d.ts +0 -34
  15. package/old/Gulpfile.js +0 -116
  16. package/old/Gulpfile.js.map +0 -1
  17. package/old/Gulpfile.ts +0 -231
  18. package/old/gulp/backend.d.ts +0 -3
  19. package/old/gulp/backend.js +0 -92
  20. package/old/gulp/backend.js.map +0 -1
  21. package/old/gulp/backend.ts +0 -109
  22. package/old/gulp/checks.d.ts +0 -3
  23. package/old/gulp/checks.js +0 -205
  24. package/old/gulp/checks.js.map +0 -1
  25. package/old/gulp/checks.ts +0 -228
  26. package/old/gulp/clean.d.ts +0 -3
  27. package/old/gulp/clean.js +0 -29
  28. package/old/gulp/clean.js.map +0 -1
  29. package/old/gulp/clean.ts +0 -33
  30. package/old/gulp/copy.d.ts +0 -2
  31. package/old/gulp/copy.js +0 -34
  32. package/old/gulp/copy.js.map +0 -1
  33. package/old/gulp/copy.ts +0 -42
  34. package/old/gulp/helpers.d.ts +0 -2
  35. package/old/gulp/helpers.js +0 -25
  36. package/old/gulp/helpers.js.map +0 -1
  37. package/old/gulp/helpers.ts +0 -26
  38. package/old/gulp/pages.d.ts +0 -2
  39. package/old/gulp/pages.js +0 -37
  40. package/old/gulp/pages.js.map +0 -1
  41. package/old/gulp/pages.ts +0 -40
  42. package/old/gulp/pipeline.d.ts +0 -1
  43. package/old/gulp/pipeline.js +0 -29
  44. package/old/gulp/pipeline.js.map +0 -1
  45. package/old/gulp/pipeline.ts +0 -31
  46. package/old/gulp/public.d.ts +0 -2
  47. package/old/gulp/public.js +0 -50
  48. package/old/gulp/public.js.map +0 -1
  49. package/old/gulp/public.ts +0 -59
  50. package/old/gulp/styles.d.ts +0 -2
  51. package/old/gulp/styles.js +0 -40
  52. package/old/gulp/styles.js.map +0 -1
  53. package/old/gulp/styles.ts +0 -46
  54. package/old/gulp/templates.d.ts +0 -2
  55. package/old/gulp/templates.js +0 -33
  56. package/old/gulp/templates.js.map +0 -1
  57. package/old/gulp/templates.ts +0 -39
  58. package/old/gulp/types.d.ts +0 -4
  59. package/old/gulp/types.js +0 -289
  60. package/old/gulp/types.js.map +0 -1
  61. package/old/gulp/types.ts +0 -311
  62. package/old/gulp/watchers.d.ts +0 -9
  63. package/old/gulp/watchers.js +0 -59
  64. package/old/gulp/watchers.js.map +0 -1
  65. package/old/gulp/watchers.ts +0 -105
  66. package/old/helpers.d.ts +0 -32
  67. package/old/helpers.js +0 -267
  68. package/old/helpers.js.map +0 -1
  69. package/old/helpers.ts +0 -307
  70. package/old/index.d.ts +0 -59
  71. package/old/index.js +0 -288
  72. package/old/index.js.map +0 -1
  73. package/old/index.ts +0 -379
  74. package/old/init.d.ts +0 -8
  75. package/old/init.js +0 -165
  76. package/old/init.js.map +0 -1
  77. package/old/init.ts +0 -183
  78. package/old/models.d.ts +0 -37
  79. package/old/models.js +0 -2
  80. package/old/models.js.map +0 -1
  81. package/old/models.ts +0 -35
  82. package/old/prepare.d.ts +0 -8
  83. package/old/prepare.js +0 -20
  84. package/old/prepare.js.map +0 -1
  85. package/old/prepare.ts +0 -24
  86. package/old/schemas/index.d.ts +0 -0
  87. package/old/schemas/index.js +0 -2
  88. package/old/schemas/index.js.map +0 -1
  89. package/old/schemas/index.ts +0 -0
  90. package/old/schemas/types.d.ts +0 -0
  91. package/old/schemas/types.js +0 -2
  92. package/old/schemas/types.js.map +0 -1
  93. package/old/schemas/types.ts +0 -0
  94. package/old/settings.json +0 -67
  95. package/old/sync.d.ts +0 -2
  96. package/old/sync.js +0 -88
  97. package/old/sync.js.map +0 -1
  98. package/old/sync.ts +0 -97
  99. package/old/types.d.ts +0 -8
  100. package/pnpm-workspace.yaml +0 -6
  101. package/settings/backend-settings.json +0 -19
  102. package/settings/master-settings.json +0 -20
  103. package/settings/page-settings.json +0 -21
  104. package/settings/public-settings.json +0 -22
  105. package/src/args.ts +0 -121
  106. package/src/commands/checks.ts +0 -51
  107. package/src/commands/cleanup.ts +0 -11
  108. package/src/commands/copy.ts +0 -29
  109. package/src/commands/edit.ts +0 -81
  110. package/src/commands/exec.ts +0 -73
  111. package/src/commands/git.ts +0 -152
  112. package/src/commands/home.ts +0 -20
  113. package/src/commands/install.ts +0 -269
  114. package/src/commands/read.ts +0 -45
  115. package/src/commands/write.ts +0 -45
  116. package/src/commands.ts +0 -21
  117. package/src/config.ts +0 -142
  118. package/src/error.ts +0 -3
  119. package/src/helpers.ts +0 -93
  120. package/src/index.ts +0 -113
  121. package/src/init/blocks.ts +0 -85
  122. package/src/init/cargo.ts +0 -25
  123. package/src/init/expo.ts +0 -69
  124. package/src/init/gitModules.ts +0 -15
  125. package/src/init/index.ts +0 -86
  126. package/src/init/monorepo.ts +0 -72
  127. package/src/init/prepareVelo.ts +0 -19
  128. package/src/init/tauri.ts +0 -42
  129. package/src/init/templates.ts +0 -98
  130. package/src/init/velo.ts +0 -66
  131. package/src/policy.ts +0 -6
  132. package/src/prepare.ts +0 -24
  133. package/src/runtime.ts +0 -21
  134. package/src/schemas/gulp.ts +0 -31
  135. package/src/schemas/index.ts +0 -17
  136. package/src/schemas/lucy.ts +0 -43
  137. package/src/schemas/tsconfig.ts +0 -35
  138. package/src/schemas/types.ts +0 -40
  139. package/src/settings.json +0 -67
  140. package/src/states.ts +0 -15
  141. package/src/tasks/Gulpfile.ts +0 -207
  142. package/src/tasks/gulp/backend.ts +0 -113
  143. package/src/tasks/gulp/checks.ts +0 -219
  144. package/src/tasks/gulp/clean.ts +0 -38
  145. package/src/tasks/gulp/copy.ts +0 -38
  146. package/src/tasks/gulp/helpers.ts +0 -18
  147. package/src/tasks/gulp/pages.ts +0 -43
  148. package/src/tasks/gulp/pipeline.ts +0 -31
  149. package/src/tasks/gulp/public.ts +0 -61
  150. package/src/tasks/gulp/styles.ts +0 -47
  151. package/src/tasks/gulp/templates.ts +0 -53
  152. package/src/tasks/gulp/types.ts +0 -310
  153. package/src/tasks/gulp/watchers.ts +0 -97
  154. package/src/tasks/index.ts +0 -24
  155. package/src/tasks/syncSettings.ts +0 -21
  156. package/src/types.d.ts +0 -8
  157. package/src/utils/index.ts +0 -0
  158. package/src/utils/logger.ts +0 -40
  159. package/src/wix-sdk/check.ts +0 -24
  160. package/src/wix-sdk/client.ts +0 -18
  161. package/src/wix-sdk/index.ts +0 -17
  162. package/src/wix-sdk/init.ts +0 -54
  163. package/src/wix-sdk/run.ts +0 -56
  164. package/src/wix-sync/client.ts +0 -6
  165. package/src/wix-sync/export.ts +0 -19
  166. package/src/wix-sync/import.ts +0 -27
  167. package/src/wix-sync/index.ts +0 -36
  168. package/src/wix-sync/init.ts +0 -77
  169. package/src/wix-sync/is-alive.ts +0 -25
  170. package/src/wix-sync/migrate.ts +0 -23
  171. package/src/wix-sync/sync.ts +0 -27
  172. package/tsconfig.json +0 -34
package/old/index.ts DELETED
@@ -1,379 +0,0 @@
1
- #!/usr/bin/env node --no-warnings
2
- import { dirname } from 'path';
3
- import { fileURLToPath } from 'url';
4
- import { existsSync } from 'fs';
5
- import chalk from 'chalk';
6
- import settings from './settings.json' with { type: "json" };;
7
- import projectPackageJSON from '../package.json' with { type: "json" };;
8
-
9
- import { join } from 'path';
10
- import fs from 'fs/promises';
11
-
12
- import { init } from './init.js';
13
- import { sync } from './sync.js';
14
- import { runGulp, installPackages, killAllProcesses, cleanupWatchers, createTemplateFolder, updateLucyConfigFromPackageJson } from './helpers.js';
15
- import { prepare } from './prepare.js';
16
- import { spawn, spawnSync } from 'child_process';
17
- import os from 'os';
18
-
19
- export type ModulesSettings = {
20
- packageRoot: string;
21
- targetFolder: string;
22
- args: string[];
23
- settings: LucySettings;
24
- }
25
- export type LucySettings = {
26
- modules: {
27
- [libName: string]: {
28
- url: string;
29
- branch: string;
30
- path?: string;
31
- noCompile?: boolean;
32
- };
33
- };
34
- wixSettings: {
35
- compilerOptions: {
36
- composite: boolean;
37
- noEmit: boolean;
38
- lib: string[];
39
- jsx: string;
40
- };
41
- exclude: string[];
42
- };
43
- initialized: boolean;
44
- wixPackages: {
45
- [packageName: string]: string;
46
- };
47
- devPackages: {
48
- [packageName: string]: string;
49
- };
50
- scripts: {
51
- [commandName: string]: string;
52
- };
53
- };
54
-
55
- export type ModuleSettings = {
56
- packageRoot: string;
57
- targetFolder: string;
58
- args: string[];
59
- wixConfigPath: string;
60
- lucyConfigPath: string;
61
- packageJsonPath: string;
62
- settings: LucySettings;
63
- lockVersion: boolean;
64
- force: boolean;
65
- veloConfigName: string;
66
- }
67
-
68
- export type ProjectSettings = {
69
- // packages?: Record<string, string>;
70
- modules?: Record<string, string>;
71
- lucySettings?: LucySettings;
72
- packageJSON?: Record<string, any>;
73
- }
74
-
75
- export const orange = chalk.hex('#FFA500');
76
- export const blue = chalk.blueBright;
77
- export const green = chalk.greenBright;
78
- export const red = chalk.redBright;
79
- export const yellow = chalk.yellow;
80
- export const magenta = chalk.magentaBright;
81
-
82
- // eslint-disable-next-line @typescript-eslint/naming-convention
83
- const __filename = fileURLToPath(import.meta.url);
84
- // eslint-disable-next-line @typescript-eslint/naming-convention
85
- const __dirname = dirname(__filename);
86
-
87
- // const cwd = process.cwd();
88
- // const command = `watchman watch-del '${cwd}'`;
89
- // killAllProcesses('@wix/cli/bin/wix.cjs'); // Matches processes running the Wix CLI
90
- // killAllProcesses('wix:dev');
91
-
92
-
93
- process.on('exit', (code) => {
94
- killAllProcesses('@wix/cli/bin/wix.cjs'); // Matches processes running the Wix CLI
95
- killAllProcesses('wix:dev');
96
- cleanupWatchers();
97
- console.log(`🚪 ${magenta.underline('Process exiting with code:')} ${orange(code)}`);
98
- });
99
-
100
- process.on('SIGINT', () => {
101
- console.log(`🐕 ${green.underline('Received Ctrl+C (SIGINT), cleaning up...')}`);
102
- killAllProcesses('@wix/cli/bin/wix.cjs'); // Matches processes running the Wix CLI
103
- killAllProcesses('wix:dev');
104
- cleanupWatchers();
105
- process.exit(); // Exit explicitly after handling
106
- });
107
-
108
- process.on('SIGTERM', () => {
109
- console.log(`🛑 ${red.underline('Received termination signal (SIGTERM), cleaning up...')}`);
110
- killAllProcesses('@wix/cli/bin/wix.cjs'); // Matches processes running the Wix CLI
111
- killAllProcesses('wix:dev');
112
- cleanupWatchers();
113
- process.exit(); // Exit explicitly after handling
114
- });
115
-
116
- process.on('uncaughtException', (error) => {
117
- console.error(`💥 ${red.underline('Uncaught Exception:')}`, error);
118
- killAllProcesses('@wix/cli/bin/wix.cjs'); // Matches processes running the Wix CLI
119
- killAllProcesses('wix:dev');
120
- cleanupWatchers();
121
- process.exit(1); // Exit with an error code
122
- });
123
-
124
- process.on('unhandledRejection', (reason, promise) => {
125
- console.error(`🚨 ${yellow.underline('Unhandled Rejection at:')} ${orange(promise)}`);
126
- console.error(`🚨 ${red.underline('Reason:')} ${reason}`); cleanupWatchers();
127
- killAllProcesses('@wix/cli/bin/wix.cjs'); // Matches processes running the Wix CLI
128
- killAllProcesses('wix:dev');
129
- cleanupWatchers();
130
- process.exit(1); // Exit with an error code
131
- });
132
-
133
- /**
134
- * Main function
135
- * @returns {Promise<void>}
136
- */
137
- async function main(): Promise<void> {
138
- // INFO: Module settings
139
- const moduleSettings: ModuleSettings = {
140
- packageRoot: dirname(__dirname),
141
- targetFolder: process.cwd(),
142
- args: process.argv.slice(2),
143
- settings,
144
- wixConfigPath: join(process.cwd(), 'wix.config.json'),
145
- lucyConfigPath: join(process.cwd(), 'lucy.json'),
146
- packageJsonPath: join(process.cwd(), 'package.json'),
147
- force: false,
148
- lockVersion: false,
149
- veloConfigName: 'config.json'
150
- }
151
-
152
- let projectSettings: ProjectSettings = {};
153
-
154
- if(moduleSettings.args.includes('version') || moduleSettings.args.includes('-v')){
155
- console.log("🐾" + blue.bold(` => ${projectPackageJSON.version}`));
156
-
157
- return;
158
- }
159
-
160
- if (moduleSettings.args.includes('templates')) {
161
- const templatesPath = join(os.homedir(), '.lucy-cli');
162
- if (!existsSync(templatesPath)) {
163
- console.log((`💩 ${red.underline.bold("=> Lucy templates folder not found at =>")} ${orange(templatesPath)}`));
164
- console.log(chalk.yellow('🐕 Creating templates folder with default template...'));
165
- await createTemplateFolder(moduleSettings);
166
- }
167
-
168
- console.log(`🐕 ${blue.underline('Opening templates folder at:')} ${orange(templatesPath)}`);
169
-
170
- let command: string;
171
- switch (process.platform) {
172
- case 'darwin': command = 'open'; break;
173
- case 'win32': command = 'start'; break;
174
- default: command = 'xdg-open'; break;
175
- }
176
-
177
- const child = spawn(command, [templatesPath], { detached: true, stdio: 'ignore' });
178
- child.on('error', (err) => {
179
- console.error(`💩 ${red.underline.bold('Failed to open folder:')} ${orange(err.message)}`);
180
- });
181
- child.unref();
182
- return;
183
- }
184
-
185
-
186
- // Run velo sync
187
- if(moduleSettings.args.includes('velo-sync')){
188
- await sync(moduleSettings, projectSettings);
189
-
190
- return;
191
- }
192
-
193
- if(moduleSettings.args.includes('help') || moduleSettings.args.includes('-h')){
194
- console.log("🦮 " + green.underline.bold(' => Lucy CLI Help'));
195
- console.log("Usage: lucy-cli <command> [options]");
196
- console.log("\nCommands:");
197
- console.log("🦮 " + magenta.bold('init') + " : Initializes caontaining a WIX project to enable full TS support");
198
- console.log("🦮 " + magenta.bold('dev') + " : Starts the development environment. This includes setting up any required services for local development.");
199
- console.log("🦮 " + magenta.bold('build-prod') + " : Builds the project in production mode, optimizing files for deployment.");
200
- console.log("🦮 " + magenta.bold('prepare') + " : Prepares the project by installing packages & initializing git modules, configured in lucy.json");
201
- console.log("🦮 " + magenta.bold('velo-sync') + " : Synchronizes wix collections(velo-sync -h for help)");
202
- console.log("🦮 " + magenta.bold('install') + " : Installs all Wix npm packages listed in the 'lucy.json' file in the project directory.");
203
- console.log("🦮 " + magenta.bold('fix') + " : Runs a fix command to resolve common issues in development or production settings.");
204
- console.log("🦮 " + magenta.bold('docs') + " : Generates documentation for the project.");
205
- console.log("🦮 " + magenta.bold('cypress') + " : Starts the cypress test runner.");
206
- console.log("🦮 " + magenta.bold('templates') + " : Opens the Lucy CLI templates folder.");
207
- console.log("🦮 " + magenta.bold('sync-pkgs') + " : Syncs dependencies from package.json to lucy.json.");
208
- console.log("🦮 " + magenta.bold('e2e') + " : Starts the cypress test runner in CI mode. first argument is the key second is the build id <e2e <somekey <someID>");
209
- console.log("\nOptions:");
210
- console.log("🦮 " + magenta.bold('-h, help') + " : Displays this help message.");
211
- console.log("🦮 " + magenta.bold('-v, version') + " : Displays the current version of Lucy CLI as defined in the project’s package.json.");
212
- console.log("🦮 " + magenta.bold('-f, force') + " : Forces specific commands to execute even if they may lead to potential issues.");
213
- console.log(" Used for functions like deleting obsolete pages or initializing missing components.");
214
- console.log("🦮 " + magenta.bold('-l') + " : Locks package versions to those specified in the configuration file lucy.json");
215
- console.log("\nExamples:");
216
- console.log("🦮 " + magenta.bold('lucy-cli init') + " : Initializes a new Wix project.");
217
- console.log("🦮 " + magenta.bold('lucy-cli dev') + " : Starts the development environment.");
218
- console.log("🦮 " + magenta.bold('lucy-cli sync') + " : Synchronizes database and settings.");
219
- console.log("🦮 " + magenta.bold('lucy-cli install') + " : Installs all Wix npm packages from 'lucy.json'.");
220
- console.log("🦮 " + magenta.bold('lucy-cli dev -f') + " : Starts the dev environment with forced settings.");
221
- console.log("🦮 " + magenta.bold('lucy-cli install -l') + " : Installs Wix npm packages, respecting locked versions specified in the configuration.");
222
-
223
- return;
224
- }
225
-
226
- if (!existsSync(moduleSettings.wixConfigPath)) {
227
- console.log((`💩 ${red.underline.bold("=> This is not a WIX project =>")} ${orange(moduleSettings.targetFolder)}`));
228
- return;
229
- }
230
-
231
- //INFO: Collect project settings
232
- if(moduleSettings.args.includes('-f')) moduleSettings.force = true;
233
- if(moduleSettings.args.includes('-l')) moduleSettings.lockVersion = true;
234
-
235
- if(existsSync(moduleSettings.packageJsonPath)) {
236
- const packageJSONraw = await fs.readFile(join(moduleSettings.packageJsonPath), 'utf8');
237
- try {
238
- projectSettings.packageJSON = JSON.parse(packageJSONraw);
239
- if(moduleSettings.force) {
240
- console.log("❗️" + red.underline(' => Forcing'));
241
- moduleSettings.force = true;
242
- }
243
- } catch (parseError) {
244
- console.log((`💩 ${red.underline.bold("=> Error parsing package.json =>")} ${orange(parseError)}`));
245
- return;
246
- }
247
- }
248
-
249
- if(existsSync(moduleSettings.lucyConfigPath)) {
250
- try {
251
- const data = await fs.readFile(moduleSettings.lucyConfigPath, 'utf8');
252
- projectSettings.lucySettings = JSON.parse(data);
253
- } catch (parseError) {
254
- console.log((`💩 ${red.underline.bold("=> Error parsing Lucy.json =>")} ${orange(parseError)}`));
255
- }
256
- } else {
257
- if(!moduleSettings.args.includes('init')) {
258
- return console.log(yellow.underline.bold('🐶 => Project not Initialized! Please initialize using "lucy-cli init"'));
259
- };
260
- }
261
-
262
- if(!projectSettings.lucySettings?.initialized) {
263
- if(!moduleSettings.args.includes('init')) {
264
- return console.log(yellow.underline.bold('🐶 => Project not Initialized! Please initialize using "lucy-cli init"'));
265
- }
266
- }
267
-
268
- if(moduleSettings.args.includes('-l')) moduleSettings.lockVersion = true;
269
-
270
- console.log("🐕" + magenta.underline(' => Lucy CLI => RUNNING: ' + orange('Press Ctrl+C to stop.')));
271
- // INFO: Run commands
272
-
273
- if(moduleSettings.args.includes('init')){
274
- if(projectSettings.lucySettings?.initialized && !moduleSettings.force) {
275
- console.log((`💩 ${red.underline.bold("=> This project is already initialized =>")} ${orange(moduleSettings.targetFolder)}`));
276
- console.log("🐕" + magenta.underline(' => Use -f to force initialization'));
277
- return;
278
- }
279
- console.log("🐕" + magenta.underline(' => Initializing project'));
280
- init(moduleSettings, projectSettings);
281
-
282
- return;
283
- }
284
-
285
-
286
- if(moduleSettings.args.includes('docs')){
287
- const res = spawnSync('yarn docs', { shell: true, stdio: 'inherit' });
288
- if (res.error) {
289
- return console.log((`💩 ${red.underline.bold("=> Failed to Docs generated => ")} ${orange(res.error.message)}`));
290
- }
291
- return console.log("🐕" + blue.underline(` => Docs generated!`));
292
- }
293
-
294
- if(moduleSettings.args.includes('cypress')){
295
- const res = spawnSync('yarn cypress', { shell: true, stdio: 'inherit' });
296
- if (res.error) {
297
- return console.log((`💩 ${red.underline.bold("=> Failed to start cypress => ")} ${orange(res.error.message)}`));
298
- }
299
- return console.log("🐕" + blue.underline(` => Started Cypress`));
300
- }
301
-
302
- if (moduleSettings.args.includes('e2e')) {
303
- // Extract arguments
304
- const e2eIndex = moduleSettings.args.indexOf('e2e');
305
- const key = moduleSettings.args[e2eIndex + 1];
306
- const buildId = moduleSettings.args[e2eIndex + 2];
307
-
308
- // Validate that both arguments are provided
309
- if (!key && !buildId) {
310
- console.log(`💩 ${red.underline.bold("=> Missing required arguments:")} ${orange("key")} and ${orange("build ID")}`);
311
- process.exit(1);
312
- }
313
-
314
- // Run Cypress with the provided arguments
315
- const res = spawnSync(`yarn e2e --key ${key} --ci-build-id ${buildId}`, { shell: true, stdio: 'inherit' });
316
- if (res.error) {
317
- console.log(`💩 ${red.underline.bold("=> Failed to start Cypress =>")} ${orange(res.error.message)}`);
318
- process.exit(1);
319
- }
320
- return console.log("🐕 " + blue.underline(`=> Started Cypress successfully`));
321
- }
322
-
323
- if(moduleSettings.args.includes('prepare')){
324
- await prepare( moduleSettings, projectSettings);
325
-
326
- return;
327
- }
328
-
329
- if(moduleSettings.args.includes('install')){
330
- if(!projectSettings.lucySettings?.initialized) {
331
- console.log((`💩 ${red.underline.bold("=> This project is not initialized =>")} ${orange(moduleSettings.targetFolder)}`));
332
- console.log("🐕" + magenta.underline(' => Use init to initialize'));
333
- return;
334
- }
335
- await installPackages(projectSettings.lucySettings.wixPackages, projectSettings.lucySettings.devPackages, moduleSettings.targetFolder, moduleSettings.lockVersion);
336
-
337
- return;
338
- }
339
-
340
-
341
- if(moduleSettings.args.includes('dev')){
342
- runGulp(moduleSettings, projectSettings, 'dev');
343
-
344
- return;
345
- }
346
- if(moduleSettings.args.includes('build-prod')){
347
- runGulp(moduleSettings, projectSettings, 'build-prod');
348
-
349
- return;
350
- }
351
- if(moduleSettings.args.includes('fix')){
352
- runGulp(moduleSettings, projectSettings, 'fix-wix');
353
-
354
- return;
355
- }
356
-
357
- if(moduleSettings.args.includes('sync-pkgs')){
358
- console.log("🐕" + magenta.underline(' => Syncing package.json with lucy.json'));
359
- if (!existsSync(moduleSettings.packageJsonPath)) {
360
- console.log((`💩 ${red.underline.bold("=> package.json not found at =>")} ${orange(moduleSettings.packageJsonPath)}`));
361
- return;
362
- }
363
- if (!existsSync(moduleSettings.lucyConfigPath)) {
364
- console.log((`💩 ${red.underline.bold("=> lucy.json not found at =>")} ${orange(moduleSettings.lucyConfigPath)}`));
365
- return;
366
- }
367
- await updateLucyConfigFromPackageJson(moduleSettings.packageJsonPath, moduleSettings.lucyConfigPath);
368
- return;
369
- }
370
-
371
-
372
- console.log("🐕" + blue.underline.bold(' => Running dev'));
373
- runGulp(moduleSettings, projectSettings, 'dev');
374
- }
375
-
376
- main().catch((error) => {
377
- console.error("Error:", error);
378
- process.exit(1);
379
- });
package/old/init.d.ts DELETED
@@ -1,8 +0,0 @@
1
- import { ModuleSettings, ProjectSettings } from './index.js';
2
- /**
3
- * Init Lucy project
4
- * @param {string} cwd Current working directory
5
- * @param {string} packageRoot Package root directory
6
- * @returns {void}
7
- */
8
- export declare function init(moduleSettings: ModuleSettings, projectSettings: ProjectSettings): Promise<void>;
package/old/init.js DELETED
@@ -1,165 +0,0 @@
1
- import chalk from 'chalk';
2
- import { existsSync, mkdirSync, promises as fsPromises } from 'fs';
3
- import fse from 'fs-extra';
4
- import { join } from 'path';
5
- import fs from 'fs/promises';
6
- import path from 'path';
7
- import os from 'os';
8
- import enquirer from 'enquirer';
9
- import { blue, orange, red } from './index.js';
10
- import { createTemplateFolder, gitInit, installPackages } from './helpers.js';
11
- const { Select } = enquirer;
12
- /**
13
- * Init Lucy project
14
- * @param {string} cwd Current working directory
15
- * @param {string} packageRoot Package root directory
16
- * @returns {void}
17
- */
18
- export async function init(moduleSettings, projectSettings) {
19
- if (projectSettings.packageJSON && projectSettings.packageJSON.wixLucy?.initialized && !moduleSettings.args.includes('-f')) {
20
- console.log((`💩 ${red.underline.bold("=> This project is already initialized =>")} ${orange(moduleSettings.targetFolder)}`));
21
- return;
22
- }
23
- const templatesPath = join(os.homedir(), '.lucy-cli');
24
- if (!existsSync(templatesPath)) {
25
- console.log(chalk.yellow(`Templates folder not found at ${orange(templatesPath)}. Creating it with a default template...`));
26
- await createTemplateFolder(moduleSettings);
27
- }
28
- const templateChoices = (await fs.readdir(templatesPath, { withFileTypes: true }))
29
- .filter(dirent => dirent.isDirectory())
30
- .map(dirent => dirent.name);
31
- if (templateChoices.length === 0) {
32
- console.log((`💩 ${red.underline.bold("=> No templates found in =>")} ${orange(templatesPath)}`));
33
- return;
34
- }
35
- const prompt = new Select({
36
- name: 'template',
37
- message: 'Select a project template',
38
- choices: templateChoices
39
- });
40
- const selectedTemplate = await prompt.run();
41
- const templateDir = join(templatesPath, selectedTemplate);
42
- const templateFilesDir = join(templateDir, 'files');
43
- const templateSettingsPath = join(templateDir, 'settings.json');
44
- if (!existsSync(templateSettingsPath)) {
45
- console.log((`💩 ${red.underline.bold("=> Template is missing settings.json at =>")} ${orange(templateSettingsPath)}`));
46
- return;
47
- }
48
- try {
49
- const templateSettingsRaw = await fs.readFile(templateSettingsPath, 'utf8');
50
- moduleSettings.settings = JSON.parse(templateSettingsRaw);
51
- }
52
- catch (e) {
53
- console.log((`💩 ${red.underline.bold("=> Error reading or parsing template settings =>")} ${orange(e)}`));
54
- return;
55
- }
56
- await copyFolder(templateFilesDir, moduleSettings.targetFolder);
57
- await editJson(moduleSettings.packageJsonPath, ['type', 'scripts'], ['module', moduleSettings.settings.scripts]);
58
- await stringReplace(join(moduleSettings.targetFolder, 'currents.config.js'), ['__ProjectName__'], [path.basename(moduleSettings.targetFolder)]);
59
- await installPackages(moduleSettings.settings.wixPackages, moduleSettings.settings.devPackages, moduleSettings.targetFolder, moduleSettings.lockVersion);
60
- await editJson(join(moduleSettings.targetFolder, 'jsconfig.json'), ['compilerOptions', 'exclude'], [moduleSettings.settings.wixSettings.compilerOptions, moduleSettings.settings.wixSettings.exclude]);
61
- await editJson(join(moduleSettings.targetFolder, 'typedoc.json'), ['name'], [path.basename(moduleSettings.targetFolder)]);
62
- await gitInit(moduleSettings.targetFolder, moduleSettings.settings.modules, moduleSettings.force);
63
- moduleSettings.settings.initialized = true;
64
- const eslintrcPath = join(moduleSettings.targetFolder, '.eslintrc.json');
65
- if (existsSync(eslintrcPath)) {
66
- console.log((`🐕 ${blue.underline.bold("=> Deleting .eslintrc.json")}`));
67
- await fs.rm(join(eslintrcPath), { recursive: false }).catch(e => {
68
- console.log((`💩 ${red.underline.bold("=> Could not delete .eslintrc.json ")} ${red.bold("=> ", e)}`));
69
- });
70
- }
71
- console.log((`🐕 ${blue.underline.bold("=> Writing settings to lucy.json")}`));
72
- await fs.writeFile(join(moduleSettings.targetFolder, 'lucy.json'), JSON.stringify(moduleSettings.settings, null, 2));
73
- console.log(chalk.greenBright.underline('🐶 => Initialization done!'));
74
- }
75
- /**
76
- * Copy files from source to target
77
- * @param {string} source Source folder
78
- * @param {string} target Target folder
79
- * @returns {Promise<void>}
80
- */
81
- async function copyFolder(source, target) {
82
- if (!existsSync(target)) {
83
- console.log((`💩 ${red.underline.bold("=> Target folder doesn't exist =>")} ${orange(target)}`));
84
- return;
85
- }
86
- try {
87
- const files = await fsPromises.readdir(source);
88
- for (const file of files) {
89
- const sourcePath = join(source, file);
90
- const targetPath = join(target, file);
91
- if (file === 'lucy.json' && existsSync(targetPath)) {
92
- continue;
93
- }
94
- const stats = await fsPromises.stat(sourcePath);
95
- if (stats.isDirectory()) {
96
- if (!existsSync(file)) {
97
- mkdirSync(file);
98
- }
99
- await fse.copySync(sourcePath, targetPath, { overwrite: true });
100
- }
101
- else {
102
- fse.copySync(sourcePath, targetPath, { overwrite: true });
103
- }
104
- }
105
- }
106
- catch (err) {
107
- console.log((`💩 ${red.underline.bold("=> There was an error while copying files =>")} ${orange(err)}`));
108
- }
109
- finally {
110
- console.log("🐕" + blue.underline.bold(' => Copy files completed!'));
111
- }
112
- }
113
- /**
114
- * Edit Json files
115
- * @param {string} filePath File path
116
- * @param {string[]} keys Keys to edit
117
- * @param {string[]} values Values to edit
118
- * @returns {void}
119
- */
120
- async function editJson(filePath, keys, values) {
121
- try {
122
- const data = await fs.readFile(filePath, 'utf8');
123
- let jsonData;
124
- try {
125
- jsonData = JSON.parse(data);
126
- }
127
- catch (parseError) {
128
- console.log((`💩 ${red.underline.bold("=> Error parsing JSON =>")} ${orange(parseError)}`));
129
- return;
130
- }
131
- for (const key of keys) {
132
- const index = keys.indexOf(key);
133
- const value = values[index];
134
- jsonData[key] = value;
135
- }
136
- const updatedJsonData = JSON.stringify(jsonData, null, 2);
137
- await fs.writeFile(filePath, updatedJsonData, 'utf8');
138
- }
139
- catch (err) {
140
- console.log((`💩 ${red.underline.bold("=> Error editing JSON Data =>")} ${orange(err)}`));
141
- }
142
- finally {
143
- console.log("🐕" + blue.underline(` => Updated file ${orange(filePath)}`));
144
- }
145
- }
146
- async function stringReplace(filePath, keys, values) {
147
- try {
148
- let modifiedContent = '';
149
- const data = await fs.readFile(filePath, 'utf8');
150
- for (const key of keys) {
151
- const index = keys.indexOf(key);
152
- const value = values[index];
153
- const regex = new RegExp(`${key}`, 'g');
154
- modifiedContent = data.replace(regex, `${value}`);
155
- }
156
- await fs.writeFile(filePath, modifiedContent, 'utf8');
157
- }
158
- catch (err) {
159
- console.log((`💩 ${red.underline.bold("=> During string replace =>")} ${orange(err)}`));
160
- }
161
- finally {
162
- console.log(blue.underline(`🐕 => Updated file ${orange(filePath)}`));
163
- }
164
- }
165
- //# sourceMappingURL=init.js.map
package/old/init.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"init.js","sourceRoot":"","sources":["init.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,IAAI,UAAU,EAAE,MAAM,IAAI,CAAC;AACnE,OAAO,GAAG,MAAM,UAAU,CAAC;AAC3B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAmC,IAAI,EAAS,MAAM,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACvF,OAAO,EAAE,oBAAoB,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE9E,MAAM,EAAE,MAAM,EAAE,GAAG,QAAe,CAAC;AACnC;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,IAAI,CAAC,cAA8B,EAAE,eAAgC;IAE1F,IAAG,eAAe,CAAC,WAAW,IAAI,eAAe,CAAC,WAAW,CAAC,OAAO,EAAE,WAAW,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;QAC3H,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,2CAA2C,CAAC,IAAI,MAAM,CAAC,cAAc,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC;QAC9H,OAAO;IACR,CAAC;IAED,MAAM,aAAa,GAAG,IAAI,CAAC,EAAE,CAAC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