vslides 1.0.28 → 1.0.29

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/cli.js +27 -3
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -5088,13 +5088,33 @@ function writeLibraryConfig(config) {
5088
5088
  (0, import_node_fs8.writeFileSync)(configPath, JSON.stringify(config, null, 2) + "\n");
5089
5089
  }
5090
5090
  async function libraryImport(id, options = {}) {
5091
+ const config = readLibraryConfig();
5092
+ const existingImport = config.imports[id];
5091
5093
  info(`Fetching library item: ${id}`);
5092
5094
  const result = await getLibraryImportBundle(id);
5093
5095
  if (!result.ok) {
5094
5096
  if (result.status === 404) {
5095
5097
  error(`Library item not found: ${id}`);
5098
+ newline();
5099
+ if (existingImport) {
5100
+ info(`You have a local copy at: ${existingImport.localPath}`);
5101
+ info("The library item may have been deleted from the server.");
5102
+ } else {
5103
+ info("The library item may have been deleted or the ID may be incorrect.");
5104
+ }
5105
+ newline();
5106
+ info("To find available items, run: vslides library list");
5107
+ info("Or search with: vslides library search <query>");
5096
5108
  } else {
5097
- error("Failed to fetch import bundle");
5109
+ const errorData = result.data;
5110
+ const errorMsg = errorData?.message || errorData?.error || "Unknown error";
5111
+ error(`Failed to fetch import bundle: ${errorMsg}`);
5112
+ newline();
5113
+ if (existingImport) {
5114
+ info(`You have a local copy at: ${existingImport.localPath} (v${existingImport.version})`);
5115
+ }
5116
+ info(`HTTP status: ${result.status}`);
5117
+ info("This may be a temporary server issue. Please try again in a moment.");
5098
5118
  }
5099
5119
  process.exit(ExitCode.NetworkError);
5100
5120
  }
@@ -5105,7 +5125,12 @@ async function libraryImport(id, options = {}) {
5105
5125
  newline();
5106
5126
  const latestResult = await getLibraryImportBundle(bundle.latestId);
5107
5127
  if (!latestResult.ok) {
5108
- error("Failed to fetch latest item");
5128
+ const errorData = latestResult.data;
5129
+ const errorMsg = errorData?.message || errorData?.error || "Unknown error";
5130
+ error(`Failed to fetch latest item (${bundle.latestId}): ${errorMsg}`);
5131
+ newline();
5132
+ info(`HTTP status: ${latestResult.status}`);
5133
+ info("You can try importing the original item with: --no-follow-supersede");
5109
5134
  process.exit(ExitCode.NetworkError);
5110
5135
  }
5111
5136
  bundle = latestResult.data;
@@ -5126,7 +5151,6 @@ async function libraryImport(id, options = {}) {
5126
5151
  if (bundle.assets.length > 0) {
5127
5152
  info(`Assets: ${bundle.assets.length} images (using blob URLs)`);
5128
5153
  }
5129
- const config = readLibraryConfig();
5130
5154
  config.imports[id] = {
5131
5155
  version: bundle.version,
5132
5156
  importedAt: Date.now(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vslides",
3
- "version": "1.0.28",
3
+ "version": "1.0.29",
4
4
  "description": "CLI for Vercel Slides API",
5
5
  "license": "MIT",
6
6
  "author": "Vercel",