@storm-software/untyped 0.11.4 → 0.11.6
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.cjs +9 -9
- package/bin/untyped.js +9 -9
- package/dist/{chunk-S6C63FCT.cjs → chunk-3MKS4WE3.cjs} +8 -8
- package/dist/{chunk-UJFQSB2M.cjs → chunk-565KWKJP.cjs} +16 -16
- package/dist/{chunk-FONZ2AHB.js → chunk-HZZGHXZC.js} +2 -2
- package/dist/{chunk-QAKF7CSX.js → chunk-IM2C2753.js} +5 -5
- package/dist/{chunk-27FYXNIO.cjs → chunk-L5ZIZMUD.cjs} +205 -205
- package/dist/{chunk-QECHN5Y2.cjs → chunk-LSXMALRL.cjs} +9 -9
- package/dist/chunk-LZTKJ7LV.cjs +6 -0
- package/dist/{chunk-AORGS2JP.js → chunk-PPS7IOSE.js} +3 -3
- package/dist/{chunk-E3JIROMO.js → chunk-PSDXUHWK.js} +1 -1
- package/dist/{chunk-3STWFZKG.cjs → chunk-R3UVYT3B.cjs} +2 -2
- package/dist/{chunk-EYLEPVOU.js → chunk-SQDAJDQD.js} +2 -2
- package/dist/{chunk-3KJNEJ3C.cjs → chunk-ULBXDLC5.cjs} +7 -7
- package/dist/{chunk-A4R3AMIX.js → chunk-W7BRQM6C.js} +2 -2
- package/dist/{chunk-VSFHJTTZ.js → chunk-ZFOG3DH7.js} +2 -2
- package/dist/generate.cjs +7 -7
- package/dist/generate.d.cts +1 -1
- package/dist/generate.d.ts +1 -1
- package/dist/generate.js +6 -6
- package/dist/index.cjs +9 -9
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +7 -7
- package/dist/{types-BHTvEliD.d.cts → types-BMxueS2m.d.cts} +3 -3
- package/dist/{types-BHTvEliD.d.ts → types-BMxueS2m.d.ts} +3 -3
- package/dist/utilities.cjs +2 -2
- package/dist/utilities.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-OCGQTU2G.cjs +0 -6
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
|
|
|
21
21
|
|
|
22
22
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
23
23
|
|
|
24
|
-
[](https://prettier.io/) [](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://fumadocs.vercel.app/) 
|
|
25
25
|
|
|
26
26
|
<!-- prettier-ignore-start -->
|
|
27
27
|
<!-- markdownlint-disable -->
|
package/bin/untyped.cjs
CHANGED
|
@@ -33,10 +33,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
33
33
|
mod
|
|
34
34
|
));
|
|
35
35
|
|
|
36
|
-
// ../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.50.0_@types+node@22.13.
|
|
36
|
+
// ../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.50.0_@types+node@22.13.4__@swc+core@1.7.26_@swc+h_73a1907be974ba33a2ccc4e2bb5df2f6/node_modules/tsup/assets/cjs_shims.js
|
|
37
37
|
var getImportMetaUrl, importMetaUrl;
|
|
38
38
|
var init_cjs_shims = __esm({
|
|
39
|
-
"../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.50.0_@types+node@22.13.
|
|
39
|
+
"../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.50.0_@types+node@22.13.4__@swc+core@1.7.26_@swc+h_73a1907be974ba33a2ccc4e2bb5df2f6/node_modules/tsup/assets/cjs_shims.js"() {
|
|
40
40
|
getImportMetaUrl = /* @__PURE__ */ __name(() => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href, "getImportMetaUrl");
|
|
41
41
|
importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
|
|
42
42
|
}
|
|
@@ -71776,11 +71776,11 @@ var StormConfigSchema = z.object({
|
|
|
71776
71776
|
preid: z.string().optional().describe("A tag specifying the version pre-release identifier"),
|
|
71777
71777
|
owner: z.string().trim().default("@storm-software/admin").describe("The owner of the package"),
|
|
71778
71778
|
bot: WorkspaceBotConfigSchema,
|
|
71779
|
-
|
|
71779
|
+
mode: z.enum([
|
|
71780
71780
|
"development",
|
|
71781
71781
|
"staging",
|
|
71782
71782
|
"production"
|
|
71783
|
-
]).default("production").describe("The current runtime environment
|
|
71783
|
+
]).default("production").describe("The current runtime environment mode for the package"),
|
|
71784
71784
|
workspaceRoot: z.string().trim().default("").describe("The root directory of the workspace"),
|
|
71785
71785
|
externalPackagePatterns: z.array(z.string()).default([]).describe("The build will use these package patterns to determine if they should be external to the bundle"),
|
|
71786
71786
|
skipCache: z.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
|
|
@@ -73839,7 +73839,7 @@ var getConfigEnv = /* @__PURE__ */ __name(() => {
|
|
|
73839
73839
|
build: process.env[`${prefix}BUILD_DIR`] ? correctPaths(process.env[`${prefix}BUILD_DIR`]) : void 0
|
|
73840
73840
|
},
|
|
73841
73841
|
skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
|
|
73842
|
-
|
|
73842
|
+
mode: (process.env[`${prefix}MODE`] ?? process.env.NODE_ENV ?? process.env.ENVIRONMENT) || void 0,
|
|
73843
73843
|
// ci:
|
|
73844
73844
|
// process.env[`${prefix}CI`] !== undefined
|
|
73845
73845
|
// ? Boolean(
|
|
@@ -74049,10 +74049,10 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
|
|
|
74049
74049
|
process.env.NX_CACHE_PROJECT_GRAPH ??= String(config.skipCache);
|
|
74050
74050
|
}
|
|
74051
74051
|
}
|
|
74052
|
-
if (config.
|
|
74053
|
-
process.env[`${prefix}
|
|
74054
|
-
process.env.NODE_ENV = config.
|
|
74055
|
-
process.env.ENVIRONMENT = config.
|
|
74052
|
+
if (config.mode) {
|
|
74053
|
+
process.env[`${prefix}MODE`] = config.mode;
|
|
74054
|
+
process.env.NODE_ENV = config.mode;
|
|
74055
|
+
process.env.ENVIRONMENT = config.mode;
|
|
74056
74056
|
}
|
|
74057
74057
|
if (config.colors?.base?.light || config.colors?.base?.dark) {
|
|
74058
74058
|
for (const key of Object.keys(config.colors)) {
|
package/bin/untyped.js
CHANGED
|
@@ -39,9 +39,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
39
39
|
mod
|
|
40
40
|
));
|
|
41
41
|
|
|
42
|
-
// ../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.50.0_@types+node@22.13.
|
|
42
|
+
// ../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.50.0_@types+node@22.13.4__@swc+core@1.7.26_@swc+h_73a1907be974ba33a2ccc4e2bb5df2f6/node_modules/tsup/assets/esm_shims.js
|
|
43
43
|
var init_esm_shims = __esm({
|
|
44
|
-
"../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.50.0_@types+node@22.13.
|
|
44
|
+
"../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.50.0_@types+node@22.13.4__@swc+core@1.7.26_@swc+h_73a1907be974ba33a2ccc4e2bb5df2f6/node_modules/tsup/assets/esm_shims.js"() {
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
47
|
|
|
@@ -71767,11 +71767,11 @@ var StormConfigSchema = z.object({
|
|
|
71767
71767
|
preid: z.string().optional().describe("A tag specifying the version pre-release identifier"),
|
|
71768
71768
|
owner: z.string().trim().default("@storm-software/admin").describe("The owner of the package"),
|
|
71769
71769
|
bot: WorkspaceBotConfigSchema,
|
|
71770
|
-
|
|
71770
|
+
mode: z.enum([
|
|
71771
71771
|
"development",
|
|
71772
71772
|
"staging",
|
|
71773
71773
|
"production"
|
|
71774
|
-
]).default("production").describe("The current runtime environment
|
|
71774
|
+
]).default("production").describe("The current runtime environment mode for the package"),
|
|
71775
71775
|
workspaceRoot: z.string().trim().default("").describe("The root directory of the workspace"),
|
|
71776
71776
|
externalPackagePatterns: z.array(z.string()).default([]).describe("The build will use these package patterns to determine if they should be external to the bundle"),
|
|
71777
71777
|
skipCache: z.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
|
|
@@ -73827,7 +73827,7 @@ var getConfigEnv = /* @__PURE__ */ __name(() => {
|
|
|
73827
73827
|
build: process.env[`${prefix}BUILD_DIR`] ? correctPaths(process.env[`${prefix}BUILD_DIR`]) : void 0
|
|
73828
73828
|
},
|
|
73829
73829
|
skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
|
|
73830
|
-
|
|
73830
|
+
mode: (process.env[`${prefix}MODE`] ?? process.env.NODE_ENV ?? process.env.ENVIRONMENT) || void 0,
|
|
73831
73831
|
// ci:
|
|
73832
73832
|
// process.env[`${prefix}CI`] !== undefined
|
|
73833
73833
|
// ? Boolean(
|
|
@@ -74037,10 +74037,10 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
|
|
|
74037
74037
|
process.env.NX_CACHE_PROJECT_GRAPH ??= String(config.skipCache);
|
|
74038
74038
|
}
|
|
74039
74039
|
}
|
|
74040
|
-
if (config.
|
|
74041
|
-
process.env[`${prefix}
|
|
74042
|
-
process.env.NODE_ENV = config.
|
|
74043
|
-
process.env.ENVIRONMENT = config.
|
|
74040
|
+
if (config.mode) {
|
|
74041
|
+
process.env[`${prefix}MODE`] = config.mode;
|
|
74042
|
+
process.env.NODE_ENV = config.mode;
|
|
74043
|
+
process.env.ENVIRONMENT = config.mode;
|
|
74044
74044
|
}
|
|
74045
74045
|
if (config.colors?.base?.light || config.colors?.base?.dark) {
|
|
74046
74046
|
for (const key of Object.keys(config.colors)) {
|
|
@@ -1,15 +1,15 @@
|
|
|
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
|
|
4
|
+
var _chunkL5ZIZMUDcjs = require('./chunk-L5ZIZMUD.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkR3UVYT3Bcjs = require('./chunk-R3UVYT3B.cjs');
|
|
10
10
|
|
|
11
11
|
// src/generators/dts.ts
|
|
12
|
-
|
|
12
|
+
_chunkR3UVYT3Bcjs.init_cjs_shims.call(void 0, );
|
|
13
13
|
var _promises = require('fs/promises');
|
|
14
14
|
var _untyped = require('untyped');
|
|
15
15
|
function generateDeclaration(schema) {
|
|
@@ -25,14 +25,14 @@ ${_untyped.generateTypes.call(void 0, schema, {
|
|
|
25
25
|
|
|
26
26
|
`;
|
|
27
27
|
}
|
|
28
|
-
|
|
28
|
+
_chunkR3UVYT3Bcjs.__name.call(void 0, generateDeclaration, "generateDeclaration");
|
|
29
29
|
function generateDeclarationFile(schema, file, config) {
|
|
30
30
|
try {
|
|
31
|
-
const declarations =
|
|
32
|
-
|
|
31
|
+
const declarations = _chunkR3UVYT3Bcjs.getOutputFile.call(void 0, file, "d.ts");
|
|
32
|
+
_chunkL5ZIZMUDcjs.writeTrace.call(void 0, `Writing type declaration file ${declarations}`, config);
|
|
33
33
|
return _promises.writeFile.call(void 0, declarations, generateDeclaration(schema));
|
|
34
34
|
} catch (error) {
|
|
35
|
-
|
|
35
|
+
_chunkL5ZIZMUDcjs.writeError.call(void 0, `Error writing declaration file for ${file.name}
|
|
36
36
|
|
|
37
37
|
Error:
|
|
38
38
|
${_optionalChain([error, 'optionalAccess', _4 => _4.message]) ? error.message : JSON.stringify(error)}${_optionalChain([error, 'optionalAccess', _5 => _5.stack]) ? `
|
|
@@ -44,7 +44,7 @@ ${JSON.stringify(schema)}
|
|
|
44
44
|
throw error;
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
|
|
47
|
+
_chunkR3UVYT3Bcjs.__name.call(void 0, generateDeclarationFile, "generateDeclarationFile");
|
|
48
48
|
|
|
49
49
|
|
|
50
50
|
|
|
@@ -1,29 +1,29 @@
|
|
|
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
|
-
var
|
|
3
|
+
var _chunk3MKS4WE3cjs = require('./chunk-3MKS4WE3.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkULBXDLC5cjs = require('./chunk-ULBXDLC5.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkLSXMALRLcjs = require('./chunk-LSXMALRL.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkL5ZIZMUDcjs = require('./chunk-L5ZIZMUD.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
var
|
|
19
|
+
var _chunkR3UVYT3Bcjs = require('./chunk-R3UVYT3B.cjs');
|
|
20
20
|
|
|
21
21
|
// src/generate.ts
|
|
22
|
-
|
|
22
|
+
_chunkR3UVYT3Bcjs.init_cjs_shims.call(void 0, );
|
|
23
23
|
var _glob = require('glob');
|
|
24
24
|
var _loader = require('untyped/loader');
|
|
25
|
-
var getGenerateAction = /* @__PURE__ */
|
|
26
|
-
|
|
25
|
+
var getGenerateAction = /* @__PURE__ */ _chunkR3UVYT3Bcjs.__name.call(void 0, (config) => async (options) => {
|
|
26
|
+
_chunkL5ZIZMUDcjs.writeTrace.call(void 0, `Running Storm Untyped with options: ${JSON.stringify(options)}`, config);
|
|
27
27
|
const files = await _glob.glob.call(void 0, options.entry || "**/{untyped.ts,*.untyped.ts}", {
|
|
28
28
|
ignore: [
|
|
29
29
|
"**/{*.stories.tsx,*.stories.ts,*.spec.tsx,*.spec.ts}",
|
|
@@ -38,18 +38,18 @@ var getGenerateAction = /* @__PURE__ */ _chunk3STWFZKGcjs.__name.call(void 0, (c
|
|
|
38
38
|
cwd: config.workspaceRoot
|
|
39
39
|
});
|
|
40
40
|
await Promise.all(files.map(async (file) => {
|
|
41
|
-
|
|
41
|
+
_chunkL5ZIZMUDcjs.writeTrace.call(void 0, `Generating files for schema file: ${_chunkR3UVYT3Bcjs.joinPaths.call(void 0, file.parentPath, file.name)}`, config);
|
|
42
42
|
let schema;
|
|
43
43
|
try {
|
|
44
|
-
schema = await _loader.loadSchema.call(void 0,
|
|
44
|
+
schema = await _loader.loadSchema.call(void 0, _chunkR3UVYT3Bcjs.joinPaths.call(void 0, file.parentPath, file.name), {
|
|
45
45
|
jiti: {
|
|
46
|
-
debug:
|
|
47
|
-
fsCache: config.skipCache ? false :
|
|
46
|
+
debug: _chunkL5ZIZMUDcjs.isVerbose.call(void 0, config.logLevel),
|
|
47
|
+
fsCache: config.skipCache ? false : _chunkR3UVYT3Bcjs.joinPaths.call(void 0, config.directories.cache || _chunkR3UVYT3Bcjs.joinPaths.call(void 0, config.workspaceRoot, "node_modules/.cache/storm"), "jiti"),
|
|
48
48
|
interopDefault: true
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
51
|
} catch (error) {
|
|
52
|
-
|
|
52
|
+
_chunkL5ZIZMUDcjs.writeError.call(void 0, `Error while parsing schema file: ${_chunkR3UVYT3Bcjs.joinPaths.call(void 0, file.parentPath, file.name)}
|
|
53
53
|
|
|
54
54
|
Error:
|
|
55
55
|
${_optionalChain([error, 'optionalAccess', _ => _.message]) ? error.message : JSON.stringify(error)}${_optionalChain([error, 'optionalAccess', _2 => _2.stack]) ? `
|
|
@@ -61,9 +61,9 @@ ${JSON.stringify(schema)}
|
|
|
61
61
|
throw error;
|
|
62
62
|
}
|
|
63
63
|
const promises = [];
|
|
64
|
-
promises.push(
|
|
65
|
-
promises.push(
|
|
66
|
-
promises.push(
|
|
64
|
+
promises.push(_chunk3MKS4WE3cjs.generateDeclarationFile.call(void 0, schema, file, config));
|
|
65
|
+
promises.push(_chunkLSXMALRLcjs.generateMarkdownFile.call(void 0, schema, file, config));
|
|
66
|
+
promises.push(_chunkULBXDLC5cjs.generateJsonSchemaFile.call(void 0, schema, file, config));
|
|
67
67
|
return Promise.all(promises);
|
|
68
68
|
}));
|
|
69
69
|
}, "getGenerateAction");
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
writeError,
|
|
3
3
|
writeTrace
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-PPS7IOSE.js";
|
|
5
5
|
import {
|
|
6
6
|
__name,
|
|
7
7
|
getOutputFile,
|
|
8
8
|
init_esm_shims
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ZFOG3DH7.js";
|
|
10
10
|
|
|
11
11
|
// src/generators/json-schema.ts
|
|
12
12
|
init_esm_shims();
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
generateDeclarationFile
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-W7BRQM6C.js";
|
|
4
4
|
import {
|
|
5
5
|
generateJsonSchemaFile
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-HZZGHXZC.js";
|
|
7
7
|
import {
|
|
8
8
|
generateMarkdownFile
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-SQDAJDQD.js";
|
|
10
10
|
import {
|
|
11
11
|
isVerbose,
|
|
12
12
|
writeError,
|
|
13
13
|
writeTrace
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-PPS7IOSE.js";
|
|
15
15
|
import {
|
|
16
16
|
__name,
|
|
17
17
|
init_esm_shims,
|
|
18
18
|
joinPaths
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-ZFOG3DH7.js";
|
|
20
20
|
|
|
21
21
|
// src/generate.ts
|
|
22
22
|
init_esm_shims();
|