wavespeed 0.0.7 → 0.0.9

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 +2 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -74,7 +74,7 @@ class WaveSpeed {
74
74
  * @param options Additional client options
75
75
  */
76
76
  constructor(apiKey, options = {}) {
77
- this.baseUrl = 'https://api.wavespeed.ai/api/v2/';
77
+ this.baseUrl = 'https://api.wavespeed.ai/api/v3/';
78
78
  // Browser-friendly environment variable handling
79
79
  const getEnvVar = (name) => {
80
80
  // Try to get from process.env for Node.js environments
@@ -102,7 +102,7 @@ class WaveSpeed {
102
102
  async fetchWithTimeout(path, options = {}) {
103
103
  const { timeout = this.timeout * 1000, ...fetchOptions } = options;
104
104
  // Ensure headers exist
105
- if (!options.isUpload) {
105
+ if (options.isUpload) {
106
106
  fetchOptions.headers = {
107
107
  'Authorization': `Bearer ${this.apiKey}`,
108
108
  ...(fetchOptions.headers || {}),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wavespeed",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "description": "WaveSpeed Client SDK for Wavespeed API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",