@scaleway/configuration-loader 1.0.4 → 1.0.5
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/CHANGELOG.md +6 -0
- package/dist/types.d.ts +67 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.0.5](https://github.com/scaleway/scaleway-sdk-js/compare/@scaleway/configuration-loader@1.0.4...@scaleway/configuration-loader@1.0.5) (2024-05-15)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **build:** export all types ([#1261](https://github.com/scaleway/scaleway-sdk-js/issues/1261)) ([2c13c19](https://github.com/scaleway/scaleway-sdk-js/commit/2c13c19d1699d2138d0ae9c4cf2a8a29b50d93ff))
|
|
11
|
+
|
|
6
12
|
## 1.0.4 (2024-05-06)
|
|
7
13
|
|
|
8
14
|
**Note:** Version bump only for package @scaleway/configuration-loader
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Profile contains information to help instanciating the Scaleway client.
|
|
3
|
+
*
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export type Profile = {
|
|
7
|
+
/**
|
|
8
|
+
* You need an access key and a secret key to connect to Scaleway API.
|
|
9
|
+
* Generate your token at the following address: {@link https://console.scaleway.com/project/credentials}
|
|
10
|
+
*/
|
|
11
|
+
accessKey?: string;
|
|
12
|
+
/**
|
|
13
|
+
* APIURL overrides the API URL of the Scaleway API to the given URL.
|
|
14
|
+
* Change that if you want to direct requests to a different endpoint.
|
|
15
|
+
*
|
|
16
|
+
* @defaultValue `https://api.scaleway.com`
|
|
17
|
+
*/
|
|
18
|
+
apiURL?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Your organization ID is the identifier of your account inside Scaleway infrastructure.
|
|
21
|
+
*/
|
|
22
|
+
defaultOrganizationId?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Your project ID is the identifier of the project your resources are attached to.
|
|
25
|
+
*/
|
|
26
|
+
defaultProjectId?: string;
|
|
27
|
+
/**
|
|
28
|
+
* A region is represented as a geographical area such as France (Paris) or the Netherlands (Amsterdam).
|
|
29
|
+
* It can contain multiple availability zones.
|
|
30
|
+
*
|
|
31
|
+
* Examples: fr-par, nl-ams.
|
|
32
|
+
*/
|
|
33
|
+
defaultRegion?: string;
|
|
34
|
+
/**
|
|
35
|
+
* A region can be split into many availability zones (AZ).
|
|
36
|
+
* Latency between multiple AZ of the same region are low as they have a common network layer.
|
|
37
|
+
*
|
|
38
|
+
* Examples: fr-par-1, nl-ams-1
|
|
39
|
+
*/
|
|
40
|
+
defaultZone?: string;
|
|
41
|
+
/**
|
|
42
|
+
* The secret key is the value that can be used to authenticate against the API (the value used in X-Auth-Token HTTP-header).
|
|
43
|
+
* The secret key MUST remain secret and not given to anyone or published online.
|
|
44
|
+
*/
|
|
45
|
+
secretKey?: string;
|
|
46
|
+
};
|
|
47
|
+
/** Configuration type. */
|
|
48
|
+
export type ConfigurationType = Record<string, Record<string, string>>;
|
|
49
|
+
/** Parameters to load the all the profiles from the configuration file */
|
|
50
|
+
export type AllProfilesFromFileParams = {
|
|
51
|
+
/**
|
|
52
|
+
* The path at which to locate the configuration file.
|
|
53
|
+
*
|
|
54
|
+
* Defaults to the value of the `SCW_CONFIG_PATH` environment variable
|
|
55
|
+
* or `~/.scw/config` otherwise.
|
|
56
|
+
*/
|
|
57
|
+
filepath?: string;
|
|
58
|
+
};
|
|
59
|
+
/** Parameters to load the profile from the configuration file */
|
|
60
|
+
export type ProfileFromFileParams = AllProfilesFromFileParams & {
|
|
61
|
+
/**
|
|
62
|
+
* Name of the profile to load.
|
|
63
|
+
*
|
|
64
|
+
* @defaultValue `default`
|
|
65
|
+
* */
|
|
66
|
+
profileName?: string;
|
|
67
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/configuration-loader",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Load configuration via file or environment for NodeJS.",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -27,5 +27,5 @@
|
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/node": "18.11.18"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "a7d80e98eaa7977ce6ac697f3003823972f5c52f"
|
|
31
31
|
}
|