diff --git a/package.json b/package.json index f6c8ba42b..fb7d95b79 100644 --- a/package.json +++ b/package.json @@ -36,11 +36,10 @@ }, "homepage": "https://github.com/tiddly-gittly/TiddlyWiki-CPL#readme", "devDependencies": { - "@modern-js/eslint-config": "^2.58.0", - "@modern-js/tsconfig": "^2.58.0", + "@modern-js/eslint-config": "^2.58.1", + "@modern-js/tsconfig": "^2.58.1", "@types/fs-extra": "^11.0.4", - "@types/inquirer": "^9.0.7", - "@types/node": "^22.3.0", + "@types/node": "^22.4.1", "cross-env": "^7.0.3", "fs-extra": "^11.2.0", "html-minifier-terser": "^7.2.0", @@ -51,8 +50,8 @@ "workbox-cli": "7.1.0" }, "dependencies": { + "@inquirer/prompts": "^5.3.8", "chalk": "^5.3.0", - "commander": "^12.1.0", - "inquirer": "^10.1.8" + "commander": "^12.1.0" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7eaf4f386..3157c3228 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,6 +8,12 @@ importers: .: dependencies: + '@inquirer/input': + specifier: ^2.2.9 + version: 2.2.9 + '@inquirer/prompts': + specifier: ^5.3.8 + version: 5.3.8 chalk: specifier: ^5.3.0 version: 5.3.0 @@ -19,11 +25,11 @@ importers: version: 10.1.8 devDependencies: '@modern-js/eslint-config': - specifier: ^2.58.0 - version: 2.58.0(typescript@5.4.3) + specifier: ^2.58.1 + version: 2.58.1(typescript@5.4.3) '@modern-js/tsconfig': - specifier: ^2.58.0 - version: 2.58.0 + specifier: ^2.58.1 + version: 2.58.1 '@types/fs-extra': specifier: ^11.0.4 version: 11.0.4 @@ -31,8 +37,8 @@ importers: specifier: ^9.0.7 version: 9.0.7 '@types/node': - specifier: ^22.3.0 - version: 22.3.0 + specifier: ^22.4.1 + version: 22.4.1 cross-env: specifier: ^7.0.3 version: 7.0.3 @@ -50,7 +56,7 @@ importers: version: 5.3.5 ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.3.0)(typescript@5.4.3) + version: 10.9.2(@types/node@22.4.1)(typescript@5.4.3) tw5-typed: specifier: 0.5.12 version: 0.5.12 @@ -1311,19 +1317,19 @@ packages: '@jridgewell/trace-mapping@0.3.9': resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} - '@modern-js-app/eslint-config@2.58.0': - resolution: {integrity: sha512-DQNV2F4qofTJ2jbyDlGMJMMam3Ypi83QGt/SoWhyJr9TLUVmbrY1w0zUPPuo8kjSEv53f5npxpVHD6UHmBQCsQ==} + '@modern-js-app/eslint-config@2.58.1': + resolution: {integrity: sha512-3RdoDxcpue6Ji6cg4+BhUkcH/BO+5iX2i9qy3wrP1fO2x0E3linERJU1KiFo50CZkmIqYFxzW/GLxq6ATZwluA==} peerDependencies: typescript: ^4 || ^5 - '@modern-js/babel-preset@2.58.0': - resolution: {integrity: sha512-I9ndmfMmS2EejBvuLNz0Ty5IHm6AB4HYmEUknTsiZ+jDi6DvCdE1JST4ntKI24NuSHnF2Hn5NJzkE/hJAZrueg==} + '@modern-js/babel-preset@2.58.1': + resolution: {integrity: sha512-9TmWcFEWgHFGxPgH5xsT7ua6QyqEQ54cqZaqfXTLiXl83nU0ZE79g6LaYVMZAWKJufhiGPUAgyDI+N41N4h5Hg==} - '@modern-js/eslint-config@2.58.0': - resolution: {integrity: sha512-dEzlE8qD4isSkB8Md/1JzbndjuywgWVPh39r7KVeU6D6zALgxEqInetb7G7Jrd5rm5WDecpHSqfaUL0imrCzig==} + '@modern-js/eslint-config@2.58.1': + resolution: {integrity: sha512-LwQBZefQkkLZRCZDw9NKyQPRF7Cf/FfnsJS+j8hn3R+Eik0+2zqS3DazVM+/vc00fKjao4jypmIrOxiPffGCxg==} - '@modern-js/tsconfig@2.58.0': - resolution: {integrity: sha512-4IdLJdgg1s/v4b9xyag2xbPlDHBiBuSr5qi4U6Teh6E1/sFqDh7WQiqeYr1N6miLxITf9OIz+NmOmmDr5QxEUg==} + '@modern-js/tsconfig@2.58.1': + resolution: {integrity: sha512-zXOKaUVFUXJuTrB/ZEDj36bqWMUHMXrnj5cs7fZMtJ+tSNMoOPP4BgqzpSh2o/1O+3qV8GN2z38LbCqlaz8xkg==} '@module-federation/runtime-tools@0.2.3': resolution: {integrity: sha512-capN8CVTCEqNAjnl102girrkevczoQfnQYyiYC4WuyKsg7+LUqfirIe1Eiyv6VSE2UgvOTZDnqvervA6rBOlmg==} @@ -1405,70 +1411,66 @@ packages: rollup: optional: true - '@rsbuild/core@1.0.1-beta.9': - resolution: {integrity: sha512-F9npL47TFmNVhPBqoE6jBvKGxXEKNszBA7skhbi3opskmX7Ako9vfXvtgi2W2jQjq837/WUL8gG/ua9zRqKFEQ==} + '@rsbuild/core@1.0.1-beta.13': + resolution: {integrity: sha512-R5c5GBzeIEpRkvcZxdMRNV8je2VDPm5yN6pPmZyqoOonLZtCd3MzdCcA6A+OYe3pw05VOMxA5NMMew3evop1FQ==} engines: {node: '>=16.7.0'} hasBin: true - '@rsbuild/plugin-babel@1.0.1-beta.9': - resolution: {integrity: sha512-Saykb3johuC/8l/izeuuO4HIY25SRVoc4sycHIyLovVDS8Zda87Vcodu8Yv55VWtP6lu5KyCTde/v+h8+Ooklw==} + '@rsbuild/plugin-babel@1.0.1-beta.13': + resolution: {integrity: sha512-e9t/rNyEWpVLwLCdkyCWYbZz6ed8iumykOjNbCvZO7qA4X2MprzBZAWk/B9a16LsH0Z/KcF8YJIrom6BDPylig==} peerDependencies: - '@rsbuild/core': ^1.0.1-beta.9 + '@rsbuild/core': ^1.0.1-beta.13 - '@rspack/binding-darwin-arm64@1.0.0-beta.1': - resolution: {integrity: sha512-KyC+xEMy9Y5JivO2e5rlKFGT74uwDhbwJjSCR5KOLQtZjDWeLwhf7aZhkoSQJUEsK5tAuuUoTP02RJFzK5llpA==} + '@rspack/binding-darwin-arm64@1.0.0-beta.4': + resolution: {integrity: sha512-A5FLhVmvuz8E/r0C29UODXk44wNTZX/vcMerSSQ/V53rGndPOR5mU6jOTy1ziGZ5liDCKWfobmd7Xe7Qj+oR4g==} cpu: [arm64] os: [darwin] - '@rspack/binding-darwin-x64@1.0.0-beta.1': - resolution: {integrity: sha512-Onc35+qQ7YwE6+aB66l/ZnRFXfhA1hXH5aNnNJmIFEAmqzkvOGREkWy3CdfsklF/l/xt33iUM7ccnNgdpk7yKw==} + '@rspack/binding-darwin-x64@1.0.0-beta.4': + resolution: {integrity: sha512-OARwlMyijkLTEfJq3ap23kU/KWpYq+HNhWC34vGbjS+uTmJyBBHG1J9tbg5Qg5VdXMUBGPuPUSEzv8+cHGdZjQ==} cpu: [x64] os: [darwin] - '@rspack/binding-linux-arm64-gnu@1.0.0-beta.1': - resolution: {integrity: sha512-NlXtRlKcoBzB6EQEiXegW0nMToEPXD+hExaev0j1+uzsFrMJ0uIY49k6+DapwWZ8A2jUdvH7xdWT+eAXD3l/EA==} + '@rspack/binding-linux-arm64-gnu@1.0.0-beta.4': + resolution: {integrity: sha512-r++bMpRbyT6CqjW9bO4PW7oOo4Nf37Q0s/TJMXxmWX0jQZ5EzGUteB2b5sw631RBL1Y2JBNN9r1nKJOPnTplfQ==} cpu: [arm64] os: [linux] - libc: [glibc] - '@rspack/binding-linux-arm64-musl@1.0.0-beta.1': - resolution: {integrity: sha512-fPS8ukoPgmBSUX4dt74flObcbYzO3uaP1bk4k/98Gr3Bw0ACDZ6h5nqlxoXoeVzhNcNMBcfv45un8H3i411AyA==} + '@rspack/binding-linux-arm64-musl@1.0.0-beta.4': + resolution: {integrity: sha512-kVT9qujXoz415woKmGuM+aV0349aeMjEi5P/X1j6FMLmcZX+qmSLunPgn4wmRFxPCvg6kS1IK/HjuCPQ02nrxA==} cpu: [arm64] os: [linux] - libc: [musl] - '@rspack/binding-linux-x64-gnu@1.0.0-beta.1': - resolution: {integrity: sha512-9U78G7BtevPZ9GEJ2AhGHt03n+GEhKVvEZ/tgu+flFV0tYGjq75QQX345x4m+uercTqzRBTyuWITweIzppeWuQ==} + '@rspack/binding-linux-x64-gnu@1.0.0-beta.4': + resolution: {integrity: sha512-xRnmFsY9yIqPVhA+71kJ1ACunyqO2rrWn15Dn1T7/79i14CsT++yCr1OiaxU3VUOUirzOF0QNg3EcChfxsn6NA==} cpu: [x64] os: [linux] - libc: [glibc] - '@rspack/binding-linux-x64-musl@1.0.0-beta.1': - resolution: {integrity: sha512-qqNPseWAOKmV33YL7tihY0N9xwY+N1G9na6lT7iqZnsrzPkIZmESI9Z24fXVJqLC/UhfxAth4RKhVBeKTsPk1w==} + '@rspack/binding-linux-x64-musl@1.0.0-beta.4': + resolution: {integrity: sha512-Ho86q7ItvVFFQBP7dHY/MUZIXY6ymi/4dJ7cs5eFdWEi79bMXwPA3eU59N/oXRXjvGjbwQ1KYR9pcD+1PAnd4Q==} cpu: [x64] os: [linux] - libc: [musl] - '@rspack/binding-win32-arm64-msvc@1.0.0-beta.1': - resolution: {integrity: sha512-VeBGYItHWqImYt23rBChXrk1o7fQxwTv6BEhtMpTnMJV10O6+Db9NckPEplcKLmNKAAA5anxH40GcpPc4nff8A==} + '@rspack/binding-win32-arm64-msvc@1.0.0-beta.4': + resolution: {integrity: sha512-f5NgYRJsmrXgT3wkSDeMH3avX/Zy78lYjy4nNnPJ/GOu4xkzcX8Y4a4j6filODDgMCxo05dQTY8/DP0wHTJmzg==} cpu: [arm64] os: [win32] - '@rspack/binding-win32-ia32-msvc@1.0.0-beta.1': - resolution: {integrity: sha512-ZxLQ1zOpyCKefsKvDYGGIHM019avNPfesJKdw7wYqeC+EIvWZfs86lnhlSL5PlZzV5AfFZQyQJFRjAv4JPpe4Q==} + '@rspack/binding-win32-ia32-msvc@1.0.0-beta.4': + resolution: {integrity: sha512-NIT4b/YMS/ysBpgriewiRRO7k0aPsoZ8961f2JQnS1nmzPYKau/Fnh/g+BUwtofGuHjqqDxOCN9UxJhdTPIXUg==} cpu: [ia32] os: [win32] - '@rspack/binding-win32-x64-msvc@1.0.0-beta.1': - resolution: {integrity: sha512-tMrjEA/2SGMVLbh/zOQoZrr1Xx+oI6RZnkXH6l95ON4yZiD+8wM84w8Ernj1N8KwclTuvBzxM0r3DLHTNZcDhw==} + '@rspack/binding-win32-x64-msvc@1.0.0-beta.4': + resolution: {integrity: sha512-ajJ5WzDqg4vy02sNJl71JpOKkc/f/cR3s37RJHR4njKMRCzc5roTEqXG9RiNMiBCXW0B0lmceCU+5kpaIZQ3vA==} cpu: [x64] os: [win32] - '@rspack/binding@1.0.0-beta.1': - resolution: {integrity: sha512-p7XBvk1+fAmvrlmdeRr5J9wdXx5idVZjHFJu/3qPHWf5mHKRw2/tQVbqzExj+B1nwR6HXFgxCiiddaWauMS/YQ==} + '@rspack/binding@1.0.0-beta.4': + resolution: {integrity: sha512-LTv5hsyv1RVo15QnZq/eQYPHnsyQbjvEoWYtWHNUEAe4uMwpu2yvQlRVHjFjJvyPv03xqzi9vaaRknOVK4RAVA==} - '@rspack/core@1.0.0-beta.1': - resolution: {integrity: sha512-aUWR/FUUw7x0L/qEZ0qrXC+7YYOL0Ezwd95TqDIDIYkSODJ6ZPt3a8poPwWc7IBdONgb8sGDPTzAXXEjcsBMwQ==} + '@rspack/core@1.0.0-beta.4': + resolution: {integrity: sha512-FhHRhUX4+ob9vj/N2vl9mHHSFlygnTUKF1ztzcDjQesFWnmBKKjccSGExFWYd47nT7XUn7j3xziHZ4NKAs02LA==} engines: {node: '>=16.0.0'} peerDependencies: '@swc/helpers': '>=0.5.1' @@ -1476,8 +1478,12 @@ packages: '@swc/helpers': optional: true - '@rspack/lite-tapable@1.0.0-beta.1': - resolution: {integrity: sha512-r4xtbJp6QhW6A1twkgTP0UQkPC9cOT3sFjjjlx22j/q669HJRz+CVTlVcNxPomK7Q3Kg6dVsyv16MjGRl/fl5g==} + '@rspack/lite-tapable@1.0.0': + resolution: {integrity: sha512-7MZf4lburSUZoEenwazwUDKHhqyfnLCGnQ/tKcUtztfmVzfjZfRn/EaiT0AKkYGnL2U8AGsw89oUeVyvaOLVCw==} + engines: {node: '>=16.0.0'} + + '@rspack/lite-tapable@1.0.0-beta.5': + resolution: {integrity: sha512-jTmLhUeZgR3u+cHp5Z46FuTWUg+6VWWwbWkIzgVvQoN7YK9ntFfm7k5+cImTEQ0qe1r6P43uV0qD606SoZspKg==} engines: {node: '>=16.0.0'} '@sindresorhus/is@0.14.0': @@ -1560,8 +1566,8 @@ packages: '@types/node@20.11.30': resolution: {integrity: sha512-dHM6ZxwlmuZaRmUPfv1p+KrdD1Dci04FbdEm/9wEMouFqxYoFl5aMkt0VMAUtYRQDyYvD41WJLukhq/ha3YuTw==} - '@types/node@22.3.0': - resolution: {integrity: sha512-nrWpWVaDZuaVc5X84xJ0vNrLvomM205oQyLsRt7OHNZbSHslcWsvgFR7O7hire2ZonjLrWBbedmotmIlJDVd6g==} + '@types/node@22.4.1': + resolution: {integrity: sha512-1tbpb9325+gPnKK0dMm+/LMriX0vKxf6RnB0SZUqfyVkQ4fMgUSySqhxE/y8Jvs4NyF1yHzTfG9KlnkIODxPKg==} '@types/normalize-package-data@2.4.1': resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} @@ -1963,6 +1969,9 @@ packages: core-js@3.37.1: resolution: {integrity: sha512-Xn6qmxrQZyB0FFY8E3bgRXei3lWDJHhvI+u0q9TKIYM49G8pAr0FgnnrFRAmsbptZL1yxRADVXn+x5AGsbBfyw==} + core-js@3.38.0: + resolution: {integrity: sha512-XPpwqEodRljce9KswjZShh95qJ1URisBeKCjUdq27YdenkslVe7OO0ZJhlYXAChW7OhXaRLl8AAba7IBfoIHug==} + create-require@1.1.1: resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} @@ -3625,8 +3634,8 @@ packages: undici-types@5.26.5: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} - undici-types@6.18.2: - resolution: {integrity: sha512-5ruQbENj95yDYJNS3TvcaxPMshV7aizdv/hWYjGIKoANWKjhWNBsr2YEuYZKodQulB1b8l7ILOuDQep3afowQQ==} + undici-types@6.19.6: + resolution: {integrity: sha512-e/vggGopEfTKSvj4ihnOLTsqhrKRN3LeO6qSN/GxohhuRv8qH9bNQ4B8W7e/vFL+0XTnmHPB4/kegunZGA4Org==} unicode-canonical-property-names-ecmascript@2.0.0: resolution: {integrity: sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==} @@ -5309,7 +5318,7 @@ snapshots: '@inquirer/figures': 1.0.5 '@inquirer/type': 1.5.2 '@types/mute-stream': 0.0.4 - '@types/node': 22.3.0 + '@types/node': 22.4.1 '@types/wrap-ansi': 3.0.0 ansi-escapes: 4.3.2 cli-spinners: 2.9.2 @@ -5429,13 +5438,13 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.4.15 - '@modern-js-app/eslint-config@2.58.0(typescript@5.4.3)': + '@modern-js-app/eslint-config@2.58.1(typescript@5.4.3)': dependencies: '@babel/core': 7.25.2 '@babel/eslint-parser': 7.24.1(@babel/core@7.25.2)(eslint@8.57.0) '@babel/eslint-plugin': 7.23.5(@babel/eslint-parser@7.24.1(@babel/core@7.25.2)(eslint@8.57.0))(eslint@8.57.0) - '@modern-js/babel-preset': 2.58.0(@rsbuild/core@1.0.1-beta.9) - '@rsbuild/core': 1.0.1-beta.9 + '@modern-js/babel-preset': 2.58.1(@rsbuild/core@1.0.1-beta.13) + '@rsbuild/core': 1.0.1-beta.13 '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.4.3))(eslint@8.57.0)(typescript@5.4.3) '@typescript-eslint/parser': 5.62.0(eslint@8.57.0)(typescript@5.4.3) eslint: 8.57.0 @@ -5455,7 +5464,7 @@ snapshots: - eslint-import-resolver-webpack - supports-color - '@modern-js/babel-preset@2.58.0(@rsbuild/core@1.0.1-beta.9)': + '@modern-js/babel-preset@2.58.1(@rsbuild/core@1.0.1-beta.13)': dependencies: '@babel/core': 7.25.2 '@babel/plugin-proposal-decorators': 7.24.7(@babel/core@7.25.2) @@ -5467,7 +5476,7 @@ snapshots: '@babel/preset-typescript': 7.24.7(@babel/core@7.25.2) '@babel/runtime': 7.25.0 '@babel/types': 7.25.2 - '@rsbuild/plugin-babel': 1.0.1-beta.9(@rsbuild/core@1.0.1-beta.9) + '@rsbuild/plugin-babel': 1.0.1-beta.13(@rsbuild/core@1.0.1-beta.13) '@swc/helpers': 0.5.3 '@types/babel__core': 7.20.5 babel-plugin-dynamic-import-node: 2.3.3 @@ -5476,16 +5485,16 @@ snapshots: - '@rsbuild/core' - supports-color - '@modern-js/eslint-config@2.58.0(typescript@5.4.3)': + '@modern-js/eslint-config@2.58.1(typescript@5.4.3)': dependencies: - '@modern-js-app/eslint-config': 2.58.0(typescript@5.4.3) + '@modern-js-app/eslint-config': 2.58.1(typescript@5.4.3) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - typescript - '@modern-js/tsconfig@2.58.0': {} + '@modern-js/tsconfig@2.58.1': {} '@module-federation/runtime-tools@0.2.3': dependencies: @@ -5571,23 +5580,23 @@ snapshots: optionalDependencies: rollup: 2.64.0 - '@rsbuild/core@1.0.1-beta.9': + '@rsbuild/core@1.0.1-beta.13': dependencies: - '@rspack/core': 1.0.0-beta.1(@swc/helpers@0.5.11) - '@rspack/lite-tapable': 1.0.0-beta.1 + '@rspack/core': 1.0.0-beta.4(@swc/helpers@0.5.11) + '@rspack/lite-tapable': 1.0.0 '@swc/helpers': 0.5.11 caniuse-lite: 1.0.30001651 - core-js: 3.37.1 + core-js: 3.38.0 optionalDependencies: fsevents: 2.3.3 - '@rsbuild/plugin-babel@1.0.1-beta.9(@rsbuild/core@1.0.1-beta.9)': + '@rsbuild/plugin-babel@1.0.1-beta.13(@rsbuild/core@1.0.1-beta.13)': dependencies: '@babel/core': 7.25.2 '@babel/plugin-proposal-decorators': 7.24.7(@babel/core@7.25.2) '@babel/plugin-transform-class-properties': 7.24.7(@babel/core@7.25.2) '@babel/preset-typescript': 7.24.7(@babel/core@7.25.2) - '@rsbuild/core': 1.0.1-beta.9 + '@rsbuild/core': 1.0.1-beta.13 '@types/babel__core': 7.20.5 deepmerge: 4.3.1 reduce-configs: 1.0.0 @@ -5595,55 +5604,57 @@ snapshots: transitivePeerDependencies: - supports-color - '@rspack/binding-darwin-arm64@1.0.0-beta.1': + '@rspack/binding-darwin-arm64@1.0.0-beta.4': optional: true - '@rspack/binding-darwin-x64@1.0.0-beta.1': + '@rspack/binding-darwin-x64@1.0.0-beta.4': optional: true - '@rspack/binding-linux-arm64-gnu@1.0.0-beta.1': + '@rspack/binding-linux-arm64-gnu@1.0.0-beta.4': optional: true - '@rspack/binding-linux-arm64-musl@1.0.0-beta.1': + '@rspack/binding-linux-arm64-musl@1.0.0-beta.4': optional: true - '@rspack/binding-linux-x64-gnu@1.0.0-beta.1': + '@rspack/binding-linux-x64-gnu@1.0.0-beta.4': optional: true - '@rspack/binding-linux-x64-musl@1.0.0-beta.1': + '@rspack/binding-linux-x64-musl@1.0.0-beta.4': optional: true - '@rspack/binding-win32-arm64-msvc@1.0.0-beta.1': + '@rspack/binding-win32-arm64-msvc@1.0.0-beta.4': optional: true - '@rspack/binding-win32-ia32-msvc@1.0.0-beta.1': + '@rspack/binding-win32-ia32-msvc@1.0.0-beta.4': optional: true - '@rspack/binding-win32-x64-msvc@1.0.0-beta.1': + '@rspack/binding-win32-x64-msvc@1.0.0-beta.4': optional: true - '@rspack/binding@1.0.0-beta.1': + '@rspack/binding@1.0.0-beta.4': optionalDependencies: - '@rspack/binding-darwin-arm64': 1.0.0-beta.1 - '@rspack/binding-darwin-x64': 1.0.0-beta.1 - '@rspack/binding-linux-arm64-gnu': 1.0.0-beta.1 - '@rspack/binding-linux-arm64-musl': 1.0.0-beta.1 - '@rspack/binding-linux-x64-gnu': 1.0.0-beta.1 - '@rspack/binding-linux-x64-musl': 1.0.0-beta.1 - '@rspack/binding-win32-arm64-msvc': 1.0.0-beta.1 - '@rspack/binding-win32-ia32-msvc': 1.0.0-beta.1 - '@rspack/binding-win32-x64-msvc': 1.0.0-beta.1 - - '@rspack/core@1.0.0-beta.1(@swc/helpers@0.5.11)': + '@rspack/binding-darwin-arm64': 1.0.0-beta.4 + '@rspack/binding-darwin-x64': 1.0.0-beta.4 + '@rspack/binding-linux-arm64-gnu': 1.0.0-beta.4 + '@rspack/binding-linux-arm64-musl': 1.0.0-beta.4 + '@rspack/binding-linux-x64-gnu': 1.0.0-beta.4 + '@rspack/binding-linux-x64-musl': 1.0.0-beta.4 + '@rspack/binding-win32-arm64-msvc': 1.0.0-beta.4 + '@rspack/binding-win32-ia32-msvc': 1.0.0-beta.4 + '@rspack/binding-win32-x64-msvc': 1.0.0-beta.4 + + '@rspack/core@1.0.0-beta.4(@swc/helpers@0.5.11)': dependencies: '@module-federation/runtime-tools': 0.2.3 - '@rspack/binding': 1.0.0-beta.1 - '@rspack/lite-tapable': 1.0.0-beta.1 + '@rspack/binding': 1.0.0-beta.4 + '@rspack/lite-tapable': 1.0.0-beta.5 caniuse-lite: 1.0.30001651 optionalDependencies: '@swc/helpers': 0.5.11 - '@rspack/lite-tapable@1.0.0-beta.1': {} + '@rspack/lite-tapable@1.0.0': {} + + '@rspack/lite-tapable@1.0.0-beta.5': {} '@sindresorhus/is@0.14.0': {} @@ -5676,7 +5687,7 @@ snapshots: '@types/babel__core@7.20.5': dependencies: - '@babel/parser': 7.24.1 + '@babel/parser': 7.25.3 '@babel/types': 7.25.2 '@types/babel__generator': 7.6.8 '@types/babel__template': 7.4.4 @@ -5688,7 +5699,7 @@ snapshots: '@types/babel__template@7.4.4': dependencies: - '@babel/parser': 7.24.1 + '@babel/parser': 7.25.3 '@babel/types': 7.25.2 '@types/babel__traverse@7.20.5': @@ -5710,7 +5721,7 @@ snapshots: '@types/fs-extra@11.0.4': dependencies: '@types/jsonfile': 6.1.4 - '@types/node': 22.3.0 + '@types/node': 22.4.1 '@types/inquirer@9.0.7': dependencies: @@ -5723,25 +5734,25 @@ snapshots: '@types/jsonfile@6.1.4': dependencies: - '@types/node': 22.3.0 + '@types/node': 22.4.1 '@types/keyv@3.1.4': dependencies: - '@types/node': 22.3.0 + '@types/node': 22.4.1 '@types/minimist@1.2.2': {} '@types/mute-stream@0.0.4': dependencies: - '@types/node': 22.3.0 + '@types/node': 22.4.1 '@types/node@20.11.30': dependencies: undici-types: 5.26.5 - '@types/node@22.3.0': + '@types/node@22.4.1': dependencies: - undici-types: 6.18.2 + undici-types: 6.19.6 '@types/normalize-package-data@2.4.1': {} @@ -5749,7 +5760,7 @@ snapshots: '@types/responselike@1.0.0': dependencies: - '@types/node': 22.3.0 + '@types/node': 22.4.1 '@types/semver@7.5.8': {} @@ -5759,7 +5770,7 @@ snapshots: '@types/through@0.0.33': dependencies: - '@types/node': 22.3.0 + '@types/node': 22.4.1 '@types/trusted-types@2.0.2': {} @@ -6215,6 +6226,8 @@ snapshots: core-js@3.37.1: {} + core-js@3.38.0: {} + create-require@1.1.1: {} cross-env@7.0.3: @@ -7888,14 +7901,14 @@ snapshots: trim-newlines@3.0.1: {} - ts-node@10.9.2(@types/node@22.3.0)(typescript@5.4.3): + ts-node@10.9.2(@types/node@22.4.1)(typescript@5.4.3): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.9 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 22.3.0 + '@types/node': 22.4.1 acorn: 8.11.3 acorn-walk: 8.2.0 arg: 4.1.3 @@ -7991,7 +8004,7 @@ snapshots: undici-types@5.26.5: {} - undici-types@6.18.2: {} + undici-types@6.19.6: {} unicode-canonical-property-names-ecmascript@2.0.0: {} diff --git a/scripts/import/plugin.ts b/scripts/import/plugin.ts index 5cd0df067..0cb55377e 100644 --- a/scripts/import/plugin.ts +++ b/scripts/import/plugin.ts @@ -2,7 +2,7 @@ import { URL } from 'url'; import { resolve, extname } from 'path'; import { ensureFileSync, readdirSync } from 'fs-extra'; import chalk from 'chalk'; -import inquirer from 'inquirer'; +import { confirm } from '@inquirer/prompts'; import type { ITiddlerFields } from 'tiddlywiki'; import { @@ -125,22 +125,16 @@ export const importPlugin = async ( `[tag[$:/tags/PluginWiki]cpl.title[${pluginInfo['cpl.title']}]]`, )[0] as string | undefined; if (tmp && !options?.yes) { - const { overwrite } = await inquirer.prompt([ - { - type: 'confirm', - name: 'overwrite', - message: chalk.blue( - `插件 ${chalk.bold(pluginInfo['cpl.title'])} 已存在 ${chalk.grey( - `(as ${tmp})`, - )}, 是否将其替换?\nPlugin ${chalk.bold( - pluginInfo['cpl.title'], - )} already exists ${chalk.grey( - `(as ${tmp})`, - )}, should I overwrite it?`, - ), - default: true, - }, - ]); + const overwrite = await confirm({ + message: chalk.blue( + `插件 ${chalk.bold(pluginInfo['cpl.title'])} 已存在 ${chalk.grey( + `(as ${tmp})`, + )}, 是否将其替换?\nPlugin ${chalk.bold( + pluginInfo['cpl.title'], + )} already exists ${chalk.grey(`(as ${tmp})`)}, should I overwrite it?`, + ), + default: true, + }); if (!overwrite) { return false; } diff --git a/scripts/index.ts b/scripts/index.ts index f371484a8..c90605bfd 100644 --- a/scripts/index.ts +++ b/scripts/index.ts @@ -2,7 +2,7 @@ import { resolve } from 'path'; import { execSync } from 'child_process'; import { readFileSync, writeFileSync } from 'fs'; import chalk from 'chalk'; -import inquirer from 'inquirer'; +import { input, confirm } from '@inquirer/prompts'; import { program } from 'commander'; import { tiddlywiki } from './utils'; import { importPlugin } from './import/plugin'; @@ -30,24 +30,18 @@ importCommand .description('导入一个插件 - Import a plugin') .action(async () => { // 处理输入 - const { url, title } = await inquirer.prompt([ - { - type: 'input', - name: 'url', - message: chalk.bold( - `请输入插件的URL链接 - Input URL of plugin (.tid, .json, .html, etc.)`, - ), - }, - { - type: 'input', - name: 'title', - message: chalk.bold( - `请输入插件的标题 - Input title of plugin tiddler ${chalk.grey( - `(e.g. $:/plugins/tiddlywiki/codemirror)`, - )}`, - ), - }, - ]); + const url = await input({ + message: chalk.bold( + `请输入插件的URL链接 - Input URL of plugin (.tid, .json, .html, etc.)`, + ), + }); + const title = await input({ + message: chalk.bold( + `请输入插件的标题 - Input title of plugin tiddler ${chalk.grey( + `(e.g. $:/plugins/tiddlywiki/codemirror)`, + )}`, + ), + }); // 导入插件 await importPlugin(url.trim(), title.trim(), { yes: true, @@ -123,19 +117,15 @@ importCommand $tw, ); } else { - const { url } = await inquirer.prompt([ - { - type: 'input', - name: 'url', - message: chalk.bold( - `请输入插件源的链接${chalk.gray( - '(可从插件源条目的url字段找到)', - )}\nInput libaray url${chalk.gray( - '(can find in url field of the plugin library tiddler)', - )}`, - ), - }, - ]); + const url = await input({ + message: chalk.bold( + `请输入插件源的链接${chalk.gray( + '(可从插件源条目的url字段找到)', + )}\nInput libaray url${chalk.gray( + '(can find in url field of the plugin library tiddler)', + )}`, + ), + }); await importLibrary(url, { yes: true, includeOfficial: false }); const registeredLibrariesPath = resolve('libraries.json'); let registeredLibraries: IRegisteredLibrary[] = []; @@ -148,29 +138,21 @@ importCommand process.env.GITHUB_ACTIONS !== 'true' && !registeredLibraries.find(({ uri }) => uri === url) ) { - const { register } = await inquirer.prompt([ - { - type: 'confirm', - name: 'register', - message: chalk.bold( - `是否要将该插件源注册? 下次只需 ${chalk.blue( - 'import --all', - )} 即可更新所有插件源!\nRegister this library? Then just ${chalk.blue( - 'import --all', - )} next time!`, - ), - }, - ]); + const register = await confirm({ + message: chalk.bold( + `是否要将该插件源注册? 下次只需 ${chalk.blue( + 'import --all', + )} 即可更新所有插件源!\nRegister this library? Then just ${chalk.blue( + 'import --all', + )} next time!`, + ), + }); if (!register) { return; } - const { name } = await inquirer.prompt([ - { - type: 'input', - name: 'name', - message: '给插件源起一个名字 - Name the library', - }, - ]); + const name = await input({ + message: '给插件源起一个名字 - Name the library', + }); registeredLibraries.push({ uri: url, name,