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

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/src/init/velo.ts DELETED
@@ -1,66 +0,0 @@
1
- import { Effect, Schema } from "effect/index"
2
- import { Config } from "../config.js";
3
- import { FileSystem, Path } from "@effect/platform"
4
- import { logger } from "../utils/logger.js";
5
- import { mergeAdditions, mergeLucySettings2PackageJson, setInitialized, setProjectName, stringReplace } from "../commands/edit.js";
6
- import { writeLucySettings, writePackageJson } from "../commands/write.js";
7
- import { copyTemplateFiles } from "../commands/copy.js";
8
- import { readPackageJson } from "../commands/read.js";
9
- import { installVeloPackages, runInstall, yarnSetVersion } from "../commands/install.js";
10
- import { cleanup } from "../commands/cleanup.js";
11
- import { gitInit } from "../commands/git.js";
12
- import { checkForVelo } from "../commands/checks.js";
13
- import { AppError } from "../error.js";
14
- import Enquirer from "enquirer";
15
- import { prepareVelo } from "./prepareVelo.js";
16
- import { openEditor } from "../commands/exec.js";
17
-
18
- export const init_velo = () => {
19
- return Effect.gen(function*() {
20
- const config = yield* Config;
21
- const path = yield* Path.Path;
22
-
23
- logger.action("Initializing Velo...");
24
-
25
- yield* checkForVelo();
26
-
27
- if(config.config.lucySettings.initialized && !config.config.force) {
28
- const question = new Enquirer();
29
- const choice = yield* Effect.tryPromise({
30
- try: () => question.prompt({
31
- type: 'confirm',
32
- name: 'prepare',
33
- message: 'Do you want to prepare the velo project?(install packages, git init)',
34
- }),
35
- catch: (e) => {
36
- return new AppError({ cause: e, message: 'Error selecting template' });
37
- }
38
- })
39
- const prepare = yield* Schema.decodeUnknown(Schema.Struct({ prepare: Schema.Boolean }))(choice)
40
- if(prepare.prepare) return yield* prepareVelo
41
- }
42
-
43
-
44
- if(config.config.lucySettings.initialized && !config.config.force) return yield* Effect.fail(new AppError({ message: "Lucy is already initialized in this directory. Use --force to reinitialize.", cause: new Error("Lucy is already initialized in this directory") }));
45
- if ((config.config.lucySettings.initialized && config.config.force) || (config.config.lucySettings.initialized && config.config.force)) logger.alert("Forced initialization!");
46
-
47
- yield* copyTemplateFiles;
48
- yield* stringReplace(path.join(config.config.cwd, 'currents.config.js'), ['__ProjectName__'], [config.config.projectName]);
49
- yield* readPackageJson;
50
- yield* setProjectName;
51
- yield* mergeLucySettings2PackageJson;
52
- yield* mergeAdditions;
53
- yield* writeLucySettings;
54
- yield* writePackageJson;
55
- yield* gitInit();
56
- yield* runInstall;
57
- yield* installVeloPackages;
58
- yield* runInstall;
59
- yield* cleanup;
60
- yield* setInitialized;
61
-
62
- logger.success("Velo initialized successfully!");
63
-
64
- yield* openEditor;
65
- })
66
- }
package/src/policy.ts DELETED
@@ -1,6 +0,0 @@
1
- import { Schedule } from "effect";
2
-
3
- export const default_docker_retry = Schedule.fromDelays(1000, 1000, 1000, 1000);
4
- export function autoscale_policy(seconds: number) {
5
- return Schedule.spaced(`${seconds} second`)
6
- }
package/src/prepare.ts DELETED
@@ -1,24 +0,0 @@
1
- // import chalk from 'chalk';
2
- // import { ModuleSettings, ProjectSettings, blue, green, orange, red, magenta } from './index.js';
3
- // import { gitInit, installPackages } from './helpers.js';
4
-
5
- // /**
6
- // * Init Lucy project
7
- // * @param {string} cwd Current working directory
8
- // * @param {string} packageRoot Package root directory
9
- // * @returns {void}
10
- // */
11
- // export async function prepare(moduleSettings: ModuleSettings, projectSettings: ProjectSettings) {
12
-
13
- // if(!projectSettings.lucySettings?.initialized) {
14
- // console.log((`💩 ${red.underline.bold("=> This project is not initialized =>")} ${orange(moduleSettings.targetFolder)}`));
15
- // console.log("🐕" + magenta.underline(' => Use init to initialize'));
16
- // return;
17
- // }
18
-
19
- // await installPackages(projectSettings.lucySettings.wixPackages, projectSettings.lucySettings.devPackages, moduleSettings.targetFolder, moduleSettings.lockVersion);
20
-
21
- // await gitInit(moduleSettings.targetFolder, projectSettings?.lucySettings?.modules, moduleSettings.force);
22
-
23
- // console.log(chalk.greenBright.underline('🐶 => Prepare done!'));
24
- // }
package/src/runtime.ts DELETED
@@ -1,21 +0,0 @@
1
-
2
- import { Layer, Logger, LogLevel, ManagedRuntime} from "effect"
3
- import { ConfigLayer } from "./config.js";
4
- import { get_args } from "./args.js";
5
- import { NodeInspectState, ServiceInspectState, node_inspect_init, service_inspect_init } from "./states.js";
6
- import { NodeContext } from "@effect/platform-node"
7
- export const build_runtime = (args: Awaited<ReturnType<typeof get_args>>) => {
8
- const log_level = process.env.DEBUG === "true" ? LogLevel.Debug : LogLevel.Info;
9
- return ManagedRuntime.make(Layer.mergeAll(
10
- ConfigLayer(args),
11
- Layer.effect(ServiceInspectState, service_inspect_init),
12
- Layer.effect(NodeInspectState, node_inspect_init),
13
- NodeContext.layer,
14
- Logger.minimumLogLevel(log_level),
15
- Logger.replace(Logger.defaultLogger, Logger.prettyLogger({
16
- colors: true,
17
- mode: 'tty'
18
- }))
19
- ))
20
- };
21
-
@@ -1,31 +0,0 @@
1
- import { LucySettings } from "./lucy";
2
- import * as dartSass from 'sass';
3
- import gulpSass from 'gulp-sass';
4
- import backendSettings from '../../settings/backend-settings.json' with { type: "json" };;
5
- import masterSettings from '../../settings/master-settings.json' with { type: "json" };;
6
- import pageSettings from '../../settings/page-settings.json' with { type: "json" };;
7
- import publicSettings from '../../settings/public-settings.json' with { type: "json" };;
8
-
9
- const sass = gulpSass(dartSass);
10
-
11
- export type TaskOptions = {
12
- enableIncrementalBuild: boolean;
13
- outputDir: string;
14
- sass: ReturnType<typeof gulpSass>;
15
- replaceOptions: {
16
- logs: {
17
- enabled: boolean;
18
- }
19
- };
20
- backendSettings: typeof backendSettings,
21
- masterSettings: typeof masterSettings,
22
- pageSettings: typeof pageSettings,
23
- publicSettings: typeof publicSettings,
24
- modulesSourcePaths: string[];
25
- cwd: string;
26
- }
27
-
28
- export interface File {
29
- path: string;
30
- dirname: string;
31
- }
@@ -1,17 +0,0 @@
1
- import { Schema } from "effect/index";
2
-
3
- export const JsonSchema = Schema.parseJson()
4
-
5
- export const veloSyncSettings = Schema.Struct({
6
- siteUrl: Schema.String,
7
- secret: Schema.String,
8
- });
9
- export type VeloSyncSettings = typeof veloSyncSettings.Type;
10
-
11
- export const wixSDKSettings = Schema.Struct({
12
- apiKey: Schema.String,
13
- siteId: Schema.String,
14
- });
15
- export type WixSDKSettings = typeof wixSDKSettings.Type;
16
-
17
- export const editors = ['vscode', 'cursor'] as const;
@@ -1,43 +0,0 @@
1
- import { Schema } from "effect/index";
2
- import { initTypes } from "./types.js";
3
-
4
- export const pkgManagers = ['pnpm', 'yarn', 'npm'] as const;
5
- export const lucySettings = Schema.mutable(Schema.Struct({
6
- modules: Schema.Record({
7
- key: Schema.String,
8
- value: Schema.Struct({
9
- source: Schema.String,
10
- branch: Schema.String,
11
- path: Schema.optional(Schema.String),
12
- noCompile: Schema.optional(Schema.Boolean),
13
- })}),
14
- veloSettings: Schema.optional(Schema.NullOr(Schema.Struct({
15
- compilerOptions: Schema.optional(Schema.Struct({
16
- composite: Schema.Boolean,
17
- noEmit: Schema.Boolean,
18
- lib: Schema.Array(Schema.String),
19
- jsx: Schema.String,
20
- })),
21
- exclude: Schema.optional(Schema.Array(Schema.String)),
22
- }))),
23
- initialized: Schema.Boolean,
24
- type: Schema.Literal(...initTypes),
25
- dependencies: Schema.mutable(Schema.Record({
26
- key: Schema.String,
27
- value: Schema.String,
28
- })),
29
- devDependencies: Schema.mutable(Schema.Record({
30
- key: Schema.String,
31
- value: Schema.String,
32
- })),
33
- scripts: Schema.Record({
34
- key: Schema.String,
35
- value: Schema.String,
36
- }),
37
- additionalCommands: Schema.optional(Schema.Array(Schema.Array(Schema.String))),
38
- additionalPkgProps: Schema.optional(Schema.Object),
39
- packageManager: Schema.mutable(Schema.Literal(...pkgManagers)),
40
- defaultModulePath: Schema.optional(Schema.String),
41
- }));
42
-
43
- export type LucySettings = typeof lucySettings.Type;
@@ -1,35 +0,0 @@
1
- export type TSConfig = {
2
- compilerOptions?: {
3
- target?: string; // e.g., "ES5", "ES6", "ES2015", "ESNext"
4
- module?: string; // e.g., "CommonJS", "ES6", "ESNext"
5
- lib?: string[]; // e.g., ["ES2015", "DOM"]
6
- outDir?: string;
7
- rootDir?: string;
8
- strict?: boolean;
9
- esModuleInterop?: boolean;
10
- allowJs?: boolean;
11
- checkJs?: boolean;
12
- declaration?: boolean;
13
- declarationMap?: boolean;
14
- sourceMap?: boolean;
15
- removeComments?: boolean;
16
- noImplicitAny?: boolean;
17
- moduleResolution?: "node" | "classic";
18
- resolveJsonModule?: boolean;
19
- skipLibCheck?: boolean;
20
- types?: string[]; // e.g., ["node", "jest"]
21
- typeRoots?: string[]; // e.g., ["./types"]
22
- jsx?: "preserve" | "react" | "react-jsx" | "react-jsxdev" | "react-native";
23
- incremental?: boolean;
24
- noEmit?: boolean;
25
- paths?: Record<string, string[]>; // Aliases for module paths
26
- [key: string]: any; // Allow additional compiler options
27
- };
28
- include?: string[]; // Glob patterns to include
29
- exclude?: string[]; // Glob patterns to exclude
30
- files?: string[]; // Specific files to include
31
- extends?: string; // Path to a base tsconfig.json
32
- references?: { path: string }[]; // Project references
33
- compileOnSave?: boolean;
34
- [key: string]: any; // Allow additional top-level options
35
- };
@@ -1,40 +0,0 @@
1
- export const initTypes = ["velo", "expo", "blocks", "monorepo", "tauri", "cargo", 'submodules', 'wix-sdk'] as const;
2
- export const taskNames = ["dev", "build", "build-prod", "build-pipeline", "sync-settings"] as const;
3
- export const syncActions = ["sync", "import", "init", "is-alive", "migrate", "export"] as const;
4
- export const WixSDKActions = ["init", ""] as const;
5
- export type Action = 'init' | 'open' | 'task' | 'wix-sync';
6
- import gulp from 'gulp';
7
-
8
- export type SyncTaskType = (filename: string, collection: string, schemaFilename: string, importOnly: boolean, dryrun: boolean) => Promise<void>;
9
- export type MigrateFileCache = () => Promise<void>;
10
- export type TaskType = ReturnType< typeof gulp.parallel>
11
-
12
- export type Actions = {
13
- action: Action;
14
- initType?: typeof initTypes[number];
15
- tasksName?: typeof taskNames[number];
16
- syncAction?: typeof syncActions[number];
17
- wixSDKAction?: typeof WixSDKActions[number];
18
- }
19
-
20
- export interface LucyArgs {
21
- [x: string]: unknown;
22
- // This will hold the command used, e.g., 'init'
23
- _: Action[];
24
- $0: string;
25
- // Arguments for the 'init' command
26
- initType?: Actions['initType'];
27
- tasksName?: Actions['tasksName'];
28
- syncAction?: Actions['syncAction'];
29
- wixSDKAction?: Actions['wixSDKAction'];
30
- // wix-sync options
31
- input?: string; // Alias for -f
32
- collection?: string; // Alias for -c
33
- schema?: string; // Alias for -s
34
- d?: boolean;
35
- }
36
-
37
- export interface VeloSyncConfig {
38
- siteUrl: string;
39
- secret: string;
40
- }
package/src/settings.json DELETED
@@ -1,67 +0,0 @@
1
- {
2
- "modules": {},
3
- "wixSettings": {
4
- "compilerOptions": {
5
- "composite": true,
6
- "noEmit": false,
7
- "lib": [],
8
- "jsx": "react-jsx"
9
- },
10
- "exclude": ["**/*.js"]
11
- },
12
- "initialized": false,
13
- "wixPackages": {},
14
- "devPackages": {
15
- "@eslint/js": "^9.30.1",
16
- "@styled/typescript-styled-plugin": "^1.0.1",
17
- "@total-typescript/ts-reset": "^0.6.1",
18
- "@types/node": "^24.0.10",
19
- "@types/nodemailer": "^6.4.17",
20
- "@types/react": "^19.1.8",
21
- "madge": "^8.0.0",
22
- "@typescript-eslint/eslint-plugin": "^8.35.1",
23
- "@typescript-eslint/parser": "^8.35.1",
24
- "@typescript-eslint/utils": "^8.35.1",
25
- "@vitest/coverage-v8": "^3.2.4",
26
- "@vitest/ui": "^3.2.4",
27
- "@wix/cli": "^1.1.101",
28
- "@wix/eslint-plugin-cli": "^1.0.2",
29
- "cypress": "^14.5.1",
30
- "cypress-cloud": "^1.13.1",
31
- "esbuild": "^0.25.5",
32
- "eslint": "^9.30.1",
33
- "eslint-plugin-exception-handling": "^1.5.4",
34
- "eslint-plugin-import": "^2.32.0",
35
- "eslint-plugin-jsdoc": "^51.3.3",
36
- "eslint-plugin-named-import-spacing": "^1.0.3",
37
- "eslint-plugin-promise": "^7.2.1",
38
- "eslint-plugin-simple-import-sort": "^12.1.1",
39
- "prettier": "^3.6.2",
40
- "sass": "^1.89.2",
41
- "ts-node": "^10.9.2",
42
- "tsx": "^4.20.3",
43
- "typedoc": "^0.28.7",
44
- "typedoc-github-theme": "^0.3.0",
45
- "typescript": "^5.8.3",
46
- "typescript-eslint": "^8.35.1",
47
- "typescript-eslint-language-service": "^5.0.5",
48
- "vite-tsconfig-paths": "^5.1.4",
49
- "vitest": "^3.2.4",
50
- "vitest-tsconfig-paths": "^3.4.1"
51
- },
52
- "scripts": {
53
- "postinstall": "wix sync-types",
54
- "wix:dev": "wix dev",
55
- "dev": "lucy-cli dev",
56
- "lint": "NODE_OPTIONS=\"--max-old-space-size=32768\" eslint .",
57
- "docs": "typedoc --tsconfig typescript/tsconfig.json --skipErrorChecking",
58
- "build": "lucy-cli build-prod",
59
- "fix-wix": "lucy-cli fix-wix",
60
- "tsc": "tsc -p ./typescript/tsconfig.json --noEmit",
61
- "test": "vitest --ui --coverage",
62
- "coverage": "vitest run --coverage",
63
- "cypress": "cypress open",
64
- "e2e": "cypress-cloud run --parallel --record",
65
- "graph": "madge --image graph.svg src"
66
- }
67
- }
package/src/states.ts DELETED
@@ -1,15 +0,0 @@
1
- import { Context, Ref } from "effect"
2
-
3
-
4
- export class ServiceInspectState extends Context.Tag("ServiceInspectState")<
5
- ServiceInspectState,
6
- Ref.Ref<String>
7
- >() {}
8
- export const service_inspect_init = Ref.make([] as any)
9
-
10
- export class NodeInspectState extends Context.Tag("NodeInspectState")<
11
- NodeInspectState,
12
- Ref.Ref<String>
13
- >() {}
14
- export const node_inspect_init = Ref.make([] as any)
15
-
@@ -1,207 +0,0 @@
1
- import gulp from 'gulp';
2
- import gulpSass from 'gulp-sass';
3
- import shell from 'gulp-shell';
4
- import * as os from 'os';
5
- import * as dartSass from 'sass';
6
- import { join } from "path";
7
-
8
- import backendSettings from '../../settings/backend-settings.json' with { type: "json" };;
9
- import masterSettings from '../../settings/master-settings.json' with { type: "json" };;
10
- import pageSettings from '../../settings/page-settings.json' with { type: "json" };;
11
- import publicSettings from '../../settings/public-settings.json' with { type: "json" };;
12
-
13
- import { buildPublic } from './gulp/public.js';
14
- import { buildBackend, buildBackendJSW } from './gulp/backend.js';
15
- import { checkPages, checkTs } from './gulp/checks.js';
16
- import { compileScss } from './gulp/styles.js';
17
- import { buildPages } from './gulp/pages.js';
18
- import { previewTemplates } from './gulp/templates.js';
19
- import { copyFiles } from './gulp/copy.js';
20
- import { cleanSrc, cleanWix } from './gulp/clean.js';
21
- import { addTypes, updateWixTypes } from './gulp/types.js';
22
- import { setProdConfig } from './gulp/pipeline.js';
23
- import { watchAll } from './gulp/watchers.js';
24
- import { getModulesSourcePaths } from './gulp/helpers.js';
25
- import { logger } from '../utils/logger.js';
26
- import { Effect } from 'effect/index';
27
- import { Config } from '../config.js';
28
- import { AppError } from '../error.js';
29
- import { TaskOptions } from '../schemas/gulp.js';
30
-
31
- const sass = gulpSass(dartSass);
32
-
33
- export const task_runGulp = Effect.gen(function* (_) {
34
- const config = (yield* Config).config;
35
- const task = config.action.tasksName || "dev";
36
-
37
- const taskOptions: TaskOptions = {
38
- enableIncrementalBuild: config.action.tasksName === 'dev' ? true : false,
39
- outputDir: './src',
40
- sass,
41
- pageSettings,
42
- publicSettings,
43
- backendSettings,
44
- masterSettings,
45
- replaceOptions: {
46
- logs: {
47
- enabled: false
48
- }
49
- },
50
- cwd: process.cwd(),
51
- modulesSourcePaths: yield* getModulesSourcePaths,
52
- };
53
-
54
-
55
- logger.action(`Running task: ${task}`);
56
-
57
- gulp.task('check-ts', gulp.parallel(
58
- checkTs(taskOptions, false),
59
- ));
60
-
61
- gulp.task('scss', gulp.parallel(
62
- compileScss(taskOptions),
63
- ));
64
-
65
- gulp.task('build-backend', gulp.parallel(
66
- buildBackend(taskOptions),
67
- buildBackendJSW(taskOptions),
68
- // buildBackendHTTP(taskOptions),
69
- ));
70
-
71
- gulp.task('build-public', gulp.parallel(
72
- buildPublic(taskOptions),
73
- ));
74
-
75
- gulp.task('preview-templates', gulp.parallel(
76
- previewTemplates(taskOptions),
77
- ));
78
-
79
- gulp.task('copy-files', gulp.parallel(
80
- copyFiles(taskOptions),
81
- ));
82
-
83
- gulp.task('test', function () {
84
- return shell.task(
85
- ['yarn test'],
86
- { ignoreErrors: true }
87
- )().then(() => {
88
- logger.success("Tests completed successfully.");
89
- }).catch(err => {
90
- logger.error("Error in test task!");
91
- });
92
- });
93
- gulp.task('test-ci', function () {
94
- return shell.task(
95
- ['yarn test --run'],
96
- { ignoreErrors: true }
97
- )().then(() => {
98
- logger.success("Tests completed successfully.");
99
- }).catch(err => {
100
- logger.error("Error in test task!");
101
- });
102
- });
103
-
104
- gulp.task('sync-types', shell.task([
105
- 'wix sync-types',
106
- ]));
107
-
108
- gulp.task('fix-wix-types', gulp.parallel(
109
- updateWixTypes(taskOptions)
110
- ));
111
-
112
- gulp.task('add-wix-types', function(done: gulp.TaskFunctionCallback) {
113
- return addTypes(taskOptions, done);
114
- });
115
-
116
- gulp.task('set-production', gulp.parallel(
117
- setProdConfig()
118
- ));
119
-
120
- gulp.task('start-wix', shell.task([
121
- 'wix dev',
122
- ]));
123
-
124
- gulp.task('gen-docs', shell.task([
125
- 'yarn docs',
126
- ]));
127
-
128
- gulp.task('fix-wix', gulp.series(
129
- cleanWix(),
130
- 'sync-types',
131
- 'fix-wix-types',
132
- 'add-wix-types'
133
- ));
134
-
135
- gulp.task('build', gulp.parallel(
136
- 'build-backend',
137
- 'build-public',
138
- 'preview-templates',
139
- buildPages(taskOptions),
140
- compileScss(taskOptions),
141
- 'copy-files'
142
- )
143
- );
144
-
145
- gulp.task('build-pipeline', gulp.series(
146
- cleanSrc(taskOptions),
147
- 'set-production',
148
- 'check-ts',
149
- 'fix-wix-types',
150
- 'add-wix-types',
151
- 'test-ci',
152
- 'build',
153
- ));
154
-
155
- gulp.task('build-prod', gulp.series(
156
- (done) => checkPages(true, false).then(() => done(), (err) => done(err)),
157
- cleanSrc(taskOptions),
158
- 'set-production',
159
- 'fix-wix',
160
- 'check-ts',
161
- 'test-ci',
162
- 'build-backend',
163
- 'build-public',
164
- buildPages(taskOptions),
165
- 'copy-files',
166
- compileScss(taskOptions),
167
- // 'gen-docs'
168
- ));
169
-
170
- gulp.task('start-dev-env', gulp.parallel(
171
- watchAll(taskOptions),
172
- 'test',
173
- 'start-wix',
174
- 'check-ts',
175
- (done) => checkPages(false, config.force).then(() => done(), (err) => done(err)),
176
- ));
177
-
178
- gulp.task('dev', gulp.series(
179
- cleanSrc(taskOptions),
180
- 'fix-wix',
181
- 'build',
182
- 'start-dev-env',
183
- )
184
- );
185
-
186
- yield* Effect.tryPromise({
187
- try: () => {
188
- return new Promise(function (resolve, reject) {
189
- gulp.series(task, (done) => {
190
- resolve(true);
191
- done();
192
- })(function (err) {
193
- if (err) {
194
- logger.error("Error starting tasks:", err);
195
- reject(err);
196
- }
197
- });
198
- });
199
- },
200
- catch: (e) => {
201
- logger.error("Error starting tasks:", e);
202
- return new AppError({ message: 'Error starting tasks', cause: e });
203
- }
204
- })
205
-
206
- logger.report("Task completed successfully:", task);
207
- });