@nextclaw/service 0.2.10-beta.1 → 0.2.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/dist/shared/utils/panel-app-client-sdk/panel-app-client-sdk-script.utils.d.ts.map +1 -1
- package/dist/shared/utils/panel-app-client-sdk/panel-app-client-sdk-script.utils.js +12 -4
- package/dist/shared/utils/panel-app-client-sdk/panel-app-client-sdk-script.utils.js.map +1 -1
- package/package.json +26 -26
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panel-app-client-sdk-script.utils.d.ts","names":[],"sources":["../../../../src/shared/utils/panel-app-client-sdk/panel-app-client-sdk-script.utils.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"panel-app-client-sdk-script.utils.d.ts","names":[],"sources":["../../../../src/shared/utils/panel-app-client-sdk/panel-app-client-sdk-script.utils.ts"],"mappings":";iBAgBsB,2BAAA,CAAA,GAA+B,OAAA"}
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
2
|
import { existsSync } from "node:fs";
|
|
3
3
|
import { dirname, join } from "node:path";
|
|
4
|
-
import { readFile } from "node:fs/promises";
|
|
4
|
+
import { readFile, stat } from "node:fs/promises";
|
|
5
5
|
//#region src/shared/utils/panel-app-client-sdk/panel-app-client-sdk-script.utils.ts
|
|
6
6
|
const require = createRequire(import.meta.url);
|
|
7
7
|
const CLIENT_SDK_BROWSER_BUNDLE = join("browser", "browser-global-registration.utils.iife.js");
|
|
8
8
|
let cachedScript = null;
|
|
9
|
-
function readPanelAppClientSdkScript() {
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
async function readPanelAppClientSdkScript() {
|
|
10
|
+
const bundlePath = resolvePanelAppClientSdkScriptPath();
|
|
11
|
+
const stats = await stat(bundlePath);
|
|
12
|
+
if (cachedScript?.path === bundlePath && cachedScript.mtimeMs === stats.mtimeMs) return cachedScript.script;
|
|
13
|
+
const script = await readFile(bundlePath, "utf8");
|
|
14
|
+
cachedScript = {
|
|
15
|
+
mtimeMs: stats.mtimeMs,
|
|
16
|
+
path: bundlePath,
|
|
17
|
+
script
|
|
18
|
+
};
|
|
19
|
+
return script;
|
|
12
20
|
}
|
|
13
21
|
function resolvePanelAppClientSdkScriptPath() {
|
|
14
22
|
const bundlePath = join(resolveClientSdkPackageRoot(), "dist", CLIENT_SDK_BROWSER_BUNDLE);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panel-app-client-sdk-script.utils.js","names":[],"sources":["../../../../src/shared/utils/panel-app-client-sdk/panel-app-client-sdk-script.utils.ts"],"sourcesContent":["import { existsSync } from \"node:fs\";\nimport { readFile } from \"node:fs/promises\";\nimport { createRequire } from \"node:module\";\nimport { dirname, join } from \"node:path\";\n\nconst require = createRequire(import.meta.url);\nconst CLIENT_SDK_BROWSER_BUNDLE = join(\"browser\", \"browser-global-registration.utils.iife.js\");\n\nlet cachedScript:
|
|
1
|
+
{"version":3,"file":"panel-app-client-sdk-script.utils.js","names":[],"sources":["../../../../src/shared/utils/panel-app-client-sdk/panel-app-client-sdk-script.utils.ts"],"sourcesContent":["import { existsSync } from \"node:fs\";\nimport { readFile, stat } from \"node:fs/promises\";\nimport { createRequire } from \"node:module\";\nimport { dirname, join } from \"node:path\";\n\nconst require = createRequire(import.meta.url);\nconst CLIENT_SDK_BROWSER_BUNDLE = join(\"browser\", \"browser-global-registration.utils.iife.js\");\n\ntype CachedClientSdkScript = {\n mtimeMs: number;\n path: string;\n script: string;\n};\n\nlet cachedScript: CachedClientSdkScript | null = null;\n\nexport async function readPanelAppClientSdkScript(): Promise<string> {\n const bundlePath = resolvePanelAppClientSdkScriptPath();\n const stats = await stat(bundlePath);\n if (cachedScript?.path === bundlePath && cachedScript.mtimeMs === stats.mtimeMs) {\n return cachedScript.script;\n }\n const script = await readFile(bundlePath, \"utf8\");\n cachedScript = {\n mtimeMs: stats.mtimeMs,\n path: bundlePath,\n script,\n };\n return script;\n}\n\nfunction resolvePanelAppClientSdkScriptPath(): string {\n const packageRoot = resolveClientSdkPackageRoot();\n const bundlePath = join(packageRoot, \"dist\", CLIENT_SDK_BROWSER_BUNDLE);\n if (!existsSync(bundlePath)) {\n throw new Error(\n `Panel App client SDK browser bundle is missing at ${bundlePath}. Run @nextclaw/client-sdk build first.`,\n );\n }\n return bundlePath;\n}\n\nfunction resolveClientSdkPackageRoot(): string {\n let current = dirname(require.resolve(\"@nextclaw/client-sdk\"));\n while (current !== dirname(current)) {\n if (existsSync(join(current, \"package.json\"))) {\n return current;\n }\n current = dirname(current);\n }\n throw new Error(\"Unable to resolve @nextclaw/client-sdk package root.\");\n}\n"],"mappings":";;;;;AAKA,MAAM,UAAU,cAAc,OAAO,KAAK,IAAI;AAC9C,MAAM,4BAA4B,KAAK,WAAW,4CAA4C;AAQ9F,IAAI,eAA6C;AAEjD,eAAsB,8BAA+C;CACnE,MAAM,aAAa,oCAAoC;CACvD,MAAM,QAAQ,MAAM,KAAK,WAAW;AACpC,KAAI,cAAc,SAAS,cAAc,aAAa,YAAY,MAAM,QACtE,QAAO,aAAa;CAEtB,MAAM,SAAS,MAAM,SAAS,YAAY,OAAO;AACjD,gBAAe;EACb,SAAS,MAAM;EACf,MAAM;EACN;EACD;AACD,QAAO;;AAGT,SAAS,qCAA6C;CAEpD,MAAM,aAAa,KADC,6BAA6B,EACZ,QAAQ,0BAA0B;AACvE,KAAI,CAAC,WAAW,WAAW,CACzB,OAAM,IAAI,MACR,qDAAqD,WAAW,yCACjE;AAEH,QAAO;;AAGT,SAAS,8BAAsC;CAC7C,IAAI,UAAU,QAAQ,QAAQ,QAAQ,uBAAuB,CAAC;AAC9D,QAAO,YAAY,QAAQ,QAAQ,EAAE;AACnC,MAAI,WAAW,KAAK,SAAS,eAAe,CAAC,CAC3C,QAAO;AAET,YAAU,QAAQ,QAAQ;;AAE5B,OAAM,IAAI,MAAM,uDAAuD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nextclaw/service",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.11",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "NextClaw long-running service host and runtime lifecycle.",
|
|
6
6
|
"type": "module",
|
|
@@ -42,31 +42,31 @@
|
|
|
42
42
|
"chokidar": "^3.6.0",
|
|
43
43
|
"commander": "^12.1.0",
|
|
44
44
|
"jszip": "^3.10.1",
|
|
45
|
-
"@nextclaw/channel-extension-
|
|
46
|
-
"@nextclaw/channel-extension-
|
|
47
|
-
"@nextclaw/channel-extension-
|
|
48
|
-
"@nextclaw/channel-extension-
|
|
49
|
-
"@nextclaw/channel-extension-
|
|
50
|
-
"@nextclaw/channel-extension-
|
|
51
|
-
"@nextclaw/channel-extension-wecom": "0.1.
|
|
52
|
-
"@nextclaw/
|
|
53
|
-
"@nextclaw/
|
|
54
|
-
"@nextclaw/
|
|
55
|
-
"@nextclaw/channel-extension-weixin": "0.1.
|
|
56
|
-
"@nextclaw/channel-extension-
|
|
57
|
-
"@nextclaw/mcp": "0.
|
|
58
|
-
"@nextclaw/
|
|
59
|
-
"@nextclaw/
|
|
60
|
-
"@nextclaw/ncp
|
|
61
|
-
"@nextclaw/ncp-
|
|
62
|
-
"@nextclaw/nextclaw-ncp-runtime-http-client": "0.2.
|
|
63
|
-
"@nextclaw/nextclaw-hermes-acp-bridge": "0.2.
|
|
64
|
-
"@nextclaw/
|
|
65
|
-
"@nextclaw/
|
|
66
|
-
"@nextclaw/runtime": "0.
|
|
67
|
-
"@nextclaw/
|
|
68
|
-
"@nextclaw/
|
|
69
|
-
"@nextclaw/shared": "0.2.
|
|
45
|
+
"@nextclaw/channel-extension-discord": "0.1.15",
|
|
46
|
+
"@nextclaw/channel-extension-dingtalk": "0.1.15",
|
|
47
|
+
"@nextclaw/channel-extension-slack": "0.1.15",
|
|
48
|
+
"@nextclaw/channel-extension-feishu": "0.1.22",
|
|
49
|
+
"@nextclaw/channel-extension-telegram": "0.1.15",
|
|
50
|
+
"@nextclaw/channel-extension-qq": "0.1.19",
|
|
51
|
+
"@nextclaw/channel-extension-wecom": "0.1.15",
|
|
52
|
+
"@nextclaw/client-sdk": "0.4.0",
|
|
53
|
+
"@nextclaw/channel-extension-email": "0.1.15",
|
|
54
|
+
"@nextclaw/core": "0.14.1",
|
|
55
|
+
"@nextclaw/channel-extension-weixin": "0.1.26",
|
|
56
|
+
"@nextclaw/channel-extension-whatsapp": "0.1.15",
|
|
57
|
+
"@nextclaw/ncp-mcp": "0.1.106",
|
|
58
|
+
"@nextclaw/kernel": "0.4.1",
|
|
59
|
+
"@nextclaw/mcp": "0.2.11",
|
|
60
|
+
"@nextclaw/ncp": "0.6.0",
|
|
61
|
+
"@nextclaw/ncp-agent-runtime": "0.3.41",
|
|
62
|
+
"@nextclaw/nextclaw-ncp-runtime-http-client": "0.2.10",
|
|
63
|
+
"@nextclaw/nextclaw-hermes-acp-bridge": "0.2.10",
|
|
64
|
+
"@nextclaw/remote": "0.2.11",
|
|
65
|
+
"@nextclaw/ncp-toolkit": "0.5.35",
|
|
66
|
+
"@nextclaw/nextclaw-ncp-runtime-stdio-client": "0.2.10",
|
|
67
|
+
"@nextclaw/server": "0.14.1",
|
|
68
|
+
"@nextclaw/runtime": "0.3.11",
|
|
69
|
+
"@nextclaw/shared": "0.2.10"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@types/node": "^20.17.6",
|