Add monarch tokenizer as a dedicated package (#3079)

Package is private for now, this is just a way to maintain the tokenizer
on our side
This commit is contained in:
Timothee Guerin 2024-03-29 10:25:29 -07:00 коммит произвёл GitHub
Родитель 6d54aeb4aa
Коммит a9696087af
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
12 изменённых файлов: 594 добавлений и 58 удалений

Просмотреть файл

@ -87,6 +87,7 @@ words:
- tspd
- tspwebsitepr
- tsvs
- typespec
- typespecvs
- Uhoh
- uitestresults

Просмотреть файл

@ -0,0 +1,7 @@
require("@typespec/eslint-config-typespec/patch/modern-module-resolution");
module.exports = {
plugins: ["@typespec/eslint-plugin"],
extends: ["@typespec/eslint-config-typespec", "plugin:@typespec/eslint-plugin/recommended"],
parserOptions: { tsconfigRootDir: __dirname, project: "tsconfig.config.json" },
};

Просмотреть файл

@ -0,0 +1,9 @@
# @typespec/monarch
Provide tokenizer for Monarch for use in [monaco-editor](https://github.com/microsoft/monaco-editor).
## Updating
### Updating the tests
You can copy `./temp/monaco-tests.json`(after running the test) into the `src/basic-languages/typespec/typespec.test.ts` test file in the monaco-editor repository.

Просмотреть файл

@ -0,0 +1,60 @@
{
"name": "@typespec/monarch",
"private": true,
"version": "0.54.0",
"author": "Microsoft Corporation",
"description": "TypeSpec library providing OpenAPI concepts",
"homepage": "https://typespec.io",
"readme": "https://github.com/microsoft/typespec/blob/main/README.md",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/microsoft/typespec.git"
},
"bugs": {
"url": "https://github.com/microsoft/typespec/issues"
},
"keywords": [
"typespec"
],
"type": "module",
"main": "dist/src/index.js",
"exports": {
".": "./dist/src/index.js"
},
"engines": {
"node": ">=18.0.0"
},
"scripts": {
"clean": "rimraf ./dist ./temp",
"build": "tsc -p .",
"watch": "tsc -p . --watch",
"test": "vitest run",
"test:watch": "vitest -w",
"test:ui": "vitest --ui",
"test-official": "vitest run --coverage --reporter=junit --reporter=default --no-file-parallelism",
"lint": "eslint . --ext .ts --max-warnings=0",
"lint:fix": "eslint . --fix --ext .ts"
},
"files": [
"lib/*.tsp",
"dist/**",
"!dist/test/**"
],
"devDependencies": {
"@types/node": "~18.11.19",
"@typespec/eslint-config-typespec": "workspace:~",
"@typespec/eslint-plugin": "workspace:~",
"@vitest/coverage-v8": "^1.4.0",
"@vitest/ui": "^1.4.0",
"c8": "^9.1.0",
"eslint": "^8.57.0",
"happy-dom": "^14.3.9",
"rimraf": "~5.0.5",
"typescript": "~5.4.2",
"vitest": "^1.4.0"
},
"dependencies": {
"monaco-editor-core": "^0.47.0"
}
}

Просмотреть файл

@ -0,0 +1,3 @@
import lang from "./typespec-monarch.js";
export default lang;

Просмотреть файл

@ -0,0 +1,95 @@
import type { languages } from "monaco-editor-core";
const bounded = (text: string) => `\\b${text}\\b`;
const notBefore = (regex: string) => `(?!${regex})`;
const identifierStart = "[_a-zA-Z]";
const identifierContinue = "[_a-zA-Z0-9]";
const identifier = bounded(`${identifierStart}${identifierContinue}*`);
const directive = bounded(`[_a-zA-Z-0-9]+`);
const keywords = [
"import",
"model",
"scalar",
"namespace",
"op",
"interface",
"union",
"using",
"is",
"extends",
"enum",
"alias",
"return",
"void",
"if",
"else",
"projection",
"dec",
"extern",
"fn",
];
const namedLiterals = ["true", "false", "null", "unknown", "never"];
const nonCommentWs = `[ \\t\\r\\n]`;
const numericLiteral = `[0-9]+`;
export default {
defaultToken: "",
tokenPostfix: ".tsp",
brackets: [
{ open: "{", close: "}", token: "delimiter.curly" },
{ open: "[", close: "]", token: "delimiter.square" },
{ open: "(", close: ")", token: "delimiter.parenthesis" },
],
symbols: /[=:;<>]+/,
keywords,
namedLiterals,
escapes: `\\\\(u{[0-9A-Fa-f]+}|n|r|t|\\\\|"|\\\${)`,
tokenizer: {
root: [{ include: "@expression" }, { include: "@whitespace" }],
stringVerbatim: [
{ regex: `(|"|"")[^"]`, action: { token: "string" } },
{ regex: `"""${notBefore(`"`)}`, action: { token: "string", next: "@pop" } },
],
stringLiteral: [
{ regex: `\\\${`, action: { token: "delimiter.bracket", next: "@bracketCounting" } },
{ regex: `[^\\\\"$]+`, action: { token: "string" } },
{ regex: "@escapes", action: { token: "string.escape" } },
{ regex: `\\\\.`, action: { token: "string.escape.invalid" } },
{ regex: `"`, action: { token: "string", next: "@pop" } },
],
bracketCounting: [
{ regex: `{`, action: { token: "delimiter.bracket", next: "@bracketCounting" } },
{ regex: `}`, action: { token: "delimiter.bracket", next: "@pop" } },
{ include: "@expression" },
],
comment: [
{ regex: `[^\\*]+`, action: { token: "comment" } },
{ regex: `\\*\\/`, action: { token: "comment", next: "@pop" } },
{ regex: `[\\/*]`, action: { token: "comment" } },
],
whitespace: [
{ regex: nonCommentWs },
{ regex: `\\/\\*`, action: { token: "comment", next: "@comment" } },
{ regex: `\\/\\/.*$`, action: { token: "comment" } },
],
expression: [
{ regex: `"""`, action: { token: "string", next: "@stringVerbatim" } },
{ regex: `"${notBefore(`""`)}`, action: { token: "string", next: "@stringLiteral" } },
{ regex: numericLiteral, action: { token: "number" } },
{
regex: identifier,
action: {
cases: {
"@keywords": { token: "keyword" },
"@namedLiterals": { token: "keyword" },
"@default": { token: "identifier" },
},
},
},
{ regex: `@${identifier}`, action: { token: "tag" } },
{ regex: `#${directive}`, action: { token: "directive" } },
],
},
} satisfies languages.IMonarchLanguage;

Просмотреть файл

@ -0,0 +1,220 @@
import { deepStrictEqual } from "assert";
import { writeFile } from "fs/promises";
import type { Token as MonacoToken } from "monaco-editor-core";
import { editor, languages } from "monaco-editor-core/esm/vs/editor/editor.api.js";
import { resolve } from "path";
import { fileURLToPath } from "url";
import { afterAll, beforeAll, it, type TestFunction } from "vitest";
import lang from "../src/typespec-monarch.js";
interface MonacoTestFormat {
line: string;
tokens: any[];
}
const lines: MonacoTestFormat[][] = [];
beforeAll(() => {
lines.length = 0;
languages.register({ id: "typespec" });
languages.setMonarchTokensProvider("typespec", lang);
});
afterAll(async () => {
// Write the test format expected in monaco-editor repo. You can then copy the content to the test file and update src/basic-languages/typespec/typespec.test.ts
await writeFile(
resolve(fileURLToPath(import.meta.url), "../../temp/monaco-tests.json"),
JSON.stringify(lines, null, 2)
);
});
interface Token {
text: string;
type: string;
}
const Token = {
keyword: (text: string) => ({ type: "keyword.tsp", text }),
identifier: (text: string) => ({ type: "identifier.tsp", text }),
default: (text: string) => ({ type: "", text }),
quote: { type: "string.quote.tsp", text: `"` },
stringQuoted: (text: string) => ({ type: "string.tsp", text: `"${text}"` }),
string: (text: string) => ({ type: "string.tsp", text }),
};
function simplifyTokens(text: string, tokens: MonacoToken[][]) {
const result = [];
const lines = text.split("\n");
for (const [lineIndex, lineTokens] of tokens.entries()) {
const line = lines[lineIndex];
for (const [index, token] of lineTokens.entries()) {
const nextOffset = lineTokens[index + 1]?.offset ?? line.length;
let tokenText = line.slice(token.offset, nextOffset);
if (token.type === "") {
tokenText = tokenText.trim();
if (tokenText === "") continue;
}
result.push({ type: token.type, text: tokenText });
}
}
return result;
}
function tokenize(text: string) {
const tokensByLine = editor.tokenize(text, "typespec");
const textLines = text.split("\n");
const group: MonacoTestFormat[] = [];
for (const [lineIndex, tokens] of tokensByLine.entries()) {
group.push({
line: textLines[lineIndex],
tokens: tokens.map((x) => ({ startIndex: x.offset, type: x.type })),
});
}
lines.push(group);
return simplifyTokens(text, tokensByLine);
}
function tokenizeTo(expected: Token[]): TestFunction {
return (context) => {
const tokens = tokenize(context.task.name);
deepStrictEqual(tokens, expected);
};
}
it(
`import "@typespec/http";`,
tokenizeTo([Token.keyword("import"), Token.stringQuoted("@typespec/http"), Token.default(";")])
);
it(
"using TypeSpec.Http",
tokenizeTo([
Token.keyword("using"),
Token.identifier("TypeSpec"),
Token.default("."),
Token.identifier("Http"),
])
);
it(
"namespace Foo {}",
tokenizeTo([Token.keyword("namespace"), Token.identifier("Foo"), Token.default("{}")])
);
it(
`namespace Foo {
model Bar {}
}`,
tokenizeTo([
Token.keyword("namespace"),
Token.identifier("Foo"),
Token.default("{"),
Token.keyword("model"),
Token.identifier("Bar"),
Token.default("{}"),
Token.default("}"),
])
);
it(
"model Foo {}",
tokenizeTo([Token.keyword("model"), Token.identifier("Foo"), Token.default("{}")])
);
it(
"model Foo is Bar;",
tokenizeTo([
Token.keyword("model"),
Token.identifier("Foo"),
Token.keyword("is"),
Token.identifier("Bar"),
Token.default(";"),
])
);
it(
"model Foo extends Bar;",
tokenizeTo([
Token.keyword("model"),
Token.identifier("Foo"),
Token.keyword("extends"),
Token.identifier("Bar"),
Token.default(";"),
])
);
it(
"interface Foo {}",
tokenizeTo([Token.keyword("interface"), Token.identifier("Foo"), Token.default("{}")])
);
it(
"union Foo {}",
tokenizeTo([Token.keyword("union"), Token.identifier("Foo"), Token.default("{}")])
);
it(
"scalar foo extends string;",
tokenizeTo([
Token.keyword("scalar"),
Token.identifier("foo"),
Token.keyword("extends"),
Token.identifier("string"),
Token.default(";"),
])
);
it(
"op test(): void;",
tokenizeTo([
Token.keyword("op"),
Token.identifier("test"),
Token.default("():"),
Token.keyword("void"),
Token.default(";"),
])
);
it(
"enum Direction { up, down }",
tokenizeTo([
Token.keyword("enum"),
Token.identifier("Direction"),
Token.default("{"),
Token.identifier("up"),
Token.default(","),
Token.identifier("down"),
Token.default("}"),
])
);
it(
`alias Foo = "a" | "b";`,
tokenizeTo([
Token.keyword("alias"),
Token.identifier("Foo"),
Token.default("="),
Token.stringQuoted("a"),
Token.default("|"),
Token.stringQuoted("b"),
Token.default(";"),
])
);
it(
`alias T = """
this
is
multiline
"""`,
tokenizeTo([
Token.keyword("alias"),
Token.identifier("T"),
Token.default("="),
Token.string(`"""`),
Token.string(` this`),
Token.string(` is`),
Token.string(` multiline`),
Token.string(` """`),
])
);

Просмотреть файл

@ -0,0 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {}
}

Просмотреть файл

@ -0,0 +1,11 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": ".",
"tsBuildInfoFile": "temp/tsconfig.tsbuildinfo",
"lib": ["DOM", "ESNext"],
"verbatimModuleSyntax": true
},
"include": ["src/**/*.ts", "test/**/*.ts"]
}

Просмотреть файл

@ -0,0 +1,11 @@
import { defineConfig, mergeConfig } from "vitest/config";
import { defaultTypeSpecVitestConfig } from "../../vitest.workspace.js";
export default mergeConfig(
defaultTypeSpecVitestConfig,
defineConfig({
test: {
environment: "happy-dom",
},
})
);

230
pnpm-lock.yaml сгенерированный
Просмотреть файл

@ -43,7 +43,7 @@ importers:
version: 5.4.2
vitest:
specifier: ^1.4.0
version: 1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)
version: 1.4.0
e2e: {}
@ -81,7 +81,7 @@ importers:
version: 5.4.2
vitest:
specifier: ^1.4.0
version: 1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)
version: 1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)(happy-dom@14.3.9)
packages/bundle-uploader:
dependencies:
@ -136,7 +136,7 @@ importers:
version: 5.4.2
vitest:
specifier: ^1.4.0
version: 1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)
version: 1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)(happy-dom@14.3.9)
packages/bundler:
dependencies:
@ -203,7 +203,7 @@ importers:
version: 5.1.6(@types/node@18.11.19)
vitest:
specifier: ^1.4.0
version: 1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)
version: 1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)(happy-dom@14.3.9)
packages/compiler:
dependencies:
@ -309,7 +309,7 @@ importers:
version: 5.4.2
vitest:
specifier: ^1.4.0
version: 1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)
version: 1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)(happy-dom@14.3.9)
vscode-oniguruma:
specifier: ~2.0.1
version: 2.0.1
@ -388,7 +388,7 @@ importers:
version: 5.4.2
vitest:
specifier: ^1.4.0
version: 1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)
version: 1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)(happy-dom@14.3.9)
packages/html-program-viewer:
dependencies:
@ -446,7 +446,7 @@ importers:
version: 5.4.2
vitest:
specifier: ^1.4.0
version: 1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)
version: 1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)(happy-dom@14.3.9)
packages/http:
devDependencies:
@ -488,7 +488,7 @@ importers:
version: 5.4.2
vitest:
specifier: ^1.4.0
version: 1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)
version: 1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)(happy-dom@14.3.9)
packages/internal-build-utils:
dependencies:
@ -543,7 +543,7 @@ importers:
version: 5.4.2
vitest:
specifier: ^1.4.0
version: 1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)
version: 1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)(happy-dom@14.3.9)
packages/json-schema:
dependencies:
@ -598,7 +598,7 @@ importers:
version: 5.4.2
vitest:
specifier: ^1.4.0
version: 1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)
version: 1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)(happy-dom@14.3.9)
packages/library-linter:
devDependencies:
@ -631,7 +631,47 @@ importers:
version: 5.4.2
vitest:
specifier: ^1.4.0
version: 1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)
version: 1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)(happy-dom@14.3.9)
packages/monarch:
dependencies:
monaco-editor-core:
specifier: ^0.47.0
version: 0.47.0
devDependencies:
'@types/node':
specifier: ~18.11.19
version: 18.11.19
'@typespec/eslint-config-typespec':
specifier: workspace:~
version: link:../eslint-config-typespec
'@typespec/eslint-plugin':
specifier: workspace:~
version: link:../eslint-plugin-typespec
'@vitest/coverage-v8':
specifier: ^1.4.0
version: 1.4.0(vitest@1.4.0)
'@vitest/ui':
specifier: ^1.4.0
version: 1.4.0(vitest@1.4.0)
c8:
specifier: ^9.1.0
version: 9.1.0
eslint:
specifier: ^8.57.0
version: 8.57.0
happy-dom:
specifier: ^14.3.9
version: 14.3.9
rimraf:
specifier: ~5.0.5
version: 5.0.5
typescript:
specifier: ~5.4.2
version: 5.4.2
vitest:
specifier: ^1.4.0
version: 1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)(happy-dom@14.3.9)
packages/openapi:
devDependencies:
@ -679,7 +719,7 @@ importers:
version: 5.4.2
vitest:
specifier: ^1.4.0
version: 1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)
version: 1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)(happy-dom@14.3.9)
packages/openapi3:
dependencies:
@ -737,7 +777,7 @@ importers:
version: 5.4.2
vitest:
specifier: ^1.4.0
version: 1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)
version: 1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)(happy-dom@14.3.9)
packages/playground:
dependencies:
@ -979,7 +1019,7 @@ importers:
version: 5.1.6(@types/node@18.11.19)
vitest:
specifier: ^1.4.0
version: 1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)
version: 1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)(happy-dom@14.3.9)
packages/prettier-plugin-typespec:
dependencies:
@ -1010,7 +1050,7 @@ importers:
version: 4.13.0
vitest:
specifier: ^1.4.0
version: 1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)
version: 1.4.0
packages/protobuf:
devDependencies:
@ -1055,7 +1095,7 @@ importers:
version: 5.4.2
vitest:
specifier: ^1.4.0
version: 1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)
version: 1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)(happy-dom@14.3.9)
packages/rest:
devDependencies:
@ -1100,7 +1140,7 @@ importers:
version: 5.4.2
vitest:
specifier: ^1.4.0
version: 1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)
version: 1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)(happy-dom@14.3.9)
packages/samples:
dependencies:
@ -1164,7 +1204,7 @@ importers:
version: 5.4.2
vitest:
specifier: ^1.4.0
version: 1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)
version: 1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)(happy-dom@14.3.9)
packages/spec:
devDependencies:
@ -1265,7 +1305,7 @@ importers:
version: 5.4.2
vitest:
specifier: ^1.4.0
version: 1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)
version: 1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)(happy-dom@14.3.9)
packages/typespec-vs:
devDependencies:
@ -1328,7 +1368,7 @@ importers:
version: 5.4.2
vitest:
specifier: ^1.4.0
version: 1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)
version: 1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)(happy-dom@14.3.9)
vscode-languageclient:
specifier: ~9.0.1
version: 9.0.1
@ -1373,7 +1413,7 @@ importers:
version: 5.4.2
vitest:
specifier: ^1.4.0
version: 1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)
version: 1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)(happy-dom@14.3.9)
packages/website:
dependencies:
@ -1682,7 +1722,7 @@ packages:
engines: {node: '>=6.0.0'}
dependencies:
'@jridgewell/gen-mapping': 0.3.3
'@jridgewell/trace-mapping': 0.3.22
'@jridgewell/trace-mapping': 0.3.25
/@azure/abort-controller@1.1.0:
resolution: {integrity: sha512-TrRLIoSQVzfAJX9H1JeFjzAoDGcoK1IYX1UImfceTZpsyYfWr09Ss1aHW1y5TrrR3iq6RZLBwJ3E24uwPhwahw==}
@ -1909,23 +1949,23 @@ packages:
resolution: {integrity: sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==}
engines: {node: '>=6.9.0'}
dependencies:
'@babel/types': 7.23.9
'@babel/types': 7.24.0
'@jridgewell/gen-mapping': 0.3.3
'@jridgewell/trace-mapping': 0.3.22
'@jridgewell/trace-mapping': 0.3.25
jsesc: 2.5.2
/@babel/helper-annotate-as-pure@7.22.5:
resolution: {integrity: sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==}
engines: {node: '>=6.9.0'}
dependencies:
'@babel/types': 7.23.9
'@babel/types': 7.24.0
dev: false
/@babel/helper-builder-binary-assignment-operator-visitor@7.22.15:
resolution: {integrity: sha512-QkBXwGgaoC2GtGZRoma6kv7Szfv06khvhFav67ZExau2RaXzy8MpHSMO2PNoP2XtmQphJQRHFfg77Bq731Yizw==}
engines: {node: '>=6.9.0'}
dependencies:
'@babel/types': 7.23.9
'@babel/types': 7.24.0
dev: false
/@babel/helper-compilation-targets@7.23.6:
@ -1992,26 +2032,26 @@ packages:
engines: {node: '>=6.9.0'}
dependencies:
'@babel/template': 7.23.9
'@babel/types': 7.23.9
'@babel/types': 7.24.0
/@babel/helper-hoist-variables@7.22.5:
resolution: {integrity: sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==}
engines: {node: '>=6.9.0'}
dependencies:
'@babel/types': 7.23.9
'@babel/types': 7.24.0
/@babel/helper-member-expression-to-functions@7.23.0:
resolution: {integrity: sha512-6gfrPwh7OuT6gZyJZvd6WbTfrqAo7vm4xCzAXOusKqq/vWdKXphTpj5klHKNmRUU6/QRGlBsyU9mAIPaWHlqJA==}
engines: {node: '>=6.9.0'}
dependencies:
'@babel/types': 7.23.9
'@babel/types': 7.24.0
dev: false
/@babel/helper-module-imports@7.22.15:
resolution: {integrity: sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==}
engines: {node: '>=6.9.0'}
dependencies:
'@babel/types': 7.23.9
'@babel/types': 7.24.0
/@babel/helper-module-transforms@7.23.3(@babel/core@7.24.0):
resolution: {integrity: sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==}
@ -2030,7 +2070,7 @@ packages:
resolution: {integrity: sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==}
engines: {node: '>=6.9.0'}
dependencies:
'@babel/types': 7.23.9
'@babel/types': 7.24.0
dev: false
/@babel/helper-plugin-utils@7.22.5:
@ -2071,14 +2111,14 @@ packages:
resolution: {integrity: sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==}
engines: {node: '>=6.9.0'}
dependencies:
'@babel/types': 7.23.9
'@babel/types': 7.24.0
dev: false
/@babel/helper-split-export-declaration@7.22.6:
resolution: {integrity: sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==}
engines: {node: '>=6.9.0'}
dependencies:
'@babel/types': 7.23.9
'@babel/types': 7.24.0
/@babel/helper-string-parser@7.23.4:
resolution: {integrity: sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==}
@ -2098,7 +2138,7 @@ packages:
dependencies:
'@babel/helper-function-name': 7.23.0
'@babel/template': 7.23.9
'@babel/types': 7.23.9
'@babel/types': 7.24.0
dev: false
/@babel/helpers@7.24.0:
@ -2124,7 +2164,8 @@ packages:
engines: {node: '>=6.0.0'}
hasBin: true
dependencies:
'@babel/types': 7.23.9
'@babel/types': 7.24.0
dev: true
/@babel/parser@7.24.0:
resolution: {integrity: sha512-QuP/FxEAzMSjXygs8v4N9dvdXzEHN4W1oF3PxuWAtPo08UdM17u89RDMgjLn/mlc56iM0HlLmVkO/wgR+rDgHg==}
@ -2842,7 +2883,7 @@ packages:
'@babel/helper-module-imports': 7.22.15
'@babel/helper-plugin-utils': 7.22.5
'@babel/plugin-syntax-jsx': 7.23.3(@babel/core@7.24.0)
'@babel/types': 7.23.9
'@babel/types': 7.24.0
dev: false
/@babel/plugin-transform-react-pure-annotations@7.23.3(@babel/core@7.24.0):
@ -3099,7 +3140,7 @@ packages:
dependencies:
'@babel/core': 7.24.0
'@babel/helper-plugin-utils': 7.22.5
'@babel/types': 7.23.9
'@babel/types': 7.24.0
esutils: 2.0.3
dev: false
@ -3163,8 +3204,8 @@ packages:
engines: {node: '>=6.9.0'}
dependencies:
'@babel/code-frame': 7.23.5
'@babel/parser': 7.23.9
'@babel/types': 7.23.9
'@babel/parser': 7.24.0
'@babel/types': 7.24.0
/@babel/template@7.24.0:
resolution: {integrity: sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==}
@ -3184,8 +3225,8 @@ packages:
'@babel/helper-function-name': 7.23.0
'@babel/helper-hoist-variables': 7.22.5
'@babel/helper-split-export-declaration': 7.22.6
'@babel/parser': 7.23.9
'@babel/types': 7.23.9
'@babel/parser': 7.24.0
'@babel/types': 7.24.0
debug: 4.3.4
globals: 11.12.0
transitivePeerDependencies:
@ -3216,6 +3257,7 @@ packages:
'@babel/helper-string-parser': 7.23.4
'@babel/helper-validator-identifier': 7.22.20
to-fast-properties: 2.0.0
dev: true
/@babel/types@7.24.0:
resolution: {integrity: sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==}
@ -3254,7 +3296,7 @@ packages:
semver: 7.6.0
source-map-support: 0.5.21
std-env: 3.7.0
vitest: 1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)
vitest: 1.4.0
yargs: 17.7.2
zod: 3.22.4
transitivePeerDependencies:
@ -3717,7 +3759,7 @@ packages:
react: ^18.0.0
react-dom: ^18.0.0
dependencies:
'@babel/parser': 7.23.9
'@babel/parser': 7.24.0
'@babel/traverse': 7.23.9
'@docusaurus/logger': 3.1.1
'@docusaurus/utils': 3.1.1(@docusaurus/types@3.1.1)(@swc/core@1.4.8)
@ -6224,7 +6266,7 @@ packages:
dependencies:
'@jridgewell/set-array': 1.1.2
'@jridgewell/sourcemap-codec': 1.4.15
'@jridgewell/trace-mapping': 0.3.22
'@jridgewell/trace-mapping': 0.3.25
/@jridgewell/resolve-uri@3.1.1:
resolution: {integrity: sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==}
@ -6238,7 +6280,7 @@ packages:
resolution: {integrity: sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==}
dependencies:
'@jridgewell/gen-mapping': 0.3.3
'@jridgewell/trace-mapping': 0.3.22
'@jridgewell/trace-mapping': 0.3.25
/@jridgewell/sourcemap-codec@1.4.15:
resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==}
@ -6248,13 +6290,13 @@ packages:
dependencies:
'@jridgewell/resolve-uri': 3.1.1
'@jridgewell/sourcemap-codec': 1.4.15
dev: true
/@jridgewell/trace-mapping@0.3.25:
resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==}
dependencies:
'@jridgewell/resolve-uri': 3.1.1
'@jridgewell/sourcemap-codec': 1.4.15
dev: true
/@jridgewell/trace-mapping@0.3.9:
resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==}
@ -7490,7 +7532,7 @@ packages:
resolution: {integrity: sha512-1hnUxxjd83EAxbL4a0JDJoD3Dao3hmjvyvyEV8PzWmLK3B9m9NPlW7GKjFyoWE8nM7HnXzPcmmSyOW8yOddSXw==}
engines: {node: '>=10'}
dependencies:
'@babel/types': 7.23.9
'@babel/types': 7.24.0
entities: 4.5.0
dev: false
@ -7610,6 +7652,7 @@ packages:
/@swagger-api/apidom-ns-json-schema-draft-4@0.97.0:
resolution: {integrity: sha512-eBMIPxX4huNDGle6TOfSe1kKS1/HvL6w66GWWLFxZW2doCQHMADgjo7j/kVowrXiJtEoMgjBVp3W30WkcwBVug==}
requiresBuild: true
dependencies:
'@babel/runtime-corejs3': 7.24.0
'@swagger-api/apidom-ast': 0.97.0
@ -8121,8 +8164,8 @@ packages:
/@types/babel__core@7.20.5:
resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==}
dependencies:
'@babel/parser': 7.23.9
'@babel/types': 7.23.9
'@babel/parser': 7.24.0
'@babel/types': 7.24.0
'@types/babel__generator': 7.6.8
'@types/babel__template': 7.4.4
'@types/babel__traverse': 7.20.5
@ -8131,20 +8174,20 @@ packages:
/@types/babel__generator@7.6.8:
resolution: {integrity: sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==}
dependencies:
'@babel/types': 7.23.9
'@babel/types': 7.24.0
dev: true
/@types/babel__template@7.4.4:
resolution: {integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==}
dependencies:
'@babel/parser': 7.23.9
'@babel/types': 7.23.9
'@babel/parser': 7.24.0
'@babel/types': 7.24.0
dev: true
/@types/babel__traverse@7.20.5:
resolution: {integrity: sha512-WXCyOcRtH37HAUkpXhUduaxdm82b4GSlyTqajXviN4EfiuPgNYR109xMCKvpl6zPIpua0DGlMEDCq+g8EdoheQ==}
dependencies:
'@babel/types': 7.23.9
'@babel/types': 7.24.0
dev: true
/@types/body-parser@1.19.5:
@ -8778,7 +8821,7 @@ packages:
strip-literal: 2.0.0
test-exclude: 6.0.0
v8-to-istanbul: 9.2.0
vitest: 1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)
vitest: 1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)(happy-dom@14.3.9)
transitivePeerDependencies:
- supports-color
dev: true
@ -8821,7 +8864,8 @@ packages:
pathe: 1.1.2
picocolors: 1.0.0
sirv: 2.0.4
vitest: 1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)
vitest: 1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)(happy-dom@14.3.9)
dev: true
/@vitest/utils@1.4.0:
resolution: {integrity: sha512-mx3Yd1/6e2Vt/PUC98DcqTirtfxUyAZ32uK82r8rZzbtBeBo+nqgnjx/LvqQdWsrvNtm14VmurNgcf4nqY5gJg==}
@ -11482,7 +11526,7 @@ packages:
'@typescript-eslint/eslint-plugin': 7.2.0(@typescript-eslint/parser@7.2.0)(eslint@8.57.0)(typescript@5.4.2)
'@typescript-eslint/utils': 7.2.0(eslint@8.57.0)(typescript@5.4.2)
eslint: 8.57.0
vitest: 1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)
vitest: 1.4.0
transitivePeerDependencies:
- supports-color
- typescript
@ -11841,6 +11885,7 @@ packages:
/fflate@0.8.2:
resolution: {integrity: sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==}
dev: true
/file-entry-cache@6.0.1:
resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==}
@ -12357,6 +12402,15 @@ packages:
resolution: {integrity: sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==}
dev: false
/happy-dom@14.3.9:
resolution: {integrity: sha512-0kPQchwthekcYpYN8CvCiq+/z5bqFYDLbTxZ+yDLwT8AFRVJDFadShHRxp3VAZRy7a5isOZ1j/LzsU1dtAIZMQ==}
engines: {node: '>=16.0.0'}
dependencies:
entities: 4.5.0
webidl-conversions: 7.0.0
whatwg-mimetype: 3.0.0
dev: true
/has-flag@3.0.0:
resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==}
engines: {node: '>=4'}
@ -14810,6 +14864,10 @@ packages:
pkg-types: 1.0.3
ufo: 1.4.0
/monaco-editor-core@0.47.0:
resolution: {integrity: sha512-xho7dsmSYOIek6bkMKQApWHVyoOBQ1eaBIE6CIlER40paTN0r0efrig6Q9QkCacfzIuNNxNjyb1uMVoMpi8gcA==}
dev: false
/monaco-editor-webpack-plugin@7.1.0(monaco-editor@0.47.0)(webpack@5.90.1):
resolution: {integrity: sha512-ZjnGINHN963JQkFqjjcBtn1XBtUATDZBMgNQhDQwd78w2ukRhFXAPNgWuacaQiDZsUr4h1rWv5Mv6eriKuOSzA==}
peerDependencies:
@ -18171,7 +18229,7 @@ packages:
uglify-js:
optional: true
dependencies:
'@jridgewell/trace-mapping': 0.3.22
'@jridgewell/trace-mapping': 0.3.25
'@swc/core': 1.4.8
jest-worker: 27.5.1
schema-utils: 3.3.0
@ -18919,7 +18977,61 @@ packages:
optionalDependencies:
fsevents: 2.3.3
/vitest@1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0):
/vitest@1.4.0:
resolution: {integrity: sha512-gujzn0g7fmwf83/WzrDTnncZt2UiXP41mHuFYFrdwaLRVQ6JYQEiME2IfEjU3vcFL3VKa75XhI3lFgn+hfVsQw==}
engines: {node: ^18.0.0 || >=20.0.0}
hasBin: true
peerDependencies:
'@edge-runtime/vm': '*'
'@types/node': ^18.0.0 || >=20.0.0
'@vitest/browser': 1.4.0
'@vitest/ui': 1.4.0
happy-dom: '*'
jsdom: '*'
peerDependenciesMeta:
'@edge-runtime/vm':
optional: true
'@types/node':
optional: true
'@vitest/browser':
optional: true
'@vitest/ui':
optional: true
happy-dom:
optional: true
jsdom:
optional: true
dependencies:
'@vitest/expect': 1.4.0
'@vitest/runner': 1.4.0
'@vitest/snapshot': 1.4.0
'@vitest/spy': 1.4.0
'@vitest/utils': 1.4.0
acorn-walk: 8.3.2
chai: 4.4.1
debug: 4.3.4
execa: 8.0.1
local-pkg: 0.5.0
magic-string: 0.30.7
pathe: 1.1.2
picocolors: 1.0.0
std-env: 3.7.0
strip-literal: 2.0.0
tinybench: 2.6.0
tinypool: 0.8.2
vite: 5.1.6(@types/node@18.11.19)
vite-node: 1.4.0(@types/node@18.11.19)
why-is-node-running: 2.2.2
transitivePeerDependencies:
- less
- lightningcss
- sass
- stylus
- sugarss
- supports-color
- terser
/vitest@1.4.0(@types/node@18.11.19)(@vitest/ui@1.4.0)(happy-dom@14.3.9):
resolution: {integrity: sha512-gujzn0g7fmwf83/WzrDTnncZt2UiXP41mHuFYFrdwaLRVQ6JYQEiME2IfEjU3vcFL3VKa75XhI3lFgn+hfVsQw==}
engines: {node: ^18.0.0 || >=20.0.0}
hasBin: true
@ -18955,6 +19067,7 @@ packages:
chai: 4.4.1
debug: 4.3.4
execa: 8.0.1
happy-dom: 14.3.9
local-pkg: 0.5.0
magic-string: 0.30.7
pathe: 1.1.2
@ -18974,6 +19087,7 @@ packages:
- sugarss
- supports-color
- terser
dev: true
/vscode-jsonrpc@8.2.0:
resolution: {integrity: sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==}

Просмотреть файл

@ -14,6 +14,7 @@
{ "path": "packages/html-program-viewer/tsconfig.json" },
{ "path": "packages/protobuf/tsconfig.json" },
{ "path": "packages/openapi3/tsconfig.json" },
{ "path": "packages/monarch/tsconfig.json" },
{ "path": "packages/bundler/tsconfig.json" },
{ "path": "packages/playground-website/tsconfig.json" },
{ "path": "packages/tspd/tsconfig.json" },