@scalar/cli 2.12.3 → 2.13.1
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 +221 -2
- package/chunks/{action-JXCU2JKC.js → action-27BJMHFD.js} +38 -6
- package/chunks/{action-5BJL72JE.js → action-2BZ3AFBR.js} +10 -7
- package/chunks/{action-RPTLQBMK.js → action-3DBOUHKS.js} +8 -6
- package/chunks/{action-6I2PWENU.js → action-3R3MVTP3.js} +67 -88
- package/chunks/{action-T4MM4OUS.js → action-5HWPNWVU.js} +52 -29
- package/chunks/{action-EWZLVN45.js → action-5JTBIUPZ.js} +47 -27
- package/chunks/{action-4ESHWOAM.js → action-5QDBZTBF.js} +9 -8
- package/chunks/{action-D7L757PX.js → action-7HHTD65O.js} +13 -12
- package/chunks/{action-Y7EBKCUU.js → action-ASBFLTOA.js} +1 -1
- package/chunks/{action-H4GW3KAI.js → action-CXQ3HLVC.js} +15 -15
- package/chunks/{action-EPGS3U3T.js → action-EGF7LXVA.js} +63 -48
- package/chunks/{action-7CUPRYNA.js → action-F5LSDVJA.js} +36 -23
- package/chunks/{action-6A4NM5WS.js → action-FR6UPGZP.js} +9 -8
- package/chunks/{action-KIOYSVKX.js → action-FZZ2VLNA.js} +23 -6
- package/chunks/{action-ZOYQBWGD.js → action-GIKW67JB.js} +13 -13
- package/chunks/{action-ED4TSPRZ.js → action-GLC54N3F.js} +11 -11
- package/chunks/{action-FBOTIFVC.js → action-GRAMP3QD.js} +12 -10
- package/chunks/{action-BYYKW4S6.js → action-IUG6MPST.js} +25 -10
- package/chunks/{action-ZBEOLJJR.js → action-JCBTINNL.js} +9 -6
- package/chunks/{action-VVKMUOKR.js → action-JEI24ZNE.js} +13 -5
- package/chunks/{action-EWDQOX5B.js → action-JFNK5UCV.js} +6 -4
- package/chunks/action-JRPGHJGA.js +48 -0
- package/chunks/{action-Q3DI54OW.js → action-KRXJWRCE.js} +15 -15
- package/chunks/{action-B74PPGKB.js → action-PBJFNJMY.js} +34 -16
- package/chunks/{action-O7ROX6NF.js → action-PDOW5JS2.js} +12 -11
- package/chunks/{action-GMJJMZXY.js → action-RYLO75IN.js} +11 -11
- package/chunks/{action-HAKFAXTQ.js → action-VEXFHEQR.js} +6 -6
- package/chunks/{action-YXRCGKCK.js → action-W3AGGZ42.js} +6 -4
- package/chunks/action-W5VD63XO.js +55 -0
- package/chunks/{action-M5OUEDV2.js → action-WEDLKGDY.js} +4 -4
- package/chunks/{action-FBQAU5LV.js → action-WI6UW2AL.js} +12 -12
- package/chunks/{action-AYKKHH7A.js → action-WQPMJZXL.js} +51 -24
- package/chunks/{action-GJHOZ6Q5.js → action-WY4GOD2Y.js} +10 -8
- package/chunks/{action-I2IV4VLL.js → action-XXIRB2F6.js} +32 -16
- package/chunks/{actions-EXQNVV4T.js → actions-I4HS6ASR.js} +20 -18
- package/chunks/{agent-XAHNA4MB.js → agent-E6PYTXAU.js} +3 -3
- package/chunks/{asyncapi-FNOWXSKB.js → asyncapi-VQ7CCUCY.js} +9 -7
- package/chunks/{build.action-TIKRZPQ5.js → build.action-LIAREWUF.js} +36 -19
- package/chunks/chunk-2XWUFFEZ.js +133 -0
- package/chunks/{chunk-2GKXAGSH.js → chunk-6VAEDMCP.js} +7 -7
- package/chunks/{chunk-EUFK4MVX.js → chunk-6YDIOXF7.js} +2 -2
- package/chunks/{chunk-EBNFCIKS.js → chunk-APX65SRT.js} +2 -1
- package/chunks/{chunk-WKW5W2ZP.js → chunk-DWN6JOF2.js} +1 -1
- package/chunks/{chunk-EXJUFF6G.js → chunk-FXELV3AW.js} +8 -3
- package/chunks/{chunk-IOW726L2.js → chunk-GARUDDWI.js} +1 -1
- package/chunks/{chunk-JWNWOK2M.js → chunk-HZ4UKLOE.js} +12 -5
- package/chunks/{chunk-2AK5O3NQ.js → chunk-IDWF5L45.js} +28 -28
- package/chunks/chunk-IRQJDPZE.js +34 -0
- package/chunks/{chunk-TYNF7ROW.js → chunk-JHJDLZSM.js} +1 -1
- package/chunks/{chunk-TI4NDKQC.js → chunk-KTI65ZVY.js} +5 -5
- package/chunks/chunk-LK2ZIDHH.js +32 -0
- package/chunks/{chunk-I7ZVWF57.js → chunk-LUR7BA3W.js} +15 -9
- package/chunks/{chunk-AOZQPCWI.js → chunk-M4QTWCJ7.js} +2 -0
- package/chunks/{chunk-7S34K2P3.js → chunk-NOD4CBF7.js} +1 -1
- package/chunks/{chunk-KPLWZIOV.js → chunk-P4EPNS46.js} +3 -3
- package/chunks/{chunk-CUHVXHIV.js → chunk-PWFA23M2.js} +1 -1
- package/chunks/{chunk-KWIY2QZY.js → chunk-QRYMQPFT.js} +2 -2
- package/chunks/{chunk-FI7UKPRF.js → chunk-QS2T7JAK.js} +1 -1
- package/chunks/{chunk-OZQPMMTA.js → chunk-QUUBUPAW.js} +5 -5
- package/chunks/{chunk-FYMDIB7J.js → chunk-R3NDJICA.js} +1 -1
- package/chunks/{chunk-V7RTDFHK.js → chunk-RAJM56L7.js} +5 -1
- package/chunks/{chunk-Y2OQOAY7.js → chunk-RQNLEGMQ.js} +1 -1
- package/chunks/chunk-RZDLPTXV.js +167 -0
- package/chunks/chunk-SIPBGEVT.js +16 -0
- package/chunks/chunk-SNQFFEYH.js +11 -0
- package/chunks/{chunk-62OOT7FY.js → chunk-SNSJW2JT.js} +2 -2
- package/chunks/{chunk-LEECPQZN.js → chunk-UNV7BZD3.js} +2 -2
- package/chunks/{chunk-IRA5BW2J.js → chunk-X62ZTOQF.js} +31 -4
- package/chunks/{chunk-UN2AAVO5.js → chunk-XFBCZL7J.js} +2 -2
- package/chunks/chunk-XUX6JXU5.js +58 -0
- package/chunks/{create.action-K7GTWYST.js → create.action-PZMCTYGS.js} +31 -22
- package/chunks/{delete.action-JKLXBYRD.js → delete.action-J57JIFG3.js} +35 -21
- package/chunks/{delete.action-E4XRGKQW.js → delete.action-VDSTPSWG.js} +37 -21
- package/chunks/{get.action-IY7WSJMX.js → get.action-KUP32QJT.js} +13 -13
- package/chunks/{get.action-2AKMD4W3.js → get.action-ZOSML6XG.js} +12 -10
- package/chunks/{list.action-NRL2DDL5.js → list.action-Q5MPDR42.js} +15 -15
- package/chunks/{list.action-44YVCWKN.js → list.action-VYENIC5L.js} +13 -13
- package/chunks/{publish.action-E76MHLCN.js → publish.action-MBAZHQ2J.js} +48 -28
- package/chunks/{update.action-LZCAHAWW.js → update.action-BWMCXWQ5.js} +35 -21
- package/chunks/{update.action-FTTVWVAB.js → update.action-IEXVMUKG.js} +46 -26
- package/index.js +212 -127
- package/package.json +1 -1
- package/skills/scalar-cli/SKILL.md +4 -2
- package/template.md +220 -1
- package/chunks/action-BDDXF4YV.js +0 -38
- package/chunks/chunk-BOPEAS7H.js +0 -38
- package/chunks/chunk-EGOXR5FB.js +0 -15
- package/chunks/{action-UHXBY3RD.js → action-3P66ZSL3.js} +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
SdkLanguage
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-RQNLEGMQ.js";
|
|
5
5
|
import {
|
|
6
6
|
contentShaSchema
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-M4QTWCJ7.js";
|
|
8
8
|
import {
|
|
9
9
|
compareVersionsDesc,
|
|
10
10
|
docVersionSchema,
|
|
@@ -42,7 +42,7 @@ var sdkTrackedApiVersionSpec = (sdk) => sdk.apiVersion ?? (findOpenSdkDraft(sdkV
|
|
|
42
42
|
// ../../packages/entities/dist/sdk/scalar-config.js
|
|
43
43
|
import yaml from "yaml";
|
|
44
44
|
|
|
45
|
-
// ../../node_modules/.pnpm/@scalar+sdk-config@0.
|
|
45
|
+
// ../../node_modules/.pnpm/@scalar+sdk-config@0.59.0_typescript@7.0.2/node_modules/@scalar/sdk-config/dist/scalar-sdk.config.schema.json
|
|
46
46
|
var scalar_sdk_config_schema_default = {
|
|
47
47
|
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
48
48
|
$id: "https://registry.scalar.com/@scalar/schemas/sdk-config",
|
|
@@ -2639,7 +2639,7 @@ var scalar_sdk_config_schema_default = {
|
|
|
2639
2639
|
},
|
|
2640
2640
|
arrayFormat: {
|
|
2641
2641
|
$ref: "#/$defs/queryArrayFormat",
|
|
2642
|
-
description: "Array query serialization strategy."
|
|
2642
|
+
description: "Array query serialization strategy: `comma` (`ids=1,2`), `repeat` (`ids=1&ids=2`), `indices` (`ids[0]=1&ids[1]=2`) or `brackets` (`ids[]=1&ids[]=2`). When unset, the default depends on the target: TypeScript, Python, Ruby, C# and Go comma-join every list, Dart comma-joins every list except `pipeDelimited`/`spaceDelimited` ones, and Java, Kotlin and C++ follow each parameter's OpenAPI `style`/`explode`. Rust and Swift always follow `style`/`explode`, and PHP's query string ignores this setting. Go applies one format to every list of a request, so a parameter's `explode` does not change it there."
|
|
2643
2643
|
}
|
|
2644
2644
|
}
|
|
2645
2645
|
},
|
|
@@ -3175,12 +3175,12 @@ var scalar_sdk_config_schema_default = {
|
|
|
3175
3175
|
}
|
|
3176
3176
|
};
|
|
3177
3177
|
|
|
3178
|
-
// ../../node_modules/.pnpm/@scalar+sdk-config@0.
|
|
3178
|
+
// ../../node_modules/.pnpm/@scalar+sdk-config@0.59.0_typescript@7.0.2/node_modules/@scalar/sdk-config/dist/reads/reserved-publish-keys.js
|
|
3179
3179
|
var RESERVED_PUBLISH_KEYS = ["signing"];
|
|
3180
3180
|
var reserved = new Set(RESERVED_PUBLISH_KEYS);
|
|
3181
3181
|
var isReservedPublishKey = (key) => reserved.has(key);
|
|
3182
3182
|
|
|
3183
|
-
// ../../node_modules/.pnpm/@scalar+sdk-config@0.
|
|
3183
|
+
// ../../node_modules/.pnpm/@scalar+sdk-config@0.59.0_typescript@7.0.2/node_modules/@scalar/sdk-config/dist/target-languages.js
|
|
3184
3184
|
var TARGET_LANGUAGES = [
|
|
3185
3185
|
"typescript",
|
|
3186
3186
|
"python",
|
|
@@ -3200,7 +3200,7 @@ var WEBSOCKET_RUNTIME_TARGETS = ["typescript", "python", "rust", "cli"];
|
|
|
3200
3200
|
var GRPC_RUNTIME_TARGETS = ["typescript"];
|
|
3201
3201
|
var targetLanguageSet = new Set(TARGET_LANGUAGES);
|
|
3202
3202
|
|
|
3203
|
-
// ../../node_modules/.pnpm/@scalar+sdk-config@0.
|
|
3203
|
+
// ../../node_modules/.pnpm/@scalar+sdk-config@0.59.0_typescript@7.0.2/node_modules/@scalar/sdk-config/dist/target-fields.js
|
|
3204
3204
|
var resolveSchemaRef = (node) => {
|
|
3205
3205
|
if (typeof node !== "object" || node === null)
|
|
3206
3206
|
return void 0;
|
|
@@ -3232,7 +3232,7 @@ var targetsDeclaringField = (field) => {
|
|
|
3232
3232
|
var PACKAGE_NAME_TARGETS = targetsDeclaringField("packageName");
|
|
3233
3233
|
var PRERELEASE_TYPE_TARGETS = targetsDeclaringField("prereleaseType");
|
|
3234
3234
|
|
|
3235
|
-
// ../../node_modules/.pnpm/@scalar+sdk-config@0.
|
|
3235
|
+
// ../../node_modules/.pnpm/@scalar+sdk-config@0.59.0_typescript@7.0.2/node_modules/@scalar/sdk-config/dist/reads/publish-registries.js
|
|
3236
3236
|
var targetPublishRegistryNodes = (target) => {
|
|
3237
3237
|
const publish = resolveSchemaRef(targetSchemaFields(target)["publish"]);
|
|
3238
3238
|
return publish?.["properties"];
|
|
@@ -3278,7 +3278,7 @@ var targetRegistryOptions = new Map(Object.entries(derivePublishRegistryOptions(
|
|
|
3278
3278
|
new Map(Object.entries(registries))
|
|
3279
3279
|
]));
|
|
3280
3280
|
|
|
3281
|
-
// ../../node_modules/.pnpm/@scalar+sdk-config@0.
|
|
3281
|
+
// ../../node_modules/.pnpm/@scalar+sdk-config@0.59.0_typescript@7.0.2/node_modules/@scalar/sdk-config/dist/reads/target-stability.js
|
|
3282
3282
|
var STABILITY_VALUES = ["stable", "experimental", "stub"];
|
|
3283
3283
|
var isStability = (value) => typeof value === "string" && STABILITY_VALUES.includes(value);
|
|
3284
3284
|
var TARGET_STABILITY = Object.freeze(Object.fromEntries(TARGET_LANGUAGES.map((language) => {
|
|
@@ -3286,7 +3286,7 @@ var TARGET_STABILITY = Object.freeze(Object.fromEntries(TARGET_LANGUAGES.map((la
|
|
|
3286
3286
|
return [language, isStability(declared) ? declared : "experimental"];
|
|
3287
3287
|
})));
|
|
3288
3288
|
|
|
3289
|
-
// ../../node_modules/.pnpm/@scalar+sdk-config@0.
|
|
3289
|
+
// ../../node_modules/.pnpm/@scalar+sdk-config@0.59.0_typescript@7.0.2/node_modules/@scalar/sdk-config/dist/reads/target-catalog.js
|
|
3290
3290
|
var PACKAGE_NAME_FIELDS = ["composerPackageName", "gemName", "packageName"];
|
|
3291
3291
|
var targetTitle = (language) => {
|
|
3292
3292
|
const value = targetSchemaNode(language)?.["title"];
|
|
@@ -3310,10 +3310,10 @@ var describeTarget = (language) => {
|
|
|
3310
3310
|
};
|
|
3311
3311
|
var TARGETS = Object.freeze(Object.fromEntries(TARGET_LANGUAGES.map((language) => [language, describeTarget(language)])));
|
|
3312
3312
|
|
|
3313
|
-
// ../../node_modules/.pnpm/@scalar+sdk-config@0.
|
|
3313
|
+
// ../../node_modules/.pnpm/@scalar+sdk-config@0.59.0_typescript@7.0.2/node_modules/@scalar/sdk-config/dist/coerce-config.js
|
|
3314
3314
|
import { parse as parseYaml } from "yaml";
|
|
3315
3315
|
|
|
3316
|
-
// ../../node_modules/.pnpm/@scalar+sdk-helpers@0.9.
|
|
3316
|
+
// ../../node_modules/.pnpm/@scalar+sdk-helpers@0.9.1/node_modules/@scalar/sdk-helpers/dist/initialisms.js
|
|
3317
3317
|
var DEFAULT_INITIALISMS = [
|
|
3318
3318
|
"acl",
|
|
3319
3319
|
"ach",
|
|
@@ -3414,7 +3414,7 @@ var defaultInitialismCasing = (() => {
|
|
|
3414
3414
|
return map;
|
|
3415
3415
|
})();
|
|
3416
3416
|
|
|
3417
|
-
// ../../node_modules/.pnpm/@scalar+sdk-helpers@0.9.
|
|
3417
|
+
// ../../node_modules/.pnpm/@scalar+sdk-helpers@0.9.1/node_modules/@scalar/sdk-helpers/dist/split-into-words.js
|
|
3418
3418
|
var wordCache = /* @__PURE__ */ new Map();
|
|
3419
3419
|
var DIGIT_UPPERCASE_SEAM = /([0-9])([A-Z]+)/g;
|
|
3420
3420
|
var ANY_DIGIT_SEAM = /([0-9])([A-Z])/g;
|
|
@@ -3453,7 +3453,7 @@ var splitIntoWords = (input) => {
|
|
|
3453
3453
|
return words;
|
|
3454
3454
|
};
|
|
3455
3455
|
|
|
3456
|
-
// ../../node_modules/.pnpm/@scalar+sdk-helpers@0.9.
|
|
3456
|
+
// ../../node_modules/.pnpm/@scalar+sdk-helpers@0.9.1/node_modules/@scalar/sdk-helpers/dist/casing.js
|
|
3457
3457
|
var ensureLeadingLetter = (value) => {
|
|
3458
3458
|
if (value.length === 0)
|
|
3459
3459
|
return "_";
|
|
@@ -3464,22 +3464,22 @@ var pascalCase = (input) => {
|
|
|
3464
3464
|
return ensureLeadingLetter(result);
|
|
3465
3465
|
};
|
|
3466
3466
|
|
|
3467
|
-
// ../../node_modules/.pnpm/@scalar+sdk-helpers@0.9.
|
|
3467
|
+
// ../../node_modules/.pnpm/@scalar+sdk-helpers@0.9.1/node_modules/@scalar/sdk-helpers/dist/proto-names.js
|
|
3468
3468
|
var PROTO_IDENTIFIER_PATTERN = "[A-Za-z_][A-Za-z0-9_]*";
|
|
3469
3469
|
var PROTO_QUALIFIED_NAME_PATTERN = String.raw`${PROTO_IDENTIFIER_PATTERN}(?:\.${PROTO_IDENTIFIER_PATTERN})*`;
|
|
3470
3470
|
var PROTO_IDENTIFIER = new RegExp(`^${PROTO_IDENTIFIER_PATTERN}$`, "u");
|
|
3471
3471
|
var PROTO_QUALIFIED_NAME = new RegExp(`^${PROTO_QUALIFIED_NAME_PATTERN}$`, "u");
|
|
3472
3472
|
|
|
3473
|
-
// ../../node_modules/.pnpm/@scalar+sdk-config@0.
|
|
3473
|
+
// ../../node_modules/.pnpm/@scalar+sdk-config@0.59.0_typescript@7.0.2/node_modules/@scalar/sdk-config/dist/helpers/resolve-ref.js
|
|
3474
3474
|
import { getResolvedRef, mergeSiblingReferences } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
3475
3475
|
|
|
3476
|
-
// ../../node_modules/.pnpm/@scalar+openapi-loader@0.7.
|
|
3476
|
+
// ../../node_modules/.pnpm/@scalar+openapi-loader@0.7.3_typescript@7.0.2/node_modules/@scalar/openapi-loader/dist/assert-supported-openapi.js
|
|
3477
3477
|
import { getResolvedRef as getResolvedRef2, mergeSiblingReferences as mergeSiblingReferences2 } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
3478
3478
|
|
|
3479
|
-
// ../../node_modules/.pnpm/@scalar+sdk-config@0.
|
|
3479
|
+
// ../../node_modules/.pnpm/@scalar+sdk-config@0.59.0_typescript@7.0.2/node_modules/@scalar/sdk-config/dist/generate-default-config/generate-default-config.js
|
|
3480
3480
|
import { isAsyncApiDocument } from "@scalar/workspace-store/schemas";
|
|
3481
3481
|
|
|
3482
|
-
// ../../node_modules/.pnpm/@scalar+sdk-config@0.
|
|
3482
|
+
// ../../node_modules/.pnpm/@scalar+sdk-config@0.59.0_typescript@7.0.2/node_modules/@scalar/sdk-config/dist/scalar-sdk.config.validator.js
|
|
3483
3483
|
var validateClientSettings = validate197;
|
|
3484
3484
|
var validateGlobalSettings = validate201;
|
|
3485
3485
|
var validatePaginationConfig = validate202;
|
|
@@ -21708,7 +21708,7 @@ function validate202(data, { instancePath = "", parentData, parentDataProperty,
|
|
|
21708
21708
|
}
|
|
21709
21709
|
validate202.evaluated = { "props": { "name": true, "description": true, "type": true, "paramLocation": true, "continueOnEmptyItems": true, "request": true, "response": true }, "dynamicProps": false, "dynamicItems": false };
|
|
21710
21710
|
|
|
21711
|
-
// ../../node_modules/.pnpm/@scalar+sdk-config@0.
|
|
21711
|
+
// ../../node_modules/.pnpm/@scalar+sdk-config@0.59.0_typescript@7.0.2/node_modules/@scalar/sdk-config/dist/generate-default-config/extension-values.js
|
|
21712
21712
|
var extensionReader = (validate) => (candidate) => {
|
|
21713
21713
|
const copy = plainCopy(candidate, 0, { budget: MAX_EXTENSION_NODES });
|
|
21714
21714
|
return copy !== void 0 && validate(copy) ? copy : void 0;
|
|
@@ -21747,13 +21747,13 @@ var plainCopy = (value, depth, state) => {
|
|
|
21747
21747
|
return out;
|
|
21748
21748
|
};
|
|
21749
21749
|
|
|
21750
|
-
// ../../node_modules/.pnpm/@scalar+sdk-config@0.
|
|
21750
|
+
// ../../node_modules/.pnpm/@scalar+sdk-config@0.59.0_typescript@7.0.2/node_modules/@scalar/sdk-config/dist/generate-default-config/client-settings.js
|
|
21751
21751
|
var readClientSettings = extensionReader(validateClientSettings);
|
|
21752
21752
|
|
|
21753
|
-
// ../../node_modules/.pnpm/@scalar+sdk-config@0.
|
|
21753
|
+
// ../../node_modules/.pnpm/@scalar+sdk-config@0.59.0_typescript@7.0.2/node_modules/@scalar/sdk-config/dist/generate-default-config/pagination.js
|
|
21754
21754
|
var readValidScheme = extensionReader(validatePaginationConfig);
|
|
21755
21755
|
|
|
21756
|
-
// ../../node_modules/.pnpm/@scalar+sdk-config@0.
|
|
21756
|
+
// ../../node_modules/.pnpm/@scalar+sdk-config@0.59.0_typescript@7.0.2/node_modules/@scalar/sdk-config/dist/generate-default-config/operation-names.js
|
|
21757
21757
|
var HTTP_VERB_TO_METHOD_WORD = {
|
|
21758
21758
|
post: "create",
|
|
21759
21759
|
put: "update",
|
|
@@ -21790,13 +21790,13 @@ var METHOD_VERB_WORDS = /* @__PURE__ */ new Set([
|
|
|
21790
21790
|
"read"
|
|
21791
21791
|
]);
|
|
21792
21792
|
|
|
21793
|
-
// ../../node_modules/.pnpm/@scalar+sdk-config@0.
|
|
21793
|
+
// ../../node_modules/.pnpm/@scalar+sdk-config@0.59.0_typescript@7.0.2/node_modules/@scalar/sdk-config/dist/generate-default-config/settings.js
|
|
21794
21794
|
var readGlobalSettings = extensionReader(validateGlobalSettings);
|
|
21795
21795
|
|
|
21796
|
-
// ../../node_modules/.pnpm/@scalar+sdk-config@0.
|
|
21796
|
+
// ../../node_modules/.pnpm/@scalar+sdk-config@0.59.0_typescript@7.0.2/node_modules/@scalar/sdk-config/dist/publish-auth-methods.js
|
|
21797
21797
|
var PUBLISH_AUTH_METHODS = new Set(scalar_sdk_config_schema_default.$defs.publishAuthMethod.enum);
|
|
21798
21798
|
|
|
21799
|
-
// ../../node_modules/.pnpm/@scalar+sdk-config@0.
|
|
21799
|
+
// ../../node_modules/.pnpm/@scalar+sdk-config@0.59.0_typescript@7.0.2/node_modules/@scalar/sdk-config/dist/dart-package-identifier.js
|
|
21800
21800
|
var dartPackageIdentifier = (name, fallback = "sdk") => {
|
|
21801
21801
|
const clean = (input) => input.replace(/([a-z0-9])([A-Z])/gu, "$1_$2").toLowerCase().replace(/[^a-z0-9_]+/gu, "_").replace(/^_+|_+$/gu, "");
|
|
21802
21802
|
const reducedFallback = clean(fallback);
|
|
@@ -21805,14 +21805,14 @@ var dartPackageIdentifier = (name, fallback = "sdk") => {
|
|
|
21805
21805
|
return /^[a-z_]/u.test(pkg) ? pkg : `${safeFallback}_${pkg}`;
|
|
21806
21806
|
};
|
|
21807
21807
|
|
|
21808
|
-
// ../../node_modules/.pnpm/@scalar+sdk-config@0.
|
|
21808
|
+
// ../../node_modules/.pnpm/@scalar+sdk-config@0.59.0_typescript@7.0.2/node_modules/@scalar/sdk-config/dist/dotnet-package-identifier.js
|
|
21809
21809
|
var dotnetPackageIdentifier = (name, fallback = "Sdk") => {
|
|
21810
21810
|
const parts = name.replace(/([a-z0-9])([A-Z])/gu, "$1 $2").split(/[^a-zA-Z0-9]+/u).filter(Boolean);
|
|
21811
21811
|
const pascal = parts.map((part) => `${part.charAt(0).toUpperCase()}${part.slice(1)}`).join("");
|
|
21812
21812
|
return pascal.length === 0 || /^\d/u.test(pascal) ? fallback : pascal;
|
|
21813
21813
|
};
|
|
21814
21814
|
|
|
21815
|
-
// ../../node_modules/.pnpm/@scalar+sdk-config@0.
|
|
21815
|
+
// ../../node_modules/.pnpm/@scalar+sdk-config@0.59.0_typescript@7.0.2/node_modules/@scalar/sdk-config/dist/swift-package-identifier.js
|
|
21816
21816
|
var swiftPackageIdentifier = (name, fallback = "Sdk") => {
|
|
21817
21817
|
const pascal = pascalCase(name);
|
|
21818
21818
|
return /^[A-Za-z]/u.test(pascal) ? pascal : pascalCase(fallback);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
|
|
2
|
+
|
|
3
|
+
// src/helpers/input-policy.ts
|
|
4
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
5
|
+
import { Command } from "commander";
|
|
6
|
+
var policy = new AsyncLocalStorage();
|
|
7
|
+
var InputPolicyCommand = class extends Command {
|
|
8
|
+
parse(argv, options) {
|
|
9
|
+
return policy.run(false, () => super.parse(argv, options));
|
|
10
|
+
}
|
|
11
|
+
async parseAsync(argv, options) {
|
|
12
|
+
return policy.run(false, () => super.parseAsync(argv, options));
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
var isInputDisabled = () => policy.getStore() ?? false;
|
|
16
|
+
function configureInputPolicy(program) {
|
|
17
|
+
const register = (command) => {
|
|
18
|
+
if (!command.options.some((option) => option.long === "--no-input")) {
|
|
19
|
+
command.option("--no-input", "Disable prompts and browser launches");
|
|
20
|
+
}
|
|
21
|
+
for (const child of command.commands) register(child);
|
|
22
|
+
};
|
|
23
|
+
register(program);
|
|
24
|
+
program.hook("preAction", (_command, actionCommand) => {
|
|
25
|
+
const disabled = (command) => command !== null && (command.opts().input === false || disabled(command.parent));
|
|
26
|
+
policy.enterWith(disabled(actionCommand));
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export {
|
|
31
|
+
InputPolicyCommand,
|
|
32
|
+
isInputDisabled,
|
|
33
|
+
configureInputPolicy
|
|
34
|
+
};
|
|
@@ -5,19 +5,19 @@ import {
|
|
|
5
5
|
loginPortalSchema,
|
|
6
6
|
managedSchema,
|
|
7
7
|
workspaceSchema
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-P4EPNS46.js";
|
|
9
9
|
import {
|
|
10
10
|
userSchema
|
|
11
11
|
} from "./chunk-YTTDYTVB.js";
|
|
12
12
|
import {
|
|
13
13
|
sdkSchema
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-RQNLEGMQ.js";
|
|
15
15
|
import {
|
|
16
16
|
FEEDBACK_PATH_MAX_LENGTH,
|
|
17
17
|
helpfulReasons,
|
|
18
18
|
siteDeploySchema,
|
|
19
19
|
unhelpfulReasons
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-FXELV3AW.js";
|
|
21
21
|
import {
|
|
22
22
|
teamSchema
|
|
23
23
|
} from "./chunk-F3TQHNSQ.js";
|
|
@@ -29,12 +29,12 @@ import {
|
|
|
29
29
|
import {
|
|
30
30
|
managedDocSchema,
|
|
31
31
|
ruleSchema
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-JHJDLZSM.js";
|
|
33
33
|
import {
|
|
34
34
|
docInstanceOriginSchema,
|
|
35
35
|
docInstanceSchema,
|
|
36
36
|
docVersionRecordSchema
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-M4QTWCJ7.js";
|
|
38
38
|
import {
|
|
39
39
|
brandedUid,
|
|
40
40
|
emailSchema,
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
PRIVACY_VALUES
|
|
4
|
+
} from "./chunk-NAC63XJF.js";
|
|
5
|
+
import {
|
|
6
|
+
err,
|
|
7
|
+
ok
|
|
8
|
+
} from "./chunk-5ENKYZA4.js";
|
|
9
|
+
import {
|
|
10
|
+
external_exports
|
|
11
|
+
} from "./chunk-I57ID5K7.js";
|
|
12
|
+
|
|
13
|
+
// src/helpers/visibility.ts
|
|
14
|
+
var normalizeVisibility = (options) => {
|
|
15
|
+
const legacy = external_exports.enum(PRIVACY_VALUES).optional().safeParse(options.isPrivate);
|
|
16
|
+
if (!legacy.success) return err(legacy.error.issues[0].message);
|
|
17
|
+
if (options.public && options.private) {
|
|
18
|
+
return err("Use either --public or --private, not both.");
|
|
19
|
+
}
|
|
20
|
+
const legacyVisibility = legacy.data === void 0 ? void 0 : legacy.data === "true" || legacy.data === "private";
|
|
21
|
+
const visibility = options.private ? true : options.public ? false : void 0;
|
|
22
|
+
if (visibility !== void 0 && legacyVisibility !== void 0 && visibility !== legacyVisibility) {
|
|
23
|
+
return err(
|
|
24
|
+
"--isPrivate conflicts with the visibility flag. Use matching values or a single visibility option."
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
return ok(visibility ?? legacyVisibility);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export {
|
|
31
|
+
normalizeVisibility
|
|
32
|
+
};
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
safeNormalize
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-DWN6JOF2.js";
|
|
5
|
+
import {
|
|
6
|
+
inputFailure,
|
|
7
|
+
readUrl,
|
|
8
|
+
safeInput
|
|
9
|
+
} from "./chunk-2XWUFFEZ.js";
|
|
5
10
|
import {
|
|
6
11
|
isUrl
|
|
7
12
|
} from "./chunk-4ORL4MST.js";
|
|
@@ -38,17 +43,18 @@ import fs from "node:fs";
|
|
|
38
43
|
import as2 from "ansis";
|
|
39
44
|
import { validate } from "@scalar/openapi-validator";
|
|
40
45
|
var getFileOrUrl = async (input) => {
|
|
41
|
-
if (isUrl(input)) {
|
|
42
|
-
const
|
|
43
|
-
if (!
|
|
44
|
-
return output.error().title("Could not fetch the API description from the URL").exit("error");
|
|
46
|
+
if (isUrl(input) || /^\s*https?:/i.test(input)) {
|
|
47
|
+
const result = await readUrl(input);
|
|
48
|
+
if (!result.ok) {
|
|
49
|
+
return output.error().title("Could not fetch the API description from the URL").message(result.error).exit("error");
|
|
45
50
|
}
|
|
46
|
-
return
|
|
51
|
+
return result.data;
|
|
47
52
|
}
|
|
48
|
-
|
|
49
|
-
return
|
|
53
|
+
try {
|
|
54
|
+
return fs.readFileSync(input, "utf-8");
|
|
55
|
+
} catch (error) {
|
|
56
|
+
return output.error().title("Could not read the API description file").message(`${safeInput(input, "file")}: ${inputFailure(error, "file")}`).exit("error");
|
|
50
57
|
}
|
|
51
|
-
return fs.readFileSync(input, "utf-8");
|
|
52
58
|
};
|
|
53
59
|
var loadOpenApiDocument = async (content) => {
|
|
54
60
|
try {
|
|
@@ -20,6 +20,7 @@ var secretNameSchema = external_exports.string().regex(new RegExp(`^${SECRET_NAM
|
|
|
20
20
|
var secretEnvironmentSchema = external_exports.string().regex(/^[a-z0-9-]{1,128}$/);
|
|
21
21
|
var SIGNING_ENVIRONMENT = "_signing";
|
|
22
22
|
var secretUidSchema = external_exports.string().regex(/^[A-Za-z0-9_-]{1,40}$/);
|
|
23
|
+
var secretValueSchema = external_exports.string().min(1).max(65536);
|
|
23
24
|
var secretKindSchema = external_exports.enum(["secret", "var"]);
|
|
24
25
|
var secretMetadataSchema = external_exports.object({
|
|
25
26
|
uid: external_exports.string(),
|
|
@@ -1016,6 +1017,7 @@ export {
|
|
|
1016
1017
|
agentDocsProjectSchema,
|
|
1017
1018
|
agentKeySchema,
|
|
1018
1019
|
SCALAR_AGENT_KEY_HEADER,
|
|
1020
|
+
secretNameSchema,
|
|
1019
1021
|
secretMetadataSchema,
|
|
1020
1022
|
mcpEnvironmentPolicies,
|
|
1021
1023
|
mcpClientCredentialSchema,
|
|
@@ -2,7 +2,7 @@ import { createRequire as $$cR } from "node:module"; const require = $$cR(import
|
|
|
2
2
|
import {
|
|
3
3
|
getPublishPreviewUrl,
|
|
4
4
|
getPublishUrl
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-SNSJW2JT.js";
|
|
6
6
|
|
|
7
7
|
// src/domains/project/publish/url.ts
|
|
8
8
|
function getPublishDeploymentUrl(publish) {
|
|
@@ -3,15 +3,15 @@ import {
|
|
|
3
3
|
SdkLanguage,
|
|
4
4
|
sdkVersionStatusSchema,
|
|
5
5
|
sdkVersionTargetStateSchema
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RQNLEGMQ.js";
|
|
7
7
|
import {
|
|
8
8
|
cloudflareHostnameStateSchema
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-FXELV3AW.js";
|
|
10
10
|
import {
|
|
11
11
|
RegistryResourceTypes,
|
|
12
12
|
baseRegistrySchema,
|
|
13
13
|
contentShaSchema
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-M4QTWCJ7.js";
|
|
15
15
|
import {
|
|
16
16
|
brandedUid,
|
|
17
17
|
docVersionSchema,
|
|
@@ -10,7 +10,7 @@ var DownloadIsolateCommand = () => {
|
|
|
10
10
|
const cmd = new Command("download-isolate");
|
|
11
11
|
cmd.description("Download the docs preview server");
|
|
12
12
|
cmd.action(async () => {
|
|
13
|
-
const { downloadIsolate } = await import("./action-
|
|
13
|
+
const { downloadIsolate } = await import("./action-WEDLKGDY.js");
|
|
14
14
|
await downloadIsolate();
|
|
15
15
|
});
|
|
16
16
|
return cmd;
|
|
@@ -28,7 +28,7 @@ function BundleCommand() {
|
|
|
28
28
|
cmd.argument("[file|url]", "API description file path or URL to bundle");
|
|
29
29
|
cmd.option(
|
|
30
30
|
"-o, --output <file>",
|
|
31
|
-
"Output file, or - for
|
|
31
|
+
"Output file, or - for stdout in the input format (required for URLs and non-interactive use; otherwise confirms overwriting the input file)"
|
|
32
32
|
);
|
|
33
33
|
cmd.option("--treeShake", "Remove unused components from the bundled output");
|
|
34
34
|
cmd.option(
|
|
@@ -42,7 +42,7 @@ function BundleCommand() {
|
|
|
42
42
|
);
|
|
43
43
|
completeFiles(cmd, ["file|url"], ["--output"]);
|
|
44
44
|
cmd.action(async (...args) => {
|
|
45
|
-
const { bundleAction } = await import("./action-
|
|
45
|
+
const { bundleAction } = await import("./action-PBJFNJMY.js");
|
|
46
46
|
return bundleAction(...args);
|
|
47
47
|
});
|
|
48
48
|
return cmd;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
BaseCollections
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KTI65ZVY.js";
|
|
5
5
|
import {
|
|
6
6
|
sdkTrackedApiVersionSpec
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-IDWF5L45.js";
|
|
8
|
+
import {
|
|
9
|
+
managedDocSchema
|
|
10
|
+
} from "./chunk-JHJDLZSM.js";
|
|
8
11
|
import {
|
|
9
12
|
err,
|
|
10
13
|
ok
|
|
11
14
|
} from "./chunk-5ENKYZA4.js";
|
|
12
|
-
import {
|
|
13
|
-
managedDocSchema
|
|
14
|
-
} from "./chunk-TYNF7ROW.js";
|
|
15
15
|
|
|
16
16
|
// src/domains/sdk/inspect-sdk.ts
|
|
17
17
|
var sdkMetadata = (sdk, builds) => {
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
isInputDisabled
|
|
4
|
+
} from "./chunk-IRQJDPZE.js";
|
|
2
5
|
import {
|
|
3
6
|
err,
|
|
4
7
|
ok
|
|
@@ -7,7 +10,8 @@ import {
|
|
|
7
10
|
// src/helpers/url-opener.ts
|
|
8
11
|
import { spawn } from "node:child_process";
|
|
9
12
|
var openBrowser = async (url) => {
|
|
10
|
-
if (process.env.NODE_ENV === "INTEGRATION")
|
|
13
|
+
if (isInputDisabled() || process.env.NODE_ENV === "INTEGRATION")
|
|
14
|
+
return ok(void 0);
|
|
11
15
|
const platform = process.platform;
|
|
12
16
|
if (platform !== "darwin" && platform !== "linux" && platform !== "win32") {
|
|
13
17
|
return err(
|