@uni-helper/vite-plugin-uni-pages 0.6.1 → 0.6.3
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/LICENSE +1 -1
- package/dist/index.mjs +9 -3
- package/package.json +2 -2
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2022 KeJun
|
|
3
|
+
Copyright (c) 2022-present KeJun & uni-helper & Collaborators
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/dist/index.mjs
CHANGED
|
@@ -19,13 +19,13 @@ import Debug from "debug";
|
|
|
19
19
|
import { platform } from "@uni-helper/uni-env";
|
|
20
20
|
import { CommentArray, parse, stringify } from "comment-json";
|
|
21
21
|
import groupBy from "lodash.groupby";
|
|
22
|
+
import writeFileAtomic from "write-file-atomic";
|
|
22
23
|
import lockfile from "proper-lockfile";
|
|
23
24
|
import { escapePath, globSync, isDynamicPattern } from "tinyglobby";
|
|
24
25
|
import picomatch from "picomatch";
|
|
25
26
|
import vm from "node:vm";
|
|
26
27
|
import { parse as parse$1 } from "@vue/compiler-sfc";
|
|
27
28
|
import * as ts from "typescript";
|
|
28
|
-
import writeFileAtomic from "write-file-atomic";
|
|
29
29
|
//#region src/config-source.ts
|
|
30
30
|
/** 加载器给 import.meta 提供取值的成员,其余成员保持 undefined */
|
|
31
31
|
const providedMetaMembers = /* @__PURE__ */ new Set([
|
|
@@ -733,9 +733,12 @@ function getDeclaration(input) {
|
|
|
733
733
|
const allPagePaths = [...input.pages.filter((page) => !tabBarPathSet.has(page.path)).map((v) => `"/${v.path}"`), ...subPagePaths];
|
|
734
734
|
const tabBarPagePaths = tabBarRawPaths.map((p) => `"/${p}"`);
|
|
735
735
|
return `/* eslint-disable */
|
|
736
|
+
// biome-ignore-all lint: disable
|
|
736
737
|
/* prettier-ignore */
|
|
737
738
|
/* oxlint-disable */
|
|
738
739
|
/* oxfmt-ignore */
|
|
740
|
+
/* rslint-disable */
|
|
741
|
+
// biome-ignore-all format: disable
|
|
739
742
|
// @ts-nocheck
|
|
740
743
|
// Generated by vite-plugin-uni-pages
|
|
741
744
|
|
|
@@ -772,7 +775,7 @@ declare module "virtual:uni-pages" {
|
|
|
772
775
|
*/
|
|
773
776
|
async function writeFile$1(filePath, content) {
|
|
774
777
|
await mkdir(dirname(filePath), { recursive: true });
|
|
775
|
-
return await
|
|
778
|
+
return await writeFileAtomic(filePath, content);
|
|
776
779
|
}
|
|
777
780
|
/**
|
|
778
781
|
* 将声明文件写入磁盘
|
|
@@ -3262,7 +3265,10 @@ const TAB_BAR_PLACEHOLDER = "@@uni-pages-tab-bar-placeholder@@";
|
|
|
3262
3265
|
*/
|
|
3263
3266
|
async function writePagesJson(jsonPath, data, options) {
|
|
3264
3267
|
return withFileLock(jsonPath, async () => {
|
|
3265
|
-
const existingContent = await fs.promises.readFile(jsonPath, { encoding: "utf-8" }).catch(() =>
|
|
3268
|
+
const existingContent = await fs.promises.readFile(jsonPath, { encoding: "utf-8" }).catch((error) => {
|
|
3269
|
+
if (isMissingFsError(error)) return "";
|
|
3270
|
+
throw error;
|
|
3271
|
+
});
|
|
3266
3272
|
const content = mergePagesJson(existingContent, data, options);
|
|
3267
3273
|
if (existingContent === content) {
|
|
3268
3274
|
debug.pages("PagesJson Not have change");
|
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.6.
|
|
4
|
+
"version": "0.6.3",
|
|
5
5
|
"description": "File system based routing for uni-app applications using Vite",
|
|
6
6
|
"author": "KeJun",
|
|
7
7
|
"license": "MIT",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@babel/generator": "^8.0.6",
|
|
54
54
|
"@babel/types": "^8.0.6",
|
|
55
55
|
"@uni-helper/uni-env": "^0.3.3",
|
|
56
|
-
"@uni-helper/uni-pages-types": "0.6.
|
|
56
|
+
"@uni-helper/uni-pages-types": "0.6.3",
|
|
57
57
|
"@vue/compiler-sfc": "~3.4.38",
|
|
58
58
|
"ast-kit": "^3.0.0",
|
|
59
59
|
"bundle-require": "^5.1.0",
|