devframe 0.1.22 → 0.2.0
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 +3 -4
- package/dist/{_shared-DcJX9-Az.mjs → _shared-BrKv3CYt.mjs} +3 -3
- package/dist/adapters/build.d.mts +1 -1
- package/dist/adapters/build.mjs +5 -5
- package/dist/adapters/cli.d.mts +3 -3
- package/dist/adapters/cli.mjs +2 -2
- package/dist/adapters/dev.d.mts +7 -7
- package/dist/adapters/dev.mjs +1 -1
- package/dist/adapters/embedded.d.mts +1 -1
- package/dist/adapters/mcp.d.mts +1 -1
- package/dist/adapters/mcp.mjs +2 -2
- package/dist/client/index.d.mts +2 -4
- package/dist/client/index.mjs +7 -16
- package/dist/colors-DS7k8ljB.mjs +123 -0
- package/dist/{context-DUibxhrR.mjs → context-BBi2IQDm.mjs} +12 -13
- package/dist/{context-DBd794Rn.d.mts → context-DRa0wGsC.d.mts} +1 -1
- package/dist/{dev-BGpTpYiR.mjs → dev-CewNNE2R.mjs} +14 -17
- package/dist/{devframe-DulcIxwu.d.mts → devframe-R5Ex5K5L.d.mts} +10 -26
- package/dist/{diagnostics-BFhNNmST.mjs → diagnostics-Cg9ycFIM.mjs} +2 -2
- package/dist/hash-CIBte1yS.mjs +263 -0
- package/dist/{adapters → helpers}/vite.d.mts +7 -8
- package/dist/{adapters → helpers}/vite.mjs +8 -9
- package/dist/index.d.mts +2 -2
- package/dist/{launch-editor-KA_21J1T.mjs → launch-editor-CX_n_0SS.mjs} +9 -9
- package/dist/node/auth.d.mts +2 -2
- package/dist/node/index.d.mts +8 -9
- package/dist/node/index.mjs +4 -4
- package/dist/node/internal.d.mts +5 -5
- package/dist/node/internal.mjs +2 -2
- package/dist/{open-DmFp0qZA.mjs → open-B2ah1IKK.mjs} +26 -21
- package/dist/recipes/open-helpers.mjs +2 -2
- package/dist/rpc/index.mjs +1 -1
- package/dist/rpc/transports/ws-client.mjs +1 -1
- package/dist/rpc/transports/ws-server.mjs +1 -1
- package/dist/{rpc-CkZuoz-m.mjs → rpc-DAzoVCR0.mjs} +3 -3
- package/dist/{server-ma8-ZVyX.mjs → server-DOk4grlJ.mjs} +3 -3
- package/dist/{server-zKEDxgqD.d.mts → server-DzKz023G.d.mts} +5 -5
- package/dist/{shared-state-DCDs0e7y.mjs → shared-state-q9-1EOSX.mjs} +1 -1
- package/dist/{static-dump-D7AvjrgL.mjs → static-dump-C67bCuse.mjs} +1 -1
- package/dist/{storage-CNC38eU-.mjs → storage-CNvfBGQ5.mjs} +3 -3
- package/dist/{structured-clone-DcDc2Dds.mjs → structured-clone-CD2l4fI3.mjs} +1 -1
- package/dist/types/index.d.mts +2 -2
- package/dist/types/index.mjs +1 -10
- package/dist/utils/colors.mjs +1 -1
- package/dist/utils/events.d.mts +1 -1
- package/dist/utils/hash.mjs +1 -1
- package/dist/utils/launch-editor.mjs +1 -1
- package/dist/utils/open.mjs +1 -1
- package/dist/utils/serve-static.d.mts +13 -3
- package/dist/utils/serve-static.mjs +41 -20
- package/dist/utils/shared-state.d.mts +1 -1
- package/dist/utils/shared-state.mjs +1 -1
- package/dist/utils/streaming-channel.d.mts +1 -1
- package/dist/utils/structured-clone.mjs +1 -1
- package/dist/utils/when.d.mts +1 -1
- package/dist/utils/when.mjs +1 -1
- package/package.json +18 -11
- package/skills/devframe/SKILL.md +23 -20
- package/skills/devframe/templates/spa-devframe.ts +2 -2
- package/dist/colors-Bl4W18Mh.mjs +0 -123
- package/dist/hash-BHZbo80D.mjs +0 -126
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/shared/ohash.D__AXeF1.mjs
|
|
2
|
+
function serialize(o) {
|
|
3
|
+
return typeof o == "string" ? `'${o}'` : new c().serialize(o);
|
|
4
|
+
}
|
|
5
|
+
const c = /* @__PURE__ */ function() {
|
|
6
|
+
class o {
|
|
7
|
+
#t = /* @__PURE__ */ new Map();
|
|
8
|
+
compare(t, r) {
|
|
9
|
+
const e = typeof t, n = typeof r;
|
|
10
|
+
return e === "string" && n === "string" ? t.localeCompare(r) : e === "number" && n === "number" ? t - r : String.prototype.localeCompare.call(this.serialize(t, true), this.serialize(r, true));
|
|
11
|
+
}
|
|
12
|
+
serialize(t, r) {
|
|
13
|
+
if (t === null) return "null";
|
|
14
|
+
switch (typeof t) {
|
|
15
|
+
case "string": return r ? t : `'${t}'`;
|
|
16
|
+
case "bigint": return `${t}n`;
|
|
17
|
+
case "object": return this.$object(t);
|
|
18
|
+
case "function": return this.$function(t);
|
|
19
|
+
}
|
|
20
|
+
return String(t);
|
|
21
|
+
}
|
|
22
|
+
serializeObject(t) {
|
|
23
|
+
const r = Object.prototype.toString.call(t);
|
|
24
|
+
if (r !== "[object Object]") return this.serializeBuiltInType(r.length < 10 ? `unknown:${r}` : r.slice(8, -1), t);
|
|
25
|
+
const e = t.constructor, n = e === Object || e === void 0 ? "" : e.name;
|
|
26
|
+
if (n !== "" && globalThis[n] === e) return this.serializeBuiltInType(n, t);
|
|
27
|
+
if (typeof t.toJSON == "function") {
|
|
28
|
+
const i = t.toJSON();
|
|
29
|
+
return n + (i !== null && typeof i == "object" ? this.$object(i) : `(${this.serialize(i)})`);
|
|
30
|
+
}
|
|
31
|
+
return this.serializeObjectEntries(n, Object.entries(t));
|
|
32
|
+
}
|
|
33
|
+
serializeBuiltInType(t, r) {
|
|
34
|
+
const e = this["$" + t];
|
|
35
|
+
if (e) return e.call(this, r);
|
|
36
|
+
if (typeof r?.entries == "function") return this.serializeObjectEntries(t, r.entries());
|
|
37
|
+
throw new Error(`Cannot serialize ${t}`);
|
|
38
|
+
}
|
|
39
|
+
serializeObjectEntries(t, r) {
|
|
40
|
+
const e = Array.from(r).sort((i, a) => this.compare(i[0], a[0]));
|
|
41
|
+
let n = `${t}{`;
|
|
42
|
+
for (let i = 0; i < e.length; i++) {
|
|
43
|
+
const [a, l] = e[i];
|
|
44
|
+
n += `${this.serialize(a, true)}:${this.serialize(l)}`, i < e.length - 1 && (n += ",");
|
|
45
|
+
}
|
|
46
|
+
return n + "}";
|
|
47
|
+
}
|
|
48
|
+
$object(t) {
|
|
49
|
+
let r = this.#t.get(t);
|
|
50
|
+
return r === void 0 && (this.#t.set(t, `#${this.#t.size}`), r = this.serializeObject(t), this.#t.set(t, r)), r;
|
|
51
|
+
}
|
|
52
|
+
$function(t) {
|
|
53
|
+
const r = Function.prototype.toString.call(t);
|
|
54
|
+
return r.slice(-15) === "[native code] }" ? `${t.name || ""}()[native]` : `${t.name}(${t.length})${r.replace(/\s*\n\s*/g, "")}`;
|
|
55
|
+
}
|
|
56
|
+
$Array(t) {
|
|
57
|
+
let r = "[";
|
|
58
|
+
for (let e = 0; e < t.length; e++) r += this.serialize(t[e]), e < t.length - 1 && (r += ",");
|
|
59
|
+
return r + "]";
|
|
60
|
+
}
|
|
61
|
+
$Date(t) {
|
|
62
|
+
try {
|
|
63
|
+
return `Date(${t.toISOString()})`;
|
|
64
|
+
} catch {
|
|
65
|
+
return "Date(null)";
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
$ArrayBuffer(t) {
|
|
69
|
+
return `ArrayBuffer[${new Uint8Array(t).join(",")}]`;
|
|
70
|
+
}
|
|
71
|
+
$Set(t) {
|
|
72
|
+
return `Set${this.$Array(Array.from(t).sort((r, e) => this.compare(r, e)))}`;
|
|
73
|
+
}
|
|
74
|
+
$Map(t) {
|
|
75
|
+
return this.serializeObjectEntries("Map", t.entries());
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
for (const s of [
|
|
79
|
+
"Error",
|
|
80
|
+
"RegExp",
|
|
81
|
+
"URL"
|
|
82
|
+
]) o.prototype["$" + s] = function(t) {
|
|
83
|
+
return `${s}(${t})`;
|
|
84
|
+
};
|
|
85
|
+
for (const s of [
|
|
86
|
+
"Int8Array",
|
|
87
|
+
"Uint8Array",
|
|
88
|
+
"Uint8ClampedArray",
|
|
89
|
+
"Int16Array",
|
|
90
|
+
"Uint16Array",
|
|
91
|
+
"Int32Array",
|
|
92
|
+
"Uint32Array",
|
|
93
|
+
"Float32Array",
|
|
94
|
+
"Float64Array"
|
|
95
|
+
]) o.prototype["$" + s] = function(t) {
|
|
96
|
+
return `${s}[${t.join(",")}]`;
|
|
97
|
+
};
|
|
98
|
+
for (const s of ["BigInt64Array", "BigUint64Array"]) o.prototype["$" + s] = function(t) {
|
|
99
|
+
return `${s}[${t.join("n,")}${t.length > 0 ? "n" : ""}]`;
|
|
100
|
+
};
|
|
101
|
+
return o;
|
|
102
|
+
}();
|
|
103
|
+
//#endregion
|
|
104
|
+
//#region ../../node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/js/index.mjs
|
|
105
|
+
const z = [
|
|
106
|
+
1779033703,
|
|
107
|
+
-1150833019,
|
|
108
|
+
1013904242,
|
|
109
|
+
-1521486534,
|
|
110
|
+
1359893119,
|
|
111
|
+
-1694144372,
|
|
112
|
+
528734635,
|
|
113
|
+
1541459225
|
|
114
|
+
], R = [
|
|
115
|
+
1116352408,
|
|
116
|
+
1899447441,
|
|
117
|
+
-1245643825,
|
|
118
|
+
-373957723,
|
|
119
|
+
961987163,
|
|
120
|
+
1508970993,
|
|
121
|
+
-1841331548,
|
|
122
|
+
-1424204075,
|
|
123
|
+
-670586216,
|
|
124
|
+
310598401,
|
|
125
|
+
607225278,
|
|
126
|
+
1426881987,
|
|
127
|
+
1925078388,
|
|
128
|
+
-2132889090,
|
|
129
|
+
-1680079193,
|
|
130
|
+
-1046744716,
|
|
131
|
+
-459576895,
|
|
132
|
+
-272742522,
|
|
133
|
+
264347078,
|
|
134
|
+
604807628,
|
|
135
|
+
770255983,
|
|
136
|
+
1249150122,
|
|
137
|
+
1555081692,
|
|
138
|
+
1996064986,
|
|
139
|
+
-1740746414,
|
|
140
|
+
-1473132947,
|
|
141
|
+
-1341970488,
|
|
142
|
+
-1084653625,
|
|
143
|
+
-958395405,
|
|
144
|
+
-710438585,
|
|
145
|
+
113926993,
|
|
146
|
+
338241895,
|
|
147
|
+
666307205,
|
|
148
|
+
773529912,
|
|
149
|
+
1294757372,
|
|
150
|
+
1396182291,
|
|
151
|
+
1695183700,
|
|
152
|
+
1986661051,
|
|
153
|
+
-2117940946,
|
|
154
|
+
-1838011259,
|
|
155
|
+
-1564481375,
|
|
156
|
+
-1474664885,
|
|
157
|
+
-1035236496,
|
|
158
|
+
-949202525,
|
|
159
|
+
-778901479,
|
|
160
|
+
-694614492,
|
|
161
|
+
-200395387,
|
|
162
|
+
275423344,
|
|
163
|
+
430227734,
|
|
164
|
+
506948616,
|
|
165
|
+
659060556,
|
|
166
|
+
883997877,
|
|
167
|
+
958139571,
|
|
168
|
+
1322822218,
|
|
169
|
+
1537002063,
|
|
170
|
+
1747873779,
|
|
171
|
+
1955562222,
|
|
172
|
+
2024104815,
|
|
173
|
+
-2067236844,
|
|
174
|
+
-1933114872,
|
|
175
|
+
-1866530822,
|
|
176
|
+
-1538233109,
|
|
177
|
+
-1090935817,
|
|
178
|
+
-965641998
|
|
179
|
+
], S = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_", r = [];
|
|
180
|
+
var k = class {
|
|
181
|
+
_data = new l();
|
|
182
|
+
_hash = new l([...z]);
|
|
183
|
+
_nDataBytes = 0;
|
|
184
|
+
_minBufferSize = 0;
|
|
185
|
+
finalize(e) {
|
|
186
|
+
e && this._append(e);
|
|
187
|
+
const s = this._nDataBytes * 8, t = this._data.sigBytes * 8;
|
|
188
|
+
return this._data.words[t >>> 5] |= 128 << 24 - t % 32, this._data.words[(t + 64 >>> 9 << 4) + 14] = Math.floor(s / 4294967296), this._data.words[(t + 64 >>> 9 << 4) + 15] = s, this._data.sigBytes = this._data.words.length * 4, this._process(), this._hash;
|
|
189
|
+
}
|
|
190
|
+
_doProcessBlock(e, s) {
|
|
191
|
+
const t = this._hash.words;
|
|
192
|
+
let i = t[0], o = t[1], a = t[2], c = t[3], h = t[4], g = t[5], f = t[6], y = t[7];
|
|
193
|
+
for (let n = 0; n < 64; n++) {
|
|
194
|
+
if (n < 16) r[n] = e[s + n] | 0;
|
|
195
|
+
else {
|
|
196
|
+
const d = r[n - 15], j = (d << 25 | d >>> 7) ^ (d << 14 | d >>> 18) ^ d >>> 3, B = r[n - 2], x = (B << 15 | B >>> 17) ^ (B << 13 | B >>> 19) ^ B >>> 10;
|
|
197
|
+
r[n] = j + r[n - 7] + x + r[n - 16];
|
|
198
|
+
}
|
|
199
|
+
const m = h & g ^ ~h & f, p = i & o ^ i & a ^ o & a, u = (i << 30 | i >>> 2) ^ (i << 19 | i >>> 13) ^ (i << 10 | i >>> 22), b = (h << 26 | h >>> 6) ^ (h << 21 | h >>> 11) ^ (h << 7 | h >>> 25), w = y + b + m + R[n] + r[n], M = u + p;
|
|
200
|
+
y = f, f = g, g = h, h = c + w | 0, c = a, a = o, o = i, i = w + M | 0;
|
|
201
|
+
}
|
|
202
|
+
t[0] = t[0] + i | 0, t[1] = t[1] + o | 0, t[2] = t[2] + a | 0, t[3] = t[3] + c | 0, t[4] = t[4] + h | 0, t[5] = t[5] + g | 0, t[6] = t[6] + f | 0, t[7] = t[7] + y | 0;
|
|
203
|
+
}
|
|
204
|
+
_append(e) {
|
|
205
|
+
typeof e == "string" && (e = l.fromUtf8(e)), this._data.concat(e), this._nDataBytes += e.sigBytes;
|
|
206
|
+
}
|
|
207
|
+
_process(e) {
|
|
208
|
+
let s, t = this._data.sigBytes / 64;
|
|
209
|
+
e ? t = Math.ceil(t) : t = Math.max((t | 0) - this._minBufferSize, 0);
|
|
210
|
+
const i = t * 16, o = Math.min(i * 4, this._data.sigBytes);
|
|
211
|
+
if (i) {
|
|
212
|
+
for (let a = 0; a < i; a += 16) this._doProcessBlock(this._data.words, a);
|
|
213
|
+
s = this._data.words.splice(0, i), this._data.sigBytes -= o;
|
|
214
|
+
}
|
|
215
|
+
return new l(s, o);
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
var l = class l {
|
|
219
|
+
words;
|
|
220
|
+
sigBytes;
|
|
221
|
+
constructor(e, s) {
|
|
222
|
+
e = this.words = e || [], this.sigBytes = s === void 0 ? e.length * 4 : s;
|
|
223
|
+
}
|
|
224
|
+
static fromUtf8(e) {
|
|
225
|
+
const s = unescape(encodeURIComponent(e)), t = s.length, i = [];
|
|
226
|
+
for (let o = 0; o < t; o++) i[o >>> 2] |= (s.charCodeAt(o) & 255) << 24 - o % 4 * 8;
|
|
227
|
+
return new l(i, t);
|
|
228
|
+
}
|
|
229
|
+
toBase64() {
|
|
230
|
+
const e = [];
|
|
231
|
+
for (let s = 0; s < this.sigBytes; s += 3) {
|
|
232
|
+
const t = this.words[s >>> 2] >>> 24 - s % 4 * 8 & 255, i = this.words[s + 1 >>> 2] >>> 24 - (s + 1) % 4 * 8 & 255, o = this.words[s + 2 >>> 2] >>> 24 - (s + 2) % 4 * 8 & 255, a = t << 16 | i << 8 | o;
|
|
233
|
+
for (let c = 0; c < 4 && s * 8 + c * 6 < this.sigBytes * 8; c++) e.push(S.charAt(a >>> 6 * (3 - c) & 63));
|
|
234
|
+
}
|
|
235
|
+
return e.join("");
|
|
236
|
+
}
|
|
237
|
+
concat(e) {
|
|
238
|
+
if (this.words[this.sigBytes >>> 2] &= 4294967295 << 32 - this.sigBytes % 4 * 8, this.words.length = Math.ceil(this.sigBytes / 4), this.sigBytes % 4) for (let s = 0; s < e.sigBytes; s++) {
|
|
239
|
+
const t = e.words[s >>> 2] >>> 24 - s % 4 * 8 & 255;
|
|
240
|
+
this.words[this.sigBytes + s >>> 2] |= t << 24 - (this.sigBytes + s) % 4 * 8;
|
|
241
|
+
}
|
|
242
|
+
else for (let s = 0; s < e.sigBytes; s += 4) this.words[this.sigBytes + s >>> 2] = e.words[s >>> 2];
|
|
243
|
+
this.sigBytes += e.sigBytes;
|
|
244
|
+
}
|
|
245
|
+
};
|
|
246
|
+
function digest(_) {
|
|
247
|
+
return new k().finalize(_).toBase64();
|
|
248
|
+
}
|
|
249
|
+
//#endregion
|
|
250
|
+
//#region ../../node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/index.mjs
|
|
251
|
+
function hash$1(input) {
|
|
252
|
+
return digest(serialize(input));
|
|
253
|
+
}
|
|
254
|
+
//#endregion
|
|
255
|
+
//#region src/utils/hash.ts
|
|
256
|
+
/**
|
|
257
|
+
* Stable, deterministic hash of any structured-cloneable value.
|
|
258
|
+
*/
|
|
259
|
+
function hash(value) {
|
|
260
|
+
return hash$1(value);
|
|
261
|
+
}
|
|
262
|
+
//#endregion
|
|
263
|
+
export { hash as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as DevframeDefinition } from "../devframe-
|
|
1
|
+
import { r as DevframeDefinition } from "../devframe-R5Ex5K5L.mjs";
|
|
2
2
|
|
|
3
|
-
//#region src/
|
|
4
|
-
interface
|
|
3
|
+
//#region src/helpers/vite.d.ts
|
|
4
|
+
interface ViteDevBridgeOptions {
|
|
5
5
|
/**
|
|
6
6
|
* Mount base. Defaults to `def.basePath ?? '/__<id>/'` for this hosted
|
|
7
7
|
* adapter — the devframe shares the origin with the host Vite app.
|
|
@@ -43,9 +43,8 @@ interface DevframeVitePlugin {
|
|
|
43
43
|
closeBundle?: () => void | Promise<void>;
|
|
44
44
|
}
|
|
45
45
|
/**
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
* Two modes, picked via `options.devMiddleware`:
|
|
46
|
+
* Bridge a devframe into an existing Vite dev server. Returns a Vite
|
|
47
|
+
* plugin with two modes, picked via `options.devMiddleware`:
|
|
49
48
|
*
|
|
50
49
|
* - **static-mount mode** (default) — mounts `def.cli.distDir` at
|
|
51
50
|
* `options.base` with SPA fallback enabled. No RPC server is started.
|
|
@@ -61,6 +60,6 @@ interface DevframeVitePlugin {
|
|
|
61
60
|
* (Nuxt, Astro, SolidStart, plain Vite apps). For the all-in-one
|
|
62
61
|
* `dev` / `build` / `mcp` shell, reach for {@link createCli} instead.
|
|
63
62
|
*/
|
|
64
|
-
declare function
|
|
63
|
+
declare function viteDevBridge(d: DevframeDefinition, options?: ViteDevBridgeOptions): DevframeVitePlugin;
|
|
65
64
|
//#endregion
|
|
66
|
-
export {
|
|
65
|
+
export { DevframeVitePlugin, ViteDevBridgeOptions, viteDevBridge };
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { n as logger } from "../diagnostics-
|
|
1
|
+
import { n as logger } from "../diagnostics-Cg9ycFIM.mjs";
|
|
2
2
|
import { DEVTOOLS_CONNECTION_META_FILENAME } from "../constants.mjs";
|
|
3
|
-
import { n as resolveBasePath } from "../_shared-
|
|
3
|
+
import { n as resolveBasePath } from "../_shared-BrKv3CYt.mjs";
|
|
4
4
|
import { serveStaticNodeMiddleware } from "../utils/serve-static.mjs";
|
|
5
|
-
import { n as resolveDevServerPort, t as createDevServer } from "../dev-
|
|
5
|
+
import { n as resolveDevServerPort, t as createDevServer } from "../dev-CewNNE2R.mjs";
|
|
6
6
|
import { resolve } from "pathe";
|
|
7
|
-
//#region src/
|
|
7
|
+
//#region src/helpers/vite.ts
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* Two modes, picked via `options.devMiddleware`:
|
|
9
|
+
* Bridge a devframe into an existing Vite dev server. Returns a Vite
|
|
10
|
+
* plugin with two modes, picked via `options.devMiddleware`:
|
|
12
11
|
*
|
|
13
12
|
* - **static-mount mode** (default) — mounts `def.cli.distDir` at
|
|
14
13
|
* `options.base` with SPA fallback enabled. No RPC server is started.
|
|
@@ -24,7 +23,7 @@ import { resolve } from "pathe";
|
|
|
24
23
|
* (Nuxt, Astro, SolidStart, plain Vite apps). For the all-in-one
|
|
25
24
|
* `dev` / `build` / `mcp` shell, reach for {@link createCli} instead.
|
|
26
25
|
*/
|
|
27
|
-
function
|
|
26
|
+
function viteDevBridge(d, options = {}) {
|
|
28
27
|
const base = normalizeMountBase(options.base ?? resolveBasePath(d, "hosted"));
|
|
29
28
|
if (!options.devMiddleware) {
|
|
30
29
|
const distDir = d.cli?.distDir;
|
|
@@ -92,4 +91,4 @@ function normalizeMountBase(base) {
|
|
|
92
91
|
return out.replace(/\/+/g, "/");
|
|
93
92
|
}
|
|
94
93
|
//#endregion
|
|
95
|
-
export {
|
|
94
|
+
export { viteDevBridge };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as AgentResourceContent, B as EntriesToObject, G as DevToolsRpcSharedStates, H as Thenable, J as DevToolsDiagnosticsHost, K as DevToolsHost, Q as AgentResource, U as DevToolsRpcClientFunctions, V as PartialWithoutId, W as DevToolsRpcServerFunctions, X as AgentHandle, Y as DevToolsDiagnosticsLogger, Z as AgentManifest, _ as RpcStreamingChannel, a as DevframeRuntime, at as EventEmitter, c as defineDevframe, d as DevToolsNodeContext, et as AgentResourceInput, f as DevToolsNodeRpcSession, g as RpcSharedStateHost, h as RpcSharedStateGetOptions, i as DevframeDeploymentKind, it as DevToolsAgentHostEvents, l as ConnectionMeta, m as RpcFunctionsHost, n as DevframeCliOptions, nt as AgentToolInput, o as DevframeSetupInfo, ot as EventUnsubscribe, p as RpcBroadcastOptions, q as DevToolsDiagnosticsDefinition, r as DevframeDefinition, rt as DevToolsAgentHost, s as DevframeSpaOptions, st as EventsMap, t as DevframeBrowserContext, tt as AgentTool, u as DevToolsCapabilities, v as RpcStreamingChannelOptions, y as RpcStreamingHost, z as DevToolsViewHost } from "./devframe-R5Ex5K5L.mjs";
|
|
2
2
|
import { C as RpcReturnSchema, h as RpcFunctionDefinition, i as RpcArgsSchema, m as RpcFunctionAgentOptions, x as RpcFunctionType } from "./types-4rdUEi2R.mjs";
|
|
3
3
|
import { t as DevToolsNodeRpcSessionMeta } from "./ws-server-DjvlwLuM.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/define.d.ts
|
|
6
6
|
declare const defineRpcFunction: <NAME extends string, TYPE extends RpcFunctionType, ARGS extends any[], RETURN = void, const AS extends RpcArgsSchema | undefined = undefined, const RS extends RpcReturnSchema | undefined = undefined>(definition: RpcFunctionDefinition<NAME, TYPE, ARGS, RETURN, AS, RS, DevToolsNodeContext>) => RpcFunctionDefinition<NAME, TYPE, ARGS, RETURN, AS, RS, DevToolsNodeContext>;
|
|
7
7
|
//#endregion
|
|
8
|
-
export { AgentHandle, AgentManifest, AgentResource, AgentResourceContent, AgentResourceInput, AgentTool, AgentToolInput, ConnectionMeta, DevToolsAgentHost, DevToolsAgentHostEvents, DevToolsCapabilities, DevToolsDiagnosticsDefinition, DevToolsDiagnosticsHost, DevToolsDiagnosticsLogger, DevToolsHost, DevToolsNodeContext, DevToolsNodeRpcSession, DevToolsNodeRpcSessionMeta, DevToolsRpcClientFunctions, DevToolsRpcServerFunctions, DevToolsRpcSharedStates, DevToolsViewHost, DevframeBrowserContext, DevframeCliOptions, DevframeDefinition, DevframeDeploymentKind, DevframeRuntime, DevframeSetupInfo, DevframeSpaOptions,
|
|
8
|
+
export { AgentHandle, AgentManifest, AgentResource, AgentResourceContent, AgentResourceInput, AgentTool, AgentToolInput, ConnectionMeta, DevToolsAgentHost, DevToolsAgentHostEvents, DevToolsCapabilities, DevToolsDiagnosticsDefinition, DevToolsDiagnosticsHost, DevToolsDiagnosticsLogger, DevToolsHost, DevToolsNodeContext, DevToolsNodeRpcSession, DevToolsNodeRpcSessionMeta, DevToolsRpcClientFunctions, DevToolsRpcServerFunctions, DevToolsRpcSharedStates, DevToolsViewHost, DevframeBrowserContext, DevframeCliOptions, DevframeDefinition, DevframeDeploymentKind, DevframeRuntime, DevframeSetupInfo, DevframeSpaOptions, EntriesToObject, EventEmitter, EventUnsubscribe, EventsMap, PartialWithoutId, RpcBroadcastOptions, RpcFunctionAgentOptions, RpcFunctionsHost, RpcSharedStateGetOptions, RpcSharedStateHost, RpcStreamingChannel, RpcStreamingChannelOptions, RpcStreamingHost, Thenable, defineDevframe, defineRpcFunction };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as __require, r as __toESM, t as __commonJSMin } from "./chunk-e9Ob2GDo.mjs";
|
|
2
|
-
//#region
|
|
2
|
+
//#region ../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
|
|
3
3
|
var require_picocolors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4
4
|
let p = process || {}, argv = p.argv || [], env = p.env || {};
|
|
5
5
|
let isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
|
|
@@ -67,7 +67,7 @@ var require_picocolors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
67
67
|
module.exports.createColors = createColors;
|
|
68
68
|
}));
|
|
69
69
|
//#endregion
|
|
70
|
-
//#region
|
|
70
|
+
//#region ../../node_modules/.pnpm/shell-quote@1.8.3/node_modules/shell-quote/quote.js
|
|
71
71
|
var require_quote = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
72
72
|
module.exports = function quote(xs) {
|
|
73
73
|
return xs.map(function(s) {
|
|
@@ -80,7 +80,7 @@ var require_quote = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
80
80
|
};
|
|
81
81
|
}));
|
|
82
82
|
//#endregion
|
|
83
|
-
//#region
|
|
83
|
+
//#region ../../node_modules/.pnpm/shell-quote@1.8.3/node_modules/shell-quote/parse.js
|
|
84
84
|
var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
85
85
|
var CONTROL = "(?:" + [
|
|
86
86
|
"\\|\\|",
|
|
@@ -219,13 +219,13 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
219
219
|
};
|
|
220
220
|
}));
|
|
221
221
|
//#endregion
|
|
222
|
-
//#region
|
|
222
|
+
//#region ../../node_modules/.pnpm/shell-quote@1.8.3/node_modules/shell-quote/index.js
|
|
223
223
|
var require_shell_quote = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
224
224
|
exports.quote = require_quote();
|
|
225
225
|
exports.parse = require_parse();
|
|
226
226
|
}));
|
|
227
227
|
//#endregion
|
|
228
|
-
//#region
|
|
228
|
+
//#region ../../node_modules/.pnpm/launch-editor@2.13.2/node_modules/launch-editor/editor-info/macos.js
|
|
229
229
|
var require_macos = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
230
230
|
module.exports = {
|
|
231
231
|
"/Applications/Atom.app/Contents/MacOS/Atom": "atom",
|
|
@@ -260,7 +260,7 @@ var require_macos = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
260
260
|
};
|
|
261
261
|
}));
|
|
262
262
|
//#endregion
|
|
263
|
-
//#region
|
|
263
|
+
//#region ../../node_modules/.pnpm/launch-editor@2.13.2/node_modules/launch-editor/editor-info/linux.js
|
|
264
264
|
var require_linux = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
265
265
|
module.exports = {
|
|
266
266
|
atom: "atom",
|
|
@@ -294,7 +294,7 @@ var require_linux = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
294
294
|
};
|
|
295
295
|
}));
|
|
296
296
|
//#endregion
|
|
297
|
-
//#region
|
|
297
|
+
//#region ../../node_modules/.pnpm/launch-editor@2.13.2/node_modules/launch-editor/editor-info/windows.js
|
|
298
298
|
var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
299
299
|
module.exports = [
|
|
300
300
|
"Brackets.exe",
|
|
@@ -327,7 +327,7 @@ var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
327
327
|
];
|
|
328
328
|
}));
|
|
329
329
|
//#endregion
|
|
330
|
-
//#region
|
|
330
|
+
//#region ../../node_modules/.pnpm/launch-editor@2.13.2/node_modules/launch-editor/guess.js
|
|
331
331
|
var require_guess = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
332
332
|
const path$2 = __require("path");
|
|
333
333
|
const shellQuote = require_shell_quote();
|
|
@@ -388,7 +388,7 @@ var require_guess = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
388
388
|
};
|
|
389
389
|
}));
|
|
390
390
|
//#endregion
|
|
391
|
-
//#region
|
|
391
|
+
//#region ../../node_modules/.pnpm/launch-editor@2.13.2/node_modules/launch-editor/get-args.js
|
|
392
392
|
var require_get_args = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
393
393
|
const path$1 = __require("path");
|
|
394
394
|
module.exports = function getArgumentsForPosition(editor, fileName, lineNumber, columnNumber = 1) {
|
package/dist/node/auth.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as InternalAnonymousAuthStorage } from "../context-
|
|
1
|
+
import { P as SharedState, d as DevToolsNodeContext, f as DevToolsNodeRpcSession } from "../devframe-R5Ex5K5L.mjs";
|
|
2
|
+
import { n as InternalAnonymousAuthStorage } from "../context-DRa0wGsC.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/node/auth/revoke.d.ts
|
|
5
5
|
/**
|
package/dist/node/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $ as AgentResourceContent, J as DevToolsDiagnosticsHost$1, K as DevToolsHost, P as SharedState, Q as AgentResource, U as DevToolsRpcClientFunctions, W as DevToolsRpcServerFunctions, X as AgentHandle, Y as DevToolsDiagnosticsLogger, Z as AgentManifest, at as EventEmitter, d as DevToolsNodeContext, et as AgentResourceInput, f as DevToolsNodeRpcSession, g as RpcSharedStateHost, it as DevToolsAgentHostEvents, m as RpcFunctionsHost$1, nt as AgentToolInput, p as RpcBroadcastOptions, rt as DevToolsAgentHost$1, tt as AgentTool, y as RpcStreamingHost, z as DevToolsViewHost$1 } from "../devframe-R5Ex5K5L.mjs";
|
|
2
2
|
import { f as RpcFunctionsCollectorBase } from "../index-DB2Ie0Or.mjs";
|
|
3
3
|
import { g as RpcFunctionDefinitionAny } from "../types-4rdUEi2R.mjs";
|
|
4
4
|
import { t as DevToolsNodeRpcSessionMeta } from "../ws-server-DjvlwLuM.mjs";
|
|
5
|
-
import { n as StartedServer, r as startHttpAndWs, t as StartHttpAndWsOptions } from "../server-
|
|
5
|
+
import { n as StartedServer, r as startHttpAndWs, t as StartHttpAndWsOptions } from "../server-DzKz023G.mjs";
|
|
6
6
|
import { createLogger, defineDiagnostics } from "logs-sdk";
|
|
7
7
|
import { BirpcGroup } from "birpc";
|
|
8
8
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
@@ -21,13 +21,12 @@ interface CreateHostContextOptions {
|
|
|
21
21
|
builtinRpcDeclarations?: readonly RpcFunctionDefinitionAny[];
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
|
-
* Framework-
|
|
25
|
-
* host, view (HTTP file-serving) host, diagnostics, and
|
|
26
|
-
* subsystems.
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
* hub.
|
|
24
|
+
* Framework- and build-tool-agnostic core of the DevTools node context.
|
|
25
|
+
* Wires the RPC host, view (HTTP file-serving) host, diagnostics, and
|
|
26
|
+
* agent subsystems. Host adapters can wrap this to augment `ctx` with
|
|
27
|
+
* extra surfaces — for example, `@vitejs/devtools-kit`'s
|
|
28
|
+
* `createKitContext` attaches `docks`, `terminals`, `messages`,
|
|
29
|
+
* `commands`, and `createJsonRenderer` when mounted into Vite DevTools.
|
|
31
30
|
*/
|
|
32
31
|
declare function createHostContext(options: CreateHostContextOptions): Promise<DevToolsNodeContext>;
|
|
33
32
|
//#endregion
|
package/dist/node/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as createRpcSharedStateServerHost, i as createRpcStreamingServerHost, n as DevToolsViewHost, o as DevToolsDiagnosticsHost, r as RpcFunctionsHost, s as DevToolsAgentHost, t as createHostContext } from "../context-
|
|
1
|
+
import { a as createRpcSharedStateServerHost, i as createRpcStreamingServerHost, n as DevToolsViewHost, o as DevToolsDiagnosticsHost, r as RpcFunctionsHost, s as DevToolsAgentHost, t as createHostContext } from "../context-BBi2IQDm.mjs";
|
|
2
2
|
import { t as createH3DevToolsHost } from "../host-h3-Dz8YnFgu.mjs";
|
|
3
|
-
import { t as startHttpAndWs } from "../server-
|
|
4
|
-
import { t as collectStaticRpcDump } from "../static-dump-
|
|
5
|
-
import { t as createStorage } from "../storage-
|
|
3
|
+
import { t as startHttpAndWs } from "../server-DOk4grlJ.mjs";
|
|
4
|
+
import { t as collectStaticRpcDump } from "../static-dump-C67bCuse.mjs";
|
|
5
|
+
import { t as createStorage } from "../storage-CNvfBGQ5.mjs";
|
|
6
6
|
import { isIP } from "node:net";
|
|
7
7
|
//#region src/node/utils.ts
|
|
8
8
|
function isObject(value) {
|
package/dist/node/internal.d.mts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { i as DevframeDeploymentKind, r as DevframeDefinition } from "../devframe-
|
|
2
|
-
import { a as internalContextMap, i as getInternalContext, n as InternalAnonymousAuthStorage, r as RemoteTokenRecord, t as DevToolsInternalContext } from "../context-
|
|
1
|
+
import { i as DevframeDeploymentKind, r as DevframeDefinition } from "../devframe-R5Ex5K5L.mjs";
|
|
2
|
+
import { a as internalContextMap, i as getInternalContext, n as InternalAnonymousAuthStorage, r as RemoteTokenRecord, t as DevToolsInternalContext } from "../context-DRa0wGsC.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/adapters/_shared.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Resolve the mount base path for a devframe's SPA. Hosted adapters
|
|
7
|
-
* (`vite`, `
|
|
8
|
-
*
|
|
9
|
-
*
|
|
7
|
+
* (`vite`, `embedded`) default to `/__<id>/` so they don't collide
|
|
8
|
+
* with the host app; standalone adapters (`cli`, `spa`, `build`)
|
|
9
|
+
* default to `/` because they own the origin.
|
|
10
10
|
*
|
|
11
11
|
* The devframe author can override with `basePath` on the definition.
|
|
12
12
|
*/
|
package/dist/node/internal.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as createStorage } from "../storage-
|
|
1
|
+
import { t as createStorage } from "../storage-CNvfBGQ5.mjs";
|
|
2
2
|
import { n as revokeAuthToken, t as revokeActiveConnectionsForToken } from "../revoke-DIMz1r7-.mjs";
|
|
3
3
|
import { t as humanId } from "../human-id-adtUWQLr.mjs";
|
|
4
|
-
import { n as resolveBasePath, t as normalizeBasePath } from "../_shared-
|
|
4
|
+
import { n as resolveBasePath, t as normalizeBasePath } from "../_shared-BrKv3CYt.mjs";
|
|
5
5
|
import { join } from "pathe";
|
|
6
6
|
//#region src/node/internal/context.ts
|
|
7
7
|
const internalContextMap = /* @__PURE__ */ new WeakMap();
|