@fern-api/fern-api-dev 4.81.0-13-g1d7c3cd6458 → 4.81.0-14-gacd656850ac
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 +94 -29
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -614668,7 +614668,7 @@ var AccessTokenPosthogManager = class {
|
|
|
614668
614668
|
properties: {
|
|
614669
614669
|
...event,
|
|
614670
614670
|
...event.properties,
|
|
614671
|
-
version: "4.81.0-
|
|
614671
|
+
version: "4.81.0-14-gacd656850ac",
|
|
614672
614672
|
usingAccessToken: true
|
|
614673
614673
|
}
|
|
614674
614674
|
});
|
|
@@ -614722,7 +614722,7 @@ var UserPosthogManager = class {
|
|
|
614722
614722
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
614723
614723
|
event: "CLI",
|
|
614724
614724
|
properties: {
|
|
614725
|
-
version: "4.81.0-
|
|
614725
|
+
version: "4.81.0-14-gacd656850ac",
|
|
614726
614726
|
...event,
|
|
614727
614727
|
...event.properties,
|
|
614728
614728
|
usingAccessToken: false,
|
|
@@ -788550,7 +788550,10 @@ var LambdaExampleEnhancer = class {
|
|
|
788550
788550
|
this.context = context3;
|
|
788551
788551
|
const lambdaOrigin = "https://ykq45y6fvnszd35iv5yuuatkze0rpwuz.lambda-url.us-east-1.on.aws";
|
|
788552
788552
|
if (!lambdaOrigin) {
|
|
788553
|
-
throw new
|
|
788553
|
+
throw new CliError({
|
|
788554
|
+
message: "DEFAULT_FDR_LAMBDA_DOCS_ORIGIN environment variable is not set. AI example enhancement requires this to be configured.",
|
|
788555
|
+
code: CliError.Code.EnvironmentError
|
|
788556
|
+
});
|
|
788554
788557
|
}
|
|
788555
788558
|
this.lambdaOrigin = lambdaOrigin;
|
|
788556
788559
|
this.venusOrigin = "https://venus-dev2.buildwithfern.com";
|
|
@@ -788619,7 +788622,10 @@ var LambdaExampleEnhancer = class {
|
|
|
788619
788622
|
});
|
|
788620
788623
|
if (!response.ok) {
|
|
788621
788624
|
const errorText = await response.text();
|
|
788622
|
-
throw new
|
|
788625
|
+
throw new CliError({
|
|
788626
|
+
message: `Failed to fetch JWT from Venus: ${response.status} ${errorText || response.statusText}`,
|
|
788627
|
+
code: CliError.Code.NetworkError
|
|
788628
|
+
});
|
|
788623
788629
|
}
|
|
788624
788630
|
const result = await response.json();
|
|
788625
788631
|
this.context.logger.debug(`Successfully obtained JWT from Venus (expires at ${result.expiresAt})`);
|
|
@@ -788681,7 +788687,10 @@ var LambdaExampleEnhancer = class {
|
|
|
788681
788687
|
});
|
|
788682
788688
|
if (!response.ok) {
|
|
788683
788689
|
const errorText = await response.text();
|
|
788684
|
-
throw new
|
|
788690
|
+
throw new CliError({
|
|
788691
|
+
message: `Lambda returned ${response.status}: ${errorText || response.statusText}`,
|
|
788692
|
+
code: CliError.Code.NetworkError
|
|
788693
|
+
});
|
|
788685
788694
|
}
|
|
788686
788695
|
const result = await response.json();
|
|
788687
788696
|
return {
|
|
@@ -790194,7 +790203,10 @@ function convertTypeShape(irType) {
|
|
|
790194
790203
|
extraProperties: void 0
|
|
790195
790204
|
}),
|
|
790196
790205
|
_other: () => {
|
|
790197
|
-
throw new
|
|
790206
|
+
throw new CliError({
|
|
790207
|
+
message: "Unknown SingleUnionTypeProperties: " + variant.shape.propertiesType,
|
|
790208
|
+
code: CliError.Code.InternalError
|
|
790209
|
+
});
|
|
790198
790210
|
}
|
|
790199
790211
|
})
|
|
790200
790212
|
};
|
|
@@ -790219,7 +790231,7 @@ function convertTypeShape(irType) {
|
|
|
790219
790231
|
};
|
|
790220
790232
|
},
|
|
790221
790233
|
_other: () => {
|
|
790222
|
-
throw new
|
|
790234
|
+
throw new CliError({ message: "Unknown Type shape: " + irType.type, code: CliError.Code.InternalError });
|
|
790223
790235
|
}
|
|
790224
790236
|
});
|
|
790225
790237
|
}
|
|
@@ -790286,12 +790298,18 @@ function convertTypeReference3(irTypeReference) {
|
|
|
790286
790298
|
};
|
|
790287
790299
|
},
|
|
790288
790300
|
_other: () => {
|
|
790289
|
-
throw new
|
|
790301
|
+
throw new CliError({
|
|
790302
|
+
message: "Unknown literal type: " + literal3.type,
|
|
790303
|
+
code: CliError.Code.InternalError
|
|
790304
|
+
});
|
|
790290
790305
|
}
|
|
790291
790306
|
});
|
|
790292
790307
|
},
|
|
790293
790308
|
_other: () => {
|
|
790294
|
-
throw new
|
|
790309
|
+
throw new CliError({
|
|
790310
|
+
message: "Unknown container reference: " + container.type,
|
|
790311
|
+
code: CliError.Code.InternalError
|
|
790312
|
+
});
|
|
790295
790313
|
}
|
|
790296
790314
|
});
|
|
790297
790315
|
},
|
|
@@ -790371,7 +790389,10 @@ function convertTypeReference3(irTypeReference) {
|
|
|
790371
790389
|
};
|
|
790372
790390
|
},
|
|
790373
790391
|
_other: () => {
|
|
790374
|
-
throw new
|
|
790392
|
+
throw new CliError({
|
|
790393
|
+
message: "Unknown primitive: " + primitive.v1,
|
|
790394
|
+
code: CliError.Code.InternalError
|
|
790395
|
+
});
|
|
790375
790396
|
}
|
|
790376
790397
|
})
|
|
790377
790398
|
};
|
|
@@ -790382,7 +790403,10 @@ function convertTypeReference3(irTypeReference) {
|
|
|
790382
790403
|
};
|
|
790383
790404
|
},
|
|
790384
790405
|
_other: () => {
|
|
790385
|
-
throw new
|
|
790406
|
+
throw new CliError({
|
|
790407
|
+
message: "Unknown Type reference: " + irTypeReference.type,
|
|
790408
|
+
code: CliError.Code.InternalError
|
|
790409
|
+
});
|
|
790386
790410
|
}
|
|
790387
790411
|
});
|
|
790388
790412
|
}
|
|
@@ -790846,7 +790870,10 @@ function convertIrEnvironments({ environmentsConfig, endpoint: endpoint3 }) {
|
|
|
790846
790870
|
return environmentsConfigValue.environments.map((singleBaseUrlEnvironment) => {
|
|
790847
790871
|
const endpointBaseUrl = singleBaseUrlEnvironment.urls[baseUrlId];
|
|
790848
790872
|
if (endpointBaseUrl == null) {
|
|
790849
|
-
throw new
|
|
790873
|
+
throw new CliError({
|
|
790874
|
+
message: `Encountered undefined server name "${baseUrlId}" at endpoint ${endpoint3.method.toUpperCase()} ${endpoint3.path}. Expected environment ${singleBaseUrlEnvironment.id} to contain url for ${baseUrlId}`,
|
|
790875
|
+
code: CliError.Code.IrConversionError
|
|
790876
|
+
});
|
|
790850
790877
|
}
|
|
790851
790878
|
return {
|
|
790852
790879
|
id: FdrAPI_exports.EnvironmentId(baseUrlId),
|
|
@@ -790858,12 +790885,18 @@ function convertIrEnvironments({ environmentsConfig, endpoint: endpoint3 }) {
|
|
|
790858
790885
|
return environments2.filter((environment2, index3, self2) => index3 === self2.findIndex((t3) => t3.id === environment2.id && t3.baseUrl === environment2.baseUrl));
|
|
790859
790886
|
}
|
|
790860
790887
|
if (endpointBaseUrlId == null) {
|
|
790861
|
-
throw new
|
|
790888
|
+
throw new CliError({
|
|
790889
|
+
message: `Expected endpoint ${getOriginalName(endpoint3.name)} to have base url.`,
|
|
790890
|
+
code: CliError.Code.IrConversionError
|
|
790891
|
+
});
|
|
790862
790892
|
}
|
|
790863
790893
|
return environmentsConfigValue.environments.map((singleBaseUrlEnvironment) => {
|
|
790864
790894
|
const endpointBaseUrl = singleBaseUrlEnvironment.urls[endpointBaseUrlId];
|
|
790865
790895
|
if (endpointBaseUrl == null) {
|
|
790866
|
-
throw new
|
|
790896
|
+
throw new CliError({
|
|
790897
|
+
message: `Encountered undefined server name "${endpointBaseUrlId}" at endpoint ${endpoint3.method.toUpperCase()} ${endpoint3.path.head}. Expected environment ${singleBaseUrlEnvironment.id} to contain url for ${endpointBaseUrlId}`,
|
|
790898
|
+
code: CliError.Code.IrConversionError
|
|
790899
|
+
});
|
|
790867
790900
|
}
|
|
790868
790901
|
return {
|
|
790869
790902
|
id: FdrAPI_exports.EnvironmentId(singleBaseUrlEnvironment.id),
|
|
@@ -790889,12 +790922,18 @@ function convertIrWebSocketEnvironments({ environmentsConfig, channel: channel3
|
|
|
790889
790922
|
});
|
|
790890
790923
|
case "multipleBaseUrls":
|
|
790891
790924
|
if (channelBaseUrlId == null) {
|
|
790892
|
-
throw new
|
|
790925
|
+
throw new CliError({
|
|
790926
|
+
message: `Expected channel ${getOriginalName(channel3.name)} to have base url.`,
|
|
790927
|
+
code: CliError.Code.IrConversionError
|
|
790928
|
+
});
|
|
790893
790929
|
}
|
|
790894
790930
|
return environmentsConfigValue.environments.map((singleBaseUrlEnvironment) => {
|
|
790895
790931
|
const channelBaseUrl = singleBaseUrlEnvironment.urls[channelBaseUrlId];
|
|
790896
790932
|
if (channelBaseUrl == null) {
|
|
790897
|
-
throw new
|
|
790933
|
+
throw new CliError({
|
|
790934
|
+
message: `Encountered undefined server name ${channelBaseUrl} at channel ${getOriginalName(channel3.name)} ${channel3.path.head}. Expected environment ${singleBaseUrlEnvironment.id} to contain url for ${channelBaseUrlId}`,
|
|
790935
|
+
code: CliError.Code.IrConversionError
|
|
790936
|
+
});
|
|
790898
790937
|
}
|
|
790899
790938
|
return {
|
|
790900
790939
|
id: FdrAPI_exports.EnvironmentId(singleBaseUrlEnvironment.id),
|
|
@@ -790918,7 +790957,7 @@ function convertHttpMethod2(method8) {
|
|
|
790918
790957
|
delete: () => FdrAPI_exports.HttpMethod.Delete,
|
|
790919
790958
|
head: () => FdrAPI_exports.HttpMethod.Head,
|
|
790920
790959
|
_other: () => {
|
|
790921
|
-
throw new
|
|
790960
|
+
throw new CliError({ message: "Unknown http method: " + method8, code: CliError.Code.InternalError });
|
|
790922
790961
|
}
|
|
790923
790962
|
});
|
|
790924
790963
|
}
|
|
@@ -791034,7 +791073,10 @@ function convertRequestBody3(irRequest) {
|
|
|
791034
791073
|
contentType: bytes.contentType
|
|
791035
791074
|
}),
|
|
791036
791075
|
_other: () => {
|
|
791037
|
-
throw new
|
|
791076
|
+
throw new CliError({
|
|
791077
|
+
message: "Unknown HttpRequestBody: " + irRequest.type,
|
|
791078
|
+
code: CliError.Code.InternalError
|
|
791079
|
+
});
|
|
791038
791080
|
}
|
|
791039
791081
|
});
|
|
791040
791082
|
return requestBodyShape != null ? { type: requestBodyShape, description: irRequest.docs } : void 0;
|
|
@@ -791088,7 +791130,10 @@ function convertResponse2(irResponse) {
|
|
|
791088
791130
|
return void 0;
|
|
791089
791131
|
},
|
|
791090
791132
|
_other: () => {
|
|
791091
|
-
throw new
|
|
791133
|
+
throw new CliError({
|
|
791134
|
+
message: "Unknown HttpResponse: " + irResponse.body,
|
|
791135
|
+
code: CliError.Code.InternalError
|
|
791136
|
+
});
|
|
791092
791137
|
}
|
|
791093
791138
|
});
|
|
791094
791139
|
}
|
|
@@ -791328,7 +791373,10 @@ function convertV2HttpEndpointExample({ shouldUseExampleName, exampleName, examp
|
|
|
791328
791373
|
return void 0;
|
|
791329
791374
|
},
|
|
791330
791375
|
_other: () => {
|
|
791331
|
-
throw new
|
|
791376
|
+
throw new CliError({
|
|
791377
|
+
message: "Unknown ExampleResponseBody: " + example.response?.body?.type,
|
|
791378
|
+
code: CliError.Code.InternalError
|
|
791379
|
+
});
|
|
791332
791380
|
}
|
|
791333
791381
|
}) : void 0,
|
|
791334
791382
|
codeSamples: example.codeSamples?.map((codeSample) => ({
|
|
@@ -791454,18 +791502,27 @@ function convertHttpEndpointExample({ userSpecifiedExample, autogeneratedExample
|
|
|
791454
791502
|
stream: (stream5) => stream5.length > 0 ? 200 : 204,
|
|
791455
791503
|
sse: (stream5) => stream5.length > 0 ? 200 : 204,
|
|
791456
791504
|
_other: () => {
|
|
791457
|
-
throw new
|
|
791505
|
+
throw new CliError({
|
|
791506
|
+
message: "Unknown ExampleResponseBody: " + ok3.type,
|
|
791507
|
+
code: CliError.Code.InternalError
|
|
791508
|
+
});
|
|
791458
791509
|
}
|
|
791459
791510
|
}),
|
|
791460
791511
|
error: ({ error: errorName }) => {
|
|
791461
791512
|
const error50 = ir10.errors[errorName.errorId];
|
|
791462
791513
|
if (error50 == null) {
|
|
791463
|
-
throw new
|
|
791514
|
+
throw new CliError({
|
|
791515
|
+
message: "Cannot find error " + errorName.errorId,
|
|
791516
|
+
code: CliError.Code.ResolutionError
|
|
791517
|
+
});
|
|
791464
791518
|
}
|
|
791465
791519
|
return error50.statusCode;
|
|
791466
791520
|
},
|
|
791467
791521
|
_other: () => {
|
|
791468
|
-
throw new
|
|
791522
|
+
throw new CliError({
|
|
791523
|
+
message: "Unknown ExampleResponse: " + example.response.type,
|
|
791524
|
+
code: CliError.Code.InternalError
|
|
791525
|
+
});
|
|
791469
791526
|
}
|
|
791470
791527
|
}),
|
|
791471
791528
|
responseBody: example.response._visit({
|
|
@@ -791487,12 +791544,18 @@ function convertHttpEndpointExample({ userSpecifiedExample, autogeneratedExample
|
|
|
791487
791544
|
value: sse.map(({ event, data: data2 }) => ({ event, data: data2.jsonExample }))
|
|
791488
791545
|
}),
|
|
791489
791546
|
_other: () => {
|
|
791490
|
-
throw new
|
|
791547
|
+
throw new CliError({
|
|
791548
|
+
message: "Unknown ExampleResponseBody: " + ok3.type,
|
|
791549
|
+
code: CliError.Code.InternalError
|
|
791550
|
+
});
|
|
791491
791551
|
}
|
|
791492
791552
|
}),
|
|
791493
791553
|
error: (error50) => error50.body != null ? { type: "json", value: error50.body.jsonExample } : void 0,
|
|
791494
791554
|
_other: () => {
|
|
791495
|
-
throw new
|
|
791555
|
+
throw new CliError({
|
|
791556
|
+
message: "Unknown ExampleResponse: " + example.response.type,
|
|
791557
|
+
code: CliError.Code.InternalError
|
|
791558
|
+
});
|
|
791496
791559
|
}
|
|
791497
791560
|
}),
|
|
791498
791561
|
// irExample.response.body != null ? { type: "json", value: irExample.response.body.jsonExample } : undefined,
|
|
@@ -791785,7 +791848,9 @@ async function registerApi({ organization, workspace, context: context3, token,
|
|
|
791785
791848
|
context3.logger.debug(`Registered API Definition ${response.apiDefinitionId}`);
|
|
791786
791849
|
return { id: response.apiDefinitionId, ir: ir10 };
|
|
791787
791850
|
} catch (error50) {
|
|
791788
|
-
return context3.failAndThrow("Failed to register API", error50
|
|
791851
|
+
return context3.failAndThrow("Failed to register API", error50, {
|
|
791852
|
+
code: CliError.Code.NetworkError
|
|
791853
|
+
});
|
|
791789
791854
|
}
|
|
791790
791855
|
}
|
|
791791
791856
|
|
|
@@ -832073,7 +832138,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
832073
832138
|
var LOGS_FOLDER_NAME = "logs";
|
|
832074
832139
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
832075
832140
|
function getCliSource() {
|
|
832076
|
-
const version7 = "4.81.0-
|
|
832141
|
+
const version7 = "4.81.0-14-gacd656850ac";
|
|
832077
832142
|
return `cli@${version7}`;
|
|
832078
832143
|
}
|
|
832079
832144
|
var DebugLogger = class {
|
|
@@ -843640,7 +843705,7 @@ var LegacyDocsPublisher = class {
|
|
|
843640
843705
|
previewId,
|
|
843641
843706
|
disableTemplates: void 0,
|
|
843642
843707
|
skipUpload,
|
|
843643
|
-
cliVersion: "4.81.0-
|
|
843708
|
+
cliVersion: "4.81.0-14-gacd656850ac"
|
|
843644
843709
|
});
|
|
843645
843710
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
843646
843711
|
return { success: false };
|
|
@@ -918871,7 +918936,7 @@ var CliContext = class _CliContext {
|
|
|
918871
918936
|
if (false) {
|
|
918872
918937
|
this.logger.error("CLI_VERSION is not defined");
|
|
918873
918938
|
}
|
|
918874
|
-
return "4.81.0-
|
|
918939
|
+
return "4.81.0-14-gacd656850ac";
|
|
918875
918940
|
}
|
|
918876
918941
|
getCliName() {
|
|
918877
918942
|
if (false) {
|
package/package.json
CHANGED