@storm-software/untyped 0.3.0 → 0.4.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/README.md +1 -1
- package/bin/untyped.js +6721 -1015
- package/bin/untyped.mjs +6723 -996
- package/dist/{chunk-I5HMFTDJ.js → chunk-6HKRKQSU.js} +7 -10
- package/dist/chunk-6OB6EGVE.js +6853 -0
- package/dist/{chunk-XAGWZ3JW.mjs → chunk-EBIRRCGB.mjs} +2 -5
- package/dist/chunk-GWEQOXW6.mjs +46 -0
- package/dist/{chunk-ZHHYXAVP.mjs → chunk-HSIBHFJE.mjs} +2 -5
- package/dist/{chunk-JRYWLT6J.js → chunk-LWMIR3BQ.js} +8 -11
- package/dist/chunk-MNW76QG7.mjs +6853 -0
- package/dist/chunk-NYKCIVTC.js +46 -0
- package/dist/{chunk-DV7PRVVQ.js → chunk-TJLW3KPU.js} +6 -9
- package/dist/{chunk-OLRKE2WB.mjs → chunk-XSW3ZXMK.mjs} +2 -5
- package/dist/generate.d.mts +3 -4
- package/dist/generate.d.ts +3 -4
- package/dist/generate.js +6 -7
- package/dist/generate.mjs +5 -6
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -7
- package/dist/index.mjs +5 -6
- package/dist/{types-DkqO6Ujr.d.mts → types-CIJRaFHD.d.mts} +358 -358
- package/dist/{types-DkqO6Ujr.d.ts → types-CIJRaFHD.d.ts} +358 -358
- package/dist/utilities.js +2 -2
- package/dist/utilities.mjs +1 -1
- package/package.json +209 -1
- package/dist/chunk-7LOMEJRK.mjs +0 -73
- package/dist/chunk-7OPTVFZK.mjs +0 -388
- package/dist/chunk-DH2WY7QT.mjs +0 -38
- package/dist/chunk-HBHOVTK2.js +0 -73
- package/dist/chunk-YMCYTSDO.js +0 -388
- package/dist/chunk-ZP3OD7IO.js +0 -38
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
8
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
9
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
|
|
28
|
+
// src/utilities.ts
|
|
29
|
+
var _correctpaths = require('@storm-software/config-tools/utilities/correct-paths');
|
|
30
|
+
var getOutputFile = /* @__PURE__ */ __name((file, extension) => {
|
|
31
|
+
let fileName = file.name.slice(0, file.name.lastIndexOf(".")).replace(".untyped", "").replace("untyped", "").replace(".schema", "").replace("schema", "");
|
|
32
|
+
if (!fileName) {
|
|
33
|
+
fileName = "schema";
|
|
34
|
+
}
|
|
35
|
+
if (fileName !== "schema") {
|
|
36
|
+
fileName = `${fileName}.schema`;
|
|
37
|
+
}
|
|
38
|
+
return _correctpaths.joinPaths.call(void 0, file.parentPath, `${fileName}.${extension}`);
|
|
39
|
+
}, "getOutputFile");
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
exports.__name = __name; exports.__commonJS = __commonJS; exports.__toESM = __toESM; exports.getOutputFile = getOutputFile;
|
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var _chunkZP3OD7IOjs = require('./chunk-ZP3OD7IO.js');
|
|
4
|
+
var _chunkNYKCIVTCjs = require('./chunk-NYKCIVTC.js');
|
|
9
5
|
|
|
10
6
|
// src/generators/json-schema.ts
|
|
7
|
+
var _console = require('@storm-software/config-tools/logger/console');
|
|
11
8
|
var _promises = require('fs/promises');
|
|
12
9
|
function generateJsonSchemaFile(schema, file, config) {
|
|
13
10
|
try {
|
|
14
|
-
const jsonSchema =
|
|
15
|
-
|
|
11
|
+
const jsonSchema = _chunkNYKCIVTCjs.getOutputFile.call(void 0, file, "json");
|
|
12
|
+
_console.writeTrace.call(void 0, `Writing JSON schema file ${jsonSchema}`, config);
|
|
16
13
|
return _promises.writeFile.call(void 0, jsonSchema, JSON.stringify(schema, null, 2));
|
|
17
14
|
} catch (error) {
|
|
18
|
-
|
|
15
|
+
_console.writeError.call(void 0, `Error writing JSON schema file for ${file.name}
|
|
19
16
|
|
|
20
17
|
Error:
|
|
21
18
|
${_optionalChain([error, 'optionalAccess', _ => _.message]) ? error.message : JSON.stringify(error)}${_optionalChain([error, 'optionalAccess', _2 => _2.stack]) ? `
|
|
@@ -27,7 +24,7 @@ ${JSON.stringify(schema)}
|
|
|
27
24
|
throw error;
|
|
28
25
|
}
|
|
29
26
|
}
|
|
30
|
-
|
|
27
|
+
_chunkNYKCIVTCjs.__name.call(void 0, generateJsonSchemaFile, "generateJsonSchemaFile");
|
|
31
28
|
|
|
32
29
|
|
|
33
30
|
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
writeError,
|
|
3
|
-
writeTrace
|
|
4
|
-
} from "./chunk-7OPTVFZK.mjs";
|
|
5
1
|
import {
|
|
6
2
|
__name,
|
|
7
3
|
getOutputFile
|
|
8
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-GWEQOXW6.mjs";
|
|
9
5
|
|
|
10
6
|
// src/generators/markdown.ts
|
|
7
|
+
import { writeError, writeTrace } from "@storm-software/config-tools/logger/console";
|
|
11
8
|
import { writeFile } from "node:fs/promises";
|
|
12
9
|
function generateMarkdown(schema) {
|
|
13
10
|
return `
|
package/dist/generate.d.mts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { S as StormConfig } from './types-
|
|
1
|
+
import { S as StormConfig } from './types-CIJRaFHD.mjs';
|
|
2
2
|
import 'zod';
|
|
3
3
|
|
|
4
4
|
declare const getGenerateAction: (config: StormConfig) => (options: {
|
|
5
|
-
entry
|
|
6
|
-
outputPath
|
|
7
|
-
jsonSchema: string;
|
|
5
|
+
entry?: string | string[];
|
|
6
|
+
outputPath?: string;
|
|
8
7
|
}) => Promise<void>;
|
|
9
8
|
|
|
10
9
|
export { getGenerateAction };
|
package/dist/generate.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { S as StormConfig } from './types-
|
|
1
|
+
import { S as StormConfig } from './types-CIJRaFHD.js';
|
|
2
2
|
import 'zod';
|
|
3
3
|
|
|
4
4
|
declare const getGenerateAction: (config: StormConfig) => (options: {
|
|
5
|
-
entry
|
|
6
|
-
outputPath
|
|
7
|
-
jsonSchema: string;
|
|
5
|
+
entry?: string | string[];
|
|
6
|
+
outputPath?: string;
|
|
8
7
|
}) => Promise<void>;
|
|
9
8
|
|
|
10
9
|
export { getGenerateAction };
|
package/dist/generate.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
7
|
-
require('./chunk-
|
|
8
|
-
require('./chunk-ZP3OD7IO.js');
|
|
3
|
+
var _chunk6OB6EGVEjs = require('./chunk-6OB6EGVE.js');
|
|
4
|
+
require('./chunk-6HKRKQSU.js');
|
|
5
|
+
require('./chunk-TJLW3KPU.js');
|
|
6
|
+
require('./chunk-LWMIR3BQ.js');
|
|
7
|
+
require('./chunk-NYKCIVTC.js');
|
|
9
8
|
|
|
10
9
|
|
|
11
|
-
exports.getGenerateAction =
|
|
10
|
+
exports.getGenerateAction = _chunk6OB6EGVEjs.getGenerateAction;
|
package/dist/generate.mjs
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getGenerateAction
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-DH2WY7QT.mjs";
|
|
3
|
+
} from "./chunk-MNW76QG7.mjs";
|
|
4
|
+
import "./chunk-EBIRRCGB.mjs";
|
|
5
|
+
import "./chunk-HSIBHFJE.mjs";
|
|
6
|
+
import "./chunk-XSW3ZXMK.mjs";
|
|
7
|
+
import "./chunk-GWEQOXW6.mjs";
|
|
9
8
|
export {
|
|
10
9
|
getGenerateAction
|
|
11
10
|
};
|
package/dist/index.d.mts
CHANGED
|
@@ -3,7 +3,7 @@ export { generateDeclaration, generateDeclarationFile } from './generators/dts.m
|
|
|
3
3
|
export { generateJsonSchemaFile } from './generators/json-schema.mjs';
|
|
4
4
|
export { generateMarkdown, generateMarkdownFile } from './generators/markdown.mjs';
|
|
5
5
|
export { getOutputFile } from './utilities.mjs';
|
|
6
|
-
import './types-
|
|
6
|
+
import './types-CIJRaFHD.mjs';
|
|
7
7
|
import 'zod';
|
|
8
8
|
import 'glob';
|
|
9
9
|
import 'untyped';
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { generateDeclaration, generateDeclarationFile } from './generators/dts.j
|
|
|
3
3
|
export { generateJsonSchemaFile } from './generators/json-schema.js';
|
|
4
4
|
export { generateMarkdown, generateMarkdownFile } from './generators/markdown.js';
|
|
5
5
|
export { getOutputFile } from './utilities.js';
|
|
6
|
-
import './types-
|
|
6
|
+
import './types-CIJRaFHD.js';
|
|
7
7
|
import 'zod';
|
|
8
8
|
import 'glob';
|
|
9
9
|
import 'untyped';
|
package/dist/index.js
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk6OB6EGVEjs = require('./chunk-6OB6EGVE.js');
|
|
4
4
|
require('./chunk-U4YLQDJK.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunk6HKRKQSUjs = require('./chunk-6HKRKQSU.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkTJLW3KPUjs = require('./chunk-TJLW3KPU.js');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
16
|
-
require('./chunk-YMCYTSDO.js');
|
|
15
|
+
var _chunkLWMIR3BQjs = require('./chunk-LWMIR3BQ.js');
|
|
17
16
|
|
|
18
17
|
|
|
19
|
-
var
|
|
18
|
+
var _chunkNYKCIVTCjs = require('./chunk-NYKCIVTC.js');
|
|
20
19
|
|
|
21
20
|
|
|
22
21
|
|
|
@@ -25,4 +24,4 @@ var _chunkZP3OD7IOjs = require('./chunk-ZP3OD7IO.js');
|
|
|
25
24
|
|
|
26
25
|
|
|
27
26
|
|
|
28
|
-
exports.generateDeclaration =
|
|
27
|
+
exports.generateDeclaration = _chunk6HKRKQSUjs.generateDeclaration; exports.generateDeclarationFile = _chunk6HKRKQSUjs.generateDeclarationFile; exports.generateJsonSchemaFile = _chunkTJLW3KPUjs.generateJsonSchemaFile; exports.generateMarkdown = _chunkLWMIR3BQjs.generateMarkdown; exports.generateMarkdownFile = _chunkLWMIR3BQjs.generateMarkdownFile; exports.getGenerateAction = _chunk6OB6EGVEjs.getGenerateAction; exports.getOutputFile = _chunkNYKCIVTCjs.getOutputFile;
|
package/dist/index.mjs
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getGenerateAction
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MNW76QG7.mjs";
|
|
4
4
|
import "./chunk-ZHPKHX4S.mjs";
|
|
5
5
|
import {
|
|
6
6
|
generateDeclaration,
|
|
7
7
|
generateDeclarationFile
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-EBIRRCGB.mjs";
|
|
9
9
|
import {
|
|
10
10
|
generateJsonSchemaFile
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-HSIBHFJE.mjs";
|
|
12
12
|
import {
|
|
13
13
|
generateMarkdown,
|
|
14
14
|
generateMarkdownFile
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-7OPTVFZK.mjs";
|
|
15
|
+
} from "./chunk-XSW3ZXMK.mjs";
|
|
17
16
|
import {
|
|
18
17
|
getOutputFile
|
|
19
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-GWEQOXW6.mjs";
|
|
20
19
|
export {
|
|
21
20
|
generateDeclaration,
|
|
22
21
|
generateDeclarationFile,
|