fern-api 0.40.1 → 0.40.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle.cjs +174 -8
- package/package.json +1 -1
package/bundle.cjs
CHANGED
|
@@ -1205537,7 +1205537,8 @@ var NugetOutputLocationSchema = z.strictObject({
|
|
|
1205537
1205537
|
var PostmanOutputLocationSchema = z.strictObject({
|
|
1205538
1205538
|
location: z.literal("postman"),
|
|
1205539
1205539
|
"api-key": z.string(),
|
|
1205540
|
-
"workspace-id": z.string()
|
|
1205540
|
+
"workspace-id": z.string(),
|
|
1205541
|
+
"collection-id": z.string().optional()
|
|
1205541
1205542
|
});
|
|
1205542
1205543
|
|
|
1205543
1205544
|
// ../configuration/lib/generators-yml/schemas/OutputMetadataSchema.js
|
|
@@ -1205964,6 +1205965,7 @@ async function convertGroup({ absolutePathToGeneratorsConfiguration, groupName,
|
|
|
1205964
1205965
|
async function convertGenerator({ absolutePathToGeneratorsConfiguration, generator, maybeGroupLevelMetadata, maybeTopLevelMetadata, maybeGroupLevelReviewers, maybeTopLevelReviewers, readme }) {
|
|
1205965
1205966
|
var _a6, _b4, _c4;
|
|
1205966
1205967
|
return {
|
|
1205968
|
+
raw: generator,
|
|
1205967
1205969
|
name: generator.name,
|
|
1205968
1205970
|
version: generator.version,
|
|
1205969
1205971
|
config: generator.config,
|
|
@@ -1208720,7 +1208722,7 @@ var AccessTokenPosthogManager = class {
|
|
|
1208720
1208722
|
properties: {
|
|
1208721
1208723
|
...event,
|
|
1208722
1208724
|
...event.properties,
|
|
1208723
|
-
version: "0.40.
|
|
1208725
|
+
version: "0.40.2",
|
|
1208724
1208726
|
usingAccessToken: true
|
|
1208725
1208727
|
}
|
|
1208726
1208728
|
});
|
|
@@ -1208782,7 +1208784,7 @@ var UserPosthogManager = class {
|
|
|
1208782
1208784
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
1208783
1208785
|
event: "CLI",
|
|
1208784
1208786
|
properties: {
|
|
1208785
|
-
version: "0.40.
|
|
1208787
|
+
version: "0.40.2",
|
|
1208786
1208788
|
...event,
|
|
1208787
1208789
|
...event.properties
|
|
1208788
1208790
|
}
|
|
@@ -1213865,10 +1213867,10 @@ var CliContext = class {
|
|
|
1213865
1213867
|
return "fern-api";
|
|
1213866
1213868
|
}
|
|
1213867
1213869
|
getPackageVersion() {
|
|
1213868
|
-
if ("0.40.
|
|
1213870
|
+
if ("0.40.2" == null) {
|
|
1213869
1213871
|
this.logger.error("CLI_VERSION is not defined");
|
|
1213870
1213872
|
}
|
|
1213871
|
-
return "0.40.
|
|
1213873
|
+
return "0.40.2";
|
|
1213872
1213874
|
}
|
|
1213873
1213875
|
getCliName() {
|
|
1213874
1213876
|
if ("fern" == null) {
|
|
@@ -1216211,6 +1216213,8 @@ __export(api_exports4, {
|
|
|
1216211
1216213
|
PrimitiveTypeV1: () => PrimitiveTypeV1,
|
|
1216212
1216214
|
PrimitiveTypeV2: () => PrimitiveTypeV2,
|
|
1216213
1216215
|
ProtobufType: () => ProtobufType,
|
|
1216216
|
+
PublishTarget: () => PublishTarget,
|
|
1216217
|
+
PublishingConfig: () => PublishingConfig,
|
|
1216214
1216218
|
RequestPropertyValue: () => RequestPropertyValue,
|
|
1216215
1216219
|
ResolvedTypeReference: () => ResolvedTypeReference,
|
|
1216216
1216220
|
SdkRequestBodyType: () => SdkRequestBodyType,
|
|
@@ -1216236,6 +1216240,7 @@ __export(api_exports4, {
|
|
|
1216236
1216240
|
http: () => http_exports,
|
|
1216237
1216241
|
ir: () => ir_exports,
|
|
1216238
1216242
|
proto: () => proto_exports,
|
|
1216243
|
+
publish: () => publish_exports,
|
|
1216239
1216244
|
types: () => types_exports,
|
|
1216240
1216245
|
variables: () => variables_exports,
|
|
1216241
1216246
|
webhooks: () => webhooks_exports,
|
|
@@ -1217629,6 +1217634,66 @@ var WellKnownProtobufType = {
|
|
|
1217629
1217634
|
}
|
|
1217630
1217635
|
};
|
|
1217631
1217636
|
|
|
1217637
|
+
// ../../ir-sdk/lib/sdk/api/resources/publish/index.js
|
|
1217638
|
+
var publish_exports = {};
|
|
1217639
|
+
__export(publish_exports, {
|
|
1217640
|
+
PublishTarget: () => PublishTarget,
|
|
1217641
|
+
PublishingConfig: () => PublishingConfig
|
|
1217642
|
+
});
|
|
1217643
|
+
|
|
1217644
|
+
// ../../ir-sdk/lib/sdk/api/resources/publish/types/PublishingConfig.js
|
|
1217645
|
+
var PublishingConfig = {
|
|
1217646
|
+
github: (value) => {
|
|
1217647
|
+
return {
|
|
1217648
|
+
...value,
|
|
1217649
|
+
type: "github",
|
|
1217650
|
+
_visit: function(visitor) {
|
|
1217651
|
+
return PublishingConfig._visit(this, visitor);
|
|
1217652
|
+
}
|
|
1217653
|
+
};
|
|
1217654
|
+
},
|
|
1217655
|
+
direct: (value) => {
|
|
1217656
|
+
return {
|
|
1217657
|
+
...value,
|
|
1217658
|
+
type: "direct",
|
|
1217659
|
+
_visit: function(visitor) {
|
|
1217660
|
+
return PublishingConfig._visit(this, visitor);
|
|
1217661
|
+
}
|
|
1217662
|
+
};
|
|
1217663
|
+
},
|
|
1217664
|
+
_visit: (value, visitor) => {
|
|
1217665
|
+
switch (value.type) {
|
|
1217666
|
+
case "github":
|
|
1217667
|
+
return visitor.github(value);
|
|
1217668
|
+
case "direct":
|
|
1217669
|
+
return visitor.direct(value);
|
|
1217670
|
+
default:
|
|
1217671
|
+
return visitor._other(value);
|
|
1217672
|
+
}
|
|
1217673
|
+
}
|
|
1217674
|
+
};
|
|
1217675
|
+
|
|
1217676
|
+
// ../../ir-sdk/lib/sdk/api/resources/publish/types/PublishTarget.js
|
|
1217677
|
+
var PublishTarget = {
|
|
1217678
|
+
postman: (value) => {
|
|
1217679
|
+
return {
|
|
1217680
|
+
...value,
|
|
1217681
|
+
type: "postman",
|
|
1217682
|
+
_visit: function(visitor) {
|
|
1217683
|
+
return PublishTarget._visit(this, visitor);
|
|
1217684
|
+
}
|
|
1217685
|
+
};
|
|
1217686
|
+
},
|
|
1217687
|
+
_visit: (value, visitor) => {
|
|
1217688
|
+
switch (value.type) {
|
|
1217689
|
+
case "postman":
|
|
1217690
|
+
return visitor.postman(value);
|
|
1217691
|
+
default:
|
|
1217692
|
+
return visitor._other(value);
|
|
1217693
|
+
}
|
|
1217694
|
+
}
|
|
1217695
|
+
};
|
|
1217696
|
+
|
|
1217632
1217697
|
// ../../ir-sdk/lib/sdk/api/resources/types/index.js
|
|
1217633
1217698
|
var types_exports = {};
|
|
1217634
1217699
|
__export(types_exports, {
|
|
@@ -1218780,6 +1218845,7 @@ __export(serialization_exports2, {
|
|
|
1218780
1218845
|
DeclaredErrorName: () => DeclaredErrorName,
|
|
1218781
1218846
|
DeclaredServiceName: () => DeclaredServiceName,
|
|
1218782
1218847
|
DeclaredTypeName: () => DeclaredTypeName,
|
|
1218848
|
+
DirectPublish: () => DirectPublish,
|
|
1218783
1218849
|
DoubleType: () => DoubleType,
|
|
1218784
1218850
|
DoubleValidationRules: () => DoubleValidationRules,
|
|
1218785
1218851
|
Encoding: () => Encoding,
|
|
@@ -1218854,6 +1218920,7 @@ __export(serialization_exports2, {
|
|
|
1218854
1218920
|
FileUploadRequest: () => FileUploadRequest,
|
|
1218855
1218921
|
FileUploadRequestProperty: () => FileUploadRequestProperty2,
|
|
1218856
1218922
|
FloatType: () => FloatType,
|
|
1218923
|
+
GithubPublish: () => GithubPublish,
|
|
1218857
1218924
|
GrpcTransport: () => GrpcTransport,
|
|
1218858
1218925
|
HeaderApiVersionScheme: () => HeaderApiVersionScheme,
|
|
1218859
1218926
|
HeaderAuthScheme: () => HeaderAuthScheme,
|
|
@@ -1218908,6 +1218975,7 @@ __export(serialization_exports2, {
|
|
|
1218908
1218975
|
PathParameter: () => PathParameter,
|
|
1218909
1218976
|
PathParameterLocation: () => PathParameterLocation2,
|
|
1218910
1218977
|
PlatformHeaders: () => PlatformHeaders,
|
|
1218978
|
+
PostmanPublishTarget: () => PostmanPublishTarget,
|
|
1218911
1218979
|
PrimitiveType: () => PrimitiveType,
|
|
1218912
1218980
|
PrimitiveTypeV1: () => PrimitiveTypeV12,
|
|
1218913
1218981
|
PrimitiveTypeV2: () => PrimitiveTypeV22,
|
|
@@ -1218917,6 +1218985,8 @@ __export(serialization_exports2, {
|
|
|
1218917
1218985
|
ProtobufFileOptions: () => ProtobufFileOptions,
|
|
1218918
1218986
|
ProtobufService: () => ProtobufService,
|
|
1218919
1218987
|
ProtobufType: () => ProtobufType2,
|
|
1218988
|
+
PublishTarget: () => PublishTarget2,
|
|
1218989
|
+
PublishingConfig: () => PublishingConfig2,
|
|
1218920
1218990
|
QueryParameter: () => QueryParameter,
|
|
1218921
1218991
|
ReadmeConfig: () => ReadmeConfig,
|
|
1218922
1218992
|
RequestProperty: () => RequestProperty,
|
|
@@ -1218995,6 +1219065,7 @@ __export(serialization_exports2, {
|
|
|
1218995
1219065
|
http: () => http_exports2,
|
|
1218996
1219066
|
ir: () => ir_exports2,
|
|
1218997
1219067
|
proto: () => proto_exports2,
|
|
1219068
|
+
publish: () => publish_exports2,
|
|
1218998
1219069
|
types: () => types_exports2,
|
|
1218999
1219070
|
variables: () => variables_exports2,
|
|
1219000
1219071
|
webhooks: () => webhooks_exports2,
|
|
@@ -1222111,6 +1222182,58 @@ var SourceConfig = schemas_exports4.objectWithoutOptionalProperties({
|
|
|
1222111
1222182
|
sources: schemas_exports4.list(ApiDefinitionSource2)
|
|
1222112
1222183
|
});
|
|
1222113
1222184
|
|
|
1222185
|
+
// ../../ir-sdk/lib/sdk/serialization/resources/publish/types/PostmanPublishTarget.js
|
|
1222186
|
+
var PostmanPublishTarget = schemas_exports4.objectWithoutOptionalProperties({
|
|
1222187
|
+
apiKey: schemas_exports4.string(),
|
|
1222188
|
+
workspaceId: schemas_exports4.string(),
|
|
1222189
|
+
collectionId: schemas_exports4.string().optional()
|
|
1222190
|
+
});
|
|
1222191
|
+
|
|
1222192
|
+
// ../../ir-sdk/lib/sdk/serialization/resources/publish/types/PublishTarget.js
|
|
1222193
|
+
var PublishTarget2 = schemas_exports4.union("type", {
|
|
1222194
|
+
postman: PostmanPublishTarget
|
|
1222195
|
+
}).transform({
|
|
1222196
|
+
transform: (value) => {
|
|
1222197
|
+
switch (value.type) {
|
|
1222198
|
+
case "postman":
|
|
1222199
|
+
return PublishTarget.postman(value);
|
|
1222200
|
+
default:
|
|
1222201
|
+
return value;
|
|
1222202
|
+
}
|
|
1222203
|
+
},
|
|
1222204
|
+
untransform: ({ _visit, ...value }) => value
|
|
1222205
|
+
});
|
|
1222206
|
+
|
|
1222207
|
+
// ../../ir-sdk/lib/sdk/serialization/resources/publish/types/GithubPublish.js
|
|
1222208
|
+
var GithubPublish = schemas_exports4.objectWithoutOptionalProperties({
|
|
1222209
|
+
owner: schemas_exports4.string(),
|
|
1222210
|
+
repo: schemas_exports4.string(),
|
|
1222211
|
+
target: PublishTarget2
|
|
1222212
|
+
});
|
|
1222213
|
+
|
|
1222214
|
+
// ../../ir-sdk/lib/sdk/serialization/resources/publish/types/DirectPublish.js
|
|
1222215
|
+
var DirectPublish = schemas_exports4.objectWithoutOptionalProperties({
|
|
1222216
|
+
target: PublishTarget2
|
|
1222217
|
+
});
|
|
1222218
|
+
|
|
1222219
|
+
// ../../ir-sdk/lib/sdk/serialization/resources/publish/types/PublishingConfig.js
|
|
1222220
|
+
var PublishingConfig2 = schemas_exports4.union("type", {
|
|
1222221
|
+
github: GithubPublish,
|
|
1222222
|
+
direct: DirectPublish
|
|
1222223
|
+
}).transform({
|
|
1222224
|
+
transform: (value) => {
|
|
1222225
|
+
switch (value.type) {
|
|
1222226
|
+
case "github":
|
|
1222227
|
+
return PublishingConfig.github(value);
|
|
1222228
|
+
case "direct":
|
|
1222229
|
+
return PublishingConfig.direct(value);
|
|
1222230
|
+
default:
|
|
1222231
|
+
return value;
|
|
1222232
|
+
}
|
|
1222233
|
+
},
|
|
1222234
|
+
untransform: ({ _visit, ...value }) => value
|
|
1222235
|
+
});
|
|
1222236
|
+
|
|
1222114
1222237
|
// ../../ir-sdk/lib/sdk/serialization/resources/ir/types/IntermediateRepresentation.js
|
|
1222115
1222238
|
var IntermediateRepresentation = schemas_exports4.objectWithoutOptionalProperties({
|
|
1222116
1222239
|
fdrApiDefinitionId: schemas_exports4.string().optional(),
|
|
@@ -1222137,7 +1222260,8 @@ var IntermediateRepresentation = schemas_exports4.objectWithoutOptionalPropertie
|
|
|
1222137
1222260
|
variables: schemas_exports4.list(VariableDeclaration),
|
|
1222138
1222261
|
serviceTypeReferenceInfo: ServiceTypeReferenceInfo,
|
|
1222139
1222262
|
readmeConfig: ReadmeConfig.optional(),
|
|
1222140
|
-
sourceConfig: SourceConfig.optional()
|
|
1222263
|
+
sourceConfig: SourceConfig.optional(),
|
|
1222264
|
+
publishConfig: PublishingConfig2.optional()
|
|
1222141
1222265
|
});
|
|
1222142
1222266
|
|
|
1222143
1222267
|
// ../../ir-sdk/lib/sdk/serialization/resources/proto/index.js
|
|
@@ -1222152,6 +1222276,16 @@ __export(proto_exports2, {
|
|
|
1222152
1222276
|
WellKnownProtobufType: () => WellKnownProtobufType2
|
|
1222153
1222277
|
});
|
|
1222154
1222278
|
|
|
1222279
|
+
// ../../ir-sdk/lib/sdk/serialization/resources/publish/index.js
|
|
1222280
|
+
var publish_exports2 = {};
|
|
1222281
|
+
__export(publish_exports2, {
|
|
1222282
|
+
DirectPublish: () => DirectPublish,
|
|
1222283
|
+
GithubPublish: () => GithubPublish,
|
|
1222284
|
+
PostmanPublishTarget: () => PostmanPublishTarget,
|
|
1222285
|
+
PublishTarget: () => PublishTarget2,
|
|
1222286
|
+
PublishingConfig: () => PublishingConfig2
|
|
1222287
|
+
});
|
|
1222288
|
+
|
|
1222155
1222289
|
// ../../ir-sdk/lib/sdk/serialization/resources/types/index.js
|
|
1222156
1222290
|
var types_exports2 = {};
|
|
1222157
1222291
|
__export(types_exports2, {
|
|
@@ -1261124,7 +1261258,8 @@ async function generateIntermediateRepresentation({ fdrApiDefinitionId, workspac
|
|
|
1261124
1261258
|
webhookGroups: {},
|
|
1261125
1261259
|
websocketChannels: {},
|
|
1261126
1261260
|
readmeConfig: void 0,
|
|
1261127
|
-
sourceConfig: void 0
|
|
1261261
|
+
sourceConfig: void 0,
|
|
1261262
|
+
publishConfig: void 0
|
|
1261128
1261263
|
};
|
|
1261129
1261264
|
const packageTreeGenerator = new PackageTreeGenerator();
|
|
1261130
1261265
|
const visitDefinitionFile = async (file) => {
|
|
@@ -1323457,7 +1323592,7 @@ async function runRemoteGenerationForGenerator({ projectConfig, organization, wo
|
|
|
1323457
1323592
|
version: version3,
|
|
1323458
1323593
|
intermediateRepresentation: {
|
|
1323459
1323594
|
...ir,
|
|
1323460
|
-
|
|
1323595
|
+
publishConfig: getPublishConfig({ generatorInvocation })
|
|
1323461
1323596
|
},
|
|
1323462
1323597
|
shouldLogS3Url,
|
|
1323463
1323598
|
token,
|
|
@@ -1323486,6 +1323621,37 @@ async function runRemoteGenerationForGenerator({ projectConfig, organization, wo
|
|
|
1323486
1323621
|
context: interactiveTaskContext
|
|
1323487
1323622
|
});
|
|
1323488
1323623
|
}
|
|
1323624
|
+
function getPublishConfig({ generatorInvocation }) {
|
|
1323625
|
+
return generatorInvocation.outputMode._visit({
|
|
1323626
|
+
downloadFiles: () => void 0,
|
|
1323627
|
+
github: () => void 0,
|
|
1323628
|
+
githubV2: () => void 0,
|
|
1323629
|
+
publish: () => void 0,
|
|
1323630
|
+
publishV2: (value) => value._visit({
|
|
1323631
|
+
mavenOverride: () => void 0,
|
|
1323632
|
+
pypiOverride: () => void 0,
|
|
1323633
|
+
nugetOverride: () => void 0,
|
|
1323634
|
+
npmOverride: () => void 0,
|
|
1323635
|
+
rubyGemsOverride: () => void 0,
|
|
1323636
|
+
postman: (value2) => {
|
|
1323637
|
+
var _a6, _b4, _c4;
|
|
1323638
|
+
let collectionId = void 0;
|
|
1323639
|
+
if (((_b4 = (_a6 = generatorInvocation.raw) == null ? void 0 : _a6.output) == null ? void 0 : _b4.location) === "postman") {
|
|
1323640
|
+
collectionId = (_c4 = generatorInvocation.raw.output) == null ? void 0 : _c4["collection-id"];
|
|
1323641
|
+
}
|
|
1323642
|
+
return api_exports4.PublishingConfig.direct({
|
|
1323643
|
+
target: api_exports4.PublishTarget.postman({
|
|
1323644
|
+
apiKey: value2.apiKey,
|
|
1323645
|
+
workspaceId: value2.workspaceId,
|
|
1323646
|
+
collectionId
|
|
1323647
|
+
})
|
|
1323648
|
+
});
|
|
1323649
|
+
},
|
|
1323650
|
+
_other: () => void 0
|
|
1323651
|
+
}),
|
|
1323652
|
+
_other: () => void 0
|
|
1323653
|
+
});
|
|
1323654
|
+
}
|
|
1323489
1323655
|
async function computeSemanticVersion({ fdr, packageName, generatorInvocation }) {
|
|
1323490
1323656
|
if (generatorInvocation.language == null) {
|
|
1323491
1323657
|
return void 0;
|