typia 13.0.0-dev.20260626.1 → 13.0.0-dev.20260703.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/_virtual/_commander.mjs +7 -0
- package/lib/_virtual/_commander.mjs.map +1 -0
- package/lib/_virtual/_commonjsHelpers.mjs +30 -1
- package/lib/_virtual/_commonjsHelpers.mjs.map +1 -1
- package/lib/_virtual/_inquirer.mjs +7 -0
- package/lib/_virtual/_inquirer.mjs.map +1 -0
- package/lib/_virtual/_node_child_process.mjs +7 -0
- package/lib/_virtual/_node_child_process.mjs.map +1 -0
- package/lib/_virtual/_node_fs.mjs +7 -0
- package/lib/_virtual/_node_fs.mjs.map +1 -0
- package/lib/_virtual/_node_module.mjs +7 -0
- package/lib/_virtual/_node_module.mjs.map +1 -0
- package/lib/_virtual/_node_path.mjs +7 -0
- package/lib/_virtual/_node_path.mjs.map +1 -0
- package/lib/_virtual/_randexp.mjs +7 -0
- package/lib/_virtual/_randexp.mjs.map +1 -0
- package/lib/_virtual/_tinyglobby.mjs +7 -0
- package/lib/_virtual/_tinyglobby.mjs.map +1 -0
- package/lib/executable/TypiaGenerateWizard2.mjs +8 -8
- package/lib/executable/generate/ttsc2.mjs +5 -5
- package/lib/executable/generate/ttsc2.mjs.map +1 -1
- package/lib/internal/_randomArray.d.ts +2 -1
- package/lib/internal/_randomArray.js +8 -2
- package/lib/internal/_randomArray.js.map +1 -1
- package/lib/internal/_randomArray2.mjs +8 -2
- package/lib/internal/_randomArray2.mjs.map +1 -1
- package/lib/internal/_randomPattern2.mjs +1 -1
- package/lib/internal/_randomString.d.ts +1 -1
- package/lib/internal/_randomString.js +6 -3
- package/lib/internal/_randomString.js.map +1 -1
- package/lib/internal/_randomString2.mjs +6 -3
- package/lib/internal/_randomString2.mjs.map +1 -1
- package/lib/transform.d.ts +2 -1
- package/lib/transform.js +2 -1
- package/lib/transform.js.map +1 -1
- package/lib/transform.mjs +1 -1
- package/lib/transform2.mjs +7 -6
- package/lib/transform2.mjs.map +1 -1
- package/native/cmd/ttsc-typia/random_recursive_min_items_diagnostic_test.go +234 -0
- package/native/cmd/ttsc-typia/random_unsatisfiable_recursive_diagnostic_test.go +146 -0
- package/native/core/factories/internal/metadata/MetadataHelper.go +47 -0
- package/native/core/factories/internal/metadata/emplace_metadata_alias.go +7 -0
- package/native/core/factories/internal/metadata/emplace_metadata_object.go +17 -3
- package/native/core/factories/internal/metadata/iterate_metadata_collection.go +14 -13
- package/native/core/programmers/RandomProgrammer.go +150 -15
- package/native/core/programmers/helpers/RandomJoiner.go +582 -6
- package/native/core/programmers/helpers/random_joiner_recursive_array_guard_test.go +166 -0
- package/native/core/programmers/llm/LlmApplicationProgrammer.go +15 -4
- package/native/core/programmers/random_programmer_min_items_tag_test.go +44 -0
- package/package.json +4 -4
- package/src/internal/_randomArray.ts +34 -21
- package/src/internal/_randomString.ts +30 -24
- package/src/transform.ts +21 -19
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_commander.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -2,5 +2,34 @@ function getDefaultExportFromCjs (x) {
|
|
|
2
2
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
function getAugmentedNamespace(n) {
|
|
6
|
+
if (Object.prototype.hasOwnProperty.call(n, '__esModule')) return n;
|
|
7
|
+
var f = n.default;
|
|
8
|
+
if (typeof f == "function") {
|
|
9
|
+
var a = function a () {
|
|
10
|
+
var isInstance = false;
|
|
11
|
+
try {
|
|
12
|
+
isInstance = this instanceof a;
|
|
13
|
+
} catch {}
|
|
14
|
+
if (isInstance) {
|
|
15
|
+
return Reflect.construct(f, arguments, this.constructor);
|
|
16
|
+
}
|
|
17
|
+
return f.apply(this, arguments);
|
|
18
|
+
};
|
|
19
|
+
a.prototype = f.prototype;
|
|
20
|
+
} else a = {};
|
|
21
|
+
Object.defineProperty(a, '__esModule', {value: true});
|
|
22
|
+
Object.keys(n).forEach(function (k) {
|
|
23
|
+
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
24
|
+
Object.defineProperty(a, k, d.get ? d : {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return n[k];
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
return a;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { getAugmentedNamespace, getDefaultExportFromCjs };
|
|
6
35
|
//# sourceMappingURL=_commonjsHelpers.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_commonjsHelpers.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"_commonjsHelpers.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_inquirer.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as node_child_process from 'node:child_process';
|
|
2
|
+
import { getAugmentedNamespace } from './_commonjsHelpers.mjs';
|
|
3
|
+
|
|
4
|
+
var require$$0 = /*@__PURE__*/getAugmentedNamespace(node_child_process);
|
|
5
|
+
|
|
6
|
+
export { require$$0 as default };
|
|
7
|
+
//# sourceMappingURL=_node_child_process.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_node_child_process.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_node_fs.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_node_module.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_node_path.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_randexp.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_tinyglobby.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __exports as TypiaGenerateWizard$2 } from '../_virtual/TypiaGenerateWizard.mjs';
|
|
2
|
-
import require$$0 from '
|
|
3
|
-
import require$$1 from '
|
|
4
|
-
import require$$2 from '
|
|
5
|
-
import require$$
|
|
6
|
-
import require$$
|
|
7
|
-
import require$$5 from '
|
|
2
|
+
import require$$0 from '../_virtual/_commander.mjs';
|
|
3
|
+
import require$$1 from '../_virtual/_node_fs.mjs';
|
|
4
|
+
import require$$2 from '../_virtual/_inquirer.mjs';
|
|
5
|
+
import require$$0$1 from '../_virtual/_node_module.mjs';
|
|
6
|
+
import require$$1$1 from '../_virtual/_node_path.mjs';
|
|
7
|
+
import require$$5 from '../_virtual/_tinyglobby.mjs';
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
// -- Shims --
|
|
@@ -46,8 +46,8 @@ var TypiaGenerateWizard_2 = TypiaGenerateWizard$2.TypiaGenerateWizard = void 0;
|
|
|
46
46
|
const commander_1 = require$$0;
|
|
47
47
|
const fs_1 = __importDefault(require$$1);
|
|
48
48
|
const inquirer_1 = __importDefault(require$$2);
|
|
49
|
-
const module_1 = require$$
|
|
50
|
-
const path_1 = __importDefault(require$$
|
|
49
|
+
const module_1 = require$$0$1;
|
|
50
|
+
const path_1 = __importDefault(require$$1$1);
|
|
51
51
|
const tinyglobby_1 = require$$5;
|
|
52
52
|
var TypiaGenerateWizard;
|
|
53
53
|
(function (TypiaGenerateWizard) {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { __exports as ttsc } from '../../_virtual/ttsc.mjs';
|
|
2
|
-
import require$$0 from '
|
|
3
|
-
import require$$1 from '
|
|
4
|
-
import require$$
|
|
2
|
+
import require$$0 from '../../_virtual/_node_child_process.mjs';
|
|
3
|
+
import require$$1$1 from '../../_virtual/_node_fs.mjs';
|
|
4
|
+
import require$$1 from '../../_virtual/_node_path.mjs';
|
|
5
5
|
|
|
6
6
|
var _a, _b;
|
|
7
7
|
Object.defineProperty(ttsc, "__esModule", { value: true });
|
|
8
8
|
const { spawnSync } = require$$0;
|
|
9
|
-
const fs = require$$1;
|
|
10
|
-
const path = require$$
|
|
9
|
+
const fs = require$$1$1;
|
|
10
|
+
const path = require$$1;
|
|
11
11
|
const packageRoot = path.resolve(path.dirname(path.resolve((_a = process.argv[1]) !== null && _a !== void 0 ? _a : "")), "..", "..", "..");
|
|
12
12
|
const nativeProject = path.resolve(packageRoot, "native");
|
|
13
13
|
const nativeEntrypoint = path.resolve(nativeProject, "cmd", "ttsc-typia", "main.go");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ttsc2.mjs","sources":["ttsc.js"],"sourcesContent":["\"use strict\";\nvar _a, _b;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst { spawnSync } = require(\"node:child_process\");\nconst fs = require(\"node:fs\");\nconst path = require(\"node:path\");\nconst packageRoot = path.resolve(path.dirname(path.resolve((_a = process.argv[1]) !== null && _a !== void 0 ? _a : \"\")), \"..\", \"..\", \"..\");\nconst nativeProject = path.resolve(packageRoot, \"native\");\nconst nativeEntrypoint = path.resolve(nativeProject, \"cmd\", \"ttsc-typia\", \"main.go\");\nconst command = process.platform === \"win32\" ? \"go.exe\" : \"go\";\nconst invocationCwd = process.cwd();\nconst argv = [...process.argv.slice(2)];\nif (process.env.TYPIA_TTSC_TRANSFORM_OUTPUT === \"ts\" &&\n argv[0] === \"transform\" &&\n !argv.some((value) => value === \"--output\" || value.startsWith(\"--output=\"))) {\n argv.push(\"--output=ts\");\n}\nif (argv.length > 0 &&\n needsCwd(argv[0]) &&\n !argv.some((value) => value === \"--cwd\" || value.startsWith(\"--cwd=\"))) {\n argv.push(`--cwd=${invocationCwd}`);\n}\nconst hasSourceEntrypoint = fs.existsSync(nativeEntrypoint);\nif (!hasSourceEntrypoint) {\n process.stderr.write(\"ttsc-typia: backend source is missing. Expected native/cmd/ttsc-typia/main.go inside the typia package.\\n\");\n process.exitCode = 1;\n}\nelse {\n const result = spawnSync(command, [\"run\", \"./cmd/ttsc-typia\", ...argv], {\n cwd: nativeProject,\n env: process.env,\n stdio: \"inherit\",\n windowsHide: true,\n });\n if (result.error) {\n process.stderr.write(`ttsc-typia: failed to launch source backend via ${command}: ${result.error.message}\\n`);\n process.exitCode = 1;\n }\n else {\n process.exitCode = (_b = result.status) !== null && _b !== void 0 ? _b : 1;\n }\n}\nfunction needsCwd(commandName) {\n return (commandName === \"build\" ||\n commandName === \"check\" ||\n commandName === \"transform\" ||\n commandName === \"-p\" ||\n commandName === \"--project\");\n}\n//# sourceMappingURL=ttsc.js.map"],"names":[],"mappings":";;;;;AACA,IAAI,EAAE,EAAE,EAAE;AACV,MAAM,CAAC,cAAc,CAAC,IAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,MAAM,EAAE,SAAS,EAAE,GAAG,UAA6B;AACnD,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"ttsc2.mjs","sources":["ttsc.js"],"sourcesContent":["\"use strict\";\nvar _a, _b;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst { spawnSync } = require(\"node:child_process\");\nconst fs = require(\"node:fs\");\nconst path = require(\"node:path\");\nconst packageRoot = path.resolve(path.dirname(path.resolve((_a = process.argv[1]) !== null && _a !== void 0 ? _a : \"\")), \"..\", \"..\", \"..\");\nconst nativeProject = path.resolve(packageRoot, \"native\");\nconst nativeEntrypoint = path.resolve(nativeProject, \"cmd\", \"ttsc-typia\", \"main.go\");\nconst command = process.platform === \"win32\" ? \"go.exe\" : \"go\";\nconst invocationCwd = process.cwd();\nconst argv = [...process.argv.slice(2)];\nif (process.env.TYPIA_TTSC_TRANSFORM_OUTPUT === \"ts\" &&\n argv[0] === \"transform\" &&\n !argv.some((value) => value === \"--output\" || value.startsWith(\"--output=\"))) {\n argv.push(\"--output=ts\");\n}\nif (argv.length > 0 &&\n needsCwd(argv[0]) &&\n !argv.some((value) => value === \"--cwd\" || value.startsWith(\"--cwd=\"))) {\n argv.push(`--cwd=${invocationCwd}`);\n}\nconst hasSourceEntrypoint = fs.existsSync(nativeEntrypoint);\nif (!hasSourceEntrypoint) {\n process.stderr.write(\"ttsc-typia: backend source is missing. Expected native/cmd/ttsc-typia/main.go inside the typia package.\\n\");\n process.exitCode = 1;\n}\nelse {\n const result = spawnSync(command, [\"run\", \"./cmd/ttsc-typia\", ...argv], {\n cwd: nativeProject,\n env: process.env,\n stdio: \"inherit\",\n windowsHide: true,\n });\n if (result.error) {\n process.stderr.write(`ttsc-typia: failed to launch source backend via ${command}: ${result.error.message}\\n`);\n process.exitCode = 1;\n }\n else {\n process.exitCode = (_b = result.status) !== null && _b !== void 0 ? _b : 1;\n }\n}\nfunction needsCwd(commandName) {\n return (commandName === \"build\" ||\n commandName === \"check\" ||\n commandName === \"transform\" ||\n commandName === \"-p\" ||\n commandName === \"--project\");\n}\n//# sourceMappingURL=ttsc.js.map"],"names":["require$$1","require$$2"],"mappings":";;;;;AACA,IAAI,EAAE,EAAE,EAAE;AACV,MAAM,CAAC,cAAc,CAAC,IAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,MAAM,EAAE,SAAS,EAAE,GAAG,UAA6B;AACnD,MAAM,EAAE,GAAGA,YAAkB;AAC7B,MAAM,IAAI,GAAGC,UAAoB;AACjC,MAAM,WAAW,GAAG,IAAI,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Array: <T>(props: Omit<OpenApi.IJsonSchema.IArray, "items"> & {
|
|
3
3
|
element: (index: number, count: number) => T;
|
|
4
|
+
recursive?: boolean;
|
|
4
5
|
}) => any[];
|
|
@@ -2,12 +2,18 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports._randomArray = void 0;
|
|
4
4
|
const _randomInteger_1 = require("./_randomInteger");
|
|
5
|
+
const DEFAULT_MIN_ITEMS = 1;
|
|
6
|
+
const DEFAULT_RANGE = 5;
|
|
7
|
+
const DEFAULT_RECURSIVE_RANGE = 2;
|
|
5
8
|
const _randomArray = (props) => {
|
|
6
9
|
var _a, _b, _c;
|
|
10
|
+
const defaultMinimum = props.recursive === true ? 0 : DEFAULT_MIN_ITEMS;
|
|
11
|
+
const minimum = (_a = props.minItems) !== null && _a !== void 0 ? _a : Math.min((_b = props.maxItems) !== null && _b !== void 0 ? _b : defaultMinimum, defaultMinimum);
|
|
7
12
|
const count = (0, _randomInteger_1._randomInteger)({
|
|
8
13
|
type: "integer",
|
|
9
|
-
minimum
|
|
10
|
-
maximum: (
|
|
14
|
+
minimum,
|
|
15
|
+
maximum: (_c = props.maxItems) !== null && _c !== void 0 ? _c : minimum +
|
|
16
|
+
(props.recursive === true ? DEFAULT_RECURSIVE_RANGE : DEFAULT_RANGE),
|
|
11
17
|
});
|
|
12
18
|
if (props.uniqueItems !== true)
|
|
13
19
|
return new Array(count).fill(null).map((_, i) => props.element(i, count));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_randomArray.js","sourceRoot":"","sources":["../../src/internal/_randomArray.ts"],"names":[],"mappings":";;;AAEA,qDAAkD;
|
|
1
|
+
{"version":3,"file":"_randomArray.js","sourceRoot":"","sources":["../../src/internal/_randomArray.ts"],"names":[],"mappings":";;;AAEA,qDAAkD;AAElD,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAC5B,MAAM,aAAa,GAAG,CAAC,CAAC;AACxB,MAAM,uBAAuB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Array_2 = _randomArray$1._randomArray = void 0;
|
|
7
7
|
const _randomInteger_1 = _randomInteger;
|
|
8
|
+
const DEFAULT_MIN_ITEMS = 1;
|
|
9
|
+
const DEFAULT_RANGE = 5;
|
|
10
|
+
const DEFAULT_RECURSIVE_RANGE = 2;
|
|
8
11
|
const _randomArray = (props) => {
|
|
9
12
|
var _a, _b, _c;
|
|
13
|
+
const defaultMinimum = props.recursive === true ? 0 : DEFAULT_MIN_ITEMS;
|
|
14
|
+
const minimum = (_a = props.minItems) !== null && _a !== void 0 ? _a : Math.min((_b = props.maxItems) !== null && _b !== void 0 ? _b : defaultMinimum, defaultMinimum);
|
|
10
15
|
const count = (0, _randomInteger_1._randomInteger)({
|
|
11
16
|
type: "integer",
|
|
12
|
-
minimum
|
|
13
|
-
maximum: (
|
|
17
|
+
minimum,
|
|
18
|
+
maximum: (_c = props.maxItems) !== null && _c !== void 0 ? _c : minimum +
|
|
19
|
+
(props.recursive === true ? DEFAULT_RECURSIVE_RANGE : DEFAULT_RANGE),
|
|
14
20
|
});
|
|
15
21
|
if (props.uniqueItems !== true)
|
|
16
22
|
return new Array(count).fill(null).map((_, i) => props.element(i, count));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_randomArray2.mjs","sources":["_randomArray.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._randomArray = void 0;\nconst _randomInteger_1 = require(\"./_randomInteger\");\nconst _randomArray = (props) => {\n var _a, _b, _c;\n const
|
|
1
|
+
{"version":3,"file":"_randomArray2.mjs","sources":["_randomArray.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._randomArray = void 0;\nconst _randomInteger_1 = require(\"./_randomInteger\");\nconst DEFAULT_MIN_ITEMS = 1;\nconst DEFAULT_RANGE = 5;\nconst DEFAULT_RECURSIVE_RANGE = 2;\nconst _randomArray = (props) => {\n var _a, _b, _c;\n const defaultMinimum = props.recursive === true ? 0 : DEFAULT_MIN_ITEMS;\n const minimum = (_a = props.minItems) !== null && _a !== void 0 ? _a : Math.min((_b = props.maxItems) !== null && _b !== void 0 ? _b : defaultMinimum, defaultMinimum);\n const count = (0, _randomInteger_1._randomInteger)({\n type: \"integer\",\n minimum,\n maximum: (_c = props.maxItems) !== null && _c !== void 0 ? _c : minimum +\n (props.recursive === true ? DEFAULT_RECURSIVE_RANGE : DEFAULT_RANGE),\n });\n if (props.uniqueItems !== true)\n return new Array(count).fill(null).map((_, i) => props.element(i, count));\n const elements = new Set();\n while (elements.size !== count)\n elements.add(props.element(elements.size, count));\n return Array.from(elements);\n};\nexports._randomArray = _randomArray;\n//# sourceMappingURL=_randomArray.js.map"],"names":["_randomArray_1","require$$0"],"mappings":";;;;AACA,MAAM,CAAC,cAAc,CAACA,cAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,IAAA,cAAA,GAAAA,cAAA,CAAA,YAAoB,GAAG;AACvB,MAAM,gBAAgB,GAAGC,cAA2B;AACpD,MAAM,iBAAiB,GAAG,CAAC;AAC3B,MAAM,aAAa,GAAG,CAAC;AACvB,MAAM,uBAAuB,GAAG,CAAC;AACjC,MAAM,YAAY,GAAG,CAAC,KAAK,KAAK;AAChC,IAAI,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE;AAClB,IAAI,MAAM,cAAc,GAAG,KAAK,CAAC,SAAS,KAAK,IAAI,GAAG,CAAC,GAAG,iBAAiB;AAC3E,IAAI,MAAM,OAAO,GAAG,CAAC,EAAE,GAAG,KAAK,CAAC,QAAQ,MAAM,IAAI,IAAI,EAAE,KAAK,MAAM,GAAG,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,KAAK,CAAC,QAAQ,MAAM,IAAI,IAAI,EAAE,KAAK,MAAM,GAAG,EAAE,GAAG,cAAc,EAAE,cAAc,CAAC;AAC1K,IAAI,MAAM,KAAK,GAAG,IAAI,gBAAgB,CAAC,cAAc,EAAE;AACvD,QAAQ,IAAI,EAAE,SAAS;AACvB,QAAQ,OAAO;AACf,QAAQ,OAAO,EAAE,CAAC,EAAE,GAAG,KAAK,CAAC,QAAQ,MAAM,IAAI,IAAI,EAAE,KAAK,MAAM,GAAG,EAAE,GAAG,OAAO;AAC/E,aAAa,KAAK,CAAC,SAAS,KAAK,IAAI,GAAG,uBAAuB,GAAG,aAAa,CAAC;AAChF,KAAK,CAAC;AACN,IAAI,IAAI,KAAK,CAAC,WAAW,KAAK,IAAI;AAClC,QAAQ,OAAO,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,KAAK,CAAC,OAAO,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;AACjF,IAAI,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAE;AAC9B,IAAI,OAAO,QAAQ,CAAC,IAAI,KAAK,KAAK;AAClC,QAAQ,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AACzD,IAAI,OAAO,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC;AAC/B,CAAC;AACD,cAAA,GAAAD,cAAA,CAAA,YAAoB,GAAG,YAAY;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __exports as _randomPattern$1 } from '../_virtual/_randomPattern.mjs';
|
|
2
|
-
import require$$0 from '
|
|
2
|
+
import require$$0 from '../_virtual/_randexp.mjs';
|
|
3
3
|
|
|
4
4
|
var __importDefault = (_randomPattern$1 && _randomPattern$1.__importDefault) || function (mod) {
|
|
5
5
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { OpenApi } from "@typia/interface";
|
|
1
|
+
import type { OpenApi } from "@typia/interface";
|
|
2
2
|
export declare const _randomString: (props: OpenApi.IJsonSchema.IString) => string;
|
|
@@ -2,12 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports._randomString = void 0;
|
|
4
4
|
const _randomInteger_1 = require("./_randomInteger");
|
|
5
|
+
const DEFAULT_MIN_LENGTH = 5;
|
|
6
|
+
const DEFAULT_RANGE = 5;
|
|
5
7
|
const _randomString = (props) => {
|
|
6
|
-
var _a;
|
|
8
|
+
var _a, _b, _c;
|
|
9
|
+
const minimum = (_a = props.minLength) !== null && _a !== void 0 ? _a : Math.min((_b = props.maxLength) !== null && _b !== void 0 ? _b : DEFAULT_MIN_LENGTH, DEFAULT_MIN_LENGTH);
|
|
7
10
|
const length = (0, _randomInteger_1._randomInteger)({
|
|
8
11
|
type: "integer",
|
|
9
|
-
minimum
|
|
10
|
-
maximum: props.maxLength,
|
|
12
|
+
minimum,
|
|
13
|
+
maximum: (_c = props.maxLength) !== null && _c !== void 0 ? _c : minimum + DEFAULT_RANGE,
|
|
11
14
|
});
|
|
12
15
|
return new Array(length)
|
|
13
16
|
.fill(0)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_randomString.js","sourceRoot":"","sources":["../../src/internal/_randomString.ts"],"names":[],"mappings":";;;AAEA,qDAAkD;
|
|
1
|
+
{"version":3,"file":"_randomString.js","sourceRoot":"","sources":["../../src/internal/_randomString.ts"],"names":[],"mappings":";;;AAEA,qDAAkD;AAElD,MAAM,kBAAkB,GAAG,CAAC,CAAC;AAC7B,MAAM,aAAa,GAAG,CAAC,CAAC;AAEjB,MAAM,aAAa,GAAG,CAAC,KAAkC,EAAE,EAAE;;IAClE,MAAM,OAAO,SACX,KAAK,CAAC,SAAS,mCACf,IAAI,CAAC,GAAG,OAAC,KAAK,CAAC,SAAS,mCAAI,kBAAkB,EAAE,kBAAkB,CAAC,CAAC;IACtE,MAAM,MAAM,GAAW,IAAA,+BAAc,EAAC;QACpC,IAAI,EAAE,SAAS;QACf,OAAO;QACP,OAAO,QAAE,KAAK,CAAC,SAAS,mCAAI,OAAO,GAAG,aAAa;KACpD,CAAC,CAAC;IACH,OAAO,IAAI,KAAK,CAAC,MAAM,CAAC;SACrB,IAAI,CAAC,CAAC,CAAC;SACP,GAAG,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC,CAAC;SAC9B,IAAI,CAAC,EAAE,CAAC,CAAC;AACd,CAAC,CAAC;AAbW,QAAA,aAAa,GAAb,aAAa,CAaxB;AAEF,MAAM,SAAS,GAAG,4BAA4B,CAAC;AAE/C,MAAM,MAAM,GAAG,GAAG,EAAE,CAClB,IAAA,+BAAc,EAAC;IACb,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,SAAS,CAAC,MAAM,GAAG,CAAC;CAC9B,CAAC,CAAC"}
|
|
@@ -5,12 +5,15 @@ import { __exports as _randomInteger } from '../_virtual/_randomInteger.mjs';
|
|
|
5
5
|
Object.defineProperty(_randomString$1, "__esModule", { value: true });
|
|
6
6
|
var _randomString_2 = _randomString$1._randomString = void 0;
|
|
7
7
|
const _randomInteger_1 = _randomInteger;
|
|
8
|
+
const DEFAULT_MIN_LENGTH = 5;
|
|
9
|
+
const DEFAULT_RANGE = 5;
|
|
8
10
|
const _randomString = (props) => {
|
|
9
|
-
var _a;
|
|
11
|
+
var _a, _b, _c;
|
|
12
|
+
const minimum = (_a = props.minLength) !== null && _a !== void 0 ? _a : Math.min((_b = props.maxLength) !== null && _b !== void 0 ? _b : DEFAULT_MIN_LENGTH, DEFAULT_MIN_LENGTH);
|
|
10
13
|
const length = (0, _randomInteger_1._randomInteger)({
|
|
11
14
|
type: "integer",
|
|
12
|
-
minimum
|
|
13
|
-
maximum: props.maxLength,
|
|
15
|
+
minimum,
|
|
16
|
+
maximum: (_c = props.maxLength) !== null && _c !== void 0 ? _c : minimum + DEFAULT_RANGE,
|
|
14
17
|
});
|
|
15
18
|
return new Array(length)
|
|
16
19
|
.fill(0)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_randomString2.mjs","sources":["_randomString.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._randomString = void 0;\nconst _randomInteger_1 = require(\"./_randomInteger\");\nconst _randomString = (props) => {\n var _a;\n const length = (0, _randomInteger_1._randomInteger)({\n type: \"integer\",\n minimum: (
|
|
1
|
+
{"version":3,"file":"_randomString2.mjs","sources":["_randomString.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._randomString = void 0;\nconst _randomInteger_1 = require(\"./_randomInteger\");\nconst DEFAULT_MIN_LENGTH = 5;\nconst DEFAULT_RANGE = 5;\nconst _randomString = (props) => {\n var _a, _b, _c;\n const minimum = (_a = props.minLength) !== null && _a !== void 0 ? _a : Math.min((_b = props.maxLength) !== null && _b !== void 0 ? _b : DEFAULT_MIN_LENGTH, DEFAULT_MIN_LENGTH);\n const length = (0, _randomInteger_1._randomInteger)({\n type: \"integer\",\n minimum,\n maximum: (_c = props.maxLength) !== null && _c !== void 0 ? _c : minimum + DEFAULT_RANGE,\n });\n return new Array(length)\n .fill(0)\n .map(() => ALPHABETS[random()])\n .join(\"\");\n};\nexports._randomString = _randomString;\nconst ALPHABETS = \"abcdefghijklmnopqrstuvwxyz\";\nconst random = () => (0, _randomInteger_1._randomInteger)({\n type: \"integer\",\n minimum: 0,\n maximum: ALPHABETS.length - 1,\n});\n//# sourceMappingURL=_randomString.js.map"],"names":["_randomString_1","require$$0"],"mappings":";;;;AACA,MAAM,CAAC,cAAc,CAACA,eAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,IAAA,eAAA,GAAAA,eAAA,CAAA,aAAqB,GAAG;AACxB,MAAM,gBAAgB,GAAGC,cAA2B;AACpD,MAAM,kBAAkB,GAAG,CAAC;AAC5B,MAAM,aAAa,GAAG,CAAC;AACvB,MAAM,aAAa,GAAG,CAAC,KAAK,KAAK;AACjC,IAAI,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE;AAClB,IAAI,MAAM,OAAO,GAAG,CAAC,EAAE,GAAG,KAAK,CAAC,SAAS,MAAM,IAAI,IAAI,EAAE,KAAK,MAAM,GAAG,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,KAAK,CAAC,SAAS,MAAM,IAAI,IAAI,EAAE,KAAK,MAAM,GAAG,EAAE,GAAG,kBAAkB,EAAE,kBAAkB,CAAC;AACpL,IAAI,MAAM,MAAM,GAAG,IAAI,gBAAgB,CAAC,cAAc,EAAE;AACxD,QAAQ,IAAI,EAAE,SAAS;AACvB,QAAQ,OAAO;AACf,QAAQ,OAAO,EAAE,CAAC,EAAE,GAAG,KAAK,CAAC,SAAS,MAAM,IAAI,IAAI,EAAE,KAAK,MAAM,GAAG,EAAE,GAAG,OAAO,GAAG,aAAa;AAChG,KAAK,CAAC;AACN,IAAI,OAAO,IAAI,KAAK,CAAC,MAAM;AAC3B,SAAS,IAAI,CAAC,CAAC;AACf,SAAS,GAAG,CAAC,MAAM,SAAS,CAAC,MAAM,EAAE,CAAC;AACtC,SAAS,IAAI,CAAC,EAAE,CAAC;AACjB,CAAC;AACD,eAAA,GAAAD,eAAA,CAAA,aAAqB,GAAG,aAAa;AACrC,MAAM,SAAS,GAAG,4BAA4B;AAC9C,MAAM,MAAM,GAAG,MAAM,IAAI,gBAAgB,CAAC,cAAc,EAAE;AAC1D,IAAI,IAAI,EAAE,SAAS;AACnB,IAAI,OAAO,EAAE,CAAC;AACd,IAAI,OAAO,EAAE,SAAS,CAAC,MAAM,GAAG,CAAC;AACjC,CAAC,CAAC;;;;"}
|
package/lib/transform.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import type { ITtscPlugin, ITtscPluginFactoryContext } from "ttsc";
|
|
2
|
-
export
|
|
2
|
+
export declare function createTtscPlugin(context: ITtscPluginFactoryContext): ITtscPlugin;
|
|
3
|
+
export default createTtscPlugin;
|
package/lib/transform.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.createTtscPlugin = createTtscPlugin;
|
|
7
7
|
const node_module_1 = require("node:module");
|
|
8
8
|
const node_path_1 = __importDefault(require("node:path"));
|
|
9
9
|
function createTtscPlugin(context) {
|
|
@@ -17,4 +17,5 @@ function createTtscPlugin(context) {
|
|
|
17
17
|
source: node_path_1.default.resolve(root, "native", "cmd", "ttsc-typia"),
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
|
+
exports.default = createTtscPlugin;
|
|
20
21
|
//# sourceMappingURL=transform.js.map
|
package/lib/transform.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transform.js","sourceRoot":"","sources":["../src/transform.ts"],"names":[],"mappings":";;;;;;AAAA,6CAA4C;AAC5C,0DAA6B;AAG7B,0BACE,OAAkC;IAElC,oEAAoE;IACpE,wEAAwE;IACxE,2EAA2E;IAC3E,MAAM,WAAW,GAAG,IAAA,2BAAa,EAC/B,mBAAI,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,cAAc,CAAC,CAC/C,CAAC;IACF,MAAM,IAAI,GAAW,mBAAI,CAAC,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC;IAC7E,OAAO;QACL,IAAI,EAAE,OAAO;QACb,MAAM,EAAE,mBAAI,CAAC,OAAO,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,YAAY,CAAC;KAC1D,CAAC;AACJ,CAAC"}
|
|
1
|
+
{"version":3,"file":"transform.js","sourceRoot":"","sources":["../src/transform.ts"],"names":[],"mappings":";;;;;;AAAA,6CAA4C;AAC5C,0DAA6B;AAG7B,0BACE,OAAkC;IAElC,oEAAoE;IACpE,wEAAwE;IACxE,2EAA2E;IAC3E,MAAM,WAAW,GAAG,IAAA,2BAAa,EAC/B,mBAAI,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,cAAc,CAAC,CAC/C,CAAC;IACF,MAAM,IAAI,GAAW,mBAAI,CAAC,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC;IAC7E,OAAO;QACL,IAAI,EAAE,OAAO;QACb,MAAM,EAAE,mBAAI,CAAC,OAAO,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,YAAY,CAAC;KAC1D,CAAC;AACJ,CAAC;kBAEc,gBAAgB"}
|
package/lib/transform.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default } from './transform2.mjs';
|
|
1
|
+
export { createTtscPlugin, default } from './transform2.mjs';
|
|
2
2
|
//# sourceMappingURL=transform.mjs.map
|
package/lib/transform2.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { __exports as transform } from './_virtual/transform.mjs';
|
|
2
|
-
import require$$
|
|
3
|
-
import require$$
|
|
2
|
+
import require$$0 from './_virtual/_node_module.mjs';
|
|
3
|
+
import require$$1 from './_virtual/_node_path.mjs';
|
|
4
4
|
|
|
5
5
|
var __importDefault = (transform && transform.__importDefault) || function (mod) {
|
|
6
6
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
7
7
|
};
|
|
8
8
|
Object.defineProperty(transform, "__esModule", { value: true });
|
|
9
|
-
var
|
|
10
|
-
const node_module_1 = require$$
|
|
11
|
-
const node_path_1 = __importDefault(require$$
|
|
9
|
+
var createTtscPlugin_1 = transform.createTtscPlugin = createTtscPlugin;
|
|
10
|
+
const node_module_1 = require$$0;
|
|
11
|
+
const node_path_1 = __importDefault(require$$1);
|
|
12
12
|
function createTtscPlugin(context) {
|
|
13
13
|
// ttsc loads this descriptor as ESM, where the ambient `require` is
|
|
14
14
|
// unavailable; anchor a CJS resolver on the consuming project to locate
|
|
@@ -20,6 +20,7 @@ function createTtscPlugin(context) {
|
|
|
20
20
|
source: node_path_1.default.resolve(root, "native", "cmd", "ttsc-typia"),
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
+
var _default = transform.default = createTtscPlugin;
|
|
23
24
|
|
|
24
|
-
export { _default as default };
|
|
25
|
+
export { createTtscPlugin_1 as createTtscPlugin, _default as default };
|
|
25
26
|
//# sourceMappingURL=transform2.mjs.map
|
package/lib/transform2.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transform2.mjs","sources":["transform.js"],"sourcesContent":["\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.
|
|
1
|
+
{"version":3,"file":"transform2.mjs","sources":["transform.js"],"sourcesContent":["\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createTtscPlugin = createTtscPlugin;\nconst node_module_1 = require(\"node:module\");\nconst node_path_1 = __importDefault(require(\"node:path\"));\nfunction createTtscPlugin(context) {\n // ttsc loads this descriptor as ESM, where the ambient `require` is\n // unavailable; anchor a CJS resolver on the consuming project to locate\n // typia's own package root (not the project root, which has no `native/`).\n const requireFrom = (0, node_module_1.createRequire)(node_path_1.default.join(context.projectRoot, \"package.json\"));\n const root = node_path_1.default.dirname(requireFrom.resolve(\"typia/package.json\"));\n return {\n name: \"typia\",\n source: node_path_1.default.resolve(root, \"native\", \"cmd\", \"ttsc-typia\"),\n };\n}\nexports.default = createTtscPlugin;\n//# sourceMappingURL=transform.js.map"],"names":["this"],"mappings":";;;;AACA,IAAI,eAAe,GAAG,CAACA,SAAI,IAAIA,SAAI,CAAC,eAAe,KAAK,UAAU,GAAG,EAAE;AACvE,IAAI,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,UAAU,IAAI,GAAG,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE;AAC7D,CAAC;AACD,MAAM,CAAC,cAAc,CAAC,SAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,IAAA,kBAAA,GAAA,SAAA,CAAA,gBAAwB,GAAG;AAC3B,MAAM,aAAa,GAAG,UAAsB;AAC5C,MAAM,WAAW,GAAG,eAAe,CAAC,UAAoB,CAAC;AACzD,SAAS,gBAAgB,CAAC,OAAO,EAAE;AACnC;AACA;AACA;AACA,IAAI,MAAM,WAAW,GAAG,IAAI,aAAa,CAAC,aAAa,EAAE,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;AACvH,IAAI,MAAM,IAAI,GAAG,WAAW,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC;AACvF,IAAI,OAAO;AACX,QAAQ,IAAI,EAAE,OAAO;AACrB,QAAQ,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,YAAY,CAAC;AAChF,KAAK;AACL;AACA,IAAA,QAAA,GAAA,SAAA,CAAA,OAAe,GAAG;;;;"}
|