@prisma/orm-toolchain 8.0.0-rc.20-dev.14 → 8.0.0-rc.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.
|
@@ -1064,8 +1064,8 @@ function typeConstructorSnippet(name, descriptor, dataTypes) {
|
|
|
1064
1064
|
else if (arg !== void 0 && arg.optional !== true) {
|
|
1065
1065
|
const key = arg.name ?? `arg${index + 1}`;
|
|
1066
1066
|
const tabStop = values.length + 1;
|
|
1067
|
-
const [tag] =
|
|
1068
|
-
values.push(tag !== void 0 ? taggedPlaceholder(tag, tabStop, key) : argSnippetPlaceholder(
|
|
1067
|
+
const [tag] = admittedTags(dataTypes, dataTypeId(arg.dataType));
|
|
1068
|
+
values.push(tag !== void 0 ? taggedPlaceholder(tag, tabStop, key) : argSnippetPlaceholder("identifier", tabStop, key));
|
|
1069
1069
|
}
|
|
1070
1070
|
}
|
|
1071
1071
|
return `${name}(${values.join(", ") || (count > 0 ? "${1:}" : "")})`;
|
|
@@ -1159,7 +1159,7 @@ function scopeCompletionItems(entries, binder, dataTypes, range, capabilities, s
|
|
|
1159
1159
|
item.detail = descriptor.documentation || "Type alias";
|
|
1160
1160
|
break;
|
|
1161
1161
|
}
|
|
1162
|
-
const callable = descriptor.
|
|
1162
|
+
const callable = descriptor.args !== void 0 || descriptor.entityRefArg !== void 0;
|
|
1163
1163
|
item.kind = callable ? CompletionItemKind.Function : CompletionItemKind.Class;
|
|
1164
1164
|
if (callable) {
|
|
1165
1165
|
item.textEdit = {
|
|
@@ -1168,10 +1168,6 @@ function scopeCompletionItems(entries, binder, dataTypes, range, capabilities, s
|
|
|
1168
1168
|
};
|
|
1169
1169
|
if (capabilities.clientSupportsSnippets) item.insertTextFormat = InsertTextFormat.Snippet;
|
|
1170
1170
|
}
|
|
1171
|
-
if (descriptor.kind === "fieldPreset") {
|
|
1172
|
-
item.detail = "Field preset";
|
|
1173
|
-
break;
|
|
1174
|
-
}
|
|
1175
1171
|
item.detail = descriptor.deprecated === void 0 ? descriptor.documentation || "Configured scalar type" : `Deprecated: use ${descriptor.deprecated.replacement}.`;
|
|
1176
1172
|
if (descriptor.deprecated !== void 0) item.tags = [CompletionItemTag.Deprecated];
|
|
1177
1173
|
break;
|
|
@@ -2173,7 +2169,7 @@ function renderContributedTypeContent(symbol, dataTypes) {
|
|
|
2173
2169
|
"```prisma",
|
|
2174
2170
|
renderContributedTypeLabel(symbol, dataTypes),
|
|
2175
2171
|
"```"
|
|
2176
|
-
].join("\n"), symbol.descriptor.
|
|
2172
|
+
].join("\n"), symbol.descriptor.documentation);
|
|
2177
2173
|
}
|
|
2178
2174
|
function renderParameterContent(symbol) {
|
|
2179
2175
|
return withDocumentation([
|
|
@@ -2207,15 +2203,9 @@ function renderContributedTypeLabel(symbol, dataTypes) {
|
|
|
2207
2203
|
const args = descriptor.kind === "typeAlias" ? [] : descriptor.args ?? [];
|
|
2208
2204
|
if (args.length === 0) return path;
|
|
2209
2205
|
return `${path}(${args.map((arg, index) => {
|
|
2210
|
-
return `${arg.name ?? `arg${index + 1}`}${arg.optional === true ? "?" : ""}: ${
|
|
2206
|
+
return `${arg.name ?? `arg${index + 1}`}${arg.optional === true ? "?" : ""}: ${describeAdmittedForms(dataTypes, dataTypeId(arg.dataType))}`;
|
|
2211
2207
|
}).join(", ")})`;
|
|
2212
2208
|
}
|
|
2213
|
-
function argumentTypeLabel(arg, dataTypes) {
|
|
2214
|
-
if (arg.kind === "value") return describeAdmittedForms(dataTypes, dataTypeId(arg.dataType));
|
|
2215
|
-
if (arg.kind === "number") return "number";
|
|
2216
|
-
if (arg.kind === "object") return "object";
|
|
2217
|
-
return arg.values.map((value) => `'${value}'`).join(" | ");
|
|
2218
|
-
}
|
|
2219
2209
|
function blockKeywordDocumentationAt(token, pslBlockDescriptors) {
|
|
2220
2210
|
const declaration = GenericBlockDeclarationAst.cast(token.parent) ?? MixinDeclarationAst.cast(token.parent);
|
|
2221
2211
|
if (declaration === void 0 || declaration.keyword()?.offset !== token.offset) return void 0;
|
|
@@ -2241,7 +2231,6 @@ function collapseWhitespace(text) {
|
|
|
2241
2231
|
function binderContextFromStack(stack) {
|
|
2242
2232
|
return {
|
|
2243
2233
|
authoringContributions: stack.authoringContributions ?? {
|
|
2244
|
-
field: {},
|
|
2245
2234
|
type: {},
|
|
2246
2235
|
entityTypes: {},
|
|
2247
2236
|
pslBlockDescriptors: stack.pslBlockDescriptors,
|
|
@@ -3970,4 +3959,4 @@ function startServer(streams) {
|
|
|
3970
3959
|
//#endregion
|
|
3971
3960
|
export { startServer };
|
|
3972
3961
|
|
|
3973
|
-
//# sourceMappingURL=exports-
|
|
3962
|
+
//# sourceMappingURL=exports-CnTIYbnR.mjs.map
|