@joystick.js/cli-canary 0.0.0-canary.630 → 0.0.0-canary.632

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
- 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(`
1
+ import u from"esbuild";import d from"esbuild-plugin-svg";import s 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],o=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:o,lineWithError:n?.location?.lineText?.trim(),message:n?.text}),o},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()]}),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};
3
+ `,"")||""},c=async(r={})=>{const e=g(r),n=await w(r,e);return{success:!1,path:e,error:{stack:r?.stack,snippet:n}}},y=(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:"./",logLevel:"silent",plugins:[s.warn_node_environment,s.generate_file_dependency_map]}),v=(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",logLevel:"silent",loader:{".svg":"text"},plugins:[s.warn_node_environment,s.generate_file_dependency_map,s.bootstrap_component,d()]}),k=async r=>{const e=[".DS_Store"],n=r?.files?.filter(t=>!e?.some(i=>t?.path?.includes(i)))?.filter(t=>t?.platform==="node"),o=r?.files?.filter(t=>!e?.some(i=>t?.path?.includes(i)))?.filter(t=>t?.platform==="browser");let l=[],a=[];n?.length>0&&(l=[await y(n,r).then(()=>({success:!0})).catch(t=>c(t))]),o?.length>0&&(a=[await v(o,r).then(()=>({success:!0})).catch(t=>c(t))]);const _=l?.some(t=>!t?.success),m=a?.some(t=>!t?.success);return _||m?Promise.reject([...l,...a]):(process.env.NODE_ENV!=="development"&&await Promise.all([...o,...n].map(t=>p(`${r?.output_path||"./.joystick/build"}/${t.path}`))),[...l,...a])};var L=k;export{L 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.630",
4
+ "version": "0.0.0-canary.632",
5
5
  "description": "The CLI for Joystick.",
6
6
  "main": "dist/index.js",
7
7
  "bin": {
@@ -65,9 +65,9 @@ const handle_build_for_node = (node_paths = [], options = {}) => {
65
65
  entryNames: '[dir]/[name]',
66
66
  outdir: options?.output_path || "./.joystick/build",
67
67
  outbase: './',
68
- define: {
69
- "process.env.NODE_ENV": `'${options?.environment}'`,
70
- },
68
+ // define: {
69
+ // "process.env.NODE_ENV": `'${options?.environment}'`,
70
+ // },
71
71
  logLevel: "silent",
72
72
  plugins: [
73
73
  build_plugins.warn_node_environment,
@@ -87,9 +87,9 @@ const handle_build_for_browser = (browser_paths = [], options = {}) => {
87
87
  entryNames: '[dir]/[name]',
88
88
  outbase: './',
89
89
  outdir: options?.output_path || "./.joystick/build",
90
- define: {
91
- "process.env.NODE_ENV": `'${options?.environment}'`,
92
- },
90
+ // define: {
91
+ // "process.env.NODE_ENV": `'${options?.environment}'`,
92
+ // },
93
93
  logLevel: 'silent',
94
94
  loader: {
95
95
  '.svg': 'text',