@fern-api/fern-api-dev 5.23.3-1409-g6e4052806ff → 5.23.3-1413-gf9d0bcb1326
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 +21 -9
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -582534,11 +582534,23 @@ var require_pushSignedCommit = __commonJS({
|
|
|
582534
582534
|
"../../generator-cli/lib/pipeline/github/pushSignedCommit.js"(exports2) {
|
|
582535
582535
|
"use strict";
|
|
582536
582536
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
582537
|
+
exports2.resolveCommitAuthor = resolveCommitAuthor;
|
|
582537
582538
|
exports2.pushSignedCommit = pushSignedCommit;
|
|
582538
582539
|
exports2.isNonFastForwardError = isNonFastForwardError;
|
|
582539
582540
|
var core_utils_1 = (init_lib4(), __toCommonJS(lib_exports));
|
|
582541
|
+
var constants_1 = require_constants8();
|
|
582540
582542
|
var MAX_CONCURRENT_PUSH_RETRIES = 3;
|
|
582541
582543
|
var MAX_SIGNED_CHAIN_LENGTH = 20;
|
|
582544
|
+
var PAT_TOKEN_PREFIXES = ["ghp_", "github_pat_"];
|
|
582545
|
+
function resolveCommitAuthor(token, author) {
|
|
582546
|
+
if (author != null) {
|
|
582547
|
+
return author;
|
|
582548
|
+
}
|
|
582549
|
+
if (PAT_TOKEN_PREFIXES.some((prefix2) => token.startsWith(prefix2))) {
|
|
582550
|
+
return { name: constants_1.FERN_BOT_NAME, email: constants_1.FERN_BOT_EMAIL };
|
|
582551
|
+
}
|
|
582552
|
+
return void 0;
|
|
582553
|
+
}
|
|
582542
582554
|
async function pushSignedCommit({ repository, octokit, owner, repo, branch, force, rebaseOnConflict = false, author, logger: logger4 }) {
|
|
582543
582555
|
const tempRef = `refs/temp/fern-${Date.now()}`;
|
|
582544
582556
|
let tempRefPushed = false;
|
|
@@ -582966,7 +582978,7 @@ var require_GithubStep = __commonJS({
|
|
|
582966
582978
|
repo,
|
|
582967
582979
|
branch: prBranch,
|
|
582968
582980
|
force: isUpdatingExistingPR,
|
|
582969
|
-
author: this.config.author,
|
|
582981
|
+
author: (0, pushSignedCommit_1.resolveCommitAuthor)(this.config.token, this.config.author),
|
|
582970
582982
|
logger: this.logger
|
|
582971
582983
|
});
|
|
582972
582984
|
const pushedBranch = await repository.getCurrentBranch();
|
|
@@ -583089,7 +583101,7 @@ var require_GithubStep = __commonJS({
|
|
|
583089
583101
|
branch: baseBranch,
|
|
583090
583102
|
force: false,
|
|
583091
583103
|
rebaseOnConflict: true,
|
|
583092
|
-
author: this.config.author,
|
|
583104
|
+
author: (0, pushSignedCommit_1.resolveCommitAuthor)(this.config.token, this.config.author),
|
|
583093
583105
|
logger: this.logger
|
|
583094
583106
|
});
|
|
583095
583107
|
const pushedBranch = await repository.getCurrentBranch();
|
|
@@ -583131,7 +583143,7 @@ var require_GithubStep = __commonJS({
|
|
|
583131
583143
|
branch: baseBranch,
|
|
583132
583144
|
force: false,
|
|
583133
583145
|
rebaseOnConflict: true,
|
|
583134
|
-
author: this.config.author,
|
|
583146
|
+
author: (0, pushSignedCommit_1.resolveCommitAuthor)(this.config.token, this.config.author),
|
|
583135
583147
|
logger: this.logger
|
|
583136
583148
|
});
|
|
583137
583149
|
const pushedBranch = await repository.getCurrentBranch();
|
|
@@ -690067,7 +690079,7 @@ var AccessTokenPosthogManager = class {
|
|
|
690067
690079
|
properties: {
|
|
690068
690080
|
...event,
|
|
690069
690081
|
...event.properties,
|
|
690070
|
-
version: "5.23.3-
|
|
690082
|
+
version: "5.23.3-1413-gf9d0bcb1326",
|
|
690071
690083
|
usingAccessToken: true,
|
|
690072
690084
|
...getRunIdProperties()
|
|
690073
690085
|
}
|
|
@@ -690133,7 +690145,7 @@ var UserPosthogManager = class {
|
|
|
690133
690145
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
690134
690146
|
event: "CLI",
|
|
690135
690147
|
properties: {
|
|
690136
|
-
version: "5.23.3-
|
|
690148
|
+
version: "5.23.3-1413-gf9d0bcb1326",
|
|
690137
690149
|
...event,
|
|
690138
690150
|
...event.properties,
|
|
690139
690151
|
usingAccessToken: false,
|
|
@@ -871234,7 +871246,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
871234
871246
|
var LOGS_FOLDER_NAME = "logs";
|
|
871235
871247
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
871236
871248
|
function getCliSource() {
|
|
871237
|
-
const version7 = "5.23.3-
|
|
871249
|
+
const version7 = "5.23.3-1413-gf9d0bcb1326";
|
|
871238
871250
|
return `cli@${version7}`;
|
|
871239
871251
|
}
|
|
871240
871252
|
var DebugLogger = class {
|
|
@@ -903817,7 +903829,7 @@ var LegacyDocsPublisher = class {
|
|
|
903817
903829
|
previewId,
|
|
903818
903830
|
disableTemplates: void 0,
|
|
903819
903831
|
skipUpload,
|
|
903820
|
-
cliVersion: "5.23.3-
|
|
903832
|
+
cliVersion: "5.23.3-1413-gf9d0bcb1326",
|
|
903821
903833
|
loginCommand: "fern auth login"
|
|
903822
903834
|
});
|
|
903823
903835
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
@@ -970343,7 +970355,7 @@ function getAutomationContextFromEnv() {
|
|
|
970343
970355
|
config_branch: process.env.FERN_CONFIG_BRANCH,
|
|
970344
970356
|
config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
|
|
970345
970357
|
trigger: process.env.GITHUB_EVENT_NAME,
|
|
970346
|
-
cli_version: "5.23.3-
|
|
970358
|
+
cli_version: "5.23.3-1413-gf9d0bcb1326"
|
|
970347
970359
|
};
|
|
970348
970360
|
}
|
|
970349
970361
|
function isAutomationMode() {
|
|
@@ -971175,7 +971187,7 @@ var CliContext = class _CliContext {
|
|
|
971175
971187
|
if (false) {
|
|
971176
971188
|
this.logger.error("CLI_VERSION is not defined");
|
|
971177
971189
|
}
|
|
971178
|
-
return "5.23.3-
|
|
971190
|
+
return "5.23.3-1413-gf9d0bcb1326";
|
|
971179
971191
|
}
|
|
971180
971192
|
getCliName() {
|
|
971181
971193
|
if (false) {
|
package/package.json
CHANGED