create-storm-workspace 1.82.0 → 1.82.1
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 +6 -0
- package/README.md +1 -1
- package/index.js +1 -1
- package/package.json +47 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
|
|
|
21
21
|
|
|
22
22
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
23
23
|
|
|
24
|
-
[](https://prettier.io/) [](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://fumadocs.vercel.app/) 
|
|
25
25
|
|
|
26
26
|
<!-- prettier-ignore-start -->
|
|
27
27
|
<!-- markdownlint-disable -->
|
package/index.js
CHANGED
|
@@ -795,7 +795,7 @@ ${n.gray(Ll())} ${n.hex(s.brand??"#1fb2a6")(`[${Ol[gn.ALL]} System]`)} ${n.bold
|
|
|
795
795
|
${e.map((r,c)=>` ${s}> #${c} = ${wo(r,{prefix:`${s}-`,skip:l},n+1)}`).join(`
|
|
796
796
|
`)}`:typeof e=="object"?`
|
|
797
797
|
${Object.keys(e).filter(r=>!l.includes(r)).map(r=>` ${s}> ${r} = ${AX(e[r])?"<function>":typeof e[r]=="object"?wo(e[r],{prefix:`${s}-`,skip:l},n+1):e[r]}`).join(`
|
|
798
|
-
`)}`:e},AX=e=>{try{return e instanceof Function||typeof e=="function"||!!(e?.constructor&&e?.call&&e?.apply)}catch{return!1}};var BM=async(e,t,n={})=>{let s=t||Jc(t),l=await hg({cwd:s,packageJson:!0,name:e,envName:e?.toUpperCase(),jitiOptions:{debug:!1,fsCache:process.env.STORM_SKIP_CACHE==="true"?!1:Rv(process.env.STORM_CACHE_DIR||"node_modules/.cache/storm","config")},...n});return(!l||Object.keys(l).length===0)&&(l=await hg({cwd:s,packageJson:!0,name:e,envName:e?.toUpperCase(),jitiOptions:{debug:!1,fsCache:process.env.STORM_SKIP_CACHE==="true"?!1:Rv(process.env.STORM_CACHE_DIR||"node_modules/.cache/storm","config")},configFile:e,...n})),l},TM=async(e,t=[])=>{let n=e||Jc(e),s=await BM("storm",n),l=s.config,r=s.configFile;if(l&&r&&Object.keys(l).length>0&&Kv(`Found Storm configuration file "${r.includes(`${n}/`)?r.replace(`${n}/`,""):r}" at "${n}"`,{logLevel:"all"}),t&&t.length>0){let c=await Promise.all(t.map(o=>BM(o,n)));for(let o of c)o?.config&&o?.configFile&&Object.keys(o.config).length>0&&(Kv(`Found alternative configuration file "${o.configFile.includes(`${n}/`)?o.configFile.replace(`${n}/`,""):o.configFile}" at "${n}"`,{logLevel:"all"}),l=go(o.config??{},l??{}))}if(l)return l.configFile=r,l};lc();var _M=()=>{let e="STORM_",t={extends:process.env[`${e}EXTENDS`]||void 0,name:process.env[`${e}NAME`]||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},organization:process.env[`${e}ORGANIZATION`]||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,licensing:process.env[`${e}LICENSING`]||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}CONFIG_FILE`]?Nn(process.env[`${e}CONFIG_FILE`]):void 0,workspaceRoot:process.env[`${e}WORKSPACE_ROOT`]?Nn(process.env[`${e}WORKSPACE_ROOT`]):void 0,directories:{cache:process.env[`${e}CACHE_DIR`]?Nn(process.env[`${e}CACHE_DIR`]):void 0,data:process.env[`${e}DATA_DIR`]?Nn(process.env[`${e}DATA_DIR`]):void 0,config:process.env[`${e}CONFIG_DIR`]?Nn(process.env[`${e}CONFIG_DIR`]):void 0,temp:process.env[`${e}TEMP_DIR`]?Nn(process.env[`${e}TEMP_DIR`]):void 0,log:process.env[`${e}LOG_DIR`]?Nn(process.env[`${e}LOG_DIR`]):void 0,build:process.env[`${e}BUILD_DIR`]?Nn(process.env[`${e}BUILD_DIR`]):void 0},skipCache:process.env[`${e}SKIP_CACHE`]!==void 0?!!process.env[`${e}SKIP_CACHE`]:void 0,env:(process.env[`${e}ENV`]??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,externalPackagePatterns:process.env[`${e}EXTERNAL_PACKAGE_PATTERNS`]?JSON.parse(process.env[`${e}EXTERNAL_PACKAGE_PATTERNS`]):[],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`]))?CM(Number.parseInt(process.env[`${e}LOG_LEVEL`])):process.env[`${e}LOG_LEVEL`]:void 0},n=Object.keys(process.env).filter(l=>l.startsWith(`${e}COLOR_`)&&kL.every(r=>!l.startsWith(`${e}COLOR_LIGHT_${r}`)&&!l.startsWith(`${e}COLOR_DARK_${r}`)));t.colors=n.length>0?n.reduce((l,r)=>(l[r]=DM(e,r),l),{}):DM(e),t.docs===fg&&(t.homepage===So?t.docs=`${So}/projects/${t.name}/docs`:t.docs=`${t.homepage}/docs`),t.licensing===Ag&&(t.homepage===So?t.licensing=`${So}/projects/${t.name}/licensing`:t.licensing=`${t.homepage}/docs`);let s=process.env[`${e}CONFIG`];if(s){let l=JSON.parse(s);t={...t,...l,colors:{...t.colors,...l.colors},extensions:{...t.extensions,...l.extensions}}}return t},DM=(e,t)=>{let n=`COLOR_${t&&t!=="base"?`${t}_`:""}`.toUpperCase();return process.env[`${e}${n}LIGHT_BRAND`]||process.env[`${e}${n}DARK_BRAND`]?gX(e+n):mX(e+n)},mX=e=>({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`],help:process.env[`${e}HELP`],success:process.env[`${e}SUCCESS`],info:process.env[`${e}INFO`],warning:process.env[`${e}WARNING`],danger:process.env[`${e}DANGER`],fatal:process.env[`${e}FATAL`],positive:process.env[`${e}POSITIVE`],negative:process.env[`${e}NEGATIVE`]}),gX=e=>({light:xM(`${e}_LIGHT_`),dark:xM(`${e}_DARK_`)}),xM=e=>({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`],help:process.env[`${e}HELP`],success:process.env[`${e}SUCCESS`],info:process.env[`${e}INFO`],warning:process.env[`${e}WARNING`],danger:process.env[`${e}DANGER`],fatal:process.env[`${e}FATAL`],positive:process.env[`${e}POSITIVE`],negative:process.env[`${e}NEGATIVE`]});var yX=(e,t)=>{for(let n of Object.keys(t??{}))if(t[n]){let s=n?.replace(/([A-Z])+/g,r=>r?r[0]?.toUpperCase()+r.slice(1):"").split(/(?=[A-Z])|[.\-\s_]/).map(r=>r.toLowerCase())??[],l;if(s.length===0)return;s.length===1?l=s[0]?.toUpperCase()??"":l=s.reduce((r,c)=>`${r}_${c.toLowerCase()}`),process.env[`STORM_EXTENSION_${e.toUpperCase()}_${l.toUpperCase()}`]=t[n]}},RM=e=>{let t="STORM_";if(e.extends&&(process.env[`${t}EXTENDS`]=e.extends),e.name&&(process.env[`${t}NAME`]=e.name),e.namespace&&(process.env[`${t}NAMESPACE`]=e.namespace),e.owner&&(process.env[`${t}OWNER`]=e.owner),e.bot&&(process.env[`${t}BOT_NAME`]=e.bot.name,process.env[`${t}BOT_EMAIL`]=e.bot.email),e.organization&&(process.env[`${t}ORGANIZATION`]=e.organization),e.packageManager&&(process.env[`${t}PACKAGE_MANAGER`]=e.packageManager),e.license&&(process.env[`${t}LICENSE`]=e.license),e.homepage&&(process.env[`${t}HOMEPAGE`]=e.homepage),e.docs&&(process.env[`${t}DOCS`]=e.docs),e.licensing&&(process.env[`${t}LICENSING`]=e.licensing),e.timezone&&(process.env[`${t}TIMEZONE`]=e.timezone,process.env.TZ=e.timezone,process.env.DEFAULT_TIMEZONE=e.timezone),e.locale&&(process.env[`${t}LOCALE`]=e.locale,process.env.LOCALE=e.locale,process.env.DEFAULT_LOCALE=e.locale,process.env.LANG=e.locale?`${e.locale.replaceAll("-","_")}.UTF-8`:"en_US.UTF-8"),e.configFile&&(process.env[`${t}CONFIG_FILE`]=Nn(e.configFile)),e.workspaceRoot&&(process.env[`${t}WORKSPACE_ROOT`]=Nn(e.workspaceRoot),process.env.NX_WORKSPACE_ROOT=Nn(e.workspaceRoot),process.env.NX_WORKSPACE_ROOT_PATH=Nn(e.workspaceRoot)),e.directories&&(!e.skipCache&&e.directories.cache&&(process.env[`${t}CACHE_DIR`]=Nn(e.directories.cache)),e.directories.data&&(process.env[`${t}DATA_DIR`]=Nn(e.directories.data)),e.directories.config&&(process.env[`${t}CONFIG_DIR`]=Nn(e.directories.config)),e.directories.temp&&(process.env[`${t}TEMP_DIR`]=Nn(e.directories.temp)),e.directories.log&&(process.env[`${t}LOG_DIR`]=Nn(e.directories.log)),e.directories.build&&(process.env[`${t}BUILD_DIR`]=Nn(e.directories.build))),e.skipCache!==void 0&&(process.env[`${t}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.env&&(process.env[`${t}ENV`]=e.env,process.env.NODE_ENV=e.env,process.env.ENVIRONMENT=e.env),e.colors?.base?.light||e.colors?.base?.dark)for(let n of Object.keys(e.colors))PM(`${t}COLOR_${n}_`,e.colors[n]);else PM(`${t}COLOR_`,e.colors);e.repository&&(process.env[`${t}REPOSITORY`]=e.repository),e.branch&&(process.env[`${t}BRANCH`]=e.branch),e.preid&&(process.env[`${t}PRE_ID`]=String(e.preid)),e.externalPackagePatterns&&(process.env[`${t}EXTERNAL_PACKAGE_PATTERNS`]=JSON.stringify(e.externalPackagePatterns)),e.registry&&(e.registry.github&&(process.env[`${t}REGISTRY_GITHUB`]=String(e.registry.github)),e.registry.npm&&(process.env[`${t}REGISTRY_NPM`]=String(e.registry.npm)),e.registry.cargo&&(process.env[`${t}REGISTRY_CARGO`]=String(e.registry.cargo)),e.registry.cyclone&&(process.env[`${t}REGISTRY_CYCLONE`]=String(e.registry.cyclone)),e.registry.container&&(process.env[`${t}REGISTRY_CONTAINER`]=String(e.registry.cyclone))),e.logLevel&&(process.env[`${t}LOG_LEVEL`]=String(e.logLevel),process.env.LOG_LEVEL=String(e.logLevel),process.env.NX_VERBOSE_LOGGING=String(ks(e.logLevel)>=Tr.DEBUG),process.env.RUST_BACKTRACE=ks(e.logLevel)>=Tr.DEBUG?"full":"none"),process.env[`${t}CONFIG`]=JSON.stringify(e);for(let n of Object.keys(e.extensions??{}))e.extensions[n]&&Object.keys(e.extensions[n])&&yX(n,e.extensions[n])},PM=(e,t)=>t?.light?.brand||t?.dark?.brand?EX(e,t):bX(e,t),bX=(e,t)=>{t.dark&&(process.env[`${e}DARK`]=t.dark),t.light&&(process.env[`${e}LIGHT`]=t.light),t.brand&&(process.env[`${e}BRAND`]=t.brand),t.alternate&&(process.env[`${e}ALTERNATE`]=t.alternate),t.accent&&(process.env[`${e}ACCENT`]=t.accent),t.link&&(process.env[`${e}LINK`]=t.link),t.help&&(process.env[`${e}HELP`]=t.help),t.success&&(process.env[`${e}SUCCESS`]=t.success),t.info&&(process.env[`${e}INFO`]=t.info),t.warning&&(process.env[`${e}WARNING`]=t.warning),t.danger&&(process.env[`${e}DANGER`]=t.danger),t.fatal&&(process.env[`${e}FATAL`]=t.fatal),t.positive&&(process.env[`${e}POSITIVE`]=t.positive),t.negative&&(process.env[`${e}NEGATIVE`]=t.negative)},EX=(e,t)=>({light:NM(`${e}LIGHT_`,t.light),dark:NM(`${e}DARK_`,t.dark)}),NM=(e,t)=>{t.foreground&&(process.env[`${e}FOREGROUND`]=t.foreground),t.background&&(process.env[`${e}BACKGROUND`]=t.background),t.brand&&(process.env[`${e}BRAND`]=t.brand),t.alternate&&(process.env[`${e}ALTERNATE`]=t.alternate),t.accent&&(process.env[`${e}ACCENT`]=t.accent),t.link&&(process.env[`${e}LINK`]=t.link),t.help&&(process.env[`${e}HELP`]=t.help),t.success&&(process.env[`${e}SUCCESS`]=t.success),t.info&&(process.env[`${e}INFO`]=t.info),t.warning&&(process.env[`${e}WARNING`]=t.warning),t.danger&&(process.env[`${e}DANGER`]=t.danger),t.fatal&&(process.env[`${e}FATAL`]=t.fatal),t.positive&&(process.env[`${e}POSITIVE`]=t.positive),t.negative&&(process.env[`${e}NEGATIVE`]=t.negative)};var Ld;var QM=async e=>{let t={};if(Ld?.data&&Ld?.timestamp&&Ld.timestamp>=Date.now()+3e4)return zv(`Configuration cache hit - ${Ld.timestamp}`,Ld.data),Ld.data;let n=e;n||(n=Jc());let s=await TM(n);return s||SM("No Storm config file found in the current workspace. Please ensure this is the expected behavior - you can add a `storm.json` file to the root of your workspace if it is not.\n",{logLevel:"all"}),t=go(_M(),s,ML(n)),RM(t),zv(`\u2699\uFE0F Using Storm configuration:
|
|
798
|
+
`)}`:e},AX=e=>{try{return e instanceof Function||typeof e=="function"||!!(e?.constructor&&e?.call&&e?.apply)}catch{return!1}};var BM=async(e,t,n={})=>{let s=t||Jc(t),l=await hg({cwd:s,packageJson:!0,name:e,envName:e?.toUpperCase(),jitiOptions:{debug:!1,fsCache:process.env.STORM_SKIP_CACHE==="true"?!1:Rv(process.env.STORM_CACHE_DIR||"node_modules/.cache/storm","jiti")},...n});return(!l||Object.keys(l).length===0)&&(l=await hg({cwd:s,packageJson:!0,name:e,envName:e?.toUpperCase(),jitiOptions:{debug:!1,fsCache:process.env.STORM_SKIP_CACHE==="true"?!1:Rv(process.env.STORM_CACHE_DIR||"node_modules/.cache/storm","jiti")},configFile:e,...n})),l},TM=async(e,t=[])=>{let n=e||Jc(e),s=await BM("storm",n),l=s.config,r=s.configFile;if(l&&r&&Object.keys(l).length>0&&Kv(`Found Storm configuration file "${r.includes(`${n}/`)?r.replace(`${n}/`,""):r}" at "${n}"`,{logLevel:"all"}),t&&t.length>0){let c=await Promise.all(t.map(o=>BM(o,n)));for(let o of c)o?.config&&o?.configFile&&Object.keys(o.config).length>0&&(Kv(`Found alternative configuration file "${o.configFile.includes(`${n}/`)?o.configFile.replace(`${n}/`,""):o.configFile}" at "${n}"`,{logLevel:"all"}),l=go(o.config??{},l??{}))}if(l)return l.configFile=r,l};lc();var _M=()=>{let e="STORM_",t={extends:process.env[`${e}EXTENDS`]||void 0,name:process.env[`${e}NAME`]||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},organization:process.env[`${e}ORGANIZATION`]||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,licensing:process.env[`${e}LICENSING`]||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}CONFIG_FILE`]?Nn(process.env[`${e}CONFIG_FILE`]):void 0,workspaceRoot:process.env[`${e}WORKSPACE_ROOT`]?Nn(process.env[`${e}WORKSPACE_ROOT`]):void 0,directories:{cache:process.env[`${e}CACHE_DIR`]?Nn(process.env[`${e}CACHE_DIR`]):void 0,data:process.env[`${e}DATA_DIR`]?Nn(process.env[`${e}DATA_DIR`]):void 0,config:process.env[`${e}CONFIG_DIR`]?Nn(process.env[`${e}CONFIG_DIR`]):void 0,temp:process.env[`${e}TEMP_DIR`]?Nn(process.env[`${e}TEMP_DIR`]):void 0,log:process.env[`${e}LOG_DIR`]?Nn(process.env[`${e}LOG_DIR`]):void 0,build:process.env[`${e}BUILD_DIR`]?Nn(process.env[`${e}BUILD_DIR`]):void 0},skipCache:process.env[`${e}SKIP_CACHE`]!==void 0?!!process.env[`${e}SKIP_CACHE`]:void 0,env:(process.env[`${e}ENV`]??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,externalPackagePatterns:process.env[`${e}EXTERNAL_PACKAGE_PATTERNS`]?JSON.parse(process.env[`${e}EXTERNAL_PACKAGE_PATTERNS`]):[],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`]))?CM(Number.parseInt(process.env[`${e}LOG_LEVEL`])):process.env[`${e}LOG_LEVEL`]:void 0},n=Object.keys(process.env).filter(l=>l.startsWith(`${e}COLOR_`)&&kL.every(r=>!l.startsWith(`${e}COLOR_LIGHT_${r}`)&&!l.startsWith(`${e}COLOR_DARK_${r}`)));t.colors=n.length>0?n.reduce((l,r)=>(l[r]=DM(e,r),l),{}):DM(e),t.docs===fg&&(t.homepage===So?t.docs=`${So}/projects/${t.name}/docs`:t.docs=`${t.homepage}/docs`),t.licensing===Ag&&(t.homepage===So?t.licensing=`${So}/projects/${t.name}/licensing`:t.licensing=`${t.homepage}/docs`);let s=process.env[`${e}CONFIG`];if(s){let l=JSON.parse(s);t={...t,...l,colors:{...t.colors,...l.colors},extensions:{...t.extensions,...l.extensions}}}return t},DM=(e,t)=>{let n=`COLOR_${t&&t!=="base"?`${t}_`:""}`.toUpperCase();return process.env[`${e}${n}LIGHT_BRAND`]||process.env[`${e}${n}DARK_BRAND`]?gX(e+n):mX(e+n)},mX=e=>({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`],help:process.env[`${e}HELP`],success:process.env[`${e}SUCCESS`],info:process.env[`${e}INFO`],warning:process.env[`${e}WARNING`],danger:process.env[`${e}DANGER`],fatal:process.env[`${e}FATAL`],positive:process.env[`${e}POSITIVE`],negative:process.env[`${e}NEGATIVE`]}),gX=e=>({light:xM(`${e}_LIGHT_`),dark:xM(`${e}_DARK_`)}),xM=e=>({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`],help:process.env[`${e}HELP`],success:process.env[`${e}SUCCESS`],info:process.env[`${e}INFO`],warning:process.env[`${e}WARNING`],danger:process.env[`${e}DANGER`],fatal:process.env[`${e}FATAL`],positive:process.env[`${e}POSITIVE`],negative:process.env[`${e}NEGATIVE`]});var yX=(e,t)=>{for(let n of Object.keys(t??{}))if(t[n]){let s=n?.replace(/([A-Z])+/g,r=>r?r[0]?.toUpperCase()+r.slice(1):"").split(/(?=[A-Z])|[.\-\s_]/).map(r=>r.toLowerCase())??[],l;if(s.length===0)return;s.length===1?l=s[0]?.toUpperCase()??"":l=s.reduce((r,c)=>`${r}_${c.toLowerCase()}`),process.env[`STORM_EXTENSION_${e.toUpperCase()}_${l.toUpperCase()}`]=t[n]}},RM=e=>{let t="STORM_";if(e.extends&&(process.env[`${t}EXTENDS`]=e.extends),e.name&&(process.env[`${t}NAME`]=e.name),e.namespace&&(process.env[`${t}NAMESPACE`]=e.namespace),e.owner&&(process.env[`${t}OWNER`]=e.owner),e.bot&&(process.env[`${t}BOT_NAME`]=e.bot.name,process.env[`${t}BOT_EMAIL`]=e.bot.email),e.organization&&(process.env[`${t}ORGANIZATION`]=e.organization),e.packageManager&&(process.env[`${t}PACKAGE_MANAGER`]=e.packageManager),e.license&&(process.env[`${t}LICENSE`]=e.license),e.homepage&&(process.env[`${t}HOMEPAGE`]=e.homepage),e.docs&&(process.env[`${t}DOCS`]=e.docs),e.licensing&&(process.env[`${t}LICENSING`]=e.licensing),e.timezone&&(process.env[`${t}TIMEZONE`]=e.timezone,process.env.TZ=e.timezone,process.env.DEFAULT_TIMEZONE=e.timezone),e.locale&&(process.env[`${t}LOCALE`]=e.locale,process.env.LOCALE=e.locale,process.env.DEFAULT_LOCALE=e.locale,process.env.LANG=e.locale?`${e.locale.replaceAll("-","_")}.UTF-8`:"en_US.UTF-8"),e.configFile&&(process.env[`${t}CONFIG_FILE`]=Nn(e.configFile)),e.workspaceRoot&&(process.env[`${t}WORKSPACE_ROOT`]=Nn(e.workspaceRoot),process.env.NX_WORKSPACE_ROOT=Nn(e.workspaceRoot),process.env.NX_WORKSPACE_ROOT_PATH=Nn(e.workspaceRoot)),e.directories&&(!e.skipCache&&e.directories.cache&&(process.env[`${t}CACHE_DIR`]=Nn(e.directories.cache)),e.directories.data&&(process.env[`${t}DATA_DIR`]=Nn(e.directories.data)),e.directories.config&&(process.env[`${t}CONFIG_DIR`]=Nn(e.directories.config)),e.directories.temp&&(process.env[`${t}TEMP_DIR`]=Nn(e.directories.temp)),e.directories.log&&(process.env[`${t}LOG_DIR`]=Nn(e.directories.log)),e.directories.build&&(process.env[`${t}BUILD_DIR`]=Nn(e.directories.build))),e.skipCache!==void 0&&(process.env[`${t}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.env&&(process.env[`${t}ENV`]=e.env,process.env.NODE_ENV=e.env,process.env.ENVIRONMENT=e.env),e.colors?.base?.light||e.colors?.base?.dark)for(let n of Object.keys(e.colors))PM(`${t}COLOR_${n}_`,e.colors[n]);else PM(`${t}COLOR_`,e.colors);e.repository&&(process.env[`${t}REPOSITORY`]=e.repository),e.branch&&(process.env[`${t}BRANCH`]=e.branch),e.preid&&(process.env[`${t}PRE_ID`]=String(e.preid)),e.externalPackagePatterns&&(process.env[`${t}EXTERNAL_PACKAGE_PATTERNS`]=JSON.stringify(e.externalPackagePatterns)),e.registry&&(e.registry.github&&(process.env[`${t}REGISTRY_GITHUB`]=String(e.registry.github)),e.registry.npm&&(process.env[`${t}REGISTRY_NPM`]=String(e.registry.npm)),e.registry.cargo&&(process.env[`${t}REGISTRY_CARGO`]=String(e.registry.cargo)),e.registry.cyclone&&(process.env[`${t}REGISTRY_CYCLONE`]=String(e.registry.cyclone)),e.registry.container&&(process.env[`${t}REGISTRY_CONTAINER`]=String(e.registry.cyclone))),e.logLevel&&(process.env[`${t}LOG_LEVEL`]=String(e.logLevel),process.env.LOG_LEVEL=String(e.logLevel),process.env.NX_VERBOSE_LOGGING=String(ks(e.logLevel)>=Tr.DEBUG),process.env.RUST_BACKTRACE=ks(e.logLevel)>=Tr.DEBUG?"full":"none"),process.env[`${t}CONFIG`]=JSON.stringify(e);for(let n of Object.keys(e.extensions??{}))e.extensions[n]&&Object.keys(e.extensions[n])&&yX(n,e.extensions[n])},PM=(e,t)=>t?.light?.brand||t?.dark?.brand?EX(e,t):bX(e,t),bX=(e,t)=>{t.dark&&(process.env[`${e}DARK`]=t.dark),t.light&&(process.env[`${e}LIGHT`]=t.light),t.brand&&(process.env[`${e}BRAND`]=t.brand),t.alternate&&(process.env[`${e}ALTERNATE`]=t.alternate),t.accent&&(process.env[`${e}ACCENT`]=t.accent),t.link&&(process.env[`${e}LINK`]=t.link),t.help&&(process.env[`${e}HELP`]=t.help),t.success&&(process.env[`${e}SUCCESS`]=t.success),t.info&&(process.env[`${e}INFO`]=t.info),t.warning&&(process.env[`${e}WARNING`]=t.warning),t.danger&&(process.env[`${e}DANGER`]=t.danger),t.fatal&&(process.env[`${e}FATAL`]=t.fatal),t.positive&&(process.env[`${e}POSITIVE`]=t.positive),t.negative&&(process.env[`${e}NEGATIVE`]=t.negative)},EX=(e,t)=>({light:NM(`${e}LIGHT_`,t.light),dark:NM(`${e}DARK_`,t.dark)}),NM=(e,t)=>{t.foreground&&(process.env[`${e}FOREGROUND`]=t.foreground),t.background&&(process.env[`${e}BACKGROUND`]=t.background),t.brand&&(process.env[`${e}BRAND`]=t.brand),t.alternate&&(process.env[`${e}ALTERNATE`]=t.alternate),t.accent&&(process.env[`${e}ACCENT`]=t.accent),t.link&&(process.env[`${e}LINK`]=t.link),t.help&&(process.env[`${e}HELP`]=t.help),t.success&&(process.env[`${e}SUCCESS`]=t.success),t.info&&(process.env[`${e}INFO`]=t.info),t.warning&&(process.env[`${e}WARNING`]=t.warning),t.danger&&(process.env[`${e}DANGER`]=t.danger),t.fatal&&(process.env[`${e}FATAL`]=t.fatal),t.positive&&(process.env[`${e}POSITIVE`]=t.positive),t.negative&&(process.env[`${e}NEGATIVE`]=t.negative)};var Ld;var QM=async e=>{let t={};if(Ld?.data&&Ld?.timestamp&&Ld.timestamp>=Date.now()+3e4)return zv(`Configuration cache hit - ${Ld.timestamp}`,Ld.data),Ld.data;let n=e;n||(n=Jc());let s=await TM(n);return s||SM("No Storm config file found in the current workspace. Please ensure this is the expected behavior - you can add a `storm.json` file to the root of your workspace if it is not.\n",{logLevel:"all"}),t=go(_M(),s,ML(n)),RM(t),zv(`\u2699\uFE0F Using Storm configuration:
|
|
799
799
|
${wo(t)}`,t),t};var Q4=vn(q3()),Jl=vn(N4());async function Jne(){let e=wM("create-storm-workspace"),t=await QM();try{Jv("\u26A1 Preparing to create the Storm Workspace",t),["SIGTERM","SIGINT","SIGUSR2"].map(a=>{process.once(a,()=>{try{console.info(`process.on ${a}`),console.info("shutdown process done, exiting with code 0"),process.exit(0)}catch(h){console.warn("shutdown process failed, exiting with code 1"),console.error(h),process.exit(1)}})});let n=process.argv.length>2?process.argv[2]:null;n||(n=(await(0,Jl.prompt)({type:"input",name:"name",message:"What is the name of the workspace?"})).name);let s=process.argv.length>3?process.argv[3]:null;s||(s=(await(0,Jl.prompt)({type:"input",name:"organization",message:"What organization owns this repository?",initial:"storm-software"})).organization);let l=process.argv.length>4?process.argv[4]:null;l||(l=(await(0,Jl.prompt)({type:"input",name:"namespace",message:"What is the namespace of this repository (npm scope)?",initial:s||"storm-software"})).namespace);let r=process.argv.length>5&&process.argv[5]?!!process.argv[5]:null;!r&&typeof r!="boolean"&&(r=(await(0,Jl.prompt)({type:"confirm",name:"includeApps",message:"Should a separate `apps` folder be created for this workspace (if Yes: `apps` and `libs` folders will be added, if No: `packages` folders will be added)?",initial:!1})).includeApps);let c=process.argv.length>6&&process.argv[6]?!!process.argv[6]:null;!c&&typeof c!="boolean"&&(c=(await(0,Jl.prompt)({type:"confirm",name:"includeRust",message:"Should Rust be included in the workspace (adds a `rust` folder with a `Cargo.toml` file)?",initial:!1})).includeRust);let o=process.argv.length>7?process.argv[7]:null;o||(o=(await(0,Jl.prompt)({type:"input",name:"description",message:"Provide a description of the workspace to use in the package.json and README.md files.",initial:`\u26A1 The ${l||n} monorepo contains utility applications, tools, and various libraries to create modern and scalable web applications.`})).description);let d=process.argv.length>8?process.argv[8]:null;d||(d=(await(0,Jl.prompt)({type:"input",name:"repositoryUrl",message:"What is the workspace's Git repository's URL?",initial:`https://github.com/${s||"storm-software"}/${n}`})).repositoryUrl),Jv(`\u26A1 Creating the Storm Workspace: ${n}`,t);let p=(0,R4.getNpmPackageVersion)("@storm-software/workspace-tools"),{directory:i}=await(0,Q4.createWorkspace)(`@storm-software/workspace-tools@${p||"latest"}`,{name:n,organization:s,namespace:l,description:o,includeApps:r,includeRust:c,repositoryUrl:d,nxCloud:"skip",packageManager:"pnpm",mode:"dark",interactive:!1,defaultBase:"main",useGitHub:!0,skipGit:!1,cliName:"Storm Workspace Generator"});vM(`\u26A1 Successfully created the workspace: ${i}.`,t)}catch(n){IM("\u274C An error occurred while creating the workspace. Please correct the below issue:",t),console.error(n),process.exit(1)}finally{e()}}Jne();
|
|
800
800
|
/*! Bundled license information:
|
|
801
801
|
|
package/package.json
CHANGED
|
@@ -1 +1,47 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"name": "create-storm-workspace",
|
|
3
|
+
"version": "1.82.1",
|
|
4
|
+
"type": "commonjs",
|
|
5
|
+
"description": "⚡A CLI tool used to generate and fully configure a Storm Workspace repository.",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "github",
|
|
8
|
+
"url": "https://github.com/storm-software/storm-ops",
|
|
9
|
+
"directory": "packages/create-storm-workspace"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://stormsoftware.com",
|
|
12
|
+
"bugs": "https://github.com/storm-software/storm-ops/issues",
|
|
13
|
+
"author": {
|
|
14
|
+
"name": "Storm Software",
|
|
15
|
+
"email": "contact@stormsoftware.com",
|
|
16
|
+
"url": "https://stormsoftware.com"
|
|
17
|
+
},
|
|
18
|
+
"license": "Apache License 2.0",
|
|
19
|
+
"private": false,
|
|
20
|
+
"bin": { "create-storm-workspace": "./index.js" },
|
|
21
|
+
"typings": "./src/index.d.ts",
|
|
22
|
+
"keywords": [
|
|
23
|
+
"monorepo",
|
|
24
|
+
"open-system",
|
|
25
|
+
"storm",
|
|
26
|
+
"storm-ops",
|
|
27
|
+
"storm-stack",
|
|
28
|
+
"stormstack",
|
|
29
|
+
"sullivanpj"
|
|
30
|
+
],
|
|
31
|
+
"peerDependencies": { "@nx/devkit": "^20.3.1", "nx": "^20.3.1" },
|
|
32
|
+
"peerDependenciesMeta": {
|
|
33
|
+
"@nx/devkit": { "optional": false },
|
|
34
|
+
"nx": { "optional": false }
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@nx/workspace": "^20.3.1",
|
|
38
|
+
"create-nx-workspace": "^20.3.1",
|
|
39
|
+
"enquirer": "2.4.1"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@nx/devkit": "^20.3.1",
|
|
43
|
+
"@types/node": "^22.10.2",
|
|
44
|
+
"nx": "^20.3.1"
|
|
45
|
+
},
|
|
46
|
+
"publishConfig": { "access": "public" }
|
|
47
|
+
}
|