devframe 0.9.0 → 0.9.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/{_shared-BPmX9fqK.d.mts → _shared-BAGBgTUO.d.mts} +1 -1
- package/dist/{_shared-CbZ_yhbz.mjs → _shared-BM3PdYli.mjs} +1 -1
- package/dist/adapters/build.d.mts +1 -1
- package/dist/adapters/build.mjs +12 -9
- package/dist/adapters/cac.d.mts +1 -1
- package/dist/adapters/cac.mjs +4 -3
- package/dist/adapters/dev.d.mts +3 -3
- package/dist/adapters/dev.mjs +2 -2
- package/dist/adapters/embedded.d.mts +1 -1
- package/dist/adapters/embedded.mjs +2 -0
- package/dist/adapters/initiate.d.mts +2 -2
- package/dist/adapters/initiate.mjs +1 -1
- package/dist/adapters/mcp.d.mts +1 -1
- package/dist/adapters/mcp.mjs +1 -1
- package/dist/cli/main.mjs +2 -2
- package/dist/client/index.d.mts +48 -2
- package/dist/client/index.mjs +133 -23
- package/dist/constants.d.mts +74 -2
- package/dist/constants.mjs +9 -2
- package/dist/{context-xdynGSLP.mjs → context-af2w_F0_.mjs} +2 -2
- package/dist/{context-B3YUu_95.d.mts → context-al99DDJ8.d.mts} +1 -1
- package/dist/{context-CEe4PBz1.mjs → context-riPPHGiu.mjs} +339 -26
- package/dist/{dev--rAPzbvO.mjs → dev-BKm_HisC.mjs} +15 -11
- package/dist/{devframe-DJMg0WLe.d.mts → devframe-mbfgpQQC.d.mts} +774 -587
- package/dist/{diagnostics-DOQPnQmX.mjs → diagnostics-DI1HGj2I.mjs} +20 -0
- package/dist/{dist-eNI9qM_I.mjs → dist-CZXfGEkd.mjs} +1 -1
- package/dist/events-DKfSmoTj.mjs +65 -0
- package/dist/hash-DdPnc4k3.mjs +360 -0
- package/dist/{host-agent-xLCSe65D.mjs → host-agent-DVDLqjvj.mjs} +14 -13
- package/dist/{http-DYpK0cUi.mjs → http-POepPnaQ.mjs} +10 -6
- package/dist/{index-CB-fSUyn.d.mts → index-Dipgo9ji.d.mts} +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/{instance-registry-WvQkt42E.mjs → instance-registry-Dy28drtm.mjs} +4 -4
- package/dist/{instance-shell-CMFyszWJ.mjs → instance-shell-GqTY93gC.mjs} +5 -5
- package/dist/{instance-shell-CljiKq1c.d.mts → instance-shell-mU5j5xWn.d.mts} +2 -2
- package/dist/internal/index.d.mts +40 -4
- package/dist/internal/index.mjs +7 -7
- package/dist/node/auth.d.mts +2 -2
- package/dist/node/auth.mjs +2 -2
- package/dist/node/hub-internals.d.mts +2 -2
- package/dist/node/hub-internals.mjs +2 -2
- package/dist/node/index.d.mts +10 -1
- package/dist/node/index.mjs +2 -2
- package/dist/recipes/common-rpc-functions.d.mts +11 -1
- package/dist/recipes/common-rpc-functions.mjs +10 -0
- package/dist/recipes/interactive-auth.d.mts +2 -2
- package/dist/recipes/interactive-auth.mjs +2 -2
- package/dist/{remote-assets-nTTxY2MU.mjs → remote-assets-CqxiyltC.mjs} +18 -7
- package/dist/{revoke-DZbJ7Cl0.mjs → revoke-3Q6aDKWk.mjs} +2 -1
- package/dist/{rolldown-runtime-JspESFgx.mjs → rolldown-runtime-B4iAMlE-.mjs} +1 -1
- package/dist/rpc/dump.mjs +1 -1
- package/dist/rpc/index.mjs +1 -1
- package/dist/rpc/transports/ws-bun.d.mts +1 -1
- package/dist/rpc/transports/ws-deno.d.mts +26 -0
- package/dist/rpc/transports/ws-deno.mjs +30 -0
- package/dist/{rpc-core-DMTe-hLo.mjs → rpc-core-DRYnbxdD.mjs} +2 -2
- package/dist/{rpc-core-Cc4lucI0.d.mts → rpc-core-dV69u4lY.d.mts} +2 -2
- package/dist/{shared-state-fRRbRUtD.mjs → shared-state-DoXutg_U.mjs} +1 -1
- package/dist/{state-Cc1IeSmQ.mjs → state-CK9LjrnT.mjs} +1 -1
- package/dist/{static-BPZ1_OPA.mjs → static-DV_qUSRS.mjs} +1 -1
- package/dist/{storage-CYye7P7L.mjs → storage-BNqSAOxA.mjs} +3 -3
- package/dist/types/index.d.mts +2 -2
- package/dist/utils/events.d.mts +1 -1
- package/dist/utils/get-port.mjs +1 -1
- package/dist/utils/hash.mjs +1 -1
- package/dist/utils/launch-editor.mjs +12 -11
- package/dist/utils/open.mjs +1 -1
- package/dist/utils/remote-assets.d.mts +7 -1
- package/dist/utils/remote-assets.mjs +1 -1
- package/dist/utils/serve-static.mjs +6 -5
- 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/validation-YrZH6atx.mjs +311 -0
- package/package.json +4 -3
- package/skills/devframe/SKILL.md +1 -1
- package/dist/hash-KtDZYXDN.mjs +0 -266
- package/dist/validation-CpXFB6Dz.mjs +0 -266
- package/dist/{host-h3-Crkzm42q.mjs → host-h3-fRbF9yor.mjs} +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { At as DevframeAgentHost$1, Ct as AgentResource, Dt as AgentToolInput, Et as AgentTool, Mt as EventEmitter, Ot as AgentToolProvider, Q as DevframeHost, St as AgentManifest, Tt as AgentResourceInput, g as DevframeNodeContext, jt as DevframeAgentHostEvents, kt as AgentToolProviderHandle, wt as AgentResourceContent, xt as AgentHandle } from "../devframe-mbfgpQQC.mjs";
|
|
2
2
|
import { v as RpcFunctionDefinitionAny } from "../types-Djq7CBXh.mjs";
|
|
3
3
|
import { a as RemoteAssetsStore } from "../remote-assets-Bg4gCUZ_.mjs";
|
|
4
|
-
import { a as InstanceShellInit, c as StartedServer, d as samePath, f as DevframeInstanceRecord, h as registerDevframeInstance, i as InstanceShellApi, l as createInstanceShell, m as listLiveDevframeInstances, n as InstanceRegisterConfig, o as InstanceShellInternals, p as DevframeInstanceRegistration, r as InstanceShell, s as InstanceWsTier, t as CreateInstanceShellOptions, u as resolveInstanceRegister } from "../instance-shell-
|
|
5
|
-
import { n as normalizeBasePath, r as resolveBasePath } from "../_shared-
|
|
6
|
-
import { n as CreateContextRpcServerOptions, r as createContextRpcServer, t as ContextRpcServer } from "../rpc-core-
|
|
4
|
+
import { a as InstanceShellInit, c as StartedServer, d as samePath, f as DevframeInstanceRecord, h as registerDevframeInstance, i as InstanceShellApi, l as createInstanceShell, m as listLiveDevframeInstances, n as InstanceRegisterConfig, o as InstanceShellInternals, p as DevframeInstanceRegistration, r as InstanceShell, s as InstanceWsTier, t as CreateInstanceShellOptions, u as resolveInstanceRegister } from "../instance-shell-mU5j5xWn.mjs";
|
|
5
|
+
import { n as normalizeBasePath, r as resolveBasePath } from "../_shared-BAGBgTUO.mjs";
|
|
6
|
+
import { n as CreateContextRpcServerOptions, r as createContextRpcServer, t as ContextRpcServer } from "../rpc-core-dV69u4lY.mjs";
|
|
7
7
|
//#region src/node/agent-args.d.ts
|
|
8
8
|
/**
|
|
9
9
|
* How {@link coerceAgentPositionalArgs} treats an args object that carries
|
|
@@ -280,6 +280,42 @@ declare const diagnostics: import("nostics").Diagnostics<{
|
|
|
280
280
|
}) => string;
|
|
281
281
|
readonly fix: "A remote-assets `package` must be a valid npm package name and `version` an exact semver version (e.g. `1.2.3`) — they are interpolated into CDN URLs and the cache path.";
|
|
282
282
|
};
|
|
283
|
+
readonly DF0066: {
|
|
284
|
+
readonly why: (p: {
|
|
285
|
+
package: string;
|
|
286
|
+
}) => string;
|
|
287
|
+
readonly fix: "Option sets only merge before `ctx.services.ready()` fires. Install the service (or declare it in `DevframeDefinition.services`) before the barrier so its options join the merge.";
|
|
288
|
+
};
|
|
289
|
+
readonly DF0067: {
|
|
290
|
+
readonly why: (p: {
|
|
291
|
+
package: string;
|
|
292
|
+
reason: string;
|
|
293
|
+
}) => string;
|
|
294
|
+
readonly fix: "Install the service package next to whoever declares it (a plugin declaring it in `services` should list it in its own dependencies), or drop `required: true` to degrade gracefully when it is absent.";
|
|
295
|
+
};
|
|
296
|
+
readonly DF0068: {
|
|
297
|
+
readonly why: (p: {
|
|
298
|
+
package: string;
|
|
299
|
+
required: string;
|
|
300
|
+
installed: string;
|
|
301
|
+
}) => string;
|
|
302
|
+
readonly fix: "Align the installed service package with the range its declarer requires, or drop `required: true` to downgrade the mismatch to a warning.";
|
|
303
|
+
};
|
|
304
|
+
readonly DF0069: {
|
|
305
|
+
readonly why: (p: {
|
|
306
|
+
package: string;
|
|
307
|
+
required: string;
|
|
308
|
+
installed: string;
|
|
309
|
+
}) => string;
|
|
310
|
+
readonly fix: "The advertised meta carries the real version, so clients can gate on it. Align the installed service package with the declared range to silence this warning.";
|
|
311
|
+
};
|
|
312
|
+
readonly DF0070: {
|
|
313
|
+
readonly why: (p: {
|
|
314
|
+
package: string;
|
|
315
|
+
reason: string;
|
|
316
|
+
}) => string;
|
|
317
|
+
readonly fix: "A service package's default export must be a factory returning a `DevframeServiceDefinition` — an object with `package`, `version`, `scope`, and a `setup` function.";
|
|
318
|
+
};
|
|
283
319
|
}, readonly [(d: import("nostics").Diagnostic, { method }?: {
|
|
284
320
|
method?: "log" | "warn" | "error";
|
|
285
321
|
}) => void]>;
|
package/dist/internal/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { n as peekRpcWireFrame, t as createRpcWireCodec } from "../wire-codec-0K-o5MYW.mjs";
|
|
2
|
-
import { t as diagnostics } from "../diagnostics-
|
|
3
|
-
import { n as coerceAgentPositionalArgs, t as DevframeAgentHost } from "../host-agent-
|
|
4
|
-
import { n as resolveBasePath, t as normalizeBasePath } from "../_shared-
|
|
5
|
-
import { t as createH3DevframeHost } from "../host-h3-
|
|
6
|
-
import { i as registerDevframeInstance, n as listLiveDevframeInstances } from "../instance-registry-
|
|
7
|
-
import { i as normalizeHttpServerUrl, n as resolveInstanceRegister, r as samePath, t as createInstanceShell } from "../instance-shell-
|
|
8
|
-
import { t as createContextRpcServer } from "../rpc-core-
|
|
2
|
+
import { t as diagnostics } from "../diagnostics-DI1HGj2I.mjs";
|
|
3
|
+
import { n as coerceAgentPositionalArgs, t as DevframeAgentHost } from "../host-agent-DVDLqjvj.mjs";
|
|
4
|
+
import { n as resolveBasePath, t as normalizeBasePath } from "../_shared-BM3PdYli.mjs";
|
|
5
|
+
import { t as createH3DevframeHost } from "../host-h3-fRbF9yor.mjs";
|
|
6
|
+
import { i as registerDevframeInstance, n as listLiveDevframeInstances } from "../instance-registry-Dy28drtm.mjs";
|
|
7
|
+
import { i as normalizeHttpServerUrl, n as resolveInstanceRegister, r as samePath, t as createInstanceShell } from "../instance-shell-GqTY93gC.mjs";
|
|
8
|
+
import { t as createContextRpcServer } from "../rpc-core-DRYnbxdD.mjs";
|
|
9
9
|
export { DevframeAgentHost, coerceAgentPositionalArgs, createContextRpcServer, createH3DevframeHost, createInstanceShell, createRpcWireCodec, diagnostics, listLiveDevframeInstances, normalizeBasePath, normalizeHttpServerUrl, peekRpcWireFrame, registerDevframeInstance, resolveBasePath, resolveInstanceRegister, samePath };
|
package/dist/node/auth.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { u as DevframeAuthHandler } from "../devframe-
|
|
2
|
-
import { a as verifyAuthToken, i as refreshTempAuthCode, n as exchangeTempAuthCode, o as revokeActiveConnectionsForToken, r as getTempAuthCode, s as revokeAuthToken, t as buildOtpAuthUrl } from "../index-
|
|
1
|
+
import { u as DevframeAuthHandler } from "../devframe-mbfgpQQC.mjs";
|
|
2
|
+
import { a as verifyAuthToken, i as refreshTempAuthCode, n as exchangeTempAuthCode, o as revokeActiveConnectionsForToken, r as getTempAuthCode, s as revokeAuthToken, t as buildOtpAuthUrl } from "../index-Dipgo9ji.mjs";
|
|
3
3
|
export { DevframeAuthHandler, buildOtpAuthUrl, exchangeTempAuthCode, getTempAuthCode, refreshTempAuthCode, revokeActiveConnectionsForToken, revokeAuthToken, verifyAuthToken };
|
package/dist/node/auth.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as revokeAuthToken, t as revokeActiveConnectionsForToken } from "../revoke-
|
|
2
|
-
import { a as verifyAuthToken, i as refreshTempAuthCode, n as exchangeTempAuthCode, r as getTempAuthCode, t as buildOtpAuthUrl } from "../state-
|
|
1
|
+
import { n as revokeAuthToken, t as revokeActiveConnectionsForToken } from "../revoke-3Q6aDKWk.mjs";
|
|
2
|
+
import { a as verifyAuthToken, i as refreshTempAuthCode, n as exchangeTempAuthCode, r as getTempAuthCode, t as buildOtpAuthUrl } from "../state-CK9LjrnT.mjs";
|
|
3
3
|
export { buildOtpAuthUrl, exchangeTempAuthCode, getTempAuthCode, refreshTempAuthCode, revokeActiveConnectionsForToken, revokeAuthToken, verifyAuthToken };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as internalContextMap, i as getInternalContext, n as InternalAnonymousAuthStorage, r as RemoteTokenRecord, t as DevframeInternalContext } from "../context-
|
|
2
|
-
import { n as normalizeBasePath, r as resolveBasePath } from "../_shared-
|
|
1
|
+
import { a as internalContextMap, i as getInternalContext, n as InternalAnonymousAuthStorage, r as RemoteTokenRecord, t as DevframeInternalContext } from "../context-al99DDJ8.mjs";
|
|
2
|
+
import { n as normalizeBasePath, r as resolveBasePath } from "../_shared-BAGBgTUO.mjs";
|
|
3
3
|
export { type DevframeInternalContext, type InternalAnonymousAuthStorage, type RemoteTokenRecord, getInternalContext, internalContextMap, normalizeBasePath, resolveBasePath };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as resolveBasePath, t as normalizeBasePath } from "../_shared-
|
|
2
|
-
import { n as internalContextMap, t as getInternalContext } from "../context-
|
|
1
|
+
import { n as resolveBasePath, t as normalizeBasePath } from "../_shared-BM3PdYli.mjs";
|
|
2
|
+
import { n as internalContextMap, t as getInternalContext } from "../context-af2w_F0_.mjs";
|
|
3
3
|
export { getInternalContext, internalContextMap, normalizeBasePath, resolveBasePath };
|
package/dist/node/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Q as DevframeHost, g as DevframeNodeContext, gt as SharedState, y as RpcFunctionsHost } from "../devframe-mbfgpQQC.mjs";
|
|
2
2
|
import "../index-tdrk1bzV.mjs";
|
|
3
3
|
import { v as RpcFunctionDefinitionAny } from "../types-Djq7CBXh.mjs";
|
|
4
4
|
import { BirpcGroup } from "birpc";
|
|
@@ -8,6 +8,15 @@ interface CreateHostContextOptions {
|
|
|
8
8
|
workspaceRoot?: string;
|
|
9
9
|
mode: 'dev' | 'build';
|
|
10
10
|
host: DevframeHost;
|
|
11
|
+
/**
|
|
12
|
+
* `import.meta.url` of the module that defines the devframe this context
|
|
13
|
+
* serves (from `DevframeDefinition.importMetaUrl`). Supplies the default
|
|
14
|
+
* `resolveFrom` base for remote {@link DevframeViewHost.hostStatic} sources
|
|
15
|
+
* that don't set one, so a locally installed copy of an assets package is
|
|
16
|
+
* served with zero network. An internal plumbing detail — it isn't part of
|
|
17
|
+
* the public {@link DevframeNodeContext} surface.
|
|
18
|
+
*/
|
|
19
|
+
importMetaUrl?: string;
|
|
11
20
|
/**
|
|
12
21
|
* Built-in RPC declarations to register on the host. Framework
|
|
13
22
|
* adapters (vite, rolldown, cli) can pass the ones they need; the
|
package/dist/node/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as createHostContext } from "../context-
|
|
2
|
-
import { t as createStorage } from "../storage-
|
|
1
|
+
import { t as createHostContext } from "../context-riPPHGiu.mjs";
|
|
2
|
+
import { t as createStorage } from "../storage-BNqSAOxA.mjs";
|
|
3
3
|
export { createHostContext, createStorage };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../devframe-
|
|
1
|
+
import "../devframe-mbfgpQQC.mjs";
|
|
2
2
|
import "../index-tdrk1bzV.mjs";
|
|
3
3
|
import { E as Thenable, S as RpcFunctionSetupResult, c as RpcDump, g as RpcFunctionAgentOptions } from "../types-Djq7CBXh.mjs";
|
|
4
4
|
import { SimpleSchema } from "../utils/simple-schema.mjs";
|
|
@@ -33,6 +33,10 @@ declare const KNOWN_EDITORS: KnownEditor[];
|
|
|
33
33
|
* },
|
|
34
34
|
* })
|
|
35
35
|
* ```
|
|
36
|
+
*
|
|
37
|
+
* @deprecated Use the `@devframes/service-open` wire service instead — one
|
|
38
|
+
* host-level installation shared by every plugin and feature-detectable from
|
|
39
|
+
* clients, with workspace-root path containment on top of the editor gating.
|
|
36
40
|
*/
|
|
37
41
|
declare const openInEditor: {
|
|
38
42
|
name: "devframe:open-in-editor";
|
|
@@ -59,6 +63,10 @@ declare const openInEditor: {
|
|
|
59
63
|
*
|
|
60
64
|
* ctx.rpc.register(openInFinder)
|
|
61
65
|
* ```
|
|
66
|
+
*
|
|
67
|
+
* @deprecated Use the `@devframes/service-open` wire service instead — one
|
|
68
|
+
* host-level installation shared by every plugin and feature-detectable from
|
|
69
|
+
* clients, with workspace-root path containment.
|
|
62
70
|
*/
|
|
63
71
|
declare const openInFinder: {
|
|
64
72
|
name: "devframe:open-in-finder";
|
|
@@ -84,6 +92,8 @@ declare const openInFinder: {
|
|
|
84
92
|
*
|
|
85
93
|
* commonRpcFunctions.forEach(fn => ctx.rpc.register(fn))
|
|
86
94
|
* ```
|
|
95
|
+
*
|
|
96
|
+
* @deprecated Use the `@devframes/service-open` wire service instead.
|
|
87
97
|
*/
|
|
88
98
|
declare const commonRpcFunctions: readonly [{
|
|
89
99
|
name: "devframe:open-in-editor";
|
|
@@ -56,6 +56,10 @@ const KNOWN_EDITORS = [
|
|
|
56
56
|
* },
|
|
57
57
|
* })
|
|
58
58
|
* ```
|
|
59
|
+
*
|
|
60
|
+
* @deprecated Use the `@devframes/service-open` wire service instead — one
|
|
61
|
+
* host-level installation shared by every plugin and feature-detectable from
|
|
62
|
+
* clients, with workspace-root path containment on top of the editor gating.
|
|
59
63
|
*/
|
|
60
64
|
const openInEditor = defineRpcFunction({
|
|
61
65
|
name: "devframe:open-in-editor",
|
|
@@ -78,6 +82,10 @@ const openInEditor = defineRpcFunction({
|
|
|
78
82
|
*
|
|
79
83
|
* ctx.rpc.register(openInFinder)
|
|
80
84
|
* ```
|
|
85
|
+
*
|
|
86
|
+
* @deprecated Use the `@devframes/service-open` wire service instead — one
|
|
87
|
+
* host-level installation shared by every plugin and feature-detectable from
|
|
88
|
+
* clients, with workspace-root path containment.
|
|
81
89
|
*/
|
|
82
90
|
const openInFinder = defineRpcFunction({
|
|
83
91
|
name: "devframe:open-in-finder",
|
|
@@ -99,6 +107,8 @@ const openInFinder = defineRpcFunction({
|
|
|
99
107
|
*
|
|
100
108
|
* commonRpcFunctions.forEach(fn => ctx.rpc.register(fn))
|
|
101
109
|
* ```
|
|
110
|
+
*
|
|
111
|
+
* @deprecated Use the `@devframes/service-open` wire service instead.
|
|
102
112
|
*/
|
|
103
113
|
const commonRpcFunctions = [openInEditor, openInFinder];
|
|
104
114
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g as DevframeNodeContext, u as DevframeAuthHandler } from "../devframe-
|
|
2
|
-
import "../index-
|
|
1
|
+
import { g as DevframeNodeContext, u as DevframeAuthHandler } from "../devframe-mbfgpQQC.mjs";
|
|
2
|
+
import "../index-Dipgo9ji.mjs";
|
|
3
3
|
//#region src/recipes/interactive-auth.d.ts
|
|
4
4
|
interface CreateInteractiveAuthOptions {
|
|
5
5
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { s as colors } from "../nostics-CzECRXpE.mjs";
|
|
2
2
|
import { n as defineRpcFunction } from "../define-BLWPsH6y.mjs";
|
|
3
3
|
import { isAnonymousRpcMethod } from "../constants.mjs";
|
|
4
|
-
import { a as verifyAuthToken, n as exchangeTempAuthCode, r as getTempAuthCode, t as buildOtpAuthUrl } from "../state-
|
|
5
|
-
import { t as getInternalContext } from "../context-
|
|
4
|
+
import { a as verifyAuthToken, n as exchangeTempAuthCode, r as getTempAuthCode, t as buildOtpAuthUrl } from "../state-CK9LjrnT.mjs";
|
|
5
|
+
import { t as getInternalContext } from "../context-af2w_F0_.mjs";
|
|
6
6
|
import { t as s } from "../simple-schema-DQPZrAaZ.mjs";
|
|
7
7
|
//#region src/recipes/interactive-auth.ts
|
|
8
8
|
function defaultBanner(info) {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { t as diagnostics } from "./diagnostics-
|
|
1
|
+
import { t as diagnostics } from "./diagnostics-DI1HGj2I.mjs";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import { isatty } from "node:tty";
|
|
4
4
|
import { formatWithOptions, inspect } from "node:util";
|
|
5
|
+
import { dirname, extname, join, normalize, sep } from "pathe";
|
|
5
6
|
import { createReadStream, existsSync } from "node:fs";
|
|
6
7
|
import { Buffer } from "node:buffer";
|
|
7
8
|
import { mkdir, readFile, rename, rm, stat, writeFile } from "node:fs/promises";
|
|
8
9
|
import { Readable } from "node:stream";
|
|
9
10
|
import { lookup } from "mrmime";
|
|
10
|
-
import { dirname, extname, join, normalize, sep } from "pathe";
|
|
11
11
|
//#region ../../node_modules/.pnpm/obug@2.1.4/node_modules/obug/dist/core.js
|
|
12
12
|
/**
|
|
13
13
|
* Coerce `value`.
|
|
@@ -315,9 +315,10 @@ const CACHE_CONTROL_HEADER = "no-store";
|
|
|
315
315
|
function flattenTree(nodes, style) {
|
|
316
316
|
const out = [];
|
|
317
317
|
const walk = (list, prefix) => {
|
|
318
|
-
for (const node of list) if (style === "path")
|
|
319
|
-
|
|
320
|
-
|
|
318
|
+
for (const node of list) if (style === "path") {
|
|
319
|
+
if (node.type === "file") out.push((node.path ?? "").replace(/^\//, ""));
|
|
320
|
+
else walk(node.files ?? [], "");
|
|
321
|
+
} else if (node.type === "file") out.push(prefix + (node.name ?? ""));
|
|
321
322
|
else if (node.files) walk(node.files, `${prefix}${node.name}/`);
|
|
322
323
|
};
|
|
323
324
|
walk(nodes, "");
|
|
@@ -626,11 +627,21 @@ function assertValidRemoteAssets(assets) {
|
|
|
626
627
|
*
|
|
627
628
|
* A remote source's `package`/`version` are validated first (`DF0065`) — both
|
|
628
629
|
* are interpolated into CDN URLs and the cache path.
|
|
630
|
+
*
|
|
631
|
+
* `defaultResolveFrom` (typically the declaring devframe's `importMetaUrl`)
|
|
632
|
+
* supplies a `resolveFrom` base for a remote source that doesn't set one:
|
|
633
|
+
* it is applied only when `source.resolveFrom` is `undefined`, so an explicit
|
|
634
|
+
* per-source string still wins and an explicit `null` still opts out of the
|
|
635
|
+
* installed-copy lookup.
|
|
629
636
|
*/
|
|
630
|
-
function resolveStaticAssetsSource(source, projectStorageDir) {
|
|
637
|
+
function resolveStaticAssetsSource(source, projectStorageDir, defaultResolveFrom) {
|
|
631
638
|
if (typeof source === "string") return source;
|
|
632
639
|
assertValidRemoteAssets(source);
|
|
633
|
-
|
|
640
|
+
const resolved = source.resolveFrom === void 0 && defaultResolveFrom != null ? {
|
|
641
|
+
...source,
|
|
642
|
+
resolveFrom: defaultResolveFrom
|
|
643
|
+
} : source;
|
|
644
|
+
return resolveInstalled(resolved) ?? createStore(resolved, join(projectStorageDir, ".remote-assets", `${resolved.package.replace(/\//g, "+")}@${resolved.version}`));
|
|
634
645
|
}
|
|
635
646
|
//#endregion
|
|
636
647
|
export { createDebug as n, resolveStaticAssetsSource as t };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { t as DEVFRAME_EVENTS } from "./events-DKfSmoTj.mjs";
|
|
1
2
|
//#region src/node/auth/revoke.ts
|
|
2
3
|
/**
|
|
3
4
|
* Flip `isTrusted` to false on any live WS clients connected with `token`
|
|
@@ -16,7 +17,7 @@ async function revokeActiveConnectionsForToken(context, token) {
|
|
|
16
17
|
}
|
|
17
18
|
if (affectedSessionIds.size === 0) return;
|
|
18
19
|
await rpcHost.broadcast({
|
|
19
|
-
method:
|
|
20
|
+
method: DEVFRAME_EVENTS.broadcast.authRevoked,
|
|
20
21
|
args: [],
|
|
21
22
|
filter: (client) => affectedSessionIds.has(client.$meta.id)
|
|
22
23
|
});
|
|
@@ -26,7 +26,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
26
26
|
}
|
|
27
27
|
return to;
|
|
28
28
|
};
|
|
29
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
29
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
30
30
|
value: mod,
|
|
31
31
|
enumerable: true
|
|
32
32
|
}) : target, mod));
|
package/dist/rpc/dump.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as reviveDumpError, i as getDefinitionsWithDumps, n as createClientFromDump, o as serializeDumpError, r as dumpFunctions, t as collectStaticRpcDump } from "../static-
|
|
1
|
+
import { a as reviveDumpError, i as getDefinitionsWithDumps, n as createClientFromDump, o as serializeDumpError, r as dumpFunctions, t as collectStaticRpcDump } from "../static-DV_qUSRS.mjs";
|
|
2
2
|
export { collectStaticRpcDump, createClientFromDump, dumpFunctions, getDefinitionsWithDumps, reviveDumpError, serializeDumpError };
|
package/dist/rpc/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as validateRpcArgs, i as getRpcResolvedSetupResult, n as validateDefinitions, o as validateRpcReturn, r as getRpcHandler, s as hash, t as validateDefinition } from "../validation-
|
|
1
|
+
import { a as validateRpcArgs, i as getRpcResolvedSetupResult, n as validateDefinitions, o as validateRpcReturn, r as getRpcHandler, s as hash, t as validateDefinition } from "../validation-YrZH6atx.mjs";
|
|
2
2
|
import { t as diagnostics } from "../diagnostics-CD8nlgll.mjs";
|
|
3
3
|
import { n as defineRpcFunction, t as createDefineWrapperWithContext } from "../define-BLWPsH6y.mjs";
|
|
4
4
|
import { n as strictJsonStringify, t as STRUCTURED_CLONE_PREFIX } from "../serialization-BGzEwAdr.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as WsOriginRegistry } from "../../ws-server-D1d3QM9f.mjs";
|
|
2
|
-
import { t as ContextRpcServer } from "../../rpc-core-
|
|
2
|
+
import { t as ContextRpcServer } from "../../rpc-core-dV69u4lY.mjs";
|
|
3
3
|
//#region src/rpc/transports/ws-bun.d.ts
|
|
4
4
|
interface AttachBunWsTransportOptions {
|
|
5
5
|
/** Same contract as `WsRpcTransportOptions.allowedOrigins`. */
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { n as WsOriginRegistry } from "../../ws-server-D1d3QM9f.mjs";
|
|
2
|
+
import { t as ContextRpcServer } from "../../rpc-core-dV69u4lY.mjs";
|
|
3
|
+
//#region src/rpc/transports/ws-deno.d.ts
|
|
4
|
+
interface AttachDenoWsTransportOptions {
|
|
5
|
+
/** Same contract as `WsRpcTransportOptions.allowedOrigins`. */
|
|
6
|
+
allowedOrigins?: readonly string[] | WsOriginRegistry | false;
|
|
7
|
+
}
|
|
8
|
+
interface DenoWsTier {
|
|
9
|
+
/**
|
|
10
|
+
* Complete a WS upgrade request — `Deno.serve`'s handler info as the 2nd
|
|
11
|
+
* argument. Unlike Bun, Deno's adapter attaches the socket to the returned
|
|
12
|
+
* `Response` itself, so there is no `websocket` handler object to register.
|
|
13
|
+
*/
|
|
14
|
+
handleUpgrade: (request: Request, info: unknown) => Promise<Response>;
|
|
15
|
+
close: () => Promise<void>;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The Deno fetch-upgrade WebSocket tier for `initDevframe` / `initHub` — the
|
|
19
|
+
* same RPC peer wiring as `attachWsRpcTransport`, driven by crossws's Deno
|
|
20
|
+
* adapter so upgrades complete through `handleUpgrade(request, info)` on the
|
|
21
|
+
* app's own origin, with no side-car server. Load it dynamically so the Deno
|
|
22
|
+
* adapter never enters a Node-only bundle path.
|
|
23
|
+
*/
|
|
24
|
+
declare function attachDenoWsTransport(core: ContextRpcServer, options?: AttachDenoWsTransportOptions): Promise<DenoWsTier>;
|
|
25
|
+
//#endregion
|
|
26
|
+
export { AttachDenoWsTransportOptions, DenoWsTier, attachDenoWsTransport };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { i as isAllowedOrigin, r as createWsRpcPeerHooks } from "../../ws-server-BdSLrhxE.mjs";
|
|
2
|
+
//#region src/rpc/transports/ws-deno.ts
|
|
3
|
+
/**
|
|
4
|
+
* The Deno fetch-upgrade WebSocket tier for `initDevframe` / `initHub` — the
|
|
5
|
+
* same RPC peer wiring as `attachWsRpcTransport`, driven by crossws's Deno
|
|
6
|
+
* adapter so upgrades complete through `handleUpgrade(request, info)` on the
|
|
7
|
+
* app's own origin, with no side-car server. Load it dynamically so the Deno
|
|
8
|
+
* adapter never enters a Node-only bundle path.
|
|
9
|
+
*/
|
|
10
|
+
async function attachDenoWsTransport(core, options = {}) {
|
|
11
|
+
const { default: denoAdapter } = await import("crossws/adapters/deno");
|
|
12
|
+
const { allowedOrigins } = options;
|
|
13
|
+
const ws = denoAdapter({ hooks: {
|
|
14
|
+
...createWsRpcPeerHooks(core.rpcGroup, {
|
|
15
|
+
onConnected: core.onConnected,
|
|
16
|
+
onDisconnected: core.onDisconnected
|
|
17
|
+
}),
|
|
18
|
+
upgrade(request) {
|
|
19
|
+
const origin = request.headers.get("origin") ?? void 0;
|
|
20
|
+
const allowed = allowedOrigins && !Array.isArray(allowedOrigins) ? allowedOrigins.isAllowed(origin) : isAllowedOrigin(origin, allowedOrigins || []);
|
|
21
|
+
if (allowedOrigins !== false && !allowed) return new Response("Forbidden", { status: 403 });
|
|
22
|
+
}
|
|
23
|
+
} });
|
|
24
|
+
return {
|
|
25
|
+
handleUpgrade: (request, info) => ws.handleUpgrade(request, info),
|
|
26
|
+
close: () => ws.close()
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
export { attachDenoWsTransport };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
import { n as __exportAll } from "./rolldown-runtime-B4iAMlE-.mjs";
|
|
2
2
|
import { createRpcServer } from "./rpc/server.mjs";
|
|
3
|
-
import { t as diagnostics } from "./diagnostics-
|
|
3
|
+
import { t as diagnostics } from "./diagnostics-DI1HGj2I.mjs";
|
|
4
4
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
5
5
|
//#region src/node/rpc-core.ts
|
|
6
6
|
var rpc_core_exports = /* @__PURE__ */ __exportAll({ createContextRpcServer: () => createContextRpcServer });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { E as DevframeRpcServerFunctions, T as DevframeRpcClientFunctions, _ as DevframeNodeRpcSession, g as DevframeNodeContext, u as DevframeAuthHandler } from "./devframe-mbfgpQQC.mjs";
|
|
2
2
|
import { d as DevframeRpcConnection, u as DevframeNodeRpcSessionMeta } from "./ws-server-D1d3QM9f.mjs";
|
|
3
|
-
import "./index-
|
|
3
|
+
import "./index-Dipgo9ji.mjs";
|
|
4
4
|
import { BirpcGroup, EventOptions } from "birpc";
|
|
5
5
|
//#region src/node/rpc-core.d.ts
|
|
6
6
|
interface CreateContextRpcServerOptions {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createEventEmitter } from "./utils/events.mjs";
|
|
2
2
|
import { nanoid } from "./utils/nanoid.mjs";
|
|
3
|
-
//#region ../../node_modules/.pnpm/immer@11.1.
|
|
3
|
+
//#region ../../node_modules/.pnpm/immer@11.1.17/node_modules/immer/dist/immer.mjs
|
|
4
4
|
var NOTHING = Symbol.for("immer-nothing");
|
|
5
5
|
var DRAFTABLE = Symbol.for("immer-draftable");
|
|
6
6
|
var DRAFT_STATE = Symbol.for("immer-state");
|
|
@@ -1191,7 +1191,7 @@ const TEMP_AUTH_CODE_LENGTH = 6;
|
|
|
1191
1191
|
* 6-digit code only has ~20 bits of entropy, so a short lifetime plus the
|
|
1192
1192
|
* attempt cap below are what keep it brute-force resistant.
|
|
1193
1193
|
*/
|
|
1194
|
-
const TEMP_AUTH_CODE_TTL =
|
|
1194
|
+
const TEMP_AUTH_CODE_TTL = 3e5;
|
|
1195
1195
|
/** Failed attempts allowed against a single code before it is rotated. */
|
|
1196
1196
|
const TEMP_AUTH_MAX_ATTEMPTS = 5;
|
|
1197
1197
|
let tempAuthCode = generateTempCode();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as validateDefinitions, r as getRpcHandler, s as hash } from "./validation-
|
|
1
|
+
import { n as validateDefinitions, r as getRpcHandler, s as hash } from "./validation-YrZH6atx.mjs";
|
|
2
2
|
import { t as diagnostics } from "./diagnostics-CD8nlgll.mjs";
|
|
3
3
|
import { DEVFRAME_RPC_DUMP_DIRNAME } from "./constants.mjs";
|
|
4
4
|
//#region ../../node_modules/.pnpm/yocto-queue@1.2.2/node_modules/yocto-queue/index.js
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as diagnostics } from "./diagnostics-
|
|
1
|
+
import { t as diagnostics } from "./diagnostics-DI1HGj2I.mjs";
|
|
2
2
|
import { createSharedState } from "devframe/utils/shared-state";
|
|
3
|
-
import fs from "node:fs";
|
|
4
|
-
import { dirname } from "pathe";
|
|
5
3
|
import process from "node:process";
|
|
4
|
+
import { dirname } from "pathe";
|
|
5
|
+
import fs from "node:fs";
|
|
6
6
|
//#region ../../node_modules/.pnpm/perfect-debounce@2.1.0/node_modules/perfect-debounce/dist/index.mjs
|
|
7
7
|
const DEBOUNCE_DEFAULTS = { trailing: true };
|
|
8
8
|
/**
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { $ as DevframeStorageScope, A as DevframeServiceId, At as DevframeAgentHost, B as DevframeScopedNodeRpc, C as RpcStreamingChannelOptions, Ct as AgentResource, D as DevframeRpcSharedStates, Dt as AgentToolInput, E as DevframeRpcServerFunctions, Et as AgentTool, F as DevframeServicesHost, G as ScopedBroadcastOptions, H as DevframeSettings, I as DevframeServicesRegistry, J as ScopedServerFunctions, K as ScopedClientFunctions, L as DevframeServicesScopeRegistry, M as DevframeServiceMeta, Mt as EventEmitter, N as DevframeServiceOf, Nt as EventUnsubscribe, O as DevframeServiceDefinition, Ot as AgentToolProvider, P as DevframeServiceScopeOf, Pt as EventsMap, Q as DevframeHost, R as DevframeServicesState, S as RpcStreamingChannel, St as AgentManifest, T as DevframeRpcClientFunctions, Tt as AgentResourceInput, U as DevframeSettingsRegistry, V as DevframeScopedStreamingHost, W as DevframeSettingsStore, X as SettingsForNamespace, Y as ScopedSharedStates, Z as DevframeViewHost, _ as DevframeNodeRpcSession, a as DevframeDuplicationStrategy, b as RpcSharedStateGetOptions, c as DevframeWsOptions, d as ConnectionMeta, et as DevframeDiagnosticsHost, f as ConnectionMetaSse, g as DevframeNodeContext, h as DevframeConnectionConfigsRegistry, i as DevframeDockDefaults, j as DevframeServiceInput, jt as DevframeAgentHostEvents, k as DevframeServiceDescriptor, kt as AgentToolProviderHandle, l as McpRouteOptions, m as DevframeCapabilities, n as DevframeDefinition, o as DevframeSetupInfo, p as ConnectionMetaWebsocket, q as ScopedRpcFn, r as DevframeDeploymentKind, s as DevframeSseOptions, t as DevframeCliOptions, tt as DevframeDiagnosticsLogger, v as RpcBroadcastOptions, w as RpcStreamingHost, wt as AgentResourceContent, x as RpcSharedStateHost, xt as AgentHandle, y as RpcFunctionsHost, z as DevframeScopedNodeContext } from "../devframe-mbfgpQQC.mjs";
|
|
2
2
|
import { g as RpcFunctionAgentOptions } from "../types-Djq7CBXh.mjs";
|
|
3
3
|
import { d as DevframeRpcConnection, f as DevframeRpcConnectionRequest, p as DevframeRpcTransportKind, u as DevframeNodeRpcSessionMeta } from "../ws-server-D1d3QM9f.mjs";
|
|
4
4
|
import { i as DevframeDefineDiagnosticsOptions } from "../nostics-SPGDgHEP.mjs";
|
|
5
5
|
import { a as RemoteAssetsStore, i as RemoteAssetsProviderCustom, n as RemoteAssetsErrorMessage, o as StaticAssetsSource, r as RemoteAssetsProvider, t as RemoteAssets } from "../remote-assets-Bg4gCUZ_.mjs";
|
|
6
|
-
export { AgentHandle, AgentManifest, AgentResource, AgentResourceContent, AgentResourceInput, AgentTool, AgentToolInput, AgentToolProvider, AgentToolProviderHandle, ConnectionMeta, ConnectionMetaSse, ConnectionMetaWebsocket, DevframeAgentHost, DevframeAgentHostEvents, DevframeCapabilities, DevframeCliOptions, DevframeConnectionConfigsRegistry, type DevframeDefineDiagnosticsOptions, DevframeDefinition, DevframeDeploymentKind, DevframeDiagnosticsHost, DevframeDiagnosticsLogger, DevframeDockDefaults, DevframeDuplicationStrategy, DevframeHost, DevframeNodeContext, DevframeNodeRpcSession, type DevframeNodeRpcSessionMeta, DevframeRpcClientFunctions, type DevframeRpcConnection, type DevframeRpcConnectionRequest, DevframeRpcServerFunctions, DevframeRpcSharedStates, type DevframeRpcTransportKind, DevframeScopedNodeContext, DevframeScopedNodeRpc, DevframeScopedStreamingHost, DevframeServiceId, DevframeServiceOf, DevframeServicesHost, DevframeServicesRegistry, DevframeSettings, DevframeSettingsRegistry, DevframeSettingsStore, DevframeSetupInfo, DevframeSseOptions, DevframeStorageScope, DevframeViewHost, DevframeWsOptions, EventEmitter, EventUnsubscribe, EventsMap, McpRouteOptions, RemoteAssets, RemoteAssetsErrorMessage, RemoteAssetsProvider, RemoteAssetsProviderCustom, RemoteAssetsStore, RpcBroadcastOptions, type RpcFunctionAgentOptions, RpcFunctionsHost, RpcSharedStateGetOptions, RpcSharedStateHost, RpcStreamingChannel, RpcStreamingChannelOptions, RpcStreamingHost, ScopedBroadcastOptions, ScopedClientFunctions, ScopedRpcFn, ScopedServerFunctions, ScopedSharedStates, SettingsForNamespace, StaticAssetsSource };
|
|
6
|
+
export { AgentHandle, AgentManifest, AgentResource, AgentResourceContent, AgentResourceInput, AgentTool, AgentToolInput, AgentToolProvider, AgentToolProviderHandle, ConnectionMeta, ConnectionMetaSse, ConnectionMetaWebsocket, DevframeAgentHost, DevframeAgentHostEvents, DevframeCapabilities, DevframeCliOptions, DevframeConnectionConfigsRegistry, type DevframeDefineDiagnosticsOptions, DevframeDefinition, DevframeDeploymentKind, DevframeDiagnosticsHost, DevframeDiagnosticsLogger, DevframeDockDefaults, DevframeDuplicationStrategy, DevframeHost, DevframeNodeContext, DevframeNodeRpcSession, type DevframeNodeRpcSessionMeta, DevframeRpcClientFunctions, type DevframeRpcConnection, type DevframeRpcConnectionRequest, DevframeRpcServerFunctions, DevframeRpcSharedStates, type DevframeRpcTransportKind, DevframeScopedNodeContext, DevframeScopedNodeRpc, DevframeScopedStreamingHost, DevframeServiceDefinition, DevframeServiceDescriptor, DevframeServiceId, DevframeServiceInput, DevframeServiceMeta, DevframeServiceOf, DevframeServiceScopeOf, DevframeServicesHost, DevframeServicesRegistry, DevframeServicesScopeRegistry, DevframeServicesState, DevframeSettings, DevframeSettingsRegistry, DevframeSettingsStore, DevframeSetupInfo, DevframeSseOptions, DevframeStorageScope, DevframeViewHost, DevframeWsOptions, EventEmitter, EventUnsubscribe, EventsMap, McpRouteOptions, RemoteAssets, RemoteAssetsErrorMessage, RemoteAssetsProvider, RemoteAssetsProviderCustom, RemoteAssetsStore, RpcBroadcastOptions, type RpcFunctionAgentOptions, RpcFunctionsHost, RpcSharedStateGetOptions, RpcSharedStateHost, RpcStreamingChannel, RpcStreamingChannelOptions, RpcStreamingHost, ScopedBroadcastOptions, ScopedClientFunctions, ScopedRpcFn, ScopedServerFunctions, ScopedSharedStates, SettingsForNamespace, StaticAssetsSource };
|
package/dist/utils/events.d.mts
CHANGED
package/dist/utils/get-port.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as getPort } from "../dist-
|
|
1
|
+
import { n as getPort } from "../dist-CZXfGEkd.mjs";
|
|
2
2
|
export { getPort };
|
package/dist/utils/hash.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as hash } from "../hash-
|
|
1
|
+
import { t as hash } from "../hash-DdPnc4k3.mjs";
|
|
2
2
|
export { hash };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as __toESM, r as __require, t as __commonJSMin } from "../rolldown-runtime-
|
|
1
|
+
import { i as __toESM, r as __require, t as __commonJSMin } from "../rolldown-runtime-B4iAMlE-.mjs";
|
|
2
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 || {};
|
|
@@ -269,16 +269,17 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
269
269
|
if (esc) {
|
|
270
270
|
out += c;
|
|
271
271
|
esc = false;
|
|
272
|
-
} else if (quote)
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
272
|
+
} else if (quote) {
|
|
273
|
+
if (c === quote) quote = false;
|
|
274
|
+
else if (quote == SQ) out += c;
|
|
275
|
+
else if (c === BS) {
|
|
276
|
+
i += 1;
|
|
277
|
+
c = s.charAt(i);
|
|
278
|
+
if (c === DQ || c === BS || c === DS) out += c;
|
|
279
|
+
else out += BS + c;
|
|
280
|
+
} else if (c === DS) out += parseEnvVar();
|
|
281
|
+
else out += c;
|
|
282
|
+
} else if (c === DQ || c === SQ) {
|
|
282
283
|
quote = c;
|
|
283
284
|
sawQuote = true;
|
|
284
285
|
} else if (controlRE.test(c)) return { op: s };
|
package/dist/utils/open.mjs
CHANGED
|
@@ -9,7 +9,13 @@ import { a as RemoteAssetsStore, o as StaticAssetsSource } from "../remote-asset
|
|
|
9
9
|
*
|
|
10
10
|
* A remote source's `package`/`version` are validated first (`DF0065`) — both
|
|
11
11
|
* are interpolated into CDN URLs and the cache path.
|
|
12
|
+
*
|
|
13
|
+
* `defaultResolveFrom` (typically the declaring devframe's `importMetaUrl`)
|
|
14
|
+
* supplies a `resolveFrom` base for a remote source that doesn't set one:
|
|
15
|
+
* it is applied only when `source.resolveFrom` is `undefined`, so an explicit
|
|
16
|
+
* per-source string still wins and an explicit `null` still opts out of the
|
|
17
|
+
* installed-copy lookup.
|
|
12
18
|
*/
|
|
13
|
-
declare function resolveStaticAssetsSource(source: StaticAssetsSource, projectStorageDir: string): string | RemoteAssetsStore;
|
|
19
|
+
declare function resolveStaticAssetsSource(source: StaticAssetsSource, projectStorageDir: string, defaultResolveFrom?: string | null): string | RemoteAssetsStore;
|
|
14
20
|
//#endregion
|
|
15
21
|
export { resolveStaticAssetsSource };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as resolveStaticAssetsSource } from "../remote-assets-
|
|
1
|
+
import { t as resolveStaticAssetsSource } from "../remote-assets-CqxiyltC.mjs";
|
|
2
2
|
export { resolveStaticAssetsSource };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as DEVFRAME_EVENTS } from "../events-DKfSmoTj.mjs";
|
|
2
|
+
import { extname, join, normalize, resolve, sep } from "pathe";
|
|
2
3
|
import { createReadStream } from "node:fs";
|
|
3
4
|
import { stat } from "node:fs/promises";
|
|
4
5
|
import { Readable } from "node:stream";
|
|
5
6
|
import { lookup } from "mrmime";
|
|
6
|
-
import { extname, join, normalize, resolve, sep } from "pathe";
|
|
7
7
|
import { H3, defineHandler } from "h3";
|
|
8
8
|
//#region src/utils/serve-static.ts
|
|
9
9
|
const HTML_EXTENSIONS = [".html", ".htm"];
|
|
@@ -231,12 +231,13 @@ function remoteErrorPage(pkg, version, reason) {
|
|
|
231
231
|
const esc = (s) => s.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
232
232
|
const name = esc(pkg);
|
|
233
233
|
const ver = esc(version);
|
|
234
|
-
const
|
|
235
|
-
type:
|
|
234
|
+
const message = {
|
|
235
|
+
type: DEVFRAME_EVENTS.postMessage.remoteAssetsError,
|
|
236
236
|
package: pkg,
|
|
237
237
|
version,
|
|
238
238
|
reason
|
|
239
|
-
}
|
|
239
|
+
};
|
|
240
|
+
const payload = JSON.stringify(message).replace(/</g, "\\u003c");
|
|
240
241
|
return `<!doctype html>
|
|
241
242
|
<html lang="en">
|
|
242
243
|
<head>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _t as SharedStateEvents, bt as createSharedState, dt as Immutable, ft as ImmutableArray, gt as SharedState, ht as ImmutableSet, mt as ImmutableObject, pt as ImmutableMap, vt as SharedStateOptions, yt as SharedStatePatch } from "../devframe-mbfgpQQC.mjs";
|
|
2
2
|
export { Immutable, ImmutableArray, ImmutableMap, ImmutableObject, ImmutableSet, SharedState, SharedStateEvents, SharedStateOptions, SharedStatePatch, createSharedState };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createSharedState } from "../shared-state-
|
|
1
|
+
import { t as createSharedState } from "../shared-state-DoXutg_U.mjs";
|
|
2
2
|
export { createSharedState };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { at as StreamErrorPayload, ct as StreamSinkEvents, it as CreateStreamSinkOptions, lt as createStreamReader, nt as BufferedChunk, ot as StreamReader, rt as CreateStreamReaderOptions, st as StreamSink, ut as createStreamSink } from "../devframe-mbfgpQQC.mjs";
|
|
2
2
|
export { BufferedChunk, CreateStreamReaderOptions, CreateStreamSinkOptions, StreamErrorPayload, StreamReader, StreamSink, StreamSinkEvents, createStreamReader, createStreamSink };
|