@kitschpatrol/tldraw-cli 4.6.4 → 4.6.5

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/bin/cli.js CHANGED
@@ -786,7 +786,7 @@ var require_irregular_plurals2 = __commonJS({
786
786
  });
787
787
 
788
788
  // package.json
789
- var version = "4.6.4";
789
+ var version = "4.6.5";
790
790
 
791
791
  // node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/ansi-styles/index.js
792
792
  var ANSI_BACKGROUND_OFFSET = 10;
@@ -17300,12 +17300,11 @@ var TldrawController = class {
17300
17300
  const downloadPlan = this.getDownloadPlans(sketchStructure, options.pages, options.frames);
17301
17301
  const outputAccumulator = [];
17302
17302
  const initialPageId = await this.getCurrentPage();
17303
- let pageChanged = false;
17304
17303
  for (const download of downloadPlan) {
17305
- if (download.pageId !== initialPageId) {
17304
+ const currentPageId2 = await this.getCurrentPage();
17305
+ if (download.pageId !== currentPageId2) {
17306
17306
  log_default.info(`Selecting sketch page "${download.pageId}"`);
17307
17307
  await this.setCurrentPage(download.pageId);
17308
- pageChanged = true;
17309
17308
  }
17310
17309
  await this.page.waitForFunction("editor !== undefined");
17311
17310
  if (download.frameId === void 0) {
@@ -17340,7 +17339,8 @@ var TldrawController = class {
17340
17339
  outputAccumulator.push(outputPath);
17341
17340
  }
17342
17341
  }
17343
- if (pageChanged) {
17342
+ const currentPageId = await this.getCurrentPage();
17343
+ if (currentPageId !== initialPageId) {
17344
17344
  await this.setCurrentPage(initialPageId);
17345
17345
  }
17346
17346
  return outputAccumulator;
@@ -18508,7 +18508,7 @@ await yargsInstance.scriptName("tldraw").command("$0 <command>", "CLI tools for
18508
18508
  );
18509
18509
  } else {
18510
18510
  log_default.info(
18511
- `All ${successCount} ${plur("sketch", cleanFilesOrUrls.length)} exported successfully`
18511
+ `${successCount} of ${cleanFilesOrUrls.length} ${plur("sketch", cleanFilesOrUrls.length)} exported successfully`
18512
18512
  );
18513
18513
  }
18514
18514
  process.exit(0);
package/dist/.DS_Store ADDED
Binary file
package/dist/lib/index.js CHANGED
@@ -17106,12 +17106,11 @@ var TldrawController = class {
17106
17106
  const downloadPlan = this.getDownloadPlans(sketchStructure, options.pages, options.frames);
17107
17107
  const outputAccumulator = [];
17108
17108
  const initialPageId = await this.getCurrentPage();
17109
- let pageChanged = false;
17110
17109
  for (const download of downloadPlan) {
17111
- if (download.pageId !== initialPageId) {
17110
+ const currentPageId2 = await this.getCurrentPage();
17111
+ if (download.pageId !== currentPageId2) {
17112
17112
  log_default.info(`Selecting sketch page "${download.pageId}"`);
17113
17113
  await this.setCurrentPage(download.pageId);
17114
- pageChanged = true;
17115
17114
  }
17116
17115
  await this.page.waitForFunction("editor !== undefined");
17117
17116
  if (download.frameId === void 0) {
@@ -17146,7 +17145,8 @@ var TldrawController = class {
17146
17145
  outputAccumulator.push(outputPath);
17147
17146
  }
17148
17147
  }
17149
- if (pageChanged) {
17148
+ const currentPageId = await this.getCurrentPage();
17149
+ if (currentPageId !== initialPageId) {
17150
17150
  await this.setCurrentPage(initialPageId);
17151
17151
  }
17152
17152
  return outputAccumulator;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { type ChildProcess } from 'node:child_process';
3
2
  export type TldrawOpenOptions = {
4
3
  location: 'local' | 'remote';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitschpatrol/tldraw-cli",
3
- "version": "4.6.4",
3
+ "version": "4.6.5",
4
4
  "type": "module",
5
5
  "description": "A CLI tool for exporting tldraw sketch URLs and local .tldr files to SVG or PNG images.",
6
6
  "repository": {
@@ -46,7 +46,7 @@
46
46
  "dependencies": {
47
47
  "@fontsource/inter": "^5.0.18",
48
48
  "express": "^4.19.2",
49
- "puppeteer": "^22.11.2",
49
+ "puppeteer": "^22.12.0",
50
50
  "uint8array-extras": "^1.1.0",
51
51
  "yargs": "^17.7.2"
52
52
  },
@@ -78,8 +78,8 @@
78
78
  "sharp-phash": "^2.1.0",
79
79
  "strip-ansi": "^7.1.0",
80
80
  "tldraw": "2.3.0-canary.fef462bd67aa",
81
- "tsx": "^4.15.6",
82
- "typescript": "^5.4.5",
81
+ "tsx": "^4.15.7",
82
+ "typescript": "^5.5.2",
83
83
  "untildify": "^5.0.0",
84
84
  "vite": "^5.3.1",
85
85
  "vitest": "^1.6.0"