@visulima/package 3.2.1 → 3.3.0

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/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## @visulima/package [3.3.0](https://github.com/visulima/visulima/compare/@visulima/package@3.2.2...@visulima/package@3.3.0) (2025-01-02)
2
+
3
+ ### Features
4
+
5
+ * added new ensurePackages function to install missing packages ([20c05c0](https://github.com/visulima/visulima/commit/20c05c02e32b7c601f42e46bb2d49fe5db87e117))
6
+
7
+ ## @visulima/package [3.2.2](https://github.com/visulima/visulima/compare/@visulima/package@3.2.1...@visulima/package@3.2.2) (2024-12-31)
8
+
9
+
10
+ ### Dependencies
11
+
12
+ * **@visulima/fs:** upgraded to 2.3.3
13
+ * **@visulima/path:** upgraded to 1.2.0
14
+
1
15
  ## @visulima/package [3.2.1](https://github.com/visulima/visulima/compare/@visulima/package@3.2.0...@visulima/package@3.2.1) (2024-12-27)
2
16
 
3
17
  ### Bug Fixes
package/LICENSE.md CHANGED
@@ -48,9 +48,69 @@ Repository: sindresorhus/dot-prop
48
48
 
49
49
  # Licenses of bundled types
50
50
  The published @visulima/package artifact additionally contains code with the following licenses:
51
- (MIT OR CC0-1.0)
51
+ MIT, (MIT OR CC0-1.0)
52
52
 
53
53
  # Bundled types:
54
+ ## @inquirer/core
55
+ License: MIT
56
+ By: Simon Boudrias
57
+ Repository: https://github.com/SBoudrias/Inquirer.js.git
58
+
59
+ > Copyright (c) 2023 Simon Boudrias
60
+ >
61
+ > Permission is hereby granted, free of charge, to any person
62
+ > obtaining a copy of this software and associated documentation
63
+ > files (the "Software"), to deal in the Software without
64
+ > restriction, including without limitation the rights to use,
65
+ > copy, modify, merge, publish, distribute, sublicense, and/or sell
66
+ > copies of the Software, and to permit persons to whom the
67
+ > Software is furnished to do so, subject to the following
68
+ > conditions:
69
+ >
70
+ > The above copyright notice and this permission notice shall be
71
+ > included in all copies or substantial portions of the Software.
72
+ >
73
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
74
+ > EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
75
+ > OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
76
+ > NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
77
+ > HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
78
+ > WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
79
+ > FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
80
+ > OTHER DEALINGS IN THE SOFTWARE.
81
+
82
+ ---------------------------------------
83
+
84
+ ## @inquirer/type
85
+ License: MIT
86
+ By: Simon Boudrias
87
+ Repository: https://github.com/SBoudrias/Inquirer.js.git
88
+
89
+ > Copyright (c) 2023 Simon Boudrias
90
+ >
91
+ > Permission is hereby granted, free of charge, to any person
92
+ > obtaining a copy of this software and associated documentation
93
+ > files (the "Software"), to deal in the Software without
94
+ > restriction, including without limitation the rights to use,
95
+ > copy, modify, merge, publish, distribute, sublicense, and/or sell
96
+ > copies of the Software, and to permit persons to whom the
97
+ > Software is furnished to do so, subject to the following
98
+ > conditions:
99
+ >
100
+ > The above copyright notice and this permission notice shall be
101
+ > included in all copies or substantial portions of the Software.
102
+ >
103
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
104
+ > EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
105
+ > OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
106
+ > NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
107
+ > HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
108
+ > WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
109
+ > FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
110
+ > OTHER DEALINGS IN THE SOFTWARE.
111
+
112
+ ---------------------------------------
113
+
54
114
  ## type-fest
55
115
  License: (MIT OR CC0-1.0)
56
116
  By: Sindre Sorhus
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./packem_shared/PackageNotFoundError-CY57YCot.cjs"),n=require("./monorepo.cjs"),o=require("./package.cjs"),a=require("./package-json.cjs"),e=require("./package-manager.cjs");exports.PackageNotFoundError=g;exports.findMonorepoRoot=n.findMonorepoRoot;exports.findMonorepoRootSync=n.findMonorepoRootSync;exports.findPackageRoot=o.findPackageRoot;exports.findPackageRootSync=o.findPackageRootSync;exports.findPackageJson=a.findPackageJson;exports.findPackageJsonSync=a.findPackageJsonSync;exports.getPackageJsonProperty=a.getPackageJsonProperty;exports.hasPackageJsonAnyDependency=a.hasPackageJsonAnyDependency;exports.hasPackageJsonProperty=a.hasPackageJsonProperty;exports.parsePackageJson=a.parsePackageJson;exports.writePackageJson=a.writePackageJson;exports.writePackageJsonSync=a.writePackageJsonSync;exports.findLockFile=e.findLockFile;exports.findLockFileSync=e.findLockFileSync;exports.findPackageManager=e.findPackageManager;exports.findPackageManagerSync=e.findPackageManagerSync;exports.generateMissingPackagesInstallMessage=e.generateMissingPackagesInstallMessage;exports.getPackageManagerVersion=e.getPackageManagerVersion;exports.identifyInitiatingPackageManager=e.identifyInitiatingPackageManager;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./packem_shared/PackageNotFoundError-CY57YCot.cjs"),n=require("./monorepo.cjs"),o=require("./package.cjs"),e=require("./package-json.cjs"),a=require("./package-manager.cjs");exports.PackageNotFoundError=g;exports.findMonorepoRoot=n.findMonorepoRoot;exports.findMonorepoRootSync=n.findMonorepoRootSync;exports.findPackageRoot=o.findPackageRoot;exports.findPackageRootSync=o.findPackageRootSync;exports.ensurePackages=e.ensurePackages;exports.findPackageJson=e.findPackageJson;exports.findPackageJsonSync=e.findPackageJsonSync;exports.getPackageJsonProperty=e.getPackageJsonProperty;exports.hasPackageJsonAnyDependency=e.hasPackageJsonAnyDependency;exports.hasPackageJsonProperty=e.hasPackageJsonProperty;exports.parsePackageJson=e.parsePackageJson;exports.writePackageJson=e.writePackageJson;exports.writePackageJsonSync=e.writePackageJsonSync;exports.findLockFile=a.findLockFile;exports.findLockFileSync=a.findLockFileSync;exports.findPackageManager=a.findPackageManager;exports.findPackageManagerSync=a.findPackageManagerSync;exports.generateMissingPackagesInstallMessage=a.generateMissingPackagesInstallMessage;exports.getPackageManagerVersion=a.getPackageManagerVersion;exports.identifyInitiatingPackageManager=a.identifyInitiatingPackageManager;
package/dist/index.d.cts CHANGED
@@ -1,7 +1,8 @@
1
1
  export { PackageNotFoundError } from './error.cjs';
2
2
  export { RootMonorepo, Strategy, findMonorepoRoot, findMonorepoRootSync } from './monorepo.cjs';
3
3
  export { findPackageRoot, findPackageRootSync } from './package.cjs';
4
- export { d as NormalizedPackageJson, N as NormalizedReadResult, P as PackageJson, f as findPackageJson, a as findPackageJsonSync, g as getPackageJsonProperty, h as hasPackageJsonAnyDependency, b as hasPackageJsonProperty, p as parsePackageJson, w as writePackageJson, c as writePackageJsonSync } from './packem_shared/package-json-CpSz2EtJ.cjs';
4
+ export { d as NormalizedPackageJson, N as NormalizedReadResult, P as PackageJson, e as ensurePackages, f as findPackageJson, a as findPackageJsonSync, g as getPackageJsonProperty, h as hasPackageJsonAnyDependency, b as hasPackageJsonProperty, p as parsePackageJson, w as writePackageJson, c as writePackageJsonSync } from './packem_shared/package-json-DvR0jmEM.cjs';
5
5
  export { PackageManager, PackageManagerResult, findLockFile, findLockFileSync, findPackageManager, findPackageManagerSync, generateMissingPackagesInstallMessage, getPackageManagerVersion, identifyInitiatingPackageManager } from './package-manager.cjs';
6
+ import '@antfu/install-pkg';
6
7
  import '@visulima/fs';
7
8
  import 'normalize-package-data';
package/dist/index.d.mts CHANGED
@@ -1,7 +1,8 @@
1
1
  export { PackageNotFoundError } from './error.mjs';
2
2
  export { RootMonorepo, Strategy, findMonorepoRoot, findMonorepoRootSync } from './monorepo.mjs';
3
3
  export { findPackageRoot, findPackageRootSync } from './package.mjs';
4
- export { d as NormalizedPackageJson, N as NormalizedReadResult, P as PackageJson, f as findPackageJson, a as findPackageJsonSync, g as getPackageJsonProperty, h as hasPackageJsonAnyDependency, b as hasPackageJsonProperty, p as parsePackageJson, w as writePackageJson, c as writePackageJsonSync } from './packem_shared/package-json-CpSz2EtJ.mjs';
4
+ export { d as NormalizedPackageJson, N as NormalizedReadResult, P as PackageJson, e as ensurePackages, f as findPackageJson, a as findPackageJsonSync, g as getPackageJsonProperty, h as hasPackageJsonAnyDependency, b as hasPackageJsonProperty, p as parsePackageJson, w as writePackageJson, c as writePackageJsonSync } from './packem_shared/package-json-DvR0jmEM.mjs';
5
5
  export { PackageManager, PackageManagerResult, findLockFile, findLockFileSync, findPackageManager, findPackageManagerSync, generateMissingPackagesInstallMessage, getPackageManagerVersion, identifyInitiatingPackageManager } from './package-manager.mjs';
6
+ import '@antfu/install-pkg';
6
7
  import '@visulima/fs';
7
8
  import 'normalize-package-data';
package/dist/index.d.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  export { PackageNotFoundError } from './error.js';
2
2
  export { RootMonorepo, Strategy, findMonorepoRoot, findMonorepoRootSync } from './monorepo.js';
3
3
  export { findPackageRoot, findPackageRootSync } from './package.js';
4
- export { d as NormalizedPackageJson, N as NormalizedReadResult, P as PackageJson, f as findPackageJson, a as findPackageJsonSync, g as getPackageJsonProperty, h as hasPackageJsonAnyDependency, b as hasPackageJsonProperty, p as parsePackageJson, w as writePackageJson, c as writePackageJsonSync } from './packem_shared/package-json-CpSz2EtJ.d.mjs';
4
+ export { d as NormalizedPackageJson, N as NormalizedReadResult, P as PackageJson, e as ensurePackages, f as findPackageJson, a as findPackageJsonSync, g as getPackageJsonProperty, h as hasPackageJsonAnyDependency, b as hasPackageJsonProperty, p as parsePackageJson, w as writePackageJson, c as writePackageJsonSync } from './packem_shared/package-json-DvR0jmEM.d.mjs';
5
5
  export { PackageManager, PackageManagerResult, findLockFile, findLockFileSync, findPackageManager, findPackageManagerSync, generateMissingPackagesInstallMessage, getPackageManagerVersion, identifyInitiatingPackageManager } from './package-manager.js';
6
+ import '@antfu/install-pkg';
6
7
  import '@visulima/fs';
7
8
  import 'normalize-package-data';
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import{default as n}from"./packem_shared/PackageNotFoundError-4CX3Vfcu.mjs";import{findMonorepoRoot as r,findMonorepoRootSync as g}from"./monorepo.mjs";import{findPackageRoot as i,findPackageRootSync as t}from"./package.mjs";import{findPackageJson as k,findPackageJsonSync as P,getPackageJsonProperty as f,hasPackageJsonAnyDependency as d,hasPackageJsonProperty as p,parsePackageJson as y,writePackageJson as J,writePackageJsonSync as M}from"./package-json.mjs";import{findLockFile as l,findLockFileSync as m,findPackageManager as x,findPackageManagerSync as R,generateMissingPackagesInstallMessage as F,getPackageManagerVersion as h,identifyInitiatingPackageManager as u}from"./package-manager.mjs";export{n as PackageNotFoundError,l as findLockFile,m as findLockFileSync,r as findMonorepoRoot,g as findMonorepoRootSync,k as findPackageJson,P as findPackageJsonSync,x as findPackageManager,R as findPackageManagerSync,i as findPackageRoot,t as findPackageRootSync,F as generateMissingPackagesInstallMessage,f as getPackageJsonProperty,h as getPackageManagerVersion,d as hasPackageJsonAnyDependency,p as hasPackageJsonProperty,u as identifyInitiatingPackageManager,y as parsePackageJson,J as writePackageJson,M as writePackageJsonSync};
1
+ import{default as n}from"./packem_shared/PackageNotFoundError-4CX3Vfcu.mjs";import{findMonorepoRoot as r,findMonorepoRootSync as g}from"./monorepo.mjs";import{findPackageRoot as i,findPackageRootSync as t}from"./package.mjs";import{ensurePackages as k,findPackageJson as P,findPackageJsonSync as f,getPackageJsonProperty as d,hasPackageJsonAnyDependency as p,hasPackageJsonProperty as y,parsePackageJson as J,writePackageJson as M,writePackageJsonSync as S}from"./package-json.mjs";import{findLockFile as m,findLockFileSync as x,findPackageManager as R,findPackageManagerSync as u,generateMissingPackagesInstallMessage as F,getPackageManagerVersion as h,identifyInitiatingPackageManager as w}from"./package-manager.mjs";export{n as PackageNotFoundError,k as ensurePackages,m as findLockFile,x as findLockFileSync,r as findMonorepoRoot,g as findMonorepoRootSync,P as findPackageJson,f as findPackageJsonSync,R as findPackageManager,u as findPackageManagerSync,i as findPackageRoot,t as findPackageRootSync,F as generateMissingPackagesInstallMessage,d as getPackageJsonProperty,h as getPackageManagerVersion,p as hasPackageJsonAnyDependency,y as hasPackageJsonProperty,w as identifyInitiatingPackageManager,J as parsePackageJson,M as writePackageJson,S as writePackageJsonSync};
@@ -1 +1 @@
1
- "use strict";var I=Object.defineProperty;var c=(e,n)=>I(e,"name",{value:n,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("node:fs"),d=require("@visulima/fs"),x=require("@visulima/fs/error"),l=require("@visulima/fs/utils"),E=require("@visulima/path"),N=require("normalize-package-data"),_=c(e=>e&&typeof e=="object"&&"default"in e?e.default:e,"_interopDefaultCompat"),w=_(N);var D=Object.defineProperty,s=c((e,n)=>D(e,"name",{value:n,configurable:!0}),"s$1");const f=s(e=>{const n=typeof e;return e!==null&&(n==="object"||n==="function")},"isObject"),O=s(e=>f(e)&&Object.keys(e).length===0,"isEmptyObject"),g=new Set(["__proto__","prototype","constructor"]),q=new Set("0123456789");function y(e){const n=[];let r="",t="start",o=!1;for(const a of e)switch(a){case"\\":{if(t==="index")throw new Error("Invalid character in an index");if(t==="indexEnd")throw new Error("Invalid character after an index");o&&(r+=a),t="property",o=!o;break}case".":{if(t==="index")throw new Error("Invalid character in an index");if(t==="indexEnd"){t="property";break}if(o){o=!1,r+=a;break}if(g.has(r))return[];n.push(r),r="",t="property";break}case"[":{if(t==="index")throw new Error("Invalid character in an index");if(t==="indexEnd"){t="index";break}if(o){o=!1,r+=a;break}if(t==="property"){if(g.has(r))return[];n.push(r),r=""}t="index";break}case"]":{if(t==="index"){n.push(Number.parseInt(r,10)),r="",t="indexEnd";break}if(t==="indexEnd")throw new Error("Invalid character after an index")}default:{if(t==="index"&&!q.has(a))throw new Error("Invalid character in an index");if(t==="indexEnd")throw new Error("Invalid character after an index");t==="start"&&(t="property"),o&&(o=!1,r+="\\"),r+=a}}switch(o&&(r+="\\"),t){case"property":{if(g.has(r))return[];n.push(r);break}case"index":throw new Error("Index was not closed");case"start":{n.push("");break}}return n}c(y,"d");s(y,"getPathSegments");function h(e,n){if(typeof n!="number"&&Array.isArray(e)){const r=Number.parseInt(n,10);return Number.isInteger(r)&&e[r]===e[n]}return!1}c(h,"l");s(h,"isStringIndex");function P(e,n){if(h(e,n))throw new Error("Cannot use string index")}c(P,"p");s(P,"assertNotStringIndex");function u(e,n,r){if(!f(e)||typeof n!="string")return r===void 0?e:r;const t=y(n);if(t.length===0)return r;for(let o=0;o<t.length;o++){const a=t[o];if(h(e,a)?e=o===t.length-1?void 0:null:e=e[a],e==null){if(o!==t.length-1)return r;break}}return e===void 0?r:e}c(u,"getProperty");s(u,"getProperty");function $(e,n,r){if(!f(e)||typeof n!="string")return e;const t=e,o=y(n);for(let a=0;a<o.length;a++){const i=o[a];P(e,i),a===o.length-1?e[i]=r:f(e[i])||(e[i]=typeof o[a+1]=="number"?[]:{}),e=e[i]}return t}c($,"setProperty");s($,"setProperty");function C(e,n){if(!f(e)||typeof n!="string")return!1;const r=y(n);for(let t=0;t<r.length;t++){const o=r[t];if(P(e,o),t===r.length-1)return delete e[o],!0;if(e=e[o],!f(e))return!1}}c(C,"deleteProperty");s(C,"deleteProperty");function k(e,n){if(!f(e)||typeof n!="string")return!1;const r=y(n);if(r.length===0)return!1;for(const t of r){if(!f(e)||!(t in e)||h(e,t))return!1;e=e[t]}return!0}c(k,"hasProperty");s(k,"hasProperty");function j(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replaceAll(/[\\.[]/g,"\\$&")}c(j,"escapePath");s(j,"escapePath");function b(e){const n=Object.entries(e);return Array.isArray(e)?n.map(([r,t])=>[Number(r),t]):n}c(b,"h");s(b,"entries");function v(e){let n="";for(let[r,t]of b(e))typeof t=="number"?n+=`[${t}]`:(t=j(t),n+=r===0?t:`.${t}`);return n}c(v,"w");s(v,"stringifyPath");function*J(e,n=[]){if(!f(e)||O(e)){n.length>0&&(yield v(n));return}for(const[r,t]of b(e))yield*J(t,[...n,r])}c(J,"y");s(J,"deepKeysIterator");function F(e){return[...J(e)]}c(F,"deepKeys");s(F,"deepKeys");var K=Object.defineProperty,p=c((e,n)=>K(e,"name",{value:n,configurable:!0}),"s");const S=new Map,T=p(async(e,n={})=>{const r={type:"file"};e&&(r.cwd=e);const t=await d.findUp("package.json",r);if(!t)throw new x.NotFoundError("No such file or directory, for package.json found.");const o=n.cache&&typeof n.cache!="boolean"?n.cache:S;if(n.cache&&o.has(t))return o.get(t);const a=await d.readJson(t);w(a);const i={packageJson:a,path:t};return o.set(t,i),i},"findPackageJson"),M=p((e,n={})=>{const r={type:"file"};e&&(r.cwd=e);const t=d.findUpSync("package.json",r);if(!t)throw new x.NotFoundError("No such file or directory, for package.json found.");const o=n.cache&&typeof n.cache!="boolean"?n.cache:S;if(n.cache&&o.has(t))return o.get(t);const a=d.readJsonSync(t);w(a);const i={packageJson:a,path:t};return o.set(t,i),i},"findPackageJsonSync"),U=p(async(e,n={})=>{const{cwd:r,...t}=n,o=l.toPath(n.cwd??process.cwd());await d.writeJson(E.join(o,"package.json"),e,t)},"writePackageJson"),z=p((e,n={})=>{const{cwd:r,...t}=n,o=l.toPath(n.cwd??process.cwd());d.writeJsonSync(E.join(o,"package.json"),e,t)},"writePackageJsonSync"),B=p(e=>{const n=e!==null&&typeof e=="object"&&!Array.isArray(e);if(!n&&typeof e!="string")throw new TypeError("`packageFile` should be either an `object` or a `string`.");const r=n?structuredClone(e):A.existsSync(e)?d.readJsonSync(e):l.parseJson(e);return w(r),r},"parsePackageJson"),G=p((e,n,r)=>u(e,n,r),"getPackageJsonProperty"),H=p((e,n)=>k(e,n),"hasPackageJsonProperty"),L=p((e,n,r)=>{const t=u(e,"dependencies",{}),o=u(e,"devDependencies",{}),a=u(e,"peerDependencies",{}),i={...t,...o,...r?.peerDeps===!1?{}:a};for(const m of n)if(k(i,m))return!0;return!1},"hasPackageJsonAnyDependency");exports.findPackageJson=T;exports.findPackageJsonSync=M;exports.getPackageJsonProperty=G;exports.hasPackageJsonAnyDependency=L;exports.hasPackageJsonProperty=H;exports.parsePackageJson=B;exports.writePackageJson=U;exports.writePackageJsonSync=z;
1
+ "use strict";var _=Object.defineProperty;var s=(e,n)=>_(e,"name",{value:n,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("node:fs"),N=require("@antfu/install-pkg"),$=require("@inquirer/confirm"),g=require("@visulima/fs"),j=require("@visulima/fs/error"),k=require("@visulima/fs/utils"),m=require("@visulima/path"),O=require("normalize-package-data"),S=s(e=>e&&typeof e=="object"&&"default"in e?e.default:e,"_interopDefaultCompat"),T=S($),J=S(O);var C=Object.defineProperty,i=s((e,n)=>C(e,"name",{value:n,configurable:!0}),"s");const p=i(e=>{const n=typeof e;return e!==null&&(n==="object"||n==="function")},"isObject"),F=i(e=>p(e)&&Object.keys(e).length===0,"isEmptyObject"),b=new Set(["__proto__","prototype","constructor"]),K=new Set("0123456789");function l(e){const n=[];let r="",t="start",o=!1;for(const a of e)switch(a){case"\\":{if(t==="index")throw new Error("Invalid character in an index");if(t==="indexEnd")throw new Error("Invalid character after an index");o&&(r+=a),t="property",o=!o;break}case".":{if(t==="index")throw new Error("Invalid character in an index");if(t==="indexEnd"){t="property";break}if(o){o=!1,r+=a;break}if(b.has(r))return[];n.push(r),r="",t="property";break}case"[":{if(t==="index")throw new Error("Invalid character in an index");if(t==="indexEnd"){t="index";break}if(o){o=!1,r+=a;break}if(t==="property"){if(b.has(r))return[];n.push(r),r=""}t="index";break}case"]":{if(t==="index"){n.push(Number.parseInt(r,10)),r="",t="indexEnd";break}if(t==="indexEnd")throw new Error("Invalid character after an index")}default:{if(t==="index"&&!K.has(a))throw new Error("Invalid character in an index");if(t==="indexEnd")throw new Error("Invalid character after an index");t==="start"&&(t="property"),o&&(o=!1,r+="\\"),r+=a}}switch(o&&(r+="\\"),t){case"property":{if(b.has(r))return[];n.push(r);break}case"index":throw new Error("Index was not closed");case"start":{n.push("");break}}return n}s(l,"d");i(l,"getPathSegments");function P(e,n){if(typeof n!="number"&&Array.isArray(e)){const r=Number.parseInt(n,10);return Number.isInteger(r)&&e[r]===e[n]}return!1}s(P,"l");i(P,"isStringIndex");function x(e,n){if(P(e,n))throw new Error("Cannot use string index")}s(x,"p");i(x,"assertNotStringIndex");function f(e,n,r){if(!p(e)||typeof n!="string")return r===void 0?e:r;const t=l(n);if(t.length===0)return r;for(let o=0;o<t.length;o++){const a=t[o];if(P(e,a)?e=o===t.length-1?void 0:null:e=e[a],e==null){if(o!==t.length-1)return r;break}}return e===void 0?r:e}s(f,"getProperty");i(f,"getProperty");function M(e,n,r){if(!p(e)||typeof n!="string")return e;const t=e,o=l(n);for(let a=0;a<o.length;a++){const c=o[a];x(e,c),a===o.length-1?e[c]=r:p(e[c])||(e[c]=typeof o[a+1]=="number"?[]:{}),e=e[c]}return t}s(M,"setProperty");i(M,"setProperty");function U(e,n){if(!p(e)||typeof n!="string")return!1;const r=l(n);for(let t=0;t<r.length;t++){const o=r[t];if(x(e,o),t===r.length-1)return delete e[o],!0;if(e=e[o],!p(e))return!1}}s(U,"deleteProperty");i(U,"deleteProperty");function h(e,n){if(!p(e)||typeof n!="string")return!1;const r=l(n);if(r.length===0)return!1;for(const t of r){if(!p(e)||!(t in e)||P(e,t))return!1;e=e[t]}return!0}s(h,"hasProperty");i(h,"hasProperty");function D(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replaceAll(/[\\.[]/g,"\\$&")}s(D,"escapePath");i(D,"escapePath");function v(e){const n=Object.entries(e);return Array.isArray(e)?n.map(([r,t])=>[Number(r),t]):n}s(v,"h");i(v,"entries");function I(e){let n="";for(let[r,t]of v(e))typeof t=="number"?n+=`[${t}]`:(t=D(t),n+=r===0?t:`.${t}`);return n}s(I,"w");i(I,"stringifyPath");function*E(e,n=[]){if(!p(e)||F(e)){n.length>0&&(yield I(n));return}for(const[r,t]of v(e))yield*E(t,[...n,r])}s(E,"y$1");i(E,"deepKeysIterator");function Y(e){return[...E(e)]}s(Y,"deepKeys");i(Y,"deepKeys");const z=typeof process.stdout<"u"&&!process.versions?.deno&&!globalThis.window;var B=Object.defineProperty,d=s((e,n)=>B(e,"name",{value:n,configurable:!0}),"a");const A=new Map,G=d(async(e,n={})=>{const r={type:"file"};e&&(r.cwd=e);const t=await g.findUp("package.json",r);if(!t)throw new j.NotFoundError("No such file or directory, for package.json found.");const o=n.cache&&typeof n.cache!="boolean"?n.cache:A;if(n.cache&&o.has(t))return o.get(t);const a=await g.readJson(t);J(a);const c={packageJson:a,path:t};return o.set(t,c),c},"findPackageJson"),H=d((e,n={})=>{const r={type:"file"};e&&(r.cwd=e);const t=g.findUpSync("package.json",r);if(!t)throw new j.NotFoundError("No such file or directory, for package.json found.");const o=n.cache&&typeof n.cache!="boolean"?n.cache:A;if(n.cache&&o.has(t))return o.get(t);const a=g.readJsonSync(t);J(a);const c={packageJson:a,path:t};return o.set(t,c),c},"findPackageJsonSync"),L=d(async(e,n={})=>{const{cwd:r,...t}=n,o=k.toPath(n.cwd??process.cwd());await g.writeJson(m.join(o,"package.json"),e,t)},"writePackageJson"),Q=d((e,n={})=>{const{cwd:r,...t}=n,o=k.toPath(n.cwd??process.cwd());g.writeJsonSync(m.join(o,"package.json"),e,t)},"writePackageJsonSync"),R=d(e=>{const n=e!==null&&typeof e=="object"&&!Array.isArray(e);if(!n&&typeof e!="string")throw new TypeError("`packageFile` should be either an `object` or a `string`.");const r=n?structuredClone(e):q.existsSync(e)?g.readJsonSync(e):k.parseJson(e);return J(r),r},"parsePackageJson"),V=d((e,n,r)=>f(e,n,r),"getPackageJsonProperty"),W=d((e,n)=>h(e,n),"hasPackageJsonProperty"),X=d((e,n,r)=>{const t=f(e,"dependencies",{}),o=f(e,"devDependencies",{}),a=f(e,"peerDependencies",{}),c={...t,...o,...r?.peerDeps===!1?{}:a};for(const y of n)if(h(c,y))return!0;return!1},"hasPackageJsonAnyDependency"),Z=d(async(e,n,r="dependencies",t={})=>{if(process.env.CI||z&&process.stdout?.isTTY===!1){console.warn("Skipping package installation because the process is not interactive.");return}const o=f(e,"dependencies",{}),a=f(e,"devDependencies",{}),c=f(e,"peerDependencies",{}),y=[],u={confirm:{},deps:!0,devDeps:!0,peerDeps:!1,...t};for(const w of n)u.deps&&h(o,w)||u.devDeps&&h(a,w)||u.peerDeps&&h(c,w)||y.push(w);await T({message:`${y.length===1?"Package is":"Packages are"} required for this config: ${y.join(", ")}. Do you want to install them?`,...u.confirm})&&await N.installPackage(y,{...u.installPackage,cwd:u.cwd?k.toPath(u.cwd):void 0,dev:r==="devDependencies"})},"ensurePackages");exports.ensurePackages=Z;exports.findPackageJson=G;exports.findPackageJsonSync=H;exports.getPackageJsonProperty=V;exports.hasPackageJsonAnyDependency=X;exports.hasPackageJsonProperty=W;exports.parsePackageJson=R;exports.writePackageJson=L;exports.writePackageJsonSync=Q;
@@ -1,3 +1,4 @@
1
- export { N as NormalizedReadResult, f as findPackageJson, a as findPackageJsonSync, g as getPackageJsonProperty, h as hasPackageJsonAnyDependency, b as hasPackageJsonProperty, p as parsePackageJson, w as writePackageJson, c as writePackageJsonSync } from './packem_shared/package-json-CpSz2EtJ.cjs';
1
+ export { N as NormalizedReadResult, e as ensurePackages, f as findPackageJson, a as findPackageJsonSync, g as getPackageJsonProperty, h as hasPackageJsonAnyDependency, b as hasPackageJsonProperty, p as parsePackageJson, w as writePackageJson, c as writePackageJsonSync } from './packem_shared/package-json-DvR0jmEM.cjs';
2
+ import '@antfu/install-pkg';
2
3
  import '@visulima/fs';
3
4
  import 'normalize-package-data';
@@ -1,3 +1,4 @@
1
- export { N as NormalizedReadResult, f as findPackageJson, a as findPackageJsonSync, g as getPackageJsonProperty, h as hasPackageJsonAnyDependency, b as hasPackageJsonProperty, p as parsePackageJson, w as writePackageJson, c as writePackageJsonSync } from './packem_shared/package-json-CpSz2EtJ.mjs';
1
+ export { N as NormalizedReadResult, e as ensurePackages, f as findPackageJson, a as findPackageJsonSync, g as getPackageJsonProperty, h as hasPackageJsonAnyDependency, b as hasPackageJsonProperty, p as parsePackageJson, w as writePackageJson, c as writePackageJsonSync } from './packem_shared/package-json-DvR0jmEM.mjs';
2
+ import '@antfu/install-pkg';
2
3
  import '@visulima/fs';
3
4
  import 'normalize-package-data';
@@ -1,3 +1,4 @@
1
- export { N as NormalizedReadResult, f as findPackageJson, a as findPackageJsonSync, g as getPackageJsonProperty, h as hasPackageJsonAnyDependency, b as hasPackageJsonProperty, p as parsePackageJson, w as writePackageJson, c as writePackageJsonSync } from './packem_shared/package-json-CpSz2EtJ.d.mjs';
1
+ export { N as NormalizedReadResult, e as ensurePackages, f as findPackageJson, a as findPackageJsonSync, g as getPackageJsonProperty, h as hasPackageJsonAnyDependency, b as hasPackageJsonProperty, p as parsePackageJson, w as writePackageJson, c as writePackageJsonSync } from './packem_shared/package-json-DvR0jmEM.d.mjs';
2
+ import '@antfu/install-pkg';
2
3
  import '@visulima/fs';
3
4
  import 'normalize-package-data';
@@ -1 +1 @@
1
- var S=Object.defineProperty;var c=(e,n)=>S(e,"name",{value:n,configurable:!0});import{existsSync as A}from"node:fs";import{findUp as N,readJson as O,findUpSync as $,readJsonSync as b,writeJson as D,writeJsonSync as _}from"@visulima/fs";import{NotFoundError as x}from"@visulima/fs/error";import{toPath as m,parseJson as K}from"@visulima/fs/utils";import{join as J}from"@visulima/path";import g from"normalize-package-data";var C=Object.defineProperty,i=c((e,n)=>C(e,"name",{value:n,configurable:!0}),"s$1");const f=i(e=>{const n=typeof e;return e!==null&&(n==="object"||n==="function")},"isObject"),F=i(e=>f(e)&&Object.keys(e).length===0,"isEmptyObject"),y=new Set(["__proto__","prototype","constructor"]),T=new Set("0123456789");function u(e){const n=[];let r="",t="start",o=!1;for(const a of e)switch(a){case"\\":{if(t==="index")throw new Error("Invalid character in an index");if(t==="indexEnd")throw new Error("Invalid character after an index");o&&(r+=a),t="property",o=!o;break}case".":{if(t==="index")throw new Error("Invalid character in an index");if(t==="indexEnd"){t="property";break}if(o){o=!1,r+=a;break}if(y.has(r))return[];n.push(r),r="",t="property";break}case"[":{if(t==="index")throw new Error("Invalid character in an index");if(t==="indexEnd"){t="index";break}if(o){o=!1,r+=a;break}if(t==="property"){if(y.has(r))return[];n.push(r),r=""}t="index";break}case"]":{if(t==="index"){n.push(Number.parseInt(r,10)),r="",t="indexEnd";break}if(t==="indexEnd")throw new Error("Invalid character after an index")}default:{if(t==="index"&&!T.has(a))throw new Error("Invalid character in an index");if(t==="indexEnd")throw new Error("Invalid character after an index");t==="start"&&(t="property"),o&&(o=!1,r+="\\"),r+=a}}switch(o&&(r+="\\"),t){case"property":{if(y.has(r))return[];n.push(r);break}case"index":throw new Error("Index was not closed");case"start":{n.push("");break}}return n}c(u,"d");i(u,"getPathSegments");function h(e,n){if(typeof n!="number"&&Array.isArray(e)){const r=Number.parseInt(n,10);return Number.isInteger(r)&&e[r]===e[n]}return!1}c(h,"l");i(h,"isStringIndex");function l(e,n){if(h(e,n))throw new Error("Cannot use string index")}c(l,"p");i(l,"assertNotStringIndex");function d(e,n,r){if(!f(e)||typeof n!="string")return r===void 0?e:r;const t=u(n);if(t.length===0)return r;for(let o=0;o<t.length;o++){const a=t[o];if(h(e,a)?e=o===t.length-1?void 0:null:e=e[a],e==null){if(o!==t.length-1)return r;break}}return e===void 0?r:e}c(d,"getProperty");i(d,"getProperty");function U(e,n,r){if(!f(e)||typeof n!="string")return e;const t=e,o=u(n);for(let a=0;a<o.length;a++){const s=o[a];l(e,s),a===o.length-1?e[s]=r:f(e[s])||(e[s]=typeof o[a+1]=="number"?[]:{}),e=e[s]}return t}c(U,"setProperty");i(U,"setProperty");function M(e,n){if(!f(e)||typeof n!="string")return!1;const r=u(n);for(let t=0;t<r.length;t++){const o=r[t];if(l(e,o),t===r.length-1)return delete e[o],!0;if(e=e[o],!f(e))return!1}}c(M,"deleteProperty");i(M,"deleteProperty");function w(e,n){if(!f(e)||typeof n!="string")return!1;const r=u(n);if(r.length===0)return!1;for(const t of r){if(!f(e)||!(t in e)||h(e,t))return!1;e=e[t]}return!0}c(w,"hasProperty");i(w,"hasProperty");function E(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replaceAll(/[\\.[]/g,"\\$&")}c(E,"escapePath");i(E,"escapePath");function k(e){const n=Object.entries(e);return Array.isArray(e)?n.map(([r,t])=>[Number(r),t]):n}c(k,"h");i(k,"entries");function v(e){let n="";for(let[r,t]of k(e))typeof t=="number"?n+=`[${t}]`:(t=E(t),n+=r===0?t:`.${t}`);return n}c(v,"w");i(v,"stringifyPath");function*P(e,n=[]){if(!f(e)||F(e)){n.length>0&&(yield v(n));return}for(const[r,t]of k(e))yield*P(t,[...n,r])}c(P,"y");i(P,"deepKeysIterator");function q(e){return[...P(e)]}c(q,"deepKeys");i(q,"deepKeys");var z=Object.defineProperty,p=c((e,n)=>z(e,"name",{value:n,configurable:!0}),"s");const j=new Map,W=p(async(e,n={})=>{const r={type:"file"};e&&(r.cwd=e);const t=await N("package.json",r);if(!t)throw new x("No such file or directory, for package.json found.");const o=n.cache&&typeof n.cache!="boolean"?n.cache:j;if(n.cache&&o.has(t))return o.get(t);const a=await O(t);g(a);const s={packageJson:a,path:t};return o.set(t,s),s},"findPackageJson"),X=p((e,n={})=>{const r={type:"file"};e&&(r.cwd=e);const t=$("package.json",r);if(!t)throw new x("No such file or directory, for package.json found.");const o=n.cache&&typeof n.cache!="boolean"?n.cache:j;if(n.cache&&o.has(t))return o.get(t);const a=b(t);g(a);const s={packageJson:a,path:t};return o.set(t,s),s},"findPackageJsonSync"),Y=p(async(e,n={})=>{const{cwd:r,...t}=n,o=m(n.cwd??process.cwd());await D(J(o,"package.json"),e,t)},"writePackageJson"),Z=p((e,n={})=>{const{cwd:r,...t}=n,o=m(n.cwd??process.cwd());_(J(o,"package.json"),e,t)},"writePackageJsonSync"),ee=p(e=>{const n=e!==null&&typeof e=="object"&&!Array.isArray(e);if(!n&&typeof e!="string")throw new TypeError("`packageFile` should be either an `object` or a `string`.");const r=n?structuredClone(e):A(e)?b(e):K(e);return g(r),r},"parsePackageJson"),ne=p((e,n,r)=>d(e,n,r),"getPackageJsonProperty"),te=p((e,n)=>w(e,n),"hasPackageJsonProperty"),re=p((e,n,r)=>{const t=d(e,"dependencies",{}),o=d(e,"devDependencies",{}),a=d(e,"peerDependencies",{}),s={...t,...o,...r?.peerDeps===!1?{}:a};for(const I of n)if(w(s,I))return!0;return!1},"hasPackageJsonAnyDependency");export{W as findPackageJson,X as findPackageJsonSync,ne as getPackageJsonProperty,re as hasPackageJsonAnyDependency,te as hasPackageJsonProperty,ee as parsePackageJson,Y as writePackageJson,Z as writePackageJsonSync};
1
+ var A=Object.defineProperty;var i=(e,n)=>A(e,"name",{value:n,configurable:!0});import{existsSync as N}from"node:fs";import{installPackage as $}from"@antfu/install-pkg";import O from"@inquirer/confirm";import{findUp as T,readJson as _,findUpSync as C,readJsonSync as J,writeJson as K,writeJsonSync as F}from"@visulima/fs";import{NotFoundError as E}from"@visulima/fs/error";import{toPath as P,parseJson as U}from"@visulima/fs/utils";import{join as j}from"@visulima/path";import b from"normalize-package-data";var q=Object.defineProperty,c=i((e,n)=>q(e,"name",{value:n,configurable:!0}),"s");const p=c(e=>{const n=typeof e;return e!==null&&(n==="object"||n==="function")},"isObject"),M=c(e=>p(e)&&Object.keys(e).length===0,"isEmptyObject"),k=new Set(["__proto__","prototype","constructor"]),Y=new Set("0123456789");function y(e){const n=[];let r="",t="start",o=!1;for(const a of e)switch(a){case"\\":{if(t==="index")throw new Error("Invalid character in an index");if(t==="indexEnd")throw new Error("Invalid character after an index");o&&(r+=a),t="property",o=!o;break}case".":{if(t==="index")throw new Error("Invalid character in an index");if(t==="indexEnd"){t="property";break}if(o){o=!1,r+=a;break}if(k.has(r))return[];n.push(r),r="",t="property";break}case"[":{if(t==="index")throw new Error("Invalid character in an index");if(t==="indexEnd"){t="index";break}if(o){o=!1,r+=a;break}if(t==="property"){if(k.has(r))return[];n.push(r),r=""}t="index";break}case"]":{if(t==="index"){n.push(Number.parseInt(r,10)),r="",t="indexEnd";break}if(t==="indexEnd")throw new Error("Invalid character after an index")}default:{if(t==="index"&&!Y.has(a))throw new Error("Invalid character in an index");if(t==="indexEnd")throw new Error("Invalid character after an index");t==="start"&&(t="property"),o&&(o=!1,r+="\\"),r+=a}}switch(o&&(r+="\\"),t){case"property":{if(k.has(r))return[];n.push(r);break}case"index":throw new Error("Index was not closed");case"start":{n.push("");break}}return n}i(y,"d");c(y,"getPathSegments");function w(e,n){if(typeof n!="number"&&Array.isArray(e)){const r=Number.parseInt(n,10);return Number.isInteger(r)&&e[r]===e[n]}return!1}i(w,"l");c(w,"isStringIndex");function m(e,n){if(w(e,n))throw new Error("Cannot use string index")}i(m,"p");c(m,"assertNotStringIndex");function d(e,n,r){if(!p(e)||typeof n!="string")return r===void 0?e:r;const t=y(n);if(t.length===0)return r;for(let o=0;o<t.length;o++){const a=t[o];if(w(e,a)?e=o===t.length-1?void 0:null:e=e[a],e==null){if(o!==t.length-1)return r;break}}return e===void 0?r:e}i(d,"getProperty");c(d,"getProperty");function z(e,n,r){if(!p(e)||typeof n!="string")return e;const t=e,o=y(n);for(let a=0;a<o.length;a++){const s=o[a];m(e,s),a===o.length-1?e[s]=r:p(e[s])||(e[s]=typeof o[a+1]=="number"?[]:{}),e=e[s]}return t}i(z,"setProperty");c(z,"setProperty");function B(e,n){if(!p(e)||typeof n!="string")return!1;const r=y(n);for(let t=0;t<r.length;t++){const o=r[t];if(m(e,o),t===r.length-1)return delete e[o],!0;if(e=e[o],!p(e))return!1}}i(B,"deleteProperty");c(B,"deleteProperty");function g(e,n){if(!p(e)||typeof n!="string")return!1;const r=y(n);if(r.length===0)return!1;for(const t of r){if(!p(e)||!(t in e)||w(e,t))return!1;e=e[t]}return!0}i(g,"hasProperty");c(g,"hasProperty");function I(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replaceAll(/[\\.[]/g,"\\$&")}i(I,"escapePath");c(I,"escapePath");function x(e){const n=Object.entries(e);return Array.isArray(e)?n.map(([r,t])=>[Number(r),t]):n}i(x,"h");c(x,"entries");function D(e){let n="";for(let[r,t]of x(e))typeof t=="number"?n+=`[${t}]`:(t=I(t),n+=r===0?t:`.${t}`);return n}i(D,"w");c(D,"stringifyPath");function*v(e,n=[]){if(!p(e)||M(e)){n.length>0&&(yield D(n));return}for(const[r,t]of x(e))yield*v(t,[...n,r])}i(v,"y$1");c(v,"deepKeysIterator");function G(e){return[...v(e)]}i(G,"deepKeys");c(G,"deepKeys");const H=typeof process.stdout<"u"&&!process.versions?.deno&&!globalThis.window;var L=Object.defineProperty,f=i((e,n)=>L(e,"name",{value:n,configurable:!0}),"a");const S=new Map,re=f(async(e,n={})=>{const r={type:"file"};e&&(r.cwd=e);const t=await T("package.json",r);if(!t)throw new E("No such file or directory, for package.json found.");const o=n.cache&&typeof n.cache!="boolean"?n.cache:S;if(n.cache&&o.has(t))return o.get(t);const a=await _(t);b(a);const s={packageJson:a,path:t};return o.set(t,s),s},"findPackageJson"),oe=f((e,n={})=>{const r={type:"file"};e&&(r.cwd=e);const t=C("package.json",r);if(!t)throw new E("No such file or directory, for package.json found.");const o=n.cache&&typeof n.cache!="boolean"?n.cache:S;if(n.cache&&o.has(t))return o.get(t);const a=J(t);b(a);const s={packageJson:a,path:t};return o.set(t,s),s},"findPackageJsonSync"),ae=f(async(e,n={})=>{const{cwd:r,...t}=n,o=P(n.cwd??process.cwd());await K(j(o,"package.json"),e,t)},"writePackageJson"),se=f((e,n={})=>{const{cwd:r,...t}=n,o=P(n.cwd??process.cwd());F(j(o,"package.json"),e,t)},"writePackageJsonSync"),ie=f(e=>{const n=e!==null&&typeof e=="object"&&!Array.isArray(e);if(!n&&typeof e!="string")throw new TypeError("`packageFile` should be either an `object` or a `string`.");const r=n?structuredClone(e):N(e)?J(e):U(e);return b(r),r},"parsePackageJson"),ce=f((e,n,r)=>d(e,n,r),"getPackageJsonProperty"),pe=f((e,n)=>g(e,n),"hasPackageJsonProperty"),fe=f((e,n,r)=>{const t=d(e,"dependencies",{}),o=d(e,"devDependencies",{}),a=d(e,"peerDependencies",{}),s={...t,...o,...r?.peerDeps===!1?{}:a};for(const h of n)if(g(s,h))return!0;return!1},"hasPackageJsonAnyDependency"),de=f(async(e,n,r="dependencies",t={})=>{if(process.env.CI||H&&process.stdout?.isTTY===!1){console.warn("Skipping package installation because the process is not interactive.");return}const o=d(e,"dependencies",{}),a=d(e,"devDependencies",{}),s=d(e,"peerDependencies",{}),h=[],u={confirm:{},deps:!0,devDeps:!0,peerDeps:!1,...t};for(const l of n)u.deps&&g(o,l)||u.devDeps&&g(a,l)||u.peerDeps&&g(s,l)||h.push(l);await O({message:`${h.length===1?"Package is":"Packages are"} required for this config: ${h.join(", ")}. Do you want to install them?`,...u.confirm})&&await $(h,{...u.installPackage,cwd:u.cwd?P(u.cwd):void 0,dev:r==="devDependencies"})},"ensurePackages");export{de as ensurePackages,re as findPackageJson,oe as findPackageJsonSync,ce as getPackageJsonProperty,fe as hasPackageJsonAnyDependency,pe as hasPackageJsonProperty,ie as parsePackageJson,ae as writePackageJson,se as writePackageJsonSync};
@@ -1,3 +1,4 @@
1
+ import { InstallPackageOptions } from '@antfu/install-pkg';
1
2
  import { WriteJsonOptions } from '@visulima/fs';
2
3
  import { Package } from 'normalize-package-data';
3
4
 
@@ -1668,6 +1669,166 @@ PackageJson$1.TypeScriptConfiguration &
1668
1669
  PackageJson$1.YarnConfiguration &
1669
1670
  PackageJson$1.JSPMConfiguration;
1670
1671
 
1672
+ type Prettify<T> = {
1673
+ [K in keyof T]: T[K];
1674
+ } & {};
1675
+ type PartialDeep<T> = T extends object ? {
1676
+ [P in keyof T]?: PartialDeep<T[P]>;
1677
+ } : T;
1678
+
1679
+ /**
1680
+ * Union type representing the possible statuses of a prompt.
1681
+ *
1682
+ * - `'loading'`: The prompt is currently loading.
1683
+ * - `'idle'`: The prompt is loaded and currently waiting for the user to
1684
+ * submit an answer.
1685
+ * - `'done'`: The user has submitted an answer and the prompt is finished.
1686
+ * - `string`: Any other string: The prompt is in a custom state.
1687
+ */
1688
+ type Status = 'loading' | 'idle' | 'done' | (string & {});
1689
+ type DefaultTheme = {
1690
+ /**
1691
+ * Prefix to prepend to the message. If a function is provided, it will be
1692
+ * called with the current status of the prompt, and the return value will be
1693
+ * used as the prefix.
1694
+ *
1695
+ * @remarks
1696
+ * If `status === 'loading'`, this property is ignored and the spinner (styled
1697
+ * by the `spinner` property) will be displayed instead.
1698
+ *
1699
+ * @defaultValue
1700
+ * ```ts
1701
+ * // import colors from 'yoctocolors-cjs';
1702
+ * (status) => status === 'done' ? colors.green('✔') : colors.blue('?')
1703
+ * ```
1704
+ */
1705
+ prefix: string | Prettify<Omit<Record<Status, string>, 'loading'>>;
1706
+ /**
1707
+ * Configuration for the spinner that is displayed when the prompt is in the
1708
+ * `'loading'` state.
1709
+ *
1710
+ * We recommend the use of {@link https://github.com/sindresorhus/cli-spinners|cli-spinners} for a list of available spinners.
1711
+ */
1712
+ spinner: {
1713
+ /**
1714
+ * The time interval between frames, in milliseconds.
1715
+ *
1716
+ * @defaultValue
1717
+ * ```ts
1718
+ * 80
1719
+ * ```
1720
+ */
1721
+ interval: number;
1722
+ /**
1723
+ * A list of frames to show for the spinner.
1724
+ *
1725
+ * @defaultValue
1726
+ * ```ts
1727
+ * ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏']
1728
+ * ```
1729
+ */
1730
+ frames: string[];
1731
+ };
1732
+ /**
1733
+ * Object containing functions to style different parts of the prompt.
1734
+ */
1735
+ style: {
1736
+ /**
1737
+ * Style to apply to the user's answer once it has been submitted.
1738
+ *
1739
+ * @param text - The user's answer.
1740
+ * @returns The styled answer.
1741
+ *
1742
+ * @defaultValue
1743
+ * ```ts
1744
+ * // import colors from 'yoctocolors-cjs';
1745
+ * (text) => colors.cyan(text)
1746
+ * ```
1747
+ */
1748
+ answer: (text: string) => string;
1749
+ /**
1750
+ * Style to apply to the message displayed to the user.
1751
+ *
1752
+ * @param text - The message to style.
1753
+ * @param status - The current status of the prompt.
1754
+ * @returns The styled message.
1755
+ *
1756
+ * @defaultValue
1757
+ * ```ts
1758
+ * // import colors from 'yoctocolors-cjs';
1759
+ * (text, status) => colors.bold(text)
1760
+ * ```
1761
+ */
1762
+ message: (text: string, status: Status) => string;
1763
+ /**
1764
+ * Style to apply to error messages.
1765
+ *
1766
+ * @param text - The error message.
1767
+ * @returns The styled error message.
1768
+ *
1769
+ * @defaultValue
1770
+ * ```ts
1771
+ * // import colors from 'yoctocolors-cjs';
1772
+ * (text) => colors.red(`> ${text}`)
1773
+ * ```
1774
+ */
1775
+ error: (text: string) => string;
1776
+ /**
1777
+ * Style to apply to the default answer when one is provided.
1778
+ *
1779
+ * @param text - The default answer.
1780
+ * @returns The styled default answer.
1781
+ *
1782
+ * @defaultValue
1783
+ * ```ts
1784
+ * // import colors from 'yoctocolors-cjs';
1785
+ * (text) => colors.dim(`(${text})`)
1786
+ * ```
1787
+ */
1788
+ defaultAnswer: (text: string) => string;
1789
+ /**
1790
+ * Style to apply to help text.
1791
+ *
1792
+ * @param text - The help text.
1793
+ * @returns The styled help text.
1794
+ *
1795
+ * @defaultValue
1796
+ * ```ts
1797
+ * // import colors from 'yoctocolors-cjs';
1798
+ * (text) => colors.dim(text)
1799
+ * ```
1800
+ */
1801
+ help: (text: string) => string;
1802
+ /**
1803
+ * Style to apply to highlighted text.
1804
+ *
1805
+ * @param text - The text to highlight.
1806
+ * @returns The highlighted text.
1807
+ *
1808
+ * @defaultValue
1809
+ * ```ts
1810
+ * // import colors from 'yoctocolors-cjs';
1811
+ * (text) => colors.cyan(text)
1812
+ * ```
1813
+ */
1814
+ highlight: (text: string) => string;
1815
+ /**
1816
+ * Style to apply to keyboard keys referred to in help texts.
1817
+ *
1818
+ * @param text - The key to style.
1819
+ * @returns The styled key.
1820
+ *
1821
+ * @defaultValue
1822
+ * ```ts
1823
+ * // import colors from 'yoctocolors-cjs';
1824
+ * (text) => colors.cyan(colors.bold(`<${text}>`))
1825
+ * ```
1826
+ */
1827
+ key: (text: string) => string;
1828
+ };
1829
+ };
1830
+ type Theme<Extension extends object = object> = Prettify<Extension & DefaultTheme>;
1831
+
1671
1832
  type NormalizedPackageJson = Package & PackageJson;
1672
1833
  type PackageJson = PackageJson$1;
1673
1834
  type Cache<T = any> = Map<string, T>;
@@ -1693,5 +1854,18 @@ declare const hasPackageJsonProperty: (packageJson: NormalizedPackageJson, prope
1693
1854
  declare const hasPackageJsonAnyDependency: (packageJson: NormalizedPackageJson, arguments_: string[], options?: {
1694
1855
  peerDeps?: boolean;
1695
1856
  }) => boolean;
1857
+ declare const ensurePackages: (packageJson: NormalizedPackageJson, packages: string[], installKey?: "dependencies" | "devDependencies", options?: {
1858
+ confirm?: {
1859
+ default?: boolean;
1860
+ message: string;
1861
+ theme?: PartialDeep<Theme>;
1862
+ transformer?: (value: boolean) => string;
1863
+ };
1864
+ cwd?: URL | string;
1865
+ deps?: boolean;
1866
+ devDeps?: boolean;
1867
+ installPackage?: Omit<InstallPackageOptions, "cwd" | "dev">;
1868
+ peerDeps?: boolean;
1869
+ }) => Promise<void>;
1696
1870
 
1697
- export { type NormalizedReadResult as N, type PackageJson as P, findPackageJsonSync as a, hasPackageJsonProperty as b, writePackageJsonSync as c, type NormalizedPackageJson as d, findPackageJson as f, getPackageJsonProperty as g, hasPackageJsonAnyDependency as h, parsePackageJson as p, writePackageJson as w };
1871
+ export { type NormalizedReadResult as N, type PackageJson as P, findPackageJsonSync as a, hasPackageJsonProperty as b, writePackageJsonSync as c, type NormalizedPackageJson as d, ensurePackages as e, findPackageJson as f, getPackageJsonProperty as g, hasPackageJsonAnyDependency as h, parsePackageJson as p, writePackageJson as w };
@@ -1,3 +1,4 @@
1
+ import { InstallPackageOptions } from '@antfu/install-pkg';
1
2
  import { WriteJsonOptions } from '@visulima/fs';
2
3
  import { Package } from 'normalize-package-data';
3
4
 
@@ -1668,6 +1669,166 @@ PackageJson$1.TypeScriptConfiguration &
1668
1669
  PackageJson$1.YarnConfiguration &
1669
1670
  PackageJson$1.JSPMConfiguration;
1670
1671
 
1672
+ type Prettify<T> = {
1673
+ [K in keyof T]: T[K];
1674
+ } & {};
1675
+ type PartialDeep<T> = T extends object ? {
1676
+ [P in keyof T]?: PartialDeep<T[P]>;
1677
+ } : T;
1678
+
1679
+ /**
1680
+ * Union type representing the possible statuses of a prompt.
1681
+ *
1682
+ * - `'loading'`: The prompt is currently loading.
1683
+ * - `'idle'`: The prompt is loaded and currently waiting for the user to
1684
+ * submit an answer.
1685
+ * - `'done'`: The user has submitted an answer and the prompt is finished.
1686
+ * - `string`: Any other string: The prompt is in a custom state.
1687
+ */
1688
+ type Status = 'loading' | 'idle' | 'done' | (string & {});
1689
+ type DefaultTheme = {
1690
+ /**
1691
+ * Prefix to prepend to the message. If a function is provided, it will be
1692
+ * called with the current status of the prompt, and the return value will be
1693
+ * used as the prefix.
1694
+ *
1695
+ * @remarks
1696
+ * If `status === 'loading'`, this property is ignored and the spinner (styled
1697
+ * by the `spinner` property) will be displayed instead.
1698
+ *
1699
+ * @defaultValue
1700
+ * ```ts
1701
+ * // import colors from 'yoctocolors-cjs';
1702
+ * (status) => status === 'done' ? colors.green('✔') : colors.blue('?')
1703
+ * ```
1704
+ */
1705
+ prefix: string | Prettify<Omit<Record<Status, string>, 'loading'>>;
1706
+ /**
1707
+ * Configuration for the spinner that is displayed when the prompt is in the
1708
+ * `'loading'` state.
1709
+ *
1710
+ * We recommend the use of {@link https://github.com/sindresorhus/cli-spinners|cli-spinners} for a list of available spinners.
1711
+ */
1712
+ spinner: {
1713
+ /**
1714
+ * The time interval between frames, in milliseconds.
1715
+ *
1716
+ * @defaultValue
1717
+ * ```ts
1718
+ * 80
1719
+ * ```
1720
+ */
1721
+ interval: number;
1722
+ /**
1723
+ * A list of frames to show for the spinner.
1724
+ *
1725
+ * @defaultValue
1726
+ * ```ts
1727
+ * ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏']
1728
+ * ```
1729
+ */
1730
+ frames: string[];
1731
+ };
1732
+ /**
1733
+ * Object containing functions to style different parts of the prompt.
1734
+ */
1735
+ style: {
1736
+ /**
1737
+ * Style to apply to the user's answer once it has been submitted.
1738
+ *
1739
+ * @param text - The user's answer.
1740
+ * @returns The styled answer.
1741
+ *
1742
+ * @defaultValue
1743
+ * ```ts
1744
+ * // import colors from 'yoctocolors-cjs';
1745
+ * (text) => colors.cyan(text)
1746
+ * ```
1747
+ */
1748
+ answer: (text: string) => string;
1749
+ /**
1750
+ * Style to apply to the message displayed to the user.
1751
+ *
1752
+ * @param text - The message to style.
1753
+ * @param status - The current status of the prompt.
1754
+ * @returns The styled message.
1755
+ *
1756
+ * @defaultValue
1757
+ * ```ts
1758
+ * // import colors from 'yoctocolors-cjs';
1759
+ * (text, status) => colors.bold(text)
1760
+ * ```
1761
+ */
1762
+ message: (text: string, status: Status) => string;
1763
+ /**
1764
+ * Style to apply to error messages.
1765
+ *
1766
+ * @param text - The error message.
1767
+ * @returns The styled error message.
1768
+ *
1769
+ * @defaultValue
1770
+ * ```ts
1771
+ * // import colors from 'yoctocolors-cjs';
1772
+ * (text) => colors.red(`> ${text}`)
1773
+ * ```
1774
+ */
1775
+ error: (text: string) => string;
1776
+ /**
1777
+ * Style to apply to the default answer when one is provided.
1778
+ *
1779
+ * @param text - The default answer.
1780
+ * @returns The styled default answer.
1781
+ *
1782
+ * @defaultValue
1783
+ * ```ts
1784
+ * // import colors from 'yoctocolors-cjs';
1785
+ * (text) => colors.dim(`(${text})`)
1786
+ * ```
1787
+ */
1788
+ defaultAnswer: (text: string) => string;
1789
+ /**
1790
+ * Style to apply to help text.
1791
+ *
1792
+ * @param text - The help text.
1793
+ * @returns The styled help text.
1794
+ *
1795
+ * @defaultValue
1796
+ * ```ts
1797
+ * // import colors from 'yoctocolors-cjs';
1798
+ * (text) => colors.dim(text)
1799
+ * ```
1800
+ */
1801
+ help: (text: string) => string;
1802
+ /**
1803
+ * Style to apply to highlighted text.
1804
+ *
1805
+ * @param text - The text to highlight.
1806
+ * @returns The highlighted text.
1807
+ *
1808
+ * @defaultValue
1809
+ * ```ts
1810
+ * // import colors from 'yoctocolors-cjs';
1811
+ * (text) => colors.cyan(text)
1812
+ * ```
1813
+ */
1814
+ highlight: (text: string) => string;
1815
+ /**
1816
+ * Style to apply to keyboard keys referred to in help texts.
1817
+ *
1818
+ * @param text - The key to style.
1819
+ * @returns The styled key.
1820
+ *
1821
+ * @defaultValue
1822
+ * ```ts
1823
+ * // import colors from 'yoctocolors-cjs';
1824
+ * (text) => colors.cyan(colors.bold(`<${text}>`))
1825
+ * ```
1826
+ */
1827
+ key: (text: string) => string;
1828
+ };
1829
+ };
1830
+ type Theme<Extension extends object = object> = Prettify<Extension & DefaultTheme>;
1831
+
1671
1832
  type NormalizedPackageJson = Package & PackageJson;
1672
1833
  type PackageJson = PackageJson$1;
1673
1834
  type Cache<T = any> = Map<string, T>;
@@ -1693,5 +1854,18 @@ declare const hasPackageJsonProperty: (packageJson: NormalizedPackageJson, prope
1693
1854
  declare const hasPackageJsonAnyDependency: (packageJson: NormalizedPackageJson, arguments_: string[], options?: {
1694
1855
  peerDeps?: boolean;
1695
1856
  }) => boolean;
1857
+ declare const ensurePackages: (packageJson: NormalizedPackageJson, packages: string[], installKey?: "dependencies" | "devDependencies", options?: {
1858
+ confirm?: {
1859
+ default?: boolean;
1860
+ message: string;
1861
+ theme?: PartialDeep<Theme>;
1862
+ transformer?: (value: boolean) => string;
1863
+ };
1864
+ cwd?: URL | string;
1865
+ deps?: boolean;
1866
+ devDeps?: boolean;
1867
+ installPackage?: Omit<InstallPackageOptions, "cwd" | "dev">;
1868
+ peerDeps?: boolean;
1869
+ }) => Promise<void>;
1696
1870
 
1697
- export { type NormalizedReadResult as N, type PackageJson as P, findPackageJsonSync as a, hasPackageJsonProperty as b, writePackageJsonSync as c, type NormalizedPackageJson as d, findPackageJson as f, getPackageJsonProperty as g, hasPackageJsonAnyDependency as h, parsePackageJson as p, writePackageJson as w };
1871
+ export { type NormalizedReadResult as N, type PackageJson as P, findPackageJsonSync as a, hasPackageJsonProperty as b, writePackageJsonSync as c, type NormalizedPackageJson as d, ensurePackages as e, findPackageJson as f, getPackageJsonProperty as g, hasPackageJsonAnyDependency as h, parsePackageJson as p, writePackageJson as w };
@@ -1,3 +1,4 @@
1
+ import { InstallPackageOptions } from '@antfu/install-pkg';
1
2
  import { WriteJsonOptions } from '@visulima/fs';
2
3
  import { Package } from 'normalize-package-data';
3
4
 
@@ -1668,6 +1669,166 @@ PackageJson$1.TypeScriptConfiguration &
1668
1669
  PackageJson$1.YarnConfiguration &
1669
1670
  PackageJson$1.JSPMConfiguration;
1670
1671
 
1672
+ type Prettify<T> = {
1673
+ [K in keyof T]: T[K];
1674
+ } & {};
1675
+ type PartialDeep<T> = T extends object ? {
1676
+ [P in keyof T]?: PartialDeep<T[P]>;
1677
+ } : T;
1678
+
1679
+ /**
1680
+ * Union type representing the possible statuses of a prompt.
1681
+ *
1682
+ * - `'loading'`: The prompt is currently loading.
1683
+ * - `'idle'`: The prompt is loaded and currently waiting for the user to
1684
+ * submit an answer.
1685
+ * - `'done'`: The user has submitted an answer and the prompt is finished.
1686
+ * - `string`: Any other string: The prompt is in a custom state.
1687
+ */
1688
+ type Status = 'loading' | 'idle' | 'done' | (string & {});
1689
+ type DefaultTheme = {
1690
+ /**
1691
+ * Prefix to prepend to the message. If a function is provided, it will be
1692
+ * called with the current status of the prompt, and the return value will be
1693
+ * used as the prefix.
1694
+ *
1695
+ * @remarks
1696
+ * If `status === 'loading'`, this property is ignored and the spinner (styled
1697
+ * by the `spinner` property) will be displayed instead.
1698
+ *
1699
+ * @defaultValue
1700
+ * ```ts
1701
+ * // import colors from 'yoctocolors-cjs';
1702
+ * (status) => status === 'done' ? colors.green('✔') : colors.blue('?')
1703
+ * ```
1704
+ */
1705
+ prefix: string | Prettify<Omit<Record<Status, string>, 'loading'>>;
1706
+ /**
1707
+ * Configuration for the spinner that is displayed when the prompt is in the
1708
+ * `'loading'` state.
1709
+ *
1710
+ * We recommend the use of {@link https://github.com/sindresorhus/cli-spinners|cli-spinners} for a list of available spinners.
1711
+ */
1712
+ spinner: {
1713
+ /**
1714
+ * The time interval between frames, in milliseconds.
1715
+ *
1716
+ * @defaultValue
1717
+ * ```ts
1718
+ * 80
1719
+ * ```
1720
+ */
1721
+ interval: number;
1722
+ /**
1723
+ * A list of frames to show for the spinner.
1724
+ *
1725
+ * @defaultValue
1726
+ * ```ts
1727
+ * ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏']
1728
+ * ```
1729
+ */
1730
+ frames: string[];
1731
+ };
1732
+ /**
1733
+ * Object containing functions to style different parts of the prompt.
1734
+ */
1735
+ style: {
1736
+ /**
1737
+ * Style to apply to the user's answer once it has been submitted.
1738
+ *
1739
+ * @param text - The user's answer.
1740
+ * @returns The styled answer.
1741
+ *
1742
+ * @defaultValue
1743
+ * ```ts
1744
+ * // import colors from 'yoctocolors-cjs';
1745
+ * (text) => colors.cyan(text)
1746
+ * ```
1747
+ */
1748
+ answer: (text: string) => string;
1749
+ /**
1750
+ * Style to apply to the message displayed to the user.
1751
+ *
1752
+ * @param text - The message to style.
1753
+ * @param status - The current status of the prompt.
1754
+ * @returns The styled message.
1755
+ *
1756
+ * @defaultValue
1757
+ * ```ts
1758
+ * // import colors from 'yoctocolors-cjs';
1759
+ * (text, status) => colors.bold(text)
1760
+ * ```
1761
+ */
1762
+ message: (text: string, status: Status) => string;
1763
+ /**
1764
+ * Style to apply to error messages.
1765
+ *
1766
+ * @param text - The error message.
1767
+ * @returns The styled error message.
1768
+ *
1769
+ * @defaultValue
1770
+ * ```ts
1771
+ * // import colors from 'yoctocolors-cjs';
1772
+ * (text) => colors.red(`> ${text}`)
1773
+ * ```
1774
+ */
1775
+ error: (text: string) => string;
1776
+ /**
1777
+ * Style to apply to the default answer when one is provided.
1778
+ *
1779
+ * @param text - The default answer.
1780
+ * @returns The styled default answer.
1781
+ *
1782
+ * @defaultValue
1783
+ * ```ts
1784
+ * // import colors from 'yoctocolors-cjs';
1785
+ * (text) => colors.dim(`(${text})`)
1786
+ * ```
1787
+ */
1788
+ defaultAnswer: (text: string) => string;
1789
+ /**
1790
+ * Style to apply to help text.
1791
+ *
1792
+ * @param text - The help text.
1793
+ * @returns The styled help text.
1794
+ *
1795
+ * @defaultValue
1796
+ * ```ts
1797
+ * // import colors from 'yoctocolors-cjs';
1798
+ * (text) => colors.dim(text)
1799
+ * ```
1800
+ */
1801
+ help: (text: string) => string;
1802
+ /**
1803
+ * Style to apply to highlighted text.
1804
+ *
1805
+ * @param text - The text to highlight.
1806
+ * @returns The highlighted text.
1807
+ *
1808
+ * @defaultValue
1809
+ * ```ts
1810
+ * // import colors from 'yoctocolors-cjs';
1811
+ * (text) => colors.cyan(text)
1812
+ * ```
1813
+ */
1814
+ highlight: (text: string) => string;
1815
+ /**
1816
+ * Style to apply to keyboard keys referred to in help texts.
1817
+ *
1818
+ * @param text - The key to style.
1819
+ * @returns The styled key.
1820
+ *
1821
+ * @defaultValue
1822
+ * ```ts
1823
+ * // import colors from 'yoctocolors-cjs';
1824
+ * (text) => colors.cyan(colors.bold(`<${text}>`))
1825
+ * ```
1826
+ */
1827
+ key: (text: string) => string;
1828
+ };
1829
+ };
1830
+ type Theme<Extension extends object = object> = Prettify<Extension & DefaultTheme>;
1831
+
1671
1832
  type NormalizedPackageJson = Package & PackageJson;
1672
1833
  type PackageJson = PackageJson$1;
1673
1834
  type Cache<T = any> = Map<string, T>;
@@ -1693,5 +1854,18 @@ declare const hasPackageJsonProperty: (packageJson: NormalizedPackageJson, prope
1693
1854
  declare const hasPackageJsonAnyDependency: (packageJson: NormalizedPackageJson, arguments_: string[], options?: {
1694
1855
  peerDeps?: boolean;
1695
1856
  }) => boolean;
1857
+ declare const ensurePackages: (packageJson: NormalizedPackageJson, packages: string[], installKey?: "dependencies" | "devDependencies", options?: {
1858
+ confirm?: {
1859
+ default?: boolean;
1860
+ message: string;
1861
+ theme?: PartialDeep<Theme>;
1862
+ transformer?: (value: boolean) => string;
1863
+ };
1864
+ cwd?: URL | string;
1865
+ deps?: boolean;
1866
+ devDeps?: boolean;
1867
+ installPackage?: Omit<InstallPackageOptions, "cwd" | "dev">;
1868
+ peerDeps?: boolean;
1869
+ }) => Promise<void>;
1696
1870
 
1697
- export { type NormalizedReadResult as N, type PackageJson as P, findPackageJsonSync as a, hasPackageJsonProperty as b, writePackageJsonSync as c, type NormalizedPackageJson as d, findPackageJson as f, getPackageJsonProperty as g, hasPackageJsonAnyDependency as h, parsePackageJson as p, writePackageJson as w };
1871
+ export { type NormalizedReadResult as N, type PackageJson as P, findPackageJsonSync as a, hasPackageJsonProperty as b, writePackageJsonSync as c, type NormalizedPackageJson as d, ensurePackages as e, findPackageJson as f, getPackageJsonProperty as g, hasPackageJsonAnyDependency as h, parsePackageJson as p, writePackageJson as w };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visulima/package",
3
- "version": "3.2.1",
3
+ "version": "3.3.0",
4
4
  "description": "One Package to rule them all, finds your root-dir, monorepo, or package manager.",
5
5
  "keywords": [
6
6
  "anolilab",
@@ -145,11 +145,15 @@
145
145
  "LICENSE.md"
146
146
  ],
147
147
  "dependencies": {
148
- "@visulima/fs": "2.3.2",
149
- "@visulima/path": "1.1.2",
150
- "normalize-package-data": "^7.0.0"
148
+ "@visulima/fs": "2.3.3",
149
+ "@visulima/path": "1.2.0",
150
+ "normalize-package-data": "^7.0.0",
151
+ "@inquirer/confirm": "^5.1.1",
152
+ "@antfu/install-pkg": "^0.5.0"
151
153
  },
152
154
  "devDependencies": {
155
+ "@inquirer/core": "^10.1.2",
156
+ "@inquirer/type": "^3.0.2",
153
157
  "@anolilab/eslint-config": "^15.0.3",
154
158
  "@anolilab/prettier-config": "^5.0.14",
155
159
  "@anolilab/semantic-release-pnpm": "^1.1.6",