@scalar/cli 1.9.4 → 1.9.7
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/README.md +1 -1
- package/docs.html +138 -102
- package/index.js +242 -1225
- package/package.json +11 -11
package/index.js
CHANGED
|
@@ -68957,12 +68957,15 @@ function ansiRegex({ onlyFirst = false } = {}) {
|
|
|
68957
68957
|
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
68958
68958
|
}
|
|
68959
68959
|
|
|
68960
|
-
// ../../node_modules/.pnpm/strip-ansi@7.
|
|
68960
|
+
// ../../node_modules/.pnpm/strip-ansi@7.2.0/node_modules/strip-ansi/index.js
|
|
68961
68961
|
var regex = ansiRegex();
|
|
68962
68962
|
function stripAnsi(string4) {
|
|
68963
68963
|
if (typeof string4 !== "string") {
|
|
68964
68964
|
throw new TypeError(`Expected a \`string\`, got \`${typeof string4}\``);
|
|
68965
68965
|
}
|
|
68966
|
+
if (!string4.includes("\x1B") && !string4.includes("\x9B")) {
|
|
68967
|
+
return string4;
|
|
68968
|
+
}
|
|
68966
68969
|
return string4.replace(regex, "");
|
|
68967
68970
|
}
|
|
68968
68971
|
|
|
@@ -69164,7 +69167,7 @@ import { Command as Command50 } from "commander";
|
|
|
69164
69167
|
|
|
69165
69168
|
// package.json
|
|
69166
69169
|
var name = "@scalar/cli";
|
|
69167
|
-
var version = "1.9.
|
|
69170
|
+
var version = "1.9.7";
|
|
69168
69171
|
var bin = {
|
|
69169
69172
|
scalar: "./dist/index.js",
|
|
69170
69173
|
"scalar-cli": "./dist/index.js"
|
|
@@ -86455,7 +86458,7 @@ function compareVersionsDesc(a, b) {
|
|
|
86455
86458
|
return b.localeCompare(a);
|
|
86456
86459
|
}
|
|
86457
86460
|
var regexSlug = /^[a-z](?:[a-z0-9-]*[a-z0-9])?$/;
|
|
86458
|
-
var slugSchema = external_exports.string().min(1, "Slug is required").
|
|
86461
|
+
var slugSchema = external_exports.string().min(1, "Slug is required").max(60, "Slug must be less than 60 characters").regex(regexSlug, {
|
|
86459
86462
|
message: "Slug can have lowercase letters, digits, or hyphens. It must start with a lowercase letter and end with a letter or number."
|
|
86460
86463
|
}).meta({ id: "slug" });
|
|
86461
86464
|
var toRegistrySlug = (title) => {
|
|
@@ -86669,7 +86672,8 @@ var headingRecordSchema = external_exports.object({
|
|
|
86669
86672
|
name: external_exports.string(),
|
|
86670
86673
|
level: external_exports.coerce.number().int(),
|
|
86671
86674
|
uid: nanoidSchema,
|
|
86672
|
-
parent: external_exports.string().optional()
|
|
86675
|
+
parent: external_exports.string().optional(),
|
|
86676
|
+
isPageTitle: external_exports.boolean().optional()
|
|
86673
86677
|
}).meta({ id: "heading-record" });
|
|
86674
86678
|
var publishAssetSchema = external_exports.object({
|
|
86675
86679
|
path: external_exports.string(),
|
|
@@ -86696,14 +86700,16 @@ var siteDeploySchema = entitySchema.extend({
|
|
|
86696
86700
|
|
|
86697
86701
|
// ../../packages/entities/dist/login-portals/customization.js
|
|
86698
86702
|
var loginPortalEmailSchema = external_exports.object({
|
|
86703
|
+
/** @deprecated No longer rendered in the email template */
|
|
86699
86704
|
logo: external_exports.string().default(""),
|
|
86705
|
+
/** @deprecated No longer rendered in the email template */
|
|
86700
86706
|
logoSize: external_exports.string().default("100"),
|
|
86701
86707
|
buttonText: external_exports.string().max(50).default("Login"),
|
|
86702
86708
|
message: external_exports.string().max(1e3).default("Click to access private documentation hosted by scalar.com"),
|
|
86703
86709
|
title: external_exports.string().max(100).default("Private Docs"),
|
|
86704
86710
|
mainColor: external_exports.string().max(100).default("#2a2f45"),
|
|
86705
86711
|
mainBackground: external_exports.string().max(100).default("#f6f6f6"),
|
|
86706
|
-
cardColor: external_exports.string().max(100).default("2a2f45"),
|
|
86712
|
+
cardColor: external_exports.string().max(100).default("#2a2f45"),
|
|
86707
86713
|
cardBackground: external_exports.string().max(100).default("#fff"),
|
|
86708
86714
|
buttonColor: external_exports.string().max(100).default("#fff"),
|
|
86709
86715
|
buttonBackground: external_exports.string().max(100).default("#0f0f0f")
|
|
@@ -86976,7 +86982,7 @@ var monthlyUsageSchema = zod_default.object({
|
|
|
86976
86982
|
messages: zod_default.number()
|
|
86977
86983
|
}).meta({ id: "monthly-usage" });
|
|
86978
86984
|
|
|
86979
|
-
// ../../node_modules/.pnpm/@scalar+helpers@0.
|
|
86985
|
+
// ../../node_modules/.pnpm/@scalar+helpers@0.8.1/node_modules/@scalar/helpers/dist/http/http-methods.js
|
|
86980
86986
|
var HTTP_METHODS = ["delete", "get", "head", "options", "patch", "post", "put", "trace"];
|
|
86981
86987
|
var httpMethods = Object.freeze(new Set(HTTP_METHODS));
|
|
86982
86988
|
|
|
@@ -87687,10 +87693,9 @@ var githubRepositorySchema = external_exports.object({
|
|
|
87687
87693
|
linkedBy: external_exports.string(),
|
|
87688
87694
|
installationId: external_exports.number().int(),
|
|
87689
87695
|
id: external_exports.number().int(),
|
|
87690
|
-
/** `owner/repo` form from the GitHub API */
|
|
87691
87696
|
name: external_exports.string().min(2),
|
|
87692
87697
|
branch: external_exports.string().default("main"),
|
|
87693
|
-
configPath: external_exports.string().default(""),
|
|
87698
|
+
configPath: external_exports.string().default("scalar.config.json"),
|
|
87694
87699
|
publishOnMerge: external_exports.boolean().default(true),
|
|
87695
87700
|
publishPreviews: external_exports.boolean().default(false),
|
|
87696
87701
|
prComments: external_exports.boolean().default(false),
|
|
@@ -87706,7 +87711,7 @@ var bitbucketRepositorySchema = external_exports.object({
|
|
|
87706
87711
|
/** `workspaceSlug/repoSlug` for display, mirrored from GitHub for symmetry */
|
|
87707
87712
|
name: external_exports.string().min(2),
|
|
87708
87713
|
branch: external_exports.string().default("main"),
|
|
87709
|
-
configPath: external_exports.string().default(""),
|
|
87714
|
+
configPath: external_exports.string().default("scalar.config.json"),
|
|
87710
87715
|
publishOnMerge: external_exports.boolean().default(true),
|
|
87711
87716
|
publishPreviews: external_exports.boolean().default(false),
|
|
87712
87717
|
prComments: external_exports.boolean().default(false),
|
|
@@ -87780,7 +87785,7 @@ var signupDataSchema = external_exports.object({
|
|
|
87780
87785
|
yjsReferences: external_exports.record(external_exports.string(), external_exports.string())
|
|
87781
87786
|
}).meta({ id: "signup-data" });
|
|
87782
87787
|
|
|
87783
|
-
// ../../packages/entities/dist/sdk/config.js
|
|
87788
|
+
// ../../packages/entities/dist/sdk/scalar-config.js
|
|
87784
87789
|
var import_yaml = __toESM(require_dist(), 1);
|
|
87785
87790
|
|
|
87786
87791
|
// ../../packages/entities/dist/sdk/schema.js
|
|
@@ -87793,6 +87798,11 @@ var SdkLanguage;
|
|
|
87793
87798
|
SdkLanguage2["Ruby"] = "ruby";
|
|
87794
87799
|
SdkLanguage2["Php"] = "php";
|
|
87795
87800
|
SdkLanguage2["Go"] = "go";
|
|
87801
|
+
SdkLanguage2["Rust"] = "rust";
|
|
87802
|
+
SdkLanguage2["Kotlin"] = "kotlin";
|
|
87803
|
+
SdkLanguage2["Swift"] = "swift";
|
|
87804
|
+
SdkLanguage2["Cpp"] = "cpp";
|
|
87805
|
+
SdkLanguage2["Dart"] = "dart";
|
|
87796
87806
|
})(SdkLanguage || (SdkLanguage = {}));
|
|
87797
87807
|
var SdkLanguageLabels = {
|
|
87798
87808
|
[SdkLanguage.Typescript]: "Typescript",
|
|
@@ -87801,11 +87811,17 @@ var SdkLanguageLabels = {
|
|
|
87801
87811
|
[SdkLanguage.Java]: "Java",
|
|
87802
87812
|
[SdkLanguage.Ruby]: "Ruby",
|
|
87803
87813
|
[SdkLanguage.Php]: "PHP",
|
|
87804
|
-
[SdkLanguage.Go]: "Go"
|
|
87814
|
+
[SdkLanguage.Go]: "Go",
|
|
87815
|
+
[SdkLanguage.Rust]: "Rust",
|
|
87816
|
+
[SdkLanguage.Kotlin]: "Kotlin",
|
|
87817
|
+
[SdkLanguage.Swift]: "Swift",
|
|
87818
|
+
[SdkLanguage.Cpp]: "C++",
|
|
87819
|
+
[SdkLanguage.Dart]: "Dart"
|
|
87805
87820
|
};
|
|
87806
87821
|
var sdkVersionSchema = external_exports.object({
|
|
87807
87822
|
version: docVersionSchema,
|
|
87808
87823
|
apiVersion: docVersionSchema,
|
|
87824
|
+
createdAt: timestampSchema.optional(),
|
|
87809
87825
|
activeSync: external_exports.object({
|
|
87810
87826
|
repository: external_exports.string(),
|
|
87811
87827
|
pullRequest: external_exports.number(),
|
|
@@ -87813,13 +87829,6 @@ var sdkVersionSchema = external_exports.object({
|
|
|
87813
87829
|
}).optional(),
|
|
87814
87830
|
activeBuild: nanoidSchema.optional()
|
|
87815
87831
|
}).meta({ id: "sdk-version" });
|
|
87816
|
-
var sdkPreviewSchema = external_exports.object({
|
|
87817
|
-
code: external_exports.string(),
|
|
87818
|
-
language: external_exports.string(),
|
|
87819
|
-
method: external_exports.string().optional(),
|
|
87820
|
-
operationId: external_exports.string(),
|
|
87821
|
-
path: external_exports.string()
|
|
87822
|
-
}).meta({ id: "sdk-preview" });
|
|
87823
87832
|
var sdkRepositorySchema = external_exports.object({
|
|
87824
87833
|
linkedBy: external_exports.string(),
|
|
87825
87834
|
id: external_exports.number(),
|
|
@@ -87899,434 +87908,118 @@ var sdkCodeSampleSchema = external_exports.object({
|
|
|
87899
87908
|
source: external_exports.string()
|
|
87900
87909
|
}).meta({ id: "sdk-code-sample" });
|
|
87901
87910
|
|
|
87902
|
-
// ../../packages/entities/dist/sdk/config.js
|
|
87903
|
-
|
|
87904
|
-
|
|
87905
|
-
|
|
87906
|
-
|
|
87907
|
-
|
|
87908
|
-
|
|
87909
|
-
|
|
87910
|
-
|
|
87911
|
-
|
|
87912
|
-
|
|
87913
|
-
|
|
87914
|
-
|
|
87915
|
-
|
|
87916
|
-
|
|
87917
|
-
|
|
87918
|
-
|
|
87919
|
-
|
|
87920
|
-
|
|
87921
|
-
|
|
87922
|
-
|
|
87923
|
-
|
|
87924
|
-
|
|
87925
|
-
|
|
87926
|
-
|
|
87927
|
-
|
|
87928
|
-
|
|
87929
|
-
|
|
87930
|
-
|
|
87931
|
-
|
|
87932
|
-
|
|
87933
|
-
|
|
87934
|
-
|
|
87935
|
-
|
|
87936
|
-
|
|
87937
|
-
clientServerStatusCodesAsErrors: external_exports.boolean().default(true),
|
|
87938
|
-
defaultErrorName: external_exports.string().default("APIException"),
|
|
87939
|
-
disableNamespacePascalCasingApr2024: external_exports.boolean().default(true),
|
|
87940
|
-
dotnetVersion: external_exports.string().default("net8.0"),
|
|
87941
|
-
enableSourceLink: external_exports.boolean().default(false),
|
|
87942
|
-
flattenGlobalSecurity: external_exports.boolean().default(true),
|
|
87943
|
-
flatteningOrder: external_exports.enum(["parameters-first"]).default("parameters-first"),
|
|
87944
|
-
imports: external_exports.object({
|
|
87945
|
-
option: external_exports.literal("openapi"),
|
|
87946
|
-
paths: external_exports.object({
|
|
87947
|
-
callbacks: external_exports.string().default("Models/Callbacks"),
|
|
87948
|
-
errors: external_exports.string().default("Models/Errors"),
|
|
87949
|
-
operations: external_exports.string().default("Models/Requests"),
|
|
87950
|
-
shared: external_exports.string().default("Models/Components"),
|
|
87951
|
-
webhooks: external_exports.string().default("Models/Webhooks")
|
|
87952
|
-
})
|
|
87953
|
-
}).default({
|
|
87954
|
-
option: "openapi",
|
|
87955
|
-
paths: {
|
|
87956
|
-
callbacks: "Models/Callbacks",
|
|
87957
|
-
errors: "Models/Errors",
|
|
87958
|
-
operations: "Models/Requests",
|
|
87959
|
-
shared: "Models/Components",
|
|
87960
|
-
webhooks: "Models/Webhooks"
|
|
87961
|
-
}
|
|
87962
|
-
}),
|
|
87963
|
-
includeDebugSymbols: external_exports.boolean().default(false),
|
|
87964
|
-
inputModelSuffix: external_exports.string().default("input"),
|
|
87965
|
-
maxMethodParams: external_exports.number().default(4),
|
|
87966
|
-
methodArguments: external_exports.enum(["infer-optional-args"]).default("infer-optional-args"),
|
|
87967
|
-
outputModelSuffix: external_exports.string().default("output"),
|
|
87968
|
-
packageName: external_exports.string(),
|
|
87969
|
-
packageTags: external_exports.string().default(""),
|
|
87970
|
-
responseFormat: external_exports.string().default("envelope-http"),
|
|
87971
|
-
sourceDirectory: external_exports.string().default("src")
|
|
87972
|
-
}).meta({ id: "csharp-config" });
|
|
87973
|
-
var goConfigSchema = external_exports.object({
|
|
87974
|
-
sdkClassName: external_exports.string().default(""),
|
|
87975
|
-
additionalDependencies: external_exports.record(external_exports.string(), external_exports.string()).default({}),
|
|
87976
|
-
allowUnknownFieldsInWeakUnions: external_exports.boolean().default(false),
|
|
87977
|
-
clientServerStatusCodesAsErrors: external_exports.boolean().default(true),
|
|
87978
|
-
defaultErrorName: external_exports.string().default("SDKError"),
|
|
87979
|
-
flattenGlobalSecurity: external_exports.boolean().default(false),
|
|
87980
|
-
imports: external_exports.object({
|
|
87981
|
-
option: external_exports.literal("openapi"),
|
|
87982
|
-
paths: external_exports.object({
|
|
87983
|
-
callbacks: external_exports.string().default("pkg/models/callbacks"),
|
|
87984
|
-
errors: external_exports.string().default("pkg/models/sdkerrors"),
|
|
87985
|
-
operations: external_exports.string().default("pkg/models/operations"),
|
|
87986
|
-
shared: external_exports.string().default("pkg/models/shared"),
|
|
87987
|
-
webhooks: external_exports.string().default("pkg/models/webhooks")
|
|
87988
|
-
})
|
|
87989
|
-
}).default({
|
|
87990
|
-
option: "openapi",
|
|
87991
|
-
paths: {
|
|
87992
|
-
callbacks: "pkg/models/callbacks",
|
|
87993
|
-
errors: "pkg/models/sdkerrors",
|
|
87994
|
-
operations: "pkg/models/operations",
|
|
87995
|
-
shared: "pkg/models/shared",
|
|
87996
|
-
webhooks: "pkg/models/webhooks"
|
|
87997
|
-
}
|
|
87998
|
-
}),
|
|
87999
|
-
inputModelSuffix: external_exports.string().default("input"),
|
|
88000
|
-
maxMethodParams: external_exports.number().default(4),
|
|
88001
|
-
methodArguments: external_exports.enum(["require-security-and-request"]).default("require-security-and-request"),
|
|
88002
|
-
outputModelSuffix: external_exports.string().default("output"),
|
|
88003
|
-
packageName: external_exports.string(),
|
|
88004
|
-
responseFormat: external_exports.string().default("envelope")
|
|
88005
|
-
}).meta({ id: "go-config" });
|
|
88006
|
-
var javaConfigSchema = external_exports.object({
|
|
88007
|
-
sdkClassName: external_exports.string().default(""),
|
|
88008
|
-
additionalDependencies: external_exports.array(external_exports.string()).default([]),
|
|
88009
|
-
additionalPlugins: external_exports.array(external_exports.string()).default([]),
|
|
88010
|
-
artifactID: external_exports.string(),
|
|
88011
|
-
clientServerStatusCodesAsErrors: external_exports.boolean().default(true),
|
|
88012
|
-
companyEmail: external_exports.string().default("info@mycompany.com"),
|
|
88013
|
-
companyName: external_exports.string().default("My Company"),
|
|
88014
|
-
companyURL: external_exports.string().default("www.mycompany.com"),
|
|
88015
|
-
defaultErrorName: external_exports.string().default("APIException"),
|
|
88016
|
-
flattenGlobalSecurity: external_exports.boolean().default(true),
|
|
88017
|
-
githubURL: external_exports.string().optional(),
|
|
88018
|
-
groupID: external_exports.string(),
|
|
88019
|
-
imports: external_exports.object({
|
|
88020
|
-
option: external_exports.literal("openapi"),
|
|
88021
|
-
paths: external_exports.object({
|
|
88022
|
-
callbacks: external_exports.string().default("models/callbacks"),
|
|
88023
|
-
errors: external_exports.string().default("models/errors"),
|
|
88024
|
-
operations: external_exports.string().default("models/operations"),
|
|
88025
|
-
shared: external_exports.string().default("models/components"),
|
|
88026
|
-
webhooks: external_exports.string().default("models/webhooks")
|
|
88027
|
-
})
|
|
88028
|
-
}).default({
|
|
88029
|
-
option: "openapi",
|
|
88030
|
-
paths: {
|
|
88031
|
-
callbacks: "models/callbacks",
|
|
88032
|
-
errors: "models/errors",
|
|
88033
|
-
operations: "models/operations",
|
|
88034
|
-
shared: "models/components",
|
|
88035
|
-
webhooks: "models/webhooks"
|
|
88036
|
-
}
|
|
88037
|
-
}),
|
|
88038
|
-
inputModelSuffix: external_exports.string().default("input"),
|
|
88039
|
-
license: external_exports.object({
|
|
88040
|
-
name: external_exports.string().default("The MIT License (MIT)"),
|
|
88041
|
-
shortName: external_exports.string().default("MIT"),
|
|
88042
|
-
url: external_exports.string().default("https://mit-license.org/")
|
|
88043
|
-
}).default({
|
|
88044
|
-
name: "The MIT License (MIT)",
|
|
88045
|
-
shortName: "MIT",
|
|
88046
|
-
url: "https://mit-license.org/"
|
|
88047
|
-
}),
|
|
88048
|
-
maxMethodParams: external_exports.number().default(4),
|
|
88049
|
-
outputModelSuffix: external_exports.string().default("output"),
|
|
88050
|
-
projectName: external_exports.string(),
|
|
88051
|
-
templateVersion: external_exports.string().default("v2")
|
|
88052
|
-
}).meta({ id: "java-config" });
|
|
88053
|
-
var phpConfigSchema = external_exports.object({
|
|
88054
|
-
sdkClassName: external_exports.string().default(""),
|
|
88055
|
-
additionalDependencies: external_exports.object({
|
|
88056
|
-
autoload: external_exports.record(external_exports.string(), external_exports.string()),
|
|
88057
|
-
"autoload-dev": external_exports.record(external_exports.string(), external_exports.string()),
|
|
88058
|
-
require: external_exports.record(external_exports.string(), external_exports.string()),
|
|
88059
|
-
"require-dev": external_exports.record(external_exports.string(), external_exports.string())
|
|
88060
|
-
}).default({
|
|
88061
|
-
autoload: {},
|
|
88062
|
-
"autoload-dev": {},
|
|
88063
|
-
require: {},
|
|
88064
|
-
"require-dev": {}
|
|
88065
|
-
}),
|
|
88066
|
-
clientServerStatusCodesAsErrors: external_exports.boolean().default(true),
|
|
88067
|
-
defaultErrorName: external_exports.string().default("APIException"),
|
|
88068
|
-
flattenGlobalSecurity: external_exports.boolean().default(true),
|
|
88069
|
-
imports: external_exports.object({
|
|
88070
|
-
option: external_exports.literal("openapi"),
|
|
88071
|
-
paths: external_exports.object({
|
|
88072
|
-
callbacks: external_exports.string().default("Models/Callbacks"),
|
|
88073
|
-
errors: external_exports.string().default("Models/Errors"),
|
|
88074
|
-
operations: external_exports.string().default("Models/Operations"),
|
|
88075
|
-
shared: external_exports.string().default("Models/Components"),
|
|
88076
|
-
webhooks: external_exports.string().default("Models/Webhooks")
|
|
88077
|
-
})
|
|
88078
|
-
}).default({
|
|
88079
|
-
option: "openapi",
|
|
88080
|
-
paths: {
|
|
88081
|
-
callbacks: "Models/Callbacks",
|
|
88082
|
-
errors: "Models/Errors",
|
|
88083
|
-
operations: "Models/Operations",
|
|
88084
|
-
shared: "Models/Components",
|
|
88085
|
-
webhooks: "Models/Webhooks"
|
|
88086
|
-
}
|
|
88087
|
-
}),
|
|
88088
|
-
inputModelSuffix: external_exports.string().default("input"),
|
|
88089
|
-
laravelServiceProvider: external_exports.object({ enabled: external_exports.boolean().default(false), svcName: external_exports.string() }).default({ enabled: false, svcName: "" }),
|
|
88090
|
-
maxMethodParams: external_exports.number().default(4),
|
|
88091
|
-
methodArguments: external_exports.enum(["infer-optional-args"]).default("infer-optional-args"),
|
|
88092
|
-
namespace: external_exports.string().transform(toPascalCase),
|
|
88093
|
-
outputModelSuffix: external_exports.string().default("output"),
|
|
88094
|
-
packageName: external_exports.string()
|
|
88095
|
-
}).meta({ id: "php-config" });
|
|
88096
|
-
var pythonConfigSchema = external_exports.object({
|
|
88097
|
-
sdkClassName: external_exports.string().default(""),
|
|
88098
|
-
additionalDependencies: external_exports.object({
|
|
88099
|
-
dev: external_exports.record(external_exports.string(), external_exports.string()),
|
|
88100
|
-
main: external_exports.record(external_exports.string(), external_exports.string())
|
|
88101
|
-
}).default({ dev: {}, main: {} }),
|
|
88102
|
-
authors: external_exports.array(external_exports.string()).default([]),
|
|
88103
|
-
clientServerStatusCodesAsErrors: external_exports.boolean().default(true),
|
|
88104
|
-
defaultErrorName: external_exports.string().default("APIError"),
|
|
88105
|
-
description: external_exports.string().default(""),
|
|
88106
|
-
enableCustomCodeRegions: external_exports.boolean().default(false),
|
|
88107
|
-
enumFormat: external_exports.enum(["enum"]).default("enum"),
|
|
88108
|
-
fixFlags: external_exports.object({ responseRequiredSep2024: external_exports.boolean().default(true) }).default({ responseRequiredSep2024: true }),
|
|
88109
|
-
flattenGlobalSecurity: external_exports.boolean().default(true),
|
|
88110
|
-
flattenRequests: external_exports.boolean().default(true),
|
|
88111
|
-
flatteningOrder: external_exports.enum(["parameters-first"]).default("parameters-first"),
|
|
88112
|
-
imports: external_exports.object({
|
|
88113
|
-
option: external_exports.literal("openapi"),
|
|
88114
|
-
paths: external_exports.object({
|
|
88115
|
-
callbacks: external_exports.string().default(""),
|
|
88116
|
-
errors: external_exports.string().default(""),
|
|
88117
|
-
operations: external_exports.string().default(""),
|
|
88118
|
-
shared: external_exports.string().default(""),
|
|
88119
|
-
webhooks: external_exports.string().default("")
|
|
88120
|
-
})
|
|
88121
|
-
}).default({
|
|
88122
|
-
option: "openapi",
|
|
88123
|
-
paths: {
|
|
88124
|
-
callbacks: "",
|
|
88125
|
-
errors: "",
|
|
88126
|
-
operations: "",
|
|
88127
|
-
shared: "",
|
|
88128
|
-
webhooks: ""
|
|
88129
|
-
}
|
|
88130
|
-
}),
|
|
88131
|
-
inputModelSuffix: external_exports.string().default("input"),
|
|
88132
|
-
maxMethodParams: external_exports.number().default(999),
|
|
88133
|
-
methodArguments: external_exports.enum(["infer-optional-args"]).default("infer-optional-args"),
|
|
88134
|
-
outputModelSuffix: external_exports.string().default("output"),
|
|
88135
|
-
packageName: external_exports.string(),
|
|
88136
|
-
pytestTimeout: external_exports.number().default(0),
|
|
88137
|
-
responseFormat: external_exports.enum(["envelope", "envelope-http", "flat"]).default("flat"),
|
|
88138
|
-
templateVersion: external_exports.string().default("v2")
|
|
88139
|
-
}).meta({ id: "python-config" });
|
|
88140
|
-
var rubyConfigSchema = external_exports.object({
|
|
88141
|
-
sdkClassName: external_exports.string().default(""),
|
|
88142
|
-
additionalDependencies: external_exports.object({
|
|
88143
|
-
development: external_exports.record(external_exports.string(), external_exports.string()),
|
|
88144
|
-
runtime: external_exports.record(external_exports.string(), external_exports.string())
|
|
88145
|
-
}).default({ development: {}, runtime: {} }),
|
|
88146
|
-
author: external_exports.string().default("").transform(toPascalCase),
|
|
88147
|
-
description: external_exports.string().default(""),
|
|
88148
|
-
flattenGlobalSecurity: external_exports.boolean().default(true),
|
|
88149
|
-
imports: external_exports.object({
|
|
88150
|
-
option: external_exports.literal("openapi"),
|
|
88151
|
-
paths: external_exports.object({
|
|
88152
|
-
callbacks: external_exports.string().default("models/callbacks"),
|
|
88153
|
-
errors: external_exports.string().default("models/errors"),
|
|
88154
|
-
operations: external_exports.string().default("models/operations"),
|
|
88155
|
-
shared: external_exports.string().default("models/shared"),
|
|
88156
|
-
webhooks: external_exports.string().default("models/webhooks")
|
|
88157
|
-
})
|
|
88158
|
-
}).default({
|
|
88159
|
-
option: "openapi",
|
|
88160
|
-
paths: {
|
|
88161
|
-
callbacks: "models/callbacks",
|
|
88162
|
-
errors: "models/errors",
|
|
88163
|
-
operations: "models/operations",
|
|
88164
|
-
shared: "models/shared",
|
|
88165
|
-
webhooks: "models/webhooks"
|
|
88166
|
-
}
|
|
88167
|
-
}),
|
|
88168
|
-
inputModelSuffix: external_exports.string().default("input"),
|
|
88169
|
-
maxMethodParams: external_exports.number().default(4),
|
|
88170
|
-
module: external_exports.string(),
|
|
88171
|
-
outputModelSuffix: external_exports.string().default("output"),
|
|
88172
|
-
packageName: external_exports.string()
|
|
88173
|
-
}).meta({ id: "ruby-config" });
|
|
88174
|
-
var typescriptConfigSchema = external_exports.object({
|
|
88175
|
-
sdkClassName: external_exports.string().default(""),
|
|
88176
|
-
additionalDependencies: external_exports.object({
|
|
88177
|
-
dependencies: external_exports.record(external_exports.string(), external_exports.string()),
|
|
88178
|
-
devDependencies: external_exports.record(external_exports.string(), external_exports.string()),
|
|
88179
|
-
peerDependencies: external_exports.record(external_exports.string(), external_exports.string())
|
|
88180
|
-
}).default({ dependencies: {}, devDependencies: {}, peerDependencies: {} }),
|
|
88181
|
-
additionalPackageJSON: external_exports.record(external_exports.string(), external_exports.string()).default({}),
|
|
88182
|
-
author: external_exports.string().default("").transform(toPascalCase),
|
|
88183
|
-
clientServerStatusCodesAsErrors: external_exports.boolean().default(true),
|
|
88184
|
-
defaultErrorName: external_exports.string().default("APIError"),
|
|
88185
|
-
enableCustomCodeRegions: external_exports.boolean().default(false),
|
|
88186
|
-
enableMCPServer: external_exports.boolean().default(false),
|
|
88187
|
-
enableReactQuery: external_exports.boolean().default(false),
|
|
88188
|
-
enumFormat: external_exports.enum(["union"]).default("union"),
|
|
88189
|
-
flattenGlobalSecurity: external_exports.boolean().default(true),
|
|
88190
|
-
flatteningOrder: external_exports.enum(["parameters-first"]).default("parameters-first"),
|
|
88191
|
-
imports: external_exports.object({
|
|
88192
|
-
option: external_exports.literal("openapi"),
|
|
88193
|
-
paths: external_exports.object({
|
|
88194
|
-
callbacks: external_exports.string().default("models/callbacks"),
|
|
88195
|
-
errors: external_exports.string().default("models/errors"),
|
|
88196
|
-
operations: external_exports.string().default("models/operations"),
|
|
88197
|
-
shared: external_exports.string().default("models/components"),
|
|
88198
|
-
webhooks: external_exports.string().default("models/webhooks")
|
|
88199
|
-
})
|
|
88200
|
-
}).default({
|
|
88201
|
-
option: "openapi",
|
|
88202
|
-
paths: {
|
|
88203
|
-
callbacks: "models/callbacks",
|
|
88204
|
-
errors: "models/errors",
|
|
88205
|
-
operations: "models/operations",
|
|
88206
|
-
shared: "models/components",
|
|
88207
|
-
webhooks: "models/webhooks"
|
|
88208
|
-
}
|
|
88209
|
-
}),
|
|
88210
|
-
inputModelSuffix: external_exports.string().default("input"),
|
|
88211
|
-
jsonpath: external_exports.string().default("rfc9535"),
|
|
88212
|
-
maxMethodParams: external_exports.number().default(0),
|
|
88213
|
-
methodArguments: external_exports.enum(["require-security-and-request"]).default("require-security-and-request"),
|
|
88214
|
-
moduleFormat: external_exports.enum(["dual"]).default("dual"),
|
|
88215
|
-
outputModelSuffix: external_exports.string().default("output"),
|
|
88216
|
-
packageName: external_exports.string(),
|
|
88217
|
-
responseFormat: external_exports.enum(["envelope", "envelope-http", "flat"]).default("flat"),
|
|
88218
|
-
templateVersion: external_exports.string().default("v2"),
|
|
88219
|
-
useIndexModules: external_exports.boolean().default(true)
|
|
88220
|
-
}).meta({ id: "typescript-config" });
|
|
88221
|
-
var sdkLanguageConfig = {
|
|
88222
|
-
[SdkLanguage.Go]: goConfigSchema,
|
|
88223
|
-
[SdkLanguage.Php]: phpConfigSchema,
|
|
88224
|
-
[SdkLanguage.Java]: javaConfigSchema,
|
|
88225
|
-
[SdkLanguage.Ruby]: rubyConfigSchema,
|
|
88226
|
-
[SdkLanguage.Python]: pythonConfigSchema,
|
|
88227
|
-
[SdkLanguage.CSharp]: csharpConfigSchema,
|
|
88228
|
-
[SdkLanguage.Typescript]: typescriptConfigSchema
|
|
87911
|
+
// ../../packages/entities/dist/sdk/scalar-config.js
|
|
87912
|
+
var SCALAR_TARGET_LANGUAGES = [
|
|
87913
|
+
"node",
|
|
87914
|
+
"typescript",
|
|
87915
|
+
"python",
|
|
87916
|
+
"go",
|
|
87917
|
+
"rust",
|
|
87918
|
+
"java",
|
|
87919
|
+
"kotlin",
|
|
87920
|
+
"ruby",
|
|
87921
|
+
"swift",
|
|
87922
|
+
"terraform",
|
|
87923
|
+
"cli",
|
|
87924
|
+
"php",
|
|
87925
|
+
"csharp",
|
|
87926
|
+
"cpp",
|
|
87927
|
+
"dart",
|
|
87928
|
+
"sql",
|
|
87929
|
+
"http",
|
|
87930
|
+
"openapi"
|
|
87931
|
+
];
|
|
87932
|
+
var scalarTargetLanguageSchema = external_exports.enum(SCALAR_TARGET_LANGUAGES).meta({ id: "scalar-target-language" });
|
|
87933
|
+
var sdkLanguageToScalarTarget = {
|
|
87934
|
+
[SdkLanguage.Typescript]: "typescript",
|
|
87935
|
+
[SdkLanguage.Python]: "python",
|
|
87936
|
+
[SdkLanguage.CSharp]: "csharp",
|
|
87937
|
+
[SdkLanguage.Java]: "java",
|
|
87938
|
+
[SdkLanguage.Ruby]: "ruby",
|
|
87939
|
+
[SdkLanguage.Php]: "php",
|
|
87940
|
+
[SdkLanguage.Go]: "go",
|
|
87941
|
+
[SdkLanguage.Rust]: "rust",
|
|
87942
|
+
[SdkLanguage.Kotlin]: "kotlin",
|
|
87943
|
+
[SdkLanguage.Swift]: "swift",
|
|
87944
|
+
[SdkLanguage.Cpp]: "cpp",
|
|
87945
|
+
[SdkLanguage.Dart]: "dart"
|
|
88229
87946
|
};
|
|
88230
|
-
|
|
88231
|
-
|
|
88232
|
-
|
|
88233
|
-
|
|
88234
|
-
|
|
88235
|
-
|
|
88236
|
-
|
|
88237
|
-
|
|
88238
|
-
|
|
88239
|
-
|
|
88240
|
-
|
|
88241
|
-
|
|
88242
|
-
|
|
88243
|
-
|
|
88244
|
-
|
|
88245
|
-
|
|
88246
|
-
|
|
88247
|
-
|
|
88248
|
-
|
|
88249
|
-
|
|
88250
|
-
|
|
88251
|
-
|
|
88252
|
-
|
|
88253
|
-
|
|
88254
|
-
|
|
88255
|
-
|
|
88256
|
-
|
|
88257
|
-
|
|
88258
|
-
|
|
88259
|
-
}
|
|
88260
|
-
|
|
88261
|
-
|
|
88262
|
-
|
|
88263
|
-
|
|
88264
|
-
|
|
88265
|
-
|
|
88266
|
-
|
|
88267
|
-
|
|
88268
|
-
|
|
88269
|
-
|
|
88270
|
-
|
|
88271
|
-
|
|
88272
|
-
|
|
88273
|
-
|
|
88274
|
-
|
|
88275
|
-
|
|
88276
|
-
|
|
88277
|
-
}
|
|
88278
|
-
return pythonConfigSchema.parse(config3);
|
|
88279
|
-
}
|
|
88280
|
-
case SdkLanguage.Ruby: {
|
|
88281
|
-
const config3 = {
|
|
88282
|
-
packageName: `${metadata.namespace}-${metadata.slug}`,
|
|
88283
|
-
module: `${pascalNamespace}${pascalSlug}`,
|
|
88284
|
-
author: pascalNamespace,
|
|
88285
|
-
description: `Ruby Client SDK for ${metadata.namespace}/${metadata.slug}`,
|
|
88286
|
-
sdkClassName
|
|
88287
|
-
};
|
|
88288
|
-
return rubyConfigSchema.parse(config3);
|
|
88289
|
-
}
|
|
88290
|
-
case SdkLanguage.Typescript: {
|
|
88291
|
-
const config3 = {
|
|
88292
|
-
packageName: `@${metadata.namespace}/${metadata.slug}`,
|
|
88293
|
-
author: pascalNamespace,
|
|
88294
|
-
sdkClassName
|
|
88295
|
-
};
|
|
88296
|
-
return typescriptConfigSchema.parse(config3);
|
|
87947
|
+
var scalarTargetEntrySchema = external_exports.looseObject({
|
|
87948
|
+
packageName: external_exports.string().optional(),
|
|
87949
|
+
version: external_exports.string().optional()
|
|
87950
|
+
}).meta({ id: "scalar-target-entry" });
|
|
87951
|
+
var scalarClientSettingsSchema = external_exports.looseObject({
|
|
87952
|
+
opts: external_exports.record(external_exports.string(), external_exports.any()).optional(),
|
|
87953
|
+
defaultHeaders: external_exports.record(external_exports.string(), external_exports.string()).optional(),
|
|
87954
|
+
defaultTimeout: external_exports.union([external_exports.number(), external_exports.string()]).optional(),
|
|
87955
|
+
defaultEnvPrefix: external_exports.string().optional()
|
|
87956
|
+
}).meta({ id: "scalar-client-settings" });
|
|
87957
|
+
var scalarDiagnosticsSchema = external_exports.looseObject({
|
|
87958
|
+
failOn: external_exports.enum(["off", "info", "warn", "error"]).optional(),
|
|
87959
|
+
maxWarnings: external_exports.number().optional()
|
|
87960
|
+
}).meta({ id: "scalar-diagnostics" });
|
|
87961
|
+
var scalarSdkConfigSchema = external_exports.looseObject({
|
|
87962
|
+
version: docVersionSchema.optional(),
|
|
87963
|
+
resources: external_exports.record(external_exports.string(), external_exports.any()).optional(),
|
|
87964
|
+
targets: external_exports.partialRecord(scalarTargetLanguageSchema, scalarTargetEntrySchema).optional(),
|
|
87965
|
+
clientSettings: scalarClientSettingsSchema.optional(),
|
|
87966
|
+
environments: external_exports.record(external_exports.string(), external_exports.string()).optional(),
|
|
87967
|
+
codeSampleLanguages: scalarTargetLanguageSchema.array().optional(),
|
|
87968
|
+
diagnostics: scalarDiagnosticsSchema.optional()
|
|
87969
|
+
}).meta({ id: "scalar-sdk-config" });
|
|
87970
|
+
function buildPackageName(language, namespace, slug) {
|
|
87971
|
+
const suffix = `-${language}`;
|
|
87972
|
+
const base = slug.endsWith(suffix) ? slug.slice(0, -suffix.length) : slug;
|
|
87973
|
+
if (language === SdkLanguage.Typescript)
|
|
87974
|
+
return `@${namespace}/${base}`;
|
|
87975
|
+
if (language === SdkLanguage.Cpp)
|
|
87976
|
+
return `${namespace}_${base}`;
|
|
87977
|
+
return `${namespace}-${base}`;
|
|
87978
|
+
}
|
|
87979
|
+
function makeScalarSdkConfig({ namespace, slug, version: version3, language, className }) {
|
|
87980
|
+
const primaryTarget = sdkLanguageToScalarTarget[language];
|
|
87981
|
+
const sdkClassName = className || slug;
|
|
87982
|
+
return scalarSdkConfigSchema.parse({
|
|
87983
|
+
version: version3,
|
|
87984
|
+
clientSettings: {
|
|
87985
|
+
defaultEnvPrefix: namespace.toUpperCase()
|
|
87986
|
+
},
|
|
87987
|
+
targets: {
|
|
87988
|
+
[primaryTarget]: {
|
|
87989
|
+
packageName: buildPackageName(language, namespace, slug),
|
|
87990
|
+
version: version3
|
|
87991
|
+
}
|
|
87992
|
+
},
|
|
87993
|
+
resources: {
|
|
87994
|
+
[sdkClassName]: {}
|
|
88297
87995
|
}
|
|
88298
|
-
}
|
|
87996
|
+
});
|
|
88299
87997
|
}
|
|
88300
|
-
var
|
|
87998
|
+
var scalarBuildInputSchema = external_exports.object({
|
|
88301
87999
|
namespace: namespaceSchema,
|
|
88302
88000
|
slug: slugSchema,
|
|
88303
88001
|
version: docVersionSchema,
|
|
88304
88002
|
language: external_exports.enum(SdkLanguage),
|
|
88305
88003
|
customConfig: external_exports.string(),
|
|
88306
|
-
|
|
88307
|
-
}).transform(({ namespace, slug, version: version3, language, customConfig,
|
|
88308
|
-
const
|
|
88309
|
-
const
|
|
88310
|
-
|
|
88311
|
-
});
|
|
88312
|
-
const dynamicConfig = {
|
|
88313
|
-
...makeSdkLanguageConfig(language, {
|
|
88004
|
+
className: external_exports.string().optional()
|
|
88005
|
+
}).transform(({ namespace, slug, version: version3, language, customConfig, className }) => {
|
|
88006
|
+
const parsed = scalarSdkConfigSchema.parse(JSON.parse(customConfig));
|
|
88007
|
+
const merged = {
|
|
88008
|
+
...makeScalarSdkConfig({
|
|
88314
88009
|
namespace,
|
|
88315
88010
|
slug,
|
|
88316
88011
|
version: version3,
|
|
88317
|
-
|
|
88012
|
+
language,
|
|
88013
|
+
className
|
|
88318
88014
|
}),
|
|
88319
|
-
...
|
|
88320
|
-
published: true,
|
|
88015
|
+
...parsed,
|
|
88321
88016
|
version: version3
|
|
88322
88017
|
};
|
|
88323
|
-
|
|
88324
|
-
|
|
88325
|
-
|
|
88326
|
-
|
|
88327
|
-
|
|
88328
|
-
return import_yaml.default.stringify(full);
|
|
88329
|
-
}).meta({ id: "build-input" });
|
|
88018
|
+
return import_yaml.default.stringify(merged);
|
|
88019
|
+
}).meta({ id: "scalar-build-input" });
|
|
88020
|
+
|
|
88021
|
+
// ../../packages/entities/dist/sdk/helpers.js
|
|
88022
|
+
import semver3 from "semver";
|
|
88330
88023
|
|
|
88331
88024
|
// ../../packages/entities/dist/team/access.js
|
|
88332
88025
|
var ExternalAccessMethod;
|
|
@@ -89324,16 +89017,16 @@ function loginPortalsApiFactory(requestService) {
|
|
|
89324
89017
|
|
|
89325
89018
|
// ../../packages/service-api/dist/apis/managed-docs.js
|
|
89326
89019
|
function managedDocsApiFactory(requestService) {
|
|
89327
|
-
async function get(namespace, slug,
|
|
89020
|
+
async function get(namespace, slug, semver5) {
|
|
89328
89021
|
return await requestService.request({
|
|
89329
|
-
url: `core/managed-doc/${namespace}/${slug}/version/${
|
|
89022
|
+
url: `core/managed-doc/${namespace}/${slug}/version/${semver5}`,
|
|
89330
89023
|
method: "get",
|
|
89331
89024
|
schema: external_exports.string()
|
|
89332
89025
|
});
|
|
89333
89026
|
}
|
|
89334
|
-
async function getVersionMetadata(namespace, slug,
|
|
89027
|
+
async function getVersionMetadata(namespace, slug, semver5) {
|
|
89335
89028
|
return await requestService.request({
|
|
89336
|
-
url: `core/managed-doc/${namespace}/${slug}/version/${
|
|
89029
|
+
url: `core/managed-doc/${namespace}/${slug}/version/${semver5}/metadata`,
|
|
89337
89030
|
method: "get",
|
|
89338
89031
|
schema: managedDocVersionSchema
|
|
89339
89032
|
});
|
|
@@ -89420,9 +89113,9 @@ function managedDocsApiFactory(requestService) {
|
|
|
89420
89113
|
schema: managedDocVersionSchema
|
|
89421
89114
|
});
|
|
89422
89115
|
}
|
|
89423
|
-
async function updateVersion(namespace, slug,
|
|
89116
|
+
async function updateVersion(namespace, slug, semver5, data) {
|
|
89424
89117
|
return await requestService.request({
|
|
89425
|
-
url: `core/managed-doc/${namespace}/${slug}/version/${
|
|
89118
|
+
url: `core/managed-doc/${namespace}/${slug}/version/${semver5}`,
|
|
89426
89119
|
method: "patch",
|
|
89427
89120
|
data,
|
|
89428
89121
|
schema: external_exports.object({
|
|
@@ -89432,9 +89125,9 @@ function managedDocsApiFactory(requestService) {
|
|
|
89432
89125
|
})
|
|
89433
89126
|
});
|
|
89434
89127
|
}
|
|
89435
|
-
async function deleteVersion(namespace, slug,
|
|
89128
|
+
async function deleteVersion(namespace, slug, semver5) {
|
|
89436
89129
|
return await requestService.request({
|
|
89437
|
-
url: `core/managed-doc/${namespace}/${slug}/version/${
|
|
89130
|
+
url: `core/managed-doc/${namespace}/${slug}/version/${semver5}`,
|
|
89438
89131
|
method: "delete",
|
|
89439
89132
|
schema: external_exports.null()
|
|
89440
89133
|
});
|
|
@@ -89489,9 +89182,9 @@ function managedDocsApiFactory(requestService) {
|
|
|
89489
89182
|
})
|
|
89490
89183
|
});
|
|
89491
89184
|
}
|
|
89492
|
-
async function updateMcpTools({ namespace, slug, semver:
|
|
89185
|
+
async function updateMcpTools({ namespace, slug, semver: semver5, tools }) {
|
|
89493
89186
|
return await requestService.request({
|
|
89494
|
-
url: `core/managed-doc/${namespace}/${slug}/version/${
|
|
89187
|
+
url: `core/managed-doc/${namespace}/${slug}/version/${semver5}/tools`,
|
|
89495
89188
|
method: "post",
|
|
89496
89189
|
data: tools,
|
|
89497
89190
|
schema: external_exports.null()
|
|
@@ -89766,6 +89459,22 @@ function sdksApiFactory(requestService) {
|
|
|
89766
89459
|
schema: external_exports.null()
|
|
89767
89460
|
});
|
|
89768
89461
|
}
|
|
89462
|
+
async function createVersion(data) {
|
|
89463
|
+
return await requestService.request({
|
|
89464
|
+
url: "core/v1/sdks/version",
|
|
89465
|
+
method: "post",
|
|
89466
|
+
data,
|
|
89467
|
+
schema: external_exports.null()
|
|
89468
|
+
});
|
|
89469
|
+
}
|
|
89470
|
+
async function previewCodeSamples(data) {
|
|
89471
|
+
return await requestService.request({
|
|
89472
|
+
url: "sdk-generator/preview",
|
|
89473
|
+
method: "post",
|
|
89474
|
+
data,
|
|
89475
|
+
schema: external_exports.unknown()
|
|
89476
|
+
});
|
|
89477
|
+
}
|
|
89769
89478
|
async function del(uid) {
|
|
89770
89479
|
return await requestService.request({
|
|
89771
89480
|
url: `core/v1/sdks/${uid}`,
|
|
@@ -89839,17 +89548,11 @@ function sdksApiFactory(requestService) {
|
|
|
89839
89548
|
schema: external_exports.null()
|
|
89840
89549
|
});
|
|
89841
89550
|
}
|
|
89842
|
-
async function generateSnippets(data) {
|
|
89843
|
-
return await requestService.request({
|
|
89844
|
-
url: "core/v1/sdks/snippets",
|
|
89845
|
-
method: "post",
|
|
89846
|
-
data,
|
|
89847
|
-
schema: sdkPreviewSchema.array()
|
|
89848
|
-
});
|
|
89849
|
-
}
|
|
89850
89551
|
return {
|
|
89851
89552
|
create,
|
|
89852
89553
|
bulkCreate,
|
|
89554
|
+
createVersion,
|
|
89555
|
+
previewCodeSamples,
|
|
89853
89556
|
update,
|
|
89854
89557
|
delete: del,
|
|
89855
89558
|
available,
|
|
@@ -89859,8 +89562,7 @@ function sdksApiFactory(requestService) {
|
|
|
89859
89562
|
unlinkRepo,
|
|
89860
89563
|
updateRepo,
|
|
89861
89564
|
build,
|
|
89862
|
-
syncBuild
|
|
89863
|
-
generateSnippets
|
|
89565
|
+
syncBuild
|
|
89864
89566
|
};
|
|
89865
89567
|
}
|
|
89866
89568
|
|
|
@@ -90372,11 +90074,11 @@ function docsProjectApiFactory(requestService) {
|
|
|
90372
90074
|
})
|
|
90373
90075
|
});
|
|
90374
90076
|
}
|
|
90375
|
-
async function
|
|
90077
|
+
async function updateRepoSettings(projectUid, patch) {
|
|
90376
90078
|
return await requestService.request({
|
|
90377
|
-
url: "core/docs-projects/update-
|
|
90079
|
+
url: "core/docs-projects/update-repo-settings",
|
|
90378
90080
|
method: "post",
|
|
90379
|
-
data: { projectUid,
|
|
90081
|
+
data: { projectUid, ...patch },
|
|
90380
90082
|
schema: external_exports.null()
|
|
90381
90083
|
});
|
|
90382
90084
|
}
|
|
@@ -90439,7 +90141,7 @@ function docsProjectApiFactory(requestService) {
|
|
|
90439
90141
|
deleteProject,
|
|
90440
90142
|
getProject,
|
|
90441
90143
|
getGitCredentials,
|
|
90442
|
-
|
|
90144
|
+
updateRepoSettings,
|
|
90443
90145
|
linkGithub,
|
|
90444
90146
|
unlinkGithub,
|
|
90445
90147
|
linkBitbucket,
|
|
@@ -90904,6 +90606,45 @@ function publishApiFactory(requestService) {
|
|
|
90904
90606
|
schema: external_exports.object({ publishUid: nanoidSchema })
|
|
90905
90607
|
});
|
|
90906
90608
|
}
|
|
90609
|
+
async function createPreviewSandbox() {
|
|
90610
|
+
return await requestService.request({
|
|
90611
|
+
url: "publish-deploy/preview-sandbox",
|
|
90612
|
+
method: "post",
|
|
90613
|
+
schema: external_exports.object({
|
|
90614
|
+
sandboxId: external_exports.string(),
|
|
90615
|
+
gitUrl: external_exports.string()
|
|
90616
|
+
})
|
|
90617
|
+
});
|
|
90618
|
+
}
|
|
90619
|
+
async function startPreviewSandboxServer({ sandboxId, configPath }) {
|
|
90620
|
+
return await requestService.request({
|
|
90621
|
+
url: "publish-deploy/preview-sandbox/start-server",
|
|
90622
|
+
method: "post",
|
|
90623
|
+
data: { sandboxId, configPath },
|
|
90624
|
+
schema: external_exports.object({
|
|
90625
|
+
previewUrl: external_exports.string()
|
|
90626
|
+
})
|
|
90627
|
+
});
|
|
90628
|
+
}
|
|
90629
|
+
async function stopPreviewSandbox({ sandboxId, keepalive }) {
|
|
90630
|
+
return await requestService.request({
|
|
90631
|
+
url: "publish-deploy/preview-sandbox/stop",
|
|
90632
|
+
method: "post",
|
|
90633
|
+
data: { sandboxId },
|
|
90634
|
+
schema: external_exports.null(),
|
|
90635
|
+
...keepalive && { keepalive: true }
|
|
90636
|
+
});
|
|
90637
|
+
}
|
|
90638
|
+
async function getPreviewSandboxLog({ sandboxId }) {
|
|
90639
|
+
return await requestService.request({
|
|
90640
|
+
url: "publish-deploy/preview-sandbox/log",
|
|
90641
|
+
method: "post",
|
|
90642
|
+
data: { sandboxId },
|
|
90643
|
+
schema: external_exports.object({
|
|
90644
|
+
log: external_exports.string().nullable()
|
|
90645
|
+
})
|
|
90646
|
+
});
|
|
90647
|
+
}
|
|
90907
90648
|
async function checkDNSRecords(domain2) {
|
|
90908
90649
|
return await requestService.request({
|
|
90909
90650
|
url: "core/publish/dns-check",
|
|
@@ -91032,6 +90773,10 @@ function publishApiFactory(requestService) {
|
|
|
91032
90773
|
publishGithub: publishGithub2,
|
|
91033
90774
|
publishTemplate,
|
|
91034
90775
|
publishWysiwyg,
|
|
90776
|
+
createPreviewSandbox,
|
|
90777
|
+
startPreviewSandboxServer,
|
|
90778
|
+
stopPreviewSandbox,
|
|
90779
|
+
getPreviewSandboxLog,
|
|
91035
90780
|
exportWysiwyg,
|
|
91036
90781
|
checkDNSRecords,
|
|
91037
90782
|
unpublish,
|
|
@@ -91440,7 +91185,7 @@ var config2 = {
|
|
|
91440
91185
|
}
|
|
91441
91186
|
},
|
|
91442
91187
|
cdnUrl: process.env.CDN_URL ?? "https://cdn.scalar.com",
|
|
91443
|
-
ssgDocsIsolateVersion: process.env.SSG_DOCS_ISOLATE_VERSION ?? "1.4.
|
|
91188
|
+
ssgDocsIsolateVersion: process.env.SSG_DOCS_ISOLATE_VERSION ?? "1.4.3"
|
|
91444
91189
|
};
|
|
91445
91190
|
|
|
91446
91191
|
// src/domains/auth/login/helpers/personal-token-generate-access.ts
|
|
@@ -92189,7 +91934,7 @@ function buildAsset(namespace, asset, slug) {
|
|
|
92189
91934
|
* @example scalar/apis/scalar-galaxy/1.0.0.json
|
|
92190
91935
|
*/
|
|
92191
91936
|
file: (opts) => {
|
|
92192
|
-
return `${namespace}/${asset}/${slug}/${opts?.build || versionFormat(opts?.version)}${opts?.upgraded ? "_upgraded" : ""}.${filetypeFormat(opts?.type)}`;
|
|
91937
|
+
return `${namespace}/${asset}/${slug}/${opts?.build || versionFormat(opts?.version)}${opts?.upgraded ? "_upgraded" : ""}${opts?.variant === "processed" ? "_processed" : ""}.${filetypeFormat(opts?.type)}`;
|
|
92193
91938
|
},
|
|
92194
91939
|
/**
|
|
92195
91940
|
* Get registry GCS folder storage path
|
|
@@ -92209,7 +91954,11 @@ function buildAsset(namespace, asset, slug) {
|
|
|
92209
91954
|
* @example @scalar/apis/scalar-galaxy/1.0.0?format=preview
|
|
92210
91955
|
*/
|
|
92211
91956
|
url: (opts) => {
|
|
92212
|
-
|
|
91957
|
+
const query = [
|
|
91958
|
+
opts?.format ? `format=${registryFormat(opts.format)}` : "",
|
|
91959
|
+
opts?.variant === "processed" ? "variant=processed" : ""
|
|
91960
|
+
].filter(Boolean).join("&");
|
|
91961
|
+
return `@${namespace}/${asset}/${slug}@${versionFormat(opts?.version)}${query ? `?${query}` : ""}`;
|
|
92213
91962
|
}
|
|
92214
91963
|
};
|
|
92215
91964
|
}
|
|
@@ -94423,747 +94172,6 @@ var internalLinkNavigationEntrySchema = linkNavigationEntrySchema.extend({
|
|
|
94423
94172
|
uid: nanoidSchema
|
|
94424
94173
|
});
|
|
94425
94174
|
|
|
94426
|
-
// ../../node_modules/.pnpm/@scalar+types@0.9.6/node_modules/@scalar/types/dist/api-reference/api-client-plugin.js
|
|
94427
|
-
var sectionViewSchema = external_exports.object({
|
|
94428
|
-
title: external_exports.string().optional(),
|
|
94429
|
-
// Since this is meant to be a Vue component, we'll use unknown
|
|
94430
|
-
component: external_exports.unknown(),
|
|
94431
|
-
props: external_exports.record(external_exports.string(), external_exports.any()).optional()
|
|
94432
|
-
});
|
|
94433
|
-
var viewsSchema = external_exports.object({
|
|
94434
|
-
"request.section": external_exports.array(sectionViewSchema).optional(),
|
|
94435
|
-
"response.section": external_exports.array(sectionViewSchema).optional()
|
|
94436
|
-
});
|
|
94437
|
-
var hooksSchema = external_exports.object({
|
|
94438
|
-
onBeforeRequest: external_exports.function({
|
|
94439
|
-
input: [external_exports.object({ request: external_exports.any() })]
|
|
94440
|
-
// Why no output? https://github.com/scalar/scalar/pull/7047
|
|
94441
|
-
// output: z.union([z.void(), z.promise(z.void())]),
|
|
94442
|
-
}).optional(),
|
|
94443
|
-
onResponseReceived: external_exports.function({
|
|
94444
|
-
input: [external_exports.object({ response: external_exports.instanceof(Response), operation: external_exports.record(external_exports.string(), external_exports.any()) })]
|
|
94445
|
-
// Why no output? https://github.com/scalar/scalar/pull/7047
|
|
94446
|
-
// output: z.union([z.void(), z.promise(z.void())]),
|
|
94447
|
-
}).optional()
|
|
94448
|
-
});
|
|
94449
|
-
var apiClientPluginSchema = external_exports.function({
|
|
94450
|
-
input: [],
|
|
94451
|
-
output: external_exports.object({
|
|
94452
|
-
name: external_exports.string(),
|
|
94453
|
-
views: viewsSchema.optional(),
|
|
94454
|
-
hooks: hooksSchema.optional()
|
|
94455
|
-
})
|
|
94456
|
-
});
|
|
94457
|
-
|
|
94458
|
-
// ../../node_modules/.pnpm/@scalar+types@0.9.6/node_modules/@scalar/types/dist/api-reference/base-configuration.js
|
|
94459
|
-
var externalUrlsSchema = zod_default.object({
|
|
94460
|
-
dashboardUrl: zod_default.string().prefault("https://dashboard.scalar.com"),
|
|
94461
|
-
registryUrl: zod_default.string().prefault("https://registry.scalar.com"),
|
|
94462
|
-
proxyUrl: zod_default.string().prefault("https://proxy.scalar.com"),
|
|
94463
|
-
apiBaseUrl: zod_default.string().prefault("https://api.scalar.com")
|
|
94464
|
-
});
|
|
94465
|
-
var OLD_PROXY_URL = "https://api.scalar.com/request-proxy";
|
|
94466
|
-
var NEW_PROXY_URL = "https://proxy.scalar.com";
|
|
94467
|
-
var baseConfigurationSchema = zod_default.object({
|
|
94468
|
-
/**
|
|
94469
|
-
* The title of the OpenAPI document.
|
|
94470
|
-
*
|
|
94471
|
-
* @example 'Scalar Galaxy'
|
|
94472
|
-
*/
|
|
94473
|
-
title: zod_default.string().optional(),
|
|
94474
|
-
/**
|
|
94475
|
-
* The slug of the OpenAPI document used in the URL.
|
|
94476
|
-
*
|
|
94477
|
-
* If none is passed, the title will be used.
|
|
94478
|
-
*
|
|
94479
|
-
* If no title is used, it'll just use the index.
|
|
94480
|
-
*
|
|
94481
|
-
* @example 'scalar-galaxy'
|
|
94482
|
-
*/
|
|
94483
|
-
slug: zod_default.string().optional(),
|
|
94484
|
-
/** Prefill authentication */
|
|
94485
|
-
authentication: zod_default.any().optional(),
|
|
94486
|
-
// Temp until we bring in the new auth
|
|
94487
|
-
/** Base URL for the API server */
|
|
94488
|
-
baseServerURL: zod_default.string().optional(),
|
|
94489
|
-
/**
|
|
94490
|
-
* Whether to hide the client button
|
|
94491
|
-
* @default false
|
|
94492
|
-
*/
|
|
94493
|
-
hideClientButton: zod_default.boolean().optional().default(false).catch(false),
|
|
94494
|
-
/** URL to a request proxy for the API client */
|
|
94495
|
-
proxyUrl: zod_default.string().optional(),
|
|
94496
|
-
/**
|
|
94497
|
-
* Default OAuth 2.0 redirect URI used to prefill auth flows in the API client.
|
|
94498
|
-
*
|
|
94499
|
-
* This is especially useful in desktop wrappers (for example Electron),
|
|
94500
|
-
* where `window.location` can be a `file://` URL that OAuth providers reject.
|
|
94501
|
-
*/
|
|
94502
|
-
oauth2RedirectUri: zod_default.string().optional(),
|
|
94503
|
-
/** Key used with CTRL/CMD to open the search modal (defaults to 'k' e.g. CMD+k) */
|
|
94504
|
-
searchHotKey: zod_default.enum([
|
|
94505
|
-
"a",
|
|
94506
|
-
"b",
|
|
94507
|
-
"c",
|
|
94508
|
-
"d",
|
|
94509
|
-
"e",
|
|
94510
|
-
"f",
|
|
94511
|
-
"g",
|
|
94512
|
-
"h",
|
|
94513
|
-
"i",
|
|
94514
|
-
"j",
|
|
94515
|
-
"k",
|
|
94516
|
-
"l",
|
|
94517
|
-
"m",
|
|
94518
|
-
"n",
|
|
94519
|
-
"o",
|
|
94520
|
-
"p",
|
|
94521
|
-
"q",
|
|
94522
|
-
"r",
|
|
94523
|
-
"s",
|
|
94524
|
-
"t",
|
|
94525
|
-
"u",
|
|
94526
|
-
"v",
|
|
94527
|
-
"w",
|
|
94528
|
-
"x",
|
|
94529
|
-
"y",
|
|
94530
|
-
"z"
|
|
94531
|
-
]).optional(),
|
|
94532
|
-
/** List of OpenAPI server objects */
|
|
94533
|
-
servers: zod_default.array(zod_default.any()).optional(),
|
|
94534
|
-
// Using any for OpenAPIV3_1.ServerObject
|
|
94535
|
-
/**
|
|
94536
|
-
* Whether to show the sidebar
|
|
94537
|
-
* @default true
|
|
94538
|
-
*/
|
|
94539
|
-
showSidebar: zod_default.boolean().optional().default(true).catch(true),
|
|
94540
|
-
/**
|
|
94541
|
-
* Whether and when to show the developer tools.
|
|
94542
|
-
*
|
|
94543
|
-
* @default 'localhost' to only show the toolbar on localhost or similar hosts
|
|
94544
|
-
*/
|
|
94545
|
-
showDeveloperTools: zod_default.enum(["always", "localhost", "never"]).optional().default("localhost").catch("localhost"),
|
|
94546
|
-
/**
|
|
94547
|
-
* Sets the visibility of the developer tools
|
|
94548
|
-
* @default 'localhost' to only show the toolbar on localhost or similar hosts
|
|
94549
|
-
* @deprecated Use showDeveloperTools instead
|
|
94550
|
-
*/
|
|
94551
|
-
showToolbar: zod_default.enum(["always", "localhost", "never"]).optional().default("localhost").catch("localhost"),
|
|
94552
|
-
/**
|
|
94553
|
-
* Whether to use the operation summary or the operation path for the sidebar and search
|
|
94554
|
-
* @default 'summary'
|
|
94555
|
-
*/
|
|
94556
|
-
operationTitleSource: zod_default.enum(["summary", "path"]).optional().default("summary").catch("summary"),
|
|
94557
|
-
/** A string to use one of the color presets */
|
|
94558
|
-
theme: zod_default.enum([
|
|
94559
|
-
"alternate",
|
|
94560
|
-
"default",
|
|
94561
|
-
"moon",
|
|
94562
|
-
"purple",
|
|
94563
|
-
"solarized",
|
|
94564
|
-
"bluePlanet",
|
|
94565
|
-
"deepSpace",
|
|
94566
|
-
"saturn",
|
|
94567
|
-
"kepler",
|
|
94568
|
-
"elysiajs",
|
|
94569
|
-
"fastify",
|
|
94570
|
-
"mars",
|
|
94571
|
-
"laserwave",
|
|
94572
|
-
"none"
|
|
94573
|
-
]).optional().default("default").catch("default"),
|
|
94574
|
-
/** Integration type identifier */
|
|
94575
|
-
_integration: zod_default.enum([
|
|
94576
|
-
"adonisjs",
|
|
94577
|
-
"astro",
|
|
94578
|
-
"docusaurus",
|
|
94579
|
-
"dotnet",
|
|
94580
|
-
"elysiajs",
|
|
94581
|
-
"express",
|
|
94582
|
-
"fastapi",
|
|
94583
|
-
"fastify",
|
|
94584
|
-
"go",
|
|
94585
|
-
"hono",
|
|
94586
|
-
"html",
|
|
94587
|
-
"laravel",
|
|
94588
|
-
"litestar",
|
|
94589
|
-
"nestjs",
|
|
94590
|
-
"nextjs",
|
|
94591
|
-
"nitro",
|
|
94592
|
-
"nuxt",
|
|
94593
|
-
"platformatic",
|
|
94594
|
-
"react",
|
|
94595
|
-
"rust",
|
|
94596
|
-
"svelte",
|
|
94597
|
-
"vue"
|
|
94598
|
-
]).nullable().optional(),
|
|
94599
|
-
/** onRequestSent is fired when a request is sent */
|
|
94600
|
-
onRequestSent: zod_default.function({
|
|
94601
|
-
input: [zod_default.string()],
|
|
94602
|
-
output: zod_default.void()
|
|
94603
|
-
}).optional(),
|
|
94604
|
-
/** Whether to persist auth to local storage */
|
|
94605
|
-
persistAuth: zod_default.boolean().optional().default(false).catch(false),
|
|
94606
|
-
/** Plugins for the API client */
|
|
94607
|
-
plugins: zod_default.array(apiClientPluginSchema).optional(),
|
|
94608
|
-
/** Enables / disables telemetry */
|
|
94609
|
-
telemetry: zod_default.boolean().optional().default(true),
|
|
94610
|
-
/** A bunch of external URLs to Scalar's services. */
|
|
94611
|
-
externalUrls: externalUrlsSchema.prefault({})
|
|
94612
|
-
});
|
|
94613
|
-
|
|
94614
|
-
// ../../node_modules/.pnpm/@scalar+types@0.9.6/node_modules/@scalar/types/dist/api-reference/source-configuration.js
|
|
94615
|
-
var sourceConfigurationSchema = zod_default.object({
|
|
94616
|
-
default: zod_default.boolean().default(false).optional().catch(false),
|
|
94617
|
-
/**
|
|
94618
|
-
* URL to an OpenAPI/Swagger document
|
|
94619
|
-
* @example
|
|
94620
|
-
* ```ts
|
|
94621
|
-
* const oldConfiguration = {
|
|
94622
|
-
* spec: {
|
|
94623
|
-
* url: 'https://example.com/openapi.json',
|
|
94624
|
-
* },
|
|
94625
|
-
* }
|
|
94626
|
-
*
|
|
94627
|
-
* const newConfiguration = {
|
|
94628
|
-
* url: 'https://example.com/openapi.json',
|
|
94629
|
-
* }
|
|
94630
|
-
* ```
|
|
94631
|
-
**/
|
|
94632
|
-
url: zod_default.string().optional(),
|
|
94633
|
-
/**
|
|
94634
|
-
* Directly embed the OpenAPI document.
|
|
94635
|
-
* Can be a string, object, function returning an object, or null.
|
|
94636
|
-
*
|
|
94637
|
-
* @remarks It's recommended to pass a URL instead of content.
|
|
94638
|
-
* @example
|
|
94639
|
-
* ```ts
|
|
94640
|
-
* const oldConfiguration = {
|
|
94641
|
-
* spec: {
|
|
94642
|
-
* content: '…',
|
|
94643
|
-
* },
|
|
94644
|
-
* }
|
|
94645
|
-
*
|
|
94646
|
-
* const newConfiguration = {
|
|
94647
|
-
* content: '…',
|
|
94648
|
-
* }
|
|
94649
|
-
* ```
|
|
94650
|
-
**/
|
|
94651
|
-
content: zod_default.union([
|
|
94652
|
-
zod_default.string(),
|
|
94653
|
-
zod_default.null(),
|
|
94654
|
-
zod_default.record(zod_default.string(), zod_default.any()),
|
|
94655
|
-
zod_default.function({
|
|
94656
|
-
input: [],
|
|
94657
|
-
output: zod_default.record(zod_default.string(), zod_default.any())
|
|
94658
|
-
})
|
|
94659
|
-
]).optional(),
|
|
94660
|
-
/**
|
|
94661
|
-
* The title of the OpenAPI document.
|
|
94662
|
-
*
|
|
94663
|
-
* @example 'Scalar Galaxy'
|
|
94664
|
-
*
|
|
94665
|
-
* @deprecated Please move `title` to the top level and remove the `spec` prefix.
|
|
94666
|
-
*/
|
|
94667
|
-
title: zod_default.string().optional(),
|
|
94668
|
-
/**
|
|
94669
|
-
* The slug of the OpenAPI document used in the URL.
|
|
94670
|
-
*
|
|
94671
|
-
* If none is passed, the title will be used.
|
|
94672
|
-
*
|
|
94673
|
-
* If no title is used, it'll just use the index.
|
|
94674
|
-
*
|
|
94675
|
-
* @example 'scalar-galaxy'
|
|
94676
|
-
*
|
|
94677
|
-
* @deprecated Please move `slug` to the top level and remove the `spec` prefix.
|
|
94678
|
-
*/
|
|
94679
|
-
slug: zod_default.string().optional(),
|
|
94680
|
-
/**
|
|
94681
|
-
* The OpenAPI/Swagger document to render
|
|
94682
|
-
*
|
|
94683
|
-
* @deprecated Use `url` and `content` on the top level instead.
|
|
94684
|
-
**/
|
|
94685
|
-
spec: zod_default.object({
|
|
94686
|
-
url: zod_default.string().optional(),
|
|
94687
|
-
content: zod_default.union([
|
|
94688
|
-
zod_default.string(),
|
|
94689
|
-
zod_default.null(),
|
|
94690
|
-
zod_default.record(zod_default.string(), zod_default.any()),
|
|
94691
|
-
zod_default.function({
|
|
94692
|
-
input: [],
|
|
94693
|
-
output: zod_default.record(zod_default.string(), zod_default.any())
|
|
94694
|
-
})
|
|
94695
|
-
]).optional()
|
|
94696
|
-
}).optional(),
|
|
94697
|
-
/**
|
|
94698
|
-
* Agent Scalar configuration
|
|
94699
|
-
**/
|
|
94700
|
-
agent: zod_default.object({
|
|
94701
|
-
key: zod_default.string().optional(),
|
|
94702
|
-
disabled: zod_default.boolean().optional(),
|
|
94703
|
-
/**
|
|
94704
|
-
* When true, hide the control to add more APIs in the agent chat.
|
|
94705
|
-
* Only preloaded/registry documents are shown; the public API list is not offered.
|
|
94706
|
-
*/
|
|
94707
|
-
hideAddApi: zod_default.boolean().optional()
|
|
94708
|
-
}).optional()
|
|
94709
|
-
});
|
|
94710
|
-
|
|
94711
|
-
// ../../node_modules/.pnpm/@scalar+types@0.9.6/node_modules/@scalar/types/dist/api-reference/api-client-configuration.js
|
|
94712
|
-
var apiClientConfigurationSchema = baseConfigurationSchema.extend(sourceConfigurationSchema.shape);
|
|
94713
|
-
|
|
94714
|
-
// ../../node_modules/.pnpm/@scalar+types@0.9.6/node_modules/@scalar/types/dist/api-reference/api-reference-plugin.js
|
|
94715
|
-
var openApiExtensionSchema = external_exports.object({
|
|
94716
|
-
/**
|
|
94717
|
-
* Name of specification extension property. Has to start with `x-`.
|
|
94718
|
-
*
|
|
94719
|
-
* @example
|
|
94720
|
-
* ```yaml
|
|
94721
|
-
* x-custom-extension: foobar
|
|
94722
|
-
* ```
|
|
94723
|
-
*/
|
|
94724
|
-
name: external_exports.string().regex(/^x-/),
|
|
94725
|
-
/**
|
|
94726
|
-
* Vue component to render the specification extension
|
|
94727
|
-
*/
|
|
94728
|
-
component: external_exports.unknown(),
|
|
94729
|
-
/**
|
|
94730
|
-
* Custom renderer to render the specification extension
|
|
94731
|
-
*/
|
|
94732
|
-
renderer: external_exports.unknown().optional()
|
|
94733
|
-
});
|
|
94734
|
-
var viewComponentSchema = external_exports.object({
|
|
94735
|
-
/**
|
|
94736
|
-
* Vue component to render in the view
|
|
94737
|
-
*/
|
|
94738
|
-
component: external_exports.unknown(),
|
|
94739
|
-
/**
|
|
94740
|
-
* Custom renderer to render the view component (e.g., ReactRenderer)
|
|
94741
|
-
*/
|
|
94742
|
-
renderer: external_exports.unknown().optional(),
|
|
94743
|
-
/**
|
|
94744
|
-
* Additional props to pass to the component
|
|
94745
|
-
*/
|
|
94746
|
-
props: external_exports.record(external_exports.string(), external_exports.any()).optional()
|
|
94747
|
-
});
|
|
94748
|
-
var viewsSchema2 = external_exports.object({
|
|
94749
|
-
/**
|
|
94750
|
-
* Renders after the Models section
|
|
94751
|
-
*/
|
|
94752
|
-
"content.end": external_exports.array(viewComponentSchema).optional()
|
|
94753
|
-
});
|
|
94754
|
-
var lifecycleHooksSchema = external_exports.object({
|
|
94755
|
-
/** Called when the API Reference is initialized */
|
|
94756
|
-
onInit: external_exports.function({
|
|
94757
|
-
input: [external_exports.object({ config: baseConfigurationSchema.partial() })]
|
|
94758
|
-
}).optional(),
|
|
94759
|
-
/** Called when the API Reference configuration changes */
|
|
94760
|
-
onConfigChange: external_exports.function({
|
|
94761
|
-
input: [external_exports.object({ config: baseConfigurationSchema.partial() })]
|
|
94762
|
-
}).optional(),
|
|
94763
|
-
/** Called when the API Reference is destroyed */
|
|
94764
|
-
onDestroy: external_exports.function({ input: [] }).optional()
|
|
94765
|
-
});
|
|
94766
|
-
var apiReferencePluginSchema = external_exports.function({
|
|
94767
|
-
input: [],
|
|
94768
|
-
output: external_exports.object({
|
|
94769
|
-
name: external_exports.string(),
|
|
94770
|
-
extensions: external_exports.array(openApiExtensionSchema),
|
|
94771
|
-
/**
|
|
94772
|
-
* Components to render at specific views in the API Reference
|
|
94773
|
-
*/
|
|
94774
|
-
views: viewsSchema2.optional(),
|
|
94775
|
-
/**
|
|
94776
|
-
* Lifecycle hooks for the plugin
|
|
94777
|
-
*/
|
|
94778
|
-
hooks: lifecycleHooksSchema.optional(),
|
|
94779
|
-
/**
|
|
94780
|
-
* Client plugins to pass to the embedded API client.
|
|
94781
|
-
* Use this to extend the API client from an API reference plugin.
|
|
94782
|
-
*/
|
|
94783
|
-
apiClientPlugins: external_exports.array(external_exports.any()).optional()
|
|
94784
|
-
})
|
|
94785
|
-
});
|
|
94786
|
-
|
|
94787
|
-
// ../../node_modules/.pnpm/@scalar+types@0.9.6/node_modules/@scalar/types/dist/api-reference/api-reference-configuration.js
|
|
94788
|
-
var fetchLikeSchema = external_exports.custom();
|
|
94789
|
-
var apiReferenceConfigurationSchema = baseConfigurationSchema.extend({
|
|
94790
|
-
/**
|
|
94791
|
-
* The layout to use for the references
|
|
94792
|
-
* @default 'modern'
|
|
94793
|
-
*/
|
|
94794
|
-
layout: external_exports.enum(["modern", "classic"]).optional().default("modern").catch("modern"),
|
|
94795
|
-
/**
|
|
94796
|
-
* URL to a request proxy for the API client
|
|
94797
|
-
* @deprecated Use proxyUrl instead
|
|
94798
|
-
*/
|
|
94799
|
-
proxy: external_exports.string().optional(),
|
|
94800
|
-
/**
|
|
94801
|
-
* Custom fetch function for custom logic
|
|
94802
|
-
*
|
|
94803
|
-
* Can be used to add custom headers, handle auth, etc.
|
|
94804
|
-
*/
|
|
94805
|
-
fetch: fetchLikeSchema.optional(),
|
|
94806
|
-
/**
|
|
94807
|
-
* Plugins for the API reference
|
|
94808
|
-
*/
|
|
94809
|
-
plugins: external_exports.array(apiReferencePluginSchema).optional(),
|
|
94810
|
-
/**
|
|
94811
|
-
* Allows the user to inject an editor for the spec
|
|
94812
|
-
* @default false
|
|
94813
|
-
*/
|
|
94814
|
-
isEditable: external_exports.boolean().optional().default(false).catch(false),
|
|
94815
|
-
/**
|
|
94816
|
-
* Controls whether the references show a loading state in the intro
|
|
94817
|
-
* @default false
|
|
94818
|
-
*/
|
|
94819
|
-
isLoading: external_exports.boolean().optional().default(false).catch(false),
|
|
94820
|
-
/**
|
|
94821
|
-
* Whether to show models in the sidebar, search, and content.
|
|
94822
|
-
* @default false
|
|
94823
|
-
*/
|
|
94824
|
-
hideModels: external_exports.boolean().optional().default(false).catch(false),
|
|
94825
|
-
/**
|
|
94826
|
-
* Sets the file type of the document to download, set to `none` to hide the download button
|
|
94827
|
-
* @default 'both'
|
|
94828
|
-
*/
|
|
94829
|
-
documentDownloadType: external_exports.enum(["yaml", "json", "both", "direct", "none"]).optional().default("both").catch("both"),
|
|
94830
|
-
/**
|
|
94831
|
-
* Whether to show the "Download OpenAPI Document" button
|
|
94832
|
-
* @default false
|
|
94833
|
-
* @deprecated Use `documentDownloadType: 'none'` instead
|
|
94834
|
-
*/
|
|
94835
|
-
hideDownloadButton: external_exports.boolean().optional(),
|
|
94836
|
-
/**
|
|
94837
|
-
* Whether to show the "Test Request" button
|
|
94838
|
-
* @default false
|
|
94839
|
-
*/
|
|
94840
|
-
hideTestRequestButton: external_exports.boolean().optional().default(false).catch(false),
|
|
94841
|
-
/**
|
|
94842
|
-
* Whether to show the sidebar search bar
|
|
94843
|
-
* @default false
|
|
94844
|
-
*/
|
|
94845
|
-
hideSearch: external_exports.boolean().optional().default(false).catch(false),
|
|
94846
|
-
/**
|
|
94847
|
-
* Whether to show the operationId
|
|
94848
|
-
*
|
|
94849
|
-
* @default false
|
|
94850
|
-
*/
|
|
94851
|
-
showOperationId: external_exports.boolean().optional().default(false).catch(false),
|
|
94852
|
-
/** Whether dark mode is on or off initially (light mode) */
|
|
94853
|
-
darkMode: external_exports.boolean().optional(),
|
|
94854
|
-
/** forceDarkModeState makes it always this state no matter what */
|
|
94855
|
-
forceDarkModeState: external_exports.enum(["dark", "light"]).optional(),
|
|
94856
|
-
/**
|
|
94857
|
-
* Whether to show the dark mode toggle
|
|
94858
|
-
* @default false
|
|
94859
|
-
*/
|
|
94860
|
-
hideDarkModeToggle: external_exports.boolean().optional().default(false).catch(false),
|
|
94861
|
-
/**
|
|
94862
|
-
* If used, passed data will be added to the HTML header
|
|
94863
|
-
* @see https://unhead.unjs.io/usage/composables/use-seo-meta
|
|
94864
|
-
*/
|
|
94865
|
-
metaData: external_exports.any().optional(),
|
|
94866
|
-
// Using any for UseSeoMetaInput since it's an external type
|
|
94867
|
-
/**
|
|
94868
|
-
* Path to a favicon image
|
|
94869
|
-
* @default undefined
|
|
94870
|
-
* @example '/favicon.svg'
|
|
94871
|
-
*/
|
|
94872
|
-
favicon: external_exports.string().optional(),
|
|
94873
|
-
/**
|
|
94874
|
-
* List of httpsnippet clients to hide from the clients menu
|
|
94875
|
-
* By default hides Unirest, pass `[]` to show all clients
|
|
94876
|
-
*/
|
|
94877
|
-
hiddenClients: external_exports.union([external_exports.record(external_exports.string(), external_exports.union([external_exports.boolean(), external_exports.array(external_exports.string())])), external_exports.array(external_exports.string()), external_exports.literal(true)]).optional(),
|
|
94878
|
-
/** Determine the HTTP client that's selected by default */
|
|
94879
|
-
defaultHttpClient: external_exports.object({
|
|
94880
|
-
targetKey: external_exports.custom(),
|
|
94881
|
-
clientKey: external_exports.string()
|
|
94882
|
-
}).optional(),
|
|
94883
|
-
/** Custom CSS to be added to the page */
|
|
94884
|
-
customCss: external_exports.string().optional(),
|
|
94885
|
-
/** onSpecUpdate is fired on spec/swagger content change */
|
|
94886
|
-
onSpecUpdate: external_exports.function({
|
|
94887
|
-
input: [external_exports.string()],
|
|
94888
|
-
output: external_exports.void()
|
|
94889
|
-
}).optional(),
|
|
94890
|
-
/** onServerChange is fired on selected server change */
|
|
94891
|
-
onServerChange: external_exports.function({
|
|
94892
|
-
input: [external_exports.string()],
|
|
94893
|
-
output: external_exports.void()
|
|
94894
|
-
}).optional(),
|
|
94895
|
-
/** onDocumentSelect is fired when the config is selected */
|
|
94896
|
-
onDocumentSelect: external_exports.function({
|
|
94897
|
-
input: []
|
|
94898
|
-
// Why no output? https://github.com/scalar/scalar/pull/7047
|
|
94899
|
-
// output: z.union([z.void(), z.promise(z.void())]),
|
|
94900
|
-
}).optional(),
|
|
94901
|
-
/** Callback fired when the reference is fully loaded */
|
|
94902
|
-
onLoaded: external_exports.function().optional(),
|
|
94903
|
-
/** Fired before the outbound request is built; callback receives a mutable request builder (RequestFactory). Experimental API. */
|
|
94904
|
-
onBeforeRequest: external_exports.function({
|
|
94905
|
-
input: [
|
|
94906
|
-
external_exports.object({
|
|
94907
|
-
request: external_exports.instanceof(Request),
|
|
94908
|
-
requestBuilder: external_exports.unknown(),
|
|
94909
|
-
envVariables: external_exports.record(external_exports.string(), external_exports.string())
|
|
94910
|
-
})
|
|
94911
|
-
]
|
|
94912
|
-
// Why no output? https://github.com/scalar/scalar/pull/7047
|
|
94913
|
-
// output: z.union([z.void(), z.promise(z.void())]),
|
|
94914
|
-
}).optional(),
|
|
94915
|
-
/**
|
|
94916
|
-
* onShowMore is fired when the user clicks the "Show more" button on the references
|
|
94917
|
-
* @param tagId - The ID of the tag that was clicked
|
|
94918
|
-
*/
|
|
94919
|
-
onShowMore: external_exports.function({
|
|
94920
|
-
input: [external_exports.string()]
|
|
94921
|
-
// Why no output? https://github.com/scalar/scalar/pull/7047
|
|
94922
|
-
// output: z.union([z.void(), z.promise(z.void())]),
|
|
94923
|
-
}).optional(),
|
|
94924
|
-
/**
|
|
94925
|
-
* onSidebarClick is fired when the user clicks on a sidebar item
|
|
94926
|
-
* @param href - The href of the sidebar item that was clicked
|
|
94927
|
-
*/
|
|
94928
|
-
onSidebarClick: external_exports.function({
|
|
94929
|
-
input: [external_exports.string()]
|
|
94930
|
-
// Why no output? https://github.com/scalar/scalar/pull/7047
|
|
94931
|
-
// output: z.union([z.void(), z.promise(z.void())]),
|
|
94932
|
-
}).optional(),
|
|
94933
|
-
/**
|
|
94934
|
-
* Route using paths instead of hashes, your server MUST support this
|
|
94935
|
-
* @example '/standalone-api-reference/:custom(.*)?'
|
|
94936
|
-
* @experimental
|
|
94937
|
-
* @default undefined
|
|
94938
|
-
*/
|
|
94939
|
-
pathRouting: external_exports.object({
|
|
94940
|
-
basePath: external_exports.string()
|
|
94941
|
-
}).optional(),
|
|
94942
|
-
/**
|
|
94943
|
-
* MCP (Model Context Protocol) configuration
|
|
94944
|
-
* Optional. When provided, enables MCP integration with the given name and url.
|
|
94945
|
-
*/
|
|
94946
|
-
mcp: external_exports.object({
|
|
94947
|
-
/** Display name for the MCP server */
|
|
94948
|
-
name: external_exports.string().optional(),
|
|
94949
|
-
/** URL of the MCP server */
|
|
94950
|
-
url: external_exports.string().optional(),
|
|
94951
|
-
/** When true, disables the MCP integration */
|
|
94952
|
-
disabled: external_exports.boolean().optional()
|
|
94953
|
-
}).optional(),
|
|
94954
|
-
/**
|
|
94955
|
-
* Customize the heading portion of the hash
|
|
94956
|
-
* @param heading - The heading object
|
|
94957
|
-
* @returns A string ID used to generate the URL hash
|
|
94958
|
-
* @default (heading) => `#description/${heading.slug}`
|
|
94959
|
-
*/
|
|
94960
|
-
generateHeadingSlug: external_exports.function({
|
|
94961
|
-
input: [external_exports.object({ slug: external_exports.string().default("headingSlug") })],
|
|
94962
|
-
output: external_exports.string()
|
|
94963
|
-
}).optional(),
|
|
94964
|
-
/**
|
|
94965
|
-
* Customize the model portion of the hash
|
|
94966
|
-
* @param model - The model object with a name property
|
|
94967
|
-
* @returns A string ID used to generate the URL hash
|
|
94968
|
-
* @default (model) => slug(model.name)
|
|
94969
|
-
*/
|
|
94970
|
-
generateModelSlug: external_exports.function({
|
|
94971
|
-
input: [external_exports.object({ name: external_exports.string().default("modelName") })],
|
|
94972
|
-
output: external_exports.string()
|
|
94973
|
-
}).optional(),
|
|
94974
|
-
/**
|
|
94975
|
-
* Customize the tag portion of the hash
|
|
94976
|
-
* @param tag - The tag object
|
|
94977
|
-
* @returns A string ID used to generate the URL hash
|
|
94978
|
-
* @default (tag) => slug(tag.name)
|
|
94979
|
-
*/
|
|
94980
|
-
generateTagSlug: external_exports.function({
|
|
94981
|
-
input: [external_exports.object({ name: external_exports.string().default("tagName") })],
|
|
94982
|
-
output: external_exports.string()
|
|
94983
|
-
}).optional(),
|
|
94984
|
-
/**
|
|
94985
|
-
* Customize the operation portion of the hash
|
|
94986
|
-
* @param operation - The operation object
|
|
94987
|
-
* @returns A string ID used to generate the URL hash
|
|
94988
|
-
* @default (operation) => `${operation.method}${operation.path}`
|
|
94989
|
-
*/
|
|
94990
|
-
generateOperationSlug: external_exports.function({
|
|
94991
|
-
input: [
|
|
94992
|
-
external_exports.object({
|
|
94993
|
-
path: external_exports.string(),
|
|
94994
|
-
operationId: external_exports.string().optional(),
|
|
94995
|
-
method: external_exports.string(),
|
|
94996
|
-
summary: external_exports.string().optional()
|
|
94997
|
-
})
|
|
94998
|
-
],
|
|
94999
|
-
output: external_exports.string()
|
|
95000
|
-
}).optional(),
|
|
95001
|
-
/**
|
|
95002
|
-
* Customize the webhook portion of the hash
|
|
95003
|
-
* @param webhook - The webhook object
|
|
95004
|
-
* @returns A string ID used to generate the URL hash
|
|
95005
|
-
* @default (webhook) => slug(webhook.name)
|
|
95006
|
-
*/
|
|
95007
|
-
generateWebhookSlug: external_exports.function({
|
|
95008
|
-
input: [
|
|
95009
|
-
external_exports.object({
|
|
95010
|
-
name: external_exports.string(),
|
|
95011
|
-
method: external_exports.string().optional()
|
|
95012
|
-
})
|
|
95013
|
-
],
|
|
95014
|
-
output: external_exports.string()
|
|
95015
|
-
}).optional(),
|
|
95016
|
-
/**
|
|
95017
|
-
* To handle redirects, pass a function that will receive:
|
|
95018
|
-
* - The current path with hash if pathRouting is enabled
|
|
95019
|
-
* - The current hash if hashRouting (default)
|
|
95020
|
-
* And then passes that to history.replaceState
|
|
95021
|
-
*
|
|
95022
|
-
* @example hashRouting (default)
|
|
95023
|
-
* ```ts
|
|
95024
|
-
* redirect: (hash: string) => hash.replace('#v1/old-path', '#v2/new-path')
|
|
95025
|
-
* ```
|
|
95026
|
-
* @example pathRouting
|
|
95027
|
-
* ```ts
|
|
95028
|
-
* redirect: (pathWithHash: string) => {
|
|
95029
|
-
* if (pathWithHash.includes('#')) {
|
|
95030
|
-
* return pathWithHash.replace('/v1/tags/user#operation/get-user', '/v1/tags/user/operation/get-user')
|
|
95031
|
-
* }
|
|
95032
|
-
* return null
|
|
95033
|
-
* }
|
|
95034
|
-
* ```
|
|
95035
|
-
*/
|
|
95036
|
-
redirect: external_exports.function({
|
|
95037
|
-
input: [external_exports.string()],
|
|
95038
|
-
output: external_exports.string().nullable().optional()
|
|
95039
|
-
}).optional(),
|
|
95040
|
-
/**
|
|
95041
|
-
* Whether to include default fonts
|
|
95042
|
-
* @default true
|
|
95043
|
-
*/
|
|
95044
|
-
withDefaultFonts: external_exports.boolean().optional().default(true).catch(true),
|
|
95045
|
-
/**
|
|
95046
|
-
* Whether to expand the first tag in the sidebar when no specific URL target is present
|
|
95047
|
-
* @default true
|
|
95048
|
-
*/
|
|
95049
|
-
defaultOpenFirstTag: external_exports.boolean().optional().default(true).catch(true),
|
|
95050
|
-
/**
|
|
95051
|
-
* Whether to expand all tags by default
|
|
95052
|
-
*
|
|
95053
|
-
* Warning this can cause performance issues on big documents
|
|
95054
|
-
* @default false
|
|
95055
|
-
*/
|
|
95056
|
-
defaultOpenAllTags: external_exports.boolean().optional().default(false).catch(false),
|
|
95057
|
-
/**
|
|
95058
|
-
* Whether to expand all models by default
|
|
95059
|
-
*
|
|
95060
|
-
* Warning this can cause performance issues on big documents
|
|
95061
|
-
* @default false
|
|
95062
|
-
*/
|
|
95063
|
-
expandAllModelSections: external_exports.boolean().optional().default(false).catch(false),
|
|
95064
|
-
/**
|
|
95065
|
-
* Whether to expand all responses by default
|
|
95066
|
-
*
|
|
95067
|
-
* Warning this can cause performance issues on big documents
|
|
95068
|
-
* @default false
|
|
95069
|
-
*/
|
|
95070
|
-
expandAllResponses: external_exports.boolean().optional().default(false).catch(false),
|
|
95071
|
-
/**
|
|
95072
|
-
* Function to sort tags
|
|
95073
|
-
* @default 'alpha' for alphabetical sorting
|
|
95074
|
-
*/
|
|
95075
|
-
tagsSorter: external_exports.union([
|
|
95076
|
-
external_exports.literal("alpha"),
|
|
95077
|
-
external_exports.function({
|
|
95078
|
-
input: [external_exports.any(), external_exports.any()],
|
|
95079
|
-
output: external_exports.number()
|
|
95080
|
-
})
|
|
95081
|
-
]).optional(),
|
|
95082
|
-
/**
|
|
95083
|
-
* Function to sort operations
|
|
95084
|
-
* @default 'alpha' for alphabetical sorting
|
|
95085
|
-
*/
|
|
95086
|
-
operationsSorter: external_exports.union([
|
|
95087
|
-
external_exports.literal("alpha"),
|
|
95088
|
-
external_exports.literal("method"),
|
|
95089
|
-
external_exports.function({
|
|
95090
|
-
input: [external_exports.any(), external_exports.any()],
|
|
95091
|
-
output: external_exports.number()
|
|
95092
|
-
})
|
|
95093
|
-
]).optional(),
|
|
95094
|
-
/**
|
|
95095
|
-
* Order the schema properties by
|
|
95096
|
-
* @default 'alpha' for alphabetical sorting
|
|
95097
|
-
*/
|
|
95098
|
-
orderSchemaPropertiesBy: external_exports.union([external_exports.literal("alpha"), external_exports.literal("preserve")]).optional().default("alpha").catch("alpha"),
|
|
95099
|
-
/**
|
|
95100
|
-
* Sort the schema properties by required ones first
|
|
95101
|
-
* @default true
|
|
95102
|
-
*/
|
|
95103
|
-
orderRequiredPropertiesFirst: external_exports.boolean().optional().default(true).catch(true)
|
|
95104
|
-
});
|
|
95105
|
-
var apiReferenceConfigurationWithSourceSchema = apiReferenceConfigurationSchema.extend(sourceConfigurationSchema.shape).transform((configuration) => {
|
|
95106
|
-
if (configuration.hideDownloadButton) {
|
|
95107
|
-
console.warn(`[DEPRECATED] You're using the deprecated 'hideDownloadButton' attribute. Use 'documentDownloadType: 'none'' instead.`);
|
|
95108
|
-
configuration.documentDownloadType = "none";
|
|
95109
|
-
}
|
|
95110
|
-
if (configuration.spec?.url) {
|
|
95111
|
-
console.warn(`[DEPRECATED] You're using the deprecated 'spec.url' attribute. Remove the spec prefix and move the 'url' attribute to the top level.`);
|
|
95112
|
-
configuration.url = configuration.spec.url;
|
|
95113
|
-
delete configuration.spec;
|
|
95114
|
-
}
|
|
95115
|
-
if (configuration.spec?.content) {
|
|
95116
|
-
console.warn(`[DEPRECATED] You're using the deprecated 'spec.content' attribute. Remove the spec prefix and move the 'content' attribute to the top level.`);
|
|
95117
|
-
configuration.content = configuration.spec.content;
|
|
95118
|
-
delete configuration.spec;
|
|
95119
|
-
}
|
|
95120
|
-
if (configuration.proxy) {
|
|
95121
|
-
console.warn(`[DEPRECATED] You're using the deprecated 'proxy' attribute, rename it to 'proxyUrl' or update the package.`);
|
|
95122
|
-
if (!configuration.proxyUrl) {
|
|
95123
|
-
configuration.proxyUrl = configuration.proxy;
|
|
95124
|
-
}
|
|
95125
|
-
delete configuration.proxy;
|
|
95126
|
-
}
|
|
95127
|
-
if (configuration.proxyUrl === OLD_PROXY_URL) {
|
|
95128
|
-
console.warn(`[DEPRECATED] Warning: configuration.proxyUrl points to our old proxy (${OLD_PROXY_URL}).`);
|
|
95129
|
-
console.warn(`[DEPRECATED] We are overwriting the value and use the new proxy URL (${NEW_PROXY_URL}) instead.`);
|
|
95130
|
-
console.warn(`[DEPRECATED] Action Required: You should manually update your configuration to use the new URL (${NEW_PROXY_URL}). Read more: https://github.com/scalar/scalar`);
|
|
95131
|
-
configuration.proxyUrl = NEW_PROXY_URL;
|
|
95132
|
-
}
|
|
95133
|
-
if (configuration.showToolbar && configuration.showToolbar !== "localhost") {
|
|
95134
|
-
console.warn(`[DEPRECATED] You're using the deprecated 'showToolbar' attribute. Use 'showDeveloperTools' instead.`);
|
|
95135
|
-
configuration.showDeveloperTools = configuration.showToolbar;
|
|
95136
|
-
delete configuration.showToolbar;
|
|
95137
|
-
}
|
|
95138
|
-
return configuration;
|
|
95139
|
-
});
|
|
95140
|
-
|
|
95141
|
-
// ../../node_modules/.pnpm/@scalar+types@0.9.6/node_modules/@scalar/types/dist/api-reference/html-rendering-configuration.js
|
|
95142
|
-
var htmlRenderingConfigurationSchema = external_exports.object({
|
|
95143
|
-
/**
|
|
95144
|
-
* The URL to the Scalar API Reference JS CDN.
|
|
95145
|
-
*
|
|
95146
|
-
* Use this to pin a specific version of the Scalar API Reference.
|
|
95147
|
-
*
|
|
95148
|
-
* @default https://cdn.jsdelivr.net/npm/@scalar/api-reference
|
|
95149
|
-
*
|
|
95150
|
-
* @example https://cdn.jsdelivr.net/npm/@scalar/api-reference@1.25.122
|
|
95151
|
-
*/
|
|
95152
|
-
cdn: external_exports.string().optional().default("https://cdn.jsdelivr.net/npm/@scalar/api-reference"),
|
|
95153
|
-
/**
|
|
95154
|
-
* The title of the page.
|
|
95155
|
-
*/
|
|
95156
|
-
pageTitle: external_exports.string().optional().default("Scalar API Reference")
|
|
95157
|
-
});
|
|
95158
|
-
|
|
95159
|
-
// ../../node_modules/.pnpm/@scalar+types@0.9.6/node_modules/@scalar/types/dist/legacy/reference-config.js
|
|
95160
|
-
var XScalarStability;
|
|
95161
|
-
(function(XScalarStability2) {
|
|
95162
|
-
XScalarStability2["Deprecated"] = "deprecated";
|
|
95163
|
-
XScalarStability2["Experimental"] = "experimental";
|
|
95164
|
-
XScalarStability2["Stable"] = "stable";
|
|
95165
|
-
})(XScalarStability || (XScalarStability = {}));
|
|
95166
|
-
|
|
95167
94175
|
// ../../packages/scalar-config/dist/schema/ruleset.js
|
|
95168
94176
|
var blockPublishOnSchema2 = external_exports.enum(["error", "warning", "info", "hint", "none"]).describe("Severity threshold at or above which ruleset findings block publishing.");
|
|
95169
94177
|
var rulesetConfigSchema = external_exports.object({
|
|
@@ -95176,26 +94184,35 @@ var rulesetConfigSchema = external_exports.object({
|
|
|
95176
94184
|
});
|
|
95177
94185
|
|
|
95178
94186
|
// ../../packages/scalar-config/dist/schema/navigation/openapi.js
|
|
95179
|
-
var
|
|
95180
|
-
|
|
95181
|
-
|
|
95182
|
-
|
|
95183
|
-
|
|
95184
|
-
|
|
95185
|
-
|
|
95186
|
-
|
|
95187
|
-
|
|
95188
|
-
|
|
95189
|
-
|
|
95190
|
-
|
|
95191
|
-
|
|
95192
|
-
|
|
95193
|
-
|
|
95194
|
-
|
|
95195
|
-
|
|
95196
|
-
|
|
95197
|
-
|
|
95198
|
-
|
|
94187
|
+
var httpClientSchema = external_exports.object({
|
|
94188
|
+
targetKey: external_exports.string(),
|
|
94189
|
+
clientKey: external_exports.string()
|
|
94190
|
+
});
|
|
94191
|
+
var hiddenClientsSchema = external_exports.union([
|
|
94192
|
+
external_exports.record(external_exports.string(), external_exports.union([external_exports.boolean(), external_exports.string().array()])),
|
|
94193
|
+
external_exports.string().array(),
|
|
94194
|
+
external_exports.literal(true)
|
|
94195
|
+
]);
|
|
94196
|
+
var scopedApiConfigSchema = external_exports.object({
|
|
94197
|
+
authentication: external_exports.custom().optional(),
|
|
94198
|
+
expandAllResponses: external_exports.boolean().default(false),
|
|
94199
|
+
expandAllModelSections: external_exports.boolean().default(false),
|
|
94200
|
+
defaultOpenAllTags: external_exports.boolean().default(false),
|
|
94201
|
+
defaultHttpClient: httpClientSchema.optional(),
|
|
94202
|
+
hiddenClients: hiddenClientsSchema.optional(),
|
|
94203
|
+
showOperationId: external_exports.boolean().default(false),
|
|
94204
|
+
hideTestRequestButton: external_exports.boolean().default(false),
|
|
94205
|
+
hideDownloadButton: external_exports.boolean().optional(),
|
|
94206
|
+
documentDownloadType: external_exports.enum(["both", "yaml", "json", "direct", "none"]).default("both"),
|
|
94207
|
+
hideModels: external_exports.boolean().default(false),
|
|
94208
|
+
plugins: external_exports.unknown().array().optional(),
|
|
94209
|
+
proxyUrl: external_exports.string().optional(),
|
|
94210
|
+
orderSchemaPropertiesBy: external_exports.enum(["alpha", "preserve"]).default("alpha"),
|
|
94211
|
+
orderRequiredPropertiesFirst: external_exports.boolean().default(true),
|
|
94212
|
+
operationTitleSource: external_exports.enum(["summary", "path"]).default("summary"),
|
|
94213
|
+
servers: external_exports.unknown().array().optional(),
|
|
94214
|
+
hideClientButton: external_exports.boolean().default(false),
|
|
94215
|
+
baseServerURL: external_exports.string().optional()
|
|
95199
94216
|
});
|
|
95200
94217
|
var openapiNavigationEntryBase = external_exports.object({
|
|
95201
94218
|
title: titleSchema.optional(),
|
|
@@ -96760,13 +95777,13 @@ import { cancel, confirm as confirm3, isCancel, text as text6 } from "@clack/pro
|
|
|
96760
95777
|
import as29 from "ansis";
|
|
96761
95778
|
import { Command as Command34 } from "commander";
|
|
96762
95779
|
|
|
96763
|
-
// ../../node_modules/.pnpm/@scalar+galaxy@0.6.
|
|
95780
|
+
// ../../node_modules/.pnpm/@scalar+galaxy@0.6.5/node_modules/@scalar/galaxy/dist/3.1.json
|
|
96764
95781
|
var __default = {
|
|
96765
95782
|
openapi: "3.1.1",
|
|
96766
95783
|
info: {
|
|
96767
95784
|
title: "Scalar Galaxy",
|
|
96768
95785
|
description: "The Scalar Galaxy is an example OpenAPI document to test OpenAPI tools and libraries. It's a fictional universe with fictional planets and fictional data.\n\n## Resources\n\n* https://github.com/scalar/scalar\n* https://github.com/OAI/OpenAPI-Specification\n* https://scalar.com\n\n## Markdown Support\n\nAll descriptions *can* contain ~~tons of text~~ **Markdown**. [If GitHub supports the syntax](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax), chances are we're supporting it, too.\n\n<details>\n <summary>Examples</summary>\n\n **Blockquotes**\n\n > I love OpenAPI. <3\n\n **Tables**\n\n | Feature | Availability |\n | ---------------- | ------------ |\n | Markdown Support | \u2713 |\n\n **Accordion**\n\n ```html\n <details>\n <summary>Using Details Tags</summary>\n <p>HTML Example</p>\n </details>\n ```\n\n **Images**\n\n Yes, there's support for images, too!\n\n \n\n **Alerts**\n\n > [!tip]\n > You can use Markdown alerts in your descriptions.\n\n</details>\n",
|
|
96769
|
-
version: "0.6.
|
|
95786
|
+
version: "0.6.5",
|
|
96770
95787
|
contact: {
|
|
96771
95788
|
name: "Scalar Support",
|
|
96772
95789
|
url: "https://scalar.com",
|
|
@@ -99895,7 +98912,7 @@ import { Command as Command49 } from "commander";
|
|
|
99895
98912
|
|
|
99896
98913
|
// src/helpers/upgrade.ts
|
|
99897
98914
|
import as38 from "ansis";
|
|
99898
|
-
import
|
|
98915
|
+
import semver4 from "semver";
|
|
99899
98916
|
var packageJsonSchema = external_exports.object({
|
|
99900
98917
|
version: external_exports.string()
|
|
99901
98918
|
});
|
|
@@ -99908,7 +98925,7 @@ async function getRemotePackageJson(packageName, version3 = "latest") {
|
|
|
99908
98925
|
}
|
|
99909
98926
|
async function getUpgradeInformation() {
|
|
99910
98927
|
const { version: latestVersion } = await getRemotePackageJson(name);
|
|
99911
|
-
if (
|
|
98928
|
+
if (semver4.gte(version, latestVersion)) {
|
|
99912
98929
|
return {
|
|
99913
98930
|
upgrade: false
|
|
99914
98931
|
};
|
|
@@ -99941,7 +98958,7 @@ async function checkUpgrade() {
|
|
|
99941
98958
|
}
|
|
99942
98959
|
}).catch();
|
|
99943
98960
|
}
|
|
99944
|
-
if (
|
|
98961
|
+
if (semver4.lt(version, lastKnownVersion)) {
|
|
99945
98962
|
emitOutput();
|
|
99946
98963
|
}
|
|
99947
98964
|
}
|