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
@@ -1,56 +0,0 @@
1
- import { Effect, Schema } from "effect/index";
2
- import { Config } from "../config.js";
3
- import Enquirer from "enquirer";
4
- import { AppError } from "../error.js";
5
- import { writeWixSDKSettings } from "../commands/write.js";
6
- import { wixSDKSettings } from "../schemas/index.js";
7
- import { logger } from "../utils/logger.js";
8
- import { wix_sdk_check } from "./check.js";
9
-
10
- export const wix_sdk_run = (program: Effect.Effect<never, AppError, never>) => {
11
- return Effect.gen(function* (_) {
12
- const config = yield* Config;
13
- const prompter = new Enquirer();
14
-
15
- const choice = yield* Effect.tryPromise({
16
- try: () => prompter.prompt([
17
- {
18
- type: 'input',
19
- name: 'siteId',
20
- message: 'Enter the Wix SDK site ID',
21
- initial: config.config.wixSDKSettings?.siteId || 'siteId',
22
- validate: (value: string) => value.trim() !== '' ? true : 'Site ID cannot be empty'
23
- },
24
- {
25
- type: 'input',
26
- name: 'apiKey',
27
- message: 'Enter the Wix SDK API key',
28
- initial: config.config.wixSDKSettings?.apiKey || 'apiKey',
29
- validate: (value: string) => value.trim() !== '' ? true : 'API key cannot be empty'
30
- }
31
- ]),
32
- catch: (e) => {
33
- return new AppError({ cause: e, message: 'Error initializing wix-sdk settings' });
34
- }
35
- });
36
-
37
- config.config.wixSDKSettings = yield* Schema.decodeUnknown(wixSDKSettings)(choice)
38
- yield* writeWixSDKSettings
39
-
40
- const question = new Enquirer();
41
- const verify = yield* Effect.tryPromise({
42
- try: () => question.prompt({
43
- type: 'confirm',
44
- name: 'verify',
45
- message: 'Do you want to verify the wix-sdk settings?',
46
- }),
47
- catch: (e) => {
48
- return new AppError({ cause: e, message: 'Error setting up wix-sdk settings' });
49
- }
50
- })
51
- const verifySDK = yield* Schema.decodeUnknown(Schema.Struct({ verify: Schema.Boolean }))(verify)
52
- if (verifySDK.verify) yield* wix_sdk_check
53
-
54
- logger.success(`Velo-sync settings initialized successfully!`);
55
- })
56
- }
@@ -1,6 +0,0 @@
1
- import syncTask from 'velo-sync/dist/tasks/sync-task.js';
2
- import { MigrateFileCache, SyncTaskType } from "../schemas/types";
3
- import migrateFileCache from 'velo-sync/dist/tasks/migrate-files-cache-task.js';
4
-
5
- export const runSyncTask = (syncTask as unknown as { default: SyncTaskType }).default;
6
- export const migrateFileCacheTask = (migrateFileCache as unknown as { default: MigrateFileCache }).default;
@@ -1,19 +0,0 @@
1
- import { Effect, Schema } from "effect/index";
2
- import { Config } from "../config.js";
3
- import Enquirer from "enquirer";
4
- import { AppError } from "../error.js";
5
- import { logger } from "../utils/logger.js";
6
- import veloAPI from 'velo-sync/dist/velo/velo-api.js';
7
-
8
- export const exportData = Effect.gen(function* (_) {
9
- const config = yield* Config;
10
- const veloSyncSettings = config.config.veloSyncSettings;
11
- if (!veloSyncSettings) return yield* Effect.fail(new AppError({ message: 'Velo-sync settings not found', cause: new Error('Velo-sync settings not found') }));
12
-
13
- logger.action(`Exporting data for site ${veloSyncSettings.siteUrl}...`);
14
-
15
- logger.warning('Not implemented yet, please use the Velo Sync CLI for now.');
16
-
17
- // logger.success(`Data for site ${veloSyncSettings.siteUrl} exported successfully!`);
18
- return
19
- })
@@ -1,27 +0,0 @@
1
- import { Effect, Schema } from "effect/index";
2
- import { Config } from "../config.js";
3
- import { AppError } from "../error.js";
4
- import { logger } from "../utils/logger.js";
5
- import { runSyncTask } from "./client.js";
6
-
7
- export const importData = Effect.gen(function* (_) {
8
- const config = yield* Config;
9
- const veloSyncSettings = config.config.veloSyncSettings;
10
- if (!veloSyncSettings) return yield* Effect.fail(new AppError({ message: 'Velo-sync settings not found', cause: new Error('Velo-sync settings not found') }));
11
-
12
- logger.action(`Importing data for site ${veloSyncSettings.siteUrl}...`);
13
- let filename = config.config.veloSyncArguments?.data || '';
14
- let collection = config.config.veloSyncArguments?.collection || '';
15
- let schema = config.config.veloSyncArguments?.schema || '';
16
- let dryrun = config.config.veloSyncArguments?.dry || false;
17
- let importOnly = true
18
- const res = yield* Effect.tryPromise({
19
- try: () => runSyncTask(filename, collection, schema, importOnly, dryrun),
20
- catch: (e) => {
21
- return new AppError({ cause: e, message: 'Error syncing data' });
22
- }
23
- })
24
-
25
- logger.success(`Data for site ${veloSyncSettings.siteUrl} imported successfully!`);
26
- return
27
- })
@@ -1,36 +0,0 @@
1
- import { Effect, Schema } from "effect/index"
2
- import { Config } from "../config.js";
3
- import { AppError } from "../error.js";
4
- import { init } from "./init.js";
5
- import { sync } from "./sync.js";
6
- import { migrate } from "./migrate.js";
7
- import { importData } from "./import.js";
8
- import { exportData } from "./export.js";
9
- import { is_alive } from "./is-alive.js";
10
-
11
-
12
- export const wix_sync = Effect.gen(function* (_) {
13
- const config = yield* Config;
14
- if(config.config.action.syncAction === undefined) {
15
- return yield* Effect.fail(new AppError({ message: "No sync action provided", cause: new Error("No sync action provided") }));
16
- }
17
- if(config.config.action.syncAction === 'init') {
18
- return yield* init;
19
- }
20
- if(config.config.action.syncAction === 'sync') {
21
- return yield* sync;
22
- }
23
- if(config.config.action.syncAction === 'migrate') {
24
- return yield* migrate;
25
- }
26
- if(config.config.action.syncAction === 'import') {
27
- return yield* importData;
28
- }
29
- if(config.config.action.syncAction === 'export') {
30
- return yield* exportData;
31
- }
32
- if(config.config.action.syncAction === 'is-alive') {
33
- return yield* is_alive;
34
- }
35
- yield* Effect.fail(new AppError({ message: `Unsupported sync action type: ${config.config.action.syncAction}`, cause: new Error(`Unsupported sync action type: ${config.config.action.syncAction}`) }));
36
- })
@@ -1,77 +0,0 @@
1
- import { Effect, Schema } from "effect/index";
2
- import { Config } from "../config.js";
3
- import Enquirer from "enquirer";
4
- import { AppError } from "../error.js";
5
- import { writeVeloSyncSettings } from "../commands/write.js";
6
- import { veloSyncSettings } from "../schemas/index.js";
7
- import { logger } from "../utils/logger.js";
8
- import { is_alive } from "./is-alive.js";
9
- import { copySyncFiles } from "../commands/copy.js";
10
-
11
- export const init = Effect.gen(function* (_) {
12
- const config = yield* Config;
13
- const prompter = new Enquirer();
14
-
15
- const choice = yield* Effect.tryPromise({
16
- try: () => prompter.prompt([
17
- {
18
- type: 'input',
19
- name: 'siteUrl',
20
- message: 'Enter a project URL',
21
- initial: config.config.veloSyncSettings?.siteUrl || 'https://example.com',
22
- validate: (value: string) => {
23
- const urlPattern = /^https:\/\/[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
24
- if (!value.trim()) return 'Project URL cannot be empty';
25
- if (!urlPattern.test(value.trim())) return 'URL must be in the format https://domain.com';
26
- return true;
27
- }
28
- },
29
- {
30
- type: 'input',
31
- name: 'secret',
32
- message: 'Enter the velo-sync secret',
33
- initial: config.config.veloSyncSettings?.secret || 'secret',
34
- validate: (value: string) => value.trim() !== '' ? true : 'Secret cannot be empty'
35
- }
36
- ]),
37
- catch: (e) => {
38
- return new AppError({ cause: e, message: 'Error initializing velo-sync settings' });
39
- }
40
- });
41
-
42
- config.config.veloSyncSettings = yield* Schema.decodeUnknown(veloSyncSettings)(choice)
43
- yield* writeVeloSyncSettings
44
-
45
- const copyFilesQuestion = new Enquirer();
46
- const copyFiles = yield* Effect.tryPromise({
47
- try: () => copyFilesQuestion.prompt({
48
- type: 'confirm',
49
- name: 'copyFiles',
50
- message: 'Do you want to copy the velo-sync files to your project?',
51
- }),
52
- catch: (e) => {
53
- return new AppError({ cause: e, message: 'Error copying velo-sync files' });
54
- }
55
- })
56
- const copy = yield* Schema.decodeUnknown(Schema.Struct({ copyFiles: Schema.Boolean }))(copyFiles)
57
- if (copy.copyFiles) {
58
- yield* copySyncFiles
59
- }
60
-
61
-
62
- const question = new Enquirer();
63
- const verify = yield* Effect.tryPromise({
64
- try: () => question.prompt({
65
- type: 'confirm',
66
- name: 'verify',
67
- message: 'Do you want to verify the velo-sync settings?',
68
- }),
69
- catch: (e) => {
70
- return new AppError({ cause: e, message: 'Error setting up velo-sync settings' });
71
- }
72
- })
73
- const verifySync = yield* Schema.decodeUnknown(Schema.Struct({ verify: Schema.Boolean }))(verify)
74
- if (verifySync.verify) yield* is_alive
75
-
76
- logger.success(`Velo-sync settings initialized successfully!`);
77
- })
@@ -1,25 +0,0 @@
1
- import { Effect, Schema } from "effect/index";
2
- import { Config } from "../config.js";
3
- import Enquirer from "enquirer";
4
- import { AppError } from "../error.js";
5
- import { logger } from "../utils/logger.js";
6
- import veloAPI from 'velo-sync/dist/velo/velo-api.js';
7
-
8
- export const is_alive = Effect.gen(function* (_) {
9
- const config = yield* Config;
10
- const prompter = new Enquirer();
11
- const veloSyncSettings = config.config.veloSyncSettings;
12
- if (!veloSyncSettings) return yield* Effect.fail(new AppError({ message: 'Velo-sync settings not found', cause: new Error('Velo-sync settings not found') }));
13
-
14
- logger.action(`Checking if the API for site ${veloSyncSettings.siteUrl} is alive...`);
15
-
16
- const res = yield* Effect.tryPromise({
17
- try: () => veloAPI.isAlive(veloSyncSettings),
18
- catch: (e) => {
19
- return new AppError({ cause: e, message: 'Error checking if the API is alive' });
20
- }
21
- })
22
-
23
- logger.success(`API for site ${veloSyncSettings.siteUrl} is alive and working!`);
24
- return
25
- })
@@ -1,23 +0,0 @@
1
- import { Effect, Schema } from "effect/index";
2
- import { Config } from "../config.js";
3
- import { AppError } from "../error.js";
4
- import { logger } from "../utils/logger.js";
5
- import { migrateFileCacheTask } from "./client.js";
6
-
7
- export const migrate = Effect.gen(function* (_) {
8
- const config = yield* Config;
9
- const veloSyncSettings = config.config.veloSyncSettings;
10
- if (!veloSyncSettings) return yield* Effect.fail(new AppError({ message: 'Velo-sync settings not found', cause: new Error('Velo-sync settings not found') }));
11
-
12
- logger.action(`Migrating file cache for site ${veloSyncSettings.siteUrl}...`);
13
-
14
- const res = yield* Effect.tryPromise({
15
- try: () => migrateFileCacheTask(),
16
- catch: (e) => {
17
- return new AppError({ cause: e, message: 'Error migrating file cache' });
18
- }
19
- })
20
-
21
- logger.success(`File cache for site ${veloSyncSettings.siteUrl} migrated successfully!`);
22
- return
23
- })
@@ -1,27 +0,0 @@
1
- import { Effect, Schema } from "effect/index";
2
- import { Config } from "../config.js";
3
- import { AppError } from "../error.js";
4
- import { logger } from "../utils/logger.js";
5
- import { runSyncTask } from "./client.js";
6
-
7
- export const sync = Effect.gen(function* (_) {
8
- const config = yield* Config;
9
- const veloSyncSettings = config.config.veloSyncSettings;
10
- if (!veloSyncSettings) return yield* Effect.fail(new AppError({ message: 'Velo-sync settings not found', cause: new Error('Velo-sync settings not found') }));
11
-
12
- logger.action(`Syncing data for site ${veloSyncSettings.siteUrl}...`);
13
- let filename = config.config.veloSyncArguments?.data || '';
14
- let collection = config.config.veloSyncArguments?.collection || '';
15
- let schema = config.config.veloSyncArguments?.schema || '';
16
- let dryrun = config.config.veloSyncArguments?.dry || false;
17
- let importOnly = false
18
- const res = yield* Effect.tryPromise({
19
- try: () => runSyncTask(filename, collection, schema, importOnly, dryrun),
20
- catch: (e) => {
21
- return new AppError({ cause: e, message: 'Error syncing data' });
22
- }
23
- })
24
-
25
- logger.success(`Data for site ${veloSyncSettings.siteUrl} synced successfully!`);
26
- return
27
- })
package/tsconfig.json DELETED
@@ -1,34 +0,0 @@
1
- {
2
- "typeAcquisition": {
3
- "enable": true
4
- },
5
- "compilerOptions": {
6
- "outDir": "./dist",
7
- "rootDir": "./src",
8
- "target": "ES2020",
9
- "module": "ESNext",
10
- "moduleResolution": "Node",
11
- "preserveConstEnums": true,
12
- "allowSyntheticDefaultImports": true,
13
- "skipLibCheck": true,
14
- "declaration": true,
15
- "strict": true,
16
- "noEmitOnError": false,
17
- "sourceMap": true,
18
- "strictNullChecks": true,
19
- "noImplicitAny": true,
20
- "noImplicitReturns": true,
21
- "noUncheckedIndexedAccess": false,
22
- "noImplicitThis": false,
23
- "strictBindCallApply": false,
24
- "strictFunctionTypes": true,
25
- "strictPropertyInitialization": true,
26
- "experimentalDecorators": true,
27
- "esModuleInterop": true,
28
- "resolveJsonModule": true
29
- },
30
- "exclude": ["node_modules", "old/**/*", "files/**/*", "dist/**/*"],
31
- "include": [
32
- "src/**/*.ts",
33
- ]
34
- }