@fern-api/fern-api-dev 3.51.3-1-gfd39619eacb → 3.51.3-11-g7c6be99ff97
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 +82 -12
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -1414776,7 +1414776,7 @@ ${description}`);
|
|
|
1414776
1414776
|
}, withContext(handler3));
|
|
1414777
1414777
|
}
|
|
1414778
1414778
|
|
|
1414779
|
-
// ../cli-v2/lib/commands/auth/login.js
|
|
1414779
|
+
// ../cli-v2/lib/commands/auth/login/command.js
|
|
1414780
1414780
|
function addLoginCommand(cli) {
|
|
1414781
1414781
|
command2(cli, "login", "Log in to fern", handleLogin);
|
|
1414782
1414782
|
}
|
|
@@ -1414784,7 +1414784,7 @@ async function handleLogin(context2, _args) {
|
|
|
1414784
1414784
|
context2.stdout.info("Logging in...");
|
|
1414785
1414785
|
}
|
|
1414786
1414786
|
|
|
1414787
|
-
// ../cli-v2/lib/commands/auth/logout.js
|
|
1414787
|
+
// ../cli-v2/lib/commands/auth/logout/command.js
|
|
1414788
1414788
|
function addLogoutCommand(cli) {
|
|
1414789
1414789
|
command2(cli, "logout", "Log out of fern", handleLogout);
|
|
1414790
1414790
|
}
|
|
@@ -1414792,7 +1414792,7 @@ async function handleLogout(context2, _args) {
|
|
|
1414792
1414792
|
context2.stdout.info("Logging out...");
|
|
1414793
1414793
|
}
|
|
1414794
1414794
|
|
|
1414795
|
-
// ../cli-v2/lib/commands/auth/token.js
|
|
1414795
|
+
// ../cli-v2/lib/commands/auth/token/command.js
|
|
1414796
1414796
|
function addTokenCommand(cli) {
|
|
1414797
1414797
|
command2(cli, "token", "Print the user's authentication token", handleToken);
|
|
1414798
1414798
|
}
|
|
@@ -1414800,7 +1414800,7 @@ async function handleToken(context2, _args) {
|
|
|
1414800
1414800
|
context2.stdout.info("unimplemented");
|
|
1414801
1414801
|
}
|
|
1414802
1414802
|
|
|
1414803
|
-
// ../cli-v2/lib/commands/auth.js
|
|
1414803
|
+
// ../cli-v2/lib/commands/auth/command.js
|
|
1414804
1414804
|
function addAuthCommand(cli) {
|
|
1414805
1414805
|
commandGroup(cli, "auth <command>", "Authenticate fern", [addLoginCommand, addLogoutCommand, addTokenCommand]);
|
|
1414806
1414806
|
}
|
|
@@ -1430009,7 +1430009,7 @@ async function loadFernYml({ cwd: cwd2 }) {
|
|
|
1430009
1430009
|
return result;
|
|
1430010
1430010
|
}
|
|
1430011
1430011
|
|
|
1430012
|
-
// ../cli-v2/lib/commands/check.js
|
|
1430012
|
+
// ../cli-v2/lib/commands/check/command.js
|
|
1430013
1430013
|
function addCheckCommand(cli) {
|
|
1430014
1430014
|
command2(cli, "check", "Validate your API, docs, and SDK configuration", handleCheck);
|
|
1430015
1430015
|
}
|
|
@@ -1500993,10 +1500993,20 @@ var BaseType = class extends AstNode {
|
|
|
1500993
1500993
|
/**
|
|
1500994
1500994
|
* Wraps this type in an Optional type if it's not already optional.
|
|
1500995
1500995
|
* If this type is already optional, returns it unchanged.
|
|
1500996
|
+
* Semantically represents: field can be omitted from JSON.
|
|
1500996
1500997
|
*/
|
|
1500997
1500998
|
asOptional() {
|
|
1500998
1500999
|
return new Optional(this, this.generation);
|
|
1500999
1501000
|
}
|
|
1501001
|
+
/**
|
|
1501002
|
+
* Wraps this type in a Nullable type if it's not already nullable.
|
|
1501003
|
+
* If this type is already nullable, returns it unchanged.
|
|
1501004
|
+
* Semantically represents: value can be null.
|
|
1501005
|
+
* Note: In C#, both optional and nullable use the same ? syntax.
|
|
1501006
|
+
*/
|
|
1501007
|
+
asNullable() {
|
|
1501008
|
+
return new Nullable(this, this.generation);
|
|
1501009
|
+
}
|
|
1501000
1501010
|
/**
|
|
1501001
1501011
|
* Returns the underlying type if this is an Optional type, otherwise returns this type unchanged.
|
|
1501002
1501012
|
* This is useful for getting the non-nullable version of a type.
|
|
@@ -1501090,6 +1501100,49 @@ var Optional = class extends ReferenceType {
|
|
|
1501090
1501100
|
asOptional() {
|
|
1501091
1501101
|
return this;
|
|
1501092
1501102
|
}
|
|
1501103
|
+
asNullable() {
|
|
1501104
|
+
return this;
|
|
1501105
|
+
}
|
|
1501106
|
+
asNonOptional() {
|
|
1501107
|
+
return this.value;
|
|
1501108
|
+
}
|
|
1501109
|
+
write(writer2) {
|
|
1501110
|
+
this.value.write(writer2);
|
|
1501111
|
+
if (!this.value.isOptional) {
|
|
1501112
|
+
writer2.write("?");
|
|
1501113
|
+
}
|
|
1501114
|
+
}
|
|
1501115
|
+
};
|
|
1501116
|
+
var Nullable = class extends ReferenceType {
|
|
1501117
|
+
isOptional = true;
|
|
1501118
|
+
/**
|
|
1501119
|
+
* The underlying non-nullable type.
|
|
1501120
|
+
*/
|
|
1501121
|
+
value;
|
|
1501122
|
+
/**
|
|
1501123
|
+
* Creates a new nullable type.
|
|
1501124
|
+
* @param value - The underlying non-nullable type
|
|
1501125
|
+
* @param generation - The generation context for code generation
|
|
1501126
|
+
*/
|
|
1501127
|
+
constructor(value, generation) {
|
|
1501128
|
+
super(generation);
|
|
1501129
|
+
this.value = value;
|
|
1501130
|
+
}
|
|
1501131
|
+
get isCollection() {
|
|
1501132
|
+
return false;
|
|
1501133
|
+
}
|
|
1501134
|
+
get multipartMethodName() {
|
|
1501135
|
+
return this.value.multipartMethodName;
|
|
1501136
|
+
}
|
|
1501137
|
+
get multipartMethodNameForCollection() {
|
|
1501138
|
+
return this.value.multipartMethodNameForCollection;
|
|
1501139
|
+
}
|
|
1501140
|
+
asOptional() {
|
|
1501141
|
+
return this;
|
|
1501142
|
+
}
|
|
1501143
|
+
asNullable() {
|
|
1501144
|
+
return this;
|
|
1501145
|
+
}
|
|
1501093
1501146
|
asNonOptional() {
|
|
1501094
1501147
|
return this.value;
|
|
1501095
1501148
|
}
|
|
@@ -1501127,10 +1501180,15 @@ var OptionalWrapper = class extends ReferenceType {
|
|
|
1501127
1501180
|
asOptional() {
|
|
1501128
1501181
|
return this;
|
|
1501129
1501182
|
}
|
|
1501183
|
+
asNullable() {
|
|
1501184
|
+
return this;
|
|
1501185
|
+
}
|
|
1501130
1501186
|
asNonOptional() {
|
|
1501131
1501187
|
return this.value;
|
|
1501132
1501188
|
}
|
|
1501133
1501189
|
write(writer2) {
|
|
1501190
|
+
const optionalRef = this.generation.Types.Optional;
|
|
1501191
|
+
writer2.addReference(optionalRef);
|
|
1501134
1501192
|
writer2.write("Optional<");
|
|
1501135
1501193
|
this.value.write(writer2);
|
|
1501136
1501194
|
writer2.write(">");
|
|
@@ -1501860,6 +1501918,9 @@ var ClassReference = class extends Node3 {
|
|
|
1501860
1501918
|
asOptional() {
|
|
1501861
1501919
|
return new Optional(this, this.generation);
|
|
1501862
1501920
|
}
|
|
1501921
|
+
asNullable() {
|
|
1501922
|
+
return new Nullable(this, this.generation);
|
|
1501923
|
+
}
|
|
1501863
1501924
|
asNonOptional() {
|
|
1501864
1501925
|
return this;
|
|
1501865
1501926
|
}
|
|
@@ -1502555,6 +1502616,7 @@ var is7 = {
|
|
|
1502555
1502616
|
Type: (value) => value instanceof BaseType,
|
|
1502556
1502617
|
ClassReference: (value) => value instanceof ClassReference,
|
|
1502557
1502618
|
Optional: (value) => value instanceof Optional,
|
|
1502619
|
+
OptionalWrapper: (value) => value instanceof OptionalWrapper,
|
|
1502558
1502620
|
AsyncEnumerable: (value) => value != null && value.asNonOptional().fullyQualifiedName.startsWith("System.Collections.Generic.IAsyncEnumerable"),
|
|
1502559
1502621
|
Record: {
|
|
1502560
1502622
|
empty: (value) => value == null || Object.keys(value || {}).length === 0,
|
|
@@ -1504143,6 +1504205,9 @@ var DefinedType = class extends Node3 {
|
|
|
1504143
1504205
|
asOptional() {
|
|
1504144
1504206
|
return new Optional(this, this.generation);
|
|
1504145
1504207
|
}
|
|
1504208
|
+
asNullable() {
|
|
1504209
|
+
return new Nullable(this, this.generation);
|
|
1504210
|
+
}
|
|
1504146
1504211
|
asNonOptional() {
|
|
1504147
1504212
|
return this;
|
|
1504148
1504213
|
}
|
|
@@ -1508250,6 +1508315,11 @@ var Generation = class {
|
|
|
1508250
1508315
|
namespace: this.namespaces.core,
|
|
1508251
1508316
|
origin: this.model.staticExplicit("FormRequest")
|
|
1508252
1508317
|
}),
|
|
1508318
|
+
/** Optional<T> wrapper type for explicit undefined/null semantics */
|
|
1508319
|
+
Optional: () => this.csharp.classReference({
|
|
1508320
|
+
namespace: this.namespaces.core,
|
|
1508321
|
+
origin: this.model.staticExplicit("Optional")
|
|
1508322
|
+
}),
|
|
1508253
1508323
|
/** Configuration options for the SDK client (base URL, headers, timeout, etc.) */
|
|
1508254
1508324
|
ClientOptions: () => this.csharp.classReference({
|
|
1508255
1508325
|
origin: this.model.staticExplicit("ClientOptions"),
|
|
@@ -1525220,7 +1525290,7 @@ var DynamicSnippetsGeneratorContext6 = class _DynamicSnippetsGeneratorContext ex
|
|
|
1525220
1525290
|
return this.customConfig?.clientModuleName ?? "Client";
|
|
1525221
1525291
|
}
|
|
1525222
1525292
|
getRootModuleName() {
|
|
1525223
|
-
return upperFirst_default(this.customConfig?.
|
|
1525293
|
+
return upperFirst_default(this.customConfig?.moduleName ?? this.customConfig?.clientModuleName ?? this.config.organization);
|
|
1525224
1525294
|
}
|
|
1525225
1525295
|
isSingleEnvironmentID(environment2) {
|
|
1525226
1525296
|
return typeof environment2 === "string";
|
|
@@ -1656369,7 +1656439,7 @@ var WorkspaceLoader = class {
|
|
|
1656369
1656439
|
}
|
|
1656370
1656440
|
};
|
|
1656371
1656441
|
|
|
1656372
|
-
// ../cli-v2/lib/commands/sdk/generate.js
|
|
1656442
|
+
// ../cli-v2/lib/commands/sdk/generate/command.js
|
|
1656373
1656443
|
function addGenerateCommand(cli) {
|
|
1656374
1656444
|
command2(
|
|
1656375
1656445
|
cli,
|
|
@@ -1656529,7 +1656599,7 @@ function maybePluralSdks(targets2) {
|
|
|
1656529
1656599
|
return targets2.length === 1 ? "SDK" : "SDKs";
|
|
1656530
1656600
|
}
|
|
1656531
1656601
|
|
|
1656532
|
-
// ../cli-v2/lib/commands/sdk.js
|
|
1656602
|
+
// ../cli-v2/lib/commands/sdk/command.js
|
|
1656533
1656603
|
function addSdkCommand(cli) {
|
|
1656534
1656604
|
commandGroup(cli, "sdk <command>", "Configure and generate SDKs", [addGenerateCommand]);
|
|
1656535
1656605
|
}
|
|
@@ -1662489,7 +1662559,7 @@ var AccessTokenPosthogManager = class {
|
|
|
1662489
1662559
|
properties: {
|
|
1662490
1662560
|
...event,
|
|
1662491
1662561
|
...event.properties,
|
|
1662492
|
-
version: "3.51.3-
|
|
1662562
|
+
version: "3.51.3-11-g7c6be99ff97",
|
|
1662493
1662563
|
usingAccessToken: true
|
|
1662494
1662564
|
}
|
|
1662495
1662565
|
});
|
|
@@ -1662539,7 +1662609,7 @@ var UserPosthogManager = class {
|
|
|
1662539
1662609
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
1662540
1662610
|
event: "CLI",
|
|
1662541
1662611
|
properties: {
|
|
1662542
|
-
version: "3.51.3-
|
|
1662612
|
+
version: "3.51.3-11-g7c6be99ff97",
|
|
1662543
1662613
|
...event,
|
|
1662544
1662614
|
...event.properties,
|
|
1662545
1662615
|
usingAccessToken: false,
|
|
@@ -1695681,7 +1695751,7 @@ var CliContext = class {
|
|
|
1695681
1695751
|
if (false) {
|
|
1695682
1695752
|
this.logger.error("CLI_VERSION is not defined");
|
|
1695683
1695753
|
}
|
|
1695684
|
-
return "3.51.3-
|
|
1695754
|
+
return "3.51.3-11-g7c6be99ff97";
|
|
1695685
1695755
|
}
|
|
1695686
1695756
|
getCliName() {
|
|
1695687
1695757
|
if (false) {
|
|
@@ -1698794,7 +1698864,7 @@ var import_path54 = __toESM(require("path"), 1);
|
|
|
1698794
1698864
|
var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
1698795
1698865
|
var LOGS_FOLDER_NAME = "logs";
|
|
1698796
1698866
|
function getCliSource() {
|
|
1698797
|
-
const version7 = "3.51.3-
|
|
1698867
|
+
const version7 = "3.51.3-11-g7c6be99ff97";
|
|
1698798
1698868
|
return `cli@${version7}`;
|
|
1698799
1698869
|
}
|
|
1698800
1698870
|
var DebugLogger = class {
|
package/package.json
CHANGED