@weapp-core/init 6.0.7 → 6.0.9
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.js +10 -5
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import process$1 from "node:process";
|
|
2
2
|
import logger from "@weapp-core/logger";
|
|
3
|
-
import {
|
|
3
|
+
import { fs } from "@weapp-core/shared/node";
|
|
4
|
+
import { defu, get, set } from "@weapp-core/shared";
|
|
4
5
|
import https from "node:https";
|
|
5
6
|
//#region ../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs
|
|
6
7
|
let _lazyMatch = () => {
|
|
@@ -522,6 +523,8 @@ function getDefaultTsDts() {
|
|
|
522
523
|
* @description 文件读取错误
|
|
523
524
|
*/
|
|
524
525
|
var FsReadError = class extends Error {
|
|
526
|
+
filepath;
|
|
527
|
+
cause;
|
|
525
528
|
constructor(filepath, cause) {
|
|
526
529
|
super(`Failed to read ${filepath}`);
|
|
527
530
|
this.filepath = filepath;
|
|
@@ -533,6 +536,8 @@ var FsReadError = class extends Error {
|
|
|
533
536
|
* @description 文件写入错误
|
|
534
537
|
*/
|
|
535
538
|
var FsWriteError = class extends Error {
|
|
539
|
+
filepath;
|
|
540
|
+
cause;
|
|
536
541
|
constructor(filepath, cause) {
|
|
537
542
|
super(`Failed to write ${filepath}`);
|
|
538
543
|
this.filepath = filepath;
|
|
@@ -662,7 +667,7 @@ async function initTsJsonFiles(options) {
|
|
|
662
667
|
}
|
|
663
668
|
//#endregion
|
|
664
669
|
//#region ../../packages/weapp-vite/package.json
|
|
665
|
-
var version = "6.
|
|
670
|
+
var version = "6.16.18";
|
|
666
671
|
//#endregion
|
|
667
672
|
//#region src/npm.ts
|
|
668
673
|
/**
|
|
@@ -921,17 +926,17 @@ function ensureTrailingNewline(value) {
|
|
|
921
926
|
function mergeGitignore(existing) {
|
|
922
927
|
const normalizedExisting = normalizeLineEndings(existing ?? "");
|
|
923
928
|
const merged = [...normalizedExisting.length ? normalizedExisting.split("\n") : []];
|
|
924
|
-
while (merged.length > 0 && merged.
|
|
929
|
+
while (merged.length > 0 && merged[merged.length - 1] === "") merged.pop();
|
|
925
930
|
const seen = new Set(merged);
|
|
926
931
|
let appendedNonBlank = false;
|
|
927
932
|
for (const line of DEFAULT_GITIGNORE.split("\n")) {
|
|
928
933
|
if (line.length === 0) {
|
|
929
|
-
if (merged.length === 0 || merged.
|
|
934
|
+
if (merged.length === 0 || merged[merged.length - 1] === "") continue;
|
|
930
935
|
merged.push("");
|
|
931
936
|
continue;
|
|
932
937
|
}
|
|
933
938
|
if (seen.has(line)) continue;
|
|
934
|
-
if (!appendedNonBlank && merged.length > 0 && merged.
|
|
939
|
+
if (!appendedNonBlank && merged.length > 0 && merged[merged.length - 1] !== "") merged.push("");
|
|
935
940
|
merged.push(line);
|
|
936
941
|
seen.add(line);
|
|
937
942
|
appendedNonBlank = true;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weapp-core/init",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "6.0.
|
|
4
|
+
"version": "6.0.9",
|
|
5
5
|
"description": "@weapp-core/init",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"node": "^20.19.0 || >=22.12.0"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@weapp-core/logger": "
|
|
43
|
-
"@weapp-core/shared": "
|
|
42
|
+
"@weapp-core/logger": "3.1.1",
|
|
43
|
+
"@weapp-core/shared": "3.0.4"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"dev": "tsdown -w --sourcemap",
|