@openclaw/line 2026.10.10-beta.5 → 2026.11.5-beta.1
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/.setup/{accounts-DOiM8-y3.mjs → accounts-Dm_NoU7R.mjs} +1 -2
- package/dist/.setup/{api-PmHlEZ7r.mjs → api-ByXjHPMe.mjs} +3 -4
- package/dist/.setup/api-DCMpIrda.mjs +3 -0
- package/dist/.setup/{card-command-BMLk4YKh.mjs → card-command-utjlRvb-.mjs} +27 -45
- package/dist/.setup/{channel-j3EnT95N.mjs → channel-D9i_xlsJ.mjs} +252 -359
- package/dist/.setup/channel.runtime-C-E2qsIu.mjs +4 -0
- package/dist/.setup/{monitor-DQ-v9pI6.mjs → monitor-BYGe2Y7S.mjs} +256 -358
- package/dist/.setup/{outbound.runtime-BJL2119X.mjs → outbound.runtime-AQvUJvJV.mjs} +2 -2
- package/dist/.setup/{runtime-V7yh9OeC.mjs → runtime-C9ldw-V4.mjs} +1 -2
- package/dist/.setup/{send-g4gFsc9W.mjs → send-H86JOXWw.mjs} +40 -109
- package/dist/.setup/{send-retry-Dzbkz5wG.mjs → send-retry-D6J7bThI.mjs} +187 -105
- package/dist/.setup/{setup-surface-CYd8oqzt.mjs → setup-surface-DvbBjHFi.mjs} +5 -9
- package/dist/.setup/{template-messages-COcdie6C.mjs → template-messages-KG1GwG0h.mjs} +36 -52
- package/dist/.setup/{webhook-spool-contract-msjTl60Q.mjs → webhook-spool-contract-COhQK5XQ.mjs} +1 -2
- package/dist/.source-module-urls/2c97352967966b7ab9f67f528eb25c098b6fe10ea0e4616ffae3851ed839d81e.json +1 -1
- package/dist/api.js +2 -2
- package/dist/channel-plugin-api.js +1 -1
- package/dist/contract-api.js +1 -1
- package/dist/doctor-contract-api.js +3 -5
- package/dist/index.js +2 -3
- package/dist/runtime-api.js +1 -1
- package/dist/secret-contract-api.js +1 -2
- package/dist/setup-api.js +1 -1
- package/dist/setup-entry.js +2 -3
- package/node_modules/@line/bot-sdk/node_modules/@types/node/README.md +1 -1
- package/node_modules/@line/bot-sdk/node_modules/@types/node/package.json +2 -2
- package/node_modules/@line/bot-sdk/node_modules/@types/node/util.d.ts +7 -4
- package/node_modules/typebox/build/format/duration.d.mts +2 -2
- package/node_modules/typebox/build/format/duration.mjs +2 -2
- package/node_modules/typebox/build/format/idn_email.d.mts +1 -0
- package/node_modules/typebox/build/format/idn_email.mjs +1 -0
- package/node_modules/typebox/build/format/idn_hostname.d.mts +1 -1
- package/node_modules/typebox/build/format/idn_hostname.mjs +1 -1
- package/node_modules/typebox/build/format/ipv4.d.mts +2 -2
- package/node_modules/typebox/build/format/ipv4.mjs +2 -2
- package/node_modules/typebox/build/format/ipv6.d.mts +1 -1
- package/node_modules/typebox/build/format/ipv6.mjs +1 -1
- package/node_modules/typebox/build/format/relative_json_pointer.d.mts +2 -2
- package/node_modules/typebox/build/format/relative_json_pointer.mjs +2 -2
- package/node_modules/typebox/build/schema/build.mjs +1 -0
- package/node_modules/typebox/build/schema/engine/_unique.d.mts +4 -2
- package/node_modules/typebox/build/schema/engine/_unique.mjs +7 -3
- package/node_modules/typebox/build/schema/engine/additionalItems.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/additionalProperties.d.mts +0 -3
- package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +15 -17
- package/node_modules/typebox/build/schema/engine/contains.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/index.d.mts +1 -0
- package/node_modules/typebox/build/schema/engine/index.mjs +1 -0
- package/node_modules/typebox/build/schema/engine/items.mjs +7 -4
- package/node_modules/typebox/build/schema/engine/maxContains.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/minContains.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/oneOf.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/patternProperties.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/propertyNames.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/unevaluatedItems.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/unevaluatedProperties.mjs +2 -2
- package/node_modules/typebox/build/system/hashing/hash.mjs +63 -34
- package/node_modules/typebox/build/system/locale/en_US.mjs +2 -1
- package/node_modules/typebox/build/system/memory/assign.d.mts +2 -8
- package/node_modules/typebox/build/system/memory/assign.mjs +13 -6
- package/node_modules/typebox/build/system/memory/clone.d.mts +4 -5
- package/node_modules/typebox/build/system/memory/clone.mjs +8 -96
- package/node_modules/typebox/build/system/memory/create.d.mts +1 -5
- package/node_modules/typebox/build/system/memory/create.mjs +18 -13
- package/node_modules/typebox/build/system/memory/deep.d.mts +2 -0
- package/node_modules/typebox/build/system/memory/deep.mjs +108 -0
- package/node_modules/typebox/build/system/memory/discard.d.mts +1 -1
- package/node_modules/typebox/build/system/memory/discard.mjs +9 -8
- package/node_modules/typebox/build/system/memory/finalize.d.mts +4 -0
- package/node_modules/typebox/build/system/memory/finalize.mjs +30 -0
- package/node_modules/typebox/build/system/memory/keys.d.mts +2 -0
- package/node_modules/typebox/build/system/memory/keys.mjs +8 -0
- package/node_modules/typebox/build/system/memory/update.d.mts +1 -4
- package/node_modules/typebox/build/system/memory/update.mjs +43 -16
- package/node_modules/typebox/build/type/engine/call/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/call/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +2 -24
- package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +2 -29
- package/node_modules/typebox/build/type/engine/evaluate/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/evaluate/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/evaluate/narrow.d.mts +5 -1
- package/node_modules/typebox/build/type/engine/evaluate/narrow.mjs +6 -1
- package/node_modules/typebox/build/type/engine/evaluate/property.d.mts +30 -0
- package/node_modules/typebox/build/type/engine/evaluate/property.mjs +29 -0
- package/node_modules/typebox/build/type/engine/immutable/instantiate_add.d.mts +1 -3
- package/node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs +1 -4
- package/node_modules/typebox/build/type/engine/object/from_intersect.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/object/from_intersect.mjs +2 -2
- package/node_modules/typebox/build/type/engine/object/from_union.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/object/from_union.mjs +2 -2
- package/node_modules/typebox/build/type/engine/optional/instantiate_add.d.mts +1 -3
- package/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs +1 -4
- package/node_modules/typebox/build/type/engine/readonly/instantiate_add.d.mts +1 -3
- package/node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs +1 -4
- package/node_modules/typebox/build/type/engine/this/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/this/index.mjs +1 -0
- package/node_modules/typebox/build/value/clone/clone.d.mts +4 -3
- package/node_modules/typebox/build/value/clone/clone.mjs +5 -7
- package/node_modules/typebox/build/value/repair/from_cyclic.d.mts +2 -0
- package/node_modules/typebox/build/value/repair/from_cyclic.mjs +6 -0
- package/node_modules/typebox/build/value/shared/union_priority_sort.mjs +25 -14
- package/node_modules/typebox/package.json +1 -1
- package/node_modules/typebox/readme.md +1 -1
- package/node_modules/zod/package.json +1 -1
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +27 -0
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +7 -0
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +6 -0
- package/node_modules/zod/src/v4/core/compile.ts +9 -0
- package/node_modules/zod/src/v4/core/schemas.ts +35 -1
- package/node_modules/zod/src/v4/core/util.ts +13 -0
- package/node_modules/zod/src/v4/core/versions.ts +1 -1
- package/node_modules/zod/v4/core/compile.cjs +8 -0
- package/node_modules/zod/v4/core/compile.js +8 -0
- package/node_modules/zod/v4/core/schemas.cjs +30 -0
- package/node_modules/zod/v4/core/schemas.d.cts +3 -1
- package/node_modules/zod/v4/core/schemas.d.ts +3 -1
- package/node_modules/zod/v4/core/schemas.js +30 -0
- package/node_modules/zod/v4/core/util.cjs +15 -0
- package/node_modules/zod/v4/core/util.d.cts +2 -0
- package/node_modules/zod/v4/core/util.d.ts +2 -0
- package/node_modules/zod/v4/core/util.js +14 -0
- package/node_modules/zod/v4/core/versions.cjs +1 -1
- package/node_modules/zod/v4/core/versions.js +1 -1
- package/package.json +6 -6
- package/dist/.setup/api-Bis3gHmg.mjs +0 -3
- package/dist/.setup/channel.runtime-in_KhKi8.mjs +0 -4
- package/dist/.setup/monitor.runtime-DtJPzQya.mjs +0 -1
- package/dist/.setup/probe.runtime-DaGwztSg.mjs +0 -1
- package/node_modules/typebox/build/system/memory/freeze.d.mts +0 -4
- package/node_modules/typebox/build/system/memory/freeze.mjs +0 -6
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { C as
|
|
1
|
+
import { C as uriAction, T as toFlexMessage, g as cardText, h as cardBox, u as createReceiptCard, w as fitsLineFlexBubble, x as postbackAction, y as messageAction } from "./send-retry-D6J7bThI.mjs";
|
|
2
2
|
import { markdownToIRWithMeta, stripMarkdown } from "openclaw/plugin-sdk/text-chunking";
|
|
3
3
|
import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
4
|
-
|
|
4
|
+
// extensions/line/src/markdown-to-line.ts
|
|
5
5
|
const LINE_MARKDOWN_OPTIONS = {
|
|
6
6
|
assistantTranscriptRoleHeaders: true,
|
|
7
7
|
autolink: false,
|
|
@@ -19,12 +19,6 @@ function parseLineMarkdown(text, tableMode = "block") {
|
|
|
19
19
|
tableMode
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
|
-
function toCodeBlock(ir, span) {
|
|
23
|
-
return {
|
|
24
|
-
...span.language ? { language: span.language } : {},
|
|
25
|
-
code: ir.text.slice(span.start, span.end).trimEnd()
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
22
|
function rangesOverlap(left, right) {
|
|
29
23
|
return left.start < right.end && right.start < left.end;
|
|
30
24
|
}
|
|
@@ -103,18 +97,6 @@ function projectPlainText(ir, omitted = [], additionalInsertions = [], onSegment
|
|
|
103
97
|
}
|
|
104
98
|
return output.trim();
|
|
105
99
|
}
|
|
106
|
-
function formatOversizedTableAsBullets(table) {
|
|
107
|
-
const markdownCell = (cell) => projectPlainText(cell).replace(/[\\|`*_[\]~<>&]/gu, "\\$&").replace(/\r?\n/gu, " ");
|
|
108
|
-
const markdownRow = (cells) => `| ${cells.map(markdownCell).join(" | ")} |`;
|
|
109
|
-
return projectPlainText(parseLineMarkdown([
|
|
110
|
-
markdownRow(table.headerCells),
|
|
111
|
-
`| ${table.headerCells.map(() => "---").join(" | ")} |`,
|
|
112
|
-
...table.rowCells.map(markdownRow)
|
|
113
|
-
].join("\n"), "bullets").ir);
|
|
114
|
-
}
|
|
115
|
-
function sameSpanStyle(left, right) {
|
|
116
|
-
return left.weight === right.weight && left.style === right.style && left.decoration === right.decoration;
|
|
117
|
-
}
|
|
118
100
|
function renderTableCell(cell) {
|
|
119
101
|
if (!cell.text.trim()) return {
|
|
120
102
|
text: "-",
|
|
@@ -142,7 +124,7 @@ function renderTableCell(cell) {
|
|
|
142
124
|
let hasMarkup = false;
|
|
143
125
|
const appendSpan = (span) => {
|
|
144
126
|
const previous = spans.at(-1);
|
|
145
|
-
if (previous &&
|
|
127
|
+
if (previous && previous.weight === span.weight && previous.style === span.style && previous.decoration === span.decoration) previous.text = `${previous.text ?? ""}${span.text ?? ""}`;
|
|
146
128
|
else spans.push(span);
|
|
147
129
|
};
|
|
148
130
|
for (let index = 0; index < sortedBoundaries.length - 1; index += 1) {
|
|
@@ -244,26 +226,6 @@ function convertTableToFlexBubble(table) {
|
|
|
244
226
|
], { paddingAll: "lg" })
|
|
245
227
|
};
|
|
246
228
|
}
|
|
247
|
-
function convertCodeBlockToFlexBubble(block) {
|
|
248
|
-
const titleText = block.language ? `Code (${block.language})` : "Code";
|
|
249
|
-
return {
|
|
250
|
-
type: "bubble",
|
|
251
|
-
body: cardBox("vertical", [cardText(titleText, {
|
|
252
|
-
weight: "bold",
|
|
253
|
-
size: "sm",
|
|
254
|
-
color: "#666666"
|
|
255
|
-
}), cardBox("vertical", [cardText(block.code, {
|
|
256
|
-
size: "xs",
|
|
257
|
-
color: "#333333",
|
|
258
|
-
wrap: true
|
|
259
|
-
})], {
|
|
260
|
-
backgroundColor: "#F5F5F5",
|
|
261
|
-
paddingAll: "md",
|
|
262
|
-
cornerRadius: "md",
|
|
263
|
-
margin: "sm"
|
|
264
|
-
})], { paddingAll: "lg" })
|
|
265
|
-
};
|
|
266
|
-
}
|
|
267
229
|
/** Parse once, route existing block surfaces to Flex, and project the remainder as plain text. */
|
|
268
230
|
function processLineMessage(text) {
|
|
269
231
|
const { ir, tables } = parseLineMarkdown(text);
|
|
@@ -272,9 +234,16 @@ function processLineMessage(text) {
|
|
|
272
234
|
for (const table of tables) {
|
|
273
235
|
const bubble = convertTableToFlexBubble(table);
|
|
274
236
|
if (!bubble || !fitsLineFlexBubble(bubble)) {
|
|
237
|
+
const markdownCell = (cell) => projectPlainText(cell).replace(/[\\|`*_[\]~<>&]/gu, "\\$&").replace(/\r?\n/gu, " ");
|
|
238
|
+
const markdownRow = (cells) => `| ${cells.map(markdownCell).join(" | ")} |`;
|
|
239
|
+
const markdown = [
|
|
240
|
+
markdownRow(table.headerCells),
|
|
241
|
+
`| ${table.headerCells.map(() => "---").join(" | ")} |`,
|
|
242
|
+
...table.rowCells.map(markdownRow)
|
|
243
|
+
].join("\n");
|
|
275
244
|
plainTextInsertions.push({
|
|
276
245
|
position: table.placeholderOffset,
|
|
277
|
-
text: `\n\n${
|
|
246
|
+
text: `\n\n${projectPlainText(parseLineMarkdown(markdown, "bullets").ir)}\n\n`
|
|
278
247
|
});
|
|
279
248
|
continue;
|
|
280
249
|
}
|
|
@@ -285,7 +254,10 @@ function processLineMessage(text) {
|
|
|
285
254
|
});
|
|
286
255
|
}
|
|
287
256
|
for (const span of codeSpans) {
|
|
288
|
-
const block =
|
|
257
|
+
const block = {
|
|
258
|
+
...span.language ? { language: span.language } : {},
|
|
259
|
+
code: ir.text.slice(span.start, span.end).trimEnd()
|
|
260
|
+
};
|
|
289
261
|
if (!block.code.trim()) continue;
|
|
290
262
|
if (block.code.length > LINE_FLEX_CODE_CARD_MAX_CHARS) {
|
|
291
263
|
plainTextInsertions.push({
|
|
@@ -294,17 +266,33 @@ function processLineMessage(text) {
|
|
|
294
266
|
});
|
|
295
267
|
continue;
|
|
296
268
|
}
|
|
269
|
+
const titleText = block.language ? `Code (${block.language})` : "Code";
|
|
297
270
|
plainTextInsertions.push({
|
|
298
271
|
position: span.start,
|
|
299
|
-
message: toFlexMessage("Code",
|
|
272
|
+
message: toFlexMessage("Code", {
|
|
273
|
+
type: "bubble",
|
|
274
|
+
body: cardBox("vertical", [cardText(titleText, {
|
|
275
|
+
weight: "bold",
|
|
276
|
+
size: "sm",
|
|
277
|
+
color: "#666666"
|
|
278
|
+
}), cardBox("vertical", [cardText(block.code, {
|
|
279
|
+
size: "xs",
|
|
280
|
+
color: "#333333",
|
|
281
|
+
wrap: true
|
|
282
|
+
})], {
|
|
283
|
+
backgroundColor: "#F5F5F5",
|
|
284
|
+
paddingAll: "md",
|
|
285
|
+
cornerRadius: "md",
|
|
286
|
+
margin: "sm"
|
|
287
|
+
})], { paddingAll: "lg" })
|
|
288
|
+
})
|
|
300
289
|
});
|
|
301
290
|
}
|
|
302
291
|
const segments = [];
|
|
303
292
|
projectPlainText(ir, codeSpans, plainTextInsertions, (segment) => segments.push(segment));
|
|
304
293
|
return segments;
|
|
305
294
|
}
|
|
306
|
-
|
|
307
|
-
//#region packages/normalization-core/src/utf16-slice.ts
|
|
295
|
+
// packages/normalization-core/src/utf16-slice.ts
|
|
308
296
|
function isHighSurrogate(codeUnit) {
|
|
309
297
|
return codeUnit >= 55296 && codeUnit <= 56319;
|
|
310
298
|
}
|
|
@@ -317,8 +305,7 @@ function avoidTrailingHighSurrogateBreak(text, start, end) {
|
|
|
317
305
|
const adjusted = end - 1;
|
|
318
306
|
return adjusted > start ? adjusted : end + 1;
|
|
319
307
|
}
|
|
320
|
-
|
|
321
|
-
//#region packages/normalization-core/src/grapheme.ts
|
|
308
|
+
// packages/normalization-core/src/grapheme.ts
|
|
322
309
|
let graphemeSegmenter;
|
|
323
310
|
function getGraphemeSegmenter() {
|
|
324
311
|
graphemeSegmenter ??= new Intl.Segmenter(void 0, { granularity: "grapheme" });
|
|
@@ -342,8 +329,7 @@ function findGraphemeChunkEnd(text, start, maxEnd, preferredEnd = maxEnd, allowP
|
|
|
342
329
|
if (end <= start && preferred < hardEnd) end = hardEnd === text.length ? hardEnd : segments.containing(hardEnd)?.index ?? hardEnd;
|
|
343
330
|
return end > start ? end : allowPartial ? avoidTrailingHighSurrogateBreak(text, start, hardEnd) : start;
|
|
344
331
|
}
|
|
345
|
-
|
|
346
|
-
//#region extensions/line/src/template-messages.ts
|
|
332
|
+
// extensions/line/src/template-messages.ts
|
|
347
333
|
const COMPACT_TEMPLATE_TEXT_LIMIT = 60;
|
|
348
334
|
const TEMPLATE_ALT_TEXT_LIMIT = 1500;
|
|
349
335
|
function buildTemplatePayloadAction(action) {
|
|
@@ -364,7 +350,6 @@ function truncateTemplateText(text, limit) {
|
|
|
364
350
|
function resolveTemplateAltText(value, fallback) {
|
|
365
351
|
return truncateTemplateText(value ?? fallback, TEMPLATE_ALT_TEXT_LIMIT);
|
|
366
352
|
}
|
|
367
|
-
/** Convert portable template payloads at the LINE provider boundary. */
|
|
368
353
|
function buildTemplateMessageFromPayload(payload) {
|
|
369
354
|
switch (payload.type) {
|
|
370
355
|
case "confirm": return {
|
|
@@ -434,5 +419,4 @@ function buildTemplateMessageFromPayload(payload) {
|
|
|
434
419
|
default: return null;
|
|
435
420
|
}
|
|
436
421
|
}
|
|
437
|
-
//#endregion
|
|
438
422
|
export { processLineMessage as n, buildTemplateMessageFromPayload as t };
|
package/dist/.setup/{webhook-spool-contract-msjTl60Q.mjs → webhook-spool-contract-COhQK5XQ.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isRecord, normalizeNullableString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
2
|
-
|
|
2
|
+
// extensions/line/src/webhook-spool-contract.ts
|
|
3
3
|
/** Message the canonical decoder attaches when it rejects a spool payload. The
|
|
4
4
|
* upgrade migration matches this signature to recover rows the pre-fix decoder
|
|
5
5
|
* dead-lettered; the identity fence writes a different message on purpose. */
|
|
@@ -52,5 +52,4 @@ function laneKeyFor(event, eventId) {
|
|
|
52
52
|
}
|
|
53
53
|
return eventId;
|
|
54
54
|
}
|
|
55
|
-
//#endregion
|
|
56
55
|
export { laneKeyFor as a, eventIdFor as i, LINE_WEBHOOK_SPOOL_INVALID_PAYLOAD_MESSAGE as n, legacyEventIdFor as o, LineWebhookPayloadError as r, LINE_WEBHOOK_SPOOL_INVALID_EVENT_REASON as t };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"entries":[{"output":"api.js","source":"extensions/line/api.ts"},{"output":"channel-plugin-api.js","source":"extensions/line/channel-plugin-api.ts"},{"output":"contract-api.js","source":"extensions/line/contract-api.ts"},{"output":"doctor-contract-api.js","source":"extensions/line/doctor-contract-api.ts"},{"output":"index.js","source":"extensions/line/index.ts"},{"output":"runtime-api.js","source":"extensions/line/runtime-api.ts"},{"output":"secret-contract-api.js","source":"extensions/line/secret-contract-api.ts"},{"output":"setup-api.js","source":"extensions/line/setup-api.ts"},{"output":"setup-entry.js","source":"extensions/line/setup-entry.ts"}],"chunks":[{"output":".setup/accounts-
|
|
1
|
+
{"version":3,"entries":[{"output":"api.js","source":"extensions/line/api.ts"},{"output":"channel-plugin-api.js","source":"extensions/line/channel-plugin-api.ts"},{"output":"contract-api.js","source":"extensions/line/contract-api.ts"},{"output":"doctor-contract-api.js","source":"extensions/line/doctor-contract-api.ts"},{"output":"index.js","source":"extensions/line/index.ts"},{"output":"runtime-api.js","source":"extensions/line/runtime-api.ts"},{"output":"secret-contract-api.js","source":"extensions/line/secret-contract-api.ts"},{"output":"setup-api.js","source":"extensions/line/setup-api.ts"},{"output":"setup-entry.js","source":"extensions/line/setup-entry.ts"}],"chunks":[{"output":".setup/accounts-Dm_NoU7R.mjs","sha256":"fbb3c981ee38eddff00d1f154e26a072649d43bb8648fad0e9318725f3c28b97","facadeSource":null,"sources":["extensions/line/src/accounts.ts"]},{"output":".setup/api-ByXjHPMe.mjs","sha256":"790a3b3f6fed83923ac432a9aea0059401b4dde42a180ec66a89f9378df3e092","facadeSource":null,"sources":["extensions/line/src/channel.setup.ts"]},{"output":".setup/api-DCMpIrda.mjs","sha256":"d8d0c8e2492ac0863a4c7a461bef4b3ec973125c81f781bb9ade3ae92ead49f6","facadeSource":"extensions/line/api.ts","sources":[]},{"output":".setup/card-command-utjlRvb-.mjs","sha256":"40b5197ae02101b7a84a08afe80151a4be79a194efad43d873ad13addeb7eb32","facadeSource":"extensions/line/src/card-command.ts","sources":["extensions/line/src/card-command.ts"]},{"output":".setup/channel-D9i_xlsJ.mjs","sha256":"04e4aba4bc7bfc975fb61220f33a48ef03d95a8367849d5bbf690624f800da85","facadeSource":null,"sources":["extensions/line/src/channel-shared.ts","extensions/line/src/channel.ts","extensions/line/src/config-adapter.ts","extensions/line/src/config-schema.ts","extensions/line/src/doctor.ts","extensions/line/src/gateway.ts","extensions/line/src/group-keys.ts","extensions/line/src/outbound.ts","extensions/line/src/question-postback.ts","extensions/line/src/quick-reply-fallback.ts","extensions/line/src/rich-message-schema.ts","extensions/line/src/rich-messages.ts","extensions/line/src/status.ts"]},{"output":".setup/channel.runtime-C-E2qsIu.mjs","sha256":"0e132847d9ce1be88b42570dfb95528003845a7c0c9b9bd9f798101126e1852a","facadeSource":"extensions/line/src/channel.runtime.ts","sources":[]},{"output":".setup/monitor-BYGe2Y7S.mjs","sha256":"8adcb443999dd9a8f8dddd6011d3278b867b4f8624add7def84850beee61c118","facadeSource":"extensions/line/src/monitor.ts","sources":["extensions/line/src/auto-reply-delivery.ts","extensions/line/src/bot-handlers.ts","extensions/line/src/bot-message-context.ts","extensions/line/src/bot.ts","extensions/line/src/download.ts","extensions/line/src/group-history.ts","extensions/line/src/inbound-image-set.ts","extensions/line/src/mentions.ts","extensions/line/src/monitor.ts","extensions/line/src/signature.ts","extensions/line/src/webhook-node.ts","extensions/line/src/webhook-spool.ts"]},{"output":".setup/outbound.runtime-AQvUJvJV.mjs","sha256":"0a27e7fd7286143aca81f262da76b227c1b5969825db53840fb3e4f6b4c10790","facadeSource":"extensions/line/src/outbound.runtime.ts","sources":[]},{"output":".setup/runtime-C9ldw-V4.mjs","sha256":"ac1144683eff8dc37f71e7b26f00dd5f692e4c35b6ac4a14d11ba81603dc0414","facadeSource":null,"sources":["extensions/line/src/runtime.ts"]},{"output":".setup/send-H86JOXWw.mjs","sha256":"8b1aa80a03ec3549933b072e6568b021e35a3977a8f2cdd0fc890da5a590de19","facadeSource":null,"sources":["extensions/line/src/outbound-message-log.ts","extensions/line/src/send.ts"]},{"output":".setup/send-retry-D6J7bThI.mjs","sha256":"3d84dd3dd373f48163efed5de14d1d3e5d7135fe6a6b74125c932219917cb878","facadeSource":null,"sources":["extensions/line/src/actions.ts","extensions/line/src/channel-access-token.ts","extensions/line/src/flex-templates/basic-cards.ts","extensions/line/src/flex-templates/common.ts","extensions/line/src/flex-templates/message.ts","extensions/line/src/flex-templates/schedule-cards.ts","extensions/line/src/media-url.ts","extensions/line/src/messaging-target.ts","extensions/line/src/outbound-media.ts","extensions/line/src/probe.ts","extensions/line/src/quote-tokens.ts","extensions/line/src/send-retry.ts"]},{"output":".setup/setup-surface-DvbBjHFi.mjs","sha256":"9d8e2bdd72c9e37a53b10784ca83e0257e8ce7da2f40f8fb279132babf872430","facadeSource":null,"sources":["extensions/line/src/account-helpers.ts","extensions/line/src/bot-access.ts","extensions/line/src/setup-core.ts","extensions/line/src/setup-surface.ts"]},{"output":".setup/template-messages-KG1GwG0h.mjs","sha256":"422dd325a59c9d019ec0cd6d29be4ebc124fb3fc71d072d5079ddefc475f21c2","facadeSource":null,"sources":["extensions/line/src/markdown-to-line.ts","extensions/line/src/template-messages.ts","packages/normalization-core/src/grapheme.ts","packages/normalization-core/src/utf16-slice.ts"]},{"output":".setup/webhook-spool-contract-COhQK5XQ.mjs","sha256":"c5980d6b5431bd7ffab5f3c3351ac3aa3c7d477f1aec4244e1f3d8b01d704743","facadeSource":null,"sources":["extensions/line/src/webhook-spool-contract.ts"]},{"output":"api.js","sha256":"a9c47f7d5840d3e67eeeceb30bfe0b01b8d6b873743a064281e169cc28447025","facadeSource":"extensions/line/api.ts","sources":[]},{"output":"channel-plugin-api.js","sha256":"a04ff1cf97f5e07bf955a1fb6b55e81c436e6084c0ead8264661609098c56a61","facadeSource":"extensions/line/channel-plugin-api.ts","sources":[]},{"output":"contract-api.js","sha256":"88215026ff1655afd96c12893f7d2efdbcfacd9b21c5029e1653de305c208773","facadeSource":"extensions/line/contract-api.ts","sources":[]},{"output":"doctor-contract-api.js","sha256":"b2a81a30a6916fb455359235cda708e562012af8b9bb052414ac7f132f888894","facadeSource":"extensions/line/doctor-contract-api.ts","sources":["extensions/line/doctor-contract-api.ts","extensions/line/src/webhook-spool-migration.ts"]},{"output":"index.js","sha256":"027e770f77429c8c2381255370eedbb418a769205554402b1f0b9c78509f5ae9","facadeSource":"extensions/line/index.ts","sources":["extensions/line/index.ts"]},{"output":"runtime-api.js","sha256":"e37fbce0148c490628ce5edc25492212c1a2d3a7c3f084353a5ee49972159886","facadeSource":"extensions/line/runtime-api.ts","sources":[]},{"output":"secret-contract-api.js","sha256":"4824eb0315431709e20d35bb056c00eae3498212e57bda4dd9cdbb24f3db07c4","facadeSource":"extensions/line/secret-contract-api.ts","sources":["extensions/line/secret-contract-api.ts"]},{"output":"setup-api.js","sha256":"730732424bb98bbceaca6d6e982a03e799f30200b1413fc0bd82aef62865b256","facadeSource":"extensions/line/setup-api.ts","sources":[]},{"output":"setup-entry.js","sha256":"12d964681e6d7ca793c1d04d8a2496e1adf38518c9ba5b228c1644fbf05fdb6e","facadeSource":"extensions/line/setup-entry.ts","sources":["extensions/line/setup-entry.ts"]}],"unrenderedSources":["extensions/line/api.ts","extensions/line/channel-plugin-api.ts","extensions/line/contract-api.ts","extensions/line/runtime-api.ts","extensions/line/setup-api.ts","extensions/line/src/channel.runtime.ts","extensions/line/src/outbound.runtime.ts","src/plugin-sdk/text-grapheme.ts"]}
|
package/dist/api.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as linePlugin } from "./.setup/channel-
|
|
2
|
-
import { t as lineSetupPlugin } from "./.setup/api-
|
|
1
|
+
import { t as linePlugin } from "./.setup/channel-D9i_xlsJ.mjs";
|
|
2
|
+
import { t as lineSetupPlugin } from "./.setup/api-ByXjHPMe.mjs";
|
|
3
3
|
export { linePlugin, lineSetupPlugin };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as linePlugin } from "./.setup/channel-
|
|
1
|
+
export { t as linePlugin } from "./.setup/channel-D9i_xlsJ.mjs";
|
package/dist/contract-api.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as listLineAccountIds, n as resolveDefaultLineAccountId, r as resolveLineAccount } from "./.setup/accounts-
|
|
1
|
+
export { t as listLineAccountIds, n as resolveDefaultLineAccountId, r as resolveLineAccount } from "./.setup/accounts-Dm_NoU7R.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as laneKeyFor, i as eventIdFor, o as legacyEventIdFor, r as LineWebhookPayloadError, t as LINE_WEBHOOK_SPOOL_INVALID_EVENT_REASON } from "./.setup/webhook-spool-contract-
|
|
1
|
+
import { a as laneKeyFor, i as eventIdFor, o as legacyEventIdFor, r as LineWebhookPayloadError, t as LINE_WEBHOOK_SPOOL_INVALID_EVENT_REASON } from "./.setup/webhook-spool-contract-COhQK5XQ.mjs";
|
|
2
2
|
import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
import { coerceErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
4
|
-
|
|
4
|
+
// extensions/line/src/webhook-spool-migration.ts
|
|
5
5
|
/** Pre-drain (#109655) rows stored the event object under `event` instead of the
|
|
6
6
|
* canonical serialized `rawEvent`; anything else is not a migratable row. */
|
|
7
7
|
function parseLegacySpoolPayload(payload) {
|
|
@@ -90,8 +90,7 @@ async function migrateLineLegacySpoolRows(queue) {
|
|
|
90
90
|
}
|
|
91
91
|
return result;
|
|
92
92
|
}
|
|
93
|
-
|
|
94
|
-
//#region extensions/line/doctor-contract-api.ts
|
|
93
|
+
// extensions/line/doctor-contract-api.ts
|
|
95
94
|
const LINE_CHANNEL_ID = "line";
|
|
96
95
|
/** Pre-drain rows can outlive the account config that admitted them, so the sweep
|
|
97
96
|
* enumerates accounts from the host's queue lane instead of the config; a host
|
|
@@ -138,5 +137,4 @@ const stateMigrations = [{
|
|
|
138
137
|
};
|
|
139
138
|
}
|
|
140
139
|
}];
|
|
141
|
-
//#endregion
|
|
142
140
|
export { stateMigrations };
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineBundledChannelEntry } from "openclaw/plugin-sdk/channel-entry-contract";
|
|
2
|
-
|
|
2
|
+
// extensions/line/index.ts
|
|
3
3
|
var line_default = defineBundledChannelEntry({
|
|
4
4
|
id: "line",
|
|
5
5
|
name: "LINE",
|
|
@@ -21,11 +21,10 @@ var line_default = defineBundledChannelEntry({
|
|
|
21
21
|
acceptsArgs: true,
|
|
22
22
|
requireAuth: false,
|
|
23
23
|
async handler(ctx) {
|
|
24
|
-
const { handleLineCardCommand } = await import("./.setup/card-command-
|
|
24
|
+
const { handleLineCardCommand } = await import("./.setup/card-command-utjlRvb-.mjs");
|
|
25
25
|
return await handleLineCardCommand(ctx.args);
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
|
-
//#endregion
|
|
31
30
|
export { line_default as default };
|
package/dist/runtime-api.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as setLineRuntime } from "./.setup/runtime-
|
|
1
|
+
export { n as setLineRuntime } from "./.setup/runtime-C9ldw-V4.mjs";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// extensions/line/secret-contract-api.ts
|
|
2
2
|
const secretTargetRegistryEntries = [];
|
|
3
3
|
function collectRuntimeConfigAssignments() {}
|
|
4
|
-
//#endregion
|
|
5
4
|
export { collectRuntimeConfigAssignments, secretTargetRegistryEntries };
|
package/dist/setup-api.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as lineSetupAdapter, t as lineSetupWizard } from "./.setup/setup-surface-
|
|
1
|
+
export { n as lineSetupAdapter, t as lineSetupWizard } from "./.setup/setup-surface-DvbBjHFi.mjs";
|
package/dist/setup-entry.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { defineBundledChannelSetupEntry } from "openclaw/plugin-sdk/channel-entry-contract";
|
|
2
2
|
import { fileURLToPath } from "node:url";
|
|
3
|
-
|
|
3
|
+
// extensions/line/setup-entry.ts
|
|
4
4
|
var setup_entry_default = defineBundledChannelSetupEntry({
|
|
5
5
|
importMetaUrl: import.meta.url,
|
|
6
6
|
plugin: {
|
|
7
|
-
specifier: fileURLToPath(new URL(".setup/api-
|
|
7
|
+
specifier: fileURLToPath(new URL(".setup/api-DCMpIrda.mjs", import.meta.url).href),
|
|
8
8
|
exportName: "lineSetupPlugin"
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
//#endregion
|
|
12
11
|
export { setup_entry_default as default };
|
|
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v24.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Fri, 09 Oct 2026 18:42:20 GMT
|
|
12
12
|
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
|
|
13
13
|
|
|
14
14
|
# Credits
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "24.19.
|
|
3
|
+
"version": "24.19.2",
|
|
4
4
|
"description": "TypeScript definitions for node",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -135,6 +135,6 @@
|
|
|
135
135
|
"undici-types": ">=7.24.0 <7.24.7"
|
|
136
136
|
},
|
|
137
137
|
"peerDependencies": {},
|
|
138
|
-
"typesPublisherContentHash": "
|
|
138
|
+
"typesPublisherContentHash": "fbbbfd0b983273dbfc30bcb497b88333fe11caabe5b12057ad838da74e578ca0",
|
|
139
139
|
"typeScriptVersion": "5.6"
|
|
140
140
|
}
|
|
@@ -1292,11 +1292,14 @@ declare module "util" {
|
|
|
1292
1292
|
*
|
|
1293
1293
|
* // 3-digit hex color (shorthand)
|
|
1294
1294
|
* console.log(styleText('#f00', 'Red text'));
|
|
1295
|
+
*
|
|
1296
|
+
* // Hex color combined with other modifiers
|
|
1297
|
+
* console.log(styleText(['#00f', 'bold'], 'Bold blue text'));
|
|
1295
1298
|
* ```
|
|
1296
1299
|
*
|
|
1297
1300
|
* The full list of formats can be found in [modifiers](https://nodejs.org/docs/latest-v24.x/api/util.html#modifiers).
|
|
1298
|
-
* @param format A text format
|
|
1299
|
-
* or
|
|
1301
|
+
* @param format A text format defined in `util.inspect.colors`, a hex color in `#RGB` or `#RRGGBB` form,
|
|
1302
|
+
* or an Array of text formats and/or hex colors.
|
|
1300
1303
|
* @param text The text to to be formatted.
|
|
1301
1304
|
* @since v20.12.0
|
|
1302
1305
|
*/
|
|
@@ -1305,8 +1308,8 @@ declare module "util" {
|
|
|
1305
1308
|
| ForegroundColors
|
|
1306
1309
|
| BackgroundColors
|
|
1307
1310
|
| Modifiers
|
|
1308
|
-
|
|
|
1309
|
-
| `#${string}
|
|
1311
|
+
| `#${string}`
|
|
1312
|
+
| Array<ForegroundColors | BackgroundColors | Modifiers | `#${string}`>,
|
|
1310
1313
|
text: string,
|
|
1311
1314
|
options?: StyleTextOptions,
|
|
1312
1315
|
): string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Returns true if the value is a valid
|
|
3
|
-
* @specification https://
|
|
2
|
+
* Returns true if the value is a valid duration.
|
|
3
|
+
* @specification https://www.rfc-editor.org/rfc/rfc3339.html#appendix-A
|
|
4
4
|
*/
|
|
5
5
|
export declare function IsDuration(value: string): boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const Duration = /^P((\d+Y(\d+M(\d+D)?)?|\d+M(\d+D)?|\d+D)(T(\d+H(\d+M(\d+S)?)?|\d+M(\d+S)?|\d+S))?|T(\d+H(\d+M(\d+S)?)?|\d+M(\d+S)?|\d+S)|\d+W)$/;
|
|
2
2
|
/**
|
|
3
|
-
* Returns true if the value is a valid
|
|
4
|
-
* @specification https://
|
|
3
|
+
* Returns true if the value is a valid duration.
|
|
4
|
+
* @specification https://www.rfc-editor.org/rfc/rfc3339.html#appendix-A
|
|
5
5
|
*/
|
|
6
6
|
export function IsDuration(value) {
|
|
7
7
|
return Duration.test(value);
|
|
@@ -2,6 +2,7 @@ const IdnEmail = /^(?:[A-Za-z0-9!#$%&'*+\/=?^_`{|}~\u{0080}-\u{10FFFF}-]+(?:\.[A
|
|
|
2
2
|
/**
|
|
3
3
|
* Returns true if the value is an IdnEmail
|
|
4
4
|
* @specification https://datatracker.ietf.org/doc/html/rfc4952
|
|
5
|
+
* @specification https://datatracker.ietf.org/doc/html/rfc6531
|
|
5
6
|
*/
|
|
6
7
|
export function IsIdnEmail(value) {
|
|
7
8
|
return IdnEmail.test(value.normalize('NFC'));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Returns true if the value is a valid internationalized (IDN) hostname.
|
|
3
|
-
* @specification https://
|
|
3
|
+
* @specification https://datatracker.ietf.org/doc/html/rfc5890
|
|
4
4
|
* @specification https://tools.ietf.org/html/rfc5891
|
|
5
5
|
* @specification https://tools.ietf.org/html/rfc5892
|
|
6
6
|
* @specification https://tools.ietf.org/html/rfc5893
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Idna from './idna/index.mjs';
|
|
2
2
|
/**
|
|
3
3
|
* Returns true if the value is a valid internationalized (IDN) hostname.
|
|
4
|
-
* @specification https://
|
|
4
|
+
* @specification https://datatracker.ietf.org/doc/html/rfc5890
|
|
5
5
|
* @specification https://tools.ietf.org/html/rfc5891
|
|
6
6
|
* @specification https://tools.ietf.org/html/rfc5892
|
|
7
7
|
* @specification https://tools.ietf.org/html/rfc5893
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Returns true if the value is
|
|
3
|
-
* @specification
|
|
2
|
+
* Returns true if the value is an IPv4 address
|
|
3
|
+
* @specification https://datatracker.ietf.org/doc/html/rfc3986#section-3.2.2
|
|
4
4
|
*/
|
|
5
5
|
export declare function IsIPv4(value: string): boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const IPv4 = /^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/;
|
|
2
2
|
/**
|
|
3
|
-
* Returns true if the value is
|
|
4
|
-
* @specification
|
|
3
|
+
* Returns true if the value is an IPv4 address
|
|
4
|
+
* @specification https://datatracker.ietf.org/doc/html/rfc3986#section-3.2.2
|
|
5
5
|
*/
|
|
6
6
|
export function IsIPv4(value) {
|
|
7
7
|
return IPv4.test(value);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const IPv6 = /^(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:)?[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)$/i;
|
|
2
2
|
/**
|
|
3
3
|
* Returns true if the value is an IPv6 address
|
|
4
|
-
* @specification
|
|
4
|
+
* @specification https://datatracker.ietf.org/doc/html/rfc4291#section-2.2
|
|
5
5
|
*/
|
|
6
6
|
export function IsIPv6(value) {
|
|
7
7
|
return IPv6.test(value);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Returns true if the value is a relative
|
|
3
|
-
* @specification https://datatracker.ietf.org/doc/html/
|
|
2
|
+
* Returns true if the value is a relative JSON Pointer
|
|
3
|
+
* @specification https://datatracker.ietf.org/doc/html/draft-handrews-relative-json-pointer/
|
|
4
4
|
* @source https://github.com/ajv-validator/ajv-formats
|
|
5
5
|
*/
|
|
6
6
|
export declare function IsRelativeJsonPointer(value: string): boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const RelativeJsonPointer = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;
|
|
2
2
|
/**
|
|
3
|
-
* Returns true if the value is a relative
|
|
4
|
-
* @specification https://datatracker.ietf.org/doc/html/
|
|
3
|
+
* Returns true if the value is a relative JSON Pointer
|
|
4
|
+
* @specification https://datatracker.ietf.org/doc/html/draft-handrews-relative-json-pointer/
|
|
5
5
|
* @source https://github.com/ajv-validator/ajv-formats
|
|
6
6
|
*/
|
|
7
7
|
export function IsRelativeJsonPointer(value) {
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
let index = 0;
|
|
2
|
-
/**
|
|
3
|
-
export function
|
|
4
|
-
return `
|
|
2
|
+
/** Creates a unique variable name */
|
|
3
|
+
export function CreateUnique() {
|
|
4
|
+
return `unique_${index++}`;
|
|
5
|
+
}
|
|
6
|
+
/** Resets the unique variable name counter */
|
|
7
|
+
export function ResetUnique() {
|
|
8
|
+
index = 0;
|
|
5
9
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// deno-fmt-ignore-file
|
|
2
2
|
import * as Schema from '../types/index.mjs';
|
|
3
|
-
import
|
|
3
|
+
import * as Unique from './_unique.mjs';
|
|
4
4
|
import { Guard as G, EmitGuard as E } from '../../guard/index.mjs';
|
|
5
5
|
import { BuildSchemaPushStack, CheckSchemaPushStack, ErrorSchemaPushStack } from './schema.mjs';
|
|
6
6
|
// ------------------------------------------------------------------
|
|
@@ -13,14 +13,14 @@ function IsValid(schema) {
|
|
|
13
13
|
// Build
|
|
14
14
|
// ------------------------------------------------------------------
|
|
15
15
|
function BuildAdditionalItemsStandard(stack, context, schema, value) {
|
|
16
|
-
const [item, index] = [Unique(), Unique()];
|
|
16
|
+
const [item, index] = [Unique.CreateUnique(), Unique.CreateUnique()];
|
|
17
17
|
const isSchema = BuildSchemaPushStack(stack, context, schema.additionalItems, item);
|
|
18
18
|
const isLength = E.IsLessThan(index, E.Constant(schema.items.length));
|
|
19
19
|
const addIndex = context.AddIndex(index);
|
|
20
20
|
return E.Every(value, E.Constant(0), [item, index], E.Or(isLength, E.And(isSchema, addIndex)));
|
|
21
21
|
}
|
|
22
22
|
function BuildAdditionalItemsFast(stack, context, schema, value) {
|
|
23
|
-
const [item, index] = [Unique(), Unique()];
|
|
23
|
+
const [item, index] = [Unique.CreateUnique(), Unique.CreateUnique()];
|
|
24
24
|
const isSchema = BuildSchemaPushStack(stack, context, schema.additionalItems, item);
|
|
25
25
|
const isLength = E.IsLessThan(index, E.Constant(schema.items.length));
|
|
26
26
|
return E.Every(value, E.Constant(0), [item, index], E.Or(isLength, isSchema));
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import * as Schema from '../types/index.mjs';
|
|
2
2
|
import * as Stack from './_stack.mjs';
|
|
3
3
|
import { BuildContext, CheckContext, ErrorContext } from './_context.mjs';
|
|
4
|
-
export declare function CanAdditionalPropertiesFast(_context: BuildContext, schema: Schema.XAdditionalProperties, _value: string): schema is Schema.XAdditionalProperties & Schema.XRequired;
|
|
5
|
-
export declare function BuildAdditionalPropertiesFast(_context: BuildContext, schema: Schema.XAdditionalProperties & Schema.XRequired, value: string): string;
|
|
6
|
-
export declare function BuildAdditionalPropertiesStandard(stack: Stack.XStack, context: BuildContext, schema: Schema.XAdditionalProperties, value: string): string;
|
|
7
4
|
export declare function BuildAdditionalProperties(stack: Stack.XStack, context: BuildContext, schema: Schema.XAdditionalProperties, value: string): string;
|
|
8
5
|
export declare function CheckAdditionalProperties(stack: Stack.XStack, context: CheckContext, schema: Schema.XAdditionalProperties, value: Record<PropertyKey, unknown>): boolean;
|
|
9
6
|
export declare function ErrorAdditionalProperties(stack: Stack.XStack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XAdditionalProperties, value: Record<PropertyKey, unknown>): boolean;
|