@replanejs/sdk 0.8.20 → 0.9.2

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/dist/index.d.cts CHANGED
@@ -78,38 +78,42 @@ interface ReplaneSnapshot<_T extends object = object> {
78
78
  value: unknown;
79
79
  overrides: RenderedOverride[];
80
80
  }>;
81
- /** Default context used for override evaluation */
82
- context?: ReplaneContext;
83
81
  }
84
82
  /**
85
- * The Replane client interface
83
+ * Options for the Replane constructor
86
84
  */
87
- interface ReplaneClient<T extends object> {
88
- /** Get a config by its name. */
89
- get<K extends keyof T>(configName: K, options?: GetConfigOptions<T[K]>): T[K];
90
- /** Subscribe to config changes.
91
- * @param callback - A function to call when an config is changed. The callback will be called with the new config value.
92
- * @returns A function to unsubscribe from the config changes.
85
+ interface ReplaneOptions<T extends object> {
86
+ /**
87
+ * Optional logger (defaults to console).
93
88
  */
94
- subscribe(callback: (config: MapConfig<T>) => void): () => void;
95
- /** Subscribe to a specific config change.
96
- * @param configName - The name of the config to subscribe to.
97
- * @param callback - A function to call when the config is changed. The callback will be called with the new config value.
98
- * @returns A function to unsubscribe from the config changes.
89
+ logger?: ReplaneLogger;
90
+ /**
91
+ * Default context for all config evaluations.
92
+ * Can be overridden per-request in `client.get()`.
99
93
  */
100
- subscribe<K extends keyof T>(configName: K, callback: (config: MapConfig<Pick<T, K>>) => void): () => void;
94
+ context?: ReplaneContext;
101
95
  /**
102
- * Get a serializable snapshot of the current client state.
103
- * Useful for SSR/hydration scenarios where you want to pass configs from server to client.
96
+ * Default values to use before connection is established.
97
+ * These values are used immediately and can be overwritten by server data.
98
+ * @example
99
+ * {
100
+ * defaults: {
101
+ * config1: "value1",
102
+ * config2: 42,
103
+ * },
104
+ * }
104
105
  */
105
- getSnapshot(): ReplaneSnapshot<T>;
106
- /** Close the client and clean up resources. */
107
- close(): void;
106
+ defaults?: { [K in keyof T]?: T[K] };
107
+ /**
108
+ * Snapshot from a server-side client's getSnapshot() call.
109
+ * Used for SSR/hydration scenarios.
110
+ */
111
+ snapshot?: ReplaneSnapshot<T>;
108
112
  }
109
113
  /**
110
- * Options for creating a Replane client
114
+ * Options for connecting to the Replane server
111
115
  */
112
- interface ReplaneClientOptions<T extends object> {
116
+ interface ConnectOptions {
113
117
  /**
114
118
  * Base URL of the Replane instance (no trailing slash).
115
119
  * @example
@@ -126,24 +130,20 @@ interface ReplaneClientOptions<T extends object> {
126
130
  */
127
131
  sdkKey: string;
128
132
  /**
129
- * Custom fetch implementation (useful for tests / polyfills).
130
- */
131
- fetchFn?: typeof fetch;
132
- /**
133
- * Optional timeout in ms for the request.
134
- * @default 2000
135
- */
136
- requestTimeoutMs?: number;
137
- /**
138
- * Optional timeout in ms for the SDK initialization.
133
+ * Optional timeout in ms for the initial connection.
139
134
  * @default 5000
140
135
  */
141
- initializationTimeoutMs?: number;
136
+ connectTimeoutMs?: number;
142
137
  /**
143
138
  * Delay between retries in ms.
144
139
  * @default 200
145
140
  */
146
141
  retryDelayMs?: number;
142
+ /**
143
+ * Optional timeout in ms for individual requests.
144
+ * @default 2000
145
+ */
146
+ requestTimeoutMs?: number;
147
147
  /**
148
148
  * Timeout in ms for SSE connection inactivity.
149
149
  * If no events (including pings) are received within this time, the connection will be re-established.
@@ -151,181 +151,186 @@ interface ReplaneClientOptions<T extends object> {
151
151
  */
152
152
  inactivityTimeoutMs?: number;
153
153
  /**
154
- * Optional logger (defaults to console).
155
- */
156
- logger?: ReplaneLogger;
157
- /**
158
- * Default context for all config evaluations.
159
- * Can be overridden per-request in `client.get()`.
160
- */
161
- context?: ReplaneContext;
162
- /**
163
- * Required configs for the client.
164
- * If a config is not present, the client will throw an error during initialization.
165
- * @example
166
- * {
167
- * required: {
168
- * config1: true,
169
- * config2: true,
170
- * config3: false,
171
- * },
172
- * }
173
- *
174
- * @example
175
- * {
176
- * required: ["config1", "config2", "config3"],
177
- * }
178
- */
179
- required?: { [K in keyof T]: boolean } | Array<keyof T>;
180
- /**
181
- * Default values to use if the initial request to fetch configs fails or times out.
182
- * These values are used immediately while waiting for server connection.
183
- * @example
184
- * {
185
- * defaults: {
186
- * config1: "value1",
187
- * config2: 42,
188
- * },
189
- * }
154
+ * Custom fetch implementation (useful for tests / polyfills).
190
155
  */
191
- defaults?: { [K in keyof T]: T[K] };
156
+ fetchFn?: typeof fetch;
192
157
  /**
193
158
  * Agent identifier sent in User-Agent header.
194
159
  * Defaults to SDK identifier (e.g., "replane-js/x.y.z").
195
160
  */
196
161
  agent?: string;
197
- /**
198
- * Callback invoked when a connection error occurs during SSE streaming.
199
- * This is called on each retry attempt, useful for tracking connection health.
200
- * The SDK will automatically retry connections, so this is informational.
201
- * @param error - The error that caused the connection failure
202
- */
203
- onConnectionError?: (error: unknown) => void;
204
- /**
205
- * Callback invoked when the SSE connection is successfully established.
206
- * This is called on initial connection and on every successful reconnection.
207
- * Useful for tracking connection health and reconnection metrics.
208
- */
209
- onConnected?: () => void;
210
- }
211
- /**
212
- * Options for restoring a Replane client from a snapshot
213
- */
214
- interface RestoreReplaneClientOptions<T extends object> {
215
- /**
216
- * Snapshot from a server-side client's getSnapshot() call.
217
- */
218
- snapshot: ReplaneSnapshot<T>;
219
- /**
220
- * Optional connection options for live updates.
221
- * If provided, the client will connect to the Replane server for real-time config updates.
222
- * If not provided, the client will only use the snapshot data (no live updates).
223
- */
224
- connection?: {
225
- /**
226
- * Base URL of the Replane instance (no trailing slash).
227
- */
228
- baseUrl: string;
229
- /**
230
- * Project SDK key for authorization.
231
- */
232
- sdkKey: string;
233
- /**
234
- * Custom fetch implementation (useful for tests / polyfills).
235
- */
236
- fetchFn?: typeof fetch;
237
- /**
238
- * Optional timeout in ms for the request.
239
- * @default 2000
240
- */
241
- requestTimeoutMs?: number;
242
- /**
243
- * Delay between retries in ms.
244
- * @default 200
245
- */
246
- retryDelayMs?: number;
247
- /**
248
- * Timeout in ms for SSE connection inactivity.
249
- * @default 30000
250
- */
251
- inactivityTimeoutMs?: number;
252
- /**
253
- * Optional logger (defaults to console).
254
- */
255
- logger?: ReplaneLogger;
256
- /**
257
- * Agent identifier sent in User-Agent header.
258
- * Defaults to SDK identifier (e.g., "replane-js/x.y.z").
259
- */
260
- agent?: string;
261
- /**
262
- * Callback invoked when a connection error occurs during SSE streaming.
263
- * This is called on each retry attempt, useful for tracking connection health.
264
- * The SDK will automatically retry connections, so this is informational.
265
- * @param error - The error that caused the connection failure
266
- */
267
- onConnectionError?: (error: unknown) => void;
268
- /**
269
- * Callback invoked when the SSE connection is successfully established.
270
- * This is called on initial connection and on every successful reconnection.
271
- * Useful for tracking connection health and reconnection metrics.
272
- */
273
- onConnected?: () => void;
274
- };
275
- /**
276
- * Override the context from the snapshot.
277
- */
278
- context?: ReplaneContext;
279
162
  }
280
163
  /**
281
- * Internal options after processing user options
164
+ * Internal options after processing connect options
282
165
  */
283
166
  //#endregion
284
167
  //#region src/client.d.ts
285
168
  /**
286
- * Create a Replane client bound to an SDK key.
169
+ * The Replane client for managing dynamic configuration.
287
170
  *
288
171
  * @example
289
172
  * ```typescript
290
- * const client = await createReplaneClient({
291
- * sdkKey: 'your-sdk-key',
292
- * baseUrl: 'https://app.replane.dev'
173
+ * // Create client with defaults
174
+ * const client = new Replane({
175
+ * defaults: { myConfig: 'defaultValue' }
176
+ * });
177
+ *
178
+ * // Use immediately (returns defaults)
179
+ * const value = client.get('myConfig');
180
+ *
181
+ * // Connect for real-time updates
182
+ * await client.connect({
183
+ * baseUrl: 'https://app.replane.dev',
184
+ * sdkKey: 'your-sdk-key'
293
185
  * });
294
- * const value = client.get('my-config');
295
186
  * ```
296
- */
297
- declare function createReplaneClient<T extends object = Record<string, unknown>>(sdkOptions: ReplaneClientOptions<T>): Promise<ReplaneClient<T>>;
298
- /**
299
- * Create a Replane client that uses in-memory storage.
300
- * Useful for testing or when you have static config values.
301
187
  *
302
188
  * @example
303
189
  * ```typescript
304
- * const client = createInMemoryReplaneClient({ 'my-config': 123 });
305
- * const value = client.get('my-config'); // 123
190
+ * // SSR/Hydration: Create from snapshot
191
+ * const client = new Replane({
192
+ * snapshot: serverSnapshot
193
+ * });
194
+ * await client.connect({ baseUrl, sdkKey });
306
195
  * ```
307
- */
308
- declare function createInMemoryReplaneClient<T extends object = Record<string, unknown>>(initialData: T): ReplaneClient<T>;
309
- /**
310
- * Restore a Replane client from a snapshot.
311
- * This is useful for SSR/hydration scenarios where the server has already fetched configs.
312
196
  *
313
197
  * @example
314
198
  * ```typescript
315
- * // On the server:
316
- * const serverClient = await createReplaneClient({ ... });
317
- * const snapshot = serverClient.getSnapshot();
318
- * // Pass snapshot to client via props/serialization
319
- *
320
- * // On the client:
321
- * const client = restoreReplaneClient({
322
- * snapshot,
323
- * connection: { sdkKey, baseUrl }
199
+ * // In-memory mode (no connection)
200
+ * const client = new Replane({
201
+ * defaults: { feature: true, limit: 100 }
324
202
  * });
325
- * const value = client.get('my-config');
203
+ * // Don't call connect() - works entirely in-memory
326
204
  * ```
327
205
  */
328
- declare function restoreReplaneClient<T extends object = Record<string, unknown>>(options: RestoreReplaneClientOptions<T>): ReplaneClient<T>;
206
+ declare class Replane<T extends object = Record<string, unknown>> {
207
+ private configs;
208
+ private context;
209
+ private logger;
210
+ private storage;
211
+ private configSubscriptions;
212
+ private clientSubscriptions;
213
+ /**
214
+ * Create a new Replane client.
215
+ *
216
+ * The client is usable immediately after construction with defaults or snapshot data.
217
+ * Call `connect()` to establish a real-time connection for live updates.
218
+ *
219
+ * @param options - Configuration options
220
+ */
221
+ constructor(options?: ReplaneOptions<T>);
222
+ /**
223
+ * Connect to the Replane server for real-time config updates.
224
+ *
225
+ * This method establishes an SSE connection to receive live config updates.
226
+ * If already connected, it will disconnect first and reconnect with new options.
227
+ *
228
+ * @param options - Connection options including baseUrl and sdkKey
229
+ * @returns Promise that resolves when the initial connection is established
230
+ * @throws {ReplaneError} If connection times out and no defaults are available
231
+ *
232
+ * @example
233
+ * ```typescript
234
+ * await client.connect({
235
+ * baseUrl: 'https://app.replane.dev',
236
+ * sdkKey: 'rp_xxx'
237
+ * });
238
+ * ```
239
+ */
240
+ connect(options: ConnectOptions): Promise<void>;
241
+ /**
242
+ * Disconnect from the Replane server.
243
+ *
244
+ * Stops the SSE connection and cleans up resources.
245
+ * The client remains usable with cached config values.
246
+ * Can call `connect()` again to reconnect.
247
+ */
248
+ disconnect(): void;
249
+ /**
250
+ * Get a config value by name.
251
+ *
252
+ * Evaluates any overrides based on the client context and per-call context.
253
+ *
254
+ * @param configName - The name of the config to retrieve
255
+ * @param options - Optional settings for this call
256
+ * @returns The config value
257
+ * @throws {ReplaneError} If config not found and no default provided
258
+ *
259
+ * @example
260
+ * ```typescript
261
+ * // Simple get
262
+ * const value = client.get('myConfig');
263
+ *
264
+ * // With default fallback
265
+ * const value = client.get('myConfig', { default: 'fallback' });
266
+ *
267
+ * // With per-call context for override evaluation
268
+ * const value = client.get('myConfig', { context: { userId: '123' } });
269
+ * ```
270
+ */
271
+ get<K extends keyof T>(configName: K, options?: GetConfigOptions<T[K]>): T[K];
272
+ /**
273
+ * Subscribe to config changes.
274
+ *
275
+ * @param callback - Function called when any config changes
276
+ * @returns Unsubscribe function
277
+ *
278
+ * @example
279
+ * ```typescript
280
+ * const unsubscribe = client.subscribe((change) => {
281
+ * console.log(`Config ${change.name} changed to ${change.value}`);
282
+ * });
283
+ *
284
+ * // Later: stop listening
285
+ * unsubscribe();
286
+ * ```
287
+ */
288
+ subscribe(callback: (config: MapConfig<T>) => void): () => void;
289
+ /**
290
+ * Subscribe to a specific config's changes.
291
+ *
292
+ * @param configName - The config to watch
293
+ * @param callback - Function called when the config changes
294
+ * @returns Unsubscribe function
295
+ *
296
+ * @example
297
+ * ```typescript
298
+ * const unsubscribe = client.subscribe('myConfig', (change) => {
299
+ * console.log(`myConfig changed to ${change.value}`);
300
+ * });
301
+ * ```
302
+ */
303
+ subscribe<K extends keyof T>(configName: K, callback: (config: {
304
+ name: K;
305
+ value: T[K];
306
+ }) => void): () => void;
307
+ /**
308
+ * Get a serializable snapshot of the current client state.
309
+ *
310
+ * Useful for SSR/hydration scenarios where you want to pass
311
+ * configs from server to client.
312
+ *
313
+ * @returns Snapshot object that can be serialized to JSON
314
+ *
315
+ * @example
316
+ * ```typescript
317
+ * // On server
318
+ * const snapshot = client.getSnapshot();
319
+ * const json = JSON.stringify(snapshot);
320
+ *
321
+ * // On client
322
+ * const client = new Replane({ snapshot: JSON.parse(json) });
323
+ * ```
324
+ */
325
+ getSnapshot(): ReplaneSnapshot<T>;
326
+ /**
327
+ * Check if the client is currently connected.
328
+ */
329
+ get isConnected(): boolean;
330
+ private startStreaming;
331
+ private processConfigUpdates;
332
+ private toFinalOptions;
333
+ }
329
334
  //# sourceMappingURL=client.d.ts.map
330
335
  //#endregion
331
336
  //#region src/error.d.ts
@@ -359,15 +364,19 @@ declare class ReplaneError extends Error {
359
364
  //#endregion
360
365
  //#region src/snapshot.d.ts
361
366
  /**
362
- * Extended options for getReplaneSnapshot with caching support.
367
+ * Options for getReplaneSnapshot with caching support.
363
368
  */
364
- interface GetReplaneSnapshotOptions<T extends object> extends ReplaneClientOptions<T> {
369
+ interface GetReplaneSnapshotOptions<T extends object> extends ReplaneOptions<T> {
365
370
  /**
366
371
  * Cache TTL in milliseconds. When set, the client is cached and reused
367
372
  * for instant subsequent calls within this duration.
368
373
  * @default 60_000 (1 minute)
369
374
  */
370
375
  keepAliveMs?: number;
376
+ /**
377
+ * Connection options. If null, the snapshot will be created from defaults only.
378
+ */
379
+ connection: ConnectOptions | null;
371
380
  }
372
381
  /**
373
382
  * Creates a Replane client and returns a snapshot.
@@ -377,8 +386,10 @@ interface GetReplaneSnapshotOptions<T extends object> extends ReplaneClientOptio
377
386
  * @example
378
387
  * ```ts
379
388
  * const snapshot = await getReplaneSnapshot({
380
- * baseUrl: process.env.REPLANE_BASE_URL!,
381
- * sdkKey: process.env.REPLANE_SDK_KEY!,
389
+ * connection: {
390
+ * baseUrl: process.env.REPLANE_BASE_URL!,
391
+ * sdkKey: process.env.REPLANE_SDK_KEY!,
392
+ * },
382
393
  * });
383
394
  * ```
384
395
  */
@@ -389,5 +400,5 @@ declare function getReplaneSnapshot<T extends object>(options: GetReplaneSnapsho
389
400
  */
390
401
 
391
402
  //#endregion
392
- export { type GetConfigOptions, type GetReplaneSnapshotOptions, type ReplaneClient, type ReplaneClientOptions, type ReplaneContext, ReplaneError, ReplaneErrorCode, type ReplaneLogger, type ReplaneSnapshot, type RestoreReplaneClientOptions, createInMemoryReplaneClient, createReplaneClient, getReplaneSnapshot, restoreReplaneClient };
403
+ export { type ConnectOptions, type GetConfigOptions, type GetReplaneSnapshotOptions, Replane, type ReplaneContext, ReplaneError, ReplaneErrorCode, type ReplaneLogger, type ReplaneOptions, type ReplaneSnapshot, getReplaneSnapshot };
393
404
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/types.ts","../src/client-types.ts","../src/client.ts","../src/error.ts","../src/snapshot.ts"],"sourcesContent":[],"mappings":";;UAqBU,iBAAA;;ECfE,QAAA,EAAA,MAAA;EAKK,KAAA,EAAA,OAAA;AAUjB;UDaU,qBAAA,CCbuB;EAAA,QAIrB,EAAA,cAAA;EAAc,QAKd,EAAA,MAAA;EAAC,cAAA,EAAA,MAAA;EAMD,YAAS,EAAA,MAAA;EAAA,IAAA,EAAA,MAAA;;UDMX,YAAA,CCJA;EAAC,QACA,EAAA,KAAA;EAAC,UAAC,EDKC,iBCLD,EAAA;;AAEJ,UDMC,WAAA,CCND;EAMQ,QAAA,EAAA,IAAA;EAAe,UAAA,EDElB,iBCFkB,EAAA;;UDKtB,YAAA,CCHC;EAAK,QAMJ,EAAA,KAAA;EAAc,SAAA,EDDb,iBCCa;AAM1B;AAA8B,KDJlB,iBAAA,GACR,iBCG0B,GDF1B,qBCE0B,GDD1B,YCC0B,GDA1B,WCA0B,GDC1B,YCD0B;AAER,UDCL,gBAAA,CCDK;EAAC,IAAc,EAAA,MAAA;EAAC,UAA6B,EDGr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AaI;AAarB,UIzCO,yBJ2CH,CAAA,UAAiB,MAAA,CAAA,SI3CsC,oBJ2CtC,CI3C2D,CJ2C3D,CAAA,CAAA;EAGrB;AAKV;;;;EAEyB,WACrB,CAAA,EAAA,MAAA;;;AAEY;AAEhB;;;;AC1DA;AAKA;AAUA;;;;AASa;AAMD,iBGYU,kBHZD,CAAA,UAAA,MAAA,CAAA,CAAA,OAAA,EGaV,yBHbU,CGagB,CHbhB,CAAA,CAAA,EGclB,OHdkB,CGcV,eHdU,CGcM,CHdN,CAAA,CAAA"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../src/types.ts","../src/client-types.ts","../src/client.ts","../src/error.ts","../src/snapshot.ts"],"sourcesContent":[],"mappings":";;UAqBU,iBAAA;;ECfE,QAAA,EAAA,MAAA;EAKK,KAAA,EAAA,OAAA;AAUjB;UDaU,qBAAA,CCbuB;EAAA,QAIrB,EAAA,cAAA;EAAc,QAKd,EAAA,MAAA;EAAC,cAAA,EAAA,MAAA;EAMD,YAAS,EAAA,MAAA;EAAA,IAAA,EAAA,MAAA;;UDMX,YAAA,CCJA;EAAC,QACA,EAAA,KAAA;EAAC,UAAC,EDKC,iBCLD,EAAA;;AAEJ,UDMC,WAAA,CCND;EAMQ,QAAA,EAAA,IAAA;EAAe,UAAA,EDElB,iBCFkB,EAAA;;UDKtB,YAAA,CCHC;EAAK,QAAA,EAAA,KAAA;EAUC,SAAA,EDLJ,iBCKkB;;AAIpB,KDNC,iBAAA,GACR,iBCKO,GDJP,qBCIO,GDHP,YCGO,GDFP,WCEO,GDDP,YCCO;AAKC,UDJK,gBAAA,CCIL;EAAc,IAaV,EAAA,MAAA;EAAC,UAAI,EDfP,iBCeO,EAAA;EAAC,KAAC,EAAA,OAAA;;;;AD9DjB;AAEqB;AAaI;AAUA;AAQrB,KC9CE,cAAA,GAAiB,MDgDhB,CAAA,MAAA,EAAA,MAAiB,GAAA,MAAA,GAAA,OAAA,GAAA,IAAA,GAAA,SAAA,CAAA;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