@mapomodule/core 2.0.0-beta.2 → 2.0.0-beta.4

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.
@@ -1 +1 @@
1
- {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,YAAY,EACV,UAAU,EACV,iBAAiB,EACjB,WAAW,EACX,UAAU,EACV,WAAW,EACX,cAAc,EACd,eAAe,EACf,WAAW,EACX,SAAS,GACV,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC9E,YAAY,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;;AAEzE,wBAsEqC"}
1
+ {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,YAAY,EACV,UAAU,EACV,iBAAiB,EACjB,WAAW,EACX,UAAU,EACV,WAAW,EACX,cAAc,EACd,eAAe,EACf,WAAW,EACX,SAAS,GACV,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC9E,YAAY,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;;AAEzE,wBAkFqC"}
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mapomodule/core",
3
3
  "configKey": "mapoCore",
4
- "version": "2.0.0-beta.2",
4
+ "version": "2.0.0-beta.4",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "unknown"
package/dist/module.mjs CHANGED
@@ -17,6 +17,11 @@ const module$1 = defineNuxtModule({
17
17
  defaults: MAPO_DEFAULTS,
18
18
  async setup(options, nuxt) {
19
19
  const resolver = createResolver(import.meta.url);
20
+ nuxt.options.build.transpile.push(resolver.resolve("./runtime"));
21
+ nuxt.options.imports.transform ??= {};
22
+ (nuxt.options.imports.transform.include ??= []).push(
23
+ /@mapomodule[\\/]core[\\/]/
24
+ );
20
25
  addTypeTemplate({
21
26
  filename: "types/mapo-core-page-meta.d.ts",
22
27
  getContents: () => readFileSync(
@@ -25,7 +30,7 @@ const module$1 = defineNuxtModule({
25
30
  )
26
31
  });
27
32
  if (!hasNuxtModule("@mapomodule/store")) {
28
- await installModule("@mapomodule/store");
33
+ await installModule(await resolver.resolvePath("@mapomodule/store"));
29
34
  }
30
35
  nuxt.options.runtimeConfig.public.mapoCore = {
31
36
  ...MAPO_DEFAULTS,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mapomodule/core",
3
- "version": "2.0.0-beta.2",
3
+ "version": "2.0.0-beta.4",
4
4
  "description": "Mapo core: API layer, auth, composables, middleware",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -46,11 +46,12 @@
46
46
  "lint": "eslint src"
47
47
  },
48
48
  "dependencies": {
49
- "@mapomodule/store": "2.0.0-beta.2",
49
+ "@mapomodule/store": "2.0.0-beta.4",
50
50
  "@mapomodule/utils": "2.0.0-beta.1"
51
51
  },
52
52
  "peerDependencies": {
53
- "nuxt": ">=4.0.0"
53
+ "nuxt": ">=4.0.0",
54
+ "pinia": "^3.0.0"
54
55
  },
55
56
  "devDependencies": {
56
57
  "@nuxt/kit": "4.4.2",
package/src/module.ts CHANGED
@@ -40,6 +40,16 @@ export default defineNuxtModule<MapoOptions>({
40
40
  async setup(options, nuxt) {
41
41
  const resolver = createResolver(import.meta.url);
42
42
 
43
+ // In consuming apps this runtime lives inside node_modules, where Nuxt
44
+ // skips auto-import injection by default (workspace apps are unaffected:
45
+ // pnpm symlinks resolve outside node_modules). Opt back in and transpile
46
+ // the runtime for the SSR build.
47
+ nuxt.options.build.transpile.push(resolver.resolve("./runtime"));
48
+ nuxt.options.imports.transform ??= {};
49
+ (nuxt.options.imports.transform.include ??= []).push(
50
+ /@mapomodule[\\/]core[\\/]/,
51
+ );
52
+
43
53
  addTypeTemplate({
44
54
  filename: "types/mapo-core-page-meta.d.ts",
45
55
  getContents: () =>
@@ -50,7 +60,9 @@ export default defineNuxtModule<MapoOptions>({
50
60
  });
51
61
 
52
62
  if (!hasNuxtModule("@mapomodule/store")) {
53
- await installModule("@mapomodule/store");
63
+ // Resolve from core's own node_modules: with pnpm's isolated layout the
64
+ // consuming app cannot resolve the bare "@mapomodule/store" specifier.
65
+ await installModule(await resolver.resolvePath("@mapomodule/store"));
54
66
  }
55
67
 
56
68
  // `defaults` guarantees these are set at runtime, but MapoOptions keeps