hume 0.11.2 → 0.11.4
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/api/resources/empathicVoice/resources/chat/client/Client.d.ts +1 -0
- package/api/resources/empathicVoice/resources/chat/client/Client.js +12 -4
- package/api/resources/empathicVoice/resources/chatGroups/client/Client.d.ts +3 -1
- package/api/resources/empathicVoice/resources/chatGroups/client/Client.js +9 -16
- package/api/resources/empathicVoice/resources/chats/client/Client.d.ts +3 -1
- package/api/resources/empathicVoice/resources/chats/client/Client.js +7 -12
- package/api/resources/empathicVoice/resources/configs/client/Client.d.ts +3 -1
- package/api/resources/empathicVoice/resources/configs/client/Client.js +19 -28
- package/api/resources/empathicVoice/resources/customVoices/client/Client.d.ts +3 -1
- package/api/resources/empathicVoice/resources/customVoices/client/Client.js +13 -18
- package/api/resources/empathicVoice/resources/prompts/client/Client.d.ts +3 -1
- package/api/resources/empathicVoice/resources/prompts/client/Client.js +19 -28
- package/api/resources/empathicVoice/resources/tools/client/Client.d.ts +3 -1
- package/api/resources/empathicVoice/resources/tools/client/Client.js +19 -28
- package/api/resources/expressionMeasurement/client/Client.d.ts +2 -0
- package/api/resources/expressionMeasurement/resources/batch/client/Client.d.ts +3 -1
- package/api/resources/expressionMeasurement/resources/batch/client/Client.js +13 -20
- package/api/resources/tts/client/Client.d.ts +3 -1
- package/api/resources/tts/client/Client.js +9 -8
- package/api/resources/tts/resources/voices/client/Client.d.ts +3 -1
- package/api/resources/tts/resources/voices/client/Client.js +7 -10
- package/core/fetcher/Fetcher.d.ts +2 -1
- package/core/fetcher/Fetcher.js +22 -9
- package/core/form-data-utils/FormDataWrapper.js +5 -4
- package/core/form-data-utils/toReadableStream.d.ts +1 -0
- package/core/form-data-utils/toReadableStream.js +50 -0
- package/core/headers.d.ts +3 -0
- package/core/headers.js +29 -0
- package/core/index.d.ts +4 -4
- package/core/index.js +5 -4
- package/core/runtime/runtime.js +0 -1
- package/dist/api/resources/empathicVoice/resources/chat/client/Client.d.ts +1 -0
- package/dist/api/resources/empathicVoice/resources/chat/client/Client.js +12 -4
- package/dist/api/resources/empathicVoice/resources/chatGroups/client/Client.d.ts +3 -1
- package/dist/api/resources/empathicVoice/resources/chatGroups/client/Client.js +9 -16
- package/dist/api/resources/empathicVoice/resources/chats/client/Client.d.ts +3 -1
- package/dist/api/resources/empathicVoice/resources/chats/client/Client.js +7 -12
- package/dist/api/resources/empathicVoice/resources/configs/client/Client.d.ts +3 -1
- package/dist/api/resources/empathicVoice/resources/configs/client/Client.js +19 -28
- package/dist/api/resources/empathicVoice/resources/customVoices/client/Client.d.ts +3 -1
- package/dist/api/resources/empathicVoice/resources/customVoices/client/Client.js +13 -18
- package/dist/api/resources/empathicVoice/resources/prompts/client/Client.d.ts +3 -1
- package/dist/api/resources/empathicVoice/resources/prompts/client/Client.js +19 -28
- package/dist/api/resources/empathicVoice/resources/tools/client/Client.d.ts +3 -1
- package/dist/api/resources/empathicVoice/resources/tools/client/Client.js +19 -28
- package/dist/api/resources/expressionMeasurement/client/Client.d.ts +2 -0
- package/dist/api/resources/expressionMeasurement/resources/batch/client/Client.d.ts +3 -1
- package/dist/api/resources/expressionMeasurement/resources/batch/client/Client.js +13 -20
- package/dist/api/resources/tts/client/Client.d.ts +3 -1
- package/dist/api/resources/tts/client/Client.js +9 -8
- package/dist/api/resources/tts/resources/voices/client/Client.d.ts +3 -1
- package/dist/api/resources/tts/resources/voices/client/Client.js +7 -10
- package/dist/core/fetcher/Fetcher.d.ts +2 -1
- package/dist/core/fetcher/Fetcher.js +22 -9
- package/dist/core/form-data-utils/FormDataWrapper.js +5 -4
- package/dist/core/form-data-utils/toReadableStream.d.ts +1 -0
- package/dist/core/form-data-utils/toReadableStream.js +50 -0
- package/dist/core/headers.d.ts +3 -0
- package/dist/core/headers.js +29 -0
- package/dist/core/index.d.ts +4 -4
- package/dist/core/index.js +5 -4
- package/dist/core/runtime/runtime.js +0 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +7 -3
- package/scripts/rename-to-esm-files.js +10 -2
- package/version.d.ts +1 -1
- package/version.js +1 -1
- /package/core/{streaming-fetcher → stream}/Stream.d.ts +0 -0
- /package/core/{streaming-fetcher → stream}/Stream.js +0 -0
- /package/core/{streaming-fetcher → stream}/index.d.ts +0 -0
- /package/core/{streaming-fetcher → stream}/index.js +0 -0
- /package/dist/core/{streaming-fetcher → stream}/Stream.d.ts +0 -0
- /package/dist/core/{streaming-fetcher → stream}/Stream.js +0 -0
- /package/dist/core/{streaming-fetcher → stream}/index.d.ts +0 -0
- /package/dist/core/{streaming-fetcher → stream}/index.js +0 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
36
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
37
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
38
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
39
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
40
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
41
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
+
exports.toReadableStream = toReadableStream;
|
|
46
|
+
function toReadableStream(encoder) {
|
|
47
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
48
|
+
return (yield Promise.resolve().then(() => __importStar(require("readable-stream")))).Readable.from(encoder);
|
|
49
|
+
});
|
|
50
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import * as core from "./index.js";
|
|
2
|
+
export declare function mergeHeaders(...headersArray: (Record<string, string | core.Supplier<string | undefined> | undefined> | undefined)[]): Record<string, string | core.Supplier<string | undefined>>;
|
|
3
|
+
export declare function mergeOnlyDefinedHeaders(...headersArray: (Record<string, string | core.Supplier<string | undefined> | undefined> | undefined)[]): Record<string, string | core.Supplier<string | undefined>>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mergeHeaders = mergeHeaders;
|
|
4
|
+
exports.mergeOnlyDefinedHeaders = mergeOnlyDefinedHeaders;
|
|
5
|
+
function mergeHeaders(...headersArray) {
|
|
6
|
+
const result = {};
|
|
7
|
+
for (const [key, value] of headersArray
|
|
8
|
+
.filter((headers) => headers != null)
|
|
9
|
+
.flatMap((headers) => Object.entries(headers))) {
|
|
10
|
+
if (value != null) {
|
|
11
|
+
result[key] = value;
|
|
12
|
+
}
|
|
13
|
+
else if (key in result) {
|
|
14
|
+
delete result[key];
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return result;
|
|
18
|
+
}
|
|
19
|
+
function mergeOnlyDefinedHeaders(...headersArray) {
|
|
20
|
+
const result = {};
|
|
21
|
+
for (const [key, value] of headersArray
|
|
22
|
+
.filter((headers) => headers != null)
|
|
23
|
+
.flatMap((headers) => Object.entries(headers))) {
|
|
24
|
+
if (value != null) {
|
|
25
|
+
result[key] = value;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return result;
|
|
29
|
+
}
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/** THIS FILE IS MANUALLY MAINAINED: see .fernignore */
|
|
2
|
-
export * from "./streaming-fetcher";
|
|
3
2
|
export * from "./fetcher";
|
|
4
3
|
export * from "./runtime";
|
|
5
|
-
export * from "./
|
|
6
|
-
export * from "./websocket";
|
|
7
|
-
export * from "./pagination";
|
|
4
|
+
export * from "./stream";
|
|
8
5
|
export * from "./utils";
|
|
6
|
+
export * from "./pagination";
|
|
7
|
+
export * from "./form-data-utils";
|
|
9
8
|
export * as serialization from "./schemas";
|
|
9
|
+
export * from "./websocket";
|
package/dist/core/index.js
CHANGED
|
@@ -38,11 +38,12 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.serialization = void 0;
|
|
40
40
|
/** THIS FILE IS MANUALLY MAINAINED: see .fernignore */
|
|
41
|
-
__exportStar(require("./streaming-fetcher"), exports);
|
|
42
41
|
__exportStar(require("./fetcher"), exports);
|
|
43
42
|
__exportStar(require("./runtime"), exports);
|
|
44
|
-
__exportStar(require("./
|
|
45
|
-
__exportStar(require("./websocket"), exports);
|
|
46
|
-
__exportStar(require("./pagination"), exports);
|
|
43
|
+
__exportStar(require("./stream"), exports);
|
|
47
44
|
__exportStar(require("./utils"), exports);
|
|
45
|
+
__exportStar(require("./pagination"), exports);
|
|
46
|
+
__exportStar(require("./form-data-utils"), exports);
|
|
48
47
|
exports.serialization = __importStar(require("./schemas"));
|
|
48
|
+
// This one is manually added
|
|
49
|
+
__exportStar(require("./websocket"), exports);
|
|
@@ -41,7 +41,6 @@ function evaluateRuntime() {
|
|
|
41
41
|
* A constant that indicates whether the environment the code is running is a Web Worker.
|
|
42
42
|
*/
|
|
43
43
|
const isWebWorker = typeof self === "object" &&
|
|
44
|
-
// @ts-ignore
|
|
45
44
|
typeof (self === null || self === void 0 ? void 0 : self.importScripts) === "function" &&
|
|
46
45
|
(((_b = self.constructor) === null || _b === void 0 ? void 0 : _b.name) === "DedicatedWorkerGlobalScope" ||
|
|
47
46
|
((_c = self.constructor) === null || _c === void 0 ? void 0 : _c.name) === "ServiceWorkerGlobalScope" ||
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.11.
|
|
1
|
+
export declare const SDK_VERSION = "0.11.4";
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hume",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": "https://github.com/HumeAI/hume-typescript-sdk",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
"format": "prettier . --write --ignore-unknown",
|
|
10
10
|
"build": "tsc",
|
|
11
11
|
"prepack": "cp -rv dist/. .",
|
|
12
|
-
"test": "jest"
|
|
12
|
+
"test": "jest tests/unit --passWithNoTests",
|
|
13
|
+
"test:wire": "jest tests/wire --passWithNoTests",
|
|
14
|
+
"wire:test": "yarn test:wire"
|
|
13
15
|
},
|
|
14
16
|
"dependencies": {
|
|
15
17
|
"url-join": "4.0.1",
|
|
@@ -31,9 +33,11 @@
|
|
|
31
33
|
"webpack": "^5.97.1",
|
|
32
34
|
"ts-loader": "^9.5.1",
|
|
33
35
|
"jest": "^29.7.0",
|
|
36
|
+
"@jest/globals": "^29.7.0",
|
|
34
37
|
"@types/jest": "^29.5.14",
|
|
35
|
-
"ts-jest": "^29.
|
|
38
|
+
"ts-jest": "^29.3.4",
|
|
36
39
|
"jest-environment-jsdom": "^29.7.0",
|
|
40
|
+
"msw": "^2.8.4",
|
|
37
41
|
"@types/node": "^18.19.70",
|
|
38
42
|
"prettier": "^3.4.2",
|
|
39
43
|
"typescript": "~5.7.2",
|
|
@@ -50,8 +50,16 @@ async function updateFileContents(file) {
|
|
|
50
50
|
let newContent = content;
|
|
51
51
|
// Update each extension type defined in the map
|
|
52
52
|
for (const [oldExt, newExt] of Object.entries(extensionMap)) {
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
// Handle static imports/exports
|
|
54
|
+
const staticRegex = new RegExp(`(import|export)(.+from\\s+['"])(\\.\\.?\\/[^'"]+)(\\${oldExt})(['"])`, "g");
|
|
55
|
+
newContent = newContent.replace(staticRegex, `$1$2$3${newExt}$5`);
|
|
56
|
+
|
|
57
|
+
// Handle dynamic imports (yield import, await import, regular import())
|
|
58
|
+
const dynamicRegex = new RegExp(
|
|
59
|
+
`(yield\\s+import|await\\s+import|import)\\s*\\(\\s*['"](\\.\\.\?\\/[^'"]+)(\\${oldExt})['"]\\s*\\)`,
|
|
60
|
+
"g",
|
|
61
|
+
);
|
|
62
|
+
newContent = newContent.replace(dynamicRegex, `$1("$2${newExt}")`);
|
|
55
63
|
}
|
|
56
64
|
|
|
57
65
|
if (content !== newContent) {
|
package/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.11.
|
|
1
|
+
export declare const SDK_VERSION = "0.11.4";
|
package/version.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|