@fern-api/fern-api-dev 4.96.0-31-gee880cfe0dd → 4.96.0-39-g2d037eff353
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 +42 -24
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -618191,7 +618191,7 @@ var AccessTokenPosthogManager = class {
|
|
|
618191
618191
|
properties: {
|
|
618192
618192
|
...event,
|
|
618193
618193
|
...event.properties,
|
|
618194
|
-
version: "4.96.0-
|
|
618194
|
+
version: "4.96.0-39-g2d037eff353",
|
|
618195
618195
|
usingAccessToken: true
|
|
618196
618196
|
}
|
|
618197
618197
|
});
|
|
@@ -618245,7 +618245,7 @@ var UserPosthogManager = class {
|
|
|
618245
618245
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
618246
618246
|
event: "CLI",
|
|
618247
618247
|
properties: {
|
|
618248
|
-
version: "4.96.0-
|
|
618248
|
+
version: "4.96.0-39-g2d037eff353",
|
|
618249
618249
|
...event,
|
|
618250
618250
|
...event.properties,
|
|
618251
618251
|
usingAccessToken: false,
|
|
@@ -829369,7 +829369,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
829369
829369
|
var LOGS_FOLDER_NAME = "logs";
|
|
829370
829370
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
829371
829371
|
function getCliSource() {
|
|
829372
|
-
const version7 = "4.96.0-
|
|
829372
|
+
const version7 = "4.96.0-39-g2d037eff353";
|
|
829373
829373
|
return `cli@${version7}`;
|
|
829374
829374
|
}
|
|
829375
829375
|
var DebugLogger = class {
|
|
@@ -841332,7 +841332,7 @@ var LegacyDocsPublisher = class {
|
|
|
841332
841332
|
previewId,
|
|
841333
841333
|
disableTemplates: void 0,
|
|
841334
841334
|
skipUpload,
|
|
841335
|
-
cliVersion: "4.96.0-
|
|
841335
|
+
cliVersion: "4.96.0-39-g2d037eff353",
|
|
841336
841336
|
loginCommand: "fern auth login"
|
|
841337
841337
|
});
|
|
841338
841338
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
@@ -873735,20 +873735,7 @@ var EndpointSnippetGenerator5 = class {
|
|
|
873735
873735
|
if (snippet2.auth != null) {
|
|
873736
873736
|
authArgs.push(...this.getConstructorAuthArgs({ auth: endpoint3.auth, values: snippet2.auth }));
|
|
873737
873737
|
} else {
|
|
873738
|
-
|
|
873739
|
-
const defaultInferredAuthValues = {
|
|
873740
|
-
values: void 0
|
|
873741
|
-
};
|
|
873742
|
-
authArgs.push(...this.getConstructorInferredAuthArgs({
|
|
873743
|
-
auth: endpoint3.auth,
|
|
873744
|
-
values: defaultInferredAuthValues
|
|
873745
|
-
}));
|
|
873746
|
-
} else {
|
|
873747
|
-
this.context.errors.add({
|
|
873748
|
-
severity: Severity.Warning,
|
|
873749
|
-
message: `Auth with ${endpoint3.auth.type} configuration is required for this endpoint`
|
|
873750
|
-
});
|
|
873751
|
-
}
|
|
873738
|
+
authArgs.push(...this.getDefaultAuthArgs({ auth: endpoint3.auth }));
|
|
873752
873739
|
}
|
|
873753
873740
|
}
|
|
873754
873741
|
const hasMultiUrlEnvironments = this.context.ir.environments?.environments.type === "multipleBaseUrls";
|
|
@@ -873808,6 +873795,40 @@ var EndpointSnippetGenerator5 = class {
|
|
|
873808
873795
|
assertNever(auth8);
|
|
873809
873796
|
}
|
|
873810
873797
|
}
|
|
873798
|
+
getDefaultAuthArgs({ auth: auth8 }) {
|
|
873799
|
+
switch (auth8.type) {
|
|
873800
|
+
case "bearer":
|
|
873801
|
+
return this.getConstructorBearerAuthArgs({
|
|
873802
|
+
auth: auth8,
|
|
873803
|
+
values: { token: "YOUR_TOKEN" }
|
|
873804
|
+
});
|
|
873805
|
+
case "oauth":
|
|
873806
|
+
return this.getConstructorOAuthArgs({
|
|
873807
|
+
auth: auth8,
|
|
873808
|
+
values: { clientId: "YOUR_CLIENT_ID", clientSecret: "YOUR_CLIENT_SECRET" }
|
|
873809
|
+
});
|
|
873810
|
+
case "basic":
|
|
873811
|
+
return this.getConstructorBasicAuthArgs({
|
|
873812
|
+
auth: auth8,
|
|
873813
|
+
values: {
|
|
873814
|
+
username: "YOUR_USERNAME",
|
|
873815
|
+
password: "YOUR_PASSWORD"
|
|
873816
|
+
}
|
|
873817
|
+
});
|
|
873818
|
+
case "header":
|
|
873819
|
+
return this.getConstructorHeaderAuthArgs({
|
|
873820
|
+
auth: auth8,
|
|
873821
|
+
values: { value: "YOUR_AUTH_TOKEN" }
|
|
873822
|
+
});
|
|
873823
|
+
case "inferred":
|
|
873824
|
+
return this.getConstructorInferredAuthArgs({
|
|
873825
|
+
auth: auth8,
|
|
873826
|
+
values: { values: void 0 }
|
|
873827
|
+
});
|
|
873828
|
+
default:
|
|
873829
|
+
assertNever(auth8);
|
|
873830
|
+
}
|
|
873831
|
+
}
|
|
873811
873832
|
addError(message) {
|
|
873812
873833
|
this.context.errors.add({ severity: Severity.Critical, message });
|
|
873813
873834
|
}
|
|
@@ -873815,17 +873836,14 @@ var EndpointSnippetGenerator5 = class {
|
|
|
873815
873836
|
this.context.errors.add({ severity: Severity.Warning, message });
|
|
873816
873837
|
}
|
|
873817
873838
|
getConstructorBasicAuthArgs({ auth: auth8, values: values2 }) {
|
|
873818
|
-
const authRecord = auth8;
|
|
873819
|
-
const usernameOmitted = !!authRecord.usernameOmit;
|
|
873820
|
-
const passwordOmitted = !!authRecord.passwordOmit;
|
|
873821
873839
|
const args = [];
|
|
873822
|
-
if (!
|
|
873840
|
+
if (!auth8.usernameOmit) {
|
|
873823
873841
|
args.push({
|
|
873824
873842
|
name: this.context.getPropertyName(auth8.username),
|
|
873825
873843
|
assignment: php_exports.TypeLiteral.string(values2.username)
|
|
873826
873844
|
});
|
|
873827
873845
|
}
|
|
873828
|
-
if (!
|
|
873846
|
+
if (!auth8.passwordOmit) {
|
|
873829
873847
|
args.push({
|
|
873830
873848
|
name: this.context.getPropertyName(auth8.password),
|
|
873831
873849
|
assignment: php_exports.TypeLiteral.string(values2.password)
|
|
@@ -915856,7 +915874,7 @@ var CliContext = class _CliContext {
|
|
|
915856
915874
|
if (false) {
|
|
915857
915875
|
this.logger.error("CLI_VERSION is not defined");
|
|
915858
915876
|
}
|
|
915859
|
-
return "4.96.0-
|
|
915877
|
+
return "4.96.0-39-g2d037eff353";
|
|
915860
915878
|
}
|
|
915861
915879
|
getCliName() {
|
|
915862
915880
|
if (false) {
|
package/package.json
CHANGED