@prisma/orm-toolchain 8.0.0-rc.17-dev.19 → 8.0.0-rc.17-dev.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.mjs CHANGED
@@ -6944,7 +6944,7 @@ const lspCommand = defineServerCommand({
6944
6944
  } },
6945
6945
  handler: async (args, io) => {
6946
6946
  const exitCode = await withoutClientProcessIdInArgv(async () => {
6947
- const { startServer } = await import("./exports-CLrz8wIC.mjs");
6947
+ const { startServer } = await import("./exports-Cxv8mNRJ.mjs");
6948
6948
  return startServer({
6949
6949
  stdin: io.stdin,
6950
6950
  stdout: io.stdout,
@@ -12,7 +12,7 @@ import { format, resolveFormatOptions } from "@prisma/orm-framework/psl-parser/f
12
12
  import { EMPTY_DATA_TYPES, assembleAttributeSpecs, blockSpecContext, blockSpecFactoryOf, buildSymbolTable, createBinder, entityReference, findBlockDescriptor, isNamespaceLike, isPrismaNextSchema, isPslIdentifier, matchesSelector, memberEntries, renameLegacyDirective, typeReferenceNode } from "@prisma/orm-framework/psl-parser";
13
13
  import { CompletionItemKind, CompletionItemTag, ConnectionError, ConnectionErrors, DiagnosticSeverity, DidChangeWatchedFilesNotification, DocumentDiagnosticReportKind, FoldingRangeKind, InsertTextFormat, LSPErrorCodes, MarkupKind, ProposedFeatures, RegistrationRequest, ResponseError, SemanticTokenModifiers, SemanticTokenTypes, TextDocumentSyncKind, createConnection } from "vscode-languageserver";
14
14
  import { TextDocument } from "vscode-languageserver-textdocument";
15
- import { ArrayLiteralAst, AttributeArgAst, AttributeArgListAst, BooleanLiteralExprAst, CompositeTypeDeclarationAst, FieldAttributeAst, FieldDeclarationAst, FunctionCallAst, GenericBlockDeclarationAst, IdentifierAst, KeyValuePairAst, ModelAttributeAst, ModelDeclarationAst, NamespaceDeclarationAst, NumberLiteralExprAst, ObjectLiteralExprAst, PathExprAst, PslSources, StringLiteralExprAst, SyntaxNode, SyntaxToken, TaggedLiteralExprAst, TypesBlockAst, any, isTrivia, nonTriviaSibling, parse, skipTriviaToken } from "@prisma/orm-framework/psl-parser/syntax";
15
+ import { ArrayLiteralAst, AttributeArgAst, AttributeArgListAst, BooleanLiteralExprAst, CompositeTypeDeclarationAst, FieldAttributeAst, FieldDeclarationAst, FunctionCallAst, GenericBlockDeclarationAst, IdentifierAst, KeyValuePairAst, MixinDeclarationAst, ModelAttributeAst, ModelDeclarationAst, NamespaceDeclarationAst, NumberLiteralExprAst, ObjectLiteralExprAst, PathExprAst, PslSources, StringLiteralExprAst, SyntaxNode, SyntaxToken, TaggedLiteralExprAst, TypesBlockAst, any, isTrivia, nonTriviaSibling, parse, skipTriviaToken } from "@prisma/orm-framework/psl-parser/syntax";
16
16
  import { hasPslInterpreter } from "@prisma/orm-framework/psl-parser/interpret";
17
17
  import { isAuthoringPslBlockDescriptor } from "@prisma/orm-framework/components/authoring";
18
18
  import { ProposedFeatures as ProposedFeatures$1, StreamMessageReader, StreamMessageWriter, createConnection as createConnection$1, createProtocolConnection } from "vscode-languageserver/node";
@@ -1662,6 +1662,7 @@ function rangeOf(sourceFile, node) {
1662
1662
  * - composite type (e.g., `type Address { ... }`)
1663
1663
  * - namespace (e.g., `namespace billing { ... }`)
1664
1664
  * - generic blocks (generator, datasource, extension blocks)
1665
+ * - mixin declarations (e.g., `model mixin Timestamps { ... }`)
1665
1666
  * - types block (e.g., `types { ... }`)
1666
1667
  *
1667
1668
  * The range spans from the line containing `{` to the line containing `}`.
@@ -2574,6 +2575,12 @@ function collectDeclaration(declaration, source, tokens) {
2574
2575
  for (const namedType of declaration.declarations()) collectNamedTypeDeclaration(namedType, source, tokens);
2575
2576
  return;
2576
2577
  }
2578
+ if (declaration instanceof MixinDeclarationAst) {
2579
+ addToken(declaration.keyword(), "keyword", tokens);
2580
+ addToken(declaration.mixinKeyword(), "keyword", tokens);
2581
+ addIdentifier(declaration.name(), "type", tokens, semanticTokenModifierBits.declaration);
2582
+ return;
2583
+ }
2577
2584
  addToken(declaration.keyword(), "keyword", tokens);
2578
2585
  addIdentifier(declaration.name(), "type", tokens, semanticTokenModifierBits.declaration);
2579
2586
  collectGenericBlockMembers(declaration.members(), source, tokens);
@@ -3788,4 +3795,4 @@ function startServer(streams) {
3788
3795
  //#endregion
3789
3796
  export { startServer };
3790
3797
 
3791
- //# sourceMappingURL=exports-CLrz8wIC.mjs.map
3798
+ //# sourceMappingURL=exports-Cxv8mNRJ.mjs.map