@tthr/vue 0.0.64 → 0.0.66

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/nuxt/module.js CHANGED
@@ -135,4 +135,3 @@ export default defineNuxtModule({
135
135
  });
136
136
  },
137
137
  });
138
- //# sourceMappingURL=module.js.map
@@ -141,13 +141,11 @@ async function executeViaApi(config, functionName, functionType, args) {
141
141
  apiPath = `${base}/api/v1/projects/${config.projectId}`;
142
142
  }
143
143
  // Order endpoints to try based on functionType hint
144
- // Note: action functions are executed via mutation endpoint (they have same capabilities)
145
144
  const endpointTypes = ['mutation', 'query'];
146
- // Move the hinted type to the front if valid (map 'action' to 'mutation')
147
- const mappedType = functionType === 'action' ? 'mutation' : functionType;
148
- if (mappedType && endpointTypes.includes(mappedType)) {
149
- endpointTypes.splice(endpointTypes.indexOf(mappedType), 1);
150
- endpointTypes.unshift(mappedType);
145
+ // Move the hinted type to the front if valid
146
+ if (functionType && endpointTypes.includes(functionType)) {
147
+ endpointTypes.splice(endpointTypes.indexOf(functionType), 1);
148
+ endpointTypes.unshift(functionType);
151
149
  }
152
150
  let lastError = null;
153
151
  for (const type of endpointTypes) {
@@ -338,14 +336,15 @@ export default defineNitroPlugin((nitro) => {
338
336
  const apiKey = process.env.NUXT_TETHER_API_KEY || process.env.TETHER_API_KEY;
339
337
  const url = process.env.NUXT_TETHER_URL || process.env.TETHER_URL || 'https://tether-api.strands.gg';
340
338
  const projectId = process.env.NUXT_TETHER_PROJECT_ID || process.env.TETHER_PROJECT_ID;
339
+ const environment = process.env.NUXT_TETHER_ENVIRONMENT || process.env.TETHER_ENVIRONMENT;
341
340
  verboseLogging = process.env.NUXT_TETHER_VERBOSE === 'true' || process.env.TETHER_VERBOSE === 'true';
342
341
  // Only connect if we have all required config
343
342
  if (!apiKey || !projectId) {
344
343
  log.debug('Missing config (apiKey or projectId) - cron connection disabled');
345
344
  return;
346
345
  }
347
- log.info('Initialising cron connection...');
348
- const config = { url, projectId, apiKey };
346
+ log.info(`Initialising cron connection...${environment ? ` (env: ${environment})` : ''}`);
347
+ const config = { url, projectId, apiKey, environment };
349
348
  // Connect on next tick to allow the server to fully initialise
350
349
  process.nextTick(() => {
351
350
  connect(config);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tthr/vue",
3
- "version": "0.0.64",
3
+ "version": "0.0.66",
4
4
  "description": "Tether Vue/Nuxt SDK",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",