@castari/sdk 0.1.0 → 0.1.1

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/client.js +3 -2
  2. package/package.json +1 -1
package/dist/client.js CHANGED
@@ -1,5 +1,6 @@
1
1
  export * from './types';
2
2
  const DEFAULT_LOCAL_URL = 'http://localhost:3000';
3
+ const DEFAULT_PLATFORM_URL = 'https://castari-api-12511-04c55b73-g4p2s9om.onporter.run';
3
4
  export class CastariClient {
4
5
  ws;
5
6
  options;
@@ -126,7 +127,7 @@ export class CastariClient {
126
127
  if (!this.resolvedClientId) {
127
128
  throw new Error('CASTARI_CLIENT_ID is required when connecting via the Castari Platform');
128
129
  }
129
- const platformUrl = this.options.platformUrl || process.env.CASTARI_PLATFORM_URL || 'http://localhost:3000';
130
+ const platformUrl = this.options.platformUrl || process.env.CASTARI_PLATFORM_URL || DEFAULT_PLATFORM_URL;
130
131
  if (this.options.debug) {
131
132
  console.log(`🚀 Requesting sandbox from ${platformUrl}...`);
132
133
  }
@@ -190,7 +191,7 @@ export class CastariClient {
190
191
  this.ws.close();
191
192
  }
192
193
  if (this.sandboxId) {
193
- const platformUrl = this.options.platformUrl || process.env.CASTARI_PLATFORM_URL || 'http://localhost:3000';
194
+ const platformUrl = this.options.platformUrl || process.env.CASTARI_PLATFORM_URL || DEFAULT_PLATFORM_URL;
194
195
  try {
195
196
  const clientId = this.resolvedClientId || this.options.clientId || process.env.CASTARI_CLIENT_ID;
196
197
  const apiKey = this.resolvedPlatformApiKey || this.options.platformApiKey || process.env.CASTARI_API_KEY;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@castari/sdk",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",