@prisma/orm-toolchain 8.0.0-rc.19-dev.1 → 8.0.0-rc.19-dev.2

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
@@ -6960,7 +6960,7 @@ const lspCommand = defineServerCommand({
6960
6960
  } },
6961
6961
  handler: async (args, io) => {
6962
6962
  const exitCode = await withoutClientProcessIdInArgv(async () => {
6963
- const { startServer } = await import("./exports-DfhvwKY6.mjs");
6963
+ const { startServer } = await import("./exports-CKgwcXbp.mjs");
6964
6964
  return startServer({
6965
6965
  stdin: io.stdin,
6966
6966
  stdout: io.stdout,
@@ -1054,7 +1054,7 @@ function requiredArgumentsSnippet(signature) {
1054
1054
  return requiredArguments(signature).map((argument, index) => requiredArgumentSnippet(argument, index + 1)).join(", ");
1055
1055
  }
1056
1056
  function typeConstructorSnippet(name, descriptor, dataTypes) {
1057
- const args = descriptor.args ?? [];
1057
+ const args = descriptor.kind === "typeAlias" ? [] : descriptor.args ?? [];
1058
1058
  const reference = descriptor.kind === "typeConstructor" ? descriptor.entityRefArg : void 0;
1059
1059
  const count = Math.max(args.length, (reference?.index ?? -1) + 1);
1060
1060
  const values = [];
@@ -1154,6 +1154,11 @@ function scopeCompletionItems(entries, binder, dataTypes, range, capabilities, s
1154
1154
  break;
1155
1155
  case "contributedType": {
1156
1156
  const descriptor = resolution.symbol.descriptor;
1157
+ if (descriptor.kind === "typeAlias") {
1158
+ item.kind = CompletionItemKind.Class;
1159
+ item.detail = descriptor.documentation || "Type alias";
1160
+ break;
1161
+ }
1157
1162
  const callable = descriptor.kind === "fieldPreset" || descriptor.args !== void 0 || descriptor.entityRefArg !== void 0;
1158
1163
  item.kind = callable ? CompletionItemKind.Function : CompletionItemKind.Class;
1159
1164
  if (callable) {
@@ -1384,7 +1389,7 @@ const keywordsWithoutMixins = /* @__PURE__ */ new Set(["namespace", "types"]);
1384
1389
  const namespaceNativeDeclarationKeywords = [nativeDeclarationKeyword("model", "model ", `model ${nameSnippetPlaceholder} {\n ${fieldsBodySnippet}\n}`, "Defines a data model."), nativeDeclarationKeyword("type", "type ", `type ${nameSnippetPlaceholder} {\n ${fieldsBodySnippet}\n}`, "Defines a reusable composite type.")];
1385
1390
  const documentNativeDeclarationKeywords = [
1386
1391
  ...namespaceNativeDeclarationKeywords,
1387
- nativeDeclarationKeyword("types", "types ", "types {\n ${0:// Type aliases}\n}", "Defines reusable named types."),
1392
+ nativeDeclarationKeyword("types", "types ", "types {\n ${0:// Type aliases}\n}", "Defines reusable type aliases."),
1388
1393
  nativeDeclarationKeyword("namespace", "namespace ", `namespace ${namespaceSnippetPlaceholder} {\n \${0:// Models and types}\n}`, "Groups declarations belonging to the same database schema or database.")
1389
1394
  ];
1390
1395
  function providePslCompletionItems(input) {
@@ -2168,7 +2173,7 @@ function renderContributedTypeContent(symbol, dataTypes) {
2168
2173
  "```prisma",
2169
2174
  renderContributedTypeLabel(symbol, dataTypes),
2170
2175
  "```"
2171
- ].join("\n"), symbol.descriptor.kind === "typeConstructor" ? symbol.descriptor.documentation : void 0);
2176
+ ].join("\n"), symbol.descriptor.kind === "fieldPreset" ? void 0 : symbol.descriptor.documentation);
2172
2177
  }
2173
2178
  function renderParameterContent(symbol) {
2174
2179
  return withDocumentation([
@@ -2198,7 +2203,8 @@ function withDocumentation(fence, documentation) {
2198
2203
  }
2199
2204
  function renderContributedTypeLabel(symbol, dataTypes) {
2200
2205
  const path = symbol.path.join(".");
2201
- const args = symbol.descriptor.args ?? [];
2206
+ const { descriptor } = symbol;
2207
+ const args = descriptor.kind === "typeAlias" ? [] : descriptor.args ?? [];
2202
2208
  if (args.length === 0) return path;
2203
2209
  return `${path}(${args.map((arg, index) => {
2204
2210
  return `${arg.name ?? `arg${index + 1}`}${arg.optional === true ? "?" : ""}: ${argumentTypeLabel(arg, dataTypes)}`;
@@ -3964,4 +3970,4 @@ function startServer(streams) {
3964
3970
  //#endregion
3965
3971
  export { startServer };
3966
3972
 
3967
- //# sourceMappingURL=exports-DfhvwKY6.mjs.map
3973
+ //# sourceMappingURL=exports-CKgwcXbp.mjs.map