@joystick.js/cli-canary 0.0.0-canary.635 → 0.0.0-canary.636

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 +1 @@
1
- import n from"fs";import i from"../../lib/cli_log.js";import o from"../../lib/is_valid_json_string.js";import r from"../../lib/path_exists.js";const{readFile:c}=n.promises,a=async(t="")=>{const s=`settings.${t}.json`;return await r(s)?c(s):(i(`Could not find a ${s} in your project. Double-check this exists and try again.`,{level:"danger",docs:"https://cheatcode.co/docs/push/config"}),process.exit(0))},_=t=>{const s=`settings.${t?.environment}.json`,e=a(t?.environment);return o(e)?JSON.parse(e):(i(`${s} contains invalid JSON. Double-check the syntax and try again.`,{level:"danger",docs:"https://cheatcode.co/docs/push/config"}),process.exit(0))};var m=_;export{m as default};
1
+ import n from"fs";import i from"../../lib/cli_log.js";import o from"../../lib/is_valid_json_string.js";import r from"../../lib/path_exists.js";const{readFile:a}=n.promises,c=async(t="")=>{const s=`settings.${t}.json`;return await r(s)?a(s):(i(`Could not find a ${s} in your project. Double-check this exists and try again.`,{level:"danger",docs:"https://cheatcode.co/docs/push/config"}),process.exit(0))},_=async t=>{const s=`settings.${t?.environment}.json`,e=await c(t?.environment);return o(e)?JSON.parse(e):(i(`${s} contains invalid JSON. Double-check the syntax and try again.`,{level:"danger",docs:"https://cheatcode.co/docs/push/config"}),process.exit(0))};var m=_;export{m 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.635",
4
+ "version": "0.0.0-canary.636",
5
5
  "description": "The CLI for Joystick.",
6
6
  "main": "dist/index.js",
7
7
  "bin": {
@@ -24,9 +24,9 @@ const read_settings_file = async (environment = '') => {
24
24
  return readFile(settings_file_name);
25
25
  };
26
26
 
27
- const get_settings_file = (options) => {
27
+ const get_settings_file = async (options) => {
28
28
  const settings_file_name = `settings.${options?.environment}.json`;
29
- const raw_settings_file = read_settings_file(options?.environment);
29
+ const raw_settings_file = await read_settings_file(options?.environment);
30
30
  const settings_file_is_valid_json = is_valid_json_string(raw_settings_file);
31
31
 
32
32
  if (!settings_file_is_valid_json) {