@rayul/kordis 0.9.1 → 0.9.2
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/index.js +11 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2977,9 +2977,13 @@ function pushCommand() {
|
|
|
2977
2977
|
await bundle.api.getPackage(u, s2);
|
|
2978
2978
|
} catch (err) {
|
|
2979
2979
|
if (err && typeof err === "object" && "code" in err && err.code === "not_found") {
|
|
2980
|
-
throw new
|
|
2981
|
-
|
|
2982
|
-
|
|
2980
|
+
throw new KordisApiError(400, {
|
|
2981
|
+
error: {
|
|
2982
|
+
code: "usage_error",
|
|
2983
|
+
message: `--bump ${explicitBump} cannot apply to a first publish (no existing version to bump from)`,
|
|
2984
|
+
hint: 'First publish derives version from frontmatter `version:` or defaults to "0.1.0". Drop --bump (or set frontmatter version explicitly), then re-run.'
|
|
2985
|
+
}
|
|
2986
|
+
});
|
|
2983
2987
|
}
|
|
2984
2988
|
}
|
|
2985
2989
|
}
|
|
@@ -3972,13 +3976,14 @@ function readCommand() {
|
|
|
3972
3976
|
async (rawSlug, opts) => {
|
|
3973
3977
|
const parsed = parseSlugAtVersion(rawSlug);
|
|
3974
3978
|
const pin = opts.pin ?? parsed.version ?? parsed.range;
|
|
3979
|
+
const pinIsRange = pin ? /[\^~*]/.test(pin) : false;
|
|
3975
3980
|
const bundle = await useClient();
|
|
3976
3981
|
let resolvedVersion;
|
|
3977
|
-
if (
|
|
3982
|
+
if (pin && pinIsRange) {
|
|
3978
3983
|
const resolved = await bundle.api.resolveVersion(
|
|
3979
3984
|
parsed.username,
|
|
3980
3985
|
parsed.slug,
|
|
3981
|
-
|
|
3986
|
+
pin
|
|
3982
3987
|
);
|
|
3983
3988
|
resolvedVersion = resolved.resolved_version;
|
|
3984
3989
|
}
|
|
@@ -4004,7 +4009,7 @@ function readCommand() {
|
|
|
4004
4009
|
`);
|
|
4005
4010
|
}
|
|
4006
4011
|
}
|
|
4007
|
-
const resolvedNote =
|
|
4012
|
+
const resolvedNote = pinIsRange && resolvedVersion ? ` ${c.gray("(resolved")} ${c.gray("@" + pin)} ${c.gray("\u2192")} ${resolvedVersion}${c.gray(")")}` : "";
|
|
4008
4013
|
process.stderr.write(
|
|
4009
4014
|
`${c.gray("\u2014")} ${c.bold(res.full_slug)}${c.gray("@")}${res.version}${resolvedNote} ${c.gray("\xB7")} ${res.type} (tier ${res.tier}) ${c.gray("\xB7")} ${c.cyan(res.attribution)}
|
|
4010
4015
|
`
|