@aloma.io/integration-sdk 3.2.0 → 3.2.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.
@@ -22,7 +22,8 @@ const transform = (meta) => {
|
|
22
22
|
.getSignatures()
|
23
23
|
.map((sig) => {
|
24
24
|
const docs = sig.getJSDoc().serialize() || [];
|
25
|
-
const desc = docs.find((what) => what.kind === "description")
|
25
|
+
const desc = docs.find((what) => what.kind === "description")
|
26
|
+
?.value;
|
26
27
|
const paramDocs = docs
|
27
28
|
.filter((what) => what.kind === "param")
|
28
29
|
.map((what) => {
|
package/build/cli.mjs
CHANGED
@@ -3,9 +3,9 @@ import { Command } from "commander";
|
|
3
3
|
import fs from "node:fs";
|
4
4
|
import { fileURLToPath } from "node:url";
|
5
5
|
import path from "node:path";
|
6
|
-
import JWE from
|
7
|
-
import util from
|
8
|
-
import ChildProcess from
|
6
|
+
import JWE from "./internal/util/jwe/index.mjs";
|
7
|
+
import util from "node:util";
|
8
|
+
import ChildProcess from "node:child_process";
|
9
9
|
const exec = util.promisify(ChildProcess.exec);
|
10
10
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
11
11
|
const files = [
|
@@ -67,13 +67,13 @@ program
|
|
67
67
|
throw new Error("name is empty");
|
68
68
|
const target = `${process.cwd()}/${name}`;
|
69
69
|
fs.mkdirSync(target);
|
70
|
-
console.log(
|
70
|
+
console.log("Creating connector ...");
|
71
71
|
extract({ ...options, target, name });
|
72
|
-
console.log(
|
72
|
+
console.log("Generating keys ...");
|
73
73
|
await generateKeys({ target });
|
74
|
-
console.log(
|
74
|
+
console.log("Installing dependencies ...");
|
75
75
|
await exec(`cd ${target}; yarn`);
|
76
|
-
console.log(
|
76
|
+
console.log("Building ...");
|
77
77
|
await exec(`cd ${target}; yarn build`);
|
78
78
|
console.log(`
|
79
79
|
Success!
|
package/build/internal/index.mjs
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
// @ts-nocheck
|
2
|
-
import dotenv from
|
2
|
+
import dotenv from "dotenv";
|
3
3
|
dotenv.config();
|
4
4
|
import fs from "node:fs";
|
5
5
|
import { Config } from "./websocket/config.mjs";
|
@@ -11,8 +11,8 @@ import JWE from "./util/jwe/index.mjs";
|
|
11
11
|
import fetch from "node-fetch";
|
12
12
|
import { init } from "@paralleldrive/cuid2";
|
13
13
|
const cuid = init({ length: 32 });
|
14
|
-
import express from
|
15
|
-
import PromClient from
|
14
|
+
import express from "express";
|
15
|
+
import PromClient from "prom-client";
|
16
16
|
// TODO fetch with retry
|
17
17
|
const handlePacketError = (packet, e, transport) => {
|
18
18
|
if (!packet.cb()) {
|
@@ -64,16 +64,19 @@ class Fetcher {
|
|
64
64
|
if (!options?.headers || !options?.headers?.Accept) {
|
65
65
|
options.headers = {
|
66
66
|
...options.headers,
|
67
|
-
Accept:
|
67
|
+
Accept: "application/json",
|
68
68
|
};
|
69
69
|
}
|
70
|
-
if (!options?.headers || !options?.headers?.[
|
70
|
+
if (!options?.headers || !options?.headers?.["Content-type"]) {
|
71
71
|
options.headers = {
|
72
72
|
...options.headers,
|
73
|
-
|
73
|
+
"Content-type": "application/json",
|
74
74
|
};
|
75
75
|
}
|
76
|
-
if (!(options?.method ===
|
76
|
+
if (!(options?.method === "GET" || options?.method === "HEAD") &&
|
77
|
+
options?.body &&
|
78
|
+
!(typeof options.body === "string") &&
|
79
|
+
options?.headers?.["Content-type"] === "application/json") {
|
77
80
|
options.body = JSON.stringify(options.body);
|
78
81
|
}
|
79
82
|
const ret = await fetch(theURL, options);
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@aloma.io/integration-sdk",
|
3
|
-
"version": "3.2.
|
3
|
+
"version": "3.2.1",
|
4
4
|
"description": "",
|
5
5
|
"author": "aloma.io",
|
6
6
|
"license": "Apache-2.0",
|
@@ -27,7 +27,7 @@
|
|
27
27
|
"dependencies": {
|
28
28
|
"@paralleldrive/cuid2": "^2",
|
29
29
|
"@ts-ast-parser/core": "^0",
|
30
|
-
"@types/node": "^
|
30
|
+
"@types/node": "^16",
|
31
31
|
"commander": "^11",
|
32
32
|
"dotenv": "*",
|
33
33
|
"express": "^4",
|