@fern-api/fern-api-dev 5.18.0-1-g1183ddd9214 → 5.18.0
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 +14 -42
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -66496,22 +66496,6 @@ var init_getFileContent = __esm({
|
|
|
66496
66496
|
}
|
|
66497
66497
|
});
|
|
66498
66498
|
|
|
66499
|
-
// ../../commons/github/lib/getGithubApiBaseUrl.js
|
|
66500
|
-
function getGithubApiBaseUrl(repositoryUri) {
|
|
66501
|
-
const { remote } = parseRepository(repositoryUri);
|
|
66502
|
-
if (remote === DEFAULT_REMOTE) {
|
|
66503
|
-
return void 0;
|
|
66504
|
-
}
|
|
66505
|
-
return `https://${remote}/api/v3`;
|
|
66506
|
-
}
|
|
66507
|
-
var init_getGithubApiBaseUrl = __esm({
|
|
66508
|
-
"../../commons/github/lib/getGithubApiBaseUrl.js"() {
|
|
66509
|
-
"use strict";
|
|
66510
|
-
init_constants2();
|
|
66511
|
-
init_parseRepository();
|
|
66512
|
-
}
|
|
66513
|
-
});
|
|
66514
|
-
|
|
66515
66499
|
// ../../commons/github/lib/getLatestRelease.js
|
|
66516
66500
|
function isSemverPrerelease(tag2) {
|
|
66517
66501
|
return import_semver6.default.prerelease(tag2) != null;
|
|
@@ -66587,7 +66571,6 @@ __export(lib_exports3, {
|
|
|
66587
66571
|
createOrUpdatePullRequest: () => createOrUpdatePullRequest,
|
|
66588
66572
|
deleteBranch: () => deleteBranch,
|
|
66589
66573
|
getFileContent: () => getFileContent,
|
|
66590
|
-
getGithubApiBaseUrl: () => getGithubApiBaseUrl,
|
|
66591
66574
|
getLatestRelease: () => getLatestRelease,
|
|
66592
66575
|
getOrUpdateBranch: () => getOrUpdateBranch,
|
|
66593
66576
|
parseRepository: () => parseRepository
|
|
@@ -66600,7 +66583,6 @@ var init_lib7 = __esm({
|
|
|
66600
66583
|
init_createOrUpdatePullRequest();
|
|
66601
66584
|
init_deleteBranch();
|
|
66602
66585
|
init_getFileContent();
|
|
66603
|
-
init_getGithubApiBaseUrl();
|
|
66604
66586
|
init_getLatestRelease();
|
|
66605
66587
|
init_getOrUpdateBranch();
|
|
66606
66588
|
init_parseRepository();
|
|
@@ -364132,8 +364114,8 @@ var require_GithubStep = __commonJS({
|
|
|
364132
364114
|
}
|
|
364133
364115
|
async executePullRequestMode(repository, newPrBranch, skipCommit, replayConflictInfo, replayResult, resolved) {
|
|
364134
364116
|
const baseBranch = this.config.branch ?? await repository.getDefaultBranch();
|
|
364135
|
-
const octokit = this.
|
|
364136
|
-
const { owner, repo
|
|
364117
|
+
const octokit = new rest_1.Octokit({ auth: this.config.token });
|
|
364118
|
+
const { owner, repo } = (0, github_1.parseRepository)(this.config.uri);
|
|
364137
364119
|
let prBranch;
|
|
364138
364120
|
let isUpdatingExistingPR = false;
|
|
364139
364121
|
let generationBaseSha;
|
|
@@ -364202,7 +364184,7 @@ var require_GithubStep = __commonJS({
|
|
|
364202
364184
|
logger: this.logger
|
|
364203
364185
|
});
|
|
364204
364186
|
const pushedBranch = await repository.getCurrentBranch();
|
|
364205
|
-
result.branchUrl = `https
|
|
364187
|
+
result.branchUrl = `https://github.com/${this.config.uri}/tree/${pushedBranch}`;
|
|
364206
364188
|
this.logger.info(`Pushed branch: ${result.branchUrl}`);
|
|
364207
364189
|
if (generationBaseSha != null) {
|
|
364208
364190
|
try {
|
|
@@ -364217,7 +364199,7 @@ var require_GithubStep = __commonJS({
|
|
|
364217
364199
|
}
|
|
364218
364200
|
}
|
|
364219
364201
|
const headSha = await repository.getHeadSha();
|
|
364220
|
-
const changelogUrl = resolved.changelogEntry ? `https
|
|
364202
|
+
const changelogUrl = resolved.changelogEntry ? `https://github.com/${this.config.uri}/blob/${headSha}/changelog.md` : void 0;
|
|
364221
364203
|
const { prTitle, prBody } = (0, parseCommitMessage_1.parseCommitMessageForPR)(resolved.commitMessage, resolved.changelogEntry, resolved.prDescription, resolved.versionBumpReason, resolved.previousVersion, resolved.newVersion, resolved.versionBump, changelogUrl);
|
|
364222
364204
|
const replaySection = (0, replay_summary_1.formatReplayPrBody)(replayResult, { branchName: prBranch, repoUri: this.config.uri });
|
|
364223
364205
|
let enrichedBody = replaySection != null ? prBody + "\n\n---\n\n" + replaySection : prBody;
|
|
@@ -364299,8 +364281,8 @@ var require_GithubStep = __commonJS({
|
|
|
364299
364281
|
success: true
|
|
364300
364282
|
};
|
|
364301
364283
|
if (!this.config.previewMode) {
|
|
364302
|
-
const octokit = this.
|
|
364303
|
-
const { owner, repo
|
|
364284
|
+
const octokit = new rest_1.Octokit({ auth: this.config.token });
|
|
364285
|
+
const { owner, repo } = (0, github_1.parseRepository)(this.config.uri);
|
|
364304
364286
|
await (0, pushSignedCommit_1.pushSignedCommit)({
|
|
364305
364287
|
repository,
|
|
364306
364288
|
octokit,
|
|
@@ -364312,18 +364294,11 @@ var require_GithubStep = __commonJS({
|
|
|
364312
364294
|
logger: this.logger
|
|
364313
364295
|
});
|
|
364314
364296
|
const pushedBranch = await repository.getCurrentBranch();
|
|
364315
|
-
result.branchUrl = `https
|
|
364297
|
+
result.branchUrl = `https://github.com/${this.config.uri}/tree/${pushedBranch}`;
|
|
364316
364298
|
this.logger.info(`Pushed branch: ${result.branchUrl}`);
|
|
364317
364299
|
}
|
|
364318
364300
|
return result;
|
|
364319
364301
|
}
|
|
364320
|
-
createOctokit() {
|
|
364321
|
-
const opts = { auth: this.config.token };
|
|
364322
|
-
if (this.config.apiBaseUrl != null) {
|
|
364323
|
-
opts.baseUrl = this.config.apiBaseUrl;
|
|
364324
|
-
}
|
|
364325
|
-
return new rest_1.Octokit(opts);
|
|
364326
|
-
}
|
|
364327
364302
|
async ensureFernignore() {
|
|
364328
364303
|
this.logger.debug("Checking for .fernignore file...");
|
|
364329
364304
|
const fernignorePath = (0, path_1.join)(this.outputDir, ".fernignore");
|
|
@@ -385973,10 +385948,8 @@ var require_GitHub = __commonJS({
|
|
|
385973
385948
|
await this.restoreFiles(repository, fernIgnoreFiles);
|
|
385974
385949
|
await repository.commit("SDK Generation");
|
|
385975
385950
|
await repository.push();
|
|
385976
|
-
const apiBaseUrl = (0, github_1.getGithubApiBaseUrl)(this.githubConfig.uri);
|
|
385977
385951
|
const octokit = new rest_1.Octokit({
|
|
385978
|
-
auth: this.githubConfig.token
|
|
385979
|
-
...apiBaseUrl != null ? { baseUrl: apiBaseUrl } : {}
|
|
385952
|
+
auth: this.githubConfig.token
|
|
385980
385953
|
});
|
|
385981
385954
|
const parsedRepo = (0, github_1.parseRepository)(this.githubConfig.uri);
|
|
385982
385955
|
const { owner, repo } = parsedRepo;
|
|
@@ -661091,7 +661064,7 @@ var AccessTokenPosthogManager = class {
|
|
|
661091
661064
|
properties: {
|
|
661092
661065
|
...event,
|
|
661093
661066
|
...event.properties,
|
|
661094
|
-
version: "5.18.0
|
|
661067
|
+
version: "5.18.0",
|
|
661095
661068
|
usingAccessToken: true,
|
|
661096
661069
|
...getRunIdProperties()
|
|
661097
661070
|
}
|
|
@@ -661146,7 +661119,7 @@ var UserPosthogManager = class {
|
|
|
661146
661119
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
661147
661120
|
event: "CLI",
|
|
661148
661121
|
properties: {
|
|
661149
|
-
version: "5.18.0
|
|
661122
|
+
version: "5.18.0",
|
|
661150
661123
|
...event,
|
|
661151
661124
|
...event.properties,
|
|
661152
661125
|
usingAccessToken: false,
|
|
@@ -852129,7 +852102,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
852129
852102
|
var LOGS_FOLDER_NAME = "logs";
|
|
852130
852103
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
852131
852104
|
function getCliSource() {
|
|
852132
|
-
const version7 = "5.18.0
|
|
852105
|
+
const version7 = "5.18.0";
|
|
852133
852106
|
return `cli@${version7}`;
|
|
852134
852107
|
}
|
|
852135
852108
|
var DebugLogger = class {
|
|
@@ -864938,7 +864911,7 @@ var LegacyDocsPublisher = class {
|
|
|
864938
864911
|
previewId,
|
|
864939
864912
|
disableTemplates: void 0,
|
|
864940
864913
|
skipUpload,
|
|
864941
|
-
cliVersion: "5.18.0
|
|
864914
|
+
cliVersion: "5.18.0",
|
|
864942
864915
|
loginCommand: "fern auth login"
|
|
864943
864916
|
});
|
|
864944
864917
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
@@ -917768,8 +917741,7 @@ generators:
|
|
|
917768
917741
|
skipIfNoDiff,
|
|
917769
917742
|
hasBreakingChanges,
|
|
917770
917743
|
breakingChangesSummary: hasBreakingChanges ? autoVersioningPrDescription : void 0,
|
|
917771
|
-
runId: process.env.FERN_RUN_ID
|
|
917772
|
-
apiBaseUrl: getGithubApiBaseUrl(selfhostedGithubConfig.uri)
|
|
917744
|
+
runId: process.env.FERN_RUN_ID
|
|
917773
917745
|
},
|
|
917774
917746
|
cliVersion: workspace.cliVersion ?? "unknown",
|
|
917775
917747
|
generatorVersions: {
|
|
@@ -939552,7 +939524,7 @@ var CliContext = class _CliContext {
|
|
|
939552
939524
|
if (false) {
|
|
939553
939525
|
this.logger.error("CLI_VERSION is not defined");
|
|
939554
939526
|
}
|
|
939555
|
-
return "5.18.0
|
|
939527
|
+
return "5.18.0";
|
|
939556
939528
|
}
|
|
939557
939529
|
getCliName() {
|
|
939558
939530
|
if (false) {
|
package/package.json
CHANGED