@aloma.io/integration-sdk 3.0.3 → 3.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/README.md CHANGED
@@ -2,4 +2,4 @@
2
2
 
3
3
  ## Creating a new Connector
4
4
 
5
- With the aloma integration SDK cli you can simply create a new connector via `npx @aloma.io/integration-sdk create connectorName --connector-id 1234`.
5
+ With the aloma integration SDK cli you can simply create a new connector via `npx @aloma.io/integration-sdk@latest create connectorName --connector-id 1234`.
@@ -194,7 +194,7 @@ class Connector {
194
194
  name: process.env.HOSTNAME || this.name,
195
195
  registrationToken: process.env.REGISTRATION_TOKEN,
196
196
  endpoint: process.env.DEVICE_ENDPOINT || "https://connect.aloma.io/",
197
- wsEndpoint: process.env.WEBSOCKET_ENDPOINT || "wss://transport.aloma.io/transport/",
197
+ wsEndpoint: process.env.WEBSOCKET_ENDPOINT || "wss://connect.aloma.io/transport/",
198
198
  privateKey: process.env.PRIVATE_KEY,
199
199
  publicKey: process.env.PUBLIC_KEY,
200
200
  introspect,
@@ -9,12 +9,12 @@
9
9
  "scripts": {
10
10
  "start": "node build/index.mjs",
11
11
  "dev": "./node_modules/typescript/bin/tsc --watch",
12
- "build": "rm -rf build; mkdir -p build/controller; cp ./src/controller/index.mts ./build/controller/.controller-for-types.mts; ./node_modules/typescript/bin/tsc",
12
+ "build": "./node_modules/@aloma.io/integration-sdk/build/cli.mjs build; ./node_modules/typescript/bin/tsc",
13
13
  "test": "./node_modules/mocha/bin/_mocha --recursive",
14
14
  "format": "yarn prettier --write src/"
15
15
  },
16
16
  "dependencies": {
17
- "@aloma.io/integration-sdk": "3.0.0-12"
17
+ "@aloma.io/integration-sdk": "^3"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@types/node": "^18",
@@ -7,6 +7,6 @@ export default class Controller extends AbstractController {
7
7
  */
8
8
  async hello(args: any)
9
9
  {
10
- return "hello world";
10
+ return {hi: 'world'};
11
11
  }
12
12
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aloma.io/integration-sdk",
3
- "version": "3.0.3",
3
+ "version": "3.0.5",
4
4
  "description": "",
5
5
  "author": "aloma.io",
6
6
  "license": "Apache-2.0",
@@ -248,7 +248,7 @@ class Connector {
248
248
  registrationToken: process.env.REGISTRATION_TOKEN,
249
249
  endpoint: process.env.DEVICE_ENDPOINT || "https://connect.aloma.io/",
250
250
  wsEndpoint:
251
- process.env.WEBSOCKET_ENDPOINT || "wss://transport.aloma.io/transport/",
251
+ process.env.WEBSOCKET_ENDPOINT || "wss://connect.aloma.io/transport/",
252
252
  privateKey: process.env.PRIVATE_KEY,
253
253
  publicKey: process.env.PUBLIC_KEY,
254
254
  introspect,
@@ -6,12 +6,13 @@ WORKDIR /connector/
6
6
 
7
7
  COPY ./package.json ./
8
8
  COPY ./yarn.lock ./
9
+ COPY ./tsconfig.json ./
9
10
  COPY ./entrypoint.sh ./
10
11
  COPY ./src ./src
11
12
 
12
- RUN set -e; adduser -S -u 1111 connector
13
+ RUN set -e; addgroup -g 1111 connector; adduser -S -u 1111 -G connector connector
13
14
 
14
- RUN set -e; apk add --no-cache git; yarn config set --home enableTelemetry 0; chmod 755 /connector/entrypoint.sh; cd /connector/; yarn install;
15
+ RUN set -e; apk add --no-cache git; yarn config set --home enableTelemetry 0; chmod 755 /connector/entrypoint.sh; cd /connector/; yarn install --frozen-lockfile;
15
16
 
16
17
  USER connector
17
18
 
@@ -7,6 +7,6 @@ export default class Controller extends AbstractController {
7
7
  */
8
8
  async hello(args: any)
9
9
  {
10
- return "hello world";
10
+ return {hi: 'world'};
11
11
  }
12
12
  }
@@ -1,17 +0,0 @@
1
- FROM node:16-alpine3.18
2
-
3
- ENV NODE_ENV production
4
-
5
- WORKDIR /connector/
6
-
7
- COPY ./package.json ./
8
- COPY ./entrypoint.sh ./
9
- COPY ./src ./src
10
-
11
- RUN set -e; adduser -S -u 1111 connector
12
-
13
- RUN set -e; apk add --no-cache git; yarn config set --home enableTelemetry 0; chmod 755 /connector/entrypoint.sh; cd /connector/; yarn install;
14
-
15
- USER connector
16
-
17
- ENTRYPOINT ["/connector/entrypoint.sh"]
@@ -1,5 +0,0 @@
1
- #!/bin/sh -e
2
-
3
- cd /connector/
4
-
5
- exec node src/index.js $@