intlayer-editor 9.6.0 → 9.7.0
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/bin/intlayer-editor.mjs +26 -6
- package/client/dist/assets/CodeBlockShiki-B-OcGOY1.js +2 -0
- package/client/dist/assets/MarkDownRender-BzY_8i9Z.js +1 -0
- package/client/dist/assets/MarkDownRender-CIkPpFUW.js +25 -0
- package/client/dist/assets/MarkdownEditor-BpbsoP4E.js +161 -0
- package/client/dist/assets/{astro-JHDYjn39.js → astro-BZ97kZFP.js} +1 -1
- package/client/dist/assets/codeTransformer-aP9a_qk2.js +9 -0
- package/client/dist/assets/compat-r4Owm_RW.js +1 -0
- package/client/dist/assets/css-BGIxQoYs.js +1 -0
- package/client/dist/assets/css-DUjzNfgv.js +1 -0
- package/client/dist/assets/dist-DRjLHkdX.js +11 -0
- package/client/dist/assets/extractUrlFromSitemap-Chj1JVpo.js +1 -0
- package/client/dist/assets/{html-B2cKP6UN.js → html-DSw1lh5G.js} +1 -1
- package/client/dist/assets/html-WQKKblVZ.js +1 -0
- package/client/dist/assets/index-C5SpC4ap.css +2 -0
- package/client/dist/assets/index-CmQV7Z_A.js +105 -0
- package/client/dist/assets/shikiBundle-BIG1bVgc.js +12 -0
- package/client/dist/assets/{svelte-tEuLYt3E.js → svelte-CdeT-Ich.js} +1 -1
- package/client/dist/assets/{vue-Bg0byEaI.js → vue-BqdMUtqy.js} +1 -1
- package/client/dist/index.html +3 -6
- package/package.json +27 -27
- package/server/dist/controllers/auth.controller.cjs +80 -0
- package/server/dist/controllers/auth.controller.cjs.map +1 -0
- package/server/dist/controllers/auth.controller.d.ts +36 -0
- package/server/dist/controllers/auth.controller.mjs +76 -0
- package/server/dist/controllers/auth.controller.mjs.map +1 -0
- package/server/dist/controllers/configuration.controller.cjs +5 -1
- package/server/dist/controllers/configuration.controller.cjs.map +1 -1
- package/server/dist/controllers/configuration.controller.mjs +5 -1
- package/server/dist/controllers/configuration.controller.mjs.map +1 -1
- package/server/dist/controllers/dictionary.controller.cjs +2 -1
- package/server/dist/controllers/dictionary.controller.cjs.map +1 -1
- package/server/dist/controllers/dictionary.controller.mjs +2 -1
- package/server/dist/controllers/dictionary.controller.mjs.map +1 -1
- package/server/dist/index.cjs +41 -13
- package/server/dist/index.cjs.map +1 -1
- package/server/dist/index.mjs +45 -17
- package/server/dist/index.mjs.map +1 -1
- package/server/dist/routes/auth.routes.cjs +35 -0
- package/server/dist/routes/auth.routes.cjs.map +1 -0
- package/server/dist/routes/auth.routes.d.ts +22 -0
- package/server/dist/routes/auth.routes.mjs +33 -0
- package/server/dist/routes/auth.routes.mjs.map +1 -0
- package/server/dist/services/editorAuth.service.cjs +143 -0
- package/server/dist/services/editorAuth.service.cjs.map +1 -0
- package/server/dist/services/editorAuth.service.d.ts +43 -0
- package/server/dist/services/editorAuth.service.mjs +137 -0
- package/server/dist/services/editorAuth.service.mjs.map +1 -0
- package/server/dist/utils/checkPortAvailability.cjs +38 -12
- package/server/dist/utils/checkPortAvailability.cjs.map +1 -1
- package/server/dist/utils/checkPortAvailability.d.ts +14 -1
- package/server/dist/utils/checkPortAvailability.mjs +38 -13
- package/server/dist/utils/checkPortAvailability.mjs.map +1 -1
- package/client/dist/assets/CodeBlockShiki-DtgHBhf-.js +0 -2
- package/client/dist/assets/MarkDownRender-B5rc5xdv.js +0 -25
- package/client/dist/assets/MarkDownRender-BJfBvDXr.js +0 -1
- package/client/dist/assets/MarkdownEditor-CKaCMWJN.js +0 -160
- package/client/dist/assets/codeTransformer-DVPQQcdP.js +0 -9
- package/client/dist/assets/css-CdtkT07m.js +0 -1
- package/client/dist/assets/css-LbU1hoFO.js +0 -1
- package/client/dist/assets/dist-BHukwvnD.js +0 -11
- package/client/dist/assets/dist-CcmWBeAo.js +0 -1
- package/client/dist/assets/dynamic-BG2syiTL.js +0 -41
- package/client/dist/assets/html-DYtkB_T1.js +0 -1
- package/client/dist/assets/index-BtBJMAbp.js +0 -59
- package/client/dist/assets/index-D82ZIHVs.css +0 -2
- package/client/dist/assets/react-Cvdyeg_0.js +0 -1
- package/client/dist/assets/rolldown-runtime-hePW80VL.js +0 -1
- package/client/dist/assets/shikiBundle-vOk0aVqf.js +0 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./json-B88Oqtu5.js";import{t}from"./javascript-BzbQS41l.js";import{t as n}from"./typescript-j_1H8WHN.js";import{t as r}from"./css-LbU1hoFO.js";import{t as i}from"./html-B2cKP6UN.js";var a=Object.freeze(JSON.parse(`{"displayName":"HTML (Derivative)","injections":{"R:text.html - (comment.block, text.html meta.embedded, meta.tag.*.*.html, meta.tag.*.*.*.html, meta.tag.*.*.*.*.html)":{"patterns":[{"match":"<","name":"invalid.illegal.bad-angle-bracket.html"}]}},"name":"html-derivative","patterns":[{"include":"text.html.basic#core-minus-invalid"},{"begin":"(</?)(\\\\w[^<>\\\\s]*)(?<!/)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"}},"end":"((?: ?/)?>)","endCaptures":{"1":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.other.unrecognized.html.derivative","patterns":[{"include":"text.html.basic#attribute"}]}],"scopeName":"text.html.derivative","embeddedLangs":["html"]}`)),o=[...i,a],s=[Object.freeze(JSON.parse('{"fileTypes":[],"injectTo":["text.html.markdown"],"injectionSelector":"L:text.html.markdown","name":"markdown-vue","patterns":[{"include":"#vue-code-block"}],"repository":{"vue-code-block":{"begin":"(^|\\\\G)(\\\\s*)(`{3,}|~{3,})\\\\s*(?i:(vue)((\\\\s+|[,:?{])[^`~]*)?$)","beginCaptures":{"3":{"name":"punctuation.definition.markdown"},"4":{"name":"fenced_code.block.language.markdown"},"5":{"name":"fenced_code.block.language.attributes.markdown","patterns":[]}},"end":"(^|\\\\G)(\\\\2|\\\\s{0,3})(\\\\3)\\\\s*$","endCaptures":{"3":{"name":"punctuation.definition.markdown"}},"name":"markup.fenced_code.block.markdown","patterns":[{"include":"text.html.vue"}]}},"scopeName":"markdown.vue.codeblock"}'))],c=[Object.freeze(JSON.parse(`{"fileTypes":[],"injectTo":["source.vue","text.html.markdown","text.html.derivative","text.pug"],"injectionSelector":"L:meta.tag -meta.attribute -meta.ng-binding -entity.name.tag.pug -attribute_value -source.tsx -source.js.jsx, L:meta.element -meta.attribute","name":"vue-directives","patterns":[{"include":"text.html.vue#vue-directives"}],"scopeName":"vue.directives"}`))],l=[Object.freeze(JSON.parse(`{"fileTypes":[],"injectTo":["source.vue","text.html.markdown","text.html.derivative","text.pug"],"injectionSelector":"L:text.pug -comment -string.comment, L:text.html.derivative -comment.block, L:text.html.markdown -comment.block","name":"vue-interpolations","patterns":[{"include":"text.html.vue#vue-interpolations"}],"scopeName":"vue.interpolations"}`))],u=Object.freeze(JSON.parse(`{"fileTypes":[],"injectTo":["source.vue"],"injectionSelector":"L:source.css -comment, L:source.postcss -comment, L:source.sass -comment, L:source.stylus -comment","name":"vue-sfc-style-variable-injection","patterns":[{"include":"#vue-sfc-style-variable-injection"}],"repository":{"vue-sfc-style-variable-injection":{"begin":"\\\\b(v-bind)\\\\s*\\\\(","beginCaptures":{"1":{"name":"entity.name.function"}},"end":"\\\\)","name":"vue.sfc.style.variable.injection.v-bind","patterns":[{"begin":"([\\"'])","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"}},"end":"(\\\\1)","endCaptures":{"1":{"name":"punctuation.definition.tag.end.html"}},"name":"source.ts.embedded.html.vue","patterns":[{"include":"source.js"}]},{"include":"source.js"}]}},"scopeName":"vue.sfc.style.variable.injection","embeddedLangs":["javascript"]}`)),d=[...t,u],f=Object.freeze(JSON.parse(`{"displayName":"Vue","name":"vue","patterns":[{"include":"#vue-comments"},{"include":"#self-closing-tag"},{"begin":"(<)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"}},"end":"(>)","endCaptures":{"1":{"name":"punctuation.definition.tag.end.html.vue"}},"patterns":[{"begin":"([-0-:A-Za-z]+)\\\\b(?=[^>]*\\\\blang\\\\s*=\\\\s*([\\"']?)md\\\\b\\\\2)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</)","name":"text.html.markdown","patterns":[{"include":"text.html.markdown"}]}]},{"begin":"(?!template(?![-0-:A-Za-z]))([-0-:A-Za-z]+)\\\\b(?=[^>]*\\\\blang\\\\s*=\\\\s*([\\"']?)html\\\\b\\\\2)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"contentName":"text.html.derivative","end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#tag-stuff"},{"include":"#html-stuff"}]},{"begin":"([-0-:A-Za-z]+)\\\\b(?=[^>]*\\\\blang\\\\s*=\\\\s*([\\"']?)pug\\\\b\\\\2)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</)","name":"text.pug","patterns":[{"include":"text.pug"}]}]},{"begin":"([-0-:A-Za-z]+)\\\\b(?=[^>]*\\\\blang\\\\s*=\\\\s*([\\"']?)stylus\\\\b\\\\2)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</)","name":"source.stylus","patterns":[{"include":"source.stylus"}]}]},{"begin":"([-0-:A-Za-z]+)\\\\b(?=[^>]*\\\\blang\\\\s*=\\\\s*([\\"']?)postcss\\\\b\\\\2)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</)","name":"source.postcss","patterns":[{"include":"source.postcss"}]}]},{"begin":"([-0-:A-Za-z]+)\\\\b(?=[^>]*\\\\blang\\\\s*=\\\\s*([\\"']?)sass\\\\b\\\\2)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</)","name":"source.sass","patterns":[{"include":"source.sass"}]}]},{"begin":"([-0-:A-Za-z]+)\\\\b(?=[^>]*\\\\blang\\\\s*=\\\\s*([\\"']?)css\\\\b\\\\2)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</)","name":"source.css","patterns":[{"include":"source.css"}]}]},{"begin":"([-0-:A-Za-z]+)\\\\b(?=[^>]*\\\\blang\\\\s*=\\\\s*([\\"']?)scss\\\\b\\\\2)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</)","name":"source.css.scss","patterns":[{"include":"source.css.scss"}]}]},{"begin":"([-0-:A-Za-z]+)\\\\b(?=[^>]*\\\\blang\\\\s*=\\\\s*([\\"']?)less\\\\b\\\\2)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</)","name":"source.css.less","patterns":[{"include":"source.css.less"}]}]},{"begin":"([-0-:A-Za-z]+)\\\\b(?=[^>]*\\\\blang\\\\s*=\\\\s*([\\"']?)js\\\\b\\\\2)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</)","name":"source.js","patterns":[{"include":"source.js"}]}]},{"begin":"([-0-:A-Za-z]+)\\\\b(?=[^>]*\\\\blang\\\\s*=\\\\s*([\\"']?)ts\\\\b\\\\2)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)(?=[^\\\\n]*<\/script[>\\\\s])","end":"(?=<\/script[>\\\\s])","name":"source.ts","patterns":[{"include":"source.ts"}]},{"begin":"(?<=>)","name":"source.ts","patterns":[{"include":"source.ts"}],"while":"^(?!\\\\s*<\/script[>\\\\s])"}]},{"begin":"([-0-:A-Za-z]+)\\\\b(?=[^>]*\\\\blang\\\\s*=\\\\s*([\\"']?)jsx\\\\b\\\\2)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</)","name":"source.js.jsx","patterns":[{"include":"source.js.jsx"}]}]},{"begin":"([-0-:A-Za-z]+)\\\\b(?=[^>]*\\\\blang\\\\s*=\\\\s*([\\"']?)tsx\\\\b\\\\2)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)(?=[^\\\\n]*<\/script[>\\\\s])","end":"(?=<\/script[>\\\\s])","name":"source.tsx","patterns":[{"include":"source.tsx"}]},{"begin":"(?<=>)","name":"source.tsx","patterns":[{"include":"source.tsx"}],"while":"^(?!\\\\s*<\/script[>\\\\s])"}]},{"begin":"([-0-:A-Za-z]+)\\\\b(?=[^>]*\\\\blang\\\\s*=\\\\s*([\\"']?)coffee\\\\b\\\\2)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</)","name":"source.coffee","patterns":[{"include":"source.coffee"}]}]},{"begin":"([-0-:A-Za-z]+)\\\\b(?=[^>]*\\\\blang\\\\s*=\\\\s*([\\"']?)json\\\\b\\\\2)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</)","name":"source.json","patterns":[{"include":"source.json"}]}]},{"begin":"([-0-:A-Za-z]+)\\\\b(?=[^>]*\\\\blang\\\\s*=\\\\s*([\\"']?)jsonc\\\\b\\\\2)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</)","name":"source.json.comments","patterns":[{"include":"source.json.comments"}]}]},{"begin":"([-0-:A-Za-z]+)\\\\b(?=[^>]*\\\\blang\\\\s*=\\\\s*([\\"']?)json5\\\\b\\\\2)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</)","name":"source.json5","patterns":[{"include":"source.json5"}]}]},{"begin":"([-0-:A-Za-z]+)\\\\b(?=[^>]*\\\\blang\\\\s*=\\\\s*([\\"']?)yaml\\\\b\\\\2)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</)","name":"source.yaml","patterns":[{"include":"source.yaml"}]}]},{"begin":"([-0-:A-Za-z]+)\\\\b(?=[^>]*\\\\blang\\\\s*=\\\\s*([\\"']?)toml\\\\b\\\\2)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</)","name":"source.toml","patterns":[{"include":"source.toml"}]}]},{"begin":"([-0-:A-Za-z]+)\\\\b(?=[^>]*\\\\blang\\\\s*=\\\\s*([\\"']?)(g(?:ql|raphql))\\\\b\\\\2)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</)","name":"source.graphql","patterns":[{"include":"source.graphql"}]}]},{"begin":"([-0-:A-Za-z]+)\\\\b(?=[^>]*\\\\blang\\\\s*=\\\\s*([\\"']?)vue\\\\b\\\\2)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</)","name":"text.html.vue","patterns":[{"include":"text.html.vue"}]}]},{"begin":"(template)(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</template[>\\\\s])","name":"text.html.derivative","patterns":[{"include":"#html-stuff"}]}]},{"begin":"(script)(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#multi-line-script-tag-stuff"}]},{"begin":"(style)(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#multi-line-style-tag-stuff"}]},{"begin":"([-0-:A-Za-z]+)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</)","name":"text"}]}]}],"repository":{"capitalized-tag":{"begin":"(<)([A-Z][-0-:A-Za-z]*)(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.html.vue"}},"end":"/?>","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html.vue"}},"name":"meta.tag.structure.$2.start.html.vue","patterns":[{"begin":"\\\\G","end":"(?=/?>)","patterns":[{"include":"#vue-directives"},{"include":"text.html.basic#attribute"}]}]},"html-stuff":{"patterns":[{"include":"#template-tag"},{"include":"#capitalized-tag"},{"include":"text.html.derivative"},{"include":"text.html.basic"}]},"multi-line-script-tag-stuff":{"begin":"\\\\G","end":"(?=<\/script[>\\\\s])","patterns":[{"begin":"\\\\G(?!\\\\blang\\\\s*=\\\\s*[\\"']?(?:tsx??|jsx|coffee)\\\\b)","end":"(?=\\\\blang\\\\s*=\\\\s*[\\"']?(?:tsx??|jsx|coffee)\\\\b)|(>)","endCaptures":{"1":{"name":"punctuation.definition.tag.end.html.vue"}},"name":"meta.tag-stuff","patterns":[{"include":"#vue-directives"},{"include":"text.html.basic#attribute"}]},{"begin":"(?=\\\\blang\\\\s*=\\\\s*[\\"']?ts\\\\b)","end":"(?=<\/script[>\\\\s])","patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)(?=[^\\\\n]*<\/script[>\\\\s])","end":"(?=<\/script[>\\\\s])","name":"source.ts","patterns":[{"include":"source.ts"}]},{"begin":"(?<=>)","name":"source.ts","patterns":[{"include":"source.ts"}],"while":"^(?!\\\\s*<\/script[>\\\\s])"}]},{"begin":"(?=\\\\blang\\\\s*=\\\\s*[\\"']?tsx\\\\b)","end":"(?=<\/script[>\\\\s])","patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)(?=[^\\\\n]*<\/script[>\\\\s])","end":"(?=<\/script[>\\\\s])","name":"source.tsx","patterns":[{"include":"source.tsx"}]},{"begin":"(?<=>)","name":"source.tsx","patterns":[{"include":"source.tsx"}],"while":"^(?!\\\\s*<\/script[>\\\\s])"}]},{"begin":"(?=\\\\blang\\\\s*=\\\\s*[\\"']?jsx\\\\b)","end":"(?=<\/script[>\\\\s])","patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=<\/script[>\\\\s])","name":"source.js.jsx","patterns":[{"include":"source.js.jsx"}]}]},{"begin":"(?=\\\\blang\\\\s*=\\\\s*[\\"']?coffee\\\\b)","end":"(?=<\/script[>\\\\s])","patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=<\/script[>\\\\s])","name":"source.coffee","patterns":[{"include":"source.coffee"}]}]},{"begin":"(?<=>)","end":"(?=<\/script[>\\\\s])","name":"source.js","patterns":[{"include":"source.js"}]}]},"multi-line-style-tag-stuff":{"begin":"\\\\G","end":"(?=</style[>\\\\s])","patterns":[{"begin":"\\\\G(?!\\\\blang\\\\s*=\\\\s*[\\"']?(?:scss|stylus|less|postcss)\\\\b)","end":"(?=\\\\blang\\\\s*=\\\\s*[\\"']?(?:scss|stylus|less|postcss)\\\\b)|(>)","endCaptures":{"1":{"name":"punctuation.definition.tag.end.html.vue"}},"name":"meta.tag-stuff","patterns":[{"include":"#vue-directives"},{"include":"text.html.basic#attribute"}]},{"begin":"(?=\\\\blang\\\\s*=\\\\s*[\\"']?scss\\\\b)","end":"(?=</style[>\\\\s])","patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</style[>\\\\s])","name":"source.css.scss","patterns":[{"include":"source.css.scss"}]}]},{"begin":"(?=\\\\blang\\\\s*=\\\\s*[\\"']?stylus\\\\b)","end":"(?=</style[>\\\\s])","patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</style[>\\\\s])","name":"source.stylus","patterns":[{"include":"source.stylus"}]}]},{"begin":"(?=\\\\blang\\\\s*=\\\\s*[\\"']?less\\\\b)","end":"(?=</style[>\\\\s])","patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</style[>\\\\s])","name":"source.css.less","patterns":[{"include":"source.css.less"}]}]},{"begin":"(?=\\\\blang\\\\s*=\\\\s*[\\"']?postcss\\\\b)","end":"(?=</style[>\\\\s])","patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</style[>\\\\s])","name":"source.postcss","patterns":[{"include":"source.postcss"}]}]},{"begin":"(?<=>)","end":"(?=</style[>\\\\s])","name":"source.css","patterns":[{"include":"source.css"}]}]},"self-closing-tag":{"begin":"(<)([-0-:A-Za-z]+)(?=([^>]+/>))","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"end":"(/>)","endCaptures":{"1":{"name":"punctuation.definition.tag.end.html.vue"}},"name":"self-closing-tag","patterns":[{"include":"#tag-stuff"}]},"tag-stuff":{"begin":"\\\\G","end":"(?=/>)|(>)","endCaptures":{"1":{"name":"punctuation.definition.tag.end.html.vue"}},"name":"meta.tag-stuff","patterns":[{"include":"#vue-directives"},{"include":"text.html.basic#attribute"}]},"template-tag":{"patterns":[{"include":"#template-tag-1"},{"include":"#template-tag-2"}]},"template-tag-1":{"begin":"(<)(template)\\\\b(>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"},"3":{"name":"punctuation.definition.tag.end.html.vue"}},"end":"(/?>)","endCaptures":{"1":{"name":"punctuation.definition.tag.end.html.vue"}},"name":"meta.template-tag.start","patterns":[{"begin":"\\\\G","end":"(?=/>)|((</)(template)(?=[>\\\\s]))","endCaptures":{"2":{"name":"punctuation.definition.tag.begin.html.vue"},"3":{"name":"entity.name.tag.$3.html.vue"}},"name":"meta.template-tag.end","patterns":[{"include":"#html-stuff"}]}]},"template-tag-2":{"begin":"(<)(template)(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"end":"(/?>)","endCaptures":{"1":{"name":"punctuation.definition.tag.end.html.vue"}},"name":"meta.template-tag.start","patterns":[{"begin":"\\\\G","end":"(?=/>)|((</)(template)(?=[>\\\\s]))","endCaptures":{"2":{"name":"punctuation.definition.tag.begin.html.vue"},"3":{"name":"entity.name.tag.$3.html.vue"}},"name":"meta.template-tag.end","patterns":[{"include":"#tag-stuff"},{"include":"#html-stuff"}]}]},"vue-comments":{"patterns":[{"include":"#vue-comments-key-value"},{"begin":"<!--","captures":{"0":{"name":"punctuation.definition.comment.vue"}},"end":"-->","name":"comment.block.vue"}]},"vue-comments-key-value":{"begin":"(<!--)\\\\s*(@)([$\\\\w]+)(?=\\\\s)","beginCaptures":{"1":{"name":"punctuation.definition.comment.vue"},"2":{"name":"punctuation.definition.block.tag.comment.vue"},"3":{"name":"storage.type.class.comment.vue"}},"end":"(-->)","endCaptures":{"1":{"name":"punctuation.definition.comment.vue"}},"name":"comment.block.vue","patterns":[{"include":"source.json#value"}]},"vue-directives":{"patterns":[{"include":"#vue-directives-control"},{"include":"#vue-directives-generic-attr"},{"include":"#vue-directives-style-attr"},{"include":"#vue-directives-original"}]},"vue-directives-control":{"begin":"(?:(v-for)|(v-(?:if|else-if|else)))(?=[)/=>\\\\s])","beginCaptures":{"1":{"name":"keyword.control.loop.vue"},"2":{"name":"keyword.control.conditional.vue"}},"end":"(?=\\\\s*[^=\\\\s])","name":"meta.attribute.directive.control.vue","patterns":[{"include":"#vue-directives-expression"}]},"vue-directives-expression":{"patterns":[{"begin":"(=)\\\\s*([\\"'\`])","beginCaptures":{"1":{"name":"punctuation.separator.key-value.html.vue"},"2":{"name":"punctuation.definition.string.begin.html.vue"}},"end":"(\\\\2)","endCaptures":{"1":{"name":"punctuation.definition.string.end.html.vue"}},"patterns":[{"begin":"(?<=([\\"'\`]))","end":"(?=\\\\1)","name":"source.ts.embedded.html.vue","patterns":[{"include":"source.ts#expression"}]}]},{"begin":"(=)\\\\s*(?=[^\\"'\`])","beginCaptures":{"1":{"name":"punctuation.separator.key-value.html.vue"}},"end":"(?=([>\\\\s]|/>))","patterns":[{"begin":"(?=[^\\"'\`])","end":"(?=([>\\\\s]|/>))","name":"source.ts.embedded.html.vue","patterns":[{"include":"source.ts#expression"}]}]}]},"vue-directives-generic-attr":{"begin":"\\\\b(generic)\\\\s*(=)","beginCaptures":{"1":{"name":"entity.other.attribute-name.html.vue"},"2":{"name":"punctuation.separator.key-value.html.vue"}},"end":"(?<=[\\"'])","name":"meta.attribute.generic.vue","patterns":[{"begin":"([\\"'])","beginCaptures":{"1":{"name":"punctuation.definition.string.begin.html.vue"}},"end":"(\\\\1)","endCaptures":{"1":{"name":"punctuation.definition.string.end.html.vue"}},"name":"meta.type.parameters.vue","patterns":[{"include":"source.ts#comment"},{"match":"(?<![$_[:alnum:]])(?:(?<=\\\\.\\\\.\\\\.)|(?<!\\\\.))(extends|in|out)(?![$_[:alnum:]])(?:(?=\\\\.\\\\.\\\\.)|(?!\\\\.))","name":"storage.modifier.ts"},{"include":"source.ts#type"},{"include":"source.ts#punctuation-comma"},{"match":"(=)(?!>)","name":"keyword.operator.assignment.ts"}]}]},"vue-directives-original":{"begin":"(?:(v-[-\\\\w]+)(:)?|([.:])|(@)|(#))(?:(\\\\[)([^]]*)(])|([-\\\\w]+))?","beginCaptures":{"1":{"name":"entity.other.attribute-name.html.vue"},"2":{"name":"punctuation.separator.key-value.html.vue"},"3":{"name":"punctuation.attribute-shorthand.bind.html.vue"},"4":{"name":"punctuation.attribute-shorthand.event.html.vue"},"5":{"name":"punctuation.attribute-shorthand.slot.html.vue"},"6":{"name":"punctuation.separator.key-value.html.vue"},"7":{"name":"source.ts.embedded.html.vue","patterns":[{"include":"source.ts#expression"}]},"8":{"name":"punctuation.separator.key-value.html.vue"},"9":{"name":"entity.other.attribute-name.html.vue"}},"end":"(?=\\\\s*[^=\\\\s])","name":"meta.attribute.directive.vue","patterns":[{"1":{"name":"punctuation.separator.key-value.html.vue"},"2":{"name":"entity.other.attribute-name.html.vue"},"match":"(\\\\.)([-\\\\w]*)"},{"include":"#vue-directives-expression"}]},"vue-directives-style-attr":{"begin":"\\\\b(style)\\\\s*(=)","beginCaptures":{"1":{"name":"entity.other.attribute-name.html.vue"},"2":{"name":"punctuation.separator.key-value.html.vue"}},"end":"(?<=[\\"'])","name":"meta.attribute.style.vue","patterns":[{"begin":"([\\"'])","beginCaptures":{"1":{"name":"punctuation.definition.string.begin.html.vue"}},"end":"(\\\\1)","endCaptures":{"1":{"name":"punctuation.definition.string.end.html.vue"}},"name":"source.css.embedded.html.vue","patterns":[{"include":"source.css#comment-block"},{"include":"source.css#escapes"},{"include":"source.css#font-features"},{"match":"(?<![-\\\\w])--[-A-Z_a-z[^\\\\x00-\\\\x7F]](?:[-0-9A-Z_a-z[^\\\\x00-\\\\x7F]]|\\\\\\\\(?:\\\\h{1,6}|.))*","name":"variable.css"},{"begin":"(?<![-A-Za-z])(?=[-A-Za-z])","end":"$|(?![-A-Za-z])","name":"meta.property-name.css","patterns":[{"include":"source.css#property-names"}]},{"begin":"(:)\\\\s*","beginCaptures":{"1":{"name":"punctuation.separator.key-value.css"}},"contentName":"meta.property-value.css","end":"\\\\s*(;)|\\\\s*(?=[\\"'])","endCaptures":{"1":{"name":"punctuation.terminator.rule.css"}},"patterns":[{"include":"source.css#comment-block"},{"include":"source.css#property-values"}]},{"match":";","name":"punctuation.terminator.rule.css"}]}]},"vue-interpolations":{"patterns":[{"begin":"(\\\\{\\\\{)","beginCaptures":{"1":{"name":"punctuation.definition.interpolation.begin.html.vue"}},"end":"(}})","endCaptures":{"1":{"name":"punctuation.definition.interpolation.end.html.vue"}},"name":"expression.embedded.vue","patterns":[{"begin":"\\\\G","end":"(?=}})","name":"source.ts.embedded.html.vue","patterns":[{"include":"source.ts#expression"}]}]}]}},"scopeName":"text.html.vue","embeddedLangs":["css","javascript","typescript","json","html","html-derivative","markdown-vue","vue-directives","vue-interpolations","vue-sfc-style-variable-injection"],"embeddedLangsLazy":["markdown","pug","stylus","sass","scss","less","jsx","tsx","coffee","jsonc","json5","yaml","toml","graphql"]}`)),p=[...r,...t,...n,...e,...i,...o,...s,...c,...l,...d,f];export{p as default};
|
|
1
|
+
import{t as e}from"./json-B88Oqtu5.js";import{t}from"./javascript-BzbQS41l.js";import{t as n}from"./typescript-j_1H8WHN.js";import{t as r}from"./css-BGIxQoYs.js";import{t as i}from"./html-DSw1lh5G.js";var a=Object.freeze(JSON.parse(`{"displayName":"HTML (Derivative)","injections":{"R:text.html - (comment.block, text.html meta.embedded, meta.tag.*.*.html, meta.tag.*.*.*.html, meta.tag.*.*.*.*.html)":{"patterns":[{"match":"<","name":"invalid.illegal.bad-angle-bracket.html"}]}},"name":"html-derivative","patterns":[{"include":"text.html.basic#core-minus-invalid"},{"begin":"(</?)(\\\\w[^<>\\\\s]*)(?<!/)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"}},"end":"((?: ?/)?>)","endCaptures":{"1":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.other.unrecognized.html.derivative","patterns":[{"include":"text.html.basic#attribute"}]}],"scopeName":"text.html.derivative","embeddedLangs":["html"]}`)),o=[...i,a],s=[Object.freeze(JSON.parse('{"fileTypes":[],"injectTo":["text.html.markdown"],"injectionSelector":"L:text.html.markdown","name":"markdown-vue","patterns":[{"include":"#vue-code-block"}],"repository":{"vue-code-block":{"begin":"(^|\\\\G)(\\\\s*)(`{3,}|~{3,})\\\\s*(?i:(vue)((\\\\s+|[,:?{])[^`~]*)?$)","beginCaptures":{"3":{"name":"punctuation.definition.markdown"},"4":{"name":"fenced_code.block.language.markdown"},"5":{"name":"fenced_code.block.language.attributes.markdown","patterns":[]}},"end":"(^|\\\\G)(\\\\2|\\\\s{0,3})(\\\\3)\\\\s*$","endCaptures":{"3":{"name":"punctuation.definition.markdown"}},"name":"markup.fenced_code.block.markdown","patterns":[{"include":"text.html.vue"}]}},"scopeName":"markdown.vue.codeblock"}'))],c=[Object.freeze(JSON.parse(`{"fileTypes":[],"injectTo":["source.vue","text.html.markdown","text.html.derivative","text.pug"],"injectionSelector":"L:meta.tag -meta.attribute -meta.ng-binding -entity.name.tag.pug -attribute_value -source.tsx -source.js.jsx, L:meta.element -meta.attribute","name":"vue-directives","patterns":[{"include":"text.html.vue#vue-directives"}],"scopeName":"vue.directives"}`))],l=[Object.freeze(JSON.parse(`{"fileTypes":[],"injectTo":["source.vue","text.html.markdown","text.html.derivative","text.pug"],"injectionSelector":"L:text.pug -comment -string.comment, L:text.html.derivative -comment.block, L:text.html.markdown -comment.block","name":"vue-interpolations","patterns":[{"include":"text.html.vue#vue-interpolations"}],"scopeName":"vue.interpolations"}`))],u=Object.freeze(JSON.parse(`{"fileTypes":[],"injectTo":["source.vue"],"injectionSelector":"L:source.css -comment, L:source.postcss -comment, L:source.sass -comment, L:source.stylus -comment","name":"vue-sfc-style-variable-injection","patterns":[{"include":"#vue-sfc-style-variable-injection"}],"repository":{"vue-sfc-style-variable-injection":{"begin":"\\\\b(v-bind)\\\\s*\\\\(","beginCaptures":{"1":{"name":"entity.name.function"}},"end":"\\\\)","name":"vue.sfc.style.variable.injection.v-bind","patterns":[{"begin":"([\\"'])","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"}},"end":"(\\\\1)","endCaptures":{"1":{"name":"punctuation.definition.tag.end.html"}},"name":"source.ts.embedded.html.vue","patterns":[{"include":"source.js"}]},{"include":"source.js"}]}},"scopeName":"vue.sfc.style.variable.injection","embeddedLangs":["javascript"]}`)),d=[...t,u],f=Object.freeze(JSON.parse(`{"displayName":"Vue","name":"vue","patterns":[{"include":"#vue-comments"},{"include":"#self-closing-tag"},{"begin":"(<)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"}},"end":"(>)","endCaptures":{"1":{"name":"punctuation.definition.tag.end.html.vue"}},"patterns":[{"begin":"([-0-:A-Za-z]+)\\\\b(?=[^>]*\\\\blang\\\\s*=\\\\s*([\\"']?)md\\\\b\\\\2)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</)","name":"text.html.markdown","patterns":[{"include":"text.html.markdown"}]}]},{"begin":"(?!template(?![-0-:A-Za-z]))([-0-:A-Za-z]+)\\\\b(?=[^>]*\\\\blang\\\\s*=\\\\s*([\\"']?)html\\\\b\\\\2)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"contentName":"text.html.derivative","end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#tag-stuff"},{"include":"#html-stuff"}]},{"begin":"([-0-:A-Za-z]+)\\\\b(?=[^>]*\\\\blang\\\\s*=\\\\s*([\\"']?)pug\\\\b\\\\2)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</)","name":"text.pug","patterns":[{"include":"text.pug"}]}]},{"begin":"([-0-:A-Za-z]+)\\\\b(?=[^>]*\\\\blang\\\\s*=\\\\s*([\\"']?)stylus\\\\b\\\\2)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</)","name":"source.stylus","patterns":[{"include":"source.stylus"}]}]},{"begin":"([-0-:A-Za-z]+)\\\\b(?=[^>]*\\\\blang\\\\s*=\\\\s*([\\"']?)postcss\\\\b\\\\2)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</)","name":"source.postcss","patterns":[{"include":"source.postcss"}]}]},{"begin":"([-0-:A-Za-z]+)\\\\b(?=[^>]*\\\\blang\\\\s*=\\\\s*([\\"']?)sass\\\\b\\\\2)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</)","name":"source.sass","patterns":[{"include":"source.sass"}]}]},{"begin":"([-0-:A-Za-z]+)\\\\b(?=[^>]*\\\\blang\\\\s*=\\\\s*([\\"']?)css\\\\b\\\\2)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</)","name":"source.css","patterns":[{"include":"source.css"}]}]},{"begin":"([-0-:A-Za-z]+)\\\\b(?=[^>]*\\\\blang\\\\s*=\\\\s*([\\"']?)scss\\\\b\\\\2)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</)","name":"source.css.scss","patterns":[{"include":"source.css.scss"}]}]},{"begin":"([-0-:A-Za-z]+)\\\\b(?=[^>]*\\\\blang\\\\s*=\\\\s*([\\"']?)less\\\\b\\\\2)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</)","name":"source.css.less","patterns":[{"include":"source.css.less"}]}]},{"begin":"([-0-:A-Za-z]+)\\\\b(?=[^>]*\\\\blang\\\\s*=\\\\s*([\\"']?)js\\\\b\\\\2)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</)","name":"source.js","patterns":[{"include":"source.js"}]}]},{"begin":"([-0-:A-Za-z]+)\\\\b(?=[^>]*\\\\blang\\\\s*=\\\\s*([\\"']?)ts\\\\b\\\\2)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)(?=[^\\\\n]*<\/script[>\\\\s])","end":"(?=<\/script[>\\\\s])","name":"source.ts","patterns":[{"include":"source.ts"}]},{"begin":"(?<=>)","name":"source.ts","patterns":[{"include":"source.ts"}],"while":"^(?!\\\\s*<\/script[>\\\\s])"}]},{"begin":"([-0-:A-Za-z]+)\\\\b(?=[^>]*\\\\blang\\\\s*=\\\\s*([\\"']?)jsx\\\\b\\\\2)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</)","name":"source.js.jsx","patterns":[{"include":"source.js.jsx"}]}]},{"begin":"([-0-:A-Za-z]+)\\\\b(?=[^>]*\\\\blang\\\\s*=\\\\s*([\\"']?)tsx\\\\b\\\\2)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)(?=[^\\\\n]*<\/script[>\\\\s])","end":"(?=<\/script[>\\\\s])","name":"source.tsx","patterns":[{"include":"source.tsx"}]},{"begin":"(?<=>)","name":"source.tsx","patterns":[{"include":"source.tsx"}],"while":"^(?!\\\\s*<\/script[>\\\\s])"}]},{"begin":"([-0-:A-Za-z]+)\\\\b(?=[^>]*\\\\blang\\\\s*=\\\\s*([\\"']?)coffee\\\\b\\\\2)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</)","name":"source.coffee","patterns":[{"include":"source.coffee"}]}]},{"begin":"([-0-:A-Za-z]+)\\\\b(?=[^>]*\\\\blang\\\\s*=\\\\s*([\\"']?)json\\\\b\\\\2)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</)","name":"source.json","patterns":[{"include":"source.json"}]}]},{"begin":"([-0-:A-Za-z]+)\\\\b(?=[^>]*\\\\blang\\\\s*=\\\\s*([\\"']?)jsonc\\\\b\\\\2)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</)","name":"source.json.comments","patterns":[{"include":"source.json.comments"}]}]},{"begin":"([-0-:A-Za-z]+)\\\\b(?=[^>]*\\\\blang\\\\s*=\\\\s*([\\"']?)json5\\\\b\\\\2)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</)","name":"source.json5","patterns":[{"include":"source.json5"}]}]},{"begin":"([-0-:A-Za-z]+)\\\\b(?=[^>]*\\\\blang\\\\s*=\\\\s*([\\"']?)yaml\\\\b\\\\2)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</)","name":"source.yaml","patterns":[{"include":"source.yaml"}]}]},{"begin":"([-0-:A-Za-z]+)\\\\b(?=[^>]*\\\\blang\\\\s*=\\\\s*([\\"']?)toml\\\\b\\\\2)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</)","name":"source.toml","patterns":[{"include":"source.toml"}]}]},{"begin":"([-0-:A-Za-z]+)\\\\b(?=[^>]*\\\\blang\\\\s*=\\\\s*([\\"']?)(g(?:ql|raphql))\\\\b\\\\2)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</)","name":"source.graphql","patterns":[{"include":"source.graphql"}]}]},{"begin":"([-0-:A-Za-z]+)\\\\b(?=[^>]*\\\\blang\\\\s*=\\\\s*([\\"']?)vue\\\\b\\\\2)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</)","name":"text.html.vue","patterns":[{"include":"text.html.vue"}]}]},{"begin":"(template)(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</template[>\\\\s])","name":"text.html.derivative","patterns":[{"include":"#html-stuff"}]}]},{"begin":"(script)(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#multi-line-script-tag-stuff"}]},{"begin":"(style)(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#multi-line-style-tag-stuff"}]},{"begin":"([-0-:A-Za-z]+)","beginCaptures":{"1":{"name":"entity.name.tag.$1.html.vue"}},"end":"(</)(\\\\1)\\\\s*(?=>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</)","name":"text"}]}]}],"repository":{"capitalized-tag":{"begin":"(<)([A-Z][-0-:A-Za-z]*)(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.html.vue"}},"end":"/?>","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html.vue"}},"name":"meta.tag.structure.$2.start.html.vue","patterns":[{"begin":"\\\\G","end":"(?=/?>)","patterns":[{"include":"#vue-directives"},{"include":"text.html.basic#attribute"}]}]},"html-stuff":{"patterns":[{"include":"#template-tag"},{"include":"#capitalized-tag"},{"include":"text.html.derivative"},{"include":"text.html.basic"}]},"multi-line-script-tag-stuff":{"begin":"\\\\G","end":"(?=<\/script[>\\\\s])","patterns":[{"begin":"\\\\G(?!\\\\blang\\\\s*=\\\\s*[\\"']?(?:tsx??|jsx|coffee)\\\\b)","end":"(?=\\\\blang\\\\s*=\\\\s*[\\"']?(?:tsx??|jsx|coffee)\\\\b)|(>)","endCaptures":{"1":{"name":"punctuation.definition.tag.end.html.vue"}},"name":"meta.tag-stuff","patterns":[{"include":"#vue-directives"},{"include":"text.html.basic#attribute"}]},{"begin":"(?=\\\\blang\\\\s*=\\\\s*[\\"']?ts\\\\b)","end":"(?=<\/script[>\\\\s])","patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)(?=[^\\\\n]*<\/script[>\\\\s])","end":"(?=<\/script[>\\\\s])","name":"source.ts","patterns":[{"include":"source.ts"}]},{"begin":"(?<=>)","name":"source.ts","patterns":[{"include":"source.ts"}],"while":"^(?!\\\\s*<\/script[>\\\\s])"}]},{"begin":"(?=\\\\blang\\\\s*=\\\\s*[\\"']?tsx\\\\b)","end":"(?=<\/script[>\\\\s])","patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)(?=[^\\\\n]*<\/script[>\\\\s])","end":"(?=<\/script[>\\\\s])","name":"source.tsx","patterns":[{"include":"source.tsx"}]},{"begin":"(?<=>)","name":"source.tsx","patterns":[{"include":"source.tsx"}],"while":"^(?!\\\\s*<\/script[>\\\\s])"}]},{"begin":"(?=\\\\blang\\\\s*=\\\\s*[\\"']?jsx\\\\b)","end":"(?=<\/script[>\\\\s])","patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=<\/script[>\\\\s])","name":"source.js.jsx","patterns":[{"include":"source.js.jsx"}]}]},{"begin":"(?=\\\\blang\\\\s*=\\\\s*[\\"']?coffee\\\\b)","end":"(?=<\/script[>\\\\s])","patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=<\/script[>\\\\s])","name":"source.coffee","patterns":[{"include":"source.coffee"}]}]},{"begin":"(?<=>)","end":"(?=<\/script[>\\\\s])","name":"source.js","patterns":[{"include":"source.js"}]}]},"multi-line-style-tag-stuff":{"begin":"\\\\G","end":"(?=</style[>\\\\s])","patterns":[{"begin":"\\\\G(?!\\\\blang\\\\s*=\\\\s*[\\"']?(?:scss|stylus|less|postcss)\\\\b)","end":"(?=\\\\blang\\\\s*=\\\\s*[\\"']?(?:scss|stylus|less|postcss)\\\\b)|(>)","endCaptures":{"1":{"name":"punctuation.definition.tag.end.html.vue"}},"name":"meta.tag-stuff","patterns":[{"include":"#vue-directives"},{"include":"text.html.basic#attribute"}]},{"begin":"(?=\\\\blang\\\\s*=\\\\s*[\\"']?scss\\\\b)","end":"(?=</style[>\\\\s])","patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</style[>\\\\s])","name":"source.css.scss","patterns":[{"include":"source.css.scss"}]}]},{"begin":"(?=\\\\blang\\\\s*=\\\\s*[\\"']?stylus\\\\b)","end":"(?=</style[>\\\\s])","patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</style[>\\\\s])","name":"source.stylus","patterns":[{"include":"source.stylus"}]}]},{"begin":"(?=\\\\blang\\\\s*=\\\\s*[\\"']?less\\\\b)","end":"(?=</style[>\\\\s])","patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</style[>\\\\s])","name":"source.css.less","patterns":[{"include":"source.css.less"}]}]},{"begin":"(?=\\\\blang\\\\s*=\\\\s*[\\"']?postcss\\\\b)","end":"(?=</style[>\\\\s])","patterns":[{"include":"#tag-stuff"},{"begin":"(?<=>)","end":"(?=</style[>\\\\s])","name":"source.postcss","patterns":[{"include":"source.postcss"}]}]},{"begin":"(?<=>)","end":"(?=</style[>\\\\s])","name":"source.css","patterns":[{"include":"source.css"}]}]},"self-closing-tag":{"begin":"(<)([-0-:A-Za-z]+)(?=([^>]+/>))","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"end":"(/>)","endCaptures":{"1":{"name":"punctuation.definition.tag.end.html.vue"}},"name":"self-closing-tag","patterns":[{"include":"#tag-stuff"}]},"tag-stuff":{"begin":"\\\\G","end":"(?=/>)|(>)","endCaptures":{"1":{"name":"punctuation.definition.tag.end.html.vue"}},"name":"meta.tag-stuff","patterns":[{"include":"#vue-directives"},{"include":"text.html.basic#attribute"}]},"template-tag":{"patterns":[{"include":"#template-tag-1"},{"include":"#template-tag-2"}]},"template-tag-1":{"begin":"(<)(template)\\\\b(>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"},"3":{"name":"punctuation.definition.tag.end.html.vue"}},"end":"(/?>)","endCaptures":{"1":{"name":"punctuation.definition.tag.end.html.vue"}},"name":"meta.template-tag.start","patterns":[{"begin":"\\\\G","end":"(?=/>)|((</)(template)(?=[>\\\\s]))","endCaptures":{"2":{"name":"punctuation.definition.tag.begin.html.vue"},"3":{"name":"entity.name.tag.$3.html.vue"}},"name":"meta.template-tag.end","patterns":[{"include":"#html-stuff"}]}]},"template-tag-2":{"begin":"(<)(template)(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html.vue"},"2":{"name":"entity.name.tag.$2.html.vue"}},"end":"(/?>)","endCaptures":{"1":{"name":"punctuation.definition.tag.end.html.vue"}},"name":"meta.template-tag.start","patterns":[{"begin":"\\\\G","end":"(?=/>)|((</)(template)(?=[>\\\\s]))","endCaptures":{"2":{"name":"punctuation.definition.tag.begin.html.vue"},"3":{"name":"entity.name.tag.$3.html.vue"}},"name":"meta.template-tag.end","patterns":[{"include":"#tag-stuff"},{"include":"#html-stuff"}]}]},"vue-comments":{"patterns":[{"include":"#vue-comments-key-value"},{"begin":"<!--","captures":{"0":{"name":"punctuation.definition.comment.vue"}},"end":"-->","name":"comment.block.vue"}]},"vue-comments-key-value":{"begin":"(<!--)\\\\s*(@)([$\\\\w]+)(?=\\\\s)","beginCaptures":{"1":{"name":"punctuation.definition.comment.vue"},"2":{"name":"punctuation.definition.block.tag.comment.vue"},"3":{"name":"storage.type.class.comment.vue"}},"end":"(-->)","endCaptures":{"1":{"name":"punctuation.definition.comment.vue"}},"name":"comment.block.vue","patterns":[{"include":"source.json#value"}]},"vue-directives":{"patterns":[{"include":"#vue-directives-control"},{"include":"#vue-directives-generic-attr"},{"include":"#vue-directives-style-attr"},{"include":"#vue-directives-original"}]},"vue-directives-control":{"begin":"(?:(v-for)|(v-(?:if|else-if|else)))(?=[)/=>\\\\s])","beginCaptures":{"1":{"name":"keyword.control.loop.vue"},"2":{"name":"keyword.control.conditional.vue"}},"end":"(?=\\\\s*[^=\\\\s])","name":"meta.attribute.directive.control.vue","patterns":[{"include":"#vue-directives-expression"}]},"vue-directives-expression":{"patterns":[{"begin":"(=)\\\\s*([\\"'\`])","beginCaptures":{"1":{"name":"punctuation.separator.key-value.html.vue"},"2":{"name":"punctuation.definition.string.begin.html.vue"}},"end":"(\\\\2)","endCaptures":{"1":{"name":"punctuation.definition.string.end.html.vue"}},"patterns":[{"begin":"(?<=([\\"'\`]))","end":"(?=\\\\1)","name":"source.ts.embedded.html.vue","patterns":[{"include":"source.ts#expression"}]}]},{"begin":"(=)\\\\s*(?=[^\\"'\`])","beginCaptures":{"1":{"name":"punctuation.separator.key-value.html.vue"}},"end":"(?=([>\\\\s]|/>))","patterns":[{"begin":"(?=[^\\"'\`])","end":"(?=([>\\\\s]|/>))","name":"source.ts.embedded.html.vue","patterns":[{"include":"source.ts#expression"}]}]}]},"vue-directives-generic-attr":{"begin":"\\\\b(generic)\\\\s*(=)","beginCaptures":{"1":{"name":"entity.other.attribute-name.html.vue"},"2":{"name":"punctuation.separator.key-value.html.vue"}},"end":"(?<=[\\"'])","name":"meta.attribute.generic.vue","patterns":[{"begin":"([\\"'])","beginCaptures":{"1":{"name":"punctuation.definition.string.begin.html.vue"}},"end":"(\\\\1)","endCaptures":{"1":{"name":"punctuation.definition.string.end.html.vue"}},"name":"meta.type.parameters.vue","patterns":[{"include":"source.ts#comment"},{"match":"(?<![$_[:alnum:]])(?:(?<=\\\\.\\\\.\\\\.)|(?<!\\\\.))(extends|in|out)(?![$_[:alnum:]])(?:(?=\\\\.\\\\.\\\\.)|(?!\\\\.))","name":"storage.modifier.ts"},{"include":"source.ts#type"},{"include":"source.ts#punctuation-comma"},{"match":"(=)(?!>)","name":"keyword.operator.assignment.ts"}]}]},"vue-directives-original":{"begin":"(?:(v-[-\\\\w]+)(:)?|([.:])|(@)|(#))(?:(\\\\[)([^]]*)(])|([-\\\\w]+))?","beginCaptures":{"1":{"name":"entity.other.attribute-name.html.vue"},"2":{"name":"punctuation.separator.key-value.html.vue"},"3":{"name":"punctuation.attribute-shorthand.bind.html.vue"},"4":{"name":"punctuation.attribute-shorthand.event.html.vue"},"5":{"name":"punctuation.attribute-shorthand.slot.html.vue"},"6":{"name":"punctuation.separator.key-value.html.vue"},"7":{"name":"source.ts.embedded.html.vue","patterns":[{"include":"source.ts#expression"}]},"8":{"name":"punctuation.separator.key-value.html.vue"},"9":{"name":"entity.other.attribute-name.html.vue"}},"end":"(?=\\\\s*[^=\\\\s])","name":"meta.attribute.directive.vue","patterns":[{"1":{"name":"punctuation.separator.key-value.html.vue"},"2":{"name":"entity.other.attribute-name.html.vue"},"match":"(\\\\.)([-\\\\w]*)"},{"include":"#vue-directives-expression"}]},"vue-directives-style-attr":{"begin":"\\\\b(style)\\\\s*(=)","beginCaptures":{"1":{"name":"entity.other.attribute-name.html.vue"},"2":{"name":"punctuation.separator.key-value.html.vue"}},"end":"(?<=[\\"'])","name":"meta.attribute.style.vue","patterns":[{"begin":"([\\"'])","beginCaptures":{"1":{"name":"punctuation.definition.string.begin.html.vue"}},"end":"(\\\\1)","endCaptures":{"1":{"name":"punctuation.definition.string.end.html.vue"}},"name":"source.css.embedded.html.vue","patterns":[{"include":"source.css#comment-block"},{"include":"source.css#escapes"},{"include":"source.css#font-features"},{"match":"(?<![-\\\\w])--[-A-Z_a-z[^\\\\x00-\\\\x7F]](?:[-0-9A-Z_a-z[^\\\\x00-\\\\x7F]]|\\\\\\\\(?:\\\\h{1,6}|.))*","name":"variable.css"},{"begin":"(?<![-A-Za-z])(?=[-A-Za-z])","end":"$|(?![-A-Za-z])","name":"meta.property-name.css","patterns":[{"include":"source.css#property-names"}]},{"begin":"(:)\\\\s*","beginCaptures":{"1":{"name":"punctuation.separator.key-value.css"}},"contentName":"meta.property-value.css","end":"\\\\s*(;)|\\\\s*(?=[\\"'])","endCaptures":{"1":{"name":"punctuation.terminator.rule.css"}},"patterns":[{"include":"source.css#comment-block"},{"include":"source.css#property-values"}]},{"match":";","name":"punctuation.terminator.rule.css"}]}]},"vue-interpolations":{"patterns":[{"begin":"(\\\\{\\\\{)","beginCaptures":{"1":{"name":"punctuation.definition.interpolation.begin.html.vue"}},"end":"(}})","endCaptures":{"1":{"name":"punctuation.definition.interpolation.end.html.vue"}},"name":"expression.embedded.vue","patterns":[{"begin":"\\\\G","end":"(?=}})","name":"source.ts.embedded.html.vue","patterns":[{"include":"source.ts#expression"}]}]}]}},"scopeName":"text.html.vue","embeddedLangs":["css","javascript","typescript","json","html","html-derivative","markdown-vue","vue-directives","vue-interpolations","vue-sfc-style-variable-injection"],"embeddedLangsLazy":["markdown","pug","stylus","sass","scss","less","jsx","tsx","coffee","jsonc","json5","yaml","toml","graphql"]}`)),p=[...r,...t,...n,...e,...i,...o,...s,...c,...l,...d,f];export{p as default};
|
package/client/dist/index.html
CHANGED
|
@@ -5,12 +5,9 @@
|
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>Intlayer Editor</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
9
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
10
|
-
<link rel="
|
|
11
|
-
<link rel="modulepreload" crossorigin href="/assets/dist-CcmWBeAo.js">
|
|
12
|
-
<link rel="modulepreload" crossorigin href="/assets/dynamic-BG2syiTL.js">
|
|
13
|
-
<link rel="stylesheet" crossorigin href="/assets/index-D82ZIHVs.css">
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-CmQV7Z_A.js"></script>
|
|
9
|
+
<link rel="modulepreload" crossorigin href="/assets/compat-r4Owm_RW.js">
|
|
10
|
+
<link rel="stylesheet" crossorigin href="/assets/index-C5SpC4ap.css">
|
|
14
11
|
</head>
|
|
15
12
|
<body>
|
|
16
13
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "intlayer-editor",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.7.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Integrate the Intlayer visual editor into your Intlayer projects, enabling CMS-like content management with multilingual support.",
|
|
6
6
|
"keywords": [
|
|
@@ -93,41 +93,41 @@
|
|
|
93
93
|
"@fastify/cors": "11.3.0",
|
|
94
94
|
"@fastify/formbody": "9.0.0",
|
|
95
95
|
"@fastify/helmet": "13.1.1",
|
|
96
|
-
"@fastify/static": "10.1.
|
|
97
|
-
"@intlayer/
|
|
98
|
-
"@intlayer/
|
|
99
|
-
"@intlayer/
|
|
96
|
+
"@fastify/static": "10.1.5",
|
|
97
|
+
"@intlayer/api": "9.7.0",
|
|
98
|
+
"@intlayer/cli": "9.7.0",
|
|
99
|
+
"@intlayer/config": "9.7.0",
|
|
100
|
+
"@intlayer/dictionaries-entry": "9.7.0",
|
|
101
|
+
"@intlayer/engine": "9.7.0",
|
|
100
102
|
"fastify": "5.12.5",
|
|
101
|
-
"fastify-intlayer": "9.
|
|
102
|
-
"mime": "4.1.0"
|
|
103
|
+
"fastify-intlayer": "9.7.0",
|
|
104
|
+
"mime": "4.1.0",
|
|
105
|
+
"preact-intlayer": "9.7.0",
|
|
106
|
+
"react-intlayer": "9.7.0",
|
|
107
|
+
"vite-intlayer": "9.7.0"
|
|
103
108
|
},
|
|
104
109
|
"devDependencies": {
|
|
105
|
-
"@intlayer/
|
|
106
|
-
"@intlayer/
|
|
107
|
-
"@intlayer/
|
|
110
|
+
"@intlayer/backend-contract": "9.7.0",
|
|
111
|
+
"@intlayer/core": "9.7.0",
|
|
112
|
+
"@intlayer/design-system": "9.7.0",
|
|
113
|
+
"@intlayer/editor-react": "9.7.0",
|
|
114
|
+
"@intlayer/types": "9.7.0",
|
|
115
|
+
"@preact/preset-vite": "2.10.6",
|
|
108
116
|
"@tailwindcss/vite": "4.3.3",
|
|
109
|
-
"@tanstack/react-query": "5.104.
|
|
110
|
-
"@types/node": "^
|
|
111
|
-
"@types/react": "19.3.0",
|
|
112
|
-
"@types/react-dom": "19.3.0",
|
|
117
|
+
"@tanstack/react-query": "5.104.1",
|
|
118
|
+
"@types/node": "^26",
|
|
113
119
|
"@utils/ts-config": "1.0.4",
|
|
114
|
-
"
|
|
115
|
-
"
|
|
116
|
-
"framer-motion": "13.4.6",
|
|
120
|
+
"autoprefixer": "10.6.1",
|
|
121
|
+
"framer-motion": "14.0.0",
|
|
117
122
|
"fuse.js": "7.5.0",
|
|
118
|
-
"globals": "17.
|
|
119
|
-
"intlayer": "9.
|
|
120
|
-
"lucide-react": "1.
|
|
121
|
-
"
|
|
122
|
-
"react": "19.3.0",
|
|
123
|
-
"react-dom": "19.3.0",
|
|
124
|
-
"react-intlayer": "9.6.0",
|
|
125
|
-
"react-router-dom": "7.18.3",
|
|
123
|
+
"globals": "17.13.0",
|
|
124
|
+
"intlayer": "9.7.0",
|
|
125
|
+
"lucide-react": "1.52.0",
|
|
126
|
+
"preact": "11.0.0",
|
|
126
127
|
"tailwindcss": "4.3.3",
|
|
127
128
|
"tsdown": "0.23.0",
|
|
128
129
|
"typescript": "7.0.2",
|
|
129
|
-
"vite": "8.3.
|
|
130
|
-
"vite-intlayer": "9.6.0",
|
|
130
|
+
"vite": "8.3.3",
|
|
131
131
|
"vitest": "5.0.3"
|
|
132
132
|
},
|
|
133
133
|
"engines": {
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_services_editorAuth_service = require('../services/editorAuth.service.cjs');
|
|
3
|
+
const require_utils_httpStatusCodes = require('../utils/httpStatusCodes.cjs');
|
|
4
|
+
const require_utils_responseData = require('../utils/responseData.cjs');
|
|
5
|
+
let _intlayer_config_node = require("@intlayer/config/node");
|
|
6
|
+
|
|
7
|
+
//#region src/controllers/auth.controller.ts
|
|
8
|
+
const envFileOptions = {
|
|
9
|
+
env: process.env.NODE_ENV,
|
|
10
|
+
envFile: process.env.ENV_FILE
|
|
11
|
+
};
|
|
12
|
+
/** Host of an `Origin` header, `null` for an opaque origin (`null`). */
|
|
13
|
+
const getOriginHost = (origin) => {
|
|
14
|
+
try {
|
|
15
|
+
return new URL(origin).host;
|
|
16
|
+
} catch {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Rejects cross-site requests. The editor answers CORS with `*`, so without
|
|
22
|
+
* this guard any page open in the browser could read the bearer token from
|
|
23
|
+
* the local editor or trigger a login.
|
|
24
|
+
*/
|
|
25
|
+
const assertSameOrigin = async (request, reply) => {
|
|
26
|
+
const fetchSite = request.headers["sec-fetch-site"];
|
|
27
|
+
const { origin, host } = request.headers;
|
|
28
|
+
const isCrossSiteFetch = typeof fetchSite === "string" && fetchSite !== "same-origin" && fetchSite !== "none";
|
|
29
|
+
const isForeignOrigin = typeof origin === "string" && getOriginHost(origin) !== host;
|
|
30
|
+
if (!isCrossSiteFetch && !isForeignOrigin) return;
|
|
31
|
+
return reply.status(403).send(require_utils_responseData.formatResponse({
|
|
32
|
+
error: {
|
|
33
|
+
code: "FORBIDDEN_ORIGIN",
|
|
34
|
+
title: "Forbidden",
|
|
35
|
+
message: "The editor authentication is only available to the editor."
|
|
36
|
+
},
|
|
37
|
+
status: 403
|
|
38
|
+
}));
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Returns the CMS identity the editor client should use as bearer token.
|
|
42
|
+
*/
|
|
43
|
+
const getEditorAuth = async (_request, reply) => {
|
|
44
|
+
const auth = await require_services_editorAuth_service.resolveEditorAuth((0, _intlayer_config_node.getConfiguration)(envFileOptions));
|
|
45
|
+
return reply.send(require_utils_responseData.formatResponse({ data: {
|
|
46
|
+
auth,
|
|
47
|
+
isLoginPending: require_services_editorAuth_service.isEditorLoginPending()
|
|
48
|
+
} }));
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Opens the CMS login page in the browser, as `intlayer login` does. Answers
|
|
52
|
+
* right away: the client polls {@link getEditorAuth} until the login lands.
|
|
53
|
+
*/
|
|
54
|
+
const startLogin = async (_request, reply) => {
|
|
55
|
+
require_services_editorAuth_service.startEditorLogin((0, _intlayer_config_node.getConfiguration)(envFileOptions), envFileOptions).catch((error) => console.error(error));
|
|
56
|
+
return reply.send(require_utils_responseData.formatResponse({
|
|
57
|
+
data: { isLoginPending: true },
|
|
58
|
+
status: 202
|
|
59
|
+
}));
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Signs the editor out of its `intlayer login` session, then returns the
|
|
63
|
+
* identity left: the configured access key, if any.
|
|
64
|
+
*/
|
|
65
|
+
const logout = async (_request, reply) => {
|
|
66
|
+
const configuration = (0, _intlayer_config_node.getConfiguration)(envFileOptions);
|
|
67
|
+
await require_services_editorAuth_service.logoutEditor(configuration);
|
|
68
|
+
const auth = await require_services_editorAuth_service.resolveEditorAuth(configuration);
|
|
69
|
+
return reply.send(require_utils_responseData.formatResponse({ data: {
|
|
70
|
+
auth,
|
|
71
|
+
isLoginPending: require_services_editorAuth_service.isEditorLoginPending()
|
|
72
|
+
} }));
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
//#endregion
|
|
76
|
+
exports.assertSameOrigin = assertSameOrigin;
|
|
77
|
+
exports.getEditorAuth = getEditorAuth;
|
|
78
|
+
exports.logout = logout;
|
|
79
|
+
exports.startLogin = startLogin;
|
|
80
|
+
//# sourceMappingURL=auth.controller.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.controller.cjs","names":["formatResponse","resolveEditorAuth","getConfiguration","isEditorLoginPending","logoutEditor"],"sources":["../../src/controllers/auth.controller.ts"],"sourcesContent":["import { getConfiguration } from '@intlayer/config/node';\nimport {\n type EditorAuth,\n isEditorLoginPending,\n logoutEditor,\n resolveEditorAuth,\n startEditorLogin,\n} from '@services/editorAuth.service';\nimport { HttpStatusCodes } from '@utils/httpStatusCodes';\nimport { formatResponse, type ResponseData } from '@utils/responseData';\nimport type { FastifyReply, FastifyRequest } from 'fastify';\n\nexport type GetEditorAuthResultData = {\n /** `null` when neither a login session nor an access key is available. */\n auth: EditorAuth | null;\n isLoginPending: boolean;\n};\nexport type GetEditorAuthResult = ResponseData<GetEditorAuthResultData>;\n\nexport type StartEditorLoginResult = ResponseData<{ isLoginPending: boolean }>;\n\nexport type LogoutEditorResult = ResponseData<GetEditorAuthResultData>;\n\nconst envFileOptions = {\n env: process.env.NODE_ENV,\n envFile: process.env.ENV_FILE,\n};\n\n/** Host of an `Origin` header, `null` for an opaque origin (`null`). */\nconst getOriginHost = (origin: string): string | null => {\n try {\n return new URL(origin).host;\n } catch {\n return null;\n }\n};\n\n/**\n * Rejects cross-site requests. The editor answers CORS with `*`, so without\n * this guard any page open in the browser could read the bearer token from\n * the local editor or trigger a login.\n */\nexport const assertSameOrigin = async (\n request: FastifyRequest,\n reply: FastifyReply\n): Promise<void> => {\n const fetchSite = request.headers['sec-fetch-site'];\n const { origin, host } = request.headers;\n\n const isCrossSiteFetch =\n typeof fetchSite === 'string' &&\n fetchSite !== 'same-origin' &&\n fetchSite !== 'none';\n\n const isForeignOrigin =\n typeof origin === 'string' && getOriginHost(origin) !== host;\n\n if (!isCrossSiteFetch && !isForeignOrigin) return;\n\n return reply.status(HttpStatusCodes.FORBIDDEN_403).send(\n formatResponse<null>({\n error: {\n code: 'FORBIDDEN_ORIGIN',\n title: 'Forbidden',\n message: 'The editor authentication is only available to the editor.',\n },\n status: HttpStatusCodes.FORBIDDEN_403,\n })\n );\n};\n\n/**\n * Returns the CMS identity the editor client should use as bearer token.\n */\nexport const getEditorAuth = async (\n _request: FastifyRequest,\n reply: FastifyReply\n): Promise<void> => {\n const auth = await resolveEditorAuth(getConfiguration(envFileOptions));\n\n return reply.send(\n formatResponse<GetEditorAuthResultData>({\n data: { auth, isLoginPending: isEditorLoginPending() },\n })\n );\n};\n\n/**\n * Opens the CMS login page in the browser, as `intlayer login` does. Answers\n * right away: the client polls {@link getEditorAuth} until the login lands.\n */\nexport const startLogin = async (\n _request: FastifyRequest,\n reply: FastifyReply\n): Promise<void> => {\n startEditorLogin(getConfiguration(envFileOptions), envFileOptions).catch(\n (error) => console.error(error)\n );\n\n return reply.send(\n formatResponse<{ isLoginPending: boolean }>({\n data: { isLoginPending: true },\n status: HttpStatusCodes.ACCEPTED_202,\n })\n );\n};\n\n/**\n * Signs the editor out of its `intlayer login` session, then returns the\n * identity left: the configured access key, if any.\n */\nexport const logout = async (\n _request: FastifyRequest,\n reply: FastifyReply\n): Promise<void> => {\n const configuration = getConfiguration(envFileOptions);\n\n await logoutEditor(configuration);\n\n const auth = await resolveEditorAuth(configuration);\n\n return reply.send(\n formatResponse<GetEditorAuthResultData>({\n data: { auth, isLoginPending: isEditorLoginPending() },\n })\n );\n};\n"],"mappings":";;;;;;;AAuBA,MAAM,iBAAiB;CACrB;CACA,SAAS,QAAQ,IAAI;AACvB;;AAGA,MAAM,iBAAiB,WAAkC;CACvD,IAAI;EACF,OAAO,IAAI,IAAI,MAAM,CAAC,CAAC;CACzB,QAAQ;EACN,OAAO;CACT;AACF;;;;;;AAOA,MAAa,mBAAmB,OAC9B,SACA,UACkB;CAClB,MAAM,YAAY,QAAQ,QAAQ;CAClC,MAAM,EAAE,QAAQ,SAAS,QAAQ;CAEjC,MAAM,mBACJ,OAAO,cAAc,YACrB,cAAc,iBACd,cAAc;CAEhB,MAAM,kBACJ,OAAO,WAAW,YAAY,cAAc,MAAM,MAAM;CAE1D,IAAI,CAAC,oBAAoB,CAAC,iBAAiB;CAE3C,OAAO,MAAM,UAAoC,CAAC,CAAC,KACjDA,0CAAqB;EACnB,OAAO;GACL,MAAM;GACN,OAAO;GACP,SAAS;EACX;EACA;CACF,CAAC,CACH;AACF;;;;AAKA,MAAa,gBAAgB,OAC3B,UACA,UACkB;CAClB,MAAM,OAAO,MAAMC,0DAAkBC,wCAAiB,cAAc,CAAC;CAErE,OAAO,MAAM,KACXF,0CAAwC,EACtC,MAAM;EAAE;EAAM,gBAAgBG,yDAAqB;CAAE,EACvD,CAAC,CACH;AACF;;;;;AAMA,MAAa,aAAa,OACxB,UACA,UACkB;CAClB,yDAAiBD,wCAAiB,cAAc,GAAG,cAAc,CAAC,CAAC,OAChE,UAAU,QAAQ,MAAM,KAAK,CAChC;CAEA,OAAO,MAAM,KACXF,0CAA4C;EAC1C,MAAM,EAAE,gBAAgB,KAAK;EAC7B;CACF,CAAC,CACH;AACF;;;;;AAMA,MAAa,SAAS,OACpB,UACA,UACkB;CAClB,MAAM,oBAAgBE,wCAAiB,cAAc;CAErD,MAAME,iDAAa,aAAa;CAEhC,MAAM,OAAO,MAAMH,sDAAkB,aAAa;CAElD,OAAO,MAAM,KACXD,0CAAwC,EACtC,MAAM;EAAE;EAAM,gBAAgBG,yDAAqB;CAAE,EACvD,CAAC,CACH;AACF"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { EditorAuth } from "../services/editorAuth.service.js";
|
|
2
|
+
import { ResponseData } from "../utils/responseData.js";
|
|
3
|
+
import { FastifyReply, FastifyRequest } from "fastify";
|
|
4
|
+
//#region src/controllers/auth.controller.d.ts
|
|
5
|
+
export type GetEditorAuthResultData = {
|
|
6
|
+
/** `null` when neither a login session nor an access key is available. */
|
|
7
|
+
auth: EditorAuth | null;
|
|
8
|
+
isLoginPending: boolean;
|
|
9
|
+
};
|
|
10
|
+
export type GetEditorAuthResult = ResponseData<GetEditorAuthResultData>;
|
|
11
|
+
export type StartEditorLoginResult = ResponseData<{
|
|
12
|
+
isLoginPending: boolean;
|
|
13
|
+
}>;
|
|
14
|
+
export type LogoutEditorResult = ResponseData<GetEditorAuthResultData>;
|
|
15
|
+
/**
|
|
16
|
+
* Rejects cross-site requests. The editor answers CORS with `*`, so without
|
|
17
|
+
* this guard any page open in the browser could read the bearer token from
|
|
18
|
+
* the local editor or trigger a login.
|
|
19
|
+
*/
|
|
20
|
+
export declare const assertSameOrigin: (request: FastifyRequest, reply: FastifyReply) => Promise<void>;
|
|
21
|
+
/**
|
|
22
|
+
* Returns the CMS identity the editor client should use as bearer token.
|
|
23
|
+
*/
|
|
24
|
+
export declare const getEditorAuth: (_request: FastifyRequest, reply: FastifyReply) => Promise<void>;
|
|
25
|
+
/**
|
|
26
|
+
* Opens the CMS login page in the browser, as `intlayer login` does. Answers
|
|
27
|
+
* right away: the client polls {@link getEditorAuth} until the login lands.
|
|
28
|
+
*/
|
|
29
|
+
export declare const startLogin: (_request: FastifyRequest, reply: FastifyReply) => Promise<void>;
|
|
30
|
+
/**
|
|
31
|
+
* Signs the editor out of its `intlayer login` session, then returns the
|
|
32
|
+
* identity left: the configured access key, if any.
|
|
33
|
+
*/
|
|
34
|
+
export declare const logout: (_request: FastifyRequest, reply: FastifyReply) => Promise<void>;
|
|
35
|
+
//#endregion
|
|
36
|
+
//# sourceMappingURL=auth.controller.d.ts.map
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { isEditorLoginPending, logoutEditor, resolveEditorAuth, startEditorLogin } from "../services/editorAuth.service.mjs";
|
|
2
|
+
import { HttpStatusCodes } from "../utils/httpStatusCodes.mjs";
|
|
3
|
+
import { formatResponse } from "../utils/responseData.mjs";
|
|
4
|
+
import { getConfiguration } from "@intlayer/config/node";
|
|
5
|
+
|
|
6
|
+
//#region src/controllers/auth.controller.ts
|
|
7
|
+
const envFileOptions = {
|
|
8
|
+
env: process.env.NODE_ENV,
|
|
9
|
+
envFile: process.env.ENV_FILE
|
|
10
|
+
};
|
|
11
|
+
/** Host of an `Origin` header, `null` for an opaque origin (`null`). */
|
|
12
|
+
const getOriginHost = (origin) => {
|
|
13
|
+
try {
|
|
14
|
+
return new URL(origin).host;
|
|
15
|
+
} catch {
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Rejects cross-site requests. The editor answers CORS with `*`, so without
|
|
21
|
+
* this guard any page open in the browser could read the bearer token from
|
|
22
|
+
* the local editor or trigger a login.
|
|
23
|
+
*/
|
|
24
|
+
const assertSameOrigin = async (request, reply) => {
|
|
25
|
+
const fetchSite = request.headers["sec-fetch-site"];
|
|
26
|
+
const { origin, host } = request.headers;
|
|
27
|
+
const isCrossSiteFetch = typeof fetchSite === "string" && fetchSite !== "same-origin" && fetchSite !== "none";
|
|
28
|
+
const isForeignOrigin = typeof origin === "string" && getOriginHost(origin) !== host;
|
|
29
|
+
if (!isCrossSiteFetch && !isForeignOrigin) return;
|
|
30
|
+
return reply.status(403).send(formatResponse({
|
|
31
|
+
error: {
|
|
32
|
+
code: "FORBIDDEN_ORIGIN",
|
|
33
|
+
title: "Forbidden",
|
|
34
|
+
message: "The editor authentication is only available to the editor."
|
|
35
|
+
},
|
|
36
|
+
status: 403
|
|
37
|
+
}));
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Returns the CMS identity the editor client should use as bearer token.
|
|
41
|
+
*/
|
|
42
|
+
const getEditorAuth = async (_request, reply) => {
|
|
43
|
+
const auth = await resolveEditorAuth(getConfiguration(envFileOptions));
|
|
44
|
+
return reply.send(formatResponse({ data: {
|
|
45
|
+
auth,
|
|
46
|
+
isLoginPending: isEditorLoginPending()
|
|
47
|
+
} }));
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Opens the CMS login page in the browser, as `intlayer login` does. Answers
|
|
51
|
+
* right away: the client polls {@link getEditorAuth} until the login lands.
|
|
52
|
+
*/
|
|
53
|
+
const startLogin = async (_request, reply) => {
|
|
54
|
+
startEditorLogin(getConfiguration(envFileOptions), envFileOptions).catch((error) => console.error(error));
|
|
55
|
+
return reply.send(formatResponse({
|
|
56
|
+
data: { isLoginPending: true },
|
|
57
|
+
status: 202
|
|
58
|
+
}));
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Signs the editor out of its `intlayer login` session, then returns the
|
|
62
|
+
* identity left: the configured access key, if any.
|
|
63
|
+
*/
|
|
64
|
+
const logout = async (_request, reply) => {
|
|
65
|
+
const configuration = getConfiguration(envFileOptions);
|
|
66
|
+
await logoutEditor(configuration);
|
|
67
|
+
const auth = await resolveEditorAuth(configuration);
|
|
68
|
+
return reply.send(formatResponse({ data: {
|
|
69
|
+
auth,
|
|
70
|
+
isLoginPending: isEditorLoginPending()
|
|
71
|
+
} }));
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
//#endregion
|
|
75
|
+
export { assertSameOrigin, getEditorAuth, logout, startLogin };
|
|
76
|
+
//# sourceMappingURL=auth.controller.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.controller.mjs","names":[],"sources":["../../src/controllers/auth.controller.ts"],"sourcesContent":["import { getConfiguration } from '@intlayer/config/node';\nimport {\n type EditorAuth,\n isEditorLoginPending,\n logoutEditor,\n resolveEditorAuth,\n startEditorLogin,\n} from '@services/editorAuth.service';\nimport { HttpStatusCodes } from '@utils/httpStatusCodes';\nimport { formatResponse, type ResponseData } from '@utils/responseData';\nimport type { FastifyReply, FastifyRequest } from 'fastify';\n\nexport type GetEditorAuthResultData = {\n /** `null` when neither a login session nor an access key is available. */\n auth: EditorAuth | null;\n isLoginPending: boolean;\n};\nexport type GetEditorAuthResult = ResponseData<GetEditorAuthResultData>;\n\nexport type StartEditorLoginResult = ResponseData<{ isLoginPending: boolean }>;\n\nexport type LogoutEditorResult = ResponseData<GetEditorAuthResultData>;\n\nconst envFileOptions = {\n env: process.env.NODE_ENV,\n envFile: process.env.ENV_FILE,\n};\n\n/** Host of an `Origin` header, `null` for an opaque origin (`null`). */\nconst getOriginHost = (origin: string): string | null => {\n try {\n return new URL(origin).host;\n } catch {\n return null;\n }\n};\n\n/**\n * Rejects cross-site requests. The editor answers CORS with `*`, so without\n * this guard any page open in the browser could read the bearer token from\n * the local editor or trigger a login.\n */\nexport const assertSameOrigin = async (\n request: FastifyRequest,\n reply: FastifyReply\n): Promise<void> => {\n const fetchSite = request.headers['sec-fetch-site'];\n const { origin, host } = request.headers;\n\n const isCrossSiteFetch =\n typeof fetchSite === 'string' &&\n fetchSite !== 'same-origin' &&\n fetchSite !== 'none';\n\n const isForeignOrigin =\n typeof origin === 'string' && getOriginHost(origin) !== host;\n\n if (!isCrossSiteFetch && !isForeignOrigin) return;\n\n return reply.status(HttpStatusCodes.FORBIDDEN_403).send(\n formatResponse<null>({\n error: {\n code: 'FORBIDDEN_ORIGIN',\n title: 'Forbidden',\n message: 'The editor authentication is only available to the editor.',\n },\n status: HttpStatusCodes.FORBIDDEN_403,\n })\n );\n};\n\n/**\n * Returns the CMS identity the editor client should use as bearer token.\n */\nexport const getEditorAuth = async (\n _request: FastifyRequest,\n reply: FastifyReply\n): Promise<void> => {\n const auth = await resolveEditorAuth(getConfiguration(envFileOptions));\n\n return reply.send(\n formatResponse<GetEditorAuthResultData>({\n data: { auth, isLoginPending: isEditorLoginPending() },\n })\n );\n};\n\n/**\n * Opens the CMS login page in the browser, as `intlayer login` does. Answers\n * right away: the client polls {@link getEditorAuth} until the login lands.\n */\nexport const startLogin = async (\n _request: FastifyRequest,\n reply: FastifyReply\n): Promise<void> => {\n startEditorLogin(getConfiguration(envFileOptions), envFileOptions).catch(\n (error) => console.error(error)\n );\n\n return reply.send(\n formatResponse<{ isLoginPending: boolean }>({\n data: { isLoginPending: true },\n status: HttpStatusCodes.ACCEPTED_202,\n })\n );\n};\n\n/**\n * Signs the editor out of its `intlayer login` session, then returns the\n * identity left: the configured access key, if any.\n */\nexport const logout = async (\n _request: FastifyRequest,\n reply: FastifyReply\n): Promise<void> => {\n const configuration = getConfiguration(envFileOptions);\n\n await logoutEditor(configuration);\n\n const auth = await resolveEditorAuth(configuration);\n\n return reply.send(\n formatResponse<GetEditorAuthResultData>({\n data: { auth, isLoginPending: isEditorLoginPending() },\n })\n );\n};\n"],"mappings":";;;;;;AAuBA,MAAM,iBAAiB;CACrB;CACA,SAAS,QAAQ,IAAI;AACvB;;AAGA,MAAM,iBAAiB,WAAkC;CACvD,IAAI;EACF,OAAO,IAAI,IAAI,MAAM,CAAC,CAAC;CACzB,QAAQ;EACN,OAAO;CACT;AACF;;;;;;AAOA,MAAa,mBAAmB,OAC9B,SACA,UACkB;CAClB,MAAM,YAAY,QAAQ,QAAQ;CAClC,MAAM,EAAE,QAAQ,SAAS,QAAQ;CAEjC,MAAM,mBACJ,OAAO,cAAc,YACrB,cAAc,iBACd,cAAc;CAEhB,MAAM,kBACJ,OAAO,WAAW,YAAY,cAAc,MAAM,MAAM;CAE1D,IAAI,CAAC,oBAAoB,CAAC,iBAAiB;CAE3C,OAAO,MAAM,UAAoC,CAAC,CAAC,KACjD,eAAqB;EACnB,OAAO;GACL,MAAM;GACN,OAAO;GACP,SAAS;EACX;EACA;CACF,CAAC,CACH;AACF;;;;AAKA,MAAa,gBAAgB,OAC3B,UACA,UACkB;CAClB,MAAM,OAAO,MAAM,kBAAkB,iBAAiB,cAAc,CAAC;CAErE,OAAO,MAAM,KACX,eAAwC,EACtC,MAAM;EAAE;EAAM,gBAAgB,qBAAqB;CAAE,EACvD,CAAC,CACH;AACF;;;;;AAMA,MAAa,aAAa,OACxB,UACA,UACkB;CAClB,iBAAiB,iBAAiB,cAAc,GAAG,cAAc,CAAC,CAAC,OAChE,UAAU,QAAQ,MAAM,KAAK,CAChC;CAEA,OAAO,MAAM,KACX,eAA4C;EAC1C,MAAM,EAAE,gBAAgB,KAAK;EAC7B;CACF,CAAC,CACH;AACF;;;;;AAMA,MAAa,SAAS,OACpB,UACA,UACkB;CAClB,MAAM,gBAAgB,iBAAiB,cAAc;CAErD,MAAM,aAAa,aAAa;CAEhC,MAAM,OAAO,MAAM,kBAAkB,aAAa;CAElD,OAAO,MAAM,KACX,eAAwC,EACtC,MAAM;EAAE;EAAM,gBAAgB,qBAAqB;CAAE,EACvD,CAAC,CACH;AACF"}
|
|
@@ -9,7 +9,11 @@ let _intlayer_config_node = require("@intlayer/config/node");
|
|
|
9
9
|
const getConfiguration = async (_req, res) => {
|
|
10
10
|
try {
|
|
11
11
|
const config = (0, _intlayer_config_node.getConfiguration)();
|
|
12
|
-
const
|
|
12
|
+
const { clientSecret: _clientSecret, ...editor } = config.editor;
|
|
13
|
+
const formattedResponse = require_utils_responseData.formatResponse({ data: {
|
|
14
|
+
...config,
|
|
15
|
+
editor
|
|
16
|
+
} });
|
|
13
17
|
return res.send(formattedResponse);
|
|
14
18
|
} catch (err) {
|
|
15
19
|
const errorMessage = err ?? {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configuration.controller.cjs","names":["getApplicationConfiguration","formatResponse"],"sources":["../../src/controllers/configuration.controller.ts"],"sourcesContent":["import { getConfiguration as getApplicationConfiguration } from '@intlayer/config/node';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport { formatResponse, type ResponseData } from '@utils/responseData';\nimport type { FastifyReply, FastifyRequest } from 'fastify';\n\nexport type GetConfigurationResult = ResponseData<IntlayerConfig>;\n\n/**\n * Get the Intlayer configuration\n */\nexport const getConfiguration = async (\n _req: FastifyRequest,\n res: FastifyReply\n): Promise<void> => {\n try {\n const config = getApplicationConfiguration();\n\n const formattedResponse = formatResponse<IntlayerConfig>({\n data: config,\n });\n\n return res.send(formattedResponse);\n } catch (err) {\n const errorMessage = (err as { message?: string; status?: number }) ?? {\n message: 'Internal Server Error',\n status: 500,\n };\n\n const formattedErrorResponse = formatResponse<IntlayerConfig>({\n error: {\n message: errorMessage.message ?? 'Internal Server Error',\n code: 'INTERNAL_SERVER_ERROR',\n title: 'Internal Server Error',\n },\n status: errorMessage.status ?? 500,\n });\n\n return res.send(formattedErrorResponse);\n }\n};\n"],"mappings":";;;;;;;;AAUA,MAAa,mBAAmB,OAC9B,MACA,QACkB;CAClB,IAAI;EACF,MAAM,aAASA,wCAA4B;
|
|
1
|
+
{"version":3,"file":"configuration.controller.cjs","names":["getApplicationConfiguration","formatResponse"],"sources":["../../src/controllers/configuration.controller.ts"],"sourcesContent":["import { getConfiguration as getApplicationConfiguration } from '@intlayer/config/node';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport { formatResponse, type ResponseData } from '@utils/responseData';\nimport type { FastifyReply, FastifyRequest } from 'fastify';\n\nexport type GetConfigurationResult = ResponseData<IntlayerConfig>;\n\n/**\n * Get the Intlayer configuration\n */\nexport const getConfiguration = async (\n _req: FastifyRequest,\n res: FastifyReply\n): Promise<void> => {\n try {\n const config = getApplicationConfiguration();\n\n // The client secret never leaves the server: the client authenticates\n // with the short-lived token served by the auth routes.\n const { clientSecret: _clientSecret, ...editor } = config.editor;\n\n const formattedResponse = formatResponse<IntlayerConfig>({\n data: { ...config, editor },\n });\n\n return res.send(formattedResponse);\n } catch (err) {\n const errorMessage = (err as { message?: string; status?: number }) ?? {\n message: 'Internal Server Error',\n status: 500,\n };\n\n const formattedErrorResponse = formatResponse<IntlayerConfig>({\n error: {\n message: errorMessage.message ?? 'Internal Server Error',\n code: 'INTERNAL_SERVER_ERROR',\n title: 'Internal Server Error',\n },\n status: errorMessage.status ?? 500,\n });\n\n return res.send(formattedErrorResponse);\n }\n};\n"],"mappings":";;;;;;;;AAUA,MAAa,mBAAmB,OAC9B,MACA,QACkB;CAClB,IAAI;EACF,MAAM,aAASA,wCAA4B;EAI3C,MAAM,EAAE,cAAc,eAAe,GAAG,WAAW,OAAO;EAE1D,MAAM,oBAAoBC,0CAA+B,EACvD,MAAM;GAAE,GAAG;GAAQ;EAAO,EAC5B,CAAC;EAED,OAAO,IAAI,KAAK,iBAAiB;CACnC,SAAS,KAAK;EACZ,MAAM,eAAgB,OAAiD;GACrE,SAAS;GACT,QAAQ;EACV;EAEA,MAAM,yBAAyBA,0CAA+B;GAC5D,OAAO;IACL,SAAS,aAAa,WAAW;IACjC,MAAM;IACN,OAAO;GACT;GACA,QAAQ,aAAa,UAAU;EACjC,CAAC;EAED,OAAO,IAAI,KAAK,sBAAsB;CACxC;AACF"}
|
|
@@ -8,7 +8,11 @@ import { getConfiguration as getConfiguration$1 } from "@intlayer/config/node";
|
|
|
8
8
|
const getConfiguration = async (_req, res) => {
|
|
9
9
|
try {
|
|
10
10
|
const config = getConfiguration$1();
|
|
11
|
-
const
|
|
11
|
+
const { clientSecret: _clientSecret, ...editor } = config.editor;
|
|
12
|
+
const formattedResponse = formatResponse({ data: {
|
|
13
|
+
...config,
|
|
14
|
+
editor
|
|
15
|
+
} });
|
|
12
16
|
return res.send(formattedResponse);
|
|
13
17
|
} catch (err) {
|
|
14
18
|
const errorMessage = err ?? {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configuration.controller.mjs","names":["getApplicationConfiguration"],"sources":["../../src/controllers/configuration.controller.ts"],"sourcesContent":["import { getConfiguration as getApplicationConfiguration } from '@intlayer/config/node';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport { formatResponse, type ResponseData } from '@utils/responseData';\nimport type { FastifyReply, FastifyRequest } from 'fastify';\n\nexport type GetConfigurationResult = ResponseData<IntlayerConfig>;\n\n/**\n * Get the Intlayer configuration\n */\nexport const getConfiguration = async (\n _req: FastifyRequest,\n res: FastifyReply\n): Promise<void> => {\n try {\n const config = getApplicationConfiguration();\n\n const formattedResponse = formatResponse<IntlayerConfig>({\n data: config,\n });\n\n return res.send(formattedResponse);\n } catch (err) {\n const errorMessage = (err as { message?: string; status?: number }) ?? {\n message: 'Internal Server Error',\n status: 500,\n };\n\n const formattedErrorResponse = formatResponse<IntlayerConfig>({\n error: {\n message: errorMessage.message ?? 'Internal Server Error',\n code: 'INTERNAL_SERVER_ERROR',\n title: 'Internal Server Error',\n },\n status: errorMessage.status ?? 500,\n });\n\n return res.send(formattedErrorResponse);\n }\n};\n"],"mappings":";;;;;;;AAUA,MAAa,mBAAmB,OAC9B,MACA,QACkB;CAClB,IAAI;EACF,MAAM,SAASA,mBAA4B;
|
|
1
|
+
{"version":3,"file":"configuration.controller.mjs","names":["getApplicationConfiguration"],"sources":["../../src/controllers/configuration.controller.ts"],"sourcesContent":["import { getConfiguration as getApplicationConfiguration } from '@intlayer/config/node';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport { formatResponse, type ResponseData } from '@utils/responseData';\nimport type { FastifyReply, FastifyRequest } from 'fastify';\n\nexport type GetConfigurationResult = ResponseData<IntlayerConfig>;\n\n/**\n * Get the Intlayer configuration\n */\nexport const getConfiguration = async (\n _req: FastifyRequest,\n res: FastifyReply\n): Promise<void> => {\n try {\n const config = getApplicationConfiguration();\n\n // The client secret never leaves the server: the client authenticates\n // with the short-lived token served by the auth routes.\n const { clientSecret: _clientSecret, ...editor } = config.editor;\n\n const formattedResponse = formatResponse<IntlayerConfig>({\n data: { ...config, editor },\n });\n\n return res.send(formattedResponse);\n } catch (err) {\n const errorMessage = (err as { message?: string; status?: number }) ?? {\n message: 'Internal Server Error',\n status: 500,\n };\n\n const formattedErrorResponse = formatResponse<IntlayerConfig>({\n error: {\n message: errorMessage.message ?? 'Internal Server Error',\n code: 'INTERNAL_SERVER_ERROR',\n title: 'Internal Server Error',\n },\n status: errorMessage.status ?? 500,\n });\n\n return res.send(formattedErrorResponse);\n }\n};\n"],"mappings":";;;;;;;AAUA,MAAa,mBAAmB,OAC9B,MACA,QACkB;CAClB,IAAI;EACF,MAAM,SAASA,mBAA4B;EAI3C,MAAM,EAAE,cAAc,eAAe,GAAG,WAAW,OAAO;EAE1D,MAAM,oBAAoB,eAA+B,EACvD,MAAM;GAAE,GAAG;GAAQ;EAAO,EAC5B,CAAC;EAED,OAAO,IAAI,KAAK,iBAAiB;CACnC,SAAS,KAAK;EACZ,MAAM,eAAgB,OAAiD;GACrE,SAAS;GACT,QAAQ;EACV;EAEA,MAAM,yBAAyB,eAA+B;GAC5D,OAAO;IACL,SAAS,aAAa,WAAW;IACjC,MAAM;IACN,OAAO;GACT;GACA,QAAQ,aAAa,UAAU;EACjC,CAAC;EAED,OAAO,IAAI,KAAK,sBAAsB;CACxC;AACF"}
|
|
@@ -2,9 +2,9 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
2
2
|
const require_utils_responseData = require('../utils/responseData.cjs');
|
|
3
3
|
let node_path = require("node:path");
|
|
4
4
|
let _intlayer_config_node = require("@intlayer/config/node");
|
|
5
|
+
let _intlayer_engine_build = require("@intlayer/engine/build");
|
|
5
6
|
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
6
7
|
let _intlayer_dictionaries_entry_unmerged = require("@intlayer/dictionaries-entry/unmerged");
|
|
7
|
-
let _intlayer_engine_build = require("@intlayer/engine/build");
|
|
8
8
|
let fastify_intlayer = require("fastify-intlayer");
|
|
9
9
|
|
|
10
10
|
//#region src/controllers/dictionary.controller.ts
|
|
@@ -39,6 +39,7 @@ const writeContentDeclaration = async (req, res) => {
|
|
|
39
39
|
const dictionaryData = req.body.dictionary;
|
|
40
40
|
const config = (0, _intlayer_config_node.getConfiguration)();
|
|
41
41
|
const result = await (0, _intlayer_engine_build.writeContentDeclaration)(dictionaryData, config);
|
|
42
|
+
if (result.status !== "up-to-date") await (0, _intlayer_engine_build.rebuildUnmergedDictionaries)(result.path, config).catch((error) => console.error(error));
|
|
42
43
|
const dictionariesPath = (0, node_path.join)(config.system.mainDir, `unmerged_dictionaries.cjs`);
|
|
43
44
|
(0, _intlayer_config_utils.clearModuleCache)(dictionariesPath);
|
|
44
45
|
let description = "";
|