@fern-api/fern-api-dev 5.23.3-735-g61ea8b5dd85 → 5.23.3-741-gfcf0a7bcaa5
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 +284 -286
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -628733,7 +628733,7 @@ var AccessTokenPosthogManager = class {
|
|
|
628733
628733
|
properties: {
|
|
628734
628734
|
...event,
|
|
628735
628735
|
...event.properties,
|
|
628736
|
-
version: "5.23.3-
|
|
628736
|
+
version: "5.23.3-741-gfcf0a7bcaa5",
|
|
628737
628737
|
usingAccessToken: true,
|
|
628738
628738
|
...getRunIdProperties()
|
|
628739
628739
|
}
|
|
@@ -628797,7 +628797,7 @@ var UserPosthogManager = class {
|
|
|
628797
628797
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
628798
628798
|
event: "CLI",
|
|
628799
628799
|
properties: {
|
|
628800
|
-
version: "5.23.3-
|
|
628800
|
+
version: "5.23.3-741-gfcf0a7bcaa5",
|
|
628801
628801
|
...event,
|
|
628802
628802
|
...event.properties,
|
|
628803
628803
|
usingAccessToken: false,
|
|
@@ -820807,7 +820807,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
820807
820807
|
var LOGS_FOLDER_NAME = "logs";
|
|
820808
820808
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
820809
820809
|
function getCliSource() {
|
|
820810
|
-
const version7 = "5.23.3-
|
|
820810
|
+
const version7 = "5.23.3-741-gfcf0a7bcaa5";
|
|
820811
820811
|
return `cli@${version7}`;
|
|
820812
820812
|
}
|
|
820813
820813
|
var DebugLogger = class {
|
|
@@ -852140,7 +852140,7 @@ var LegacyDocsPublisher = class {
|
|
|
852140
852140
|
previewId,
|
|
852141
852141
|
disableTemplates: void 0,
|
|
852142
852142
|
skipUpload,
|
|
852143
|
-
cliVersion: "5.23.3-
|
|
852143
|
+
cliVersion: "5.23.3-741-gfcf0a7bcaa5",
|
|
852144
852144
|
loginCommand: "fern auth login"
|
|
852145
852145
|
});
|
|
852146
852146
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
@@ -897189,6 +897189,11 @@ var NameRegistry2 = class _NameRegistry {
|
|
|
897189
897189
|
assertDefined(existingSymbol, `Nested literal enum symbol not found for literal value "${literalValue}" in parent symbol "${parentSymbolId}"`);
|
|
897190
897190
|
return existingSymbol;
|
|
897191
897191
|
}
|
|
897192
|
+
getNestedLiteralEnumSymbol(parentSymbol, literalValue) {
|
|
897193
|
+
const parentSymbolId = typeof parentSymbol === "string" ? parentSymbol : parentSymbol.id;
|
|
897194
|
+
const enumsByLiteralValue = this.nestedLiteralEnumSymbolsByParentSymbolId.get(parentSymbolId) ?? /* @__PURE__ */ new Map();
|
|
897195
|
+
return enumsByLiteralValue.get(literalValue);
|
|
897196
|
+
}
|
|
897192
897197
|
getAllNestedLiteralEnumSymbolsOrThrow(parentSymbol) {
|
|
897193
897198
|
const parentSymbolId = typeof parentSymbol === "string" ? parentSymbol : parentSymbol.id;
|
|
897194
897199
|
const enumsByLiteralValue = this.nestedLiteralEnumSymbolsByParentSymbolId.get(parentSymbolId) ?? /* @__PURE__ */ new Map();
|
|
@@ -897304,6 +897309,121 @@ var AccessLevel = {
|
|
|
897304
897309
|
Private: "private"
|
|
897305
897310
|
};
|
|
897306
897311
|
|
|
897312
|
+
// ../../../generators/swift/codegen/lib/syntax/escape-swift-string-literal.js
|
|
897313
|
+
function escapeSwiftStringLiteralContent(value2) {
|
|
897314
|
+
let result = "";
|
|
897315
|
+
for (const ch of value2) {
|
|
897316
|
+
switch (ch) {
|
|
897317
|
+
case "\\":
|
|
897318
|
+
result += "\\\\";
|
|
897319
|
+
break;
|
|
897320
|
+
case '"':
|
|
897321
|
+
result += '\\"';
|
|
897322
|
+
break;
|
|
897323
|
+
case "\n":
|
|
897324
|
+
result += "\\n";
|
|
897325
|
+
break;
|
|
897326
|
+
case "\r":
|
|
897327
|
+
result += "\\r";
|
|
897328
|
+
break;
|
|
897329
|
+
case " ":
|
|
897330
|
+
result += "\\t";
|
|
897331
|
+
break;
|
|
897332
|
+
case "\0":
|
|
897333
|
+
result += "\\0";
|
|
897334
|
+
break;
|
|
897335
|
+
default: {
|
|
897336
|
+
const code5 = ch.charCodeAt(0);
|
|
897337
|
+
if (code5 < 32 || code5 === 127) {
|
|
897338
|
+
result += `\\u{${code5.toString(16).toUpperCase()}}`;
|
|
897339
|
+
} else {
|
|
897340
|
+
result += ch;
|
|
897341
|
+
}
|
|
897342
|
+
}
|
|
897343
|
+
}
|
|
897344
|
+
}
|
|
897345
|
+
return result;
|
|
897346
|
+
}
|
|
897347
|
+
|
|
897348
|
+
// ../../../generators/swift/codegen/lib/syntax/reserved-keywords.js
|
|
897349
|
+
var reservedKeywords = [
|
|
897350
|
+
"Any",
|
|
897351
|
+
"as",
|
|
897352
|
+
"associatedtype",
|
|
897353
|
+
"break",
|
|
897354
|
+
"case",
|
|
897355
|
+
"catch",
|
|
897356
|
+
"class",
|
|
897357
|
+
"continue",
|
|
897358
|
+
"default",
|
|
897359
|
+
"defer",
|
|
897360
|
+
"deinit",
|
|
897361
|
+
"do",
|
|
897362
|
+
"else",
|
|
897363
|
+
"fallthrough",
|
|
897364
|
+
"false",
|
|
897365
|
+
"for",
|
|
897366
|
+
"guard",
|
|
897367
|
+
"enum",
|
|
897368
|
+
"extension",
|
|
897369
|
+
"fileprivate",
|
|
897370
|
+
"func",
|
|
897371
|
+
"if",
|
|
897372
|
+
"import",
|
|
897373
|
+
"in",
|
|
897374
|
+
"init",
|
|
897375
|
+
"inout",
|
|
897376
|
+
"internal",
|
|
897377
|
+
"is",
|
|
897378
|
+
"let",
|
|
897379
|
+
"nil",
|
|
897380
|
+
"operator",
|
|
897381
|
+
"private",
|
|
897382
|
+
"precedencegroup",
|
|
897383
|
+
"Protocol",
|
|
897384
|
+
"protocol",
|
|
897385
|
+
"public",
|
|
897386
|
+
"repeat",
|
|
897387
|
+
"rethrows",
|
|
897388
|
+
"return",
|
|
897389
|
+
"Self",
|
|
897390
|
+
"self",
|
|
897391
|
+
"static",
|
|
897392
|
+
"struct",
|
|
897393
|
+
"subscript",
|
|
897394
|
+
"super",
|
|
897395
|
+
"switch",
|
|
897396
|
+
"throw",
|
|
897397
|
+
"throws",
|
|
897398
|
+
"true",
|
|
897399
|
+
"try",
|
|
897400
|
+
"Type",
|
|
897401
|
+
"typealias",
|
|
897402
|
+
"var",
|
|
897403
|
+
"where",
|
|
897404
|
+
"while"
|
|
897405
|
+
];
|
|
897406
|
+
var reservedKeywordsSet = new Set(reservedKeywords);
|
|
897407
|
+
function isReservedKeyword(word2) {
|
|
897408
|
+
return reservedKeywordsSet.has(word2);
|
|
897409
|
+
}
|
|
897410
|
+
function escapeReservedKeyword(word2) {
|
|
897411
|
+
return isReservedKeyword(word2) ? `\`${word2}\`` : word2;
|
|
897412
|
+
}
|
|
897413
|
+
function escapeReservedKeywordTypeReference(reference4) {
|
|
897414
|
+
return reference4.split(".").map((segment) => escapeReservedKeyword(segment)).join(".");
|
|
897415
|
+
}
|
|
897416
|
+
function sanitizeSelf(name2) {
|
|
897417
|
+
return name2 === "self" ? "self_" : name2;
|
|
897418
|
+
}
|
|
897419
|
+
function sanitizeSwiftIdentifier(name2) {
|
|
897420
|
+
const sanitized = sanitizeSelf(name2);
|
|
897421
|
+
if (sanitized.length > 0 && /^[0-9]/.test(sanitized)) {
|
|
897422
|
+
return `_${sanitized}`;
|
|
897423
|
+
}
|
|
897424
|
+
return sanitized;
|
|
897425
|
+
}
|
|
897426
|
+
|
|
897307
897427
|
// ../../../generators/swift/codegen/lib/ast/core/Writer.js
|
|
897308
897428
|
var Writer8 = class extends AbstractWriter {
|
|
897309
897429
|
toString() {
|
|
@@ -897363,7 +897483,7 @@ var Class6 = class extends AstNode8 {
|
|
|
897363
897483
|
if (this.final) {
|
|
897364
897484
|
writer2.write("final ");
|
|
897365
897485
|
}
|
|
897366
|
-
writer2.write(`class ${this.name}`);
|
|
897486
|
+
writer2.write(`class ${escapeReservedKeyword(this.name)}`);
|
|
897367
897487
|
this.conformances.forEach((conformance, index3) => {
|
|
897368
897488
|
if (index3 === 0) {
|
|
897369
897489
|
writer2.write(": ");
|
|
@@ -897452,114 +897572,6 @@ var Comment7 = class extends AstNode8 {
|
|
|
897452
897572
|
// ../../../generators/swift/codegen/lib/ast/ComputedProperty.js
|
|
897453
897573
|
init_lib4();
|
|
897454
897574
|
|
|
897455
|
-
// ../../../generators/swift/codegen/lib/syntax/escape-swift-string-literal.js
|
|
897456
|
-
function escapeSwiftStringLiteral(rawValue) {
|
|
897457
|
-
return rawValue.replace(/\\u([0-9a-fA-F]{4})/g, "\\u{$1}").replace(/(?<!\\)\\f/g, "\\u{000C}").replace(/(?<!\\)\\v/g, "\\u{000B}").replace(/(?<!\\)\\0/g, "\\u{0000}").replace(/(?<!\\)"/g, '\\"');
|
|
897458
|
-
}
|
|
897459
|
-
function escapeSwiftStringLiteralContent(value2) {
|
|
897460
|
-
let result = "";
|
|
897461
|
-
for (const ch of value2) {
|
|
897462
|
-
switch (ch) {
|
|
897463
|
-
case "\\":
|
|
897464
|
-
result += "\\\\";
|
|
897465
|
-
break;
|
|
897466
|
-
case '"':
|
|
897467
|
-
result += '\\"';
|
|
897468
|
-
break;
|
|
897469
|
-
case "\n":
|
|
897470
|
-
result += "\\n";
|
|
897471
|
-
break;
|
|
897472
|
-
case "\r":
|
|
897473
|
-
result += "\\r";
|
|
897474
|
-
break;
|
|
897475
|
-
case " ":
|
|
897476
|
-
result += "\\t";
|
|
897477
|
-
break;
|
|
897478
|
-
case "\0":
|
|
897479
|
-
result += "\\0";
|
|
897480
|
-
break;
|
|
897481
|
-
default: {
|
|
897482
|
-
const code5 = ch.charCodeAt(0);
|
|
897483
|
-
if (code5 < 32 || code5 === 127) {
|
|
897484
|
-
result += `\\u{${code5.toString(16).toUpperCase()}}`;
|
|
897485
|
-
} else {
|
|
897486
|
-
result += ch;
|
|
897487
|
-
}
|
|
897488
|
-
}
|
|
897489
|
-
}
|
|
897490
|
-
}
|
|
897491
|
-
return result;
|
|
897492
|
-
}
|
|
897493
|
-
|
|
897494
|
-
// ../../../generators/swift/codegen/lib/syntax/reserved-keywords.js
|
|
897495
|
-
var reservedKeywords = [
|
|
897496
|
-
"Any",
|
|
897497
|
-
"as",
|
|
897498
|
-
"associatedtype",
|
|
897499
|
-
"break",
|
|
897500
|
-
"case",
|
|
897501
|
-
"catch",
|
|
897502
|
-
"class",
|
|
897503
|
-
"continue",
|
|
897504
|
-
"default",
|
|
897505
|
-
"defer",
|
|
897506
|
-
"deinit",
|
|
897507
|
-
"do",
|
|
897508
|
-
"else",
|
|
897509
|
-
"fallthrough",
|
|
897510
|
-
"false",
|
|
897511
|
-
"for",
|
|
897512
|
-
"guard",
|
|
897513
|
-
"enum",
|
|
897514
|
-
"extension",
|
|
897515
|
-
"fileprivate",
|
|
897516
|
-
"func",
|
|
897517
|
-
"if",
|
|
897518
|
-
"import",
|
|
897519
|
-
"in",
|
|
897520
|
-
"init",
|
|
897521
|
-
"inout",
|
|
897522
|
-
"internal",
|
|
897523
|
-
"is",
|
|
897524
|
-
"let",
|
|
897525
|
-
"nil",
|
|
897526
|
-
"operator",
|
|
897527
|
-
"private",
|
|
897528
|
-
"precedencegroup",
|
|
897529
|
-
"Protocol",
|
|
897530
|
-
"protocol",
|
|
897531
|
-
"public",
|
|
897532
|
-
"repeat",
|
|
897533
|
-
"rethrows",
|
|
897534
|
-
"return",
|
|
897535
|
-
"Self",
|
|
897536
|
-
"self",
|
|
897537
|
-
"static",
|
|
897538
|
-
"struct",
|
|
897539
|
-
"subscript",
|
|
897540
|
-
"super",
|
|
897541
|
-
"switch",
|
|
897542
|
-
"throw",
|
|
897543
|
-
"throws",
|
|
897544
|
-
"true",
|
|
897545
|
-
"try",
|
|
897546
|
-
"Type",
|
|
897547
|
-
"typealias",
|
|
897548
|
-
"var",
|
|
897549
|
-
"where",
|
|
897550
|
-
"while"
|
|
897551
|
-
];
|
|
897552
|
-
var reservedKeywordsSet = new Set(reservedKeywords);
|
|
897553
|
-
function isReservedKeyword(word2) {
|
|
897554
|
-
return reservedKeywordsSet.has(word2);
|
|
897555
|
-
}
|
|
897556
|
-
function escapeReservedKeyword(word2) {
|
|
897557
|
-
return isReservedKeyword(word2) ? `\`${word2}\`` : word2;
|
|
897558
|
-
}
|
|
897559
|
-
function sanitizeSelf(name2) {
|
|
897560
|
-
return name2 === "self" ? "self_" : name2;
|
|
897561
|
-
}
|
|
897562
|
-
|
|
897563
897575
|
// ../../../generators/swift/codegen/lib/ast/Expression.js
|
|
897564
897576
|
init_lib4();
|
|
897565
897577
|
var Expression2 = class extends AstNode8 {
|
|
@@ -898314,7 +898326,7 @@ var EnumWithAssociatedValues = class extends AstNode8 {
|
|
|
898314
898326
|
if (this.indirect) {
|
|
898315
898327
|
writer2.write("indirect ");
|
|
898316
898328
|
}
|
|
898317
|
-
writer2.write(`enum ${this.name}`);
|
|
898329
|
+
writer2.write(`enum ${escapeReservedKeyword(this.name)}`);
|
|
898318
898330
|
this.conformances.forEach((conformance, index3) => {
|
|
898319
898331
|
if (index3 === 0) {
|
|
898320
898332
|
writer2.write(": ");
|
|
@@ -898331,11 +898343,7 @@ var EnumWithAssociatedValues = class extends AstNode8 {
|
|
|
898331
898343
|
case_.docs.write(writer2);
|
|
898332
898344
|
}
|
|
898333
898345
|
writer2.write("case ");
|
|
898334
|
-
|
|
898335
|
-
writer2.write(`\`${case_.unsafeName}\``);
|
|
898336
|
-
} else {
|
|
898337
|
-
writer2.write(case_.unsafeName);
|
|
898338
|
-
}
|
|
898346
|
+
writer2.write(escapeReservedKeyword(case_.unsafeName));
|
|
898339
898347
|
if (case_.associatedValue != null) {
|
|
898340
898348
|
writer2.write("(");
|
|
898341
898349
|
case_.associatedValue.forEach((type8, index3) => {
|
|
@@ -898406,7 +898414,7 @@ var EnumWithRawValues = class extends AstNode8 {
|
|
|
898406
898414
|
writer2.write(this.accessLevel);
|
|
898407
898415
|
writer2.write(" ");
|
|
898408
898416
|
}
|
|
898409
|
-
writer2.write(`enum ${this.name}`);
|
|
898417
|
+
writer2.write(`enum ${escapeReservedKeyword(this.name)}`);
|
|
898410
898418
|
this.conformances.forEach((conformance, index3) => {
|
|
898411
898419
|
if (index3 === 0) {
|
|
898412
898420
|
writer2.write(": ");
|
|
@@ -898427,14 +898435,10 @@ var EnumWithRawValues = class extends AstNode8 {
|
|
|
898427
898435
|
case_.docs.write(writer2);
|
|
898428
898436
|
}
|
|
898429
898437
|
writer2.write("case ");
|
|
898430
|
-
|
|
898431
|
-
writer2.write(`\`${case_.unsafeName}\``);
|
|
898432
|
-
} else {
|
|
898433
|
-
writer2.write(case_.unsafeName);
|
|
898434
|
-
}
|
|
898438
|
+
writer2.write(escapeReservedKeyword(case_.unsafeName));
|
|
898435
898439
|
if (case_.rawValue !== case_.unsafeName) {
|
|
898436
898440
|
writer2.write(" = ");
|
|
898437
|
-
writer2.write(`"${
|
|
898441
|
+
writer2.write(`"${escapeSwiftStringLiteralContent(case_.rawValue)}"`);
|
|
898438
898442
|
}
|
|
898439
898443
|
writer2.newLine();
|
|
898440
898444
|
});
|
|
@@ -898466,7 +898470,7 @@ var Extension = class extends AstNode8 {
|
|
|
898466
898470
|
if (this.docs != null) {
|
|
898467
898471
|
this.docs.write(writer2);
|
|
898468
898472
|
}
|
|
898469
|
-
writer2.write(`extension ${this.name}`);
|
|
898473
|
+
writer2.write(`extension ${escapeReservedKeywordTypeReference(this.name)}`);
|
|
898470
898474
|
this.conformances.forEach((conformance, index3) => {
|
|
898471
898475
|
if (index3 === 0) {
|
|
898472
898476
|
writer2.write(": ");
|
|
@@ -898806,11 +898810,7 @@ var Property = class extends AstNode8 {
|
|
|
898806
898810
|
}
|
|
898807
898811
|
writer2.write(this.declarationType);
|
|
898808
898812
|
writer2.write(" ");
|
|
898809
|
-
|
|
898810
|
-
writer2.write(`\`${this.unsafeName}\``);
|
|
898811
|
-
} else {
|
|
898812
|
-
writer2.write(this.unsafeName);
|
|
898813
|
-
}
|
|
898813
|
+
writer2.write(escapeReservedKeyword(this.unsafeName));
|
|
898814
898814
|
writer2.write(": ");
|
|
898815
898815
|
this.type.write(writer2);
|
|
898816
898816
|
if (this.defaultValue != null) {
|
|
@@ -898877,7 +898877,7 @@ var Struct3 = class extends AstNode8 {
|
|
|
898877
898877
|
writer2.write(this.accessLevel);
|
|
898878
898878
|
writer2.write(" ");
|
|
898879
898879
|
}
|
|
898880
|
-
writer2.write(`struct ${this.name}`);
|
|
898880
|
+
writer2.write(`struct ${escapeReservedKeyword(this.name)}`);
|
|
898881
898881
|
this.conformances.forEach((conformance, index3) => {
|
|
898882
898882
|
if (index3 === 0) {
|
|
898883
898883
|
writer2.write(": ");
|
|
@@ -898943,148 +898943,6 @@ var Struct3 = class extends AstNode8 {
|
|
|
898943
898943
|
|
|
898944
898944
|
// ../../../generators/swift/codegen/lib/ast/TypeReference.js
|
|
898945
898945
|
init_lib4();
|
|
898946
|
-
var TypeReference59 = class _TypeReference extends AstNode8 {
|
|
898947
|
-
variant;
|
|
898948
|
-
constructor(variant) {
|
|
898949
|
-
super();
|
|
898950
|
-
this.variant = variant;
|
|
898951
|
-
}
|
|
898952
|
-
nonOptional() {
|
|
898953
|
-
return _TypeReference.nonOptional(this);
|
|
898954
|
-
}
|
|
898955
|
-
nonNullable() {
|
|
898956
|
-
return _TypeReference.nonNullable(this);
|
|
898957
|
-
}
|
|
898958
|
-
getReferenceIfSymbolType() {
|
|
898959
|
-
return this.variant.type === "symbol" ? this.variant.symbol : null;
|
|
898960
|
-
}
|
|
898961
|
-
write(writer2) {
|
|
898962
|
-
const { variant } = this;
|
|
898963
|
-
switch (variant.type) {
|
|
898964
|
-
case "symbol":
|
|
898965
|
-
writer2.write(variant.symbol);
|
|
898966
|
-
break;
|
|
898967
|
-
case "generic": {
|
|
898968
|
-
variant.reference.write(writer2);
|
|
898969
|
-
if (variant.arguments.length > 0) {
|
|
898970
|
-
writer2.write("<");
|
|
898971
|
-
variant.arguments.forEach((arg, index3) => {
|
|
898972
|
-
arg.write(writer2);
|
|
898973
|
-
if (index3 < variant.arguments.length - 1) {
|
|
898974
|
-
writer2.write(", ");
|
|
898975
|
-
}
|
|
898976
|
-
});
|
|
898977
|
-
writer2.write(">");
|
|
898978
|
-
}
|
|
898979
|
-
break;
|
|
898980
|
-
}
|
|
898981
|
-
case "tuple":
|
|
898982
|
-
writer2.write("(");
|
|
898983
|
-
variant.elements.forEach((elementType, index3) => {
|
|
898984
|
-
if (index3 > 0) {
|
|
898985
|
-
writer2.write(", ");
|
|
898986
|
-
}
|
|
898987
|
-
elementType.write(writer2);
|
|
898988
|
-
});
|
|
898989
|
-
writer2.write(")");
|
|
898990
|
-
break;
|
|
898991
|
-
case "array":
|
|
898992
|
-
writer2.write("[");
|
|
898993
|
-
variant.elementType.write(writer2);
|
|
898994
|
-
writer2.write("]");
|
|
898995
|
-
break;
|
|
898996
|
-
case "dictionary":
|
|
898997
|
-
writer2.write("[");
|
|
898998
|
-
variant.keyType.write(writer2);
|
|
898999
|
-
writer2.write(": ");
|
|
899000
|
-
variant.valueType.write(writer2);
|
|
899001
|
-
writer2.write("]");
|
|
899002
|
-
break;
|
|
899003
|
-
case "optional":
|
|
899004
|
-
variant.valueType.write(writer2);
|
|
899005
|
-
writer2.write("?");
|
|
899006
|
-
break;
|
|
899007
|
-
case "nullable":
|
|
899008
|
-
writer2.write("Nullable<");
|
|
899009
|
-
variant.valueType.write(writer2);
|
|
899010
|
-
writer2.write(">");
|
|
899011
|
-
break;
|
|
899012
|
-
case "member-access":
|
|
899013
|
-
variant.target.write(writer2);
|
|
899014
|
-
writer2.write(".");
|
|
899015
|
-
writer2.write(variant.memberName);
|
|
899016
|
-
break;
|
|
899017
|
-
default:
|
|
899018
|
-
assertNever(variant);
|
|
899019
|
-
}
|
|
899020
|
-
}
|
|
899021
|
-
equals(that) {
|
|
899022
|
-
switch (this.variant.type) {
|
|
899023
|
-
case "symbol":
|
|
899024
|
-
return that.variant.type === "symbol" && this.variant.symbol === that.variant.symbol;
|
|
899025
|
-
case "generic":
|
|
899026
|
-
return that.variant.type === "generic" && this.variant.reference.equals(that.variant.reference) && this.variant.arguments.every((arg, index3) => that.variant.type === "generic" && that.variant.arguments[index3] && arg.equals(that.variant.arguments[index3]));
|
|
899027
|
-
case "tuple": {
|
|
899028
|
-
return that.variant.type === "tuple" && this.variant.elements.every((arg, index3) => that.variant.type === "tuple" && that.variant.elements[index3] && arg.equals(that.variant.elements[index3]));
|
|
899029
|
-
}
|
|
899030
|
-
case "array":
|
|
899031
|
-
return that.variant.type === "array" && this.variant.elementType.equals(that.variant.elementType);
|
|
899032
|
-
case "dictionary":
|
|
899033
|
-
return that.variant.type === "dictionary" && this.variant.keyType.equals(that.variant.keyType) && this.variant.valueType.equals(that.variant.valueType);
|
|
899034
|
-
case "optional":
|
|
899035
|
-
return that.variant.type == "optional" && this.variant.valueType.equals(that.variant.valueType);
|
|
899036
|
-
case "nullable":
|
|
899037
|
-
return that.variant.type === "nullable" && this.variant.valueType.equals(that.variant.valueType);
|
|
899038
|
-
case "member-access":
|
|
899039
|
-
return that.variant.type === "member-access" && this.variant.target.equals(that.variant.target) && this.variant.memberName === that.variant.memberName;
|
|
899040
|
-
default:
|
|
899041
|
-
assertNever(this.variant);
|
|
899042
|
-
}
|
|
899043
|
-
}
|
|
899044
|
-
static symbol(symbolReference) {
|
|
899045
|
-
return new this({ type: "symbol", symbol: symbolReference });
|
|
899046
|
-
}
|
|
899047
|
-
static generic(reference4, arguments_) {
|
|
899048
|
-
return new this({ type: "generic", reference: reference4, arguments: arguments_ });
|
|
899049
|
-
}
|
|
899050
|
-
static tuple(elements) {
|
|
899051
|
-
return new this({ type: "tuple", elements });
|
|
899052
|
-
}
|
|
899053
|
-
static array(elementType) {
|
|
899054
|
-
return new this({ type: "array", elementType });
|
|
899055
|
-
}
|
|
899056
|
-
static dictionary(keyType, valueType) {
|
|
899057
|
-
return new this({ type: "dictionary", keyType, valueType });
|
|
899058
|
-
}
|
|
899059
|
-
static optional(valueType) {
|
|
899060
|
-
if (valueType.variant.type === "optional") {
|
|
899061
|
-
return valueType;
|
|
899062
|
-
}
|
|
899063
|
-
return new this({ type: "optional", valueType });
|
|
899064
|
-
}
|
|
899065
|
-
static nullable(valueType) {
|
|
899066
|
-
if (valueType.variant.type === "nullable") {
|
|
899067
|
-
return valueType;
|
|
899068
|
-
}
|
|
899069
|
-
return new this({ type: "nullable", valueType });
|
|
899070
|
-
}
|
|
899071
|
-
static memberAccess(target, memberName) {
|
|
899072
|
-
return new this({ type: "member-access", target, memberName });
|
|
899073
|
-
}
|
|
899074
|
-
// Helpers
|
|
899075
|
-
static nonOptional(valueType) {
|
|
899076
|
-
return valueType.variant.type === "optional" ? _TypeReference.nonOptional(valueType.variant.valueType) : valueType;
|
|
899077
|
-
}
|
|
899078
|
-
static nonNullable(valueType) {
|
|
899079
|
-
return valueType.variant.type === "nullable" ? _TypeReference.nonNullable(valueType.variant.valueType) : valueType;
|
|
899080
|
-
}
|
|
899081
|
-
static unqualifiedToSwiftType(symbolName) {
|
|
899082
|
-
return _TypeReference.symbol(symbolName);
|
|
899083
|
-
}
|
|
899084
|
-
static unqualifiedToFoundationType(symbolName) {
|
|
899085
|
-
return _TypeReference.symbol(symbolName);
|
|
899086
|
-
}
|
|
899087
|
-
};
|
|
899088
898946
|
|
|
899089
898947
|
// ../../../generators/swift/codegen/lib/symbol/as-is.js
|
|
899090
898948
|
var SourceAsIsFileSpecs = {
|
|
@@ -899649,6 +899507,150 @@ var SourceTemplateFileSpecs = {
|
|
|
899649
899507
|
}
|
|
899650
899508
|
};
|
|
899651
899509
|
|
|
899510
|
+
// ../../../generators/swift/codegen/lib/ast/TypeReference.js
|
|
899511
|
+
var TypeReference59 = class _TypeReference extends AstNode8 {
|
|
899512
|
+
variant;
|
|
899513
|
+
constructor(variant) {
|
|
899514
|
+
super();
|
|
899515
|
+
this.variant = variant;
|
|
899516
|
+
}
|
|
899517
|
+
nonOptional() {
|
|
899518
|
+
return _TypeReference.nonOptional(this);
|
|
899519
|
+
}
|
|
899520
|
+
nonNullable() {
|
|
899521
|
+
return _TypeReference.nonNullable(this);
|
|
899522
|
+
}
|
|
899523
|
+
getReferenceIfSymbolType() {
|
|
899524
|
+
return this.variant.type === "symbol" ? this.variant.symbol : null;
|
|
899525
|
+
}
|
|
899526
|
+
write(writer2) {
|
|
899527
|
+
const { variant } = this;
|
|
899528
|
+
switch (variant.type) {
|
|
899529
|
+
case "symbol":
|
|
899530
|
+
writer2.write(Symbol3.isSwiftSymbolName(variant.symbol) || Symbol3.isFoundationSymbolName(variant.symbol) ? variant.symbol : escapeReservedKeywordTypeReference(variant.symbol));
|
|
899531
|
+
break;
|
|
899532
|
+
case "generic": {
|
|
899533
|
+
variant.reference.write(writer2);
|
|
899534
|
+
if (variant.arguments.length > 0) {
|
|
899535
|
+
writer2.write("<");
|
|
899536
|
+
variant.arguments.forEach((arg, index3) => {
|
|
899537
|
+
arg.write(writer2);
|
|
899538
|
+
if (index3 < variant.arguments.length - 1) {
|
|
899539
|
+
writer2.write(", ");
|
|
899540
|
+
}
|
|
899541
|
+
});
|
|
899542
|
+
writer2.write(">");
|
|
899543
|
+
}
|
|
899544
|
+
break;
|
|
899545
|
+
}
|
|
899546
|
+
case "tuple":
|
|
899547
|
+
writer2.write("(");
|
|
899548
|
+
variant.elements.forEach((elementType, index3) => {
|
|
899549
|
+
if (index3 > 0) {
|
|
899550
|
+
writer2.write(", ");
|
|
899551
|
+
}
|
|
899552
|
+
elementType.write(writer2);
|
|
899553
|
+
});
|
|
899554
|
+
writer2.write(")");
|
|
899555
|
+
break;
|
|
899556
|
+
case "array":
|
|
899557
|
+
writer2.write("[");
|
|
899558
|
+
variant.elementType.write(writer2);
|
|
899559
|
+
writer2.write("]");
|
|
899560
|
+
break;
|
|
899561
|
+
case "dictionary":
|
|
899562
|
+
writer2.write("[");
|
|
899563
|
+
variant.keyType.write(writer2);
|
|
899564
|
+
writer2.write(": ");
|
|
899565
|
+
variant.valueType.write(writer2);
|
|
899566
|
+
writer2.write("]");
|
|
899567
|
+
break;
|
|
899568
|
+
case "optional":
|
|
899569
|
+
variant.valueType.write(writer2);
|
|
899570
|
+
writer2.write("?");
|
|
899571
|
+
break;
|
|
899572
|
+
case "nullable":
|
|
899573
|
+
writer2.write("Nullable<");
|
|
899574
|
+
variant.valueType.write(writer2);
|
|
899575
|
+
writer2.write(">");
|
|
899576
|
+
break;
|
|
899577
|
+
case "member-access":
|
|
899578
|
+
variant.target.write(writer2);
|
|
899579
|
+
writer2.write(".");
|
|
899580
|
+
writer2.write(variant.memberName);
|
|
899581
|
+
break;
|
|
899582
|
+
default:
|
|
899583
|
+
assertNever(variant);
|
|
899584
|
+
}
|
|
899585
|
+
}
|
|
899586
|
+
equals(that) {
|
|
899587
|
+
switch (this.variant.type) {
|
|
899588
|
+
case "symbol":
|
|
899589
|
+
return that.variant.type === "symbol" && this.variant.symbol === that.variant.symbol;
|
|
899590
|
+
case "generic":
|
|
899591
|
+
return that.variant.type === "generic" && this.variant.reference.equals(that.variant.reference) && this.variant.arguments.every((arg, index3) => that.variant.type === "generic" && that.variant.arguments[index3] && arg.equals(that.variant.arguments[index3]));
|
|
899592
|
+
case "tuple": {
|
|
899593
|
+
return that.variant.type === "tuple" && this.variant.elements.every((arg, index3) => that.variant.type === "tuple" && that.variant.elements[index3] && arg.equals(that.variant.elements[index3]));
|
|
899594
|
+
}
|
|
899595
|
+
case "array":
|
|
899596
|
+
return that.variant.type === "array" && this.variant.elementType.equals(that.variant.elementType);
|
|
899597
|
+
case "dictionary":
|
|
899598
|
+
return that.variant.type === "dictionary" && this.variant.keyType.equals(that.variant.keyType) && this.variant.valueType.equals(that.variant.valueType);
|
|
899599
|
+
case "optional":
|
|
899600
|
+
return that.variant.type == "optional" && this.variant.valueType.equals(that.variant.valueType);
|
|
899601
|
+
case "nullable":
|
|
899602
|
+
return that.variant.type === "nullable" && this.variant.valueType.equals(that.variant.valueType);
|
|
899603
|
+
case "member-access":
|
|
899604
|
+
return that.variant.type === "member-access" && this.variant.target.equals(that.variant.target) && this.variant.memberName === that.variant.memberName;
|
|
899605
|
+
default:
|
|
899606
|
+
assertNever(this.variant);
|
|
899607
|
+
}
|
|
899608
|
+
}
|
|
899609
|
+
static symbol(symbolReference) {
|
|
899610
|
+
return new this({ type: "symbol", symbol: symbolReference });
|
|
899611
|
+
}
|
|
899612
|
+
static generic(reference4, arguments_) {
|
|
899613
|
+
return new this({ type: "generic", reference: reference4, arguments: arguments_ });
|
|
899614
|
+
}
|
|
899615
|
+
static tuple(elements) {
|
|
899616
|
+
return new this({ type: "tuple", elements });
|
|
899617
|
+
}
|
|
899618
|
+
static array(elementType) {
|
|
899619
|
+
return new this({ type: "array", elementType });
|
|
899620
|
+
}
|
|
899621
|
+
static dictionary(keyType, valueType) {
|
|
899622
|
+
return new this({ type: "dictionary", keyType, valueType });
|
|
899623
|
+
}
|
|
899624
|
+
static optional(valueType) {
|
|
899625
|
+
if (valueType.variant.type === "optional") {
|
|
899626
|
+
return valueType;
|
|
899627
|
+
}
|
|
899628
|
+
return new this({ type: "optional", valueType });
|
|
899629
|
+
}
|
|
899630
|
+
static nullable(valueType) {
|
|
899631
|
+
if (valueType.variant.type === "nullable") {
|
|
899632
|
+
return valueType;
|
|
899633
|
+
}
|
|
899634
|
+
return new this({ type: "nullable", valueType });
|
|
899635
|
+
}
|
|
899636
|
+
static memberAccess(target, memberName) {
|
|
899637
|
+
return new this({ type: "member-access", target, memberName });
|
|
899638
|
+
}
|
|
899639
|
+
// Helpers
|
|
899640
|
+
static nonOptional(valueType) {
|
|
899641
|
+
return valueType.variant.type === "optional" ? _TypeReference.nonOptional(valueType.variant.valueType) : valueType;
|
|
899642
|
+
}
|
|
899643
|
+
static nonNullable(valueType) {
|
|
899644
|
+
return valueType.variant.type === "nullable" ? _TypeReference.nonNullable(valueType.variant.valueType) : valueType;
|
|
899645
|
+
}
|
|
899646
|
+
static unqualifiedToSwiftType(symbolName) {
|
|
899647
|
+
return _TypeReference.symbol(symbolName);
|
|
899648
|
+
}
|
|
899649
|
+
static unqualifiedToFoundationType(symbolName) {
|
|
899650
|
+
return _TypeReference.symbol(symbolName);
|
|
899651
|
+
}
|
|
899652
|
+
};
|
|
899653
|
+
|
|
899652
899654
|
// ../../../generators/swift/codegen/lib/swift.js
|
|
899653
899655
|
function class_5(args) {
|
|
899654
899656
|
return new Class6(args);
|
|
@@ -899947,12 +899949,8 @@ var DynamicTypeLiteralMapper6 = class {
|
|
|
899947
899949
|
return null;
|
|
899948
899950
|
}
|
|
899949
899951
|
return swift_exports.functionArgument({
|
|
899950
|
-
label:
|
|
899951
|
-
value:
|
|
899952
|
-
fromSymbol,
|
|
899953
|
-
typeReference: typeInstance.typeReference,
|
|
899954
|
-
value: typeInstance.value
|
|
899955
|
-
})
|
|
899952
|
+
label: sanitizeSwiftIdentifier(typeInstance.name.name.camelCase.unsafeName),
|
|
899953
|
+
value: expression
|
|
899956
899954
|
});
|
|
899957
899955
|
}).filter((argument) => argument != null),
|
|
899958
899956
|
multiline: true
|
|
@@ -900187,7 +900185,7 @@ var FilePropertyMapper7 = class {
|
|
|
900187
900185
|
switch (property24.type) {
|
|
900188
900186
|
case "file": {
|
|
900189
900187
|
const arg = swift_exports.functionArgument({
|
|
900190
|
-
label:
|
|
900188
|
+
label: sanitizeSwiftIdentifier(property24.name.camelCase.unsafeName),
|
|
900191
900189
|
value: this.getSingleFileProperty({ property: property24, record: record23 })
|
|
900192
900190
|
});
|
|
900193
900191
|
result.fileFields.push(arg);
|
|
@@ -900195,7 +900193,7 @@ var FilePropertyMapper7 = class {
|
|
|
900195
900193
|
}
|
|
900196
900194
|
case "fileArray": {
|
|
900197
900195
|
const arg = swift_exports.functionArgument({
|
|
900198
|
-
label:
|
|
900196
|
+
label: sanitizeSwiftIdentifier(property24.name.camelCase.unsafeName),
|
|
900199
900197
|
value: this.getArrayFileProperty({ property: property24, record: record23 })
|
|
900200
900198
|
});
|
|
900201
900199
|
result.fileFields.push(arg);
|
|
@@ -900203,7 +900201,7 @@ var FilePropertyMapper7 = class {
|
|
|
900203
900201
|
}
|
|
900204
900202
|
case "bodyProperty": {
|
|
900205
900203
|
const arg = swift_exports.functionArgument({
|
|
900206
|
-
label:
|
|
900204
|
+
label: sanitizeSwiftIdentifier(property24.name.name.camelCase.unsafeName),
|
|
900207
900205
|
value: this.getBodyProperty({ fromSymbol, property: property24, record: record23 })
|
|
900208
900206
|
});
|
|
900209
900207
|
result.bodyPropertyFields.push(arg);
|
|
@@ -917522,7 +917520,7 @@ function getAutomationContextFromEnv() {
|
|
|
917522
917520
|
config_branch: process.env.FERN_CONFIG_BRANCH,
|
|
917523
917521
|
config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
|
|
917524
917522
|
trigger: process.env.GITHUB_EVENT_NAME,
|
|
917525
|
-
cli_version: "5.23.3-
|
|
917523
|
+
cli_version: "5.23.3-741-gfcf0a7bcaa5"
|
|
917526
917524
|
};
|
|
917527
917525
|
}
|
|
917528
917526
|
function isAutomationMode() {
|
|
@@ -918348,7 +918346,7 @@ var CliContext = class _CliContext {
|
|
|
918348
918346
|
if (false) {
|
|
918349
918347
|
this.logger.error("CLI_VERSION is not defined");
|
|
918350
918348
|
}
|
|
918351
|
-
return "5.23.3-
|
|
918349
|
+
return "5.23.3-741-gfcf0a7bcaa5";
|
|
918352
918350
|
}
|
|
918353
918351
|
getCliName() {
|
|
918354
918352
|
if (false) {
|
package/package.json
CHANGED