@picteus/extension-sdk 0.3.0 → 0.3.1
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.
|
@@ -93,7 +93,7 @@ export declare class Logger {
|
|
|
93
93
|
readonly error: LeveledLogMethod;
|
|
94
94
|
}
|
|
95
95
|
declare class ExtensionParameters {
|
|
96
|
-
readonly apiKey
|
|
96
|
+
readonly apiKey?: string;
|
|
97
97
|
readonly extensionId: string;
|
|
98
98
|
readonly webServicesBaseUrl: string;
|
|
99
99
|
constructor(parameters: Record<string, any>);
|
package/dist/picteusExtension.js
CHANGED
|
@@ -96,10 +96,13 @@ class MessageSender {
|
|
|
96
96
|
const contextId = this.contextId;
|
|
97
97
|
this.logger.debug(`Sending the message '${JSON.stringify(body)}' on channel '${channel}' for ${this.toString()}${contextId === undefined ? "" : ` attached to the context with id '${contextId}'`}${callback === undefined ? "" : " and waiting for a callback"}`);
|
|
98
98
|
const value = {
|
|
99
|
-
apiKey: this.parameters.apiKey,
|
|
100
99
|
extensionId: this.parameters.extensionId,
|
|
101
100
|
...body
|
|
102
101
|
};
|
|
102
|
+
// If there is no API key, we do not set it
|
|
103
|
+
if (this.parameters.apiKey !== undefined) {
|
|
104
|
+
value.apiKey = this.parameters.apiKey;
|
|
105
|
+
}
|
|
103
106
|
if (contextId !== undefined) {
|
|
104
107
|
value.contextId = contextId;
|
|
105
108
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@picteus/extension-sdk",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"productName": "Picteus TypeScript SDK",
|
|
5
5
|
"description": "The Picteus extension TypeScript SDK.",
|
|
6
6
|
"keywords": [
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"license": "Copyright (C) 2024 KoppaSoft. The code hereby is the private full property of the KoppaSoft company, Paris, France. You have no right to re-use or modify it. There are no open-source, nor free license attached to it!",
|
|
17
17
|
"private": false,
|
|
18
18
|
"engines": {
|
|
19
|
-
"node": ">=
|
|
19
|
+
"node": ">=22.17.1"
|
|
20
20
|
},
|
|
21
21
|
"homepage": "https://github.com/picteus/Picteus.git",
|
|
22
22
|
"repository": {
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"./dist"
|
|
39
39
|
],
|
|
40
40
|
"scripts": {
|
|
41
|
-
"compile": "tsc && tsc-alias",
|
|
42
|
-
"
|
|
41
|
+
"compile": "tsc && tsc-alias --resolve-full-paths",
|
|
42
|
+
"compileWithTsup": "tsup src/index.ts --tsconfig tsconfig.json --format cjs,esm --dts --clean --minify-whitespace --minify-identifiers --minify-syntax"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"typescript": "5.9.2",
|