lucy-cli 2.0.0-alpha.12 → 2.0.0-alpha.13
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/.turbo/daemon/ee24a4f4ab6aa3c0-turbo.log.2025-08-02 +0 -0
- package/dist/args.js +44 -7
- package/dist/args.js.map +1 -1
- package/dist/commands/checks.d.ts +1 -1
- package/dist/commands/checks.js +2 -2
- package/dist/commands/checks.js.map +1 -1
- package/dist/commands/copy.d.ts +2 -1
- package/dist/commands/copy.js +9 -1
- package/dist/commands/copy.js.map +1 -1
- package/dist/commands/edit.d.ts +1 -1
- package/dist/commands/edit.js +3 -3
- package/dist/commands/edit.js.map +1 -1
- package/dist/commands/exec.d.ts +1 -1
- package/dist/commands/files.d.ts +7 -0
- package/dist/commands/files.js +28 -0
- package/dist/commands/files.js.map +1 -0
- package/dist/commands/read.d.ts +3 -2
- package/dist/commands/read.js +14 -7
- package/dist/commands/read.js.map +1 -1
- package/dist/commands/write.d.ts +4 -2
- package/dist/commands/write.js +15 -3
- package/dist/commands/write.js.map +1 -1
- package/dist/config.d.ts +20 -2
- package/dist/config.js +84 -57
- package/dist/config.js.map +1 -1
- package/dist/helpers.d.ts +9 -0
- package/dist/helpers.js +86 -0
- package/dist/helpers.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +42 -4
- package/dist/index.js.map +1 -1
- package/dist/init/blocks.d.ts +1 -1
- package/dist/init/blocks.js +2 -2
- package/dist/init/blocks.js.map +1 -1
- package/dist/init/cargo.d.ts +1 -1
- package/dist/init/expo.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 +45 -47
- 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/templates.js +11 -12
- package/dist/init/templates.js.map +1 -1
- package/dist/init/velo.d.ts +1 -1
- package/dist/runtime.d.ts +1 -1
- package/dist/schemas/gulp.d.ts +25 -15
- package/dist/schemas/gulp.js +4 -0
- package/dist/schemas/gulp.js.map +1 -1
- package/dist/schemas/index.d.ts +10 -0
- package/dist/schemas/index.js +8 -0
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/lucy.d.ts +5 -5
- package/dist/schemas/lucy.js +8 -8
- package/dist/schemas/lucy.js.map +1 -1
- package/dist/schemas/types.d.ts +23 -7
- package/dist/schemas/types.js +4 -2
- package/dist/schemas/types.js.map +1 -1
- package/dist/sync/sync.d.ts +3 -0
- package/dist/sync/sync.js +91 -87
- package/dist/sync/sync.js.map +1 -1
- package/dist/tasks/Gulpfile.d.ts +4 -35
- package/dist/tasks/Gulpfile.js +81 -104
- package/dist/tasks/Gulpfile.js.map +1 -1
- package/dist/tasks/gitModules.d.ts +2 -0
- package/dist/tasks/gitModules.js +13 -0
- package/dist/tasks/gitModules.js.map +1 -0
- package/dist/tasks/gulp/backend.d.ts +1 -1
- package/dist/tasks/gulp/backend.js +10 -10
- package/dist/tasks/gulp/backend.js.map +1 -1
- package/dist/tasks/gulp/checks.d.ts +1 -1
- package/dist/tasks/gulp/checks.js +3 -2
- package/dist/tasks/gulp/checks.js.map +1 -1
- package/dist/tasks/gulp/clean.d.ts +1 -1
- package/dist/tasks/gulp/clean.js +1 -1
- package/dist/tasks/gulp/clean.js.map +1 -1
- package/dist/tasks/gulp/copy.d.ts +1 -1
- package/dist/tasks/gulp/copy.js +3 -4
- package/dist/tasks/gulp/copy.js.map +1 -1
- package/dist/tasks/gulp/helpers.d.ts +3 -2
- package/dist/tasks/gulp/helpers.js +6 -8
- package/dist/tasks/gulp/helpers.js.map +1 -1
- package/dist/tasks/gulp/pages.d.ts +1 -1
- package/dist/tasks/gulp/pages.js.map +1 -1
- package/dist/tasks/gulp/pipeline.js +3 -3
- package/dist/tasks/gulp/pipeline.js.map +1 -1
- package/dist/tasks/gulp/public.d.ts +1 -1
- package/dist/tasks/gulp/public.js +5 -5
- package/dist/tasks/gulp/public.js.map +1 -1
- package/dist/tasks/gulp/styles.d.ts +1 -1
- package/dist/tasks/gulp/styles.js +10 -10
- package/dist/tasks/gulp/styles.js.map +1 -1
- package/dist/tasks/gulp/templates.d.ts +1 -1
- package/dist/tasks/gulp/templates.js +3 -3
- package/dist/tasks/gulp/templates.js.map +1 -1
- package/dist/tasks/gulp/types.d.ts +1 -1
- package/dist/tasks/gulp/types.js +61 -68
- package/dist/tasks/gulp/types.js.map +1 -1
- package/dist/tasks/gulp/watchers.d.ts +1 -8
- package/dist/tasks/gulp/watchers.js +48 -46
- package/dist/tasks/gulp/watchers.js.map +1 -1
- package/dist/tasks/index.d.ts +1 -1
- package/dist/tasks/index.js +19 -21
- package/dist/tasks/index.js.map +1 -1
- package/dist/tasks/syncPkg.d.ts +3 -0
- package/dist/tasks/syncPkg.js +13 -0
- package/dist/tasks/syncPkg.js.map +1 -0
- package/dist/tasks/syncSettings.d.ts +3 -0
- package/dist/tasks/syncSettings.js +18 -0
- package/dist/tasks/syncSettings.js.map +1 -0
- package/dist/wix-sdk/check.d.ts +4 -0
- package/dist/wix-sdk/check.js +23 -0
- package/dist/wix-sdk/check.js.map +1 -0
- package/dist/wix-sdk/client.d.ts +10 -0
- package/dist/wix-sdk/client.js +18 -0
- package/dist/wix-sdk/client.js.map +1 -0
- package/dist/wix-sdk/import.d.ts +1 -0
- package/{src/sync/sync.ts → dist/wix-sdk/import.js} +12 -20
- package/dist/wix-sdk/import.js.map +1 -0
- package/dist/wix-sdk/index.d.ts +4 -0
- package/dist/wix-sdk/index.js +15 -0
- package/dist/wix-sdk/index.js.map +1 -0
- package/dist/wix-sdk/init copy.d.ts +4 -0
- package/dist/wix-sdk/init copy.js +51 -0
- package/dist/wix-sdk/init copy.js.map +1 -0
- package/dist/wix-sdk/init.d.ts +4 -0
- package/dist/wix-sdk/init.js +51 -0
- package/dist/wix-sdk/init.js.map +1 -0
- package/dist/wix-sdk/is-allive.d.ts +4 -0
- package/dist/wix-sdk/is-allive.js +37 -0
- package/dist/wix-sdk/is-allive.js.map +1 -0
- package/dist/wix-sdk/run.d.ts +4 -0
- package/dist/wix-sdk/run.js +53 -0
- package/dist/wix-sdk/run.js.map +1 -0
- package/dist/wix-sdk/sync copy.d.ts +1 -0
- package/dist/wix-sdk/sync copy.js +88 -0
- package/dist/wix-sdk/sync copy.js.map +1 -0
- package/dist/wix-sdk/sync.d.ts +1 -0
- package/dist/wix-sdk/sync.js +88 -0
- package/dist/wix-sdk/sync.js.map +1 -0
- package/dist/wix-sdk/wix_sdk_check.d.ts +4 -0
- package/dist/wix-sdk/wix_sdk_check.js +37 -0
- package/dist/wix-sdk/wix_sdk_check.js.map +1 -0
- package/dist/wix-sync/client.d.ts +3 -0
- package/dist/wix-sync/client.js +5 -0
- package/dist/wix-sync/client.js.map +1 -0
- package/dist/wix-sync/export copy.d.ts +4 -0
- package/dist/wix-sync/export copy.js +21 -0
- package/dist/wix-sync/export copy.js.map +1 -0
- package/dist/wix-sync/export.d.ts +4 -0
- package/dist/wix-sync/export.js +15 -0
- package/dist/wix-sync/export.js.map +1 -0
- package/dist/wix-sync/import copy.d.ts +4 -0
- package/dist/wix-sync/import copy.js +21 -0
- package/dist/wix-sync/import copy.js.map +1 -0
- package/dist/wix-sync/import.d.ts +4 -0
- package/dist/wix-sync/import.js +26 -0
- package/dist/wix-sync/import.js.map +1 -0
- package/dist/wix-sync/index.d.ts +4 -0
- package/dist/wix-sync/index.js +35 -0
- package/dist/wix-sync/index.js.map +1 -0
- package/dist/wix-sync/init copy.d.ts +4 -0
- package/dist/wix-sync/init copy.js +54 -0
- package/dist/wix-sync/init copy.js.map +1 -0
- package/dist/wix-sync/init.d.ts +4 -0
- package/dist/wix-sync/init.js +74 -0
- package/dist/wix-sync/init.js.map +1 -0
- package/dist/wix-sync/is-alive.d.ts +4 -0
- package/dist/wix-sync/is-alive.js +23 -0
- package/dist/wix-sync/is-alive.js.map +1 -0
- package/dist/wix-sync/is-allive copy.d.ts +4 -0
- package/dist/wix-sync/is-allive copy.js +23 -0
- package/dist/wix-sync/is-allive copy.js.map +1 -0
- package/dist/wix-sync/is-allive.d.ts +4 -0
- package/dist/wix-sync/is-allive.js +23 -0
- package/dist/wix-sync/is-allive.js.map +1 -0
- package/dist/wix-sync/migrate.d.ts +4 -0
- package/dist/wix-sync/migrate.js +21 -0
- package/dist/wix-sync/migrate.js.map +1 -0
- package/dist/wix-sync/sync-od.d.ts +0 -0
- package/dist/wix-sync/sync-od.js +100 -0
- package/dist/wix-sync/sync-od.js.map +1 -0
- package/dist/wix-sync/sync.d.ts +4 -0
- package/dist/wix-sync/sync.js +26 -0
- package/dist/wix-sync/sync.js.map +1 -0
- package/dist/wix-sync/sync2.d.ts +4 -0
- package/dist/wix-sync/sync2.js +25 -0
- package/dist/wix-sync/sync2.js.map +1 -0
- package/dist/wix-sync copy/index.d.ts +4 -0
- package/dist/wix-sync copy/index.js +17 -0
- package/dist/wix-sync copy/index.js.map +1 -0
- package/dist/wix-sync copy/init.d.ts +4 -0
- package/dist/wix-sync copy/init.js +58 -0
- package/dist/wix-sync copy/init.js.map +1 -0
- package/dist/wix-sync copy/is-allive.d.ts +4 -0
- package/dist/wix-sync copy/is-allive.js +36 -0
- package/dist/wix-sync copy/is-allive.js.map +1 -0
- package/dist/wix-sync copy/sync.d.ts +1 -0
- package/dist/wix-sync copy/sync.js +88 -0
- package/dist/wix-sync copy/sync.js.map +1 -0
- package/files/sync-data/data/test.csv +17 -0
- package/files/sync-data/schema/test.json +11 -0
- package/package.json +5 -2
- package/src/args.ts +44 -7
- package/src/commands/checks.ts +2 -2
- package/src/commands/copy.ts +13 -1
- package/src/commands/edit.ts +3 -3
- package/src/commands/read.ts +17 -8
- package/src/commands/write.ts +25 -4
- package/src/config.ts +106 -65
- package/src/helpers.ts +90 -0
- package/src/index.ts +49 -9
- package/src/init/blocks.ts +2 -2
- package/src/init/index.ts +45 -51
- package/src/init/templates.ts +11 -12
- package/src/schemas/gulp.ts +24 -15
- package/src/schemas/index.ts +12 -1
- package/src/schemas/lucy.ts +9 -8
- package/src/schemas/types.ts +25 -7
- package/src/tasks/Gulpfile.ts +175 -219
- package/src/tasks/gulp/backend.ts +11 -11
- package/src/tasks/gulp/checks.ts +4 -3
- package/src/tasks/gulp/clean.ts +2 -2
- package/src/tasks/gulp/copy.ts +4 -10
- package/src/tasks/gulp/helpers.ts +6 -13
- package/src/tasks/gulp/pages.ts +1 -1
- package/src/tasks/gulp/pipeline.ts +4 -5
- package/src/tasks/gulp/public.ts +6 -6
- package/src/tasks/gulp/styles.ts +11 -11
- package/src/tasks/gulp/templates.ts +4 -4
- package/src/tasks/gulp/types.ts +62 -69
- package/src/tasks/gulp/watchers.ts +77 -81
- package/src/tasks/index.ts +21 -27
- package/src/tasks/syncSettings.ts +21 -0
- package/src/wix-sdk/check.ts +24 -0
- package/src/wix-sdk/client.ts +18 -0
- package/src/wix-sdk/index.ts +17 -0
- package/src/wix-sdk/init.ts +54 -0
- package/src/wix-sdk/run.ts +56 -0
- package/src/wix-sync/client.ts +6 -0
- package/src/wix-sync/export.ts +19 -0
- package/src/wix-sync/import.ts +27 -0
- package/src/wix-sync/index.ts +36 -0
- package/src/wix-sync/init.ts +77 -0
- package/src/wix-sync/is-alive.ts +25 -0
- package/src/wix-sync/migrate.ts +23 -0
- package/src/wix-sync/sync.ts +27 -0
- /package/{src/sync/index.ts → .turbo/daemon/ee24a4f4ab6aa3c0-turbo.log.2025-08-01} +0 -0
package/dist/schemas/gulp.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"gulp.js","sourceRoot":"","sources":["../../src/schemas/gulp.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,QAAQ,MAAM,MAAM,CAAC;AACjC,OAAO,QAAQ,MAAM,WAAW,CAAC;
|
1
|
+
{"version":3,"file":"gulp.js","sourceRoot":"","sources":["../../src/schemas/gulp.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,QAAQ,MAAM,MAAM,CAAC;AACjC,OAAO,QAAQ,MAAM,WAAW,CAAC;AACwD,CAAC;AACH,CAAC;AACL,CAAC;AACG,CAAC;AAExF,MAAM,IAAI,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC"}
|
package/dist/schemas/index.d.ts
CHANGED
@@ -1,2 +1,12 @@
|
|
1
1
|
import { Schema } from "effect/index";
|
2
2
|
export declare const JsonSchema: Schema.SchemaClass<unknown, string, never>;
|
3
|
+
export declare const veloSyncSettings: Schema.Struct<{
|
4
|
+
siteUrl: typeof Schema.String;
|
5
|
+
secret: typeof Schema.String;
|
6
|
+
}>;
|
7
|
+
export type VeloSyncSettings = typeof veloSyncSettings.Type;
|
8
|
+
export declare const wixSDKSettings: Schema.Struct<{
|
9
|
+
apiKey: typeof Schema.String;
|
10
|
+
siteId: typeof Schema.String;
|
11
|
+
}>;
|
12
|
+
export type WixSDKSettings = typeof wixSDKSettings.Type;
|
package/dist/schemas/index.js
CHANGED
@@ -1,3 +1,11 @@
|
|
1
1
|
import { Schema } from "effect/index";
|
2
2
|
export const JsonSchema = Schema.parseJson();
|
3
|
+
export const veloSyncSettings = Schema.Struct({
|
4
|
+
siteUrl: Schema.String,
|
5
|
+
secret: Schema.String,
|
6
|
+
});
|
7
|
+
export const wixSDKSettings = Schema.Struct({
|
8
|
+
apiKey: Schema.String,
|
9
|
+
siteId: Schema.String,
|
10
|
+
});
|
3
11
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,SAAS,EAAE,CAAA"}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,SAAS,EAAE,CAAA;AAC5C,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC7C,OAAO,EAAE,MAAM,CAAC,MAAM;IACtB,MAAM,EAAE,MAAM,CAAC,MAAM;CACrB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC;IAC3C,MAAM,EAAE,MAAM,CAAC,MAAM;IACrB,MAAM,EAAE,MAAM,CAAC,MAAM;CACrB,CAAC,CAAC"}
|
package/dist/schemas/lucy.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Schema } from "effect/index";
|
2
|
-
export declare const lucySettings: Schema.Struct<{
|
2
|
+
export declare const lucySettings: Schema.mutable<Schema.Struct<{
|
3
3
|
modules: Schema.Record$<typeof Schema.String, Schema.Struct<{
|
4
4
|
source: typeof Schema.String;
|
5
5
|
branch: typeof Schema.String;
|
@@ -16,11 +16,11 @@ export declare const lucySettings: Schema.Struct<{
|
|
16
16
|
exclude: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
17
17
|
}>>>;
|
18
18
|
initialized: typeof Schema.Boolean;
|
19
|
-
type: Schema.Literal<["velo", "expo", "blocks", "monorepo", "tauri", "cargo", "submodules"]>;
|
20
|
-
dependencies: Schema.Record$<typeof Schema.String, typeof Schema.String
|
21
|
-
devDependencies: Schema.Record$<typeof Schema.String, typeof Schema.String
|
19
|
+
type: Schema.Literal<["velo", "expo", "blocks", "monorepo", "tauri", "cargo", "submodules", "wix-sdk"]>;
|
20
|
+
dependencies: Schema.mutable<Schema.Record$<typeof Schema.String, typeof Schema.String>>;
|
21
|
+
devDependencies: Schema.mutable<Schema.Record$<typeof Schema.String, typeof Schema.String>>;
|
22
22
|
scripts: Schema.Record$<typeof Schema.String, typeof Schema.String>;
|
23
23
|
additionalCommands: Schema.optional<Schema.Array$<Schema.Array$<typeof Schema.String>>>;
|
24
24
|
additionalPkgProps: Schema.optional<typeof Schema.Object>;
|
25
|
-
}
|
25
|
+
}>>;
|
26
26
|
export type LucySettings = typeof lucySettings.Type;
|
package/dist/schemas/lucy.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Schema } from "effect/index";
|
2
|
-
import {
|
3
|
-
export const lucySettings = Schema.Struct({
|
2
|
+
import { initTypes } from "./types.js";
|
3
|
+
export const lucySettings = Schema.mutable(Schema.Struct({
|
4
4
|
modules: Schema.Record({
|
5
5
|
key: Schema.String,
|
6
6
|
value: Schema.Struct({
|
@@ -20,20 +20,20 @@ export const lucySettings = Schema.Struct({
|
|
20
20
|
exclude: Schema.optional(Schema.Array(Schema.String)),
|
21
21
|
}))),
|
22
22
|
initialized: Schema.Boolean,
|
23
|
-
type: Schema.Literal(...
|
24
|
-
dependencies: Schema.Record({
|
23
|
+
type: Schema.Literal(...initTypes),
|
24
|
+
dependencies: Schema.mutable(Schema.Record({
|
25
25
|
key: Schema.String,
|
26
26
|
value: Schema.String,
|
27
|
-
}),
|
28
|
-
devDependencies: Schema.Record({
|
27
|
+
})),
|
28
|
+
devDependencies: Schema.mutable(Schema.Record({
|
29
29
|
key: Schema.String,
|
30
30
|
value: Schema.String,
|
31
|
-
}),
|
31
|
+
})),
|
32
32
|
scripts: Schema.Record({
|
33
33
|
key: Schema.String,
|
34
34
|
value: Schema.String,
|
35
35
|
}),
|
36
36
|
additionalCommands: Schema.optional(Schema.Array(Schema.Array(Schema.String))),
|
37
37
|
additionalPkgProps: Schema.optional(Schema.Object),
|
38
|
-
});
|
38
|
+
}));
|
39
39
|
//# sourceMappingURL=lucy.js.map
|
package/dist/schemas/lucy.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"lucy.js","sourceRoot":"","sources":["../../src/schemas/lucy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAA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,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC;QACpC,GAAG,EAAE,MAAM,CAAC,MAAM;QAClB,KAAK,EAAE,MAAM,CAAC,MAAM;KACvB,CAAC,CAAC;IACN,eAAe,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC;QACvC,GAAG,EAAE,MAAM,CAAC,MAAM;QAClB,KAAK,EAAE,MAAM,CAAC,MAAM;KACvB,CAAC,CAAC;IACN,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC;QAChB,GAAG,EAAE,MAAM,CAAC,MAAM;QAClB,KAAK,EAAE,MAAM,CAAC,MAAM;KACvB,CAAC;IACL,kBAAkB,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;IAC9E,kBAAkB,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;CAClD,CAAC,CAAC,CAAC"}
|
package/dist/schemas/types.d.ts
CHANGED
@@ -1,15 +1,31 @@
|
|
1
|
-
export declare const
|
2
|
-
export declare const
|
3
|
-
export
|
1
|
+
export declare const initTypes: readonly ["velo", "expo", "blocks", "monorepo", "tauri", "cargo", "submodules", "wix-sdk"];
|
2
|
+
export declare const taskNames: readonly ["dev", "build", "build-prod", "build-pipeline", "sync-settings"];
|
3
|
+
export declare const syncActions: readonly ["sync", "import", "init", "is-alive", "migrate", "export"];
|
4
|
+
export declare const WixSDKActions: readonly ["init", ""];
|
5
|
+
export type Action = 'init' | 'open' | 'task' | 'wix-sync';
|
6
|
+
export type SyncTaskType = (filename: string, collection: string, schemaFilename: string, importOnly: boolean, dryrun: boolean) => Promise<void>;
|
7
|
+
export type MigrateFileCache = () => Promise<void>;
|
4
8
|
export type Actions = {
|
5
9
|
action: Action;
|
6
|
-
|
7
|
-
|
10
|
+
initType?: typeof initTypes[number];
|
11
|
+
tasksName?: typeof taskNames[number];
|
12
|
+
syncAction?: typeof syncActions[number];
|
13
|
+
wixSDKAction?: typeof WixSDKActions[number];
|
8
14
|
};
|
9
15
|
export interface LucyArgs {
|
10
16
|
[x: string]: unknown;
|
11
17
|
_: Action[];
|
12
18
|
$0: string;
|
13
|
-
|
14
|
-
|
19
|
+
initType?: Actions['initType'];
|
20
|
+
tasksName?: Actions['tasksName'];
|
21
|
+
syncAction?: Actions['syncAction'];
|
22
|
+
wixSDKAction?: Actions['wixSDKAction'];
|
23
|
+
input?: string;
|
24
|
+
collection?: string;
|
25
|
+
schema?: string;
|
26
|
+
d?: boolean;
|
27
|
+
}
|
28
|
+
export interface VeloSyncConfig {
|
29
|
+
siteUrl: string;
|
30
|
+
secret: string;
|
15
31
|
}
|
package/dist/schemas/types.js
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
-
export const
|
2
|
-
export const
|
1
|
+
export const initTypes = ["velo", "expo", "blocks", "monorepo", "tauri", "cargo", 'submodules', 'wix-sdk'];
|
2
|
+
export const taskNames = ["dev", "build", "build-prod", "build-pipeline", "sync-settings"];
|
3
|
+
export const syncActions = ["sync", "import", "init", "is-alive", "migrate", "export"];
|
4
|
+
export const WixSDKActions = ["init", ""];
|
3
5
|
//# sourceMappingURL=types.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/schemas/types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/schemas/types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,SAAS,CAAU,CAAC;AACpH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,eAAe,CAAU,CAAC;AACpG,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,CAAU,CAAC;AAChG,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,MAAM,EAAE,EAAE,CAAU,CAAC"}
|
package/dist/sync/sync.d.ts
CHANGED
package/dist/sync/sync.js
CHANGED
@@ -1,88 +1,92 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
1
|
+
import chalk from "chalk";
|
2
|
+
import readline from 'node:readline';
|
3
|
+
import veloAPI from 'velo-sync/dist/velo/velo-api.js';
|
4
|
+
import syncTask from 'velo-sync/dist/tasks/sync-task.js';
|
5
|
+
import { readConfig, saveConfig } from "./helpers.js";
|
6
|
+
import optimist from 'optimist';
|
7
|
+
import migrateFileCache from 'velo-sync/dist/tasks/migrate-files-cache-task.js';
|
8
|
+
import { Effect } from "effect/index";
|
9
|
+
import { Config } from "../config.js";
|
10
|
+
function printUsage() {
|
11
|
+
console.log('Usage: ');
|
12
|
+
console.log('');
|
13
|
+
console.log('Commands:');
|
14
|
+
console.log(' init generates a config file for the import / export / sync process');
|
15
|
+
console.log(' is-alive tests the config and the connection to the site');
|
16
|
+
console.log(' sync runs the sync process');
|
17
|
+
console.log(' import runs an import process');
|
18
|
+
console.log(' migrate migrate existing nedb cache to sqlite cache (.upload-cache.db => .upload-cache.sqlite.db)');
|
19
|
+
}
|
20
|
+
function syncOrImportTask(importOnly) {
|
21
|
+
let argv = optimist
|
22
|
+
.usage(`Usage: $0 ${importOnly ? 'import' : 'sync'} -f <scv filename> -c <collection>`)
|
23
|
+
.demand('f')
|
24
|
+
.alias('f', 'filename')
|
25
|
+
.describe('f', 'csv filename to import')
|
26
|
+
.demand('c')
|
27
|
+
.describe('c', 'the name of the collection to import into')
|
28
|
+
.alias('c', 'collection')
|
29
|
+
.demand('s')
|
30
|
+
.describe('s', 'schema file describing the fields of the collection')
|
31
|
+
.alias('s', 'schema')
|
32
|
+
.describe('dry', 'dry-run that does not upload any data or files, and does not remove or update anything on the site')
|
33
|
+
.alias('dry', 'dryrun')
|
34
|
+
.parse(process.argv.slice(3));
|
35
|
+
let filename = argv.filename;
|
36
|
+
let collection = argv.collection;
|
37
|
+
let schema = argv.schema;
|
38
|
+
let dryrun = argv.dryrun;
|
39
|
+
//@ts-ignore
|
40
|
+
syncTask.default(filename, collection, schema, importOnly, dryrun);
|
41
|
+
}
|
42
|
+
export async function sync() {
|
43
|
+
return Effect.gen(function* (_) {
|
44
|
+
const config = yield* Config;
|
45
|
+
});
|
46
|
+
if (moduleSettings.args.includes('-h') || moduleSettings.args.includes('help'))
|
47
|
+
return printUsage();
|
48
|
+
if (moduleSettings.args.includes('init')) {
|
49
|
+
const rl = readline.createInterface({
|
50
|
+
input: process.stdin,
|
51
|
+
output: process.stdout,
|
52
|
+
terminal: true
|
53
|
+
});
|
54
|
+
async function askQuestion(query) {
|
55
|
+
return new Promise((resolve) => rl.question(query, (answer) => resolve(answer)));
|
56
|
+
}
|
57
|
+
console.log(chalk.yellow('hello to velo-sync init'));
|
58
|
+
let siteUrl = await askQuestion(orange('what is the url of the site homepage? '));
|
59
|
+
let secret = await askQuestion(orange('what is the velo-sync secret? '));
|
60
|
+
rl.close();
|
61
|
+
let config = { siteUrl, secret };
|
62
|
+
await saveConfig(config, moduleSettings.veloConfigName);
|
63
|
+
return console.log(chalk.green("🐕" + ' => config saved!'));
|
64
|
+
}
|
65
|
+
if (moduleSettings.args.includes('is-alive')) {
|
66
|
+
try {
|
67
|
+
let config = await readConfig(moduleSettings.veloConfigName);
|
68
|
+
console.log("🐕" + green(` => checking if the API for site ${chalk.greenBright(config.siteUrl)} is alive...`));
|
69
|
+
await veloAPI.isAlive(config);
|
70
|
+
return console.log(chalk.green("🐕" + ` => API of site ${chalk.greenBright(config.siteUrl)} is working and alive!!!`));
|
71
|
+
}
|
72
|
+
catch (e) {
|
73
|
+
if (e instanceof Error) {
|
74
|
+
return console.log((`💩 ${red.underline.bold("=> Failed to check endpoint")} ${orange(e.message)}`));
|
75
|
+
}
|
76
|
+
}
|
77
|
+
}
|
78
|
+
if (moduleSettings.args.includes('sync')) {
|
79
|
+
return syncOrImportTask(false);
|
80
|
+
}
|
81
|
+
if (moduleSettings.args.includes('import')) {
|
82
|
+
return syncOrImportTask(true);
|
83
|
+
}
|
84
|
+
if (moduleSettings.args.includes('export')) {
|
85
|
+
return console.log((`💩 ${red.underline.bold("=> Not implemented")}`));
|
86
|
+
}
|
87
|
+
if (moduleSettings.args.includes('migrate')) {
|
88
|
+
//@ts-ignore
|
89
|
+
migrateFileCache.default();
|
90
|
+
}
|
91
|
+
}
|
88
92
|
//# sourceMappingURL=sync.js.map
|
package/dist/sync/sync.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"sync.js","sourceRoot":"","sources":["../../src/sync/sync.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"sync.js","sourceRoot":"","sources":["../../src/sync/sync.ts"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAC7C,OAAO,QAAQ,MAAM,eAAe,CAAC;AAErC,OAAO,OAAO,MAAM,iCAAiC,CAAC;AACtD,OAAO,QAAQ,MAAM,mCAAmC,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAkB,MAAM,cAAc,CAAC;AACtE,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,gBAAgB,MAAM,kDAAkD,CAAC;AAChF,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,SAAS,UAAU;IACf,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IACxB,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IACzB,OAAO,CAAC,GAAG,CAAC,gFAAgF,CAAC,CAAC;IAC9F,OAAO,CAAC,GAAG,CAAC,iEAAiE,CAAC,CAAC;IAC/E,OAAO,CAAC,GAAG,CAAC,uCAAuC,CAAC,CAAC;IACrD,OAAO,CAAC,GAAG,CAAC,wCAAwC,CAAC,CAAC;IACtD,OAAO,CAAC,GAAG,CAAC,2GAA2G,CAAC,CAAC;AAC7H,CAAC;AAED,SAAS,gBAAgB,CAAC,UAAmB;IACzC,IAAI,IAAI,GAAG,QAAQ;SACd,KAAK,CAAC,aAAa,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,oCAAoC,CAAC;SACtF,MAAM,CAAC,GAAG,CAAC;SACX,KAAK,C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AC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,GAAG,mBAAmB,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,0BAA0B,CAAC,CAAC,CAAC;QAC3H,CAAC;QACD,OAAO,CAAC,EAAE,CAAC;YACP,IAAG,CAAC,YAAY,KAAK,EAAG,CAAC;gBACrB,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,6BAA6B,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC;YACzG,CAAC;QACL,CAAC;IACL,CAAC;IACD,IAAG,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QACtC,OAAO,gBAAgB,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;IAED,IAAG,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;QACxC,OAAO,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAClC,CAAC;IAED,IAAG,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;QACxC,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,oBAAoB,CAAC,EAAE,CAAC,CAAC,CAAC;IAC3E,CAAC;IAED,IAAG,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;QACzC,YAAY;QACZ,gBAAgB,CAAC,OAAO,EAAE,CAAC;IAC/B,CAAC;AAEL,CAAC"}
|
package/dist/tasks/Gulpfile.d.ts
CHANGED
@@ -1,35 +1,4 @@
|
|
1
|
-
import
|
2
|
-
import
|
3
|
-
import
|
4
|
-
|
5
|
-
import publicSettings from '../../settings/public-settings.json';
|
6
|
-
import { ModuleSettings, ProjectSettings } from '../schemas/gulp.js';
|
7
|
-
import { LucyConfig } from '../config.js';
|
8
|
-
export type TaskOptions = {
|
9
|
-
moduleSettings?: ModuleSettings;
|
10
|
-
projectSettings?: ProjectSettings;
|
11
|
-
enableIncrementalBuild: boolean;
|
12
|
-
outputDir: string;
|
13
|
-
sass: ReturnType<typeof gulpSass>;
|
14
|
-
userHomeDir: string;
|
15
|
-
replaceOptions: typeof replaceOptions;
|
16
|
-
backendSettings: typeof backendSettings;
|
17
|
-
masterSettings: typeof masterSettings;
|
18
|
-
pageSettings: typeof pageSettings;
|
19
|
-
publicSettings: typeof publicSettings;
|
20
|
-
modulesSourcePaths: string[];
|
21
|
-
cwd: string;
|
22
|
-
isWatching?: boolean;
|
23
|
-
};
|
24
|
-
export interface File {
|
25
|
-
path: string;
|
26
|
-
dirname: string;
|
27
|
-
}
|
28
|
-
declare const replaceOptions: {
|
29
|
-
logs: {
|
30
|
-
enabled: boolean;
|
31
|
-
};
|
32
|
-
};
|
33
|
-
export declare const taskOptions: TaskOptions;
|
34
|
-
export declare function runTask(config: LucyConfig): Promise<void>;
|
35
|
-
export {};
|
1
|
+
import { Effect } from 'effect/index';
|
2
|
+
import { Config } from '../config.js';
|
3
|
+
import { AppError } from '../error.js';
|
4
|
+
export declare const task_runGulp: Effect.Effect<void, AppError, Config>;
|
package/dist/tasks/Gulpfile.js
CHANGED
@@ -1,9 +1,7 @@
|
|
1
1
|
import gulp from 'gulp';
|
2
2
|
import gulpSass from 'gulp-sass';
|
3
3
|
import shell from 'gulp-shell';
|
4
|
-
import * as os from 'os';
|
5
4
|
import * as dartSass from 'sass';
|
6
|
-
import { join } from "path";
|
7
5
|
import backendSettings from '../../settings/backend-settings.json' with { type: "json" };
|
8
6
|
;
|
9
7
|
import masterSettings from '../../settings/master-settings.json' with { type: "json" };
|
@@ -25,111 +23,90 @@ import { setProdConfig } from './gulp/pipeline.js';
|
|
25
23
|
import { watchAll } from './gulp/watchers.js';
|
26
24
|
import { getModulesSourcePaths } from './gulp/helpers.js';
|
27
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';
|
28
29
|
const sass = gulpSass(dartSass);
|
29
|
-
const
|
30
|
-
const
|
31
|
-
const
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
backendSettings,
|
44
|
-
masterSettings,
|
45
|
-
replaceOptions,
|
46
|
-
cwd: process.cwd(),
|
47
|
-
// modulesSync: getModulesSync(),
|
48
|
-
modulesSourcePaths: [],
|
49
|
-
};
|
50
|
-
const watchTaskOptions = { ...taskOptions, isWatching: true };
|
51
|
-
gulp.task('check-ts', gulp.parallel(checkTs(taskOptions)));
|
52
|
-
gulp.task('scss', gulp.parallel(compileScss(taskOptions)));
|
53
|
-
gulp.task('build-backend', gulp.parallel(buildBackend(taskOptions), buildBackendJSW(taskOptions)));
|
54
|
-
gulp.task('build-public', gulp.parallel(buildPublic(taskOptions)));
|
55
|
-
gulp.task('preview-templates', gulp.parallel(previewTemplates(taskOptions)));
|
56
|
-
gulp.task('copy-files', gulp.parallel(copyFiles(taskOptions)));
|
57
|
-
gulp.task('test', function () {
|
58
|
-
return shell.task(['yarn test'], { ignoreErrors: true })().then(() => {
|
59
|
-
logger.success("Tests completed successfully.");
|
60
|
-
}).catch(err => {
|
61
|
-
logger.error("Error in test task!");
|
62
|
-
});
|
63
|
-
});
|
64
|
-
gulp.task('test-ci', function () {
|
65
|
-
return shell.task(['yarn test --run'], { ignoreErrors: true })().then(() => {
|
66
|
-
logger.success("Tests completed successfully.");
|
67
|
-
}).catch(err => {
|
68
|
-
logger.error("Error in test task!");
|
69
|
-
});
|
70
|
-
});
|
71
|
-
gulp.task('sync-types', shell.task([
|
72
|
-
'yarn postinstall',
|
73
|
-
]));
|
74
|
-
gulp.task('fix-wixtypes', gulp.parallel(updateWixTypes(taskOptions)));
|
75
|
-
gulp.task('add-wix-types', function (done) {
|
76
|
-
return addTypes(taskOptions, done);
|
77
|
-
});
|
78
|
-
gulp.task('set-production', gulp.parallel(setProdConfig()));
|
79
|
-
gulp.task('start-wix', shell.task([
|
80
|
-
'yarn wix:dev',
|
81
|
-
]));
|
82
|
-
gulp.task('gen-docs', shell.task([
|
83
|
-
'yarn docs',
|
84
|
-
]));
|
85
|
-
gulp.task('fix-wix', gulp.series(cleanWix(), 'sync-types', 'fix-wixtypes', 'add-wix-types'));
|
86
|
-
gulp.task('build', gulp.parallel('build-backend', 'build-public', 'preview-templates', buildPages(taskOptions), compileScss(taskOptions), 'copy-files'));
|
87
|
-
gulp.task('build-pipeline', gulp.series(cleanSrc(taskOptions), 'set-production', 'check-ts', 'fix-wixtypes', 'add-wix-types', 'test-ci', 'build'));
|
88
|
-
gulp.task('build-prod', gulp.series((done) => checkPages(true, false).then(() => done(), (err) => done(err)), cleanSrc(taskOptions), 'set-production', 'fix-wix', 'check-ts', 'test-ci', 'build-backend', 'build-public', buildPages(taskOptions), 'copy-files', compileScss(taskOptions)));
|
89
|
-
gulp.task('start-dev-env', gulp.parallel(watchAll(watchTaskOptions), 'test',
|
90
|
-
// 'start-wix',
|
91
|
-
'check-ts', (done) => checkPages(false, taskOptions.moduleSettings?.force ?? false).then(() => done(), (err) => done(err))));
|
92
|
-
gulp.task('dev', gulp.series(cleanSrc(taskOptions), 'fix-wix', 'build', 'start-dev-env'));
|
93
|
-
async function gulpTaskRunner(task) {
|
94
|
-
return new Promise(function (resolve, reject) {
|
95
|
-
gulp.series(task, (done) => {
|
96
|
-
resolve(true);
|
97
|
-
done();
|
98
|
-
})(function (err) {
|
99
|
-
if (err) {
|
100
|
-
logger.error("Error starting tasks:", err);
|
101
|
-
reject(err);
|
30
|
+
export const task_runGulp = Effect.gen(function* (_) {
|
31
|
+
const config = (yield* Config).config;
|
32
|
+
const task = config.action.tasksName || "dev";
|
33
|
+
const taskOptions = {
|
34
|
+
enableIncrementalBuild: config.action.tasksName === 'dev' ? true : false,
|
35
|
+
outputDir: './src',
|
36
|
+
sass,
|
37
|
+
pageSettings,
|
38
|
+
publicSettings,
|
39
|
+
backendSettings,
|
40
|
+
masterSettings,
|
41
|
+
replaceOptions: {
|
42
|
+
logs: {
|
43
|
+
enabled: false
|
102
44
|
}
|
45
|
+
},
|
46
|
+
cwd: process.cwd(),
|
47
|
+
modulesSourcePaths: yield* getModulesSourcePaths,
|
48
|
+
isWatching: config.action.tasksName === 'dev' ? true : false
|
49
|
+
};
|
50
|
+
logger.action(`Running task: ${task}`);
|
51
|
+
gulp.task('check-ts', gulp.parallel(checkTs(taskOptions)));
|
52
|
+
gulp.task('scss', gulp.parallel(compileScss(taskOptions)));
|
53
|
+
gulp.task('build-backend', gulp.parallel(buildBackend(taskOptions), buildBackendJSW(taskOptions)));
|
54
|
+
gulp.task('build-public', gulp.parallel(buildPublic(taskOptions)));
|
55
|
+
gulp.task('preview-templates', gulp.parallel(previewTemplates(taskOptions)));
|
56
|
+
gulp.task('copy-files', gulp.parallel(copyFiles(taskOptions)));
|
57
|
+
gulp.task('test', function () {
|
58
|
+
return shell.task(['yarn test'], { ignoreErrors: true })().then(() => {
|
59
|
+
logger.success("Tests completed successfully.");
|
60
|
+
}).catch(err => {
|
61
|
+
logger.error("Error in test task!");
|
103
62
|
});
|
104
63
|
});
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
64
|
+
gulp.task('test-ci', function () {
|
65
|
+
return shell.task(['yarn test --run'], { ignoreErrors: true })().then(() => {
|
66
|
+
logger.success("Tests completed successfully.");
|
67
|
+
}).catch(err => {
|
68
|
+
logger.error("Error in test task!");
|
69
|
+
});
|
70
|
+
});
|
71
|
+
gulp.task('sync-types', shell.task([
|
72
|
+
'yarn postinstall',
|
73
|
+
]));
|
74
|
+
gulp.task('fix-wix-types', gulp.parallel(updateWixTypes(taskOptions)));
|
75
|
+
gulp.task('add-wix-types', function (done) {
|
76
|
+
return addTypes(taskOptions, done);
|
77
|
+
});
|
78
|
+
gulp.task('set-production', gulp.parallel(setProdConfig()));
|
79
|
+
gulp.task('start-wix', shell.task([
|
80
|
+
'yarn wix:dev',
|
81
|
+
]));
|
82
|
+
gulp.task('gen-docs', shell.task([
|
83
|
+
'yarn docs',
|
84
|
+
]));
|
85
|
+
gulp.task('fix-wix', gulp.series(cleanWix(), 'sync-types', 'fix-wix-types', 'add-wix-types'));
|
86
|
+
gulp.task('build', gulp.parallel('build-backend', 'build-public', 'preview-templates', buildPages(taskOptions), compileScss(taskOptions), 'copy-files'));
|
87
|
+
gulp.task('build-pipeline', gulp.series(cleanSrc(taskOptions), 'set-production', 'check-ts', 'fix-wix-types', 'add-wix-types', 'test-ci', 'build'));
|
88
|
+
gulp.task('build-prod', gulp.series((done) => checkPages(true, false).then(() => done(), (err) => done(err)), cleanSrc(taskOptions), 'set-production', 'fix-wix', 'check-ts', 'test-ci', 'build-backend', 'build-public', buildPages(taskOptions), 'copy-files', compileScss(taskOptions)));
|
89
|
+
gulp.task('start-dev-env', gulp.parallel(watchAll(taskOptions), 'test', 'start-wix', 'check-ts', (done) => checkPages(false, config.force).then(() => done(), (err) => done(err))));
|
90
|
+
gulp.task('dev', gulp.series(cleanSrc(taskOptions), 'fix-wix', 'build', 'start-dev-env'));
|
91
|
+
yield* Effect.tryPromise({
|
92
|
+
try: () => {
|
93
|
+
return new Promise(function (resolve, reject) {
|
94
|
+
gulp.series(task, (done) => {
|
95
|
+
resolve(true);
|
96
|
+
done();
|
97
|
+
})(function (err) {
|
98
|
+
if (err) {
|
99
|
+
logger.error("Error starting tasks:", err);
|
100
|
+
reject(err);
|
101
|
+
}
|
102
|
+
});
|
103
|
+
});
|
104
|
+
},
|
105
|
+
catch: (e) => {
|
106
|
+
logger.error("Error starting tasks:", e);
|
107
|
+
return new AppError({ message: 'Error starting tasks', cause: e });
|
108
|
+
}
|
109
|
+
});
|
133
110
|
logger.report("Task completed successfully:", task);
|
134
|
-
}
|
111
|
+
});
|
135
112
|
//# sourceMappingURL=Gulpfile.js.map
|