@anakonn/ankk 0.1.0-beta.1 → 0.1.1
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/README.md +11 -21
- package/dist/index.js +6 -21
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -24,32 +24,22 @@ Global Bun installs can upgrade through the CLI:
|
|
|
24
24
|
|
|
25
25
|
```bash
|
|
26
26
|
ankk upgrade
|
|
27
|
-
ankk upgrade --tag beta
|
|
28
|
-
ankk upgrade --tag latest
|
|
29
27
|
ankk upgrade --dry-run
|
|
30
28
|
```
|
|
31
29
|
|
|
32
|
-
The
|
|
33
|
-
|
|
30
|
+
The CLI uses the `latest` npm dist-tag. Release versions use three-part numeric
|
|
31
|
+
SemVer such as `0.1.1`.
|
|
34
32
|
|
|
35
33
|
## Publish
|
|
36
34
|
|
|
37
|
-
Public npm publish runs
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
Public npm publish runs automatically when CLI-related changes reach the
|
|
36
|
+
repository `main` branch. Before merging CLI changes to `main`, update
|
|
37
|
+
`apps/cli/package.json` to the release version.
|
|
40
38
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
git tag ankk-cli-v0.1.0-beta.1
|
|
46
|
-
git push origin ankk-cli-v0.1.0-beta.1
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
The CI job `publish:cli:npm` validates that the tag version matches
|
|
50
|
-
`apps/cli/package.json`, that the tag commit is contained in `origin/main`, and
|
|
51
|
-
that the version is not already published. Pre-release versions publish with npm
|
|
52
|
-
dist-tag `beta`; stable versions publish with `latest`.
|
|
39
|
+
The CI job `publish:cli:npm` validates that `apps/cli/package.json` uses
|
|
40
|
+
three-part numeric SemVer, that the version is not already published, and then
|
|
41
|
+
publishes with npm dist-tag `latest`. If the version was already published, the
|
|
42
|
+
job fails so the missing version bump is visible.
|
|
53
43
|
|
|
54
44
|
The current repository is hosted on self-managed GitLab. npm Trusted Publishing
|
|
55
45
|
is preferred, but npm currently documents GitLab support for GitLab.com shared
|
|
@@ -62,11 +52,11 @@ npm token with the smallest practical scope:
|
|
|
62
52
|
- Organization access: none unless npm requires it for the `@anakonn` scope.
|
|
63
53
|
- Expiration: finite.
|
|
64
54
|
- GitLab variable: `NPM_TOKEN`, masked and protected.
|
|
65
|
-
- GitLab protected
|
|
55
|
+
- GitLab protected branch: `main`.
|
|
66
56
|
|
|
67
57
|
If this is the first ever publish and npm cannot scope a token to an
|
|
68
58
|
unpublished package, publish `@anakonn/ankk` once manually with 2FA, then
|
|
69
|
-
replace CI with a package-scoped token for later
|
|
59
|
+
replace CI with a package-scoped token for later publishes.
|
|
70
60
|
|
|
71
61
|
When publishing moves to a supported Trusted Publishing runner, configure npm
|
|
72
62
|
Trusted Publisher with:
|
package/dist/index.js
CHANGED
|
@@ -2157,7 +2157,7 @@ var {
|
|
|
2157
2157
|
// package.json
|
|
2158
2158
|
var package_default = {
|
|
2159
2159
|
name: "@anakonn/ankk",
|
|
2160
|
-
version: "0.1.
|
|
2160
|
+
version: "0.1.1",
|
|
2161
2161
|
description: "Bun-first CLI for the ankk public API.",
|
|
2162
2162
|
private: false,
|
|
2163
2163
|
license: "UNLICENSED",
|
|
@@ -17114,12 +17114,11 @@ var createProgram = ({
|
|
|
17114
17114
|
});
|
|
17115
17115
|
writeOutput(context.io, context.outputMode, result, `${result.service}: ${result.status}`);
|
|
17116
17116
|
});
|
|
17117
|
-
program2.command("upgrade").description("Upgrade the ankk CLI global installation").option("--
|
|
17117
|
+
program2.command("upgrade").description("Upgrade the ankk CLI global installation").option("--dry-run", "Print the upgrade command without running it").action(async (options) => {
|
|
17118
17118
|
const outputMode = program2.opts().json ? "json" : "human";
|
|
17119
17119
|
const result = await upgradeCli({
|
|
17120
17120
|
commandRunner,
|
|
17121
|
-
dryRun: Boolean(options.dryRun)
|
|
17122
|
-
tag: options.tag
|
|
17121
|
+
dryRun: Boolean(options.dryRun)
|
|
17123
17122
|
});
|
|
17124
17123
|
writeOutput(io, outputMode, result, options.dryRun ? `Would run: ${result.command.join(" ")}` : `Upgraded ${result.package} via ${result.tag}`);
|
|
17125
17124
|
});
|
|
@@ -17501,19 +17500,14 @@ var resolveCommandContext = async ({
|
|
|
17501
17500
|
var safeDefaultConfigPath = (env) => defaultConfigPath({ env });
|
|
17502
17501
|
var packageName = package_default.name;
|
|
17503
17502
|
var packageVersion = package_default.version;
|
|
17504
|
-
var upgradeCli = async ({
|
|
17505
|
-
|
|
17506
|
-
dryRun,
|
|
17507
|
-
tag
|
|
17508
|
-
}) => {
|
|
17509
|
-
const resolvedTag = resolveUpgradeTag(tag, packageVersion);
|
|
17510
|
-
const command = ["bun", "install", "-g", `${packageName}@${resolvedTag}`];
|
|
17503
|
+
var upgradeCli = async ({ commandRunner, dryRun }) => {
|
|
17504
|
+
const command = ["bun", "install", "-g", `${packageName}@latest`];
|
|
17511
17505
|
const result = {
|
|
17512
17506
|
command,
|
|
17513
17507
|
current_version: packageVersion,
|
|
17514
17508
|
dry_run: dryRun,
|
|
17515
17509
|
package: packageName,
|
|
17516
|
-
tag:
|
|
17510
|
+
tag: "latest"
|
|
17517
17511
|
};
|
|
17518
17512
|
if (dryRun)
|
|
17519
17513
|
return result;
|
|
@@ -17523,15 +17517,6 @@ var upgradeCli = async ({
|
|
|
17523
17517
|
}
|
|
17524
17518
|
return result;
|
|
17525
17519
|
};
|
|
17526
|
-
var resolveUpgradeTag = (tag, currentVersion) => {
|
|
17527
|
-
if (tag === undefined) {
|
|
17528
|
-
return currentVersion.includes("-") ? "beta" : "latest";
|
|
17529
|
-
}
|
|
17530
|
-
if (tag === "beta" || tag === "latest") {
|
|
17531
|
-
return tag;
|
|
17532
|
-
}
|
|
17533
|
-
throw new Error('Upgrade tag must be either "beta" or "latest".');
|
|
17534
|
-
};
|
|
17535
17520
|
var runProcess = async (command, args) => {
|
|
17536
17521
|
const process3 = Bun.spawn([command, ...args], {
|
|
17537
17522
|
stderr: "inherit",
|