@plumile/ui 0.1.112 → 0.1.114
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/lib/esm/_virtual/_rolldown/runtime.js +5 -5
- package/lib/esm/atomic/molecules/markdown/components/MarkdownArticleContainer.css.js +0 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownLink.css.js +1 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/architecture-7EHR7CIX.js +3 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-4EGX6M5U.js +37 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-4EGX6M5U.js.map +1 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-5DO6E6H7.js +25 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-5DO6E6H7.js.map +1 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-LIHQZDEY.js → chunk-BR22UD5L.js} +18 -21
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-BR22UD5L.js.map +1 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-FHYWG6QK.js +25 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-FHYWG6QK.js.map +1 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-MPE355IW.js +25 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-MPE355IW.js.map +1 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-MZUSXYTE.js +32 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-MZUSXYTE.js.map +1 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-N66VUXT2.js +56 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-N66VUXT2.js.map +1 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-NNHCCRGN.js +20648 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-NNHCCRGN.js.map +1 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-PUPMXCY4.js +25 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-PUPMXCY4.js.map +1 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-UIBZB4QT.js +25 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-UIBZB4QT.js.map +1 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-WCWK7LTN.js +33 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-WCWK7LTN.js.map +1 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/eventmodeling-FCH6USID.js +3 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/gitGraph-WXDBUCRP.js +3 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/info-J43DQDTF.js +3 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/packet-YPE3B663.js +3 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/pie-LRSECV5Y.js +3 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/radar-GUYGQ44K.js +3 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treeView-BLDUP644.js +3 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treemap-LRROVOQU.js +3 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/wardley-L42UT6IY.js +3 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/mermaid-parser.core.js +24 -19
- package/lib/esm/node_modules/@mermaid-js/parser/dist/mermaid-parser.core.js.map +1 -1
- package/lib/esm/node_modules/dagre-d3-es/src/dagre/greedy-fas.js +8 -8
- package/lib/esm/node_modules/dagre-d3-es/src/dagre/layout.js +105 -105
- package/lib/esm/node_modules/dagre-d3-es/src/dagre/nesting-graph.js +12 -12
- package/lib/esm/node_modules/dagre-d3-es/src/dagre/order/cross-count.js +8 -8
- package/lib/esm/node_modules/dagre-d3-es/src/dagre/order/index.js +12 -12
- package/lib/esm/node_modules/dagre-d3-es/src/dagre/order/init-order.js +6 -6
- package/lib/esm/node_modules/dagre-d3-es/src/dagre/order/resolve-conflicts.js +7 -7
- package/lib/esm/node_modules/dagre-d3-es/src/dagre/order/sort-subgraph.js +9 -9
- package/lib/esm/node_modules/dagre-d3-es/src/dagre/order/sort.js +7 -7
- package/lib/esm/node_modules/dagre-d3-es/src/dagre/position/bk.js +53 -53
- package/lib/esm/node_modules/dagre-d3-es/src/dagre/position/index.js +5 -5
- package/lib/esm/node_modules/dagre-d3-es/src/dagre/rank/network-simplex.js +26 -26
- package/lib/esm/node_modules/dagre-d3-es/src/dagre/rank/util.js +9 -9
- package/lib/esm/node_modules/dagre-d3-es/src/dagre/util.js +54 -54
- package/lib/esm/node_modules/dagre-d3-es/src/graphlib/graph.js +45 -45
- package/lib/esm/node_modules/dagre-d3-es/src/graphlib/json.js +18 -18
- package/lib/esm/node_modules/lodash-es/_arrayLikeKeys.js +8 -8
- package/lib/esm/node_modules/lodash-es/_baseAssign.js +3 -3
- package/lib/esm/node_modules/lodash-es/_baseClone.js +24 -24
- package/lib/esm/node_modules/lodash-es/_baseForOwn.js +3 -3
- package/lib/esm/node_modules/lodash-es/_baseGetAllKeys.js +3 -3
- package/lib/esm/node_modules/lodash-es/_baseIsEqualDeep.js +12 -12
- package/lib/esm/node_modules/lodash-es/_baseIteratee.js +4 -4
- package/lib/esm/node_modules/lodash-es/_baseMatchesProperty.js +9 -9
- package/lib/esm/node_modules/lodash-es/_baseMerge.js +6 -6
- package/lib/esm/node_modules/lodash-es/_baseMergeDeep.js +15 -15
- package/lib/esm/node_modules/lodash-es/_baseOrderBy.js +14 -14
- package/lib/esm/node_modules/lodash-es/_baseSet.js +8 -8
- package/lib/esm/node_modules/lodash-es/_baseSetToString.js +5 -5
- package/lib/esm/node_modules/lodash-es/_baseToString.js +11 -11
- package/lib/esm/node_modules/lodash-es/_baseUniq.js +7 -7
- package/lib/esm/node_modules/lodash-es/_copySymbols.js +3 -3
- package/lib/esm/node_modules/lodash-es/_createSet.js +6 -6
- package/lib/esm/node_modules/lodash-es/_equalByTag.js +18 -18
- package/lib/esm/node_modules/lodash-es/_flatRest.js +4 -4
- package/lib/esm/node_modules/lodash-es/_getAllKeys.js +3 -3
- package/lib/esm/node_modules/lodash-es/_getAllKeysIn.js +4 -4
- package/lib/esm/node_modules/lodash-es/_getSymbolsIn.js +3 -3
- package/lib/esm/node_modules/lodash-es/_hasPath.js +5 -5
- package/lib/esm/node_modules/lodash-es/_initCloneObject.js +4 -4
- package/lib/esm/node_modules/lodash-es/_isFlattenable.js +3 -3
- package/lib/esm/node_modules/lodash-es/_isIterateeCall.js +6 -6
- package/lib/esm/node_modules/lodash-es/_mapCacheClear.js +6 -6
- package/lib/esm/node_modules/lodash-es/findIndex.js +4 -4
- package/lib/esm/node_modules/lodash-es/forEach.js +3 -3
- package/lib/esm/node_modules/lodash-es/forIn.js +3 -3
- package/lib/esm/node_modules/lodash-es/isEmpty.js +8 -8
- package/lib/esm/node_modules/lodash-es/isPlainObject.js +4 -4
- package/lib/esm/node_modules/lodash-es/isString.js +3 -3
- package/lib/esm/node_modules/lodash-es/keys.js +4 -4
- package/lib/esm/node_modules/lodash-es/keysIn.js +3 -3
- package/lib/esm/node_modules/lodash-es/map.js +3 -3
- package/lib/esm/node_modules/lodash-es/mapValues.js +5 -5
- package/lib/esm/node_modules/lodash-es/max.js +3 -3
- package/lib/esm/node_modules/lodash-es/min.js +3 -3
- package/lib/esm/node_modules/lodash-es/minBy.js +3 -3
- package/lib/esm/node_modules/lodash-es/reduce.js +5 -5
- package/lib/esm/node_modules/lodash-es/size.js +4 -4
- package/lib/esm/node_modules/lodash-es/sortBy.js +6 -6
- package/lib/esm/node_modules/lodash-es/union.js +6 -6
- package/lib/esm/node_modules/mermaid/dist/chunks/mermaid.core/chunk-5PVQY5BW.js +146 -146
- package/lib/esm/node_modules/mermaid/dist/chunks/mermaid.core/chunk-5PVQY5BW.js.map +1 -1
- package/lib/esm/node_modules/mermaid/dist/mermaid.core.js +374 -374
- package/lib/esm/node_modules/mermaid/dist/mermaid.core.js.map +1 -1
- package/package.json +6 -6
- package/lib/esm/node_modules/@chevrotain/gast/lib/src/helpers.js +0 -27
- package/lib/esm/node_modules/@chevrotain/gast/lib/src/helpers.js.map +0 -1
- package/lib/esm/node_modules/@chevrotain/gast/lib/src/model.js +0 -155
- package/lib/esm/node_modules/@chevrotain/gast/lib/src/model.js.map +0 -1
- package/lib/esm/node_modules/@chevrotain/gast/lib/src/visitor.js +0 -45
- package/lib/esm/node_modules/@chevrotain/gast/lib/src/visitor.js.map +0 -1
- package/lib/esm/node_modules/@chevrotain/regexp-to-ast/lib/src/api.js +0 -2
- package/lib/esm/node_modules/@chevrotain/regexp-to-ast/lib/src/base-regexp-visitor.js +0 -89
- package/lib/esm/node_modules/@chevrotain/regexp-to-ast/lib/src/base-regexp-visitor.js.map +0 -1
- package/lib/esm/node_modules/@chevrotain/regexp-to-ast/lib/src/character-classes.js +0 -39
- package/lib/esm/node_modules/@chevrotain/regexp-to-ast/lib/src/character-classes.js.map +0 -1
- package/lib/esm/node_modules/@chevrotain/regexp-to-ast/lib/src/regexp-parser.js +0 -600
- package/lib/esm/node_modules/@chevrotain/regexp-to-ast/lib/src/regexp-parser.js.map +0 -1
- package/lib/esm/node_modules/@chevrotain/regexp-to-ast/lib/src/utils.js +0 -29
- package/lib/esm/node_modules/@chevrotain/regexp-to-ast/lib/src/utils.js.map +0 -1
- package/lib/esm/node_modules/@chevrotain/utils/lib/src/print.js +0 -13
- package/lib/esm/node_modules/@chevrotain/utils/lib/src/print.js.map +0 -1
- package/lib/esm/node_modules/@chevrotain/utils/lib/src/timer.js +0 -12
- package/lib/esm/node_modules/@chevrotain/utils/lib/src/timer.js.map +0 -1
- package/lib/esm/node_modules/@chevrotain/utils/lib/src/to-fast-properties.js +0 -14
- package/lib/esm/node_modules/@chevrotain/utils/lib/src/to-fast-properties.js.map +0 -1
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/architecture-YZFGNWBL.js +0 -3
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-2KRD3SAO.js +0 -28
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-2KRD3SAO.js.map +0 -1
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-67CJDMHE.js +0 -28
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-67CJDMHE.js.map +0 -1
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-7N4EOEYR.js +0 -40
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-7N4EOEYR.js.map +0 -1
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-AA7GKIK3.js +0 -35
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-AA7GKIK3.js.map +0 -1
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-CIAEETIT.js +0 -28
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-CIAEETIT.js.map +0 -1
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-FOC6F5B3.js +0 -28
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-FOC6F5B3.js.map +0 -1
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-K5T4RW27.js +0 -1210
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-K5T4RW27.js.map +0 -1
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-KGLVRYIC.js +0 -28
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-KGLVRYIC.js.map +0 -1
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-LIHQZDEY.js.map +0 -1
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-ORNJ4GCN.js +0 -36
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-ORNJ4GCN.js.map +0 -1
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/gitGraph-7Q5UKJZL.js +0 -3
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/info-OMHHGYJF.js +0 -3
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/packet-4T2RLAQJ.js +0 -3
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/pie-ZZUOXDRM.js +0 -3
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/radar-PYXPWWZC.js +0 -3
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treeView-SZITEDCU.js +0 -3
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treemap-W4RFUUIX.js +0 -3
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/wardley-RL74JXVD.js +0 -3
- package/lib/esm/node_modules/chevrotain/lib/src/api.js +0 -10
- package/lib/esm/node_modules/chevrotain/lib/src/lang/lang_extensions.js +0 -14
- package/lib/esm/node_modules/chevrotain/lib/src/lang/lang_extensions.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/constants.js +0 -6
- package/lib/esm/node_modules/chevrotain/lib/src/parse/constants.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/cst/cst.js +0 -17
- package/lib/esm/node_modules/chevrotain/lib/src/parse/cst/cst.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/cst/cst_visitor.js +0 -53
- package/lib/esm/node_modules/chevrotain/lib/src/parse/cst/cst_visitor.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/errors_public.js +0 -81
- package/lib/esm/node_modules/chevrotain/lib/src/parse/errors_public.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/exceptions_public.js +0 -37
- package/lib/esm/node_modules/chevrotain/lib/src/parse/exceptions_public.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/checks.js +0 -279
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/checks.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/first.js +0 -27
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/first.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/follow.js +0 -32
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/follow.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/gast/gast_resolver_public.js +0 -18
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/gast/gast_resolver_public.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/interpreter.js +0 -269
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/interpreter.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/keys.js +0 -8
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/keys.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/llk_lookahead.js +0 -45
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/llk_lookahead.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/lookahead.js +0 -245
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/lookahead.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/resolver.js +0 -34
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/resolver.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/rest.js +0 -60
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/rest.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/parser.js +0 -118
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/parser.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/error_handler.js +0 -50
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/error_handler.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/gast_recorder.js +0 -170
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/gast_recorder.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/lexer_adapter.js +0 -47
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/lexer_adapter.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/looksahead.js +0 -111
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/looksahead.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/perf_tracer.js +0 -25
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/perf_tracer.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_api.js +0 -316
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_api.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_engine.js +0 -291
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_engine.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/recoverable.js +0 -147
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/recoverable.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/tree_builder.js +0 -96
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/tree_builder.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/utils/apply_mixins.js +0 -15
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/utils/apply_mixins.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/scan/lexer.js +0 -439
- package/lib/esm/node_modules/chevrotain/lib/src/scan/lexer.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/scan/lexer_errors_public.js +0 -13
- package/lib/esm/node_modules/chevrotain/lib/src/scan/lexer_errors_public.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/scan/lexer_public.js +0 -257
- package/lib/esm/node_modules/chevrotain/lib/src/scan/lexer_public.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/scan/reg_exp.js +0 -157
- package/lib/esm/node_modules/chevrotain/lib/src/scan/reg_exp.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/scan/reg_exp_parser.js +0 -19
- package/lib/esm/node_modules/chevrotain/lib/src/scan/reg_exp_parser.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/scan/tokens.js +0 -68
- package/lib/esm/node_modules/chevrotain/lib/src/scan/tokens.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/scan/tokens_public.js +0 -43
- package/lib/esm/node_modules/chevrotain/lib/src/scan/tokens_public.js.map +0 -1
- package/lib/esm/node_modules/chevrotain-allstar/lib/all-star-lookahead.js +0 -365
- package/lib/esm/node_modules/chevrotain-allstar/lib/all-star-lookahead.js.map +0 -1
- package/lib/esm/node_modules/chevrotain-allstar/lib/atn.js +0 -197
- package/lib/esm/node_modules/chevrotain-allstar/lib/atn.js.map +0 -1
- package/lib/esm/node_modules/chevrotain-allstar/lib/dfa.js +0 -35
- package/lib/esm/node_modules/chevrotain-allstar/lib/dfa.js.map +0 -1
- package/lib/esm/node_modules/chevrotain-allstar/lib/index.js +0 -1
- package/lib/esm/node_modules/langium/lib/default-module.js +0 -89
- package/lib/esm/node_modules/langium/lib/default-module.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/dependency-injection.js +0 -62
- package/lib/esm/node_modules/langium/lib/dependency-injection.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/documentation/comment-provider.js +0 -15
- package/lib/esm/node_modules/langium/lib/documentation/comment-provider.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/documentation/documentation-provider.js +0 -40
- package/lib/esm/node_modules/langium/lib/documentation/documentation-provider.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/documentation/jsdoc.js +0 -307
- package/lib/esm/node_modules/langium/lib/documentation/jsdoc.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/languages/generated/ast.js +0 -900
- package/lib/esm/node_modules/langium/lib/languages/generated/ast.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/languages/grammar-config.js +0 -17
- package/lib/esm/node_modules/langium/lib/languages/grammar-config.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/parser/async-parser.js +0 -13
- package/lib/esm/node_modules/langium/lib/parser/async-parser.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/parser/completion-parser-builder.js +0 -11
- package/lib/esm/node_modules/langium/lib/parser/completion-parser-builder.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/parser/cst-node-builder.js +0 -164
- package/lib/esm/node_modules/langium/lib/parser/cst-node-builder.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/parser/langium-parser-builder.js +0 -15
- package/lib/esm/node_modules/langium/lib/parser/langium-parser-builder.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/parser/langium-parser.js +0 -397
- package/lib/esm/node_modules/langium/lib/parser/langium-parser.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/parser/lexer.js +0 -54
- package/lib/esm/node_modules/langium/lib/parser/lexer.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/parser/parser-builder-base.js +0 -278
- package/lib/esm/node_modules/langium/lib/parser/parser-builder-base.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/parser/token-builder.js +0 -65
- package/lib/esm/node_modules/langium/lib/parser/token-builder.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/parser/value-converter.js +0 -82
- package/lib/esm/node_modules/langium/lib/parser/value-converter.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/references/linker.js +0 -195
- package/lib/esm/node_modules/langium/lib/references/linker.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/references/name-provider.js +0 -17
- package/lib/esm/node_modules/langium/lib/references/name-provider.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/references/references.js +0 -80
- package/lib/esm/node_modules/langium/lib/references/references.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/references/scope-computation.js +0 -39
- package/lib/esm/node_modules/langium/lib/references/scope-computation.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/references/scope-provider.js +0 -38
- package/lib/esm/node_modules/langium/lib/references/scope-provider.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/references/scope.js +0 -46
- package/lib/esm/node_modules/langium/lib/references/scope.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/serializer/hydrator.js +0 -129
- package/lib/esm/node_modules/langium/lib/serializer/hydrator.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/serializer/json-serializer.js +0 -149
- package/lib/esm/node_modules/langium/lib/serializer/json-serializer.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/service-registry.js +0 -41
- package/lib/esm/node_modules/langium/lib/service-registry.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/syntax-tree.js +0 -74
- package/lib/esm/node_modules/langium/lib/syntax-tree.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/utils/ast-utils.js +0 -124
- package/lib/esm/node_modules/langium/lib/utils/ast-utils.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/utils/caching.js +0 -84
- package/lib/esm/node_modules/langium/lib/utils/caching.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/utils/cancellation.js +0 -9
- package/lib/esm/node_modules/langium/lib/utils/cancellation.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/utils/collections.js +0 -89
- package/lib/esm/node_modules/langium/lib/utils/collections.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/utils/cst-utils.js +0 -77
- package/lib/esm/node_modules/langium/lib/utils/cst-utils.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/utils/disposable.js +0 -12
- package/lib/esm/node_modules/langium/lib/utils/disposable.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/utils/errors.js +0 -13
- package/lib/esm/node_modules/langium/lib/utils/errors.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/utils/event.js +0 -9
- package/lib/esm/node_modules/langium/lib/utils/event.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/utils/grammar-loader.js +0 -26
- package/lib/esm/node_modules/langium/lib/utils/grammar-loader.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/utils/grammar-utils.js +0 -221
- package/lib/esm/node_modules/langium/lib/utils/grammar-utils.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/utils/promise-utils.js +0 -31
- package/lib/esm/node_modules/langium/lib/utils/promise-utils.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/utils/regexp-utils.js +0 -146
- package/lib/esm/node_modules/langium/lib/utils/regexp-utils.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/utils/stream.js +0 -331
- package/lib/esm/node_modules/langium/lib/utils/stream.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/utils/uri-utils.js +0 -111
- package/lib/esm/node_modules/langium/lib/utils/uri-utils.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/validation/document-validator.js +0 -213
- package/lib/esm/node_modules/langium/lib/validation/document-validator.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/validation/validation-registry.js +0 -90
- package/lib/esm/node_modules/langium/lib/validation/validation-registry.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/workspace/ast-descriptions.js +0 -61
- package/lib/esm/node_modules/langium/lib/workspace/ast-descriptions.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/workspace/ast-node-locator.js +0 -32
- package/lib/esm/node_modules/langium/lib/workspace/ast-node-locator.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/workspace/configuration.js +0 -55
- package/lib/esm/node_modules/langium/lib/workspace/configuration.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/workspace/document-builder.js +0 -200
- package/lib/esm/node_modules/langium/lib/workspace/document-builder.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/workspace/documents.js +0 -146
- package/lib/esm/node_modules/langium/lib/workspace/documents.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/workspace/file-system-provider.js +0 -37
- package/lib/esm/node_modules/langium/lib/workspace/file-system-provider.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/workspace/index-manager.js +0 -53
- package/lib/esm/node_modules/langium/lib/workspace/index-manager.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/workspace/workspace-lock.js +0 -46
- package/lib/esm/node_modules/langium/lib/workspace/workspace-lock.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/workspace/workspace-manager.js +0 -70
- package/lib/esm/node_modules/langium/lib/workspace/workspace-manager.js.map +0 -1
- package/lib/esm/node_modules/lodash-es/flatMap.js +0 -10
- package/lib/esm/node_modules/lodash-es/flatMap.js.map +0 -1
- package/lib/esm/node_modules/lodash-es/uniqBy.js +0 -10
- package/lib/esm/node_modules/lodash-es/uniqBy.js.map +0 -1
- package/lib/esm/node_modules/vscode-jsonrpc/browser.js +0 -11
- package/lib/esm/node_modules/vscode-jsonrpc/browser.js.map +0 -1
- package/lib/esm/node_modules/vscode-jsonrpc/lib/browser/main.js +0 -56
- package/lib/esm/node_modules/vscode-jsonrpc/lib/browser/main.js.map +0 -1
- package/lib/esm/node_modules/vscode-jsonrpc/lib/browser/ril.js +0 -124
- package/lib/esm/node_modules/vscode-jsonrpc/lib/browser/ril.js.map +0 -1
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/api.js +0 -341
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/api.js.map +0 -1
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/cancellation.js +0 -61
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/cancellation.js.map +0 -1
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/connection.js +0 -651
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/connection.js.map +0 -1
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/disposable.js +0 -17
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/disposable.js.map +0 -1
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/events.js +0 -68
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/events.js.map +0 -1
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/is.js +0 -38
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/is.js.map +0 -1
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/linkedMap.js +0 -239
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/linkedMap.js.map +0 -1
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js +0 -97
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js.map +0 -1
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/messageReader.js +0 -133
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/messageReader.js.map +0 -1
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/messageWriter.js +0 -89
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/messageWriter.js.map +0 -1
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/messages.js +0 -165
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/messages.js.map +0 -1
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/ral.js +0 -22
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/ral.js.map +0 -1
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/semaphore.js +0 -48
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/semaphore.js.map +0 -1
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js +0 -62
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/browser/main.js +0 -32
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/browser/main.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/api.js +0 -40
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/api.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/connection.js +0 -16
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/connection.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/messages.js +0 -35
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/messages.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js +0 -23
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js +0 -19
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js +0 -15
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js +0 -15
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js +0 -37
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js +0 -39
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js +0 -19
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js +0 -15
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js +0 -23
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.js +0 -15
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js +0 -19
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.js +0 -678
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js +0 -15
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js +0 -23
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js +0 -130
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js +0 -28
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js +0 -15
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js +0 -35
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js +0 -15
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js +0 -15
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js +0 -23
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js +0 -19
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js +0 -46
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-textdocument/lib/esm/main.js +0 -142
- package/lib/esm/node_modules/vscode-languageserver-textdocument/lib/esm/main.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-types/lib/esm/main.js +0 -1088
- package/lib/esm/node_modules/vscode-languageserver-types/lib/esm/main.js.map +0 -1
- package/lib/esm/node_modules/vscode-uri/lib/esm/index.js +0 -377
- package/lib/esm/node_modules/vscode-uri/lib/esm/index.js.map +0 -1
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
//#region ../../node_modules/langium/lib/workspace/ast-node-locator.js
|
|
2
|
-
var e = class {
|
|
3
|
-
constructor() {
|
|
4
|
-
this.segmentSeparator = "/", this.indexSeparator = "@";
|
|
5
|
-
}
|
|
6
|
-
getAstNodePath(e) {
|
|
7
|
-
if (e.$container) {
|
|
8
|
-
let t = this.getAstNodePath(e.$container), n = this.getPathSegment(e);
|
|
9
|
-
return t + this.segmentSeparator + n;
|
|
10
|
-
}
|
|
11
|
-
return "";
|
|
12
|
-
}
|
|
13
|
-
getPathSegment({ $containerProperty: e, $containerIndex: t }) {
|
|
14
|
-
if (!e) throw Error("Missing '$containerProperty' in AST node.");
|
|
15
|
-
return t === void 0 ? e : e + this.indexSeparator + t;
|
|
16
|
-
}
|
|
17
|
-
getAstNode(e, t) {
|
|
18
|
-
return t.split(this.segmentSeparator).reduce((e, t) => {
|
|
19
|
-
if (!e || t.length === 0) return e;
|
|
20
|
-
let n = t.indexOf(this.indexSeparator);
|
|
21
|
-
if (n > 0) {
|
|
22
|
-
let r = t.substring(0, n), i = parseInt(t.substring(n + 1));
|
|
23
|
-
return e[r]?.[i];
|
|
24
|
-
}
|
|
25
|
-
return e[t];
|
|
26
|
-
}, e);
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
//#endregion
|
|
30
|
-
export { e as DefaultAstNodeLocator };
|
|
31
|
-
|
|
32
|
-
//# sourceMappingURL=ast-node-locator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ast-node-locator.js","names":[],"sources":["../../../../../../../../node_modules/langium/lib/workspace/ast-node-locator.js"],"sourcesContent":["/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\nexport class DefaultAstNodeLocator {\n constructor() {\n this.segmentSeparator = '/';\n this.indexSeparator = '@';\n }\n getAstNodePath(node) {\n if (node.$container) {\n const containerPath = this.getAstNodePath(node.$container);\n const newSegment = this.getPathSegment(node);\n const nodePath = containerPath + this.segmentSeparator + newSegment;\n return nodePath;\n }\n return '';\n }\n getPathSegment({ $containerProperty, $containerIndex }) {\n if (!$containerProperty) {\n throw new Error(\"Missing '$containerProperty' in AST node.\");\n }\n if ($containerIndex !== undefined) {\n return $containerProperty + this.indexSeparator + $containerIndex;\n }\n return $containerProperty;\n }\n getAstNode(node, path) {\n const segments = path.split(this.segmentSeparator);\n return segments.reduce((previousValue, currentValue) => {\n if (!previousValue || currentValue.length === 0) {\n return previousValue;\n }\n const propertyIndex = currentValue.indexOf(this.indexSeparator);\n if (propertyIndex > 0) {\n const property = currentValue.substring(0, propertyIndex);\n const arrayIndex = parseInt(currentValue.substring(propertyIndex + 1));\n const array = previousValue[property];\n return array?.[arrayIndex];\n }\n return previousValue[currentValue];\n }, node);\n }\n}\n//# sourceMappingURL=ast-node-locator.js.map"],"x_google_ignoreList":[0],"mappings":";AAKA,IAAa,IAAb,MAAmC;CAC/B,cAAc;EAEV,AADA,KAAK,mBAAmB,KACxB,KAAK,iBAAiB;;CAE1B,eAAe,GAAM;EACjB,IAAI,EAAK,YAAY;GACjB,IAAM,IAAgB,KAAK,eAAe,EAAK,WAAW,EACpD,IAAa,KAAK,eAAe,EAAK;GAE5C,OADiB,IAAgB,KAAK,mBAAmB;;EAG7D,OAAO;;CAEX,eAAe,EAAE,uBAAoB,sBAAmB;EACpD,IAAI,CAAC,GACD,MAAU,MAAM,4CAA4C;EAKhE,OAHI,MAAoB,KAAA,IAGjB,IAFI,IAAqB,KAAK,iBAAiB;;CAI1D,WAAW,GAAM,GAAM;EAEnB,OADiB,EAAK,MAAM,KAAK,iBAClB,CAAC,QAAQ,GAAe,MAAiB;GACpD,IAAI,CAAC,KAAiB,EAAa,WAAW,GAC1C,OAAO;GAEX,IAAM,IAAgB,EAAa,QAAQ,KAAK,eAAe;GAC/D,IAAI,IAAgB,GAAG;IACnB,IAAM,IAAW,EAAa,UAAU,GAAG,EAAc,EACnD,IAAa,SAAS,EAAa,UAAU,IAAgB,EAAE,CAAC;IAEtE,OADc,EAAc,KACb;;GAEnB,OAAO,EAAc;KACtB,EAAK"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { Deferred as e } from "../utils/promise-utils.js";
|
|
2
|
-
import { event_exports as t } from "../utils/event.js";
|
|
3
|
-
//#region ../../node_modules/langium/lib/workspace/configuration.js
|
|
4
|
-
var n = class {
|
|
5
|
-
constructor(n) {
|
|
6
|
-
this._ready = new e(), this.onConfigurationSectionUpdateEmitter = new t.Emitter(), this.settings = {}, this.workspaceConfig = !1, this.serviceRegistry = n.ServiceRegistry;
|
|
7
|
-
}
|
|
8
|
-
get ready() {
|
|
9
|
-
return this._ready.promise;
|
|
10
|
-
}
|
|
11
|
-
initialize(e) {
|
|
12
|
-
this.workspaceConfig = e.capabilities.workspace?.configuration ?? !1;
|
|
13
|
-
}
|
|
14
|
-
async initialized(e) {
|
|
15
|
-
if (this.workspaceConfig) {
|
|
16
|
-
if (e.register) {
|
|
17
|
-
let t = this.serviceRegistry.all;
|
|
18
|
-
e.register({ section: t.map((e) => this.toSectionName(e.LanguageMetaData.languageId)) });
|
|
19
|
-
}
|
|
20
|
-
if (e.fetchConfiguration) {
|
|
21
|
-
let t = this.serviceRegistry.all.map((e) => ({ section: this.toSectionName(e.LanguageMetaData.languageId) })), n = await e.fetchConfiguration(t);
|
|
22
|
-
t.forEach((e, t) => {
|
|
23
|
-
this.updateSectionConfiguration(e.section, n[t]);
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
this._ready.resolve();
|
|
28
|
-
}
|
|
29
|
-
updateConfiguration(e) {
|
|
30
|
-
typeof e.settings != "object" || e.settings === null || Object.entries(e.settings).forEach(([e, t]) => {
|
|
31
|
-
this.updateSectionConfiguration(e, t), this.onConfigurationSectionUpdateEmitter.fire({
|
|
32
|
-
section: e,
|
|
33
|
-
configuration: t
|
|
34
|
-
});
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
updateSectionConfiguration(e, t) {
|
|
38
|
-
this.settings[e] = t;
|
|
39
|
-
}
|
|
40
|
-
async getConfiguration(e, t) {
|
|
41
|
-
await this.ready;
|
|
42
|
-
let n = this.toSectionName(e);
|
|
43
|
-
if (this.settings[n]) return this.settings[n][t];
|
|
44
|
-
}
|
|
45
|
-
toSectionName(e) {
|
|
46
|
-
return `${e}`;
|
|
47
|
-
}
|
|
48
|
-
get onConfigurationSectionUpdate() {
|
|
49
|
-
return this.onConfigurationSectionUpdateEmitter.event;
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
//#endregion
|
|
53
|
-
export { n as DefaultConfigurationProvider };
|
|
54
|
-
|
|
55
|
-
//# sourceMappingURL=configuration.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"configuration.js","names":["Emitter"],"sources":["../../../../../../../../node_modules/langium/lib/workspace/configuration.js"],"sourcesContent":["/******************************************************************************\n * Copyright 2022 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\nimport { Emitter } from '../utils/event.js';\nimport { Deferred } from '../utils/promise-utils.js';\n/**\n * Base configuration provider for building up other configuration providers\n */\nexport class DefaultConfigurationProvider {\n constructor(services) {\n this._ready = new Deferred();\n this.onConfigurationSectionUpdateEmitter = new Emitter();\n this.settings = {};\n this.workspaceConfig = false;\n this.serviceRegistry = services.ServiceRegistry;\n }\n get ready() {\n return this._ready.promise;\n }\n initialize(params) {\n this.workspaceConfig = params.capabilities.workspace?.configuration ?? false;\n }\n async initialized(params) {\n if (this.workspaceConfig) {\n if (params.register) {\n // params.register(...) is a function to be provided by the calling language server for the sake of\n // decoupling this implementation from the concrete LSP implementations, specifically the LSP Connection\n const languages = this.serviceRegistry.all;\n params.register({\n // Listen to configuration changes for all languages\n section: languages.map(lang => this.toSectionName(lang.LanguageMetaData.languageId))\n });\n }\n if (params.fetchConfiguration) {\n // params.fetchConfiguration(...) is a function to be provided by the calling language server for the sake of\n // decoupling this implementation from the concrete LSP implementations, specifically the LSP Connection\n const configToUpdate = this.serviceRegistry.all.map(lang => ({\n // Fetch the configuration changes for all languages\n section: this.toSectionName(lang.LanguageMetaData.languageId)\n }));\n // get workspace configurations (default scope URI)\n const configs = await params.fetchConfiguration(configToUpdate);\n configToUpdate.forEach((conf, idx) => {\n this.updateSectionConfiguration(conf.section, configs[idx]);\n });\n }\n }\n this._ready.resolve();\n }\n /**\n * Updates the cached configurations using the `change` notification parameters.\n *\n * @param change The parameters of a change configuration notification.\n * `settings` property of the change object could be expressed as `Record<string, Record<string, any>>`\n */\n updateConfiguration(change) {\n if (typeof change.settings !== 'object' || change.settings === null) {\n return;\n }\n Object.entries(change.settings).forEach(([section, configuration]) => {\n this.updateSectionConfiguration(section, configuration);\n this.onConfigurationSectionUpdateEmitter.fire({ section, configuration });\n });\n }\n updateSectionConfiguration(section, configuration) {\n this.settings[section] = configuration;\n }\n /**\n * Returns a configuration value stored for the given language.\n *\n * @param language The language id\n * @param configuration Configuration name\n */\n async getConfiguration(language, configuration) {\n await this.ready;\n const sectionName = this.toSectionName(language);\n if (this.settings[sectionName]) {\n return this.settings[sectionName][configuration];\n }\n }\n toSectionName(languageId) {\n return `${languageId}`;\n }\n get onConfigurationSectionUpdate() {\n return this.onConfigurationSectionUpdateEmitter.event;\n }\n}\n//# sourceMappingURL=configuration.js.map"],"x_google_ignoreList":[0],"mappings":";;;AAUA,IAAa,IAAb,MAA0C;CACtC,YAAY,GAAU;EAKlB,AAJA,KAAK,SAAS,IAAI,GAAU,EAC5B,KAAK,sCAAsC,IAAIA,EAAAA,SAAS,EACxD,KAAK,WAAW,EAAE,EAClB,KAAK,kBAAkB,IACvB,KAAK,kBAAkB,EAAS;;CAEpC,IAAI,QAAQ;EACR,OAAO,KAAK,OAAO;;CAEvB,WAAW,GAAQ;EACf,KAAK,kBAAkB,EAAO,aAAa,WAAW,iBAAiB;;CAE3E,MAAM,YAAY,GAAQ;EACtB,IAAI,KAAK,iBAAiB;GACtB,IAAI,EAAO,UAAU;IAGjB,IAAM,IAAY,KAAK,gBAAgB;IACvC,EAAO,SAAS,EAEZ,SAAS,EAAU,KAAI,MAAQ,KAAK,cAAc,EAAK,iBAAiB,WAAW,CAAC,EACvF,CAAC;;GAEN,IAAI,EAAO,oBAAoB;IAG3B,IAAM,IAAiB,KAAK,gBAAgB,IAAI,KAAI,OAAS,EAEzD,SAAS,KAAK,cAAc,EAAK,iBAAiB,WAAW,EAChE,EAAE,EAEG,IAAU,MAAM,EAAO,mBAAmB,EAAe;IAC/D,EAAe,SAAS,GAAM,MAAQ;KAClC,KAAK,2BAA2B,EAAK,SAAS,EAAQ,GAAK;MAC7D;;;EAGV,KAAK,OAAO,SAAS;;CAQzB,oBAAoB,GAAQ;EACpB,OAAO,EAAO,YAAa,YAAY,EAAO,aAAa,QAG/D,OAAO,QAAQ,EAAO,SAAS,CAAC,SAAS,CAAC,GAAS,OAAmB;GAElE,AADA,KAAK,2BAA2B,GAAS,EAAc,EACvD,KAAK,oCAAoC,KAAK;IAAE;IAAS;IAAe,CAAC;IAC3E;;CAEN,2BAA2B,GAAS,GAAe;EAC/C,KAAK,SAAS,KAAW;;CAQ7B,MAAM,iBAAiB,GAAU,GAAe;EAC5C,MAAM,KAAK;EACX,IAAM,IAAc,KAAK,cAAc,EAAS;EAChD,IAAI,KAAK,SAAS,IACd,OAAO,KAAK,SAAS,GAAa;;CAG1C,cAAc,GAAY;EACtB,OAAO,GAAG;;CAEd,IAAI,+BAA+B;EAC/B,OAAO,KAAK,oCAAoC"}
|
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
import { stream as e } from "../utils/stream.js";
|
|
2
|
-
import { cancellation_exports as t } from "../utils/cancellation.js";
|
|
3
|
-
import { OperationCancelled as n, interruptAndCheck as r, isOperationCancelled as i } from "../utils/promise-utils.js";
|
|
4
|
-
import { UriUtils as a } from "../utils/uri-utils.js";
|
|
5
|
-
import { DocumentState as o } from "./documents.js";
|
|
6
|
-
import { MultiMap as s } from "../utils/collections.js";
|
|
7
|
-
import { require_main as c } from "../../../vscode-languageserver-protocol/lib/browser/main.js";
|
|
8
|
-
import { Disposable as l } from "../utils/disposable.js";
|
|
9
|
-
//#region ../../node_modules/langium/lib/workspace/document-builder.js
|
|
10
|
-
var u = c(), d = class {
|
|
11
|
-
constructor(e) {
|
|
12
|
-
this.updateBuildOptions = { validation: { categories: ["built-in", "fast"] } }, this.updateListeners = [], this.buildPhaseListeners = new s(), this.documentPhaseListeners = new s(), this.buildState = /* @__PURE__ */ new Map(), this.documentBuildWaiters = /* @__PURE__ */ new Map(), this.currentState = o.Changed, this.langiumDocuments = e.workspace.LangiumDocuments, this.langiumDocumentFactory = e.workspace.LangiumDocumentFactory, this.textDocuments = e.workspace.TextDocuments, this.indexManager = e.workspace.IndexManager, this.fileSystemProvider = e.workspace.FileSystemProvider, this.workspaceManager = () => e.workspace.WorkspaceManager, this.serviceRegistry = e.ServiceRegistry;
|
|
13
|
-
}
|
|
14
|
-
async build(e, n = {}, r = t.CancellationToken.None) {
|
|
15
|
-
for (let t of e) {
|
|
16
|
-
let e = t.uri.toString();
|
|
17
|
-
if (t.state === o.Validated) {
|
|
18
|
-
if (typeof n.validation == "boolean" && n.validation) this.resetToState(t, o.IndexedReferences);
|
|
19
|
-
else if (typeof n.validation == "object") {
|
|
20
|
-
let r = this.findMissingValidationCategories(t, n);
|
|
21
|
-
r.length > 0 && (this.buildState.set(e, {
|
|
22
|
-
completed: !1,
|
|
23
|
-
options: { validation: { categories: r } },
|
|
24
|
-
result: this.buildState.get(e)?.result
|
|
25
|
-
}), t.state = o.IndexedReferences);
|
|
26
|
-
}
|
|
27
|
-
} else this.buildState.delete(e);
|
|
28
|
-
}
|
|
29
|
-
this.currentState = o.Changed, await this.emitUpdate(e.map((e) => e.uri), []), await this.buildDocuments(e, n, r);
|
|
30
|
-
}
|
|
31
|
-
async update(n, i, a = t.CancellationToken.None) {
|
|
32
|
-
this.currentState = o.Changed;
|
|
33
|
-
let s = [];
|
|
34
|
-
for (let e of i) {
|
|
35
|
-
let t = this.langiumDocuments.deleteDocuments(e);
|
|
36
|
-
for (let e of t) s.push(e.uri), this.cleanUpDeleted(e);
|
|
37
|
-
}
|
|
38
|
-
let c = (await Promise.all(n.map((e) => this.findChangedUris(e)))).flat();
|
|
39
|
-
for (let e of c) {
|
|
40
|
-
let t = this.langiumDocuments.getDocument(e);
|
|
41
|
-
t === void 0 && (t = this.langiumDocumentFactory.fromModel({ $type: "INVALID" }, e), t.state = o.Changed, this.langiumDocuments.addDocument(t)), this.resetToState(t, o.Changed);
|
|
42
|
-
}
|
|
43
|
-
let l = e(c).concat(s).map((e) => e.toString()).toSet();
|
|
44
|
-
this.langiumDocuments.all.filter((e) => !l.has(e.uri.toString()) && this.shouldRelink(e, l)).forEach((e) => this.resetToState(e, o.ComputedScopes)), await this.emitUpdate(c, s), await r(a);
|
|
45
|
-
let u = this.sortDocuments(this.langiumDocuments.all.filter((e) => e.state < o.Validated || !this.buildState.get(e.uri.toString())?.completed || this.resultsAreIncomplete(e, this.updateBuildOptions)).toArray());
|
|
46
|
-
await this.buildDocuments(u, this.updateBuildOptions, a);
|
|
47
|
-
}
|
|
48
|
-
resultsAreIncomplete(e, t) {
|
|
49
|
-
return this.findMissingValidationCategories(e, t).length >= 1;
|
|
50
|
-
}
|
|
51
|
-
findMissingValidationCategories(t, n) {
|
|
52
|
-
let r = this.buildState.get(t.uri.toString()), i = this.serviceRegistry.getServices(t.uri).validation.ValidationRegistry.getAllValidationCategories(t), a = r?.result?.validationChecks ? new Set(r?.result?.validationChecks) : r?.completed ? i : /* @__PURE__ */ new Set();
|
|
53
|
-
return e(n === void 0 || n.validation === !0 ? i : typeof n.validation == "object" ? n.validation.categories ?? i : []).filter((e) => !a.has(e)).toArray();
|
|
54
|
-
}
|
|
55
|
-
async findChangedUris(e) {
|
|
56
|
-
if (this.langiumDocuments.getDocument(e) ?? this.textDocuments?.get(e)) return [e];
|
|
57
|
-
try {
|
|
58
|
-
let t = await this.fileSystemProvider.stat(e);
|
|
59
|
-
if (t.isDirectory) return await this.workspaceManager().searchFolder(e);
|
|
60
|
-
if (this.workspaceManager().shouldIncludeEntry(t)) return [e];
|
|
61
|
-
} catch {}
|
|
62
|
-
return [];
|
|
63
|
-
}
|
|
64
|
-
async emitUpdate(e, t) {
|
|
65
|
-
await Promise.all(this.updateListeners.map((n) => n(e, t)));
|
|
66
|
-
}
|
|
67
|
-
sortDocuments(e) {
|
|
68
|
-
let t = 0, n = e.length - 1;
|
|
69
|
-
for (; t < n;) {
|
|
70
|
-
for (; t < e.length && this.hasTextDocument(e[t]);) t++;
|
|
71
|
-
for (; n >= 0 && !this.hasTextDocument(e[n]);) n--;
|
|
72
|
-
t < n && ([e[t], e[n]] = [e[n], e[t]]);
|
|
73
|
-
}
|
|
74
|
-
return e;
|
|
75
|
-
}
|
|
76
|
-
hasTextDocument(e) {
|
|
77
|
-
return !!this.textDocuments?.get(e.uri);
|
|
78
|
-
}
|
|
79
|
-
shouldRelink(e, t) {
|
|
80
|
-
return e.references.some((e) => e.error !== void 0) ? !0 : this.indexManager.isAffected(e, t);
|
|
81
|
-
}
|
|
82
|
-
onUpdate(e) {
|
|
83
|
-
return this.updateListeners.push(e), l.create(() => {
|
|
84
|
-
let t = this.updateListeners.indexOf(e);
|
|
85
|
-
t >= 0 && this.updateListeners.splice(t, 1);
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
resetToState(e, t) {
|
|
89
|
-
switch (t) {
|
|
90
|
-
case o.Changed:
|
|
91
|
-
case o.Parsed: this.indexManager.removeContent(e.uri);
|
|
92
|
-
case o.IndexedContent: e.localSymbols = void 0;
|
|
93
|
-
case o.ComputedScopes: this.serviceRegistry.getServices(e.uri).references.Linker.unlink(e);
|
|
94
|
-
case o.Linked: this.indexManager.removeReferences(e.uri);
|
|
95
|
-
case o.IndexedReferences: e.diagnostics = void 0, this.buildState.delete(e.uri.toString());
|
|
96
|
-
case o.Validated:
|
|
97
|
-
}
|
|
98
|
-
e.state > t && (e.state = t);
|
|
99
|
-
}
|
|
100
|
-
cleanUpDeleted(e) {
|
|
101
|
-
this.buildState.delete(e.uri.toString()), this.indexManager.remove(e.uri), e.state = o.Changed;
|
|
102
|
-
}
|
|
103
|
-
async buildDocuments(e, t, n) {
|
|
104
|
-
this.prepareBuild(e, t), await this.runCancelable(e, o.Parsed, n, (e) => this.langiumDocumentFactory.update(e, n)), await this.runCancelable(e, o.IndexedContent, n, (e) => this.indexManager.updateContent(e, n)), await this.runCancelable(e, o.ComputedScopes, n, async (e) => {
|
|
105
|
-
e.localSymbols = await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.collectLocalSymbols(e, n);
|
|
106
|
-
});
|
|
107
|
-
let r = e.filter((e) => this.shouldLink(e));
|
|
108
|
-
await this.runCancelable(r, o.Linked, n, (e) => this.serviceRegistry.getServices(e.uri).references.Linker.link(e, n)), await this.runCancelable(r, o.IndexedReferences, n, (e) => this.indexManager.updateReferences(e, n));
|
|
109
|
-
let i = e.filter((e) => this.shouldValidate(e) ? !0 : (this.markAsCompleted(e), !1));
|
|
110
|
-
await this.runCancelable(i, o.Validated, n, async (e) => {
|
|
111
|
-
await this.validate(e, n), this.markAsCompleted(e);
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
markAsCompleted(e) {
|
|
115
|
-
let t = this.buildState.get(e.uri.toString());
|
|
116
|
-
t && (t.completed = !0);
|
|
117
|
-
}
|
|
118
|
-
prepareBuild(e, t) {
|
|
119
|
-
for (let n of e) {
|
|
120
|
-
let e = n.uri.toString(), r = this.buildState.get(e);
|
|
121
|
-
(!r || r.completed) && this.buildState.set(e, {
|
|
122
|
-
completed: !1,
|
|
123
|
-
options: t,
|
|
124
|
-
result: r?.result
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
async runCancelable(e, t, n, i) {
|
|
129
|
-
for (let a of e) a.state < t && (await r(n), await i(a), a.state = t, await this.notifyDocumentPhase(a, t, n));
|
|
130
|
-
let a = e.filter((e) => e.state === t);
|
|
131
|
-
await this.notifyBuildPhase(a, t, n), this.currentState = t;
|
|
132
|
-
}
|
|
133
|
-
onBuildPhase(e, t) {
|
|
134
|
-
return this.buildPhaseListeners.add(e, t), l.create(() => {
|
|
135
|
-
this.buildPhaseListeners.delete(e, t);
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
onDocumentPhase(e, t) {
|
|
139
|
-
return this.documentPhaseListeners.add(e, t), l.create(() => {
|
|
140
|
-
this.documentPhaseListeners.delete(e, t);
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
|
-
waitUntil(e, n, r) {
|
|
144
|
-
let i;
|
|
145
|
-
return n && "path" in n ? i = n : r = n, r ??= t.CancellationToken.None, i ? this.awaitDocumentState(e, i, r) : this.awaitBuilderState(e, r);
|
|
146
|
-
}
|
|
147
|
-
awaitDocumentState(e, t, r) {
|
|
148
|
-
let i = this.langiumDocuments.getDocument(t);
|
|
149
|
-
return i ? i.state >= e ? Promise.resolve(t) : r.isCancellationRequested ? Promise.reject(n) : this.currentState >= e && e > i.state ? Promise.reject(new u.ResponseError(u.LSPErrorCodes.RequestFailed, `Document state of ${t.toString()} is ${o[i.state]}, requiring ${o[e]}, but workspace state is already ${o[this.currentState]}. Returning undefined.`)) : new Promise((i, o) => {
|
|
150
|
-
let s = this.onDocumentPhase(e, (e) => {
|
|
151
|
-
a.equals(e.uri, t) && (s.dispose(), c.dispose(), i(e.uri));
|
|
152
|
-
}), c = r.onCancellationRequested(() => {
|
|
153
|
-
s.dispose(), c.dispose(), o(n);
|
|
154
|
-
});
|
|
155
|
-
}) : Promise.reject(new u.ResponseError(u.LSPErrorCodes.ServerCancelled, `No document found for URI: ${t.toString()}`));
|
|
156
|
-
}
|
|
157
|
-
awaitBuilderState(e, t) {
|
|
158
|
-
return this.currentState >= e ? Promise.resolve() : t.isCancellationRequested ? Promise.reject(n) : new Promise((r, i) => {
|
|
159
|
-
let a = this.onBuildPhase(e, () => {
|
|
160
|
-
a.dispose(), o.dispose(), r();
|
|
161
|
-
}), o = t.onCancellationRequested(() => {
|
|
162
|
-
a.dispose(), o.dispose(), i(n);
|
|
163
|
-
});
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
async notifyDocumentPhase(e, t, n) {
|
|
167
|
-
let a = this.documentPhaseListeners.get(t).slice();
|
|
168
|
-
for (let t of a) try {
|
|
169
|
-
await r(n), await t(e, n);
|
|
170
|
-
} catch (e) {
|
|
171
|
-
if (!i(e)) throw e;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
async notifyBuildPhase(e, t, n) {
|
|
175
|
-
if (e.length === 0) return;
|
|
176
|
-
let i = this.buildPhaseListeners.get(t).slice();
|
|
177
|
-
for (let t of i) await r(n), await t(e, n);
|
|
178
|
-
}
|
|
179
|
-
shouldLink(e) {
|
|
180
|
-
return this.getBuildOptions(e).eagerLinking ?? !0;
|
|
181
|
-
}
|
|
182
|
-
shouldValidate(e) {
|
|
183
|
-
return !!this.getBuildOptions(e).validation;
|
|
184
|
-
}
|
|
185
|
-
async validate(t, n) {
|
|
186
|
-
let r = this.serviceRegistry.getServices(t.uri).validation.DocumentValidator, i = this.getBuildOptions(t), a = typeof i.validation == "object" ? { ...i.validation } : {};
|
|
187
|
-
a.categories = this.findMissingValidationCategories(t, i);
|
|
188
|
-
let o = await r.validateDocument(t, a, n);
|
|
189
|
-
t.diagnostics ? t.diagnostics.push(...o) : t.diagnostics = o;
|
|
190
|
-
let s = this.buildState.get(t.uri.toString());
|
|
191
|
-
s && (s.result ??= {}, s.result.validationChecks ? s.result.validationChecks = e(s.result.validationChecks).concat(a.categories).distinct().toArray() : s.result.validationChecks = [...a.categories]);
|
|
192
|
-
}
|
|
193
|
-
getBuildOptions(e) {
|
|
194
|
-
return this.buildState.get(e.uri.toString())?.options ?? {};
|
|
195
|
-
}
|
|
196
|
-
};
|
|
197
|
-
//#endregion
|
|
198
|
-
export { d as DefaultDocumentBuilder };
|
|
199
|
-
|
|
200
|
-
//# sourceMappingURL=document-builder.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"document-builder.js","names":["CancellationToken","ResponseError","LSPErrorCodes"],"sources":["../../../../../../../../node_modules/langium/lib/workspace/document-builder.js"],"sourcesContent":["/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\nimport { LSPErrorCodes, ResponseError } from 'vscode-languageserver-protocol';\nimport { CancellationToken } from '../utils/cancellation.js';\nimport { Disposable } from '../utils/disposable.js';\nimport { MultiMap } from '../utils/collections.js';\nimport { OperationCancelled, interruptAndCheck, isOperationCancelled } from '../utils/promise-utils.js';\nimport { stream } from '../utils/stream.js';\nimport { UriUtils } from '../utils/uri-utils.js';\nimport { DocumentState } from './documents.js';\nexport class DefaultDocumentBuilder {\n constructor(services) {\n this.updateBuildOptions = {\n // Default: run only the built-in validation checks and those in the _fast_ category (includes those without category)\n validation: {\n categories: ['built-in', 'fast']\n }\n };\n this.updateListeners = [];\n this.buildPhaseListeners = new MultiMap();\n this.documentPhaseListeners = new MultiMap();\n this.buildState = new Map();\n this.documentBuildWaiters = new Map();\n this.currentState = DocumentState.Changed;\n this.langiumDocuments = services.workspace.LangiumDocuments;\n this.langiumDocumentFactory = services.workspace.LangiumDocumentFactory;\n this.textDocuments = services.workspace.TextDocuments;\n this.indexManager = services.workspace.IndexManager;\n this.fileSystemProvider = services.workspace.FileSystemProvider;\n this.workspaceManager = () => services.workspace.WorkspaceManager;\n this.serviceRegistry = services.ServiceRegistry;\n }\n async build(documents, options = {}, cancelToken = CancellationToken.None) {\n for (const document of documents) {\n const key = document.uri.toString();\n if (document.state === DocumentState.Validated) {\n if (typeof options.validation === 'boolean' && options.validation) {\n // Force re-running all validation checks\n this.resetToState(document, DocumentState.IndexedReferences);\n }\n else if (typeof options.validation === 'object') {\n // Validation with explicit options was requested for a document that has already been partly validated.\n // In this case, we need to execute only the missing validation categories.\n const categories = this.findMissingValidationCategories(document, options);\n if (categories.length > 0) {\n // Validate this document, since some of the requested validation categories are not executed yet.\n // In all other cases/else-branches, the document is not build at all.\n this.buildState.set(key, {\n completed: false,\n options: {\n validation: {\n categories\n }\n },\n result: this.buildState.get(key)?.result,\n });\n // Reset the state, but keep the existing validation markers of the already completed validation categories.\n document.state = DocumentState.IndexedReferences;\n }\n }\n }\n else {\n // Default: forget any previous build options\n this.buildState.delete(key);\n }\n }\n this.currentState = DocumentState.Changed;\n await this.emitUpdate(documents.map(e => e.uri), []);\n await this.buildDocuments(documents, options, cancelToken);\n }\n async update(changed, deleted, cancelToken = CancellationToken.None) {\n this.currentState = DocumentState.Changed;\n // Remove all metadata of documents that are reported as deleted\n const deletedUris = [];\n for (const deletedUri of deleted) {\n // Since the deleted URI might point to a directory, we delete all documents within\n const deletedDocs = this.langiumDocuments.deleteDocuments(deletedUri);\n for (const doc of deletedDocs) {\n deletedUris.push(doc.uri);\n this.cleanUpDeleted(doc);\n }\n }\n // Since the changed URI might point to a directory, we need to check all (nested) documents in that directory\n const changedUris = (await Promise.all(changed.map(uri => this.findChangedUris(uri)))).flat();\n // Set the state of all changed documents to `Changed` so they are completely rebuilt\n for (const changedUri of changedUris) {\n let changedDocument = this.langiumDocuments.getDocument(changedUri);\n if (changedDocument === undefined) {\n // We create an unparsed, invalid document.\n // This will be parsed as soon as we reach the first document builder phase.\n // This allows to cancel the parsing process later in case we need it.\n changedDocument = this.langiumDocumentFactory.fromModel({ $type: 'INVALID' }, changedUri);\n changedDocument.state = DocumentState.Changed; // required, since `langiumDocumentFactory.fromModel` marks the new document as `DocumentState.Parsed`\n this.langiumDocuments.addDocument(changedDocument);\n }\n this.resetToState(changedDocument, DocumentState.Changed);\n }\n // Set the state of all documents that should be relinked to `ComputedScopes` (if not already lower)\n const allChangedUris = stream(changedUris).concat(deletedUris).map(uri => uri.toString()).toSet();\n this.langiumDocuments.all\n .filter(doc => !allChangedUris.has(doc.uri.toString()) && this.shouldRelink(doc, allChangedUris))\n .forEach(doc => this.resetToState(doc, DocumentState.ComputedScopes));\n // Notify listeners of the update\n await this.emitUpdate(changedUris, deletedUris);\n // Only allow interrupting the execution after all state changes are done\n await interruptAndCheck(cancelToken);\n // Collect and sort all documents that we should rebuild\n const rebuildDocuments = this.sortDocuments(this.langiumDocuments.all\n .filter(doc => \n // This includes those that were reported as changed and those that we selected for relinking\n doc.state < DocumentState.Validated\n // This includes those for which a previous build has been cancelled\n || !this.buildState.get(doc.uri.toString())?.completed\n // `updateBuildOptions` changed between the last build (which is completed) and the current build,\n // leading to incomplete results, e.g. some validation categories are requested, which are not executed during the last build\n || this.resultsAreIncomplete(doc, this.updateBuildOptions))\n .toArray());\n await this.buildDocuments(rebuildDocuments, this.updateBuildOptions, cancelToken);\n }\n resultsAreIncomplete(document, options) {\n return this.findMissingValidationCategories(document, options).length >= 1;\n }\n findMissingValidationCategories(document, options) {\n const state = this.buildState.get(document.uri.toString());\n const allCategories = this.serviceRegistry.getServices(document.uri).validation.ValidationRegistry.getAllValidationCategories(document);\n const executedCategories = state?.result?.validationChecks ? new Set(state?.result?.validationChecks) : state?.completed ? allCategories : new Set();\n const requestedCategories = (options === undefined || options.validation === true) ? allCategories\n : typeof options.validation === 'object' ? (options.validation.categories ?? allCategories) : [];\n return stream(requestedCategories).filter(requested => !executedCategories.has(requested)).toArray();\n }\n async findChangedUris(changed) {\n // Most common case is that the document/textDocument at the specified URI has changed\n const document = this.langiumDocuments.getDocument(changed) ?? this.textDocuments?.get(changed);\n if (document) {\n return [changed];\n }\n // If the document doesn't exist yet, we need to check what kind of file has changed\n try {\n const stat = await this.fileSystemProvider.stat(changed);\n if (stat.isDirectory) {\n // If a directory has changed, we need to check all documents in that directory\n const uris = await this.workspaceManager().searchFolder(changed);\n return uris;\n }\n else if (this.workspaceManager().shouldIncludeEntry(stat)) {\n // Return the changed URI if it's a file that we can handle\n return [changed];\n }\n }\n catch {\n // If we can't determine the file type, we discard the change\n }\n return [];\n }\n async emitUpdate(changed, deleted) {\n await Promise.all(this.updateListeners.map(listener => listener(changed, deleted)));\n }\n /**\n * Sort the given documents by priority. By default, documents with an open text document are prioritized.\n * This is useful to ensure that visible documents show their diagnostics before all other documents.\n *\n * This improves the responsiveness in large workspaces as users usually don't care about diagnostics\n * in files that are currently not opened in the editor.\n */\n sortDocuments(documents) {\n let left = 0;\n let right = documents.length - 1;\n while (left < right) {\n while (left < documents.length && this.hasTextDocument(documents[left])) {\n left++;\n }\n while (right >= 0 && !this.hasTextDocument(documents[right])) {\n right--;\n }\n if (left < right) {\n [documents[left], documents[right]] = [documents[right], documents[left]];\n }\n }\n return documents;\n }\n hasTextDocument(doc) {\n return Boolean(this.textDocuments?.get(doc.uri));\n }\n /**\n * Check whether the given document should be relinked after changes were found in the given URIs.\n */\n shouldRelink(document, changedUris) {\n // Relink documents with linking errors -- maybe those references can be resolved now\n if (document.references.some(ref => ref.error !== undefined)) {\n return true;\n }\n // Check whether the document is affected by any of the changed URIs\n return this.indexManager.isAffected(document, changedUris);\n }\n onUpdate(callback) {\n this.updateListeners.push(callback);\n return Disposable.create(() => {\n const index = this.updateListeners.indexOf(callback);\n if (index >= 0) {\n this.updateListeners.splice(index, 1);\n }\n });\n }\n resetToState(document, state) {\n switch (state) {\n case DocumentState.Changed: {\n // Fall through\n }\n case DocumentState.Parsed:\n this.indexManager.removeContent(document.uri);\n // Fall through\n case DocumentState.IndexedContent:\n document.localSymbols = undefined;\n // Fall through\n case DocumentState.ComputedScopes: {\n const linker = this.serviceRegistry.getServices(document.uri).references.Linker;\n linker.unlink(document);\n // Fall through\n }\n case DocumentState.Linked:\n this.indexManager.removeReferences(document.uri);\n // Fall through\n case DocumentState.IndexedReferences:\n document.diagnostics = undefined;\n this.buildState.delete(document.uri.toString());\n // Fall through\n case DocumentState.Validated:\n // do nothing and keep the buildState\n }\n if (document.state > state) {\n document.state = state;\n }\n }\n cleanUpDeleted(document) {\n this.buildState.delete(document.uri.toString());\n this.indexManager.remove(document.uri);\n // Since this method `cleanUpDeleted` is not available from outside, the following line is not necessary, since the state is already set before.\n // This line does not hurt and makes the code to be in sync with `resetToState`.\n // If `cleanUpDeleted` is called in custom document builders at some more places, this line becomes necessary.\n document.state = DocumentState.Changed;\n }\n /**\n * Build the given documents by stepping through all build phases. If a document's state indicates\n * that a certain build phase is already done, the phase is skipped for that document.\n *\n * @param documents The documents to build.\n * @param options the {@link BuildOptions} to use.\n * @param cancelToken A cancellation token that can be used to cancel the build.\n * @returns A promise that resolves when the build is done.\n */\n async buildDocuments(documents, options, cancelToken) {\n this.prepareBuild(documents, options);\n // 0. Parse content\n await this.runCancelable(documents, DocumentState.Parsed, cancelToken, doc => this.langiumDocumentFactory.update(doc, cancelToken));\n // 1. Index content: collect the documents' symbols being accessible by other documents\n await this.runCancelable(documents, DocumentState.IndexedContent, cancelToken, doc => this.indexManager.updateContent(doc, cancelToken));\n // 2. Local symbols: collect each documents' symbols being accessible within the document (only)\n await this.runCancelable(documents, DocumentState.ComputedScopes, cancelToken, async (doc) => {\n const scopeComputation = this.serviceRegistry.getServices(doc.uri).references.ScopeComputation;\n doc.localSymbols = await scopeComputation.collectLocalSymbols(doc, cancelToken);\n });\n // 3. Linking\n const toBeLinked = documents.filter(doc => this.shouldLink(doc));\n await this.runCancelable(toBeLinked, DocumentState.Linked, cancelToken, doc => {\n const linker = this.serviceRegistry.getServices(doc.uri).references.Linker;\n return linker.link(doc, cancelToken);\n });\n // 4. Index references\n await this.runCancelable(toBeLinked, DocumentState.IndexedReferences, cancelToken, doc => this.indexManager.updateReferences(doc, cancelToken));\n // 5. Validation\n const toBeValidated = documents.filter(doc => {\n if (this.shouldValidate(doc)) {\n return true; // the build state is marked as completed after finishing the validation for the current document\n }\n else {\n this.markAsCompleted(doc); // since the validation is skipped for this document, it is already completed now\n return false;\n }\n });\n await this.runCancelable(toBeValidated, DocumentState.Validated, cancelToken, async (doc) => {\n await this.validate(doc, cancelToken);\n this.markAsCompleted(doc);\n });\n }\n markAsCompleted(document) {\n const state = this.buildState.get(document.uri.toString());\n if (state) {\n state.completed = true;\n }\n }\n /**\n * Runs prior to beginning the build process to update the {@link DocumentBuildState} for each document\n *\n * @param documents collection of documents to be built\n * @param options the {@link BuildOptions} to use\n */\n prepareBuild(documents, options) {\n for (const doc of documents) {\n const key = doc.uri.toString();\n const state = this.buildState.get(key);\n if (!state // If the document has no previous build state, we set it.\n || state.completed // If it has one, but it's already marked as completed, we overwrite it.\n ) {\n this.buildState.set(key, {\n completed: false,\n options,\n result: state?.result\n });\n }\n else {\n // If the previous build was not completed, we keep its DocumentState and continue from the DocumentState where it was cancelled,\n // e.g. the previous build options are used, including the previously requested validation categories.\n }\n }\n }\n /**\n * Runs a cancelable operation on a set of documents to bring them to a specified {@link DocumentState}.\n *\n * @param documents The array of documents to process.\n * @param targetState The target {@link DocumentState} to bring the documents to.\n * @param cancelToken A token that can be used to cancel the operation.\n * @param callback A function to be called for each document.\n * @returns A promise that resolves when all documents have been processed or the operation is canceled.\n * @throws Will throw `OperationCancelled` if the operation is canceled via a `CancellationToken`.\n */\n async runCancelable(documents, targetState, cancelToken, callback) {\n for (const document of documents) {\n if (document.state < targetState) {\n await interruptAndCheck(cancelToken);\n await callback(document);\n document.state = targetState;\n await this.notifyDocumentPhase(document, targetState, cancelToken);\n }\n }\n // Do not use `filtered` here, as that will miss documents that have previously reached the current target state.\n // For example, this happens in case the cancellation triggers between the processing of two documents\n // or files that were picked up during the workspace initialization.\n const targetStateDocs = documents.filter(doc => doc.state === targetState);\n await this.notifyBuildPhase(targetStateDocs, targetState, cancelToken);\n this.currentState = targetState;\n }\n onBuildPhase(targetState, callback) {\n this.buildPhaseListeners.add(targetState, callback);\n return Disposable.create(() => {\n this.buildPhaseListeners.delete(targetState, callback);\n });\n }\n onDocumentPhase(targetState, callback) {\n this.documentPhaseListeners.add(targetState, callback);\n return Disposable.create(() => {\n this.documentPhaseListeners.delete(targetState, callback);\n });\n }\n waitUntil(state, uriOrToken, cancelToken) {\n let uri = undefined;\n if (uriOrToken && 'path' in uriOrToken) {\n uri = uriOrToken;\n }\n else {\n cancelToken = uriOrToken;\n }\n cancelToken ?? (cancelToken = CancellationToken.None);\n if (uri) {\n return this.awaitDocumentState(state, uri, cancelToken);\n }\n else {\n return this.awaitBuilderState(state, cancelToken);\n }\n }\n awaitDocumentState(state, uri, cancelToken) {\n const document = this.langiumDocuments.getDocument(uri);\n if (!document) {\n return Promise.reject(new ResponseError(LSPErrorCodes.ServerCancelled, `No document found for URI: ${uri.toString()}`));\n }\n else if (document.state >= state) {\n return Promise.resolve(uri);\n }\n else if (cancelToken.isCancellationRequested) {\n return Promise.reject(OperationCancelled);\n }\n else if (this.currentState >= state && state > document.state) {\n // this would imply that the document has been excluded from linking or validation, for example;\n // this should never occur, the LS need to make sure that the affected document is properly built,\n // alternatively, the build state requirement need to be relaxed.\n return Promise.reject(new ResponseError(LSPErrorCodes.RequestFailed, `Document state of ${uri.toString()} is ${DocumentState[document.state]}, requiring ${DocumentState[state]}, but workspace state is already ${DocumentState[this.currentState]}. Returning undefined.`));\n }\n return new Promise((resolve, reject) => {\n const buildDisposable = this.onDocumentPhase(state, (doc) => {\n if (UriUtils.equals(doc.uri, uri)) {\n buildDisposable.dispose();\n cancelDisposable.dispose();\n resolve(doc.uri);\n }\n });\n const cancelDisposable = cancelToken.onCancellationRequested(() => {\n buildDisposable.dispose();\n cancelDisposable.dispose();\n reject(OperationCancelled);\n });\n });\n }\n awaitBuilderState(state, cancelToken) {\n if (this.currentState >= state) {\n return Promise.resolve();\n }\n else if (cancelToken.isCancellationRequested) {\n return Promise.reject(OperationCancelled);\n }\n return new Promise((resolve, reject) => {\n const buildDisposable = this.onBuildPhase(state, () => {\n buildDisposable.dispose();\n cancelDisposable.dispose();\n resolve();\n });\n const cancelDisposable = cancelToken.onCancellationRequested(() => {\n buildDisposable.dispose();\n cancelDisposable.dispose();\n reject(OperationCancelled);\n });\n });\n }\n async notifyDocumentPhase(document, state, cancelToken) {\n const listeners = this.documentPhaseListeners.get(state);\n const listenersCopy = listeners.slice();\n for (const listener of listenersCopy) {\n try {\n await interruptAndCheck(cancelToken);\n await listener(document, cancelToken);\n }\n catch (err) {\n // Ignore cancellation errors\n // We want to finish the listeners before throwing\n if (!isOperationCancelled(err)) {\n throw err;\n }\n }\n }\n }\n async notifyBuildPhase(documents, state, cancelToken) {\n if (documents.length === 0) {\n // Don't notify when no document has been processed\n return;\n }\n const listeners = this.buildPhaseListeners.get(state);\n const listenersCopy = listeners.slice();\n for (const listener of listenersCopy) {\n await interruptAndCheck(cancelToken);\n await listener(documents, cancelToken);\n }\n }\n /**\n * Determine whether the given document should be linked during a build. The default\n * implementation checks the `eagerLinking` property of the build options. If it's set to `true`\n * or `undefined`, the document is included in the linking phase. This also affects the\n * references indexing phase, which depends on eager linking.\n */\n shouldLink(document) {\n return this.getBuildOptions(document).eagerLinking ?? true;\n }\n /**\n * Determine whether the given document should be validated during a build. The default\n * implementation checks the `validation` property of the build options. If it's set to `true`\n * or a `ValidationOptions` object, the document is included in the validation phase.\n */\n shouldValidate(document) {\n return Boolean(this.getBuildOptions(document).validation);\n }\n /**\n * Run validation checks on the given document and store the resulting diagnostics in the document.\n * If the document already contains diagnostics, the new ones are added to the list.\n */\n async validate(document, cancelToken) {\n const validator = this.serviceRegistry.getServices(document.uri).validation.DocumentValidator;\n const options = this.getBuildOptions(document);\n const validationOptions = typeof options.validation === 'object' ? { ...options.validation } : {};\n validationOptions.categories = this.findMissingValidationCategories(document, options); // execute only not-yet-executed categories\n const diagnostics = await validator.validateDocument(document, validationOptions, cancelToken);\n if (document.diagnostics) {\n document.diagnostics.push(...diagnostics); // keep diagnostics of previously executed categories\n }\n else {\n document.diagnostics = diagnostics;\n }\n // Store information about the executed validation in the build state\n const state = this.buildState.get(document.uri.toString());\n if (state) {\n state.result ?? (state.result = {});\n if (state.result.validationChecks) {\n state.result.validationChecks = stream(state.result.validationChecks).concat(validationOptions.categories).distinct().toArray();\n }\n else {\n state.result.validationChecks = [...validationOptions.categories];\n }\n }\n }\n getBuildOptions(document) {\n return this.buildState.get(document.uri.toString())?.options ?? {};\n }\n}\n//# sourceMappingURL=document-builder.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;aAaa,IAAb,MAAoC;CAChC,YAAY,GAAU;EAmBlB,AAlBA,KAAK,qBAAqB,EAEtB,YAAY,EACR,YAAY,CAAC,YAAY,OAAO,EACnC,EACJ,EACD,KAAK,kBAAkB,EAAE,EACzB,KAAK,sBAAsB,IAAI,GAAU,EACzC,KAAK,yBAAyB,IAAI,GAAU,EAC5C,KAAK,6BAAa,IAAI,KAAK,EAC3B,KAAK,uCAAuB,IAAI,KAAK,EACrC,KAAK,eAAe,EAAc,SAClC,KAAK,mBAAmB,EAAS,UAAU,kBAC3C,KAAK,yBAAyB,EAAS,UAAU,wBACjD,KAAK,gBAAgB,EAAS,UAAU,eACxC,KAAK,eAAe,EAAS,UAAU,cACvC,KAAK,qBAAqB,EAAS,UAAU,oBAC7C,KAAK,yBAAyB,EAAS,UAAU,kBACjD,KAAK,kBAAkB,EAAS;;CAEpC,MAA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AAM,OAAO,mBACb,EAAM,OAAO,mBAAmB,EAAO,EAAM,OAAO,iBAAiB,CAAC,OAAO,EAAkB,WAAW,CAAC,UAAU,CAAC,SAAS,GAG/H,EAAM,OAAO,mBAAmB,CAAC,GAAG,EAAkB,WAAW;;CAI7E,gBAAgB,GAAU;EACtB,OAAO,KAAK,WAAW,IAAI,EAAS,IAAI,UAAU,CAAC,EAAE,WAAW,EAAE"}
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
import { stream as e } from "../utils/stream.js";
|
|
2
|
-
import { cancellation_exports as t } from "../utils/cancellation.js";
|
|
3
|
-
import { TextDocument as n } from "../../../vscode-languageserver-textdocument/lib/esm/main.js";
|
|
4
|
-
import { URI as r } from "../../../vscode-uri/lib/esm/index.js";
|
|
5
|
-
import { UriTrie as i } from "../utils/uri-utils.js";
|
|
6
|
-
//#region ../../node_modules/langium/lib/workspace/documents.js
|
|
7
|
-
var a;
|
|
8
|
-
(function(e) {
|
|
9
|
-
e[e.Changed = 0] = "Changed", e[e.Parsed = 1] = "Parsed", e[e.IndexedContent = 2] = "IndexedContent", e[e.ComputedScopes = 3] = "ComputedScopes", e[e.Linked = 4] = "Linked", e[e.IndexedReferences = 5] = "IndexedReferences", e[e.Validated = 6] = "Validated";
|
|
10
|
-
})(a ||= {});
|
|
11
|
-
var o = class {
|
|
12
|
-
constructor(e) {
|
|
13
|
-
this.serviceRegistry = e.ServiceRegistry, this.textDocuments = e.workspace.TextDocuments, this.fileSystemProvider = e.workspace.FileSystemProvider;
|
|
14
|
-
}
|
|
15
|
-
async fromUri(e, n = t.CancellationToken.None) {
|
|
16
|
-
let r = await this.fileSystemProvider.readFile(e);
|
|
17
|
-
return this.createAsync(e, r, n);
|
|
18
|
-
}
|
|
19
|
-
fromTextDocument(e, n, i) {
|
|
20
|
-
return n ??= r.parse(e.uri), t.CancellationToken.is(i) ? this.createAsync(n, e, i) : this.create(n, e, i);
|
|
21
|
-
}
|
|
22
|
-
fromString(e, n, r) {
|
|
23
|
-
return t.CancellationToken.is(r) ? this.createAsync(n, e, r) : this.create(n, e, r);
|
|
24
|
-
}
|
|
25
|
-
fromModel(e, t) {
|
|
26
|
-
return this.create(t, { $model: e });
|
|
27
|
-
}
|
|
28
|
-
create(e, t, n) {
|
|
29
|
-
if (typeof t == "string") {
|
|
30
|
-
let r = this.parse(e, t, n);
|
|
31
|
-
return this.createLangiumDocument(r, e, void 0, t);
|
|
32
|
-
} else if ("$model" in t) {
|
|
33
|
-
let n = {
|
|
34
|
-
value: t.$model,
|
|
35
|
-
parserErrors: [],
|
|
36
|
-
lexerErrors: []
|
|
37
|
-
};
|
|
38
|
-
return this.createLangiumDocument(n, e);
|
|
39
|
-
} else {
|
|
40
|
-
let r = this.parse(e, t.getText(), n);
|
|
41
|
-
return this.createLangiumDocument(r, e, t);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
async createAsync(e, t, n) {
|
|
45
|
-
if (typeof t == "string") {
|
|
46
|
-
let r = await this.parseAsync(e, t, n);
|
|
47
|
-
return this.createLangiumDocument(r, e, void 0, t);
|
|
48
|
-
} else {
|
|
49
|
-
let r = await this.parseAsync(e, t.getText(), n);
|
|
50
|
-
return this.createLangiumDocument(r, e, t);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
createLangiumDocument(e, t, n, r) {
|
|
54
|
-
let i;
|
|
55
|
-
if (n) i = {
|
|
56
|
-
parseResult: e,
|
|
57
|
-
uri: t,
|
|
58
|
-
state: a.Parsed,
|
|
59
|
-
references: [],
|
|
60
|
-
textDocument: n
|
|
61
|
-
};
|
|
62
|
-
else {
|
|
63
|
-
let n = this.createTextDocumentGetter(t, r);
|
|
64
|
-
i = {
|
|
65
|
-
parseResult: e,
|
|
66
|
-
uri: t,
|
|
67
|
-
state: a.Parsed,
|
|
68
|
-
references: [],
|
|
69
|
-
get textDocument() {
|
|
70
|
-
return n();
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
return e.value.$document = i, i;
|
|
75
|
-
}
|
|
76
|
-
async update(e, t) {
|
|
77
|
-
let n = e.parseResult.value.$cstNode?.root.fullText, r = this.textDocuments?.get(e.uri.toString()), i = r ? r.getText() : await this.fileSystemProvider.readFile(e.uri);
|
|
78
|
-
if (r) Object.defineProperty(e, "textDocument", { value: r });
|
|
79
|
-
else {
|
|
80
|
-
let t = this.createTextDocumentGetter(e.uri, i);
|
|
81
|
-
Object.defineProperty(e, "textDocument", { get: t });
|
|
82
|
-
}
|
|
83
|
-
return n !== i && (e.parseResult = await this.parseAsync(e.uri, i, t), e.parseResult.value.$document = e), e.state = a.Parsed, e;
|
|
84
|
-
}
|
|
85
|
-
parse(e, t, n) {
|
|
86
|
-
return this.serviceRegistry.getServices(e).parser.LangiumParser.parse(t, n);
|
|
87
|
-
}
|
|
88
|
-
parseAsync(e, t, n) {
|
|
89
|
-
return this.serviceRegistry.getServices(e).parser.AsyncParser.parse(t, n);
|
|
90
|
-
}
|
|
91
|
-
createTextDocumentGetter(e, t) {
|
|
92
|
-
let r = this.serviceRegistry, i;
|
|
93
|
-
return () => i ??= n.create(e.toString(), r.getServices(e).LanguageMetaData.languageId, 0, t ?? "");
|
|
94
|
-
}
|
|
95
|
-
}, s = class {
|
|
96
|
-
constructor(e) {
|
|
97
|
-
this.documentTrie = new i(), this.services = e, this.langiumDocumentFactory = e.workspace.LangiumDocumentFactory, this.documentBuilder = () => e.workspace.DocumentBuilder;
|
|
98
|
-
}
|
|
99
|
-
get all() {
|
|
100
|
-
return e(this.documentTrie.all());
|
|
101
|
-
}
|
|
102
|
-
addDocument(e) {
|
|
103
|
-
let t = e.uri.toString();
|
|
104
|
-
if (this.documentTrie.has(t)) throw Error(`A document with the URI '${t}' is already present.`);
|
|
105
|
-
this.documentTrie.insert(t, e);
|
|
106
|
-
}
|
|
107
|
-
getDocument(e) {
|
|
108
|
-
let t = e.toString();
|
|
109
|
-
return this.documentTrie.find(t);
|
|
110
|
-
}
|
|
111
|
-
getDocuments(e) {
|
|
112
|
-
let t = e.toString();
|
|
113
|
-
return this.documentTrie.findAll(t);
|
|
114
|
-
}
|
|
115
|
-
async getOrCreateDocument(e, t) {
|
|
116
|
-
let n = this.getDocument(e);
|
|
117
|
-
return n || (n = await this.langiumDocumentFactory.fromUri(e, t), this.addDocument(n), n);
|
|
118
|
-
}
|
|
119
|
-
createDocument(e, t, n) {
|
|
120
|
-
if (n) return this.langiumDocumentFactory.fromString(t, e, n).then((e) => (this.addDocument(e), e));
|
|
121
|
-
{
|
|
122
|
-
let n = this.langiumDocumentFactory.fromString(t, e);
|
|
123
|
-
return this.addDocument(n), n;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
hasDocument(e) {
|
|
127
|
-
return this.documentTrie.has(e.toString());
|
|
128
|
-
}
|
|
129
|
-
invalidateDocument(e) {
|
|
130
|
-
let t = e.toString(), n = this.documentTrie.find(t);
|
|
131
|
-
return n && this.documentBuilder().resetToState(n, a.Changed), n;
|
|
132
|
-
}
|
|
133
|
-
deleteDocument(e) {
|
|
134
|
-
let t = e.toString(), n = this.documentTrie.find(t);
|
|
135
|
-
return n && (n.state = a.Changed, this.documentTrie.delete(t)), n;
|
|
136
|
-
}
|
|
137
|
-
deleteDocuments(e) {
|
|
138
|
-
let t = e.toString(), n = this.documentTrie.findAll(t);
|
|
139
|
-
for (let e of n) e.state = a.Changed;
|
|
140
|
-
return this.documentTrie.delete(t), n;
|
|
141
|
-
}
|
|
142
|
-
};
|
|
143
|
-
//#endregion
|
|
144
|
-
export { o as DefaultLangiumDocumentFactory, s as DefaultLangiumDocuments, a as DocumentState };
|
|
145
|
-
|
|
146
|
-
//# sourceMappingURL=documents.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"documents.js","names":["CancellationToken"],"sources":["../../../../../../../../node_modules/langium/lib/workspace/documents.js"],"sourcesContent":["/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n/**\n * Re-export 'TextDocument' from 'vscode-languageserver-textdocument' for convenience,\n * including both type _and_ symbol (namespace), as we here and there also refer to the symbol,\n * the overhead is very small, just a few kilobytes.\n * Everything else of that package (at the time contributing) is also defined\n * in 'vscode-languageserver-protocol' or 'vscode-languageserver-types'.\n */\nexport { TextDocument } from 'vscode-languageserver-textdocument';\nimport { TextDocument } from './documents.js';\nimport { CancellationToken } from '../utils/cancellation.js';\nimport { stream } from '../utils/stream.js';\nimport { URI, UriTrie } from '../utils/uri-utils.js';\n/**\n * A document is subject to several phases that are run in predefined order. Any state value implies that\n * smaller state values are finished as well.\n */\nexport var DocumentState;\n(function (DocumentState) {\n /**\n * The text content has changed and needs to be parsed again. The AST held by this outdated\n * document instance is no longer valid.\n */\n DocumentState[DocumentState[\"Changed\"] = 0] = \"Changed\";\n /**\n * An AST has been created from the text content. The document structure can be traversed,\n * but cross-references cannot be resolved yet. If necessary, the structure can be manipulated\n * at this stage as a preprocessing step.\n */\n DocumentState[DocumentState[\"Parsed\"] = 1] = \"Parsed\";\n /**\n * The `IndexManager` service has processed AST nodes of this document. This means the\n * exported symbols are available in the global scope and can be resolved from other documents.\n */\n DocumentState[DocumentState[\"IndexedContent\"] = 2] = \"IndexedContent\";\n /**\n * The `ScopeComputation` service has processed this document. This means the document's locally accessible\n * symbols are captured in a `DocumentSymbols` table and can be looked up by the `ScopeProvider` service.\n * Once a document has reached this state, you may follow every reference - it will lazily\n * resolve its `ref` property and yield either the target AST node or `undefined` in case\n * the target is not in scope.\n */\n DocumentState[DocumentState[\"ComputedScopes\"] = 3] = \"ComputedScopes\";\n /**\n * The `Linker` service has processed this document. All outgoing references have been\n * resolved or marked as erroneous.\n */\n DocumentState[DocumentState[\"Linked\"] = 4] = \"Linked\";\n /**\n * The `IndexManager` service has processed AST node references of this document. This is\n * necessary to determine which documents are affected by a change in one of the workspace\n * documents.\n */\n DocumentState[DocumentState[\"IndexedReferences\"] = 5] = \"IndexedReferences\";\n /**\n * The `DocumentValidator` service has processed this document. The language server listens\n * to the results of this phase and sends diagnostics to the client.\n */\n DocumentState[DocumentState[\"Validated\"] = 6] = \"Validated\";\n})(DocumentState || (DocumentState = {}));\nexport class DefaultLangiumDocumentFactory {\n constructor(services) {\n this.serviceRegistry = services.ServiceRegistry;\n this.textDocuments = services.workspace.TextDocuments;\n this.fileSystemProvider = services.workspace.FileSystemProvider;\n }\n async fromUri(uri, cancellationToken = CancellationToken.None) {\n const content = await this.fileSystemProvider.readFile(uri);\n return this.createAsync(uri, content, cancellationToken);\n }\n fromTextDocument(textDocument, uri, token) {\n uri = uri ?? URI.parse(textDocument.uri);\n if (CancellationToken.is(token)) {\n return this.createAsync(uri, textDocument, token);\n }\n else {\n return this.create(uri, textDocument, token);\n }\n }\n fromString(text, uri, token) {\n if (CancellationToken.is(token)) {\n return this.createAsync(uri, text, token);\n }\n else {\n return this.create(uri, text, token);\n }\n }\n fromModel(model, uri) {\n return this.create(uri, { $model: model });\n }\n create(uri, content, options) {\n if (typeof content === 'string') {\n const parseResult = this.parse(uri, content, options);\n return this.createLangiumDocument(parseResult, uri, undefined, content);\n }\n else if ('$model' in content) {\n const parseResult = { value: content.$model, parserErrors: [], lexerErrors: [] };\n return this.createLangiumDocument(parseResult, uri);\n }\n else {\n const parseResult = this.parse(uri, content.getText(), options);\n return this.createLangiumDocument(parseResult, uri, content);\n }\n }\n async createAsync(uri, content, cancelToken) {\n if (typeof content === 'string') {\n const parseResult = await this.parseAsync(uri, content, cancelToken);\n return this.createLangiumDocument(parseResult, uri, undefined, content);\n }\n else {\n const parseResult = await this.parseAsync(uri, content.getText(), cancelToken);\n return this.createLangiumDocument(parseResult, uri, content);\n }\n }\n /**\n * Create a LangiumDocument from a given parse result.\n *\n * A TextDocument is created on demand if it is not provided as argument here. Usually this\n * should not be necessary because the main purpose of the TextDocument is to convert between\n * text ranges and offsets, which is done solely in LSP request handling.\n *\n * With the introduction of {@link update} below this method is supposed to be mainly called\n * during workspace initialization and on addition/recognition of new files, while changes in\n * existing documents are processed via {@link update}.\n */\n createLangiumDocument(parseResult, uri, textDocument, text) {\n let document;\n if (textDocument) {\n document = {\n parseResult,\n uri,\n state: DocumentState.Parsed,\n references: [],\n textDocument\n };\n }\n else {\n const textDocumentGetter = this.createTextDocumentGetter(uri, text);\n document = {\n parseResult,\n uri,\n state: DocumentState.Parsed,\n references: [],\n get textDocument() {\n return textDocumentGetter();\n }\n };\n }\n parseResult.value.$document = document;\n return document;\n }\n async update(document, cancellationToken) {\n // The CST full text property contains the original text that was used to create the AST.\n const oldText = document.parseResult.value.$cstNode?.root.fullText;\n const textDocument = this.textDocuments?.get(document.uri.toString());\n const text = textDocument ? textDocument.getText() : await this.fileSystemProvider.readFile(document.uri);\n if (textDocument) {\n Object.defineProperty(document, 'textDocument', {\n value: textDocument\n });\n }\n else {\n const textDocumentGetter = this.createTextDocumentGetter(document.uri, text);\n Object.defineProperty(document, 'textDocument', {\n get: textDocumentGetter\n });\n }\n // Some of these documents can be pretty large, so parsing them again can be quite expensive.\n // Therefore, we only parse if the text has actually changed.\n if (oldText !== text) {\n document.parseResult = await this.parseAsync(document.uri, text, cancellationToken);\n document.parseResult.value.$document = document;\n }\n document.state = DocumentState.Parsed;\n return document;\n }\n parse(uri, text, options) {\n const services = this.serviceRegistry.getServices(uri);\n return services.parser.LangiumParser.parse(text, options);\n }\n parseAsync(uri, text, cancellationToken) {\n const services = this.serviceRegistry.getServices(uri);\n return services.parser.AsyncParser.parse(text, cancellationToken);\n }\n createTextDocumentGetter(uri, text) {\n const serviceRegistry = this.serviceRegistry;\n let textDoc = undefined;\n return () => {\n return textDoc ?? (textDoc = TextDocument.create(uri.toString(), serviceRegistry.getServices(uri).LanguageMetaData.languageId, 0, text ?? ''));\n };\n }\n}\nexport class DefaultLangiumDocuments {\n constructor(services) {\n this.documentTrie = new UriTrie();\n this.services = services;\n this.langiumDocumentFactory = services.workspace.LangiumDocumentFactory;\n this.documentBuilder = () => services.workspace.DocumentBuilder;\n }\n get all() {\n return stream(this.documentTrie.all());\n }\n addDocument(document) {\n const uriString = document.uri.toString();\n if (this.documentTrie.has(uriString)) {\n throw new Error(`A document with the URI '${uriString}' is already present.`);\n }\n this.documentTrie.insert(uriString, document);\n }\n getDocument(uri) {\n const uriString = uri.toString();\n return this.documentTrie.find(uriString);\n }\n getDocuments(folder) {\n const uriString = folder.toString();\n return this.documentTrie.findAll(uriString);\n }\n async getOrCreateDocument(uri, cancellationToken) {\n let document = this.getDocument(uri);\n if (document) {\n return document;\n }\n document = await this.langiumDocumentFactory.fromUri(uri, cancellationToken);\n this.addDocument(document);\n return document;\n }\n createDocument(uri, text, cancellationToken) {\n if (cancellationToken) {\n return this.langiumDocumentFactory.fromString(text, uri, cancellationToken).then(document => {\n this.addDocument(document);\n return document;\n });\n }\n else {\n const document = this.langiumDocumentFactory.fromString(text, uri);\n this.addDocument(document);\n return document;\n }\n }\n hasDocument(uri) {\n return this.documentTrie.has(uri.toString());\n }\n /**\n * @deprecated Since 4.2 use `DocumentBuilder.resetToState(DocumentState.Changed)` instead\n * TODO remove this for the next major release\n */\n invalidateDocument(uri) {\n const uriString = uri.toString();\n const langiumDoc = this.documentTrie.find(uriString);\n if (langiumDoc) {\n this.documentBuilder().resetToState(langiumDoc, DocumentState.Changed);\n }\n return langiumDoc;\n }\n deleteDocument(uri) {\n const uriString = uri.toString();\n const langiumDoc = this.documentTrie.find(uriString);\n if (langiumDoc) {\n langiumDoc.state = DocumentState.Changed;\n this.documentTrie.delete(uriString);\n }\n return langiumDoc;\n }\n deleteDocuments(folder) {\n const uriString = folder.toString();\n const langiumDocs = this.documentTrie.findAll(uriString);\n for (const langiumDoc of langiumDocs) {\n langiumDoc.state = DocumentState.Changed;\n }\n this.documentTrie.delete(uriString);\n return langiumDocs;\n }\n}\n//# sourceMappingURL=documents.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;AAqBA,IAAW;CACV,SAAU,GAAe;CAwCtB,AAnCA,EAAc,EA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M,GAAmB;EACzC,IAAI,GACA,OAAO,KAAK,uBAAuB,WAAW,GAAM,GAAK,EAAkB,CAAC,MAAK,OAC7E,KAAK,YAAY,EAAS,EACnB,GACT;EAED;GACD,IAAM,IAAW,KAAK,uBAAuB,WAAW,GAAM,EAAI;GAElE,OADA,KAAK,YAAY,EAAS,EACnB;;;CAGf,YAAY,GAAK;EACb,OAAO,KAAK,aAAa,IAAI,EAAI,UAAU,CAAC;;CAMhD,mBAAmB,GAAK;EACpB,IAAM,IAAY,EAAI,UAAU,EAC1B,IAAa,KAAK,aAAa,KAAK,EAAU;EAIpD,OAHI,KACA,KAAK,iBAAiB,CAAC,aAAa,GAAY,EAAc,QAAQ,EAEnE;;CAEX,eAAe,GAAK;EAChB,IAAM,IAAY,EAAI,UAAU,EAC1B,IAAa,KAAK,aAAa,KAAK,EAAU;EAKpD,OAJI,MACA,EAAW,QAAQ,EAAc,SACjC,KAAK,aAAa,OAAO,EAAU,GAEhC;;CAEX,gBAAgB,GAAQ;EACpB,IAAM,IAAY,EAAO,UAAU,EAC7B,IAAc,KAAK,aAAa,QAAQ,EAAU;EACxD,KAAK,IAAM,KAAc,GACrB,EAAW,QAAQ,EAAc;EAGrC,OADA,KAAK,aAAa,OAAO,EAAU,EAC5B"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
//#region ../../node_modules/langium/lib/workspace/file-system-provider.js
|
|
2
|
-
var e = class {
|
|
3
|
-
stat(e) {
|
|
4
|
-
throw Error("No file system is available.");
|
|
5
|
-
}
|
|
6
|
-
statSync(e) {
|
|
7
|
-
throw Error("No file system is available.");
|
|
8
|
-
}
|
|
9
|
-
async exists() {
|
|
10
|
-
return !1;
|
|
11
|
-
}
|
|
12
|
-
existsSync() {
|
|
13
|
-
return !1;
|
|
14
|
-
}
|
|
15
|
-
readBinary() {
|
|
16
|
-
throw Error("No file system is available.");
|
|
17
|
-
}
|
|
18
|
-
readBinarySync() {
|
|
19
|
-
throw Error("No file system is available.");
|
|
20
|
-
}
|
|
21
|
-
readFile() {
|
|
22
|
-
throw Error("No file system is available.");
|
|
23
|
-
}
|
|
24
|
-
readFileSync() {
|
|
25
|
-
throw Error("No file system is available.");
|
|
26
|
-
}
|
|
27
|
-
async readDirectory() {
|
|
28
|
-
return [];
|
|
29
|
-
}
|
|
30
|
-
readDirectorySync() {
|
|
31
|
-
return [];
|
|
32
|
-
}
|
|
33
|
-
}, t = { fileSystemProvider: () => new e() };
|
|
34
|
-
//#endregion
|
|
35
|
-
export { t as EmptyFileSystem };
|
|
36
|
-
|
|
37
|
-
//# sourceMappingURL=file-system-provider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file-system-provider.js","names":[],"sources":["../../../../../../../../node_modules/langium/lib/workspace/file-system-provider.js"],"sourcesContent":["/******************************************************************************\n * Copyright 2022 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\nexport class EmptyFileSystemProvider {\n stat(_uri) {\n throw new Error('No file system is available.');\n }\n statSync(_uri) {\n throw new Error('No file system is available.');\n }\n async exists() {\n return false;\n }\n existsSync() {\n return false;\n }\n readBinary() {\n throw new Error('No file system is available.');\n }\n readBinarySync() {\n throw new Error('No file system is available.');\n }\n readFile() {\n throw new Error('No file system is available.');\n }\n readFileSync() {\n throw new Error('No file system is available.');\n }\n async readDirectory() {\n return [];\n }\n readDirectorySync() {\n return [];\n }\n}\nexport const EmptyFileSystem = {\n fileSystemProvider: () => new EmptyFileSystemProvider()\n};\n//# sourceMappingURL=file-system-provider.js.map"],"x_google_ignoreList":[0],"mappings":";AAKA,IAAa,IAAb,MAAqC;CACjC,KAAK,GAAM;EACP,MAAU,MAAM,+BAA+B;;CAEnD,SAAS,GAAM;EACX,MAAU,MAAM,+BAA+B;;CAEnD,MAAM,SAAS;EACX,OAAO;;CAEX,aAAa;EACT,OAAO;;CAEX,aAAa;EACT,MAAU,MAAM,+BAA+B;;CAEnD,iBAAiB;EACb,MAAU,MAAM,+BAA+B;;CAEnD,WAAW;EACP,MAAU,MAAM,+BAA+B;;CAEnD,eAAe;EACX,MAAU,MAAM,+BAA+B;;CAEnD,MAAM,gBAAgB;EAClB,OAAO,EAAE;;CAEb,oBAAoB;EAChB,OAAO,EAAE;;GAGJ,IAAkB,EAC3B,0BAA0B,IAAI,GAAyB,EAC1D"}
|