@vercube/devkit 0.0.2-beta.1 → 0.0.2
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/dist/index.cjs +55 -122
- package/dist/index.mjs +35 -102
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -39,7 +39,6 @@ const node_querystring = __toESM(require("node:querystring"));
|
|
|
39
39
|
const node_url = __toESM(require("node:url"));
|
|
40
40
|
const consola = __toESM(require("consola"));
|
|
41
41
|
const node_child_process = __toESM(require("node:child_process"));
|
|
42
|
-
const node_tty = __toESM(require("node:tty"));
|
|
43
42
|
|
|
44
43
|
//#region packages/devkit/src/Common/App.ts
|
|
45
44
|
/**
|
|
@@ -56,10 +55,13 @@ async function createVercube() {
|
|
|
56
55
|
}
|
|
57
56
|
|
|
58
57
|
//#endregion
|
|
59
|
-
//#region node_modules/.pnpm/unplugin-isolated-decl@0.13.
|
|
58
|
+
//#region node_modules/.pnpm/unplugin-isolated-decl@0.13.9_@swc+core@1.11.21_@swc+helpers@0.5.17__typescript@5.8.3/node_modules/unplugin-isolated-decl/dist/transformer-CiAWE027.js
|
|
60
59
|
function tryImport(pkg) {
|
|
61
60
|
return import(pkg).catch(() => null);
|
|
62
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* Transform isolated declarations with `oxc-transform`.
|
|
64
|
+
*/
|
|
63
65
|
async function oxcTransform(id, code, transformOptions) {
|
|
64
66
|
const oxc = await tryImport("oxc-transform");
|
|
65
67
|
if (!oxc) return {
|
|
@@ -73,6 +75,9 @@ async function oxcTransform(id, code, transformOptions) {
|
|
|
73
75
|
errors: result.errors.map((error) => error.message)
|
|
74
76
|
};
|
|
75
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
* Transform isolated declarations with `@swc/core`.
|
|
80
|
+
*/
|
|
76
81
|
async function swcTransform(id, code) {
|
|
77
82
|
const swc = await tryImport("@swc/core");
|
|
78
83
|
if (!swc) return {
|
|
@@ -102,6 +107,9 @@ async function swcTransform(id, code) {
|
|
|
102
107
|
};
|
|
103
108
|
}
|
|
104
109
|
}
|
|
110
|
+
/**
|
|
111
|
+
* Transform isolated declarations with `typescript`.
|
|
112
|
+
*/
|
|
105
113
|
async function tsTransform(id, code, transformOptions, sourceMap) {
|
|
106
114
|
const ts = await tryImport("typescript");
|
|
107
115
|
if (!ts) return {
|
|
@@ -1350,8 +1358,8 @@ var require_utils = __commonJS({ "node_modules/.pnpm/picomatch@4.0.2/node_module
|
|
|
1350
1358
|
exports.toPosixSlashes = (str) => str.replace(REGEX_BACKSLASH, "/");
|
|
1351
1359
|
exports.isWindows = () => {
|
|
1352
1360
|
if (typeof navigator !== "undefined" && navigator.platform) {
|
|
1353
|
-
const platform
|
|
1354
|
-
return platform
|
|
1361
|
+
const platform = navigator.platform.toLowerCase();
|
|
1362
|
+
return platform === "win32" || platform === "windows";
|
|
1355
1363
|
}
|
|
1356
1364
|
if (typeof process !== "undefined" && process.platform) return process.platform === "win32";
|
|
1357
1365
|
return false;
|
|
@@ -4454,18 +4462,18 @@ pp$8.parseForStatement = function(node) {
|
|
|
4454
4462
|
}
|
|
4455
4463
|
var isLet = this.isLet();
|
|
4456
4464
|
if (this.type === types$1._var || this.type === types$1._const || isLet) {
|
|
4457
|
-
var init$1
|
|
4465
|
+
var init$1 = this.startNode(), kind = isLet ? "let" : this.value;
|
|
4458
4466
|
this.next();
|
|
4459
|
-
this.parseVar(init$1
|
|
4460
|
-
this.finishNode(init$1
|
|
4461
|
-
if ((this.type === types$1._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && init$1
|
|
4467
|
+
this.parseVar(init$1, true, kind);
|
|
4468
|
+
this.finishNode(init$1, "VariableDeclaration");
|
|
4469
|
+
if ((this.type === types$1._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && init$1.declarations.length === 1) {
|
|
4462
4470
|
if (this.options.ecmaVersion >= 9) if (this.type === types$1._in) {
|
|
4463
4471
|
if (awaitAt > -1) this.unexpected(awaitAt);
|
|
4464
4472
|
} else node.await = awaitAt > -1;
|
|
4465
|
-
return this.parseForIn(node, init$1
|
|
4473
|
+
return this.parseForIn(node, init$1);
|
|
4466
4474
|
}
|
|
4467
4475
|
if (awaitAt > -1) this.unexpected(awaitAt);
|
|
4468
|
-
return this.parseFor(node, init$1
|
|
4476
|
+
return this.parseFor(node, init$1);
|
|
4469
4477
|
}
|
|
4470
4478
|
var startsWithLet = this.isContextual("let"), isForOf = false;
|
|
4471
4479
|
var containsEsc = this.containsEsc;
|
|
@@ -4645,8 +4653,8 @@ pp$8.parseBlock = function(createNewLexicalScope, node, exitStrict) {
|
|
|
4645
4653
|
if (createNewLexicalScope) this.exitScope();
|
|
4646
4654
|
return this.finishNode(node, "BlockStatement");
|
|
4647
4655
|
};
|
|
4648
|
-
pp$8.parseFor = function(node, init$
|
|
4649
|
-
node.init = init$
|
|
4656
|
+
pp$8.parseFor = function(node, init$1) {
|
|
4657
|
+
node.init = init$1;
|
|
4650
4658
|
this.expect(types$1.semi);
|
|
4651
4659
|
node.test = this.type === types$1.semi ? null : this.parseExpression();
|
|
4652
4660
|
this.expect(types$1.semi);
|
|
@@ -4657,11 +4665,11 @@ pp$8.parseFor = function(node, init$2) {
|
|
|
4657
4665
|
this.labels.pop();
|
|
4658
4666
|
return this.finishNode(node, "ForStatement");
|
|
4659
4667
|
};
|
|
4660
|
-
pp$8.parseForIn = function(node, init$
|
|
4668
|
+
pp$8.parseForIn = function(node, init$1) {
|
|
4661
4669
|
var isForIn = this.type === types$1._in;
|
|
4662
4670
|
this.next();
|
|
4663
|
-
if (init$
|
|
4664
|
-
node.left = init$
|
|
4671
|
+
if (init$1.type === "VariableDeclaration" && init$1.declarations[0].init != null && (!isForIn || this.options.ecmaVersion < 8 || this.strict || init$1.kind !== "var" || init$1.declarations[0].id.type !== "Identifier")) this.raise(init$1.start, (isForIn ? "for-in" : "for-of") + " loop variable declaration may not have an initializer");
|
|
4672
|
+
node.left = init$1;
|
|
4665
4673
|
node.right = isForIn ? this.parseExpression() : this.parseMaybeAssign();
|
|
4666
4674
|
this.expect(types$1.parenR);
|
|
4667
4675
|
node.body = this.parseStatement("for");
|
|
@@ -10534,7 +10542,7 @@ var require_common = __commonJS({ "node_modules/.pnpm/debug@4.4.0/node_modules/d
|
|
|
10534
10542
|
* This is the common logic for both the Node.js and web browser
|
|
10535
10543
|
* implementations of `debug()`.
|
|
10536
10544
|
*/
|
|
10537
|
-
function setup(env$
|
|
10545
|
+
function setup(env$1) {
|
|
10538
10546
|
createDebug.debug = createDebug;
|
|
10539
10547
|
createDebug.default = createDebug;
|
|
10540
10548
|
createDebug.coerce = coerce;
|
|
@@ -10543,8 +10551,8 @@ var require_common = __commonJS({ "node_modules/.pnpm/debug@4.4.0/node_modules/d
|
|
|
10543
10551
|
createDebug.enabled = enabled;
|
|
10544
10552
|
createDebug.humanize = require_ms();
|
|
10545
10553
|
createDebug.destroy = destroy;
|
|
10546
|
-
Object.keys(env$
|
|
10547
|
-
createDebug[key] = env$
|
|
10554
|
+
Object.keys(env$1).forEach((key) => {
|
|
10555
|
+
createDebug[key] = env$1[key];
|
|
10548
10556
|
});
|
|
10549
10557
|
/**
|
|
10550
10558
|
* The currently active debug mode names, and names to skip.
|
|
@@ -10932,10 +10940,10 @@ var require_browser = __commonJS({ "node_modules/.pnpm/debug@4.4.0/node_modules/
|
|
|
10932
10940
|
//#endregion
|
|
10933
10941
|
//#region node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js
|
|
10934
10942
|
var require_has_flag = __commonJS({ "node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js"(exports, module) {
|
|
10935
|
-
module.exports = (flag, argv
|
|
10943
|
+
module.exports = (flag, argv = process.argv) => {
|
|
10936
10944
|
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
10937
|
-
const position = argv
|
|
10938
|
-
const terminatorPosition = argv
|
|
10945
|
+
const position = argv.indexOf(prefix + flag);
|
|
10946
|
+
const terminatorPosition = argv.indexOf("--");
|
|
10939
10947
|
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
10940
10948
|
};
|
|
10941
10949
|
} });
|
|
@@ -10946,15 +10954,15 @@ var require_supports_color = __commonJS({ "node_modules/.pnpm/supports-color@8.1
|
|
|
10946
10954
|
const os = require("os");
|
|
10947
10955
|
const tty$1 = require("tty");
|
|
10948
10956
|
const hasFlag = require_has_flag();
|
|
10949
|
-
const { env
|
|
10957
|
+
const { env } = process;
|
|
10950
10958
|
let flagForceColor;
|
|
10951
10959
|
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) flagForceColor = 0;
|
|
10952
10960
|
else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) flagForceColor = 1;
|
|
10953
10961
|
function envForceColor() {
|
|
10954
|
-
if ("FORCE_COLOR" in env
|
|
10955
|
-
if (env
|
|
10956
|
-
if (env
|
|
10957
|
-
return env
|
|
10962
|
+
if ("FORCE_COLOR" in env) {
|
|
10963
|
+
if (env.FORCE_COLOR === "true") return 1;
|
|
10964
|
+
if (env.FORCE_COLOR === "false") return 0;
|
|
10965
|
+
return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
|
|
10958
10966
|
}
|
|
10959
10967
|
}
|
|
10960
10968
|
function translateLevel(level) {
|
|
@@ -10977,13 +10985,13 @@ var require_supports_color = __commonJS({ "node_modules/.pnpm/supports-color@8.1
|
|
|
10977
10985
|
}
|
|
10978
10986
|
if (haveStream && !streamIsTTY && forceColor === void 0) return 0;
|
|
10979
10987
|
const min = forceColor || 0;
|
|
10980
|
-
if (env
|
|
10988
|
+
if (env.TERM === "dumb") return min;
|
|
10981
10989
|
if (process.platform === "win32") {
|
|
10982
10990
|
const osRelease = os.release().split(".");
|
|
10983
10991
|
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
10984
10992
|
return 1;
|
|
10985
10993
|
}
|
|
10986
|
-
if ("CI" in env
|
|
10994
|
+
if ("CI" in env) {
|
|
10987
10995
|
if ([
|
|
10988
10996
|
"TRAVIS",
|
|
10989
10997
|
"CIRCLECI",
|
|
@@ -10992,21 +11000,21 @@ var require_supports_color = __commonJS({ "node_modules/.pnpm/supports-color@8.1
|
|
|
10992
11000
|
"GITHUB_ACTIONS",
|
|
10993
11001
|
"BUILDKITE",
|
|
10994
11002
|
"DRONE"
|
|
10995
|
-
].some((sign) => sign in env
|
|
11003
|
+
].some((sign) => sign in env) || env.CI_NAME === "codeship") return 1;
|
|
10996
11004
|
return min;
|
|
10997
11005
|
}
|
|
10998
|
-
if ("TEAMCITY_VERSION" in env
|
|
10999
|
-
if (env
|
|
11000
|
-
if ("TERM_PROGRAM" in env
|
|
11001
|
-
const version$1 = Number.parseInt((env
|
|
11002
|
-
switch (env
|
|
11006
|
+
if ("TEAMCITY_VERSION" in env) return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
11007
|
+
if (env.COLORTERM === "truecolor") return 3;
|
|
11008
|
+
if ("TERM_PROGRAM" in env) {
|
|
11009
|
+
const version$1 = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
11010
|
+
switch (env.TERM_PROGRAM) {
|
|
11003
11011
|
case "iTerm.app": return version$1 >= 3 ? 3 : 2;
|
|
11004
11012
|
case "Apple_Terminal": return 2;
|
|
11005
11013
|
}
|
|
11006
11014
|
}
|
|
11007
|
-
if (/-256(color)?$/i.test(env
|
|
11008
|
-
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env
|
|
11009
|
-
if ("COLORTERM" in env
|
|
11015
|
+
if (/-256(color)?$/i.test(env.TERM)) return 2;
|
|
11016
|
+
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) return 1;
|
|
11017
|
+
if ("COLORTERM" in env) return 1;
|
|
11010
11018
|
return min;
|
|
11011
11019
|
}
|
|
11012
11020
|
function getSupportLevel(stream, options = {}) {
|
|
@@ -11034,7 +11042,7 @@ var require_node = __commonJS({ "node_modules/.pnpm/debug@4.4.0/node_modules/deb
|
|
|
11034
11042
|
/**
|
|
11035
11043
|
* This is the Node.js implementation of `debug()`.
|
|
11036
11044
|
*/
|
|
11037
|
-
exports.init = init
|
|
11045
|
+
exports.init = init;
|
|
11038
11046
|
exports.log = log;
|
|
11039
11047
|
exports.formatArgs = formatArgs;
|
|
11040
11048
|
exports.save = save;
|
|
@@ -11208,7 +11216,7 @@ var require_node = __commonJS({ "node_modules/.pnpm/debug@4.4.0/node_modules/deb
|
|
|
11208
11216
|
* Create a new `inspectOpts` object in case `useColors` is set
|
|
11209
11217
|
* differently for a particular `debug` instance.
|
|
11210
11218
|
*/
|
|
11211
|
-
function init
|
|
11219
|
+
function init(debug$1) {
|
|
11212
11220
|
debug$1.inspectOpts = {};
|
|
11213
11221
|
const keys = Object.keys(exports.inspectOpts);
|
|
11214
11222
|
for (let i$1 = 0; i$1 < keys.length; i$1++) debug$1.inspectOpts[keys[i$1]] = exports.inspectOpts[keys[i$1]];
|
|
@@ -11244,7 +11252,7 @@ var require_src = __commonJS({ "node_modules/.pnpm/debug@4.4.0/node_modules/debu
|
|
|
11244
11252
|
var import_src = __toESM(require_src(), 1);
|
|
11245
11253
|
|
|
11246
11254
|
//#endregion
|
|
11247
|
-
//#region node_modules/.pnpm/unplugin-isolated-decl@0.13.
|
|
11255
|
+
//#region node_modules/.pnpm/unplugin-isolated-decl@0.13.9_@swc+core@1.11.21_@swc+helpers@0.5.17__typescript@5.8.3/node_modules/unplugin-isolated-decl/dist/src-B5I0aiDn.js
|
|
11248
11256
|
const debug = (0, import_src.default)("unplugin-isolated-decl");
|
|
11249
11257
|
function lowestCommonAncestor(...filepaths) {
|
|
11250
11258
|
if (filepaths.length === 0) return "";
|
|
@@ -11284,7 +11292,7 @@ function shouldAddIndex(id, resolved) {
|
|
|
11284
11292
|
return !endsWithIndex(id) && endsWithIndex(resolved);
|
|
11285
11293
|
}
|
|
11286
11294
|
function filterImports(program) {
|
|
11287
|
-
return program.body.filter((node) => (
|
|
11295
|
+
return program.body.filter((node) => !!("source" in node && node.source));
|
|
11288
11296
|
}
|
|
11289
11297
|
function rewriteImports(s$1, imports, entryMap, inputBase, entryFileNames, srcFilename) {
|
|
11290
11298
|
const srcRel = node_path.default.relative(inputBase, srcFilename);
|
|
@@ -11338,6 +11346,9 @@ function resolveOptions(options) {
|
|
|
11338
11346
|
transformOptions: options.transformOptions
|
|
11339
11347
|
};
|
|
11340
11348
|
}
|
|
11349
|
+
/**
|
|
11350
|
+
* The main unplugin instance.
|
|
11351
|
+
*/
|
|
11341
11352
|
const IsolatedDecl = createUnplugin((rawOptions = {}) => {
|
|
11342
11353
|
const options = resolveOptions(rawOptions);
|
|
11343
11354
|
const filter = createFilter(options.include, options.exclude);
|
|
@@ -11423,14 +11434,8 @@ const IsolatedDecl = createUnplugin((rawOptions = {}) => {
|
|
|
11423
11434
|
imports,
|
|
11424
11435
|
map
|
|
11425
11436
|
});
|
|
11426
|
-
const
|
|
11427
|
-
|
|
11428
|
-
if ("importKind" in node && node.importKind === "type") return true;
|
|
11429
|
-
if ("exportKind" in node && node.exportKind === "type") return true;
|
|
11430
|
-
if (node.type === "ImportDeclaration") return !!node.specifiers && node.specifiers.every((spec) => spec.type === "ImportSpecifier" && spec.importKind === "type");
|
|
11431
|
-
return node.type === "ExportNamedDeclaration" && node.specifiers && node.specifiers.every((spec) => spec.exportKind === "type");
|
|
11432
|
-
});
|
|
11433
|
-
for (const { source } of typeImports) {
|
|
11437
|
+
const importsInDts = filterImports(program);
|
|
11438
|
+
for (const { source } of importsInDts) {
|
|
11434
11439
|
const resolved = (await resolve$2(context, source.value, id))?.id;
|
|
11435
11440
|
if (resolved && filter(resolved) && !outputFiles[stripExt(resolved)]) {
|
|
11436
11441
|
let source$1;
|
|
@@ -11607,7 +11612,7 @@ function patchCjsDefaultExport(source) {
|
|
|
11607
11612
|
}
|
|
11608
11613
|
|
|
11609
11614
|
//#endregion
|
|
11610
|
-
//#region node_modules/.pnpm/unplugin-isolated-decl@0.13.
|
|
11615
|
+
//#region node_modules/.pnpm/unplugin-isolated-decl@0.13.9_@swc+core@1.11.21_@swc+helpers@0.5.17__typescript@5.8.3/node_modules/unplugin-isolated-decl/dist/rolldown.js
|
|
11611
11616
|
/**
|
|
11612
11617
|
* Rolldown plugin
|
|
11613
11618
|
*
|
|
@@ -11785,77 +11790,6 @@ async function watch(app) {
|
|
|
11785
11790
|
await watcher(app);
|
|
11786
11791
|
}
|
|
11787
11792
|
|
|
11788
|
-
//#endregion
|
|
11789
|
-
//#region node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/shared/consola.DXBYu-KD.mjs
|
|
11790
|
-
const { env = {}, argv = [], platform = "" } = typeof process === "undefined" ? {} : process;
|
|
11791
|
-
const isDisabled = "NO_COLOR" in env || argv.includes("--no-color");
|
|
11792
|
-
const isForced = "FORCE_COLOR" in env || argv.includes("--color");
|
|
11793
|
-
const isWindows = platform === "win32";
|
|
11794
|
-
const isDumbTerminal = env.TERM === "dumb";
|
|
11795
|
-
const isCompatibleTerminal = node_tty && node_tty.isatty && node_tty.isatty(1) && env.TERM && !isDumbTerminal;
|
|
11796
|
-
const isCI = "CI" in env && ("GITHUB_ACTIONS" in env || "GITLAB_CI" in env || "CIRCLECI" in env);
|
|
11797
|
-
const isColorSupported = !isDisabled && (isForced || isWindows && !isDumbTerminal || isCompatibleTerminal || isCI);
|
|
11798
|
-
function replaceClose(index, string, close, replace, head = string.slice(0, Math.max(0, index)) + replace, tail = string.slice(Math.max(0, index + close.length)), next = tail.indexOf(close)) {
|
|
11799
|
-
return head + (next < 0 ? tail : replaceClose(next, tail, close, replace));
|
|
11800
|
-
}
|
|
11801
|
-
function clearBleed(index, string, open, close, replace) {
|
|
11802
|
-
return index < 0 ? open + string + close : open + replaceClose(index, string, close, replace) + close;
|
|
11803
|
-
}
|
|
11804
|
-
function filterEmpty(open, close, replace = open, at = open.length + 1) {
|
|
11805
|
-
return (string) => string || !(string === "" || string === void 0) ? clearBleed(("" + string).indexOf(close, at), string, open, close, replace) : "";
|
|
11806
|
-
}
|
|
11807
|
-
function init(open, close, replace) {
|
|
11808
|
-
return filterEmpty(`\x1B[${open}m`, `\x1B[${close}m`, replace);
|
|
11809
|
-
}
|
|
11810
|
-
const colorDefs = {
|
|
11811
|
-
reset: init(0, 0),
|
|
11812
|
-
bold: init(1, 22, "\x1B[22m\x1B[1m"),
|
|
11813
|
-
dim: init(2, 22, "\x1B[22m\x1B[2m"),
|
|
11814
|
-
italic: init(3, 23),
|
|
11815
|
-
underline: init(4, 24),
|
|
11816
|
-
inverse: init(7, 27),
|
|
11817
|
-
hidden: init(8, 28),
|
|
11818
|
-
strikethrough: init(9, 29),
|
|
11819
|
-
black: init(30, 39),
|
|
11820
|
-
red: init(31, 39),
|
|
11821
|
-
green: init(32, 39),
|
|
11822
|
-
yellow: init(33, 39),
|
|
11823
|
-
blue: init(34, 39),
|
|
11824
|
-
magenta: init(35, 39),
|
|
11825
|
-
cyan: init(36, 39),
|
|
11826
|
-
white: init(37, 39),
|
|
11827
|
-
gray: init(90, 39),
|
|
11828
|
-
bgBlack: init(40, 49),
|
|
11829
|
-
bgRed: init(41, 49),
|
|
11830
|
-
bgGreen: init(42, 49),
|
|
11831
|
-
bgYellow: init(43, 49),
|
|
11832
|
-
bgBlue: init(44, 49),
|
|
11833
|
-
bgMagenta: init(45, 49),
|
|
11834
|
-
bgCyan: init(46, 49),
|
|
11835
|
-
bgWhite: init(47, 49),
|
|
11836
|
-
blackBright: init(90, 39),
|
|
11837
|
-
redBright: init(91, 39),
|
|
11838
|
-
greenBright: init(92, 39),
|
|
11839
|
-
yellowBright: init(93, 39),
|
|
11840
|
-
blueBright: init(94, 39),
|
|
11841
|
-
magentaBright: init(95, 39),
|
|
11842
|
-
cyanBright: init(96, 39),
|
|
11843
|
-
whiteBright: init(97, 39),
|
|
11844
|
-
bgBlackBright: init(100, 49),
|
|
11845
|
-
bgRedBright: init(101, 49),
|
|
11846
|
-
bgGreenBright: init(102, 49),
|
|
11847
|
-
bgYellowBright: init(103, 49),
|
|
11848
|
-
bgBlueBright: init(104, 49),
|
|
11849
|
-
bgMagentaBright: init(105, 49),
|
|
11850
|
-
bgCyanBright: init(106, 49),
|
|
11851
|
-
bgWhiteBright: init(107, 49)
|
|
11852
|
-
};
|
|
11853
|
-
function createColors(useColor = isColorSupported) {
|
|
11854
|
-
return useColor ? colorDefs : Object.fromEntries(Object.keys(colorDefs).map((key) => [key, String]));
|
|
11855
|
-
}
|
|
11856
|
-
const colors = createColors();
|
|
11857
|
-
const ansiRegex = [String.raw`[\u001B\u009B][[\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\d\/#&.:=?%@~_]+)*|[a-zA-Z\d]+(?:;[-a-zA-Z\d\/#&.:=?%@~_]*)*)?\u0007)`, String.raw`(?:(?:\d{1,4}(?:;\d{0,4})*)?[\dA-PR-TZcf-nq-uy=><~]))`].join("|");
|
|
11858
|
-
|
|
11859
11793
|
//#endregion
|
|
11860
11794
|
//#region packages/devkit/src/Server/DevServer.ts
|
|
11861
11795
|
/**
|
|
@@ -11890,7 +11824,6 @@ function createDevServer(app) {
|
|
|
11890
11824
|
tag: "worker",
|
|
11891
11825
|
message: "Worker reloaded successfully"
|
|
11892
11826
|
});
|
|
11893
|
-
consola.default.log(`\n${colors.green("➜")} App listening on port ${colors.bold(app.config.server?.port ?? 3e3)}`);
|
|
11894
11827
|
}).catch((error) => {
|
|
11895
11828
|
consola.default.error({
|
|
11896
11829
|
tag: "worker",
|
package/dist/index.mjs
CHANGED
|
@@ -13,7 +13,6 @@ import * as querystring from "node:querystring";
|
|
|
13
13
|
import { fileURLToPath } from "node:url";
|
|
14
14
|
import consola from "consola";
|
|
15
15
|
import { fork } from "node:child_process";
|
|
16
|
-
import * as tty from "node:tty";
|
|
17
16
|
|
|
18
17
|
//#region rolldown:runtime
|
|
19
18
|
var __create = Object.create;
|
|
@@ -60,10 +59,13 @@ async function createVercube() {
|
|
|
60
59
|
}
|
|
61
60
|
|
|
62
61
|
//#endregion
|
|
63
|
-
//#region node_modules/.pnpm/unplugin-isolated-decl@0.13.
|
|
62
|
+
//#region node_modules/.pnpm/unplugin-isolated-decl@0.13.9_@swc+core@1.11.21_@swc+helpers@0.5.17__typescript@5.8.3/node_modules/unplugin-isolated-decl/dist/transformer-CiAWE027.js
|
|
64
63
|
function tryImport(pkg) {
|
|
65
64
|
return import(pkg).catch(() => null);
|
|
66
65
|
}
|
|
66
|
+
/**
|
|
67
|
+
* Transform isolated declarations with `oxc-transform`.
|
|
68
|
+
*/
|
|
67
69
|
async function oxcTransform(id, code, transformOptions) {
|
|
68
70
|
const oxc = await tryImport("oxc-transform");
|
|
69
71
|
if (!oxc) return {
|
|
@@ -77,6 +79,9 @@ async function oxcTransform(id, code, transformOptions) {
|
|
|
77
79
|
errors: result.errors.map((error) => error.message)
|
|
78
80
|
};
|
|
79
81
|
}
|
|
82
|
+
/**
|
|
83
|
+
* Transform isolated declarations with `@swc/core`.
|
|
84
|
+
*/
|
|
80
85
|
async function swcTransform(id, code) {
|
|
81
86
|
const swc = await tryImport("@swc/core");
|
|
82
87
|
if (!swc) return {
|
|
@@ -106,6 +111,9 @@ async function swcTransform(id, code) {
|
|
|
106
111
|
};
|
|
107
112
|
}
|
|
108
113
|
}
|
|
114
|
+
/**
|
|
115
|
+
* Transform isolated declarations with `typescript`.
|
|
116
|
+
*/
|
|
109
117
|
async function tsTransform(id, code, transformOptions, sourceMap) {
|
|
110
118
|
const ts = await tryImport("typescript");
|
|
111
119
|
if (!ts) return {
|
|
@@ -1704,8 +1712,8 @@ var require_utils = __commonJS({ "node_modules/.pnpm/picomatch@4.0.2/node_module
|
|
|
1704
1712
|
exports.toPosixSlashes = (str) => str.replace(REGEX_BACKSLASH, "/");
|
|
1705
1713
|
exports.isWindows = () => {
|
|
1706
1714
|
if (typeof navigator !== "undefined" && navigator.platform) {
|
|
1707
|
-
const platform
|
|
1708
|
-
return platform
|
|
1715
|
+
const platform = navigator.platform.toLowerCase();
|
|
1716
|
+
return platform === "win32" || platform === "windows";
|
|
1709
1717
|
}
|
|
1710
1718
|
if (typeof process !== "undefined" && process.platform) return process.platform === "win32";
|
|
1711
1719
|
return false;
|
|
@@ -4825,22 +4833,22 @@ pp$8.parseForStatement = function(node) {
|
|
|
4825
4833
|
var containsEsc = this.containsEsc;
|
|
4826
4834
|
var refDestructuringErrors = new DestructuringErrors();
|
|
4827
4835
|
var initPos = this.start;
|
|
4828
|
-
var init
|
|
4836
|
+
var init = awaitAt > -1 ? this.parseExprSubscripts(refDestructuringErrors, "await") : this.parseExpression(true, refDestructuringErrors);
|
|
4829
4837
|
if (this.type === types$1._in || (isForOf = this.options.ecmaVersion >= 6 && this.isContextual("of"))) {
|
|
4830
4838
|
if (awaitAt > -1) {
|
|
4831
4839
|
if (this.type === types$1._in) this.unexpected(awaitAt);
|
|
4832
4840
|
node.await = true;
|
|
4833
4841
|
} else if (isForOf && this.options.ecmaVersion >= 8) {
|
|
4834
|
-
if (init
|
|
4842
|
+
if (init.start === initPos && !containsEsc && init.type === "Identifier" && init.name === "async") this.unexpected();
|
|
4835
4843
|
else if (this.options.ecmaVersion >= 9) node.await = false;
|
|
4836
4844
|
}
|
|
4837
|
-
if (startsWithLet && isForOf) this.raise(init
|
|
4838
|
-
this.toAssignable(init
|
|
4839
|
-
this.checkLValPattern(init
|
|
4840
|
-
return this.parseForIn(node, init
|
|
4845
|
+
if (startsWithLet && isForOf) this.raise(init.start, "The left-hand side of a for-of loop may not start with 'let'.");
|
|
4846
|
+
this.toAssignable(init, false, refDestructuringErrors);
|
|
4847
|
+
this.checkLValPattern(init);
|
|
4848
|
+
return this.parseForIn(node, init);
|
|
4841
4849
|
} else this.checkExpressionErrors(refDestructuringErrors, true);
|
|
4842
4850
|
if (awaitAt > -1) this.unexpected(awaitAt);
|
|
4843
|
-
return this.parseFor(node, init
|
|
4851
|
+
return this.parseFor(node, init);
|
|
4844
4852
|
};
|
|
4845
4853
|
pp$8.parseFunctionStatement = function(node, isAsync, declarationPosition) {
|
|
4846
4854
|
this.next();
|
|
@@ -4999,8 +5007,8 @@ pp$8.parseBlock = function(createNewLexicalScope, node, exitStrict) {
|
|
|
4999
5007
|
if (createNewLexicalScope) this.exitScope();
|
|
5000
5008
|
return this.finishNode(node, "BlockStatement");
|
|
5001
5009
|
};
|
|
5002
|
-
pp$8.parseFor = function(node, init
|
|
5003
|
-
node.init = init
|
|
5010
|
+
pp$8.parseFor = function(node, init) {
|
|
5011
|
+
node.init = init;
|
|
5004
5012
|
this.expect(types$1.semi);
|
|
5005
5013
|
node.test = this.type === types$1.semi ? null : this.parseExpression();
|
|
5006
5014
|
this.expect(types$1.semi);
|
|
@@ -5011,11 +5019,11 @@ pp$8.parseFor = function(node, init$1) {
|
|
|
5011
5019
|
this.labels.pop();
|
|
5012
5020
|
return this.finishNode(node, "ForStatement");
|
|
5013
5021
|
};
|
|
5014
|
-
pp$8.parseForIn = function(node, init
|
|
5022
|
+
pp$8.parseForIn = function(node, init) {
|
|
5015
5023
|
var isForIn = this.type === types$1._in;
|
|
5016
5024
|
this.next();
|
|
5017
|
-
if (init
|
|
5018
|
-
node.left = init
|
|
5025
|
+
if (init.type === "VariableDeclaration" && init.declarations[0].init != null && (!isForIn || this.options.ecmaVersion < 8 || this.strict || init.kind !== "var" || init.declarations[0].id.type !== "Identifier")) this.raise(init.start, (isForIn ? "for-in" : "for-of") + " loop variable declaration may not have an initializer");
|
|
5026
|
+
node.left = init;
|
|
5019
5027
|
node.right = isForIn ? this.parseExpression() : this.parseMaybeAssign();
|
|
5020
5028
|
this.expect(types$1.parenR);
|
|
5021
5029
|
node.body = this.parseStatement("for");
|
|
@@ -10888,7 +10896,7 @@ var require_common = __commonJS({ "node_modules/.pnpm/debug@4.4.0/node_modules/d
|
|
|
10888
10896
|
* This is the common logic for both the Node.js and web browser
|
|
10889
10897
|
* implementations of `debug()`.
|
|
10890
10898
|
*/
|
|
10891
|
-
function setup(env
|
|
10899
|
+
function setup(env) {
|
|
10892
10900
|
createDebug.debug = createDebug;
|
|
10893
10901
|
createDebug.default = createDebug;
|
|
10894
10902
|
createDebug.coerce = coerce;
|
|
@@ -10897,8 +10905,8 @@ var require_common = __commonJS({ "node_modules/.pnpm/debug@4.4.0/node_modules/d
|
|
|
10897
10905
|
createDebug.enabled = enabled;
|
|
10898
10906
|
createDebug.humanize = require_ms();
|
|
10899
10907
|
createDebug.destroy = destroy;
|
|
10900
|
-
Object.keys(env
|
|
10901
|
-
createDebug[key] = env
|
|
10908
|
+
Object.keys(env).forEach((key) => {
|
|
10909
|
+
createDebug[key] = env[key];
|
|
10902
10910
|
});
|
|
10903
10911
|
/**
|
|
10904
10912
|
* The currently active debug mode names, and names to skip.
|
|
@@ -11285,7 +11293,7 @@ var require_browser = __commonJS({ "node_modules/.pnpm/debug@4.4.0/node_modules/
|
|
|
11285
11293
|
var import_browser = __toESM(require_browser(), 1);
|
|
11286
11294
|
|
|
11287
11295
|
//#endregion
|
|
11288
|
-
//#region node_modules/.pnpm/unplugin-isolated-decl@0.13.
|
|
11296
|
+
//#region node_modules/.pnpm/unplugin-isolated-decl@0.13.9_@swc+core@1.11.21_@swc+helpers@0.5.17__typescript@5.8.3/node_modules/unplugin-isolated-decl/dist/src-B5I0aiDn.js
|
|
11289
11297
|
const debug = (0, import_browser.default)("unplugin-isolated-decl");
|
|
11290
11298
|
function lowestCommonAncestor(...filepaths) {
|
|
11291
11299
|
if (filepaths.length === 0) return "";
|
|
@@ -11325,7 +11333,7 @@ function shouldAddIndex(id, resolved) {
|
|
|
11325
11333
|
return !endsWithIndex(id) && endsWithIndex(resolved);
|
|
11326
11334
|
}
|
|
11327
11335
|
function filterImports(program) {
|
|
11328
|
-
return program.body.filter((node) => (
|
|
11336
|
+
return program.body.filter((node) => !!("source" in node && node.source));
|
|
11329
11337
|
}
|
|
11330
11338
|
function rewriteImports(s$1, imports, entryMap, inputBase, entryFileNames, srcFilename) {
|
|
11331
11339
|
const srcRel = path.relative(inputBase, srcFilename);
|
|
@@ -11379,6 +11387,9 @@ function resolveOptions(options) {
|
|
|
11379
11387
|
transformOptions: options.transformOptions
|
|
11380
11388
|
};
|
|
11381
11389
|
}
|
|
11390
|
+
/**
|
|
11391
|
+
* The main unplugin instance.
|
|
11392
|
+
*/
|
|
11382
11393
|
const IsolatedDecl = createUnplugin((rawOptions = {}) => {
|
|
11383
11394
|
const options = resolveOptions(rawOptions);
|
|
11384
11395
|
const filter = createFilter(options.include, options.exclude);
|
|
@@ -11464,14 +11475,8 @@ const IsolatedDecl = createUnplugin((rawOptions = {}) => {
|
|
|
11464
11475
|
imports,
|
|
11465
11476
|
map
|
|
11466
11477
|
});
|
|
11467
|
-
const
|
|
11468
|
-
|
|
11469
|
-
if ("importKind" in node && node.importKind === "type") return true;
|
|
11470
|
-
if ("exportKind" in node && node.exportKind === "type") return true;
|
|
11471
|
-
if (node.type === "ImportDeclaration") return !!node.specifiers && node.specifiers.every((spec) => spec.type === "ImportSpecifier" && spec.importKind === "type");
|
|
11472
|
-
return node.type === "ExportNamedDeclaration" && node.specifiers && node.specifiers.every((spec) => spec.exportKind === "type");
|
|
11473
|
-
});
|
|
11474
|
-
for (const { source } of typeImports) {
|
|
11478
|
+
const importsInDts = filterImports(program);
|
|
11479
|
+
for (const { source } of importsInDts) {
|
|
11475
11480
|
const resolved = (await resolve$2(context, source.value, id))?.id;
|
|
11476
11481
|
if (resolved && filter(resolved) && !outputFiles[stripExt(resolved)]) {
|
|
11477
11482
|
let source$1;
|
|
@@ -11648,7 +11653,7 @@ function patchCjsDefaultExport(source) {
|
|
|
11648
11653
|
}
|
|
11649
11654
|
|
|
11650
11655
|
//#endregion
|
|
11651
|
-
//#region node_modules/.pnpm/unplugin-isolated-decl@0.13.
|
|
11656
|
+
//#region node_modules/.pnpm/unplugin-isolated-decl@0.13.9_@swc+core@1.11.21_@swc+helpers@0.5.17__typescript@5.8.3/node_modules/unplugin-isolated-decl/dist/rolldown.js
|
|
11652
11657
|
/**
|
|
11653
11658
|
* Rolldown plugin
|
|
11654
11659
|
*
|
|
@@ -11826,77 +11831,6 @@ async function watch(app) {
|
|
|
11826
11831
|
await watcher(app);
|
|
11827
11832
|
}
|
|
11828
11833
|
|
|
11829
|
-
//#endregion
|
|
11830
|
-
//#region node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/shared/consola.DXBYu-KD.mjs
|
|
11831
|
-
const { env = {}, argv = [], platform = "" } = typeof process === "undefined" ? {} : process;
|
|
11832
|
-
const isDisabled = "NO_COLOR" in env || argv.includes("--no-color");
|
|
11833
|
-
const isForced = "FORCE_COLOR" in env || argv.includes("--color");
|
|
11834
|
-
const isWindows = platform === "win32";
|
|
11835
|
-
const isDumbTerminal = env.TERM === "dumb";
|
|
11836
|
-
const isCompatibleTerminal = tty && tty.isatty && tty.isatty(1) && env.TERM && !isDumbTerminal;
|
|
11837
|
-
const isCI = "CI" in env && ("GITHUB_ACTIONS" in env || "GITLAB_CI" in env || "CIRCLECI" in env);
|
|
11838
|
-
const isColorSupported = !isDisabled && (isForced || isWindows && !isDumbTerminal || isCompatibleTerminal || isCI);
|
|
11839
|
-
function replaceClose(index, string, close, replace, head = string.slice(0, Math.max(0, index)) + replace, tail = string.slice(Math.max(0, index + close.length)), next = tail.indexOf(close)) {
|
|
11840
|
-
return head + (next < 0 ? tail : replaceClose(next, tail, close, replace));
|
|
11841
|
-
}
|
|
11842
|
-
function clearBleed(index, string, open, close, replace) {
|
|
11843
|
-
return index < 0 ? open + string + close : open + replaceClose(index, string, close, replace) + close;
|
|
11844
|
-
}
|
|
11845
|
-
function filterEmpty(open, close, replace = open, at = open.length + 1) {
|
|
11846
|
-
return (string) => string || !(string === "" || string === void 0) ? clearBleed(("" + string).indexOf(close, at), string, open, close, replace) : "";
|
|
11847
|
-
}
|
|
11848
|
-
function init(open, close, replace) {
|
|
11849
|
-
return filterEmpty(`\x1B[${open}m`, `\x1B[${close}m`, replace);
|
|
11850
|
-
}
|
|
11851
|
-
const colorDefs = {
|
|
11852
|
-
reset: init(0, 0),
|
|
11853
|
-
bold: init(1, 22, "\x1B[22m\x1B[1m"),
|
|
11854
|
-
dim: init(2, 22, "\x1B[22m\x1B[2m"),
|
|
11855
|
-
italic: init(3, 23),
|
|
11856
|
-
underline: init(4, 24),
|
|
11857
|
-
inverse: init(7, 27),
|
|
11858
|
-
hidden: init(8, 28),
|
|
11859
|
-
strikethrough: init(9, 29),
|
|
11860
|
-
black: init(30, 39),
|
|
11861
|
-
red: init(31, 39),
|
|
11862
|
-
green: init(32, 39),
|
|
11863
|
-
yellow: init(33, 39),
|
|
11864
|
-
blue: init(34, 39),
|
|
11865
|
-
magenta: init(35, 39),
|
|
11866
|
-
cyan: init(36, 39),
|
|
11867
|
-
white: init(37, 39),
|
|
11868
|
-
gray: init(90, 39),
|
|
11869
|
-
bgBlack: init(40, 49),
|
|
11870
|
-
bgRed: init(41, 49),
|
|
11871
|
-
bgGreen: init(42, 49),
|
|
11872
|
-
bgYellow: init(43, 49),
|
|
11873
|
-
bgBlue: init(44, 49),
|
|
11874
|
-
bgMagenta: init(45, 49),
|
|
11875
|
-
bgCyan: init(46, 49),
|
|
11876
|
-
bgWhite: init(47, 49),
|
|
11877
|
-
blackBright: init(90, 39),
|
|
11878
|
-
redBright: init(91, 39),
|
|
11879
|
-
greenBright: init(92, 39),
|
|
11880
|
-
yellowBright: init(93, 39),
|
|
11881
|
-
blueBright: init(94, 39),
|
|
11882
|
-
magentaBright: init(95, 39),
|
|
11883
|
-
cyanBright: init(96, 39),
|
|
11884
|
-
whiteBright: init(97, 39),
|
|
11885
|
-
bgBlackBright: init(100, 49),
|
|
11886
|
-
bgRedBright: init(101, 49),
|
|
11887
|
-
bgGreenBright: init(102, 49),
|
|
11888
|
-
bgYellowBright: init(103, 49),
|
|
11889
|
-
bgBlueBright: init(104, 49),
|
|
11890
|
-
bgMagentaBright: init(105, 49),
|
|
11891
|
-
bgCyanBright: init(106, 49),
|
|
11892
|
-
bgWhiteBright: init(107, 49)
|
|
11893
|
-
};
|
|
11894
|
-
function createColors(useColor = isColorSupported) {
|
|
11895
|
-
return useColor ? colorDefs : Object.fromEntries(Object.keys(colorDefs).map((key) => [key, String]));
|
|
11896
|
-
}
|
|
11897
|
-
const colors = createColors();
|
|
11898
|
-
const ansiRegex = [String.raw`[\u001B\u009B][[\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\d\/#&.:=?%@~_]+)*|[a-zA-Z\d]+(?:;[-a-zA-Z\d\/#&.:=?%@~_]*)*)?\u0007)`, String.raw`(?:(?:\d{1,4}(?:;\d{0,4})*)?[\dA-PR-TZcf-nq-uy=><~]))`].join("|");
|
|
11899
|
-
|
|
11900
11834
|
//#endregion
|
|
11901
11835
|
//#region packages/devkit/src/Server/DevServer.ts
|
|
11902
11836
|
/**
|
|
@@ -11931,7 +11865,6 @@ function createDevServer(app) {
|
|
|
11931
11865
|
tag: "worker",
|
|
11932
11866
|
message: "Worker reloaded successfully"
|
|
11933
11867
|
});
|
|
11934
|
-
consola.log(`\n${colors.green("➜")} App listening on port ${colors.bold(app.config.server?.port ?? 3e3)}`);
|
|
11935
11868
|
}).catch((error) => {
|
|
11936
11869
|
consola.error({
|
|
11937
11870
|
tag: "worker",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercube/devkit",
|
|
3
|
-
"version": "0.0.2
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "Devkit module for Vercube framework",
|
|
5
5
|
"repository": "@vercube/devkit",
|
|
6
6
|
"license": "MIT",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"oxc-transform": "0.65.0",
|
|
30
30
|
"pathe": "2.0.3",
|
|
31
31
|
"rolldown": "1.0.0-beta.8",
|
|
32
|
-
"@vercube/core": "0.0.2
|
|
32
|
+
"@vercube/core": "0.0.2"
|
|
33
33
|
},
|
|
34
34
|
"publishConfig": {
|
|
35
35
|
"access": "public"
|