@allthings/sdk 6.2.0-4 → 6.2.0-6

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.
package/dist/cli.js CHANGED
@@ -13,7 +13,7 @@ var require$$4 = require('https');
13
13
  var require$$5 = require('url');
14
14
  var require$$6 = require('fs');
15
15
 
16
- const version = "6.2.0-4";
16
+ const version = "6.2.0-6";
17
17
 
18
18
  const REST_API_URL = 'https://api.allthings.me';
19
19
  const OAUTH_URL = 'https://accounts.allthings.me';
package/dist/lib.cjs.js CHANGED
@@ -12,7 +12,7 @@ var require$$4 = require('https');
12
12
  var require$$5 = require('url');
13
13
  var require$$6 = require('fs');
14
14
 
15
- const version = "6.2.0-4";
15
+ const version = "6.2.0-6";
16
16
 
17
17
  const REST_API_URL = 'https://api.allthings.me';
18
18
  const OAUTH_URL = 'https://accounts.allthings.me';
@@ -54,7 +54,7 @@ const DEFAULT_CLIENT_CONFIG = {
54
54
  onlyDefault: false,
55
55
  prefix: process.env.SSM_PARAM_PATH,
56
56
  };
57
- const getSecrets = async (ssm, config, params, defaultValue = '') => {
57
+ const getSecrets = async (ssm, config, params, defaultValue) => {
58
58
  var _a, _b;
59
59
  if (config.onlyDefault) {
60
60
  return [defaultValue];
@@ -73,8 +73,9 @@ const getSecrets = async (ssm, config, params, defaultValue = '') => {
73
73
  return [defaultValue];
74
74
  }
75
75
  };
76
- const getSecret = async (ssm, config, param, defaultValue = '') => {
76
+ const getSecret = async (ssm, config, param, defaultValue) => {
77
77
  var _a, _b;
78
+ console.log(config, param, { defaultValue });
78
79
  if (config.onlyDefault) {
79
80
  return defaultValue;
80
81
  }
@@ -96,8 +97,8 @@ const parameterStore = (userConfig) => {
96
97
  const _a = Object.assign(Object.assign({}, DEFAULT_CLIENT_CONFIG), userConfig), { clientConfig } = _a, config = __rest$5(_a, ["clientConfig"]);
97
98
  const ssm = new clientSsm.SSMClient(clientConfig);
98
99
  return {
99
- getSecret: (param, defaultValue) => getSecret(ssm, config, param, defaultValue),
100
- getSecrets: (params, defaultValue) => getSecrets(ssm, config, params, defaultValue),
100
+ getSecret: (param, defaultValue = '') => getSecret(ssm, config, param, defaultValue),
101
+ getSecrets: (params, defaultValue = '') => getSecrets(ssm, config, params, defaultValue),
101
102
  };
102
103
  };
103
104
 
package/dist/lib.esm.js CHANGED
@@ -10,7 +10,7 @@ import require$$4 from 'https';
10
10
  import require$$5 from 'url';
11
11
  import require$$6 from 'fs';
12
12
 
13
- const version = "6.2.0-4";
13
+ const version = "6.2.0-6";
14
14
 
15
15
  const REST_API_URL = 'https://api.allthings.me';
16
16
  const OAUTH_URL = 'https://accounts.allthings.me';
@@ -52,7 +52,7 @@ const DEFAULT_CLIENT_CONFIG = {
52
52
  onlyDefault: false,
53
53
  prefix: process.env.SSM_PARAM_PATH,
54
54
  };
55
- const getSecrets = async (ssm, config, params, defaultValue = '') => {
55
+ const getSecrets = async (ssm, config, params, defaultValue) => {
56
56
  var _a, _b;
57
57
  if (config.onlyDefault) {
58
58
  return [defaultValue];
@@ -71,8 +71,9 @@ const getSecrets = async (ssm, config, params, defaultValue = '') => {
71
71
  return [defaultValue];
72
72
  }
73
73
  };
74
- const getSecret = async (ssm, config, param, defaultValue = '') => {
74
+ const getSecret = async (ssm, config, param, defaultValue) => {
75
75
  var _a, _b;
76
+ console.log(config, param, { defaultValue });
76
77
  if (config.onlyDefault) {
77
78
  return defaultValue;
78
79
  }
@@ -94,8 +95,8 @@ const parameterStore = (userConfig) => {
94
95
  const _a = Object.assign(Object.assign({}, DEFAULT_CLIENT_CONFIG), userConfig), { clientConfig } = _a, config = __rest$5(_a, ["clientConfig"]);
95
96
  const ssm = new SSMClient(clientConfig);
96
97
  return {
97
- getSecret: (param, defaultValue) => getSecret(ssm, config, param, defaultValue),
98
- getSecrets: (params, defaultValue) => getSecrets(ssm, config, params, defaultValue),
98
+ getSecret: (param, defaultValue = '') => getSecret(ssm, config, param, defaultValue),
99
+ getSecrets: (params, defaultValue = '') => getSecrets(ssm, config, params, defaultValue),
99
100
  };
100
101
  };
101
102