@storm-software/untyped 0.10.9 → 0.10.11
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 +1352 -20943
- package/bin/untyped.js +1350 -20941
- package/dist/{chunk-QKT2QMKJ.cjs → chunk-2F6YHVL3.cjs} +7 -7
- package/dist/chunk-2TJERUMJ.cjs +6 -0
- package/dist/chunk-4GFAGAHI.js +73 -0
- package/dist/chunk-65OTCZZV.cjs +73 -0
- package/dist/{chunk-ZRWTUFWM.js → chunk-AQVE6XZK.js} +2 -2
- package/dist/{chunk-ZMD64DNM.cjs → chunk-B75SC6IV.cjs} +8 -8
- package/dist/chunk-BTRJB2UN.js +194 -0
- package/dist/chunk-F5WNAG3D.cjs +194 -0
- package/dist/{chunk-CFOAJWAE.js → chunk-FBUO2VZ3.js} +1 -1
- package/dist/{chunk-XFMXMHTD.cjs → chunk-GIXTWFTH.cjs} +202 -202
- package/dist/{chunk-EEKAGW4F.js → chunk-ISJA5MP7.js} +1 -1
- package/dist/{chunk-MNZPWZ6S.js → chunk-JGPO2ACZ.js} +2 -2
- package/dist/{chunk-ZLUCZD2A.js → chunk-TQHCRCMQ.js} +2 -2
- package/dist/{chunk-ATFT6DWG.cjs → chunk-TYQJMJQO.cjs} +9 -9
- 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-2MAJIAMM.js +0 -91
- package/dist/chunk-D7L4X6XI.cjs +0 -91
- package/dist/chunk-YIYV24YP.cjs +0 -6
- package/dist/chunk-ZN2NO4H2.js +0 -6884
- package/dist/chunk-ZXDL4C5R.cjs +0 -6884
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
writeError,
|
|
3
3
|
writeTrace
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-FBUO2VZ3.js";
|
|
5
5
|
import {
|
|
6
6
|
__name,
|
|
7
7
|
getOutputFile,
|
|
8
8
|
init_esm_shims
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-BTRJB2UN.js";
|
|
10
10
|
|
|
11
11
|
// src/generators/dts.ts
|
|
12
12
|
init_esm_shims();
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
writeError,
|
|
3
3
|
writeTrace
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-FBUO2VZ3.js";
|
|
5
5
|
import {
|
|
6
6
|
__name,
|
|
7
7
|
getOutputFile,
|
|
8
8
|
init_esm_shims
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-BTRJB2UN.js";
|
|
10
10
|
|
|
11
11
|
// src/generators/markdown.ts
|
|
12
12
|
init_esm_shims();
|
|
@@ -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 _chunkGIXTWFTHcjs = require('./chunk-GIXTWFTH.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkF5WNAG3Dcjs = require('./chunk-F5WNAG3D.cjs');
|
|
10
10
|
|
|
11
11
|
// src/generators/markdown.ts
|
|
12
|
-
|
|
12
|
+
_chunkF5WNAG3Dcjs.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
|
+
_chunkF5WNAG3Dcjs.__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
|
+
_chunkF5WNAG3Dcjs.__name.call(void 0, generateMarkdownLevel, "generateMarkdownLevel");
|
|
48
48
|
function generateMarkdownFile(schema, file, config) {
|
|
49
49
|
try {
|
|
50
|
-
const declarations =
|
|
51
|
-
|
|
50
|
+
const declarations = _chunkF5WNAG3Dcjs.getOutputFile.call(void 0, file, "md");
|
|
51
|
+
_chunkGIXTWFTHcjs.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
|
+
_chunkGIXTWFTHcjs.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
|
+
_chunkF5WNAG3Dcjs.__name.call(void 0, generateMarkdownFile, "generateMarkdownFile");
|
|
67
67
|
|
|
68
68
|
|
|
69
69
|
|
package/dist/generate.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
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-
|
|
3
|
+
var _chunk65OTCZZVcjs = require('./chunk-65OTCZZV.cjs');
|
|
4
|
+
require('./chunk-B75SC6IV.cjs');
|
|
5
|
+
require('./chunk-2F6YHVL3.cjs');
|
|
6
|
+
require('./chunk-TYQJMJQO.cjs');
|
|
7
|
+
require('./chunk-GIXTWFTH.cjs');
|
|
8
|
+
require('./chunk-F5WNAG3D.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
exports.getGenerateAction =
|
|
11
|
+
exports.getGenerateAction = _chunk65OTCZZVcjs.getGenerateAction;
|
package/dist/generate.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getGenerateAction
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-4GFAGAHI.js";
|
|
4
|
+
import "./chunk-JGPO2ACZ.js";
|
|
5
|
+
import "./chunk-AQVE6XZK.js";
|
|
6
|
+
import "./chunk-TQHCRCMQ.js";
|
|
7
|
+
import "./chunk-FBUO2VZ3.js";
|
|
8
|
+
import "./chunk-BTRJB2UN.js";
|
|
9
9
|
export {
|
|
10
10
|
getGenerateAction
|
|
11
11
|
};
|
package/dist/index.cjs
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var _chunk65OTCZZVcjs = require('./chunk-65OTCZZV.cjs');
|
|
4
|
+
require('./chunk-2TJERUMJ.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkB75SC6IVcjs = require('./chunk-B75SC6IV.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunk2F6YHVL3cjs = require('./chunk-2F6YHVL3.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
16
|
-
require('./chunk-
|
|
15
|
+
var _chunkTYQJMJQOcjs = require('./chunk-TYQJMJQO.cjs');
|
|
16
|
+
require('./chunk-GIXTWFTH.cjs');
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunkF5WNAG3Dcjs = require('./chunk-F5WNAG3D.cjs');
|
|
21
21
|
|
|
22
22
|
// src/index.ts
|
|
23
|
-
|
|
23
|
+
_chunkF5WNAG3Dcjs.init_cjs_shims.call(void 0, );
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
@@ -29,4 +29,4 @@ _chunkD7L4X6XIcjs.init_cjs_shims.call(void 0, );
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
exports.generateDeclaration =
|
|
32
|
+
exports.generateDeclaration = _chunkB75SC6IVcjs.generateDeclaration; exports.generateDeclarationFile = _chunkB75SC6IVcjs.generateDeclarationFile; exports.generateJsonSchemaFile = _chunk2F6YHVL3cjs.generateJsonSchemaFile; exports.generateMarkdown = _chunkTYQJMJQOcjs.generateMarkdown; exports.generateMarkdownFile = _chunkTYQJMJQOcjs.generateMarkdownFile; exports.getGenerateAction = _chunk65OTCZZVcjs.getGenerateAction; exports.getOutputFile = _chunkF5WNAG3Dcjs.getOutputFile;
|
package/dist/index.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getGenerateAction
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-4GFAGAHI.js";
|
|
4
|
+
import "./chunk-ISJA5MP7.js";
|
|
5
5
|
import {
|
|
6
6
|
generateDeclaration,
|
|
7
7
|
generateDeclarationFile
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-JGPO2ACZ.js";
|
|
9
9
|
import {
|
|
10
10
|
generateJsonSchemaFile
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-AQVE6XZK.js";
|
|
12
12
|
import {
|
|
13
13
|
generateMarkdown,
|
|
14
14
|
generateMarkdownFile
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-TQHCRCMQ.js";
|
|
16
|
+
import "./chunk-FBUO2VZ3.js";
|
|
17
17
|
import {
|
|
18
18
|
getOutputFile,
|
|
19
19
|
init_esm_shims
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-BTRJB2UN.js";
|
|
21
21
|
|
|
22
22
|
// src/index.ts
|
|
23
23
|
init_esm_shims();
|
package/dist/utilities.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkF5WNAG3Dcjs = require('./chunk-F5WNAG3D.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
exports.getOutputFile =
|
|
6
|
+
exports.getOutputFile = _chunkF5WNAG3Dcjs.getOutputFile;
|
package/dist/utilities.js
CHANGED
package/package.json
CHANGED
package/dist/chunk-2MAJIAMM.js
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
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 __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
9
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
10
|
-
}) : x)(function(x) {
|
|
11
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
12
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
13
|
-
});
|
|
14
|
-
var __esm = (fn, res) => function __init() {
|
|
15
|
-
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
16
|
-
};
|
|
17
|
-
var __commonJS = (cb, mod) => function __require2() {
|
|
18
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
19
|
-
};
|
|
20
|
-
var __copyProps = (to, from, except, desc) => {
|
|
21
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
22
|
-
for (let key of __getOwnPropNames(from))
|
|
23
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
24
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
25
|
-
}
|
|
26
|
-
return to;
|
|
27
|
-
};
|
|
28
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
29
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
30
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
31
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
32
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
33
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
34
|
-
mod
|
|
35
|
-
));
|
|
36
|
-
|
|
37
|
-
// ../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.49.1_@types+node@22.10.7__@swc+core@1.7.26_@swc+helpers_ekim6y52mwpq6ssxiprcp44dam/node_modules/tsup/assets/esm_shims.js
|
|
38
|
-
var init_esm_shims = __esm({
|
|
39
|
-
"../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.49.1_@types+node@22.10.7__@swc+core@1.7.26_@swc+helpers_ekim6y52mwpq6ssxiprcp44dam/node_modules/tsup/assets/esm_shims.js"() {
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
// src/utilities.ts
|
|
44
|
-
init_esm_shims();
|
|
45
|
-
|
|
46
|
-
// ../config-tools/src/utilities/correct-paths.ts
|
|
47
|
-
init_esm_shims();
|
|
48
|
-
import { join } from "node:path";
|
|
49
|
-
var removeWindowsDriveLetter = /* @__PURE__ */ __name((osSpecificPath) => {
|
|
50
|
-
return osSpecificPath.replace(/^[A-Z]:/, "");
|
|
51
|
-
}, "removeWindowsDriveLetter");
|
|
52
|
-
var correctPaths = /* @__PURE__ */ __name((path) => {
|
|
53
|
-
if (!path) {
|
|
54
|
-
return "";
|
|
55
|
-
}
|
|
56
|
-
if (path.includes("\\")) {
|
|
57
|
-
if (!path.toUpperCase().startsWith("C:")) {
|
|
58
|
-
path = `C:${path}`;
|
|
59
|
-
}
|
|
60
|
-
return path.replaceAll("/", "\\");
|
|
61
|
-
}
|
|
62
|
-
return removeWindowsDriveLetter(path).split("\\").join("/");
|
|
63
|
-
}, "correctPaths");
|
|
64
|
-
var joinPaths = /* @__PURE__ */ __name((...paths) => {
|
|
65
|
-
if (!paths || paths.length === 0) {
|
|
66
|
-
return "";
|
|
67
|
-
}
|
|
68
|
-
return correctPaths(join(...paths));
|
|
69
|
-
}, "joinPaths");
|
|
70
|
-
|
|
71
|
-
// src/utilities.ts
|
|
72
|
-
var getOutputFile = /* @__PURE__ */ __name((file, extension) => {
|
|
73
|
-
let fileName = file.name.slice(0, file.name.lastIndexOf(".")).replace(".untyped", "").replace("untyped", "").replace(".schema", "").replace("schema", "");
|
|
74
|
-
if (!fileName) {
|
|
75
|
-
fileName = "schema";
|
|
76
|
-
}
|
|
77
|
-
if (fileName !== "schema") {
|
|
78
|
-
fileName = `${fileName}.schema`;
|
|
79
|
-
}
|
|
80
|
-
return joinPaths(file.parentPath, `${fileName}.${extension}`);
|
|
81
|
-
}, "getOutputFile");
|
|
82
|
-
|
|
83
|
-
export {
|
|
84
|
-
__name,
|
|
85
|
-
__require,
|
|
86
|
-
__commonJS,
|
|
87
|
-
__toESM,
|
|
88
|
-
init_esm_shims,
|
|
89
|
-
joinPaths,
|
|
90
|
-
getOutputFile
|
|
91
|
-
};
|
package/dist/chunk-D7L4X6XI.cjs
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
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 __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
9
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
10
|
-
}) : x)(function(x) {
|
|
11
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
12
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
13
|
-
});
|
|
14
|
-
var __esm = (fn, res) => function __init() {
|
|
15
|
-
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
16
|
-
};
|
|
17
|
-
var __commonJS = (cb, mod) => function __require2() {
|
|
18
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
19
|
-
};
|
|
20
|
-
var __copyProps = (to, from, except, desc) => {
|
|
21
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
22
|
-
for (let key of __getOwnPropNames(from))
|
|
23
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
24
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
25
|
-
}
|
|
26
|
-
return to;
|
|
27
|
-
};
|
|
28
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
29
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
30
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
31
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
32
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
33
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
34
|
-
mod
|
|
35
|
-
));
|
|
36
|
-
|
|
37
|
-
// ../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.49.1_@types+node@22.10.7__@swc+core@1.7.26_@swc+helpers_ekim6y52mwpq6ssxiprcp44dam/node_modules/tsup/assets/cjs_shims.js
|
|
38
|
-
var init_cjs_shims = __esm({
|
|
39
|
-
"../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.49.1_@types+node@22.10.7__@swc+core@1.7.26_@swc+helpers_ekim6y52mwpq6ssxiprcp44dam/node_modules/tsup/assets/cjs_shims.js"() {
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
// src/utilities.ts
|
|
44
|
-
init_cjs_shims();
|
|
45
|
-
|
|
46
|
-
// ../config-tools/src/utilities/correct-paths.ts
|
|
47
|
-
init_cjs_shims();
|
|
48
|
-
var _path = require('path');
|
|
49
|
-
var removeWindowsDriveLetter = /* @__PURE__ */ __name((osSpecificPath) => {
|
|
50
|
-
return osSpecificPath.replace(/^[A-Z]:/, "");
|
|
51
|
-
}, "removeWindowsDriveLetter");
|
|
52
|
-
var correctPaths = /* @__PURE__ */ __name((path) => {
|
|
53
|
-
if (!path) {
|
|
54
|
-
return "";
|
|
55
|
-
}
|
|
56
|
-
if (path.includes("\\")) {
|
|
57
|
-
if (!path.toUpperCase().startsWith("C:")) {
|
|
58
|
-
path = `C:${path}`;
|
|
59
|
-
}
|
|
60
|
-
return path.replaceAll("/", "\\");
|
|
61
|
-
}
|
|
62
|
-
return removeWindowsDriveLetter(path).split("\\").join("/");
|
|
63
|
-
}, "correctPaths");
|
|
64
|
-
var joinPaths = /* @__PURE__ */ __name((...paths) => {
|
|
65
|
-
if (!paths || paths.length === 0) {
|
|
66
|
-
return "";
|
|
67
|
-
}
|
|
68
|
-
return correctPaths(_path.join.call(void 0, ...paths));
|
|
69
|
-
}, "joinPaths");
|
|
70
|
-
|
|
71
|
-
// src/utilities.ts
|
|
72
|
-
var getOutputFile = /* @__PURE__ */ __name((file, extension) => {
|
|
73
|
-
let fileName = file.name.slice(0, file.name.lastIndexOf(".")).replace(".untyped", "").replace("untyped", "").replace(".schema", "").replace("schema", "");
|
|
74
|
-
if (!fileName) {
|
|
75
|
-
fileName = "schema";
|
|
76
|
-
}
|
|
77
|
-
if (fileName !== "schema") {
|
|
78
|
-
fileName = `${fileName}.schema`;
|
|
79
|
-
}
|
|
80
|
-
return joinPaths(file.parentPath, `${fileName}.${extension}`);
|
|
81
|
-
}, "getOutputFile");
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
exports.__name = __name; exports.__require = __require; exports.__commonJS = __commonJS; exports.__toESM = __toESM; exports.init_cjs_shims = init_cjs_shims; exports.joinPaths = joinPaths; exports.getOutputFile = getOutputFile;
|