@joystick.js/cli-canary 0.0.0-canary.631 → 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
|
|
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}}},
|
|
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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import p from"child_process";import o from"path";const t=(s=[],e=!1)=>(process.env.NODE_ENV!=="test"&&process.loader.print("Starting app..."),p.fork(o.resolve(".joystick/build/index.server.js"),[],{execArgv:s,silent:!0,env:{FORCE_COLOR:"1",LOGS_PATH:process.env.LOGS_PATH,NODE_ENV:process.env.NODE_ENV,ROOT_URL:process.env.ROOT_URL,PORT:process.env.PORT,JOYSTICK_SETTINGS:process.env.JOYSTICK_SETTINGS}})),n=(s=0)=>{const e=["--no-warnings"];return process.env.NODE_ENV==="development"&&e.push("--dns-result-order=ipv4first"),s<19&&e.push("--experimental-specifier-resolution=node"),process.env.NODE_ENV==="development"&&process.env.IS_DEBUG_MODE==="true"&&e.push("--inspect"),e},c=(s=0,e=!1)=>{const r=n(s);return t(r,e)};var a=c;export{a as default};
|
package/package.json
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
92
|
-
},
|
|
90
|
+
// define: {
|
|
91
|
+
// "process.env.NODE_ENV": `'${options?.environment}'`,
|
|
92
|
+
// },
|
|
93
93
|
logLevel: 'silent',
|
|
94
94
|
loader: {
|
|
95
95
|
'.svg': 'text',
|
|
@@ -6,15 +6,6 @@ const start_app_server_process = (exec_argv = [], watch = false) => {
|
|
|
6
6
|
process.loader.print('Starting app...');
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
console.log('START APP PROCESS', {
|
|
10
|
-
FORCE_COLOR: "1",
|
|
11
|
-
LOGS_PATH: process.env.LOGS_PATH,
|
|
12
|
-
NODE_ENV: process.env.NODE_ENV,
|
|
13
|
-
ROOT_URL: process.env.ROOT_URL,
|
|
14
|
-
PORT: process.env.PORT,
|
|
15
|
-
JOYSTICK_SETTINGS: process.env.JOYSTICK_SETTINGS,
|
|
16
|
-
});
|
|
17
|
-
|
|
18
9
|
return child_process.fork(
|
|
19
10
|
path.resolve(".joystick/build/index.server.js"),
|
|
20
11
|
[],
|