@fern-api/fern-api-dev 5.23.3-1123-g38b2dec6366 → 5.23.3-1124-gfb5001a0d92
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 +33 -14
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -687227,7 +687227,7 @@ var AccessTokenPosthogManager = class {
|
|
|
687227
687227
|
properties: {
|
|
687228
687228
|
...event,
|
|
687229
687229
|
...event.properties,
|
|
687230
|
-
version: "5.23.3-
|
|
687230
|
+
version: "5.23.3-1124-gfb5001a0d92",
|
|
687231
687231
|
usingAccessToken: true,
|
|
687232
687232
|
...getRunIdProperties()
|
|
687233
687233
|
}
|
|
@@ -687293,7 +687293,7 @@ var UserPosthogManager = class {
|
|
|
687293
687293
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
687294
687294
|
event: "CLI",
|
|
687295
687295
|
properties: {
|
|
687296
|
-
version: "5.23.3-
|
|
687296
|
+
version: "5.23.3-1124-gfb5001a0d92",
|
|
687297
687297
|
...event,
|
|
687298
687298
|
...event.properties,
|
|
687299
687299
|
usingAccessToken: false,
|
|
@@ -868388,7 +868388,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
868388
868388
|
var LOGS_FOLDER_NAME = "logs";
|
|
868389
868389
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
868390
868390
|
function getCliSource() {
|
|
868391
|
-
const version7 = "5.23.3-
|
|
868391
|
+
const version7 = "5.23.3-1124-gfb5001a0d92";
|
|
868392
868392
|
return `cli@${version7}`;
|
|
868393
868393
|
}
|
|
868394
868394
|
var DebugLogger = class {
|
|
@@ -889949,6 +889949,9 @@ var import_child_process8 = require("child_process");
|
|
|
889949
889949
|
var import_path77 = __toESM(require("path"), 1);
|
|
889950
889950
|
init_esm16();
|
|
889951
889951
|
var import_tmp_promise12 = __toESM(require_tmp_promise(), 1);
|
|
889952
|
+
function isCommitSha(ref2) {
|
|
889953
|
+
return /^[0-9a-f]{7,40}$/i.test(ref2);
|
|
889954
|
+
}
|
|
889952
889955
|
function cloneTargetKey(target) {
|
|
889953
889956
|
return `${target.repo}#${target.ref ?? "HEAD"}`;
|
|
889954
889957
|
}
|
|
@@ -889986,12 +889989,22 @@ async function resolveRemoteSpecs({ definitions: definitions7, context: context3
|
|
|
889986
889989
|
const tmpDir = await import_tmp_promise12.default.dir({ unsafeCleanup: true });
|
|
889987
889990
|
const clonePath = AbsoluteFilePath2.of(tmpDir.path);
|
|
889988
889991
|
const git = simpleGit();
|
|
889989
|
-
const
|
|
889990
|
-
if (target.ref != null) {
|
|
889991
|
-
cloneArgs.push("--branch", target.ref);
|
|
889992
|
-
}
|
|
889992
|
+
const useCommitShaFlow = target.ref != null && isCommitSha(target.ref);
|
|
889993
889993
|
try {
|
|
889994
|
-
|
|
889994
|
+
if (useCommitShaFlow) {
|
|
889995
|
+
const ref2 = target.ref;
|
|
889996
|
+
const cloneArgs = ["--depth", "1", "--config", "core.symlinks=false", "--no-checkout"];
|
|
889997
|
+
await git.clone(target.repo, tmpDir.path, cloneArgs);
|
|
889998
|
+
const repoGit = simpleGit(tmpDir.path);
|
|
889999
|
+
await repoGit.fetch("origin", ref2, { "--depth": "1" });
|
|
890000
|
+
await repoGit.checkout(ref2);
|
|
890001
|
+
} else {
|
|
890002
|
+
const cloneArgs = ["--depth", "1", "--config", "core.symlinks=false"];
|
|
890003
|
+
if (target.ref != null) {
|
|
890004
|
+
cloneArgs.push("--branch", target.ref);
|
|
890005
|
+
}
|
|
890006
|
+
await git.clone(target.repo, tmpDir.path, cloneArgs);
|
|
890007
|
+
}
|
|
889995
890008
|
} catch (error50) {
|
|
889996
890009
|
const errorMessage = extractErrorMessage(error50);
|
|
889997
890010
|
if (errorMessage.includes("Authentication failed") || errorMessage.includes("could not read Username") || errorMessage.includes("401") || errorMessage.includes("403")) {
|
|
@@ -890019,11 +890032,16 @@ async function resolveRemoteSpecs({ definitions: definitions7, context: context3
|
|
|
890019
890032
|
throw new Error(`Invalid git source path '${def.gitSource.path}': path must be relative to the repository root and cannot traverse outside it.`);
|
|
890020
890033
|
}
|
|
890021
890034
|
if (def.schema.type === "protobuf") {
|
|
890035
|
+
const resolvedTarget = def.schema.target.length > 0 ? import_path77.default.resolve(clonedPath, def.schema.target) : def.schema.target;
|
|
890036
|
+
if (resolvedTarget.length > 0 && !resolvedTarget.startsWith(clonedPath + import_path77.default.sep) && resolvedTarget !== clonedPath) {
|
|
890037
|
+
throw new Error(`Invalid proto target path '${def.schema.target}': path must be relative to the repository root and cannot traverse outside it.`);
|
|
890038
|
+
}
|
|
890022
890039
|
return {
|
|
890023
890040
|
...def,
|
|
890024
890041
|
schema: {
|
|
890025
890042
|
...def.schema,
|
|
890026
|
-
root: resolvedPath
|
|
890043
|
+
root: resolvedPath,
|
|
890044
|
+
target: resolvedTarget
|
|
890027
890045
|
},
|
|
890028
890046
|
gitSource: void 0,
|
|
890029
890047
|
resolvedAbsolutePath: true
|
|
@@ -890067,13 +890085,14 @@ async function loadSingleNamespaceAPIWorkspace({ absolutePathToWorkspace, namesp
|
|
|
890067
890085
|
}
|
|
890068
890086
|
};
|
|
890069
890087
|
}
|
|
890070
|
-
const absoluteFilepathToTarget = definition3.schema.target.length === 0 ? void 0 : join8(absolutePathToWorkspace, RelativeFilePath2.of(definition3.schema.target));
|
|
890088
|
+
const absoluteFilepathToTarget = definition3.schema.target.length === 0 ? void 0 : import_path78.default.isAbsolute(definition3.schema.target) && definition3.resolvedAbsolutePath ? AbsoluteFilePath2.of(definition3.schema.target) : join8(absolutePathToWorkspace, RelativeFilePath2.of(definition3.schema.target));
|
|
890071
890089
|
if (absoluteFilepathToTarget != null) {
|
|
890072
890090
|
if (!await doesPathExist(absoluteFilepathToTarget)) {
|
|
890091
|
+
const displayTarget = import_path78.default.isAbsolute(definition3.schema.target) && definition3.resolvedAbsolutePath ? RelativeFilePath2.of(import_path78.default.basename(definition3.schema.target)) : RelativeFilePath2.of(definition3.schema.target);
|
|
890073
890092
|
return {
|
|
890074
890093
|
didSucceed: false,
|
|
890075
890094
|
failures: {
|
|
890076
|
-
[
|
|
890095
|
+
[displayTarget]: {
|
|
890077
890096
|
type: WorkspaceLoaderFailureType.FILE_MISSING
|
|
890078
890097
|
}
|
|
890079
890098
|
}
|
|
@@ -900886,7 +900905,7 @@ var LegacyDocsPublisher = class {
|
|
|
900886
900905
|
previewId,
|
|
900887
900906
|
disableTemplates: void 0,
|
|
900888
900907
|
skipUpload,
|
|
900889
|
-
cliVersion: "5.23.3-
|
|
900908
|
+
cliVersion: "5.23.3-1124-gfb5001a0d92",
|
|
900890
900909
|
loginCommand: "fern auth login"
|
|
900891
900910
|
});
|
|
900892
900911
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
@@ -967194,7 +967213,7 @@ function getAutomationContextFromEnv() {
|
|
|
967194
967213
|
config_branch: process.env.FERN_CONFIG_BRANCH,
|
|
967195
967214
|
config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
|
|
967196
967215
|
trigger: process.env.GITHUB_EVENT_NAME,
|
|
967197
|
-
cli_version: "5.23.3-
|
|
967216
|
+
cli_version: "5.23.3-1124-gfb5001a0d92"
|
|
967198
967217
|
};
|
|
967199
967218
|
}
|
|
967200
967219
|
function isAutomationMode() {
|
|
@@ -968026,7 +968045,7 @@ var CliContext = class _CliContext {
|
|
|
968026
968045
|
if (false) {
|
|
968027
968046
|
this.logger.error("CLI_VERSION is not defined");
|
|
968028
968047
|
}
|
|
968029
|
-
return "5.23.3-
|
|
968048
|
+
return "5.23.3-1124-gfb5001a0d92";
|
|
968030
968049
|
}
|
|
968031
968050
|
getCliName() {
|
|
968032
968051
|
if (false) {
|
package/package.json
CHANGED