@releasekit/release 0.7.11 → 0.7.13
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/dist/aggregator-IUQUAVJC-FMVZQKPK.js +13 -0
- package/dist/baseError-DQHIJACF-MKENOKQI.js +7 -0
- package/dist/{chunk-ALHJU3KL.js → chunk-6PUHZHPR.js} +1 -1
- package/dist/chunk-BLLATA3P.js +25047 -0
- package/dist/chunk-FM2YXFEQ.js +20 -0
- package/dist/chunk-HW3BIMUI.js +73 -0
- package/dist/{chunk-D6HRZXZZ.js → chunk-LTPOKPAP.js} +10 -12
- package/dist/chunk-MKXM4ZCM.js +14096 -0
- package/dist/chunk-OOW3QGRT.js +1996 -0
- package/dist/chunk-PJO2QZSV.js +1937 -0
- package/dist/chunk-QGM4M3NI.js +37 -0
- package/dist/chunk-X6K5NWRA.js +376 -0
- package/dist/cli.js +3 -2
- package/dist/commandExecutor-E44ID5U4-ZQZNV25N.js +9 -0
- package/dist/dispatcher.js +18 -6
- package/dist/dist-3OF3AQKY.js +37 -0
- package/dist/dist-J7662OKQ.js +104 -0
- package/dist/dist-KJOL5QEY.js +59 -0
- package/dist/dist-WN32E32Z.js +433 -0
- package/dist/dist-WSR7GQXK.js +42 -0
- package/dist/index.d.ts +98 -3
- package/dist/index.js +2 -1
- package/package.json +4 -4
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// ../version/dist/chunk-LMPZV35Z.js
|
|
2
|
+
import { execFile, execFileSync } from "child_process";
|
|
3
|
+
var execAsync = (file, args, options) => {
|
|
4
|
+
const defaultOptions = { maxBuffer: 1024 * 1024 * 10, ...options };
|
|
5
|
+
return new Promise((resolve, reject) => {
|
|
6
|
+
execFile(file, args, defaultOptions, (error, stdout, stderr) => {
|
|
7
|
+
if (error) {
|
|
8
|
+
reject(error);
|
|
9
|
+
} else {
|
|
10
|
+
resolve({ stdout: stdout.toString(), stderr: stderr.toString() });
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
var execSync = (file, args, options) => execFileSync(file, args, { maxBuffer: 1024 * 1024 * 10, ...options });
|
|
16
|
+
|
|
17
|
+
export {
|
|
18
|
+
execAsync,
|
|
19
|
+
execSync
|
|
20
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
// ../version/dist/chunk-Q3FHZORY.js
|
|
2
|
+
import chalk from "chalk";
|
|
3
|
+
var LOG_LEVELS = {
|
|
4
|
+
error: 0,
|
|
5
|
+
warn: 1,
|
|
6
|
+
info: 2,
|
|
7
|
+
debug: 3,
|
|
8
|
+
trace: 4
|
|
9
|
+
};
|
|
10
|
+
var PREFIXES = {
|
|
11
|
+
error: "[ERROR]",
|
|
12
|
+
warn: "[WARN]",
|
|
13
|
+
info: "[INFO]",
|
|
14
|
+
debug: "[DEBUG]",
|
|
15
|
+
trace: "[TRACE]"
|
|
16
|
+
};
|
|
17
|
+
var COLORS = {
|
|
18
|
+
error: chalk.red,
|
|
19
|
+
warn: chalk.yellow,
|
|
20
|
+
info: chalk.blue,
|
|
21
|
+
debug: chalk.gray,
|
|
22
|
+
trace: chalk.dim
|
|
23
|
+
};
|
|
24
|
+
var currentLevel = "info";
|
|
25
|
+
var quietMode = false;
|
|
26
|
+
function shouldLog(level) {
|
|
27
|
+
if (quietMode && level !== "error") return false;
|
|
28
|
+
return LOG_LEVELS[level] <= LOG_LEVELS[currentLevel];
|
|
29
|
+
}
|
|
30
|
+
function log(message, level = "info") {
|
|
31
|
+
if (!shouldLog(level)) return;
|
|
32
|
+
const formatted = COLORS[level](`${PREFIXES[level]} ${message}`);
|
|
33
|
+
console.error(formatted);
|
|
34
|
+
}
|
|
35
|
+
var ReleaseKitError = class _ReleaseKitError extends Error {
|
|
36
|
+
constructor(message) {
|
|
37
|
+
super(message);
|
|
38
|
+
this.name = this.constructor.name;
|
|
39
|
+
}
|
|
40
|
+
logError() {
|
|
41
|
+
log(this.message, "error");
|
|
42
|
+
if (this.suggestions.length > 0) {
|
|
43
|
+
log("\nSuggested solutions:", "info");
|
|
44
|
+
for (const [i, suggestion] of this.suggestions.entries()) {
|
|
45
|
+
log(`${i + 1}. ${suggestion}`, "info");
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
static isReleaseKitError(error2) {
|
|
50
|
+
return error2 instanceof _ReleaseKitError;
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
function sanitizePackageName(name) {
|
|
54
|
+
return name.startsWith("@") ? name.slice(1).replace(/\//g, "-") : name;
|
|
55
|
+
}
|
|
56
|
+
var BaseVersionError = class _BaseVersionError extends ReleaseKitError {
|
|
57
|
+
code;
|
|
58
|
+
suggestions;
|
|
59
|
+
constructor(message, code, suggestions) {
|
|
60
|
+
super(message);
|
|
61
|
+
this.code = code;
|
|
62
|
+
this.suggestions = suggestions ?? [];
|
|
63
|
+
}
|
|
64
|
+
static isVersionError(error) {
|
|
65
|
+
return error instanceof _BaseVersionError;
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export {
|
|
70
|
+
ReleaseKitError,
|
|
71
|
+
sanitizePackageName,
|
|
72
|
+
BaseVersionError
|
|
73
|
+
};
|
|
@@ -101,16 +101,14 @@ var EXIT_CODES = {
|
|
|
101
101
|
import { execSync } from "child_process";
|
|
102
102
|
|
|
103
103
|
// ../config/dist/index.js
|
|
104
|
-
import * as fs2 from "fs";
|
|
105
|
-
import * as path2 from "path";
|
|
106
104
|
import * as TOML from "smol-toml";
|
|
107
105
|
import * as fs3 from "fs";
|
|
108
106
|
import * as path3 from "path";
|
|
109
107
|
import { z as z2 } from "zod";
|
|
110
108
|
import { z } from "zod";
|
|
111
|
-
import * as
|
|
109
|
+
import * as fs2 from "fs";
|
|
112
110
|
import * as os from "os";
|
|
113
|
-
import * as
|
|
111
|
+
import * as path2 from "path";
|
|
114
112
|
var ConfigError = class extends ReleaseKitError {
|
|
115
113
|
code = "CONFIG_ERROR";
|
|
116
114
|
suggestions;
|
|
@@ -434,9 +432,9 @@ function substituteVariables(value) {
|
|
|
434
432
|
return process.env[varName] ?? "";
|
|
435
433
|
});
|
|
436
434
|
result = result.replace(filePattern, (_, filePath) => {
|
|
437
|
-
const expandedPath = filePath.startsWith("~") ?
|
|
435
|
+
const expandedPath = filePath.startsWith("~") ? path2.join(os.homedir(), filePath.slice(1)) : filePath;
|
|
438
436
|
try {
|
|
439
|
-
return
|
|
437
|
+
return fs2.readFileSync(expandedPath, "utf-8").trim();
|
|
440
438
|
} catch {
|
|
441
439
|
return "";
|
|
442
440
|
}
|
|
@@ -464,8 +462,8 @@ function substituteInObject(obj) {
|
|
|
464
462
|
}
|
|
465
463
|
return obj;
|
|
466
464
|
}
|
|
467
|
-
var AUTH_DIR =
|
|
468
|
-
var AUTH_FILE =
|
|
465
|
+
var AUTH_DIR = path2.join(os.homedir(), ".config", "releasekit");
|
|
466
|
+
var AUTH_FILE = path2.join(AUTH_DIR, "auth.json");
|
|
469
467
|
var CONFIG_FILE = "releasekit.config.json";
|
|
470
468
|
function loadConfigFile(configPath) {
|
|
471
469
|
if (!fs3.existsSync(configPath)) {
|
|
@@ -557,7 +555,7 @@ async function runRelease(inputOptions) {
|
|
|
557
555
|
return null;
|
|
558
556
|
}
|
|
559
557
|
if (!options.dryRun) {
|
|
560
|
-
const { flushPendingWrites } = await import("
|
|
558
|
+
const { flushPendingWrites } = await import("./dist-3OF3AQKY.js");
|
|
561
559
|
flushPendingWrites();
|
|
562
560
|
}
|
|
563
561
|
info(`Found ${versionOutput.updates.length} package update(s)`);
|
|
@@ -586,7 +584,7 @@ async function runRelease(inputOptions) {
|
|
|
586
584
|
return { versionOutput, notesGenerated, packageNotes, releaseNotes, publishOutput };
|
|
587
585
|
}
|
|
588
586
|
async function runVersionStep(options) {
|
|
589
|
-
const { loadConfig: loadConfig2, VersionEngine, enableJsonOutput, getJsonData } = await import("
|
|
587
|
+
const { loadConfig: loadConfig2, VersionEngine, enableJsonOutput, getJsonData } = await import("./dist-3OF3AQKY.js");
|
|
590
588
|
enableJsonOutput(options.dryRun);
|
|
591
589
|
const config = loadConfig2({ cwd: options.projectDir, configPath: options.config });
|
|
592
590
|
if (options.dryRun) config.dryRun = true;
|
|
@@ -619,14 +617,14 @@ async function runVersionStep(options) {
|
|
|
619
617
|
return getJsonData();
|
|
620
618
|
}
|
|
621
619
|
async function runNotesStep(versionOutput, options) {
|
|
622
|
-
const { parseVersionOutput, runPipeline, loadConfig: loadConfig2 } = await import("
|
|
620
|
+
const { parseVersionOutput, runPipeline, loadConfig: loadConfig2 } = await import("./dist-KJOL5QEY.js");
|
|
623
621
|
const config = loadConfig2(options.projectDir, options.config);
|
|
624
622
|
const input = parseVersionOutput(JSON.stringify(versionOutput));
|
|
625
623
|
const result = await runPipeline(input, config, options.dryRun);
|
|
626
624
|
return { packageNotes: result.packageNotes, releaseNotes: result.releaseNotes, files: result.files };
|
|
627
625
|
}
|
|
628
626
|
async function runPublishStep(versionOutput, options, releaseNotes, additionalFiles) {
|
|
629
|
-
const { runPipeline, loadConfig: loadConfig2 } = await import("
|
|
627
|
+
const { runPipeline, loadConfig: loadConfig2 } = await import("./dist-WSR7GQXK.js");
|
|
630
628
|
const config = loadConfig2({ configPath: options.config });
|
|
631
629
|
if (options.branch) {
|
|
632
630
|
config.git.branch = options.branch;
|