diff --git a/.npmrc b/.npmrc index 9bf9395..909a0f4 100644 --- a/.npmrc +++ b/.npmrc @@ -1 +1,3 @@ shamefully-hoist = true + +registry = https://mirrors.tencent.com/npm/ diff --git a/package.json b/package.json index d0f651d..2e25c3f 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "packages/*" ], "dependencies": { - "playwright-core": "^1.47.1" + "playwright-core": "~1.47.2" }, "devDependencies": { "@nice-move/all-in-base": "^0.2.0", diff --git a/packages/cli/package.json b/packages/cli/package.json index 6937358..8b79817 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -44,7 +44,7 @@ "cheetor": "^0.13.0" }, "engines": { - "node": ">=22.0.0 || ^18.20.0 || ^20.4.0" + "node": ">=22.0.0 || ^18.20.0 || ^20.5.0" }, "publishConfig": { "access": "public", diff --git a/packages/notify/package.json b/packages/notify/package.json index 51d4387..9572305 100644 --- a/packages/notify/package.json +++ b/packages/notify/package.json @@ -51,7 +51,7 @@ "@bring-it/cli": "workspace:~" }, "engines": { - "node": ">=22.0.0 || ^18.20.0 || ^20.4.0" + "node": ">=22.0.0 || ^18.20.0 || ^20.5.0" }, "publishConfig": { "access": "public", diff --git a/packages/npm/package.json b/packages/npm/package.json index 7ba4123..ca403e5 100644 --- a/packages/npm/package.json +++ b/packages/npm/package.json @@ -51,7 +51,7 @@ "@bring-it/cli": "workspace:~" }, "engines": { - "node": ">=22.0.0 || ^18.20.0 || ^20.4.0", + "node": ">=22.0.0 || ^18.20.0 || ^20.5.0", "npm": "^10.5.0", "pnpm": "^9.6.0" }, diff --git a/packages/sample/README.md b/packages/sample/README.md index bc1851c..fcf9a5d 100644 --- a/packages/sample/README.md +++ b/packages/sample/README.md @@ -45,7 +45,9 @@ Config example: "group": [ { "cwd": ".", - "pattern": ["**/*"], + "prologue": ["prologue/*"], + "patterns": ["**/*"], + "epilogue": ["epilogue/*"], "extensions": ["js", "ts", "..."], "ignore": ["dist"], "title": "示例软件名称", diff --git a/packages/sample/package.json b/packages/sample/package.json index 149e9e1..d920aaa 100644 --- a/packages/sample/package.json +++ b/packages/sample/package.json @@ -1,6 +1,6 @@ { "name": "@bring-it/sample", - "version": "0.4.18", + "version": "0.4.19", "description": "Generate code sample files", "license": "MIT", "author": { @@ -43,7 +43,7 @@ }, "peerDependencies": { "@bring-it/cli": "workspace:~", - "playwright-core": ">=1.46.0" + "playwright-core": "~1.47.2" }, "peerDependenciesMeta": { "playwright-core": { @@ -51,7 +51,7 @@ } }, "engines": { - "node": ">=22.0.0 || ^18.20.0 || ^20.4.0" + "node": ">=22.0.0 || ^18.20.0 || ^20.5.0" }, "publishConfig": { "access": "public", diff --git a/packages/sample/src/lib/config.mjs b/packages/sample/src/lib/config.mjs index 982bdb9..8d8b82e 100644 --- a/packages/sample/src/lib/config.mjs +++ b/packages/sample/src/lib/config.mjs @@ -28,6 +28,9 @@ export function mergeConfig(group = [{}]) { version = 'v1.0', cwd = '.', pattern = ['**/*'], + patterns = pattern, + prologue = [], + epilogue = [], ignore = ['dist'], extensions = [ ['js', 'cjs', 'mjs', 'jsx'], @@ -43,7 +46,9 @@ export function mergeConfig(group = [{}]) { checkString(title, `group[${index}].title`); checkString(version, `group[${index}].version`); checkString(cwd, `group[${index}].cwd`); - checkArray(pattern, `group[${index}].pattern`); + checkArray(patterns, `group[${index}].patterns`); + checkArray(prologue, `group[${index}].prologue`); + checkArray(epilogue, `group[${index}].epilogue`); checkArray(extensions, `group[${index}].extensions`); checkArray(ignore, `group[${index}].ignore`); @@ -51,8 +56,10 @@ export function mergeConfig(group = [{}]) { title, version, cwd: resolve(process.cwd(), cwd), - pattern, - extensions, + patterns, + epilogue, + prologue, + extensions: extensions.map((extname) => `.${extname}`), ignore, }; }, diff --git a/packages/sample/src/lib/pdf.mjs b/packages/sample/src/lib/pdf.mjs index 79b6264..0185e85 100644 --- a/packages/sample/src/lib/pdf.mjs +++ b/packages/sample/src/lib/pdf.mjs @@ -8,9 +8,10 @@ function html([string]) { const style = html`