@storm-software/bun-tools 0.0.7
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 +87 -0
- package/LICENSE +201 -0
- package/README.md +305 -0
- package/bin/bun.cjs +2659 -0
- package/bin/bun.js +2637 -0
- package/dist/chunk-3CHW2FOO.cjs +1 -0
- package/dist/chunk-7QKHH2VM.js +1 -0
- package/dist/chunk-CEGV7WAH.cjs +1 -0
- package/dist/chunk-D55VRNVR.cjs +1 -0
- package/dist/chunk-GGNOJ77I.js +0 -0
- package/dist/chunk-JXISZBJG.js +29 -0
- package/dist/chunk-NNTG4CIZ.js +1 -0
- package/dist/chunk-PJBAL7AE.js +0 -0
- package/dist/chunk-QOVB4LRJ.cjs +2 -0
- package/dist/chunk-RBC53R6W.js +2 -0
- package/dist/chunk-SAEQEYN6.cjs +29 -0
- package/dist/chunk-SFZRYJZ2.cjs +1 -0
- package/dist/chunk-U3RZMO6L.js +1 -0
- package/dist/chunk-WAL5SD4G.cjs +1 -0
- package/dist/helpers/catalog.cjs +1 -0
- package/dist/helpers/catalog.d.cts +84 -0
- package/dist/helpers/catalog.d.ts +84 -0
- package/dist/helpers/catalog.js +1 -0
- package/dist/helpers/format.cjs +1 -0
- package/dist/helpers/format.d.cts +9 -0
- package/dist/helpers/format.d.ts +9 -0
- package/dist/helpers/format.js +1 -0
- package/dist/helpers/index.cjs +1 -0
- package/dist/helpers/index.d.cts +5 -0
- package/dist/helpers/index.d.ts +5 -0
- package/dist/helpers/index.js +1 -0
- package/dist/helpers/package-json.cjs +1 -0
- package/dist/helpers/package-json.d.cts +44 -0
- package/dist/helpers/package-json.d.ts +44 -0
- package/dist/helpers/package-json.js +1 -0
- package/dist/helpers/replace-deps-aliases.cjs +1 -0
- package/dist/helpers/replace-deps-aliases.d.cts +11 -0
- package/dist/helpers/replace-deps-aliases.d.ts +11 -0
- package/dist/helpers/replace-deps-aliases.js +1 -0
- package/dist/helpers/workspace.cjs +1 -0
- package/dist/helpers/workspace.d.cts +26 -0
- package/dist/helpers/workspace.d.ts +26 -0
- package/dist/helpers/workspace.js +1 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +1 -0
- package/dist/types.cjs +1 -0
- package/dist/types.d.cts +14 -0
- package/dist/types.d.ts +14 -0
- package/dist/types.js +1 -0
- package/package.json +95 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function p(e){return (e??"").replace(/^===/g,"").replace(/^!==/g,"").replace(/^==/g,"").replace(/^!=/g,"").replace(/^>/g,"").replace(/^>=/g,"").replace(/^</g,"").replace(/^<=/g,"").replace(/^\^/g,"").replace(/^~/g,"")}export{p as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkQOVB4LRJ_cjs=require('./chunk-QOVB4LRJ.cjs'),chunkSAEQEYN6_cjs=require('./chunk-SAEQEYN6.cjs'),devkit=require('@nx/devkit'),fs=require('fs'),promises=require('fs/promises'),prettier=require('prettier');async function G(t=process.cwd(),f=chunkSAEQEYN6_cjs.e(t)){let g=chunkSAEQEYN6_cjs.d(t,"package.json"),l=await promises.readFile(g,"utf8");if(!l)throw new Error("No package.json file found in package root: "+t);let s=await chunkQOVB4LRJ_cjs.b(f),c=JSON.parse(l);if(!s){console.warn("No workspace catalog found. Skipping dependencies replacement for now.");return}for(let a of ["dependencies","devDependencies","peerDependencies"]){let o=c[a];if(o){for(let e of Object.keys(o))if(o[e]==="catalog:"){if(!s)throw new Error(`Dependency ${e} is marked as \`catalog:\`, but no catalog exists in the workspace root's \`package.json\` file.`);let n=s[e];if(!n)throw new Error("Missing workspace catalog version for "+e);o[e]=n;}else if(o[e].startsWith("catalog:"))throw new Error("multiple named catalogs not supported")}}let r;try{r=devkit.readCachedProjectGraph();}catch{await devkit.createProjectGraphAsync(),r=devkit.readCachedProjectGraph();}let i={};r&&await Promise.all(Object.keys(r.nodes).map(async a=>{let o=r.nodes[a];if(o?.data.root){let e=chunkSAEQEYN6_cjs.d(f,o.data.root,"package.json");if(fs.existsSync(e)){let n=await promises.readFile(e,"utf8"),p=JSON.parse(n);p.private!==true&&(i[p.name]=p.version);}}}));for(let a of ["dependencies","devDependencies","peerDependencies"]){let o=c[a];if(o){for(let e of Object.keys(o))if(o[e].startsWith("workspace:"))if(i[e])o[e]=`^${i[e]}`;else throw new Error(`Workspace dependency ${e} not found in workspace packages.`)}}return promises.writeFile(g,await prettier.format(JSON.stringify(c),{parser:"json",proseWrap:"preserve",trailingComma:"none",tabWidth:2,semi:true,singleQuote:false,quoteProps:"as-needed",insertPragma:false,bracketSameLine:true,printWidth:80,bracketSpacing:true,arrowParens:"avoid",endOfLine:"lf",plugins:["prettier-plugin-packagejson"]}))}exports.a=G;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkSAEQEYN6_cjs=require('./chunk-SAEQEYN6.cjs'),g=require('defu');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var g__default=/*#__PURE__*/_interopDefault(g);function d(a=chunkSAEQEYN6_cjs.e(process.cwd())){return chunkSAEQEYN6_cjs.h(a)}async function w(a=chunkSAEQEYN6_cjs.e(process.cwd())){let s=await chunkSAEQEYN6_cjs.i(a);if(s)return s}async function u(a,s=chunkSAEQEYN6_cjs.e(process.cwd())){let o=await chunkSAEQEYN6_cjs.i(s);if(!o)throw new Error("No package.json file found in workspace root");if(a.catalog&&chunkSAEQEYN6_cjs.k(o,a.catalog),!a.packages)throw new Error("No packages found in workspace file");Array.isArray(o.workspaces)||!o.workspaces?o.workspaces={packages:a.packages,catalog:a.catalog}:(o.workspaces.packages=g__default.default(a.packages,o.workspaces.packages),a.catalog&&(o.workspaces.catalog=g__default.default(a.catalog,o.workspaces.catalog))),await chunkSAEQEYN6_cjs.l(o,s);}exports.a=d;exports.b=w;exports.c=u;
|
|
File without changes
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import {loadConfig}from'c12';import _o from'defu';import'date-fns/formatDistanceToNow';import Wo from'chalk';import {existsSync}from'node:fs';import {join}from'node:path';import*as r from'zod/v4/mini';import {readFile,writeFile}from'node:fs/promises';import {format}from'prettier';var l={SILENT:0,FATAL:10,ERROR:20,WARN:30,SUCCESS:35,INFO:40,PERFORMANCE:50,DEBUG:60,TRACE:70,ALL:100},d={SILENT:"silent",FATAL:"fatal",ERROR:"error",WARN:"warn",SUCCESS:"success",INFO:"info",PERFORMANCE:"performance",DEBUG:"debug",TRACE:"trace",ALL:"all"};var S={dark:{brand:"#2dd4bf",success:"#10b981",info:"#58a6ff",debug:"#8afafc",warning:"#f3d371",danger:"#D8314A",fatal:"#a40e26",performance:"#80fd74"}};var Mo={hex:e=>o=>o,bgHex:e=>({whiteBright:o=>o,white:o=>o}),white:e=>e,whiteBright:e=>e,gray:e=>e,bold:{hex:e=>o=>o,bgHex:e=>({whiteBright:o=>o,white:o=>o}),whiteBright:e=>e,white:e=>e},dim:{hex:e=>o=>o,gray:e=>e}},te=()=>{let e=Wo;return (!e?.hex||!e?.bold?.hex||!e?.bgHex||!e?.whiteBright||!e?.white)&&(e=Mo),e};function se(){return process.platform!=="win32"?process.env.TERM!=="linux":!!process.env.WT_SESSION||!!process.env.TERMINUS_SUBLIME||process.env.ConEmuTask==="{cmd::Cmder}"||process.env.TERM_PROGRAM==="Terminus-Sublime"||process.env.TERM_PROGRAM==="vscode"||process.env.TERM==="xterm-256color"||process.env.TERM==="alacritty"||process.env.TERM==="rxvt-unicode"||process.env.TERM==="rxvt-unicode-256color"||process.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var O=(e,o)=>se()?e:o,v={[d.ERROR]:O("\u2718","\xD7"),[d.FATAL]:O("\u{1F571}","\xD7"),[d.WARN]:O("\u26A0","\u203C"),[d.INFO]:O("\u2139","i"),[d.PERFORMANCE]:O("\u23F1","\u23F1"),[d.SUCCESS]:O("\u2714","\u221A"),[d.DEBUG]:O("\u{1F6E0}","D"),[d.TRACE]:O("\u2699","T"),[d.ALL]:O("\u2709","\u2192")};var k=(e=false,o=new Date)=>e?`${o.toLocaleDateString()} ${o.toLocaleTimeString()}`:`${o.toLocaleTimeString()}`;var $=e=>{switch(e){case "all":return l.ALL;case "trace":return l.TRACE;case "debug":return l.DEBUG;case "performance":return l.PERFORMANCE;case "info":return l.INFO;case "warn":return l.WARN;case "error":return l.ERROR;case "fatal":return l.FATAL;case "silent":return l.SILENT;default:return l.INFO}},ne=(e=l.INFO)=>e>=l.ALL?d.ALL:e>=l.TRACE?d.TRACE:e>=l.DEBUG?d.DEBUG:e>=l.PERFORMANCE?d.PERFORMANCE:e>=l.INFO?d.INFO:e>=l.WARN?d.WARN:e>=l.ERROR?d.ERROR:e>=l.FATAL?d.FATAL:e<=l.SILENT?d.SILENT:d.INFO;var X=(e=l.INFO,o={},t={})=>{let{chalk:s=te(),fullDateTime:a=false,hideDateTime:i=false}=t,c=!o.colors?.dark&&!o.colors?.base&&!o.colors?.base?.dark?S:o.colors?.dark&&typeof o.colors.dark=="string"?o.colors:o.colors?.base?.dark&&typeof o.colors.base.dark=="string"?o.colors.base.dark:o.colors?.base?o.colors?.base:S,p=o.logLevel||process.env.STORM_LOG_LEVEL||d.INFO;return e>$(p)||e<=l.SILENT||$(p)<=l.SILENT?g=>{}:typeof e=="number"&&l.FATAL>=e?g=>{console.error(`
|
|
2
|
+
${i?"":`${s.gray(k(a))} `}${s.hex(c.fatal??S.dark.fatal)(`[${v[d.FATAL]} Fatal] `)}${s.bold.whiteBright(T(g))}
|
|
3
|
+
`);}:typeof e=="number"&&l.ERROR>=e?g=>{console.error(`
|
|
4
|
+
${i?"":`${s.gray(k(a))} `}${s.hex(c.danger??S.dark.danger)(`[${v[d.ERROR]} Error] `)}${s.bold.whiteBright(T(g))}
|
|
5
|
+
`);}:typeof e=="number"&&l.WARN>=e?g=>{console.warn(`
|
|
6
|
+
${i?"":`${s.gray(k(a))} `}${s.hex(c.warning??S.dark.warning)(`[${v[d.WARN]} Warn] `)}${s.bold.whiteBright(T(g))}
|
|
7
|
+
`);}:typeof e=="number"&&l.SUCCESS>=e?g=>{console.info(`
|
|
8
|
+
${i?"":`${s.gray(k(a))} `}${s.hex(c.success??S.dark.success)(`[${v[d.SUCCESS]} Success] `)}${s.bold.whiteBright(T(g))}
|
|
9
|
+
`);}:typeof e=="number"&&l.INFO>=e?g=>{console.info(`
|
|
10
|
+
${i?"":`${s.gray(k(a))} `}${s.hex(c.info??S.dark.info)(`[${v[d.INFO]} Info] `)}${s.bold.whiteBright(T(g))}
|
|
11
|
+
`);}:typeof e=="number"&&l.PERFORMANCE>=e?g=>{console.debug(`
|
|
12
|
+
${i?"":`${s.gray(k(a))} `}${s.hex(c.performance??S.dark.performance)(`[${v[d.PERFORMANCE]} Performance] `)}${s.bold.whiteBright(T(g))}
|
|
13
|
+
`);}:typeof e=="number"&&l.DEBUG>=e?g=>{console.debug(`
|
|
14
|
+
${i?"":`${s.gray(k(a))} `}${s.hex(c.debug??S.dark.debug)(`[${v[d.DEBUG]} Debug] `)}${s.bold.whiteBright(T(g))}
|
|
15
|
+
`);}:typeof e=="number"&&l.TRACE>=e?g=>{console.debug(`
|
|
16
|
+
${i?"":`${s.gray(k(a))} `}${s.hex("#bbbbbb")(`[${v[d.TRACE]} Trace] `)}${s.bold.whiteBright(T(g))}
|
|
17
|
+
`);}:g=>{console.log(`
|
|
18
|
+
${i?"":`${s.gray(k(a))} `}${s.hex(c.brand??S.dark.brand)(`[${v[d.ALL]} System] `)}${s.bold.whiteBright(T(g))}
|
|
19
|
+
`);}};var ae=(e,o)=>X(l.WARN,o)(e);var Jr=(e,o)=>X(l.DEBUG,o)(e),A=(e,o)=>X(l.TRACE,o)(e);var Fo=10,T=(e,o={},t=0)=>{if(t>Fo)return "<max depth>";let s=o.prefix??"",a=o.skip??[],i=o.sort??true;return typeof e>"u"||e===null?"<empty>":typeof e=="string"?e||"<empty string>":Array.isArray(e)?`
|
|
20
|
+
${e.sort(i?(c,p)=>!c&&!p?0:c?p?String(c).localeCompare(String(p)):-1:1:void 0).map((c,p)=>` ${s}> #${p} = ${T(c,{prefix:`${s}--`,skip:a,sort:i},t+1)}`).join(`
|
|
21
|
+
`)}`:typeof e=="object"&&e?`
|
|
22
|
+
${Object.keys(e).filter(c=>typeof c!="string"||!a.map(p=>p.toLowerCase().trim()).includes(c.toLowerCase().trim())).sort(i?(c,p)=>!c&&!p?0:c?p?String(c).localeCompare(String(p)):-1:1:void 0).map(c=>` ${s}> ${c} = ${Uo(e[c])?"<function>":typeof e[c]=="object"&&e[c]?Object.keys(e[c]).filter(p=>typeof p!="string"||!a.map(g=>g.toLowerCase().trim()).includes(p.toLowerCase().trim())).length===0?"{}":T(e[c],{prefix:`${s}--`,skip:a,sort:i},t+1):e[c]}`).join(`
|
|
23
|
+
`)}`:String(e)},Uo=e=>{try{return e instanceof Function||typeof e=="function"||!!(e?.constructor&&e?.call&&e?.apply)}catch{return false}};var jo=/^[A-Za-z]:\//;function Bo(e=""){return e&&e.replace(/\\/g,"/").replace(jo,o=>o.toUpperCase())}var Ho=/^[/\\]{2}/,Ko=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,Yo=/^[A-Za-z]:$/;var m=function(e){if(!e||e.length===0)return ".";e=Bo(e);let o=e?.match(Ho),t=ie(e),s=e[e.length-1]==="/";return e=Zo(e,!t),e.length===0?t?"/":s?"./":".":(s&&(e+="/"),Yo.test(e)&&(e+="/"),o?t?`//${e}`:`//./${e}`:t&&!ie(e)?`/${e}`:e)},R=function(...e){let o="";for(let t of e)if(t)if(o.length>0){let s=o[o.length-1]==="/",a=t[0]==="/";s&&a?o+=t.slice(1):o+=s||a?t:`/${t}`;}else o+=t;return m(o)};function Zo(e,o){let t="",s=0,a=-1,i=0,c=null;for(let p=0;p<=e.length;++p){if(p<e.length)c=e[p];else {if(c==="/")break;c="/";}if(c==="/"){if(!(a===p-1||i===1))if(i===2){if(t.length<2||s!==2||t[t.length-1]!=="."||t[t.length-2]!=="."){if(t.length>2){let g=t.lastIndexOf("/");g===-1?(t="",s=0):(t=t.slice(0,g),s=t.length-1-t.lastIndexOf("/")),a=p,i=0;continue}else if(t.length>0){t="",s=0,a=p,i=0;continue}}o&&(t+=t.length>0?"/..":"..",s=2);}else t.length>0?t+=`/${e.slice(a+1,p)}`:t=e.slice(a+1,p),s=p-a-1;a=p,i=0;}else c==="."&&i!==-1?++i:i=-1;}return t}var ie=function(e){return Ko.test(e)};var Vo=30,Jo=0;function Q(e,o=[],t=[]){let s=e??process.cwd();if(t.some(a=>existsSync(join(s,a)))||o.some(a=>existsSync(join(s,a))))return s;if(s!=="/"&&Jo++<Vo){let a=join(s,"..");return Q(a,o,t)}}var pe=["storm-workspace.json","storm-workspace.yaml","storm-workspace.yml","storm-workspace.js","storm-workspace.ts",".storm-workspace.json",".storm-workspace.yaml",".storm-workspace.yml",".storm-workspace.js",".storm-workspace.ts","lerna.json","nx.json","turbo.json","npm-workspace.json","yarn-workspace.json","pnpm-workspace.json","npm-workspace.yaml","yarn-workspace.yaml","pnpm-workspace.yaml","npm-workspace.yml","yarn-workspace.yml","pnpm-workspace.yml","npm-lock.json","yarn-lock.json","pnpm-lock.json","npm-lock.yaml","yarn-lock.yaml","pnpm-lock.yaml","npm-lock.yml","yarn-lock.yml","pnpm-lock.yml","bun.lockb"],Xo=[".storm-workspace",".nx",".git",".github",".vscode",".verdaccio"];function qo(e){return process.env.STORM_WORKSPACE_ROOT||process.env.NX_WORKSPACE_ROOT_PATH?m(process.env.STORM_WORKSPACE_ROOT??process.env.NX_WORKSPACE_ROOT_PATH):m(Q(e??process.cwd(),pe,Xo))}function E(e){let o=qo(e);if(!o)throw new Error(`Cannot find workspace root upwards from known path. Files search list includes:
|
|
24
|
+
${pe.join(`
|
|
25
|
+
`)}
|
|
26
|
+
Path: ${e||process.cwd()}`);return o}var le="https://docs.stormsoftware.com",I="https://stormsoftware.com";var de="https://stormsoftware.com/license",me="Apache-2.0";var w="tools/errors/codes.json",ge="The workspace's banner image";var n=r.registry(),C=r.string().check(r.length(7),r.toLowerCase(),r.regex(/^#([0-9a-f]{3}){1,2}$/i),r.trim());n.add(C,{description:"A base schema for describing the format of colors"});var b=r._default(C,"#1e2124");n.add(b,{description:"The dark background color of the workspace"});var z=r._default(C,"#cbd5e1");n.add(z,{description:"The light background color of the workspace"});var x=r._default(C,"#1fb2a6");n.add(x,{description:"The primary brand specific color of the workspace"});var D=r.optional(C);n.add(D,{description:"The alternate brand specific color of the workspace"});var G=r.optional(C);n.add(G,{description:"The secondary brand specific color of the workspace"});var P=r._default(C,"#3fa6ff");n.add(P,{description:"The color used to display hyperlink text"});var W=r._default(C,"#818cf8");n.add(W,{description:"The second brand specific color of the workspace"});var M=r._default(C,"#45b27e");n.add(M,{description:"The success color of the workspace"});var F=r._default(C,"#38bdf8");n.add(F,{description:"The informational color of the workspace"});var U=r._default(C,"#8afafc");n.add(U,{description:"The debug color of the workspace"});var j=r._default(C,"#f3d371");n.add(j,{description:"The warning color of the workspace"});var B=r._default(C,"#d8314a");n.add(B,{description:"The danger color of the workspace"});var H=r.optional(C);n.add(H,{description:"The fatal color of the workspace"});var K=r._default(C,"#80fd74");n.add(K,{description:"The performance color of the workspace"});var Y=r._default(C,"#4ade80");n.add(Y,{description:"The positive number color of the workspace"});var Z=r._default(C,"#ef4444");n.add(Z,{description:"The negative number color of the workspace"});var V=r.optional(r.array(C));n.add(V,{description:"The color stops for the base gradient color pattern used in the workspace"});var rr=r.object({foreground:z,background:b,brand:x,alternate:D,accent:G,link:P,discovery:W,success:M,info:F,debug:U,warning:j,danger:B,fatal:H,performance:K,positive:Y,negative:Z,gradient:V}),tr=r.object({foreground:b,background:z,brand:x,alternate:D,accent:G,link:P,discovery:W,success:M,info:F,debug:U,warning:j,danger:B,fatal:H,performance:K,positive:Y,negative:Z,gradient:V}),sr=r.object({dark:rr,light:tr}),nr=r.object({dark:b,light:z,brand:x,alternate:D,accent:G,link:P,discovery:W,success:M,info:F,debug:U,warning:j,danger:B,fatal:H,performance:K,positive:Y,negative:Z,gradient:V}),_=r.optional(r.url());n.add(_,{description:"A remote registry URL used to publish distributable packages"});var ue=r._default(r.object({github:_,npm:_,cargo:_,cyclone:_,container:_}),{});n.add(ue,{description:"A list of remote registry URLs used by Storm Software"});var ee=r.union([nr,sr]);n.add(ee,{description:"Colors used for various workspace elements"});var fe=r.record(r.union([r.union([r.literal("base"),r.string()]),r.string()]),ee);n.add(fe,{description:"Storm theme config values used for styling various package elements"});var he=r.optional(r.union([r.string().check(r.trim()),r.array(r.string().check(r.trim()))]));n.add(he,{description:"The path to a base config file to use as a configuration preset file. Documentation can be found at https://github.com/unjs/c12#extending-configuration."});var Ce=r.string().check(r.trim());n.add(Ce,{description:"The workspace bot user's name (this is the bot that will be used to perform various tasks)"});var Te=r.string().check(r.trim());n.add(Te,{description:"The email of the workspace bot"});var Ee=r.object({name:Ce,email:Te});n.add(Ee,{description:"The workspace's bot user's config used to automated various operations tasks"});var Re=r.optional(r.string().check(r.trim(),r.url()));n.add(Re,{description:"A URL to a banner image used to display the workspace's release"});var Se=r._default(r.string().check(r.trim()),ge);n.add(Se,{description:"The alt text for the workspace's release banner image"});var ve=r.object({url:Re,alt:Se});n.add(ve,{description:"The workspace's banner image used during the release process"});var ke=r.optional(r.string().check(r.trim()));n.add(ke,{description:"A header message appended to the start of the workspace's release notes"});var Oe=r.optional(r.string().check(r.trim()));n.add(Oe,{description:"A footer message appended to the end of the workspace's release notes"});var Ae=r.object({banner:r.union([ve,r.string().check(r.trim(),r.url())]),header:ke,footer:Oe});n.add(Ae,{description:"The workspace's release config used during the release process"});var $e=r.optional(r.string().check(r.trim()));n.add($e,{description:"A Twitter/X account associated with the organization/project"});var _e=r.optional(r.string().check(r.trim()));n.add(_e,{description:"A Discord account associated with the organization/project"});var Le=r.optional(r.string().check(r.trim()));n.add(Le,{description:"A Telegram account associated with the organization/project"});var Ie=r.optional(r.string().check(r.trim()));n.add(Ie,{description:"A Slack account associated with the organization/project"});var ye=r.optional(r.string().check(r.trim()));n.add(ye,{description:"A Medium account associated with the organization/project"});var Ne=r.optional(r.string().check(r.trim()));n.add(Ne,{description:"A GitHub account associated with the organization/project"});var we=r.object({twitter:$e,discord:_e,telegram:Le,slack:Ie,medium:ye,github:Ne});n.add(we,{description:"The workspace's account config used to store various social media links"});var be=r.optional(r.string().check(r.trim()));n.add(be,{description:"The directory used to store the environment's cached file data"});var ze=r.optional(r.string().check(r.trim()));n.add(ze,{description:"The directory used to store the environment's data files"});var xe=r.optional(r.string().check(r.trim()));n.add(xe,{description:"The directory used to store the environment's configuration files"});var De=r.optional(r.string().check(r.trim()));n.add(De,{description:"The directory used to store the environment's temp files"});var Ge=r.optional(r.string().check(r.trim()));n.add(Ge,{description:"The directory used to store the environment's log files"});var Pe=r._default(r.string().check(r.trim()),"dist");n.add(Pe,{description:"The directory used to store the workspace's distributable files after a build (relative to the workspace root)"});var We=r.object({cache:be,data:ze,config:xe,temp:De,log:Ge,build:Pe});n.add(We,{description:"Various directories used by the workspace to store data, cache, and configuration files"});var Me=r._default(r.enum(["minimal","monorepo"]),"monorepo");n.add(Me,{description:"The variant of the workspace. This can be used to enable or disable certain features or configurations."});var Fe=r._default(r.string().check(r.trim()),w);n.add(Fe,{description:"The path to the workspace's error codes JSON file"});var Ue=r.optional(r.url());n.add(Ue,{description:"A URL to a page that looks up the workspace's error messages given a specific error code"});var je=r.object({codesFile:Fe,url:Ue});n.add(je,{description:"The workspace's error config used when creating error details during a system error"});var Be=r.optional(r.string().check(r.trim(),r.toLowerCase()));n.add(Be,{description:"The name of the organization"});var He=r.optional(r.string().check(r.trim()));n.add(He,{description:"A description of the organization"});var Ke=r.optional(r.url());n.add(Ke,{description:"A URL to the organization's logo image"});var Ye=r.optional(r.url());n.add(Ye,{description:"A URL to the organization's icon image"});var Ze=r.optional(r.url());n.add(Ze,{description:"A URL to a page that provides more information about the organization"});var Ve=r.object({name:Be,description:He,logo:Ke,icon:Ye,url:Ze});n.add(Ve,{description:"The workspace's organization details"});var Je=r._default(r.string().check(r.trim(),r.toLowerCase()),"https://public.storm-cdn.com/schemas/storm-workspace.schema.json");n.add(Je,{description:"The URL or file path to the JSON schema file that describes the Storm configuration file"});var Xe=r.string().check(r.trim(),r.toLowerCase());n.add(Xe,{description:"The name of the workspace/project/service/package/scope using this configuration"});var qe=r.string().check(r.trim(),r.toLowerCase());n.add(qe,{description:"The namespace of the workspace/project/service/package/scope using this configuration"});var Qe=r.union([Ve,r.string().check(r.trim(),r.toLowerCase())]);n.add(Qe,{description:"The organization of the workspace. This can be a string or an object containing the organization's details"});var eo=r.string().check(r.trim(),r.toLowerCase());n.add(eo,{description:"The repo URL of the workspace (i.e. the GitHub repository URL)"});var oo=r._default(r.string().check(r.trim()),"Apache-2.0");n.add(oo,{description:"The license type of the package"});var ro=r.optional(r.url());n.add(ro,{description:"The homepage of the workspace"});var to=r.optional(r.url());n.add(to,{description:"The documentation site for the workspace"});var so=r.optional(r.url());n.add(so,{description:"The development portal site for the workspace"});var no=r.optional(r.url());n.add(no,{description:"The licensing site for the workspace"});var ao=r.optional(r.url());n.add(ao,{description:"The contact site for the workspace"});var io=r.optional(r.url());n.add(io,{description:"The support site for the workspace. If not provided, this is defaulted to the `contact` config value"});var co=r._default(r.string().check(r.trim(),r.toLowerCase()),"main");n.add(co,{description:"The branch of the workspace"});var po=r.optional(r.string().check(r.trim(),r.toLowerCase()));n.add(po,{description:"A tag specifying the version pre-release identifier"});var lo=r.optional(r.string().check(r.trim(),r.toLowerCase()));n.add(lo,{description:"The owner of the package"});var mo=r._default(r.enum(["development","test","production"]).check(r.trim(),r.toLowerCase()),"production");n.add(mo,{description:"The current runtime environment mode for the package"});var go=r.string().check(r.trim(),r.toLowerCase());n.add(go,{description:"The root directory of the workspace"});var uo=r._default(r.boolean(),false);n.add(uo,{description:"Should all known types of workspace caching be skipped?"});var fo=r._default(r.enum(["npm","yarn","pnpm","bun"]),"npm");n.add(fo,{description:"The JavaScript/TypeScript package manager used by the repository"});var ho=r._default(r.string().check(r.trim()),"America/New_York");n.add(ho,{description:"The default timezone of the workspace"});var Co=r._default(r.string().check(r.trim()),"en-US");n.add(Co,{description:"The default locale of the workspace"});var To=r._default(r.enum(["silent","fatal","error","warn","success","info","performance","debug","trace","all"]),"info");n.add(To,{description:"The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)."});var Eo=r._default(r.boolean(),true);n.add(Eo,{description:"Should the logging of the current Storm Workspace configuration be skipped?"});var Ro=r._default(r.nullable(r.string().check(r.trim())),null);n.add(Ro,{description:"The filepath of the Storm config. When this field is null, no config file was found in the current workspace."});var oe=r._default(r.record(r.string(),r.any()),{});n.add(oe,{description:"Configuration of each used extension"});var So=r.object({$schema:Je,extends:he,name:Xe,variant:Me,namespace:qe,organization:Qe,repository:eo,license:oo,homepage:ro,docs:to,portal:so,licensing:no,contact:ao,support:io,branch:co,preid:po,owner:lo,bot:Ee,release:Ae,socials:we,error:je,mode:mo,workspaceRoot:go,skipCache:uo,directories:We,packageManager:fo,timezone:ho,locale:Co,logLevel:To,skipConfigLogging:Eo,registry:ue,configFile:Ro,colors:r.union([ee,fe]),extensions:oe});n.add(oe,{description:"Storm Workspace config values used during various dev-ops processes. This type is a combination of the StormPackageConfig and StormProject types. It represents the config of the entire monorepo."});var vo=["dark","light","base","brand","alternate","accent","link","success","discovery","info","warning","danger","fatal","performance","positive","negative"];async function ko(e){let o=me,t,s,a,i,c,p=E(e);if(existsSync(join(p,"package.json"))){let g=await readFile(R(p,"package.json"),"utf8");if(g){let h=JSON.parse(g);h.name&&(a=h.name),h.namespace&&(i=h.namespace),h.repository&&(typeof h.repository=="string"?c=h.repository:h.repository.url&&(c=h.repository.url)),h.license&&(o=h.license),h.homepage&&(t=h.homepage),h.bugs&&(typeof h.bugs=="string"?s=h.bugs:h.bugs.url&&(s=h.bugs.url));}}return {workspaceRoot:p,name:a,namespace:i,repository:c,license:o,homepage:t,support:s}}function Oo(e){return !e.support&&e.contact&&(e.support=e.contact),!e.contact&&e.support&&(e.contact=e.support),e.homepage&&(e.docs||(e.docs=`${e.homepage}/docs`),e.license||(e.license=`${e.homepage}/license`),e.support||(e.support=`${e.homepage}/support`),e.contact||(e.contact=`${e.homepage}/contact`),(!e.error?.codesFile||!e?.error?.url)&&(e.error??={codesFile:w},e.homepage&&(e.error.url??=`${e.homepage}/errors`))),e}var $o=async(e,o,t={})=>{let s=o||E(o),a=await Promise.all([loadConfig({cwd:s,packageJson:true,name:e,envName:e?.toUpperCase(),jitiOptions:{debug:false,fsCache:process.env.STORM_SKIP_CACHE==="true"?false:R(process.env.STORM_CACHE_DIR||"node_modules/.cache/storm","jiti")},...t}),loadConfig({cwd:s,packageJson:true,name:e,envName:e?.toUpperCase(),jitiOptions:{debug:false,fsCache:process.env.STORM_SKIP_CACHE==="true"?false:R(process.env.STORM_CACHE_DIR||"node_modules/.cache/storm","jiti")},configFile:e,...t})]);return _o(a[0]??{},a[1]??{})},Lo=async(e,o=[])=>{let t=e||E(e),s=await $o("storm-workspace",t),a=s.config,i=s.configFile;if(a&&i&&Object.keys(a).length>0&&!a.skipConfigLogging&&A(`Found Storm configuration file "${i.includes(`${t}/`)?i.replace(`${t}/`,""):i}" at "${t}"`,{logLevel:"all"}),o&&o.length>0){let c=await Promise.all(o.map(p=>$o(p,t)));for(let p of c)p?.config&&p?.configFile&&Object.keys(p.config).length>0&&(!a.skipConfigLogging&&!p.config.skipConfigLogging&&A(`Found alternative configuration file "${p.configFile.includes(`${t}/`)?p.configFile.replace(`${t}/`,""):p.configFile}" at "${t}"`,{logLevel:"all"}),a=_o(p.config??{},a??{}));}if(!(!a||Object.keys(a).length===0))return a.configFile=i,a};var wo=()=>{let e="STORM_",o={extends:process.env[`${e}EXTENDS`]||void 0,name:process.env[`${e}NAME`]||void 0,variant:process.env[`${e}VARIANT`]||void 0,namespace:process.env[`${e}NAMESPACE`]||void 0,owner:process.env[`${e}OWNER`]||void 0,bot:{name:process.env[`${e}BOT_NAME`]||void 0,email:process.env[`${e}BOT_EMAIL`]||void 0},release:{banner:{url:process.env[`${e}RELEASE_BANNER_URL`]||void 0,alt:process.env[`${e}RELEASE_BANNER_ALT`]||void 0},header:process.env[`${e}RELEASE_HEADER`]||void 0,footer:process.env[`${e}RELEASE_FOOTER`]||void 0},error:{codesFile:process.env[`${e}ERROR_CODES_FILE`]||void 0,url:process.env[`${e}ERROR_URL`]||void 0},socials:{twitter:process.env[`${e}SOCIAL_TWITTER`]||void 0,discord:process.env[`${e}SOCIAL_DISCORD`]||void 0,telegram:process.env[`${e}SOCIAL_TELEGRAM`]||void 0,slack:process.env[`${e}SOCIAL_SLACK`]||void 0,medium:process.env[`${e}SOCIAL_MEDIUM`]||void 0,github:process.env[`${e}SOCIAL_GITHUB`]||void 0},organization:process.env[`${e}ORG`]||process.env[`${e}ORGANIZATION`]||process.env[`${e}ORG_NAME`]||process.env[`${e}ORGANIZATION_NAME`]?process.env[`${e}ORG_DESCRIPTION`]||process.env[`${e}ORGANIZATION_DESCRIPTION`]||process.env[`${e}ORG_URL`]||process.env[`${e}ORGANIZATION_URL`]||process.env[`${e}ORG_LOGO`]||process.env[`${e}ORGANIZATION_LOGO`]?{name:process.env[`${e}ORG`]||process.env[`${e}ORGANIZATION`]||process.env[`${e}ORG_NAME`]||process.env[`${e}ORGANIZATION_NAME`],description:process.env[`${e}ORG_DESCRIPTION`]||process.env[`${e}ORGANIZATION_DESCRIPTION`]||void 0,url:process.env[`${e}ORG_URL`]||process.env[`${e}ORGANIZATION_URL`]||void 0,logo:process.env[`${e}ORG_LOGO`]||process.env[`${e}ORGANIZATION_LOGO`]||void 0,icon:process.env[`${e}ORG_ICON`]||process.env[`${e}ORGANIZATION_ICON`]||void 0}:process.env[`${e}ORG`]||process.env[`${e}ORGANIZATION`]||process.env[`${e}ORG_NAME`]||process.env[`${e}ORGANIZATION_NAME`]:void 0,packageManager:process.env[`${e}PACKAGE_MANAGER`]||void 0,license:process.env[`${e}LICENSE`]||void 0,homepage:process.env[`${e}HOMEPAGE`]||void 0,docs:process.env[`${e}DOCS`]||void 0,portal:process.env[`${e}PORTAL`]||void 0,licensing:process.env[`${e}LICENSING`]||void 0,contact:process.env[`${e}CONTACT`]||void 0,support:process.env[`${e}SUPPORT`]||void 0,timezone:process.env[`${e}TIMEZONE`]||process.env.TZ||void 0,locale:process.env[`${e}LOCALE`]||process.env.LOCALE||void 0,configFile:process.env[`${e}WORKSPACE_CONFIG_FILE`]?m(process.env[`${e}WORKSPACE_CONFIG_FILE`]):void 0,workspaceRoot:process.env[`${e}WORKSPACE_ROOT`]?m(process.env[`${e}WORKSPACE_ROOT`]):void 0,directories:{cache:process.env[`${e}CACHE_DIR`]?m(process.env[`${e}CACHE_DIR`]):process.env[`${e}CACHE_DIRECTORY`]?m(process.env[`${e}CACHE_DIRECTORY`]):void 0,data:process.env[`${e}DATA_DIR`]?m(process.env[`${e}DATA_DIR`]):process.env[`${e}DATA_DIRECTORY`]?m(process.env[`${e}DATA_DIRECTORY`]):void 0,config:process.env[`${e}CONFIG_DIR`]?m(process.env[`${e}CONFIG_DIR`]):process.env[`${e}CONFIG_DIRECTORY`]?m(process.env[`${e}CONFIG_DIRECTORY`]):void 0,temp:process.env[`${e}TEMP_DIR`]?m(process.env[`${e}TEMP_DIR`]):process.env[`${e}TEMP_DIRECTORY`]?m(process.env[`${e}TEMP_DIRECTORY`]):void 0,log:process.env[`${e}LOG_DIR`]?m(process.env[`${e}LOG_DIR`]):process.env[`${e}LOG_DIRECTORY`]?m(process.env[`${e}LOG_DIRECTORY`]):void 0,build:process.env[`${e}BUILD_DIR`]?m(process.env[`${e}BUILD_DIR`]):process.env[`${e}BUILD_DIRECTORY`]?m(process.env[`${e}BUILD_DIRECTORY`]):void 0},skipCache:process.env[`${e}SKIP_CACHE`]!==void 0?!!process.env[`${e}SKIP_CACHE`]:void 0,mode:(process.env[`${e}MODE`]??process.env.NODE_ENV??process.env.ENVIRONMENT)||void 0,repository:process.env[`${e}REPOSITORY`]||void 0,branch:process.env[`${e}BRANCH`]||void 0,preid:process.env[`${e}PRE_ID`]||void 0,registry:{github:process.env[`${e}REGISTRY_GITHUB`]||void 0,npm:process.env[`${e}REGISTRY_NPM`]||void 0,cargo:process.env[`${e}REGISTRY_CARGO`]||void 0,cyclone:process.env[`${e}REGISTRY_CYCLONE`]||void 0,container:process.env[`${e}REGISTRY_CONTAINER`]||void 0},logLevel:process.env[`${e}LOG_LEVEL`]!==null&&process.env[`${e}LOG_LEVEL`]!==void 0?process.env[`${e}LOG_LEVEL`]&&Number.isSafeInteger(Number.parseInt(process.env[`${e}LOG_LEVEL`]))?ne(Number.parseInt(process.env[`${e}LOG_LEVEL`])):process.env[`${e}LOG_LEVEL`]:void 0,skipConfigLogging:process.env[`${e}SKIP_CONFIG_LOGGING`]!==void 0?!!process.env[`${e}SKIP_CONFIG_LOGGING`]:void 0},t=Object.keys(process.env).filter(a=>a.startsWith(`${e}COLOR_`)&&vo.every(i=>!a.startsWith(`${e}COLOR_LIGHT_${i}`)&&!a.startsWith(`${e}COLOR_DARK_${i}`)));o.colors=t.length>0?t.reduce((a,i)=>(a[i]=Io(e,i),a),{}):Io(e),o.docs===le&&(o.homepage===I?o.docs=`${I}/projects/${o.name}/docs`:o.docs=`${o.homepage}/docs`),o.licensing===de&&(o.homepage===I?o.licensing=`${I}/projects/${o.name}/licensing`:o.licensing=`${o.homepage}/docs`);let s=process.env[`${e}WORKSPACE_CONFIG`];if(s){let a=JSON.parse(s);o={...o,...a,colors:{...o.colors,...a.colors},extensions:{...o.extensions,...a.extensions}};}return o},Io=(e,o)=>{let t=`COLOR_${o&&o!=="base"?`${o}_`:""}`.toUpperCase();return process.env[`${e}${t}LIGHT_BRAND`]||process.env[`${e}${t}DARK_BRAND`]?lr(e+t):pr(e+t)},pr=e=>{let o=[];if(process.env[`${e}GRADIENT_START`]&&process.env[`${e}GRADIENT_END`])o.push(process.env[`${e}GRADIENT_START`],process.env[`${e}GRADIENT_END`]);else if(process.env[`${e}GRADIENT_0`]||process.env[`${e}GRADIENT_1`]){let t=process.env[`${e}GRADIENT_0`]?0:1;for(;process.env[`${e}GRADIENT_${t}`];)o.push(process.env[`${e}GRADIENT_${t}`]),t++;}return {dark:process.env[`${e}DARK`],light:process.env[`${e}LIGHT`],brand:process.env[`${e}BRAND`],alternate:process.env[`${e}ALTERNATE`],accent:process.env[`${e}ACCENT`],link:process.env[`${e}LINK`],discovery:process.env[`${e}DISCOVERY`],success:process.env[`${e}SUCCESS`],info:process.env[`${e}INFO`],debug:process.env[`${e}DEBUG`],warning:process.env[`${e}WARNING`],danger:process.env[`${e}DANGER`],fatal:process.env[`${e}FATAL`],performance:process.env[`${e}PERFORMANCE`],positive:process.env[`${e}POSITIVE`],negative:process.env[`${e}NEGATIVE`],gradient:o}},lr=e=>({light:yo(`${e}_LIGHT_`),dark:yo(`${e}_DARK_`)}),yo=e=>{let o=[];if(process.env[`${e}GRADIENT_START`]&&process.env[`${e}GRADIENT_END`])o.push(process.env[`${e}GRADIENT_START`],process.env[`${e}GRADIENT_END`]);else if(process.env[`${e}GRADIENT_0`]||process.env[`${e}GRADIENT_1`]){let t=process.env[`${e}GRADIENT_0`]?0:1;for(;process.env[`${e}GRADIENT_${t}`];)o.push(process.env[`${e}GRADIENT_${t}`]),t++;}return {foreground:process.env[`${e}FOREGROUND`],background:process.env[`${e}BACKGROUND`],brand:process.env[`${e}BRAND`],alternate:process.env[`${e}ALTERNATE`],accent:process.env[`${e}ACCENT`],link:process.env[`${e}LINK`],discovery:process.env[`${e}DISCOVERY`],success:process.env[`${e}SUCCESS`],info:process.env[`${e}INFO`],debug:process.env[`${e}DEBUG`],warning:process.env[`${e}WARNING`],danger:process.env[`${e}DANGER`],fatal:process.env[`${e}FATAL`],performance:process.env[`${e}PERFORMANCE`],positive:process.env[`${e}POSITIVE`],negative:process.env[`${e}NEGATIVE`],gradient:o}};var dr=(e,o)=>{for(let t of Object.keys(o??{}))if(o[t]){let s=t?.replace(/([A-Z])+/g,i=>i?i[0]?.toUpperCase()+i.slice(1):"").split(/(?=[A-Z])|[.\-\s_]/).map(i=>i.toLowerCase())??[],a;if(s.length===0)return;s.length===1?a=s[0]?.toUpperCase()??"":a=s.reduce((i,c)=>`${i}_${c.toLowerCase()}`),process.env[`STORM_EXTENSION_${e.toUpperCase()}_${a.toUpperCase()}`]=o[t];}},xo=e=>{let o="STORM_";if(e.extends&&(process.env[`${o}EXTENDS`]=Array.isArray(e.extends)?JSON.stringify(e.extends):e.extends),e.name&&(process.env[`${o}NAME`]=e.name),e.variant&&(process.env[`${o}VARIANT`]=e.variant),e.namespace&&(process.env[`${o}NAMESPACE`]=e.namespace),e.owner&&(process.env[`${o}OWNER`]=e.owner),e.bot&&(process.env[`${o}BOT_NAME`]=e.bot.name,process.env[`${o}BOT_EMAIL`]=e.bot.email),e.error&&(process.env[`${o}ERROR_CODES_FILE`]=e.error.codesFile,process.env[`${o}ERROR_URL`]=e.error.url),e.release&&(e.release.banner&&(typeof e.release.banner=="string"?(process.env[`${o}RELEASE_BANNER`]=e.release.banner,process.env[`${o}RELEASE_BANNER_URL`]=e.release.banner):(process.env[`${o}RELEASE_BANNER`]=e.release.banner.url,process.env[`${o}RELEASE_BANNER_URL`]=e.release.banner.url,process.env[`${o}RELEASE_BANNER_ALT`]=e.release.banner.alt)),process.env[`${o}RELEASE_HEADER`]=e.release.header,process.env[`${o}RELEASE_FOOTER`]=e.release.footer),e.socials&&(e.socials.twitter&&(process.env[`${o}SOCIAL_TWITTER`]=e.socials.twitter),e.socials.discord&&(process.env[`${o}SOCIAL_DISCORD`]=e.socials.discord),e.socials.telegram&&(process.env[`${o}SOCIAL_TELEGRAM`]=e.socials.telegram),e.socials.slack&&(process.env[`${o}SOCIAL_SLACK`]=e.socials.slack),e.socials.medium&&(process.env[`${o}SOCIAL_MEDIUM`]=e.socials.medium),e.socials.github&&(process.env[`${o}SOCIAL_GITHUB`]=e.socials.github)),e.organization&&(typeof e.organization=="string"?(process.env[`${o}ORG`]=e.organization,process.env[`${o}ORG_NAME`]=e.organization,process.env[`${o}ORGANIZATION`]=e.organization,process.env[`${o}ORGANIZATION_NAME`]=e.organization):(process.env[`${o}ORG`]=e.organization.name,process.env[`${o}ORG_NAME`]=e.organization.name,process.env[`${o}ORGANIZATION`]=e.organization.name,process.env[`${o}ORGANIZATION_NAME`]=e.organization.name,e.organization.url&&(process.env[`${o}ORG_URL`]=e.organization.url,process.env[`${o}ORGANIZATION_URL`]=e.organization.url),e.organization.description&&(process.env[`${o}ORG_DESCRIPTION`]=e.organization.description,process.env[`${o}ORGANIZATION_DESCRIPTION`]=e.organization.description),e.organization.logo&&(process.env[`${o}ORG_LOGO`]=e.organization.logo,process.env[`${o}ORGANIZATION_LOGO`]=e.organization.logo),e.organization.icon&&(process.env[`${o}ORG_ICON`]=e.organization.icon,process.env[`${o}ORGANIZATION_ICON`]=e.organization.icon))),e.packageManager&&(process.env[`${o}PACKAGE_MANAGER`]=e.packageManager),e.license&&(process.env[`${o}LICENSE`]=e.license),e.homepage&&(process.env[`${o}HOMEPAGE`]=e.homepage),e.docs&&(process.env[`${o}DOCS`]=e.docs),e.portal&&(process.env[`${o}PORTAL`]=e.portal),e.licensing&&(process.env[`${o}LICENSING`]=e.licensing),e.contact&&(process.env[`${o}CONTACT`]=e.contact),e.support&&(process.env[`${o}SUPPORT`]=e.support),e.timezone&&(process.env[`${o}TIMEZONE`]=e.timezone,process.env.TZ=e.timezone,process.env.DEFAULT_TIMEZONE=e.timezone,process.env.TIMEZONE=e.timezone),e.locale&&(process.env[`${o}LOCALE`]=e.locale,process.env.DEFAULT_LOCALE=e.locale,process.env.LOCALE=e.locale,process.env.LANG=e.locale?`${e.locale.replaceAll("-","_")}.UTF-8`:"en_US.UTF-8"),e.configFile&&(process.env[`${o}WORKSPACE_CONFIG_FILE`]=m(e.configFile)),e.workspaceRoot&&(process.env[`${o}WORKSPACE_ROOT`]=m(e.workspaceRoot),process.env.NX_WORKSPACE_ROOT=m(e.workspaceRoot),process.env.NX_WORKSPACE_ROOT_PATH=m(e.workspaceRoot)),e.directories&&(!e.skipCache&&e.directories.cache&&(process.env[`${o}CACHE_DIR`]=m(e.directories.cache),process.env[`${o}CACHE_DIRECTORY`]=process.env[`${o}CACHE_DIR`]),e.directories.data&&(process.env[`${o}DATA_DIR`]=m(e.directories.data),process.env[`${o}DATA_DIRECTORY`]=process.env[`${o}DATA_DIR`]),e.directories.config&&(process.env[`${o}CONFIG_DIR`]=m(e.directories.config),process.env[`${o}CONFIG_DIRECTORY`]=process.env[`${o}CONFIG_DIR`]),e.directories.temp&&(process.env[`${o}TEMP_DIR`]=m(e.directories.temp),process.env[`${o}TEMP_DIRECTORY`]=process.env[`${o}TEMP_DIR`]),e.directories.log&&(process.env[`${o}LOG_DIR`]=m(e.directories.log),process.env[`${o}LOG_DIRECTORY`]=process.env[`${o}LOG_DIR`]),e.directories.build&&(process.env[`${o}BUILD_DIR`]=m(e.directories.build),process.env[`${o}BUILD_DIRECTORY`]=process.env[`${o}BUILD_DIR`])),e.skipCache!==void 0&&(process.env[`${o}SKIP_CACHE`]=String(e.skipCache),e.skipCache&&(process.env.NX_SKIP_NX_CACHE??=String(e.skipCache),process.env.NX_CACHE_PROJECT_GRAPH??=String(e.skipCache))),e.mode&&(process.env[`${o}MODE`]=e.mode,process.env.NODE_ENV=e.mode,process.env.ENVIRONMENT=e.mode),e.colors?.base?.light||e.colors?.base?.dark)for(let t of Object.keys(e.colors))bo(`${o}COLOR_${t}_`,e.colors[t]);else bo(`${o}COLOR_`,e.colors);e.repository&&(process.env[`${o}REPOSITORY`]=e.repository),e.branch&&(process.env[`${o}BRANCH`]=e.branch),e.preid&&(process.env[`${o}PRE_ID`]=String(e.preid)),e.registry&&(e.registry.github&&(process.env[`${o}REGISTRY_GITHUB`]=String(e.registry.github)),e.registry.npm&&(process.env[`${o}REGISTRY_NPM`]=String(e.registry.npm)),e.registry.cargo&&(process.env[`${o}REGISTRY_CARGO`]=String(e.registry.cargo)),e.registry.cyclone&&(process.env[`${o}REGISTRY_CYCLONE`]=String(e.registry.cyclone)),e.registry.container&&(process.env[`${o}REGISTRY_CONTAINER`]=String(e.registry.container))),e.logLevel&&(process.env[`${o}LOG_LEVEL`]=String(e.logLevel),process.env.LOG_LEVEL=String(e.logLevel),process.env.NX_VERBOSE_LOGGING=String($(e.logLevel)>=l.DEBUG),process.env.RUST_BACKTRACE=$(e.logLevel)>=l.DEBUG?"full":"none"),e.skipConfigLogging!==void 0&&(process.env[`${o}SKIP_CONFIG_LOGGING`]=String(e.skipConfigLogging)),process.env[`${o}WORKSPACE_CONFIG`]=JSON.stringify(e);for(let t of Object.keys(e.extensions??{}))e.extensions[t]&&Object.keys(e.extensions[t])&&dr(t,e.extensions[t]);},bo=(e,o)=>o?.light?.brand||o?.dark?.brand?gr(e,o):mr(e,o),mr=(e,o)=>{if(o.dark&&(process.env[`${e}DARK`]=o.dark),o.light&&(process.env[`${e}LIGHT`]=o.light),o.brand&&(process.env[`${e}BRAND`]=o.brand),o.alternate&&(process.env[`${e}ALTERNATE`]=o.alternate),o.accent&&(process.env[`${e}ACCENT`]=o.accent),o.link&&(process.env[`${e}LINK`]=o.link),o.discovery&&(process.env[`${e}DISCOVERY`]=o.discovery),o.success&&(process.env[`${e}SUCCESS`]=o.success),o.info&&(process.env[`${e}INFO`]=o.info),o.debug&&(process.env[`${e}DEBUG`]=o.debug),o.warning&&(process.env[`${e}WARNING`]=o.warning),o.danger&&(process.env[`${e}DANGER`]=o.danger),o.fatal&&(process.env[`${e}FATAL`]=o.fatal),o.performance&&(process.env[`${e}PERFORMANCE`]=o.performance),o.positive&&(process.env[`${e}POSITIVE`]=o.positive),o.negative&&(process.env[`${e}NEGATIVE`]=o.negative),o.gradient)for(let t=0;t<o.gradient.length;t++)process.env[`${e}GRADIENT_${t}`]=o.gradient[t];},gr=(e,o)=>({light:zo(`${e}LIGHT_`,o.light),dark:zo(`${e}DARK_`,o.dark)}),zo=(e,o)=>{if(o.foreground&&(process.env[`${e}FOREGROUND`]=o.foreground),o.background&&(process.env[`${e}BACKGROUND`]=o.background),o.brand&&(process.env[`${e}BRAND`]=o.brand),o.alternate&&(process.env[`${e}ALTERNATE`]=o.alternate),o.accent&&(process.env[`${e}ACCENT`]=o.accent),o.link&&(process.env[`${e}LINK`]=o.link),o.discovery&&(process.env[`${e}DISCOVERY`]=o.discovery),o.success&&(process.env[`${e}SUCCESS`]=o.success),o.info&&(process.env[`${e}INFO`]=o.info),o.debug&&(process.env[`${e}DEBUG`]=o.debug),o.warning&&(process.env[`${e}WARNING`]=o.warning),o.danger&&(process.env[`${e}DANGER`]=o.danger),o.fatal&&(process.env[`${e}FATAL`]=o.fatal),o.performance&&(process.env[`${e}PERFORMANCE`]=o.performance),o.positive&&(process.env[`${e}POSITIVE`]=o.positive),o.negative&&(process.env[`${e}NEGATIVE`]=o.negative),o.gradient)for(let t=0;t<o.gradient.length;t++)process.env[`${e}GRADIENT_${t}`]=o.gradient[t];};var y,fr=async(e,o,t,s=false,a=true)=>{let i;if(!y?.data||!y?.timestamp||y.timestamp<Date.now()-8e3){let c=t;c||(c=E());let p=wo(),g=await Lo(c);if(!g&&(s||ae("No Storm Workspace configuration file found in the current repository. Please ensure this is the expected behavior - you can add a `storm-workspace.json` file to the root of your workspace if it is not.\n",{logLevel:"all"}),a===false))return;let h=await ko(c),N=_o(p,g,h);N.variant||(N.variant=existsSync(R(c,"nx.json"))||existsSync(R(c,".nx"))||existsSync(R(c,"lerna.json"))||existsSync(R(c,"turbo.json"))?"monorepo":"minimal");try{let L=await Promise.resolve(So._zod.parse({value:N,issues:[]},{async:!0}));i=Oo(L.value),i.workspaceRoot??=c;}catch(L){throw new Error(`Failed to parse Storm Workspace configuration${L?.message?`: ${L.message}`:""}
|
|
27
|
+
|
|
28
|
+
Please ensure your configuration file is valid JSON and matches the expected schema. The current workspace configuration input is: ${T(N)}`,{cause:L})}}else i=y.data;return y={timestamp:Date.now(),data:i},i},Do=async(e,o=false)=>{let t=await fr(void 0,void 0,e,o,true);return xo(t),!o&&!t.skipConfigLogging&&A(`\u2699\uFE0F Using Storm Workspace configuration:
|
|
29
|
+
${T(t)}`,t),t};function Cr(e,o=false){return Do(e,o)}function Go(e=true,o={}){let t=o.workspaceRoot;return t||(t=E(o.cwd)),Cr(t,e)}var vr={parser:"json",proseWrap:"preserve",trailingComma:"none",tabWidth:2,semi:true,singleQuote:false,quoteProps:"as-needed",insertPragma:false,bracketSameLine:true,printWidth:80,bracketSpacing:true,arrowParens:"avoid",endOfLine:"lf",plugins:["prettier-plugin-packagejson"]};function Po(e=E(process.cwd())){let o=R(e,"package.json");if(!existsSync(o))throw new Error(`No \`package.json\` file found in workspace root (searched in: ${o}).`);return o}async function Ss(e=E(process.cwd())){let o=await readFile(Po(e),"utf8");if(o)return JSON.parse(o)}function vs(e){if(e.catalog)return e.catalog;let o=e.workspaces;if(o&&typeof o=="object"&&!Array.isArray(o))return o.catalog}function ks(e,o){if(e.catalog){e.catalog=o;return}let t=e.workspaces;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.catalog){t.catalog=o;return}e.catalog=o;}async function Os(e,o=E(process.cwd())){let t=await Go(),s=await format(JSON.stringify(e),vr);A(`Writing updated package.json file to workspace root: ${s}`,t),await writeFile(Po(o),s);}export{ae as a,Jr as b,A as c,R as d,E as e,Cr as f,Go as g,Po as h,Ss as i,vs as j,ks as k,Os as l};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {h,e,i,k,l}from'./chunk-JXISZBJG.js';import g from'defu';function w(a=e(process.cwd())){return h(a)}async function u(a=e(process.cwd())){let s=await i(a);if(s)return s}async function P(a,s=e(process.cwd())){let o=await i(s);if(!o)throw new Error("No package.json file found in workspace root");if(a.catalog&&k(o,a.catalog),!a.packages)throw new Error("No packages found in workspace file");Array.isArray(o.workspaces)||!o.workspaces?o.workspaces={packages:a.packages,catalog:a.catalog}:(o.workspaces.packages=g(a.packages,o.workspaces.packages),a.catalog&&(o.workspaces.catalog=g(a.catalog,o.workspaces.catalog))),await l(o,s);}export{w as a,u as b,P as c};
|
|
File without changes
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var chunkWAL5SD4G_cjs=require('./chunk-WAL5SD4G.cjs'),chunkSAEQEYN6_cjs=require('./chunk-SAEQEYN6.cjs'),child_process=require('child_process'),semver=require('semver'),Y=require('strip-ansi');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Y__default=/*#__PURE__*/_interopDefault(Y);var M="https://registry.npmjs.org";var O="latest";var m=O;async function U(t="npm"){return new Promise((r,e)=>{child_process.exec(`${t} config get registry`,(o,a,g)=>o&&!o.message.toLowerCase().trim().startsWith("npm warn")?e(o):g&&!g.toLowerCase().trim().startsWith("npm warn")?e(g):r(a.trim()));})}async function P(){if(process.env.STORM_REGISTRY_NPM)return process.env.STORM_REGISTRY_NPM;let t=await chunkSAEQEYN6_cjs.f();return t?.registry?.npm?t?.registry?.npm:M}async function _(t,r=m,e={}){let o=e.executable||"npm",a=e.retries??3,g=e.timeout??1e4,l=e.registry||await U(o),c;for(let i=0;i<=a;i++)try{let f=new AbortController,s=setTimeout(()=>{f.abort();},g),n=await Promise.resolve(new Promise((L,A)=>{child_process.exec(`${o} view ${t} version --registry=${l}`,{signal:f.signal,maxBuffer:1024*1024*10},(T,k,R)=>T&&!T.message.toLowerCase().trim().startsWith("npm warn")?A(T):R&&!R.toLowerCase().trim().startsWith("npm warn")?A(R):L(k.trim()));}));if(!semver.valid(n,!0))throw clearTimeout(s),new Error(Y__default.default(n).startsWith("[WARN] Request took")?`A timeout occurred while fetching the version for package "${t}" with tag "${r}".`:`Invalid version "${n}" fetched for package "${t}" with tag "${r}"`);return clearTimeout(s),n}catch(f){if(c=f,i<a){let s=Math.pow(2,i)*100;await new Promise(n=>setTimeout(n,s));}}throw c}async function D(t=chunkSAEQEYN6_cjs.e(process.cwd())){let r=await chunkSAEQEYN6_cjs.i(t);if(!r)throw new Error("No package.json file found in workspace root");let e=chunkSAEQEYN6_cjs.j(r);if(e)return Object.fromEntries(Object.entries(e).map(([o,a])=>[o,a.replaceAll('"',"").replaceAll("'","")]));console.warn(`No catalog found in package.json file located in workspace root: ${t}
|
|
2
|
+
File content: ${JSON.stringify(r,null,2)}`);}async function J(t=chunkSAEQEYN6_cjs.e(process.cwd())){let r=await D(t);if(!r)throw new Error("No catalog entries found in workspace root package.json file");return r}async function j(t,r=chunkSAEQEYN6_cjs.e(process.cwd())){let e=await chunkSAEQEYN6_cjs.i(r);if(!e)throw new Error("No package.json file found in workspace root");chunkSAEQEYN6_cjs.k(e,Object.fromEntries(Object.entries(t).filter(([,o])=>o&&semver.valid(chunkWAL5SD4G_cjs.a(o),true)).map(([o,a])=>[o,a.replaceAll('"',"").replaceAll("'","")]))),await chunkSAEQEYN6_cjs.l(e,r);}async function dt(t,r,e={}){let{tag:o=m,prefix:a="^",workspaceRoot:g=chunkSAEQEYN6_cjs.e(),verbose:l=false}=e,c=await chunkSAEQEYN6_cjs.g(true,{workspaceRoot:g});l&&chunkSAEQEYN6_cjs.c(`Upgrading catalog entry for package "${r}" with tag "${o}"`,c);let i=await P(),f=await _(r,o,{executable:"bun pm",registry:i});if(!f)throw new Error(`Failed to fetch version for package "${r}" with tag "${o}"`);if(!semver.valid(chunkWAL5SD4G_cjs.a(f),true))throw new Error(`Invalid version "${f}" fetched for package "${r}" with tag "${o}"`);let s=`${a||""}${chunkWAL5SD4G_cjs.a(f)}`,n=false;return !semver.valid(semver.coerce(t[r]))||semver.coerce(t[r])&&semver.coerce(s)&&semver.gt(semver.coerce(s),semver.coerce(t[r]))?(t[r]=`${a||""}${chunkWAL5SD4G_cjs.a(s)}`,chunkSAEQEYN6_cjs.b(`Writing version ${t[r]} to catalog for "${r}" package`,c),n=true):l&&chunkSAEQEYN6_cjs.b(`The current version ${t[r]} for package "${r}" is greater than or equal to the version ${chunkWAL5SD4G_cjs.a(s)} fetched from the npm registry with tag "${o}". No update performed.`,c),{catalog:t,updated:n}}async function $t(t,r={}){let{tag:e=m,prefix:o="^",throwIfMissingInCatalog:a=false,workspaceRoot:g=chunkSAEQEYN6_cjs.e(),verbose:l=false}=r,c=await chunkSAEQEYN6_cjs.g(true,{workspaceRoot:g}),i=await J(g);if(!i)throw new Error("No catalog found");if(a===true&&!i[t])throw new Error(`Package "${t}" not found in catalog: ${JSON.stringify(i,null,2)}`);l&&chunkSAEQEYN6_cjs.c(`Upgrading catalog entry for package "${t}" with tag "${e}"`,c);let f=await P(),s=await _(t,e,{executable:"bun pm",registry:f});if(!s)throw new Error(`Failed to fetch version for package "${t}" with tag "${e}"`);if(!semver.valid(chunkWAL5SD4G_cjs.a(s),true))throw new Error(`Invalid version "${s}" fetched for package "${t}" with tag "${e}"`);let n=`${o||""}${chunkWAL5SD4G_cjs.a(s)}`;n===i[t]?l&&chunkSAEQEYN6_cjs.c(`The version for package "${t}" is already up to date in the catalog: ${n}`,c):!semver.valid(chunkWAL5SD4G_cjs.a(i[t]),true)||semver.coerce(i[t])&&semver.coerce(n)&&semver.gt(semver.coerce(n),semver.coerce(i[t]))?(i[t]=`${o||""}${chunkWAL5SD4G_cjs.a(n)}`,chunkSAEQEYN6_cjs.b(`Writing version ${i[t]} to catalog for "${t}" package`,c),await j(i,g)):l&&chunkSAEQEYN6_cjs.a(`The current version "${i[t]}" for package "${t}" is greater than or equal to the version "${n}" fetched from the npm registry with tag "${e}". No update performed.`,c);}exports.a=D;exports.b=J;exports.c=j;exports.d=dt;exports.e=$t;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {a}from'./chunk-7QKHH2VM.js';import {i,j as j$1,e,k,l,g,c,b,a as a$1,f}from'./chunk-JXISZBJG.js';import {exec}from'node:child_process';import {valid,coerce,gt}from'semver';import D from'strip-ansi';var O="https://registry.npmjs.org";var U="latest";var m=U;async function S(t="npm"){return new Promise((r,e)=>{exec(`${t} config get registry`,(o,a,g)=>o&&!o.message.toLowerCase().trim().startsWith("npm warn")?e(o):g&&!g.toLowerCase().trim().startsWith("npm warn")?e(g):r(a.trim()));})}async function _(){if(process.env.STORM_REGISTRY_NPM)return process.env.STORM_REGISTRY_NPM;let t=await f();return t?.registry?.npm?t?.registry?.npm:O}async function A(t,r=m,e={}){let o=e.executable||"npm",a=e.retries??3,g=e.timeout??1e4,l=e.registry||await S(o),c;for(let i=0;i<=a;i++)try{let f=new AbortController,s=setTimeout(()=>{f.abort();},g),n=await Promise.resolve(new Promise((k,v)=>{exec(`${o} view ${t} version --registry=${l}`,{signal:f.signal,maxBuffer:1024*1024*10},(T,V,R)=>T&&!T.message.toLowerCase().trim().startsWith("npm warn")?v(T):R&&!R.toLowerCase().trim().startsWith("npm warn")?v(R):k(V.trim()));}));if(!valid(n,!0))throw clearTimeout(s),new Error(D(n).startsWith("[WARN] Request took")?`A timeout occurred while fetching the version for package "${t}" with tag "${r}".`:`Invalid version "${n}" fetched for package "${t}" with tag "${r}"`);return clearTimeout(s),n}catch(f){if(c=f,i<a){let s=Math.pow(2,i)*100;await new Promise(n=>setTimeout(n,s));}}throw c}async function J(t=e(process.cwd())){let r=await i(t);if(!r)throw new Error("No package.json file found in workspace root");let e=j$1(r);if(e)return Object.fromEntries(Object.entries(e).map(([o,a])=>[o,a.replaceAll('"',"").replaceAll("'","")]));console.warn(`No catalog found in package.json file located in workspace root: ${t}
|
|
2
|
+
File content: ${JSON.stringify(r,null,2)}`);}async function j(t=e(process.cwd())){let r=await J(t);if(!r)throw new Error("No catalog entries found in workspace root package.json file");return r}async function B(t,r=e(process.cwd())){let e=await i(r);if(!e)throw new Error("No package.json file found in workspace root");k(e,Object.fromEntries(Object.entries(t).filter(([,o])=>o&&valid(a(o),true)).map(([o,a])=>[o,a.replaceAll('"',"").replaceAll("'","")]))),await l(e,r);}async function $t(t,r,e$1={}){let{tag:o=m,prefix:a$1="^",workspaceRoot:g$1=e(),verbose:l=false}=e$1,c$1=await g(true,{workspaceRoot:g$1});l&&c(`Upgrading catalog entry for package "${r}" with tag "${o}"`,c$1);let i=await _(),f=await A(r,o,{executable:"bun pm",registry:i});if(!f)throw new Error(`Failed to fetch version for package "${r}" with tag "${o}"`);if(!valid(a(f),true))throw new Error(`Invalid version "${f}" fetched for package "${r}" with tag "${o}"`);let s=`${a$1||""}${a(f)}`,n=false;return !valid(coerce(t[r]))||coerce(t[r])&&coerce(s)&>(coerce(s),coerce(t[r]))?(t[r]=`${a$1||""}${a(s)}`,b(`Writing version ${t[r]} to catalog for "${r}" package`,c$1),n=true):l&&b(`The current version ${t[r]} for package "${r}" is greater than or equal to the version ${a(s)} fetched from the npm registry with tag "${o}". No update performed.`,c$1),{catalog:t,updated:n}}async function Tt(t,r={}){let{tag:e$1=m,prefix:o="^",throwIfMissingInCatalog:a$2=false,workspaceRoot:g$1=e(),verbose:l=false}=r,c$1=await g(true,{workspaceRoot:g$1}),i=await j(g$1);if(!i)throw new Error("No catalog found");if(a$2===true&&!i[t])throw new Error(`Package "${t}" not found in catalog: ${JSON.stringify(i,null,2)}`);l&&c(`Upgrading catalog entry for package "${t}" with tag "${e$1}"`,c$1);let f=await _(),s=await A(t,e$1,{executable:"bun pm",registry:f});if(!s)throw new Error(`Failed to fetch version for package "${t}" with tag "${e$1}"`);if(!valid(a(s),true))throw new Error(`Invalid version "${s}" fetched for package "${t}" with tag "${e$1}"`);let n=`${o||""}${a(s)}`;n===i[t]?l&&c(`The version for package "${t}" is already up to date in the catalog: ${n}`,c$1):!valid(a(i[t]),true)||coerce(i[t])&&coerce(n)&>(coerce(n),coerce(i[t]))?(i[t]=`${o||""}${a(n)}`,b(`Writing version ${i[t]} to catalog for "${t}" package`,c$1),await B(i,g$1)):l&&a$1(`The current version "${i[t]}" for package "${t}" is greater than or equal to the version "${n}" fetched from the npm registry with tag "${e$1}". No update performed.`,c$1);}export{J as a,j as b,B as c,$t as d,Tt as e};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use strict';var c12=require('c12'),$o=require('defu');require('date-fns/formatDistanceToNow');var Po=require('chalk'),fs=require('fs'),path=require('path'),r=require('zod/v4/mini'),promises=require('fs/promises'),prettier=require('prettier');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var $o__default=/*#__PURE__*/_interopDefault($o);var Po__default=/*#__PURE__*/_interopDefault(Po);var r__namespace=/*#__PURE__*/_interopNamespace(r);var l={SILENT:0,FATAL:10,ERROR:20,WARN:30,SUCCESS:35,INFO:40,PERFORMANCE:50,DEBUG:60,TRACE:70,ALL:100},d={SILENT:"silent",FATAL:"fatal",ERROR:"error",WARN:"warn",SUCCESS:"success",INFO:"info",PERFORMANCE:"performance",DEBUG:"debug",TRACE:"trace",ALL:"all"};var R={dark:{brand:"#2dd4bf",success:"#10b981",info:"#58a6ff",debug:"#8afafc",warning:"#f3d371",danger:"#D8314A",fatal:"#a40e26",performance:"#80fd74"}};var Wo={hex:e=>o=>o,bgHex:e=>({whiteBright:o=>o,white:o=>o}),white:e=>e,whiteBright:e=>e,gray:e=>e,bold:{hex:e=>o=>o,bgHex:e=>({whiteBright:o=>o,white:o=>o}),whiteBright:e=>e,white:e=>e},dim:{hex:e=>o=>o,gray:e=>e}},re=()=>{let e=Po__default.default;return (!e?.hex||!e?.bold?.hex||!e?.bgHex||!e?.whiteBright||!e?.white)&&(e=Wo),e};function te(){return process.platform!=="win32"?process.env.TERM!=="linux":!!process.env.WT_SESSION||!!process.env.TERMINUS_SUBLIME||process.env.ConEmuTask==="{cmd::Cmder}"||process.env.TERM_PROGRAM==="Terminus-Sublime"||process.env.TERM_PROGRAM==="vscode"||process.env.TERM==="xterm-256color"||process.env.TERM==="alacritty"||process.env.TERM==="rxvt-unicode"||process.env.TERM==="rxvt-unicode-256color"||process.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var k=(e,o)=>te()?e:o,S={[d.ERROR]:k("\u2718","\xD7"),[d.FATAL]:k("\u{1F571}","\xD7"),[d.WARN]:k("\u26A0","\u203C"),[d.INFO]:k("\u2139","i"),[d.PERFORMANCE]:k("\u23F1","\u23F1"),[d.SUCCESS]:k("\u2714","\u221A"),[d.DEBUG]:k("\u{1F6E0}","D"),[d.TRACE]:k("\u2699","T"),[d.ALL]:k("\u2709","\u2192")};var v=(e=false,o=new Date)=>e?`${o.toLocaleDateString()} ${o.toLocaleTimeString()}`:`${o.toLocaleTimeString()}`;var A=e=>{switch(e){case "all":return l.ALL;case "trace":return l.TRACE;case "debug":return l.DEBUG;case "performance":return l.PERFORMANCE;case "info":return l.INFO;case "warn":return l.WARN;case "error":return l.ERROR;case "fatal":return l.FATAL;case "silent":return l.SILENT;default:return l.INFO}},se=(e=l.INFO)=>e>=l.ALL?d.ALL:e>=l.TRACE?d.TRACE:e>=l.DEBUG?d.DEBUG:e>=l.PERFORMANCE?d.PERFORMANCE:e>=l.INFO?d.INFO:e>=l.WARN?d.WARN:e>=l.ERROR?d.ERROR:e>=l.FATAL?d.FATAL:e<=l.SILENT?d.SILENT:d.INFO;var J=(e=l.INFO,o={},t={})=>{let{chalk:s=re(),fullDateTime:a=false,hideDateTime:i=false}=t,c=!o.colors?.dark&&!o.colors?.base&&!o.colors?.base?.dark?R:o.colors?.dark&&typeof o.colors.dark=="string"?o.colors:o.colors?.base?.dark&&typeof o.colors.base.dark=="string"?o.colors.base.dark:o.colors?.base?o.colors?.base:R,p=o.logLevel||process.env.STORM_LOG_LEVEL||d.INFO;return e>A(p)||e<=l.SILENT||A(p)<=l.SILENT?g=>{}:typeof e=="number"&&l.FATAL>=e?g=>{console.error(`
|
|
2
|
+
${i?"":`${s.gray(v(a))} `}${s.hex(c.fatal??R.dark.fatal)(`[${S[d.FATAL]} Fatal] `)}${s.bold.whiteBright(C(g))}
|
|
3
|
+
`);}:typeof e=="number"&&l.ERROR>=e?g=>{console.error(`
|
|
4
|
+
${i?"":`${s.gray(v(a))} `}${s.hex(c.danger??R.dark.danger)(`[${S[d.ERROR]} Error] `)}${s.bold.whiteBright(C(g))}
|
|
5
|
+
`);}:typeof e=="number"&&l.WARN>=e?g=>{console.warn(`
|
|
6
|
+
${i?"":`${s.gray(v(a))} `}${s.hex(c.warning??R.dark.warning)(`[${S[d.WARN]} Warn] `)}${s.bold.whiteBright(C(g))}
|
|
7
|
+
`);}:typeof e=="number"&&l.SUCCESS>=e?g=>{console.info(`
|
|
8
|
+
${i?"":`${s.gray(v(a))} `}${s.hex(c.success??R.dark.success)(`[${S[d.SUCCESS]} Success] `)}${s.bold.whiteBright(C(g))}
|
|
9
|
+
`);}:typeof e=="number"&&l.INFO>=e?g=>{console.info(`
|
|
10
|
+
${i?"":`${s.gray(v(a))} `}${s.hex(c.info??R.dark.info)(`[${S[d.INFO]} Info] `)}${s.bold.whiteBright(C(g))}
|
|
11
|
+
`);}:typeof e=="number"&&l.PERFORMANCE>=e?g=>{console.debug(`
|
|
12
|
+
${i?"":`${s.gray(v(a))} `}${s.hex(c.performance??R.dark.performance)(`[${S[d.PERFORMANCE]} Performance] `)}${s.bold.whiteBright(C(g))}
|
|
13
|
+
`);}:typeof e=="number"&&l.DEBUG>=e?g=>{console.debug(`
|
|
14
|
+
${i?"":`${s.gray(v(a))} `}${s.hex(c.debug??R.dark.debug)(`[${S[d.DEBUG]} Debug] `)}${s.bold.whiteBright(C(g))}
|
|
15
|
+
`);}:typeof e=="number"&&l.TRACE>=e?g=>{console.debug(`
|
|
16
|
+
${i?"":`${s.gray(v(a))} `}${s.hex("#bbbbbb")(`[${S[d.TRACE]} Trace] `)}${s.bold.whiteBright(C(g))}
|
|
17
|
+
`);}:g=>{console.log(`
|
|
18
|
+
${i?"":`${s.gray(v(a))} `}${s.hex(c.brand??R.dark.brand)(`[${S[d.ALL]} System] `)}${s.bold.whiteBright(C(g))}
|
|
19
|
+
`);}};var ne=(e,o)=>J(l.WARN,o)(e);var Vr=(e,o)=>J(l.DEBUG,o)(e),O=(e,o)=>J(l.TRACE,o)(e);var Mo=10,C=(e,o={},t=0)=>{if(t>Mo)return "<max depth>";let s=o.prefix??"",a=o.skip??[],i=o.sort??true;return typeof e>"u"||e===null?"<empty>":typeof e=="string"?e||"<empty string>":Array.isArray(e)?`
|
|
20
|
+
${e.sort(i?(c,p)=>!c&&!p?0:c?p?String(c).localeCompare(String(p)):-1:1:void 0).map((c,p)=>` ${s}> #${p} = ${C(c,{prefix:`${s}--`,skip:a,sort:i},t+1)}`).join(`
|
|
21
|
+
`)}`:typeof e=="object"&&e?`
|
|
22
|
+
${Object.keys(e).filter(c=>typeof c!="string"||!a.map(p=>p.toLowerCase().trim()).includes(c.toLowerCase().trim())).sort(i?(c,p)=>!c&&!p?0:c?p?String(c).localeCompare(String(p)):-1:1:void 0).map(c=>` ${s}> ${c} = ${Fo(e[c])?"<function>":typeof e[c]=="object"&&e[c]?Object.keys(e[c]).filter(p=>typeof p!="string"||!a.map(g=>g.toLowerCase().trim()).includes(p.toLowerCase().trim())).length===0?"{}":C(e[c],{prefix:`${s}--`,skip:a,sort:i},t+1):e[c]}`).join(`
|
|
23
|
+
`)}`:String(e)},Fo=e=>{try{return e instanceof Function||typeof e=="function"||!!(e?.constructor&&e?.call&&e?.apply)}catch{return false}};var Uo=/^[A-Za-z]:\//;function jo(e=""){return e&&e.replace(/\\/g,"/").replace(Uo,o=>o.toUpperCase())}var Bo=/^[/\\]{2}/,Ho=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,Ko=/^[A-Za-z]:$/;var m=function(e){if(!e||e.length===0)return ".";e=jo(e);let o=e?.match(Bo),t=ae(e),s=e[e.length-1]==="/";return e=Yo(e,!t),e.length===0?t?"/":s?"./":".":(s&&(e+="/"),Ko.test(e)&&(e+="/"),o?t?`//${e}`:`//./${e}`:t&&!ae(e)?`/${e}`:e)},E=function(...e){let o="";for(let t of e)if(t)if(o.length>0){let s=o[o.length-1]==="/",a=t[0]==="/";s&&a?o+=t.slice(1):o+=s||a?t:`/${t}`;}else o+=t;return m(o)};function Yo(e,o){let t="",s=0,a=-1,i=0,c=null;for(let p=0;p<=e.length;++p){if(p<e.length)c=e[p];else {if(c==="/")break;c="/";}if(c==="/"){if(!(a===p-1||i===1))if(i===2){if(t.length<2||s!==2||t[t.length-1]!=="."||t[t.length-2]!=="."){if(t.length>2){let g=t.lastIndexOf("/");g===-1?(t="",s=0):(t=t.slice(0,g),s=t.length-1-t.lastIndexOf("/")),a=p,i=0;continue}else if(t.length>0){t="",s=0,a=p,i=0;continue}}o&&(t+=t.length>0?"/..":"..",s=2);}else t.length>0?t+=`/${e.slice(a+1,p)}`:t=e.slice(a+1,p),s=p-a-1;a=p,i=0;}else c==="."&&i!==-1?++i:i=-1;}return t}var ae=function(e){return Ho.test(e)};var Zo=30,Vo=0;function q(e,o=[],t=[]){let s=e??process.cwd();if(t.some(a=>fs.existsSync(path.join(s,a)))||o.some(a=>fs.existsSync(path.join(s,a))))return s;if(s!=="/"&&Vo++<Zo){let a=path.join(s,"..");return q(a,o,t)}}var ce=["storm-workspace.json","storm-workspace.yaml","storm-workspace.yml","storm-workspace.js","storm-workspace.ts",".storm-workspace.json",".storm-workspace.yaml",".storm-workspace.yml",".storm-workspace.js",".storm-workspace.ts","lerna.json","nx.json","turbo.json","npm-workspace.json","yarn-workspace.json","pnpm-workspace.json","npm-workspace.yaml","yarn-workspace.yaml","pnpm-workspace.yaml","npm-workspace.yml","yarn-workspace.yml","pnpm-workspace.yml","npm-lock.json","yarn-lock.json","pnpm-lock.json","npm-lock.yaml","yarn-lock.yaml","pnpm-lock.yaml","npm-lock.yml","yarn-lock.yml","pnpm-lock.yml","bun.lockb"],Jo=[".storm-workspace",".nx",".git",".github",".vscode",".verdaccio"];function Xo(e){return process.env.STORM_WORKSPACE_ROOT||process.env.NX_WORKSPACE_ROOT_PATH?m(process.env.STORM_WORKSPACE_ROOT??process.env.NX_WORKSPACE_ROOT_PATH):m(q(e??process.cwd(),ce,Jo))}function T(e){let o=Xo(e);if(!o)throw new Error(`Cannot find workspace root upwards from known path. Files search list includes:
|
|
24
|
+
${ce.join(`
|
|
25
|
+
`)}
|
|
26
|
+
Path: ${e||process.cwd()}`);return o}var pe="https://docs.stormsoftware.com",L="https://stormsoftware.com";var le="https://stormsoftware.com/license",de="Apache-2.0";var N="tools/errors/codes.json",me="The workspace's banner image";var n=r__namespace.registry(),h=r__namespace.string().check(r__namespace.length(7),r__namespace.toLowerCase(),r__namespace.regex(/^#([0-9a-f]{3}){1,2}$/i),r__namespace.trim());n.add(h,{description:"A base schema for describing the format of colors"});var w=r__namespace._default(h,"#1e2124");n.add(w,{description:"The dark background color of the workspace"});var b=r__namespace._default(h,"#cbd5e1");n.add(b,{description:"The light background color of the workspace"});var z=r__namespace._default(h,"#1fb2a6");n.add(z,{description:"The primary brand specific color of the workspace"});var x=r__namespace.optional(h);n.add(x,{description:"The alternate brand specific color of the workspace"});var D=r__namespace.optional(h);n.add(D,{description:"The secondary brand specific color of the workspace"});var G=r__namespace._default(h,"#3fa6ff");n.add(G,{description:"The color used to display hyperlink text"});var P=r__namespace._default(h,"#818cf8");n.add(P,{description:"The second brand specific color of the workspace"});var W=r__namespace._default(h,"#45b27e");n.add(W,{description:"The success color of the workspace"});var M=r__namespace._default(h,"#38bdf8");n.add(M,{description:"The informational color of the workspace"});var F=r__namespace._default(h,"#8afafc");n.add(F,{description:"The debug color of the workspace"});var U=r__namespace._default(h,"#f3d371");n.add(U,{description:"The warning color of the workspace"});var j=r__namespace._default(h,"#d8314a");n.add(j,{description:"The danger color of the workspace"});var B=r__namespace.optional(h);n.add(B,{description:"The fatal color of the workspace"});var H=r__namespace._default(h,"#80fd74");n.add(H,{description:"The performance color of the workspace"});var K=r__namespace._default(h,"#4ade80");n.add(K,{description:"The positive number color of the workspace"});var Y=r__namespace._default(h,"#ef4444");n.add(Y,{description:"The negative number color of the workspace"});var Z=r__namespace.optional(r__namespace.array(h));n.add(Z,{description:"The color stops for the base gradient color pattern used in the workspace"});var or=r__namespace.object({foreground:b,background:w,brand:z,alternate:x,accent:D,link:G,discovery:P,success:W,info:M,debug:F,warning:U,danger:j,fatal:B,performance:H,positive:K,negative:Y,gradient:Z}),rr=r__namespace.object({foreground:w,background:b,brand:z,alternate:x,accent:D,link:G,discovery:P,success:W,info:M,debug:F,warning:U,danger:j,fatal:B,performance:H,positive:K,negative:Y,gradient:Z}),tr=r__namespace.object({dark:or,light:rr}),sr=r__namespace.object({dark:w,light:b,brand:z,alternate:x,accent:D,link:G,discovery:P,success:W,info:M,debug:F,warning:U,danger:j,fatal:B,performance:H,positive:K,negative:Y,gradient:Z}),$=r__namespace.optional(r__namespace.url());n.add($,{description:"A remote registry URL used to publish distributable packages"});var ge=r__namespace._default(r__namespace.object({github:$,npm:$,cargo:$,cyclone:$,container:$}),{});n.add(ge,{description:"A list of remote registry URLs used by Storm Software"});var Q=r__namespace.union([sr,tr]);n.add(Q,{description:"Colors used for various workspace elements"});var ue=r__namespace.record(r__namespace.union([r__namespace.union([r__namespace.literal("base"),r__namespace.string()]),r__namespace.string()]),Q);n.add(ue,{description:"Storm theme config values used for styling various package elements"});var fe=r__namespace.optional(r__namespace.union([r__namespace.string().check(r__namespace.trim()),r__namespace.array(r__namespace.string().check(r__namespace.trim()))]));n.add(fe,{description:"The path to a base config file to use as a configuration preset file. Documentation can be found at https://github.com/unjs/c12#extending-configuration."});var he=r__namespace.string().check(r__namespace.trim());n.add(he,{description:"The workspace bot user's name (this is the bot that will be used to perform various tasks)"});var Ce=r__namespace.string().check(r__namespace.trim());n.add(Ce,{description:"The email of the workspace bot"});var Te=r__namespace.object({name:he,email:Ce});n.add(Te,{description:"The workspace's bot user's config used to automated various operations tasks"});var Ee=r__namespace.optional(r__namespace.string().check(r__namespace.trim(),r__namespace.url()));n.add(Ee,{description:"A URL to a banner image used to display the workspace's release"});var Re=r__namespace._default(r__namespace.string().check(r__namespace.trim()),me);n.add(Re,{description:"The alt text for the workspace's release banner image"});var Se=r__namespace.object({url:Ee,alt:Re});n.add(Se,{description:"The workspace's banner image used during the release process"});var ve=r__namespace.optional(r__namespace.string().check(r__namespace.trim()));n.add(ve,{description:"A header message appended to the start of the workspace's release notes"});var ke=r__namespace.optional(r__namespace.string().check(r__namespace.trim()));n.add(ke,{description:"A footer message appended to the end of the workspace's release notes"});var Oe=r__namespace.object({banner:r__namespace.union([Se,r__namespace.string().check(r__namespace.trim(),r__namespace.url())]),header:ve,footer:ke});n.add(Oe,{description:"The workspace's release config used during the release process"});var Ae=r__namespace.optional(r__namespace.string().check(r__namespace.trim()));n.add(Ae,{description:"A Twitter/X account associated with the organization/project"});var $e=r__namespace.optional(r__namespace.string().check(r__namespace.trim()));n.add($e,{description:"A Discord account associated with the organization/project"});var _e=r__namespace.optional(r__namespace.string().check(r__namespace.trim()));n.add(_e,{description:"A Telegram account associated with the organization/project"});var Le=r__namespace.optional(r__namespace.string().check(r__namespace.trim()));n.add(Le,{description:"A Slack account associated with the organization/project"});var Ie=r__namespace.optional(r__namespace.string().check(r__namespace.trim()));n.add(Ie,{description:"A Medium account associated with the organization/project"});var ye=r__namespace.optional(r__namespace.string().check(r__namespace.trim()));n.add(ye,{description:"A GitHub account associated with the organization/project"});var Ne=r__namespace.object({twitter:Ae,discord:$e,telegram:_e,slack:Le,medium:Ie,github:ye});n.add(Ne,{description:"The workspace's account config used to store various social media links"});var we=r__namespace.optional(r__namespace.string().check(r__namespace.trim()));n.add(we,{description:"The directory used to store the environment's cached file data"});var be=r__namespace.optional(r__namespace.string().check(r__namespace.trim()));n.add(be,{description:"The directory used to store the environment's data files"});var ze=r__namespace.optional(r__namespace.string().check(r__namespace.trim()));n.add(ze,{description:"The directory used to store the environment's configuration files"});var xe=r__namespace.optional(r__namespace.string().check(r__namespace.trim()));n.add(xe,{description:"The directory used to store the environment's temp files"});var De=r__namespace.optional(r__namespace.string().check(r__namespace.trim()));n.add(De,{description:"The directory used to store the environment's log files"});var Ge=r__namespace._default(r__namespace.string().check(r__namespace.trim()),"dist");n.add(Ge,{description:"The directory used to store the workspace's distributable files after a build (relative to the workspace root)"});var Pe=r__namespace.object({cache:we,data:be,config:ze,temp:xe,log:De,build:Ge});n.add(Pe,{description:"Various directories used by the workspace to store data, cache, and configuration files"});var We=r__namespace._default(r__namespace.enum(["minimal","monorepo"]),"monorepo");n.add(We,{description:"The variant of the workspace. This can be used to enable or disable certain features or configurations."});var Me=r__namespace._default(r__namespace.string().check(r__namespace.trim()),N);n.add(Me,{description:"The path to the workspace's error codes JSON file"});var Fe=r__namespace.optional(r__namespace.url());n.add(Fe,{description:"A URL to a page that looks up the workspace's error messages given a specific error code"});var Ue=r__namespace.object({codesFile:Me,url:Fe});n.add(Ue,{description:"The workspace's error config used when creating error details during a system error"});var je=r__namespace.optional(r__namespace.string().check(r__namespace.trim(),r__namespace.toLowerCase()));n.add(je,{description:"The name of the organization"});var Be=r__namespace.optional(r__namespace.string().check(r__namespace.trim()));n.add(Be,{description:"A description of the organization"});var He=r__namespace.optional(r__namespace.url());n.add(He,{description:"A URL to the organization's logo image"});var Ke=r__namespace.optional(r__namespace.url());n.add(Ke,{description:"A URL to the organization's icon image"});var Ye=r__namespace.optional(r__namespace.url());n.add(Ye,{description:"A URL to a page that provides more information about the organization"});var Ze=r__namespace.object({name:je,description:Be,logo:He,icon:Ke,url:Ye});n.add(Ze,{description:"The workspace's organization details"});var Ve=r__namespace._default(r__namespace.string().check(r__namespace.trim(),r__namespace.toLowerCase()),"https://public.storm-cdn.com/schemas/storm-workspace.schema.json");n.add(Ve,{description:"The URL or file path to the JSON schema file that describes the Storm configuration file"});var Je=r__namespace.string().check(r__namespace.trim(),r__namespace.toLowerCase());n.add(Je,{description:"The name of the workspace/project/service/package/scope using this configuration"});var Xe=r__namespace.string().check(r__namespace.trim(),r__namespace.toLowerCase());n.add(Xe,{description:"The namespace of the workspace/project/service/package/scope using this configuration"});var qe=r__namespace.union([Ze,r__namespace.string().check(r__namespace.trim(),r__namespace.toLowerCase())]);n.add(qe,{description:"The organization of the workspace. This can be a string or an object containing the organization's details"});var Qe=r__namespace.string().check(r__namespace.trim(),r__namespace.toLowerCase());n.add(Qe,{description:"The repo URL of the workspace (i.e. the GitHub repository URL)"});var eo=r__namespace._default(r__namespace.string().check(r__namespace.trim()),"Apache-2.0");n.add(eo,{description:"The license type of the package"});var oo=r__namespace.optional(r__namespace.url());n.add(oo,{description:"The homepage of the workspace"});var ro=r__namespace.optional(r__namespace.url());n.add(ro,{description:"The documentation site for the workspace"});var to=r__namespace.optional(r__namespace.url());n.add(to,{description:"The development portal site for the workspace"});var so=r__namespace.optional(r__namespace.url());n.add(so,{description:"The licensing site for the workspace"});var no=r__namespace.optional(r__namespace.url());n.add(no,{description:"The contact site for the workspace"});var ao=r__namespace.optional(r__namespace.url());n.add(ao,{description:"The support site for the workspace. If not provided, this is defaulted to the `contact` config value"});var io=r__namespace._default(r__namespace.string().check(r__namespace.trim(),r__namespace.toLowerCase()),"main");n.add(io,{description:"The branch of the workspace"});var co=r__namespace.optional(r__namespace.string().check(r__namespace.trim(),r__namespace.toLowerCase()));n.add(co,{description:"A tag specifying the version pre-release identifier"});var po=r__namespace.optional(r__namespace.string().check(r__namespace.trim(),r__namespace.toLowerCase()));n.add(po,{description:"The owner of the package"});var lo=r__namespace._default(r__namespace.enum(["development","test","production"]).check(r__namespace.trim(),r__namespace.toLowerCase()),"production");n.add(lo,{description:"The current runtime environment mode for the package"});var mo=r__namespace.string().check(r__namespace.trim(),r__namespace.toLowerCase());n.add(mo,{description:"The root directory of the workspace"});var go=r__namespace._default(r__namespace.boolean(),false);n.add(go,{description:"Should all known types of workspace caching be skipped?"});var uo=r__namespace._default(r__namespace.enum(["npm","yarn","pnpm","bun"]),"npm");n.add(uo,{description:"The JavaScript/TypeScript package manager used by the repository"});var fo=r__namespace._default(r__namespace.string().check(r__namespace.trim()),"America/New_York");n.add(fo,{description:"The default timezone of the workspace"});var ho=r__namespace._default(r__namespace.string().check(r__namespace.trim()),"en-US");n.add(ho,{description:"The default locale of the workspace"});var Co=r__namespace._default(r__namespace.enum(["silent","fatal","error","warn","success","info","performance","debug","trace","all"]),"info");n.add(Co,{description:"The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)."});var To=r__namespace._default(r__namespace.boolean(),true);n.add(To,{description:"Should the logging of the current Storm Workspace configuration be skipped?"});var Eo=r__namespace._default(r__namespace.nullable(r__namespace.string().check(r__namespace.trim())),null);n.add(Eo,{description:"The filepath of the Storm config. When this field is null, no config file was found in the current workspace."});var ee=r__namespace._default(r__namespace.record(r__namespace.string(),r__namespace.any()),{});n.add(ee,{description:"Configuration of each used extension"});var Ro=r__namespace.object({$schema:Ve,extends:fe,name:Je,variant:We,namespace:Xe,organization:qe,repository:Qe,license:eo,homepage:oo,docs:ro,portal:to,licensing:so,contact:no,support:ao,branch:io,preid:co,owner:po,bot:Te,release:Oe,socials:Ne,error:Ue,mode:lo,workspaceRoot:mo,skipCache:go,directories:Pe,packageManager:uo,timezone:fo,locale:ho,logLevel:Co,skipConfigLogging:To,registry:ge,configFile:Eo,colors:r__namespace.union([Q,ue]),extensions:ee});n.add(ee,{description:"Storm Workspace config values used during various dev-ops processes. This type is a combination of the StormPackageConfig and StormProject types. It represents the config of the entire monorepo."});var So=["dark","light","base","brand","alternate","accent","link","success","discovery","info","warning","danger","fatal","performance","positive","negative"];async function vo(e){let o=de,t,s,a,i,c,p=T(e);if(fs.existsSync(path.join(p,"package.json"))){let g=await promises.readFile(E(p,"package.json"),"utf8");if(g){let f=JSON.parse(g);f.name&&(a=f.name),f.namespace&&(i=f.namespace),f.repository&&(typeof f.repository=="string"?c=f.repository:f.repository.url&&(c=f.repository.url)),f.license&&(o=f.license),f.homepage&&(t=f.homepage),f.bugs&&(typeof f.bugs=="string"?s=f.bugs:f.bugs.url&&(s=f.bugs.url));}}return {workspaceRoot:p,name:a,namespace:i,repository:c,license:o,homepage:t,support:s}}function ko(e){return !e.support&&e.contact&&(e.support=e.contact),!e.contact&&e.support&&(e.contact=e.support),e.homepage&&(e.docs||(e.docs=`${e.homepage}/docs`),e.license||(e.license=`${e.homepage}/license`),e.support||(e.support=`${e.homepage}/support`),e.contact||(e.contact=`${e.homepage}/contact`),(!e.error?.codesFile||!e?.error?.url)&&(e.error??={codesFile:N},e.homepage&&(e.error.url??=`${e.homepage}/errors`))),e}var Ao=async(e,o,t={})=>{let s=o||T(o),a=await Promise.all([c12.loadConfig({cwd:s,packageJson:true,name:e,envName:e?.toUpperCase(),jitiOptions:{debug:false,fsCache:process.env.STORM_SKIP_CACHE==="true"?false:E(process.env.STORM_CACHE_DIR||"node_modules/.cache/storm","jiti")},...t}),c12.loadConfig({cwd:s,packageJson:true,name:e,envName:e?.toUpperCase(),jitiOptions:{debug:false,fsCache:process.env.STORM_SKIP_CACHE==="true"?false:E(process.env.STORM_CACHE_DIR||"node_modules/.cache/storm","jiti")},configFile:e,...t})]);return $o__default.default(a[0]??{},a[1]??{})},_o=async(e,o=[])=>{let t=e||T(e),s=await Ao("storm-workspace",t),a=s.config,i=s.configFile;if(a&&i&&Object.keys(a).length>0&&!a.skipConfigLogging&&O(`Found Storm configuration file "${i.includes(`${t}/`)?i.replace(`${t}/`,""):i}" at "${t}"`,{logLevel:"all"}),o&&o.length>0){let c=await Promise.all(o.map(p=>Ao(p,t)));for(let p of c)p?.config&&p?.configFile&&Object.keys(p.config).length>0&&(!a.skipConfigLogging&&!p.config.skipConfigLogging&&O(`Found alternative configuration file "${p.configFile.includes(`${t}/`)?p.configFile.replace(`${t}/`,""):p.configFile}" at "${t}"`,{logLevel:"all"}),a=$o__default.default(p.config??{},a??{}));}if(!(!a||Object.keys(a).length===0))return a.configFile=i,a};var No=()=>{let e="STORM_",o={extends:process.env[`${e}EXTENDS`]||void 0,name:process.env[`${e}NAME`]||void 0,variant:process.env[`${e}VARIANT`]||void 0,namespace:process.env[`${e}NAMESPACE`]||void 0,owner:process.env[`${e}OWNER`]||void 0,bot:{name:process.env[`${e}BOT_NAME`]||void 0,email:process.env[`${e}BOT_EMAIL`]||void 0},release:{banner:{url:process.env[`${e}RELEASE_BANNER_URL`]||void 0,alt:process.env[`${e}RELEASE_BANNER_ALT`]||void 0},header:process.env[`${e}RELEASE_HEADER`]||void 0,footer:process.env[`${e}RELEASE_FOOTER`]||void 0},error:{codesFile:process.env[`${e}ERROR_CODES_FILE`]||void 0,url:process.env[`${e}ERROR_URL`]||void 0},socials:{twitter:process.env[`${e}SOCIAL_TWITTER`]||void 0,discord:process.env[`${e}SOCIAL_DISCORD`]||void 0,telegram:process.env[`${e}SOCIAL_TELEGRAM`]||void 0,slack:process.env[`${e}SOCIAL_SLACK`]||void 0,medium:process.env[`${e}SOCIAL_MEDIUM`]||void 0,github:process.env[`${e}SOCIAL_GITHUB`]||void 0},organization:process.env[`${e}ORG`]||process.env[`${e}ORGANIZATION`]||process.env[`${e}ORG_NAME`]||process.env[`${e}ORGANIZATION_NAME`]?process.env[`${e}ORG_DESCRIPTION`]||process.env[`${e}ORGANIZATION_DESCRIPTION`]||process.env[`${e}ORG_URL`]||process.env[`${e}ORGANIZATION_URL`]||process.env[`${e}ORG_LOGO`]||process.env[`${e}ORGANIZATION_LOGO`]?{name:process.env[`${e}ORG`]||process.env[`${e}ORGANIZATION`]||process.env[`${e}ORG_NAME`]||process.env[`${e}ORGANIZATION_NAME`],description:process.env[`${e}ORG_DESCRIPTION`]||process.env[`${e}ORGANIZATION_DESCRIPTION`]||void 0,url:process.env[`${e}ORG_URL`]||process.env[`${e}ORGANIZATION_URL`]||void 0,logo:process.env[`${e}ORG_LOGO`]||process.env[`${e}ORGANIZATION_LOGO`]||void 0,icon:process.env[`${e}ORG_ICON`]||process.env[`${e}ORGANIZATION_ICON`]||void 0}:process.env[`${e}ORG`]||process.env[`${e}ORGANIZATION`]||process.env[`${e}ORG_NAME`]||process.env[`${e}ORGANIZATION_NAME`]:void 0,packageManager:process.env[`${e}PACKAGE_MANAGER`]||void 0,license:process.env[`${e}LICENSE`]||void 0,homepage:process.env[`${e}HOMEPAGE`]||void 0,docs:process.env[`${e}DOCS`]||void 0,portal:process.env[`${e}PORTAL`]||void 0,licensing:process.env[`${e}LICENSING`]||void 0,contact:process.env[`${e}CONTACT`]||void 0,support:process.env[`${e}SUPPORT`]||void 0,timezone:process.env[`${e}TIMEZONE`]||process.env.TZ||void 0,locale:process.env[`${e}LOCALE`]||process.env.LOCALE||void 0,configFile:process.env[`${e}WORKSPACE_CONFIG_FILE`]?m(process.env[`${e}WORKSPACE_CONFIG_FILE`]):void 0,workspaceRoot:process.env[`${e}WORKSPACE_ROOT`]?m(process.env[`${e}WORKSPACE_ROOT`]):void 0,directories:{cache:process.env[`${e}CACHE_DIR`]?m(process.env[`${e}CACHE_DIR`]):process.env[`${e}CACHE_DIRECTORY`]?m(process.env[`${e}CACHE_DIRECTORY`]):void 0,data:process.env[`${e}DATA_DIR`]?m(process.env[`${e}DATA_DIR`]):process.env[`${e}DATA_DIRECTORY`]?m(process.env[`${e}DATA_DIRECTORY`]):void 0,config:process.env[`${e}CONFIG_DIR`]?m(process.env[`${e}CONFIG_DIR`]):process.env[`${e}CONFIG_DIRECTORY`]?m(process.env[`${e}CONFIG_DIRECTORY`]):void 0,temp:process.env[`${e}TEMP_DIR`]?m(process.env[`${e}TEMP_DIR`]):process.env[`${e}TEMP_DIRECTORY`]?m(process.env[`${e}TEMP_DIRECTORY`]):void 0,log:process.env[`${e}LOG_DIR`]?m(process.env[`${e}LOG_DIR`]):process.env[`${e}LOG_DIRECTORY`]?m(process.env[`${e}LOG_DIRECTORY`]):void 0,build:process.env[`${e}BUILD_DIR`]?m(process.env[`${e}BUILD_DIR`]):process.env[`${e}BUILD_DIRECTORY`]?m(process.env[`${e}BUILD_DIRECTORY`]):void 0},skipCache:process.env[`${e}SKIP_CACHE`]!==void 0?!!process.env[`${e}SKIP_CACHE`]:void 0,mode:(process.env[`${e}MODE`]??process.env.NODE_ENV??process.env.ENVIRONMENT)||void 0,repository:process.env[`${e}REPOSITORY`]||void 0,branch:process.env[`${e}BRANCH`]||void 0,preid:process.env[`${e}PRE_ID`]||void 0,registry:{github:process.env[`${e}REGISTRY_GITHUB`]||void 0,npm:process.env[`${e}REGISTRY_NPM`]||void 0,cargo:process.env[`${e}REGISTRY_CARGO`]||void 0,cyclone:process.env[`${e}REGISTRY_CYCLONE`]||void 0,container:process.env[`${e}REGISTRY_CONTAINER`]||void 0},logLevel:process.env[`${e}LOG_LEVEL`]!==null&&process.env[`${e}LOG_LEVEL`]!==void 0?process.env[`${e}LOG_LEVEL`]&&Number.isSafeInteger(Number.parseInt(process.env[`${e}LOG_LEVEL`]))?se(Number.parseInt(process.env[`${e}LOG_LEVEL`])):process.env[`${e}LOG_LEVEL`]:void 0,skipConfigLogging:process.env[`${e}SKIP_CONFIG_LOGGING`]!==void 0?!!process.env[`${e}SKIP_CONFIG_LOGGING`]:void 0},t=Object.keys(process.env).filter(a=>a.startsWith(`${e}COLOR_`)&&So.every(i=>!a.startsWith(`${e}COLOR_LIGHT_${i}`)&&!a.startsWith(`${e}COLOR_DARK_${i}`)));o.colors=t.length>0?t.reduce((a,i)=>(a[i]=Lo(e,i),a),{}):Lo(e),o.docs===pe&&(o.homepage===L?o.docs=`${L}/projects/${o.name}/docs`:o.docs=`${o.homepage}/docs`),o.licensing===le&&(o.homepage===L?o.licensing=`${L}/projects/${o.name}/licensing`:o.licensing=`${o.homepage}/docs`);let s=process.env[`${e}WORKSPACE_CONFIG`];if(s){let a=JSON.parse(s);o={...o,...a,colors:{...o.colors,...a.colors},extensions:{...o.extensions,...a.extensions}};}return o},Lo=(e,o)=>{let t=`COLOR_${o&&o!=="base"?`${o}_`:""}`.toUpperCase();return process.env[`${e}${t}LIGHT_BRAND`]||process.env[`${e}${t}DARK_BRAND`]?pr(e+t):cr(e+t)},cr=e=>{let o=[];if(process.env[`${e}GRADIENT_START`]&&process.env[`${e}GRADIENT_END`])o.push(process.env[`${e}GRADIENT_START`],process.env[`${e}GRADIENT_END`]);else if(process.env[`${e}GRADIENT_0`]||process.env[`${e}GRADIENT_1`]){let t=process.env[`${e}GRADIENT_0`]?0:1;for(;process.env[`${e}GRADIENT_${t}`];)o.push(process.env[`${e}GRADIENT_${t}`]),t++;}return {dark:process.env[`${e}DARK`],light:process.env[`${e}LIGHT`],brand:process.env[`${e}BRAND`],alternate:process.env[`${e}ALTERNATE`],accent:process.env[`${e}ACCENT`],link:process.env[`${e}LINK`],discovery:process.env[`${e}DISCOVERY`],success:process.env[`${e}SUCCESS`],info:process.env[`${e}INFO`],debug:process.env[`${e}DEBUG`],warning:process.env[`${e}WARNING`],danger:process.env[`${e}DANGER`],fatal:process.env[`${e}FATAL`],performance:process.env[`${e}PERFORMANCE`],positive:process.env[`${e}POSITIVE`],negative:process.env[`${e}NEGATIVE`],gradient:o}},pr=e=>({light:Io(`${e}_LIGHT_`),dark:Io(`${e}_DARK_`)}),Io=e=>{let o=[];if(process.env[`${e}GRADIENT_START`]&&process.env[`${e}GRADIENT_END`])o.push(process.env[`${e}GRADIENT_START`],process.env[`${e}GRADIENT_END`]);else if(process.env[`${e}GRADIENT_0`]||process.env[`${e}GRADIENT_1`]){let t=process.env[`${e}GRADIENT_0`]?0:1;for(;process.env[`${e}GRADIENT_${t}`];)o.push(process.env[`${e}GRADIENT_${t}`]),t++;}return {foreground:process.env[`${e}FOREGROUND`],background:process.env[`${e}BACKGROUND`],brand:process.env[`${e}BRAND`],alternate:process.env[`${e}ALTERNATE`],accent:process.env[`${e}ACCENT`],link:process.env[`${e}LINK`],discovery:process.env[`${e}DISCOVERY`],success:process.env[`${e}SUCCESS`],info:process.env[`${e}INFO`],debug:process.env[`${e}DEBUG`],warning:process.env[`${e}WARNING`],danger:process.env[`${e}DANGER`],fatal:process.env[`${e}FATAL`],performance:process.env[`${e}PERFORMANCE`],positive:process.env[`${e}POSITIVE`],negative:process.env[`${e}NEGATIVE`],gradient:o}};var lr=(e,o)=>{for(let t of Object.keys(o??{}))if(o[t]){let s=t?.replace(/([A-Z])+/g,i=>i?i[0]?.toUpperCase()+i.slice(1):"").split(/(?=[A-Z])|[.\-\s_]/).map(i=>i.toLowerCase())??[],a;if(s.length===0)return;s.length===1?a=s[0]?.toUpperCase()??"":a=s.reduce((i,c)=>`${i}_${c.toLowerCase()}`),process.env[`STORM_EXTENSION_${e.toUpperCase()}_${a.toUpperCase()}`]=o[t];}},zo=e=>{let o="STORM_";if(e.extends&&(process.env[`${o}EXTENDS`]=Array.isArray(e.extends)?JSON.stringify(e.extends):e.extends),e.name&&(process.env[`${o}NAME`]=e.name),e.variant&&(process.env[`${o}VARIANT`]=e.variant),e.namespace&&(process.env[`${o}NAMESPACE`]=e.namespace),e.owner&&(process.env[`${o}OWNER`]=e.owner),e.bot&&(process.env[`${o}BOT_NAME`]=e.bot.name,process.env[`${o}BOT_EMAIL`]=e.bot.email),e.error&&(process.env[`${o}ERROR_CODES_FILE`]=e.error.codesFile,process.env[`${o}ERROR_URL`]=e.error.url),e.release&&(e.release.banner&&(typeof e.release.banner=="string"?(process.env[`${o}RELEASE_BANNER`]=e.release.banner,process.env[`${o}RELEASE_BANNER_URL`]=e.release.banner):(process.env[`${o}RELEASE_BANNER`]=e.release.banner.url,process.env[`${o}RELEASE_BANNER_URL`]=e.release.banner.url,process.env[`${o}RELEASE_BANNER_ALT`]=e.release.banner.alt)),process.env[`${o}RELEASE_HEADER`]=e.release.header,process.env[`${o}RELEASE_FOOTER`]=e.release.footer),e.socials&&(e.socials.twitter&&(process.env[`${o}SOCIAL_TWITTER`]=e.socials.twitter),e.socials.discord&&(process.env[`${o}SOCIAL_DISCORD`]=e.socials.discord),e.socials.telegram&&(process.env[`${o}SOCIAL_TELEGRAM`]=e.socials.telegram),e.socials.slack&&(process.env[`${o}SOCIAL_SLACK`]=e.socials.slack),e.socials.medium&&(process.env[`${o}SOCIAL_MEDIUM`]=e.socials.medium),e.socials.github&&(process.env[`${o}SOCIAL_GITHUB`]=e.socials.github)),e.organization&&(typeof e.organization=="string"?(process.env[`${o}ORG`]=e.organization,process.env[`${o}ORG_NAME`]=e.organization,process.env[`${o}ORGANIZATION`]=e.organization,process.env[`${o}ORGANIZATION_NAME`]=e.organization):(process.env[`${o}ORG`]=e.organization.name,process.env[`${o}ORG_NAME`]=e.organization.name,process.env[`${o}ORGANIZATION`]=e.organization.name,process.env[`${o}ORGANIZATION_NAME`]=e.organization.name,e.organization.url&&(process.env[`${o}ORG_URL`]=e.organization.url,process.env[`${o}ORGANIZATION_URL`]=e.organization.url),e.organization.description&&(process.env[`${o}ORG_DESCRIPTION`]=e.organization.description,process.env[`${o}ORGANIZATION_DESCRIPTION`]=e.organization.description),e.organization.logo&&(process.env[`${o}ORG_LOGO`]=e.organization.logo,process.env[`${o}ORGANIZATION_LOGO`]=e.organization.logo),e.organization.icon&&(process.env[`${o}ORG_ICON`]=e.organization.icon,process.env[`${o}ORGANIZATION_ICON`]=e.organization.icon))),e.packageManager&&(process.env[`${o}PACKAGE_MANAGER`]=e.packageManager),e.license&&(process.env[`${o}LICENSE`]=e.license),e.homepage&&(process.env[`${o}HOMEPAGE`]=e.homepage),e.docs&&(process.env[`${o}DOCS`]=e.docs),e.portal&&(process.env[`${o}PORTAL`]=e.portal),e.licensing&&(process.env[`${o}LICENSING`]=e.licensing),e.contact&&(process.env[`${o}CONTACT`]=e.contact),e.support&&(process.env[`${o}SUPPORT`]=e.support),e.timezone&&(process.env[`${o}TIMEZONE`]=e.timezone,process.env.TZ=e.timezone,process.env.DEFAULT_TIMEZONE=e.timezone,process.env.TIMEZONE=e.timezone),e.locale&&(process.env[`${o}LOCALE`]=e.locale,process.env.DEFAULT_LOCALE=e.locale,process.env.LOCALE=e.locale,process.env.LANG=e.locale?`${e.locale.replaceAll("-","_")}.UTF-8`:"en_US.UTF-8"),e.configFile&&(process.env[`${o}WORKSPACE_CONFIG_FILE`]=m(e.configFile)),e.workspaceRoot&&(process.env[`${o}WORKSPACE_ROOT`]=m(e.workspaceRoot),process.env.NX_WORKSPACE_ROOT=m(e.workspaceRoot),process.env.NX_WORKSPACE_ROOT_PATH=m(e.workspaceRoot)),e.directories&&(!e.skipCache&&e.directories.cache&&(process.env[`${o}CACHE_DIR`]=m(e.directories.cache),process.env[`${o}CACHE_DIRECTORY`]=process.env[`${o}CACHE_DIR`]),e.directories.data&&(process.env[`${o}DATA_DIR`]=m(e.directories.data),process.env[`${o}DATA_DIRECTORY`]=process.env[`${o}DATA_DIR`]),e.directories.config&&(process.env[`${o}CONFIG_DIR`]=m(e.directories.config),process.env[`${o}CONFIG_DIRECTORY`]=process.env[`${o}CONFIG_DIR`]),e.directories.temp&&(process.env[`${o}TEMP_DIR`]=m(e.directories.temp),process.env[`${o}TEMP_DIRECTORY`]=process.env[`${o}TEMP_DIR`]),e.directories.log&&(process.env[`${o}LOG_DIR`]=m(e.directories.log),process.env[`${o}LOG_DIRECTORY`]=process.env[`${o}LOG_DIR`]),e.directories.build&&(process.env[`${o}BUILD_DIR`]=m(e.directories.build),process.env[`${o}BUILD_DIRECTORY`]=process.env[`${o}BUILD_DIR`])),e.skipCache!==void 0&&(process.env[`${o}SKIP_CACHE`]=String(e.skipCache),e.skipCache&&(process.env.NX_SKIP_NX_CACHE??=String(e.skipCache),process.env.NX_CACHE_PROJECT_GRAPH??=String(e.skipCache))),e.mode&&(process.env[`${o}MODE`]=e.mode,process.env.NODE_ENV=e.mode,process.env.ENVIRONMENT=e.mode),e.colors?.base?.light||e.colors?.base?.dark)for(let t of Object.keys(e.colors))wo(`${o}COLOR_${t}_`,e.colors[t]);else wo(`${o}COLOR_`,e.colors);e.repository&&(process.env[`${o}REPOSITORY`]=e.repository),e.branch&&(process.env[`${o}BRANCH`]=e.branch),e.preid&&(process.env[`${o}PRE_ID`]=String(e.preid)),e.registry&&(e.registry.github&&(process.env[`${o}REGISTRY_GITHUB`]=String(e.registry.github)),e.registry.npm&&(process.env[`${o}REGISTRY_NPM`]=String(e.registry.npm)),e.registry.cargo&&(process.env[`${o}REGISTRY_CARGO`]=String(e.registry.cargo)),e.registry.cyclone&&(process.env[`${o}REGISTRY_CYCLONE`]=String(e.registry.cyclone)),e.registry.container&&(process.env[`${o}REGISTRY_CONTAINER`]=String(e.registry.container))),e.logLevel&&(process.env[`${o}LOG_LEVEL`]=String(e.logLevel),process.env.LOG_LEVEL=String(e.logLevel),process.env.NX_VERBOSE_LOGGING=String(A(e.logLevel)>=l.DEBUG),process.env.RUST_BACKTRACE=A(e.logLevel)>=l.DEBUG?"full":"none"),e.skipConfigLogging!==void 0&&(process.env[`${o}SKIP_CONFIG_LOGGING`]=String(e.skipConfigLogging)),process.env[`${o}WORKSPACE_CONFIG`]=JSON.stringify(e);for(let t of Object.keys(e.extensions??{}))e.extensions[t]&&Object.keys(e.extensions[t])&&lr(t,e.extensions[t]);},wo=(e,o)=>o?.light?.brand||o?.dark?.brand?mr(e,o):dr(e,o),dr=(e,o)=>{if(o.dark&&(process.env[`${e}DARK`]=o.dark),o.light&&(process.env[`${e}LIGHT`]=o.light),o.brand&&(process.env[`${e}BRAND`]=o.brand),o.alternate&&(process.env[`${e}ALTERNATE`]=o.alternate),o.accent&&(process.env[`${e}ACCENT`]=o.accent),o.link&&(process.env[`${e}LINK`]=o.link),o.discovery&&(process.env[`${e}DISCOVERY`]=o.discovery),o.success&&(process.env[`${e}SUCCESS`]=o.success),o.info&&(process.env[`${e}INFO`]=o.info),o.debug&&(process.env[`${e}DEBUG`]=o.debug),o.warning&&(process.env[`${e}WARNING`]=o.warning),o.danger&&(process.env[`${e}DANGER`]=o.danger),o.fatal&&(process.env[`${e}FATAL`]=o.fatal),o.performance&&(process.env[`${e}PERFORMANCE`]=o.performance),o.positive&&(process.env[`${e}POSITIVE`]=o.positive),o.negative&&(process.env[`${e}NEGATIVE`]=o.negative),o.gradient)for(let t=0;t<o.gradient.length;t++)process.env[`${e}GRADIENT_${t}`]=o.gradient[t];},mr=(e,o)=>({light:bo(`${e}LIGHT_`,o.light),dark:bo(`${e}DARK_`,o.dark)}),bo=(e,o)=>{if(o.foreground&&(process.env[`${e}FOREGROUND`]=o.foreground),o.background&&(process.env[`${e}BACKGROUND`]=o.background),o.brand&&(process.env[`${e}BRAND`]=o.brand),o.alternate&&(process.env[`${e}ALTERNATE`]=o.alternate),o.accent&&(process.env[`${e}ACCENT`]=o.accent),o.link&&(process.env[`${e}LINK`]=o.link),o.discovery&&(process.env[`${e}DISCOVERY`]=o.discovery),o.success&&(process.env[`${e}SUCCESS`]=o.success),o.info&&(process.env[`${e}INFO`]=o.info),o.debug&&(process.env[`${e}DEBUG`]=o.debug),o.warning&&(process.env[`${e}WARNING`]=o.warning),o.danger&&(process.env[`${e}DANGER`]=o.danger),o.fatal&&(process.env[`${e}FATAL`]=o.fatal),o.performance&&(process.env[`${e}PERFORMANCE`]=o.performance),o.positive&&(process.env[`${e}POSITIVE`]=o.positive),o.negative&&(process.env[`${e}NEGATIVE`]=o.negative),o.gradient)for(let t=0;t<o.gradient.length;t++)process.env[`${e}GRADIENT_${t}`]=o.gradient[t];};var I,ur=async(e,o,t,s=false,a=true)=>{let i;if(!I?.data||!I?.timestamp||I.timestamp<Date.now()-8e3){let c=t;c||(c=T());let p=No(),g=await _o(c);if(!g&&(s||ne("No Storm Workspace configuration file found in the current repository. Please ensure this is the expected behavior - you can add a `storm-workspace.json` file to the root of your workspace if it is not.\n",{logLevel:"all"}),a===false))return;let f=await vo(c),y=$o__default.default(p,g,f);y.variant||(y.variant=fs.existsSync(E(c,"nx.json"))||fs.existsSync(E(c,".nx"))||fs.existsSync(E(c,"lerna.json"))||fs.existsSync(E(c,"turbo.json"))?"monorepo":"minimal");try{let _=await Promise.resolve(Ro._zod.parse({value:y,issues:[]},{async:!0}));i=ko(_.value),i.workspaceRoot??=c;}catch(_){throw new Error(`Failed to parse Storm Workspace configuration${_?.message?`: ${_.message}`:""}
|
|
27
|
+
|
|
28
|
+
Please ensure your configuration file is valid JSON and matches the expected schema. The current workspace configuration input is: ${C(y)}`,{cause:_})}}else i=I.data;return I={timestamp:Date.now(),data:i},i},xo=async(e,o=false)=>{let t=await ur(void 0,void 0,e,o,true);return zo(t),!o&&!t.skipConfigLogging&&O(`\u2699\uFE0F Using Storm Workspace configuration:
|
|
29
|
+
${C(t)}`,t),t};function hr(e,o=false){return xo(e,o)}function Do(e=true,o={}){let t=o.workspaceRoot;return t||(t=T(o.cwd)),hr(t,e)}var Sr={parser:"json",proseWrap:"preserve",trailingComma:"none",tabWidth:2,semi:true,singleQuote:false,quoteProps:"as-needed",insertPragma:false,bracketSameLine:true,printWidth:80,bracketSpacing:true,arrowParens:"avoid",endOfLine:"lf",plugins:["prettier-plugin-packagejson"]};function Go(e=T(process.cwd())){let o=E(e,"package.json");if(!fs.existsSync(o))throw new Error(`No \`package.json\` file found in workspace root (searched in: ${o}).`);return o}async function Rs(e=T(process.cwd())){let o=await promises.readFile(Go(e),"utf8");if(o)return JSON.parse(o)}function Ss(e){if(e.catalog)return e.catalog;let o=e.workspaces;if(o&&typeof o=="object"&&!Array.isArray(o))return o.catalog}function vs(e,o){if(e.catalog){e.catalog=o;return}let t=e.workspaces;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.catalog){t.catalog=o;return}e.catalog=o;}async function ks(e,o=T(process.cwd())){let t=await Do(),s=await prettier.format(JSON.stringify(e),Sr);O(`Writing updated package.json file to workspace root: ${s}`,t),await promises.writeFile(Go(o),s);}exports.a=ne;exports.b=Vr;exports.c=O;exports.d=E;exports.e=T;exports.f=hr;exports.g=Do;exports.h=Go;exports.i=Rs;exports.j=Ss;exports.k=vs;exports.l=ks;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {b}from'./chunk-RBC53R6W.js';import {d,e}from'./chunk-JXISZBJG.js';import {readCachedProjectGraph,createProjectGraphAsync}from'@nx/devkit';import {existsSync}from'node:fs';import {readFile,writeFile}from'node:fs/promises';import {format}from'prettier';async function C(t=process.cwd(),f=e(t)){let g=d(t,"package.json"),l=await readFile(g,"utf8");if(!l)throw new Error("No package.json file found in package root: "+t);let s=await b(f),c=JSON.parse(l);if(!s){console.warn("No workspace catalog found. Skipping dependencies replacement for now.");return}for(let a of ["dependencies","devDependencies","peerDependencies"]){let o=c[a];if(o){for(let e of Object.keys(o))if(o[e]==="catalog:"){if(!s)throw new Error(`Dependency ${e} is marked as \`catalog:\`, but no catalog exists in the workspace root's \`package.json\` file.`);let n=s[e];if(!n)throw new Error("Missing workspace catalog version for "+e);o[e]=n;}else if(o[e].startsWith("catalog:"))throw new Error("multiple named catalogs not supported")}}let r;try{r=readCachedProjectGraph();}catch{await createProjectGraphAsync(),r=readCachedProjectGraph();}let i={};r&&await Promise.all(Object.keys(r.nodes).map(async a=>{let o=r.nodes[a];if(o?.data.root){let e=d(f,o.data.root,"package.json");if(existsSync(e)){let n=await readFile(e,"utf8"),p=JSON.parse(n);p.private!==true&&(i[p.name]=p.version);}}}));for(let a of ["dependencies","devDependencies","peerDependencies"]){let o=c[a];if(o){for(let e of Object.keys(o))if(o[e].startsWith("workspace:"))if(i[e])o[e]=`^${i[e]}`;else throw new Error(`Workspace dependency ${e} not found in workspace packages.`)}}return writeFile(g,await format(JSON.stringify(c),{parser:"json",proseWrap:"preserve",trailingComma:"none",tabWidth:2,semi:true,singleQuote:false,quoteProps:"as-needed",insertPragma:false,bracketSameLine:true,printWidth:80,bracketSpacing:true,arrowParens:"avoid",endOfLine:"lf",plugins:["prettier-plugin-packagejson"]}))}export{C as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';function c(e){return (e??"").replace(/^===/g,"").replace(/^!==/g,"").replace(/^==/g,"").replace(/^!=/g,"").replace(/^>/g,"").replace(/^>=/g,"").replace(/^</g,"").replace(/^<=/g,"").replace(/^\^/g,"").replace(/^~/g,"")}exports.a=c;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkQOVB4LRJ_cjs=require('../chunk-QOVB4LRJ.cjs');require('../chunk-WAL5SD4G.cjs'),require('../chunk-SAEQEYN6.cjs');Object.defineProperty(exports,"getCatalog",{enumerable:true,get:function(){return chunkQOVB4LRJ_cjs.b}});Object.defineProperty(exports,"getCatalogSafe",{enumerable:true,get:function(){return chunkQOVB4LRJ_cjs.a}});Object.defineProperty(exports,"saveCatalog",{enumerable:true,get:function(){return chunkQOVB4LRJ_cjs.e}});Object.defineProperty(exports,"setCatalog",{enumerable:true,get:function(){return chunkQOVB4LRJ_cjs.c}});Object.defineProperty(exports,"upgradeCatalog",{enumerable:true,get:function(){return chunkQOVB4LRJ_cjs.d}});
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Safely retrieve the workspace catalog from the workspace root `package.json` file.
|
|
3
|
+
*
|
|
4
|
+
* @param workspaceRoot - The root directory of the workspace. Defaults to the result of `findWorkspaceRoot(process.cwd())`.
|
|
5
|
+
* @returns A promise that resolves to the catalog object if found, or undefined if no catalog exists or the `package.json` file is not found.
|
|
6
|
+
*/
|
|
7
|
+
declare function getCatalogSafe(workspaceRoot?: string): Promise<Record<string, string> | undefined>;
|
|
8
|
+
/**
|
|
9
|
+
* Retrieve the workspace catalog from the workspace root `package.json` file.
|
|
10
|
+
*
|
|
11
|
+
* @param workspaceRoot - The root directory of the workspace. Defaults to the result of `findWorkspaceRoot(process.cwd())`.
|
|
12
|
+
* @returns A promise that resolves to the catalog object if found, or throws an error if no catalog exists or the `package.json` file is not found.
|
|
13
|
+
* @throws Will throw an error if the `package.json` file is found but cannot be read.
|
|
14
|
+
*/
|
|
15
|
+
declare function getCatalog(workspaceRoot?: string): Promise<Record<string, string> | undefined>;
|
|
16
|
+
/**
|
|
17
|
+
* Set the workspace catalog in the workspace root `package.json` file.
|
|
18
|
+
*
|
|
19
|
+
* @param catalog - The catalog object to set in the `package.json` file.
|
|
20
|
+
* @param workspaceRoot - The root directory of the workspace. Defaults to the result of `findWorkspaceRoot(process.cwd())`.
|
|
21
|
+
*/
|
|
22
|
+
declare function setCatalog(catalog: Record<string, string>, workspaceRoot?: string): Promise<void>;
|
|
23
|
+
interface UpgradeCatalogPackageOptions {
|
|
24
|
+
/**
|
|
25
|
+
* The npm tag to use when fetching the latest version of the package.
|
|
26
|
+
*
|
|
27
|
+
* @defaultValue `"latest"`
|
|
28
|
+
*/
|
|
29
|
+
tag?: string;
|
|
30
|
+
/**
|
|
31
|
+
* The root directory of the workspace.
|
|
32
|
+
*
|
|
33
|
+
* @defaultValue The value returned by `findWorkspaceRoot(process.cwd())`
|
|
34
|
+
*/
|
|
35
|
+
workspaceRoot?: string;
|
|
36
|
+
/**
|
|
37
|
+
* An indicator of whether to throw an error if the package is not found in the catalog.
|
|
38
|
+
*
|
|
39
|
+
* @defaultValue `false`
|
|
40
|
+
*/
|
|
41
|
+
throwIfMissingInCatalog?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* The version prefix to use when updating the package (e.g., "^", "~", or "1.2.3"). Defaults to "^".
|
|
44
|
+
*
|
|
45
|
+
* - Caret (^): The default prefix. It allows updates to the latest minor or patch version while staying within the same major version. Example: "^1.2.3" allows updates to 1.3.0 or 1.2.4, but not 2.0.0.
|
|
46
|
+
* - Tilde (~): Allows updates to the latest patch version while staying within the same minor version. Example: "~1.2.3" allows updates to 1.2.4 but not 1.3.0.
|
|
47
|
+
* - Exact (no prefix): Locks the dependency to a specific version. No updates are allowed. Example: 1.2.3 will only use 1.2.3.
|
|
48
|
+
* - Greater/Less Than (>, <, >=, <=): Specifies a range of acceptable versions. Example: ">=1.2.3 <2.0.0" allows any version from 1.2.3 to 1.9.x.
|
|
49
|
+
* - Wildcard (*): Allows the most flexibility by accepting any version. Example: "*2.4.6" allows any version.
|
|
50
|
+
*
|
|
51
|
+
* @defaultValue `"^"`
|
|
52
|
+
*/
|
|
53
|
+
prefix?: "^" | "~" | ">" | "<" | ">=" | "<=" | "*";
|
|
54
|
+
/**
|
|
55
|
+
* An indicator of whether to enable debug logging for the upgrade process.
|
|
56
|
+
*
|
|
57
|
+
* @defaultValue `false`
|
|
58
|
+
*/
|
|
59
|
+
verbose?: boolean;
|
|
60
|
+
}
|
|
61
|
+
interface UpgradeCatalogResult {
|
|
62
|
+
catalog: Record<string, string>;
|
|
63
|
+
updated: boolean;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Upgrade a package in the workspace catalog.
|
|
67
|
+
*
|
|
68
|
+
* @param catalog - The workspace catalog to update.
|
|
69
|
+
* @param packageName - The name of the package to upgrade.
|
|
70
|
+
* @param options - Options for upgrading the package.
|
|
71
|
+
* @returns The updated catalog.
|
|
72
|
+
*/
|
|
73
|
+
declare function upgradeCatalog(catalog: Record<string, string>, packageName: string, options?: UpgradeCatalogPackageOptions): Promise<UpgradeCatalogResult>;
|
|
74
|
+
/**
|
|
75
|
+
* Update package.json dependencies currently using `catalog:` or `workspace:*` to use the workspace catalog dependencies actual versions and the local workspace versions respectively.
|
|
76
|
+
*
|
|
77
|
+
* @param packageRoot - The root directory of the package to update. Defaults to the current working directory.
|
|
78
|
+
* @param workspaceRoot - The root directory of the workspace. Defaults to the result of `findWorkspaceRoot(packageRoot)`.
|
|
79
|
+
* @returns A promise that resolves when the package.json file has been updated.
|
|
80
|
+
* @throws Will throw an error if no package.json file is found in the package root, or if a dependency is marked as `catalog:` but no catalog exists.
|
|
81
|
+
*/
|
|
82
|
+
declare function saveCatalog(packageName: string, options?: UpgradeCatalogPackageOptions): Promise<void>;
|
|
83
|
+
|
|
84
|
+
export { type UpgradeCatalogPackageOptions, type UpgradeCatalogResult, getCatalog, getCatalogSafe, saveCatalog, setCatalog, upgradeCatalog };
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Safely retrieve the workspace catalog from the workspace root `package.json` file.
|
|
3
|
+
*
|
|
4
|
+
* @param workspaceRoot - The root directory of the workspace. Defaults to the result of `findWorkspaceRoot(process.cwd())`.
|
|
5
|
+
* @returns A promise that resolves to the catalog object if found, or undefined if no catalog exists or the `package.json` file is not found.
|
|
6
|
+
*/
|
|
7
|
+
declare function getCatalogSafe(workspaceRoot?: string): Promise<Record<string, string> | undefined>;
|
|
8
|
+
/**
|
|
9
|
+
* Retrieve the workspace catalog from the workspace root `package.json` file.
|
|
10
|
+
*
|
|
11
|
+
* @param workspaceRoot - The root directory of the workspace. Defaults to the result of `findWorkspaceRoot(process.cwd())`.
|
|
12
|
+
* @returns A promise that resolves to the catalog object if found, or throws an error if no catalog exists or the `package.json` file is not found.
|
|
13
|
+
* @throws Will throw an error if the `package.json` file is found but cannot be read.
|
|
14
|
+
*/
|
|
15
|
+
declare function getCatalog(workspaceRoot?: string): Promise<Record<string, string> | undefined>;
|
|
16
|
+
/**
|
|
17
|
+
* Set the workspace catalog in the workspace root `package.json` file.
|
|
18
|
+
*
|
|
19
|
+
* @param catalog - The catalog object to set in the `package.json` file.
|
|
20
|
+
* @param workspaceRoot - The root directory of the workspace. Defaults to the result of `findWorkspaceRoot(process.cwd())`.
|
|
21
|
+
*/
|
|
22
|
+
declare function setCatalog(catalog: Record<string, string>, workspaceRoot?: string): Promise<void>;
|
|
23
|
+
interface UpgradeCatalogPackageOptions {
|
|
24
|
+
/**
|
|
25
|
+
* The npm tag to use when fetching the latest version of the package.
|
|
26
|
+
*
|
|
27
|
+
* @defaultValue `"latest"`
|
|
28
|
+
*/
|
|
29
|
+
tag?: string;
|
|
30
|
+
/**
|
|
31
|
+
* The root directory of the workspace.
|
|
32
|
+
*
|
|
33
|
+
* @defaultValue The value returned by `findWorkspaceRoot(process.cwd())`
|
|
34
|
+
*/
|
|
35
|
+
workspaceRoot?: string;
|
|
36
|
+
/**
|
|
37
|
+
* An indicator of whether to throw an error if the package is not found in the catalog.
|
|
38
|
+
*
|
|
39
|
+
* @defaultValue `false`
|
|
40
|
+
*/
|
|
41
|
+
throwIfMissingInCatalog?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* The version prefix to use when updating the package (e.g., "^", "~", or "1.2.3"). Defaults to "^".
|
|
44
|
+
*
|
|
45
|
+
* - Caret (^): The default prefix. It allows updates to the latest minor or patch version while staying within the same major version. Example: "^1.2.3" allows updates to 1.3.0 or 1.2.4, but not 2.0.0.
|
|
46
|
+
* - Tilde (~): Allows updates to the latest patch version while staying within the same minor version. Example: "~1.2.3" allows updates to 1.2.4 but not 1.3.0.
|
|
47
|
+
* - Exact (no prefix): Locks the dependency to a specific version. No updates are allowed. Example: 1.2.3 will only use 1.2.3.
|
|
48
|
+
* - Greater/Less Than (>, <, >=, <=): Specifies a range of acceptable versions. Example: ">=1.2.3 <2.0.0" allows any version from 1.2.3 to 1.9.x.
|
|
49
|
+
* - Wildcard (*): Allows the most flexibility by accepting any version. Example: "*2.4.6" allows any version.
|
|
50
|
+
*
|
|
51
|
+
* @defaultValue `"^"`
|
|
52
|
+
*/
|
|
53
|
+
prefix?: "^" | "~" | ">" | "<" | ">=" | "<=" | "*";
|
|
54
|
+
/**
|
|
55
|
+
* An indicator of whether to enable debug logging for the upgrade process.
|
|
56
|
+
*
|
|
57
|
+
* @defaultValue `false`
|
|
58
|
+
*/
|
|
59
|
+
verbose?: boolean;
|
|
60
|
+
}
|
|
61
|
+
interface UpgradeCatalogResult {
|
|
62
|
+
catalog: Record<string, string>;
|
|
63
|
+
updated: boolean;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Upgrade a package in the workspace catalog.
|
|
67
|
+
*
|
|
68
|
+
* @param catalog - The workspace catalog to update.
|
|
69
|
+
* @param packageName - The name of the package to upgrade.
|
|
70
|
+
* @param options - Options for upgrading the package.
|
|
71
|
+
* @returns The updated catalog.
|
|
72
|
+
*/
|
|
73
|
+
declare function upgradeCatalog(catalog: Record<string, string>, packageName: string, options?: UpgradeCatalogPackageOptions): Promise<UpgradeCatalogResult>;
|
|
74
|
+
/**
|
|
75
|
+
* Update package.json dependencies currently using `catalog:` or `workspace:*` to use the workspace catalog dependencies actual versions and the local workspace versions respectively.
|
|
76
|
+
*
|
|
77
|
+
* @param packageRoot - The root directory of the package to update. Defaults to the current working directory.
|
|
78
|
+
* @param workspaceRoot - The root directory of the workspace. Defaults to the result of `findWorkspaceRoot(packageRoot)`.
|
|
79
|
+
* @returns A promise that resolves when the package.json file has been updated.
|
|
80
|
+
* @throws Will throw an error if no package.json file is found in the package root, or if a dependency is marked as `catalog:` but no catalog exists.
|
|
81
|
+
*/
|
|
82
|
+
declare function saveCatalog(packageName: string, options?: UpgradeCatalogPackageOptions): Promise<void>;
|
|
83
|
+
|
|
84
|
+
export { type UpgradeCatalogPackageOptions, type UpgradeCatalogResult, getCatalog, getCatalogSafe, saveCatalog, setCatalog, upgradeCatalog };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{b as getCatalog,a as getCatalogSafe,e as saveCatalog,c as setCatalog,d as upgradeCatalog}from'../chunk-RBC53R6W.js';import'../chunk-7QKHH2VM.js';import'../chunk-JXISZBJG.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkWAL5SD4G_cjs=require('../chunk-WAL5SD4G.cjs');Object.defineProperty(exports,"replacePrefix",{enumerable:true,get:function(){return chunkWAL5SD4G_cjs.a}});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Replaces all the prefixes in a string with an empty string.
|
|
3
|
+
*
|
|
4
|
+
* @param value - The string to replace the prefixes in.
|
|
5
|
+
* @returns The string with all the prefixes replaced with an empty string.
|
|
6
|
+
*/
|
|
7
|
+
declare function replacePrefix(value?: string): string;
|
|
8
|
+
|
|
9
|
+
export { replacePrefix };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Replaces all the prefixes in a string with an empty string.
|
|
3
|
+
*
|
|
4
|
+
* @param value - The string to replace the prefixes in.
|
|
5
|
+
* @returns The string with all the prefixes replaced with an empty string.
|
|
6
|
+
*/
|
|
7
|
+
declare function replacePrefix(value?: string): string;
|
|
8
|
+
|
|
9
|
+
export { replacePrefix };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as replacePrefix}from'../chunk-7QKHH2VM.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';require('../chunk-3CHW2FOO.cjs');var chunkCEGV7WAH_cjs=require('../chunk-CEGV7WAH.cjs'),chunkQOVB4LRJ_cjs=require('../chunk-QOVB4LRJ.cjs');require('../chunk-WAL5SD4G.cjs');var chunkD55VRNVR_cjs=require('../chunk-D55VRNVR.cjs'),chunkSAEQEYN6_cjs=require('../chunk-SAEQEYN6.cjs');Object.defineProperty(exports,"replaceDepsAliases",{enumerable:true,get:function(){return chunkCEGV7WAH_cjs.a}});Object.defineProperty(exports,"getCatalog",{enumerable:true,get:function(){return chunkQOVB4LRJ_cjs.b}});Object.defineProperty(exports,"getCatalogSafe",{enumerable:true,get:function(){return chunkQOVB4LRJ_cjs.a}});Object.defineProperty(exports,"saveCatalog",{enumerable:true,get:function(){return chunkQOVB4LRJ_cjs.e}});Object.defineProperty(exports,"setCatalog",{enumerable:true,get:function(){return chunkQOVB4LRJ_cjs.c}});Object.defineProperty(exports,"upgradeCatalog",{enumerable:true,get:function(){return chunkQOVB4LRJ_cjs.d}});Object.defineProperty(exports,"getWorkspaceFilePath",{enumerable:true,get:function(){return chunkD55VRNVR_cjs.a}});Object.defineProperty(exports,"readWorkspaceFile",{enumerable:true,get:function(){return chunkD55VRNVR_cjs.b}});Object.defineProperty(exports,"writeWorkspaceFile",{enumerable:true,get:function(){return chunkD55VRNVR_cjs.c}});Object.defineProperty(exports,"getCatalogFromPackageJson",{enumerable:true,get:function(){return chunkSAEQEYN6_cjs.j}});Object.defineProperty(exports,"getRootPackageJsonPath",{enumerable:true,get:function(){return chunkSAEQEYN6_cjs.h}});Object.defineProperty(exports,"readRootPackageJson",{enumerable:true,get:function(){return chunkSAEQEYN6_cjs.i}});Object.defineProperty(exports,"setCatalogInPackageJson",{enumerable:true,get:function(){return chunkSAEQEYN6_cjs.k}});Object.defineProperty(exports,"writeRootPackageJson",{enumerable:true,get:function(){return chunkSAEQEYN6_cjs.l}});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { UpgradeCatalogPackageOptions, UpgradeCatalogResult, getCatalog, getCatalogSafe, saveCatalog, setCatalog, upgradeCatalog } from './catalog.cjs';
|
|
2
|
+
export { getCatalogFromPackageJson, getRootPackageJsonPath, readRootPackageJson, setCatalogInPackageJson, writeRootPackageJson } from './package-json.cjs';
|
|
3
|
+
export { replaceDepsAliases } from './replace-deps-aliases.cjs';
|
|
4
|
+
export { getWorkspaceFilePath, readWorkspaceFile, writeWorkspaceFile } from './workspace.cjs';
|
|
5
|
+
import '../types.cjs';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { UpgradeCatalogPackageOptions, UpgradeCatalogResult, getCatalog, getCatalogSafe, saveCatalog, setCatalog, upgradeCatalog } from './catalog.js';
|
|
2
|
+
export { getCatalogFromPackageJson, getRootPackageJsonPath, readRootPackageJson, setCatalogInPackageJson, writeRootPackageJson } from './package-json.js';
|
|
3
|
+
export { replaceDepsAliases } from './replace-deps-aliases.js';
|
|
4
|
+
export { getWorkspaceFilePath, readWorkspaceFile, writeWorkspaceFile } from './workspace.js';
|
|
5
|
+
import '../types.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import'../chunk-PJBAL7AE.js';export{a as replaceDepsAliases}from'../chunk-U3RZMO6L.js';export{b as getCatalog,a as getCatalogSafe,e as saveCatalog,c as setCatalog,d as upgradeCatalog}from'../chunk-RBC53R6W.js';import'../chunk-7QKHH2VM.js';export{a as getWorkspaceFilePath,b as readWorkspaceFile,c as writeWorkspaceFile}from'../chunk-NNTG4CIZ.js';export{j as getCatalogFromPackageJson,h as getRootPackageJsonPath,i as readRootPackageJson,k as setCatalogInPackageJson,l as writeRootPackageJson}from'../chunk-JXISZBJG.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkSAEQEYN6_cjs=require('../chunk-SAEQEYN6.cjs');Object.defineProperty(exports,"getCatalogFromPackageJson",{enumerable:true,get:function(){return chunkSAEQEYN6_cjs.j}});Object.defineProperty(exports,"getRootPackageJsonPath",{enumerable:true,get:function(){return chunkSAEQEYN6_cjs.h}});Object.defineProperty(exports,"readRootPackageJson",{enumerable:true,get:function(){return chunkSAEQEYN6_cjs.i}});Object.defineProperty(exports,"setCatalogInPackageJson",{enumerable:true,get:function(){return chunkSAEQEYN6_cjs.k}});Object.defineProperty(exports,"writeRootPackageJson",{enumerable:true,get:function(){return chunkSAEQEYN6_cjs.l}});
|