devframe 0.2.0 → 0.2.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/README.md +20 -76
- package/dist/adapters/build.d.mts +1 -1
- package/dist/adapters/build.mjs +5 -6
- package/dist/adapters/cli.d.mts +1 -1
- package/dist/adapters/cli.mjs +2 -2
- package/dist/adapters/dev.d.mts +2 -2
- package/dist/adapters/dev.mjs +1 -1
- package/dist/adapters/embedded.d.mts +1 -1
- package/dist/adapters/mcp.d.mts +2 -2
- package/dist/adapters/mcp.mjs +73 -18
- package/dist/client/index.d.mts +4 -4
- package/dist/client/index.mjs +5 -9
- package/dist/{context-DRa0wGsC.d.mts → context-BDpuScNZ.d.mts} +1 -1
- package/dist/{dev-CewNNE2R.mjs → dev-CZ9ZQkuO.mjs} +4 -5
- package/dist/{devframe-R5Ex5K5L.d.mts → devframe-DAfZWnpI.d.mts} +2 -2
- package/dist/{diagnostics-Cg9ycFIM.mjs → diagnostics-DNxVjo6X.mjs} +1 -1
- package/dist/helpers/vite.d.mts +1 -1
- package/dist/helpers/vite.mjs +3 -3
- package/dist/{context-BBi2IQDm.mjs → host-h3-DEfOpa0j.mjs} +28 -5
- package/dist/{index-DB2Ie0Or.d.mts → index-BNAsgVNz.d.mts} +51 -3
- package/dist/index.d.mts +3 -3
- package/dist/{launch-editor-CX_n_0SS.mjs → launch-editor-BbNhtg7b.mjs} +25 -1
- package/dist/node/auth.d.mts +2 -2
- package/dist/node/auth.mjs +2 -2
- package/dist/node/index.d.mts +6 -37
- package/dist/node/index.mjs +4 -6
- package/dist/node/internal.d.mts +2 -2
- package/dist/node/internal.mjs +4 -4
- package/dist/recipes/open-helpers.d.mts +1 -1
- package/dist/recipes/open-helpers.mjs +2 -2
- package/dist/rpc/index.d.mts +3 -3
- package/dist/rpc/index.mjs +2 -2
- package/dist/rpc/transports/ws-client.d.mts +1 -1
- package/dist/rpc/transports/ws-client.mjs +1 -1
- package/dist/rpc/transports/ws-server.d.mts +1 -1
- package/dist/rpc/transports/ws-server.mjs +1 -1
- package/dist/{rpc-DAzoVCR0.mjs → rpc-BlVCyk9W.mjs} +135 -11
- package/dist/{server-DzKz023G.d.mts → server-BGSrxsQb.d.mts} +1 -1
- package/dist/{storage-CNvfBGQ5.mjs → storage-D-jLaxDA.mjs} +2 -2
- package/dist/{transports-BnCs4rj9.mjs → transports-DTFoMUbE.mjs} +1 -1
- package/dist/types/index.d.mts +3 -3
- package/dist/{types-4rdUEi2R.d.mts → types-DmcujDa5.d.mts} +21 -5
- package/dist/utils/colors.mjs +30 -1
- package/dist/utils/events.d.mts +1 -1
- package/dist/utils/human-id.d.mts +1 -1
- package/dist/utils/human-id.mjs +768 -1
- package/dist/utils/launch-editor.mjs +1 -1
- package/dist/utils/open.mjs +1 -1
- 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/{ws-client-Bavoya6-.d.mts → ws-client-CrLsflnY.d.mts} +1 -1
- package/dist/{ws-server-DjvlwLuM.d.mts → ws-server-DKlqI8XP.d.mts} +1 -1
- package/package.json +1 -5
- package/skills/devframe/SKILL.md +1 -1
- package/dist/chunk-e9Ob2GDo.mjs +0 -26
- package/dist/colors-DS7k8ljB.mjs +0 -123
- package/dist/host-h3-Dz8YnFgu.mjs +0 -24
- package/dist/human-id-adtUWQLr.mjs +0 -852
- package/dist/static-dump-C67bCuse.mjs +0 -80
- /package/dist/{_shared-BrKv3CYt.mjs → _shared-CUFqO4kJ.mjs} +0 -0
- /package/dist/{open-B2ah1IKK.mjs → open-DiQn6zCH.mjs} +0 -0
- /package/dist/{revoke-DIMz1r7-.mjs → revoke-DDa7VSJa.mjs} +0 -0
- /package/dist/{server-DOk4grlJ.mjs → server-BO8IDVsJ.mjs} +0 -0
- /package/dist/{shared-state-q9-1EOSX.mjs → shared-state-BJXkPxtf.mjs} +0 -0
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { n as dumpFunctions, s as getRpcHandler } from "./rpc-DAzoVCR0.mjs";
|
|
2
|
-
import { DEVTOOLS_RPC_DUMP_DIRNAME } from "./constants.mjs";
|
|
3
|
-
//#region src/node/static-dump.ts
|
|
4
|
-
function makeDumpKey(name) {
|
|
5
|
-
return encodeURIComponent(name.replaceAll(":", "~"));
|
|
6
|
-
}
|
|
7
|
-
function makeStaticPath(name) {
|
|
8
|
-
return `${DEVTOOLS_RPC_DUMP_DIRNAME}/${makeDumpKey(name)}.static.json`;
|
|
9
|
-
}
|
|
10
|
-
function makeQueryRecordPath(name, hash) {
|
|
11
|
-
return `${DEVTOOLS_RPC_DUMP_DIRNAME}/${makeDumpKey(name)}.record.${hash}.json`;
|
|
12
|
-
}
|
|
13
|
-
function makeQueryFallbackPath(name) {
|
|
14
|
-
return `${DEVTOOLS_RPC_DUMP_DIRNAME}/${makeDumpKey(name)}.fallback.json`;
|
|
15
|
-
}
|
|
16
|
-
async function resolveRecord(record) {
|
|
17
|
-
return typeof record === "function" ? await record() : record;
|
|
18
|
-
}
|
|
19
|
-
async function collectStaticRpcDump(definitions, context) {
|
|
20
|
-
const manifest = {};
|
|
21
|
-
const files = {};
|
|
22
|
-
for (const definition of definitions) {
|
|
23
|
-
const type = definition.type ?? "query";
|
|
24
|
-
const serialization = definition.jsonSerializable === true ? "json" : "structured-clone";
|
|
25
|
-
if (type === "static") {
|
|
26
|
-
const handler = await getRpcHandler(definition, context);
|
|
27
|
-
const path = makeStaticPath(definition.name);
|
|
28
|
-
files[path] = {
|
|
29
|
-
serialization,
|
|
30
|
-
fnName: definition.name,
|
|
31
|
-
data: { output: await Promise.resolve(handler()) }
|
|
32
|
-
};
|
|
33
|
-
manifest[definition.name] = {
|
|
34
|
-
type: "static",
|
|
35
|
-
path,
|
|
36
|
-
serialization
|
|
37
|
-
};
|
|
38
|
-
continue;
|
|
39
|
-
}
|
|
40
|
-
if (type !== "query") continue;
|
|
41
|
-
const store = await dumpFunctions([definition], context);
|
|
42
|
-
if (!(definition.name in store.definitions)) continue;
|
|
43
|
-
const queryEntry = {
|
|
44
|
-
type: "query",
|
|
45
|
-
records: {},
|
|
46
|
-
serialization
|
|
47
|
-
};
|
|
48
|
-
const prefix = `${definition.name}---`;
|
|
49
|
-
for (const [recordKey, recordOrGetter] of Object.entries(store.records)) {
|
|
50
|
-
if (!recordKey.startsWith(prefix)) continue;
|
|
51
|
-
const key = recordKey.slice(prefix.length);
|
|
52
|
-
const record = await resolveRecord(recordOrGetter);
|
|
53
|
-
if (key === "fallback") {
|
|
54
|
-
const path = makeQueryFallbackPath(definition.name);
|
|
55
|
-
files[path] = {
|
|
56
|
-
serialization,
|
|
57
|
-
fnName: definition.name,
|
|
58
|
-
data: record
|
|
59
|
-
};
|
|
60
|
-
queryEntry.fallback = path;
|
|
61
|
-
} else {
|
|
62
|
-
const path = makeQueryRecordPath(definition.name, key);
|
|
63
|
-
files[path] = {
|
|
64
|
-
serialization,
|
|
65
|
-
fnName: definition.name,
|
|
66
|
-
data: record
|
|
67
|
-
};
|
|
68
|
-
queryEntry.records[key] = path;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
if (!Object.keys(queryEntry.records).length && !queryEntry.fallback) continue;
|
|
72
|
-
manifest[definition.name] = queryEntry;
|
|
73
|
-
}
|
|
74
|
-
return {
|
|
75
|
-
manifest,
|
|
76
|
-
files
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
//#endregion
|
|
80
|
-
export { collectStaticRpcDump as t };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|