@storm-software/untyped 0.8.6 → 0.8.8
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 +33 -27
- package/bin/untyped.js +25 -19
- package/dist/{chunk-EIXSLKJ6.js → chunk-2MAJIAMM.js} +11 -5
- package/dist/{chunk-CLGOYXO6.cjs → chunk-ATFT6DWG.cjs} +9 -9
- package/dist/{chunk-S36U2TKG.js → chunk-CFOAJWAE.js} +1 -1
- package/dist/{chunk-VCSZBLKU.cjs → chunk-D7L4X6XI.cjs} +11 -5
- package/dist/{chunk-MW6UM5LZ.js → chunk-EEKAGW4F.js} +1 -1
- package/dist/{chunk-ELSZYSKI.js → chunk-MNZPWZ6S.js} +2 -2
- package/dist/{chunk-UCWWPTWV.cjs → chunk-QKT2QMKJ.cjs} +7 -7
- package/dist/{chunk-YU5YP27Q.cjs → chunk-XFMXMHTD.cjs} +202 -202
- package/dist/chunk-YIYV24YP.cjs +6 -0
- package/dist/{chunk-B5PWE2FK.js → chunk-ZLUCZD2A.js} +2 -2
- package/dist/{chunk-BFSI6OL7.cjs → chunk-ZMD64DNM.cjs} +8 -8
- package/dist/{chunk-SF7VZOKX.js → chunk-ZN2NO4H2.js} +5 -5
- package/dist/{chunk-TJ5YM7SW.js → chunk-ZRWTUFWM.js} +2 -2
- package/dist/{chunk-HUCZDWTY.cjs → chunk-ZXDL4C5R.cjs} +192 -192
- package/dist/generate.cjs +7 -7
- package/dist/generate.js +6 -6
- package/dist/index.cjs +9 -9
- package/dist/index.js +7 -7
- package/dist/utilities.cjs +2 -2
- package/dist/utilities.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-KQOG5R22.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
|
@@ -2431,7 +2431,7 @@ var require_jiti = __commonJS({
|
|
|
2431
2431
|
if (0 === path6.length) return ".";
|
|
2432
2432
|
const isUNCPath = (path6 = normalizeWindowsPath3(path6)).match(_UNC_REGEX3), isPathAbsolute = isAbsolute3(path6), trailingSeparator = "/" === path6[path6.length - 1];
|
|
2433
2433
|
return 0 === (path6 = normalizeString3(path6, !isPathAbsolute)).length ? isPathAbsolute ? "/" : trailingSeparator ? "./" : "." : (trailingSeparator && (path6 += "/"), _DRIVE_LETTER_RE3.test(path6) && (path6 += "/"), isUNCPath ? isPathAbsolute ? `//${path6}` : `//./${path6}` : isPathAbsolute && !isAbsolute3(path6) ? `/${path6}` : path6);
|
|
2434
|
-
}, "pathe_ff20891b_normalize"),
|
|
2434
|
+
}, "pathe_ff20891b_normalize"), join6 = /* @__PURE__ */ __name(function(...arguments_) {
|
|
2435
2435
|
if (0 === arguments_.length) return ".";
|
|
2436
2436
|
let joined;
|
|
2437
2437
|
for (const argument of arguments_) argument && argument.length > 0 && (void 0 === joined ? joined = argument : joined += `/${argument}`);
|
|
@@ -3134,12 +3134,12 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
|
|
|
3134
3134
|
for (const [alias, to] of Object.entries(aliases2)) {
|
|
3135
3135
|
if (!_path.startsWith(alias)) continue;
|
|
3136
3136
|
const _alias = utils_hasTrailingSlash(alias) ? alias.slice(0, -1) : alias;
|
|
3137
|
-
if (utils_hasTrailingSlash(_path[_alias.length])) return
|
|
3137
|
+
if (utils_hasTrailingSlash(_path[_alias.length])) return join6(to, _path.slice(alias.length));
|
|
3138
3138
|
}
|
|
3139
3139
|
return _path;
|
|
3140
3140
|
}(id, ctx.alias));
|
|
3141
3141
|
let parentURL = options?.parentURL || ctx.url;
|
|
3142
|
-
isDir(parentURL) && (parentURL =
|
|
3142
|
+
isDir(parentURL) && (parentURL = join6(parentURL, "_index.js"));
|
|
3143
3143
|
const conditionSets = (options?.async ? [options?.conditions, ["node", "import"], ["node", "require"]] : [options?.conditions, ["node", "require"], ["node", "import"]]).filter(Boolean);
|
|
3144
3144
|
for (const conditions of conditionSets) {
|
|
3145
3145
|
try {
|
|
@@ -3223,7 +3223,7 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
|
|
|
3223
3223
|
return path6.match(FILENAME_RE)?.[2];
|
|
3224
3224
|
}(topts.filename)}` + (ctx.opts.sourceMaps ? "+map" : "") + (topts.interopDefault ? ".i" : "") + `.${md5(topts.filename)}` + (topts.async ? ".mjs" : ".cjs");
|
|
3225
3225
|
topts.jsx && topts.filename.endsWith("x") && (cacheName += "x");
|
|
3226
|
-
const cacheDir = ctx.opts.fsCache, cacheFilePath =
|
|
3226
|
+
const cacheDir = ctx.opts.fsCache, cacheFilePath = join6(cacheDir, cacheName);
|
|
3227
3227
|
if ((0, external_node_fs_namespaceObject.existsSync)(cacheFilePath)) {
|
|
3228
3228
|
const cacheSource = (0, external_node_fs_namespaceObject.readFileSync)(cacheFilePath, "utf8");
|
|
3229
3229
|
if (cacheSource.endsWith(sourceHash)) return debug2(ctx, "[cache]", "[hit]", topts.filename, "~>", cacheFilePath), cacheSource;
|
|
@@ -3236,13 +3236,13 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
|
|
|
3236
3236
|
function prepareCacheDir(ctx) {
|
|
3237
3237
|
if (true === ctx.opts.fsCache && (ctx.opts.fsCache = function(ctx2) {
|
|
3238
3238
|
const nmDir = ctx2.filename && resolve4(ctx2.filename, "../node_modules");
|
|
3239
|
-
if (nmDir && (0, external_node_fs_namespaceObject.existsSync)(nmDir)) return
|
|
3239
|
+
if (nmDir && (0, external_node_fs_namespaceObject.existsSync)(nmDir)) return join6(nmDir, ".cache/jiti");
|
|
3240
3240
|
let _tmpDir = (0, external_node_os_namespaceObject.tmpdir)();
|
|
3241
3241
|
if (process.env.TMPDIR && _tmpDir === process.cwd() && !process.env.JITI_RESPECT_TMPDIR_ENV) {
|
|
3242
3242
|
const _env = process.env.TMPDIR;
|
|
3243
3243
|
delete process.env.TMPDIR, _tmpDir = (0, external_node_os_namespaceObject.tmpdir)(), process.env.TMPDIR = _env;
|
|
3244
3244
|
}
|
|
3245
|
-
return
|
|
3245
|
+
return join6(_tmpDir, "jiti");
|
|
3246
3246
|
}(ctx)), ctx.opts.fsCache) try {
|
|
3247
3247
|
if ((0, external_node_fs_namespaceObject.mkdirSync)(ctx.opts.fsCache, { recursive: true }), !function(filename) {
|
|
3248
3248
|
try {
|
|
@@ -3267,9 +3267,9 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
|
|
|
3267
3267
|
function eval_evalModule(ctx, source, evalOptions = {}) {
|
|
3268
3268
|
const id = evalOptions.id || (evalOptions.filename ? basename3(evalOptions.filename) : `_jitiEval.${evalOptions.ext || (evalOptions.async ? "mjs" : "js")}`), filename = evalOptions.filename || jitiResolve(ctx, id, { async: evalOptions.async }), ext2 = evalOptions.ext || extname4(filename), cache3 = evalOptions.cache || ctx.parentCache || {}, isTypescript = /\.[cm]?tsx?$/.test(ext2), isESM = ".mjs" === ext2 || ".js" === ext2 && "module" === function(path6) {
|
|
3269
3269
|
for (; path6 && "." !== path6 && "/" !== path6; ) {
|
|
3270
|
-
path6 =
|
|
3270
|
+
path6 = join6(path6, "..");
|
|
3271
3271
|
try {
|
|
3272
|
-
const pkg = (0, external_node_fs_namespaceObject.readFileSync)(
|
|
3272
|
+
const pkg = (0, external_node_fs_namespaceObject.readFileSync)(join6(path6, "package.json"), "utf8");
|
|
3273
3273
|
try {
|
|
3274
3274
|
return JSON.parse(pkg);
|
|
3275
3275
|
} catch {
|
|
@@ -3335,7 +3335,7 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
|
|
|
3335
3335
|
const deprecatOverrides = {};
|
|
3336
3336
|
return void 0 !== userOptions2.cache && (deprecatOverrides.fsCache = userOptions2.cache), void 0 !== userOptions2.requireCache && (deprecatOverrides.moduleCache = userOptions2.requireCache), { ...jitiDefaults, ...deprecatOverrides, ...userOptions2 };
|
|
3337
3337
|
}(userOptions), alias = opts.alias && Object.keys(opts.alias).length > 0 ? normalizeAliases(opts.alias || {}) : void 0, nativeModules = ["typescript", "jiti", ...opts.nativeModules || []], isNativeRe = new RegExp(`node_modules/(${nativeModules.map((m3) => escapeStringRegexp(m3)).join("|")})/`), transformModules = [...opts.transformModules || []], isTransformRe = new RegExp(`node_modules/(${transformModules.map((m3) => escapeStringRegexp(m3)).join("|")})/`);
|
|
3338
|
-
filename || (filename = process.cwd()), !isNested && isDir(filename) && (filename =
|
|
3338
|
+
filename || (filename = process.cwd()), !isNested && isDir(filename) && (filename = join6(filename, "_index.js"));
|
|
3339
3339
|
const url = pathToFileURL2(filename), additionalExts = [...opts.extensions].filter((ext2) => ".js" !== ext2), nativeRequire = parentContext.createRequire(isWindows ? filename.replace(/\//g, "\\") : filename), ctx = { filename, url, opts, alias, nativeModules, transformModules, isNativeRe, isTransformRe, additionalExts, nativeRequire, onError: parentContext.onError, parentModule: parentContext.parentModule, parentCache: parentContext.parentCache, nativeImport: parentContext.nativeImport, createRequire: parentContext.createRequire };
|
|
3340
3340
|
isNested || debug2(ctx, "[init]", ...[["version:", package_namespaceObject.rE], ["module-cache:", opts.moduleCache], ["fs-cache:", opts.fsCache], ["interop-defaults:", opts.interopDefault]].flat()), isNested || prepareCacheDir(ctx);
|
|
3341
3341
|
const jiti = Object.assign(function(id) {
|
|
@@ -48592,7 +48592,7 @@ var require_path_reservations = __commonJS({
|
|
|
48592
48592
|
var assert2 = require("assert");
|
|
48593
48593
|
var normalize4 = require_normalize_unicode();
|
|
48594
48594
|
var stripSlashes = require_strip_trailing_slashes();
|
|
48595
|
-
var { join:
|
|
48595
|
+
var { join: join6 } = require("path");
|
|
48596
48596
|
var platform = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
48597
48597
|
var isWindows = platform === "win32";
|
|
48598
48598
|
module2.exports = () => {
|
|
@@ -48601,7 +48601,7 @@ var require_path_reservations = __commonJS({
|
|
|
48601
48601
|
const getDirs = /* @__PURE__ */ __name((path6) => {
|
|
48602
48602
|
const dirs = path6.split("/").slice(0, -1).reduce((set, path7) => {
|
|
48603
48603
|
if (set.length) {
|
|
48604
|
-
path7 =
|
|
48604
|
+
path7 = join6(set[set.length - 1], path7);
|
|
48605
48605
|
}
|
|
48606
48606
|
set.push(path7 || "/");
|
|
48607
48607
|
return set;
|
|
@@ -48673,7 +48673,7 @@ var require_path_reservations = __commonJS({
|
|
|
48673
48673
|
paths = isWindows ? [
|
|
48674
48674
|
"win32 parallelization disabled"
|
|
48675
48675
|
] : paths.map((p2) => {
|
|
48676
|
-
return stripSlashes(
|
|
48676
|
+
return stripSlashes(join6(normalize4(p2))).toLowerCase();
|
|
48677
48677
|
});
|
|
48678
48678
|
const dirs = new Set(paths.map((path6) => getDirs(path6)).reduce((a2, b6) => a2.concat(b6)));
|
|
48679
48679
|
reservations.set(fn2, {
|
|
@@ -76108,25 +76108,31 @@ var COLOR_KEYS = [
|
|
|
76108
76108
|
// ../config-tools/src/utilities/get-default-config.ts
|
|
76109
76109
|
var import_node_fs11 = require("fs");
|
|
76110
76110
|
var import_promises6 = require("fs/promises");
|
|
76111
|
-
var
|
|
76111
|
+
var import_node_path7 = require("path");
|
|
76112
76112
|
|
|
76113
76113
|
// ../config-tools/src/utilities/correct-paths.ts
|
|
76114
76114
|
init_cjs_shims();
|
|
76115
|
-
var
|
|
76115
|
+
var import_node_path5 = require("path");
|
|
76116
|
+
var removeWindowsDriveLetter = /* @__PURE__ */ __name((osSpecificPath) => {
|
|
76117
|
+
return osSpecificPath.replace(/^[A-Z]:/, "");
|
|
76118
|
+
}, "removeWindowsDriveLetter");
|
|
76116
76119
|
var correctPaths = /* @__PURE__ */ __name((path6) => {
|
|
76117
76120
|
if (!path6) {
|
|
76118
76121
|
return "";
|
|
76119
76122
|
}
|
|
76120
|
-
if (
|
|
76121
|
-
path6
|
|
76123
|
+
if (path6.includes("\\")) {
|
|
76124
|
+
if (!path6.toUpperCase().startsWith("C:")) {
|
|
76125
|
+
path6 = `C:${path6}`;
|
|
76126
|
+
}
|
|
76127
|
+
return path6.replaceAll("/", "\\");
|
|
76122
76128
|
}
|
|
76123
|
-
return path6.
|
|
76129
|
+
return removeWindowsDriveLetter(path6).split("\\").join("/");
|
|
76124
76130
|
}, "correctPaths");
|
|
76125
76131
|
var joinPaths = /* @__PURE__ */ __name((...paths) => {
|
|
76126
76132
|
if (!paths || paths.length === 0) {
|
|
76127
76133
|
return "";
|
|
76128
76134
|
}
|
|
76129
|
-
return correctPaths((0,
|
|
76135
|
+
return correctPaths((0, import_node_path5.join)(...paths));
|
|
76130
76136
|
}, "joinPaths");
|
|
76131
76137
|
|
|
76132
76138
|
// ../config-tools/src/utilities/find-workspace-root.ts
|
|
@@ -76135,16 +76141,16 @@ init_cjs_shims();
|
|
|
76135
76141
|
// ../config-tools/src/utilities/find-up.ts
|
|
76136
76142
|
init_cjs_shims();
|
|
76137
76143
|
var import_node_fs10 = require("fs");
|
|
76138
|
-
var
|
|
76144
|
+
var import_node_path6 = require("path");
|
|
76139
76145
|
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
76140
76146
|
var depth = 0;
|
|
76141
76147
|
function findFolderUp(startPath, endFileNames) {
|
|
76142
76148
|
const _startPath = startPath ?? process.cwd();
|
|
76143
|
-
if (endFileNames.some((endFileName) => (0, import_node_fs10.existsSync)((0,
|
|
76149
|
+
if (endFileNames.some((endFileName) => (0, import_node_fs10.existsSync)((0, import_node_path6.join)(_startPath, endFileName)))) {
|
|
76144
76150
|
return _startPath;
|
|
76145
76151
|
}
|
|
76146
76152
|
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
|
|
76147
|
-
const parent = (0,
|
|
76153
|
+
const parent = (0, import_node_path6.join)(_startPath, "..");
|
|
76148
76154
|
return findFolderUp(parent, endFileNames);
|
|
76149
76155
|
}
|
|
76150
76156
|
return void 0;
|
|
@@ -76241,7 +76247,7 @@ var getDefaultConfig = /* @__PURE__ */ __name(async (root) => {
|
|
|
76241
76247
|
let namespace = void 0;
|
|
76242
76248
|
let repository = void 0;
|
|
76243
76249
|
const workspaceRoot = findWorkspaceRoot(root);
|
|
76244
|
-
if ((0, import_node_fs11.existsSync)((0,
|
|
76250
|
+
if ((0, import_node_fs11.existsSync)((0, import_node_path7.join)(workspaceRoot, "package.json"))) {
|
|
76245
76251
|
const file = await (0, import_promises6.readFile)(joinPaths(workspaceRoot, "package.json"), "utf8");
|
|
76246
76252
|
if (file) {
|
|
76247
76253
|
const packageJson = JSON.parse(file);
|
|
@@ -79934,7 +79940,7 @@ var LRUCache = class _LRUCache {
|
|
|
79934
79940
|
};
|
|
79935
79941
|
|
|
79936
79942
|
// ../../node_modules/.pnpm/path-scurry@2.0.0/node_modules/path-scurry/dist/esm/index.js
|
|
79937
|
-
var
|
|
79943
|
+
var import_node_path8 = require("path");
|
|
79938
79944
|
var import_node_url3 = require("url");
|
|
79939
79945
|
var import_fs = require("fs");
|
|
79940
79946
|
var actualFS = __toESM(require("fs"), 1);
|
|
@@ -81807,7 +81813,7 @@ var PathWin32 = class _PathWin32 extends PathBase {
|
|
|
81807
81813
|
* @internal
|
|
81808
81814
|
*/
|
|
81809
81815
|
getRootString(path6) {
|
|
81810
|
-
return
|
|
81816
|
+
return import_node_path8.win32.parse(path6).root;
|
|
81811
81817
|
}
|
|
81812
81818
|
/**
|
|
81813
81819
|
* @internal
|
|
@@ -82454,7 +82460,7 @@ var PathScurryWin32 = class extends PathScurryBase {
|
|
|
82454
82460
|
sep = "\\";
|
|
82455
82461
|
constructor(cwd3 = process.cwd(), opts = {}) {
|
|
82456
82462
|
const { nocase = true } = opts;
|
|
82457
|
-
super(cwd3,
|
|
82463
|
+
super(cwd3, import_node_path8.win32, "\\", {
|
|
82458
82464
|
...opts,
|
|
82459
82465
|
nocase
|
|
82460
82466
|
});
|
|
@@ -82467,7 +82473,7 @@ var PathScurryWin32 = class extends PathScurryBase {
|
|
|
82467
82473
|
* @internal
|
|
82468
82474
|
*/
|
|
82469
82475
|
parseRootPath(dir) {
|
|
82470
|
-
return
|
|
82476
|
+
return import_node_path8.win32.parse(dir).root.toUpperCase();
|
|
82471
82477
|
}
|
|
82472
82478
|
/**
|
|
82473
82479
|
* @internal
|
|
@@ -82494,7 +82500,7 @@ var PathScurryPosix = class extends PathScurryBase {
|
|
|
82494
82500
|
sep = "/";
|
|
82495
82501
|
constructor(cwd3 = process.cwd(), opts = {}) {
|
|
82496
82502
|
const { nocase = false } = opts;
|
|
82497
|
-
super(cwd3,
|
|
82503
|
+
super(cwd3, import_node_path8.posix, "/", {
|
|
82498
82504
|
...opts,
|
|
82499
82505
|
nocase
|
|
82500
82506
|
});
|
package/bin/untyped.js
CHANGED
|
@@ -2141,7 +2141,7 @@ var require_jiti = __commonJS({
|
|
|
2141
2141
|
if (0 === path2.length) return ".";
|
|
2142
2142
|
const isUNCPath = (path2 = normalizeWindowsPath(path2)).match(_UNC_REGEX), isPathAbsolute = isAbsolute(path2), trailingSeparator = "/" === path2[path2.length - 1];
|
|
2143
2143
|
return 0 === (path2 = normalizeString(path2, !isPathAbsolute)).length ? isPathAbsolute ? "/" : trailingSeparator ? "./" : "." : (trailingSeparator && (path2 += "/"), _DRIVE_LETTER_RE.test(path2) && (path2 += "/"), isUNCPath ? isPathAbsolute ? `//${path2}` : `//./${path2}` : isPathAbsolute && !isAbsolute(path2) ? `/${path2}` : path2);
|
|
2144
|
-
}, "pathe_ff20891b_normalize"),
|
|
2144
|
+
}, "pathe_ff20891b_normalize"), join5 = /* @__PURE__ */ __name(function(...arguments_) {
|
|
2145
2145
|
if (0 === arguments_.length) return ".";
|
|
2146
2146
|
let joined;
|
|
2147
2147
|
for (const argument of arguments_) argument && argument.length > 0 && (void 0 === joined ? joined = argument : joined += `/${argument}`);
|
|
@@ -2844,12 +2844,12 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
|
|
|
2844
2844
|
for (const [alias, to] of Object.entries(aliases)) {
|
|
2845
2845
|
if (!_path.startsWith(alias)) continue;
|
|
2846
2846
|
const _alias = utils_hasTrailingSlash(alias) ? alias.slice(0, -1) : alias;
|
|
2847
|
-
if (utils_hasTrailingSlash(_path[_alias.length])) return
|
|
2847
|
+
if (utils_hasTrailingSlash(_path[_alias.length])) return join5(to, _path.slice(alias.length));
|
|
2848
2848
|
}
|
|
2849
2849
|
return _path;
|
|
2850
2850
|
}(id, ctx.alias));
|
|
2851
2851
|
let parentURL = options?.parentURL || ctx.url;
|
|
2852
|
-
isDir(parentURL) && (parentURL =
|
|
2852
|
+
isDir(parentURL) && (parentURL = join5(parentURL, "_index.js"));
|
|
2853
2853
|
const conditionSets = (options?.async ? [options?.conditions, ["node", "import"], ["node", "require"]] : [options?.conditions, ["node", "require"], ["node", "import"]]).filter(Boolean);
|
|
2854
2854
|
for (const conditions of conditionSets) {
|
|
2855
2855
|
try {
|
|
@@ -2933,7 +2933,7 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
|
|
|
2933
2933
|
return path2.match(FILENAME_RE)?.[2];
|
|
2934
2934
|
}(topts.filename)}` + (ctx.opts.sourceMaps ? "+map" : "") + (topts.interopDefault ? ".i" : "") + `.${md5(topts.filename)}` + (topts.async ? ".mjs" : ".cjs");
|
|
2935
2935
|
topts.jsx && topts.filename.endsWith("x") && (cacheName += "x");
|
|
2936
|
-
const cacheDir = ctx.opts.fsCache, cacheFilePath =
|
|
2936
|
+
const cacheDir = ctx.opts.fsCache, cacheFilePath = join5(cacheDir, cacheName);
|
|
2937
2937
|
if ((0, external_node_fs_namespaceObject.existsSync)(cacheFilePath)) {
|
|
2938
2938
|
const cacheSource = (0, external_node_fs_namespaceObject.readFileSync)(cacheFilePath, "utf8");
|
|
2939
2939
|
if (cacheSource.endsWith(sourceHash)) return debug(ctx, "[cache]", "[hit]", topts.filename, "~>", cacheFilePath), cacheSource;
|
|
@@ -2946,13 +2946,13 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
|
|
|
2946
2946
|
function prepareCacheDir(ctx) {
|
|
2947
2947
|
if (true === ctx.opts.fsCache && (ctx.opts.fsCache = function(ctx2) {
|
|
2948
2948
|
const nmDir = ctx2.filename && resolve3(ctx2.filename, "../node_modules");
|
|
2949
|
-
if (nmDir && (0, external_node_fs_namespaceObject.existsSync)(nmDir)) return
|
|
2949
|
+
if (nmDir && (0, external_node_fs_namespaceObject.existsSync)(nmDir)) return join5(nmDir, ".cache/jiti");
|
|
2950
2950
|
let _tmpDir = (0, external_node_os_namespaceObject.tmpdir)();
|
|
2951
2951
|
if (process.env.TMPDIR && _tmpDir === process.cwd() && !process.env.JITI_RESPECT_TMPDIR_ENV) {
|
|
2952
2952
|
const _env = process.env.TMPDIR;
|
|
2953
2953
|
delete process.env.TMPDIR, _tmpDir = (0, external_node_os_namespaceObject.tmpdir)(), process.env.TMPDIR = _env;
|
|
2954
2954
|
}
|
|
2955
|
-
return
|
|
2955
|
+
return join5(_tmpDir, "jiti");
|
|
2956
2956
|
}(ctx)), ctx.opts.fsCache) try {
|
|
2957
2957
|
if ((0, external_node_fs_namespaceObject.mkdirSync)(ctx.opts.fsCache, { recursive: true }), !function(filename) {
|
|
2958
2958
|
try {
|
|
@@ -2977,9 +2977,9 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
|
|
|
2977
2977
|
function eval_evalModule(ctx, source, evalOptions = {}) {
|
|
2978
2978
|
const id = evalOptions.id || (evalOptions.filename ? basename2(evalOptions.filename) : `_jitiEval.${evalOptions.ext || (evalOptions.async ? "mjs" : "js")}`), filename = evalOptions.filename || jitiResolve(ctx, id, { async: evalOptions.async }), ext2 = evalOptions.ext || extname2(filename), cache2 = evalOptions.cache || ctx.parentCache || {}, isTypescript = /\.[cm]?tsx?$/.test(ext2), isESM = ".mjs" === ext2 || ".js" === ext2 && "module" === function(path2) {
|
|
2979
2979
|
for (; path2 && "." !== path2 && "/" !== path2; ) {
|
|
2980
|
-
path2 =
|
|
2980
|
+
path2 = join5(path2, "..");
|
|
2981
2981
|
try {
|
|
2982
|
-
const pkg = (0, external_node_fs_namespaceObject.readFileSync)(
|
|
2982
|
+
const pkg = (0, external_node_fs_namespaceObject.readFileSync)(join5(path2, "package.json"), "utf8");
|
|
2983
2983
|
try {
|
|
2984
2984
|
return JSON.parse(pkg);
|
|
2985
2985
|
} catch {
|
|
@@ -3045,7 +3045,7 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
|
|
|
3045
3045
|
const deprecatOverrides = {};
|
|
3046
3046
|
return void 0 !== userOptions2.cache && (deprecatOverrides.fsCache = userOptions2.cache), void 0 !== userOptions2.requireCache && (deprecatOverrides.moduleCache = userOptions2.requireCache), { ...jitiDefaults, ...deprecatOverrides, ...userOptions2 };
|
|
3047
3047
|
}(userOptions), alias = opts.alias && Object.keys(opts.alias).length > 0 ? normalizeAliases(opts.alias || {}) : void 0, nativeModules = ["typescript", "jiti", ...opts.nativeModules || []], isNativeRe = new RegExp(`node_modules/(${nativeModules.map((m) => escapeStringRegexp(m)).join("|")})/`), transformModules = [...opts.transformModules || []], isTransformRe = new RegExp(`node_modules/(${transformModules.map((m) => escapeStringRegexp(m)).join("|")})/`);
|
|
3048
|
-
filename || (filename = process.cwd()), !isNested && isDir(filename) && (filename =
|
|
3048
|
+
filename || (filename = process.cwd()), !isNested && isDir(filename) && (filename = join5(filename, "_index.js"));
|
|
3049
3049
|
const url = pathToFileURL(filename), additionalExts = [...opts.extensions].filter((ext2) => ".js" !== ext2), nativeRequire = parentContext.createRequire(isWindows ? filename.replace(/\//g, "\\") : filename), ctx = { filename, url, opts, alias, nativeModules, transformModules, isNativeRe, isTransformRe, additionalExts, nativeRequire, onError: parentContext.onError, parentModule: parentContext.parentModule, parentCache: parentContext.parentCache, nativeImport: parentContext.nativeImport, createRequire: parentContext.createRequire };
|
|
3050
3050
|
isNested || debug(ctx, "[init]", ...[["version:", package_namespaceObject.rE], ["module-cache:", opts.moduleCache], ["fs-cache:", opts.fsCache], ["interop-defaults:", opts.interopDefault]].flat()), isNested || prepareCacheDir(ctx);
|
|
3051
3051
|
const jiti = Object.assign(function(id) {
|
|
@@ -41249,25 +41249,31 @@ var COLOR_KEYS = [
|
|
|
41249
41249
|
// ../config-tools/src/utilities/get-default-config.ts
|
|
41250
41250
|
import { existsSync as existsSync4 } from "node:fs";
|
|
41251
41251
|
import { readFile as readFile2 } from "node:fs/promises";
|
|
41252
|
-
import { join as
|
|
41252
|
+
import { join as join4 } from "node:path";
|
|
41253
41253
|
|
|
41254
41254
|
// ../config-tools/src/utilities/correct-paths.ts
|
|
41255
41255
|
init_esm_shims();
|
|
41256
|
-
import {
|
|
41256
|
+
import { join as join2 } from "node:path";
|
|
41257
|
+
var removeWindowsDriveLetter = /* @__PURE__ */ __name((osSpecificPath) => {
|
|
41258
|
+
return osSpecificPath.replace(/^[A-Z]:/, "");
|
|
41259
|
+
}, "removeWindowsDriveLetter");
|
|
41257
41260
|
var correctPaths = /* @__PURE__ */ __name((path2) => {
|
|
41258
41261
|
if (!path2) {
|
|
41259
41262
|
return "";
|
|
41260
41263
|
}
|
|
41261
|
-
if (
|
|
41262
|
-
path2
|
|
41264
|
+
if (path2.includes("\\")) {
|
|
41265
|
+
if (!path2.toUpperCase().startsWith("C:")) {
|
|
41266
|
+
path2 = `C:${path2}`;
|
|
41267
|
+
}
|
|
41268
|
+
return path2.replaceAll("/", "\\");
|
|
41263
41269
|
}
|
|
41264
|
-
return path2.
|
|
41270
|
+
return removeWindowsDriveLetter(path2).split("\\").join("/");
|
|
41265
41271
|
}, "correctPaths");
|
|
41266
41272
|
var joinPaths = /* @__PURE__ */ __name((...paths) => {
|
|
41267
41273
|
if (!paths || paths.length === 0) {
|
|
41268
41274
|
return "";
|
|
41269
41275
|
}
|
|
41270
|
-
return correctPaths(
|
|
41276
|
+
return correctPaths(join2(...paths));
|
|
41271
41277
|
}, "joinPaths");
|
|
41272
41278
|
|
|
41273
41279
|
// ../config-tools/src/utilities/find-workspace-root.ts
|
|
@@ -41276,16 +41282,16 @@ init_esm_shims();
|
|
|
41276
41282
|
// ../config-tools/src/utilities/find-up.ts
|
|
41277
41283
|
init_esm_shims();
|
|
41278
41284
|
import { existsSync as existsSync3 } from "node:fs";
|
|
41279
|
-
import { join as
|
|
41285
|
+
import { join as join3 } from "node:path";
|
|
41280
41286
|
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
41281
41287
|
var depth = 0;
|
|
41282
41288
|
function findFolderUp(startPath, endFileNames) {
|
|
41283
41289
|
const _startPath = startPath ?? process.cwd();
|
|
41284
|
-
if (endFileNames.some((endFileName) => existsSync3(
|
|
41290
|
+
if (endFileNames.some((endFileName) => existsSync3(join3(_startPath, endFileName)))) {
|
|
41285
41291
|
return _startPath;
|
|
41286
41292
|
}
|
|
41287
41293
|
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
|
|
41288
|
-
const parent =
|
|
41294
|
+
const parent = join3(_startPath, "..");
|
|
41289
41295
|
return findFolderUp(parent, endFileNames);
|
|
41290
41296
|
}
|
|
41291
41297
|
return void 0;
|
|
@@ -41382,7 +41388,7 @@ var getDefaultConfig = /* @__PURE__ */ __name(async (root) => {
|
|
|
41382
41388
|
let namespace = void 0;
|
|
41383
41389
|
let repository = void 0;
|
|
41384
41390
|
const workspaceRoot = findWorkspaceRoot(root);
|
|
41385
|
-
if (existsSync4(
|
|
41391
|
+
if (existsSync4(join4(workspaceRoot, "package.json"))) {
|
|
41386
41392
|
const file = await readFile2(joinPaths(workspaceRoot, "package.json"), "utf8");
|
|
41387
41393
|
if (file) {
|
|
41388
41394
|
const packageJson = JSON.parse(file);
|
|
@@ -45,21 +45,27 @@ init_esm_shims();
|
|
|
45
45
|
|
|
46
46
|
// ../config-tools/src/utilities/correct-paths.ts
|
|
47
47
|
init_esm_shims();
|
|
48
|
-
import {
|
|
48
|
+
import { join } from "node:path";
|
|
49
|
+
var removeWindowsDriveLetter = /* @__PURE__ */ __name((osSpecificPath) => {
|
|
50
|
+
return osSpecificPath.replace(/^[A-Z]:/, "");
|
|
51
|
+
}, "removeWindowsDriveLetter");
|
|
49
52
|
var correctPaths = /* @__PURE__ */ __name((path) => {
|
|
50
53
|
if (!path) {
|
|
51
54
|
return "";
|
|
52
55
|
}
|
|
53
|
-
if (
|
|
54
|
-
path
|
|
56
|
+
if (path.includes("\\")) {
|
|
57
|
+
if (!path.toUpperCase().startsWith("C:")) {
|
|
58
|
+
path = `C:${path}`;
|
|
59
|
+
}
|
|
60
|
+
return path.replaceAll("/", "\\");
|
|
55
61
|
}
|
|
56
|
-
return path.
|
|
62
|
+
return removeWindowsDriveLetter(path).split("\\").join("/");
|
|
57
63
|
}, "correctPaths");
|
|
58
64
|
var joinPaths = /* @__PURE__ */ __name((...paths) => {
|
|
59
65
|
if (!paths || paths.length === 0) {
|
|
60
66
|
return "";
|
|
61
67
|
}
|
|
62
|
-
return correctPaths(
|
|
68
|
+
return correctPaths(join(...paths));
|
|
63
69
|
}, "joinPaths");
|
|
64
70
|
|
|
65
71
|
// src/utilities.ts
|
|
@@ -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 _chunkXFMXMHTDcjs = require('./chunk-XFMXMHTD.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkD7L4X6XIcjs = require('./chunk-D7L4X6XI.cjs');
|
|
10
10
|
|
|
11
11
|
// src/generators/markdown.ts
|
|
12
|
-
|
|
12
|
+
_chunkD7L4X6XIcjs.init_cjs_shims.call(void 0, );
|
|
13
13
|
var _promises = require('fs/promises');
|
|
14
14
|
function generateMarkdown(schema) {
|
|
15
15
|
return `
|
|
@@ -20,7 +20,7 @@ ${generateMarkdownLevel(schema, schema.title || "", "#").join("\n")}
|
|
|
20
20
|
|
|
21
21
|
`;
|
|
22
22
|
}
|
|
23
|
-
|
|
23
|
+
_chunkD7L4X6XIcjs.__name.call(void 0, generateMarkdown, "generateMarkdown");
|
|
24
24
|
function generateMarkdownLevel(schema, title, level) {
|
|
25
25
|
const lines = [];
|
|
26
26
|
lines.push(`${level} ${title}`);
|
|
@@ -44,14 +44,14 @@ function generateMarkdownLevel(schema, title, level) {
|
|
|
44
44
|
}
|
|
45
45
|
return lines;
|
|
46
46
|
}
|
|
47
|
-
|
|
47
|
+
_chunkD7L4X6XIcjs.__name.call(void 0, generateMarkdownLevel, "generateMarkdownLevel");
|
|
48
48
|
function generateMarkdownFile(schema, file, config) {
|
|
49
49
|
try {
|
|
50
|
-
const declarations =
|
|
51
|
-
|
|
50
|
+
const declarations = _chunkD7L4X6XIcjs.getOutputFile.call(void 0, file, "md");
|
|
51
|
+
_chunkXFMXMHTDcjs.writeTrace.call(void 0, `Writing type markdown file ${declarations}`, config);
|
|
52
52
|
return _promises.writeFile.call(void 0, declarations, generateMarkdown(schema));
|
|
53
53
|
} catch (error) {
|
|
54
|
-
|
|
54
|
+
_chunkXFMXMHTDcjs.writeError.call(void 0, `Error writing markdown file for ${file.name}
|
|
55
55
|
|
|
56
56
|
Error:
|
|
57
57
|
${_optionalChain([error, 'optionalAccess', _ => _.message]) ? error.message : JSON.stringify(error)}${_optionalChain([error, 'optionalAccess', _2 => _2.stack]) ? `
|
|
@@ -63,7 +63,7 @@ ${JSON.stringify(schema)}
|
|
|
63
63
|
throw error;
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
|
|
66
|
+
_chunkD7L4X6XIcjs.__name.call(void 0, generateMarkdownFile, "generateMarkdownFile");
|
|
67
67
|
|
|
68
68
|
|
|
69
69
|
|
|
@@ -45,21 +45,27 @@ init_cjs_shims();
|
|
|
45
45
|
|
|
46
46
|
// ../config-tools/src/utilities/correct-paths.ts
|
|
47
47
|
init_cjs_shims();
|
|
48
|
-
var
|
|
48
|
+
var _path = require('path');
|
|
49
|
+
var removeWindowsDriveLetter = /* @__PURE__ */ __name((osSpecificPath) => {
|
|
50
|
+
return osSpecificPath.replace(/^[A-Z]:/, "");
|
|
51
|
+
}, "removeWindowsDriveLetter");
|
|
49
52
|
var correctPaths = /* @__PURE__ */ __name((path) => {
|
|
50
53
|
if (!path) {
|
|
51
54
|
return "";
|
|
52
55
|
}
|
|
53
|
-
if (
|
|
54
|
-
path
|
|
56
|
+
if (path.includes("\\")) {
|
|
57
|
+
if (!path.toUpperCase().startsWith("C:")) {
|
|
58
|
+
path = `C:${path}`;
|
|
59
|
+
}
|
|
60
|
+
return path.replaceAll("/", "\\");
|
|
55
61
|
}
|
|
56
|
-
return path.
|
|
62
|
+
return removeWindowsDriveLetter(path).split("\\").join("/");
|
|
57
63
|
}, "correctPaths");
|
|
58
64
|
var joinPaths = /* @__PURE__ */ __name((...paths) => {
|
|
59
65
|
if (!paths || paths.length === 0) {
|
|
60
66
|
return "";
|
|
61
67
|
}
|
|
62
|
-
return correctPaths(
|
|
68
|
+
return correctPaths(_path.join.call(void 0, ...paths));
|
|
63
69
|
}, "joinPaths");
|
|
64
70
|
|
|
65
71
|
// src/utilities.ts
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
writeError,
|
|
3
3
|
writeTrace
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-CFOAJWAE.js";
|
|
5
5
|
import {
|
|
6
6
|
__name,
|
|
7
7
|
getOutputFile,
|
|
8
8
|
init_esm_shims
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-2MAJIAMM.js";
|
|
10
10
|
|
|
11
11
|
// src/generators/dts.ts
|
|
12
12
|
init_esm_shims();
|
|
@@ -1,23 +1,23 @@
|
|
|
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 _chunkXFMXMHTDcjs = require('./chunk-XFMXMHTD.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkD7L4X6XIcjs = require('./chunk-D7L4X6XI.cjs');
|
|
10
10
|
|
|
11
11
|
// src/generators/json-schema.ts
|
|
12
|
-
|
|
12
|
+
_chunkD7L4X6XIcjs.init_cjs_shims.call(void 0, );
|
|
13
13
|
var _promises = require('fs/promises');
|
|
14
14
|
function generateJsonSchemaFile(schema, file, config) {
|
|
15
15
|
try {
|
|
16
|
-
const jsonSchema =
|
|
17
|
-
|
|
16
|
+
const jsonSchema = _chunkD7L4X6XIcjs.getOutputFile.call(void 0, file, "json");
|
|
17
|
+
_chunkXFMXMHTDcjs.writeTrace.call(void 0, `Writing JSON schema file ${jsonSchema}`, config);
|
|
18
18
|
return _promises.writeFile.call(void 0, jsonSchema, JSON.stringify(schema, null, 2));
|
|
19
19
|
} catch (error) {
|
|
20
|
-
|
|
20
|
+
_chunkXFMXMHTDcjs.writeError.call(void 0, `Error writing JSON schema file for ${file.name}
|
|
21
21
|
|
|
22
22
|
Error:
|
|
23
23
|
${_optionalChain([error, 'optionalAccess', _ => _.message]) ? error.message : JSON.stringify(error)}${_optionalChain([error, 'optionalAccess', _2 => _2.stack]) ? `
|
|
@@ -29,7 +29,7 @@ ${JSON.stringify(schema)}
|
|
|
29
29
|
throw error;
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
|
|
32
|
+
_chunkD7L4X6XIcjs.__name.call(void 0, generateJsonSchemaFile, "generateJsonSchemaFile");
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
|