@marxbiotech/openclaw 2026.3.28-beta.1 → 2026.3.28-beta.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/.buildstamp +1 -1
- package/dist/build-info.json +3 -3
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/cli-startup-metadata.json +1 -1
- package/dist/{command-registry-d8nbbaej.js → command-registry-WKy4Mx4x.js} +1 -1
- package/dist/{command-registry-D6TzWVO8.js → command-registry-rZb7lPtI.js} +5 -5
- package/dist/{completion-cli-D2QdjG2S.js → completion-cli-B8zT2HAK.js} +2 -2
- package/dist/completion-cli-YOsLr1vu.js +2 -0
- package/dist/{config-cli-Djn9hC2Q.js → config-cli-E-zhWRmA.js} +1 -1
- package/dist/{doctor-completion-CGHO1mf1.js → doctor-completion-Dl-XmE3u.js} +1 -1
- package/dist/entry.js +1 -1
- package/dist/extensions/diffs/.openclaw-runtime-deps-stamp.json +1 -1
- package/dist/extensions/diffs/node_modules/.package-lock.json +7 -7
- package/dist/extensions/diffs/node_modules/oniguruma-parser/LICENSE +1 -1
- package/dist/extensions/diffs/node_modules/oniguruma-parser/README.md +61 -15
- package/dist/extensions/diffs/node_modules/oniguruma-parser/dist/generator/generate.js.map +1 -1
- package/dist/extensions/diffs/node_modules/oniguruma-parser/dist/oniguruma-parser.min.js +4 -4
- package/dist/extensions/diffs/node_modules/oniguruma-parser/dist/oniguruma-parser.min.js.map +3 -3
- package/dist/extensions/diffs/node_modules/oniguruma-parser/dist/parser/parse.d.ts.map +1 -1
- package/dist/extensions/diffs/node_modules/oniguruma-parser/dist/parser/parse.js +1 -1
- package/dist/extensions/diffs/node_modules/oniguruma-parser/dist/parser/parse.js.map +3 -3
- package/dist/extensions/diffs/node_modules/oniguruma-parser/dist/traverser/traverse.d.ts.map +1 -1
- package/dist/extensions/diffs/node_modules/oniguruma-parser/dist/traverser/traverse.js +1 -1
- package/dist/extensions/diffs/node_modules/oniguruma-parser/dist/traverser/traverse.js.map +2 -2
- package/dist/extensions/diffs/node_modules/oniguruma-parser/package.json +5 -5
- package/dist/extensions/diffs/node_modules/oniguruma-to-es/dist/cjs/generate.d.ts +1 -1
- package/dist/extensions/diffs/node_modules/oniguruma-to-es/dist/cjs/index.js +120 -121
- package/dist/extensions/diffs/node_modules/oniguruma-to-es/dist/cjs/index.js.map +4 -4
- package/dist/extensions/diffs/node_modules/oniguruma-to-es/dist/cjs/subclass.d.ts +2 -2
- package/dist/extensions/diffs/node_modules/oniguruma-to-es/dist/cjs/transform.d.ts +5 -3
- package/dist/extensions/diffs/node_modules/oniguruma-to-es/dist/cjs/unicode.d.ts +1 -1
- package/dist/extensions/diffs/node_modules/oniguruma-to-es/dist/esm/generate.d.ts +1 -1
- package/dist/extensions/diffs/node_modules/oniguruma-to-es/dist/esm/index.js +3 -1
- package/dist/extensions/diffs/node_modules/oniguruma-to-es/dist/esm/index.js.map +2 -2
- package/dist/extensions/diffs/node_modules/oniguruma-to-es/dist/esm/subclass.d.ts +2 -2
- package/dist/extensions/diffs/node_modules/oniguruma-to-es/dist/esm/transform.d.ts +5 -3
- package/dist/extensions/diffs/node_modules/oniguruma-to-es/dist/esm/unicode.d.ts +1 -1
- package/dist/extensions/diffs/node_modules/oniguruma-to-es/dist/index.min.js +6 -6
- package/dist/extensions/diffs/node_modules/oniguruma-to-es/dist/index.min.js.map +4 -4
- package/dist/extensions/diffs/node_modules/oniguruma-to-es/package.json +5 -5
- package/dist/extensions/discord/.openclaw-runtime-deps-stamp.json +1 -1
- package/dist/extensions/discord/node_modules/.package-lock.json +13 -10
- package/dist/extensions/discord/node_modules/@types/node/README.md +1 -1
- package/dist/extensions/discord/node_modules/@types/node/assert/strict.d.ts +0 -46
- package/dist/extensions/discord/node_modules/@types/node/assert.d.ts +0 -5
- package/dist/extensions/discord/node_modules/@types/node/async_hooks.d.ts +18 -38
- package/dist/extensions/discord/node_modules/@types/node/buffer.buffer.d.ts +1 -1
- package/dist/extensions/discord/node_modules/@types/node/buffer.d.ts +0 -45
- package/dist/extensions/discord/node_modules/@types/node/child_process.d.ts +0 -67
- package/dist/extensions/discord/node_modules/@types/node/cluster.d.ts +0 -54
- package/dist/extensions/discord/node_modules/@types/node/console.d.ts +0 -58
- package/dist/extensions/discord/node_modules/@types/node/constants.d.ts +0 -6
- package/dist/extensions/discord/node_modules/@types/node/crypto.d.ts +0 -18
- package/dist/extensions/discord/node_modules/@types/node/dgram.d.ts +0 -27
- package/dist/extensions/discord/node_modules/@types/node/diagnostics_channel.d.ts +0 -24
- package/dist/extensions/discord/node_modules/@types/node/dns/promises.d.ts +0 -6
- package/dist/extensions/discord/node_modules/@types/node/dns.d.ts +0 -46
- package/dist/extensions/discord/node_modules/@types/node/domain.d.ts +0 -16
- package/dist/extensions/discord/node_modules/@types/node/events.d.ts +0 -36
- package/dist/extensions/discord/node_modules/@types/node/fs/promises.d.ts +0 -10
- package/dist/extensions/discord/node_modules/@types/node/fs.d.ts +0 -20
- package/dist/extensions/discord/node_modules/@types/node/http.d.ts +0 -41
- package/dist/extensions/discord/node_modules/@types/node/http2.d.ts +0 -10
- package/dist/extensions/discord/node_modules/@types/node/https.d.ts +0 -5
- package/dist/extensions/discord/node_modules/@types/node/inspector/promises.d.ts +0 -6
- package/dist/extensions/discord/node_modules/@types/node/inspector.d.ts +0 -5
- package/dist/extensions/discord/node_modules/@types/node/module.d.ts +0 -3
- package/dist/extensions/discord/node_modules/@types/node/net.d.ts +53 -16
- package/dist/extensions/discord/node_modules/@types/node/os.d.ts +0 -9
- package/dist/extensions/discord/node_modules/@types/node/package.json +4 -4
- package/dist/extensions/discord/node_modules/@types/node/path.d.ts +0 -9
- package/dist/extensions/discord/node_modules/@types/node/perf_hooks.d.ts +0 -31
- package/dist/extensions/discord/node_modules/@types/node/punycode.d.ts +0 -28
- package/dist/extensions/discord/node_modules/@types/node/querystring.d.ts +0 -13
- package/dist/extensions/discord/node_modules/@types/node/quic.d.ts +0 -13
- package/dist/extensions/discord/node_modules/@types/node/readline/promises.d.ts +0 -3
- package/dist/extensions/discord/node_modules/@types/node/readline.d.ts +0 -35
- package/dist/extensions/discord/node_modules/@types/node/repl.d.ts +0 -10
- package/dist/extensions/discord/node_modules/@types/node/sea.d.ts +0 -115
- package/dist/extensions/discord/node_modules/@types/node/sqlite.d.ts +0 -44
- package/dist/extensions/discord/node_modules/@types/node/stream/consumers.d.ts +81 -5
- package/dist/extensions/discord/node_modules/@types/node/stream/web.d.ts +3 -3
- package/dist/extensions/discord/node_modules/@types/node/stream.d.ts +27 -23
- package/dist/extensions/discord/node_modules/@types/node/string_decoder.d.ts +0 -40
- package/dist/extensions/discord/node_modules/@types/node/test/reporters.d.ts +0 -38
- package/dist/extensions/discord/node_modules/@types/node/test.d.ts +7 -80
- package/dist/extensions/discord/node_modules/@types/node/timers/promises.d.ts +0 -15
- package/dist/extensions/discord/node_modules/@types/node/timers.d.ts +0 -10
- package/dist/extensions/discord/node_modules/@types/node/tls.d.ts +6 -16
- package/dist/extensions/discord/node_modules/@types/node/trace_events.d.ts +0 -94
- package/dist/extensions/discord/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +1 -1
- package/dist/extensions/discord/node_modules/@types/node/tty.d.ts +0 -25
- package/dist/extensions/discord/node_modules/@types/node/url.d.ts +0 -9
- package/dist/extensions/discord/node_modules/@types/node/util.d.ts +0 -10
- package/dist/extensions/discord/node_modules/@types/node/v8.d.ts +0 -8
- package/dist/extensions/discord/node_modules/@types/node/vm.d.ts +0 -38
- package/dist/extensions/discord/node_modules/@types/node/wasi.d.ts +0 -71
- package/dist/extensions/discord/node_modules/@types/node/worker_threads.d.ts +15 -61
- package/dist/extensions/discord/node_modules/@types/node/zlib.d.ts +0 -93
- package/dist/extensions/discord/node_modules/discord-api-types/CHANGELOG.md +40 -0
- package/dist/extensions/discord/node_modules/discord-api-types/gateway/v10.d.ts +1 -1
- package/dist/extensions/discord/node_modules/discord-api-types/gateway/v10.d.ts.map +1 -1
- package/dist/extensions/discord/node_modules/discord-api-types/gateway/v9.d.ts +1 -1
- package/dist/extensions/discord/node_modules/discord-api-types/gateway/v9.d.ts.map +1 -1
- package/dist/extensions/discord/node_modules/discord-api-types/package.json +1 -1
- package/dist/extensions/discord/node_modules/discord-api-types/payloads/index.mjs +3 -0
- package/dist/extensions/discord/node_modules/discord-api-types/payloads/v10/application.d.ts +1 -1
- package/dist/extensions/discord/node_modules/discord-api-types/payloads/v10/application.d.ts.map +1 -1
- package/dist/extensions/discord/node_modules/discord-api-types/payloads/v10/index.mjs +3 -0
- package/dist/extensions/discord/node_modules/discord-api-types/payloads/v10/message.d.ts +179 -29
- package/dist/extensions/discord/node_modules/discord-api-types/payloads/v10/message.d.ts.map +1 -1
- package/dist/extensions/discord/node_modules/discord-api-types/payloads/v10/message.js +55 -2
- package/dist/extensions/discord/node_modules/discord-api-types/payloads/v10/message.js.map +1 -1
- package/dist/extensions/discord/node_modules/discord-api-types/payloads/v10/user.d.ts +3 -1
- package/dist/extensions/discord/node_modules/discord-api-types/payloads/v10/user.d.ts.map +1 -1
- package/dist/extensions/discord/node_modules/discord-api-types/payloads/v10/user.js +2 -0
- package/dist/extensions/discord/node_modules/discord-api-types/payloads/v10/user.js.map +1 -1
- package/dist/extensions/discord/node_modules/discord-api-types/payloads/v9/application.d.ts +1 -1
- package/dist/extensions/discord/node_modules/discord-api-types/payloads/v9/application.d.ts.map +1 -1
- package/dist/extensions/discord/node_modules/discord-api-types/payloads/v9/index.mjs +3 -0
- package/dist/extensions/discord/node_modules/discord-api-types/payloads/v9/message.d.ts +179 -29
- package/dist/extensions/discord/node_modules/discord-api-types/payloads/v9/message.d.ts.map +1 -1
- package/dist/extensions/discord/node_modules/discord-api-types/payloads/v9/message.js +55 -2
- package/dist/extensions/discord/node_modules/discord-api-types/payloads/v9/message.js.map +1 -1
- package/dist/extensions/discord/node_modules/discord-api-types/payloads/v9/user.d.ts +3 -1
- package/dist/extensions/discord/node_modules/discord-api-types/payloads/v9/user.d.ts.map +1 -1
- package/dist/extensions/discord/node_modules/discord-api-types/payloads/v9/user.js +2 -0
- package/dist/extensions/discord/node_modules/discord-api-types/payloads/v9/user.js.map +1 -1
- package/dist/extensions/discord/node_modules/discord-api-types/rest/common.d.ts +9 -0
- package/dist/extensions/discord/node_modules/discord-api-types/rest/common.d.ts.map +1 -1
- package/dist/extensions/discord/node_modules/discord-api-types/rest/common.js +9 -0
- package/dist/extensions/discord/node_modules/discord-api-types/rest/common.js.map +1 -1
- package/dist/extensions/discord/node_modules/discord-api-types/rest/v10/channel.d.ts +8 -0
- package/dist/extensions/discord/node_modules/discord-api-types/rest/v10/channel.d.ts.map +1 -1
- package/dist/extensions/discord/node_modules/discord-api-types/rest/v10/channel.js +6 -0
- package/dist/extensions/discord/node_modules/discord-api-types/rest/v10/channel.js.map +1 -1
- package/dist/extensions/discord/node_modules/discord-api-types/rest/v10/oauth2.d.ts +1 -1
- package/dist/extensions/discord/node_modules/discord-api-types/rest/v10/oauth2.d.ts.map +1 -1
- package/dist/extensions/discord/node_modules/discord-api-types/rest/v10/user.d.ts +1 -1
- package/dist/extensions/discord/node_modules/discord-api-types/rest/v10/user.d.ts.map +1 -1
- package/dist/extensions/discord/node_modules/discord-api-types/rest/v10/webhook.d.ts +7 -1
- package/dist/extensions/discord/node_modules/discord-api-types/rest/v10/webhook.d.ts.map +1 -1
- package/dist/extensions/discord/node_modules/discord-api-types/rest/v9/channel.d.ts +8 -0
- package/dist/extensions/discord/node_modules/discord-api-types/rest/v9/channel.d.ts.map +1 -1
- package/dist/extensions/discord/node_modules/discord-api-types/rest/v9/channel.js +6 -0
- package/dist/extensions/discord/node_modules/discord-api-types/rest/v9/channel.js.map +1 -1
- package/dist/extensions/discord/node_modules/discord-api-types/rest/v9/oauth2.d.ts +1 -1
- package/dist/extensions/discord/node_modules/discord-api-types/rest/v9/oauth2.d.ts.map +1 -1
- package/dist/extensions/discord/node_modules/discord-api-types/rest/v9/user.d.ts +1 -1
- package/dist/extensions/discord/node_modules/discord-api-types/rest/v9/user.d.ts.map +1 -1
- package/dist/extensions/discord/node_modules/discord-api-types/rest/v9/webhook.d.ts +7 -1
- package/dist/extensions/discord/node_modules/discord-api-types/rest/v9/webhook.d.ts.map +1 -1
- package/dist/extensions/discord/node_modules/discord-api-types/v10.mjs +3 -0
- package/dist/extensions/discord/node_modules/discord-api-types/v9.mjs +3 -0
- package/dist/extensions/discord/node_modules/undici-types/cache-interceptor.d.ts +6 -0
- package/dist/extensions/discord/node_modules/undici-types/client.d.ts +10 -0
- package/dist/extensions/discord/node_modules/undici-types/package.json +1 -1
- package/dist/extensions/feishu/.openclaw-runtime-deps-stamp.json +1 -1
- package/dist/extensions/feishu/node_modules/.package-lock.json +38 -38
- package/dist/extensions/feishu/node_modules/@larksuiteoapi/node-sdk/README.md +88 -4
- package/dist/extensions/feishu/node_modules/@larksuiteoapi/node-sdk/README.zh.md +212 -58
- package/dist/extensions/feishu/node_modules/@larksuiteoapi/node-sdk/es/index.js +3912 -7
- package/dist/extensions/feishu/node_modules/@larksuiteoapi/node-sdk/lib/index.js +3924 -7
- package/dist/extensions/feishu/node_modules/@larksuiteoapi/node-sdk/package.json +1 -1
- package/dist/extensions/feishu/node_modules/@larksuiteoapi/node-sdk/types/index.d.ts +620 -18
- package/dist/extensions/feishu/node_modules/@protobufjs/codegen/index.js +14 -1
- package/dist/extensions/feishu/node_modules/@protobufjs/codegen/package.json +1 -1
- package/dist/extensions/feishu/node_modules/@protobufjs/inquire/index.d.ts +1 -1
- package/dist/extensions/feishu/node_modules/@protobufjs/inquire/index.js +25 -5
- package/dist/extensions/feishu/node_modules/@protobufjs/inquire/package.json +2 -2
- package/dist/extensions/feishu/node_modules/@protobufjs/utf8/index.js +27 -28
- package/dist/extensions/feishu/node_modules/@protobufjs/utf8/package.json +21 -21
- package/dist/extensions/feishu/node_modules/@protobufjs/utf8/tests/data/surrogate_pair_bug.txt +207 -0
- package/dist/extensions/feishu/node_modules/@protobufjs/utf8/tests/data/utf8.txt +216 -216
- package/dist/extensions/feishu/node_modules/@protobufjs/utf8/tests/index.js +17 -0
- package/dist/extensions/feishu/node_modules/@types/node/README.md +1 -1
- package/dist/extensions/feishu/node_modules/@types/node/assert/strict.d.ts +0 -46
- package/dist/extensions/feishu/node_modules/@types/node/assert.d.ts +0 -5
- package/dist/extensions/feishu/node_modules/@types/node/async_hooks.d.ts +18 -38
- package/dist/extensions/feishu/node_modules/@types/node/buffer.buffer.d.ts +1 -1
- package/dist/extensions/feishu/node_modules/@types/node/buffer.d.ts +0 -45
- package/dist/extensions/feishu/node_modules/@types/node/child_process.d.ts +0 -67
- package/dist/extensions/feishu/node_modules/@types/node/cluster.d.ts +0 -54
- package/dist/extensions/feishu/node_modules/@types/node/console.d.ts +0 -58
- package/dist/extensions/feishu/node_modules/@types/node/constants.d.ts +0 -6
- package/dist/extensions/feishu/node_modules/@types/node/crypto.d.ts +0 -18
- package/dist/extensions/feishu/node_modules/@types/node/dgram.d.ts +0 -27
- package/dist/extensions/feishu/node_modules/@types/node/diagnostics_channel.d.ts +0 -24
- package/dist/extensions/feishu/node_modules/@types/node/dns/promises.d.ts +0 -6
- package/dist/extensions/feishu/node_modules/@types/node/dns.d.ts +0 -46
- package/dist/extensions/feishu/node_modules/@types/node/domain.d.ts +0 -16
- package/dist/extensions/feishu/node_modules/@types/node/events.d.ts +0 -36
- package/dist/extensions/feishu/node_modules/@types/node/fs/promises.d.ts +0 -10
- package/dist/extensions/feishu/node_modules/@types/node/fs.d.ts +0 -20
- package/dist/extensions/feishu/node_modules/@types/node/http.d.ts +0 -41
- package/dist/extensions/feishu/node_modules/@types/node/http2.d.ts +0 -10
- package/dist/extensions/feishu/node_modules/@types/node/https.d.ts +0 -5
- package/dist/extensions/feishu/node_modules/@types/node/inspector/promises.d.ts +0 -6
- package/dist/extensions/feishu/node_modules/@types/node/inspector.d.ts +0 -5
- package/dist/extensions/feishu/node_modules/@types/node/module.d.ts +0 -3
- package/dist/extensions/feishu/node_modules/@types/node/net.d.ts +53 -16
- package/dist/extensions/feishu/node_modules/@types/node/os.d.ts +0 -9
- package/dist/extensions/feishu/node_modules/@types/node/package.json +4 -4
- package/dist/extensions/feishu/node_modules/@types/node/path.d.ts +0 -9
- package/dist/extensions/feishu/node_modules/@types/node/perf_hooks.d.ts +0 -31
- package/dist/extensions/feishu/node_modules/@types/node/punycode.d.ts +0 -28
- package/dist/extensions/feishu/node_modules/@types/node/querystring.d.ts +0 -13
- package/dist/extensions/feishu/node_modules/@types/node/quic.d.ts +0 -13
- package/dist/extensions/feishu/node_modules/@types/node/readline/promises.d.ts +0 -3
- package/dist/extensions/feishu/node_modules/@types/node/readline.d.ts +0 -35
- package/dist/extensions/feishu/node_modules/@types/node/repl.d.ts +0 -10
- package/dist/extensions/feishu/node_modules/@types/node/sea.d.ts +0 -115
- package/dist/extensions/feishu/node_modules/@types/node/sqlite.d.ts +0 -44
- package/dist/extensions/feishu/node_modules/@types/node/stream/consumers.d.ts +81 -5
- package/dist/extensions/feishu/node_modules/@types/node/stream/web.d.ts +3 -3
- package/dist/extensions/feishu/node_modules/@types/node/stream.d.ts +27 -23
- package/dist/extensions/feishu/node_modules/@types/node/string_decoder.d.ts +0 -40
- package/dist/extensions/feishu/node_modules/@types/node/test/reporters.d.ts +0 -38
- package/dist/extensions/feishu/node_modules/@types/node/test.d.ts +7 -80
- package/dist/extensions/feishu/node_modules/@types/node/timers/promises.d.ts +0 -15
- package/dist/extensions/feishu/node_modules/@types/node/timers.d.ts +0 -10
- package/dist/extensions/feishu/node_modules/@types/node/tls.d.ts +6 -16
- package/dist/extensions/feishu/node_modules/@types/node/trace_events.d.ts +0 -94
- package/dist/extensions/feishu/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +1 -1
- package/dist/extensions/feishu/node_modules/@types/node/tty.d.ts +0 -25
- package/dist/extensions/feishu/node_modules/@types/node/url.d.ts +0 -9
- package/dist/extensions/feishu/node_modules/@types/node/util.d.ts +0 -10
- package/dist/extensions/feishu/node_modules/@types/node/v8.d.ts +0 -8
- package/dist/extensions/feishu/node_modules/@types/node/vm.d.ts +0 -38
- package/dist/extensions/feishu/node_modules/@types/node/wasi.d.ts +0 -71
- package/dist/extensions/feishu/node_modules/@types/node/worker_threads.d.ts +15 -61
- package/dist/extensions/feishu/node_modules/@types/node/zlib.d.ts +0 -93
- package/dist/extensions/feishu/node_modules/follow-redirects/README.md +7 -5
- package/dist/extensions/feishu/node_modules/follow-redirects/index.js +24 -1
- package/dist/extensions/feishu/node_modules/follow-redirects/package.json +1 -1
- package/dist/extensions/feishu/node_modules/hasown/CHANGELOG.md +11 -0
- package/dist/extensions/feishu/node_modules/hasown/eslint.config.mjs +6 -0
- package/dist/extensions/feishu/node_modules/hasown/index.d.ts +1 -0
- package/dist/extensions/feishu/node_modules/hasown/package.json +14 -14
- package/dist/extensions/feishu/node_modules/protobufjs/dist/light/protobuf.js +238 -110
- package/dist/extensions/feishu/node_modules/protobufjs/dist/light/protobuf.js.map +1 -1
- package/dist/extensions/feishu/node_modules/protobufjs/dist/light/protobuf.min.js +3 -3
- package/dist/extensions/feishu/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -1
- package/dist/extensions/feishu/node_modules/protobufjs/dist/minimal/protobuf.js +90 -38
- package/dist/extensions/feishu/node_modules/protobufjs/dist/minimal/protobuf.js.map +1 -1
- package/dist/extensions/feishu/node_modules/protobufjs/dist/minimal/protobuf.min.js +3 -3
- package/dist/extensions/feishu/node_modules/protobufjs/dist/minimal/protobuf.min.js.map +1 -1
- package/dist/extensions/feishu/node_modules/protobufjs/dist/protobuf.js +242 -113
- package/dist/extensions/feishu/node_modules/protobufjs/dist/protobuf.js.map +1 -1
- package/dist/extensions/feishu/node_modules/protobufjs/dist/protobuf.min.js +3 -3
- package/dist/extensions/feishu/node_modules/protobufjs/dist/protobuf.min.js.map +1 -1
- package/dist/extensions/feishu/node_modules/protobufjs/ext/descriptor/index.d.ts +4 -0
- package/dist/extensions/feishu/node_modules/protobufjs/ext/descriptor/index.js +35 -16
- package/dist/extensions/feishu/node_modules/protobufjs/index.d.ts +22 -4
- package/dist/extensions/feishu/node_modules/protobufjs/package.json +7 -4
- package/dist/extensions/feishu/node_modules/protobufjs/src/converter.js +14 -5
- package/dist/extensions/feishu/node_modules/protobufjs/src/decoder.js +17 -9
- package/dist/extensions/feishu/node_modules/protobufjs/src/enum.js +4 -1
- package/dist/extensions/feishu/node_modules/protobufjs/src/message.js +7 -3
- package/dist/extensions/feishu/node_modules/protobufjs/src/namespace.js +10 -6
- package/dist/extensions/feishu/node_modules/protobufjs/src/object.js +4 -0
- package/dist/extensions/feishu/node_modules/protobufjs/src/parse.js +4 -3
- package/dist/extensions/feishu/node_modules/protobufjs/src/reader.js +12 -2
- package/dist/extensions/feishu/node_modules/protobufjs/src/service.js +8 -4
- package/dist/extensions/feishu/node_modules/protobufjs/src/type.js +23 -12
- package/dist/extensions/feishu/node_modules/protobufjs/src/types.js +1 -1
- package/dist/extensions/feishu/node_modules/protobufjs/src/util/minimal.js +24 -1
- package/dist/extensions/feishu/node_modules/protobufjs/src/util/patterns.js +8 -0
- package/dist/extensions/feishu/node_modules/protobufjs/src/util.js +9 -9
- package/dist/extensions/feishu/node_modules/protobufjs/src/verifier.js +7 -4
- package/dist/extensions/feishu/node_modules/protobufjs/src/wrappers.js +4 -3
- package/dist/extensions/feishu/node_modules/qs/CHANGELOG.md +6 -0
- package/dist/extensions/feishu/node_modules/qs/dist/qs.js +16 -16
- package/dist/extensions/feishu/node_modules/qs/lib/parse.js +2 -2
- package/dist/extensions/feishu/node_modules/qs/package.json +3 -3
- package/dist/extensions/feishu/node_modules/qs/test/parse.js +86 -0
- package/dist/extensions/feishu/node_modules/qs/test/stringify.js +9 -0
- package/dist/extensions/feishu/node_modules/qs/test/utils.js +31 -3
- package/dist/extensions/feishu/node_modules/side-channel-list/CHANGELOG.md +25 -4
- package/dist/extensions/feishu/node_modules/side-channel-list/index.js +1 -3
- package/dist/extensions/feishu/node_modules/side-channel-list/package.json +8 -8
- package/dist/extensions/feishu/node_modules/side-channel-list/test/index.js +50 -0
- package/dist/extensions/feishu/node_modules/undici-types/cache-interceptor.d.ts +6 -0
- package/dist/extensions/feishu/node_modules/undici-types/client.d.ts +10 -0
- package/dist/extensions/feishu/node_modules/undici-types/package.json +1 -1
- package/dist/extensions/slack/.openclaw-runtime-deps-stamp.json +1 -1
- package/dist/extensions/slack/node_modules/.package-lock.json +41 -41
- package/dist/extensions/slack/node_modules/@slack/bolt/README.md +5 -5
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/App.d.ts +2 -2
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/App.d.ts.map +1 -1
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/App.js +22 -30
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/App.js.map +1 -1
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/Assistant.d.ts +4 -2
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/Assistant.d.ts.map +1 -1
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/Assistant.js +21 -37
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/Assistant.js.map +1 -1
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/CustomFunction.d.ts +2 -10
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/CustomFunction.d.ts.map +1 -1
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/CustomFunction.js +1 -43
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/CustomFunction.js.map +1 -1
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/context/create-function-complete.d.ts +5 -0
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/context/create-function-complete.d.ts.map +1 -0
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/context/create-function-complete.js +23 -0
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/context/create-function-complete.js.map +1 -0
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/context/create-function-fail.d.ts +5 -0
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/context/create-function-fail.d.ts.map +1 -0
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/context/create-function-fail.js +23 -0
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/context/create-function-fail.js.map +1 -0
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/context/create-respond.d.ts +4 -0
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/context/create-respond.d.ts.map +1 -0
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/context/create-respond.js +11 -0
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/context/create-respond.js.map +1 -0
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/context/create-say-stream.d.ts +8 -0
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/context/create-say-stream.d.ts.map +1 -0
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/context/create-say-stream.js +16 -0
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/context/create-say-stream.js.map +1 -0
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/context/create-say.d.ts +4 -0
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/context/create-say.d.ts.map +1 -0
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/context/create-say.js +17 -0
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/context/create-say.js.map +1 -0
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/context/create-set-status.d.ts +5 -0
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/context/create-set-status.d.ts.map +1 -0
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/context/create-set-status.js +21 -0
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/context/create-set-status.js.map +1 -0
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/context/index.d.ts +9 -0
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/context/index.d.ts.map +1 -0
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/context/index.js +16 -0
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/context/index.js.map +1 -0
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/conversation-store.d.ts.map +1 -1
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/conversation-store.js +2 -0
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/conversation-store.js.map +1 -1
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/errors.d.ts.map +1 -1
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/errors.js +1 -1
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/errors.js.map +1 -1
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/helpers.d.ts +33 -1
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/helpers.d.ts.map +1 -1
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/helpers.js +79 -3
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/helpers.js.map +1 -1
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/index.d.ts +15 -6
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/index.d.ts.map +1 -1
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/index.js +10 -8
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/index.js.map +1 -1
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/receivers/SocketModeReceiver.d.ts +5 -1
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/receivers/SocketModeReceiver.d.ts.map +1 -1
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/receivers/SocketModeReceiver.js +5 -1
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/receivers/SocketModeReceiver.js.map +1 -1
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/types/actions/block-action.d.ts +6 -6
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/types/events/index.d.ts +53 -5
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/types/events/index.d.ts.map +1 -1
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/types/events/index.js +0 -4
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/types/events/index.js.map +1 -1
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/types/utilities.d.ts +1 -0
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/types/utilities.d.ts.map +1 -1
- package/dist/extensions/slack/node_modules/@slack/bolt/package.json +13 -8
- package/dist/extensions/slack/node_modules/@slack/web-api/dist/instrument.d.ts.map +1 -1
- package/dist/extensions/slack/node_modules/@slack/web-api/dist/instrument.js +13 -1
- package/dist/extensions/slack/node_modules/@slack/web-api/dist/instrument.js.map +1 -1
- package/dist/extensions/slack/node_modules/@slack/web-api/package.json +2 -2
- package/dist/extensions/slack/node_modules/@types/node/README.md +1 -1
- package/dist/extensions/slack/node_modules/@types/node/assert/strict.d.ts +0 -46
- package/dist/extensions/slack/node_modules/@types/node/assert.d.ts +0 -5
- package/dist/extensions/slack/node_modules/@types/node/async_hooks.d.ts +18 -38
- package/dist/extensions/slack/node_modules/@types/node/buffer.buffer.d.ts +1 -1
- package/dist/extensions/slack/node_modules/@types/node/buffer.d.ts +0 -45
- package/dist/extensions/slack/node_modules/@types/node/child_process.d.ts +0 -67
- package/dist/extensions/slack/node_modules/@types/node/cluster.d.ts +0 -54
- package/dist/extensions/slack/node_modules/@types/node/console.d.ts +0 -58
- package/dist/extensions/slack/node_modules/@types/node/constants.d.ts +0 -6
- package/dist/extensions/slack/node_modules/@types/node/crypto.d.ts +0 -18
- package/dist/extensions/slack/node_modules/@types/node/dgram.d.ts +0 -27
- package/dist/extensions/slack/node_modules/@types/node/diagnostics_channel.d.ts +0 -24
- package/dist/extensions/slack/node_modules/@types/node/dns/promises.d.ts +0 -6
- package/dist/extensions/slack/node_modules/@types/node/dns.d.ts +0 -46
- package/dist/extensions/slack/node_modules/@types/node/domain.d.ts +0 -16
- package/dist/extensions/slack/node_modules/@types/node/events.d.ts +0 -36
- package/dist/extensions/slack/node_modules/@types/node/fs/promises.d.ts +0 -10
- package/dist/extensions/slack/node_modules/@types/node/fs.d.ts +0 -20
- package/dist/extensions/slack/node_modules/@types/node/http.d.ts +0 -41
- package/dist/extensions/slack/node_modules/@types/node/http2.d.ts +0 -10
- package/dist/extensions/slack/node_modules/@types/node/https.d.ts +0 -5
- package/dist/extensions/slack/node_modules/@types/node/inspector/promises.d.ts +0 -6
- package/dist/extensions/slack/node_modules/@types/node/inspector.d.ts +0 -5
- package/dist/extensions/slack/node_modules/@types/node/module.d.ts +0 -3
- package/dist/extensions/slack/node_modules/@types/node/net.d.ts +53 -16
- package/dist/extensions/slack/node_modules/@types/node/os.d.ts +0 -9
- package/dist/extensions/slack/node_modules/@types/node/package.json +4 -4
- package/dist/extensions/slack/node_modules/@types/node/path.d.ts +0 -9
- package/dist/extensions/slack/node_modules/@types/node/perf_hooks.d.ts +0 -31
- package/dist/extensions/slack/node_modules/@types/node/punycode.d.ts +0 -28
- package/dist/extensions/slack/node_modules/@types/node/querystring.d.ts +0 -13
- package/dist/extensions/slack/node_modules/@types/node/quic.d.ts +0 -13
- package/dist/extensions/slack/node_modules/@types/node/readline/promises.d.ts +0 -3
- package/dist/extensions/slack/node_modules/@types/node/readline.d.ts +0 -35
- package/dist/extensions/slack/node_modules/@types/node/repl.d.ts +0 -10
- package/dist/extensions/slack/node_modules/@types/node/sea.d.ts +0 -115
- package/dist/extensions/slack/node_modules/@types/node/sqlite.d.ts +0 -44
- package/dist/extensions/slack/node_modules/@types/node/stream/consumers.d.ts +81 -5
- package/dist/extensions/slack/node_modules/@types/node/stream/web.d.ts +3 -3
- package/dist/extensions/slack/node_modules/@types/node/stream.d.ts +27 -23
- package/dist/extensions/slack/node_modules/@types/node/string_decoder.d.ts +0 -40
- package/dist/extensions/slack/node_modules/@types/node/test/reporters.d.ts +0 -38
- package/dist/extensions/slack/node_modules/@types/node/test.d.ts +7 -80
- package/dist/extensions/slack/node_modules/@types/node/timers/promises.d.ts +0 -15
- package/dist/extensions/slack/node_modules/@types/node/timers.d.ts +0 -10
- package/dist/extensions/slack/node_modules/@types/node/tls.d.ts +6 -16
- package/dist/extensions/slack/node_modules/@types/node/trace_events.d.ts +0 -94
- package/dist/extensions/slack/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +1 -1
- package/dist/extensions/slack/node_modules/@types/node/tty.d.ts +0 -25
- package/dist/extensions/slack/node_modules/@types/node/url.d.ts +0 -9
- package/dist/extensions/slack/node_modules/@types/node/util.d.ts +0 -10
- package/dist/extensions/slack/node_modules/@types/node/v8.d.ts +0 -8
- package/dist/extensions/slack/node_modules/@types/node/vm.d.ts +0 -38
- package/dist/extensions/slack/node_modules/@types/node/wasi.d.ts +0 -71
- package/dist/extensions/slack/node_modules/@types/node/worker_threads.d.ts +15 -61
- package/dist/extensions/slack/node_modules/@types/node/zlib.d.ts +0 -93
- package/dist/extensions/slack/node_modules/axios/CHANGELOG.md +235 -1
- package/dist/extensions/slack/node_modules/axios/README.md +323 -214
- package/dist/extensions/slack/node_modules/axios/dist/axios.js +143 -51
- package/dist/extensions/slack/node_modules/axios/dist/axios.js.map +1 -1
- package/dist/extensions/slack/node_modules/axios/dist/axios.min.js +3 -3
- package/dist/extensions/slack/node_modules/axios/dist/axios.min.js.map +1 -1
- package/dist/extensions/slack/node_modules/axios/dist/browser/axios.cjs +199 -86
- package/dist/extensions/slack/node_modules/axios/dist/browser/axios.cjs.map +1 -1
- package/dist/extensions/slack/node_modules/axios/dist/esm/axios.js +199 -86
- package/dist/extensions/slack/node_modules/axios/dist/esm/axios.js.map +1 -1
- package/dist/extensions/slack/node_modules/axios/dist/esm/axios.min.js +2 -2
- package/dist/extensions/slack/node_modules/axios/dist/esm/axios.min.js.map +1 -1
- package/dist/extensions/slack/node_modules/axios/dist/node/axios.cjs +376 -84
- package/dist/extensions/slack/node_modules/axios/dist/node/axios.cjs.map +1 -1
- package/dist/extensions/slack/node_modules/axios/index.d.cts +15 -28
- package/dist/extensions/slack/node_modules/axios/index.d.ts +133 -226
- package/dist/extensions/slack/node_modules/axios/lib/adapters/fetch.js +21 -6
- package/dist/extensions/slack/node_modules/axios/lib/adapters/http.js +150 -19
- package/dist/extensions/slack/node_modules/axios/lib/core/Axios.js +19 -3
- package/dist/extensions/slack/node_modules/axios/lib/core/AxiosError.js +34 -33
- package/dist/extensions/slack/node_modules/axios/lib/core/AxiosHeaders.js +34 -3
- package/dist/extensions/slack/node_modules/axios/lib/core/buildFullPath.js +1 -1
- package/dist/extensions/slack/node_modules/axios/lib/core/mergeConfig.js +18 -4
- package/dist/extensions/slack/node_modules/axios/lib/defaults/index.js +13 -8
- package/dist/extensions/slack/node_modules/axios/lib/env/data.js +1 -1
- package/dist/extensions/slack/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +1 -2
- package/dist/extensions/slack/node_modules/axios/lib/helpers/formDataToJSON.js +3 -1
- package/dist/extensions/slack/node_modules/axios/lib/helpers/formDataToStream.js +2 -1
- package/dist/extensions/slack/node_modules/axios/lib/helpers/progressEventReducer.js +5 -5
- package/dist/extensions/slack/node_modules/axios/lib/helpers/resolveConfig.js +25 -5
- package/dist/extensions/slack/node_modules/axios/lib/helpers/shouldBypassProxy.js +153 -0
- package/dist/extensions/slack/node_modules/axios/lib/helpers/toFormData.js +10 -2
- package/dist/extensions/slack/node_modules/axios/lib/helpers/validator.js +3 -1
- package/dist/extensions/slack/node_modules/axios/lib/utils.js +10 -10
- package/dist/extensions/slack/node_modules/axios/package.json +7 -4
- package/dist/extensions/slack/node_modules/content-disposition/README.md +7 -8
- package/dist/extensions/slack/node_modules/content-disposition/index.js +118 -40
- package/dist/extensions/slack/node_modules/content-disposition/package.json +8 -11
- package/dist/extensions/slack/node_modules/follow-redirects/README.md +7 -5
- package/dist/extensions/slack/node_modules/follow-redirects/index.js +24 -1
- package/dist/extensions/slack/node_modules/follow-redirects/package.json +1 -1
- package/dist/extensions/slack/node_modules/hasown/CHANGELOG.md +11 -0
- package/dist/extensions/slack/node_modules/hasown/eslint.config.mjs +6 -0
- package/dist/extensions/slack/node_modules/hasown/index.d.ts +1 -0
- package/dist/extensions/slack/node_modules/hasown/package.json +14 -14
- package/dist/extensions/slack/node_modules/path-to-regexp/Readme.md +3 -3
- package/dist/extensions/slack/node_modules/path-to-regexp/dist/index.js +135 -158
- package/dist/extensions/slack/node_modules/path-to-regexp/dist/index.js.map +1 -1
- package/dist/extensions/slack/node_modules/path-to-regexp/package.json +2 -2
- package/dist/extensions/slack/node_modules/qs/CHANGELOG.md +6 -0
- package/dist/extensions/slack/node_modules/qs/dist/qs.js +16 -16
- package/dist/extensions/slack/node_modules/qs/lib/parse.js +2 -2
- package/dist/extensions/slack/node_modules/qs/package.json +3 -3
- package/dist/extensions/slack/node_modules/qs/test/parse.js +86 -0
- package/dist/extensions/slack/node_modules/qs/test/stringify.js +9 -0
- package/dist/extensions/slack/node_modules/qs/test/utils.js +31 -3
- package/dist/extensions/slack/node_modules/side-channel-list/CHANGELOG.md +25 -4
- package/dist/extensions/slack/node_modules/side-channel-list/index.js +1 -3
- package/dist/extensions/slack/node_modules/side-channel-list/package.json +8 -8
- package/dist/extensions/slack/node_modules/side-channel-list/test/index.js +50 -0
- package/dist/extensions/slack/node_modules/undici-types/cache-interceptor.d.ts +6 -0
- package/dist/extensions/slack/node_modules/undici-types/client.d.ts +10 -0
- package/dist/extensions/slack/node_modules/undici-types/package.json +1 -1
- package/dist/extensions/telegram/.openclaw-runtime-deps-stamp.json +1 -1
- package/dist/extensions/telegram/node_modules/.package-lock.json +7 -7
- package/dist/extensions/telegram/node_modules/@grammyjs/types/checklist.d.ts +2 -2
- package/dist/extensions/telegram/node_modules/@grammyjs/types/manage.d.ts +20 -6
- package/dist/extensions/telegram/node_modules/@grammyjs/types/markup.d.ts +19 -1
- package/dist/extensions/telegram/node_modules/@grammyjs/types/message.d.ts +58 -7
- package/dist/extensions/telegram/node_modules/@grammyjs/types/methods.d.ts +41 -10
- package/dist/extensions/telegram/node_modules/@grammyjs/types/package.json +1 -1
- package/dist/extensions/telegram/node_modules/@grammyjs/types/update.d.ts +3 -1
- package/dist/extensions/telegram/node_modules/grammy/README.md +59 -60
- package/dist/extensions/telegram/node_modules/grammy/out/bot.d.ts +1 -1
- package/dist/extensions/telegram/node_modules/grammy/out/bot.js +1 -0
- package/dist/extensions/telegram/node_modules/grammy/out/context.d.ts +28 -1
- package/dist/extensions/telegram/node_modules/grammy/out/context.js +35 -0
- package/dist/extensions/telegram/node_modules/grammy/out/convenience/constants.d.ts +1 -1
- package/dist/extensions/telegram/node_modules/grammy/out/convenience/keyboard.d.ts +21 -1
- package/dist/extensions/telegram/node_modules/grammy/out/convenience/keyboard.js +30 -2
- package/dist/extensions/telegram/node_modules/grammy/out/core/api.d.ts +29 -1
- package/dist/extensions/telegram/node_modules/grammy/out/core/api.js +34 -0
- package/dist/extensions/telegram/node_modules/grammy/out/filter.d.ts +30 -4
- package/dist/extensions/telegram/node_modules/grammy/out/filter.js +6 -2
- package/dist/extensions/telegram/node_modules/grammy/out/web.mjs +58 -10
- package/dist/extensions/telegram/node_modules/grammy/package.json +2 -2
- package/dist/{gateway-cli-COLy988M.js → gateway-cli-BQs8Qd9u.js} +2 -2
- package/dist/index.js +1 -1
- package/dist/{node-cli-ofvJTLem.js → node-cli-ZfoSKAgY.js} +40 -11
- package/dist/{onboard-H5LM81li.js → onboard-CtQTF9Pq.js} +1 -1
- package/dist/plugin-sdk/src/config/schema.base.generated.d.ts +1 -1
- package/dist/{program-CO45b_l6.js → program-DB9XGsJm.js} +1 -1
- package/dist/{prompt-select-styled-j6voT46T.js → prompt-select-styled-jBrfeHUG.js} +1 -1
- package/dist/{register.maintenance-BWzBNdaB.js → register.maintenance-Ddm9pXEy.js} +1 -1
- package/dist/{register.onboard-DfeHhiWt.js → register.onboard-C1wg5SMO.js} +1 -1
- package/dist/{register.setup-1qWgm2rZ.js → register.setup-C_YIt_Hg.js} +1 -1
- package/dist/{register.subclis-n3-Fy7S6.js → register.subclis-BZB6oeZE.js} +4 -4
- package/dist/{register.subclis-BedsVCX2.js → register.subclis-CkFAlHtB.js} +1 -1
- package/dist/{run-main-DM-Z_hpr.js → run-main-BSypopS7.js} +6 -6
- package/dist/{runtime-schema-D3Ib21WQ.js → runtime-schema-BirGs1_v.js} +1 -1
- package/dist/{setup-CzWMI_4a.js → setup-Tc8Q5EMN.js} +1 -1
- package/dist/{setup.finalize-K-ziYKFr.js → setup.finalize-BXnUa_kR.js} +2 -2
- package/dist/{update-cli-DMTjIbvt.js → update-cli-CpGu1-wL.js} +3 -3
- package/package.json +1 -1
- package/dist/completion-cli-CbJ_-ODB.js +0 -2
- package/dist/extensions/feishu/node_modules/hasown/.eslintrc +0 -5
- package/dist/extensions/slack/node_modules/content-disposition/HISTORY.md +0 -72
- package/dist/extensions/slack/node_modules/hasown/.eslintrc +0 -5
package/dist/.buildstamp
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"builtAt":
|
|
1
|
+
{"builtAt":1777342643568,"head":"44a5d2d663433442586fea9263c32a765301c559"}
|
package/dist/build-info.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
f71d639518195a26d4c56e473c240998b931012f59b86f408307dadb1a712c86
|
|
@@ -23,5 +23,5 @@
|
|
|
23
23
|
"tlon",
|
|
24
24
|
"twitch"
|
|
25
25
|
],
|
|
26
|
-
"rootHelpText": "\n🦞 OpenClaw 2026.3.28-beta.
|
|
26
|
+
"rootHelpText": "\n🦞 OpenClaw 2026.3.28-beta.2 (44a5d2d) — Alexa, but with taste.\n\nUsage: openclaw [options] [command]\n\nOptions:\n --container <name> Run the CLI inside a running Podman/Docker container\n named <name> (default: env OPENCLAW_CONTAINER)\n --dev Dev profile: isolate state under ~/.openclaw-dev, default\n gateway port 19001, and shift derived ports\n (browser/canvas)\n -h, --help Display help for command\n --log-level <level> Global log level override for file + console\n (silent|fatal|error|warn|info|debug|trace)\n --no-color Disable ANSI colors\n --profile <name> Use a named profile (isolates\n OPENCLAW_STATE_DIR/OPENCLAW_CONFIG_PATH under\n ~/.openclaw-<name>)\n -V, --version output the version number\n\nCommands:\n Hint: commands suffixed with * have subcommands. Run <command> --help for details.\n acp * Agent Control Protocol tools\n agent Run one agent turn via the Gateway\n agents * Manage isolated agents (workspaces, auth, routing)\n approvals * Manage exec approvals (gateway or node host)\n backup * Create and verify local backup archives for OpenClaw\n state\n channels * Manage connected chat channels (Telegram, Discord, etc.)\n clawbot * Legacy clawbot command aliases\n completion Generate shell completion script\n config * Non-interactive config helpers\n (get/set/unset/file/validate). Default: starts guided\n setup.\n configure Interactive configuration for credentials, channels,\n gateway, and agent defaults\n cron * Manage cron jobs via the Gateway scheduler\n daemon * Gateway service (legacy alias)\n dashboard Open the Control UI with your current token\n devices * Device pairing + token management\n directory * Lookup contact and group IDs (self, peers, groups) for\n supported chat channels\n dns * DNS helpers for wide-area discovery (Tailscale + CoreDNS)\n docs Search the live OpenClaw docs\n doctor Health checks + quick fixes for the gateway and channels\n gateway * Run, inspect, and query the WebSocket Gateway\n health Fetch health from the running gateway\n help Display help for command\n hooks * Manage internal agent hooks\n logs Tail gateway file logs via RPC\n message * Send, read, and manage messages\n models * Discover, scan, and configure models\n node * Run and manage the headless node host service\n nodes * Manage gateway-owned node pairing and node commands\n onboard Interactive onboarding for gateway, workspace, and skills\n pairing * Secure DM pairing (approve inbound requests)\n plugins * Manage OpenClaw plugins and extensions\n qr Generate iOS pairing QR/setup code\n reset Reset local config/state (keeps the CLI installed)\n sandbox * Manage sandbox containers for agent isolation\n secrets * Secrets runtime reload controls\n security * Security tools and local config audits\n sessions * List stored conversation sessions\n setup Initialize local config and agent workspace\n skills * List and inspect available skills\n status Show channel health and recent session recipients\n system * System events, heartbeat, and presence\n tui Open a terminal UI connected to the Gateway\n uninstall Uninstall the gateway service + local data (CLI remains)\n update * Update OpenClaw and inspect update channel status\n webhooks * Webhook helpers and integrations\n\nExamples:\n openclaw models --help\n Show detailed help for the models command.\n openclaw channels login --verbose\n Link personal WhatsApp Web and show QR + connection logs.\n openclaw message send --target +15555550123 --message \"Hi\" --json\n Send via your web session and print JSON result.\n openclaw gateway --port 18789\n Run the WebSocket Gateway locally.\n openclaw --dev gateway\n Run a dev Gateway (isolated state/config) on ws://127.0.0.1:19001.\n openclaw gateway --force\n Kill anything bound to the default gateway port, then start it.\n openclaw gateway ...\n Gateway control via WebSocket.\n openclaw agent --to +15555550123 --message \"Run summary\" --deliver\n Talk directly to the agent using the Gateway; optionally send the WhatsApp reply.\n openclaw message send --channel telegram --target @mychat --message \"Hi\"\n Send via your Telegram bot.\n\nDocs: https://docs.openclaw.ai/cli\n\n"
|
|
27
27
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { O as getPrimaryCommand, j as hasHelpOrVersion } from "./logger-BCzP_yik.js";
|
|
2
|
-
import { a as removeCommandByName, i as registerSubCliCommands, o as reparseProgramFromActionArgs } from "./register.subclis-
|
|
2
|
+
import { a as removeCommandByName, i as registerSubCliCommands, o as reparseProgramFromActionArgs } from "./register.subclis-BZB6oeZE.js";
|
|
3
3
|
import { t as getCoreCliCommandDescriptors } from "./core-command-descriptors-3IsGrTdH.js";
|
|
4
4
|
//#region src/cli/program/command-registry.ts
|
|
5
5
|
const shouldRegisterCorePrimaryOnly = (argv) => {
|
|
@@ -14,7 +14,7 @@ const coreEntries = [
|
|
|
14
14
|
hasSubcommands: false
|
|
15
15
|
}],
|
|
16
16
|
register: async ({ program }) => {
|
|
17
|
-
(await import("./register.setup-
|
|
17
|
+
(await import("./register.setup-C_YIt_Hg.js")).registerSetupCommand(program);
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
{
|
|
@@ -24,7 +24,7 @@ const coreEntries = [
|
|
|
24
24
|
hasSubcommands: false
|
|
25
25
|
}],
|
|
26
26
|
register: async ({ program }) => {
|
|
27
|
-
(await import("./register.onboard-
|
|
27
|
+
(await import("./register.onboard-C1wg5SMO.js")).registerOnboardCommand(program);
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
{
|
|
@@ -44,7 +44,7 @@ const coreEntries = [
|
|
|
44
44
|
hasSubcommands: true
|
|
45
45
|
}],
|
|
46
46
|
register: async ({ program }) => {
|
|
47
|
-
(await import("./config-cli-
|
|
47
|
+
(await import("./config-cli-E-zhWRmA.js")).registerConfigCli(program);
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
{
|
|
@@ -81,7 +81,7 @@ const coreEntries = [
|
|
|
81
81
|
}
|
|
82
82
|
],
|
|
83
83
|
register: async ({ program }) => {
|
|
84
|
-
(await import("./register.maintenance-
|
|
84
|
+
(await import("./register.maintenance-Ddm9pXEy.js")).registerMaintenanceCommands(program);
|
|
85
85
|
}
|
|
86
86
|
},
|
|
87
87
|
{
|
|
@@ -3,8 +3,8 @@ import { m as pathExists } from "./utils-BfvDpbwh.js";
|
|
|
3
3
|
import { t as formatDocsLink } from "./links-CNsP_rfF.js";
|
|
4
4
|
import { r as theme } from "./theme-D-TumEpz.js";
|
|
5
5
|
import { _ as resolveStateDir } from "./paths-Y4UT24Of.js";
|
|
6
|
-
import { n as loadValidatedConfigForPluginRegistration, r as registerSubCliByName, t as getSubCliEntries } from "./register.subclis-
|
|
7
|
-
import { n as registerCoreCliByName, t as getCoreCliCommandNames } from "./command-registry-
|
|
6
|
+
import { n as loadValidatedConfigForPluginRegistration, r as registerSubCliByName, t as getSubCliEntries } from "./register.subclis-BZB6oeZE.js";
|
|
7
|
+
import { n as registerCoreCliByName, t as getCoreCliCommandNames } from "./command-registry-rZb7lPtI.js";
|
|
8
8
|
import { t as getProgramContext } from "./program-context-Bv9xg3LZ.js";
|
|
9
9
|
import path from "node:path";
|
|
10
10
|
import os from "node:os";
|
|
@@ -13,7 +13,7 @@ import { a as formatExecSecretRefIdValidationMessage, c as isValidSecretProvider
|
|
|
13
13
|
import { C as SecretProviderSchema } from "./zod-schema.core-CGoKjdG2.js";
|
|
14
14
|
import { a as resolveSecretRefValue } from "./resolve-CFB7mNpd.js";
|
|
15
15
|
import { l as discoverConfigSecretTargets, m as resolveConfigSecretTargetByPath } from "./command-secret-targets-DayQlnoD.js";
|
|
16
|
-
import { i as redactConfigObject, n as readBestEffortRuntimeConfigSchema } from "./runtime-schema-
|
|
16
|
+
import { i as redactConfigObject, n as readBestEffortRuntimeConfigSchema } from "./runtime-schema-BirGs1_v.js";
|
|
17
17
|
import { n as setCommandJsonMode } from "./json-mode-DP5Id_4L.js";
|
|
18
18
|
import fsSync from "node:fs";
|
|
19
19
|
import JSON5 from "json5";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as resolveOpenClawPackageRoot } from "./openclaw-root-BYOI_ohY.js";
|
|
2
2
|
import { r as resolveCliName } from "./command-format-CR4nOXgc.js";
|
|
3
3
|
import { t as note } from "./note-C01OqYRg.js";
|
|
4
|
-
import { c as usesSlowDynamicCompletion, i as isCompletionInstalled, o as resolveCompletionCachePath, r as installCompletion, s as resolveShellFromEnv, t as completionCacheExists } from "./completion-cli-
|
|
4
|
+
import { c as usesSlowDynamicCompletion, i as isCompletionInstalled, o as resolveCompletionCachePath, r as installCompletion, s as resolveShellFromEnv, t as completionCacheExists } from "./completion-cli-B8zT2HAK.js";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { spawnSync } from "node:child_process";
|
|
7
7
|
//#region src/commands/doctor-completion.ts
|
package/dist/entry.js
CHANGED
|
@@ -204,7 +204,7 @@ function tryHandleRootHelpFastPath(argv, deps = {}) {
|
|
|
204
204
|
}
|
|
205
205
|
function runMainOrRootHelp(argv) {
|
|
206
206
|
if (tryHandleRootHelpFastPath(argv)) return;
|
|
207
|
-
import("./run-main-
|
|
207
|
+
import("./run-main-BSypopS7.js").then(({ runCli }) => runCli(argv)).catch((error) => {
|
|
208
208
|
console.error("[openclaw] Failed to start CLI:", error instanceof Error ? error.stack ?? error.message : error);
|
|
209
209
|
process$1.exitCode = 1;
|
|
210
210
|
});
|
|
@@ -376,18 +376,18 @@
|
|
|
376
376
|
"license": "MIT"
|
|
377
377
|
},
|
|
378
378
|
"node_modules/oniguruma-parser": {
|
|
379
|
-
"version": "0.12.
|
|
380
|
-
"resolved": "https://registry.npmjs.org/oniguruma-parser/-/oniguruma-parser-0.12.
|
|
381
|
-
"integrity": "sha512-
|
|
379
|
+
"version": "0.12.2",
|
|
380
|
+
"resolved": "https://registry.npmjs.org/oniguruma-parser/-/oniguruma-parser-0.12.2.tgz",
|
|
381
|
+
"integrity": "sha512-6HVa5oIrgMC6aA6WF6XyyqbhRPJrKR02L20+2+zpDtO5QAzGHAUGw5TKQvwi5vctNnRHkJYmjAhRVQF2EKdTQw==",
|
|
382
382
|
"license": "MIT"
|
|
383
383
|
},
|
|
384
384
|
"node_modules/oniguruma-to-es": {
|
|
385
|
-
"version": "4.3.
|
|
386
|
-
"resolved": "https://registry.npmjs.org/oniguruma-to-es/-/oniguruma-to-es-4.3.
|
|
387
|
-
"integrity": "sha512-
|
|
385
|
+
"version": "4.3.6",
|
|
386
|
+
"resolved": "https://registry.npmjs.org/oniguruma-to-es/-/oniguruma-to-es-4.3.6.tgz",
|
|
387
|
+
"integrity": "sha512-csuQ9x3Yr0cEIs/Zgx/OEt9iBw9vqIunAPQkx19R/fiMq2oGVTgcMqO/V3Ybqefr1TBvosI6jU539ksaBULJyA==",
|
|
388
388
|
"license": "MIT",
|
|
389
389
|
"dependencies": {
|
|
390
|
-
"oniguruma-parser": "^0.12.
|
|
390
|
+
"oniguruma-parser": "^0.12.2",
|
|
391
391
|
"regex": "^6.1.0",
|
|
392
392
|
"regex-recursion": "^6.0.2"
|
|
393
393
|
}
|
|
@@ -29,18 +29,45 @@ npm install oniguruma-parser
|
|
|
29
29
|
|
|
30
30
|
```js
|
|
31
31
|
import {toOnigurumaAst} from 'oniguruma-parser';
|
|
32
|
+
|
|
33
|
+
const ast = toOnigurumaAst('^.*');
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
<details>
|
|
37
|
+
<summary>Using CommonJS require</summary>
|
|
38
|
+
|
|
39
|
+
```js
|
|
40
|
+
const {toOnigurumaAst} = require('oniguruma-parser-cjs');
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
> **Note:** [oniguruma-parser-cjs](https://github.com/RedCMD/oniguruma-parser-cjs) is a third-party CommonJS wrapper for this library. It might not always be up to date with the latest version.
|
|
44
|
+
</details>
|
|
45
|
+
|
|
46
|
+
<details>
|
|
47
|
+
<summary>Using a CDN and global name</summary>
|
|
48
|
+
|
|
49
|
+
```html
|
|
50
|
+
<script src="https://cdn.jsdelivr.net/npm/oniguruma-parser/dist/oniguruma-parser.min.js"></script>
|
|
51
|
+
<script>
|
|
52
|
+
const {toOnigurumaAst} = OnigurumaParser;
|
|
53
|
+
</script>
|
|
32
54
|
```
|
|
33
55
|
|
|
56
|
+
> **Note:** This bundle includes a subset of all available exports. See [`src/bundle.ts`](https://github.com/slevithan/oniguruma-parser/blob/main/src/bundle.ts).
|
|
57
|
+
</details>
|
|
58
|
+
|
|
59
|
+
### Additional modules
|
|
60
|
+
|
|
34
61
|
The following modules are available in addition to the root `'oniguruma-parser'` export:
|
|
35
62
|
|
|
36
|
-
- [Parser
|
|
37
|
-
- [Traverser
|
|
38
|
-
- [Generator
|
|
39
|
-
- [Optimizer
|
|
63
|
+
- [Parser](https://github.com/slevithan/oniguruma-parser/blob/main/src/parser/README.md): Includes numerous functions and types for constructing and working with `OnigurumaAst` nodes. Also includes the core `parse` function that's wrapped by `toOnigurumaAst`.
|
|
64
|
+
- [Traverser](https://github.com/slevithan/oniguruma-parser/blob/main/src/traverser/README.md): Traverse and transform an `OnigurumaAst`.
|
|
65
|
+
- [Generator](https://github.com/slevithan/oniguruma-parser/blob/main/src/generator/README.md): Convert an `OnigurumaAst` to pattern and flags strings.
|
|
66
|
+
- [Optimizer](https://github.com/slevithan/oniguruma-parser/blob/main/src/optimizer/README.md): Minify and improve the performance of Oniguruma regexes.
|
|
40
67
|
|
|
41
|
-
##
|
|
68
|
+
## 🌲 Convert a pattern to an AST
|
|
42
69
|
|
|
43
|
-
|
|
70
|
+
Call `toOnigurumaAst` to parse an Oniguruma pattern (with optional flags and compile-time options) and return an AST. It uses the following type definition:
|
|
44
71
|
|
|
45
72
|
```ts
|
|
46
73
|
function toOnigurumaAst(
|
|
@@ -60,15 +87,15 @@ For example:
|
|
|
60
87
|
```js
|
|
61
88
|
import {toOnigurumaAst} from 'oniguruma-parser';
|
|
62
89
|
|
|
63
|
-
const ast = toOnigurumaAst('
|
|
90
|
+
const ast = toOnigurumaAst('^.*');
|
|
64
91
|
console.log(ast);
|
|
65
92
|
/* →
|
|
66
93
|
{ type: 'Regex',
|
|
67
94
|
body: [
|
|
68
95
|
{ type: 'Alternative',
|
|
69
96
|
body: [
|
|
70
|
-
{ type: '
|
|
71
|
-
|
|
97
|
+
{ type: 'Assertion',
|
|
98
|
+
kind: 'line_start',
|
|
72
99
|
},
|
|
73
100
|
{ type: 'Quantifier',
|
|
74
101
|
kind: 'greedy',
|
|
@@ -99,15 +126,15 @@ console.log(ast);
|
|
|
99
126
|
|
|
100
127
|
An error is thrown if the provided pattern or flags aren't valid in Oniguruma.
|
|
101
128
|
|
|
102
|
-
> **Note:** `toOnigurumaAst` is a wrapper around the [parser module](https://github.com/slevithan/oniguruma-parser/blob/main/src/parser/README.md)'s `parse` function that
|
|
129
|
+
> **Note:** `toOnigurumaAst` is a wrapper around the [parser module](https://github.com/slevithan/oniguruma-parser/blob/main/src/parser/README.md)'s `parse` function that automatically provides the appropriate Unicode property validation data.
|
|
103
130
|
|
|
104
131
|
## 🌀 Traverse and transform an AST
|
|
105
132
|
|
|
106
|
-
See details and examples in the [traverser module
|
|
133
|
+
See details and examples in the [traverser module](https://github.com/slevithan/oniguruma-parser/blob/main/src/traverser/README.md)'s readme.
|
|
107
134
|
|
|
108
135
|
## ↩️ Convert an AST to a pattern
|
|
109
136
|
|
|
110
|
-
See details and examples in the [generator module
|
|
137
|
+
See details and examples in the [generator module](https://github.com/slevithan/oniguruma-parser/blob/main/src/generator/README.md)'s readme.
|
|
111
138
|
|
|
112
139
|
## 🪄 Optimize regexes
|
|
113
140
|
|
|
@@ -127,7 +154,7 @@ Becomes:
|
|
|
127
154
|
|
|
128
155
|
Optimized regexes always match exactly the same strings.
|
|
129
156
|
|
|
130
|
-
See more details and examples in the [optimizer module
|
|
157
|
+
See more details and examples in the [optimizer module](https://github.com/slevithan/oniguruma-parser/blob/main/src/optimizer/README.md)'s readme.
|
|
131
158
|
|
|
132
159
|
> [!TIP]
|
|
133
160
|
> 🧪 Try the [optimizer demo](https://slevithan.github.io/oniguruma-parser/demo/).
|
|
@@ -146,7 +173,7 @@ The following rarely-used features throw errors since they aren't yet supported:
|
|
|
146
173
|
- Conditionals: `(?(…)…)`, etc.
|
|
147
174
|
- Non-built-in callouts: `(?{…})`, etc.
|
|
148
175
|
- Numbered *forward* backreferences (incl. relative `\k<+N>`) and backreferences with recursion level (`\k<N+N>`, etc.).
|
|
149
|
-
- Flags `D` `P` `S` `W` `y{g}` `y{w}` within pattern modifiers, and whole-pattern
|
|
176
|
+
- Flags `D` `P` `S` `W` `y{g}` `y{w}` within pattern modifiers, and whole-pattern flags `C` `I` `L` ([#26](https://github.com/slevithan/oniguruma-parser/issues/26)).
|
|
150
177
|
|
|
151
178
|
Despite these gaps, more than 99.99% of real-world Oniguruma regexes are supported, based on a sample of ~55k regexes used in TextMate grammars (conditionals were used in three regexes, and other unsupported features weren't used at all). Some of the Oniguruma features above are so exotic that they aren't used in *any* public code on GitHub.
|
|
152
179
|
|
|
@@ -172,6 +199,16 @@ The following don't yet throw errors, but should:
|
|
|
172
199
|
- Such subroutines error at compile time in Oniguruma.
|
|
173
200
|
</details>
|
|
174
201
|
|
|
202
|
+
<details>
|
|
203
|
+
<summary>Future AST node types</summary>
|
|
204
|
+
|
|
205
|
+
Support for most of the currently unsupported features above will be added to the `OnigurumaAst` structure using existing node types (`Character`, `AbsenceFunction`, `Backreference`, etc.). However, the following node types will be added when their corresponding features are supported:
|
|
206
|
+
|
|
207
|
+
- `CharacterSequence`: New node type for code point sequences; will contain two or more `Character` nodes.
|
|
208
|
+
- `Conditional`: New node type for all conditional kinds.
|
|
209
|
+
- `Callout`: New node type for unnamed callouts.
|
|
210
|
+
</details>
|
|
211
|
+
|
|
175
212
|
### Behavior differences
|
|
176
213
|
|
|
177
214
|
#### Unenclosed four-digit backreferences
|
|
@@ -250,9 +287,18 @@ Contributions are welcome. See the [guide](https://github.com/slevithan/onigurum
|
|
|
250
287
|
|
|
251
288
|
Created by [Steven Levithan](https://github.com/slevithan) and [contributors](https://github.com/slevithan/oniguruma-parser/graphs/contributors).
|
|
252
289
|
|
|
290
|
+
### Sponsors and backers
|
|
291
|
+
|
|
292
|
+
[<img src="https://github.com/roboflow.png" width="40" height="40">](https://github.com/roboflow)
|
|
293
|
+
|
|
294
|
+
### Past sponsors
|
|
295
|
+
|
|
296
|
+
[<img src="https://github.com/antfu.png" width="40" height="40">](https://github.com/antfu)
|
|
297
|
+
[<img src="https://github.com/brc-dd.png" width="40" height="40">](https://github.com/brc-dd)
|
|
298
|
+
|
|
253
299
|
If you want to support this project, I'd love your help by contributing improvements ([guide](https://github.com/slevithan/oniguruma-parser/blob/main/CONTRIBUTING.md)), sharing it with others, or [sponsoring](https://github.com/sponsors/slevithan) ongoing development.
|
|
254
300
|
|
|
255
|
-
MIT License.
|
|
301
|
+
© 2025–present. MIT License.
|
|
256
302
|
|
|
257
303
|
<!-- Badges -->
|
|
258
304
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/generator/generate.ts"],
|
|
4
|
-
"sourcesContent": ["import type {GroupNode, Node, OnigurumaAst, ParentNode, QuantifierNode, RegexNode} from '../parser/parse.js';\nimport type {FlagProperties} from '../tokenizer/tokenize.js';\nimport {r, throwIfNullish} from '../utils.js';\n\ntype OnigurumaRegex = {\n pattern: string;\n flags: string;\n};\n\n/**\nGenerates an Oniguruma `pattern` and `flags` from an `OnigurumaAst`.\n*/\nfunction generate(ast: OnigurumaAst): OnigurumaRegex {\n const parentStack: Array<ParentNode> = [];\n let lastNode: Node = ast;\n const state: State = {\n inCharClass: false,\n lastNode,\n parent: ast,\n };\n const gen: Gen = node => {\n state.lastNode = lastNode;\n lastNode = node; // For the next iteration\n if (getFirstChild(state.lastNode) === node) {\n state.parent = state.lastNode as ParentNode;\n parentStack.push(state.parent);\n }\n const fn = throwIfNullish(generator[node.type], `Unexpected node type \"${node.type}\"`);\n // @ts-expect-error\n const result = fn(node, state, gen);\n if (getLastChild(state.parent) === node) {\n parentStack.pop();\n state.parent = parentStack.at(-1) ?? ast;\n };\n return result;\n };\n return {\n pattern: ast.body.map(gen).join('|'),\n // Could reset `lastNode` at this point via `lastNode = ast`, but it isn't needed by flags\n flags: gen(ast.flags),\n };\n}\n\ntype State = {\n inCharClass: boolean;\n lastNode: Node;\n parent: ParentNode;\n};\n\ntype NonRootNode = Exclude<Node, RegexNode>;\n\ntype Gen = (node: NonRootNode) => string;\n\ntype Generator = {\n [N in NonRootNode as N['type']]:\n (node: N, state: State, gen: Gen) => string\n};\n\nconst generator: Generator = {\n AbsenceFunction({body, kind}, _, gen) {\n if (kind !== 'repeater') {\n throw new Error(`Unexpected absence function kind \"${kind}\"`);\n }\n return `(?~${body.map(gen).join('|')})`;\n },\n\n Alternative({body}, _, gen) {\n return body.map(gen).join('');\n },\n\n Assertion({kind, negate}) {\n if (kind === 'text_segment_boundary') {\n return negate ? r`\\Y` : r`\\y`;\n }\n if (kind === 'word_boundary') {\n return negate ? r`\\B` : r`\\b`;\n }\n return throwIfNullish({\n line_end: '$',\n line_start: '^',\n search_start: r`\\G`,\n string_end: r`\\z`,\n string_end_newline: r`\\Z`,\n string_start: r`\\A`,\n }[kind], `Unexpected assertion kind \"${kind}\"`);\n },\n\n Backreference({ref}) {\n if (typeof ref === 'number') {\n // TODO: Won't be safe to indiscriminately unenclose when forward backrefs are supported\n return '\\\\' + ref;\n }\n // Onig doesn't allow chars `>` or `'` in backref names, so this is safe\n return `\\\\k<${ref}>`;\n },\n\n CapturingGroup({body, name}, _, gen) {\n const enclosedName = name ? `?${name.includes('>') ? `'${name}'` : `<${name}>`}` : '';\n return `(${enclosedName}${body.map(gen).join('|')})`;\n },\n\n Character(node, {inCharClass, lastNode, parent}) {\n const {value} = node;\n if (CharCodeEscapeMap.has(value)) {\n return CharCodeEscapeMap.get(value)!;\n }\n const escDigit = lastNode.type === 'Backreference';\n if (\n // Control chars, etc.; condition modeled on the Chrome developer console's display for strings\n value < 32 || (value > 126 && value < 160) ||\n // Unicode planes 4-16; unassigned, special purpose, and private use area\n value > 0x3FFFF ||\n // Avoid corrupting a preceding backref by immediately following it with a literal digit\n (escDigit && isDigitCharCode(value))\n ) {\n // Onig treats unenclosed `\\x80` to `\\xFF` as an encoded byte (a fragment of a code unit), so\n // we can't use them to represent a character. Also, don't convert value `0` to `\\0` since\n // that's corruptible by following literal digits\n return value > 0x7F ?\n `\\\\x{${value.toString(16).toUpperCase()}}` :\n `\\\\x${value.toString(16).toUpperCase().padStart(2, '0')}`;\n }\n const char = String.fromCodePoint(value);\n let escape = false;\n if (inCharClass) {\n const isDirectClassKid = parent.type === 'CharacterClass';\n const isFirst = isDirectClassKid && parent.body[0] === node;\n const isLast = isDirectClassKid && parent.body.at(-1) === node;\n // Avoid escaping in some optional special cases when escaping isn't needed due to position\n if (char === '^') {\n escape = isFirst && !parent.negate;\n } else if (char === ']') {\n escape = !isFirst;\n } else if (char === '-') {\n // Could also avoid escaping if it's immediately after a range or nested class, but don't\n // make that the default rendering\n escape = !isFirst && !isLast;\n } else {\n escape = CharClassEscapeChars.has(char);\n }\n } else {\n escape = BaseEscapeChars.has(char);\n }\n return `${escape ? '\\\\' : ''}${char}`;\n },\n\n CharacterClass({body, kind, negate}, state, gen) {\n function genClass() {\n if (\n state.parent.type === 'CharacterClass' &&\n state.parent.kind === 'intersection' &&\n kind === 'union' &&\n !body.length\n ) {\n // Prevent empty intersection like `[&&]` from becoming the invalid `[[]&&[]]`\n return '';\n }\n return `[${negate ? '^' : ''}${\n body.map(gen).join(kind === 'intersection' ? '&&' : '')\n }]`;\n }\n if (!state.inCharClass) {\n // For the outermost char class, set state\n state.inCharClass = true;\n const result = genClass();\n state.inCharClass = false;\n return result;\n }\n return genClass();\n },\n\n CharacterClassRange({min, max}, _, gen) {\n return `${gen(min)}-${gen(max)}`;\n },\n\n CharacterSet({kind, negate, value}, {inCharClass}) {\n switch (kind) {\n case 'any':\n return r`\\O`;\n case 'digit':\n return negate ? r`\\D` : r`\\d`;\n case 'dot':\n return '.';\n case 'hex':\n return negate ? r`\\H` : r`\\h`;\n case 'newline':\n return negate ? r`\\N` : r`\\R`;\n case 'posix':\n return inCharClass ?\n `[:${negate ? '^' : ''}${value}:]` :\n `${negate ? r`\\P` : r`\\p`}{${value}}`;\n case 'property':\n return `${negate ? r`\\P` : r`\\p`}{${value}}`;\n case 'space':\n return negate ? r`\\S` : r`\\s`;\n case 'text_segment':\n return r`\\X`;\n case 'word':\n return negate ? r`\\W` : r`\\w`;\n default:\n throw new Error(`Unexpected character set kind \"${kind}\"`);\n }\n },\n\n Directive({kind, flags}) {\n if (kind === 'flags') {\n const {enable = {}, disable = {}} = flags;\n const enableStr = getFlagsStr(enable);\n const disableStr = getFlagsStr(disable);\n return (enableStr || disableStr) ? `(?${enableStr}${disableStr ? `-${disableStr}` : ''})` : '';\n }\n if (kind === 'keep') {\n return r`\\K`;\n }\n throw new Error(`Unexpected directive kind \"${kind}\"`);\n },\n\n Flags(node) {\n return getFlagsStr(node);\n },\n\n Group({atomic, body, flags}, _, gen) {\n const contents = body.map(gen).join('|');\n return `(?${getGroupPrefix(atomic, flags)}${contents})`;\n },\n\n LookaroundAssertion({body, kind, negate}, _, gen) {\n const prefix = `${kind === 'lookahead' ? '' : '<'}${negate ? '!' : '='}`;\n return `(?${prefix}${body.map(gen).join('|')})`;\n },\n\n NamedCallout({kind, tag, arguments: args}) {\n if (kind === 'custom') {\n // TODO: If supporting custom callout names in the future (with an added `name` property for\n // `NamedCalloutNode`), will need to use `name` instead of `kind` if `kind` is `'custom'`\n throw new Error(`Unexpected named callout kind \"${kind}\"`);\n }\n return `(*${kind.toUpperCase()}${tag ? `[${tag}]` : ''}${args ? `{${args.join(',')}}` : ''})`;\n },\n\n Quantifier(node, {parent}, gen) {\n // Rendering Onig quantifiers is wildly, unnecessarily complex compared to other regex flavors\n // because of the combination of a few features unique to Onig:\n // - You can create quantifier chains (i.e., quantify a quantifier).\n // - An implicit zero min is allowed for interval quantifiers (ex: `{,2}`).\n // - Interval quantifiers can't use `+` to make them possessive (it creates a quantifier\n // chain), even though quantifiers `?` `*` `+` can.\n // - A reversed range in a quantifier makes it possessive (ex: `{2,1}`).\n // - `{,n}` is always greedy with an implicit zero min, and can't represent a possesive range\n // from n to infinity.\n const {body, kind, max, min} = node;\n // These errors shouldn't happen unless the AST is modified in an invalid way after parsing\n if (min === Infinity) {\n throw new Error(`Invalid quantifier: infinite min`);\n }\n if (min > max) {\n throw new Error(`Invalid quantifier: min \"${min}\" > max \"${max}\"`);\n }\n const kidIsGreedyQuantifier = (\n body.type === 'Quantifier' &&\n body.kind === 'greedy'\n );\n const parentIsPossessivePlus = (\n parent.type === 'Quantifier' &&\n parent.kind === 'possessive' &&\n parent.min === 1 &&\n parent.max === Infinity\n );\n // Can't render as a symbol, because the following (parent) quantifier, which is `++`, would\n // then alter this node's meaning to make it possessive, and the parent quantifier can't change\n // to avoid this because there's no interval representation possible for `++`. There's also no\n // other way to render `*+`, but a following `*` wouldn't alter the meaning of this node. `?+`\n // is also safe since it can use the alternative `{1,0}` representation (which is possessive)\n const forcedInterval = kind === 'greedy' && parentIsPossessivePlus;\n let base;\n if (isSymbolQuantifierCandidate(node) && !forcedInterval) {\n if (\n !min && max === 1 &&\n // Can't chain a base of `?` to any greedy quantifier since that would make it lazy\n !kidIsGreedyQuantifier\n ) {\n base = '?';\n } else if (!min && max === Infinity) {\n base = '*';\n } else if (\n min === 1 && max === Infinity &&\n ( // Can't chain a base of `+` to greedy `?`/`*`/`+` since that would make them possessive\n !(kidIsGreedyQuantifier && isSymbolQuantifierCandidate(body)) ||\n // ...but, we're forced to use `+` (and change the kid's rendering) if this is possessive\n // `++` since you can't use a possessive reversed range with `Infinity`\n kind === 'possessive'\n )\n ) {\n base = '+';\n }\n }\n const isIntervalQuantifier = !base;\n if (isIntervalQuantifier) {\n if (kind === 'possessive') {\n if (min === max) {\n // Can't add a `+` suffix to a fixed `{n}` interval quantifier\n throw new Error(`Invalid possessive quantifier: min and max are equal \"${min}\"`);\n }\n if (max === Infinity) {\n // Onig reversed ranges are possessive but `{,n}` is the same as greedy `{0,n}`, so\n // there's no way to represent this without adding additional nodes that aren't in the\n // AST. The exceptions are when `min` is 0 or 1 (`?+`, `*+`, `++`), but we've already\n // ruled out rendering as a symbol at this point\n throw new Error(`Invalid possessive quantifier: min \"${min}\" with infinite max\"`);\n }\n // Reversed range\n base = `{${max},${min}}`;\n } else if (min === max) {\n base = `{${min}}`;\n } else {\n base = `{${min},${max === Infinity ? '' : max}}`;\n }\n }\n const suffix = {\n greedy: '',\n lazy: '?',\n // Interval quantifiers are marked possessive by reversing their min/max; a `+` suffix would\n // create a quantifier chain\n possessive: isIntervalQuantifier ? '' : '+',\n }[kind];\n return `${gen(body)}${base}${suffix}`;\n },\n\n Subroutine({ref}) {\n if (typeof ref === 'string' && ref.includes('>')) {\n return r`\\g'${ref}'`;\n }\n return r`\\g<${ref}>`;\n },\n};\n\n// ---------------\n// --- Helpers ---\n// ---------------\n\nconst BaseEscapeChars = new Set([\n '$', '(', ')', '*', '+', '.', '?', '[', '\\\\', '^', '{', '|',\n]);\n\nconst CharClassEscapeChars = new Set([\n '&', '-', '[', '\\\\', ']', '^',\n]);\n\nconst CharCodeEscapeMap = new Map([\n [ 7, r`\\a`], // bell\n [ 9, r`\\t`], // horizontal tab\n [10, r`\\n`], // line feed\n [11, r`\\v`], // vertical tab\n [12, r`\\f`], // form feed\n [13, r`\\r`], // carriage return\n [27, r`\\e`], // escape\n [0x2028, r`\\u2028`], // line separator\n [0x2029, r`\\u2029`], // paragraph separator\n [0xFEFF, r`\\uFEFF`], // ZWNBSP/BOM\n]);\n\nfunction getFirstChild(node: Node) {\n if ('body' in node) {\n return Array.isArray(node.body) ? (node.body[0] ?? null) : node.body;\n }\n // Check for `type` to determine if it's a child node; quantifiers have a numeric `min`\n if ('min' in node && node.min.type) {\n return node.min;\n }\n return null;\n}\n\nfunction getLastChild(node: Node) {\n if ('body' in node) {\n return Array.isArray(node.body) ? (node.body.at(-1) ?? null) : node.body;\n }\n // Check for `type` to determine if it's a child node; quantifiers have a numeric `max`\n if ('max' in node && node.max.type) {\n return node.max;\n }\n return null;\n}\n\nfunction getFlagsStr({\n ignoreCase,\n dotAll,\n extended,\n digitIsAscii,\n posixIsAscii,\n spaceIsAscii,\n wordIsAscii,\n textSegmentMode,\n}: Partial<FlagProperties>): string {\n return `${\n ignoreCase ? 'i' : ''\n }${\n dotAll ? 'm' : ''\n }${\n extended ? 'x' : ''\n }${\n digitIsAscii ? 'D' : ''\n }${\n posixIsAscii ? 'P' : ''\n }${\n spaceIsAscii ? 'S' : ''\n }${\n wordIsAscii ? 'W' : ''\n }${\n textSegmentMode ? throwIfNullish({\n grapheme: 'y{g}',\n word: 'y{w}',\n }[textSegmentMode], `Unexpected text segment mode \"${textSegmentMode}\"`) : ''\n }`;\n}\n\nfunction getGroupPrefix(atomic: GroupNode['atomic'], flags?: GroupNode['flags']): string {\n if (atomic) {\n return '>';\n }\n let mods = '';\n if (flags) {\n const {enable = {}, disable = {}} = flags;\n const enableStr = getFlagsStr(enable);\n const disableStr = getFlagsStr(disable);\n mods = `${enableStr}${disableStr ? `-${disableStr}` : ''}`;\n }\n return `${mods}:`;\n}\n\nfunction isDigitCharCode(value: number): boolean {\n return value > 47 && value < 58;\n}\n\nfunction isSymbolQuantifierCandidate({min, max}: QuantifierNode): boolean {\n return (\n (!min && max === 1) || // `?`\n (!min && max === Infinity) || // `*`\n (min === 1 && max === Infinity) // `+`\n );\n}\n\nexport {\n type OnigurumaRegex,\n generate,\n};\n"],
|
|
4
|
+
"sourcesContent": ["import type {GroupNode, Node, OnigurumaAst, ParentNode, QuantifierNode, RegexNode} from '../parser/parse.js';\nimport type {FlagProperties} from '../tokenizer/tokenize.js';\nimport {r, throwIfNullish} from '../utils.js';\n\ntype OnigurumaRegex = {\n pattern: string;\n flags: string;\n};\n\n/**\nGenerates an Oniguruma `pattern` and `flags` from an `OnigurumaAst`.\n*/\nfunction generate(ast: OnigurumaAst): OnigurumaRegex {\n const parentStack: Array<ParentNode> = [];\n let lastNode: Node = ast;\n const state: State = {\n inCharClass: false,\n lastNode,\n parent: ast,\n };\n const gen: Gen = node => {\n state.lastNode = lastNode;\n lastNode = node; // For the next iteration\n if (getFirstChild(state.lastNode) === node) {\n state.parent = state.lastNode as ParentNode;\n parentStack.push(state.parent);\n }\n const fn = throwIfNullish(generator[node.type], `Unexpected node type \"${node.type}\"`);\n // @ts-expect-error\n const result = fn(node, state, gen);\n if (getLastChild(state.parent) === node) {\n parentStack.pop();\n state.parent = parentStack.at(-1) ?? ast;\n };\n return result;\n };\n return {\n pattern: ast.body.map(gen).join('|'),\n // Could reset `lastNode` at this point via `lastNode = ast`, but it isn't needed by flags\n flags: gen(ast.flags),\n };\n}\n\ntype State = {\n inCharClass: boolean;\n lastNode: Node;\n parent: ParentNode;\n};\n\ntype NonRootNode = Exclude<Node, RegexNode>;\n\ntype Gen = (node: NonRootNode) => string;\n\ntype Generator = {\n [N in NonRootNode as N['type']]:\n (node: N, state: State, gen: Gen) => string\n};\n\nconst generator: Generator = {\n AbsenceFunction({body, kind}, _, gen) {\n if (kind !== 'repeater') {\n throw new Error(`Unexpected absence function kind \"${kind}\"`);\n }\n return `(?~${body.map(gen).join('|')})`;\n },\n\n Alternative({body}, _, gen) {\n return body.map(gen).join('');\n },\n\n Assertion({kind, negate}) {\n if (kind === 'text_segment_boundary') {\n return negate ? r`\\Y` : r`\\y`;\n }\n if (kind === 'word_boundary') {\n return negate ? r`\\B` : r`\\b`;\n }\n return throwIfNullish({\n line_end: '$',\n line_start: '^',\n search_start: r`\\G`,\n string_end: r`\\z`,\n string_end_newline: r`\\Z`,\n string_start: r`\\A`,\n }[kind], `Unexpected assertion kind \"${kind}\"`);\n },\n\n Backreference({ref}) {\n if (typeof ref === 'number') {\n // TODO: Won't be safe to indiscriminately unenclose when forward backrefs are supported\n return '\\\\' + ref;\n }\n // Onig doesn't allow chars `>` or `'` in backref names, so this is safe\n return `\\\\k<${ref}>`;\n },\n\n CapturingGroup({body, name}, _, gen) {\n const enclosedName = name ? `?${name.includes('>') ? `'${name}'` : `<${name}>`}` : '';\n return `(${enclosedName}${body.map(gen).join('|')})`;\n },\n\n Character(node, {inCharClass, lastNode, parent}) {\n const {value} = node;\n if (CharCodeEscapeMap.has(value)) {\n return CharCodeEscapeMap.get(value)!;\n }\n const escDigit = lastNode.type === 'Backreference';\n if (\n // Control chars, etc.; condition modeled on the Chrome developer console's display for strings\n value < 32 || (value > 126 && value < 160) ||\n // Unicode planes 4-16; unassigned, special purpose, and private use area\n value > 0x3FFFF ||\n // Avoid corrupting a preceding backref by immediately following it with a literal digit\n (escDigit && isDigitCharCode(value))\n ) {\n // Onig treats unenclosed `\\x80` to `\\xFF` as an encoded byte (a fragment of a code unit), so\n // we can't use them to represent a character. Also, don't convert value `0` to `\\0` since\n // that's corruptible by following literal digits\n return value > 0x7F ?\n `\\\\x{${value.toString(16).toUpperCase()}}` :\n `\\\\x${value.toString(16).toUpperCase().padStart(2, '0')}`;\n }\n const char = String.fromCodePoint(value);\n let escape = false;\n if (inCharClass) {\n const isDirectClassKid = parent.type === 'CharacterClass';\n const isFirst = isDirectClassKid && parent.body[0] === node;\n const isLast = isDirectClassKid && parent.body.at(-1) === node;\n // Avoid escaping in some optional special cases when escaping isn't needed due to position\n if (char === '^') {\n escape = isFirst && !parent.negate;\n } else if (char === ']') {\n escape = !isFirst;\n } else if (char === '-') {\n // Could also avoid escaping if it's immediately after a range or nested class, but don't\n // make that the default rendering\n escape = !isFirst && !isLast;\n } else {\n escape = CharClassEscapeChars.has(char);\n }\n } else {\n escape = BaseEscapeChars.has(char);\n }\n return `${escape ? '\\\\' : ''}${char}`;\n },\n\n CharacterClass({body, kind, negate}, state, gen) {\n function genClass() {\n if (\n state.parent.type === 'CharacterClass' &&\n state.parent.kind === 'intersection' &&\n kind === 'union' &&\n !body.length\n ) {\n // Prevent empty intersection like `[&&]` from becoming the invalid `[[]&&[]]`\n return '';\n }\n return `[${negate ? '^' : ''}${\n body.map(gen).join(kind === 'intersection' ? '&&' : '')\n }]`;\n }\n if (!state.inCharClass) {\n // For the outermost char class, set state\n state.inCharClass = true;\n const result = genClass();\n state.inCharClass = false;\n return result;\n }\n return genClass();\n },\n\n CharacterClassRange({min, max}, _, gen) {\n return `${gen(min)}-${gen(max)}`;\n },\n\n CharacterSet({kind, negate, value}, {inCharClass}) {\n switch (kind) {\n case 'any':\n return r`\\O`;\n case 'digit':\n return negate ? r`\\D` : r`\\d`;\n case 'dot':\n return '.';\n case 'hex':\n return negate ? r`\\H` : r`\\h`;\n case 'newline':\n return negate ? r`\\N` : r`\\R`;\n case 'posix':\n return inCharClass ?\n `[:${negate ? '^' : ''}${value}:]` :\n `${negate ? r`\\P` : r`\\p`}{${value}}`;\n case 'property':\n return `${negate ? r`\\P` : r`\\p`}{${value}}`;\n case 'space':\n return negate ? r`\\S` : r`\\s`;\n case 'text_segment':\n return r`\\X`;\n case 'word':\n return negate ? r`\\W` : r`\\w`;\n default:\n throw new Error(`Unexpected character set kind \"${kind}\"`);\n }\n },\n\n Directive({kind, flags}) {\n if (kind === 'flags') {\n const {enable = {}, disable = {}} = flags;\n const enableStr = getFlagsStr(enable);\n const disableStr = getFlagsStr(disable);\n return (enableStr || disableStr) ? `(?${enableStr}${disableStr ? `-${disableStr}` : ''})` : '';\n }\n if (kind === 'keep') {\n return r`\\K`;\n }\n throw new Error(`Unexpected directive kind \"${kind}\"`);\n },\n\n Flags(node) {\n return getFlagsStr(node);\n },\n\n Group({atomic, body, flags}, _, gen) {\n const contents = body.map(gen).join('|');\n return `(?${getGroupPrefix(atomic, flags)}${contents})`;\n },\n\n LookaroundAssertion({body, kind, negate}, _, gen) {\n const prefix = `${kind === 'lookahead' ? '' : '<'}${negate ? '!' : '='}`;\n return `(?${prefix}${body.map(gen).join('|')})`;\n },\n\n NamedCallout({kind, tag, arguments: args}) {\n if (kind === 'custom') {\n // TODO: If supporting custom callout names in the future (with an added `name` property for\n // `NamedCalloutNode`), will need to use `name` instead of `kind` if `kind` is `'custom'`\n throw new Error(`Unexpected named callout kind \"${kind}\"`);\n }\n return `(*${kind.toUpperCase()}${tag ? `[${tag}]` : ''}${args ? `{${args.join(',')}}` : ''})`;\n },\n\n Quantifier(node, {parent}, gen) {\n // Rendering Onig quantifiers is wildly, unnecessarily complex compared to other regex flavors\n // because of the combination of a few features unique to Onig:\n // - You can create quantifier chains (i.e., quantify a quantifier).\n // - An implicit zero min is allowed for interval quantifiers (ex: `{,2}`).\n // - Interval quantifiers can't use `+` to make them possessive (it creates a quantifier\n // chain), even though quantifiers `?` `*` `+` can.\n // - A reversed range in a quantifier makes it possessive (ex: `{2,1}`).\n // - `{,n}` is always greedy with an implicit zero min, and can't represent a possessive\n // range from n to infinity.\n const {body, kind, max, min} = node;\n // These errors shouldn't happen unless the AST is modified in an invalid way after parsing\n if (min === Infinity) {\n throw new Error(`Invalid quantifier: infinite min`);\n }\n if (min > max) {\n throw new Error(`Invalid quantifier: min \"${min}\" > max \"${max}\"`);\n }\n const kidIsGreedyQuantifier = (\n body.type === 'Quantifier' &&\n body.kind === 'greedy'\n );\n const parentIsPossessivePlus = (\n parent.type === 'Quantifier' &&\n parent.kind === 'possessive' &&\n parent.min === 1 &&\n parent.max === Infinity\n );\n // Can't render as a symbol, because the following (parent) quantifier, which is `++`, would\n // then alter this node's meaning to make it possessive, and the parent quantifier can't change\n // to avoid this because there's no interval representation possible for `++`. There's also no\n // other way to render `*+`, but a following `*` wouldn't alter the meaning of this node. `?+`\n // is also safe since it can use the alternative `{1,0}` representation (which is possessive)\n const forcedInterval = kind === 'greedy' && parentIsPossessivePlus;\n let base;\n if (isSymbolQuantifierCandidate(node) && !forcedInterval) {\n if (\n !min && max === 1 &&\n // Can't chain a base of `?` to any greedy quantifier since that would make it lazy\n !kidIsGreedyQuantifier\n ) {\n base = '?';\n } else if (!min && max === Infinity) {\n base = '*';\n } else if (\n min === 1 && max === Infinity &&\n ( // Can't chain a base of `+` to greedy `?`/`*`/`+` since that would make them possessive\n !(kidIsGreedyQuantifier && isSymbolQuantifierCandidate(body)) ||\n // ...but, we're forced to use `+` (and change the kid's rendering) if this is possessive\n // `++` since you can't use a possessive reversed range with `Infinity`\n kind === 'possessive'\n )\n ) {\n base = '+';\n }\n }\n const isIntervalQuantifier = !base;\n if (isIntervalQuantifier) {\n if (kind === 'possessive') {\n if (min === max) {\n // Can't add a `+` suffix to a fixed `{n}` interval quantifier\n throw new Error(`Invalid possessive quantifier: min and max are equal \"${min}\"`);\n }\n if (max === Infinity) {\n // Onig reversed ranges are possessive but `{,n}` is the same as greedy `{0,n}`, so\n // there's no way to represent this without adding additional nodes that aren't in the\n // AST. The exceptions are when `min` is 0 or 1 (`?+`, `*+`, `++`), but we've already\n // ruled out rendering as a symbol at this point\n throw new Error(`Invalid possessive quantifier: min \"${min}\" with infinite max\"`);\n }\n // Reversed range\n base = `{${max},${min}}`;\n } else if (min === max) {\n base = `{${min}}`;\n } else {\n base = `{${min},${max === Infinity ? '' : max}}`;\n }\n }\n const suffix = {\n greedy: '',\n lazy: '?',\n // Interval quantifiers are marked possessive by reversing their min/max; a `+` suffix would\n // create a quantifier chain\n possessive: isIntervalQuantifier ? '' : '+',\n }[kind];\n return `${gen(body)}${base}${suffix}`;\n },\n\n Subroutine({ref}) {\n if (typeof ref === 'string' && ref.includes('>')) {\n return r`\\g'${ref}'`;\n }\n return r`\\g<${ref}>`;\n },\n};\n\n// ---------------\n// --- Helpers ---\n// ---------------\n\nconst BaseEscapeChars = new Set([\n '$', '(', ')', '*', '+', '.', '?', '[', '\\\\', '^', '{', '|',\n]);\n\nconst CharClassEscapeChars = new Set([\n '&', '-', '[', '\\\\', ']', '^',\n]);\n\nconst CharCodeEscapeMap = new Map([\n [ 7, r`\\a`], // bell\n [ 9, r`\\t`], // horizontal tab\n [10, r`\\n`], // line feed\n [11, r`\\v`], // vertical tab\n [12, r`\\f`], // form feed\n [13, r`\\r`], // carriage return\n [27, r`\\e`], // escape\n [0x2028, r`\\u2028`], // line separator\n [0x2029, r`\\u2029`], // paragraph separator\n [0xFEFF, r`\\uFEFF`], // ZWNBSP/BOM\n]);\n\nfunction getFirstChild(node: Node) {\n if ('body' in node) {\n return Array.isArray(node.body) ? (node.body[0] ?? null) : node.body;\n }\n // Check for `type` to determine if it's a child node; quantifiers have a numeric `min`\n if ('min' in node && node.min.type) {\n return node.min;\n }\n return null;\n}\n\nfunction getLastChild(node: Node) {\n if ('body' in node) {\n return Array.isArray(node.body) ? (node.body.at(-1) ?? null) : node.body;\n }\n // Check for `type` to determine if it's a child node; quantifiers have a numeric `max`\n if ('max' in node && node.max.type) {\n return node.max;\n }\n return null;\n}\n\nfunction getFlagsStr({\n ignoreCase,\n dotAll,\n extended,\n digitIsAscii,\n posixIsAscii,\n spaceIsAscii,\n wordIsAscii,\n textSegmentMode,\n}: Partial<FlagProperties>): string {\n return `${\n ignoreCase ? 'i' : ''\n }${\n dotAll ? 'm' : ''\n }${\n extended ? 'x' : ''\n }${\n digitIsAscii ? 'D' : ''\n }${\n posixIsAscii ? 'P' : ''\n }${\n spaceIsAscii ? 'S' : ''\n }${\n wordIsAscii ? 'W' : ''\n }${\n textSegmentMode ? throwIfNullish({\n grapheme: 'y{g}',\n word: 'y{w}',\n }[textSegmentMode], `Unexpected text segment mode \"${textSegmentMode}\"`) : ''\n }`;\n}\n\nfunction getGroupPrefix(atomic: GroupNode['atomic'], flags?: GroupNode['flags']): string {\n if (atomic) {\n return '>';\n }\n let mods = '';\n if (flags) {\n const {enable = {}, disable = {}} = flags;\n const enableStr = getFlagsStr(enable);\n const disableStr = getFlagsStr(disable);\n mods = `${enableStr}${disableStr ? `-${disableStr}` : ''}`;\n }\n return `${mods}:`;\n}\n\nfunction isDigitCharCode(value: number): boolean {\n return value > 47 && value < 58;\n}\n\nfunction isSymbolQuantifierCandidate({min, max}: QuantifierNode): boolean {\n return (\n (!min && max === 1) || // `?`\n (!min && max === Infinity) || // `*`\n (min === 1 && max === Infinity) // `+`\n );\n}\n\nexport {\n type OnigurumaRegex,\n generate,\n};\n"],
|
|
5
5
|
"mappings": "aAEA,OAAQ,KAAAA,EAAG,kBAAAC,MAAqB,cAUhC,SAASC,EAASC,EAAmC,CACnD,MAAMC,EAAiC,CAAC,EACxC,IAAIC,EAAiBF,EACrB,MAAMG,EAAe,CACnB,YAAa,GACb,SAAAD,EACA,OAAQF,CACV,EACMI,EAAWC,GAAQ,CACvBF,EAAM,SAAWD,EACjBA,EAAWG,EACPC,EAAcH,EAAM,QAAQ,IAAME,IACpCF,EAAM,OAASA,EAAM,SACrBF,EAAY,KAAKE,EAAM,MAAM,GAI/B,MAAMI,EAFKT,EAAeU,EAAUH,EAAK,IAAI,EAAG,yBAAyBA,EAAK,IAAI,GAAG,EAEnEA,EAAMF,EAAOC,CAAG,EAClC,OAAIK,EAAaN,EAAM,MAAM,IAAME,IACjCJ,EAAY,IAAI,EAChBE,EAAM,OAASF,EAAY,GAAG,EAAE,GAAKD,GAEhCO,CACT,EACA,MAAO,CACL,QAASP,EAAI,KAAK,IAAII,CAAG,EAAE,KAAK,GAAG,EAEnC,MAAOA,EAAIJ,EAAI,KAAK,CACtB,CACF,CAiBA,MAAMQ,EAAuB,CAC3B,gBAAgB,CAAC,KAAAE,EAAM,KAAAC,CAAI,EAAGC,EAAGR,EAAK,CACpC,GAAIO,IAAS,WACX,MAAM,IAAI,MAAM,qCAAqCA,CAAI,GAAG,EAE9D,MAAO,MAAMD,EAAK,IAAIN,CAAG,EAAE,KAAK,GAAG,CAAC,GACtC,EAEA,YAAY,CAAC,KAAAM,CAAI,E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,CACnB,WAAAc,EACA,OAAAC,EACA,SAAAC,EACA,aAAAC,EACA,aAAAC,EACA,aAAAC,EACA,YAAAC,EACA,gBAAAC,CACF,EAAoC,CAClC,MAAO,GACLP,EAAa,IAAM,EACrB,GACEC,EAAS,IAAM,EACjB,GACEC,EAAW,IAAM,EACnB,GACEC,EAAe,IAAM,EACvB,GACEC,EAAe,IAAM,EACvB,GACEC,EAAe,IAAM,EACvB,GACEC,EAAc,IAAM,EACtB,GACEC,EAAkB3D,EAAe,CAC/B,SAAU,OACV,KAAM,MACR,EAAE2D,CAAe,EAAG,iCAAiCA,CAAe,GAAG,EAAI,EAC7E,EACF,CAEA,SAASjB,EAAeF,EAA6BN,EAAoC,CACvF,GAAIM,EACF,MAAO,IAET,IAAIoB,EAAO,GACX,GAAI1B,EAAO,CACT,KAAM,CAAC,OAAAC,EAAS,CAAC,EAAG,QAAAC,EAAU,CAAC,CAAC,EAAIF,EAC9BG,EAAYC,EAAYH,CAAM,EAC9BI,EAAaD,EAAYF,CAAO,EACtCwB,EAAO,GAAGvB,CAAS,GAAGE,EAAa,IAAIA,CAAU,GAAK,EAAE,EAC1D,CACA,MAAO,GAAGqB,CAAI,GAChB,CAEA,SAASrC,EAAgBH,EAAwB,CAC/C,OAAOA,EAAQ,IAAMA,EAAQ,EAC/B,CAEA,SAAS6B,EAA4B,CAAC,IAAAjB,EAAK,IAAAC,CAAG,EAA4B,CACxE,MACG,CAACD,GAAOC,IAAQ,GAChB,CAACD,GAAOC,IAAQ,KAChBD,IAAQ,GAAKC,IAAQ,GAE1B,CAEA,OAEEhC,KAAA",
|
|
6
6
|
"names": ["r", "throwIfNullish", "generate", "ast", "parentStack", "lastNode", "state", "gen", "node", "getFirstChild", "result", "generator", "getLastChild", "body", "kind", "_", "negate", "ref", "name", "inCharClass", "parent", "value", "CharCodeEscapeMap", "escDigit", "isDigitCharCode", "char", "escape", "isDirectClassKid", "isFirst", "isLast", "CharClassEscapeChars", "BaseEscapeChars", "genClass", "min", "max", "flags", "enable", "disable", "enableStr", "getFlagsStr", "disableStr", "atomic", "contents", "getGroupPrefix", "tag", "args", "kidIsGreedyQuantifier", "parentIsPossessivePlus", "forcedInterval", "base", "isSymbolQuantifierCandidate", "isIntervalQuantifier", "suffix", "ignoreCase", "dotAll", "extended", "digitIsAscii", "posixIsAscii", "spaceIsAscii", "wordIsAscii", "textSegmentMode", "mods"]
|
|
7
7
|
}
|