@tthr/vue 0.0.50 → 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
@@ -154,10 +154,12 @@ export default defineNuxtModule<TetherModuleOptions>({
154
154
  nitroConfig.externals = nitroConfig.externals || {};
155
155
  nitroConfig.externals.inline = nitroConfig.externals.inline || [];
156
156
  nitroConfig.externals.inline.push('@tthr/vue');
157
- });
158
157
 
159
- // Get the absolute path to user's tether/functions/index file
160
- const tetherFunctionsPath = `${nuxt.options.rootDir}/tether/functions/index`;
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)
160
+ nitroConfig.alias = nitroConfig.alias || {};
161
+ nitroConfig.alias['tether-user-functions'] = `${nuxt.options.rootDir}/tether/functions`;
162
+ });
161
163
 
162
164
  // Generate a server plugin to auto-register cron handlers from tether/functions
163
165
  // This runs at build time and creates a plugin that imports user's functions
@@ -173,8 +175,8 @@ export default defineNuxtModule<TetherModuleOptions>({
173
175
  import { defineNitroPlugin, registerCronHandler } from '@tthr/vue/nuxt/runtime/server/plugins/cron.js';
174
176
  import { useTetherServer } from '@tthr/vue/nuxt/runtime/server/utils/tether.js';
175
177
 
176
- // Import all functions from tether/functions
177
- import * as tetherFunctions from '${tetherFunctionsPath}';
178
+ // Import all functions from tether/functions using Nitro alias
179
+ import * as tetherFunctions from 'tether-user-functions';
178
180
 
179
181
  /**
180
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.50",
3
+ "version": "0.0.52",
4
4
  "description": "Tether Vue/Nuxt SDK",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",