@uni-helper/vite-plugin-uni-pages 0.4.4 → 0.4.6
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.d.mts +9 -9
- package/dist/index.mjs +10 -10
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -2,7 +2,7 @@ import { createRequire } from "node:module";
|
|
|
2
2
|
import { FSWatcher } from "chokidar";
|
|
3
3
|
import { Logger, Plugin, ViteDevServer } from "vite";
|
|
4
4
|
import fs from "node:fs";
|
|
5
|
-
import
|
|
5
|
+
import Debug from "debug";
|
|
6
6
|
import { LoadConfigSource } from "unconfig";
|
|
7
7
|
import babelGenerator from "@babel/generator";
|
|
8
8
|
import * as t from "@babel/types";
|
|
@@ -286,14 +286,14 @@ declare function invalidatePagesModule(server: ViteDevServer): void;
|
|
|
286
286
|
* Enable via environment variable DEBUG=vite-plugin-uni-pages:*
|
|
287
287
|
*/
|
|
288
288
|
declare const debug: {
|
|
289
|
-
/** HMR related logs */hmr:
|
|
290
|
-
options:
|
|
291
|
-
pages:
|
|
292
|
-
subPages:
|
|
293
|
-
error:
|
|
294
|
-
cache:
|
|
295
|
-
declaration:
|
|
296
|
-
definePage:
|
|
289
|
+
/** HMR related logs */hmr: Debug.Debugger; /** Configuration options related logs */
|
|
290
|
+
options: Debug.Debugger; /** Main package page scanning logs */
|
|
291
|
+
pages: Debug.Debugger; /** Sub-package page scanning logs */
|
|
292
|
+
subPages: Debug.Debugger; /** Error logs */
|
|
293
|
+
error: Debug.Debugger; /** Cache related logs */
|
|
294
|
+
cache: Debug.Debugger; /** Declaration file generation logs */
|
|
295
|
+
declaration: Debug.Debugger; /** definePage macro parsing logs */
|
|
296
|
+
definePage: Debug.Debugger;
|
|
297
297
|
};
|
|
298
298
|
/**
|
|
299
299
|
* Convert file extensions array to glob pattern
|
package/dist/index.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import { createLogger, normalizePath } from "vite";
|
|
|
8
8
|
import fs, { existsSync } from "node:fs";
|
|
9
9
|
import { platform } from "@uni-helper/uni-env";
|
|
10
10
|
import { CommentArray, parse, stringify } from "comment-json";
|
|
11
|
-
import
|
|
11
|
+
import Debug from "debug";
|
|
12
12
|
import detectIndent from "detect-indent";
|
|
13
13
|
import detectNewline from "detect-newline";
|
|
14
14
|
import { loadConfig } from "unconfig";
|
|
@@ -135,21 +135,21 @@ function invalidatePagesModule(server) {
|
|
|
135
135
|
*/
|
|
136
136
|
const debug = {
|
|
137
137
|
/** HMR related logs */
|
|
138
|
-
hmr:
|
|
138
|
+
hmr: Debug("vite-plugin-uni-pages:hmr"),
|
|
139
139
|
/** Configuration options related logs */
|
|
140
|
-
options:
|
|
140
|
+
options: Debug("vite-plugin-uni-pages:options"),
|
|
141
141
|
/** Main package page scanning logs */
|
|
142
|
-
pages:
|
|
142
|
+
pages: Debug("vite-plugin-uni-pages:pages"),
|
|
143
143
|
/** Sub-package page scanning logs */
|
|
144
|
-
subPages:
|
|
144
|
+
subPages: Debug("vite-plugin-uni-pages:subPages"),
|
|
145
145
|
/** Error logs */
|
|
146
|
-
error:
|
|
146
|
+
error: Debug("vite-plugin-uni-pages:error"),
|
|
147
147
|
/** Cache related logs */
|
|
148
|
-
cache:
|
|
148
|
+
cache: Debug("vite-plugin-uni-pages:cache"),
|
|
149
149
|
/** Declaration file generation logs */
|
|
150
|
-
declaration:
|
|
150
|
+
declaration: Debug("vite-plugin-uni-pages:declaration"),
|
|
151
151
|
/** definePage macro parsing logs */
|
|
152
|
-
definePage:
|
|
152
|
+
definePage: Debug("vite-plugin-uni-pages:definePage")
|
|
153
153
|
};
|
|
154
154
|
/**
|
|
155
155
|
* Convert file extensions array to glob pattern
|
|
@@ -712,7 +712,7 @@ var PageContext = class {
|
|
|
712
712
|
if (debugOption) {
|
|
713
713
|
const prefix = "vite-plugin-uni-pages:";
|
|
714
714
|
const suffix = typeof debugOption === "boolean" ? "*" : debugOption;
|
|
715
|
-
|
|
715
|
+
Debug.enable(`${prefix}${suffix}`);
|
|
716
716
|
}
|
|
717
717
|
this.resolvedPagesJSONPath = path.join(this.root, this.options.outDir, OUTPUT_NAME);
|
|
718
718
|
debug.options(this.options);
|
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.4.
|
|
4
|
+
"version": "0.4.6",
|
|
5
5
|
"description": "File system based routing for uni-app applications using Vite",
|
|
6
6
|
"author": "KeJun",
|
|
7
7
|
"maintainers": [
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@babel/generator": "^7.29.7",
|
|
56
56
|
"@babel/types": "^7.29.7",
|
|
57
57
|
"@types/proper-lockfile": "^4.1.4",
|
|
58
|
-
"@uni-helper/uni-env": "^0.
|
|
58
|
+
"@uni-helper/uni-env": "^0.3.1",
|
|
59
59
|
"@vue/compiler-sfc": "~3.4.38",
|
|
60
60
|
"ast-kit": "^1.4.3",
|
|
61
61
|
"chokidar": "^3.6.0",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"unconfig": "^7.5.0",
|
|
73
73
|
"write-file-atomic": "^7.0.1",
|
|
74
74
|
"yaml": "^2.9.0",
|
|
75
|
-
"@uni-helper/uni-pages-types": "0.4.
|
|
75
|
+
"@uni-helper/uni-pages-types": "0.4.6"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
78
|
"@antfu/utils": "^9.3.0",
|