@remedia/node 0.1.0-dev.1 → 0.1.0-dev.3
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 +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/input.d.ts +3 -1
- package/dist/playback.d.ts +3 -1
- package/dist/playback.js +3 -1
- package/dist/remedia.d.ts +16 -0
- package/dist/remedia.js +46 -0
- package/native.d.ts +18 -0
- package/native.js +56 -56
- package/package.json +14 -14
package/README.md
CHANGED
|
@@ -34,9 +34,9 @@ Requires Node.js **22.18.0 or newer** (ESM).
|
|
|
34
34
|
npm install @remedia/node
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
Install FFmpeg
|
|
38
|
-
FFmpeg or compile the addon. Required ABI majors are avcodec
|
|
39
|
-
avfilter
|
|
37
|
+
Install FFmpeg 9 shared libraries separately before importing the package. npm does not install
|
|
38
|
+
FFmpeg or compile the addon. Required ABI majors are avcodec 63, avformat 63, avutil 61,
|
|
39
|
+
avfilter 12, and swresample 7. libopus is statically included; FFmpeg is dynamically linked.
|
|
40
40
|
|
|
41
41
|
Native runtime CI covers Linux x64/ARM64 glibc, macOS x64/ARM64, Windows x64 MSVC, and
|
|
42
42
|
FreeBSD x64. Additional build-only packages cover Linux x64/ARM64 musl, Linux ARMv7 hard-float GNU,
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export type { DiscordConnectOptions, DiscordSessionOptions } from './discord.js'
|
|
|
3
3
|
export type { DiscordGatewayPacket, DiscordGatewaySend, DiscordGatewayVoicePayload, } from './gateway.js';
|
|
4
4
|
export { PlaybackSession } from './playback.js';
|
|
5
5
|
export { PlaybackHooks, PlaybackSessionEvents, RemediaEvents, VoiceSessionEvents, } from './lifecycle.js';
|
|
6
|
-
export { Remedia, type RemediaOptions } from './remedia.js';
|
|
6
|
+
export { Remedia, type ProbeOptions, type RemediaOptions } from './remedia.js';
|
|
7
7
|
export type { MediaSource } from './input.js';
|
|
8
8
|
export type { AudioStreamInfo, DebugListener, DiagnosticEvent, DiagnosticFieldValue, DiagnosticSeverity, PlaybackPosition, PlaybackState, VoiceConnectionState, } from './types.js';
|
|
9
9
|
export type { BeforePlayContext, BeforePlayHook, BeforePlayResult, LifecycleVoiceState, PlayOptions, PlaybackEventIdentity, PlaybackLifecycleEvents, PlaybackSessionEventMap, RemediaLifecycleEvents, SessionLifecycleEvents, VoiceEventIdentity, VoiceLifecycleEvents, } from './lifecycle.js';
|
package/dist/input.d.ts
CHANGED
|
@@ -15,7 +15,9 @@ export type MediaSource = {
|
|
|
15
15
|
buffer: Buffer | Uint8Array;
|
|
16
16
|
} | {
|
|
17
17
|
/**
|
|
18
|
-
* Caller-owned binary Readable, consumed with bounded backpressure in embedded mode
|
|
18
|
+
* Caller-owned binary Readable, consumed with bounded backpressure in embedded mode.
|
|
19
|
+
* Playback can seek forward, not backward, without caching prior input.
|
|
20
|
+
* Remedia does not destroy the caller-owned stream.
|
|
19
21
|
*/
|
|
20
22
|
stream: Readable;
|
|
21
23
|
};
|
package/dist/playback.d.ts
CHANGED
|
@@ -50,7 +50,9 @@ export declare class PlaybackSession<Metadata = unknown> extends RemediaEventEmi
|
|
|
50
50
|
*/
|
|
51
51
|
resume(): Promise<void>;
|
|
52
52
|
/**
|
|
53
|
-
* Seek on the original media timeline
|
|
53
|
+
* Seek on the original media timeline. Binary Readable inputs support forward-only
|
|
54
|
+
* seeking by decoding and discarding skipped audio; backwards seeking rejects.
|
|
55
|
+
* Large forward jumps may wait for the producer to supply the skipped bytes.
|
|
54
56
|
* @param positionMs - Non-negative finite position on the original media timeline, in milliseconds.
|
|
55
57
|
* @returns Resolves after the backend accepts the seek; rejects for invalid positions or unsupported inputs.
|
|
56
58
|
*/
|
package/dist/playback.js
CHANGED
|
@@ -222,7 +222,9 @@ export class PlaybackSession extends RemediaEventEmitter {
|
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
224
|
/**
|
|
225
|
-
* Seek on the original media timeline
|
|
225
|
+
* Seek on the original media timeline. Binary Readable inputs support forward-only
|
|
226
|
+
* seeking by decoding and discarding skipped audio; backwards seeking rejects.
|
|
227
|
+
* Large forward jumps may wait for the producer to supply the skipped bytes.
|
|
226
228
|
* @param positionMs - Non-negative finite position on the original media timeline, in milliseconds.
|
|
227
229
|
* @returns Resolves after the backend accepts the seek; rejects for invalid positions or unsupported inputs.
|
|
228
230
|
*/
|
package/dist/remedia.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { type MediaSource } from './input.js';
|
|
2
|
+
import { type AudioStreamInfo } from './types.js';
|
|
1
3
|
import { RemediaEventEmitter } from './events.js';
|
|
2
4
|
import { DiscordSession, type DiscordSessionOptions } from './discord.js';
|
|
3
5
|
import { type DiscordGatewaySend } from './gateway.js';
|
|
@@ -9,6 +11,13 @@ export interface RemediaOptions {
|
|
|
9
11
|
/** Send raw Gateway payloads through the application's existing Discord client or shard. */
|
|
10
12
|
send: DiscordGatewaySend;
|
|
11
13
|
}
|
|
14
|
+
/** Cancellation and deadline for disposable metadata inspection. */
|
|
15
|
+
export interface ProbeOptions {
|
|
16
|
+
/** Cancels input I/O and releases probe resources; never destroys caller-owned Readables. */
|
|
17
|
+
signal?: AbortSignal;
|
|
18
|
+
/** Total deadline in milliseconds, from 1 through 4294967295; defaults to 15000. */
|
|
19
|
+
timeoutMs?: number;
|
|
20
|
+
}
|
|
12
21
|
/**
|
|
13
22
|
* One embedded Remedia context. Create instances with `await Remedia.create()` so native
|
|
14
23
|
* observability and optional asynchronous OpenTelemetry exporters initialize on NAPI-RS's runtime.
|
|
@@ -22,6 +31,13 @@ export declare class Remedia extends RemediaEventEmitter<RemediaLifecycleEvents>
|
|
|
22
31
|
* @returns An initialized independent native engine context.
|
|
23
32
|
*/
|
|
24
33
|
static create(options?: RemediaOptions): Promise<Remedia>;
|
|
34
|
+
/**
|
|
35
|
+
* Inspect a disposable source without creating playback or voice resources. Readables may be partially or fully consumed.
|
|
36
|
+
* @param source - Encoded input; acquire a fresh source for subsequent playback.
|
|
37
|
+
* @param options - Cancellation and total deadline; defaults to 15000 ms.
|
|
38
|
+
* @returns Available stream metadata, with unknown numeric fields null; rejects invalid media, cancellation, timeout, or capacity exhaustion.
|
|
39
|
+
*/
|
|
40
|
+
probe(source: MediaSource, options?: ProbeOptions): Promise<AudioStreamInfo>;
|
|
25
41
|
/** Number of diagnostic events dropped by either bounded event queue. */
|
|
26
42
|
get droppedDebugEvents(): number;
|
|
27
43
|
/**
|
package/dist/remedia.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { createReadableInput, toNativeSource } from './input.js';
|
|
2
|
+
import { toStreamInfo } from './types.js';
|
|
1
3
|
import { RemediaEventEmitter } from './events.js';
|
|
2
4
|
import { NativeRemedia } from '../native.js';
|
|
3
5
|
import { DiscordSession } from './discord.js';
|
|
@@ -11,6 +13,7 @@ import { toDiagnosticEvent } from './types.js';
|
|
|
11
13
|
*/
|
|
12
14
|
export class Remedia extends RemediaEventEmitter {
|
|
13
15
|
#native;
|
|
16
|
+
#probes = new Set();
|
|
14
17
|
#sessions = new Set();
|
|
15
18
|
#discordSessions = new Map();
|
|
16
19
|
#gateway;
|
|
@@ -32,6 +35,47 @@ export class Remedia extends RemediaEventEmitter {
|
|
|
32
35
|
static async create(options) {
|
|
33
36
|
return new Remedia(await NativeRemedia.create(), options);
|
|
34
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* Inspect a disposable source without creating playback or voice resources. Readables may be partially or fully consumed.
|
|
40
|
+
* @param source - Encoded input; acquire a fresh source for subsequent playback.
|
|
41
|
+
* @param options - Cancellation and total deadline; defaults to 15000 ms.
|
|
42
|
+
* @returns Available stream metadata, with unknown numeric fields null; rejects invalid media, cancellation, timeout, or capacity exhaustion.
|
|
43
|
+
*/
|
|
44
|
+
async probe(source, options = {}) {
|
|
45
|
+
this.#assertOpen();
|
|
46
|
+
const timeoutMs = options.timeoutMs ?? 15_000;
|
|
47
|
+
if (!Number.isInteger(timeoutMs) || timeoutMs < 1 || timeoutMs > 0xffffffff)
|
|
48
|
+
throw new RangeError('invalid probe timeoutMs');
|
|
49
|
+
options.signal?.throwIfAborted();
|
|
50
|
+
const id = this.#native.createProbe();
|
|
51
|
+
const controller = new AbortController();
|
|
52
|
+
this.#probes.add(controller);
|
|
53
|
+
const abort = () => {
|
|
54
|
+
controller.abort();
|
|
55
|
+
this.#native.cancelProbe(id);
|
|
56
|
+
};
|
|
57
|
+
options.signal?.addEventListener('abort', abort, { once: true });
|
|
58
|
+
controller.signal.addEventListener('abort', () => this.#native.cancelProbe(id), { once: true });
|
|
59
|
+
let input;
|
|
60
|
+
try {
|
|
61
|
+
const nativeSource = 'stream' in source
|
|
62
|
+
? (input = createReadableInput(this.#native, source.stream)).source
|
|
63
|
+
: toNativeSource(source);
|
|
64
|
+
const info = await this.#native.probe(id, nativeSource, timeoutMs);
|
|
65
|
+
controller.signal.throwIfAborted();
|
|
66
|
+
return toStreamInfo(info);
|
|
67
|
+
}
|
|
68
|
+
catch (error) {
|
|
69
|
+
controller.signal.throwIfAborted();
|
|
70
|
+
throw error;
|
|
71
|
+
}
|
|
72
|
+
finally {
|
|
73
|
+
options.signal?.removeEventListener('abort', abort);
|
|
74
|
+
this.#native.cancelProbe(id);
|
|
75
|
+
await input?.cancel();
|
|
76
|
+
this.#probes.delete(controller);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
35
79
|
/** Number of diagnostic events dropped by either bounded event queue. */
|
|
36
80
|
get droppedDebugEvents() {
|
|
37
81
|
return this.#native.droppedDebugEvents;
|
|
@@ -95,6 +139,8 @@ export class Remedia extends RemediaEventEmitter {
|
|
|
95
139
|
if (this.#closed)
|
|
96
140
|
return;
|
|
97
141
|
this.#closed = true;
|
|
142
|
+
for (const controller of this.#probes)
|
|
143
|
+
controller.abort();
|
|
98
144
|
const voiceCleanup = await Promise.allSettled([...this.#discordSessions.values()].map((session) => session.dispose()));
|
|
99
145
|
try {
|
|
100
146
|
await Promise.all([...this.#sessions].map((session) => session.dispose()));
|
package/native.d.ts
CHANGED
|
@@ -102,6 +102,24 @@ export declare class NativeRemedia {
|
|
|
102
102
|
playbackError(playbackId: string): string | null
|
|
103
103
|
/** Stop and forget a standalone playback session. Voice sessions remain connected. */
|
|
104
104
|
disposePlaybackSession(playbackId: string): Promise<void>
|
|
105
|
+
/**
|
|
106
|
+
* Register a cancellable probe; at most eight operations may be outstanding.
|
|
107
|
+
* @returns A disposable native operation identifier; rejects if closed or at capacity.
|
|
108
|
+
*/
|
|
109
|
+
createProbe(): string
|
|
110
|
+
/**
|
|
111
|
+
* Cancel and release a disposable probe handle. Repeated calls are harmless.
|
|
112
|
+
* @param id - Operation identifier returned by createProbe.
|
|
113
|
+
*/
|
|
114
|
+
cancelProbe(id: string): void
|
|
115
|
+
/**
|
|
116
|
+
* Inspect encoded input asynchronously without creating playback resources.
|
|
117
|
+
* @param id - Disposable operation identifier returned by createProbe.
|
|
118
|
+
* @param source - Encoded file, URL, owned bytes or bounded byte-stream handle.
|
|
119
|
+
* @param timeoutMs - Positive total deadline in milliseconds.
|
|
120
|
+
* @returns Available metadata; rejects invalid media, timeout, cancellation or capacity exhaustion.
|
|
121
|
+
*/
|
|
122
|
+
probe(id: string, source: NativeMediaSource, timeoutMs: number): Promise<NativeStreamInfo>
|
|
105
123
|
}
|
|
106
124
|
|
|
107
125
|
export interface NativeDiagnosticEvent {
|
package/native.js
CHANGED
|
@@ -97,8 +97,8 @@ function requireNative() {
|
|
|
97
97
|
try {
|
|
98
98
|
const binding = require('@remedia/node-android-arm64')
|
|
99
99
|
const bindingPackageVersion = require('@remedia/node-android-arm64/package.json').version
|
|
100
|
-
if (bindingPackageVersion !== '0.1.0-dev.
|
|
101
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.
|
|
100
|
+
if (bindingPackageVersion !== '0.1.0-dev.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
101
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
102
102
|
}
|
|
103
103
|
return binding
|
|
104
104
|
} catch (e) {
|
|
@@ -113,8 +113,8 @@ function requireNative() {
|
|
|
113
113
|
try {
|
|
114
114
|
const binding = require('@remedia/node-android-arm-eabi')
|
|
115
115
|
const bindingPackageVersion = require('@remedia/node-android-arm-eabi/package.json').version
|
|
116
|
-
if (bindingPackageVersion !== '0.1.0-dev.
|
|
117
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.
|
|
116
|
+
if (bindingPackageVersion !== '0.1.0-dev.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
117
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
118
118
|
}
|
|
119
119
|
return binding
|
|
120
120
|
} catch (e) {
|
|
@@ -134,8 +134,8 @@ function requireNative() {
|
|
|
134
134
|
try {
|
|
135
135
|
const binding = require('@remedia/node-win32-x64-gnu')
|
|
136
136
|
const bindingPackageVersion = require('@remedia/node-win32-x64-gnu/package.json').version
|
|
137
|
-
if (bindingPackageVersion !== '0.1.0-dev.
|
|
138
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.
|
|
137
|
+
if (bindingPackageVersion !== '0.1.0-dev.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
138
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
139
139
|
}
|
|
140
140
|
return binding
|
|
141
141
|
} catch (e) {
|
|
@@ -150,8 +150,8 @@ function requireNative() {
|
|
|
150
150
|
try {
|
|
151
151
|
const binding = require('@remedia/node-win32-x64-msvc')
|
|
152
152
|
const bindingPackageVersion = require('@remedia/node-win32-x64-msvc/package.json').version
|
|
153
|
-
if (bindingPackageVersion !== '0.1.0-dev.
|
|
154
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.
|
|
153
|
+
if (bindingPackageVersion !== '0.1.0-dev.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
154
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
155
155
|
}
|
|
156
156
|
return binding
|
|
157
157
|
} catch (e) {
|
|
@@ -167,8 +167,8 @@ function requireNative() {
|
|
|
167
167
|
try {
|
|
168
168
|
const binding = require('@remedia/node-win32-ia32-msvc')
|
|
169
169
|
const bindingPackageVersion = require('@remedia/node-win32-ia32-msvc/package.json').version
|
|
170
|
-
if (bindingPackageVersion !== '0.1.0-dev.
|
|
171
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.
|
|
170
|
+
if (bindingPackageVersion !== '0.1.0-dev.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
171
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
172
172
|
}
|
|
173
173
|
return binding
|
|
174
174
|
} catch (e) {
|
|
@@ -183,8 +183,8 @@ function requireNative() {
|
|
|
183
183
|
try {
|
|
184
184
|
const binding = require('@remedia/node-win32-arm64-msvc')
|
|
185
185
|
const bindingPackageVersion = require('@remedia/node-win32-arm64-msvc/package.json').version
|
|
186
|
-
if (bindingPackageVersion !== '0.1.0-dev.
|
|
187
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.
|
|
186
|
+
if (bindingPackageVersion !== '0.1.0-dev.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
187
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
188
188
|
}
|
|
189
189
|
return binding
|
|
190
190
|
} catch (e) {
|
|
@@ -202,8 +202,8 @@ function requireNative() {
|
|
|
202
202
|
try {
|
|
203
203
|
const binding = require('@remedia/node-darwin-universal')
|
|
204
204
|
const bindingPackageVersion = require('@remedia/node-darwin-universal/package.json').version
|
|
205
|
-
if (bindingPackageVersion !== '0.1.0-dev.
|
|
206
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.
|
|
205
|
+
if (bindingPackageVersion !== '0.1.0-dev.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
206
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
207
207
|
}
|
|
208
208
|
return binding
|
|
209
209
|
} catch (e) {
|
|
@@ -218,8 +218,8 @@ function requireNative() {
|
|
|
218
218
|
try {
|
|
219
219
|
const binding = require('@remedia/node-darwin-x64')
|
|
220
220
|
const bindingPackageVersion = require('@remedia/node-darwin-x64/package.json').version
|
|
221
|
-
if (bindingPackageVersion !== '0.1.0-dev.
|
|
222
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.
|
|
221
|
+
if (bindingPackageVersion !== '0.1.0-dev.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
222
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
223
223
|
}
|
|
224
224
|
return binding
|
|
225
225
|
} catch (e) {
|
|
@@ -234,8 +234,8 @@ function requireNative() {
|
|
|
234
234
|
try {
|
|
235
235
|
const binding = require('@remedia/node-darwin-arm64')
|
|
236
236
|
const bindingPackageVersion = require('@remedia/node-darwin-arm64/package.json').version
|
|
237
|
-
if (bindingPackageVersion !== '0.1.0-dev.
|
|
238
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.
|
|
237
|
+
if (bindingPackageVersion !== '0.1.0-dev.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
238
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
239
239
|
}
|
|
240
240
|
return binding
|
|
241
241
|
} catch (e) {
|
|
@@ -254,8 +254,8 @@ function requireNative() {
|
|
|
254
254
|
try {
|
|
255
255
|
const binding = require('@remedia/node-freebsd-x64')
|
|
256
256
|
const bindingPackageVersion = require('@remedia/node-freebsd-x64/package.json').version
|
|
257
|
-
if (bindingPackageVersion !== '0.1.0-dev.
|
|
258
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.
|
|
257
|
+
if (bindingPackageVersion !== '0.1.0-dev.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
258
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
259
259
|
}
|
|
260
260
|
return binding
|
|
261
261
|
} catch (e) {
|
|
@@ -270,8 +270,8 @@ function requireNative() {
|
|
|
270
270
|
try {
|
|
271
271
|
const binding = require('@remedia/node-freebsd-arm64')
|
|
272
272
|
const bindingPackageVersion = require('@remedia/node-freebsd-arm64/package.json').version
|
|
273
|
-
if (bindingPackageVersion !== '0.1.0-dev.
|
|
274
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.
|
|
273
|
+
if (bindingPackageVersion !== '0.1.0-dev.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
274
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
275
275
|
}
|
|
276
276
|
return binding
|
|
277
277
|
} catch (e) {
|
|
@@ -286,8 +286,8 @@ function requireNative() {
|
|
|
286
286
|
try {
|
|
287
287
|
const binding = require('@remedia/node-freebsd-ppc64')
|
|
288
288
|
const bindingPackageVersion = require('@remedia/node-freebsd-ppc64/package.json').version
|
|
289
|
-
if (bindingPackageVersion !== '0.1.0-dev.
|
|
290
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.
|
|
289
|
+
if (bindingPackageVersion !== '0.1.0-dev.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
290
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
291
291
|
}
|
|
292
292
|
return binding
|
|
293
293
|
} catch (e) {
|
|
@@ -307,8 +307,8 @@ function requireNative() {
|
|
|
307
307
|
try {
|
|
308
308
|
const binding = require('@remedia/node-linux-x64-musl')
|
|
309
309
|
const bindingPackageVersion = require('@remedia/node-linux-x64-musl/package.json').version
|
|
310
|
-
if (bindingPackageVersion !== '0.1.0-dev.
|
|
311
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.
|
|
310
|
+
if (bindingPackageVersion !== '0.1.0-dev.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
311
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
312
312
|
}
|
|
313
313
|
return binding
|
|
314
314
|
} catch (e) {
|
|
@@ -323,8 +323,8 @@ function requireNative() {
|
|
|
323
323
|
try {
|
|
324
324
|
const binding = require('@remedia/node-linux-x64-gnu')
|
|
325
325
|
const bindingPackageVersion = require('@remedia/node-linux-x64-gnu/package.json').version
|
|
326
|
-
if (bindingPackageVersion !== '0.1.0-dev.
|
|
327
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.
|
|
326
|
+
if (bindingPackageVersion !== '0.1.0-dev.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
327
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
328
328
|
}
|
|
329
329
|
return binding
|
|
330
330
|
} catch (e) {
|
|
@@ -341,8 +341,8 @@ function requireNative() {
|
|
|
341
341
|
try {
|
|
342
342
|
const binding = require('@remedia/node-linux-arm64-musl')
|
|
343
343
|
const bindingPackageVersion = require('@remedia/node-linux-arm64-musl/package.json').version
|
|
344
|
-
if (bindingPackageVersion !== '0.1.0-dev.
|
|
345
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.
|
|
344
|
+
if (bindingPackageVersion !== '0.1.0-dev.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
345
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
346
346
|
}
|
|
347
347
|
return binding
|
|
348
348
|
} catch (e) {
|
|
@@ -357,8 +357,8 @@ function requireNative() {
|
|
|
357
357
|
try {
|
|
358
358
|
const binding = require('@remedia/node-linux-arm64-gnu')
|
|
359
359
|
const bindingPackageVersion = require('@remedia/node-linux-arm64-gnu/package.json').version
|
|
360
|
-
if (bindingPackageVersion !== '0.1.0-dev.
|
|
361
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.
|
|
360
|
+
if (bindingPackageVersion !== '0.1.0-dev.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
361
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
362
362
|
}
|
|
363
363
|
return binding
|
|
364
364
|
} catch (e) {
|
|
@@ -375,8 +375,8 @@ function requireNative() {
|
|
|
375
375
|
try {
|
|
376
376
|
const binding = require('@remedia/node-linux-arm-musleabihf')
|
|
377
377
|
const bindingPackageVersion = require('@remedia/node-linux-arm-musleabihf/package.json').version
|
|
378
|
-
if (bindingPackageVersion !== '0.1.0-dev.
|
|
379
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.
|
|
378
|
+
if (bindingPackageVersion !== '0.1.0-dev.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
379
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
380
380
|
}
|
|
381
381
|
return binding
|
|
382
382
|
} catch (e) {
|
|
@@ -391,8 +391,8 @@ function requireNative() {
|
|
|
391
391
|
try {
|
|
392
392
|
const binding = require('@remedia/node-linux-arm-gnueabihf')
|
|
393
393
|
const bindingPackageVersion = require('@remedia/node-linux-arm-gnueabihf/package.json').version
|
|
394
|
-
if (bindingPackageVersion !== '0.1.0-dev.
|
|
395
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.
|
|
394
|
+
if (bindingPackageVersion !== '0.1.0-dev.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
395
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
396
396
|
}
|
|
397
397
|
return binding
|
|
398
398
|
} catch (e) {
|
|
@@ -409,8 +409,8 @@ function requireNative() {
|
|
|
409
409
|
try {
|
|
410
410
|
const binding = require('@remedia/node-linux-loong64-musl')
|
|
411
411
|
const bindingPackageVersion = require('@remedia/node-linux-loong64-musl/package.json').version
|
|
412
|
-
if (bindingPackageVersion !== '0.1.0-dev.
|
|
413
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.
|
|
412
|
+
if (bindingPackageVersion !== '0.1.0-dev.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
413
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
414
414
|
}
|
|
415
415
|
return binding
|
|
416
416
|
} catch (e) {
|
|
@@ -425,8 +425,8 @@ function requireNative() {
|
|
|
425
425
|
try {
|
|
426
426
|
const binding = require('@remedia/node-linux-loong64-gnu')
|
|
427
427
|
const bindingPackageVersion = require('@remedia/node-linux-loong64-gnu/package.json').version
|
|
428
|
-
if (bindingPackageVersion !== '0.1.0-dev.
|
|
429
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.
|
|
428
|
+
if (bindingPackageVersion !== '0.1.0-dev.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
429
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
430
430
|
}
|
|
431
431
|
return binding
|
|
432
432
|
} catch (e) {
|
|
@@ -443,8 +443,8 @@ function requireNative() {
|
|
|
443
443
|
try {
|
|
444
444
|
const binding = require('@remedia/node-linux-riscv64-musl')
|
|
445
445
|
const bindingPackageVersion = require('@remedia/node-linux-riscv64-musl/package.json').version
|
|
446
|
-
if (bindingPackageVersion !== '0.1.0-dev.
|
|
447
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.
|
|
446
|
+
if (bindingPackageVersion !== '0.1.0-dev.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
447
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
448
448
|
}
|
|
449
449
|
return binding
|
|
450
450
|
} catch (e) {
|
|
@@ -459,8 +459,8 @@ function requireNative() {
|
|
|
459
459
|
try {
|
|
460
460
|
const binding = require('@remedia/node-linux-riscv64-gnu')
|
|
461
461
|
const bindingPackageVersion = require('@remedia/node-linux-riscv64-gnu/package.json').version
|
|
462
|
-
if (bindingPackageVersion !== '0.1.0-dev.
|
|
463
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.
|
|
462
|
+
if (bindingPackageVersion !== '0.1.0-dev.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
463
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
464
464
|
}
|
|
465
465
|
return binding
|
|
466
466
|
} catch (e) {
|
|
@@ -476,8 +476,8 @@ function requireNative() {
|
|
|
476
476
|
try {
|
|
477
477
|
const binding = require('@remedia/node-linux-ppc64-gnu')
|
|
478
478
|
const bindingPackageVersion = require('@remedia/node-linux-ppc64-gnu/package.json').version
|
|
479
|
-
if (bindingPackageVersion !== '0.1.0-dev.
|
|
480
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.
|
|
479
|
+
if (bindingPackageVersion !== '0.1.0-dev.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
480
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
481
481
|
}
|
|
482
482
|
return binding
|
|
483
483
|
} catch (e) {
|
|
@@ -492,8 +492,8 @@ function requireNative() {
|
|
|
492
492
|
try {
|
|
493
493
|
const binding = require('@remedia/node-linux-s390x-gnu')
|
|
494
494
|
const bindingPackageVersion = require('@remedia/node-linux-s390x-gnu/package.json').version
|
|
495
|
-
if (bindingPackageVersion !== '0.1.0-dev.
|
|
496
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.
|
|
495
|
+
if (bindingPackageVersion !== '0.1.0-dev.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
496
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
497
497
|
}
|
|
498
498
|
return binding
|
|
499
499
|
} catch (e) {
|
|
@@ -512,8 +512,8 @@ function requireNative() {
|
|
|
512
512
|
try {
|
|
513
513
|
const binding = require('@remedia/node-openharmony-arm64')
|
|
514
514
|
const bindingPackageVersion = require('@remedia/node-openharmony-arm64/package.json').version
|
|
515
|
-
if (bindingPackageVersion !== '0.1.0-dev.
|
|
516
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.
|
|
515
|
+
if (bindingPackageVersion !== '0.1.0-dev.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
516
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
517
517
|
}
|
|
518
518
|
return binding
|
|
519
519
|
} catch (e) {
|
|
@@ -528,8 +528,8 @@ function requireNative() {
|
|
|
528
528
|
try {
|
|
529
529
|
const binding = require('@remedia/node-openharmony-x64')
|
|
530
530
|
const bindingPackageVersion = require('@remedia/node-openharmony-x64/package.json').version
|
|
531
|
-
if (bindingPackageVersion !== '0.1.0-dev.
|
|
532
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.
|
|
531
|
+
if (bindingPackageVersion !== '0.1.0-dev.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
532
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
533
533
|
}
|
|
534
534
|
return binding
|
|
535
535
|
} catch (e) {
|
|
@@ -544,8 +544,8 @@ function requireNative() {
|
|
|
544
544
|
try {
|
|
545
545
|
const binding = require('@remedia/node-openharmony-arm')
|
|
546
546
|
const bindingPackageVersion = require('@remedia/node-openharmony-arm/package.json').version
|
|
547
|
-
if (bindingPackageVersion !== '0.1.0-dev.
|
|
548
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.
|
|
547
|
+
if (bindingPackageVersion !== '0.1.0-dev.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
548
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0-dev.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
549
549
|
}
|
|
550
550
|
return binding
|
|
551
551
|
} catch (e) {
|
|
@@ -686,8 +686,8 @@ if (!nativeBinding || forceWasi) {
|
|
|
686
686
|
if (!candidateFailed) {
|
|
687
687
|
if (process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
688
688
|
const bindingPackageVersion = require('@remedia/node-wasm32-wasi/package.json').version
|
|
689
|
-
if (bindingPackageVersion !== '0.1.0-dev.
|
|
690
|
-
throw new Error(`WASI binding package version mismatch, expected 0.1.0-dev.
|
|
689
|
+
if (bindingPackageVersion !== '0.1.0-dev.3') {
|
|
690
|
+
throw new Error(`WASI binding package version mismatch, expected 0.1.0-dev.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
691
691
|
}
|
|
692
692
|
}
|
|
693
693
|
wasiBinding = require('@remedia/node-wasm32-wasi')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remedia/node",
|
|
3
|
-
"version": "0.1.0-dev.
|
|
3
|
+
"version": "0.1.0-dev.3",
|
|
4
4
|
"description": "Native Node.js playback and Discord voice bindings for Remedia",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Twilight <hello@twlite.dev>",
|
|
@@ -61,19 +61,19 @@
|
|
|
61
61
|
},
|
|
62
62
|
"private": false,
|
|
63
63
|
"optionalDependencies": {
|
|
64
|
-
"@remedia/node-linux-x64-gnu": "0.1.0-dev.
|
|
65
|
-
"@remedia/node-linux-arm64-gnu": "0.1.0-dev.
|
|
66
|
-
"@remedia/node-darwin-x64": "0.1.0-dev.
|
|
67
|
-
"@remedia/node-darwin-arm64": "0.1.0-dev.
|
|
68
|
-
"@remedia/node-win32-x64-msvc": "0.1.0-dev.
|
|
69
|
-
"@remedia/node-linux-x64-musl": "0.1.0-dev.
|
|
70
|
-
"@remedia/node-linux-arm64-musl": "0.1.0-dev.
|
|
71
|
-
"@remedia/node-linux-arm-gnueabihf": "0.1.0-dev.
|
|
72
|
-
"@remedia/node-win32-ia32-msvc": "0.1.0-dev.
|
|
73
|
-
"@remedia/node-win32-arm64-msvc": "0.1.0-dev.
|
|
74
|
-
"@remedia/node-android-arm64": "0.1.0-dev.
|
|
75
|
-
"@remedia/node-android-arm-eabi": "0.1.0-dev.
|
|
76
|
-
"@remedia/node-freebsd-x64": "0.1.0-dev.
|
|
64
|
+
"@remedia/node-linux-x64-gnu": "0.1.0-dev.3",
|
|
65
|
+
"@remedia/node-linux-arm64-gnu": "0.1.0-dev.3",
|
|
66
|
+
"@remedia/node-darwin-x64": "0.1.0-dev.3",
|
|
67
|
+
"@remedia/node-darwin-arm64": "0.1.0-dev.3",
|
|
68
|
+
"@remedia/node-win32-x64-msvc": "0.1.0-dev.3",
|
|
69
|
+
"@remedia/node-linux-x64-musl": "0.1.0-dev.3",
|
|
70
|
+
"@remedia/node-linux-arm64-musl": "0.1.0-dev.3",
|
|
71
|
+
"@remedia/node-linux-arm-gnueabihf": "0.1.0-dev.3",
|
|
72
|
+
"@remedia/node-win32-ia32-msvc": "0.1.0-dev.3",
|
|
73
|
+
"@remedia/node-win32-arm64-msvc": "0.1.0-dev.3",
|
|
74
|
+
"@remedia/node-android-arm64": "0.1.0-dev.3",
|
|
75
|
+
"@remedia/node-android-arm-eabi": "0.1.0-dev.3",
|
|
76
|
+
"@remedia/node-freebsd-x64": "0.1.0-dev.3"
|
|
77
77
|
},
|
|
78
78
|
"scripts": {
|
|
79
79
|
"build": "pnpm run build:native && pnpm run build:types",
|