@incajs/cli 0.0.8 → 0.0.10
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 +2 -2
- package/dist/adapter/types.d.mts +10 -21
- package/dist/adapter/vite/build.d.mts +2 -1
- package/dist/adapter/vite/captureOutput.d.mts +2 -1
- package/dist/adapter/vite/config.d.mts +3 -1
- package/dist/adapter/vite/createBundler.d.mts +4 -0
- package/dist/adapter/vite/hmr.d.mts +25 -2
- package/dist/adapter/vite/index.d.mts +1 -3
- package/dist/adapter/vite/unsupported.d.mts +2 -1
- package/dist/adapter/vite/watch.d.mts +2 -1
- package/dist/adapterCore.d.mts +10 -0
- package/dist/chunks/{defaults-DNvHueCI.js → defaults-CKuLLRFh.js} +342 -266
- package/dist/chunks/{dist-BvTGFq3F.js → dist-AuwuGWnE.js} +28 -28
- package/dist/chunks/jsonc-BDHXk_1o.js +40 -0
- package/dist/chunks/{ohash-CHaRSTtv.js → ohash-Cc4pJh84.js} +1 -1
- package/dist/chunks/rolldown-runtime-Dy4uBu1J.js +11 -0
- package/dist/cli.js +487 -376
- package/dist/config/types.d.mts +1 -1
- package/dist/config.js +1 -1
- package/dist/dev-client/hostClient.d.mts +2 -0
- package/dist/dev.d.mts +10 -4
- package/dist/error.d.mts +5 -1
- package/dist/hmr-runtime.js +114 -112
- package/dist/log.d.mts +4 -0
- package/dist/retryOnEdit.d.mts +32 -0
- package/dist/watchForEdit.d.mts +27 -0
- package/package.json +11 -10
- package/dist/chunks/jsonc-BdzClvC8.js +0 -46
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { c as e, d as t, f as n, l as r, s as i, u as a } from "./defaults-CKuLLRFh.js";
|
|
2
|
+
import { n as o, t as s } from "./_format-BKs7bsc4.js";
|
|
3
|
+
import { t as c } from "./jsonc-BDHXk_1o.js";
|
|
4
4
|
import { promises as l, statSync as u } from "node:fs";
|
|
5
5
|
import "node:fs/promises";
|
|
6
6
|
import { fileURLToPath as d } from "node:url";
|
|
7
7
|
//#region ../../node_modules/.pnpm/confbox@0.3.1/node_modules/confbox/dist/json.mjs
|
|
8
8
|
function f(e, t) {
|
|
9
|
-
let n = JSON.parse(
|
|
10
|
-
return
|
|
9
|
+
let n = JSON.parse(s(e), t?.reviver);
|
|
10
|
+
return o(e, n, t), n;
|
|
11
11
|
}
|
|
12
12
|
//#endregion
|
|
13
|
-
//#region ../../node_modules/.pnpm/pkg-types@2.3.
|
|
13
|
+
//#region ../../node_modules/.pnpm/pkg-types@2.3.3/node_modules/pkg-types/dist/index.mjs
|
|
14
14
|
var p = {
|
|
15
15
|
startingFrom: ".",
|
|
16
16
|
rootPattern: /^node_modules$/,
|
|
@@ -22,19 +22,19 @@ var p = {
|
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
24
|
async function m(e, t = {}) {
|
|
25
|
-
let
|
|
25
|
+
let r = Array.isArray(e) ? e : [e], i = {
|
|
26
26
|
...p,
|
|
27
27
|
...t
|
|
28
|
-
},
|
|
29
|
-
if (
|
|
28
|
+
}, o = n(i.startingFrom), s = o[0] === "/", c = o.split("/").filter(Boolean);
|
|
29
|
+
if (r.includes(c.at(-1)) && await i.test(o)) return o;
|
|
30
30
|
s && (c[0] = "/" + c[0]);
|
|
31
31
|
let l = c.findIndex((e) => e.match(i.rootPattern));
|
|
32
|
-
if (l === -1 && (l = 0), i.reverse) for (let e = l + 1; e <= c.length; e++) for (let t of
|
|
33
|
-
let n =
|
|
32
|
+
if (l === -1 && (l = 0), i.reverse) for (let e = l + 1; e <= c.length; e++) for (let t of r) {
|
|
33
|
+
let n = a(...c.slice(0, e), t);
|
|
34
34
|
if (await i.test(n)) return n;
|
|
35
35
|
}
|
|
36
|
-
else for (let e = c.length; e > l; e--) for (let t of
|
|
37
|
-
let n =
|
|
36
|
+
else for (let e = c.length; e > l; e--) for (let t of r) {
|
|
37
|
+
let n = a(...c.slice(0, e), t);
|
|
38
38
|
if (await i.test(n)) return n;
|
|
39
39
|
}
|
|
40
40
|
throw Error(`Cannot find matching ${e} in ${i.startingFrom} or parent directories`);
|
|
@@ -42,10 +42,10 @@ async function m(e, t = {}) {
|
|
|
42
42
|
function h(e, t = {}) {
|
|
43
43
|
return m(e, t);
|
|
44
44
|
}
|
|
45
|
-
function g(e,
|
|
46
|
-
return e instanceof URL || e.startsWith("file://") ?
|
|
47
|
-
...
|
|
48
|
-
from:
|
|
45
|
+
function g(e, n = {}) {
|
|
46
|
+
return e instanceof URL || e.startsWith("file://") ? t(d(e)) : r(e) ? t(e) : i(e, {
|
|
47
|
+
...n,
|
|
48
|
+
from: n.from || n.parent || n.url
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
51
|
var _ = [
|
|
@@ -68,16 +68,16 @@ var _ = [
|
|
|
68
68
|
"deno.json",
|
|
69
69
|
"deno.jsonc"
|
|
70
70
|
], b = /* #__PURE__ */ new Map();
|
|
71
|
-
async function x(
|
|
72
|
-
let
|
|
73
|
-
if (
|
|
74
|
-
let
|
|
71
|
+
async function x(e, t = {}) {
|
|
72
|
+
let n = await S(e, t), r = t.cache && typeof t.cache != "boolean" ? t.cache : b;
|
|
73
|
+
if (t.cache && r.has(n)) return r.get(n);
|
|
74
|
+
let i = await l.readFile(n, "utf8"), a;
|
|
75
75
|
try {
|
|
76
|
-
|
|
76
|
+
a = f(i);
|
|
77
77
|
} catch {
|
|
78
|
-
|
|
78
|
+
a = c(i);
|
|
79
79
|
}
|
|
80
|
-
return
|
|
80
|
+
return r.set(n, a), a;
|
|
81
81
|
}
|
|
82
82
|
async function S(e = process.cwd(), t = {}) {
|
|
83
83
|
return h("package.json", {
|
|
@@ -86,10 +86,10 @@ async function S(e = process.cwd(), t = {}) {
|
|
|
86
86
|
});
|
|
87
87
|
}
|
|
88
88
|
var C = {
|
|
89
|
-
workspaceFile: (
|
|
90
|
-
gitConfig: (e) => m(".git/config", e).then((e) =>
|
|
91
|
-
lockFile: (
|
|
92
|
-
packageJson: (
|
|
89
|
+
workspaceFile: (t) => m(y, t).then((t) => e(t)),
|
|
90
|
+
gitConfig: (e) => m(".git/config", e).then((e) => n(e, "../..")),
|
|
91
|
+
lockFile: (t) => m(_, t).then((t) => e(t)),
|
|
92
|
+
packageJson: (t) => m(v, t).then((t) => e(t))
|
|
93
93
|
};
|
|
94
94
|
async function w(e = process.cwd(), t = {}) {
|
|
95
95
|
let n = g(e, t), r = t.tests || [
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
+
import { n as t, t as n } from "./_format-BKs7bsc4.js";
|
|
3
|
+
//#region ../../node_modules/.pnpm/confbox@0.3.1/node_modules/confbox/dist/_chunks/libs/strip-json-comments.mjs
|
|
4
|
+
var r = Symbol("singleComment"), i = Symbol("multiComment"), a = () => "", o = (e, t, n) => e.slice(t, n).replace(/[^ \t\r\n]/g, " "), s = (e, t) => {
|
|
5
|
+
let n = t - 1, r = 0;
|
|
6
|
+
for (; e[n] === "\\";) --n, r += 1;
|
|
7
|
+
return !!(r % 2);
|
|
8
|
+
};
|
|
9
|
+
function c(e, { whitespace: t = !0, trailingCommas: n = !1 } = {}) {
|
|
10
|
+
if (typeof e != "string") throw TypeError(`Expected argument \`jsonString\` to be a \`string\`, got \`${typeof e}\``);
|
|
11
|
+
let c = t ? o : a, l = !1, u = !1, d = 0, f = "", p = "", m = -1;
|
|
12
|
+
for (let t = 0; t < e.length; t++) {
|
|
13
|
+
let a = e[t], o = e[t + 1];
|
|
14
|
+
if (!u && a === "\"" && (s(e, t) || (l = !l)), !l) {
|
|
15
|
+
if (!u && a + o === "//") f += e.slice(d, t), d = t, u = r, t++;
|
|
16
|
+
else if (u === r && a + o === "\r\n") {
|
|
17
|
+
t++, u = !1, f += c(e, d, t), d = t;
|
|
18
|
+
continue;
|
|
19
|
+
} else if (u === r && a === "\n") u = !1, f += c(e, d, t), d = t;
|
|
20
|
+
else if (!u && a + o === "/*") {
|
|
21
|
+
f += e.slice(d, t), d = t, u = i, t++;
|
|
22
|
+
continue;
|
|
23
|
+
} else if (u === i && a + o === "*/") {
|
|
24
|
+
t++, u = !1, f += c(e, d, t + 1), d = t + 1;
|
|
25
|
+
continue;
|
|
26
|
+
} else n && !u && (m === -1 ? a === "," && (p += f + e.slice(d, t), f = "", d = t, m = t) : a === "}" || a === "]" ? (f += e.slice(d, t), p += c(f, 0, 1) + f.slice(1), f = "", d = t, m = -1) : a !== " " && a !== " " && a !== "\r" && a !== "\n" && (f += e.slice(d, t), d = t, m = -1));
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
let h = u === r ? c(e, d) : e.slice(d);
|
|
30
|
+
return p + f + h;
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region ../../node_modules/.pnpm/confbox@0.3.1/node_modules/confbox/dist/jsonc.mjs
|
|
34
|
+
var l = /* @__PURE__ */ e({ parseJSONC: () => u });
|
|
35
|
+
function u(e, r) {
|
|
36
|
+
let i = JSON.parse(c(n(e), { trailingCommas: r?.allowTrailingComma }));
|
|
37
|
+
return t(e, i, r), i;
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
40
|
+
export { l as n, u as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createHash as e } from "node:crypto";
|
|
2
|
-
//#region ../../node_modules/.pnpm/c12@4.0.0-rc.
|
|
2
|
+
//#region ../../node_modules/.pnpm/c12@4.0.0-rc.2_magicast@0.5.4/node_modules/c12/dist/_chunks/libs/ohash.mjs
|
|
3
3
|
var t = Object.defineProperty, n = (e, n) => {
|
|
4
4
|
let r = {};
|
|
5
5
|
for (var i in e) t(r, i, {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var e = Object.defineProperty, t = (t, n) => {
|
|
3
|
+
let r = {};
|
|
4
|
+
for (var i in t) e(r, i, {
|
|
5
|
+
get: t[i],
|
|
6
|
+
enumerable: !0
|
|
7
|
+
});
|
|
8
|
+
return n || e(r, Symbol.toStringTag, { value: "Module" }), r;
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { t };
|