@floomhq/skills 0.2.12 → 0.2.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/index.js CHANGED
@@ -2483,7 +2483,7 @@ function isLegacyApiUrl(apiUrl) {
2483
2483
  }
2484
2484
 
2485
2485
  // src/version.ts
2486
- var VERSION = "0.2.12";
2486
+ var VERSION = "0.2.13";
2487
2487
 
2488
2488
  // src/api-client.ts
2489
2489
  var DEFAULT_TIMEOUT_MS = 2e4;
@@ -2979,6 +2979,15 @@ async function validateCommand(opts = {}) {
2979
2979
  // src/commands/publish.ts
2980
2980
  import { readFile as readFile6 } from "node:fs/promises";
2981
2981
  import { join as join6 } from "node:path";
2982
+ function buildAuthenticatedSkillUrl(appUrl, librarySlug, skillSlug) {
2983
+ const base = appUrl.replace(/\/api\/v1\/?$/, "").replace(/\/$/, "");
2984
+ return `${base}/library/${encodeURIComponent(skillSlug)}?lib=${encodeURIComponent(librarySlug)}`;
2985
+ }
2986
+ function buildPublicSkillUrl(appUrl, handle, librarySlug, skillSlug) {
2987
+ const base = appUrl.replace(/\/api\/v1\/?$/, "").replace(/\/$/, "");
2988
+ if (librarySlug !== handle) return null;
2989
+ return `${base}/@${handle}/${skillSlug}`;
2990
+ }
2982
2991
  async function publishCommand(opts = {}) {
2983
2992
  const auth = await readAuth();
2984
2993
  const envToken = process.env.FLOOM_API_TOKEN?.trim();
@@ -3061,9 +3070,17 @@ async function publishCommand(opts = {}) {
3061
3070
  log.blank();
3062
3071
  log.ok(`Published ${complete.ref}`);
3063
3072
  log.blank();
3064
- log.info("View:");
3073
+ log.info("Manage:");
3065
3074
  const displayApiUrl = trustedApiUrlOrDefault(process.env.FLOOM_API_URL ?? auth?.apiUrl ?? DEFAULT_API_URL);
3066
- log.kv("", `${displayApiUrl.replace("/api/v1", "")}/@${handle}/${manifest.name}`);
3075
+ log.kv("", buildAuthenticatedSkillUrl(displayApiUrl, refRoot, manifest.name));
3076
+ const publicUrl = buildPublicSkillUrl(displayApiUrl, handle, refRoot, manifest.name);
3077
+ if (publicUrl) {
3078
+ log.info("Public URL after you make it public:");
3079
+ log.kv("", publicUrl);
3080
+ } else {
3081
+ log.info("Public profile URL:");
3082
+ log.kv("", "Workspace skills stay under their authenticated library URL unless copied to your personal library.");
3083
+ }
3067
3084
  log.info("Install:");
3068
3085
  log.kv("", complete.install_command);
3069
3086
  }