@bgx4k3p/huly-mcp-server 2.2.4 → 2.2.5
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/README.md +186 -56
- package/node_modules/@hcengineering/account-client/lib/__tests__/utils.test.js +249 -0
- package/node_modules/@hcengineering/account-client/lib/__tests__/utils.test.js.map +7 -0
- package/node_modules/@hcengineering/account-client/lib/client.js +88 -3
- package/node_modules/@hcengineering/account-client/lib/client.js.map +2 -2
- package/node_modules/@hcengineering/account-client/lib/types.js.map +2 -2
- package/node_modules/@hcengineering/account-client/lib/utils.js +50 -0
- package/node_modules/@hcengineering/account-client/lib/utils.js.map +2 -2
- package/node_modules/@hcengineering/account-client/package.json +22 -19
- package/node_modules/@hcengineering/account-client/src/__tests__/utils.test.ts +304 -0
- package/node_modules/@hcengineering/account-client/src/client.ts +127 -6
- package/node_modules/@hcengineering/account-client/src/types.ts +7 -0
- package/node_modules/@hcengineering/account-client/src/utils.ts +65 -1
- package/node_modules/@hcengineering/analytics/lib/index.js +1 -1
- package/node_modules/@hcengineering/analytics/lib/index.js.map +2 -2
- package/node_modules/@hcengineering/analytics/package.json +19 -16
- package/node_modules/@hcengineering/analytics/src/index.ts +2 -1
- package/node_modules/@hcengineering/api-client/lib/client.js +9 -4
- package/node_modules/@hcengineering/api-client/lib/client.js.map +2 -2
- package/node_modules/@hcengineering/api-client/lib/rest/adapter.js +64 -0
- package/node_modules/@hcengineering/api-client/lib/rest/adapter.js.map +7 -0
- package/node_modules/@hcengineering/api-client/lib/rest/index.js +2 -0
- package/node_modules/@hcengineering/api-client/lib/rest/index.js.map +2 -2
- package/node_modules/@hcengineering/api-client/lib/socket/node.js +5 -1
- package/node_modules/@hcengineering/api-client/lib/socket/node.js.map +2 -2
- package/node_modules/@hcengineering/api-client/package.json +28 -25
- package/node_modules/@hcengineering/api-client/src/client.ts +10 -1
- package/node_modules/@hcengineering/api-client/src/rest/adapter.ts +96 -0
- package/node_modules/@hcengineering/api-client/src/rest/index.ts +1 -0
- package/node_modules/@hcengineering/api-client/src/socket/node.ts +6 -1
- package/node_modules/@hcengineering/chunter/lib/index.js.map +2 -2
- package/node_modules/@hcengineering/chunter/package.json +13 -10
- package/node_modules/@hcengineering/client/package.json +21 -18
- package/node_modules/@hcengineering/client-resources/package.json +24 -21
- package/node_modules/@hcengineering/collaborator-client/package.json +21 -18
- package/node_modules/@hcengineering/contact/lib/__tests__/workspaceMemberStatusUtils.test.js +38 -0
- package/node_modules/@hcengineering/contact/lib/__tests__/workspaceMemberStatusUtils.test.js.map +7 -0
- package/node_modules/@hcengineering/contact/lib/index.js +13 -4
- package/node_modules/@hcengineering/contact/lib/index.js.map +2 -2
- package/node_modules/@hcengineering/contact/lib/types.js.map +1 -1
- package/node_modules/@hcengineering/contact/lib/utils.js +132 -108
- package/node_modules/@hcengineering/contact/lib/utils.js.map +3 -3
- package/node_modules/@hcengineering/contact/lib/workspaceMemberStatusUtils.js +79 -0
- package/node_modules/@hcengineering/contact/lib/workspaceMemberStatusUtils.js.map +7 -0
- package/node_modules/@hcengineering/contact/package.json +12 -9
- package/node_modules/@hcengineering/core/CHANGELOG.md +9 -1
- package/node_modules/@hcengineering/core/lang/cs.json +6 -1
- package/node_modules/@hcengineering/core/lang/de.json +6 -1
- package/node_modules/@hcengineering/core/lang/en.json +6 -1
- package/node_modules/@hcengineering/core/lang/es.json +6 -1
- package/node_modules/@hcengineering/core/lang/fr.json +6 -1
- package/node_modules/@hcengineering/core/lang/it.json +6 -1
- package/node_modules/@hcengineering/core/lang/ja.json +6 -1
- package/node_modules/@hcengineering/core/lang/pt-br.json +70 -0
- package/node_modules/@hcengineering/core/lang/pt.json +6 -1
- package/node_modules/@hcengineering/core/lang/ru.json +6 -1
- package/node_modules/@hcengineering/core/lang/tr.json +6 -1
- package/node_modules/@hcengineering/core/lang/zh.json +6 -1
- package/node_modules/@hcengineering/core/lib/__tests__/autoJoinRoles.test.js +13 -0
- package/node_modules/@hcengineering/core/lib/__tests__/autoJoinRoles.test.js.map +7 -0
- package/node_modules/@hcengineering/core/lib/__tests__/memdb.test.js +133 -0
- package/node_modules/@hcengineering/core/lib/__tests__/memdb.test.js.map +2 -2
- package/node_modules/@hcengineering/core/lib/__tests__/minmodel.js +25 -0
- package/node_modules/@hcengineering/core/lib/__tests__/minmodel.js.map +2 -2
- package/node_modules/@hcengineering/core/lib/__tests__/query.test.js +43 -0
- package/node_modules/@hcengineering/core/lib/__tests__/query.test.js.map +7 -0
- package/node_modules/@hcengineering/core/lib/autoJoinRoles.js +36 -0
- package/node_modules/@hcengineering/core/lib/autoJoinRoles.js.map +7 -0
- package/node_modules/@hcengineering/core/lib/classes.js +5 -0
- package/node_modules/@hcengineering/core/lib/classes.js.map +3 -3
- package/node_modules/@hcengineering/core/lib/clone.js +13 -2
- package/node_modules/@hcengineering/core/lib/clone.js.map +2 -2
- package/node_modules/@hcengineering/core/lib/component.js +14 -3
- package/node_modules/@hcengineering/core/lib/component.js.map +2 -2
- package/node_modules/@hcengineering/core/lib/index.js +2 -0
- package/node_modules/@hcengineering/core/lib/index.js.map +2 -2
- package/node_modules/@hcengineering/core/lib/memdb.js +6 -2
- package/node_modules/@hcengineering/core/lib/memdb.js.map +2 -2
- package/node_modules/@hcengineering/core/lib/operations.js +11 -0
- package/node_modules/@hcengineering/core/lib/operations.js.map +2 -2
- package/node_modules/@hcengineering/core/lib/predicate.js +3 -0
- package/node_modules/@hcengineering/core/lib/predicate.js.map +2 -2
- package/node_modules/@hcengineering/core/lib/storage.js.map +2 -2
- package/node_modules/@hcengineering/core/lib/tx.js +3 -1
- package/node_modules/@hcengineering/core/lib/tx.js.map +2 -2
- package/node_modules/@hcengineering/core/lib/utils.js +1 -1
- package/node_modules/@hcengineering/core/lib/utils.js.map +2 -2
- package/node_modules/@hcengineering/core/lib/versioning.js +17 -0
- package/node_modules/@hcengineering/core/lib/versioning.js.map +7 -0
- package/node_modules/@hcengineering/core/package.json +22 -19
- package/node_modules/@hcengineering/core/src/__tests__/autoJoinRoles.test.ts +27 -0
- package/node_modules/@hcengineering/core/src/__tests__/memdb.test.ts +150 -1
- package/node_modules/@hcengineering/core/src/__tests__/minmodel.ts +29 -1
- package/node_modules/@hcengineering/core/src/__tests__/query.test.ts +66 -0
- package/node_modules/@hcengineering/core/src/autoJoinRoles.ts +33 -0
- package/node_modules/@hcengineering/core/src/classes.ts +61 -1
- package/node_modules/@hcengineering/core/src/clone.ts +13 -2
- package/node_modules/@hcengineering/core/src/component.ts +25 -9
- package/node_modules/@hcengineering/core/src/index.ts +2 -0
- package/node_modules/@hcengineering/core/src/memdb.ts +7 -3
- package/node_modules/@hcengineering/core/src/operations.ts +11 -0
- package/node_modules/@hcengineering/core/src/predicate.ts +3 -0
- package/node_modules/@hcengineering/core/src/storage.ts +6 -3
- package/node_modules/@hcengineering/core/src/tx.ts +4 -1
- package/node_modules/@hcengineering/core/src/utils.ts +1 -1
- package/node_modules/@hcengineering/core/src/versioning.ts +13 -0
- package/node_modules/@hcengineering/measurements/lib/__tests__/performance.test.js +3 -3
- package/node_modules/@hcengineering/measurements/lib/__tests__/performance.test.js.map +2 -2
- package/node_modules/@hcengineering/measurements/package.json +17 -14
- package/node_modules/@hcengineering/measurements/src/__tests__/performance.test.ts +3 -3
- package/node_modules/@hcengineering/platform/lang/pt-br.json +31 -0
- package/node_modules/@hcengineering/platform/lib/__tests__/i18n.test.js +100 -0
- package/node_modules/@hcengineering/platform/lib/__tests__/i18n.test.js.map +2 -2
- package/node_modules/@hcengineering/platform/lib/__tests__/status.test.js +78 -0
- package/node_modules/@hcengineering/platform/lib/__tests__/status.test.js.map +7 -0
- package/node_modules/@hcengineering/platform/lib/i18n.js +78 -69
- package/node_modules/@hcengineering/platform/lib/i18n.js.map +3 -3
- package/node_modules/@hcengineering/platform/lib/status.js +25 -0
- package/node_modules/@hcengineering/platform/lib/status.js.map +2 -2
- package/node_modules/@hcengineering/platform/package.json +18 -15
- package/node_modules/@hcengineering/platform/src/__tests__/i18n.test.ts +114 -2
- package/node_modules/@hcengineering/platform/src/__tests__/status.test.ts +77 -0
- package/node_modules/@hcengineering/platform/src/i18n.ts +99 -71
- package/node_modules/@hcengineering/platform/src/status.ts +30 -0
- package/node_modules/@hcengineering/rank/package.json +19 -16
- package/node_modules/@hcengineering/rpc/package.json +21 -18
- package/node_modules/@hcengineering/tags/package.json +12 -9
- package/node_modules/@hcengineering/task/package.json +14 -11
- package/node_modules/@hcengineering/text/lib/markup/__tests__/utils.test.js +25 -0
- package/node_modules/@hcengineering/text/lib/markup/__tests__/utils.test.js.map +2 -2
- package/node_modules/@hcengineering/text/lib/tiptapExtensions.js +6 -0
- package/node_modules/@hcengineering/text/lib/tiptapExtensions.js.map +2 -2
- package/node_modules/@hcengineering/text/package.json +23 -18
- package/node_modules/@hcengineering/text/src/markup/__tests__/utils.test.ts +27 -0
- package/node_modules/@hcengineering/text/src/tiptapExtensions.ts +3 -0
- package/node_modules/@hcengineering/text-core/lib/markup/model.js +1 -0
- package/node_modules/@hcengineering/text-core/lib/markup/model.js.map +2 -2
- package/node_modules/@hcengineering/text-core/package.json +20 -17
- package/node_modules/@hcengineering/text-core/src/markup/model.ts +2 -1
- package/node_modules/@hcengineering/text-html/package.json +19 -16
- package/node_modules/@hcengineering/text-markdown/lib/serializer.js +14 -0
- package/node_modules/@hcengineering/text-markdown/lib/serializer.js.map +2 -2
- package/node_modules/@hcengineering/text-markdown/package.json +20 -17
- package/node_modules/@hcengineering/text-markdown/src/serializer.ts +14 -0
- package/node_modules/@hcengineering/tracker/lib/index.js +1 -0
- package/node_modules/@hcengineering/tracker/lib/index.js.map +2 -2
- package/node_modules/@hcengineering/tracker/package.json +16 -13
- package/node_modules/@tiptap/core/dist/commands/focus.d.ts.map +1 -1
- package/node_modules/@tiptap/core/dist/index.cjs +19 -2
- package/node_modules/@tiptap/core/dist/index.cjs.map +1 -1
- package/node_modules/@tiptap/core/dist/index.js +19 -3
- package/node_modules/@tiptap/core/dist/index.js.map +1 -1
- package/node_modules/@tiptap/core/dist/index.umd.js +19 -2
- package/node_modules/@tiptap/core/dist/index.umd.js.map +1 -1
- package/node_modules/@tiptap/core/dist/utilities/index.d.ts +1 -0
- package/node_modules/@tiptap/core/dist/utilities/index.d.ts.map +1 -1
- package/node_modules/@tiptap/core/dist/utilities/isSafari.d.ts +10 -0
- package/node_modules/@tiptap/core/dist/utilities/isSafari.d.ts.map +1 -0
- package/node_modules/@tiptap/core/package.json +2 -2
- package/node_modules/@tiptap/core/src/commands/focus.ts +7 -2
- package/node_modules/@tiptap/core/src/utilities/index.ts +1 -0
- package/node_modules/@tiptap/core/src/utilities/isSafari.ts +11 -0
- package/node_modules/@tiptap/extension-blockquote/package.json +2 -2
- package/node_modules/@tiptap/extension-bold/package.json +2 -2
- package/node_modules/@tiptap/extension-bullet-list/package.json +2 -2
- package/node_modules/@tiptap/extension-code/package.json +2 -2
- package/node_modules/@tiptap/extension-code-block/package.json +3 -3
- package/node_modules/@tiptap/extension-document/package.json +2 -2
- package/node_modules/@tiptap/extension-dropcursor/package.json +3 -3
- package/node_modules/@tiptap/extension-gapcursor/package.json +3 -3
- package/node_modules/@tiptap/extension-hard-break/package.json +2 -2
- package/node_modules/@tiptap/extension-heading/package.json +2 -2
- package/node_modules/@tiptap/extension-highlight/package.json +2 -2
- package/node_modules/@tiptap/extension-history/package.json +3 -3
- package/node_modules/@tiptap/extension-horizontal-rule/package.json +3 -3
- package/node_modules/@tiptap/extension-italic/package.json +2 -2
- package/node_modules/@tiptap/extension-link/package.json +3 -3
- package/node_modules/@tiptap/extension-list-item/package.json +2 -2
- package/node_modules/@tiptap/extension-mention/package.json +4 -4
- package/node_modules/@tiptap/extension-ordered-list/package.json +2 -2
- package/node_modules/@tiptap/extension-paragraph/package.json +2 -2
- package/node_modules/@tiptap/extension-strike/package.json +2 -2
- package/node_modules/@tiptap/extension-subscript/README.md +14 -0
- package/node_modules/@tiptap/extension-subscript/dist/index.cjs +61 -0
- package/node_modules/@tiptap/extension-subscript/dist/index.cjs.map +1 -0
- package/node_modules/@tiptap/extension-subscript/dist/index.d.ts +4 -0
- package/node_modules/@tiptap/extension-subscript/dist/index.d.ts.map +1 -0
- package/node_modules/@tiptap/extension-subscript/dist/index.js +56 -0
- package/node_modules/@tiptap/extension-subscript/dist/index.js.map +1 -0
- package/node_modules/@tiptap/extension-subscript/dist/index.umd.js +65 -0
- package/node_modules/@tiptap/extension-subscript/dist/index.umd.js.map +1 -0
- package/node_modules/@tiptap/extension-subscript/dist/subscript.d.ts +36 -0
- package/node_modules/@tiptap/extension-subscript/dist/subscript.d.ts.map +1 -0
- package/node_modules/@tiptap/extension-subscript/package.json +49 -0
- package/node_modules/@tiptap/extension-subscript/src/index.ts +5 -0
- package/node_modules/@tiptap/extension-subscript/src/subscript.ts +91 -0
- package/node_modules/@tiptap/extension-superscript/README.md +14 -0
- package/node_modules/@tiptap/extension-superscript/dist/index.cjs +61 -0
- package/node_modules/@tiptap/extension-superscript/dist/index.cjs.map +1 -0
- package/node_modules/@tiptap/extension-superscript/dist/index.d.ts +4 -0
- package/node_modules/@tiptap/extension-superscript/dist/index.d.ts.map +1 -0
- package/node_modules/@tiptap/extension-superscript/dist/index.js +56 -0
- package/node_modules/@tiptap/extension-superscript/dist/index.js.map +1 -0
- package/node_modules/@tiptap/extension-superscript/dist/index.umd.js +65 -0
- package/node_modules/@tiptap/extension-superscript/dist/index.umd.js.map +1 -0
- package/node_modules/@tiptap/extension-superscript/dist/superscript.d.ts +36 -0
- package/node_modules/@tiptap/extension-superscript/dist/superscript.d.ts.map +1 -0
- package/node_modules/@tiptap/extension-superscript/package.json +49 -0
- package/node_modules/@tiptap/extension-superscript/src/index.ts +5 -0
- package/node_modules/@tiptap/extension-superscript/src/superscript.ts +91 -0
- package/node_modules/@tiptap/extension-table/package.json +3 -3
- package/node_modules/@tiptap/extension-table-cell/package.json +2 -2
- package/node_modules/@tiptap/extension-table-header/package.json +2 -2
- package/node_modules/@tiptap/extension-table-row/package.json +2 -2
- package/node_modules/@tiptap/extension-task-item/package.json +3 -3
- package/node_modules/@tiptap/extension-task-list/package.json +2 -2
- package/node_modules/@tiptap/extension-text/package.json +2 -2
- package/node_modules/@tiptap/extension-typography/package.json +2 -2
- package/node_modules/@tiptap/extension-underline/package.json +2 -2
- package/node_modules/@tiptap/html/package.json +3 -3
- package/node_modules/@tiptap/pm/package.json +1 -1
- package/node_modules/@tiptap/starter-kit/node_modules/@tiptap/extension-text-style/package.json +2 -2
- package/node_modules/@tiptap/starter-kit/package.json +22 -22
- package/node_modules/@tiptap/suggestion/package.json +3 -3
- package/node_modules/linkify-it/build/index.cjs.js +99 -94
- package/node_modules/linkify-it/index.mjs +99 -94
- package/node_modules/linkify-it/package.json +11 -1
- package/node_modules/linkifyjs/README.md +4 -2
- package/node_modules/linkifyjs/dist/linkify.cjs +8 -11
- package/node_modules/linkifyjs/dist/linkify.d.cts +14 -14
- package/node_modules/linkifyjs/dist/linkify.d.mts +14 -14
- package/node_modules/linkifyjs/dist/linkify.js +8 -11
- package/node_modules/linkifyjs/dist/linkify.min.js +1 -1
- package/node_modules/linkifyjs/dist/linkify.mjs +8 -11
- package/node_modules/linkifyjs/package.json +1 -1
- package/node_modules/markdown-it/README.md +13 -17
- package/node_modules/markdown-it/dist/index.cjs.js +111 -31
- package/node_modules/markdown-it/dist/markdown-it.js +117 -31
- package/node_modules/markdown-it/dist/markdown-it.min.js +2 -2
- package/node_modules/markdown-it/lib/common/utils.mjs +30 -1
- package/node_modules/markdown-it/lib/index.mjs +1 -1
- package/node_modules/markdown-it/lib/rules_block/heading.mjs +2 -2
- package/node_modules/markdown-it/lib/rules_block/html_block.mjs +12 -1
- package/node_modules/markdown-it/lib/rules_block/lheading.mjs +4 -1
- package/node_modules/markdown-it/lib/rules_block/paragraph.mjs +3 -1
- package/node_modules/markdown-it/lib/rules_core/smartquotes.mjs +37 -21
- package/node_modules/markdown-it/lib/rules_inline/entity.mjs +2 -2
- package/node_modules/markdown-it/lib/rules_inline/state_inline.mjs +37 -6
- package/node_modules/markdown-it/package.json +14 -3
- package/node_modules/msgpackr/README.md +1 -3
- package/node_modules/msgpackr/benchmark.md +26 -16
- package/node_modules/msgpackr/dist/index-no-eval.cjs +35 -16
- package/node_modules/msgpackr/dist/index-no-eval.cjs.map +1 -1
- package/node_modules/msgpackr/dist/index-no-eval.min.js +1 -1
- package/node_modules/msgpackr/dist/index-no-eval.min.js.map +1 -1
- package/node_modules/msgpackr/dist/index.js +35 -16
- package/node_modules/msgpackr/dist/index.js.map +1 -1
- package/node_modules/msgpackr/dist/index.min.js +1 -1
- package/node_modules/msgpackr/dist/index.min.js.map +1 -1
- package/node_modules/msgpackr/dist/node.cjs +50 -26
- package/node_modules/msgpackr/dist/node.cjs.map +1 -1
- package/node_modules/msgpackr/dist/test.js +44 -16
- package/node_modules/msgpackr/dist/test.js.map +1 -1
- package/node_modules/msgpackr/dist/unpack-no-eval.cjs +35 -16
- package/node_modules/msgpackr/dist/unpack-no-eval.cjs.map +1 -1
- package/node_modules/msgpackr/index.d.cts +2 -0
- package/node_modules/msgpackr/index.d.ts +2 -0
- package/node_modules/msgpackr/package.json +1 -1
- package/node_modules/msgpackr/stream.js +15 -10
- package/node_modules/msgpackr/unpack.js +35 -16
- package/node_modules/prosemirror-changeset/CHANGELOG.md +12 -0
- package/node_modules/prosemirror-changeset/README.md +31 -2
- package/node_modules/prosemirror-changeset/dist/index.cjs +17 -2
- package/node_modules/prosemirror-changeset/dist/index.d.cts +32 -2
- package/node_modules/prosemirror-changeset/dist/index.d.ts +32 -2
- package/node_modules/prosemirror-changeset/dist/index.js +18 -3
- package/node_modules/prosemirror-changeset/package.json +2 -2
- package/node_modules/prosemirror-changeset/src/README.md +4 -2
- package/node_modules/prosemirror-changeset/src/change.ts +18 -0
- package/node_modules/prosemirror-changeset/src/changeset.ts +10 -4
- package/node_modules/prosemirror-changeset/src/simplify.ts +1 -1
- package/node_modules/prosemirror-changeset/test/test-simplify.ts +3 -0
- package/node_modules/prosemirror-gapcursor/CHANGELOG.md +6 -0
- package/node_modules/prosemirror-gapcursor/dist/index.cjs +1 -1
- package/node_modules/prosemirror-gapcursor/dist/index.js +1 -1
- package/node_modules/prosemirror-gapcursor/package.json +3 -2
- package/node_modules/prosemirror-gapcursor/src/gapcursor.ts +1 -1
- package/node_modules/prosemirror-markdown/CHANGELOG.md +12 -0
- package/node_modules/prosemirror-markdown/dist/index.cjs +11 -1
- package/node_modules/prosemirror-markdown/dist/index.js +14 -2
- package/node_modules/prosemirror-markdown/package.json +1 -1
- package/node_modules/prosemirror-markdown/src/to_markdown.ts +12 -3
- package/node_modules/prosemirror-menu/CHANGELOG.md +18 -0
- package/node_modules/prosemirror-menu/CONTRIBUTING.md +22 -18
- package/node_modules/prosemirror-menu/README.md +69 -29
- package/node_modules/prosemirror-menu/dist/index.cjs +232 -48
- package/node_modules/prosemirror-menu/dist/index.d.cts +29 -14
- package/node_modules/prosemirror-menu/dist/index.d.ts +29 -14
- package/node_modules/prosemirror-menu/dist/index.js +229 -36
- package/node_modules/prosemirror-menu/package.json +2 -2
- package/node_modules/prosemirror-menu/src/README.md +30 -1
- package/node_modules/prosemirror-menu/src/icons.ts +3 -2
- package/node_modules/prosemirror-menu/src/menu.ts +193 -40
- package/node_modules/prosemirror-menu/src/menubar.ts +50 -5
- package/node_modules/prosemirror-menu/style/menu.css +28 -7
- package/node_modules/prosemirror-model/CHANGELOG.md +20 -0
- package/node_modules/prosemirror-model/CONTRIBUTING.md +19 -19
- package/node_modules/prosemirror-model/README.md +3 -3
- package/node_modules/prosemirror-model/dist/index.cjs +13 -10
- package/node_modules/prosemirror-model/dist/index.d.cts +25 -21
- package/node_modules/prosemirror-model/dist/index.d.ts +25 -21
- package/node_modules/prosemirror-model/dist/index.js +19 -23
- package/node_modules/prosemirror-model/package.json +2 -2
- package/node_modules/prosemirror-model/src/fragment.ts +1 -1
- package/node_modules/prosemirror-model/src/from_dom.ts +4 -1
- package/node_modules/prosemirror-model/src/node.ts +5 -4
- package/node_modules/prosemirror-model/src/replace.ts +6 -15
- package/node_modules/prosemirror-model/src/schema.ts +1 -1
- package/node_modules/prosemirror-model/src/to_dom.ts +24 -20
- package/node_modules/prosemirror-transform/CHANGELOG.md +16 -0
- package/node_modules/prosemirror-transform/dist/index.cjs +38 -4
- package/node_modules/prosemirror-transform/dist/index.d.cts +19 -0
- package/node_modules/prosemirror-transform/dist/index.d.ts +19 -0
- package/node_modules/prosemirror-transform/dist/index.js +52 -1
- package/node_modules/prosemirror-transform/package.json +1 -1
- package/node_modules/prosemirror-transform/src/replace.ts +16 -0
- package/node_modules/prosemirror-transform/src/replace_step.ts +10 -1
- package/node_modules/prosemirror-transform/src/transform.ts +21 -2
- package/node_modules/prosemirror-view/CHANGELOG.md +34 -2
- package/node_modules/prosemirror-view/CONTRIBUTING.md +19 -19
- package/node_modules/prosemirror-view/README.md +3 -3
- package/node_modules/prosemirror-view/dist/index.cjs +96 -40
- package/node_modules/prosemirror-view/dist/index.d.cts +2 -2
- package/node_modules/prosemirror-view/dist/index.d.ts +2 -2
- package/node_modules/prosemirror-view/dist/index.js +90 -39
- package/node_modules/prosemirror-view/package.json +2 -2
- package/node_modules/prosemirror-view/src/domchange.ts +1 -1
- package/node_modules/prosemirror-view/src/domobserver.ts +59 -16
- package/node_modules/prosemirror-view/src/index.ts +4 -4
- package/node_modules/prosemirror-view/src/input.ts +9 -6
- package/node_modules/prosemirror-view/src/viewdesc.ts +26 -22
- package/node_modules/prosemirror-view/style/prosemirror.css +1 -1
- package/package.json +5 -4
- package/src/client.mjs +2 -2
- package/src/config.mjs +1 -0
- package/src/helpers.mjs +2 -2
- package/src/index.mjs +31 -1
- package/src/initCodex.mjs +281 -0
- package/src/mcp.mjs +1 -1
- package/src/mcpShared.mjs +95 -5
- package/node_modules/@hcengineering/account-client/types/client.d.ts +0 -140
- package/node_modules/@hcengineering/account-client/types/client.d.ts.map +0 -1
- package/node_modules/@hcengineering/account-client/types/index.d.ts +0 -4
- package/node_modules/@hcengineering/account-client/types/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/account-client/types/types.d.ts +0 -177
- package/node_modules/@hcengineering/account-client/types/types.d.ts.map +0 -1
- package/node_modules/@hcengineering/account-client/types/utils.d.ts +0 -5
- package/node_modules/@hcengineering/account-client/types/utils.d.ts.map +0 -1
- package/node_modules/@hcengineering/analytics/types/index.d.ts +0 -25
- package/node_modules/@hcengineering/analytics/types/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/__tests__/config.test.d.ts +0 -2
- package/node_modules/@hcengineering/api-client/types/__tests__/config.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/__tests__/markup-client.test.d.ts +0 -2
- package/node_modules/@hcengineering/api-client/types/__tests__/markup-client.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/__tests__/markup-types.test.d.ts +0 -2
- package/node_modules/@hcengineering/api-client/types/__tests__/markup-types.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/__tests__/rest-utils.test.d.ts +0 -2
- package/node_modules/@hcengineering/api-client/types/__tests__/rest-utils.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/__tests__/utils.test.d.ts +0 -2
- package/node_modules/@hcengineering/api-client/types/__tests__/utils.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/client.d.ts +0 -6
- package/node_modules/@hcengineering/api-client/types/client.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/config.d.ts +0 -8
- package/node_modules/@hcengineering/api-client/types/config.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/index.d.ts +0 -9
- package/node_modules/@hcengineering/api-client/types/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/markup/client.d.ts +0 -5
- package/node_modules/@hcengineering/api-client/types/markup/client.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/markup/index.d.ts +0 -3
- package/node_modules/@hcengineering/api-client/types/markup/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/markup/types.d.ts +0 -41
- package/node_modules/@hcengineering/api-client/types/markup/types.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/rest/index.d.ts +0 -4
- package/node_modules/@hcengineering/api-client/types/rest/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/rest/rest.d.ts +0 -39
- package/node_modules/@hcengineering/api-client/types/rest/rest.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/rest/tx.d.ts +0 -3
- package/node_modules/@hcengineering/api-client/types/rest/tx.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/rest/types.d.ts +0 -16
- package/node_modules/@hcengineering/api-client/types/rest/types.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/rest/utils.d.ts +0 -3
- package/node_modules/@hcengineering/api-client/types/rest/utils.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/socket/browser.d.ts +0 -4
- package/node_modules/@hcengineering/api-client/types/socket/browser.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/socket/index.d.ts +0 -3
- package/node_modules/@hcengineering/api-client/types/socket/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/socket/node.d.ts +0 -4
- package/node_modules/@hcengineering/api-client/types/socket/node.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/storage/client.d.ts +0 -21
- package/node_modules/@hcengineering/api-client/types/storage/client.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/storage/error.d.ts +0 -10
- package/node_modules/@hcengineering/api-client/types/storage/error.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/storage/index.d.ts +0 -4
- package/node_modules/@hcengineering/api-client/types/storage/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/storage/types.d.ts +0 -10
- package/node_modules/@hcengineering/api-client/types/storage/types.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/types.d.ts +0 -101
- package/node_modules/@hcengineering/api-client/types/types.d.ts.map +0 -1
- package/node_modules/@hcengineering/api-client/types/utils.d.ts +0 -12
- package/node_modules/@hcengineering/api-client/types/utils.d.ts.map +0 -1
- package/node_modules/@hcengineering/chunter/types/analytics.d.ts +0 -5
- package/node_modules/@hcengineering/chunter/types/analytics.d.ts.map +0 -1
- package/node_modules/@hcengineering/chunter/types/index.d.ts +0 -211
- package/node_modules/@hcengineering/chunter/types/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/chunter/types/utils.d.ts +0 -7
- package/node_modules/@hcengineering/chunter/types/utils.d.ts.map +0 -1
- package/node_modules/@hcengineering/client/types/__tests__/client.test.d.ts +0 -2
- package/node_modules/@hcengineering/client/types/__tests__/client.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/client/types/index.d.ts +0 -69
- package/node_modules/@hcengineering/client/types/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/client-resources/types/__tests__/connection.test.d.ts +0 -2
- package/node_modules/@hcengineering/client-resources/types/__tests__/connection.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/client-resources/types/__tests__/integration.test.d.ts +0 -45
- package/node_modules/@hcengineering/client-resources/types/__tests__/integration.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/client-resources/types/connection.d.ts +0 -7
- package/node_modules/@hcengineering/client-resources/types/connection.d.ts.map +0 -1
- package/node_modules/@hcengineering/client-resources/types/index.d.ts +0 -11
- package/node_modules/@hcengineering/client-resources/types/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/collaborator-client/types/__tests__/utils.test.d.ts +0 -2
- package/node_modules/@hcengineering/collaborator-client/types/__tests__/utils.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/collaborator-client/types/client.d.ts +0 -34
- package/node_modules/@hcengineering/collaborator-client/types/client.d.ts.map +0 -1
- package/node_modules/@hcengineering/collaborator-client/types/index.d.ts +0 -3
- package/node_modules/@hcengineering/collaborator-client/types/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/collaborator-client/types/utils.d.ts +0 -9
- package/node_modules/@hcengineering/collaborator-client/types/utils.d.ts.map +0 -1
- package/node_modules/@hcengineering/contact/types/__tests__/cache.test.d.ts +0 -2
- package/node_modules/@hcengineering/contact/types/__tests__/cache.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/contact/types/analytics.d.ts +0 -6
- package/node_modules/@hcengineering/contact/types/analytics.d.ts.map +0 -1
- package/node_modules/@hcengineering/contact/types/avatar.d.ts +0 -12
- package/node_modules/@hcengineering/contact/types/avatar.d.ts.map +0 -1
- package/node_modules/@hcengineering/contact/types/cache.d.ts +0 -49
- package/node_modules/@hcengineering/contact/types/cache.d.ts.map +0 -1
- package/node_modules/@hcengineering/contact/types/index.d.ts +0 -367
- package/node_modules/@hcengineering/contact/types/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/contact/types/types.d.ts +0 -25
- package/node_modules/@hcengineering/contact/types/types.d.ts.map +0 -1
- package/node_modules/@hcengineering/contact/types/utils.d.ts +0 -110
- package/node_modules/@hcengineering/contact/types/utils.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/__tests__/client.test.d.ts +0 -2
- package/node_modules/@hcengineering/core/types/__tests__/client.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/__tests__/clone.test.d.ts +0 -2
- package/node_modules/@hcengineering/core/types/__tests__/clone.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/__tests__/collaboration.test.d.ts +0 -2
- package/node_modules/@hcengineering/core/types/__tests__/collaboration.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/__tests__/collaborators.test.d.ts +0 -2
- package/node_modules/@hcengineering/core/types/__tests__/collaborators.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/__tests__/common.test.d.ts +0 -2
- package/node_modules/@hcengineering/core/types/__tests__/common.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/__tests__/connection.d.ts +0 -4
- package/node_modules/@hcengineering/core/types/__tests__/connection.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/__tests__/contexts.test.d.ts +0 -2
- package/node_modules/@hcengineering/core/types/__tests__/contexts.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/__tests__/hierarchy.test.d.ts +0 -2
- package/node_modules/@hcengineering/core/types/__tests__/hierarchy.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/__tests__/lang.test.d.ts +0 -2
- package/node_modules/@hcengineering/core/types/__tests__/lang.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/__tests__/limiter-edge-cases.test.d.ts +0 -2
- package/node_modules/@hcengineering/core/types/__tests__/limiter-edge-cases.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/__tests__/limits.test.d.ts +0 -2
- package/node_modules/@hcengineering/core/types/__tests__/limits.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/__tests__/memdb.test.d.ts +0 -2
- package/node_modules/@hcengineering/core/types/__tests__/memdb.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/__tests__/minmodel.d.ts +0 -50
- package/node_modules/@hcengineering/core/types/__tests__/minmodel.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/__tests__/objvalue.test.d.ts +0 -2
- package/node_modules/@hcengineering/core/types/__tests__/objvalue.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/__tests__/operator-bugs.test.d.ts +0 -2
- package/node_modules/@hcengineering/core/types/__tests__/operator-bugs.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/__tests__/operator.test.d.ts +0 -2
- package/node_modules/@hcengineering/core/types/__tests__/operator.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/__tests__/rate-limiter.test.d.ts +0 -2
- package/node_modules/@hcengineering/core/types/__tests__/rate-limiter.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/__tests__/time.test.d.ts +0 -2
- package/node_modules/@hcengineering/core/types/__tests__/time.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/__tests__/utils.test.d.ts +0 -2
- package/node_modules/@hcengineering/core/types/__tests__/utils.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/backup.d.ts +0 -26
- package/node_modules/@hcengineering/core/types/backup.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/benchmark.d.ts +0 -19
- package/node_modules/@hcengineering/core/types/benchmark.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/classes.d.ts +0 -716
- package/node_modules/@hcengineering/core/types/classes.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/client.d.ts +0 -69
- package/node_modules/@hcengineering/core/types/client.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/clone.d.ts +0 -3
- package/node_modules/@hcengineering/core/types/clone.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/collaboration.d.ts +0 -16
- package/node_modules/@hcengineering/core/types/collaboration.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/collaborators.d.ts +0 -3
- package/node_modules/@hcengineering/core/types/collaborators.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/common.d.ts +0 -4
- package/node_modules/@hcengineering/core/types/common.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/component.d.ts +0 -229
- package/node_modules/@hcengineering/core/types/component.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/hierarchy.d.ts +0 -84
- package/node_modules/@hcengineering/core/types/hierarchy.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/index.d.ts +0 -25
- package/node_modules/@hcengineering/core/types/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/memdb.d.ts +0 -60
- package/node_modules/@hcengineering/core/types/memdb.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/objvalue.d.ts +0 -10
- package/node_modules/@hcengineering/core/types/objvalue.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/operations.d.ts +0 -87
- package/node_modules/@hcengineering/core/types/operations.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/operator.d.ts +0 -16
- package/node_modules/@hcengineering/core/types/operator.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/predicate.d.ts +0 -6
- package/node_modules/@hcengineering/core/types/predicate.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/proxy.d.ts +0 -21
- package/node_modules/@hcengineering/core/types/proxy.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/query.d.ts +0 -21
- package/node_modules/@hcengineering/core/types/query.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/server.d.ts +0 -82
- package/node_modules/@hcengineering/core/types/server.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/status.d.ts +0 -30
- package/node_modules/@hcengineering/core/types/status.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/storage.d.ts +0 -233
- package/node_modules/@hcengineering/core/types/storage.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/time.d.ts +0 -8
- package/node_modules/@hcengineering/core/types/time.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/tx.d.ts +0 -261
- package/node_modules/@hcengineering/core/types/tx.d.ts.map +0 -1
- package/node_modules/@hcengineering/core/types/utils.d.ts +0 -207
- package/node_modules/@hcengineering/core/types/utils.d.ts.map +0 -1
- package/node_modules/@hcengineering/measurements/types/__tests__/context.test.d.ts +0 -2
- package/node_modules/@hcengineering/measurements/types/__tests__/context.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/measurements/types/__tests__/index.test.d.ts +0 -2
- package/node_modules/@hcengineering/measurements/types/__tests__/index.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/measurements/types/__tests__/metrics.test.d.ts +0 -2
- package/node_modules/@hcengineering/measurements/types/__tests__/metrics.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/measurements/types/__tests__/performance.test.d.ts +0 -2
- package/node_modules/@hcengineering/measurements/types/__tests__/performance.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/measurements/types/context.d.ts +0 -64
- package/node_modules/@hcengineering/measurements/types/context.d.ts.map +0 -1
- package/node_modules/@hcengineering/measurements/types/index.d.ts +0 -12
- package/node_modules/@hcengineering/measurements/types/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/measurements/types/metrics.d.ts +0 -34
- package/node_modules/@hcengineering/measurements/types/metrics.d.ts.map +0 -1
- package/node_modules/@hcengineering/measurements/types/types.d.ts +0 -88
- package/node_modules/@hcengineering/measurements/types/types.d.ts.map +0 -1
- package/node_modules/@hcengineering/platform/types/__tests__/i18n.test.d.ts +0 -2
- package/node_modules/@hcengineering/platform/types/__tests__/i18n.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/platform/types/__tests__/ident.test.d.ts +0 -2
- package/node_modules/@hcengineering/platform/types/__tests__/ident.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/platform/types/__tests__/plugin.d.ts +0 -7
- package/node_modules/@hcengineering/platform/types/__tests__/plugin.d.ts.map +0 -1
- package/node_modules/@hcengineering/platform/types/__tests__/resource.test.d.ts +0 -2
- package/node_modules/@hcengineering/platform/types/__tests__/resource.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/platform/types/event.d.ts +0 -39
- package/node_modules/@hcengineering/platform/types/event.d.ts.map +0 -1
- package/node_modules/@hcengineering/platform/types/i18n.d.ts +0 -28
- package/node_modules/@hcengineering/platform/types/i18n.d.ts.map +0 -1
- package/node_modules/@hcengineering/platform/types/ident.d.ts +0 -14
- package/node_modules/@hcengineering/platform/types/ident.d.ts.map +0 -1
- package/node_modules/@hcengineering/platform/types/index.d.ts +0 -19
- package/node_modules/@hcengineering/platform/types/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/platform/types/metadata.d.ts +0 -38
- package/node_modules/@hcengineering/platform/types/metadata.d.ts.map +0 -1
- package/node_modules/@hcengineering/platform/types/platform.d.ts +0 -218
- package/node_modules/@hcengineering/platform/types/platform.d.ts.map +0 -1
- package/node_modules/@hcengineering/platform/types/resource.d.ts +0 -49
- package/node_modules/@hcengineering/platform/types/resource.d.ts.map +0 -1
- package/node_modules/@hcengineering/platform/types/status.d.ts +0 -60
- package/node_modules/@hcengineering/platform/types/status.d.ts.map +0 -1
- package/node_modules/@hcengineering/platform/types/testUtils.d.ts +0 -8
- package/node_modules/@hcengineering/platform/types/testUtils.d.ts.map +0 -1
- package/node_modules/@hcengineering/rank/types/__tests__/utils.test.d.ts +0 -2
- package/node_modules/@hcengineering/rank/types/__tests__/utils.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/rank/types/index.d.ts +0 -3
- package/node_modules/@hcengineering/rank/types/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/rank/types/types.d.ts +0 -2
- package/node_modules/@hcengineering/rank/types/types.d.ts.map +0 -1
- package/node_modules/@hcengineering/rank/types/utils.d.ts +0 -6
- package/node_modules/@hcengineering/rank/types/utils.d.ts.map +0 -1
- package/node_modules/@hcengineering/rpc/types/index.d.ts +0 -3
- package/node_modules/@hcengineering/rpc/types/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/rpc/types/rpc.d.ts +0 -96
- package/node_modules/@hcengineering/rpc/types/rpc.d.ts.map +0 -1
- package/node_modules/@hcengineering/rpc/types/sliding.d.ts +0 -11
- package/node_modules/@hcengineering/rpc/types/sliding.d.ts.map +0 -1
- package/node_modules/@hcengineering/rpc/types/test/rateLimit.spec.d.ts +0 -2
- package/node_modules/@hcengineering/rpc/types/test/rateLimit.spec.d.ts.map +0 -1
- package/node_modules/@hcengineering/tags/types/analytics.d.ts +0 -5
- package/node_modules/@hcengineering/tags/types/analytics.d.ts.map +0 -1
- package/node_modules/@hcengineering/tags/types/index.d.ts +0 -105
- package/node_modules/@hcengineering/tags/types/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/task/types/index.d.ts +0 -227
- package/node_modules/@hcengineering/task/types/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/task/types/utils.d.ts +0 -61
- package/node_modules/@hcengineering/task/types/utils.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/extensions.d.ts +0 -53
- package/node_modules/@hcengineering/text/types/extensions.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/index.d.ts +0 -13
- package/node_modules/@hcengineering/text/types/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/kit.d.ts +0 -12
- package/node_modules/@hcengineering/text/types/kit.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/kits/common-kit.d.ts +0 -72
- package/node_modules/@hcengineering/text/types/kits/common-kit.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/kits/server-kit.d.ts +0 -106
- package/node_modules/@hcengineering/text/types/kits/server-kit.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/marks/code.d.ts +0 -8
- package/node_modules/@hcengineering/text/types/marks/code.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/marks/colors.d.ts +0 -21
- package/node_modules/@hcengineering/text/types/marks/colors.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/marks/inlineComment.d.ts +0 -5
- package/node_modules/@hcengineering/text/types/marks/inlineComment.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/marks/noteBase.d.ts +0 -23
- package/node_modules/@hcengineering/text/types/marks/noteBase.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/marks/qmsInlineCommentMark.d.ts +0 -6
- package/node_modules/@hcengineering/text/types/marks/qmsInlineCommentMark.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/markup/__tests__/dsl.test.d.ts +0 -2
- package/node_modules/@hcengineering/text/types/markup/__tests__/dsl.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/markup/__tests__/utils.test.d.ts +0 -5
- package/node_modules/@hcengineering/text/types/markup/__tests__/utils.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/markup/utils.d.ts +0 -19
- package/node_modules/@hcengineering/text/types/markup/utils.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/nodes/codeblock.d.ts +0 -12
- package/node_modules/@hcengineering/text/types/nodes/codeblock.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/nodes/comment.d.ts +0 -6
- package/node_modules/@hcengineering/text/types/nodes/comment.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/nodes/embed.d.ts +0 -3
- package/node_modules/@hcengineering/text/types/nodes/embed.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/nodes/emoji.d.ts +0 -17
- package/node_modules/@hcengineering/text/types/nodes/emoji.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/nodes/file.d.ts +0 -13
- package/node_modules/@hcengineering/text/types/nodes/file.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/nodes/image.d.ts +0 -52
- package/node_modules/@hcengineering/text/types/nodes/image.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/nodes/index.d.ts +0 -11
- package/node_modules/@hcengineering/text/types/nodes/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/nodes/markdown.d.ts +0 -3
- package/node_modules/@hcengineering/text/types/nodes/markdown.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/nodes/mermaid.d.ts +0 -4
- package/node_modules/@hcengineering/text/types/nodes/mermaid.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/nodes/reference.d.ts +0 -18
- package/node_modules/@hcengineering/text/types/nodes/reference.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/nodes/todo.d.ts +0 -3
- package/node_modules/@hcengineering/text/types/nodes/todo.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/nodes/utils.d.ts +0 -6
- package/node_modules/@hcengineering/text/types/nodes/utils.d.ts.map +0 -1
- package/node_modules/@hcengineering/text/types/tiptapExtensions.d.ts +0 -28
- package/node_modules/@hcengineering/text/types/tiptapExtensions.d.ts.map +0 -1
- package/node_modules/@hcengineering/text-core/types/index.d.ts +0 -6
- package/node_modules/@hcengineering/text-core/types/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/text-core/types/markup/__tests__/traverse.test.d.ts +0 -2
- package/node_modules/@hcengineering/text-core/types/markup/__tests__/traverse.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/text-core/types/markup/__tests__/utils.test.d.ts +0 -2
- package/node_modules/@hcengineering/text-core/types/markup/__tests__/utils.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/text-core/types/markup/dsl.d.ts +0 -25
- package/node_modules/@hcengineering/text-core/types/markup/dsl.d.ts.map +0 -1
- package/node_modules/@hcengineering/text-core/types/markup/model.d.ts +0 -74
- package/node_modules/@hcengineering/text-core/types/markup/model.d.ts.map +0 -1
- package/node_modules/@hcengineering/text-core/types/markup/reference.d.ts +0 -15
- package/node_modules/@hcengineering/text-core/types/markup/reference.d.ts.map +0 -1
- package/node_modules/@hcengineering/text-core/types/markup/traverse.d.ts +0 -6
- package/node_modules/@hcengineering/text-core/types/markup/traverse.d.ts.map +0 -1
- package/node_modules/@hcengineering/text-core/types/markup/utils.d.ts +0 -25
- package/node_modules/@hcengineering/text-core/types/markup/utils.d.ts.map +0 -1
- package/node_modules/@hcengineering/text-html/types/__tests__/html.test.d.ts +0 -2
- package/node_modules/@hcengineering/text-html/types/__tests__/html.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/text-html/types/index.d.ts +0 -6
- package/node_modules/@hcengineering/text-html/types/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/text-html/types/parser.d.ts +0 -10
- package/node_modules/@hcengineering/text-html/types/parser.d.ts.map +0 -1
- package/node_modules/@hcengineering/text-html/types/serializer.d.ts +0 -9
- package/node_modules/@hcengineering/text-html/types/serializer.d.ts.map +0 -1
- package/node_modules/@hcengineering/text-markdown/types/__tests__/markdown.test.d.ts +0 -9
- package/node_modules/@hcengineering/text-markdown/types/__tests__/markdown.test.d.ts.map +0 -1
- package/node_modules/@hcengineering/text-markdown/types/compare.d.ts +0 -10
- package/node_modules/@hcengineering/text-markdown/types/compare.d.ts.map +0 -1
- package/node_modules/@hcengineering/text-markdown/types/index.d.ts +0 -14
- package/node_modules/@hcengineering/text-markdown/types/index.d.ts.map +0 -1
- package/node_modules/@hcengineering/text-markdown/types/marks.d.ts +0 -8
- package/node_modules/@hcengineering/text-markdown/types/marks.d.ts.map +0 -1
- package/node_modules/@hcengineering/text-markdown/types/node.d.ts +0 -4
- package/node_modules/@hcengineering/text-markdown/types/node.d.ts.map +0 -1
- package/node_modules/@hcengineering/text-markdown/types/parser.d.ts +0 -50
- package/node_modules/@hcengineering/text-markdown/types/parser.d.ts.map +0 -1
- package/node_modules/@hcengineering/text-markdown/types/serializer.d.ts +0 -102
- package/node_modules/@hcengineering/text-markdown/types/serializer.d.ts.map +0 -1
- package/node_modules/@hcengineering/tracker/types/analytics.d.ts +0 -24
- package/node_modules/@hcengineering/tracker/types/analytics.d.ts.map +0 -1
- package/node_modules/@hcengineering/tracker/types/index.d.ts +0 -431
- package/node_modules/@hcengineering/tracker/types/index.d.ts.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/status.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright \u00A9 2020, 2021 Anticrm Platform Contributors.\n//\n// Licensed under the Eclipse Public License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License. You may\n// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n//\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n\n/**\n * Anticrm Platform Foundation Types\n * @packageDocumentation\n */\n\nimport type { StatusCode } from './platform'\nimport platform from './platform'\n\n/**\n * Status severity\n * @public\n */\nexport enum Severity {\n OK = 'OK',\n INFO = 'INFO',\n WARNING = 'WARNING',\n ERROR = 'ERROR'\n}\n\n/**\n * Status of an operation\n * @public\n */\nexport class Status<P extends Record<string, any> = any> {\n readonly severity: Severity\n readonly code: StatusCode<P>\n readonly params: P\n\n constructor (severity: Severity, code: StatusCode<P>, params: P) {\n this.severity = severity\n this.code = code\n this.params = params\n }\n}\n\n/**\n * Error object wrapping `Status`\n * @public\n */\nexport class PlatformError<P extends Record<string, any>> extends Error {\n readonly status: Status<P>\n\n constructor (status: Status<P>) {\n super(`${status.severity}: ${status.code} ${JSON.stringify(status.params)}`)\n this.status = status\n }\n}\n\n/**\n * OK Status\n * @public\n */\nexport const OK = new Status(Severity.OK, platform.status.OK, {})\n\n/**\n * Error Status\n * @public\n */\nexport const ERROR = new Status(Severity.ERROR, platform.status.BadError, {})\n\n/**\n * Error Status for Unauthorized\n * @public\n */\nexport const UNAUTHORIZED = new Status(Severity.ERROR, platform.status.Unauthorized, {})\n\n/**\n * @public\n * @param message -\n * @returns\n */\nexport function unknownStatus (message: string): Status<any> {\n return new Status(Severity.ERROR, platform.status.UnknownError, { message })\n}\n\n/**\n * Creates unknown error status\n * @public\n */\nexport function unknownError (err: unknown): Status {\n if (err instanceof PlatformError) return err.status\n if (err instanceof Error) return unknownStatus(err.message)\n if (typeof err === 'string') return unknownStatus(err)\n return ERROR\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAqBA,sBAAqB;AAMd,IAAK,WAAL,kBAAKA,cAAL;AACL,EAAAA,UAAA,QAAK;AACL,EAAAA,UAAA,UAAO;AACP,EAAAA,UAAA,aAAU;AACV,EAAAA,UAAA,WAAQ;AAJE,SAAAA;AAAA,GAAA;AAWL,MAAM,OAA4C;AAAA,EAtCzD,OAsCyD;AAAA;AAAA;AAAA,EAC9C;AAAA,EACA;AAAA,EACA;AAAA,EAET,YAAa,UAAoB,MAAqB,QAAW;AAC/D,SAAK,WAAW;AAChB,SAAK,OAAO;AACZ,SAAK,SAAS;AAAA,EAChB;AACF;AAMO,MAAM,sBAAqD,MAAM;AAAA,EAtDxE,OAsDwE;AAAA;AAAA;AAAA,EAC7D;AAAA,EAET,YAAa,QAAmB;AAC9B,UAAM,GAAG,OAAO,QAAQ,KAAK,OAAO,IAAI,IAAI,KAAK,UAAU,OAAO,MAAM,CAAC,EAAE;AAC3E,SAAK,SAAS;AAAA,EAChB;AACF;AAMO,MAAM,KAAK,IAAI,OAAO,eAAa,gBAAAC,QAAS,OAAO,IAAI,CAAC,CAAC;AAMzD,MAAM,QAAQ,IAAI,OAAO,qBAAgB,gBAAAA,QAAS,OAAO,UAAU,CAAC,CAAC;AAMrE,MAAM,eAAe,IAAI,OAAO,qBAAgB,gBAAAA,QAAS,OAAO,cAAc,CAAC,CAAC;AAOhF,SAAS,cAAe,SAA8B;AAC3D,SAAO,IAAI,OAAO,qBAAgB,gBAAAA,QAAS,OAAO,cAAc,EAAE,QAAQ,CAAC;AAC7E;AAFgB;AAQT,SAAS,aAAc,KAAsB;AAClD,MAAI,eAAe,cAAe,QAAO,IAAI;AAC7C,MAAI,eAAe,MAAO,QAAO,cAAc,IAAI,OAAO;AAC1D,MAAI,OAAO,QAAQ,SAAU,QAAO,cAAc,GAAG;AACrD,SAAO;AACT;AALgB;",
|
|
4
|
+
"sourcesContent": ["//\n// Copyright \u00A9 2020, 2021 Anticrm Platform Contributors.\n//\n// Licensed under the Eclipse Public License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License. You may\n// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n//\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n\n/**\n * Anticrm Platform Foundation Types\n * @packageDocumentation\n */\n\nimport type { StatusCode } from './platform'\nimport platform from './platform'\n\n/**\n * Status severity\n * @public\n */\nexport enum Severity {\n OK = 'OK',\n INFO = 'INFO',\n WARNING = 'WARNING',\n ERROR = 'ERROR'\n}\n\n/**\n * Status of an operation\n * @public\n */\nexport class Status<P extends Record<string, any> = any> {\n readonly severity: Severity\n readonly code: StatusCode<P>\n readonly params: P\n\n constructor (severity: Severity, code: StatusCode<P>, params: P) {\n this.severity = severity\n this.code = code\n this.params = params\n }\n}\n\n/**\n * Error object wrapping `Status`\n * @public\n */\nexport class PlatformError<P extends Record<string, any>> extends Error {\n readonly status: Status<P>\n\n constructor (status: Status<P>) {\n super(`${status.severity}: ${status.code} ${JSON.stringify(status.params)}`)\n this.status = status\n }\n}\n\n/**\n * OK Status\n * @public\n */\nexport const OK = new Status(Severity.OK, platform.status.OK, {})\n\n/**\n * Error Status\n * @public\n */\nexport const ERROR = new Status(Severity.ERROR, platform.status.BadError, {})\n\n/**\n * Error Status for Unauthorized\n * @public\n */\nexport const UNAUTHORIZED = new Status(Severity.ERROR, platform.status.Unauthorized, {})\n\n/**\n * @public\n * @param message -\n * @returns\n */\nexport function unknownStatus (message: string): Status<any> {\n return new Status(Severity.ERROR, platform.status.UnknownError, { message })\n}\n\nfunction isStatusLike (err: unknown): err is Pick<Status, 'severity' | 'code' | 'params'> {\n if (typeof err !== 'object' || err === null) return false\n const o = err as Record<string, unknown>\n return (\n typeof o.severity === 'string' && typeof o.code === 'string' && typeof o.params === 'object' && o.params !== null\n )\n}\n\nfunction unwrapEmbeddedStatus (err: unknown): Status | undefined {\n if (typeof err !== 'object' || err === null || !('status' in err)) return undefined\n const st = (err as { status: unknown }).status\n if (!isStatusLike(st)) return undefined\n return new Status(st.severity as Severity, st.code, st.params)\n}\n\n/**\n * Normalizes a thrown or structured error value into a {@link Status} for RPC / telemetry.\n * @public\n */\nexport function errorToStatus (err: unknown): Status {\n if (err instanceof PlatformError) return err.status\n if (err instanceof Status) return err\n if (isStatusLike(err)) {\n return new Status(err.severity as Severity, err.code, err.params)\n }\n const status = unwrapEmbeddedStatus(err)\n if (status !== undefined) return status\n return unknownError(err)\n}\n\n/**\n * Creates unknown error status\n * @public\n */\nexport function unknownError (err: unknown): Status {\n if (err instanceof PlatformError) return err.status\n if (err instanceof Error) return unknownStatus(err.message)\n if (typeof err === 'string') return unknownStatus(err)\n return ERROR\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAqBA,sBAAqB;AAMd,IAAK,WAAL,kBAAKA,cAAL;AACL,EAAAA,UAAA,QAAK;AACL,EAAAA,UAAA,UAAO;AACP,EAAAA,UAAA,aAAU;AACV,EAAAA,UAAA,WAAQ;AAJE,SAAAA;AAAA,GAAA;AAWL,MAAM,OAA4C;AAAA,EAtCzD,OAsCyD;AAAA;AAAA;AAAA,EAC9C;AAAA,EACA;AAAA,EACA;AAAA,EAET,YAAa,UAAoB,MAAqB,QAAW;AAC/D,SAAK,WAAW;AAChB,SAAK,OAAO;AACZ,SAAK,SAAS;AAAA,EAChB;AACF;AAMO,MAAM,sBAAqD,MAAM;AAAA,EAtDxE,OAsDwE;AAAA;AAAA;AAAA,EAC7D;AAAA,EAET,YAAa,QAAmB;AAC9B,UAAM,GAAG,OAAO,QAAQ,KAAK,OAAO,IAAI,IAAI,KAAK,UAAU,OAAO,MAAM,CAAC,EAAE;AAC3E,SAAK,SAAS;AAAA,EAChB;AACF;AAMO,MAAM,KAAK,IAAI,OAAO,eAAa,gBAAAC,QAAS,OAAO,IAAI,CAAC,CAAC;AAMzD,MAAM,QAAQ,IAAI,OAAO,qBAAgB,gBAAAA,QAAS,OAAO,UAAU,CAAC,CAAC;AAMrE,MAAM,eAAe,IAAI,OAAO,qBAAgB,gBAAAA,QAAS,OAAO,cAAc,CAAC,CAAC;AAOhF,SAAS,cAAe,SAA8B;AAC3D,SAAO,IAAI,OAAO,qBAAgB,gBAAAA,QAAS,OAAO,cAAc,EAAE,QAAQ,CAAC;AAC7E;AAFgB;AAIhB,SAAS,aAAc,KAAmE;AACxF,MAAI,OAAO,QAAQ,YAAY,QAAQ,KAAM,QAAO;AACpD,QAAM,IAAI;AACV,SACE,OAAO,EAAE,aAAa,YAAY,OAAO,EAAE,SAAS,YAAY,OAAO,EAAE,WAAW,YAAY,EAAE,WAAW;AAEjH;AANS;AAQT,SAAS,qBAAsB,KAAkC;AAC/D,MAAI,OAAO,QAAQ,YAAY,QAAQ,QAAQ,EAAE,YAAY,KAAM,QAAO;AAC1E,QAAM,KAAM,IAA4B;AACxC,MAAI,CAAC,aAAa,EAAE,EAAG,QAAO;AAC9B,SAAO,IAAI,OAAO,GAAG,UAAsB,GAAG,MAAM,GAAG,MAAM;AAC/D;AALS;AAWF,SAAS,cAAe,KAAsB;AACnD,MAAI,eAAe,cAAe,QAAO,IAAI;AAC7C,MAAI,eAAe,OAAQ,QAAO;AAClC,MAAI,aAAa,GAAG,GAAG;AACrB,WAAO,IAAI,OAAO,IAAI,UAAsB,IAAI,MAAM,IAAI,MAAM;AAAA,EAClE;AACA,QAAM,SAAS,qBAAqB,GAAG;AACvC,MAAI,WAAW,OAAW,QAAO;AACjC,SAAO,aAAa,GAAG;AACzB;AATgB;AAeT,SAAS,aAAc,KAAsB;AAClD,MAAI,eAAe,cAAe,QAAO,IAAI;AAC7C,MAAI,eAAe,MAAO,QAAO,cAAc,IAAI,OAAO;AAC1D,MAAI,OAAO,QAAQ,SAAU,QAAO,cAAc,GAAG;AACrD,SAAO;AACT;AALgB;",
|
|
6
6
|
"names": ["Severity", "platform"]
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hcengineering/platform",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.423",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"svelte": "src/index.ts",
|
|
6
6
|
"types": "types/index.d.ts",
|
|
@@ -14,8 +14,18 @@
|
|
|
14
14
|
],
|
|
15
15
|
"author": "Anticrm Platform Contributors",
|
|
16
16
|
"license": "EPL-2.0",
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build": "compile",
|
|
19
|
+
"build:watch": "compile",
|
|
20
|
+
"test": "jest --passWithNoTests --silent --coverage",
|
|
21
|
+
"format": "format src",
|
|
22
|
+
"_phase:build": "compile transpile src",
|
|
23
|
+
"_phase:test": "jest --passWithNoTests --silent --coverage",
|
|
24
|
+
"_phase:format": "format src",
|
|
25
|
+
"_phase:validate": "compile validate"
|
|
26
|
+
},
|
|
17
27
|
"devDependencies": {
|
|
18
|
-
"@hcengineering/platform-rig": "^0.7.
|
|
28
|
+
"@hcengineering/platform-rig": "^0.7.423",
|
|
19
29
|
"@types/jest": "^29.5.5",
|
|
20
30
|
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
|
21
31
|
"@typescript-eslint/parser": "^6.21.0",
|
|
@@ -25,7 +35,7 @@
|
|
|
25
35
|
"eslint-plugin-n": "^15.4.0",
|
|
26
36
|
"eslint-plugin-promise": "^6.1.1",
|
|
27
37
|
"jest": "^29.7.0",
|
|
28
|
-
"prettier": "^3.
|
|
38
|
+
"prettier": "^3.6.2",
|
|
29
39
|
"ts-jest": "^29.1.1",
|
|
30
40
|
"typescript": "^5.9.3",
|
|
31
41
|
"eslint-plugin-svelte": "^2.35.1"
|
|
@@ -33,7 +43,10 @@
|
|
|
33
43
|
"dependencies": {
|
|
34
44
|
"intl-messageformat": "^10.7.14"
|
|
35
45
|
},
|
|
36
|
-
"repository":
|
|
46
|
+
"repository": {
|
|
47
|
+
"type": "git",
|
|
48
|
+
"url": "git+https://github.com/hcengineering/huly.core.git"
|
|
49
|
+
},
|
|
37
50
|
"publishConfig": {
|
|
38
51
|
"access": "public"
|
|
39
52
|
},
|
|
@@ -51,15 +64,5 @@
|
|
|
51
64
|
"require": "./lang",
|
|
52
65
|
"import": "./lang"
|
|
53
66
|
}
|
|
54
|
-
},
|
|
55
|
-
"scripts": {
|
|
56
|
-
"build": "compile",
|
|
57
|
-
"build:watch": "compile",
|
|
58
|
-
"test": "jest --passWithNoTests --silent --coverage",
|
|
59
|
-
"format": "format src",
|
|
60
|
-
"_phase:build": "compile transpile src",
|
|
61
|
-
"_phase:test": "jest --passWithNoTests --silent --coverage",
|
|
62
|
-
"_phase:format": "format src",
|
|
63
|
-
"_phase:validate": "compile validate"
|
|
64
67
|
}
|
|
65
|
-
}
|
|
68
|
+
}
|
|
@@ -15,12 +15,22 @@
|
|
|
15
15
|
//
|
|
16
16
|
|
|
17
17
|
import type { Plugin, IntlString } from '../platform'
|
|
18
|
-
import platform, { plugin } from '../platform'
|
|
18
|
+
import platform, { getEmbeddedLabel, plugin } from '../platform'
|
|
19
19
|
import { Severity, Status } from '../status'
|
|
20
20
|
|
|
21
|
-
import { addStringsLoader, translate } from '../i18n'
|
|
21
|
+
import { addStringsLoader, loadPluginStrings, translate, translateCB } from '../i18n'
|
|
22
22
|
import { addEventListener, PlatformEvent, removeEventListener } from '../event'
|
|
23
23
|
|
|
24
|
+
function translateCBAsync (
|
|
25
|
+
message: IntlString,
|
|
26
|
+
params: Record<string, any>,
|
|
27
|
+
language: string | undefined
|
|
28
|
+
): Promise<string> {
|
|
29
|
+
return new Promise((resolve) => {
|
|
30
|
+
translateCB(message, params, language, resolve)
|
|
31
|
+
})
|
|
32
|
+
}
|
|
33
|
+
|
|
24
34
|
const testId = 'test-strings' as Plugin
|
|
25
35
|
|
|
26
36
|
const test = plugin(testId, {
|
|
@@ -112,4 +122,106 @@ describe('i18n', () => {
|
|
|
112
122
|
expect(translated).toBe(message)
|
|
113
123
|
removeEventListener(PlatformEvent, eventListener)
|
|
114
124
|
})
|
|
125
|
+
|
|
126
|
+
it('translateCB should resolve with message when bad id (_parseId throws)', async () => {
|
|
127
|
+
expect.assertions(2)
|
|
128
|
+
const message = 'invalidIntlIdCB' as IntlString
|
|
129
|
+
const checkStatus = new Status(Severity.ERROR, platform.status.InvalidId, { id: message })
|
|
130
|
+
const eventListener = async (event: string, data: any): Promise<void> => {
|
|
131
|
+
expect(data).toEqual(checkStatus)
|
|
132
|
+
}
|
|
133
|
+
addEventListener(PlatformEvent, eventListener)
|
|
134
|
+
const out = await translateCBAsync(message, {}, 'en')
|
|
135
|
+
expect(out).toBe(message)
|
|
136
|
+
removeEventListener(PlatformEvent, eventListener)
|
|
137
|
+
})
|
|
138
|
+
|
|
139
|
+
it('translateCB should match translate for loaded string', async () => {
|
|
140
|
+
const fromTranslate = await translate(test.string.loadingPlugin, { plugin: 'cb' })
|
|
141
|
+
const fromCB = await translateCBAsync(test.string.loadingPlugin, { plugin: 'cb' }, 'en')
|
|
142
|
+
expect(fromCB).toBe(fromTranslate)
|
|
143
|
+
})
|
|
144
|
+
|
|
145
|
+
it('translate and translateCB should return embedded label text', async () => {
|
|
146
|
+
const embedded = getEmbeddedLabel('Embedded copy')
|
|
147
|
+
expect(await translate(embedded, {})).toBe('Embedded copy')
|
|
148
|
+
expect(await translateCBAsync(embedded, {}, 'en')).toBe('Embedded copy')
|
|
149
|
+
})
|
|
150
|
+
|
|
151
|
+
it('loadPluginStrings(force) should clear format cache so strings still resolve', async () => {
|
|
152
|
+
await translate(test.string.loadingPlugin, { plugin: 'before' })
|
|
153
|
+
await loadPluginStrings('en', true)
|
|
154
|
+
const after = await translate(test.string.loadingPlugin, { plugin: 'after' })
|
|
155
|
+
expect(after).toContain('after')
|
|
156
|
+
})
|
|
157
|
+
|
|
158
|
+
it('translate with skipError should not broadcast platform status (no loader)', async () => {
|
|
159
|
+
const pluginId = 'plugin-skip-error-no-loader'
|
|
160
|
+
const message = `${pluginId}:string:any` as IntlString
|
|
161
|
+
let events = 0
|
|
162
|
+
const listener = async (): Promise<void> => {
|
|
163
|
+
events++
|
|
164
|
+
}
|
|
165
|
+
addEventListener(PlatformEvent, listener)
|
|
166
|
+
await translate(message, {}, 'en', true)
|
|
167
|
+
removeEventListener(PlatformEvent, listener)
|
|
168
|
+
expect(events).toBe(0)
|
|
169
|
+
})
|
|
170
|
+
|
|
171
|
+
it('translate should return message id and emit status when ICU format params are missing', async () => {
|
|
172
|
+
const fmtPlugin = 'i18n-icu-format-test' as Plugin
|
|
173
|
+
addStringsLoader(fmtPlugin, async () => ({
|
|
174
|
+
string: {
|
|
175
|
+
badPlural: '{dias, plural, =0 {} other {#d}} {horas, plural, =0 {} other {#h}}'
|
|
176
|
+
}
|
|
177
|
+
}))
|
|
178
|
+
const message = `${fmtPlugin}:string:badPlural` as IntlString
|
|
179
|
+
expect.assertions(2)
|
|
180
|
+
let gotStatus = false
|
|
181
|
+
const listener = async (_event: string, data: any): Promise<void> => {
|
|
182
|
+
if (data instanceof Status) {
|
|
183
|
+
gotStatus = true
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
addEventListener(PlatformEvent, listener)
|
|
187
|
+
const out = await translate(message, { days: 1, hours: 2 } as any, 'en')
|
|
188
|
+
removeEventListener(PlatformEvent, listener)
|
|
189
|
+
expect(out).toBe(message)
|
|
190
|
+
expect(gotStatus).toBe(true)
|
|
191
|
+
})
|
|
192
|
+
|
|
193
|
+
it('translateCB should resolve to message id when ICU format params are missing', async () => {
|
|
194
|
+
const fmtPlugin = 'i18n-icu-format-test-cb' as Plugin
|
|
195
|
+
addStringsLoader(fmtPlugin, async () => ({
|
|
196
|
+
string: {
|
|
197
|
+
badPlural: '{dias, plural, =0 {} other {#d}}'
|
|
198
|
+
}
|
|
199
|
+
}))
|
|
200
|
+
const message = `${fmtPlugin}:string:badPlural` as IntlString
|
|
201
|
+
expect.assertions(2)
|
|
202
|
+
let gotStatus = false
|
|
203
|
+
const listener = async (_event: string, data: any): Promise<void> => {
|
|
204
|
+
if (data instanceof Status) {
|
|
205
|
+
gotStatus = true
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
addEventListener(PlatformEvent, listener)
|
|
209
|
+
const out = await translateCBAsync(message, { days: 1 }, 'en')
|
|
210
|
+
removeEventListener(PlatformEvent, listener)
|
|
211
|
+
expect(out).toBe(message)
|
|
212
|
+
expect(gotStatus).toBe(true)
|
|
213
|
+
})
|
|
214
|
+
|
|
215
|
+
it('translateCB should defer to translate when translation is not yet cached', async () => {
|
|
216
|
+
const deferPlugin = 'i18n-defer-translate' as Plugin
|
|
217
|
+
const deferMsg = `${deferPlugin}:string:only` as IntlString
|
|
218
|
+
addStringsLoader(deferPlugin, async (locale: string) => {
|
|
219
|
+
if (locale === 'en') {
|
|
220
|
+
return { string: { only: 'Deferred {v}' } }
|
|
221
|
+
}
|
|
222
|
+
return { string: { only: 'Deferred {v}' } }
|
|
223
|
+
})
|
|
224
|
+
const out = await translateCBAsync(deferMsg, { v: 'ok' }, 'en')
|
|
225
|
+
expect(out).toBe('Deferred ok')
|
|
226
|
+
})
|
|
115
227
|
})
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright © 2026 Hardcore Engineering Inc.
|
|
3
|
+
//
|
|
4
|
+
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
|
5
|
+
// you may not use this file except in compliance with the License.
|
|
6
|
+
// You may obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR ANY KIND, either express or implied.
|
|
11
|
+
//
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
//
|
|
15
|
+
|
|
16
|
+
import platform from '../platform'
|
|
17
|
+
import { ERROR, PlatformError, Severity, Status, UNAUTHORIZED, errorToStatus, unknownStatus } from '../status'
|
|
18
|
+
|
|
19
|
+
describe('errorToStatus', () => {
|
|
20
|
+
it('returns status from PlatformError', () => {
|
|
21
|
+
const err = new PlatformError(UNAUTHORIZED)
|
|
22
|
+
expect(errorToStatus(err)).toBe(UNAUTHORIZED)
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
it('returns same Status instance', () => {
|
|
26
|
+
const st = new Status(Severity.WARNING, platform.status.MaintenanceWarning, { time: 1, message: '' })
|
|
27
|
+
expect(errorToStatus(st)).toBe(st)
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
it('reconstructs from plain status-shaped object (duplicate package / JSON)', () => {
|
|
31
|
+
const plain = {
|
|
32
|
+
severity: UNAUTHORIZED.severity,
|
|
33
|
+
code: UNAUTHORIZED.code,
|
|
34
|
+
params: UNAUTHORIZED.params
|
|
35
|
+
}
|
|
36
|
+
expect(errorToStatus(plain)).toEqual(UNAUTHORIZED)
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
it('unwraps embedded .status (foreign PlatformError shape)', () => {
|
|
40
|
+
const workspaceUuid = 'd388f8f8-915c-4ef8-96f7-018147ce1234'
|
|
41
|
+
const embedded = {
|
|
42
|
+
status: {
|
|
43
|
+
severity: Severity.ERROR,
|
|
44
|
+
code: platform.status.WorkspaceNotFound,
|
|
45
|
+
params: { workspaceUuid }
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
expect(errorToStatus(embedded)).toMatchObject({
|
|
49
|
+
severity: Severity.ERROR,
|
|
50
|
+
code: platform.status.WorkspaceNotFound,
|
|
51
|
+
params: { workspaceUuid }
|
|
52
|
+
})
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
it('delegates Error to unknownError → unknownStatus', () => {
|
|
56
|
+
expect(errorToStatus(new Error('boom'))).toEqual(unknownStatus('boom'))
|
|
57
|
+
})
|
|
58
|
+
|
|
59
|
+
it('delegates string to unknownError → unknownStatus', () => {
|
|
60
|
+
expect(errorToStatus('nope')).toEqual(unknownStatus('nope'))
|
|
61
|
+
})
|
|
62
|
+
|
|
63
|
+
it('returns ERROR for unrecognized values', () => {
|
|
64
|
+
expect(errorToStatus(null)).toBe(ERROR)
|
|
65
|
+
expect(errorToStatus(undefined)).toBe(ERROR)
|
|
66
|
+
expect(errorToStatus(42)).toBe(ERROR)
|
|
67
|
+
expect(errorToStatus({})).toBe(ERROR)
|
|
68
|
+
})
|
|
69
|
+
|
|
70
|
+
it('ignores .status that is not status-shaped', () => {
|
|
71
|
+
expect(
|
|
72
|
+
errorToStatus({
|
|
73
|
+
status: { code: 'only-code' }
|
|
74
|
+
})
|
|
75
|
+
).toBe(ERROR)
|
|
76
|
+
})
|
|
77
|
+
})
|
|
@@ -64,11 +64,43 @@ export async function loadPluginStrings (locale: string, force: boolean = false)
|
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
async function
|
|
67
|
+
async function setStatus (status: Status, skipError?: boolean): Promise<void> {
|
|
68
|
+
if (skipError !== true) {
|
|
69
|
+
await setPlatformStatus(status)
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/** Notify platform and return a Status for load/resolve paths that do not use the per-message format cache. */
|
|
74
|
+
async function pipelineErrorToStatus (err: unknown, skipError?: boolean): Promise<Status> {
|
|
75
|
+
const status = unknownError(err)
|
|
76
|
+
await setStatus(status, skipError)
|
|
77
|
+
return status
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* On compile/resolve failure: cache failure for this intl id, notify platform, return `message` as UI fallback.
|
|
82
|
+
*/
|
|
83
|
+
async function handleIntlPipelineFailure (
|
|
84
|
+
err: unknown,
|
|
85
|
+
message: IntlString,
|
|
86
|
+
localeCache: Map<IntlString, IntlMessageFormat | Status>,
|
|
87
|
+
skipError?: boolean
|
|
88
|
+
): Promise<IntlString> {
|
|
89
|
+
const status = unknownError(err)
|
|
90
|
+
localeCache.set(message, status)
|
|
91
|
+
await setStatus(status, skipError)
|
|
92
|
+
return message
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
async function loadTranslationsForComponent (
|
|
96
|
+
plugin: Plugin,
|
|
97
|
+
locale: string,
|
|
98
|
+
skipError?: boolean
|
|
99
|
+
): Promise<Messages | Status> {
|
|
68
100
|
const loader = loaders.get(plugin)
|
|
69
101
|
if (loader === undefined) {
|
|
70
102
|
const status = new Status(Severity.ERROR, platform.status.NoLoaderForStrings, { plugin })
|
|
71
|
-
await
|
|
103
|
+
await setStatus(status, skipError)
|
|
72
104
|
return status
|
|
73
105
|
}
|
|
74
106
|
try {
|
|
@@ -78,9 +110,7 @@ async function loadTranslationsForComponent (plugin: Plugin, locale: string): Pr
|
|
|
78
110
|
try {
|
|
79
111
|
return (await loader('en')) as Record<string, IntlString> | Status
|
|
80
112
|
} catch (err: any) {
|
|
81
|
-
|
|
82
|
-
await setPlatformStatus(status)
|
|
83
|
-
return status
|
|
113
|
+
return await pipelineErrorToStatus(err, skipError)
|
|
84
114
|
}
|
|
85
115
|
}
|
|
86
116
|
}
|
|
@@ -104,7 +134,11 @@ function getCachedTranslation (id: _IdInfo, locale: string): IntlString | Status
|
|
|
104
134
|
}
|
|
105
135
|
}
|
|
106
136
|
|
|
107
|
-
async function getTranslation (
|
|
137
|
+
async function getTranslation (
|
|
138
|
+
id: _IdInfo,
|
|
139
|
+
locale: string,
|
|
140
|
+
skipError?: boolean
|
|
141
|
+
): Promise<IntlString | Status | undefined> {
|
|
108
142
|
try {
|
|
109
143
|
const localtTanslations = translations.get(locale) ?? new Map<Plugin, Messages | Status<any>>()
|
|
110
144
|
if (!translations.has(locale)) {
|
|
@@ -112,7 +146,7 @@ async function getTranslation (id: _IdInfo, locale: string): Promise<IntlString
|
|
|
112
146
|
}
|
|
113
147
|
let messages = localtTanslations.get(id.component)
|
|
114
148
|
if (messages === undefined) {
|
|
115
|
-
messages = await loadTranslationsForComponent(id.component, locale)
|
|
149
|
+
messages = await loadTranslationsForComponent(id.component, locale, skipError)
|
|
116
150
|
localtTanslations.set(id.component, messages)
|
|
117
151
|
}
|
|
118
152
|
if (messages instanceof Status) {
|
|
@@ -124,7 +158,7 @@ async function getTranslation (id: _IdInfo, locale: string): Promise<IntlString
|
|
|
124
158
|
} else {
|
|
125
159
|
let eng = englishTranslationsForMissing.get(id.component)
|
|
126
160
|
if (eng === undefined) {
|
|
127
|
-
eng = await loadTranslationsForComponent(id.component, 'en')
|
|
161
|
+
eng = await loadTranslationsForComponent(id.component, 'en', skipError)
|
|
128
162
|
englishTranslationsForMissing.set(id.component, eng)
|
|
129
163
|
}
|
|
130
164
|
if (eng instanceof Status) {
|
|
@@ -136,9 +170,7 @@ async function getTranslation (id: _IdInfo, locale: string): Promise<IntlString
|
|
|
136
170
|
return messages[id.name] as IntlString
|
|
137
171
|
}
|
|
138
172
|
} catch (err) {
|
|
139
|
-
|
|
140
|
-
await setPlatformStatus(status)
|
|
141
|
-
return status
|
|
173
|
+
return await pipelineErrorToStatus(err, skipError)
|
|
142
174
|
}
|
|
143
175
|
}
|
|
144
176
|
|
|
@@ -151,40 +183,37 @@ async function getTranslation (id: _IdInfo, locale: string): Promise<IntlString
|
|
|
151
183
|
export async function translate<P extends Record<string, any>> (
|
|
152
184
|
message: IntlString<P>,
|
|
153
185
|
params: P,
|
|
154
|
-
language?: string
|
|
186
|
+
language?: string,
|
|
187
|
+
skipError?: boolean
|
|
155
188
|
): Promise<string> {
|
|
156
189
|
const locale = language ?? getMetadata(platform.metadata.locale) ?? 'en'
|
|
157
190
|
const localCache = cache.get(locale) ?? new Map<IntlString, IntlMessageFormat | Status>()
|
|
158
191
|
if (!cache.has(locale)) {
|
|
159
192
|
cache.set(locale, localCache)
|
|
160
193
|
}
|
|
161
|
-
|
|
194
|
+
try {
|
|
195
|
+
const compiled = localCache.get(message)
|
|
162
196
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
return message
|
|
166
|
-
}
|
|
167
|
-
return compiled.format(params)
|
|
168
|
-
} else {
|
|
169
|
-
try {
|
|
170
|
-
const id = _parseId(message)
|
|
171
|
-
if (id.component === _EmbeddedId) {
|
|
172
|
-
return id.name
|
|
173
|
-
}
|
|
174
|
-
const translation = getCachedTranslation(id, locale) ?? (await getTranslation(id, locale)) ?? message
|
|
175
|
-
if (translation instanceof Status) {
|
|
176
|
-
localCache.set(message, translation)
|
|
197
|
+
if (compiled !== undefined) {
|
|
198
|
+
if (compiled instanceof Status) {
|
|
177
199
|
return message
|
|
178
200
|
}
|
|
179
|
-
const compiled = new IntlMessageFormat(translation, locale, undefined, { ignoreTag: true })
|
|
180
|
-
localCache.set(message, compiled)
|
|
181
201
|
return compiled.format(params)
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
202
|
+
}
|
|
203
|
+
const id = _parseId(message)
|
|
204
|
+
if (id.component === _EmbeddedId) {
|
|
205
|
+
return id.name
|
|
206
|
+
}
|
|
207
|
+
const translation = getCachedTranslation(id, locale) ?? (await getTranslation(id, locale, skipError)) ?? message
|
|
208
|
+
if (translation instanceof Status) {
|
|
209
|
+
localCache.set(message, translation)
|
|
186
210
|
return message
|
|
187
211
|
}
|
|
212
|
+
const compiledNew = new IntlMessageFormat(translation, locale, undefined, { ignoreTag: true })
|
|
213
|
+
localCache.set(message, compiledNew)
|
|
214
|
+
return compiledNew.format(params)
|
|
215
|
+
} catch (err) {
|
|
216
|
+
return await handleIntlPipelineFailure(err, message, localCache, skipError)
|
|
188
217
|
}
|
|
189
218
|
}
|
|
190
219
|
/**
|
|
@@ -194,53 +223,52 @@ export function translateCB<P extends Record<string, any>> (
|
|
|
194
223
|
message: IntlString<P>,
|
|
195
224
|
params: P,
|
|
196
225
|
language: string | undefined,
|
|
197
|
-
resolve: (value: string) => void
|
|
226
|
+
resolve: (value: string) => void,
|
|
227
|
+
skipError?: boolean
|
|
198
228
|
): void {
|
|
199
229
|
const locale = language ?? getMetadata(platform.metadata.locale) ?? 'en'
|
|
200
230
|
const localCache = cache.get(locale) ?? new Map<IntlString, IntlMessageFormat | Status>()
|
|
201
231
|
if (!cache.has(locale)) {
|
|
202
232
|
cache.set(locale, localCache)
|
|
203
233
|
}
|
|
204
|
-
|
|
234
|
+
try {
|
|
235
|
+
const compiled = localCache.get(message)
|
|
205
236
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
237
|
+
if (compiled !== undefined) {
|
|
238
|
+
if (compiled instanceof Status) {
|
|
239
|
+
resolve(message)
|
|
240
|
+
return
|
|
241
|
+
}
|
|
242
|
+
resolve(compiled.format(params))
|
|
243
|
+
} else {
|
|
244
|
+
let id: _IdInfo
|
|
245
|
+
try {
|
|
246
|
+
id = _parseId(message)
|
|
247
|
+
if (id.component === _EmbeddedId) {
|
|
248
|
+
resolve(id.name)
|
|
249
|
+
return
|
|
250
|
+
}
|
|
251
|
+
} catch (err) {
|
|
252
|
+
void handleIntlPipelineFailure(err, message, localCache, skipError).then(resolve)
|
|
253
|
+
return
|
|
254
|
+
}
|
|
255
|
+
const translation = getCachedTranslation(id, locale)
|
|
256
|
+
if (translation === undefined || translation instanceof Status) {
|
|
257
|
+
void translate(message, params, language, skipError)
|
|
258
|
+
.then((res) => {
|
|
259
|
+
resolve(res)
|
|
260
|
+
})
|
|
261
|
+
.catch((err) => {
|
|
262
|
+
void handleIntlPipelineFailure(err, message, localCache, skipError).then(resolve)
|
|
263
|
+
})
|
|
218
264
|
return
|
|
219
265
|
}
|
|
220
|
-
} catch (err) {
|
|
221
|
-
const status = unknownError(err)
|
|
222
|
-
void setPlatformStatus(status)
|
|
223
|
-
localCache.set(message, status)
|
|
224
|
-
resolve(message)
|
|
225
|
-
return
|
|
226
|
-
}
|
|
227
|
-
const translation = getCachedTranslation(id, locale)
|
|
228
|
-
if (translation === undefined || translation instanceof Status) {
|
|
229
|
-
void translate(message, params, language)
|
|
230
|
-
.then((res) => {
|
|
231
|
-
resolve(res)
|
|
232
|
-
})
|
|
233
|
-
.catch((err) => {
|
|
234
|
-
const status = unknownError(err)
|
|
235
|
-
void setPlatformStatus(status)
|
|
236
|
-
localCache.set(message, status)
|
|
237
|
-
resolve(message)
|
|
238
|
-
})
|
|
239
|
-
return
|
|
240
|
-
}
|
|
241
266
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
267
|
+
const compiledNew = new IntlMessageFormat(translation, locale, undefined, { ignoreTag: true })
|
|
268
|
+
localCache.set(message, compiledNew)
|
|
269
|
+
resolve(compiledNew.format(params))
|
|
270
|
+
}
|
|
271
|
+
} catch (err) {
|
|
272
|
+
void handleIntlPipelineFailure(err, message, localCache, skipError).then(resolve)
|
|
245
273
|
}
|
|
246
274
|
}
|
|
@@ -88,6 +88,36 @@ export function unknownStatus (message: string): Status<any> {
|
|
|
88
88
|
return new Status(Severity.ERROR, platform.status.UnknownError, { message })
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
+
function isStatusLike (err: unknown): err is Pick<Status, 'severity' | 'code' | 'params'> {
|
|
92
|
+
if (typeof err !== 'object' || err === null) return false
|
|
93
|
+
const o = err as Record<string, unknown>
|
|
94
|
+
return (
|
|
95
|
+
typeof o.severity === 'string' && typeof o.code === 'string' && typeof o.params === 'object' && o.params !== null
|
|
96
|
+
)
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function unwrapEmbeddedStatus (err: unknown): Status | undefined {
|
|
100
|
+
if (typeof err !== 'object' || err === null || !('status' in err)) return undefined
|
|
101
|
+
const st = (err as { status: unknown }).status
|
|
102
|
+
if (!isStatusLike(st)) return undefined
|
|
103
|
+
return new Status(st.severity as Severity, st.code, st.params)
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Normalizes a thrown or structured error value into a {@link Status} for RPC / telemetry.
|
|
108
|
+
* @public
|
|
109
|
+
*/
|
|
110
|
+
export function errorToStatus (err: unknown): Status {
|
|
111
|
+
if (err instanceof PlatformError) return err.status
|
|
112
|
+
if (err instanceof Status) return err
|
|
113
|
+
if (isStatusLike(err)) {
|
|
114
|
+
return new Status(err.severity as Severity, err.code, err.params)
|
|
115
|
+
}
|
|
116
|
+
const status = unwrapEmbeddedStatus(err)
|
|
117
|
+
if (status !== undefined) return status
|
|
118
|
+
return unknownError(err)
|
|
119
|
+
}
|
|
120
|
+
|
|
91
121
|
/**
|
|
92
122
|
* Creates unknown error status
|
|
93
123
|
* @public
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hcengineering/rank",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.423",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"svelte": "src/index.ts",
|
|
6
6
|
"types": "types/index.d.ts",
|
|
@@ -13,8 +13,18 @@
|
|
|
13
13
|
],
|
|
14
14
|
"author": "Anticrm Platform Contributors",
|
|
15
15
|
"license": "EPL-2.0",
|
|
16
|
+
"scripts": {
|
|
17
|
+
"_phase:build": "compile transpile src",
|
|
18
|
+
"_phase:validate": "compile validate",
|
|
19
|
+
"_phase:test": "jest --passWithNoTests --silent --coverage",
|
|
20
|
+
"_phase:format": "format src",
|
|
21
|
+
"build": "compile",
|
|
22
|
+
"test": "jest --passWithNoTests --silent --coverage",
|
|
23
|
+
"build:watch": "compile",
|
|
24
|
+
"format": "format src"
|
|
25
|
+
},
|
|
16
26
|
"devDependencies": {
|
|
17
|
-
"@hcengineering/platform-rig": "^0.7.
|
|
27
|
+
"@hcengineering/platform-rig": "^0.7.423",
|
|
18
28
|
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
|
19
29
|
"@typescript-eslint/parser": "^6.21.0",
|
|
20
30
|
"eslint-config-standard-with-typescript": "^40.0.0",
|
|
@@ -22,7 +32,7 @@
|
|
|
22
32
|
"eslint-plugin-n": "^15.4.0",
|
|
23
33
|
"eslint-plugin-promise": "^6.1.1",
|
|
24
34
|
"eslint": "^8.54.0",
|
|
25
|
-
"prettier": "^3.
|
|
35
|
+
"prettier": "^3.6.2",
|
|
26
36
|
"jest": "^29.7.0",
|
|
27
37
|
"ts-jest": "^29.1.1",
|
|
28
38
|
"@types/jest": "^29.5.5",
|
|
@@ -30,10 +40,13 @@
|
|
|
30
40
|
"eslint-plugin-svelte": "^2.35.1"
|
|
31
41
|
},
|
|
32
42
|
"dependencies": {
|
|
33
|
-
"@hcengineering/core": "^0.7.
|
|
43
|
+
"@hcengineering/core": "^0.7.423",
|
|
34
44
|
"lexorank": "~1.0.4"
|
|
35
45
|
},
|
|
36
|
-
"repository":
|
|
46
|
+
"repository": {
|
|
47
|
+
"type": "git",
|
|
48
|
+
"url": "git+https://github.com/hcengineering/huly.core.git"
|
|
49
|
+
},
|
|
37
50
|
"publishConfig": {
|
|
38
51
|
"access": "public"
|
|
39
52
|
},
|
|
@@ -43,15 +56,5 @@
|
|
|
43
56
|
"require": "./lib/index.js",
|
|
44
57
|
"import": "./lib/index.js"
|
|
45
58
|
}
|
|
46
|
-
},
|
|
47
|
-
"scripts": {
|
|
48
|
-
"_phase:build": "compile transpile src",
|
|
49
|
-
"_phase:validate": "compile validate",
|
|
50
|
-
"_phase:test": "jest --passWithNoTests --silent --coverage",
|
|
51
|
-
"_phase:format": "format src",
|
|
52
|
-
"build": "compile",
|
|
53
|
-
"test": "jest --passWithNoTests --silent --coverage",
|
|
54
|
-
"build:watch": "compile",
|
|
55
|
-
"format": "format src"
|
|
56
59
|
}
|
|
57
|
-
}
|
|
60
|
+
}
|