@quikturn/logos 0.2.0 → 0.3.0

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.
@@ -181,7 +181,6 @@ function logoUrl(domain, options) {
181
181
  greyscale,
182
182
  theme,
183
183
  format,
184
- autoScrape,
185
184
  baseUrl
186
185
  } = options ?? {};
187
186
  const maxWidth = token?.startsWith("sk_") ? MAX_WIDTH_SERVER : MAX_WIDTH;
@@ -208,9 +207,7 @@ function logoUrl(domain, options) {
208
207
  if (resolvedFormat !== void 0) {
209
208
  url.searchParams.set("format", resolvedFormat);
210
209
  }
211
- if (autoScrape === true) {
212
- url.searchParams.set("autoScrape", "true");
213
- }
210
+ url.searchParams.set("autoScrape", "true");
214
211
  return url.toString();
215
212
  }
216
213
 
@@ -670,7 +667,6 @@ var QuikturnLogos = class {
670
667
  greyscale: options?.greyscale,
671
668
  theme: options?.theme,
672
669
  format: options?.format,
673
- autoScrape: options?.autoScrape,
674
670
  baseUrl: this.baseUrl
675
671
  });
676
672
  const format = options?.format;
@@ -683,23 +679,21 @@ var QuikturnLogos = class {
683
679
  onRateLimitWarning: (remaining, limit) => this.emit("rateLimitWarning", remaining, limit),
684
680
  onQuotaWarning: (remaining, limit) => this.emit("quotaWarning", remaining, limit)
685
681
  });
686
- if (options?.autoScrape) {
687
- const fetchForPoller = (fetchUrl) => serverFetch(fetchUrl, {
688
- token: this.secretKey,
689
- maxRetries: this.maxRetries,
682
+ const fetchForPoller = (fetchUrl) => serverFetch(fetchUrl, {
683
+ token: this.secretKey,
684
+ maxRetries: this.maxRetries,
685
+ signal: options?.signal
686
+ });
687
+ response = await handleScrapeResponse(
688
+ response,
689
+ url,
690
+ fetchForPoller,
691
+ {
692
+ scrapeTimeout: options?.scrapeTimeout,
693
+ onScrapeProgress: options?.onScrapeProgress,
690
694
  signal: options?.signal
691
- });
692
- response = await handleScrapeResponse(
693
- response,
694
- url,
695
- fetchForPoller,
696
- {
697
- scrapeTimeout: options?.scrapeTimeout,
698
- onScrapeProgress: options?.onScrapeProgress,
699
- signal: options?.signal
700
- }
701
- );
702
- }
695
+ }
696
+ );
703
697
  const contentLength = response.headers.get("Content-Length");
704
698
  if (contentLength) {
705
699
  const size = parseInt(contentLength, 10);
@@ -780,7 +774,6 @@ var QuikturnLogos = class {
780
774
  greyscale: options?.greyscale,
781
775
  theme: options?.theme,
782
776
  format: options?.format,
783
- autoScrape: options?.autoScrape,
784
777
  baseUrl: this.baseUrl
785
778
  });
786
779
  const format = options?.format;
@@ -851,4 +844,4 @@ var QuikturnLogos = class {
851
844
  }
852
845
  };
853
846
 
854
- export { QuikturnLogos, getMany, serverFetch };
847
+ export { QuikturnLogos };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quikturn/logos",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Quikturn Logo SDK — URL builder, browser client, and server client for the Quikturn Logos API",
5
5
  "license": "MIT",
6
6
  "author": "Quikturn",
@@ -20,7 +20,10 @@
20
20
  "sdk"
21
21
  ],
22
22
  "type": "module",
23
- "sideEffects": false,
23
+ "sideEffects": [
24
+ "./dist/element/index.mjs",
25
+ "./dist/element/index.cjs"
26
+ ],
24
27
  "packageManager": "pnpm@10.28.1",
25
28
  "engines": {
26
29
  "node": ">=18"
@@ -55,6 +58,14 @@
55
58
  },
56
59
  "import": "./dist/server/index.mjs",
57
60
  "require": "./dist/server/index.cjs"
61
+ },
62
+ "./element": {
63
+ "types": {
64
+ "import": "./dist/element/index.d.ts",
65
+ "require": "./dist/element/index.d.cts"
66
+ },
67
+ "import": "./dist/element/index.mjs",
68
+ "require": "./dist/element/index.cjs"
58
69
  }
59
70
  },
60
71
  "publishConfig": {
@@ -65,7 +76,7 @@
65
76
  "types": "./dist/index.d.ts",
66
77
  "scripts": {
67
78
  "build": "tsup",
68
- "test": "vitest run --project unit --project client --project server",
79
+ "test": "vitest run --project unit --project client --project server --project element",
69
80
  "test:integration": "vitest run --project integration",
70
81
  "test:watch": "vitest",
71
82
  "test:coverage": "vitest run --coverage",