skillvault-publisher 0.13.1 → 0.13.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.
Files changed (2) hide show
  1. package/dist/index.js +35 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -151926,6 +151926,41 @@ var loginCommand = new Command("login").description("Authenticate with the Skill
151926
151926
  headers: { "Content-Type": "application/json" },
151927
151927
  body: JSON.stringify(body2)
151928
151928
  });
151929
+ if (loginRes.status === 403) {
151930
+ const err = await loginRes.json().catch(() => null);
151931
+ if (err?.error === "production_login_disabled") {
151932
+ console.log(chalk.dim("Production server: pivoting to magic-link verification..."));
151933
+ const mlRes = await fetch(`${serverUrl}/auth/magic-link`, {
151934
+ method: "POST",
151935
+ headers: { "Content-Type": "application/json" },
151936
+ body: JSON.stringify({ email: options.email })
151937
+ });
151938
+ if (mlRes.ok) {
151939
+ const mlData = await mlRes.json().catch(() => ({}));
151940
+ if (mlData.status === "sent") {
151941
+ console.log();
151942
+ console.log(chalk.green(" Verification email sent."));
151943
+ console.log();
151944
+ console.log(chalk.bold(" Next steps:"));
151945
+ console.log(` 1. Check ${chalk.cyan(options.email)} for an email from SkillVault`);
151946
+ console.log(" 2. Click the magic link to sign in to the dashboard");
151947
+ console.log(" 3. On the dashboard, go to Settings \u2192 Profile");
151948
+ console.log(" 4. Copy your CLI token and run:");
151949
+ console.log(chalk.cyan(` skillvault-publisher login --token <pasted_token>`));
151950
+ console.log();
151951
+ process.exit(0);
151952
+ }
151953
+ if (mlData.status === "not_found") {
151954
+ console.error(chalk.red(`No account found for ${options.email}.`));
151955
+ console.error(chalk.dim("Create one at https://app.getskillvault.com/login first."));
151956
+ process.exit(1);
151957
+ }
151958
+ }
151959
+ console.error(chalk.red("Failed to send verification email."));
151960
+ console.error(chalk.dim(err.message || "Unknown error"));
151961
+ process.exit(1);
151962
+ }
151963
+ }
151929
151964
  if (!loginRes.ok) {
151930
151965
  const err = await loginRes.json().catch(() => null);
151931
151966
  const reason = err?.message || err?.error || loginRes.statusText || `HTTP ${loginRes.status}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skillvault-publisher",
3
- "version": "0.13.1",
3
+ "version": "0.13.2",
4
4
  "description": "SkillVault publisher CLI — publish, manage, and distribute encrypted skills",
5
5
  "type": "module",
6
6
  "bin": {