@uni-helper/vite-plugin-uni-pages 0.3.9 → 0.3.10

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/dist/index.cjs CHANGED
@@ -81,8 +81,11 @@ function getDeclaration(ctx) {
81
81
  // @ts-nocheck
82
82
  // Generated by vite-plugin-uni-pages
83
83
 
84
+ type _LocationUrl =
85
+ ${allPagesPath.join(" |\n ")};
86
+
84
87
  interface NavigateToOptions {
85
- url: ${allPagesPath.join(" |\n ")};
88
+ url: _LocationUrl;
86
89
  }
87
90
  interface RedirectToOptions extends NavigateToOptions {}
88
91
 
@@ -98,6 +101,10 @@ declare interface Uni {
98
101
  switchTab(options: UniNamespace.SwitchTabOptions & SwitchTabOptions): void;
99
102
  reLaunch(options: UniNamespace.ReLaunchOptions & ReLaunchOptions): void;
100
103
  }
104
+
105
+ declare module "virtual:uni-pages" {
106
+ export type LocationUrl = _LocationUrl;
107
+ }
101
108
  `;
102
109
  return code;
103
110
  }
@@ -511,7 +518,7 @@ function findMacro(stmts, filename) {
511
518
  return;
512
519
  const [opt] = macro.arguments;
513
520
  if (opt && !t__namespace.isFunctionExpression(opt) && !t__namespace.isArrowFunctionExpression(opt) && !t__namespace.isObjectExpression(opt)) {
514
- debug.definePage(`definePage() \u53C2\u6570\u4EC5\u652F\u6301\u51FD\u6570\u6216\u5BF9\u8C61: ${filename}`);
521
+ debug.definePage(`definePage() \u53C2\u6570\u4EC5\u652F\u6301\u51FD\u6570\u6216\u5BF9\u8C61\uFF1A${filename}`);
515
522
  return;
516
523
  }
517
524
  return macro;
package/dist/index.mjs CHANGED
@@ -47,8 +47,11 @@ function getDeclaration(ctx) {
47
47
  // @ts-nocheck
48
48
  // Generated by vite-plugin-uni-pages
49
49
 
50
+ type _LocationUrl =
51
+ ${allPagesPath.join(" |\n ")};
52
+
50
53
  interface NavigateToOptions {
51
- url: ${allPagesPath.join(" |\n ")};
54
+ url: _LocationUrl;
52
55
  }
53
56
  interface RedirectToOptions extends NavigateToOptions {}
54
57
 
@@ -64,6 +67,10 @@ declare interface Uni {
64
67
  switchTab(options: UniNamespace.SwitchTabOptions & SwitchTabOptions): void;
65
68
  reLaunch(options: UniNamespace.ReLaunchOptions & ReLaunchOptions): void;
66
69
  }
70
+
71
+ declare module "virtual:uni-pages" {
72
+ export type LocationUrl = _LocationUrl;
73
+ }
67
74
  `;
68
75
  return code;
69
76
  }
@@ -477,7 +484,7 @@ function findMacro(stmts, filename) {
477
484
  return;
478
485
  const [opt] = macro.arguments;
479
486
  if (opt && !t.isFunctionExpression(opt) && !t.isArrowFunctionExpression(opt) && !t.isObjectExpression(opt)) {
480
- debug.definePage(`definePage() \u53C2\u6570\u4EC5\u652F\u6301\u51FD\u6570\u6216\u5BF9\u8C61: ${filename}`);
487
+ debug.definePage(`definePage() \u53C2\u6570\u4EC5\u652F\u6301\u51FD\u6570\u6216\u5BF9\u8C61\uFF1A${filename}`);
481
488
  return;
482
489
  }
483
490
  return macro;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@uni-helper/vite-plugin-uni-pages",
3
3
  "type": "module",
4
- "version": "0.3.9",
4
+ "version": "0.3.10",
5
5
  "description": "File system based routing for uni-app applications using Vite",
6
6
  "author": "KeJun",
7
7
  "maintainers": [