unione 2.3.1 → 2.3.2
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/AGENTS.md +2 -2
- package/README.md +1 -1
- package/package.json +1 -1
- package/src/client/ApiClient.js +1 -1
- package/src/client/Configuration.js +1 -1
package/AGENTS.md
CHANGED
|
@@ -86,7 +86,7 @@ try {
|
|
|
86
86
|
npm pack --dry-run
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
-
- **Source label.** Every request carries the query parameter `platform=node-sdk.2.3.
|
|
89
|
+
- **Source label.** Every request carries the query parameter `platform=node-sdk.2.3.2`, added in one place, the shared request client (`ApiClient`); a package built on this SDK puts its own label in front: `<package>.<version>,node-sdk.2.3.2`.
|
|
90
90
|
- **Tests.** `npm install && npm test` runs the tests of the package (tests/ or test/, not published) offline: the API is faked (a fake transport or a mock server on 127.0.0.1), never the real API, no real key; add a test with every change of the client. Before a release the generator also builds and lints the package and runs every example of docs/ and of this file against a mock of the API. The CI (.github/workflows/test.yml) runs the tests on every push and pull request over the supported runtimes; release.yml publishes a tag only after they pass.
|
|
91
|
-
- **Release.** The version (2.3.
|
|
91
|
+
- **Release.** The version (2.3.2 in package.json) and the tag `v2.3.2` come from the generator; README.md states the Web API version the release was generated from.
|
|
92
92
|
- **Secrets.** Never commit API keys; the examples read `UNIONE_API_KEY` from the environment.
|
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ npm install unione
|
|
|
16
16
|
|
|
17
17
|
Requirements: Node.js 18+. No third-party dependencies.
|
|
18
18
|
|
|
19
|
-
For Node.js 14 use the 1.x line (branch `1.x`), the same API.
|
|
19
|
+
For Node.js 14 use the 1.x line (branch `1.x`), the same API. Install it: `npm install unione@1`.
|
|
20
20
|
|
|
21
21
|
Get an API key in the [control panel](https://cp.unione.io/en/settings/security/api) and keep it in the environment, never in code:
|
|
22
22
|
|
package/package.json
CHANGED
package/src/client/ApiClient.js
CHANGED
|
@@ -35,7 +35,7 @@ export function extraFields(data, names) {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
/** The SDK and its version in the "platform" query parameter of every request. */
|
|
38
|
-
export const PLATFORM = "node-sdk.2.3.
|
|
38
|
+
export const PLATFORM = "node-sdk.2.3.2";
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
41
|
* Sets a header, replacing one of the same name in another case.
|
|
@@ -36,7 +36,7 @@ export class Configuration {
|
|
|
36
36
|
* that uses the SDK and its version (e.g. "express.1.0.0"), sent in the "platform" query parameter before the SDK
|
|
37
37
|
* one (PLATFORM); headers: extra headers of every request; fetch: a fetch-compatible function, default: globalThis.fetch.
|
|
38
38
|
*/
|
|
39
|
-
constructor(apiKey, { baseUrl = DEFAULT_BASE_URL, timeout = 30000, userAgent = "unione-node-sdk/2.3.
|
|
39
|
+
constructor(apiKey, { baseUrl = DEFAULT_BASE_URL, timeout = 30000, userAgent = "unione-node-sdk/2.3.2", platform, headers = {}, fetch } = {}) {
|
|
40
40
|
this.apiKey = apiKey;
|
|
41
41
|
this.baseUrl = baseUrl.replace(/\/+$/, "");
|
|
42
42
|
this.timeout = timeout;
|