lucy-cli 0.7.8 → 0.7.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gulp/types.js +4 -4
- package/files/typescript/backend/http-functions.ts +0 -0
- package/files/typescript/backend/permissions.json +17 -0
- package/files/typescript/public/models/frontendApi.model.ts +4 -0
- package/package.json +3 -2
- package/settings/public-settings.json +0 -1
- package/src/gulp/types.ts +5 -4
- /package/files/typescript/backend/{index.ts → data.ts} +0 -0
- /package/files/typescript/{public/index.ts → backend/events.ts} +0 -0
package/dist/gulp/types.js
CHANGED
@@ -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.
|
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__/*"];
|
@@ -38,7 +39,6 @@ export function updateWixTypes(options) {
|
|
38
39
|
publicSettings.compilerOptions.paths['backend/*.web.js'] = [`../../../${name}/backend/*.web.ts`];
|
39
40
|
publicSettings.compilerOptions.paths['backend/*.web'] = [`../../../${name}/backend/*.web.ts`];
|
40
41
|
publicSettings.compilerOptions.paths['public/*'].push(`../../../${name}/public/*`);
|
41
|
-
publicSettings.compilerOptions.paths['backend/*'].push(`../../../${name}/backend/*`);
|
42
42
|
publicSettings.compilerOptions.paths.mocks.push(...[`../../../${name}/__mocks__/*`]);
|
43
43
|
publicSettings.compilerOptions.paths['types/*'].push(`../../../${name}/types/*`);
|
44
44
|
publicSettings.include.push(...[`../../../${name}/public/**/*`, `../../../${name}/backend/**/*.web.js`, `../../../${name}__mocks__/**/*`, `../../../${name}/backend/**/*`]);
|
@@ -110,8 +110,8 @@ export function addTypes(options, done) {
|
|
110
110
|
.pipe(replace('type ', 'export type ', replaceOptions))
|
111
111
|
.pipe(gulp.dest('./.wix/types/wix-code-types/dist/types/beta/common/'));
|
112
112
|
const processCommon = gulp.src(['./.wix/types/wix-code-types/dist/types/common/$w.d.ts'])
|
113
|
-
.pipe(insert.prepend("import {
|
114
|
-
.pipe(replace('namespace \\$w {', 'declare namespace $w{\ntype Api =
|
113
|
+
.pipe(insert.prepend("import { FrontendAPI } from '../../../../../../typescript/public/models/frontendApi.model';\nimport '@total-typescript/ts-reset';\n"))
|
114
|
+
.pipe(replace('namespace \\$w {', 'declare namespace $w{\ntype Api = FrontendAPI;\n', replaceOptions))
|
115
115
|
.pipe(gulp.dest('./.wix/types/wix-code-types/dist/types/common/'));
|
116
116
|
return merge(processPages, processCommon, exportTypesBeta, exportTypes)
|
117
117
|
.on('error', function (e) {
|
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.
|
4
|
+
"version": "0.7.10",
|
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",
|
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.
|
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;
|
@@ -43,7 +45,6 @@ export function updateWixTypes(options: TaskOptions) {
|
|
43
45
|
publicSettings.compilerOptions.paths['backend/*.web.js'] = [`../../../${name}/backend/*.web.ts`] as never;
|
44
46
|
publicSettings.compilerOptions.paths['backend/*.web'] = [`../../../${name}/backend/*.web.ts`] as never;
|
45
47
|
publicSettings.compilerOptions.paths['public/*'].push(`../../../${name}/public/*` as never);
|
46
|
-
publicSettings.compilerOptions.paths['backend/*'].push(`../../../${name}/backend/*` as never);
|
47
48
|
publicSettings.compilerOptions.paths.mocks.push(...[ `../../../${name}/__mocks__/*` as never ]);
|
48
49
|
publicSettings.compilerOptions.paths['types/*'].push(`../../../${name}/types/*` as never);
|
49
50
|
publicSettings.include.push(...[`../../../${name}/public/**/*`, `../../../${name}/backend/**/*.web.js`, `../../../${name}__mocks__/**/*`, `../../../${name}/backend/**/*` ] as never[]);
|
@@ -119,8 +120,8 @@ export function addTypes(options: TaskOptions, done: gulp.TaskFunctionCallback):
|
|
119
120
|
.pipe(gulp.dest('./.wix/types/wix-code-types/dist/types/beta/common/'));
|
120
121
|
|
121
122
|
const processCommon = gulp.src(['./.wix/types/wix-code-types/dist/types/common/$w.d.ts'])
|
122
|
-
.pipe(insert.prepend("import {
|
123
|
-
.pipe(replace('namespace \\$w {', 'declare namespace $w{\ntype Api =
|
123
|
+
.pipe(insert.prepend("import { FrontendAPI } from '../../../../../../typescript/public/models/frontendApi.model';\nimport '@total-typescript/ts-reset';\n"))
|
124
|
+
.pipe(replace('namespace \\$w {', 'declare namespace $w{\ntype Api = FrontendAPI;\n', replaceOptions))
|
124
125
|
.pipe(gulp.dest('./.wix/types/wix-code-types/dist/types/common/'));
|
125
126
|
|
126
127
|
return merge(
|
File without changes
|
File without changes
|