@nuxtagentic/kit 0.1.0 → 0.1.1

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/README.md CHANGED
@@ -32,6 +32,11 @@ Each consuming module still owns its page, layout, component, configuration, and
32
32
  worker registration in `module.ts`. Registration is scoped to the Nuxt instance
33
33
  and rejects duplicate IDs.
34
34
 
35
+ Registration opts the package's TypeScript sources into both Vite and Nitro
36
+ transpilation. Nitro normally excludes `node_modules`; Kit narrows that default
37
+ to allow `@nuxtagentic` sources while preserving other exclusion rules. Registered
38
+ package roots are bundled into the server output, including Cloudflare Workers.
39
+
35
40
  Kit does not mutate `cloud.config.ts` or run migrations. The host statically
36
41
  composes schema exports so CloudConfig's CLI can read them outside Nuxt.
37
42
  Feature packages declare schema exports in their `cloudconfig.models` metadata.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxtagentic/kit",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "registration.ts",
package/registration.ts CHANGED
@@ -94,6 +94,19 @@ export function registerWorkspaceModule(entry: FeatureRegistration, nuxt = useNu
94
94
  entries = []
95
95
  app[registryKey] = entries
96
96
  const modules = entries
97
+ nuxt.hook('nitro:config', (config) => {
98
+ // Published packages ship TypeScript; Nitro otherwise skips everything in node_modules.
99
+ config.esbuild ??= {}
100
+ config.esbuild.options ??= {}
101
+ // Nuxt merges exclusion arrays, so adding an exception leaves its broad default active.
102
+ const exclusions = config.esbuild.options.exclude ?? [/node_modules/]
103
+ config.esbuild.options.exclude = (Array.isArray(exclusions) ? exclusions : [exclusions]).map(
104
+ (pattern) =>
105
+ pattern instanceof RegExp && pattern.source === 'node_modules'
106
+ ? /[/\\]node_modules[/\\](?!(?:.*[/\\])?@nuxtagentic[/\\])/
107
+ : pattern,
108
+ )
109
+ })
97
110
  nuxt.hook('modules:done', () => {
98
111
  if (modules.some((entry) => entry.id === 'workspace')) {
99
112
  registerManifest(nuxt, '#workspace/features', 'features', () => featureManifest(modules))