@atscript/typescript 0.1.53 → 0.1.54
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/cli.cjs +4 -0
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{json-schema-D_wrIxzk.mjs → json-schema-Bq1dwNoo.mjs} +4 -0
- package/dist/{json-schema-Zi4TJzJJ.cjs → json-schema-CeDOlb_F.cjs} +4 -0
- package/dist/{plugin-PADgal82.mjs → plugin-Bmibxc6X.mjs} +1 -1
- package/dist/{plugin-C90RBCnx.cjs → plugin-nPmWdkR5.cjs} +1 -1
- package/dist/test-utils.cjs +2 -2
- package/dist/test-utils.mjs +2 -2
- package/dist/utils.cjs +1 -1
- package/dist/utils.mjs +1 -1
- package/package.json +4 -4
package/dist/cli.cjs
CHANGED
|
@@ -1012,6 +1012,10 @@ else {
|
|
|
1012
1012
|
this.error(`Expected string (decimal), got ${typeOfValue}`);
|
|
1013
1013
|
return false;
|
|
1014
1014
|
}
|
|
1015
|
+
if (!/^[+-]?\d+(\.\d+)?$/.test(value)) {
|
|
1016
|
+
this.error(`Invalid decimal format: ${JSON.stringify(value)}`);
|
|
1017
|
+
return false;
|
|
1018
|
+
}
|
|
1015
1019
|
return true;
|
|
1016
1020
|
}
|
|
1017
1021
|
default: throw new Error(`Unknown type "${def.type.designType}"`);
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
const require_plugin = require('./plugin-
|
|
3
|
-
require('./json-schema-
|
|
2
|
+
const require_plugin = require('./plugin-nPmWdkR5.cjs');
|
|
3
|
+
require('./json-schema-CeDOlb_F.cjs');
|
|
4
4
|
|
|
5
5
|
exports.default = require_plugin.tsPlugin
|
|
6
6
|
exports.tsPlugin = require_plugin.tsPlugin
|
package/dist/index.mjs
CHANGED
|
@@ -336,6 +336,10 @@ else {
|
|
|
336
336
|
this.error(`Expected string (decimal), got ${typeOfValue}`);
|
|
337
337
|
return false;
|
|
338
338
|
}
|
|
339
|
+
if (!/^[+-]?\d+(\.\d+)?$/.test(value)) {
|
|
340
|
+
this.error(`Invalid decimal format: ${JSON.stringify(value)}`);
|
|
341
|
+
return false;
|
|
342
|
+
}
|
|
339
343
|
return true;
|
|
340
344
|
}
|
|
341
345
|
default: throw new Error(`Unknown type "${def.type.designType}"`);
|
|
@@ -337,6 +337,10 @@ else {
|
|
|
337
337
|
this.error(`Expected string (decimal), got ${typeOfValue}`);
|
|
338
338
|
return false;
|
|
339
339
|
}
|
|
340
|
+
if (!/^[+-]?\d+(\.\d+)?$/.test(value)) {
|
|
341
|
+
this.error(`Invalid decimal format: ${JSON.stringify(value)}`);
|
|
342
|
+
return false;
|
|
343
|
+
}
|
|
340
344
|
return true;
|
|
341
345
|
}
|
|
342
346
|
default: throw new Error(`Unknown type "${def.type.designType}"`);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { buildJsonSchema, defineAnnotatedType } from "./json-schema-
|
|
1
|
+
import { buildJsonSchema, defineAnnotatedType } from "./json-schema-Bq1dwNoo.mjs";
|
|
2
2
|
import path from "path";
|
|
3
3
|
import { DEFAULT_FORMAT, flattenInterfaceNode, getRelPath, hasNavPropAnnotation, isArray, isBareId, isConst, isGroup, isInterface, isPrimitive, isProp, isQueryLogical, isRef, isStructure } from "@atscript/core";
|
|
4
4
|
|
|
@@ -22,7 +22,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
22
22
|
}) : target, mod));
|
|
23
23
|
|
|
24
24
|
//#endregion
|
|
25
|
-
const require_json_schema = require('./json-schema-
|
|
25
|
+
const require_json_schema = require('./json-schema-CeDOlb_F.cjs');
|
|
26
26
|
const path = __toESM(require("path"));
|
|
27
27
|
const __atscript_core = __toESM(require("@atscript/core"));
|
|
28
28
|
|
package/dist/test-utils.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const require_plugin = require('./plugin-
|
|
3
|
-
require('./json-schema-
|
|
2
|
+
const require_plugin = require('./plugin-nPmWdkR5.cjs');
|
|
3
|
+
require('./json-schema-CeDOlb_F.cjs');
|
|
4
4
|
const path = require_plugin.__toESM(require("path"));
|
|
5
5
|
const __atscript_core = require_plugin.__toESM(require("@atscript/core"));
|
|
6
6
|
const fs = require_plugin.__toESM(require("fs"));
|
package/dist/test-utils.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { tsPlugin } from "./plugin-
|
|
2
|
-
import "./json-schema-
|
|
1
|
+
import { tsPlugin } from "./plugin-Bmibxc6X.mjs";
|
|
2
|
+
import "./json-schema-Bq1dwNoo.mjs";
|
|
3
3
|
import path from "path";
|
|
4
4
|
import { build } from "@atscript/core";
|
|
5
5
|
import { writeFileSync } from "fs";
|
package/dist/utils.cjs
CHANGED
package/dist/utils.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Validator, ValidatorError, annotate, buildJsonSchema, cloneRefProp, createAnnotatedTypeNode, defineAnnotatedType, detectDiscriminator, forAnnotatedType, fromJsonSchema, isAnnotatedType, isAnnotatedTypeOfPrimitive, isPhantomType, mergeJsonSchemas } from "./json-schema-
|
|
1
|
+
import { Validator, ValidatorError, annotate, buildJsonSchema, cloneRefProp, createAnnotatedTypeNode, defineAnnotatedType, detectDiscriminator, forAnnotatedType, fromJsonSchema, isAnnotatedType, isAnnotatedTypeOfPrimitive, isPhantomType, mergeJsonSchemas } from "./json-schema-Bq1dwNoo.mjs";
|
|
2
2
|
|
|
3
3
|
//#region packages/typescript/src/runtime/default-value.ts
|
|
4
4
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atscript/typescript",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.54",
|
|
4
4
|
"description": "Atscript: typescript-gen support.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"annotations",
|
|
@@ -67,13 +67,13 @@
|
|
|
67
67
|
"moost": "^0.6.9"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
|
-
"@atscript/db": "^0.1.
|
|
70
|
+
"@atscript/db": "^0.1.74",
|
|
71
71
|
"@uniqu/core": "^0.1.6",
|
|
72
72
|
"vitest": "3.2.4"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
|
-
"@atscript/db": "^0.1.
|
|
76
|
-
"@atscript/core": "^0.1.
|
|
75
|
+
"@atscript/db": "^0.1.74",
|
|
76
|
+
"@atscript/core": "^0.1.54"
|
|
77
77
|
},
|
|
78
78
|
"peerDependenciesMeta": {
|
|
79
79
|
"@atscript/db": {
|