@smithy/shared-ini-file-loader 4.3.2 → 4.3.3

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-cjs/index.js CHANGED
@@ -11,6 +11,8 @@ const ENV_PROFILE = "AWS_PROFILE";
11
11
  const DEFAULT_PROFILE = "default";
12
12
  const getProfileName = (init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE;
13
13
 
14
+ const CONFIG_PREFIX_SEPARATOR = ".";
15
+
14
16
  const getConfigData = (data) => Object.entries(data)
15
17
  .filter(([key]) => {
16
18
  const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR);
@@ -86,7 +88,6 @@ const parseIni = (iniData) => {
86
88
  };
87
89
 
88
90
  const swallowError$1 = () => ({});
89
- const CONFIG_PREFIX_SEPARATOR = ".";
90
91
  const loadSharedConfigFiles = async (init = {}) => {
91
92
  const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init;
92
93
  const homeDir = getHomeDir.getHomeDir();
@@ -0,0 +1 @@
1
+ export const CONFIG_PREFIX_SEPARATOR = ".";
@@ -1,5 +1,5 @@
1
1
  import { IniSectionType } from "@smithy/types";
2
- import { CONFIG_PREFIX_SEPARATOR } from "./loadSharedConfigFiles";
2
+ import { CONFIG_PREFIX_SEPARATOR } from "./constants";
3
3
  export const getConfigData = (data) => Object.entries(data)
4
4
  .filter(([key]) => {
5
5
  const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR);
@@ -6,7 +6,7 @@ import { getHomeDir } from "./getHomeDir";
6
6
  import { parseIni } from "./parseIni";
7
7
  import { slurpFile } from "./slurpFile";
8
8
  const swallowError = () => ({});
9
- export const CONFIG_PREFIX_SEPARATOR = ".";
9
+ export { CONFIG_PREFIX_SEPARATOR } from "./constants";
10
10
  export const loadSharedConfigFiles = async (init = {}) => {
11
11
  const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init;
12
12
  const homeDir = getHomeDir();
@@ -1,5 +1,5 @@
1
1
  import { IniSectionType } from "@smithy/types";
2
- import { CONFIG_PREFIX_SEPARATOR } from "./loadSharedConfigFiles";
2
+ import { CONFIG_PREFIX_SEPARATOR } from "./constants";
3
3
  const prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/;
4
4
  const profileNameBlockList = ["__proto__", "profile __proto__"];
5
5
  export const parseIni = (iniData) => {
@@ -0,0 +1,4 @@
1
+ /**
2
+ * @internal
3
+ */
4
+ export declare const CONFIG_PREFIX_SEPARATOR = ".";
@@ -25,10 +25,7 @@ export interface SharedConfigInit {
25
25
  */
26
26
  logger?: Logger;
27
27
  }
28
- /**
29
- * @internal
30
- */
31
- export declare const CONFIG_PREFIX_SEPARATOR = ".";
28
+ export { CONFIG_PREFIX_SEPARATOR } from "./constants";
32
29
  /**
33
30
  * Loads the config and credentials files.
34
31
  * @internal
@@ -0,0 +1,4 @@
1
+ /**
2
+ * @internal
3
+ */
4
+ export declare const CONFIG_PREFIX_SEPARATOR = ".";
@@ -25,10 +25,7 @@ export interface SharedConfigInit {
25
25
  */
26
26
  logger?: Logger;
27
27
  }
28
- /**
29
- * @internal
30
- */
31
- export declare const CONFIG_PREFIX_SEPARATOR = ".";
28
+ export { CONFIG_PREFIX_SEPARATOR } from "./constants";
32
29
  /**
33
30
  * Loads the config and credentials files.
34
31
  * @internal
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@smithy/shared-ini-file-loader",
3
- "version": "4.3.2",
3
+ "version": "4.3.3",
4
4
  "dependencies": {
5
- "@smithy/types": "^4.7.1",
5
+ "@smithy/types": "^4.8.0",
6
6
  "tslib": "^2.6.2"
7
7
  },
8
8
  "devDependencies": {