@joystick.js/cli-canary 0.0.0-canary.591 → 0.0.0-canary.593
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/dist/lib/build/node_paths.js +1 -1
- package/dist/lib/development_server/watch_for_changes/index.js +1 -1
- package/dist/lib/development_server/watch_for_changes/node_paths.js +1 -1
- package/dist/lib/development_server/watch_for_changes/watch_paths.js +1 -1
- package/package.json +1 -1
- package/src/lib/build/node_paths.js +1 -0
- package/src/lib/development_server/watch_for_changes/index.js +0 -1
- package/src/lib/development_server/watch_for_changes/node_paths.js +1 -0
- package/src/lib/development_server/watch_for_changes/watch_paths.js +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"./get_platform_safe_path.js";const
|
|
1
|
+
import e from"./get_platform_safe_path.js";const o=[e("api/"),e("cronJobs/"),e("cron_jobs/"),e("fixtures/"),e("lib/node"),e("queues/"),e("routes/"),e("tests/"),"index.server.js"];var t=o;export{t as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import f from"chokidar";import h from"fs";import{dirname as m}from"path";import y from"../../build/build_files.js";import g from"../../debounce.js";import s from"./get_after_run_tasks.js";import k from"./get_file_codependencies.js";import l from"../../build/get_file_operation.js";import v from"../../build/get_path_platform.js";import w from"../../types.js";import R from"./watch_paths.js";const{mkdir:p,copyFile:b,rm:d}=h.promises,c=async(e={},i={})=>{const a=process.initial_build_complete?await k(e?.path):[];if(i?.is_build_file&&await y({files:[{path:e?.path,platform:v(e?.path)}]}).catch((t=[])=>{if(
|
|
1
|
+
import f from"chokidar";import h from"fs";import{dirname as m}from"path";import y from"../../build/build_files.js";import g from"../../debounce.js";import s from"./get_after_run_tasks.js";import k from"./get_file_codependencies.js";import l from"../../build/get_file_operation.js";import v from"../../build/get_path_platform.js";import w from"../../types.js";import R from"./watch_paths.js";const{mkdir:p,copyFile:b,rm:d}=h.promises,c=async(e={},i={})=>{const a=process.initial_build_complete?await k(e?.path):[];if(i?.is_build_file&&await y({files:[{path:e?.path,platform:v(e?.path)}]}).catch((t=[])=>{if(!process.initial_build_complete&&t?.length>0&&process.exit(0),process.initial_build_complete&&t?.length>0)throw process.app_server_process.send(JSON.stringify({type:"BUILD_ERROR",paths:t.filter(({success:r})=>!r)})),process.hmr_server_process.send(JSON.stringify({type:"BUILD_ERROR"})),new Error("BUILD_ERROR")}),a?.length>0)for(let t=0;t<a?.length;t+=1){const r=a[t];return c({path:r},i)}return Promise.resolve()},D=async(e={})=>{switch(e?.operation){case"add_directory":return p(`.joystick/build/${e?.path}`,{recursive:!0});case"build_file":return c(e,{is_build_file:!0});case"copy_file":return await p(m(`.joystick/build/${e?.path}`),{recursive:!0}),await b(e?.path,`.joystick/build/${e?.path}`),c(e,{is_build_file:!1});case"delete_directory":return d(`.joystick/build/${e?.path}`,{recursive:!0});case"delete_file":return await d(`.joystick/build/${e?.path}`,{recursive:!0}),c(e,{is_build_file:!1});default:return!0}},O=(e={})=>({operation:e?.event,path:e?.path,after_run_tasks:process.initial_build_complete?s(e?.path):["start_app_server","start_hmr_server"]}),$=(e={})=>({operation:e?.event,path:e?.path,after_run_tasks:process.initial_build_complete?s(e?.path):["start_app_server","start_hmr_server"]}),E=(e={})=>({operation:e?.event,path:e?.path,after_run_tasks:process.initial_build_complete?s(e?.path):["start_app_server","start_hmr_server"]}),B=(e={})=>({operation:l(e?.path),path:e?.path,after_run_tasks:process.initial_build_complete?s(e?.path):["start_app_server","start_hmr_server"]}),I=(e={})=>({operation:l(e?.path),path:e?.path,after_run_tasks:process.initial_build_complete?s(e?.path):["start_app_server","start_hmr_server"]}),L=(e={})=>{switch(e?.event){case"add_file":return I(e);case"change_file":return B(e);case"delete_file":return E(e);case"add_directory":return $(e);case"delete_directory":return O(e)}},S=async(e=[],i={})=>{try{const a=new Set([]);for(let r=0;r<e?.length;r+=1){const _=e[r],n=L(_);if(await D(n),n?.after_run_tasks)for(let o=0;o<n?.after_run_tasks?.length;o+=1){const u=n?.after_run_tasks[o];a.add(u)}}const t=Array.from(a);for(let r=0;r<t?.length;r+=1){const _=t[r];w.is_function(i[_])&&await i[_](e)}}catch{}},U=(e="")=>{switch(e){case"add":return"add_file";case"change":return"change_file";case"unlink":return"delete_file";case"addDir":return"add_directory";case"unlinkDir":return"delete_directory"}},x=(e={})=>{const i=f.watch(R.map(({path:t})=>t),{ignored:".joystick"});let a=[];process.initial_build_complete=!1,i.on("error",t=>console.error(t)),i.on("all",(t,r)=>{a.push({event:U(t),path:r}),g(async()=>{await S(a,e),process.initial_build_complete=!0,a=[]},100)})};var M=x;export{M as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"./get_platform_safe_path.js";var r=[e("api/"),e("cronJobs/"),e("fixtures/"),e("lib/node"),e("queues/"),e("routes/"),e("tests/"),"index.server.js"];export{r as default};
|
|
1
|
+
import e from"./get_platform_safe_path.js";var r=[e("api/"),e("cronJobs/"),e("cron_jobs/"),e("fixtures/"),e("lib/node"),e("queues/"),e("routes/"),e("tests/"),"index.server.js"];export{r as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"../../build/copy_paths.js";const a=[{path:"api"},{path:"cronJobs"},{path:"email"},{path:"fixtures"},{path:"lib"},{path:"ui"},{path:"routes"},{path:"queues"},{path:"index.client.js"},{path:"index.server.js"},...t];var h=a;export{h as default};
|
|
1
|
+
import t from"../../build/copy_paths.js";const a=[{path:"api"},{path:"cronJobs"},{path:"cron_jobs"},{path:"email"},{path:"fixtures"},{path:"lib"},{path:"ui"},{path:"routes"},{path:"queues"},{path:"index.client.js"},{path:"index.server.js"},...t];var h=a;export{h as default};
|
package/package.json
CHANGED
|
@@ -3,6 +3,7 @@ import get_platform_safe_path from "./get_platform_safe_path.js";
|
|
|
3
3
|
const node_paths = [
|
|
4
4
|
get_platform_safe_path("api/"),
|
|
5
5
|
get_platform_safe_path("cronJobs/"),
|
|
6
|
+
get_platform_safe_path("cron_jobs/"),
|
|
6
7
|
get_platform_safe_path("fixtures/"),
|
|
7
8
|
get_platform_safe_path("lib/node"),
|
|
8
9
|
get_platform_safe_path("queues/"),
|
|
@@ -22,7 +22,6 @@ const handle_build_files = async (job = {}, options = {}) => {
|
|
|
22
22
|
await build_files({
|
|
23
23
|
files: [{ path: job?.path, platform: get_path_platform(job?.path) }],
|
|
24
24
|
}).catch((errors = []) => {
|
|
25
|
-
console.warn(errors);
|
|
26
25
|
if (!process.initial_build_complete && errors?.length > 0) {
|
|
27
26
|
process.exit(0);
|
|
28
27
|
}
|
|
@@ -3,6 +3,7 @@ import get_platform_safe_path from "./get_platform_safe_path.js";
|
|
|
3
3
|
export default [
|
|
4
4
|
get_platform_safe_path("api/"),
|
|
5
5
|
get_platform_safe_path("cronJobs/"),
|
|
6
|
+
get_platform_safe_path("cron_jobs/"),
|
|
6
7
|
get_platform_safe_path("fixtures/"),
|
|
7
8
|
get_platform_safe_path("lib/node"),
|
|
8
9
|
get_platform_safe_path("queues/"),
|