@avsbhq/node 0.1.0 → 0.2.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.
package/README.md CHANGED
@@ -52,7 +52,7 @@ Initialize once at app boot. The server holds an in-memory datafile and refreshe
52
52
  |---|---|---|---|
53
53
  | `sdkKey` | `string` | — | **Required.** Server SDK key for the environment. |
54
54
  | `pollingInterval` | `number` | `60_000` | How often (ms) to refresh the datafile. Min `5_000`. |
55
- | `cdnHost` | `string` | `'https://cdn.avsb.app'` | CDN host for datafile fetches. |
55
+ | `cdnHost` | `string` | `'https://cdn.avsb.cloud'` | CDN host for datafile fetches. |
56
56
  | `initTimeout` | `number` | `10_000` | Max ms to wait for initial datafile fetch. |
57
57
  | `bootstrap` | `FlagDatafile` | — | Pre-fetched datafile to skip the initial network request. |
58
58
  | `streaming` | `boolean` | `false` | Enable SSE streaming for real-time datafile updates. |
package/dist/index.cjs CHANGED
@@ -188,7 +188,8 @@ var AvsBServer = class {
188
188
  constructor(options) {
189
189
  this.sdkKey = options.sdkKey;
190
190
  this.pollingInterval = Math.max(options.pollingInterval ?? 6e4, 5e3);
191
- this.cdnHost = options.cdnHost ?? "https://cdn.avsb.app";
191
+ const rawCdnHost = options.cdnHost ?? "https://cdn.avsb.cloud";
192
+ this.cdnHost = rawCdnHost.endsWith("/") ? rawCdnHost.slice(0, -1) : rawCdnHost;
192
193
  this.initTimeout = options.initTimeout ?? 1e4;
193
194
  this.logger = options.logger ?? noopLogger;
194
195
  this.stickyBucketService = options.stickyBucketService ?? null;
package/dist/index.d.cts CHANGED
@@ -6,7 +6,7 @@ interface AvsBServerOptions {
6
6
  sdkKey: string;
7
7
  /** Datafile polling interval in ms. Default: 60_000 (60s). Min: 5_000. */
8
8
  pollingInterval?: number;
9
- /** CDN host for datafile fetches. Default: "https://cdn.avsb.app" */
9
+ /** CDN host for datafile fetches. Default: "https://cdn.avsb.cloud" */
10
10
  cdnHost?: string;
11
11
  /** Max ms to wait for initial datafile fetch in onReady(). Default: 10_000. */
12
12
  initTimeout?: number;
package/dist/index.d.ts CHANGED
@@ -6,7 +6,7 @@ interface AvsBServerOptions {
6
6
  sdkKey: string;
7
7
  /** Datafile polling interval in ms. Default: 60_000 (60s). Min: 5_000. */
8
8
  pollingInterval?: number;
9
- /** CDN host for datafile fetches. Default: "https://cdn.avsb.app" */
9
+ /** CDN host for datafile fetches. Default: "https://cdn.avsb.cloud" */
10
10
  cdnHost?: string;
11
11
  /** Max ms to wait for initial datafile fetch in onReady(). Default: 10_000. */
12
12
  initTimeout?: number;
package/dist/index.js CHANGED
@@ -154,7 +154,8 @@ var AvsBServer = class {
154
154
  constructor(options) {
155
155
  this.sdkKey = options.sdkKey;
156
156
  this.pollingInterval = Math.max(options.pollingInterval ?? 6e4, 5e3);
157
- this.cdnHost = options.cdnHost ?? "https://cdn.avsb.app";
157
+ const rawCdnHost = options.cdnHost ?? "https://cdn.avsb.cloud";
158
+ this.cdnHost = rawCdnHost.endsWith("/") ? rawCdnHost.slice(0, -1) : rawCdnHost;
158
159
  this.initTimeout = options.initTimeout ?? 1e4;
159
160
  this.logger = options.logger ?? noopLogger;
160
161
  this.stickyBucketService = options.stickyBucketService ?? null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@avsbhq/node",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",
@@ -28,7 +28,7 @@
28
28
  "test:watch": "vitest"
29
29
  },
30
30
  "dependencies": {
31
- "@avsbhq/js": "^0.2.0"
31
+ "@avsbhq/js": "^0.3.0"
32
32
  },
33
33
  "devDependencies": {
34
34
  "tsup": "^8.0.0",