@rayul/kordis 0.9.2 → 0.9.3

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.
@@ -111,6 +111,7 @@ Supported forms:
111
111
  | `user/foo@1.0.0-beta.1` | exact prerelease (only matches if the literal exists) |
112
112
  | `user/foo@^1.2` | caret — highest 1.x.y (x≥2). For 0.x.y, caret pins the minor |
113
113
  | `user/foo@~1.2` | tilde — highest 1.2.y |
114
+ | `user/foo@0.1.x` | x-range — alias for `~0.1` (0.9.3+; semver-native) |
114
115
  | `user/foo@*` | alias for `current_version` |
115
116
 
116
117
  Comparator strings (`>=1 <2`, `||`) are NOT supported in 0.9.x —
package/dist/index.js CHANGED
@@ -1101,6 +1101,8 @@ var init_client = __esm({
1101
1101
  if (opts.body !== void 0) init.body = JSON.stringify(opts.body);
1102
1102
  const method = (init.method ?? "GET").toUpperCase();
1103
1103
  const retryable = method === "GET";
1104
+ const debug = typeof process !== "undefined" && process.env && (process.env["KORDIS_DEBUG"] === "1" || process.env["KORDIS_DEBUG"]?.toLowerCase() === "true");
1105
+ const debugStart = debug ? Date.now() : 0;
1104
1106
  let lastErr;
1105
1107
  for (let attempt = 0; attempt < (retryable ? 2 : 1); attempt++) {
1106
1108
  try {
@@ -1110,12 +1112,22 @@ var init_client = __esm({
1110
1112
  } catch (err) {
1111
1113
  lastErr = err;
1112
1114
  if (attempt === 0 && retryable) {
1115
+ if (debug) {
1116
+ console.error(
1117
+ `[kordis] api: ${method} ${url.pathname}${url.search} \u2192 fetch failed, retrying in 150ms (${err.message})`
1118
+ );
1119
+ }
1113
1120
  await new Promise((resolve2) => setTimeout(resolve2, 150));
1114
1121
  continue;
1115
1122
  }
1116
1123
  }
1117
1124
  }
1118
1125
  if (lastErr !== void 0) {
1126
+ if (debug) {
1127
+ console.error(
1128
+ `[kordis] api: ${method} ${url.pathname}${url.search} \u2192 ${lastErr.message} (${Date.now() - debugStart}ms)`
1129
+ );
1130
+ }
1119
1131
  throw new KordisNetworkError(
1120
1132
  `cannot reach ${url.hostname}: ${lastErr.message}`,
1121
1133
  lastErr
@@ -1123,6 +1135,11 @@ var init_client = __esm({
1123
1135
  }
1124
1136
  res = res;
1125
1137
  const requestId = res.headers.get("x-request-id") ?? void 0;
1138
+ if (debug) {
1139
+ console.error(
1140
+ `[kordis] api: ${method} ${url.pathname}${url.search} \u2192 ${res.status} (${Date.now() - debugStart}ms${requestId ? `, req-id=${requestId}` : ""})`
1141
+ );
1142
+ }
1126
1143
  if (res.status === 204) return void 0;
1127
1144
  const text = await res.text();
1128
1145
  const parsed = text ? JSON.parse(text) : void 0;
@@ -3856,10 +3873,10 @@ function pullCommand() {
3856
3873
  ).option(
3857
3874
  "--no-with-required",
3858
3875
  "skip transitive required dependencies (advanced; default is to install)"
3859
- ).action(
3876
+ ).option("--pin <semver>", "pin to an exact version or range (overrides @suffix)").action(
3860
3877
  async (fullSlugArg, opts) => {
3861
3878
  const parsed = parseSlugAtVersion(fullSlugArg);
3862
- const pin = parsed.version ?? parsed.range;
3879
+ const pin = opts.pin ?? parsed.version ?? parsed.range;
3863
3880
  const userCwd = process.env["INIT_CWD"] ?? process.cwd();
3864
3881
  const installRoot = opts.target ?? userCwd;
3865
3882
  const detected = opts.tool ?? await detectTool(installRoot);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rayul/kordis",
3
- "version": "0.9.2",
3
+ "version": "0.9.3",
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",