@joystick.js/cli-canary 0.0.0-canary.430 → 0.0.0-canary.431

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,13 +1,13 @@
1
1
  import fs from "fs";
2
2
  import CLILog from "../../lib/CLILog.js";
3
3
  import check_if_settings_valid from "./check_if_settings_valid.js";
4
- const read_settings_file = (environment = "") => {
4
+ const read_settings_file = (environment2 = "") => {
5
5
  try {
6
- const settings_file_name2 = `settings.${environment}.json`;
7
- const settings_file_exists = fs.existsSync(settings_file_name2);
6
+ const settings_file_name = `settings.${environment2}.json`;
7
+ const settings_file_exists = fs.existsSync(settings_file_name);
8
8
  if (!settings_file_exists) {
9
9
  CLILog(
10
- `Could not find a ${settings_file_name2} in your project. Double-check this exists and try again.`,
10
+ `Could not find a ${settings_file_name} in your project. Double-check this exists and try again.`,
11
11
  {
12
12
  level: "danger",
13
13
  docs: "https://cheatcode.co/docs/push/config"
@@ -15,7 +15,7 @@ const read_settings_file = (environment = "") => {
15
15
  );
16
16
  return process.exit(0);
17
17
  }
18
- return fs.readFileSync(settings_file_name2);
18
+ return fs.readFileSync(settings_file_name);
19
19
  } catch (exception) {
20
20
  throw new Error(`[get_settings_file.read_settings_file] ${exception.message}`);
21
21
  }
@@ -33,6 +33,7 @@ const validate_options = (options) => {
33
33
  const get_settings_file = (options, { resolve, reject }) => {
34
34
  try {
35
35
  validate_options(options);
36
+ const settings_file_name = `settings.${environment}.json`;
36
37
  const raw_settings_file = read_settings_file(options?.environment);
37
38
  const settings_file_is_valid_json = check_if_settings_valid(raw_settings_file);
38
39
  if (!settings_file_is_valid_json) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@joystick.js/cli-canary",
3
- "version": "0.0.0-canary.430",
3
+ "version": "0.0.0-canary.431",
4
4
  "type": "module",
5
5
  "description": "CLI for the Joystick JavaScript framework.",
6
6
  "main": "development.js",
@@ -38,6 +38,7 @@ const get_settings_file = (options, { resolve, reject }) => {
38
38
  try {
39
39
  validate_options(options);
40
40
 
41
+ const settings_file_name = `settings.${environment}.json`;
41
42
  const raw_settings_file = read_settings_file(options?.environment);
42
43
  const settings_file_is_valid_json = check_if_settings_valid(raw_settings_file);
43
44