@joystick.js/cli-canary 0.0.0-canary.620 → 0.0.0-canary.621

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,2 +1,2 @@
1
- import i from"fs";import s from"chalk";import o from"child_process";import c from"util";import t from"replace-in-files";import n from"./build_package_json.js";import l from"../../lib/cli_log.js";import m from"../../lib/loader.js";import u from"../../lib/node_path_polyfills.js";const{cp:p,writeFile:d,mkdir:r}=i.promises,y=c.promisify(o.exec),$=(e="")=>d(`./${e}/package.json`,n(e)),f=async(e={},a={})=>{process.loader=new m,process.loader.print("Creating app..."),a?.release&&!["production","canary"].includes(a.release)&&(l("Must pass either production or canary for --release.",{level:"danger",docs:"https://docs.cheatcode.co/joystick/cli/create"}),process.exit(0)),await p(`${u?.__package}/commands/create/template`,`./${e.name}`,{recursive:!0}),await $(e.name),await r(`./${e?.name}/.joystick`,{recursive:!0}),await r(`./${e?.name}/fixtures`,{recursive:!0}),await r(`./${e?.name}/indexes`,{recursive:!0}),await r(`./${e?.name}/lib`,{recursive:!0}),await r(`./${e?.name}/private`,{recursive:!0}),await r(`./${e?.name}/queues`,{recursive:!0}),await r(`./${e?.name}/routes`,{recursive:!0}),await r(`./${e?.name}/uploaders`,{recursive:!0}),await r(`./${e?.name}/tests`,{recursive:!0}),await r(`./${e?.name}/websockets`,{recursive:!0}),a?.release==="canary"&&(await t({files:[`${process.cwd()}/${e?.name}/**/*.js`],from:/(@joystick.js\/node)(?!-)/g,to:"@joystick.js/node-canary",optionsForFiles:{ignore:["**/node_modules/**"]}}),await t({files:[`${process.cwd()}/${e?.name}/**/*.js`],from:/(@joystick.js\/ui)(?!-)/g,to:"@joystick.js/ui-canary",optionsForFiles:{ignore:["**/node_modules/**"]}})),setTimeout(async()=>{process.loader.print("Installing dependencies..."),await y(`cd ./${e?.name} && npm install --save @joystick.js/ui${a?.release==="canary"?"-canary":""}@latest @joystick.js/node${a?.release==="canary"?"-canary":""}@latest @joystick.js/test${a?.release==="canary"?"-canary":""}@latest`),console.log(`${s.green("Project created! To get started, run:")}
2
- cd ${e?.name} && joystick start`)},1e3)};var T=f;export{T as default};
1
+ import i from"fs";import s from"chalk";import c from"child_process";import o from"util";import t from"replace-in-files";import n from"./build_package_json.js";import l from"../../lib/cli_log.js";import m from"../../lib/loader.js";import u from"../../lib/node_path_polyfills.js";const{cp:p,writeFile:d,mkdir:r}=i.promises,y=o.promisify(c.exec),$=(e="")=>d(`./${e}/package.json`,n(e)),f=async(e={},a={})=>{process.loader=new m,process.loader.print("Creating app..."),a?.release&&!["production","canary"].includes(a.release)&&(l("Must pass either production or canary for --release.",{level:"danger",docs:"https://docs.cheatcode.co/joystick/cli/create"}),process.exit(0)),await p(`${u?.__package}/commands/create/template`,`./${e.name}`,{recursive:!0}),await $(e.name),await r(`./${e?.name}/.joystick`,{recursive:!0}),await r(`./${e?.name}/fixtures`,{recursive:!0}),await r(`./${e?.name}/indexes`,{recursive:!0}),await r(`./${e?.name}/lib`,{recursive:!0}),await r(`./${e?.name}/private`,{recursive:!0}),await r(`./${e?.name}/queues`,{recursive:!0}),await r(`./${e?.name}/routes`,{recursive:!0}),await r(`./${e?.name}/uploaders`,{recursive:!0}),await r(`./${e?.name}/tests`,{recursive:!0}),await r(`./${e?.name}/websockets`,{recursive:!0}),a?.release==="canary"&&(await t({files:[`${process.cwd()}/${e?.name}/**/*.js`],from:/(@joystick.js\/node)(?!-)/g,to:"@joystick.js/node-canary",optionsForFiles:{ignore:["**/node_modules/**"]}}),await t({files:[`${process.cwd()}/${e?.name}/**/*.js`],from:/(@joystick.js\/ui)(?!-)/g,to:"@joystick.js/ui-canary",optionsForFiles:{ignore:["**/node_modules/**"]}})),setTimeout(async()=>{process.loader.print("Installing dependencies..."),await y(`cd ./${e?.name} && npm install --save @joystick.js/ui${a?.release==="canary"?"-canary":""}@latest @joystick.js/node${a?.release==="canary"?"-canary":""}@latest @joystick.js/test${a?.release==="canary"?"-canary":""}@latest`),console.log(`${s.green("Project created! To get started, run:")}
2
+ cd ${e?.name} && joystick${a?.release==="canary"?"-canary":""} start`)},1e3)};var T=f;export{T 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.620",
4
+ "version": "0.0.0-canary.621",
5
5
  "description": "The CLI for Joystick.",
6
6
  "main": "dist/index.js",
7
7
  "bin": {
@@ -71,7 +71,7 @@ const create = async (args = {}, options = {}) => {
71
71
  process.loader.print("Installing dependencies...");
72
72
  await exec(`cd ./${args?.name} && npm install --save @joystick.js/ui${options?.release === 'canary' ? '-canary' : ''}@latest @joystick.js/node${options?.release === 'canary' ? '-canary' : ''}@latest @joystick.js/test${options?.release === 'canary' ? '-canary' : ''}@latest`);
73
73
  console.log(
74
- `${chalk.green("Project created! To get started, run:")}\ncd ${args?.name} && joystick start`
74
+ `${chalk.green("Project created! To get started, run:")}\ncd ${args?.name} && joystick${options?.release === 'canary' ? '-canary' : ''} start`
75
75
  );
76
76
  }, 1000);
77
77
  };