@joystick.js/cli-canary 0.0.0-canary.1634 → 0.0.0-canary.1635

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,4 +1,4 @@
1
- import"chalk";import k from"fs";import r from"../../get_platform_safe_path.js";import c from"../../constants.js";import j from"./set_component_id.js";import E from"../../path_exists.js";const{readFile:f,writeFile:g}=k.promises,x=(t="",o=[])=>{for(let _=0;_<o?.length;_+=1){const n=o[_];t=t.replace(`%example:${_}%`,n)}},$=(t="",o="",_="")=>t.replace(`${o};`,`if (
1
+ import"chalk";import k from"fs";import r from"../../get_platform_safe_path.js";import c from"../../constants.js";import j from"./set_component_id.js";import E from"../../path_exists.js";const{readFile:f,writeFile:g}=k.promises,x=(t="",o=[])=>{for(let _=0;_<o?.length;_+=1){const n=o[_];t=t.replace(`%example:${_}%`,n)}},O=(t="",o="",_="")=>t.replace(`${o};`,`if (
2
2
  typeof window !== 'undefined' &&
3
3
  window.__joystick_should_auto_mount__ === true &&
4
4
  !window.__joystick_layout_url__ &&
@@ -11,7 +11,7 @@ import"chalk";import k from"fs";import r from"../../get_platform_safe_path.js";i
11
11
  }
12
12
 
13
13
  export default ${_};
14
- `),O=(t="",o="",_="")=>t.replace(`${o};`,`if (
14
+ `),$=(t="",o="",_="")=>t.replace(`${o};`,`if (
15
15
  typeof window !== 'undefined' &&
16
16
  window.__joystick_should_auto_mount__ === true &&
17
17
  window.__joystick_layout_url__ &&
@@ -30,4 +30,4 @@ import"chalk";import k from"fs";import r from"../../get_platform_safe_path.js";i
30
30
  }
31
31
 
32
32
  export default ${_};
33
- `),X=(t="")=>t.replace(c.JOYSTICK_COMMENT_REGEX,""),y=(t="")=>{let o=0;return t.replace(c.EXAMPLE_CODE_REGEX,()=>`%example:${o++}%`)},w=(t="")=>t.match(c.EXAMPLE_CODE_REGEX)||[],P=(t=null)=>(t&&t.split(" ")||[])?.pop(),R=(t=!1,o=null)=>t&&!!o,C=(t="")=>{const o=t.match(c.EXPORT_DEFAULT_REGEX)||[];return o&&o[0]},h=(t="")=>{const o=t.match(c.JOYSTICK_UI_REGEX)||[];return!!o&&!!o[0]},u=(t="",o={})=>[r(t)].some(_=>o.path.includes(_)),G=(t="")=>[r("ui/"),r("email/")].some(o=>t.includes(o)),I=(t={})=>{t.onLoad({filter:/\.js$/},async(o={})=>{const _=u("ui/layouts",o),n=u("ui/pages",o),p=u("email/",o);if(_||n||p){let e=await f(r(o.path),"utf-8");const l=h(e),i=C(e),s=R(l,i),m=w(e),a=P(i);return e=y(e),e=X(e),e=a&&_?O(e,i,a):e,e=a&&n?$(e,i,a):e,x(e,m),{contents:e,loader:"js"}}}),t.onEnd(()=>new Promise(async o=>{for(let _=0;_<t?.initialOptions?.entryPoints?.length;_+=1){const n=t?.initialOptions?.entryPoints[_],p=G(n),d=await E(`${t?.initialOptions?.outdir}/${n}`);if(p&&d){let e=await f(`${t?.initialOptions?.outdir}/${n}`,"utf-8");const l=h(e),i=w(e);if(e=y(e),l){e=await j(e);for(let s=0;s<i?.length;s+=1){const m=i[s];e=e.replace(`%example:${s}%`,m)}await g(`${t?.initialOptions?.outdir}/${n}`,e)}}}o()}))};var B=I;export{B as default};
33
+ `),X=(t="")=>t.replace(c.JOYSTICK_COMMENT_REGEX,""),y=(t="")=>{let o=0;return t.replace(c.EXAMPLE_CODE_REGEX,()=>`%example:${o++}%`)},w=(t="")=>t.match(c.EXAMPLE_CODE_REGEX)||[],P=(t=null)=>(t&&t.split(" ")||[])?.pop(),R=(t=!1,o=null)=>t&&!!o,C=(t="")=>{const o=t.match(c.EXPORT_DEFAULT_REGEX)||[];return o&&o[0]},h=(t="")=>{const o=t.match(c.JOYSTICK_UI_REGEX)||[];return!!o&&!!o[0]},u=(t="",o={})=>[r(t)].some(_=>o.path.includes(_)),D=(t="")=>[r("ui/"),r("email/")].some(o=>t.includes(o)),G=(t={})=>{t.onLoad({filter:/\.js$/},async(o={})=>{const _=u("ui/layouts",o),n=u("ui/pages",o),p=u("email/",o);if(_||n||p){let e=await f(r(o.path),"utf-8");const l=h(e),i=C(e),s=R(l,i),m=w(e),a=P(i);return e=y(e),e=X(e),e=a&&_?$(e,i,a):e,e=a&&n?O(e,i,a):e,x(e,m),{contents:e,loader:"js"}}}).catch(o=>{console.log("ON LOAD",o)}),t.onEnd(()=>new Promise(async o=>{for(let _=0;_<t?.initialOptions?.entryPoints?.length;_+=1){const n=t?.initialOptions?.entryPoints[_],p=D(n),d=await E(`${t?.initialOptions?.outdir}/${n}`);if(p&&d){let e=await f(`${t?.initialOptions?.outdir}/${n}`,"utf-8");const l=h(e),i=w(e);if(e=y(e),l){e=await j(e);for(let s=0;s<i?.length;s+=1){const m=i[s];e=e.replace(`%example:${s}%`,m)}await g(`${t?.initialOptions?.outdir}/${n}`,e)}}}o()})).catch(o=>{console.log("ON END",o)})};var v=G;export{v as default};
@@ -1 +1 @@
1
- import p from"fs";import o from"../../get_platform_safe_path.js";import m from"./update_file_map.js";const{readFile:n}=p.promises,s=(a={})=>{a.onLoad({filter:/\.js$/},async e=>{if(!["node_modules",".joystick","?","commonjsHelpers.js"].some(t=>o(e.path).includes(t))){const t=await n(o(e.path),"utf-8");await m(o(e.path),t)}})};var c=s;export{c as default};
1
+ import p from"fs";import t from"../../get_platform_safe_path.js";import m from"./update_file_map.js";const{readFile:n}=p.promises,s=(a={})=>{a.onLoad({filter:/\.js$/},async o=>{if(!["node_modules",".joystick","?","commonjsHelpers.js"].some(e=>t(o.path).includes(e))){const e=await n(t(o.path),"utf-8");await m(t(o.path),e)}}).catch(o=>{console.log("GFDM ON LOAD",o)})};var r=s;export{r as default};
@@ -1,3 +1,3 @@
1
- import n from"fs";import t from"chalk";const{readFile:r}=n.promises,a=(e={})=>{e.onLoad({filter:/\.js$/},async(o={})=>{(await r(o.path,"utf-8"))?.match(/process.env.NODE_ENV\s+=\s/gi)?.length&&console.warn(t.yellowBright(`
1
+ import n from"fs";import t from"chalk";const{readFile:a}=n.promises,r=(e={})=>{e.onLoad({filter:/\.js$/},async(o={})=>{(await a(o.path,"utf-8"))?.match(/process.env.NODE_ENV\s+=\s/gi)?.length&&console.warn(t.yellowBright(`
2
2
  [WARNING] process.env.NODE_ENV should only be set via a CLI flag in development or via external environment variables in production.
3
- `))})};var c=a;export{c as default};
3
+ `))}).catch(o=>{console.log("WNE",o)})};var c=r;export{c as default};
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@joystick.js/cli-canary",
3
3
  "type": "module",
4
- "version": "0.0.0-canary.1634",
5
- "canary_version": "0.0.0-canary.1633",
4
+ "version": "0.0.0-canary.1635",
5
+ "canary_version": "0.0.0-canary.1634",
6
6
  "description": "The CLI for Joystick.",
7
7
  "main": "dist/index.js",
8
8
  "bin": {
@@ -154,6 +154,8 @@ const bootstrap_component = (build = {}) => {
154
154
  loader: "js",
155
155
  };
156
156
  }
157
+ }).catch((error) => {
158
+ console.log('ON LOAD', error);
157
159
  });
158
160
 
159
161
  build.onEnd(() => {
@@ -185,6 +187,8 @@ const bootstrap_component = (build = {}) => {
185
187
 
186
188
  resolve();
187
189
  });
190
+ }).catch((error) => {
191
+ console.log('ON END', error);
188
192
  });
189
193
  };
190
194
 
@@ -14,6 +14,8 @@ const generate_file_dependency_map = (build = {}) => {
14
14
  const code = await readFile(get_platform_safe_path(args.path), "utf-8");
15
15
  await update_file_map(get_platform_safe_path(args.path), code);
16
16
  }
17
+ }).catch((error) => {
18
+ console.log('GFDM ON LOAD', error);
17
19
  });
18
20
  };
19
21
 
@@ -14,6 +14,8 @@ const warn_node_environment = (build = {}) => {
14
14
  )
15
15
  );
16
16
  }
17
+ }).catch((error) => {
18
+ console.log('WNE', error);
17
19
  });
18
20
  };
19
21