speechrevolutions 0.2.0 → 0.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.
- package/dist/cjs/client.js +2 -1
- package/dist/cjs/version.js +6 -0
- package/dist/esm/client.js +2 -1
- package/dist/esm/version.d.ts +1 -0
- package/dist/esm/version.js +3 -0
- package/package.json +4 -3
- package/src/client.ts +2 -1
- package/src/version.ts +3 -0
package/dist/cjs/client.js
CHANGED
|
@@ -36,6 +36,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
36
36
|
exports.SpeechRevolutionsClient = exports.SpeechRevolutions = exports.STTClient = void 0;
|
|
37
37
|
const exceptions_js_1 = require("./exceptions.js");
|
|
38
38
|
const progress_js_1 = require("./progress.js");
|
|
39
|
+
const version_js_1 = require("./version.js");
|
|
39
40
|
const sse_js_1 = require("./sse.js");
|
|
40
41
|
const transcript_js_1 = require("./transcript.js");
|
|
41
42
|
const upload_js_1 = require("./upload.js");
|
|
@@ -47,7 +48,7 @@ const types_js_1 = require("./types.js");
|
|
|
47
48
|
* client turned out to be unable to reach production at all while passing every
|
|
48
49
|
* test that pointed at a local mock.
|
|
49
50
|
*/
|
|
50
|
-
const USER_AGENT =
|
|
51
|
+
const USER_AGENT = `speechrevolutions-node/${version_js_1.VERSION}`;
|
|
51
52
|
const DEFAULT_BASE_URL = "https://api.speechrevolutions.com";
|
|
52
53
|
const UPLOAD_PROGRESS_INTERVAL_MS = 10_000;
|
|
53
54
|
const UPLOAD_MAX_ATTEMPTS = 4;
|
package/dist/esm/client.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { APIError, AuthenticationError, JobFailedError, JobNotFoundError, RateLimitError, TimeoutError, UploadError, } from "./exceptions.js";
|
|
2
2
|
import { resolveProgress } from "./progress.js";
|
|
3
|
+
import { VERSION } from "./version.js";
|
|
3
4
|
import { parseSSEStream } from "./sse.js";
|
|
4
5
|
import { parseTranscript } from "./transcript.js";
|
|
5
6
|
import { byteProgressAdapter, iterWithProgress, } from "./upload.js";
|
|
@@ -11,7 +12,7 @@ import { makeProgressEvent, resolveOptions, } from "./types.js";
|
|
|
11
12
|
* client turned out to be unable to reach production at all while passing every
|
|
12
13
|
* test that pointed at a local mock.
|
|
13
14
|
*/
|
|
14
|
-
const USER_AGENT =
|
|
15
|
+
const USER_AGENT = `speechrevolutions-node/${VERSION}`;
|
|
15
16
|
const DEFAULT_BASE_URL = "https://api.speechrevolutions.com";
|
|
16
17
|
const UPLOAD_PROGRESS_INTERVAL_MS = 10_000;
|
|
17
18
|
const UPLOAD_MAX_ATTEMPTS = 4;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const VERSION = "0.2.1";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "speechrevolutions",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Official JavaScript/TypeScript SDK for the Speech Revolutions speech-to-text API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/cjs/index.js",
|
|
@@ -19,13 +19,14 @@
|
|
|
19
19
|
],
|
|
20
20
|
"scripts": {
|
|
21
21
|
"clean": "rm -rf dist",
|
|
22
|
-
"build": "npm run clean && npm run build:esm && npm run build:cjs && node scripts/fixup-dist.mjs",
|
|
22
|
+
"build": "npm run clean && npm run build:version && npm run build:esm && npm run build:cjs && node scripts/fixup-dist.mjs",
|
|
23
23
|
"build:esm": "tsc -p tsconfig.esm.json",
|
|
24
24
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
25
25
|
"typecheck": "tsc -p tsconfig.json",
|
|
26
26
|
"prepare": "npm run build",
|
|
27
27
|
"test": "npm run build && node --test test/*.test.mjs",
|
|
28
|
-
"test:only": "node --test test/*.test.mjs"
|
|
28
|
+
"test:only": "node --test test/*.test.mjs",
|
|
29
|
+
"build:version": "node scripts/gen-version.mjs"
|
|
29
30
|
},
|
|
30
31
|
"engines": {
|
|
31
32
|
"node": ">=18"
|
package/src/client.ts
CHANGED
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
UploadError,
|
|
9
9
|
} from "./exceptions.js";
|
|
10
10
|
import { resolveProgress } from "./progress.js";
|
|
11
|
+
import { VERSION } from "./version.js";
|
|
11
12
|
import { parseSSEStream } from "./sse.js";
|
|
12
13
|
import { parseTranscript, type Transcript } from "./transcript.js";
|
|
13
14
|
import {
|
|
@@ -33,7 +34,7 @@ import {
|
|
|
33
34
|
* client turned out to be unable to reach production at all while passing every
|
|
34
35
|
* test that pointed at a local mock.
|
|
35
36
|
*/
|
|
36
|
-
const USER_AGENT =
|
|
37
|
+
const USER_AGENT = `speechrevolutions-node/${VERSION}`;
|
|
37
38
|
|
|
38
39
|
const DEFAULT_BASE_URL = "https://api.speechrevolutions.com";
|
|
39
40
|
const UPLOAD_PROGRESS_INTERVAL_MS = 10_000;
|
package/src/version.ts
ADDED