@embeddable.com/sdk-core 3.12.0-next.0 → 3.12.0-next.1
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/lib/index.esm.js +10 -14
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +10 -14
- package/lib/index.js.map +1 -1
- package/lib/validate.d.ts +1 -1
- package/package.json +1 -1
- package/src/dev.ts +2 -1
- package/src/logger.ts +2 -6
- package/src/login.ts +0 -1
- package/src/push.ts +1 -0
- package/src/validate.ts +4 -10
package/lib/validate.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: (ctx: any
|
|
1
|
+
declare const _default: (ctx: any) => Promise<boolean>;
|
|
2
2
|
export default _default;
|
|
3
3
|
export declare function dataModelsValidation(filesList: [string, string][]): Promise<string[]>;
|
|
4
4
|
export declare function securityContextValidation(filesList: [string, string][]): Promise<string[]>;
|
package/package.json
CHANGED
package/src/dev.ts
CHANGED
|
@@ -215,6 +215,7 @@ export default async () => {
|
|
|
215
215
|
});
|
|
216
216
|
} catch (error: any) {
|
|
217
217
|
await logError({ command: "dev", breadcrumbs, error });
|
|
218
|
+
console.log(error);
|
|
218
219
|
process.exit(1);
|
|
219
220
|
}
|
|
220
221
|
};
|
|
@@ -309,7 +310,7 @@ const globalCssWatcher = (ctx: any): FSWatcher => {
|
|
|
309
310
|
|
|
310
311
|
const sendDataModelsAndContextsChanges = async (ctx: any) => {
|
|
311
312
|
sendMessage("dataModelsAndOrSecurityContextUpdateStart");
|
|
312
|
-
const isValid = await validate(ctx
|
|
313
|
+
const isValid = await validate(ctx);
|
|
313
314
|
if (isValid) {
|
|
314
315
|
const token = await getToken();
|
|
315
316
|
const sending = ora(
|
package/src/logger.ts
CHANGED
|
@@ -96,9 +96,7 @@ async function rotateLogIfNeeded() {
|
|
|
96
96
|
function setupGlobalErrorHandlers(command: string) {
|
|
97
97
|
process.on("uncaughtException", async (error) => {
|
|
98
98
|
await logError({ command, breadcrumbs: ["uncaughtException"], error });
|
|
99
|
-
console.error(
|
|
100
|
-
"An uncaught error occurred. Check the log file for details.",
|
|
101
|
-
);
|
|
99
|
+
console.error(error);
|
|
102
100
|
process.exit(1);
|
|
103
101
|
});
|
|
104
102
|
|
|
@@ -108,9 +106,7 @@ function setupGlobalErrorHandlers(command: string) {
|
|
|
108
106
|
breadcrumbs: ["unhandledRejection"],
|
|
109
107
|
error: reason as Error | string,
|
|
110
108
|
});
|
|
111
|
-
console.error(
|
|
112
|
-
"An unhandled rejection occurred. Check the log file for details.",
|
|
113
|
-
);
|
|
109
|
+
console.error(reason);
|
|
114
110
|
process.exit(1);
|
|
115
111
|
});
|
|
116
112
|
}
|
package/src/login.ts
CHANGED
package/src/push.ts
CHANGED
package/src/validate.ts
CHANGED
|
@@ -8,7 +8,7 @@ const CUBE_YAML_FILE_REGEX = /^(.*)\.cube\.ya?ml$/;
|
|
|
8
8
|
const SECURITY_CONTEXT_FILE_REGEX = /^(.*)\.sc\.ya?ml$/;
|
|
9
9
|
const CLIENT_CONTEXT_FILE_REGEX = /^(.*)\.cc\.ya?ml$/;
|
|
10
10
|
|
|
11
|
-
export default async (ctx: any
|
|
11
|
+
export default async (ctx: any) => {
|
|
12
12
|
checkNodeVersion();
|
|
13
13
|
const ora = (await import("ora")).default;
|
|
14
14
|
|
|
@@ -36,9 +36,7 @@ export default async (ctx: any, exitIfInvalid = true) => {
|
|
|
36
36
|
spinnerValidate.info(errorMessage),
|
|
37
37
|
);
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
process.exit(1);
|
|
41
|
-
}
|
|
39
|
+
process.exit(1);
|
|
42
40
|
}
|
|
43
41
|
|
|
44
42
|
spinnerValidate.succeed("Data model validation completed");
|
|
@@ -58,9 +56,7 @@ export default async (ctx: any, exitIfInvalid = true) => {
|
|
|
58
56
|
spinnerValidate.info(errorMessage),
|
|
59
57
|
);
|
|
60
58
|
|
|
61
|
-
|
|
62
|
-
process.exit(1);
|
|
63
|
-
}
|
|
59
|
+
process.exit(1);
|
|
64
60
|
}
|
|
65
61
|
|
|
66
62
|
if (clientContextErrors.length) {
|
|
@@ -70,9 +66,7 @@ export default async (ctx: any, exitIfInvalid = true) => {
|
|
|
70
66
|
spinnerValidate.info(errorMessage),
|
|
71
67
|
);
|
|
72
68
|
|
|
73
|
-
|
|
74
|
-
process.exit(1);
|
|
75
|
-
}
|
|
69
|
+
process.exit(1);
|
|
76
70
|
}
|
|
77
71
|
|
|
78
72
|
return (
|