@joystick.js/cli-canary 0.0.0-canary.590 → 0.0.0-canary.591

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.
@@ -1,3 +1,3 @@
1
1
  import u from"esbuild";import d from"esbuild-plugin-svg";import o from"./plugins/index.js";import f from"./get_code_frame.js";import p from"../build/minify_file.js";import h from"./on_warn.js";import b from"../path_exists.js";const w=async(r={},e="")=>{const n=r?.errors&&r?.errors[0],s=await b(e)?await f(e,{line:n?.location?.line,column:n?.location?.column}):null;return await h({file:e,stack:r?.stack,line:n?.location?.line,column:n?.location?.column,snippet:s,lineWithError:n?.location?.lineText?.trim(),message:n?.text}),s},g=(r={})=>{const e=r?.message?.split(":");return e[2]&&e[2]?.includes("No loader")?e[3]&&e[3]?.replace(`
2
2
  `,"")||"":e[1]&&e[1]?.replace(`
3
- `,"")||""},c=async(r={})=>{const e=g(r),n=await w(r,e);return{success:!1,path:e,error:{stack:r?.stack,snippet:n}}},v=(r=[],e={})=>u.build({allowOverwrite:!0,platform:"node",format:"esm",bundle:!1,entryPoints:r?.map(n=>n.path),entryNames:"[dir]/[name]",outdir:e?.output_path||"./.joystick/build",outbase:"./",define:{"process.env.NODE_ENV":`'${e?.environment}'`},logLevel:"silent",plugins:[o.warn_node_environment,o.generate_file_dependency_map]}),y=(r=[],e={})=>u.build({allowOverwrite:!0,target:"es2020",platform:"browser",format:"esm",bundle:!0,entryPoints:r?.map(n=>n.path),entryNames:"[dir]/[name]",outbase:"./",outdir:e?.output_path||"./.joystick/build",define:{"process.env.NODE_ENV":`'${e?.environment}'`},logLevel:"silent",loader:{".svg":"text"},plugins:[o.warn_node_environment,o.generate_file_dependency_map,o.bootstrap_component,d()]}),k=async r=>{const e=[".DS_Store"],n=r?.files?.filter(t=>!e?.some(a=>t?.path?.includes(a)))?.filter(t=>t?.platform==="node"),s=r?.files?.filter(t=>!e?.some(a=>t?.path?.includes(a)))?.filter(t=>t?.platform==="browser");let l=[],i=[];n?.length>0&&(l=[await v(n,r).then(()=>({success:!0})).catch(t=>c(t))]),s?.length>0&&(i=[await y(s,r).then(()=>({success:!0})).catch(t=>c(t))]);const m=l?.some(t=>!t?.success),_=i?.some(t=>!t?.success);return m||_?Promise.reject([...l,...i]):(r?.environment!=="development"&&await Promise.all([...s,...n].map(t=>p(`${r?.output_path||"./.joystick/build"}/${t.path}`))),[...l,...i])};var D=k;export{D as default};
3
+ `,"")||""},c=async(r={})=>{const e=g(r),n=await w(r,e);return{success:!1,path:e,error:{stack:r?.stack,snippet:n}}},v=(r=[],e={})=>u.build({allowOverwrite:!0,platform:"node",format:"esm",bundle:!1,entryPoints:r?.map(n=>n.path),entryNames:"[dir]/[name]",outdir:e?.output_path||"./.joystick/build",outbase:"./",define:{"process.env.NODE_ENV":`'${e?.environment}'`},logLevel:"silent",plugins:[o.warn_node_environment,o.generate_file_dependency_map]}),y=(r=[],e={})=>u.build({allowOverwrite:!0,target:"es2020",platform:"browser",format:"esm",bundle:!0,entryPoints:r?.map(n=>n.path),entryNames:"[dir]/[name]",outbase:"./",outdir:e?.output_path||"./.joystick/build",define:{"process.env.NODE_ENV":`'${e?.environment}'`},logLevel:"silent",loader:{".svg":"text"},plugins:[o.warn_node_environment,o.generate_file_dependency_map,o.bootstrap_component,d()]}),N=async r=>{const e=[".DS_Store"],n=r?.files?.filter(t=>!e?.some(a=>t?.path?.includes(a)))?.filter(t=>t?.platform==="node"),s=r?.files?.filter(t=>!e?.some(a=>t?.path?.includes(a)))?.filter(t=>t?.platform==="browser");let l=[],i=[];n?.length>0&&(l=[await v(n,r).then(()=>({success:!0})).catch(t=>c(t))]),s?.length>0&&(i=[await y(s,r).then(()=>({success:!0})).catch(t=>c(t))]);const _=l?.some(t=>!t?.success),m=i?.some(t=>!t?.success);return _||m?Promise.reject([...l,...i]):(process.env.NODE_ENV!=="development"&&await Promise.all([...s,...n].map(t=>p(`${r?.output_path||"./.joystick/build"}/${t.path}`))),[...l,...i])};var x=N;export{x as default};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@joystick.js/cli-canary",
3
3
  "type": "module",
4
- "version": "0.0.0-canary.590",
4
+ "version": "0.0.0-canary.591",
5
5
  "description": "The CLI for Joystick.",
6
6
  "main": "dist/index.js",
7
7
  "bin": {
@@ -145,7 +145,7 @@ const build_files = async (options) => {
145
145
  ]);
146
146
  }
147
147
 
148
- if (options?.environment !== 'development') {
148
+ if (process.env.NODE_ENV !== 'development') {
149
149
  await Promise.all([...browser_files, ...node_files].map((file) => {
150
150
  return minify_file(`${options?.output_path || "./.joystick/build"}/${file.path}`);
151
151
  }));