@rayul/kordis 0.9.0 → 0.9.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.
Files changed (2) hide show
  1. package/dist/index.js +24 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2968,6 +2968,22 @@ function pushCommand() {
2968
2968
  throw err instanceof Error ? err : new Error(String(err));
2969
2969
  }
2970
2970
  if (opts.dryRun) {
2971
+ const explicitBump = opts.bump && opts.bump !== "patch" ? opts.bump : null;
2972
+ if (explicitBump && nameFromFm) {
2973
+ const slugForCheck = opts.slug?.includes("/") ? opts.slug.split("/", 2) : bundle.username ? [bundle.username, opts.slug ?? nameFromFm] : null;
2974
+ if (slugForCheck && slugForCheck[0] && slugForCheck[1]) {
2975
+ const [u, s2] = slugForCheck;
2976
+ try {
2977
+ await bundle.api.getPackage(u, s2);
2978
+ } catch (err) {
2979
+ if (err && typeof err === "object" && "code" in err && err.code === "not_found") {
2980
+ throw new Error(
2981
+ `--bump ${explicitBump} cannot apply to a first publish (no existing version to bump from). First publish derives version from frontmatter \`version:\` or defaults to "0.1.0". Drop --bump (or set frontmatter version explicitly), then re-run.`
2982
+ );
2983
+ }
2984
+ }
2985
+ }
2986
+ }
2971
2987
  await runDryRun({ content, assets });
2972
2988
  return;
2973
2989
  }
@@ -3663,6 +3679,11 @@ function kordisHome2() {
3663
3679
  function lockfilePath() {
3664
3680
  return join8(kordisHome2(), "installed.json");
3665
3681
  }
3682
+ function lockfileDisplayPath() {
3683
+ const path2 = lockfilePath();
3684
+ const home = process.env["HOME"];
3685
+ return home && path2.startsWith(home) ? "~" + path2.slice(home.length) : path2;
3686
+ }
3666
3687
  async function readLockfile() {
3667
3688
  try {
3668
3689
  const raw = await readFile7(lockfilePath(), "utf8");
@@ -3904,6 +3925,7 @@ function pullCommand() {
3904
3925
  );
3905
3926
  for (const w of dep.result.written) printHuman(` ${c.gray("wrote")} ${w}`);
3906
3927
  }
3928
+ printHuman(c.gray(` lockfile: ${lockfileDisplayPath()}`));
3907
3929
  }
3908
3930
  });
3909
3931
  const reminder = await maybeRenderReminder();
@@ -3999,9 +4021,9 @@ function infoCommand() {
3999
4021
  return new Command7("info").description("show details about a package").argument(
4000
4022
  "<full_slug>",
4001
4023
  "package identifier {username}/{slug} or {username}/{slug}@{version|range}"
4002
- ).action(async (fullSlug) => {
4024
+ ).option("--pin <semver>", "pin to an exact version or range (overrides @suffix)").action(async (fullSlug, opts) => {
4003
4025
  const parsed = parseSlugAtVersion(fullSlug);
4004
- const pin = parsed.version ?? parsed.range;
4026
+ const pin = opts.pin ?? parsed.version ?? parsed.range;
4005
4027
  const bundle = await useClient();
4006
4028
  const detail = await bundle.api.getPackage(parsed.username, parsed.slug, {
4007
4029
  ...pin ? { version: pin } : {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rayul/kordis",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
4
4
  "private": false,
5
5
  "description": "Command-line client for the Kordis registry — discover, install, and publish agentic-coding packages.",
6
6
  "license": "MIT",