@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.
@@ -1,16 +1,16 @@
1
- import { t as e } from "./jsonc-BdzClvC8.js";
2
- import { c as t, d as n, f as r, l as i, s as a, u as o } from "./defaults-DNvHueCI.js";
3
- import { n as s, t as c } from "./_format-BKs7bsc4.js";
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(c(e), t?.reviver);
10
- return s(e, n, t), n;
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.2/node_modules/pkg-types/dist/index.mjs
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 n = Array.isArray(e) ? e : [e], i = {
25
+ let r = Array.isArray(e) ? e : [e], i = {
26
26
  ...p,
27
27
  ...t
28
- }, a = r(i.startingFrom), s = a[0] === "/", c = a.split("/").filter(Boolean);
29
- if (n.includes(c.at(-1)) && await i.test(a)) return a;
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 n) {
33
- let n = o(...c.slice(0, e), t);
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 n) {
37
- let n = o(...c.slice(0, e), t);
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, t = {}) {
46
- return e instanceof URL || e.startsWith("file://") ? n(d(e)) : i(e) ? n(e) : a(e, {
47
- ...t,
48
- from: t.from || t.parent || t.url
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(t, n = {}) {
72
- let r = await S(t, n), i = n.cache && typeof n.cache != "boolean" ? n.cache : b;
73
- if (n.cache && i.has(r)) return i.get(r);
74
- let a = await l.readFile(r, "utf8"), o;
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
- o = f(a);
76
+ a = f(i);
77
77
  } catch {
78
- o = e(a);
78
+ a = c(i);
79
79
  }
80
- return i.set(r, o), o;
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) => t(e)),
90
- gitConfig: (e) => m(".git/config", e).then((e) => r(e, "../..")),
91
- lockFile: (e) => m(_, e).then((e) => t(e)),
92
- packageJson: (e) => m(v, e).then((e) => t(e))
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.1_magicast@0.5.4/node_modules/c12/dist/_chunks/libs/ohash.mjs
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 };