appflare 0.2.1 → 0.2.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.
@@ -172,11 +172,6 @@ function renderRouteFactory(operation: HttpOperation): string {
172
172
  (args ?? {}) as ${inputType},
173
173
  ) as ${inputType};
174
174
  const requestAuthToken = resolveRealtimeAuthToken(authToken, mergedOptions?.headers);
175
- if (!requestAuthToken && !runtime.getAuthToken) {
176
- throw new Error(
177
- "authToken is required for realtime subscribe (pass options.authToken or Authorization Bearer header)",
178
- );
179
- }
180
175
 
181
176
  let removed = false;
182
177
  let socket: WebSocket | null = null;
@@ -229,17 +224,6 @@ function renderRouteFactory(operation: HttpOperation): string {
229
224
  }
230
225
  }
231
226
 
232
- if (!resolvedAuthToken) {
233
- const authError = new Error(
234
- "authToken is required for realtime subscribe (pass options.authToken or Authorization Bearer header)",
235
- );
236
- if (onError) {
237
- onError(authError);
238
- } else {
239
- console.warn("[appflare:subscribe]", authError.message);
240
- }
241
- return;
242
- }
243
227
 
244
228
  const subscription = (await requestRoute<RealtimeSubscriptionResponse>(runtime.endpoint, {
245
229
  route: "/realtime/subscribe",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "appflare",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "bin": {
5
5
  "appflare": "./cli/index.ts"
6
6
  },