lucy-cli 2.0.0-beta.12 â 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.
- package/dist/commands/git.d.ts +3 -3
- package/dist/commands/home.d.ts +1 -1
- package/dist/init/cargo.d.ts +1 -1
- package/dist/init/gitModules.d.ts +1 -1
- package/dist/init/index.d.ts +1 -1
- package/dist/init/index.js +0 -2
- package/dist/init/index.js.map +1 -1
- package/dist/init/monorepo.d.ts +1 -1
- package/dist/init/prepareVelo.d.ts +1 -1
- package/dist/init/tauri.d.ts +1 -1
- package/dist/init/templates.d.ts +1 -1
- package/dist/init/velo.d.ts +1 -1
- package/package.json +8 -2
- package/.cursorignore +0 -4
- package/.eslintrc.cjs +0 -96
- package/.github/funding.yml +0 -2
- package/.nvmrc +0 -1
- package/.stylelintrc.js +0 -8
- package/.wix/debug.log +0 -10
- package/.yarnrc.yml +0 -2
- package/files/sync-data/data/test.csv +0 -17
- package/files/sync-data/files/lucy.jpg +0 -0
- package/files/sync-data/schema/test.json +0 -11
- package/lucy.jpg +0 -0
- package/mitarbeiter-login.html +0 -188
- package/old/Gulpfile.d.ts +0 -34
- package/old/Gulpfile.js +0 -116
- package/old/Gulpfile.js.map +0 -1
- package/old/Gulpfile.ts +0 -231
- package/old/gulp/backend.d.ts +0 -3
- package/old/gulp/backend.js +0 -92
- package/old/gulp/backend.js.map +0 -1
- package/old/gulp/backend.ts +0 -109
- package/old/gulp/checks.d.ts +0 -3
- package/old/gulp/checks.js +0 -205
- package/old/gulp/checks.js.map +0 -1
- package/old/gulp/checks.ts +0 -228
- package/old/gulp/clean.d.ts +0 -3
- package/old/gulp/clean.js +0 -29
- package/old/gulp/clean.js.map +0 -1
- package/old/gulp/clean.ts +0 -33
- package/old/gulp/copy.d.ts +0 -2
- package/old/gulp/copy.js +0 -34
- package/old/gulp/copy.js.map +0 -1
- package/old/gulp/copy.ts +0 -42
- package/old/gulp/helpers.d.ts +0 -2
- package/old/gulp/helpers.js +0 -25
- package/old/gulp/helpers.js.map +0 -1
- package/old/gulp/helpers.ts +0 -26
- package/old/gulp/pages.d.ts +0 -2
- package/old/gulp/pages.js +0 -37
- package/old/gulp/pages.js.map +0 -1
- package/old/gulp/pages.ts +0 -40
- package/old/gulp/pipeline.d.ts +0 -1
- package/old/gulp/pipeline.js +0 -29
- package/old/gulp/pipeline.js.map +0 -1
- package/old/gulp/pipeline.ts +0 -31
- package/old/gulp/public.d.ts +0 -2
- package/old/gulp/public.js +0 -50
- package/old/gulp/public.js.map +0 -1
- package/old/gulp/public.ts +0 -59
- package/old/gulp/styles.d.ts +0 -2
- package/old/gulp/styles.js +0 -40
- package/old/gulp/styles.js.map +0 -1
- package/old/gulp/styles.ts +0 -46
- package/old/gulp/templates.d.ts +0 -2
- package/old/gulp/templates.js +0 -33
- package/old/gulp/templates.js.map +0 -1
- package/old/gulp/templates.ts +0 -39
- package/old/gulp/types.d.ts +0 -4
- package/old/gulp/types.js +0 -289
- package/old/gulp/types.js.map +0 -1
- package/old/gulp/types.ts +0 -311
- package/old/gulp/watchers.d.ts +0 -9
- package/old/gulp/watchers.js +0 -59
- package/old/gulp/watchers.js.map +0 -1
- package/old/gulp/watchers.ts +0 -105
- package/old/helpers.d.ts +0 -32
- package/old/helpers.js +0 -267
- package/old/helpers.js.map +0 -1
- package/old/helpers.ts +0 -307
- package/old/index.d.ts +0 -59
- package/old/index.js +0 -288
- package/old/index.js.map +0 -1
- package/old/index.ts +0 -379
- package/old/init.d.ts +0 -8
- package/old/init.js +0 -165
- package/old/init.js.map +0 -1
- package/old/init.ts +0 -183
- package/old/models.d.ts +0 -37
- package/old/models.js +0 -2
- package/old/models.js.map +0 -1
- package/old/models.ts +0 -35
- package/old/prepare.d.ts +0 -8
- package/old/prepare.js +0 -20
- package/old/prepare.js.map +0 -1
- package/old/prepare.ts +0 -24
- package/old/schemas/index.d.ts +0 -0
- package/old/schemas/index.js +0 -2
- package/old/schemas/index.js.map +0 -1
- package/old/schemas/index.ts +0 -0
- package/old/schemas/types.d.ts +0 -0
- package/old/schemas/types.js +0 -2
- package/old/schemas/types.js.map +0 -1
- package/old/schemas/types.ts +0 -0
- package/old/settings.json +0 -67
- package/old/sync.d.ts +0 -2
- package/old/sync.js +0 -88
- package/old/sync.js.map +0 -1
- package/old/sync.ts +0 -97
- package/old/types.d.ts +0 -8
- package/pnpm-workspace.yaml +0 -6
- package/settings/backend-settings.json +0 -19
- package/settings/master-settings.json +0 -20
- package/settings/page-settings.json +0 -21
- package/settings/public-settings.json +0 -22
- package/src/args.ts +0 -121
- package/src/commands/checks.ts +0 -51
- package/src/commands/cleanup.ts +0 -11
- package/src/commands/copy.ts +0 -29
- package/src/commands/edit.ts +0 -81
- package/src/commands/exec.ts +0 -73
- package/src/commands/git.ts +0 -152
- package/src/commands/home.ts +0 -20
- package/src/commands/install.ts +0 -269
- package/src/commands/read.ts +0 -45
- package/src/commands/write.ts +0 -45
- package/src/commands.ts +0 -21
- package/src/config.ts +0 -142
- package/src/error.ts +0 -3
- package/src/helpers.ts +0 -93
- package/src/index.ts +0 -113
- package/src/init/blocks.ts +0 -85
- package/src/init/cargo.ts +0 -25
- package/src/init/expo.ts +0 -69
- package/src/init/gitModules.ts +0 -15
- package/src/init/index.ts +0 -88
- package/src/init/monorepo.ts +0 -72
- package/src/init/prepareVelo.ts +0 -19
- package/src/init/tauri.ts +0 -42
- package/src/init/templates.ts +0 -98
- package/src/init/velo.ts +0 -66
- package/src/policy.ts +0 -6
- package/src/prepare.ts +0 -24
- package/src/runtime.ts +0 -21
- package/src/schemas/gulp.ts +0 -31
- package/src/schemas/index.ts +0 -17
- package/src/schemas/lucy.ts +0 -43
- package/src/schemas/tsconfig.ts +0 -35
- package/src/schemas/types.ts +0 -40
- package/src/settings.json +0 -67
- package/src/states.ts +0 -15
- package/src/tasks/Gulpfile.ts +0 -207
- package/src/tasks/gulp/backend.ts +0 -113
- package/src/tasks/gulp/checks.ts +0 -219
- package/src/tasks/gulp/clean.ts +0 -38
- package/src/tasks/gulp/copy.ts +0 -38
- package/src/tasks/gulp/helpers.ts +0 -18
- package/src/tasks/gulp/pages.ts +0 -43
- package/src/tasks/gulp/pipeline.ts +0 -31
- package/src/tasks/gulp/public.ts +0 -61
- package/src/tasks/gulp/styles.ts +0 -47
- package/src/tasks/gulp/templates.ts +0 -53
- package/src/tasks/gulp/types.ts +0 -310
- package/src/tasks/gulp/watchers.ts +0 -97
- package/src/tasks/index.ts +0 -24
- package/src/tasks/syncSettings.ts +0 -21
- package/src/types.d.ts +0 -8
- package/src/utils/index.ts +0 -0
- package/src/utils/logger.ts +0 -40
- package/src/wix-sdk/check.ts +0 -24
- package/src/wix-sdk/client.ts +0 -18
- package/src/wix-sdk/index.ts +0 -17
- package/src/wix-sdk/init.ts +0 -54
- package/src/wix-sdk/run.ts +0 -56
- package/src/wix-sync/client.ts +0 -6
- package/src/wix-sync/export.ts +0 -19
- package/src/wix-sync/import.ts +0 -27
- package/src/wix-sync/index.ts +0 -36
- package/src/wix-sync/init.ts +0 -77
- package/src/wix-sync/is-alive.ts +0 -25
- package/src/wix-sync/migrate.ts +0 -23
- package/src/wix-sync/sync.ts +0 -27
- package/tsconfig.json +0 -34
package/old/gulp/watchers.js
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import gulp from 'gulp';
|
|
2
|
-
import { green } from '../index.js';
|
|
3
|
-
import { buildBackend } from './backend.js';
|
|
4
|
-
import { buildPublic } from './public.js';
|
|
5
|
-
import { buildPages } from './pages.js';
|
|
6
|
-
import { copyFiles } from './copy.js';
|
|
7
|
-
import { previewTemplates } from './templates.js';
|
|
8
|
-
import { checkTs } from './checks.js';
|
|
9
|
-
let taskOptions;
|
|
10
|
-
export function watchSCSS() {
|
|
11
|
-
return gulp.watch([
|
|
12
|
-
'*/styles/**/*.scss'
|
|
13
|
-
], gulp.parallel('scss'));
|
|
14
|
-
}
|
|
15
|
-
export function watchBackend() {
|
|
16
|
-
return gulp.watch([
|
|
17
|
-
'*/backend/**/*.ts',
|
|
18
|
-
'*/backend/**/*.tsx',
|
|
19
|
-
'!*/backend/**/*.jsw.ts',
|
|
20
|
-
'!src/**/**',
|
|
21
|
-
], gulp.parallel(checkTs(taskOptions), buildBackend(taskOptions)));
|
|
22
|
-
}
|
|
23
|
-
export function watchPublic() {
|
|
24
|
-
return gulp.watch([
|
|
25
|
-
'*/public/**/*.ts',
|
|
26
|
-
'*/public/**/*.tsx',
|
|
27
|
-
], gulp.parallel(checkTs(taskOptions), buildPublic(taskOptions)));
|
|
28
|
-
}
|
|
29
|
-
export function watchPages() {
|
|
30
|
-
return gulp.watch('typescript/pages/**/*.ts', gulp.parallel(checkTs(taskOptions), buildPages(taskOptions)));
|
|
31
|
-
}
|
|
32
|
-
export function watchFiles() {
|
|
33
|
-
return gulp.watch([
|
|
34
|
-
'*/backend/**/*',
|
|
35
|
-
'*/public/**/*',
|
|
36
|
-
'*/pages/**/*',
|
|
37
|
-
'!*/**/*.ts',
|
|
38
|
-
'!*/**/*.tsx',
|
|
39
|
-
], gulp.parallel(copyFiles(taskOptions)));
|
|
40
|
-
}
|
|
41
|
-
export function watchTemplates() {
|
|
42
|
-
return gulp.watch([
|
|
43
|
-
'*/backend/templates/**/*.tsx',
|
|
44
|
-
'*/backend/templates/data/*.json',
|
|
45
|
-
'!*/backend/templates/render.ts',
|
|
46
|
-
], gulp.parallel(previewTemplates(taskOptions), checkTs(taskOptions)));
|
|
47
|
-
}
|
|
48
|
-
export function watchTypes() {
|
|
49
|
-
return gulp.watch([
|
|
50
|
-
'./.wix/types/**/*.d.ts',
|
|
51
|
-
'!./.wix/types/wix-code-types'
|
|
52
|
-
], gulp.series('fix-wixtypes'));
|
|
53
|
-
}
|
|
54
|
-
export function watchAll(options) {
|
|
55
|
-
taskOptions = options;
|
|
56
|
-
console.log("đ" + green.underline.bold(' => Adding watchers...'));
|
|
57
|
-
return gulp.parallel(watchSCSS, watchBackend, watchPublic, watchPages, watchFiles, watchTemplates, watchTypes);
|
|
58
|
-
}
|
|
59
|
-
//# sourceMappingURL=watchers.js.map
|
package/old/gulp/watchers.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"watchers.js","sourceRoot":"","sources":["watchers.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,YAAY,EAAmB,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAc,OAAO,EAAE,MAAM,aAAa,CAAC;AAGlD,IAAI,WAAwB,CAAC;AAE7B,MAAM,UAAU,SAAS;IACrB,OAAO,IAAI,CAAC,KAAK,CAAC;QACd,oBAAoB;KACvB,EACG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CACxB,CAAC;AACN,CAAC;AAED,MAAM,UAAU,YAAY;IACxB,OAAQ,IAAI,CAAC,KAAK,CAAC;QACrB,mBAAmB;QACnB,oBAAoB;QACd,wBAAwB;QACxB,YAAY;KAClB,EAAE,IAAI,CAAC,QAAQ,CACT,OAAO,CAAC,WAAW,CAAC,EACpB,YAAY,CAAC,WAAW,CAAC,CAI5B,CAAC,CAAC;AACP,CAAC;AAED,MAAM,UAAU,WAAW;IACvB,OAAO,IAAI,CAAC,KAAK,CAAC;QACpB,kBAAkB;QAClB,mBAAmB;KACnB,EAAE,IAAI,CAAC,QAAQ,CACT,OAAO,CAAC,WAAW,CAAC,EACpB,WAAW,CAAC,WAAW,CAAC,CAI3B,CAAC,CAAC;AACP,CAAC;AAED,MAAM,UAAU,UAAU;IACtB,OAAQ,IAAI,CAAC,KAAK,CAAC,0BAA0B,EAC7C,IAAI,CAAC,QAAQ,CACT,OAAO,CAAC,WAAW,CAAC,EACpB,UAAU,CAAC,WAAW,CAAC,CACtB,CACJ,CAAC;AACN,CAAC;AAED,MAAM,UAAU,UAAU;IACtB,OAAQ,IAAI,CAAC,KAAK,CAAC;QACrB,gBAAgB;QAChB,eAAe;QACf,cAAc;QACd,YAAY;QACN,aAAa;KACnB,EAAE,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;AAC3C,CAAC;AAED,MAAM,UAAU,cAAc;IAC1B,OAAO,IAAI,CAAC,KAAK,CAAC;QACpB,8BAA8B;QAC9B,iCAAiC;QACjC,gCAAgC;KAChC,EAAE,IAAI,CAAC,QAAQ,CACT,gBAAgB,CAAC,WAAW,CAAC,EAC7B,OAAO,CAAC,WAAW,CAAC,CACnB,CACJ,CAAC;AACN,CAAC;AAED,MAAM,UAAU,UAAU;IACtB,OAAO,IAAI,CAAC,KAAK,CAAC;QACd,wBAAwB;QACxB,8BAA8B;KACjC,EACD,IAAI,CAAC,MAAM,CACP,cAAc,CACb,CACJ,CAAC;AACN,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,OAAoB;IACzC,WAAW,GAAG,OAAO,CAAC;IACtB,OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC,CAAC;IAEnE,OAAO,IAAI,CAAC,QAAQ,CAChB,SAAS,EACT,YAAY,EACZ,WAAW,EACX,UAAU,EACV,UAAU,EACV,cAAc,EACd,UAAU,CACb,CAAC;AACN,CAAC"}
|
package/old/gulp/watchers.ts
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import gulp from 'gulp';
|
|
2
|
-
import { TaskOptions } from '../Gulpfile.js';
|
|
3
|
-
import { green } from '../index.js';
|
|
4
|
-
import { buildBackend, buildBackendJSW } from './backend.js';
|
|
5
|
-
import { buildPublic } from './public.js';
|
|
6
|
-
import { buildPages } from './pages.js';
|
|
7
|
-
import { copyFiles } from './copy.js';
|
|
8
|
-
import { previewTemplates } from './templates.js';
|
|
9
|
-
import { checkPages, checkTs } from './checks.js';
|
|
10
|
-
import shell from 'gulp-shell';
|
|
11
|
-
|
|
12
|
-
let taskOptions: TaskOptions;
|
|
13
|
-
|
|
14
|
-
export function watchSCSS() {
|
|
15
|
-
return gulp.watch([
|
|
16
|
-
'*/styles/**/*.scss'
|
|
17
|
-
],
|
|
18
|
-
gulp.parallel('scss')
|
|
19
|
-
);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export function watchBackend() {
|
|
23
|
-
return gulp.watch([
|
|
24
|
-
'*/backend/**/*.ts',
|
|
25
|
-
'*/backend/**/*.tsx',
|
|
26
|
-
'!*/backend/**/*.jsw.ts',
|
|
27
|
-
'!src/**/**',
|
|
28
|
-
], gulp.parallel(
|
|
29
|
-
checkTs(taskOptions),
|
|
30
|
-
buildBackend(taskOptions),
|
|
31
|
-
// shell.task([
|
|
32
|
-
// 'yarn docs',
|
|
33
|
-
// ])
|
|
34
|
-
));
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export function watchPublic() {
|
|
38
|
-
return gulp.watch([
|
|
39
|
-
'*/public/**/*.ts',
|
|
40
|
-
'*/public/**/*.tsx',
|
|
41
|
-
], gulp.parallel(
|
|
42
|
-
checkTs(taskOptions),
|
|
43
|
-
buildPublic(taskOptions),
|
|
44
|
-
// shell.task([
|
|
45
|
-
// 'yarn docs',
|
|
46
|
-
// ])
|
|
47
|
-
));
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export function watchPages() {
|
|
51
|
-
return gulp.watch('typescript/pages/**/*.ts',
|
|
52
|
-
gulp.parallel(
|
|
53
|
-
checkTs(taskOptions),
|
|
54
|
-
buildPages(taskOptions),
|
|
55
|
-
)
|
|
56
|
-
);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export function watchFiles() {
|
|
60
|
-
return gulp.watch([
|
|
61
|
-
'*/backend/**/*',
|
|
62
|
-
'*/public/**/*',
|
|
63
|
-
'*/pages/**/*',
|
|
64
|
-
'!*/**/*.ts',
|
|
65
|
-
'!*/**/*.tsx',
|
|
66
|
-
], gulp.parallel(copyFiles(taskOptions)));
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export function watchTemplates() {
|
|
70
|
-
return gulp.watch([
|
|
71
|
-
'*/backend/templates/**/*.tsx',
|
|
72
|
-
'*/backend/templates/data/*.json',
|
|
73
|
-
'!*/backend/templates/render.ts',
|
|
74
|
-
], gulp.parallel(
|
|
75
|
-
previewTemplates(taskOptions),
|
|
76
|
-
checkTs(taskOptions),
|
|
77
|
-
)
|
|
78
|
-
);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
export function watchTypes() {
|
|
82
|
-
return gulp.watch([
|
|
83
|
-
'./.wix/types/**/*.d.ts',
|
|
84
|
-
'!./.wix/types/wix-code-types'
|
|
85
|
-
],
|
|
86
|
-
gulp.series(
|
|
87
|
-
'fix-wixtypes'
|
|
88
|
-
)
|
|
89
|
-
);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
export function watchAll(options: TaskOptions) {
|
|
93
|
-
taskOptions = options;
|
|
94
|
-
console.log("đ" + green.underline.bold(' => Adding watchers...'));
|
|
95
|
-
|
|
96
|
-
return gulp.parallel(
|
|
97
|
-
watchSCSS,
|
|
98
|
-
watchBackend,
|
|
99
|
-
watchPublic,
|
|
100
|
-
watchPages,
|
|
101
|
-
watchFiles,
|
|
102
|
-
watchTemplates,
|
|
103
|
-
watchTypes,
|
|
104
|
-
);
|
|
105
|
-
}
|
package/old/helpers.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { LucySettings, ModuleSettings, ProjectSettings } from './index.js';
|
|
2
|
-
export declare function installPackages(wixPackages: Record<string, string>, devPackages: Record<string, string>, cwd: string, locked: boolean): Promise<void>;
|
|
3
|
-
export declare function gitInit(cwd: string, modules: LucySettings['modules'] | undefined, force: boolean): Promise<void>;
|
|
4
|
-
export declare function runGulp(moduleSettings: ModuleSettings, projectSettings: ProjectSettings, task: string): Promise<void>;
|
|
5
|
-
/**
|
|
6
|
-
* Clean up and run a command before exiting the process.
|
|
7
|
-
*/
|
|
8
|
-
export declare function cleanupWatchers(): void;
|
|
9
|
-
/**
|
|
10
|
-
* Kill all processes matching a specific substring in their command, with a fallback for Windows.
|
|
11
|
-
* @param {string} processPattern - The substring to match (e.g., "wix:dev" or "@wix/cli/bin/wix.cjs").
|
|
12
|
-
*/
|
|
13
|
-
export declare function killAllProcesses(processPattern: string): void;
|
|
14
|
-
export interface VeloSyncConfig {
|
|
15
|
-
siteUrl: string;
|
|
16
|
-
secret: string;
|
|
17
|
-
}
|
|
18
|
-
export declare function saveConfig(config: VeloSyncConfig, file: string): Promise<void>;
|
|
19
|
-
export declare function readConfig(file: string): Promise<VeloSyncConfig>;
|
|
20
|
-
export declare function createTemplateFolder(moduleSettings: ModuleSettings): Promise<void>;
|
|
21
|
-
export type PackageJson = {
|
|
22
|
-
dependencies?: Record<string, string>;
|
|
23
|
-
devDependencies?: Record<string, string>;
|
|
24
|
-
[key: string]: any;
|
|
25
|
-
};
|
|
26
|
-
/**
|
|
27
|
-
* Updates a lucy.json file with dependencies from a package.json file.
|
|
28
|
-
* It replaces 'wixPackages' with 'dependencies' and 'devPackages' with 'devDependencies'.
|
|
29
|
-
* @param {string} packageJsonPath - Path to the package.json file.
|
|
30
|
-
* @param {string} lucyConfigPath - Path to the lucy.json file.
|
|
31
|
-
*/
|
|
32
|
-
export declare function updateLucyConfigFromPackageJson(packageJsonPath: string, lucyConfigPath: string): Promise<void>;
|
package/old/helpers.js
DELETED
|
@@ -1,267 +0,0 @@
|
|
|
1
|
-
import chalk from 'chalk';
|
|
2
|
-
import { simpleGit } from 'simple-git';
|
|
3
|
-
import { spawnSync, exec } from 'child_process';
|
|
4
|
-
// https://www.sergevandenoever.nl/run-gulp4-tasks-programatically-from-node/
|
|
5
|
-
import path, { join } from 'path';
|
|
6
|
-
import { fileURLToPath } from 'url';
|
|
7
|
-
import os from 'os';
|
|
8
|
-
import fs, { mkdirSync } from 'fs';
|
|
9
|
-
import fse from 'fs-extra';
|
|
10
|
-
import { writeFile } from 'fs/promises';
|
|
11
|
-
import { blue, green, orange, red, yellow, magenta } from './index.js';
|
|
12
|
-
export async function installPackages(wixPackages, devPackages, cwd, locked) {
|
|
13
|
-
if (locked)
|
|
14
|
-
console.log("đ" + blue.underline(` => Installing & version locked packages!`));
|
|
15
|
-
const wixPackageNames = Object.keys(wixPackages);
|
|
16
|
-
const wixPackageVersions = Object.values(wixPackages);
|
|
17
|
-
const wixPackageNamesAndVersions = wixPackageNames.map((name, index) => `${name}@${wixPackageVersions[index]}`);
|
|
18
|
-
const devPackageNames = Object.keys(devPackages);
|
|
19
|
-
const devPackageVersions = Object.values(devPackages);
|
|
20
|
-
const devPackageNamesAndVersions = devPackageNames.map((name, index) => `${name}@${devPackageVersions[index]}`);
|
|
21
|
-
let success = true;
|
|
22
|
-
// Dev packages are installed all at once with yarn.
|
|
23
|
-
if (devPackageNames.length > 0) {
|
|
24
|
-
console.log(`đ => Installing dev packages with yarn...`);
|
|
25
|
-
const packagesToInstall = locked ? devPackageNamesAndVersions.join(' ') : devPackageNames.join(' ');
|
|
26
|
-
const yarnAdd = `yarn add -D ${packagesToInstall}`;
|
|
27
|
-
const yarnRes = spawnSync(yarnAdd, { shell: true, stdio: 'inherit' });
|
|
28
|
-
if (yarnRes.error) {
|
|
29
|
-
success = false;
|
|
30
|
-
console.log((`đŠ ${red.underline.bold("=> Failed to install dev packages =>")} ${orange(yarnRes.error.message)}`));
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
console.log("đ" + blue.underline(` => Dev packages installed!`));
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
// Packages are installed all at once with yarn.
|
|
37
|
-
if (wixPackageNames.length > 0) {
|
|
38
|
-
console.log(`đ => Installing packages with yarn...`);
|
|
39
|
-
const packagesToInstall = locked ? wixPackageNamesAndVersions.join(' ') : wixPackageNames.join(' ');
|
|
40
|
-
const yarnAdd = `yarn add ${packagesToInstall}`;
|
|
41
|
-
const yarnRes = spawnSync(yarnAdd, { shell: true, stdio: 'inherit' });
|
|
42
|
-
if (yarnRes.error) {
|
|
43
|
-
success = false;
|
|
44
|
-
console.log((`đŠ ${red.underline.bold("=> Failed to install packages =>")} ${orange(yarnRes.error.message)}`));
|
|
45
|
-
}
|
|
46
|
-
else {
|
|
47
|
-
console.log("đ" + blue.underline(` => Packages installed!`));
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
// Wix packages are installed one by one.
|
|
51
|
-
if (wixPackageNames.length > 0) {
|
|
52
|
-
wixPackageNames.forEach((name, index) => {
|
|
53
|
-
console.log(`đ => Installing wix package ${orange(name)}`);
|
|
54
|
-
const wixInstall = locked ? `wix install ${wixPackageNamesAndVersions[index]}` : `wix install ${name}`;
|
|
55
|
-
const wixres = spawnSync(wixInstall, { shell: true, stdio: 'inherit' });
|
|
56
|
-
if (wixres.error) {
|
|
57
|
-
console.log((`đŠ ${red.underline.bold("=> Failed to install wix package =>")} ${orange(wixres.error.message)}`));
|
|
58
|
-
success = false;
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
console.log("đ" + blue.underline(` => Wix package ${orange(name)} installed!`));
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
if (success) {
|
|
66
|
-
console.log("đ" + blue.underline(` => All Packages installed!`));
|
|
67
|
-
}
|
|
68
|
-
else {
|
|
69
|
-
console.log("đ" + red.underline(` => Some packages failed to install!`));
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
async function isSubmoduleRegistered(git, submoduleName) {
|
|
73
|
-
try {
|
|
74
|
-
const urlConfig = await git.getConfig(`submodule.${submoduleName}.url`);
|
|
75
|
-
return !!urlConfig.value;
|
|
76
|
-
}
|
|
77
|
-
catch (e) {
|
|
78
|
-
// simple-git throws an error if the config key doesn't exist
|
|
79
|
-
return false;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
export async function gitInit(cwd, modules, force) {
|
|
83
|
-
const git = simpleGit({ baseDir: cwd });
|
|
84
|
-
if (!(await git.checkIsRepo())) {
|
|
85
|
-
console.log(chalk.yellow('Project is not a git repository. Initializing...'));
|
|
86
|
-
await git.init();
|
|
87
|
-
}
|
|
88
|
-
if (!modules) {
|
|
89
|
-
console.log(chalk.yellow('No submodules defined in settings, skipping.'));
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
const dotGitmodulesPath = path.join(cwd, '.gitmodules');
|
|
93
|
-
for (const [name, repo] of Object.entries(modules)) {
|
|
94
|
-
console.log(chalk.green.underline.bold(`Processing submodule ${name}`));
|
|
95
|
-
const clonePath = repo.path || name;
|
|
96
|
-
try {
|
|
97
|
-
const isRegistered = await isSubmoduleRegistered(git, clonePath);
|
|
98
|
-
// Check that .gitmodules exists AND contains the entry for this specific submodule.
|
|
99
|
-
const isConfiguredInFile = fs.existsSync(dotGitmodulesPath) &&
|
|
100
|
-
fs.readFileSync(dotGitmodulesPath, 'utf-8').includes(`[submodule "${clonePath}"]`);
|
|
101
|
-
// Add/repair if not configured in .gitmodules, or if forced by the user.
|
|
102
|
-
if (!isConfiguredInFile || force) {
|
|
103
|
-
console.log(`đ ${blue.underline(`Adding/updating submodule ${name} at ${clonePath}...`)}`);
|
|
104
|
-
// If git already has a config entry, we must use --force to repair it.
|
|
105
|
-
const submoduleArgs = ['add', ...(force || isRegistered ? ['--force'] : []), repo.url, clonePath];
|
|
106
|
-
await git.subModule(submoduleArgs);
|
|
107
|
-
}
|
|
108
|
-
else {
|
|
109
|
-
console.log(`đ ${blue.underline(`Submodule ${name} at ${clonePath} already registered. Skipping add.`)}`);
|
|
110
|
-
}
|
|
111
|
-
await git.submoduleUpdate(['--init', '--recursive', clonePath]);
|
|
112
|
-
await simpleGit({ baseDir: path.join(cwd, clonePath) }).checkout(repo.branch);
|
|
113
|
-
}
|
|
114
|
-
catch (err) {
|
|
115
|
-
console.log((`đŠ ${red.underline.bold(`=> Command failed for submodule ${name} =>`)} ${orange(err)}`));
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
console.log("đļ" + green.underline(' => All modules processed!'));
|
|
119
|
-
}
|
|
120
|
-
export async function runGulp(moduleSettings, projectSettings, task) {
|
|
121
|
-
// Get the directory name of the current module
|
|
122
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
123
|
-
const __dirname = path.dirname(__filename);
|
|
124
|
-
// Resolve the path to the Gulpfile
|
|
125
|
-
const gulpfilePath = path.resolve(__dirname, 'Gulpfile.js');
|
|
126
|
-
// Dynamically import the Gulpfile
|
|
127
|
-
const gulpfile = await import(`file://${gulpfilePath}`);
|
|
128
|
-
// Check if 'dev' task exists
|
|
129
|
-
gulpfile.runTask(task, moduleSettings, projectSettings);
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* Clean up and run a command before exiting the process.
|
|
133
|
-
*/
|
|
134
|
-
export function cleanupWatchers() {
|
|
135
|
-
console.log(`đ§š ${magenta.underline('Cleaning up Watchman watchers...')}`);
|
|
136
|
-
const cwd = process.cwd();
|
|
137
|
-
const command = `watchman watch-del "${cwd}"`; // Adjust for Windows paths
|
|
138
|
-
exec(command, (error, stdout, stderr) => {
|
|
139
|
-
if (error) {
|
|
140
|
-
console.error(`đŠ ${red.underline('Failed to run cleanup:')} ${orange(error.message)}`);
|
|
141
|
-
return;
|
|
142
|
-
}
|
|
143
|
-
if (stderr) {
|
|
144
|
-
console.error(`â ī¸ ${yellow.underline('Watchman stderr:')} ${stderr}`);
|
|
145
|
-
}
|
|
146
|
-
console.log(`â
${green.underline('Watchman cleanup success:')} ${stdout}`);
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
/**
|
|
150
|
-
* Kill all processes matching a specific substring in their command, with a fallback for Windows.
|
|
151
|
-
* @param {string} processPattern - The substring to match (e.g., "wix:dev" or "@wix/cli/bin/wix.cjs").
|
|
152
|
-
*/
|
|
153
|
-
export function killAllProcesses(processPattern) {
|
|
154
|
-
const isWindows = os.platform() === 'win32';
|
|
155
|
-
const command = isWindows
|
|
156
|
-
? `tasklist /FI "IMAGENAME eq node.exe" /FO CSV | findstr "${processPattern}"` // Adjust for Node.js processes
|
|
157
|
-
: `ps -eo pid,command | grep "${processPattern}" | grep -v grep`;
|
|
158
|
-
exec(command, (error, stdout, stderr) => {
|
|
159
|
-
if (error) {
|
|
160
|
-
console.error(`đŠ ${red.underline('Failed to find processes:')} ${orange(error.message)}`);
|
|
161
|
-
return;
|
|
162
|
-
}
|
|
163
|
-
if (stderr) {
|
|
164
|
-
console.error(`â ī¸ ${yellow.underline('Error output:')} ${stderr}`);
|
|
165
|
-
}
|
|
166
|
-
if (!stdout.trim()) {
|
|
167
|
-
console.log(`âšī¸ ${blue.underline(`No processes found matching pattern:`)} ${orange(processPattern)}`);
|
|
168
|
-
return;
|
|
169
|
-
}
|
|
170
|
-
console.log(`đ ${magenta.underline('Found matching processes:')}\n${stdout}`);
|
|
171
|
-
const lines = stdout.trim().split('\n');
|
|
172
|
-
const pids = isWindows
|
|
173
|
-
? lines.map(line => line.match(/"(\d+)"/)?.[1]) // Extract PID from Windows tasklist output
|
|
174
|
-
: lines.map(line => line.trim().split(/\s+/)[0]).filter(pid => !isNaN(Number(pid)));
|
|
175
|
-
pids.forEach(pid => {
|
|
176
|
-
if (!pid)
|
|
177
|
-
return;
|
|
178
|
-
try {
|
|
179
|
-
const killCommand = isWindows
|
|
180
|
-
? `taskkill /PID ${pid} /T /F` // Forcefully terminate the process on Windows
|
|
181
|
-
: `kill -SIGTERM ${pid}`;
|
|
182
|
-
exec(killCommand, (killError) => {
|
|
183
|
-
if (killError) {
|
|
184
|
-
console.error(`â ī¸ ${yellow.underline('Failed to kill process with PID')} ${orange(pid)}: ${red(killError.message)}`);
|
|
185
|
-
}
|
|
186
|
-
else {
|
|
187
|
-
console.log(`â
${green.underline('Killed process with PID:')} ${orange(pid)}`);
|
|
188
|
-
}
|
|
189
|
-
});
|
|
190
|
-
// Schedule SIGKILL fallback for non-Windows platforms
|
|
191
|
-
if (!isWindows) {
|
|
192
|
-
setTimeout(() => {
|
|
193
|
-
try {
|
|
194
|
-
process.kill(parseInt(pid, 10), 'SIGKILL');
|
|
195
|
-
console.log(`đĒ ${red.underline('Sent SIGKILL to process with PID:')} ${orange(pid)} (fallback).`);
|
|
196
|
-
}
|
|
197
|
-
catch (killError) {
|
|
198
|
-
if (killError.code === 'ESRCH') {
|
|
199
|
-
console.log(`â
${green.underline('Process with PID')} ${orange(pid)} ${green.underline('already terminated.')}`);
|
|
200
|
-
}
|
|
201
|
-
else {
|
|
202
|
-
console.error(`â ī¸ ${yellow.underline('Failed to send SIGKILL to process with PID')} ${orange(pid)}: ${red(killError.message)}`);
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
}, 10000);
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
catch (err) {
|
|
209
|
-
console.error(`â ī¸ ${yellow.underline('Failed to kill process with PID')} ${orange(pid)}: ${red(err.message)}`);
|
|
210
|
-
}
|
|
211
|
-
});
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
export async function saveConfig(config, file) {
|
|
215
|
-
await fs.promises.writeFile(file, JSON.stringify(config));
|
|
216
|
-
}
|
|
217
|
-
export async function readConfig(file) {
|
|
218
|
-
let content = await fs.promises.readFile(file, 'utf-8');
|
|
219
|
-
return JSON.parse(content);
|
|
220
|
-
}
|
|
221
|
-
export async function createTemplateFolder(moduleSettings) {
|
|
222
|
-
const templatesPath = join(os.homedir(), '.lucy-cli');
|
|
223
|
-
try {
|
|
224
|
-
mkdirSync(templatesPath);
|
|
225
|
-
const defaultTemplatePath = join(templatesPath, 'default');
|
|
226
|
-
mkdirSync(defaultTemplatePath);
|
|
227
|
-
const sourceFilesPath = join(moduleSettings.packageRoot, 'files');
|
|
228
|
-
const defaultTemplateFilesPath = join(defaultTemplatePath, 'files');
|
|
229
|
-
await fse.copy(sourceFilesPath, defaultTemplateFilesPath);
|
|
230
|
-
const defaultTemplateSettingsPath = join(defaultTemplatePath, 'settings.json');
|
|
231
|
-
await writeFile(defaultTemplateSettingsPath, JSON.stringify(moduleSettings.settings, null, 2));
|
|
232
|
-
console.log(green('â
Default template created successfully!'));
|
|
233
|
-
}
|
|
234
|
-
catch (e) {
|
|
235
|
-
console.log((`đŠ ${red.underline.bold("=> Error creating default template =>")} ${orange(e)}`));
|
|
236
|
-
return;
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
/**
|
|
240
|
-
* Updates a lucy.json file with dependencies from a package.json file.
|
|
241
|
-
* It replaces 'wixPackages' with 'dependencies' and 'devPackages' with 'devDependencies'.
|
|
242
|
-
* @param {string} packageJsonPath - Path to the package.json file.
|
|
243
|
-
* @param {string} lucyConfigPath - Path to the lucy.json file.
|
|
244
|
-
*/
|
|
245
|
-
export async function updateLucyConfigFromPackageJson(packageJsonPath, lucyConfigPath) {
|
|
246
|
-
try {
|
|
247
|
-
console.log(`đ Reading package definitions from ${orange(packageJsonPath)}...`);
|
|
248
|
-
const pkgJsonContent = await fs.promises.readFile(packageJsonPath, 'utf-8');
|
|
249
|
-
const packageJson = JSON.parse(pkgJsonContent);
|
|
250
|
-
console.log(`đ Reading Lucy configuration from ${orange(lucyConfigPath)}...`);
|
|
251
|
-
const lucyConfigContent = await fs.promises.readFile(lucyConfigPath, 'utf-8');
|
|
252
|
-
const lucyConfig = JSON.parse(lucyConfigContent);
|
|
253
|
-
const { dependencies = {}, devDependencies = {} } = packageJson;
|
|
254
|
-
// Note: `wixPackages` are installed using `wix install`. If your `dependencies`
|
|
255
|
-
// contain packages that are not Wix packages, `lucy-cli install` might fail.
|
|
256
|
-
lucyConfig.wixPackages = dependencies;
|
|
257
|
-
lucyConfig.devPackages = devDependencies;
|
|
258
|
-
console.log(`đ Writing updated configuration to ${orange(lucyConfigPath)}...`);
|
|
259
|
-
await fs.promises.writeFile(lucyConfigPath, JSON.stringify(lucyConfig, null, 2));
|
|
260
|
-
console.log(green.underline('â
Lucy configuration updated successfully!'));
|
|
261
|
-
}
|
|
262
|
-
catch (error) {
|
|
263
|
-
console.error(`đŠ ${red.underline.bold('=> Error updating lucy.json from package.json:')} ${orange(error.message)}`);
|
|
264
|
-
throw error; // re-throw to allow caller to handle
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
//# sourceMappingURL=helpers.js.map
|
package/old/helpers.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAa,MAAM,YAAY,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAChD,6EAA6E;AAC7E,OAAO,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAEpC,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AACnC,OAAO,GAAG,MAAM,UAAU,CAAC;AAC3B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAEvE,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,WAAmC,EAAE,WAAmC,EAAG,GAAW,EAAE,MAAe;IAC5I,IAAI,MAAM;QAAE,OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,2CAA2C,CAAC,CAAC,CAAC;IAE5F,MAAM,eAAe,GA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