@openclaw/diffs 2026.9.6 → 2026.9.7
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/assets/icon.png +0 -0
- package/dist/.setup/{browser.runtime-VjaO3wrj.mjs → browser.runtime-v15gbeC0.mjs} +1 -1
- package/dist/.setup/{viewer-assets-D3qrnaxI.mjs → viewer-assets-Bg9efLih.mjs} +24 -49
- package/dist/assets/viewer-runtime.js +2 -2
- package/dist/index.js +241 -201
- package/node_modules/@pierre/diffs/dist/components/File.d.ts +1 -0
- package/node_modules/@pierre/diffs/dist/components/File.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/components/File.js +4 -0
- package/node_modules/@pierre/diffs/dist/components/File.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/components/FileDiff.d.ts +1 -0
- package/node_modules/@pierre/diffs/dist/components/FileDiff.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/components/FileDiff.js +4 -0
- package/node_modules/@pierre/diffs/dist/components/FileDiff.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/components/VirtualizedFile.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/components/VirtualizedFile.js +8 -9
- package/node_modules/@pierre/diffs/dist/components/VirtualizedFile.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/components/VirtualizedFileDiff.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/components/VirtualizedFileDiff.js +8 -6
- package/node_modules/@pierre/diffs/dist/components/VirtualizedFileDiff.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/editor/editor.js +3 -5
- package/node_modules/@pierre/diffs/dist/editor/editor.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/editor/textMeasure.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/editor/textMeasure.js +27 -3
- package/node_modules/@pierre/diffs/dist/editor/textMeasure.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/highlighter/languages/attachResolvedLanguages.js +8 -1
- package/node_modules/@pierre/diffs/dist/highlighter/languages/attachResolvedLanguages.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/highlighter/languages/registerCustomLanguage.d.ts +3 -1
- package/node_modules/@pierre/diffs/dist/highlighter/languages/registerCustomLanguage.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/highlighter/languages/registerCustomLanguage.js +3 -1
- package/node_modules/@pierre/diffs/dist/highlighter/languages/registerCustomLanguage.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/worker/WorkerPoolManager.d.ts.map +1 -1
- package/node_modules/@pierre/diffs/dist/worker/WorkerPoolManager.js +40 -38
- package/node_modules/@pierre/diffs/dist/worker/WorkerPoolManager.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/worker/worker-portable.js +8 -1
- package/node_modules/@pierre/diffs/dist/worker/worker-portable.js.map +1 -1
- package/node_modules/@pierre/diffs/dist/worker/worker.js +8 -1
- package/node_modules/@pierre/diffs/dist/worker/worker.js.map +1 -1
- package/node_modules/@pierre/diffs/package.json +1 -1
- package/node_modules/typebox/build/compile/code.mjs +1 -2
- package/node_modules/typebox/build/compile/validator.mjs +5 -1
- package/node_modules/typebox/build/format/iri.mjs +16 -9
- package/node_modules/typebox/build/guard/emit.mjs +2 -2
- package/node_modules/typebox/build/guard/guard.d.mts +7 -5
- package/node_modules/typebox/build/guard/guard.mjs +14 -9
- package/node_modules/typebox/build/guard/index.mjs +6 -0
- package/node_modules/typebox/build/guard/unicode/unicode.d.mts +6 -0
- package/node_modules/typebox/build/guard/unicode/unicode.mjs +35 -0
- package/node_modules/typebox/build/guard/{string.mjs → unicode/unicode_segment.mjs} +16 -19
- package/node_modules/typebox/build/schema/build.mjs +2 -3
- package/node_modules/typebox/build/schema/engine/_pathing.d.mts +1 -0
- package/node_modules/typebox/build/schema/engine/_pathing.mjs +11 -0
- package/node_modules/typebox/build/schema/engine/_refine.mjs +13 -5
- package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +2 -1
- package/node_modules/typebox/build/schema/engine/dependencies.mjs +2 -1
- package/node_modules/typebox/build/schema/engine/dependentSchemas.mjs +2 -1
- package/node_modules/typebox/build/schema/engine/dynamicRef.d.mts +1 -1
- package/node_modules/typebox/build/schema/engine/dynamicRef.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/format.mjs +9 -2
- package/node_modules/typebox/build/schema/engine/patternProperties.mjs +3 -2
- package/node_modules/typebox/build/schema/engine/properties.mjs +3 -2
- package/node_modules/typebox/build/schema/engine/propertyNames.mjs +2 -1
- package/node_modules/typebox/build/schema/engine/recursiveRef.d.mts +1 -1
- package/node_modules/typebox/build/schema/engine/recursiveRef.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/ref.d.mts +1 -1
- package/node_modules/typebox/build/schema/engine/ref.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/schema.mjs +24 -24
- package/node_modules/typebox/build/schema/parse.mjs +3 -0
- package/node_modules/typebox/build/schema/pointer/pointer.d.mts +1 -6
- package/node_modules/typebox/build/schema/pointer/pointer.mjs +47 -64
- package/node_modules/typebox/build/system/settings/internal.d.mts +2 -0
- package/node_modules/typebox/build/system/settings/internal.mjs +20 -0
- package/node_modules/typebox/build/system/settings/settings.d.mts +11 -0
- package/node_modules/typebox/build/system/settings/settings.mjs +14 -0
- package/node_modules/typebox/build/type/extends/inference.d.mts +1 -1
- package/node_modules/typebox/build/type/extends/inference.mjs +15 -2
- package/node_modules/typebox/build/type/extends/tuple.d.mts +2 -1
- package/node_modules/typebox/build/type/extends/tuple.mjs +21 -1
- package/node_modules/typebox/build/value/parse/parse.mjs +10 -4
- package/node_modules/typebox/package.json +1 -1
- package/node_modules/typebox/readme.md +3 -1
- package/package.json +6 -6
- package/dist/api.js +0 -3
- package/dist/runtime-api.js +0 -2
- /package/node_modules/typebox/build/guard/{string.d.mts → unicode/unicode_segment.d.mts} +0 -0
package/assets/icon.png
CHANGED
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as getServedViewerAsset, i as getServedLanguagePackViewerAsset, n as VIEWER_ASSET_PREFIX, t as LANGUAGE_PACK_VIEWER_ASSET_PREFIX } from "./viewer-assets-
|
|
1
|
+
import { a as getServedViewerAsset, i as getServedLanguagePackViewerAsset, n as VIEWER_ASSET_PREFIX, t as LANGUAGE_PACK_VIEWER_ASSET_PREFIX } from "./viewer-assets-Bg9efLih.mjs";
|
|
2
2
|
import { constants } from "node:fs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -3,11 +3,8 @@ import fs from "node:fs/promises";
|
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
4
|
//#region extensions/diffs/src/viewer-assets.ts
|
|
5
5
|
const VIEWER_ASSET_PREFIX = "/plugins/diffs/assets/";
|
|
6
|
-
const VIEWER_LOADER_PATH = `${VIEWER_ASSET_PREFIX}viewer.js`;
|
|
7
6
|
const VIEWER_RUNTIME_PATH = `${VIEWER_ASSET_PREFIX}viewer-runtime.js`;
|
|
8
7
|
const LANGUAGE_PACK_VIEWER_ASSET_PREFIX = "/plugins/diffs-language-pack/assets/";
|
|
9
|
-
const LANGUAGE_PACK_VIEWER_LOADER_PATH = `${LANGUAGE_PACK_VIEWER_ASSET_PREFIX}viewer.js`;
|
|
10
|
-
const LANGUAGE_PACK_VIEWER_RUNTIME_PATH = `${LANGUAGE_PACK_VIEWER_ASSET_PREFIX}viewer-runtime.js`;
|
|
11
8
|
const VIEWER_RUNTIME_RELATIVE_IMPORT_PATH = "./viewer-runtime.js";
|
|
12
9
|
const VIEWER_RUNTIME_CANDIDATE_RELATIVE_PATHS = [
|
|
13
10
|
"./assets/viewer-runtime.js",
|
|
@@ -19,56 +16,34 @@ const LANGUAGE_PACK_RUNTIME_CANDIDATE_RELATIVE_PATHS = [
|
|
|
19
16
|
"../diffs-language-pack/assets/viewer-runtime.js",
|
|
20
17
|
"./extensions/diffs-language-pack/assets/viewer-runtime.js"
|
|
21
18
|
];
|
|
22
|
-
let runtimeAssetCache = null;
|
|
23
|
-
let languagePackRuntimeAssetCache = null;
|
|
24
19
|
function isMissingFileError(error) {
|
|
25
20
|
return error instanceof Error && "code" in error && error.code === "ENOENT";
|
|
26
21
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
});
|
|
51
|
-
} catch (error) {
|
|
52
|
-
if (isMissingFileError(error)) return null;
|
|
53
|
-
throw error;
|
|
54
|
-
}
|
|
55
|
-
if (pathname === LANGUAGE_PACK_VIEWER_LOADER_PATH) return {
|
|
56
|
-
body: assets.loaderBody,
|
|
57
|
-
contentType: "text/javascript; charset=utf-8"
|
|
58
|
-
};
|
|
59
|
-
return {
|
|
60
|
-
body: assets.runtimeBody,
|
|
61
|
-
contentType: "text/javascript; charset=utf-8"
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
async function loadViewerAssets() {
|
|
65
|
-
return loadRuntimeAssets({
|
|
66
|
-
runtimeUrl: await resolveRuntimeFileUrl(VIEWER_RUNTIME_CANDIDATE_RELATIVE_PATHS),
|
|
67
|
-
cache: runtimeAssetCache,
|
|
68
|
-
updateCache: (cache) => {
|
|
69
|
-
runtimeAssetCache = cache;
|
|
22
|
+
const getServedViewerAsset = createViewerAssetHandler(VIEWER_ASSET_PREFIX, VIEWER_RUNTIME_CANDIDATE_RELATIVE_PATHS);
|
|
23
|
+
const getServedLanguagePackViewerAsset = createViewerAssetHandler(LANGUAGE_PACK_VIEWER_ASSET_PREFIX, LANGUAGE_PACK_RUNTIME_CANDIDATE_RELATIVE_PATHS, true);
|
|
24
|
+
function createViewerAssetHandler(prefix, relativePaths, optional = false) {
|
|
25
|
+
const loaderPath = `${prefix}viewer.js`;
|
|
26
|
+
const runtimePath = `${prefix}viewer-runtime.js`;
|
|
27
|
+
let cache = null;
|
|
28
|
+
return async (pathname) => {
|
|
29
|
+
if (pathname !== loaderPath && pathname !== runtimePath) return null;
|
|
30
|
+
try {
|
|
31
|
+
const assets = await loadRuntimeAssets({
|
|
32
|
+
runtimeUrl: await resolveRuntimeFileUrl(relativePaths),
|
|
33
|
+
cache,
|
|
34
|
+
updateCache: (updated) => {
|
|
35
|
+
cache = updated;
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
return {
|
|
39
|
+
body: pathname === loaderPath ? assets.loaderBody : assets.runtimeBody,
|
|
40
|
+
contentType: "text/javascript; charset=utf-8"
|
|
41
|
+
};
|
|
42
|
+
} catch (error) {
|
|
43
|
+
if (optional && isMissingFileError(error)) return null;
|
|
44
|
+
throw error;
|
|
70
45
|
}
|
|
71
|
-
}
|
|
46
|
+
};
|
|
72
47
|
}
|
|
73
48
|
async function loadRuntimeAssets(params) {
|
|
74
49
|
const runtimePath = fileURLToPath(params.runtimeUrl);
|