@openclaw/feishu 2026.9.5 → 2026.9.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.setup/{channel-C1KrXXJa.mjs → channel-DsndN1sp.mjs} +3 -3
- package/dist/.setup/{channel.runtime-Bizuv7WZ.mjs → channel.runtime-tihKUwVI.mjs} +3 -3
- package/dist/.setup/{chat-dWJYS63b.mjs → chat-BlvUjdN9.mjs} +1 -1
- package/dist/.setup/{monitor-C69OLzgO.mjs → monitor-OTT7VckU.mjs} +4 -3
- package/dist/.setup/{monitor.account-zwHb3HKM.mjs → monitor.account-D5j6WomE.mjs} +233 -79
- package/dist/.setup/{reply-delivery-result-DFjxGLgX.mjs → reply-delivery-result-CRIHpSze.mjs} +9 -4
- package/dist/.setup/{setup-api-CTRwX09n.mjs → setup-api-VAUkwtTi.mjs} +1 -1
- package/dist/api.js +4 -4
- package/dist/channel-plugin-api.js +1 -1
- package/dist/setup-api.js +1 -1
- package/dist/setup-entry.js +1 -1
- package/node_modules/micromark-extension-gfm-table/dev/lib/edit-map.d.ts +13 -0
- package/node_modules/micromark-extension-gfm-table/dev/lib/edit-map.d.ts.map +1 -1
- package/node_modules/micromark-extension-gfm-table/dev/lib/edit-map.js +35 -16
- package/node_modules/micromark-extension-gfm-table/dev/lib/html.js +5 -0
- package/node_modules/micromark-extension-gfm-table/dev/lib/syntax.js +26 -3
- package/node_modules/micromark-extension-gfm-table/lib/edit-map.d.ts +13 -0
- package/node_modules/micromark-extension-gfm-table/lib/edit-map.d.ts.map +1 -1
- package/node_modules/micromark-extension-gfm-table/lib/edit-map.js +37 -17
- package/node_modules/micromark-extension-gfm-table/lib/html.js +5 -0
- package/node_modules/micromark-extension-gfm-table/lib/syntax.js +29 -2
- package/node_modules/micromark-extension-gfm-table/package.json +6 -48
- package/node_modules/micromark-extension-gfm-table/readme.md +40 -40
- package/node_modules/zod/README.md +2 -2
- package/node_modules/zod/compile.cjs +19 -0
- package/node_modules/zod/index.cjs +19 -0
- package/node_modules/zod/locales/index.cjs +19 -0
- package/node_modules/zod/mini/index.cjs +19 -0
- package/node_modules/zod/package.json +8 -7
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +1 -1
- package/node_modules/zod/src/v4/classic/external.ts +2 -0
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +248 -25
- package/node_modules/zod/src/v4/classic/schemas.ts +243 -168
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +60 -9
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +6 -0
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +2 -2
- package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +265 -0
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +112 -6
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +9 -0
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +130 -1
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +157 -0
- package/node_modules/zod/src/v4/classic/tests/iban.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +40 -2
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +27 -7
- package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +88 -56
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +39 -0
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +56 -0
- package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +3 -2
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +70 -0
- package/node_modules/zod/src/v4/classic/tests/properties.test.ts +141 -0
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +46 -1
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +19 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +95 -1
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +33 -1
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +234 -38
- package/node_modules/zod/src/v4/classic/tests/validate.test.ts +569 -0
- package/node_modules/zod/src/v4/core/api.ts +44 -28
- package/node_modules/zod/src/v4/core/checks.ts +62 -102
- package/node_modules/zod/src/v4/core/compile.ts +218 -93
- package/node_modules/zod/src/v4/core/core.ts +1 -3
- package/node_modules/zod/src/v4/core/doc.ts +6 -2
- package/node_modules/zod/src/v4/core/errors.ts +3 -6
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +2 -2
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +185 -81
- package/node_modules/zod/src/v4/core/memoizer.ts +75 -28
- package/node_modules/zod/src/v4/core/parse.ts +37 -16
- package/node_modules/zod/src/v4/core/regexes.ts +14 -4
- package/node_modules/zod/src/v4/core/schemas.ts +296 -132
- package/node_modules/zod/src/v4/core/tests/cached.test.ts +54 -0
- package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +35 -0
- package/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +445 -0
- package/node_modules/zod/src/v4/core/tests/compile.test.ts +399 -2
- package/node_modules/zod/src/v4/core/tests/email-regex.test.ts +140 -0
- package/node_modules/zod/src/v4/core/tests/locales/tg.test.ts +85 -0
- package/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +118 -16
- package/node_modules/zod/src/v4/core/to-json-schema.ts +9 -7
- package/node_modules/zod/src/v4/core/util.ts +218 -147
- package/node_modules/zod/src/v4/core/versions.ts +2 -2
- package/node_modules/zod/src/v4/locales/ar.ts +2 -0
- package/node_modules/zod/src/v4/locales/az.ts +2 -0
- package/node_modules/zod/src/v4/locales/be.ts +2 -0
- package/node_modules/zod/src/v4/locales/bg.ts +2 -0
- package/node_modules/zod/src/v4/locales/bn.ts +2 -0
- package/node_modules/zod/src/v4/locales/ca.ts +2 -0
- package/node_modules/zod/src/v4/locales/ckb.ts +2 -0
- package/node_modules/zod/src/v4/locales/cs.ts +2 -0
- package/node_modules/zod/src/v4/locales/da.ts +2 -0
- package/node_modules/zod/src/v4/locales/de.ts +2 -0
- package/node_modules/zod/src/v4/locales/el.ts +2 -0
- package/node_modules/zod/src/v4/locales/en.ts +2 -0
- package/node_modules/zod/src/v4/locales/eo.ts +2 -0
- package/node_modules/zod/src/v4/locales/es.ts +2 -0
- package/node_modules/zod/src/v4/locales/fa.ts +2 -0
- package/node_modules/zod/src/v4/locales/fi.ts +2 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +2 -0
- package/node_modules/zod/src/v4/locales/fr.ts +2 -0
- package/node_modules/zod/src/v4/locales/gu.ts +2 -0
- package/node_modules/zod/src/v4/locales/he.ts +2 -0
- package/node_modules/zod/src/v4/locales/hi.ts +2 -0
- package/node_modules/zod/src/v4/locales/hr.ts +2 -0
- package/node_modules/zod/src/v4/locales/hu.ts +2 -0
- package/node_modules/zod/src/v4/locales/hy.ts +2 -0
- package/node_modules/zod/src/v4/locales/id.ts +2 -0
- package/node_modules/zod/src/v4/locales/index.ts +1 -0
- package/node_modules/zod/src/v4/locales/is.ts +2 -0
- package/node_modules/zod/src/v4/locales/it.ts +2 -0
- package/node_modules/zod/src/v4/locales/ja.ts +2 -0
- package/node_modules/zod/src/v4/locales/ka.ts +2 -0
- package/node_modules/zod/src/v4/locales/km.ts +2 -0
- package/node_modules/zod/src/v4/locales/kn.ts +2 -0
- package/node_modules/zod/src/v4/locales/ko.ts +2 -0
- package/node_modules/zod/src/v4/locales/lt.ts +2 -0
- package/node_modules/zod/src/v4/locales/mk.ts +2 -0
- package/node_modules/zod/src/v4/locales/ms.ts +2 -0
- package/node_modules/zod/src/v4/locales/ne.ts +2 -0
- package/node_modules/zod/src/v4/locales/nl.ts +2 -0
- package/node_modules/zod/src/v4/locales/nn.ts +2 -0
- package/node_modules/zod/src/v4/locales/no.ts +2 -0
- package/node_modules/zod/src/v4/locales/ota.ts +2 -0
- package/node_modules/zod/src/v4/locales/pl.ts +2 -0
- package/node_modules/zod/src/v4/locales/ps.ts +2 -0
- package/node_modules/zod/src/v4/locales/pt-BR.ts +2 -0
- package/node_modules/zod/src/v4/locales/pt.ts +2 -0
- package/node_modules/zod/src/v4/locales/ro.ts +2 -0
- package/node_modules/zod/src/v4/locales/ru.ts +2 -0
- package/node_modules/zod/src/v4/locales/sk.ts +2 -0
- package/node_modules/zod/src/v4/locales/sl.ts +2 -0
- package/node_modules/zod/src/v4/locales/sv.ts +2 -0
- package/node_modules/zod/src/v4/locales/ta.ts +2 -0
- package/node_modules/zod/src/v4/locales/tg.ts +135 -0
- package/node_modules/zod/src/v4/locales/th.ts +2 -0
- package/node_modules/zod/src/v4/locales/tk.ts +2 -0
- package/node_modules/zod/src/v4/locales/tr.ts +2 -0
- package/node_modules/zod/src/v4/locales/uk.ts +2 -0
- package/node_modules/zod/src/v4/locales/ur.ts +2 -0
- package/node_modules/zod/src/v4/locales/uz.ts +2 -0
- package/node_modules/zod/src/v4/locales/vi.ts +2 -0
- package/node_modules/zod/src/v4/locales/yo.ts +2 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +2 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +2 -0
- package/node_modules/zod/src/v4/mini/external.ts +2 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +32 -7
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +1 -1
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +11 -17
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +86 -0
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +16 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +23 -0
- package/node_modules/zod/v3/ZodError.cjs +19 -0
- package/node_modules/zod/v3/errors.cjs +19 -0
- package/node_modules/zod/v3/external.cjs +19 -0
- package/node_modules/zod/v3/helpers/enumUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/errorUtil.cjs +20 -1
- package/node_modules/zod/v3/helpers/errorUtil.js +1 -1
- package/node_modules/zod/v3/helpers/parseUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/partialUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/typeAliases.cjs +19 -0
- package/node_modules/zod/v3/helpers/util.cjs +19 -0
- package/node_modules/zod/v3/index.cjs +19 -0
- package/node_modules/zod/v3/standard-schema.cjs +19 -0
- package/node_modules/zod/v3/types.cjs +19 -0
- package/node_modules/zod/v4/classic/checks.cjs +19 -0
- package/node_modules/zod/v4/classic/coerce.cjs +19 -0
- package/node_modules/zod/v4/classic/compat.cjs +19 -0
- package/node_modules/zod/v4/classic/deep-partial.cjs +19 -0
- package/node_modules/zod/v4/classic/errors.cjs +19 -0
- package/node_modules/zod/v4/classic/external.cjs +22 -1
- package/node_modules/zod/v4/classic/external.d.cts +1 -1
- package/node_modules/zod/v4/classic/external.d.ts +1 -1
- package/node_modules/zod/v4/classic/external.js +1 -1
- package/node_modules/zod/v4/classic/from-json-schema.cjs +264 -24
- package/node_modules/zod/v4/classic/from-json-schema.js +245 -24
- package/node_modules/zod/v4/classic/in-out.cjs +19 -0
- package/node_modules/zod/v4/classic/index.cjs +19 -0
- package/node_modules/zod/v4/classic/iso.cjs +19 -0
- package/node_modules/zod/v4/classic/parse.cjs +19 -0
- package/node_modules/zod/v4/classic/schemas.cjs +100 -35
- package/node_modules/zod/v4/classic/schemas.d.cts +15 -1
- package/node_modules/zod/v4/classic/schemas.d.ts +15 -1
- package/node_modules/zod/v4/classic/schemas.js +77 -33
- package/node_modules/zod/v4/core/api.cjs +45 -22
- package/node_modules/zod/v4/core/api.d.cts +12 -6
- package/node_modules/zod/v4/core/api.d.ts +12 -6
- package/node_modules/zod/v4/core/api.js +25 -22
- package/node_modules/zod/v4/core/checks.cjs +51 -97
- package/node_modules/zod/v4/core/checks.d.cts +17 -1
- package/node_modules/zod/v4/core/checks.d.ts +17 -1
- package/node_modules/zod/v4/core/checks.js +31 -96
- package/node_modules/zod/v4/core/compile.cjs +173 -78
- package/node_modules/zod/v4/core/compile.d.cts +18 -4
- package/node_modules/zod/v4/core/compile.d.ts +18 -4
- package/node_modules/zod/v4/core/compile.js +154 -79
- package/node_modules/zod/v4/core/core.cjs +20 -1
- package/node_modules/zod/v4/core/core.js +1 -1
- package/node_modules/zod/v4/core/doc.cjs +26 -2
- package/node_modules/zod/v4/core/doc.js +7 -2
- package/node_modules/zod/v4/core/errors.cjs +21 -5
- package/node_modules/zod/v4/core/errors.js +2 -5
- package/node_modules/zod/v4/core/index.cjs +19 -0
- package/node_modules/zod/v4/core/json-schema-generator.cjs +20 -1
- package/node_modules/zod/v4/core/json-schema-generator.js +2 -2
- package/node_modules/zod/v4/core/json-schema-processors.cjs +188 -72
- package/node_modules/zod/v4/core/json-schema-processors.d.cts +16 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.ts +16 -0
- package/node_modules/zod/v4/core/json-schema-processors.js +170 -74
- package/node_modules/zod/v4/core/json-schema.cjs +19 -0
- package/node_modules/zod/v4/core/memoizer.cjs +111 -23
- package/node_modules/zod/v4/core/memoizer.js +69 -23
- package/node_modules/zod/v4/core/parse.cjs +56 -16
- package/node_modules/zod/v4/core/parse.js +37 -16
- package/node_modules/zod/v4/core/regexes.cjs +31 -6
- package/node_modules/zod/v4/core/regexes.d.cts +3 -0
- package/node_modules/zod/v4/core/regexes.d.ts +3 -0
- package/node_modules/zod/v4/core/regexes.js +10 -4
- package/node_modules/zod/v4/core/registries.cjs +19 -0
- package/node_modules/zod/v4/core/schemas.cjs +302 -114
- package/node_modules/zod/v4/core/schemas.d.cts +28 -8
- package/node_modules/zod/v4/core/schemas.d.ts +28 -8
- package/node_modules/zod/v4/core/schemas.js +279 -113
- package/node_modules/zod/v4/core/standard-schema.cjs +19 -0
- package/node_modules/zod/v4/core/to-json-schema.cjs +28 -7
- package/node_modules/zod/v4/core/to-json-schema.d.cts +4 -3
- package/node_modules/zod/v4/core/to-json-schema.d.ts +4 -3
- package/node_modules/zod/v4/core/to-json-schema.js +7 -6
- package/node_modules/zod/v4/core/util.cjs +177 -143
- package/node_modules/zod/v4/core/util.d.cts +25 -4
- package/node_modules/zod/v4/core/util.d.ts +25 -4
- package/node_modules/zod/v4/core/util.js +156 -143
- package/node_modules/zod/v4/core/versions.cjs +21 -2
- package/node_modules/zod/v4/core/versions.d.cts +1 -1
- package/node_modules/zod/v4/core/versions.d.ts +1 -1
- package/node_modules/zod/v4/core/versions.js +2 -2
- package/node_modules/zod/v4/core/visit.cjs +19 -0
- package/node_modules/zod/v4/index.cjs +19 -0
- package/node_modules/zod/v4/locales/ar.cjs +2 -0
- package/node_modules/zod/v4/locales/ar.js +2 -0
- package/node_modules/zod/v4/locales/az.cjs +2 -0
- package/node_modules/zod/v4/locales/az.js +2 -0
- package/node_modules/zod/v4/locales/be.cjs +2 -0
- package/node_modules/zod/v4/locales/be.js +2 -0
- package/node_modules/zod/v4/locales/bg.cjs +2 -0
- package/node_modules/zod/v4/locales/bg.js +2 -0
- package/node_modules/zod/v4/locales/bn.cjs +2 -0
- package/node_modules/zod/v4/locales/bn.js +2 -0
- package/node_modules/zod/v4/locales/ca.cjs +2 -0
- package/node_modules/zod/v4/locales/ca.js +2 -0
- package/node_modules/zod/v4/locales/ckb.cjs +2 -0
- package/node_modules/zod/v4/locales/ckb.js +2 -0
- package/node_modules/zod/v4/locales/cs.cjs +2 -0
- package/node_modules/zod/v4/locales/cs.js +2 -0
- package/node_modules/zod/v4/locales/da.cjs +2 -0
- package/node_modules/zod/v4/locales/da.js +2 -0
- package/node_modules/zod/v4/locales/de.cjs +2 -0
- package/node_modules/zod/v4/locales/de.js +2 -0
- package/node_modules/zod/v4/locales/el.cjs +2 -0
- package/node_modules/zod/v4/locales/el.js +2 -0
- package/node_modules/zod/v4/locales/en.cjs +2 -0
- package/node_modules/zod/v4/locales/en.js +2 -0
- package/node_modules/zod/v4/locales/eo.cjs +2 -0
- package/node_modules/zod/v4/locales/eo.js +2 -0
- package/node_modules/zod/v4/locales/es.cjs +2 -0
- package/node_modules/zod/v4/locales/es.js +2 -0
- package/node_modules/zod/v4/locales/fa.cjs +2 -0
- package/node_modules/zod/v4/locales/fa.js +2 -0
- package/node_modules/zod/v4/locales/fi.cjs +2 -0
- package/node_modules/zod/v4/locales/fi.js +2 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +2 -0
- package/node_modules/zod/v4/locales/fr-CA.js +2 -0
- package/node_modules/zod/v4/locales/fr.cjs +2 -0
- package/node_modules/zod/v4/locales/fr.js +2 -0
- package/node_modules/zod/v4/locales/gu.cjs +2 -0
- package/node_modules/zod/v4/locales/gu.js +2 -0
- package/node_modules/zod/v4/locales/he.cjs +2 -0
- package/node_modules/zod/v4/locales/he.js +2 -0
- package/node_modules/zod/v4/locales/hi.cjs +2 -0
- package/node_modules/zod/v4/locales/hi.js +2 -0
- package/node_modules/zod/v4/locales/hr.cjs +2 -0
- package/node_modules/zod/v4/locales/hr.js +2 -0
- package/node_modules/zod/v4/locales/hu.cjs +2 -0
- package/node_modules/zod/v4/locales/hu.js +2 -0
- package/node_modules/zod/v4/locales/hy.cjs +2 -0
- package/node_modules/zod/v4/locales/hy.js +2 -0
- package/node_modules/zod/v4/locales/id.cjs +2 -0
- package/node_modules/zod/v4/locales/id.js +2 -0
- package/node_modules/zod/v4/locales/index.cjs +22 -1
- package/node_modules/zod/v4/locales/index.d.cts +1 -0
- package/node_modules/zod/v4/locales/index.d.ts +1 -0
- package/node_modules/zod/v4/locales/index.js +1 -0
- package/node_modules/zod/v4/locales/is.cjs +2 -0
- package/node_modules/zod/v4/locales/is.js +2 -0
- package/node_modules/zod/v4/locales/it.cjs +2 -0
- package/node_modules/zod/v4/locales/it.js +2 -0
- package/node_modules/zod/v4/locales/ja.cjs +2 -0
- package/node_modules/zod/v4/locales/ja.js +2 -0
- package/node_modules/zod/v4/locales/ka.cjs +2 -0
- package/node_modules/zod/v4/locales/ka.js +2 -0
- package/node_modules/zod/v4/locales/km.cjs +2 -0
- package/node_modules/zod/v4/locales/km.js +2 -0
- package/node_modules/zod/v4/locales/kn.cjs +2 -0
- package/node_modules/zod/v4/locales/kn.js +2 -0
- package/node_modules/zod/v4/locales/ko.cjs +2 -0
- package/node_modules/zod/v4/locales/ko.js +2 -0
- package/node_modules/zod/v4/locales/lt.cjs +2 -0
- package/node_modules/zod/v4/locales/lt.js +2 -0
- package/node_modules/zod/v4/locales/mk.cjs +2 -0
- package/node_modules/zod/v4/locales/mk.js +2 -0
- package/node_modules/zod/v4/locales/ms.cjs +2 -0
- package/node_modules/zod/v4/locales/ms.js +2 -0
- package/node_modules/zod/v4/locales/ne.cjs +2 -0
- package/node_modules/zod/v4/locales/ne.js +2 -0
- package/node_modules/zod/v4/locales/nl.cjs +2 -0
- package/node_modules/zod/v4/locales/nl.js +2 -0
- package/node_modules/zod/v4/locales/nn.cjs +2 -0
- package/node_modules/zod/v4/locales/nn.js +2 -0
- package/node_modules/zod/v4/locales/no.cjs +2 -0
- package/node_modules/zod/v4/locales/no.js +2 -0
- package/node_modules/zod/v4/locales/ota.cjs +2 -0
- package/node_modules/zod/v4/locales/ota.js +2 -0
- package/node_modules/zod/v4/locales/pl.cjs +2 -0
- package/node_modules/zod/v4/locales/pl.js +2 -0
- package/node_modules/zod/v4/locales/ps.cjs +2 -0
- package/node_modules/zod/v4/locales/ps.js +2 -0
- package/node_modules/zod/v4/locales/pt-BR.cjs +2 -0
- package/node_modules/zod/v4/locales/pt-BR.js +2 -0
- package/node_modules/zod/v4/locales/pt.cjs +2 -0
- package/node_modules/zod/v4/locales/pt.js +2 -0
- package/node_modules/zod/v4/locales/ro.cjs +2 -0
- package/node_modules/zod/v4/locales/ro.js +2 -0
- package/node_modules/zod/v4/locales/ru.cjs +2 -0
- package/node_modules/zod/v4/locales/ru.js +2 -0
- package/node_modules/zod/v4/locales/sk.cjs +2 -0
- package/node_modules/zod/v4/locales/sk.js +2 -0
- package/node_modules/zod/v4/locales/sl.cjs +2 -0
- package/node_modules/zod/v4/locales/sl.js +2 -0
- package/node_modules/zod/v4/locales/sv.cjs +2 -0
- package/node_modules/zod/v4/locales/sv.js +2 -0
- package/node_modules/zod/v4/locales/ta.cjs +2 -0
- package/node_modules/zod/v4/locales/ta.js +2 -0
- package/node_modules/zod/v4/locales/tg.cjs +144 -0
- package/node_modules/zod/v4/locales/tg.d.cts +5 -0
- package/node_modules/zod/v4/locales/tg.d.ts +4 -0
- package/node_modules/zod/v4/locales/tg.js +117 -0
- package/node_modules/zod/v4/locales/th.cjs +2 -0
- package/node_modules/zod/v4/locales/th.js +2 -0
- package/node_modules/zod/v4/locales/tk.cjs +2 -0
- package/node_modules/zod/v4/locales/tk.js +2 -0
- package/node_modules/zod/v4/locales/tr.cjs +2 -0
- package/node_modules/zod/v4/locales/tr.js +2 -0
- package/node_modules/zod/v4/locales/uk.cjs +2 -0
- package/node_modules/zod/v4/locales/uk.js +2 -0
- package/node_modules/zod/v4/locales/ur.cjs +2 -0
- package/node_modules/zod/v4/locales/ur.js +2 -0
- package/node_modules/zod/v4/locales/uz.cjs +2 -0
- package/node_modules/zod/v4/locales/uz.js +2 -0
- package/node_modules/zod/v4/locales/vi.cjs +2 -0
- package/node_modules/zod/v4/locales/vi.js +2 -0
- package/node_modules/zod/v4/locales/yo.cjs +2 -0
- package/node_modules/zod/v4/locales/yo.js +2 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +2 -0
- package/node_modules/zod/v4/locales/zh-CN.js +2 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +2 -0
- package/node_modules/zod/v4/locales/zh-TW.js +2 -0
- package/node_modules/zod/v4/mini/checks.cjs +19 -0
- package/node_modules/zod/v4/mini/coerce.cjs +19 -0
- package/node_modules/zod/v4/mini/deep-partial.cjs +19 -0
- package/node_modules/zod/v4/mini/external.cjs +22 -1
- package/node_modules/zod/v4/mini/external.d.cts +1 -1
- package/node_modules/zod/v4/mini/external.d.ts +1 -1
- package/node_modules/zod/v4/mini/external.js +1 -1
- package/node_modules/zod/v4/mini/in-out.cjs +19 -0
- package/node_modules/zod/v4/mini/index.cjs +19 -0
- package/node_modules/zod/v4/mini/iso.cjs +19 -0
- package/node_modules/zod/v4/mini/parse.cjs +19 -0
- package/node_modules/zod/v4/mini/schemas.cjs +44 -8
- package/node_modules/zod/v4/mini/schemas.d.cts +6 -1
- package/node_modules/zod/v4/mini/schemas.d.ts +6 -1
- package/node_modules/zod/v4/mini/schemas.js +21 -6
- package/node_modules/zod/v4-mini/index.cjs +19 -0
- package/package.json +6 -6
package/dist/.setup/{reply-delivery-result-DFjxGLgX.mjs → reply-delivery-result-CRIHpSze.mjs}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as resolveDefaultFeishuAccountId, i as listFeishuAccountIds, o as resolveFeishuAccount, r as listEnabledFeishuAccounts, s as resolveFeishuRuntimeAccount } from "./accounts-DmU0xYPx.mjs";
|
|
2
2
|
import { l as normalizeFeishuTarget, s as detectIdType, u as resolveReceiveIdType } from "./conversation-id-H-lUayji.mjs";
|
|
3
3
|
import { o as normalizeFeishuExternalKey } from "./doctor-contract-w6FpMypv.mjs";
|
|
4
|
-
import { c as withFeishuMessageDispatch, o as captureFeishuSendAuthority, r as createFeishuClient, s as runBeforeFeishuMessageDispatch } from "./client-DCwNVFZg.mjs";
|
|
5
4
|
import { t as getFeishuRuntime } from "./runtime-C5JxBWZp.mjs";
|
|
5
|
+
import { c as withFeishuMessageDispatch, o as captureFeishuSendAuthority, r as createFeishuClient, s as runBeforeFeishuMessageDispatch } from "./client-DCwNVFZg.mjs";
|
|
6
6
|
import { normalizeAccountId, normalizeOptionalAccountId, resolveMergedAccountConfig } from "openclaw/plugin-sdk/account-resolution";
|
|
7
7
|
import { compileAllowlist, resolveAllowlistMatchByCandidates } from "openclaw/plugin-sdk/allow-from";
|
|
8
8
|
import { ToolAuthorizationError } from "openclaw/plugin-sdk/channel-actions";
|
|
@@ -13,7 +13,7 @@ import { parseStrictNonNegativeInteger } from "openclaw/plugin-sdk/number-runtim
|
|
|
13
13
|
import { isRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, normalizeStringEntries, readStringValue } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
14
14
|
import { convertMarkdownTables, markdownToIRWithMeta } from "openclaw/plugin-sdk/text-chunking";
|
|
15
15
|
import { resolveDefaultGroupPolicy, resolveOpenProviderRuntimeGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy";
|
|
16
|
-
import {
|
|
16
|
+
import { defineStableChannelIngressIdentity } from "openclaw/plugin-sdk/channel-ingress-runtime";
|
|
17
17
|
import fs from "node:fs";
|
|
18
18
|
import path from "node:path";
|
|
19
19
|
import { fromMarkdown } from "mdast-util-from-markdown";
|
|
@@ -199,7 +199,7 @@ function createFeishuIngressSubject(params) {
|
|
|
199
199
|
};
|
|
200
200
|
}
|
|
201
201
|
function createFeishuIngressResolver(params) {
|
|
202
|
-
return
|
|
202
|
+
return getFeishuRuntime().channel.inbound.ingress.createResolver({
|
|
203
203
|
channelId: "feishu",
|
|
204
204
|
accountId: normalizeAccountId(params.accountId) ?? "default",
|
|
205
205
|
identity: feishuIngressIdentity,
|
|
@@ -3625,6 +3625,11 @@ async function renderFeishuReplyPayload(payload, ctx) {
|
|
|
3625
3625
|
//#endregion
|
|
3626
3626
|
//#region extensions/feishu/src/reply-delivery-result.ts
|
|
3627
3627
|
const noVisibleFeishuReplyDelivery = { visibleReplySent: false };
|
|
3628
|
+
function shouldSendNoVisibleReplyFallback(dispatchResult) {
|
|
3629
|
+
const emptyEligibleDispatch = dispatchResult.noVisibleReplyFallbackEligible === true && dispatchResult.settledReceipt?.anyVisibleDelivered !== true;
|
|
3630
|
+
const finalFailedBeforeSend = (dispatchResult.settledReceipt?.counts.final.failedBeforeSend ?? 0) > 0;
|
|
3631
|
+
return dispatchResult.sendPolicyDenied !== true && dispatchResult.sourceReplyDeliveryMode !== "message_tool_only" && (emptyEligibleDispatch || finalFailedBeforeSend);
|
|
3632
|
+
}
|
|
3628
3633
|
function hasProviderIdentity(result) {
|
|
3629
3634
|
return Boolean(result && (result.messageId?.trim() || result.receipt?.primaryPlatformMessageId?.trim() || result.receipt?.platformMessageIds.length));
|
|
3630
3635
|
}
|
|
@@ -3660,4 +3665,4 @@ function createFeishuPartialReplyDeliveryError(cause, result) {
|
|
|
3660
3665
|
});
|
|
3661
3666
|
}
|
|
3662
3667
|
//#endregion
|
|
3663
|
-
export {
|
|
3668
|
+
export { cleanupAmbientCommentTypingReaction as $, sendMessageFeishu as A, normalizeFeishuChatType as At, parsePostContent as B, sendStickerFeishu as C, normalizeFeishuAllowEntry as Ct, getMessageFeishu as D, resolveFeishuGroupSenderActivationIngressAccess as Dt, editMessageFeishu as E, resolveFeishuGroupConversationIngressAccess as Et, isFeishuBroadcastMention as F, decodeFeishuCardAction as Ft, deliverCommentThreadText as G, buildFeishuMediaFallbackText as H, isMentionForwardRequest as I, toolExecutionErrorResult as J, registerFeishuDriveTools as K, isFeishuGroupChatType as L, toFeishuMessageSendResult as M, FEISHU_CARD_INTERACTION_VERSION as Mt, formatFeishuMediaContent as N, buildFeishuCardActionTextFallback as Nt, listFeishuThreadMessages as O, resolveFeishuGroupToolPolicy as Ot, extractMentionTargets as P, createFeishuCardInteractionEnvelope as Pt, resolveFeishuToolAccount as Q, normalizeFeishuEventChatType as R, sendMediaFeishu as S, hasExplicitFeishuGroupConfig as St, chunkFeishuCardMarkdown as T, resolveFeishuGroupConfig as Tt, resolveFeishuIdentityEmoji as U, assertFeishuApiSuccess as V, resolveFeishuIdentityHeaderTitle as W, createFeishuToolClient as X, unknownToolActionResult as Y, resolveAnyEnabledFeishuToolsConfig as Z, renderFeishuPresentationPayload as _, canEnumerateAllFeishuGroups as _t, shouldSendNoVisibleReplyFallback as a, requestFeishuApi as at, withinCardTableLimit as b, isFeishuGroupReadEnabled as bt, buildFeishuPayloadCard as c, parseFeishuCommentTarget as ct, consumeFeishuPresentationFallbackMarker as d, chunkFeishuMarkdown as dt, createCommentTypingReactionLifecycle as et, feishuCardWithinTableLimit as f, chunkFeishuPostMarkdown as ft, renderFeishuPresentationFallbackText as g, authorizeFeishuChatMemberRead as gt, readNativeFeishuCard as h, assertFeishuChatReadAllowed as ht, noVisibleFeishuReplyDelivery as i, parseCommentContentElements as it, sendStructuredCardFeishu as j, resolveFeishuChatType as jt, sendCardFeishu as k, resolveFeishuReplyPolicy as kt, buildFeishuPresentationCard as l, readNativeFeishuCardJson as lt, markRenderedFeishuCard as m, parseFeishuMarkdown as mt, createFeishuReplyDeliveryResult as n, extractReplyText as nt, FEISHU_PRESENTATION_CAPABILITIES as o, buildFeishuCommentTarget as ot, isFeishuCardWithinEnvelope as p, materializeFeishuPostMarkdownSoftBreaks as pt, feishuExternalToolResult as q, mergeFeishuReplyDeliveryResults as r, formatFeishuApiError as rt, assertFeishuCardWithinEnvelope as s, normalizeCommentFileType as st, createFeishuPartialReplyDeliveryError as t, encodeQuery as tt, buildFeishuPresentationFallback as u, resolveFeishuCardTemplate as ut, renderFeishuReplyPayload as v, canEnumerateAllFeishuPeers as vt, shouldSuppressFeishuTextForVoiceMedia as w, resolveFeishuDmIngressAccess as wt, saveMessageResourceFeishu as x, resolveFeishuChatReadPreliminaryAuthorization as xt, resolveFeishuRichReply as y, isFeishuGroupReadAllowed as yt, parseInteractiveCardContent as z };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { i as feishuSetupAdapter, n as feishuSetupWizard, t as feishuPlugin } from "./channel-
|
|
1
|
+
import { i as feishuSetupAdapter, n as feishuSetupWizard, t as feishuPlugin } from "./channel-DsndN1sp.mjs";
|
|
2
2
|
import "../setup-api.js";
|
|
3
3
|
export { feishuPlugin, feishuSetupAdapter, feishuSetupWizard };
|
package/dist/api.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { a as parseFeishuTargetId, i as parseFeishuDirectConversationId, n as buildFeishuModelOverrideParentCandidates, r as parseFeishuConversationId, t as buildFeishuConversationId } from "./.setup/conversation-id-H-lUayji.mjs";
|
|
2
|
-
import { a as setFeishuNamedAccountEnabled, i as feishuSetupAdapter, n as feishuSetupWizard, r as runFeishuLogin, t as feishuPlugin } from "./.setup/channel-
|
|
3
|
-
import {
|
|
4
|
-
import { f as resolveConfiguredHttpTimeoutMs, r as createFeishuClient } from "./.setup/client-DCwNVFZg.mjs";
|
|
2
|
+
import { a as setFeishuNamedAccountEnabled, i as feishuSetupAdapter, n as feishuSetupWizard, r as runFeishuLogin, t as feishuPlugin } from "./.setup/channel-DsndN1sp.mjs";
|
|
3
|
+
import { J as toolExecutionErrorResult, K as registerFeishuDriveTools, Q as resolveFeishuToolAccount, X as createFeishuToolClient, Y as unknownToolActionResult, Z as resolveAnyEnabledFeishuToolsConfig, dt as chunkFeishuMarkdown, mt as parseFeishuMarkdown, q as feishuExternalToolResult } from "./.setup/reply-delivery-result-CRIHpSze.mjs";
|
|
5
4
|
import { t as getFeishuRuntime } from "./.setup/runtime-C5JxBWZp.mjs";
|
|
6
|
-
import {
|
|
5
|
+
import { f as resolveConfiguredHttpTimeoutMs, r as createFeishuClient } from "./.setup/client-DCwNVFZg.mjs";
|
|
6
|
+
import { o as registerFeishuChatTools } from "./.setup/chat-BlvUjdN9.mjs";
|
|
7
7
|
import { n as getFeishuThreadBindingManager, t as createFeishuThreadBindingManager } from "./.setup/thread-bindings-BiL1wGqK.mjs";
|
|
8
8
|
import { n as handleFeishuSubagentEnded, t as handleFeishuSubagentDeliveryTarget } from "./.setup/subagent-hooks-BBfF1hZk.mjs";
|
|
9
9
|
import { optionalPositiveIntegerSchema } from "openclaw/plugin-sdk/channel-actions";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as feishuPlugin } from "./.setup/channel-
|
|
1
|
+
import { t as feishuPlugin } from "./.setup/channel-DsndN1sp.mjs";
|
|
2
2
|
export { feishuPlugin };
|
package/dist/setup-api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as feishuSetupAdapter, n as feishuSetupWizard, t as feishuPlugin } from "./.setup/channel-
|
|
1
|
+
import { i as feishuSetupAdapter, n as feishuSetupWizard, t as feishuPlugin } from "./.setup/channel-DsndN1sp.mjs";
|
|
2
2
|
export { feishuPlugin, feishuSetupAdapter, feishuSetupWizard };
|
package/dist/setup-entry.js
CHANGED
|
@@ -4,7 +4,7 @@ import { fileURLToPath } from "node:url";
|
|
|
4
4
|
var setup_entry_default = defineBundledChannelSetupEntry({
|
|
5
5
|
importMetaUrl: import.meta.url,
|
|
6
6
|
plugin: {
|
|
7
|
-
specifier: fileURLToPath(new URL(".setup/setup-api-
|
|
7
|
+
specifier: fileURLToPath(new URL(".setup/setup-api-VAUkwtTi.mjs", import.meta.url).href),
|
|
8
8
|
exportName: "feishuPlugin"
|
|
9
9
|
},
|
|
10
10
|
secrets: {
|
|
@@ -15,20 +15,33 @@ export class EditMap {
|
|
|
15
15
|
* @type {Array<Change>}
|
|
16
16
|
*/
|
|
17
17
|
map: Array<Change>;
|
|
18
|
+
/**
|
|
19
|
+
* Changes by index, so `add` does not scan `map` (quadratic on
|
|
20
|
+
* table-heavy documents).
|
|
21
|
+
*
|
|
22
|
+
* @type {Map<number, Change>}
|
|
23
|
+
*/
|
|
24
|
+
index: Map<number, Change>;
|
|
18
25
|
/**
|
|
19
26
|
* Create an edit: a remove and/or add at a certain place.
|
|
20
27
|
*
|
|
21
28
|
* @param {number} index
|
|
29
|
+
* Index at which to apply the edit.
|
|
22
30
|
* @param {number} remove
|
|
31
|
+
* Count of items to remove at the index.
|
|
23
32
|
* @param {Array<Event>} add
|
|
33
|
+
* Items to add at the index.
|
|
24
34
|
* @returns {undefined}
|
|
35
|
+
* Nothing.
|
|
25
36
|
*/
|
|
26
37
|
add(index: number, remove: number, add: Array<Event>): undefined;
|
|
27
38
|
/**
|
|
28
39
|
* Done, change the events.
|
|
29
40
|
*
|
|
30
41
|
* @param {Array<Event>} events
|
|
42
|
+
* List of events to apply the edits to.
|
|
31
43
|
* @returns {undefined}
|
|
44
|
+
* Nothing.
|
|
32
45
|
*/
|
|
33
46
|
consume(events: Array<Event>): undefined;
|
|
34
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edit-map.d.ts","sourceRoot":"","sources":["edit-map.js"],"names":[],"mappings":"AAAA;;GAEG;AAeH;;;GAGG;AAEH;;GAEG;AACH;IAKI;;;;OAIG;IACH,KAFU,KAAK,CAAC,MAAM,CAAC,CAEV;
|
|
1
|
+
{"version":3,"file":"edit-map.d.ts","sourceRoot":"","sources":["edit-map.js"],"names":[],"mappings":"AAAA;;GAEG;AAeH;;;GAGG;AAEH;;GAEG;AACH;IAKI;;;;OAIG;IACH,KAFU,KAAK,CAAC,MAAM,CAAC,CAEV;IAEb;;;;;OAKG;IACH,OAFU,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAEP;IAGxB;;;;;;;;;;;OAWG;IACH,WATW,MAAM,UAEN,MAAM,OAEN,KAAK,CAAC,KAAK,CAAC,GAEV,SAAS,CAKrB;IAeD;;;;;;;OAOG;IACH,gBALW,KAAK,CAAC,KAAK,CAAC,GAEV,SAAS,CA6DrB;CACF;qBA5HY,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;mBAC9B,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;2BAlBb,sBAAsB"}
|
|
@@ -34,15 +34,27 @@ export class EditMap {
|
|
|
34
34
|
* @type {Array<Change>}
|
|
35
35
|
*/
|
|
36
36
|
this.map = []
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Changes by index, so `add` does not scan `map` (quadratic on
|
|
40
|
+
* table-heavy documents).
|
|
41
|
+
*
|
|
42
|
+
* @type {Map<number, Change>}
|
|
43
|
+
*/
|
|
44
|
+
this.index = new Map()
|
|
37
45
|
}
|
|
38
46
|
|
|
39
47
|
/**
|
|
40
48
|
* Create an edit: a remove and/or add at a certain place.
|
|
41
49
|
*
|
|
42
50
|
* @param {number} index
|
|
51
|
+
* Index at which to apply the edit.
|
|
43
52
|
* @param {number} remove
|
|
53
|
+
* Count of items to remove at the index.
|
|
44
54
|
* @param {Array<Event>} add
|
|
55
|
+
* Items to add at the index.
|
|
45
56
|
* @returns {undefined}
|
|
57
|
+
* Nothing.
|
|
46
58
|
*/
|
|
47
59
|
add(index, remove, add) {
|
|
48
60
|
addImplementation(this, index, remove, add)
|
|
@@ -65,7 +77,9 @@ export class EditMap {
|
|
|
65
77
|
* Done, change the events.
|
|
66
78
|
*
|
|
67
79
|
* @param {Array<Event>} events
|
|
80
|
+
* List of events to apply the edits to.
|
|
68
81
|
* @returns {undefined}
|
|
82
|
+
* Nothing.
|
|
69
83
|
*/
|
|
70
84
|
consume(events) {
|
|
71
85
|
this.map.sort(function (a, b) {
|
|
@@ -124,6 +138,7 @@ export class EditMap {
|
|
|
124
138
|
|
|
125
139
|
// Truncate everything.
|
|
126
140
|
this.map.length = 0
|
|
141
|
+
this.index.clear()
|
|
127
142
|
}
|
|
128
143
|
}
|
|
129
144
|
|
|
@@ -131,38 +146,42 @@ export class EditMap {
|
|
|
131
146
|
* Create an edit.
|
|
132
147
|
*
|
|
133
148
|
* @param {EditMap} editMap
|
|
149
|
+
* Edit map to apply to.
|
|
134
150
|
* @param {number} at
|
|
151
|
+
* Index at which to apply the edit.
|
|
135
152
|
* @param {number} remove
|
|
153
|
+
* Count of items to remove at the index.
|
|
136
154
|
* @param {Array<Event>} add
|
|
155
|
+
* Items to add at the index.
|
|
137
156
|
* @returns {undefined}
|
|
157
|
+
* Nothing.
|
|
138
158
|
*/
|
|
139
159
|
function addImplementation(editMap, at, remove, add) {
|
|
140
|
-
let index = 0
|
|
141
|
-
|
|
142
160
|
/* c8 ignore next 3 -- `resolve` is never called without tables, so without edits. */
|
|
143
161
|
if (remove === 0 && add.length === 0) {
|
|
144
162
|
return
|
|
145
163
|
}
|
|
146
164
|
|
|
147
|
-
|
|
148
|
-
if (editMap.map[index][0] === at) {
|
|
149
|
-
editMap.map[index][1] += remove
|
|
165
|
+
const existing = editMap.index.get(at)
|
|
150
166
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
// add.push(...editMap.map[index][2])
|
|
154
|
-
// editMap.map[index][2] = add
|
|
155
|
-
// } else {
|
|
156
|
-
editMap.map[index][2].push(...add)
|
|
157
|
-
// }
|
|
167
|
+
if (existing) {
|
|
168
|
+
existing[1] += remove
|
|
158
169
|
|
|
159
|
-
|
|
160
|
-
|
|
170
|
+
// To do: before not used by tables, use when moving to micromark.
|
|
171
|
+
// if (before) {
|
|
172
|
+
// add.push(...existing[2])
|
|
173
|
+
// existing[2] = add
|
|
174
|
+
// } else {
|
|
175
|
+
existing[2].push(...add)
|
|
176
|
+
// }
|
|
161
177
|
|
|
162
|
-
|
|
178
|
+
return
|
|
163
179
|
}
|
|
164
180
|
|
|
165
|
-
|
|
181
|
+
/** @type {Change} */
|
|
182
|
+
const change = [at, remove, add]
|
|
183
|
+
editMap.map.push(change)
|
|
184
|
+
editMap.index.set(at, change)
|
|
166
185
|
}
|
|
167
186
|
|
|
168
187
|
// /**
|
|
@@ -138,9 +138,14 @@ export function gfmTableHtml() {
|
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
/**
|
|
141
|
+
* Replace escaped characters in table cells.
|
|
142
|
+
*
|
|
141
143
|
* @param {string} $0
|
|
144
|
+
* Whole.
|
|
142
145
|
* @param {string} $1
|
|
146
|
+
* Escaped character (either a backslash or a pipe).
|
|
143
147
|
* @returns {string}
|
|
148
|
+
* Replacement for the escaped character.
|
|
144
149
|
*/
|
|
145
150
|
function replace($0, $1) {
|
|
146
151
|
// Pipes work, backslashes don’t (but can’t escape pipes).
|
|
@@ -37,6 +37,8 @@ export function gfmTable() {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
|
+
* Tokenizer for GFM tables.
|
|
41
|
+
*
|
|
40
42
|
* @this {TokenizeContext}
|
|
41
43
|
* @type {Tokenizer}
|
|
42
44
|
*/
|
|
@@ -69,14 +71,16 @@ function tokenizeTable(effects, ok, nok) {
|
|
|
69
71
|
let index = self.events.length - 1
|
|
70
72
|
|
|
71
73
|
while (index > -1) {
|
|
72
|
-
const type = self.events[index][1]
|
|
74
|
+
const {type} = self.events[index][1]
|
|
73
75
|
if (
|
|
74
76
|
type === types.lineEnding ||
|
|
75
77
|
// Note: markdown-rs uses `whitespace` instead of `linePrefix`
|
|
76
78
|
type === types.linePrefix
|
|
77
|
-
)
|
|
79
|
+
) {
|
|
78
80
|
index--
|
|
79
|
-
else
|
|
81
|
+
} else {
|
|
82
|
+
break
|
|
83
|
+
}
|
|
80
84
|
}
|
|
81
85
|
|
|
82
86
|
const tail = index > -1 ? self.events[index][1].type : null
|
|
@@ -797,12 +801,19 @@ function resolveTable(events, context) {
|
|
|
797
801
|
* Generate a cell.
|
|
798
802
|
*
|
|
799
803
|
* @param {EditMap} map
|
|
804
|
+
* Edit map to apply to.
|
|
800
805
|
* @param {Readonly<TokenizeContext>} context
|
|
806
|
+
* Tokenize context.
|
|
801
807
|
* @param {Readonly<Range>} range
|
|
808
|
+
* Range of the cell within events.
|
|
802
809
|
* @param {RowKind} rowKind
|
|
810
|
+
* Type of row.
|
|
803
811
|
* @param {number | undefined} rowEnd
|
|
812
|
+
* Index of the end of the row, if known.
|
|
804
813
|
* @param {Token | undefined} previousCell
|
|
814
|
+
* Previous cell token, if any.
|
|
805
815
|
* @returns {Token | undefined}
|
|
816
|
+
* Current cell token after flushing, if any.
|
|
806
817
|
*/
|
|
807
818
|
// eslint-disable-next-line max-params
|
|
808
819
|
function flushCell(map, context, range, rowKind, rowEnd, previousCell) {
|
|
@@ -907,10 +918,17 @@ function flushCell(map, context, range, rowKind, rowEnd, previousCell) {
|
|
|
907
918
|
* Generate table end (and table body end).
|
|
908
919
|
*
|
|
909
920
|
* @param {Readonly<EditMap>} map
|
|
921
|
+
* Edit map to apply to.
|
|
910
922
|
* @param {Readonly<TokenizeContext>} context
|
|
923
|
+
* Tokenize context.
|
|
911
924
|
* @param {number} index
|
|
925
|
+
* Index within the events where the table end should be inserted.
|
|
912
926
|
* @param {Token} table
|
|
927
|
+
* Table token.
|
|
913
928
|
* @param {Token | undefined} tableBody
|
|
929
|
+
* Table body token, if any.
|
|
930
|
+
* @returns {undefined}
|
|
931
|
+
* Nothing.
|
|
914
932
|
*/
|
|
915
933
|
// eslint-disable-next-line max-params
|
|
916
934
|
function flushTableEnd(map, context, index, table, tableBody) {
|
|
@@ -930,9 +948,14 @@ function flushTableEnd(map, context, index, table, tableBody) {
|
|
|
930
948
|
}
|
|
931
949
|
|
|
932
950
|
/**
|
|
951
|
+
* Get the point (start or end) for a given event in the list of events.
|
|
952
|
+
*
|
|
933
953
|
* @param {Readonly<Array<Event>>} events
|
|
954
|
+
* List of events.
|
|
934
955
|
* @param {number} index
|
|
956
|
+
* Index of the event to get the point for.
|
|
935
957
|
* @returns {Readonly<Point>}
|
|
958
|
+
* Start point for enter and end point for exit.
|
|
936
959
|
*/
|
|
937
960
|
function getPoint(events, index) {
|
|
938
961
|
const event = events[index]
|
|
@@ -15,20 +15,33 @@ export class EditMap {
|
|
|
15
15
|
* @type {Array<Change>}
|
|
16
16
|
*/
|
|
17
17
|
map: Array<Change>;
|
|
18
|
+
/**
|
|
19
|
+
* Changes by index, so `add` does not scan `map` (quadratic on
|
|
20
|
+
* table-heavy documents).
|
|
21
|
+
*
|
|
22
|
+
* @type {Map<number, Change>}
|
|
23
|
+
*/
|
|
24
|
+
index: Map<number, Change>;
|
|
18
25
|
/**
|
|
19
26
|
* Create an edit: a remove and/or add at a certain place.
|
|
20
27
|
*
|
|
21
28
|
* @param {number} index
|
|
29
|
+
* Index at which to apply the edit.
|
|
22
30
|
* @param {number} remove
|
|
31
|
+
* Count of items to remove at the index.
|
|
23
32
|
* @param {Array<Event>} add
|
|
33
|
+
* Items to add at the index.
|
|
24
34
|
* @returns {undefined}
|
|
35
|
+
* Nothing.
|
|
25
36
|
*/
|
|
26
37
|
add(index: number, remove: number, add: Array<Event>): undefined;
|
|
27
38
|
/**
|
|
28
39
|
* Done, change the events.
|
|
29
40
|
*
|
|
30
41
|
* @param {Array<Event>} events
|
|
42
|
+
* List of events to apply the edits to.
|
|
31
43
|
* @returns {undefined}
|
|
44
|
+
* Nothing.
|
|
32
45
|
*/
|
|
33
46
|
consume(events: Array<Event>): undefined;
|
|
34
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edit-map.d.ts","sourceRoot":"","sources":["edit-map.js"],"names":[],"mappings":"AAAA;;GAEG;AAeH;;;GAGG;AAEH;;GAEG;AACH;IAKI;;;;OAIG;IACH,KAFU,KAAK,CAAC,MAAM,CAAC,CAEV;
|
|
1
|
+
{"version":3,"file":"edit-map.d.ts","sourceRoot":"","sources":["edit-map.js"],"names":[],"mappings":"AAAA;;GAEG;AAeH;;;GAGG;AAEH;;GAEG;AACH;IAKI;;;;OAIG;IACH,KAFU,KAAK,CAAC,MAAM,CAAC,CAEV;IAEb;;;;;OAKG;IACH,OAFU,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAEP;IAGxB;;;;;;;;;;;OAWG;IACH,WATW,MAAM,UAEN,MAAM,OAEN,KAAK,CAAC,KAAK,CAAC,GAEV,SAAS,CAKrB;IAeD;;;;;;;OAOG;IACH,gBALW,KAAK,CAAC,KAAK,CAAC,GAEV,SAAS,CA6DrB;CACF;qBA5HY,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;mBAC9B,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;2BAlBb,sBAAsB"}
|
|
@@ -34,15 +34,27 @@ export class EditMap {
|
|
|
34
34
|
* @type {Array<Change>}
|
|
35
35
|
*/
|
|
36
36
|
this.map = [];
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Changes by index, so `add` does not scan `map` (quadratic on
|
|
40
|
+
* table-heavy documents).
|
|
41
|
+
*
|
|
42
|
+
* @type {Map<number, Change>}
|
|
43
|
+
*/
|
|
44
|
+
this.index = new Map();
|
|
37
45
|
}
|
|
38
46
|
|
|
39
47
|
/**
|
|
40
48
|
* Create an edit: a remove and/or add at a certain place.
|
|
41
49
|
*
|
|
42
50
|
* @param {number} index
|
|
51
|
+
* Index at which to apply the edit.
|
|
43
52
|
* @param {number} remove
|
|
53
|
+
* Count of items to remove at the index.
|
|
44
54
|
* @param {Array<Event>} add
|
|
55
|
+
* Items to add at the index.
|
|
45
56
|
* @returns {undefined}
|
|
57
|
+
* Nothing.
|
|
46
58
|
*/
|
|
47
59
|
add(index, remove, add) {
|
|
48
60
|
addImplementation(this, index, remove, add);
|
|
@@ -65,7 +77,9 @@ export class EditMap {
|
|
|
65
77
|
* Done, change the events.
|
|
66
78
|
*
|
|
67
79
|
* @param {Array<Event>} events
|
|
80
|
+
* List of events to apply the edits to.
|
|
68
81
|
* @returns {undefined}
|
|
82
|
+
* Nothing.
|
|
69
83
|
*/
|
|
70
84
|
consume(events) {
|
|
71
85
|
this.map.sort(function (a, b) {
|
|
@@ -117,6 +131,7 @@ export class EditMap {
|
|
|
117
131
|
|
|
118
132
|
// Truncate everything.
|
|
119
133
|
this.map.length = 0;
|
|
134
|
+
this.index.clear();
|
|
120
135
|
}
|
|
121
136
|
}
|
|
122
137
|
|
|
@@ -124,35 +139,40 @@ export class EditMap {
|
|
|
124
139
|
* Create an edit.
|
|
125
140
|
*
|
|
126
141
|
* @param {EditMap} editMap
|
|
142
|
+
* Edit map to apply to.
|
|
127
143
|
* @param {number} at
|
|
144
|
+
* Index at which to apply the edit.
|
|
128
145
|
* @param {number} remove
|
|
146
|
+
* Count of items to remove at the index.
|
|
129
147
|
* @param {Array<Event>} add
|
|
148
|
+
* Items to add at the index.
|
|
130
149
|
* @returns {undefined}
|
|
150
|
+
* Nothing.
|
|
131
151
|
*/
|
|
132
152
|
function addImplementation(editMap, at, remove, add) {
|
|
133
|
-
let index = 0;
|
|
134
|
-
|
|
135
153
|
/* c8 ignore next 3 -- `resolve` is never called without tables, so without edits. */
|
|
136
154
|
if (remove === 0 && add.length === 0) {
|
|
137
155
|
return;
|
|
138
156
|
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
157
|
+
const existing = editMap.index.get(at);
|
|
158
|
+
if (existing) {
|
|
159
|
+
existing[1] += remove;
|
|
160
|
+
|
|
161
|
+
// To do: before not used by tables, use when moving to micromark.
|
|
162
|
+
// if (before) {
|
|
163
|
+
// add.push(...existing[2])
|
|
164
|
+
// existing[2] = add
|
|
165
|
+
// } else {
|
|
166
|
+
existing[2].push(...add);
|
|
167
|
+
// }
|
|
150
168
|
|
|
151
|
-
|
|
152
|
-
}
|
|
153
|
-
index += 1;
|
|
169
|
+
return;
|
|
154
170
|
}
|
|
155
|
-
|
|
171
|
+
|
|
172
|
+
/** @type {Change} */
|
|
173
|
+
const change = [at, remove, add];
|
|
174
|
+
editMap.map.push(change);
|
|
175
|
+
editMap.index.set(at, change);
|
|
156
176
|
}
|
|
157
177
|
|
|
158
178
|
// /**
|
|
@@ -120,9 +120,14 @@ export function gfmTableHtml() {
|
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
/**
|
|
123
|
+
* Replace escaped characters in table cells.
|
|
124
|
+
*
|
|
123
125
|
* @param {string} $0
|
|
126
|
+
* Whole.
|
|
124
127
|
* @param {string} $1
|
|
128
|
+
* Escaped character (either a backslash or a pipe).
|
|
125
129
|
* @returns {string}
|
|
130
|
+
* Replacement for the escaped character.
|
|
126
131
|
*/
|
|
127
132
|
function replace($0, $1) {
|
|
128
133
|
// Pipes work, backslashes don’t (but can’t escape pipes).
|
|
@@ -35,6 +35,8 @@ export function gfmTable() {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
|
+
* Tokenizer for GFM tables.
|
|
39
|
+
*
|
|
38
40
|
* @this {TokenizeContext}
|
|
39
41
|
* @type {Tokenizer}
|
|
40
42
|
*/
|
|
@@ -65,10 +67,16 @@ function tokenizeTable(effects, ok, nok) {
|
|
|
65
67
|
function start(code) {
|
|
66
68
|
let index = self.events.length - 1;
|
|
67
69
|
while (index > -1) {
|
|
68
|
-
const
|
|
70
|
+
const {
|
|
71
|
+
type
|
|
72
|
+
} = self.events[index][1];
|
|
69
73
|
if (type === "lineEnding" ||
|
|
70
74
|
// Note: markdown-rs uses `whitespace` instead of `linePrefix`
|
|
71
|
-
type === "linePrefix")
|
|
75
|
+
type === "linePrefix") {
|
|
76
|
+
index--;
|
|
77
|
+
} else {
|
|
78
|
+
break;
|
|
79
|
+
}
|
|
72
80
|
}
|
|
73
81
|
const tail = index > -1 ? self.events[index][1].type : null;
|
|
74
82
|
const next = tail === 'tableHead' || tail === 'tableRow' ? bodyRowStart : headRowBefore;
|
|
@@ -688,12 +696,19 @@ function resolveTable(events, context) {
|
|
|
688
696
|
* Generate a cell.
|
|
689
697
|
*
|
|
690
698
|
* @param {EditMap} map
|
|
699
|
+
* Edit map to apply to.
|
|
691
700
|
* @param {Readonly<TokenizeContext>} context
|
|
701
|
+
* Tokenize context.
|
|
692
702
|
* @param {Readonly<Range>} range
|
|
703
|
+
* Range of the cell within events.
|
|
693
704
|
* @param {RowKind} rowKind
|
|
705
|
+
* Type of row.
|
|
694
706
|
* @param {number | undefined} rowEnd
|
|
707
|
+
* Index of the end of the row, if known.
|
|
695
708
|
* @param {Token | undefined} previousCell
|
|
709
|
+
* Previous cell token, if any.
|
|
696
710
|
* @returns {Token | undefined}
|
|
711
|
+
* Current cell token after flushing, if any.
|
|
697
712
|
*/
|
|
698
713
|
// eslint-disable-next-line max-params
|
|
699
714
|
function flushCell(map, context, range, rowKind, rowEnd, previousCell) {
|
|
@@ -788,10 +803,17 @@ function flushCell(map, context, range, rowKind, rowEnd, previousCell) {
|
|
|
788
803
|
* Generate table end (and table body end).
|
|
789
804
|
*
|
|
790
805
|
* @param {Readonly<EditMap>} map
|
|
806
|
+
* Edit map to apply to.
|
|
791
807
|
* @param {Readonly<TokenizeContext>} context
|
|
808
|
+
* Tokenize context.
|
|
792
809
|
* @param {number} index
|
|
810
|
+
* Index within the events where the table end should be inserted.
|
|
793
811
|
* @param {Token} table
|
|
812
|
+
* Table token.
|
|
794
813
|
* @param {Token | undefined} tableBody
|
|
814
|
+
* Table body token, if any.
|
|
815
|
+
* @returns {undefined}
|
|
816
|
+
* Nothing.
|
|
795
817
|
*/
|
|
796
818
|
// eslint-disable-next-line max-params
|
|
797
819
|
function flushTableEnd(map, context, index, table, tableBody) {
|
|
@@ -808,9 +830,14 @@ function flushTableEnd(map, context, index, table, tableBody) {
|
|
|
808
830
|
}
|
|
809
831
|
|
|
810
832
|
/**
|
|
833
|
+
* Get the point (start or end) for a given event in the list of events.
|
|
834
|
+
*
|
|
811
835
|
* @param {Readonly<Array<Event>>} events
|
|
836
|
+
* List of events.
|
|
812
837
|
* @param {number} index
|
|
838
|
+
* Index of the event to get the point for.
|
|
813
839
|
* @returns {Readonly<Point>}
|
|
840
|
+
* Start point for enter and end point for exit.
|
|
814
841
|
*/
|
|
815
842
|
function getPoint(events, index) {
|
|
816
843
|
const event = events[index];
|
|
@@ -13,17 +13,17 @@
|
|
|
13
13
|
},
|
|
14
14
|
"description": "micromark extension to support GFM tables",
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@types/node": "^
|
|
17
|
-
"c8": "^
|
|
16
|
+
"@types/node": "^26.0.0",
|
|
17
|
+
"c8": "^12.0.0",
|
|
18
18
|
"create-gfm-fixtures": "^2.0.0",
|
|
19
19
|
"micromark": "^4.0.0",
|
|
20
20
|
"micromark-build": "^2.0.0",
|
|
21
21
|
"prettier": "^3.0.0",
|
|
22
22
|
"remark-cli": "^12.0.0",
|
|
23
|
-
"remark-preset-wooorm": "^
|
|
23
|
+
"remark-preset-wooorm": "^11.0.0",
|
|
24
24
|
"type-coverage": "^2.0.0",
|
|
25
|
-
"typescript": "^
|
|
26
|
-
"xo": "^0.
|
|
25
|
+
"typescript": "^6.0.0",
|
|
26
|
+
"xo": "^4.0.0"
|
|
27
27
|
},
|
|
28
28
|
"exports": {
|
|
29
29
|
"development": "./dev/index.js",
|
|
@@ -82,47 +82,5 @@
|
|
|
82
82
|
"strict": true
|
|
83
83
|
},
|
|
84
84
|
"type": "module",
|
|
85
|
-
"version": "2.1.
|
|
86
|
-
"xo": {
|
|
87
|
-
"overrides": [
|
|
88
|
-
{
|
|
89
|
-
"files": [
|
|
90
|
-
"**/*.d.ts"
|
|
91
|
-
],
|
|
92
|
-
"rules": {
|
|
93
|
-
"@typescript-eslint/array-type": [
|
|
94
|
-
"error",
|
|
95
|
-
{
|
|
96
|
-
"default": "generic"
|
|
97
|
-
}
|
|
98
|
-
],
|
|
99
|
-
"@typescript-eslint/ban-types": [
|
|
100
|
-
"error",
|
|
101
|
-
{
|
|
102
|
-
"extendDefaults": true
|
|
103
|
-
}
|
|
104
|
-
],
|
|
105
|
-
"@typescript-eslint/consistent-type-definitions": [
|
|
106
|
-
"error",
|
|
107
|
-
"interface"
|
|
108
|
-
]
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
"files": [
|
|
113
|
-
"test/**/*.js"
|
|
114
|
-
],
|
|
115
|
-
"rules": {
|
|
116
|
-
"no-await-in-loop": "off"
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
],
|
|
120
|
-
"prettier": true,
|
|
121
|
-
"rules": {
|
|
122
|
-
"complexity": "off",
|
|
123
|
-
"max-depth": "off",
|
|
124
|
-
"unicorn/no-this-assignment": "off",
|
|
125
|
-
"unicorn/prefer-string-replace-all": "off"
|
|
126
|
-
}
|
|
127
|
-
}
|
|
85
|
+
"version": "2.1.2"
|
|
128
86
|
}
|