@joystick.js/cli-canary 0.0.0-canary.310 → 0.0.0-canary.312

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,4 +1,5 @@
1
1
  import get_settings_file from "./get_settings_file.js";
2
+ import validate_push_config from "./validate_push_config.js";
2
3
  import handle_missing_domain from "./handle_missing_domain.js";
3
4
  import get_session_token from "./get_session_token.js";
4
5
  import CLILog from "../../lib/CLILog.js";
@@ -43,7 +44,12 @@ var push_default = async (args = {}, options = {}) => {
43
44
  if (!settings?.push) {
44
45
  return warn_no_push_config(environment);
45
46
  }
46
- const response = await validate_push_config(settings?.push);
47
+ const push_provision_domain = get_provision_domain(options?.provision_server);
48
+ const push_app_domain = get_app_domain(options?.provision_server);
49
+ const response = await validate_push_config({
50
+ push_provision_domain,
51
+ push_config: settings?.push
52
+ });
47
53
  console.log(response);
48
54
  };
49
55
  export {
@@ -1,11 +1,11 @@
1
1
  import fetch from "node-fetch";
2
- var validate_push_config_default = (push_config = {}) => {
2
+ var validate_push_config_default = (options = {}) => {
3
3
  return fetch(`${options?.push_provision_domain}/api/validate/config`, {
4
4
  method: "POST",
5
5
  headers: {
6
6
  "Content-Type": "application/json"
7
7
  },
8
- body: JSON.stringify(push_config)
8
+ body: JSON.stringify(options?.push_config)
9
9
  })?.then((response) => {
10
10
  return response.json();
11
11
  }).catch((error) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@joystick.js/cli-canary",
3
- "version": "0.0.0-canary.310",
3
+ "version": "0.0.0-canary.312",
4
4
  "type": "module",
5
5
  "description": "CLI for the Joystick JavaScript framework.",
6
6
  "main": "development.js",
@@ -1,4 +1,5 @@
1
1
  import get_settings_file from './get_settings_file.js';
2
+ import validate_push_config from './validate_push_config.js';
2
3
  import handle_missing_domain from './handle_missing_domain.js';
3
4
  import get_session_token from './get_session_token.js';
4
5
  import CLILog from '../../lib/CLILog.js';
@@ -52,13 +53,17 @@ export default async (args = {}, options = {}) => {
52
53
  return warn_no_push_config(environment);
53
54
  }
54
55
 
55
- const response = await validate_push_config(settings?.push);
56
+ const push_provision_domain = get_provision_domain(options?.provision_server);
57
+ const push_app_domain = get_app_domain(options?.provision_server);
58
+ const response = await validate_push_config({
59
+ push_provision_domain,
60
+ push_config: settings?.push,
61
+ });
62
+
56
63
  console.log(response);
57
64
 
58
65
  // TODO: Validate deployment feasible (subscription and provider?).
59
66
  // const session_token = await get_session_for_deployment();
60
- // const push_provision_domain = get_provision_domain(options?.provision_server)
61
- // const push_app_domain = get_app_domain(options?.provision_server)
62
67
  // const deployment = await get_deployment({
63
68
  // domain: settings?.push?.domain,
64
69
  // session_token,
@@ -1,12 +1,12 @@
1
1
  import fetch from 'node-fetch';
2
2
 
3
- export default (push_config = {}) => {
3
+ export default (options = {}) => {
4
4
  return fetch(`${options?.push_provision_domain}/api/validate/config`, {
5
5
  method: 'POST',
6
6
  headers: {
7
7
  'Content-Type': 'application/json',
8
8
  },
9
- body: JSON.stringify(push_config),
9
+ body: JSON.stringify(options?.push_config),
10
10
  })?.then((response) => {
11
11
  return response.json();
12
12
  }).catch((error) => {