@fern-api/fern-api-dev 4.37.9 → 4.37.10
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 +54 -10
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -572006,6 +572006,43 @@ fern protoc-gen-fern "$@"
|
|
|
572006
572006
|
`;
|
|
572007
572007
|
|
|
572008
572008
|
// ../workspace/lazy-fern-workspace/lib/protobuf/ProtobufIRGenerator.js
|
|
572009
|
+
var fernGlobalInstallPromise;
|
|
572010
|
+
async function isFernOnPath(logger) {
|
|
572011
|
+
try {
|
|
572012
|
+
await runExeca(void 0, "fern", ["--version"], {
|
|
572013
|
+
stdout: "ignore",
|
|
572014
|
+
stderr: "ignore"
|
|
572015
|
+
});
|
|
572016
|
+
return true;
|
|
572017
|
+
} catch (error49) {
|
|
572018
|
+
const isNotFound = error49 != null && typeof error49 === "object" && "code" in error49 && error49.code === "ENOENT";
|
|
572019
|
+
if (!isNotFound) {
|
|
572020
|
+
logger.debug(`Unexpected error checking for fern on PATH: ${error49 instanceof Error ? error49.message : String(error49)}`);
|
|
572021
|
+
}
|
|
572022
|
+
return false;
|
|
572023
|
+
}
|
|
572024
|
+
}
|
|
572025
|
+
async function ensureFernGloballyInstalled(cwd2, logger) {
|
|
572026
|
+
if (await isFernOnPath(logger)) {
|
|
572027
|
+
return;
|
|
572028
|
+
}
|
|
572029
|
+
if (fernGlobalInstallPromise) {
|
|
572030
|
+
return fernGlobalInstallPromise;
|
|
572031
|
+
}
|
|
572032
|
+
fernGlobalInstallPromise = (async () => {
|
|
572033
|
+
try {
|
|
572034
|
+
await runExeca(void 0, "npm", ["install", "-g", "fern-api"], {
|
|
572035
|
+
cwd: cwd2,
|
|
572036
|
+
stdout: "ignore",
|
|
572037
|
+
stderr: "pipe"
|
|
572038
|
+
});
|
|
572039
|
+
} catch (err) {
|
|
572040
|
+
fernGlobalInstallPromise = void 0;
|
|
572041
|
+
throw err;
|
|
572042
|
+
}
|
|
572043
|
+
})();
|
|
572044
|
+
return fernGlobalInstallPromise;
|
|
572045
|
+
}
|
|
572009
572046
|
var ProtobufIRGenerator = class {
|
|
572010
572047
|
context;
|
|
572011
572048
|
isAirGapped;
|
|
@@ -572114,11 +572151,7 @@ var ProtobufIRGenerator = class {
|
|
|
572114
572151
|
stdout: "ignore",
|
|
572115
572152
|
stderr: "pipe"
|
|
572116
572153
|
});
|
|
572117
|
-
await
|
|
572118
|
-
cwd: protobufGeneratorConfigPath,
|
|
572119
|
-
stdout: "ignore",
|
|
572120
|
-
stderr: "pipe"
|
|
572121
|
-
});
|
|
572154
|
+
await ensureFernGloballyInstalled(protobufGeneratorConfigPath, this.context.logger);
|
|
572122
572155
|
await (0, import_promises33.writeFile)(join2(protobufGeneratorConfigPath, RelativeFilePath2.of(PROTOBUF_GENERATOR_CONFIG_FILENAME)), PROTOBUF_GEN_CONFIG);
|
|
572123
572156
|
const shellProxyPath = join2(protobufGeneratorConfigPath, RelativeFilePath2.of(PROTOBUF_SHELL_PROXY_FILENAME));
|
|
572124
572157
|
await (0, import_promises33.writeFile)(shellProxyPath, PROTOBUF_SHELL_PROXY);
|
|
@@ -581567,7 +581600,7 @@ var AccessTokenPosthogManager = class {
|
|
|
581567
581600
|
properties: {
|
|
581568
581601
|
...event,
|
|
581569
581602
|
...event.properties,
|
|
581570
|
-
version: "4.37.
|
|
581603
|
+
version: "4.37.10",
|
|
581571
581604
|
usingAccessToken: true
|
|
581572
581605
|
}
|
|
581573
581606
|
});
|
|
@@ -581618,7 +581651,7 @@ var UserPosthogManager = class {
|
|
|
581618
581651
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
581619
581652
|
event: "CLI",
|
|
581620
581653
|
properties: {
|
|
581621
|
-
version: "4.37.
|
|
581654
|
+
version: "4.37.10",
|
|
581622
581655
|
...event,
|
|
581623
581656
|
...event.properties,
|
|
581624
581657
|
usingAccessToken: false,
|
|
@@ -787721,7 +787754,7 @@ var import_path51 = __toESM(require("path"), 1);
|
|
|
787721
787754
|
var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
787722
787755
|
var LOGS_FOLDER_NAME = "logs";
|
|
787723
787756
|
function getCliSource() {
|
|
787724
|
-
const version8 = "4.37.
|
|
787757
|
+
const version8 = "4.37.10";
|
|
787725
787758
|
return `cli@${version8}`;
|
|
787726
787759
|
}
|
|
787727
787760
|
var DebugLogger = class {
|
|
@@ -798516,7 +798549,7 @@ var LegacyDocsPublisher = class {
|
|
|
798516
798549
|
previewId: void 0,
|
|
798517
798550
|
disableTemplates: void 0,
|
|
798518
798551
|
skipUpload,
|
|
798519
|
-
cliVersion: "4.37.
|
|
798552
|
+
cliVersion: "4.37.10"
|
|
798520
798553
|
});
|
|
798521
798554
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
798522
798555
|
return { success: false };
|
|
@@ -814005,6 +814038,17 @@ var Enum = class extends Node5 {
|
|
|
814005
814038
|
writer2.pushScope();
|
|
814006
814039
|
writer2.writeLine(`writer.WriteStringValue(_enumToString.TryGetValue(value, out var stringValue) ? stringValue : null);`);
|
|
814007
814040
|
writer2.popScope();
|
|
814041
|
+
writer2.newLine();
|
|
814042
|
+
writer2.writeLine(`public override ${this.name} ReadAsPropertyName(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options)`);
|
|
814043
|
+
writer2.pushScope();
|
|
814044
|
+
writer2.writeLine(`var stringValue = reader.GetString() ?? throw new global::System.Exception("The JSON property name could not be read as a string.");`);
|
|
814045
|
+
writer2.writeLine(`return _stringToEnum.TryGetValue(stringValue, out var enumValue) ? enumValue : default;`);
|
|
814046
|
+
writer2.popScope();
|
|
814047
|
+
writer2.newLine();
|
|
814048
|
+
writer2.writeLine(`public override void WriteAsPropertyName(global::System.Text.Json.Utf8JsonWriter writer, ${this.name} value, global::System.Text.Json.JsonSerializerOptions options)`);
|
|
814049
|
+
writer2.pushScope();
|
|
814050
|
+
writer2.writeLine(`writer.WritePropertyName(_enumToString.TryGetValue(value, out var stringValue) ? stringValue : value.ToString());`);
|
|
814051
|
+
writer2.popScope();
|
|
814008
814052
|
writer2.popScope();
|
|
814009
814053
|
}
|
|
814010
814054
|
};
|
|
@@ -871091,7 +871135,7 @@ var CliContext = class {
|
|
|
871091
871135
|
if (false) {
|
|
871092
871136
|
this.logger.error("CLI_VERSION is not defined");
|
|
871093
871137
|
}
|
|
871094
|
-
return "4.37.
|
|
871138
|
+
return "4.37.10";
|
|
871095
871139
|
}
|
|
871096
871140
|
getCliName() {
|
|
871097
871141
|
if (false) {
|
package/package.json
CHANGED