@tthr/vue 0.0.55 → 0.0.57

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.
@@ -272,4 +272,3 @@ export function useTetherSubscription(queryName, args, onUpdate) {
272
272
  }
273
273
  return { isConnected };
274
274
  }
275
- //# sourceMappingURL=composables.js.map
@@ -18,4 +18,3 @@ export default defineNuxtPlugin(() => {
18
18
  console.warn('[Tether] Config incomplete - WebSocket subscriptions will not work');
19
19
  }
20
20
  });
21
- //# sourceMappingURL=plugin.client.js.map
@@ -9,7 +9,8 @@
9
9
  * (identified by ?type=server) receive cron triggers.
10
10
  */
11
11
  import { defineNitroPlugin } from 'nitropack/runtime';
12
- import { useRuntimeConfig } from '#imports';
12
+ // Re-export defineNitroPlugin for use by generated plugins
13
+ export { defineNitroPlugin };
13
14
  // Store for registered cron handlers
14
15
  const cronHandlers = new Map();
15
16
  // WebSocket connection state
@@ -127,6 +128,7 @@ async function handleCronTrigger(config, trigger) {
127
128
  const handler = cronHandlers.get(trigger.functionName);
128
129
  if (!handler) {
129
130
  log.warn(`No handler registered for: ${trigger.functionName}`);
131
+ log.warn(`Registered handlers: ${Array.from(cronHandlers.keys()).join(', ') || '(none)'}`);
130
132
  const durationMs = Date.now() - startTime;
131
133
  await reportExecution(config, trigger, {
132
134
  success: false,
@@ -258,13 +260,13 @@ function handleReconnect(config) {
258
260
  }, delay);
259
261
  }
260
262
  export default defineNitroPlugin((nitro) => {
261
- // Get config from runtime config
262
- const config = useRuntimeConfig();
263
- const tetherConfig = config.tether;
264
- const apiKey = tetherConfig?.apiKey || process.env.TETHER_API_KEY;
265
- const url = tetherConfig?.url || process.env.TETHER_URL || 'https://tether-api.strands.gg';
266
- const projectId = tetherConfig?.projectId || process.env.TETHER_PROJECT_ID;
267
- verboseLogging = tetherConfig?.verbose || process.env.TETHER_VERBOSE === 'true';
263
+ // Get config from environment variables
264
+ // Note: We use process.env directly instead of useRuntimeConfig to avoid #imports dependency
265
+ // The Nuxt module sets these from runtime config, but they can also be set directly
266
+ const apiKey = process.env.NUXT_TETHER_API_KEY || process.env.TETHER_API_KEY;
267
+ const url = process.env.NUXT_TETHER_URL || process.env.TETHER_URL || 'https://tether-api.strands.gg';
268
+ const projectId = process.env.NUXT_TETHER_PROJECT_ID || process.env.TETHER_PROJECT_ID;
269
+ verboseLogging = process.env.NUXT_TETHER_VERBOSE === 'true' || process.env.TETHER_VERBOSE === 'true';
268
270
  // Only connect if we have all required config
269
271
  if (!apiKey || !projectId) {
270
272
  log.debug('Missing config (apiKey or projectId) - cron connection disabled');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tthr/vue",
3
- "version": "0.0.55",
3
+ "version": "0.0.57",
4
4
  "description": "Tether Vue/Nuxt SDK",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",