@incajs/cli 0.0.9 → 0.0.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/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 +7 -3
- package/dist/adapter/vite/createBundler.d.mts +8 -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/build.d.mts +1 -1
- package/dist/chunks/defaults-TOBTBbDy.js +22 -0
- package/dist/chunks/dist-Bc5Uk6dY.js +733 -0
- package/dist/chunks/{dist-DAXzdDML.js → dist-Bp_FYhnk.js} +33 -33
- package/dist/chunks/jsonc-BDHXk_1o.js +40 -0
- package/dist/chunks/rolldown-runtime-Dy4uBu1J.js +11 -0
- package/dist/cli.js +1031 -419
- package/dist/config/index.d.mts +1 -1
- package/dist/config/loader.d.mts +2 -1
- package/dist/config/types.d.mts +4 -3
- package/dist/config.js +3 -3
- package/dist/defaultBundler.d.mts +2 -1
- package/dist/dev.d.mts +11 -5
- package/dist/entry.d.mts +9 -3
- package/dist/error.d.mts +5 -1
- package/dist/log.d.mts +4 -0
- package/dist/package.d.mts +1 -1
- package/dist/retryOnEdit.d.mts +32 -0
- package/dist/watchForEdit.d.mts +27 -0
- package/package.json +5 -5
- package/dist/chunks/defaults-Bl2pge8b.js +0 -1262
- package/dist/chunks/jsonc-BdzClvC8.js +0 -46
- /package/dist/{dev-lock.d.mts → devLock.d.mts} +0 -0
- /package/dist/{macos-app.d.mts → macosApp.d.mts} +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { a as e, c as t, o as n, r, s as i, t as a } from "./dist-Bc5Uk6dY.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
13
|
//#region ../../node_modules/.pnpm/pkg-types@2.3.3/node_modules/pkg-types/dist/index.mjs
|
|
@@ -21,31 +21,31 @@ var p = {
|
|
|
21
21
|
} catch {}
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
|
-
async function m(e,
|
|
25
|
-
let
|
|
24
|
+
async function m(e, r = {}) {
|
|
25
|
+
let i = Array.isArray(e) ? e : [e], a = {
|
|
26
26
|
...p,
|
|
27
|
-
...
|
|
28
|
-
},
|
|
29
|
-
if (
|
|
27
|
+
...r
|
|
28
|
+
}, o = t(a.startingFrom), s = o[0] === "/", c = o.split("/").filter(Boolean);
|
|
29
|
+
if (i.includes(c.at(-1)) && await a.test(o)) return o;
|
|
30
30
|
s && (c[0] = "/" + c[0]);
|
|
31
|
-
let l = c.findIndex((e) => e.match(
|
|
32
|
-
if (l === -1 && (l = 0),
|
|
33
|
-
let
|
|
34
|
-
if (await
|
|
31
|
+
let l = c.findIndex((e) => e.match(a.rootPattern));
|
|
32
|
+
if (l === -1 && (l = 0), a.reverse) for (let e = l + 1; e <= c.length; e++) for (let t of i) {
|
|
33
|
+
let r = n(...c.slice(0, e), t);
|
|
34
|
+
if (await a.test(r)) return r;
|
|
35
35
|
}
|
|
36
|
-
else for (let e = c.length; e > l; e--) for (let t of
|
|
37
|
-
let
|
|
38
|
-
if (await
|
|
36
|
+
else for (let e = c.length; e > l; e--) for (let t of i) {
|
|
37
|
+
let r = n(...c.slice(0, e), t);
|
|
38
|
+
if (await a.test(r)) return r;
|
|
39
39
|
}
|
|
40
|
-
throw Error(`Cannot find matching ${e} in ${
|
|
40
|
+
throw Error(`Cannot find matching ${e} in ${a.startingFrom} or parent directories`);
|
|
41
41
|
}
|
|
42
42
|
function h(e, t = {}) {
|
|
43
43
|
return m(e, t);
|
|
44
44
|
}
|
|
45
|
-
function g(
|
|
46
|
-
return
|
|
47
|
-
...
|
|
48
|
-
from:
|
|
45
|
+
function g(t, n = {}) {
|
|
46
|
+
return t instanceof URL || t.startsWith("file://") ? i(d(t)) : e(t) ? i(t) : a(t, {
|
|
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: (e) => m(y, e).then((e) =>
|
|
90
|
-
gitConfig: (e) => m(".git/config", e).then((e) =>
|
|
91
|
-
lockFile: (e) => m(_, e).then((e) =>
|
|
92
|
-
packageJson: (e) => m(v, e).then((e) =>
|
|
89
|
+
workspaceFile: (e) => m(y, e).then((e) => r(e)),
|
|
90
|
+
gitConfig: (e) => m(".git/config", e).then((e) => t(e, "../..")),
|
|
91
|
+
lockFile: (e) => m(_, e).then((e) => r(e)),
|
|
92
|
+
packageJson: (e) => m(v, e).then((e) => r(e))
|
|
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 };
|
|
@@ -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 };
|