lucy-cli 0.7.7 → 0.7.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -11,7 +11,7 @@ export function updateWixTypes(options) {
11
11
  return () => {
12
12
  const { publicSettings, backendSettings, masterSettings, pageSettings, replaceOptions } = options;
13
13
  let count = 0;
14
- const modules = options.moduleSettings?.settings.modules;
14
+ const modules = Object.assign({}, options.projectSettings?.modules, options.projectSettings?.lucySettings?.modules);
15
15
  let localModules = undefined;
16
16
  if (options.projectSettings?.lucySettings) {
17
17
  localModules = options.projectSettings.lucySettings.modules;
@@ -19,6 +19,7 @@ export function updateWixTypes(options) {
19
19
  // Add module to publicSettings
20
20
  publicSettings.compilerOptions.paths.mocks = ["../../../typescript/__mocks__/*"];
21
21
  publicSettings.compilerOptions.paths['types/*'] = ["../../../typescript/types/*"];
22
+ publicSettings.compilerOptions.paths['public/*'] = ["../../../typescript/public/*.ts"];
22
23
  publicSettings.include = ["../../../typescript/public/**/*", "../../../typescript/__mocks__/**/*", "../../../typescript/backend/**/*"];
23
24
  // Add module to backendSettings
24
25
  backendSettings.compilerOptions.paths.mocks = ["../../../typescript/__mocks__/*"];
@@ -29,6 +30,7 @@ export function updateWixTypes(options) {
29
30
  masterSettings.include = ["../../../typescript/public/**/*", "index.d.ts", "../../../typescript/__mocks__/**/*", "../../../typescript/backend/**/*"];
30
31
  // Add module to pageSettings
31
32
  pageSettings.compilerOptions.paths['types/*'] = ["../../../typescript/types/*"];
33
+ pageSettings.compilerOptions.paths['backend/*'] = ["../../../typescript/backend/*.jsw.ts"];
32
34
  pageSettings.include = ["../../../typescript/public/**/*", "../../../typescript/__mocks__/**/*", "../../../typescript/backend/**/*"];
33
35
  if (modules) {
34
36
  for (const [name] of Object.entries(modules)) {
@@ -37,7 +39,6 @@ export function updateWixTypes(options) {
37
39
  publicSettings.compilerOptions.paths['backend/*.web.js'] = [`../../../${name}/backend/*.web.ts`];
38
40
  publicSettings.compilerOptions.paths['backend/*.web'] = [`../../../${name}/backend/*.web.ts`];
39
41
  publicSettings.compilerOptions.paths['public/*'].push(`../../../${name}/public/*`);
40
- publicSettings.compilerOptions.paths['backend/*'].push(`../../../${name}/backend/*`);
41
42
  publicSettings.compilerOptions.paths.mocks.push(...[`../../../${name}/__mocks__/*`]);
42
43
  publicSettings.compilerOptions.paths['types/*'].push(`../../../${name}/types/*`);
43
44
  publicSettings.include.push(...[`../../../${name}/public/**/*`, `../../../${name}/backend/**/*.web.js`, `../../../${name}__mocks__/**/*`, `../../../${name}/backend/**/*`]);
@@ -58,12 +59,12 @@ export function updateWixTypes(options) {
58
59
  pageSettings.compilerOptions.paths['backend/*.web.js'] = [`../../../${name}/backend/*.web.ts`];
59
60
  pageSettings.compilerOptions.paths['backend/*.web'] = [`../../../${name}/backend/*.web.ts`];
60
61
  pageSettings.compilerOptions.paths['public/*'].push(`../../../${name}/public/*`);
61
- pageSettings.compilerOptions.paths['backend/*'].push(`../../../${name}/backend/*`);
62
+ pageSettings.compilerOptions.paths['backend/*'].push(`../../../${name}/backend/*.jsw.ts`);
62
63
  pageSettings.compilerOptions.paths['types/*'].push(`../../../${name}/types/*`);
63
64
  pageSettings.include.push(...[`../../../${name}/public/**/*`, `../../../${name}/backend/**/*.web.js`, `../../../${name}__mocks__/**/*`, `../../../${name}/backend/**/*`]);
64
65
  }
65
66
  }
66
- return gulp.src(['./.wix/types/*/*.json', '!./.wix/types/wix-code-types/*.json'])
67
+ return gulp.src(['./.wix/types/**/*.json', '!./.wix/types/wix-code-types/*.json'])
67
68
  .pipe(flatmap(function (stream, file) {
68
69
  count++;
69
70
  if (file.dirname.endsWith('public'))
File without changes
@@ -0,0 +1,17 @@
1
+ {
2
+ "web-methods": {
3
+ "*": {
4
+ "*": {
5
+ "siteOwner": {
6
+ "invoke": true
7
+ },
8
+ "siteMember": {
9
+ "invoke": true
10
+ },
11
+ "anonymous": {
12
+ "invoke": true
13
+ }
14
+ }
15
+ }
16
+ }
17
+ }
File without changes
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "lucy-cli",
4
- "version": "0.7.7",
4
+ "version": "0.7.9",
5
5
  "description": "Lucy Framework for WIX Studio Editor",
6
6
  "main": ".dist/index.js",
7
7
  "scripts": {
@@ -16,7 +16,8 @@
16
16
  "keywords": [
17
17
  "Framework",
18
18
  "WIX",
19
- "Studio"
19
+ "Studio",
20
+ "Velo"
20
21
  ],
21
22
  "author": "Gradlon von Känel",
22
23
  "license": "MIT",
@@ -7,7 +7,7 @@
7
7
  "jsx": "react-jsx",
8
8
  "noEmit": false,
9
9
  "noUncheckedIndexedAccess": true,
10
- "lib": ["DOM"],
10
+ "lib": ["DOM", "es2015"],
11
11
  "paths": {
12
12
  "backend/*.web.js": [],
13
13
  "backend/*.web": [],
@@ -11,7 +11,6 @@
11
11
  "backend/*.web.js": [],
12
12
  "backend/*.web": [],
13
13
  "mocks": [],
14
- "backend/*": [],
15
14
  "public/*": [],
16
15
  "types/*": [],
17
16
  "wix-types/*": ["../wix-code-types/dist/types/*"]
package/src/gulp/types.ts CHANGED
@@ -15,7 +15,8 @@ export function updateWixTypes(options: TaskOptions) {
15
15
  const { publicSettings, backendSettings, masterSettings, pageSettings, replaceOptions } = options;
16
16
  let count = 0;
17
17
 
18
- const modules = options.moduleSettings?.settings.modules;
18
+ const modules: Record<string, string> = Object.assign({}, options.projectSettings?.modules, options.projectSettings?.lucySettings?.modules);
19
+
19
20
  let localModules: Record<string, string> | undefined = undefined;
20
21
  if(options.projectSettings?.lucySettings) {
21
22
  localModules = options.projectSettings.lucySettings.modules as unknown as Record<string, string>;
@@ -23,6 +24,7 @@ export function updateWixTypes(options: TaskOptions) {
23
24
  // Add module to publicSettings
24
25
  publicSettings.compilerOptions.paths.mocks = [ "../../../typescript/__mocks__/*" ] as never;
25
26
  publicSettings.compilerOptions.paths['types/*'] = [ "../../../typescript/types/*" ] as never;
27
+ publicSettings.compilerOptions.paths['public/*'] = [ "../../../typescript/public/*.ts" ] as never;
26
28
  publicSettings.include = [ "../../../typescript/public/**/*", "../../../typescript/__mocks__/**/*", "../../../typescript/backend/**/*" ] as never;
27
29
  // Add module to backendSettings
28
30
  backendSettings.compilerOptions.paths.mocks = [ "../../../typescript/__mocks__/*" ] as never;
@@ -33,6 +35,7 @@ export function updateWixTypes(options: TaskOptions) {
33
35
  masterSettings.include = [ "../../../typescript/public/**/*", "index.d.ts", "../../../typescript/__mocks__/**/*", "../../../typescript/backend/**/*" ] as never;
34
36
  // Add module to pageSettings
35
37
  pageSettings.compilerOptions.paths['types/*'] = [ "../../../typescript/types/*" ] as never;
38
+ pageSettings.compilerOptions.paths['backend/*'] = [ "../../../typescript/backend/*.jsw.ts" ] as never;
36
39
  pageSettings.include = [ "../../../typescript/public/**/*", "../../../typescript/__mocks__/**/*", "../../../typescript/backend/**/*" ] as never;
37
40
 
38
41
  if (modules) {
@@ -42,7 +45,6 @@ export function updateWixTypes(options: TaskOptions) {
42
45
  publicSettings.compilerOptions.paths['backend/*.web.js'] = [`../../../${name}/backend/*.web.ts`] as never;
43
46
  publicSettings.compilerOptions.paths['backend/*.web'] = [`../../../${name}/backend/*.web.ts`] as never;
44
47
  publicSettings.compilerOptions.paths['public/*'].push(`../../../${name}/public/*` as never);
45
- publicSettings.compilerOptions.paths['backend/*'].push(`../../../${name}/backend/*` as never);
46
48
  publicSettings.compilerOptions.paths.mocks.push(...[ `../../../${name}/__mocks__/*` as never ]);
47
49
  publicSettings.compilerOptions.paths['types/*'].push(`../../../${name}/types/*` as never);
48
50
  publicSettings.include.push(...[`../../../${name}/public/**/*`, `../../../${name}/backend/**/*.web.js`, `../../../${name}__mocks__/**/*`, `../../../${name}/backend/**/*` ] as never[]);
@@ -63,13 +65,13 @@ export function updateWixTypes(options: TaskOptions) {
63
65
  pageSettings.compilerOptions.paths['backend/*.web.js'] = [`../../../${name}/backend/*.web.ts`] as never;
64
66
  pageSettings.compilerOptions.paths['backend/*.web'] = [`../../../${name}/backend/*.web.ts`] as never;
65
67
  pageSettings.compilerOptions.paths['public/*'].push(`../../../${name}/public/*` as never);
66
- pageSettings.compilerOptions.paths['backend/*'].push(`../../../${name}/backend/*` as never);
68
+ pageSettings.compilerOptions.paths['backend/*'].push(`../../../${name}/backend/*.jsw.ts` as never);
67
69
  pageSettings.compilerOptions.paths['types/*'].push(`../../../${name}/types/*` as never);
68
70
  pageSettings.include.push(...[`../../../${name}/public/**/*`, `../../../${name}/backend/**/*.web.js`, `../../../${name}__mocks__/**/*`, `../../../${name}/backend/**/*` ] as never[]);
69
71
  }
70
72
  }
71
73
 
72
- return gulp.src(['./.wix/types/*/*.json', '!./.wix/types/wix-code-types/*.json'])
74
+ return gulp.src(['./.wix/types/**/*.json', '!./.wix/types/wix-code-types/*.json'])
73
75
  .pipe(flatmap(function(stream: NodeJS.ReadableStream, file: File) {
74
76
  count ++;
75
77
  if (file.dirname.endsWith('public')) return stream.pipe(jeditor(publicSettings)).pipe(jeditor((json: any) => processJson(json)));
File without changes