@joystick.js/cli-canary 0.0.0-canary.1650 → 0.0.0-canary.1651

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,8 +1,8 @@
1
- import p from"chalk";import m from"inquirer";import l from"../../lib/build/index.js";import c from"../../lib/cli_log.js";import a from"./prompts/confirm_deployment.js";import"./create_version.js";import"./get_deployment.js";import _ from"./get_push_domain.js";import u from"./get_settings_file.js";import f from"./get_session_token.js";import"./handle_initial_deployment.js";import"./handle_version_deployment.js";import g from"../../lib/loader.js";import"./upload_build_to_cdn.js";import"./validate_deployment.js";import"./validate_push_config.js";const P=(o="",t="",s={})=>{let e="";for(let n=0;n<s?.errors?.length;n+=1){const r=s?.errors[n];o==="push_config"&&(e+=`${p.yellowBright(`> ${r.field}`)}
1
+ import p from"chalk";import"inquirer";import m from"../../lib/build/index.js";import i from"../../lib/cli_log.js";import"./prompts/confirm_deployment.js";import"./create_version.js";import"./get_deployment.js";import d from"./get_push_domain.js";import l from"./get_settings_file.js";import a from"./get_session_token.js";import"./handle_initial_deployment.js";import"./handle_version_deployment.js";import _ from"../../lib/loader.js";import"./upload_build_to_cdn.js";import"./validate_deployment.js";import"./validate_push_config.js";const P=(o="",t="",s={})=>{let e="";for(let n=0;n<s?.errors?.length;n+=1){const r=s?.errors[n];o==="push_config"&&(e+=`${p.yellowBright(`> ${r.field}`)}
2
2
  `),e+=`${r?.error}
3
3
  ${n+1===s?.errors?.length?"":`
4
- `}`}c(`${t?`${p.yellowBright(t)}
4
+ `}`}i(`${t?`${p.yellowBright(t)}
5
5
 
6
6
 
7
- `:""}${e}`,{level:"danger",docs:{push_config:"https://cheatcode.co/docs/push/config",deployment:"https://cheatcode.co/docs/push/subscription"}[o]}),process.exit(0)},h=async()=>{const o=await f();return o||(c(data?.error?.message,{level:"danger",docs:"https://cheatcode.co/docs/push/cli#authentication"}),process.exit(0))},Q=(o="")=>(c(`settings.${o}.json must contain a push config object. Add this following the docs link below and try again.`,{level:"danger",docs:"https://cheatcode.co/docs/push/config"}),process.exit(0)),y=async(o={},t={})=>{process.loader=new g,process.loader.print("Starting deployment...");const s=await h(),e=t?.environment||"production",r=(await u({environment:e}))?.config?.push||{},w=_(t?.push_server),i={status:"undeployed",deployment_secret:"abc123"},{confirm_deployment:d}=i?.status==="undeployed"?await m.prompt(a([])):{confirm_deployment:!0};if(d){i?.status==="undeployed"&&console.log(`
8
- `);const v=new Date().toISOString();await l({environment:e,encrypt_build:!0,encryption_key:i?.deployment_secret,silence_confirmation:!0}),console.log("Now do the docker build.")}};var R=y;export{R as default};
7
+ `:""}${e}`,{level:"danger",docs:{push_config:"https://cheatcode.co/docs/push/config",deployment:"https://cheatcode.co/docs/push/subscription"}[o]}),process.exit(0)},u=async()=>{const o=await a();return o||(i(data?.error?.message,{level:"danger",docs:"https://cheatcode.co/docs/push/cli#authentication"}),process.exit(0))},Q=(o="")=>(i(`settings.${o}.json must contain a push config object. Add this following the docs link below and try again.`,{level:"danger",docs:"https://cheatcode.co/docs/push/config"}),process.exit(0)),f=async(o={},t={})=>{process.loader=new _,process.loader.print("Starting deployment...");const s=await u(),e=t?.environment||"production",r=(await l({environment:e}))?.config?.push||{},g=d(t?.push_server),c={status:"undeployed",deployment_secret:"abc123"};if(!0){c?.status==="undeployed"&&console.log(`
8
+ `);const y=new Date().toISOString();await m({environment:e,encrypt_build:!0,encryption_key:c?.deployment_secret,silence_confirmation:!0}),console.log("Now do the docker build.")}};var R=f;export{R 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.1650",
5
- "canary_version": "0.0.0-canary.1649",
4
+ "version": "0.0.0-canary.1651",
5
+ "canary_version": "0.0.0-canary.1650",
6
6
  "description": "The CLI for Joystick.",
7
7
  "main": "dist/index.js",
8
8
  "bin": {
@@ -92,9 +92,10 @@ const push = async (args = {}, options = {}) => {
92
92
  });
93
93
 
94
94
  // NOTE: A bit hacky but removes need for weird if {} statement nesting.
95
- const { confirm_deployment } = deployment?.status === 'undeployed' ? await inquirer.prompt(
96
- confirm_deployment_prompt([] || push_config_validation_response?.instances)
97
- ) : { confirm_deployment: true };
95
+ const confirm_deployment = true;
96
+ // const { confirm_deployment } = { confirm_deployment: true } || deployment?.status === 'undeployed' ? await inquirer.prompt(
97
+ // confirm_deployment_prompt([] || push_config_validation_response?.instances)
98
+ // ) : { confirm_deployment: true };
98
99
 
99
100
  if (confirm_deployment) {
100
101
  // NOTE: Do this to create a gap between the confirmation text above (only applies if