@tthr/vue 0.0.51 → 0.0.52

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
@@ -130,9 +130,10 @@ export default defineNuxtModule({
130
130
  nitroConfig.externals = nitroConfig.externals || {};
131
131
  nitroConfig.externals.inline = nitroConfig.externals.inline || [];
132
132
  nitroConfig.externals.inline.push('@tthr/vue');
133
+ // Add alias for user's tether functions so Nitro can resolve TypeScript
134
+ nitroConfig.alias = nitroConfig.alias || {};
135
+ nitroConfig.alias['#tether-functions'] = `${nuxt.options.rootDir}/tether/functions`;
133
136
  });
134
- // Get the absolute path to user's tether/functions/index file
135
- const tetherFunctionsPath = `${nuxt.options.rootDir}/tether/functions/index`;
136
137
  // Generate a server plugin to auto-register cron handlers from tether/functions
137
138
  // This runs at build time and creates a plugin that imports user's functions
138
139
  // NOTE: Must be .js file (not .ts) to avoid Rollup parse errors during Nitro build
@@ -147,8 +148,8 @@ export default defineNuxtModule({
147
148
  import { defineNitroPlugin, registerCronHandler } from '@tthr/vue/nuxt/runtime/server/plugins/cron.js';
148
149
  import { useTetherServer } from '@tthr/vue/nuxt/runtime/server/utils/tether.js';
149
150
 
150
- // Import all functions from tether/functions
151
- import * as tetherFunctions from '${tetherFunctionsPath}';
151
+ // Import all functions from tether/functions using Nitro alias
152
+ import * as tetherFunctions from '#tether-functions';
152
153
 
153
154
  /**
154
155
  * Create a simple logger for function execution
package/nuxt/module.ts CHANGED
@@ -155,9 +155,10 @@ export default defineNuxtModule<TetherModuleOptions>({
155
155
  nitroConfig.externals.inline = nitroConfig.externals.inline || [];
156
156
  nitroConfig.externals.inline.push('@tthr/vue');
157
157
 
158
- // Add alias for user's tether functions so Nitro can resolve TypeScript
158
+ // Add alias for user's tether functions so Nitro can resolve them
159
+ // Using bare module name (not # prefix which triggers Node subpath imports)
159
160
  nitroConfig.alias = nitroConfig.alias || {};
160
- nitroConfig.alias['#tether-functions'] = `${nuxt.options.rootDir}/tether/functions`;
161
+ nitroConfig.alias['tether-user-functions'] = `${nuxt.options.rootDir}/tether/functions`;
161
162
  });
162
163
 
163
164
  // Generate a server plugin to auto-register cron handlers from tether/functions
@@ -175,7 +176,7 @@ import { defineNitroPlugin, registerCronHandler } from '@tthr/vue/nuxt/runtime/s
175
176
  import { useTetherServer } from '@tthr/vue/nuxt/runtime/server/utils/tether.js';
176
177
 
177
178
  // Import all functions from tether/functions using Nitro alias
178
- import * as tetherFunctions from '#tether-functions';
179
+ import * as tetherFunctions from 'tether-user-functions';
179
180
 
180
181
  /**
181
182
  * Create a simple logger for function execution
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tthr/vue",
3
- "version": "0.0.51",
3
+ "version": "0.0.52",
4
4
  "description": "Tether Vue/Nuxt SDK",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",