@fern-api/fern-api-dev 3.27.1-1-g21d8c43893 → 3.27.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/cli.cjs +56 -7
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -1413817,7 +1413817,7 @@ var AccessTokenPosthogManager = class {
|
|
|
1413817
1413817
|
properties: {
|
|
1413818
1413818
|
...event,
|
|
1413819
1413819
|
...event.properties,
|
|
1413820
|
-
version: "3.27.
|
|
1413820
|
+
version: "3.27.2",
|
|
1413821
1413821
|
usingAccessToken: true
|
|
1413822
1413822
|
}
|
|
1413823
1413823
|
});
|
|
@@ -1413916,7 +1413916,7 @@ var UserPosthogManager = class {
|
|
|
1413916
1413916
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
1413917
1413917
|
event: "CLI",
|
|
1413918
1413918
|
properties: {
|
|
1413919
|
-
version: "3.27.
|
|
1413919
|
+
version: "3.27.2",
|
|
1413920
1413920
|
...event,
|
|
1413921
1413921
|
...event.properties,
|
|
1413922
1413922
|
usingAccessToken: false,
|
|
@@ -1493982,7 +1493982,7 @@ var CliContext = class {
|
|
|
1493982
1493982
|
if (false) {
|
|
1493983
1493983
|
this.logger.error("CLI_VERSION is not defined");
|
|
1493984
1493984
|
}
|
|
1493985
|
-
return "3.27.
|
|
1493985
|
+
return "3.27.2";
|
|
1493986
1493986
|
}
|
|
1493987
1493987
|
getCliName() {
|
|
1493988
1493988
|
if (false) {
|
|
@@ -1570472,6 +1570472,13 @@ var ExampleResolverImpl = class {
|
|
|
1570472
1570472
|
file
|
|
1570473
1570473
|
};
|
|
1570474
1570474
|
}
|
|
1570475
|
+
const parsedReference = this.parseExampleReference(example);
|
|
1570476
|
+
if (parsedReference == null) {
|
|
1570477
|
+
return {
|
|
1570478
|
+
resolvedExample: example,
|
|
1570479
|
+
file
|
|
1570480
|
+
};
|
|
1570481
|
+
}
|
|
1570475
1570482
|
return this.resolveExampleReference(example, file);
|
|
1570476
1570483
|
}
|
|
1570477
1570484
|
resolveExampleReference(example, file) {
|
|
@@ -1570505,17 +1570512,32 @@ var ExampleResolverImpl = class {
|
|
|
1570505
1570512
|
return void 0;
|
|
1570506
1570513
|
}
|
|
1570507
1570514
|
if (third == null) {
|
|
1570515
|
+
const rawTypeReference = first3.slice(EXAMPLE_REFERENCE_PREFIX.length);
|
|
1570516
|
+
if (!isValidTypeNameStart(rawTypeReference)) {
|
|
1570517
|
+
return void 0;
|
|
1570518
|
+
}
|
|
1570508
1570519
|
return {
|
|
1570509
|
-
rawTypeReference
|
|
1570520
|
+
rawTypeReference,
|
|
1570510
1570521
|
exampleName: second
|
|
1570511
1570522
|
};
|
|
1570512
1570523
|
}
|
|
1570524
|
+
const importName = first3.slice(EXAMPLE_REFERENCE_PREFIX.length);
|
|
1570525
|
+
if (!isValidTypeNameStart(importName) || !isValidTypeNameStart(second)) {
|
|
1570526
|
+
return void 0;
|
|
1570527
|
+
}
|
|
1570513
1570528
|
return {
|
|
1570514
|
-
rawTypeReference: `${
|
|
1570529
|
+
rawTypeReference: `${importName}.${second}`,
|
|
1570515
1570530
|
exampleName: third
|
|
1570516
1570531
|
};
|
|
1570517
1570532
|
}
|
|
1570518
1570533
|
};
|
|
1570534
|
+
function isValidTypeNameStart(name2) {
|
|
1570535
|
+
if (name2.length === 0) {
|
|
1570536
|
+
return false;
|
|
1570537
|
+
}
|
|
1570538
|
+
const firstChar = name2.charAt(0);
|
|
1570539
|
+
return firstChar >= "a" && firstChar <= "z" || firstChar >= "A" && firstChar <= "Z";
|
|
1570540
|
+
}
|
|
1570519
1570541
|
|
|
1570520
1570542
|
// ../generation/ir-generator/lib/resolvers/PropertyResolver.js
|
|
1570521
1570543
|
var PropertyResolverImpl = class {
|
|
@@ -1588459,7 +1588481,7 @@ var import_path35 = __toESM(require("path"), 1);
|
|
|
1588459
1588481
|
var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
1588460
1588482
|
var LOGS_FOLDER_NAME = "logs";
|
|
1588461
1588483
|
function getCliSource() {
|
|
1588462
|
-
const version6 = "3.27.
|
|
1588484
|
+
const version6 = "3.27.2";
|
|
1588463
1588485
|
return `cli@${version6}`;
|
|
1588464
1588486
|
}
|
|
1588465
1588487
|
var DebugLogger = class {
|
|
@@ -1632006,9 +1632028,36 @@ function createDocsVisitor(visitor, nodePath) {
|
|
|
1632006
1632028
|
}
|
|
1632007
1632029
|
|
|
1632008
1632030
|
// ../fern-definition/validator/lib/ast/visitors/utils/visitAllReferencesInExample.js
|
|
1632031
|
+
function isValidExampleReference(example) {
|
|
1632032
|
+
if (!example.startsWith(EXAMPLE_REFERENCE_PREFIX)) {
|
|
1632033
|
+
return false;
|
|
1632034
|
+
}
|
|
1632035
|
+
const parts = example.split(".");
|
|
1632036
|
+
if (parts.length < 2 || parts.length > 3) {
|
|
1632037
|
+
return false;
|
|
1632038
|
+
}
|
|
1632039
|
+
const firstPart = parts[0]?.slice(EXAMPLE_REFERENCE_PREFIX.length);
|
|
1632040
|
+
if (!firstPart || !startsWithLetter(firstPart)) {
|
|
1632041
|
+
return false;
|
|
1632042
|
+
}
|
|
1632043
|
+
if (parts.length === 3) {
|
|
1632044
|
+
const secondPart = parts[1];
|
|
1632045
|
+
if (!secondPart || !startsWithLetter(secondPart)) {
|
|
1632046
|
+
return false;
|
|
1632047
|
+
}
|
|
1632048
|
+
}
|
|
1632049
|
+
return true;
|
|
1632050
|
+
}
|
|
1632051
|
+
function startsWithLetter(str3) {
|
|
1632052
|
+
if (str3.length === 0) {
|
|
1632053
|
+
return false;
|
|
1632054
|
+
}
|
|
1632055
|
+
const firstChar = str3.charAt(0);
|
|
1632056
|
+
return firstChar >= "a" && firstChar <= "z" || firstChar >= "A" && firstChar <= "Z";
|
|
1632057
|
+
}
|
|
1632009
1632058
|
function visitAllReferencesInExample({ example, visitor, nodePath }) {
|
|
1632010
1632059
|
if (typeof example === "string") {
|
|
1632011
|
-
if (example
|
|
1632060
|
+
if (isValidExampleReference(example)) {
|
|
1632012
1632061
|
visitor.exampleTypeReference?.(example, nodePath);
|
|
1632013
1632062
|
}
|
|
1632014
1632063
|
} else if (isPlainObject2(example)) {
|
package/package.json
CHANGED