@fern-api/fern-api-dev 3.56.0 → 3.56.8-1-gfc5c352b0bc
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/cli.cjs +160 -423
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -1421729,6 +1421729,52 @@ function addAuthCommand(cli) {
|
|
|
1421729
1421729
|
commandGroup(cli, "auth <command>", "Authenticate fern", [addLoginCommand, addLogoutCommand, addTokenCommand]);
|
|
1421730
1421730
|
}
|
|
1421731
1421731
|
|
|
1421732
|
+
// ../config/lib/schemas/index.js
|
|
1421733
|
+
var schemas_exports4 = {};
|
|
1421734
|
+
__export(schemas_exports4, {
|
|
1421735
|
+
AiConfigSchema: () => AiConfigSchema,
|
|
1421736
|
+
AiProviderSchema: () => AiProviderSchema,
|
|
1421737
|
+
ApiDefinitionSchema: () => ApiDefinitionSchema,
|
|
1421738
|
+
ApiSpecSchema: () => ApiSpecSchema,
|
|
1421739
|
+
ApisSchema: () => ApisSchema,
|
|
1421740
|
+
AsyncApiSettingsSchema: () => AsyncApiSettingsSchema,
|
|
1421741
|
+
AsyncApiSpecSchema: () => AsyncApiSpecSchema,
|
|
1421742
|
+
BaseApiSettingsSchema: () => BaseApiSettingsSchema,
|
|
1421743
|
+
CliSchema: () => CliSchema,
|
|
1421744
|
+
ConjureSettingsSchema: () => ConjureSettingsSchema,
|
|
1421745
|
+
ConjureSpecSchema: () => ConjureSpecSchema,
|
|
1421746
|
+
DefaultIntegerFormatSchema: () => DefaultIntegerFormatSchema,
|
|
1421747
|
+
ExampleGenerationSchema: () => ExampleGenerationSchema,
|
|
1421748
|
+
FernSettingsSchema: () => FernSettingsSchema,
|
|
1421749
|
+
FernSpecSchema: () => FernSpecSchema,
|
|
1421750
|
+
FernYmlSchema: () => FernYmlSchema,
|
|
1421751
|
+
FormParameterEncodingSchema: () => FormParameterEncodingSchema,
|
|
1421752
|
+
GitOutputModeSchema: () => GitOutputModeSchema,
|
|
1421753
|
+
GitOutputSchema: () => GitOutputSchema,
|
|
1421754
|
+
LicenseSchema: () => LicenseSchema,
|
|
1421755
|
+
MessageNamingVersionSchema: () => MessageNamingVersionSchema,
|
|
1421756
|
+
NpmPublishSchema: () => NpmPublishSchema,
|
|
1421757
|
+
OpenApiExampleGenerationSchema: () => OpenApiExampleGenerationSchema,
|
|
1421758
|
+
OpenApiFilterSchema: () => OpenApiFilterSchema,
|
|
1421759
|
+
OpenApiSettingsSchema: () => OpenApiSettingsSchema,
|
|
1421760
|
+
OpenApiSpecSchema: () => OpenApiSpecSchema,
|
|
1421761
|
+
OpenRpcSettingsSchema: () => OpenRpcSettingsSchema,
|
|
1421762
|
+
OpenRpcSpecSchema: () => OpenRpcSpecSchema,
|
|
1421763
|
+
OutputSchema: () => OutputSchema,
|
|
1421764
|
+
PathParameterOrderSchema: () => PathParameterOrderSchema,
|
|
1421765
|
+
ProtobufDefinitionSchema: () => ProtobufDefinitionSchema,
|
|
1421766
|
+
ProtobufSettingsSchema: () => ProtobufSettingsSchema,
|
|
1421767
|
+
ProtobufSpecSchema: () => ProtobufSpecSchema,
|
|
1421768
|
+
PublishSchema: () => PublishSchema,
|
|
1421769
|
+
ReadmeSchema: () => ReadmeSchema,
|
|
1421770
|
+
RemoveDiscriminantsFromSchemasSchema: () => RemoveDiscriminantsFromSchemasSchema,
|
|
1421771
|
+
ResolveAliasesSchema: () => ResolveAliasesSchema,
|
|
1421772
|
+
SdkTargetLanguageSchema: () => SdkTargetLanguageSchema,
|
|
1421773
|
+
SdkTargetSchema: () => SdkTargetSchema,
|
|
1421774
|
+
SdksSchema: () => SdksSchema,
|
|
1421775
|
+
isWellKnownLicense: () => isWellKnownLicense
|
|
1421776
|
+
});
|
|
1421777
|
+
|
|
1421732
1421778
|
// ../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/external.js
|
|
1421733
1421779
|
var external_exports = {};
|
|
1421734
1421780
|
__export(external_exports, {
|
|
@@ -1435759,47 +1435805,27 @@ var CliSchema = external_exports.object({
|
|
|
1435759
1435805
|
version: external_exports.string().optional()
|
|
1435760
1435806
|
});
|
|
1435761
1435807
|
|
|
1435762
|
-
// ../config/lib/schemas/CratesPublishSchema.js
|
|
1435763
|
-
var CratesPublishSchema = external_exports.object({
|
|
1435764
|
-
packageName: external_exports.string(),
|
|
1435765
|
-
url: external_exports.string().optional(),
|
|
1435766
|
-
token: external_exports.string().optional()
|
|
1435767
|
-
});
|
|
1435768
|
-
|
|
1435769
1435808
|
// ../config/lib/schemas/ReadmeSchema.js
|
|
1435770
1435809
|
var ReadmeSchema = external_exports.object({
|
|
1435771
1435810
|
defaultEndpoint: external_exports.string().optional()
|
|
1435772
1435811
|
});
|
|
1435773
1435812
|
|
|
1435774
|
-
// ../config/lib/schemas/MetadataSchema.js
|
|
1435775
|
-
var AuthorSchema = external_exports.object({
|
|
1435776
|
-
name: external_exports.string(),
|
|
1435777
|
-
email: external_exports.string()
|
|
1435778
|
-
});
|
|
1435779
|
-
var MetadataSchema = external_exports.object({
|
|
1435780
|
-
description: external_exports.string().optional(),
|
|
1435781
|
-
authors: external_exports.array(AuthorSchema).optional()
|
|
1435782
|
-
});
|
|
1435783
|
-
|
|
1435784
1435813
|
// ../config/lib/schemas/GitOutputModeSchema.js
|
|
1435785
1435814
|
var GitOutputModeSchema = external_exports.enum(["pr", "release", "push"]);
|
|
1435786
1435815
|
|
|
1435787
1435816
|
// ../config/lib/schemas/LicenseSchema.js
|
|
1435817
|
+
var WELL_KNOWN_LICENSES = ["MIT", "Apache-2.0"];
|
|
1435818
|
+
function isWellKnownLicense(license) {
|
|
1435819
|
+
return WELL_KNOWN_LICENSES.includes(license);
|
|
1435820
|
+
}
|
|
1435788
1435821
|
var LicenseSchema = external_exports.string();
|
|
1435789
1435822
|
|
|
1435790
|
-
// ../config/lib/schemas/ReviewersSchema.js
|
|
1435791
|
-
var ReviewersSchema = external_exports.object({
|
|
1435792
|
-
teams: external_exports.array(external_exports.string()).optional(),
|
|
1435793
|
-
users: external_exports.array(external_exports.string()).optional()
|
|
1435794
|
-
});
|
|
1435795
|
-
|
|
1435796
1435823
|
// ../config/lib/schemas/GitOutputSchema.js
|
|
1435797
1435824
|
var GitOutputSchema = external_exports.object({
|
|
1435798
1435825
|
repository: external_exports.string(),
|
|
1435799
1435826
|
mode: GitOutputModeSchema.optional(),
|
|
1435800
1435827
|
branch: external_exports.string().optional(),
|
|
1435801
|
-
license: LicenseSchema.optional()
|
|
1435802
|
-
reviewers: ReviewersSchema.optional()
|
|
1435828
|
+
license: LicenseSchema.optional()
|
|
1435803
1435829
|
});
|
|
1435804
1435830
|
|
|
1435805
1435831
|
// ../config/lib/schemas/OutputSchema.js
|
|
@@ -1435808,64 +1435834,14 @@ var OutputSchema = external_exports.object({
|
|
|
1435808
1435834
|
git: GitOutputSchema.optional()
|
|
1435809
1435835
|
});
|
|
1435810
1435836
|
|
|
1435811
|
-
// ../config/lib/schemas/MavenPublishSchema.js
|
|
1435812
|
-
var MavenSignatureSchema = external_exports.object({
|
|
1435813
|
-
keyId: external_exports.string(),
|
|
1435814
|
-
password: external_exports.string(),
|
|
1435815
|
-
secretKey: external_exports.string()
|
|
1435816
|
-
});
|
|
1435817
|
-
var MavenPublishSchema = external_exports.object({
|
|
1435818
|
-
coordinate: external_exports.string(),
|
|
1435819
|
-
url: external_exports.string().optional(),
|
|
1435820
|
-
username: external_exports.string().optional(),
|
|
1435821
|
-
password: external_exports.string().optional(),
|
|
1435822
|
-
signature: MavenSignatureSchema.optional()
|
|
1435823
|
-
});
|
|
1435824
|
-
|
|
1435825
1435837
|
// ../config/lib/schemas/NpmPublishSchema.js
|
|
1435826
1435838
|
var NpmPublishSchema = external_exports.object({
|
|
1435827
|
-
packageName: external_exports.string()
|
|
1435828
|
-
url: external_exports.string().optional(),
|
|
1435829
|
-
token: external_exports.string().optional()
|
|
1435830
|
-
});
|
|
1435831
|
-
|
|
1435832
|
-
// ../config/lib/schemas/NugetPublishSchema.js
|
|
1435833
|
-
var NugetPublishSchema = external_exports.object({
|
|
1435834
|
-
packageName: external_exports.string(),
|
|
1435835
|
-
url: external_exports.string().optional(),
|
|
1435836
|
-
apiKey: external_exports.string().optional()
|
|
1435837
|
-
});
|
|
1435838
|
-
|
|
1435839
|
-
// ../config/lib/schemas/PypiPublishSchema.js
|
|
1435840
|
-
var PypiMetadataSchema = external_exports.object({
|
|
1435841
|
-
keywords: external_exports.array(external_exports.string()).optional(),
|
|
1435842
|
-
documentationLink: external_exports.string().optional(),
|
|
1435843
|
-
homepageLink: external_exports.string().optional()
|
|
1435844
|
-
});
|
|
1435845
|
-
var PypiPublishSchema = external_exports.object({
|
|
1435846
|
-
packageName: external_exports.string(),
|
|
1435847
|
-
url: external_exports.string().optional(),
|
|
1435848
|
-
token: external_exports.string().optional(),
|
|
1435849
|
-
username: external_exports.string().optional(),
|
|
1435850
|
-
password: external_exports.string().optional(),
|
|
1435851
|
-
metadata: PypiMetadataSchema.optional()
|
|
1435852
|
-
});
|
|
1435853
|
-
|
|
1435854
|
-
// ../config/lib/schemas/RubygemsPublishSchema.js
|
|
1435855
|
-
var RubygemsPublishSchema = external_exports.object({
|
|
1435856
|
-
packageName: external_exports.string(),
|
|
1435857
|
-
url: external_exports.string().optional(),
|
|
1435858
|
-
apiKey: external_exports.string().optional()
|
|
1435839
|
+
packageName: external_exports.string()
|
|
1435859
1435840
|
});
|
|
1435860
1435841
|
|
|
1435861
1435842
|
// ../config/lib/schemas/PublishSchema.js
|
|
1435862
1435843
|
var PublishSchema = external_exports.object({
|
|
1435863
|
-
npm: NpmPublishSchema.optional()
|
|
1435864
|
-
pypi: PypiPublishSchema.optional(),
|
|
1435865
|
-
maven: MavenPublishSchema.optional(),
|
|
1435866
|
-
nuget: NugetPublishSchema.optional(),
|
|
1435867
|
-
rubygems: RubygemsPublishSchema.optional(),
|
|
1435868
|
-
crates: CratesPublishSchema.optional()
|
|
1435844
|
+
npm: NpmPublishSchema.optional()
|
|
1435869
1435845
|
});
|
|
1435870
1435846
|
|
|
1435871
1435847
|
// ../config/lib/schemas/SdkTargetLanguageSchema.js
|
|
@@ -1435890,8 +1435866,7 @@ var SdkTargetSchema = external_exports.object({
|
|
|
1435890
1435866
|
config: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
|
|
1435891
1435867
|
publish: PublishSchema.optional(),
|
|
1435892
1435868
|
output: OutputSchema,
|
|
1435893
|
-
group: external_exports.array(external_exports.string()).optional()
|
|
1435894
|
-
metadata: MetadataSchema.optional()
|
|
1435869
|
+
group: external_exports.array(external_exports.string()).optional()
|
|
1435895
1435870
|
});
|
|
1435896
1435871
|
|
|
1435897
1435872
|
// ../config/lib/schemas/SdksSchema.js
|
|
@@ -1444472,7 +1444447,7 @@ __export(serialization_exports3, {
|
|
|
1444472
1444447
|
ResolveAliases: () => ResolveAliases,
|
|
1444473
1444448
|
ResolveAliasesSchema: () => ResolveAliasesSchema2,
|
|
1444474
1444449
|
ReviewerSchema: () => ReviewerSchema,
|
|
1444475
|
-
ReviewersSchema: () =>
|
|
1444450
|
+
ReviewersSchema: () => ReviewersSchema,
|
|
1444476
1444451
|
RubyGemsOutputLocationSchema: () => RubyGemsOutputLocationSchema,
|
|
1444477
1444452
|
SpecSchema: () => SpecSchema,
|
|
1444478
1444453
|
UnionSettingsSchema: () => UnionSettingsSchema2,
|
|
@@ -1446596,7 +1446571,7 @@ var ReviewerSchema = schemas_exports7.object({
|
|
|
1446596
1446571
|
});
|
|
1446597
1446572
|
|
|
1446598
1446573
|
// ../configuration/lib/generators-yml/schemas/serialization/resources/reviewers/types/ReviewersSchema.js
|
|
1446599
|
-
var
|
|
1446574
|
+
var ReviewersSchema = schemas_exports7.object({
|
|
1446600
1446575
|
teams: schemas_exports7.list(ReviewerSchema).optional(),
|
|
1446601
1446576
|
users: schemas_exports7.list(ReviewerSchema).optional()
|
|
1446602
1446577
|
});
|
|
@@ -1446738,7 +1446713,7 @@ var GithubPullRequestSchema = schemas_exports7.object({
|
|
|
1446738
1446713
|
branch: schemas_exports7.string().optional(),
|
|
1446739
1446714
|
license: GithubLicenseSchema.optional(),
|
|
1446740
1446715
|
mode: schemas_exports7.stringLiteral("pull-request"),
|
|
1446741
|
-
reviewers:
|
|
1446716
|
+
reviewers: ReviewersSchema.optional()
|
|
1446742
1446717
|
});
|
|
1446743
1446718
|
|
|
1446744
1446719
|
// ../configuration/lib/generators-yml/schemas/serialization/resources/group/types/GithubPushSchema.js
|
|
@@ -1446792,7 +1446767,7 @@ var GeneratorGroupSchema = schemas_exports7.object({
|
|
|
1446792
1446767
|
audiences: schemas_exports7.list(schemas_exports7.string()).optional(),
|
|
1446793
1446768
|
generators: schemas_exports7.list(GeneratorInvocationSchema),
|
|
1446794
1446769
|
metadata: OutputMetadataSchema.optional(),
|
|
1446795
|
-
reviewers:
|
|
1446770
|
+
reviewers: ReviewersSchema.optional()
|
|
1446796
1446771
|
});
|
|
1446797
1446772
|
|
|
1446798
1446773
|
// ../configuration/lib/generators-yml/schemas/serialization/resources/generators/types/GeneratorsOpenApiObjectSchema.js
|
|
@@ -1446862,7 +1446837,7 @@ var GeneratorsConfigurationSchema = schemas_exports7.object({
|
|
|
1446862
1446837
|
"default-group": schemas_exports7.string().optional(),
|
|
1446863
1446838
|
aliases: schemas_exports7.record(schemas_exports7.string(), schemas_exports7.list(schemas_exports7.string())).optional(),
|
|
1446864
1446839
|
groups: schemas_exports7.record(schemas_exports7.string(), GeneratorGroupSchema).optional(),
|
|
1446865
|
-
reviewers:
|
|
1446840
|
+
reviewers: ReviewersSchema.optional(),
|
|
1446866
1446841
|
ai: AiServicesSchema.optional(),
|
|
1446867
1446842
|
autorelease: schemas_exports7.boolean().optional(),
|
|
1446868
1446843
|
openapi: GeneratorsOpenApiSchema.optional(),
|
|
@@ -1446912,7 +1446887,7 @@ __export(license_exports2, {
|
|
|
1446912
1446887
|
var reviewers_exports2 = {};
|
|
1446913
1446888
|
__export(reviewers_exports2, {
|
|
1446914
1446889
|
ReviewerSchema: () => ReviewerSchema,
|
|
1446915
|
-
ReviewersSchema: () =>
|
|
1446890
|
+
ReviewersSchema: () => ReviewersSchema
|
|
1446916
1446891
|
});
|
|
1446917
1446892
|
|
|
1446918
1446893
|
// ../configuration/lib/generators-yml/utils/isApiConfigurationV2Schema.js
|
|
@@ -1450266,117 +1450241,44 @@ function convertRawOutputConfig(generator, warnings) {
|
|
|
1450266
1450241
|
}
|
|
1450267
1450242
|
}
|
|
1450268
1450243
|
if (githubConfig.reviewers != null) {
|
|
1450269
|
-
|
|
1450270
|
-
|
|
1450271
|
-
|
|
1450272
|
-
|
|
1450273
|
-
|
|
1450274
|
-
};
|
|
1450275
|
-
}
|
|
1450244
|
+
warnings.push({
|
|
1450245
|
+
type: "unsupported",
|
|
1450246
|
+
message: "GitHub PR reviewers configuration is not supported in fern.yml",
|
|
1450247
|
+
suggestion: "Configure reviewers directly in your GitHub repository settings"
|
|
1450248
|
+
});
|
|
1450276
1450249
|
}
|
|
1450277
1450250
|
}
|
|
1450278
1450251
|
}
|
|
1450279
1450252
|
if (generator.output?.location != null) {
|
|
1450280
1450253
|
const location2 = generator.output.location;
|
|
1450281
|
-
const rawOutput = generator.output;
|
|
1450282
1450254
|
switch (location2) {
|
|
1450283
1450255
|
case "local-file-system": {
|
|
1450284
|
-
if (
|
|
1450285
|
-
output2.path =
|
|
1450256
|
+
if (generator.output.path != null) {
|
|
1450257
|
+
output2.path = generator.output.path;
|
|
1450286
1450258
|
}
|
|
1450287
1450259
|
break;
|
|
1450288
1450260
|
}
|
|
1450289
1450261
|
case "npm": {
|
|
1450290
|
-
const packageName =
|
|
1450262
|
+
const packageName = generator.output["package-name"];
|
|
1450291
1450263
|
if (typeof packageName === "string") {
|
|
1450292
1450264
|
publish2 = {
|
|
1450293
1450265
|
npm: {
|
|
1450294
|
-
packageName
|
|
1450295
|
-
url: rawOutput["url"],
|
|
1450296
|
-
token: rawOutput["token"]
|
|
1450297
|
-
}
|
|
1450298
|
-
};
|
|
1450299
|
-
}
|
|
1450300
|
-
break;
|
|
1450301
|
-
}
|
|
1450302
|
-
case "pypi": {
|
|
1450303
|
-
const packageName = rawOutput["package-name"];
|
|
1450304
|
-
if (typeof packageName === "string") {
|
|
1450305
|
-
const metadata = rawOutput["metadata"];
|
|
1450306
|
-
publish2 = {
|
|
1450307
|
-
pypi: {
|
|
1450308
|
-
packageName,
|
|
1450309
|
-
url: rawOutput["url"],
|
|
1450310
|
-
token: rawOutput["token"],
|
|
1450311
|
-
username: rawOutput["username"],
|
|
1450312
|
-
password: rawOutput["password"],
|
|
1450313
|
-
metadata: metadata != null ? {
|
|
1450314
|
-
keywords: metadata.keywords,
|
|
1450315
|
-
documentationLink: metadata.documentationLink,
|
|
1450316
|
-
homepageLink: metadata.homepageLink
|
|
1450317
|
-
} : void 0
|
|
1450318
|
-
}
|
|
1450319
|
-
};
|
|
1450320
|
-
}
|
|
1450321
|
-
break;
|
|
1450322
|
-
}
|
|
1450323
|
-
case "maven": {
|
|
1450324
|
-
const coordinate = rawOutput["coordinate"];
|
|
1450325
|
-
if (typeof coordinate === "string") {
|
|
1450326
|
-
const signature = rawOutput["signature"];
|
|
1450327
|
-
publish2 = {
|
|
1450328
|
-
maven: {
|
|
1450329
|
-
coordinate,
|
|
1450330
|
-
url: rawOutput["url"],
|
|
1450331
|
-
username: rawOutput["username"],
|
|
1450332
|
-
password: rawOutput["password"],
|
|
1450333
|
-
signature: signature != null ? {
|
|
1450334
|
-
keyId: signature.keyId,
|
|
1450335
|
-
password: signature.password,
|
|
1450336
|
-
secretKey: signature.secretKey
|
|
1450337
|
-
} : void 0
|
|
1450338
|
-
}
|
|
1450339
|
-
};
|
|
1450340
|
-
}
|
|
1450341
|
-
break;
|
|
1450342
|
-
}
|
|
1450343
|
-
case "nuget": {
|
|
1450344
|
-
const packageName = rawOutput["package-name"];
|
|
1450345
|
-
if (typeof packageName === "string") {
|
|
1450346
|
-
publish2 = {
|
|
1450347
|
-
nuget: {
|
|
1450348
|
-
packageName,
|
|
1450349
|
-
url: rawOutput["url"],
|
|
1450350
|
-
apiKey: rawOutput["api-key"]
|
|
1450351
|
-
}
|
|
1450352
|
-
};
|
|
1450353
|
-
}
|
|
1450354
|
-
break;
|
|
1450355
|
-
}
|
|
1450356
|
-
case "rubygems": {
|
|
1450357
|
-
const packageName = rawOutput["package-name"];
|
|
1450358
|
-
if (typeof packageName === "string") {
|
|
1450359
|
-
publish2 = {
|
|
1450360
|
-
rubygems: {
|
|
1450361
|
-
packageName,
|
|
1450362
|
-
url: rawOutput["url"],
|
|
1450363
|
-
apiKey: rawOutput["api-key"]
|
|
1450266
|
+
packageName
|
|
1450364
1450267
|
}
|
|
1450365
1450268
|
};
|
|
1450366
1450269
|
}
|
|
1450367
1450270
|
break;
|
|
1450368
1450271
|
}
|
|
1450272
|
+
case "pypi":
|
|
1450273
|
+
case "maven":
|
|
1450274
|
+
case "nuget":
|
|
1450275
|
+
case "rubygems":
|
|
1450369
1450276
|
case "crates": {
|
|
1450370
|
-
|
|
1450371
|
-
|
|
1450372
|
-
|
|
1450373
|
-
|
|
1450374
|
-
|
|
1450375
|
-
url: rawOutput["url"],
|
|
1450376
|
-
token: rawOutput["token"]
|
|
1450377
|
-
}
|
|
1450378
|
-
};
|
|
1450379
|
-
}
|
|
1450277
|
+
warnings.push({
|
|
1450278
|
+
type: "info",
|
|
1450279
|
+
message: `${location2} publishing configuration detected but not fully supported in fern.yml yet`,
|
|
1450280
|
+
suggestion: `Configure ${location2} publishing manually`
|
|
1450281
|
+
});
|
|
1450380
1450282
|
break;
|
|
1450381
1450283
|
}
|
|
1450382
1450284
|
case "postman": {
|
|
@@ -1454492,7 +1454394,7 @@ function getRequestBody3(endpoint3) {
|
|
|
1454492
1454394
|
// ../fern-definition/schema/lib/utils/HttpEndpointReferenceParser.js
|
|
1454493
1454395
|
var HttpEndpointReferenceParser2 = class {
|
|
1454494
1454396
|
//eslint-disable-next-line
|
|
1454495
|
-
REFERENCE_REGEX = /^(
|
|
1454397
|
+
REFERENCE_REGEX = /^(GET|POST|PUT|DELETE|PATCH|HEAD)\s(\/\S*)$/;
|
|
1454496
1454398
|
validate(reference4) {
|
|
1454497
1454399
|
const validFormat = this.REFERENCE_REGEX.test(reference4);
|
|
1454498
1454400
|
if (!validFormat) {
|
|
@@ -1454506,14 +1454408,12 @@ var HttpEndpointReferenceParser2 = class {
|
|
|
1454506
1454408
|
return void 0;
|
|
1454507
1454409
|
}
|
|
1454508
1454410
|
const match3 = reference4.match(this.REFERENCE_REGEX);
|
|
1454509
|
-
if (match3 == null || match3[
|
|
1454411
|
+
if (match3 == null || match3[1] == null || match3[2] == null) {
|
|
1454510
1454412
|
return void 0;
|
|
1454511
1454413
|
}
|
|
1454512
1454414
|
return {
|
|
1454513
|
-
|
|
1454514
|
-
|
|
1454515
|
-
method: match3[2],
|
|
1454516
|
-
path: match3[3]
|
|
1454415
|
+
method: match3[1],
|
|
1454416
|
+
path: match3[2]
|
|
1454517
1454417
|
};
|
|
1454518
1454418
|
}
|
|
1454519
1454419
|
};
|
|
@@ -1506917,15 +1506817,9 @@ var EndpointResolverImpl = class {
|
|
|
1506917
1506817
|
}
|
|
1506918
1506818
|
return resolvedEndpoint;
|
|
1506919
1506819
|
}
|
|
1506920
|
-
resolveEndpointByMethodAndPath({ method: method8, path: path86,
|
|
1506820
|
+
resolveEndpointByMethodAndPath({ method: method8, path: path86, casingsGenerator }) {
|
|
1506921
1506821
|
let result = void 0;
|
|
1506922
1506822
|
visitAllDefinitionFiles(this.workspace, (relativeFilepath, file4, metadata) => {
|
|
1506923
|
-
if (namespace != null) {
|
|
1506924
|
-
const fileNamespace = this.getNamespaceFromFilepath(relativeFilepath);
|
|
1506925
|
-
if (fileNamespace !== namespace) {
|
|
1506926
|
-
return;
|
|
1506927
|
-
}
|
|
1506928
|
-
}
|
|
1506929
1506823
|
const context2 = constructFernFileContext({
|
|
1506930
1506824
|
relativeFilepath,
|
|
1506931
1506825
|
definitionFile: file4,
|
|
@@ -1506944,12 +1506838,6 @@ var EndpointResolverImpl = class {
|
|
|
1506944
1506838
|
}
|
|
1506945
1506839
|
});
|
|
1506946
1506840
|
visitAllPackageMarkers(this.workspace, (relativeFilepath, packageMarker) => {
|
|
1506947
|
-
if (namespace != null) {
|
|
1506948
|
-
const fileNamespace = this.getNamespaceFromFilepath(relativeFilepath);
|
|
1506949
|
-
if (fileNamespace !== namespace) {
|
|
1506950
|
-
return;
|
|
1506951
|
-
}
|
|
1506952
|
-
}
|
|
1506953
1506841
|
const context2 = constructFernFileContext({
|
|
1506954
1506842
|
relativeFilepath,
|
|
1506955
1506843
|
definitionFile: packageMarker,
|
|
@@ -1506968,21 +1506856,12 @@ var EndpointResolverImpl = class {
|
|
|
1506968
1506856
|
});
|
|
1506969
1506857
|
return result;
|
|
1506970
1506858
|
}
|
|
1506971
|
-
getNamespaceFromFilepath(relativeFilepath) {
|
|
1506972
|
-
const parts = relativeFilepath.split("/");
|
|
1506973
|
-
if (parts.length > 1) {
|
|
1506974
|
-
return parts[0];
|
|
1506975
|
-
}
|
|
1506976
|
-
return void 0;
|
|
1506977
|
-
}
|
|
1506978
1506859
|
resolveEndpoint({ endpoint: endpoint3, file: file4 }) {
|
|
1506979
1506860
|
const referenceParser = new HttpEndpointReferenceParser2();
|
|
1506980
1506861
|
const parsedEndpointReference = referenceParser.tryParse(endpoint3);
|
|
1506981
1506862
|
if (parsedEndpointReference != null) {
|
|
1506982
1506863
|
return this.resolveEndpointByMethodAndPath({
|
|
1506983
|
-
|
|
1506984
|
-
path: parsedEndpointReference.path,
|
|
1506985
|
-
namespace: parsedEndpointReference.namespace,
|
|
1506864
|
+
...parsedEndpointReference,
|
|
1506986
1506865
|
casingsGenerator: file4.casingsGenerator
|
|
1506987
1506866
|
});
|
|
1506988
1506867
|
}
|
|
@@ -1547646,7 +1547525,7 @@ async function getFrontmatterPosition({ absolutePath, readFileFn = (path86, enco
|
|
|
1547646
1547525
|
}
|
|
1547647
1547526
|
async function buildNavigationForDirectory({ directoryPath, getDir = getDirectoryContents, readFileFn = (path86, encoding) => (0, import_promises28.readFile)(path86, encoding) }) {
|
|
1547648
1547527
|
const contents = await getDir(directoryPath);
|
|
1547649
|
-
const markdownFiles = contents.filter((item) => item.type === "file" && (item.name.
|
|
1547528
|
+
const markdownFiles = contents.filter((item) => item.type === "file" && (item.name.endsWith(".md") || item.name.endsWith(".mdx")));
|
|
1547650
1547529
|
const subdirectories = contents.filter((item) => item.type === "directory");
|
|
1547651
1547530
|
const pagePositions = await Promise.all(markdownFiles.map((file4) => getFrontmatterPosition({ absolutePath: file4.absolutePath, readFileFn })));
|
|
1547652
1547531
|
const pages = markdownFiles.map((file4) => {
|
|
@@ -1547670,18 +1547549,16 @@ async function buildNavigationForDirectory({ directoryPath, getDir = getDirector
|
|
|
1547670
1547549
|
getDir,
|
|
1547671
1547550
|
readFileFn
|
|
1547672
1547551
|
});
|
|
1547673
|
-
const indexPage = subContents.find((item) => item.type === "page" && (item.slug === "index" || item.absolutePath.toLowerCase().endsWith("/index.mdx") || item.absolutePath.toLowerCase().endsWith("/index.md")));
|
|
1547674
|
-
const filteredContents = indexPage ? subContents.filter((item) => item !== indexPage) : subContents;
|
|
1547675
1547552
|
return {
|
|
1547676
1547553
|
type: "section",
|
|
1547677
1547554
|
title: nameToTitle({ name: dir.name }),
|
|
1547678
1547555
|
slug: nameToSlug({ name: dir.name }),
|
|
1547679
1547556
|
icon: void 0,
|
|
1547680
|
-
contents:
|
|
1547557
|
+
contents: subContents,
|
|
1547681
1547558
|
collapsed: void 0,
|
|
1547682
1547559
|
hidden: void 0,
|
|
1547683
1547560
|
skipUrlSlug: false,
|
|
1547684
|
-
overviewAbsolutePath:
|
|
1547561
|
+
overviewAbsolutePath: void 0,
|
|
1547685
1547562
|
viewers: void 0,
|
|
1547686
1547563
|
orphaned: void 0,
|
|
1547687
1547564
|
featureFlags: void 0,
|
|
@@ -1548387,8 +1548264,6 @@ async function expandFolderConfiguration({ rawConfig, absolutePathToFernFolder,
|
|
|
1548387
1548264
|
context2.failAndThrow(`Folder not found: ${rawConfig.folder}`);
|
|
1548388
1548265
|
}
|
|
1548389
1548266
|
const contents = await buildNavigationForDirectory({ directoryPath: folderPath });
|
|
1548390
|
-
const indexPage = contents.find((item) => item.type === "page" && (item.slug === "index" || item.absolutePath.toLowerCase().endsWith("/index.mdx") || item.absolutePath.toLowerCase().endsWith("/index.md")));
|
|
1548391
|
-
const filteredContents = indexPage ? contents.filter((item) => item !== indexPage) : contents;
|
|
1548392
1548267
|
const folderName = import_path28.default.basename(folderPath);
|
|
1548393
1548268
|
const title4 = rawConfig.title ?? nameToTitle({ name: folderName });
|
|
1548394
1548269
|
const slug = rawConfig.slug ?? nameToSlug({ name: folderName });
|
|
@@ -1548396,12 +1548271,12 @@ async function expandFolderConfiguration({ rawConfig, absolutePathToFernFolder,
|
|
|
1548396
1548271
|
type: "section",
|
|
1548397
1548272
|
title: title4,
|
|
1548398
1548273
|
icon: resolveIconPath(rawConfig.icon, absolutePathToConfig),
|
|
1548399
|
-
contents
|
|
1548274
|
+
contents,
|
|
1548400
1548275
|
slug,
|
|
1548401
1548276
|
collapsed: rawConfig.collapsed ?? void 0,
|
|
1548402
1548277
|
hidden: rawConfig.hidden ?? void 0,
|
|
1548403
1548278
|
skipUrlSlug: rawConfig.skipSlug ?? false,
|
|
1548404
|
-
overviewAbsolutePath:
|
|
1548279
|
+
overviewAbsolutePath: void 0,
|
|
1548405
1548280
|
viewers: parseRoles(rawConfig.viewers),
|
|
1548406
1548281
|
orphaned: rawConfig.orphaned,
|
|
1548407
1548282
|
featureFlags: convertFeatureFlag(rawConfig.featureFlag),
|
|
@@ -1554014,7 +1553889,6 @@ async function doesPathExist2(filepath) {
|
|
|
1554014
1553889
|
}
|
|
1554015
1553890
|
|
|
1554016
1553891
|
// ../../commons/github/lib/cloneRepository.js
|
|
1554017
|
-
var import_child_process3 = require("child_process");
|
|
1554018
1553892
|
var import_tmp_promise3 = __toESM(require_tmp_promise(), 1);
|
|
1554019
1553893
|
|
|
1554020
1553894
|
// ../../commons/github/lib/parseRepository.js
|
|
@@ -1554060,77 +1553934,17 @@ function getCloneUrl({ remote, owner, repo }) {
|
|
|
1554060
1553934
|
}
|
|
1554061
1553935
|
|
|
1554062
1553936
|
// ../../commons/github/lib/cloneRepository.js
|
|
1554063
|
-
function sanitizeCloneUrl(url3) {
|
|
1554064
|
-
return url3.replace(/\/\/[^@]+@/, "//[REDACTED]@");
|
|
1554065
|
-
}
|
|
1554066
|
-
function isGitAvailable() {
|
|
1554067
|
-
try {
|
|
1554068
|
-
(0, import_child_process3.execSync)("git --version", { encoding: "utf-8", stdio: "pipe" });
|
|
1554069
|
-
return true;
|
|
1554070
|
-
} catch {
|
|
1554071
|
-
return false;
|
|
1554072
|
-
}
|
|
1554073
|
-
}
|
|
1554074
|
-
function getGitDiagnostics() {
|
|
1554075
|
-
const diagnostics = [];
|
|
1554076
|
-
try {
|
|
1554077
|
-
const whichCommand = process.platform === "win32" ? "where git" : "which git";
|
|
1554078
|
-
const gitPath = (0, import_child_process3.execSync)(`${whichCommand} 2>/dev/null || echo 'not found'`, { encoding: "utf-8" }).trim();
|
|
1554079
|
-
diagnostics.push(`git path: ${gitPath}`);
|
|
1554080
|
-
} catch {
|
|
1554081
|
-
diagnostics.push("git path: unable to determine");
|
|
1554082
|
-
}
|
|
1554083
|
-
try {
|
|
1554084
|
-
const gitVersion = (0, import_child_process3.execSync)("git --version 2>/dev/null || echo 'unknown'", { encoding: "utf-8" }).trim();
|
|
1554085
|
-
diagnostics.push(`version: ${gitVersion}`);
|
|
1554086
|
-
} catch {
|
|
1554087
|
-
diagnostics.push("version: unknown");
|
|
1554088
|
-
}
|
|
1554089
|
-
try {
|
|
1554090
|
-
const isContainer = (0, import_child_process3.execSync)("test -f /.dockerenv && echo 'yes' || echo 'no'", { encoding: "utf-8" }).trim() === "yes";
|
|
1554091
|
-
diagnostics.push(`in container: ${isContainer}`);
|
|
1554092
|
-
} catch {
|
|
1554093
|
-
diagnostics.push("in container: unknown");
|
|
1554094
|
-
}
|
|
1554095
|
-
diagnostics.push(`PATH: ${process.env.PATH ?? "unset"}`);
|
|
1554096
|
-
return diagnostics.join(", ");
|
|
1554097
|
-
}
|
|
1554098
1553937
|
async function cloneRepository({ githubRepository, installationToken, targetDirectory, timeoutMs }) {
|
|
1554099
1553938
|
const repositoryReference = parseRepository2(githubRepository);
|
|
1554100
1553939
|
const cloneUrl = installationToken != null ? repositoryReference.getAuthedCloneUrl(installationToken) : repositoryReference.cloneUrl;
|
|
1554101
1553940
|
const clonePath = targetDirectory ?? (await import_tmp_promise3.default.dir()).path;
|
|
1554102
|
-
const sanitizedUrl = sanitizeCloneUrl(cloneUrl);
|
|
1554103
|
-
if (!isGitAvailable()) {
|
|
1554104
|
-
const diagnostics = getGitDiagnostics();
|
|
1554105
|
-
throw new Error(`Git is not installed or not found in PATH. Self-hosted GitHub mode requires git to be installed on the host machine where the Fern CLI runs. Please install git and ensure it is available in your PATH. Repository: ${githubRepository}. Debug info: ${diagnostics}`);
|
|
1554106
|
-
}
|
|
1554107
1553941
|
const git = esm_default3(clonePath, {
|
|
1554108
1553942
|
timeout: timeoutMs != null ? {
|
|
1554109
1553943
|
block: timeoutMs
|
|
1554110
1553944
|
// Kill the process if no data is received for the specified time
|
|
1554111
1553945
|
} : void 0
|
|
1554112
1553946
|
});
|
|
1554113
|
-
|
|
1554114
|
-
try {
|
|
1554115
|
-
await git.clone(cloneUrl, ".");
|
|
1554116
|
-
} catch (error49) {
|
|
1554117
|
-
const elapsed = Date.now() - startTime;
|
|
1554118
|
-
const errorMessage = error49 instanceof Error ? error49.message : String(error49);
|
|
1554119
|
-
if (errorMessage.includes("ENOENT") || errorMessage.includes("spawn git")) {
|
|
1554120
|
-
const diagnostics = getGitDiagnostics();
|
|
1554121
|
-
throw new Error(`Failed to clone repository: git command not found. Self-hosted GitHub mode requires git to be installed on the host machine where the Fern CLI runs. URL: ${sanitizedUrl}. Elapsed: ${elapsed}ms. Debug info: ${diagnostics}. Original error: ${errorMessage}`);
|
|
1554122
|
-
}
|
|
1554123
|
-
if (errorMessage.includes("Authentication failed") || errorMessage.includes("could not read Username") || errorMessage.includes("401") || errorMessage.includes("403")) {
|
|
1554124
|
-
throw new Error(`Failed to clone repository: authentication failed. Ensure your GitHub token is set and has access to the repository. URL: ${sanitizedUrl}. Elapsed: ${elapsed}ms. Original error: ${errorMessage}`);
|
|
1554125
|
-
}
|
|
1554126
|
-
if (errorMessage.includes("Repository not found") || errorMessage.includes("not found") || errorMessage.includes("404")) {
|
|
1554127
|
-
throw new Error(`Failed to clone repository: repository not found. Check that ${githubRepository} exists and your token has access. URL: ${sanitizedUrl}. Elapsed: ${elapsed}ms. Original error: ${errorMessage}`);
|
|
1554128
|
-
}
|
|
1554129
|
-
if (errorMessage.includes("Connection refused") || errorMessage.includes("Connection timed out") || errorMessage.includes("Could not resolve host") || errorMessage.includes("unable to access")) {
|
|
1554130
|
-
throw new Error(`Failed to clone repository: network error. Check network connectivity and proxy settings. URL: ${sanitizedUrl}. Elapsed: ${elapsed}ms. Original error: ${errorMessage}`);
|
|
1554131
|
-
}
|
|
1554132
|
-
throw new Error(`Failed to clone repository ${githubRepository}. URL: ${sanitizedUrl}. Elapsed: ${elapsed}ms. Original error: ${errorMessage}`);
|
|
1554133
|
-
}
|
|
1553947
|
+
await git.clone(cloneUrl, ".");
|
|
1554134
1553948
|
return new ClonedRepository({
|
|
1554135
1553949
|
clonePath,
|
|
1554136
1553950
|
git
|
|
@@ -1610119,10 +1609933,7 @@ function convertTypeShape4(irType) {
|
|
|
1610119
1609933
|
description: variant.docs ?? void 0,
|
|
1610120
1609934
|
type: convertTypeReference12(variant.type),
|
|
1610121
1609935
|
availability: void 0,
|
|
1610122
|
-
|
|
1610123
|
-
// originalName may contain generated names (e.g., "ObjectsObjectTypeBatchUpsertPostRequestBody...")
|
|
1610124
|
-
// which are not user-friendly and should not be user-facing
|
|
1610125
|
-
displayName: variant.type.type === "named" ? variant.type.displayName : void 0
|
|
1609936
|
+
displayName: variant.type.type === "named" ? variant.type.displayName ?? variant.type.name.originalName : void 0
|
|
1610126
1609937
|
};
|
|
1610127
1609938
|
})
|
|
1610128
1609939
|
};
|
|
@@ -1664035,19 +1663846,6 @@ generators:
|
|
|
1664035
1663846
|
if (selfhostedGithubConfig != null) {
|
|
1664036
1663847
|
await fs20.rm(absolutePathToLocalOutput, { recursive: true, force: true });
|
|
1664037
1663848
|
await fs20.mkdir(absolutePathToLocalOutput, { recursive: true });
|
|
1664038
|
-
interactiveTaskContext.logger.debug(`Self-hosted GitHub mode: cloning ${selfhostedGithubConfig.uri} to ${absolutePathToLocalOutput}`);
|
|
1664039
|
-
try {
|
|
1664040
|
-
const { execSync: execSync3 } = await import("child_process");
|
|
1664041
|
-
const gitPath = execSync3("which git 2>/dev/null || echo 'not found'", {
|
|
1664042
|
-
encoding: "utf-8"
|
|
1664043
|
-
}).trim();
|
|
1664044
|
-
const gitVersion = execSync3("git --version 2>/dev/null || echo 'unknown'", {
|
|
1664045
|
-
encoding: "utf-8"
|
|
1664046
|
-
}).trim();
|
|
1664047
|
-
interactiveTaskContext.logger.debug(`Git environment: path=${gitPath}, version=${gitVersion}, PATH=${process.env.PATH ?? "unset"}`);
|
|
1664048
|
-
} catch {
|
|
1664049
|
-
interactiveTaskContext.logger.debug(`Git environment: unable to determine git info, PATH=${process.env.PATH ?? "unset"}`);
|
|
1664050
|
-
}
|
|
1664051
1663849
|
try {
|
|
1664052
1663850
|
const repo = await cloneRepository({
|
|
1664053
1663851
|
githubRepository: selfhostedGithubConfig.uri,
|
|
@@ -1664979,25 +1664777,22 @@ var LegacyGeneratorInvocationAdapter = class {
|
|
|
1664979
1664777
|
const git = target.output.git;
|
|
1664980
1664778
|
const repository = parseRepository2(git.repository);
|
|
1664981
1664779
|
const license = git.license != null ? await this.convertLicense(git.license) : void 0;
|
|
1664982
|
-
|
|
1664983
|
-
const reviewers = this.buildReviewers(git.reviewers);
|
|
1664984
|
-
const mode = git.mode ?? "pr";
|
|
1664985
|
-
switch (mode) {
|
|
1664780
|
+
switch (git.mode) {
|
|
1664986
1664781
|
case "pr":
|
|
1664987
1664782
|
return import_fiddle_sdk6.FernFiddle.remoteGen.OutputMode.githubV2(import_fiddle_sdk6.FernFiddle.GithubOutputModeV2.pullRequest({
|
|
1664988
1664783
|
owner: repository.owner,
|
|
1664989
1664784
|
repo: repository.repo,
|
|
1664990
1664785
|
license,
|
|
1664991
|
-
publishInfo,
|
|
1664992
|
-
|
|
1664993
|
-
|
|
1664786
|
+
publishInfo: void 0,
|
|
1664787
|
+
downloadSnippets: void 0,
|
|
1664788
|
+
reviewers: void 0
|
|
1664994
1664789
|
}));
|
|
1664995
1664790
|
case "release":
|
|
1664996
1664791
|
return import_fiddle_sdk6.FernFiddle.remoteGen.OutputMode.githubV2(import_fiddle_sdk6.FernFiddle.GithubOutputModeV2.commitAndRelease({
|
|
1664997
1664792
|
owner: repository.owner,
|
|
1664998
1664793
|
repo: repository.repo,
|
|
1664999
1664794
|
license,
|
|
1665000
|
-
publishInfo,
|
|
1664795
|
+
publishInfo: void 0,
|
|
1665001
1664796
|
downloadSnippets: void 0
|
|
1665002
1664797
|
}));
|
|
1665003
1664798
|
case "push":
|
|
@@ -1665006,122 +1664801,36 @@ var LegacyGeneratorInvocationAdapter = class {
|
|
|
1665006
1664801
|
repo: repository.repo,
|
|
1665007
1664802
|
branch: git.branch,
|
|
1665008
1664803
|
license,
|
|
1665009
|
-
publishInfo,
|
|
1664804
|
+
publishInfo: void 0,
|
|
1665010
1664805
|
downloadSnippets: void 0
|
|
1665011
1664806
|
}));
|
|
1665012
1664807
|
default:
|
|
1665013
|
-
assertNever(mode);
|
|
1664808
|
+
assertNever(git.mode);
|
|
1665014
1664809
|
}
|
|
1665015
1664810
|
}
|
|
1665016
1664811
|
return import_fiddle_sdk6.FernFiddle.remoteGen.OutputMode.downloadFiles({});
|
|
1665017
1664812
|
}
|
|
1665018
|
-
buildPublishInfo(publish2) {
|
|
1665019
|
-
if (publish2.npm != null) {
|
|
1665020
|
-
return this.buildNpmPublishInfo(publish2.npm);
|
|
1665021
|
-
}
|
|
1665022
|
-
if (publish2.pypi != null) {
|
|
1665023
|
-
return this.buildPypiPublishInfo(publish2.pypi);
|
|
1665024
|
-
}
|
|
1665025
|
-
if (publish2.maven != null) {
|
|
1665026
|
-
return this.buildMavenPublishInfo(publish2.maven);
|
|
1665027
|
-
}
|
|
1665028
|
-
if (publish2.nuget != null) {
|
|
1665029
|
-
return this.buildNugetPublishInfo(publish2.nuget);
|
|
1665030
|
-
}
|
|
1665031
|
-
if (publish2.rubygems != null) {
|
|
1665032
|
-
return this.buildRubygemsPublishInfo(publish2.rubygems);
|
|
1665033
|
-
}
|
|
1665034
|
-
if (publish2.crates != null) {
|
|
1665035
|
-
return this.buildCratesPublishInfo(publish2.crates);
|
|
1665036
|
-
}
|
|
1665037
|
-
return void 0;
|
|
1665038
|
-
}
|
|
1665039
|
-
buildNpmPublishInfo(npm) {
|
|
1665040
|
-
return import_fiddle_sdk6.FernFiddle.GithubPublishInfo.npm({
|
|
1665041
|
-
registryUrl: npm.url ?? "https://registry.npmjs.org",
|
|
1665042
|
-
packageName: npm.packageName,
|
|
1665043
|
-
token: npm.token
|
|
1665044
|
-
});
|
|
1665045
|
-
}
|
|
1665046
|
-
buildPypiPublishInfo(pypi) {
|
|
1665047
|
-
return import_fiddle_sdk6.FernFiddle.GithubPublishInfo.pypi({
|
|
1665048
|
-
registryUrl: pypi.url ?? "https://upload.pypi.org/legacy/",
|
|
1665049
|
-
packageName: pypi.packageName,
|
|
1665050
|
-
credentials: pypi.token != null ? { username: "__token__", password: pypi.token } : pypi.username != null && pypi.password != null ? { username: pypi.username, password: pypi.password } : void 0,
|
|
1665051
|
-
pypiMetadata: pypi.metadata != null ? {
|
|
1665052
|
-
keywords: pypi.metadata.keywords,
|
|
1665053
|
-
documentationLink: pypi.metadata.documentationLink,
|
|
1665054
|
-
homepageLink: pypi.metadata.homepageLink
|
|
1665055
|
-
} : void 0
|
|
1665056
|
-
});
|
|
1665057
|
-
}
|
|
1665058
|
-
buildMavenPublishInfo(maven) {
|
|
1665059
|
-
return import_fiddle_sdk6.FernFiddle.GithubPublishInfo.maven({
|
|
1665060
|
-
registryUrl: maven.url ?? "https://s01.oss.sonatype.org/content/repositories/releases/",
|
|
1665061
|
-
coordinate: maven.coordinate,
|
|
1665062
|
-
credentials: maven.username != null && maven.password != null ? { username: maven.username, password: maven.password } : void 0,
|
|
1665063
|
-
signature: maven.signature != null ? {
|
|
1665064
|
-
keyId: maven.signature.keyId,
|
|
1665065
|
-
password: maven.signature.password,
|
|
1665066
|
-
secretKey: maven.signature.secretKey
|
|
1665067
|
-
} : void 0
|
|
1665068
|
-
});
|
|
1665069
|
-
}
|
|
1665070
|
-
buildNugetPublishInfo(nuget) {
|
|
1665071
|
-
return import_fiddle_sdk6.FernFiddle.GithubPublishInfo.nuget({
|
|
1665072
|
-
registryUrl: nuget.url ?? "https://nuget.org/",
|
|
1665073
|
-
packageName: nuget.packageName,
|
|
1665074
|
-
apiKey: nuget.apiKey
|
|
1665075
|
-
});
|
|
1665076
|
-
}
|
|
1665077
|
-
buildRubygemsPublishInfo(rubygems) {
|
|
1665078
|
-
return import_fiddle_sdk6.FernFiddle.GithubPublishInfo.rubygems({
|
|
1665079
|
-
registryUrl: rubygems.url ?? "https://rubygems.org/",
|
|
1665080
|
-
packageName: rubygems.packageName,
|
|
1665081
|
-
apiKey: rubygems.apiKey
|
|
1665082
|
-
});
|
|
1665083
|
-
}
|
|
1665084
|
-
buildCratesPublishInfo(crates) {
|
|
1665085
|
-
return import_fiddle_sdk6.FernFiddle.GithubPublishInfo.crates({
|
|
1665086
|
-
registryUrl: crates.url ?? "https://crates.io/api/v1/crates",
|
|
1665087
|
-
packageName: crates.packageName,
|
|
1665088
|
-
token: crates.token
|
|
1665089
|
-
});
|
|
1665090
|
-
}
|
|
1665091
|
-
buildReviewers(reviewers) {
|
|
1665092
|
-
if (reviewers == null) {
|
|
1665093
|
-
return void 0;
|
|
1665094
|
-
}
|
|
1665095
|
-
const result = [];
|
|
1665096
|
-
if (reviewers.teams != null) {
|
|
1665097
|
-
for (const team of reviewers.teams) {
|
|
1665098
|
-
result.push(import_fiddle_sdk6.FernFiddle.GithubPullRequestReviewer.team({ name: team }));
|
|
1665099
|
-
}
|
|
1665100
|
-
}
|
|
1665101
|
-
if (reviewers.users != null) {
|
|
1665102
|
-
for (const user of reviewers.users) {
|
|
1665103
|
-
result.push(import_fiddle_sdk6.FernFiddle.GithubPullRequestReviewer.user({ name: user }));
|
|
1665104
|
-
}
|
|
1665105
|
-
}
|
|
1665106
|
-
return result.length > 0 ? result : void 0;
|
|
1665107
|
-
}
|
|
1665108
1664813
|
async convertLicense(license) {
|
|
1665109
|
-
|
|
1665110
|
-
|
|
1665111
|
-
|
|
1665112
|
-
|
|
1665113
|
-
|
|
1665114
|
-
|
|
1665115
|
-
|
|
1665116
|
-
|
|
1665117
|
-
|
|
1665118
|
-
|
|
1665119
|
-
|
|
1665120
|
-
|
|
1665121
|
-
|
|
1664814
|
+
switch (license.type) {
|
|
1664815
|
+
case "MIT":
|
|
1664816
|
+
return import_fiddle_sdk6.FernFiddle.GithubLicense.basic({
|
|
1664817
|
+
id: import_fiddle_sdk6.FernFiddle.GithubLicenseId.Mit
|
|
1664818
|
+
});
|
|
1664819
|
+
case "Apache-2.0":
|
|
1664820
|
+
return import_fiddle_sdk6.FernFiddle.GithubLicense.basic({
|
|
1664821
|
+
id: import_fiddle_sdk6.FernFiddle.GithubLicenseId.Apache
|
|
1664822
|
+
});
|
|
1664823
|
+
case "custom": {
|
|
1664824
|
+
const absolutePath = join4(this.context.cwd, RelativeFilePath2.of(license.path));
|
|
1664825
|
+
if (!await doesPathExist(absolutePath, "file")) {
|
|
1664826
|
+
throw new Error(`Custom license file "${absolutePath}" does not exist; did you mean to use either MIT or Apache-2.0?`);
|
|
1664827
|
+
}
|
|
1664828
|
+
const contents = await (0, import_promises68.readFile)(absolutePath, "utf-8");
|
|
1664829
|
+
return import_fiddle_sdk6.FernFiddle.GithubLicense.custom({ contents });
|
|
1664830
|
+
}
|
|
1664831
|
+
default:
|
|
1664832
|
+
assertNever(license);
|
|
1665122
1664833
|
}
|
|
1665123
|
-
const contents = await (0, import_promises68.readFile)(absolutePath, "utf-8");
|
|
1665124
|
-
return import_fiddle_sdk6.FernFiddle.GithubLicense.custom({ contents });
|
|
1665125
1664834
|
}
|
|
1665126
1664835
|
mapLanguage(lang) {
|
|
1665127
1664836
|
const languageMap = {
|
|
@@ -1666135,10 +1665844,9 @@ var SdkConfigConverter = class {
|
|
|
1666135
1665844
|
version: generatorInfo.version,
|
|
1666136
1665845
|
api: this.resolveApi({ api: target.api }),
|
|
1666137
1665846
|
config: target.config != null ? this.convertConfig(target.config) : void 0,
|
|
1666138
|
-
output: target.output,
|
|
1666139
|
-
publish: target.publish,
|
|
1666140
|
-
groups: target.group ?? []
|
|
1666141
|
-
metadata: target.metadata
|
|
1665847
|
+
output: this.convertOutput({ output: target.output, sourced: sourced.output }),
|
|
1665848
|
+
publish: target.publish != null && !isNullish(sourced.publish) ? this.convertPublish({ publish: target.publish, sourced: sourced.publish }) : void 0,
|
|
1665849
|
+
groups: target.group ?? []
|
|
1666142
1665850
|
};
|
|
1666143
1665851
|
}
|
|
1666144
1665852
|
resolveApi({ api }) {
|
|
@@ -1666159,6 +1665867,36 @@ var SdkConfigConverter = class {
|
|
|
1666159
1665867
|
convertConfig(config3) {
|
|
1666160
1665868
|
return config3;
|
|
1666161
1665869
|
}
|
|
1665870
|
+
convertOutput({ output: output2, sourced }) {
|
|
1665871
|
+
return {
|
|
1665872
|
+
path: output2.path,
|
|
1665873
|
+
git: output2.git != null && !isNullish(sourced.git) ? this.convertGit({ git: output2.git, sourced: sourced.git }) : void 0
|
|
1665874
|
+
};
|
|
1665875
|
+
}
|
|
1665876
|
+
convertGit({ git, sourced: _sourced }) {
|
|
1665877
|
+
return {
|
|
1665878
|
+
repository: git.repository,
|
|
1665879
|
+
mode: git.mode ?? "pr",
|
|
1665880
|
+
branch: git.branch,
|
|
1665881
|
+
license: git.license != null ? this.convertLicense(git.license) : void 0
|
|
1665882
|
+
};
|
|
1665883
|
+
}
|
|
1665884
|
+
convertLicense(license) {
|
|
1665885
|
+
if (schemas_exports4.isWellKnownLicense(license)) {
|
|
1665886
|
+
return { type: license };
|
|
1665887
|
+
}
|
|
1665888
|
+
return { type: "custom", path: license };
|
|
1665889
|
+
}
|
|
1665890
|
+
convertPublish({ publish: publish2, sourced }) {
|
|
1665891
|
+
return {
|
|
1665892
|
+
npm: publish2.npm != null && !isNullish(sourced.npm) ? this.convertNpm({ npm: publish2.npm, sourced: sourced.npm }) : void 0
|
|
1665893
|
+
};
|
|
1665894
|
+
}
|
|
1665895
|
+
convertNpm({ npm, sourced: _sourced }) {
|
|
1665896
|
+
return {
|
|
1665897
|
+
packageName: npm.packageName
|
|
1665898
|
+
};
|
|
1665899
|
+
}
|
|
1666162
1665900
|
resolveLanguage({ name: name3, target, sourced }) {
|
|
1666163
1665901
|
if (target.lang != null) {
|
|
1666164
1665902
|
return target.lang;
|
|
@@ -1668263,7 +1668001,7 @@ var import_yoctocolors_cjs11 = __toESM(require_yoctocolors_cjs(), 1);
|
|
|
1668263
1668001
|
|
|
1668264
1668002
|
// ../../../node_modules/.pnpm/@inquirer+external-editor@1.0.3_@types+node@18.15.3/node_modules/@inquirer/external-editor/dist/esm/index.js
|
|
1668265
1668003
|
var import_chardet = __toESM(require_lib11(), 1);
|
|
1668266
|
-
var
|
|
1668004
|
+
var import_child_process3 = require("child_process");
|
|
1668267
1668005
|
var import_fs20 = require("fs");
|
|
1668268
1668006
|
var import_node_path16 = __toESM(require("path"), 1);
|
|
1668269
1668007
|
var import_node_os2 = __toESM(require("os"), 1);
|
|
@@ -1668441,7 +1668179,7 @@ var ExternalEditor = class {
|
|
|
1668441
1668179
|
}
|
|
1668442
1668180
|
launchEditor() {
|
|
1668443
1668181
|
try {
|
|
1668444
|
-
const editorProcess = (0,
|
|
1668182
|
+
const editorProcess = (0, import_child_process3.spawnSync)(this.editor.bin, this.editor.args.concat([this.tempFile]), { stdio: "inherit" });
|
|
1668445
1668183
|
this.lastExitStatus = editorProcess.status ?? 0;
|
|
1668446
1668184
|
} catch (launchError) {
|
|
1668447
1668185
|
throw new LaunchEditorError(launchError);
|
|
@@ -1668449,7 +1668187,7 @@ var ExternalEditor = class {
|
|
|
1668449
1668187
|
}
|
|
1668450
1668188
|
launchEditorAsync(callback) {
|
|
1668451
1668189
|
try {
|
|
1668452
|
-
const editorProcess = (0,
|
|
1668190
|
+
const editorProcess = (0, import_child_process3.spawn)(this.editor.bin, this.editor.args.concat([this.tempFile]), { stdio: "inherit" });
|
|
1668453
1668191
|
editorProcess.on("exit", (code6) => {
|
|
1668454
1668192
|
this.lastExitStatus = code6;
|
|
1668455
1668193
|
setImmediate(callback);
|
|
@@ -1672661,7 +1672399,7 @@ var AccessTokenPosthogManager = class {
|
|
|
1672661
1672399
|
properties: {
|
|
1672662
1672400
|
...event,
|
|
1672663
1672401
|
...event.properties,
|
|
1672664
|
-
version: "3.56.
|
|
1672402
|
+
version: "3.56.8-1-gfc5c352b0bc",
|
|
1672665
1672403
|
usingAccessToken: true
|
|
1672666
1672404
|
}
|
|
1672667
1672405
|
});
|
|
@@ -1672711,7 +1672449,7 @@ var UserPosthogManager = class {
|
|
|
1672711
1672449
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
1672712
1672450
|
event: "CLI",
|
|
1672713
1672451
|
properties: {
|
|
1672714
|
-
version: "3.56.
|
|
1672452
|
+
version: "3.56.8-1-gfc5c352b0bc",
|
|
1672715
1672453
|
...event,
|
|
1672716
1672454
|
...event.properties,
|
|
1672717
1672455
|
usingAccessToken: false,
|
|
@@ -1704633,7 +1704371,7 @@ var CliContext = class {
|
|
|
1704633
1704371
|
if (false) {
|
|
1704634
1704372
|
this.logger.error("CLI_VERSION is not defined");
|
|
1704635
1704373
|
}
|
|
1704636
|
-
return "3.56.
|
|
1704374
|
+
return "3.56.8-1-gfc5c352b0bc";
|
|
1704637
1704375
|
}
|
|
1704638
1704376
|
getCliName() {
|
|
1704639
1704377
|
if (false) {
|
|
@@ -1707747,7 +1707485,7 @@ var import_path54 = __toESM(require("path"), 1);
|
|
|
1707747
1707485
|
var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
1707748
1707486
|
var LOGS_FOLDER_NAME = "logs";
|
|
1707749
1707487
|
function getCliSource() {
|
|
1707750
|
-
const version7 = "3.56.
|
|
1707488
|
+
const version7 = "3.56.8-1-gfc5c352b0bc";
|
|
1707751
1707489
|
return `cli@${version7}`;
|
|
1707752
1707490
|
}
|
|
1707753
1707491
|
var DebugLogger = class {
|
|
@@ -1725286,8 +1725024,7 @@ async function listDocsPreview({
|
|
|
1725286
1725024
|
const fdr = createFdrService({ token: token.value });
|
|
1725287
1725025
|
const listResponse = await fdr.docs.v2.read.listAllDocsUrls({
|
|
1725288
1725026
|
page,
|
|
1725289
|
-
limit: limit ?? 100
|
|
1725290
|
-
preview: true
|
|
1725027
|
+
limit: limit ?? 100
|
|
1725291
1725028
|
});
|
|
1725292
1725029
|
if (!listResponse.ok) {
|
|
1725293
1725030
|
return context2.failAndThrow("Failed to fetch docs URLs", listResponse.error);
|
|
@@ -1735096,9 +1734833,9 @@ function getAIEnhancerConfig2() {
|
|
|
1735096
1734833
|
}
|
|
1735097
1734834
|
|
|
1735098
1734835
|
// src/commands/sdk-diff/sdkDiffCommand.ts
|
|
1735099
|
-
var
|
|
1734836
|
+
var import_child_process4 = require("child_process");
|
|
1735100
1734837
|
var import_util64 = require("util");
|
|
1735101
|
-
var execAsync = (0, import_util64.promisify)(
|
|
1734838
|
+
var execAsync = (0, import_util64.promisify)(import_child_process4.exec);
|
|
1735102
1734839
|
async function getClientRegistry(context2, project) {
|
|
1735103
1734840
|
const workspace = project.apiWorkspaces[0];
|
|
1735104
1734841
|
if (workspace == null) {
|
package/package.json
CHANGED