@theagenticguy/microvms 0.1.0-rc.1 → 0.2.0
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/index.d.ts +270 -0
- package/index.js +111 -109
- package/microvms.darwin-arm64.node +0 -0
- package/microvms.linux-arm64-gnu.node +0 -0
- package/microvms.linux-x64-gnu.node +0 -0
- package/microvms.win32-x64-msvc.node +0 -0
- package/package.json +4 -9
package/index.d.ts
CHANGED
|
@@ -173,6 +173,77 @@ export declare class ExecHandle {
|
|
|
173
173
|
waitAndAck(timeout?: number | undefined | null): Promise<ExecResult>
|
|
174
174
|
}
|
|
175
175
|
|
|
176
|
+
/**
|
|
177
|
+
* A long-running exec as the AI SDK's `SandboxProcess` shape.
|
|
178
|
+
*
|
|
179
|
+
* See the module docs. Built by `Session.spawn`, never by a constructor: a process object
|
|
180
|
+
* with no exec behind it is one whose every method fails in a way that looks like a dead VM.
|
|
181
|
+
*/
|
|
182
|
+
export declare class ExecProcess {
|
|
183
|
+
/**
|
|
184
|
+
* The exec id, which is the idempotency key.
|
|
185
|
+
*
|
|
186
|
+
* Read it back to reattach from another process: `session.exec(id)` addresses the same
|
|
187
|
+
* server-side exec, and `session.spawn` with the same id does not start a second child.
|
|
188
|
+
*/
|
|
189
|
+
get execId(): string
|
|
190
|
+
/**
|
|
191
|
+
* The process id, if the sandbox exposes one.
|
|
192
|
+
*
|
|
193
|
+
* **Always `null`**, and that is a true answer rather than a stub. The daemon signals a
|
|
194
|
+
* whole process group and addresses an exec by its caller-minted id; it publishes no pid,
|
|
195
|
+
* because a pid inside a MicroVM is not meaningful outside it and would invite a caller to
|
|
196
|
+
* signal it directly through a channel that does not exist. The harness contract marks
|
|
197
|
+
* `pid` optional for exactly this case.
|
|
198
|
+
*/
|
|
199
|
+
get pid(): number | null
|
|
200
|
+
/**
|
|
201
|
+
* The child's standard output as a stream of bytes.
|
|
202
|
+
*
|
|
203
|
+
* One stream per process: reading this twice hands back the same object, because two
|
|
204
|
+
* readers over one channel would split the bytes between them.
|
|
205
|
+
*/
|
|
206
|
+
get stdout(): ReadableStream<Uint8Array>
|
|
207
|
+
/**
|
|
208
|
+
* The child's standard error as a stream of bytes.
|
|
209
|
+
*
|
|
210
|
+
* Independent of [`Self::stdout`]: order is preserved within each and is not recoverable
|
|
211
|
+
* between them, which is what the wire supports (one shared offset space) and what the
|
|
212
|
+
* harness shape promises.
|
|
213
|
+
*/
|
|
214
|
+
get stderr(): ReadableStream<Uint8Array>
|
|
215
|
+
/**
|
|
216
|
+
* Every byte range the daemon could not replay, under `gapPolicy: 'event'`.
|
|
217
|
+
*
|
|
218
|
+
* Empty under the default policy, where a gap errors the streams instead — see the module
|
|
219
|
+
* docs for why the ignorable form is not the default.
|
|
220
|
+
*/
|
|
221
|
+
get gaps(): Array<OutputGap>
|
|
222
|
+
/**
|
|
223
|
+
* Resolves when the process exits.
|
|
224
|
+
*
|
|
225
|
+
* **From the daemon's exec record, not from the streams ending**, and that is the whole
|
|
226
|
+
* reason a suspend/resume does not look like a clean exit here: a stream that stopped
|
|
227
|
+
* carrying bytes is a stream that stopped, which is the identical observation for a cut
|
|
228
|
+
* connection and a finished command. Only the daemon's record distinguishes them.
|
|
229
|
+
*
|
|
230
|
+
* Rejects with `ERR_TIMEOUT` past `timeoutSeconds` (300 by default). A timeout has not
|
|
231
|
+
* touched the exec — polling is read-only and the output lives until it is acked — so a
|
|
232
|
+
* caller that gives up can call this again.
|
|
233
|
+
*/
|
|
234
|
+
wait(timeoutSeconds?: number | undefined | null): Promise<ProcessExit>
|
|
235
|
+
/**
|
|
236
|
+
* Terminates the process. Idempotent.
|
|
237
|
+
*
|
|
238
|
+
* Signals the whole process group rather than the direct child, so a shell's children go
|
|
239
|
+
* with it. Idempotent because the daemon answers 200 either way: a group that had already
|
|
240
|
+
* been reaped reports nothing signalled, which is the outcome a kill wanted — so a second
|
|
241
|
+
* call is a success and not a 404. That is what lets a harness call this in a `finally`
|
|
242
|
+
* without guarding it.
|
|
243
|
+
*/
|
|
244
|
+
kill(): Promise<void>
|
|
245
|
+
}
|
|
246
|
+
|
|
176
247
|
/**
|
|
177
248
|
* A JS async iterator over an exec's output.
|
|
178
249
|
*
|
|
@@ -516,6 +587,26 @@ export declare class Session {
|
|
|
516
587
|
waitUntilReady(timeout?: number | undefined | null): Promise<Health>
|
|
517
588
|
/** Starts a command and returns its handle. Does not wait. */
|
|
518
589
|
run(command: string | Array<string>, options?: ExecOptions | undefined | null): Promise<ExecHandle>
|
|
590
|
+
/**
|
|
591
|
+
* Starts a command and returns it as two byte streams, a `wait()`, and a `kill()`.
|
|
592
|
+
*
|
|
593
|
+
* The **process** shape, as against [`Self::run`]'s handle shape. Same start request and
|
|
594
|
+
* the same `ExecOptions` (`cwd`, `env`, `user`, `group`, `shell`, `execId`, `timeoutSec`
|
|
595
|
+
* all apply), so this is a different view of one exec rather than a different exec:
|
|
596
|
+
* `spawn` and `run` with the same `execId` address the same server-side child, and the
|
|
597
|
+
* daemon starts one.
|
|
598
|
+
*
|
|
599
|
+
* `stdout` and `stderr` come out as independent `ReadableStream<Uint8Array>`, which is
|
|
600
|
+
* deliberately the AI SDK harness's `SandboxProcess` shape — see [`crate::process`] for
|
|
601
|
+
* what that compatibility is and is not, for how one interleaved SSE channel becomes two
|
|
602
|
+
* streams, and for why an evicted byte range errors the streams by default instead of
|
|
603
|
+
* being reported out-of-band.
|
|
604
|
+
*
|
|
605
|
+
* The reconnect-at-cursor behaviour is unchanged from `stream()`: a stream cut by a
|
|
606
|
+
* suspend/resume rejoins at the byte offset rather than ending, so a suspend does not look
|
|
607
|
+
* like a clean exit.
|
|
608
|
+
*/
|
|
609
|
+
spawn(command: string | Array<string>, options?: SpawnOptions | undefined | null): Promise<ExecProcess>
|
|
519
610
|
/**
|
|
520
611
|
* A handle for an exec started earlier, possibly by another process.
|
|
521
612
|
*
|
|
@@ -546,6 +637,45 @@ export declare class Session {
|
|
|
546
637
|
uploadTar(remote: string, archive: Uint8Array): Promise<void>
|
|
547
638
|
/** The raw tar bytes of a remote tree. */
|
|
548
639
|
downloadTar(remote: string): Promise<Buffer>
|
|
640
|
+
/**
|
|
641
|
+
* Both proxy headers for `port`, so a caller can open its **own** connection.
|
|
642
|
+
*
|
|
643
|
+
* The `{ url, headers }` shape a provider's `getPortEndpoint` answers with: pair these
|
|
644
|
+
* with `endpoint()` and nothing outside this addon has to know how a proxy token is
|
|
645
|
+
* minted or when it refreshes. Minted through the session's existing cache, so calling
|
|
646
|
+
* this does not burn a second control-plane call and does not open a second TRAP-9
|
|
647
|
+
* schedule.
|
|
648
|
+
*
|
|
649
|
+
* A plain `Record<string, string>` rather than a class, and that is the one place this
|
|
650
|
+
* crate's own "never `#[napi(object)]` for anything carrying a closure" rule does not
|
|
651
|
+
* apply: there is no closure here to protect. The value is a **bearer credential**, and
|
|
652
|
+
* unlike the token itself it necessarily comes out as a string — a header a caller has to
|
|
653
|
+
* put on a request cannot be opaque. What is still closed is the other direction: no
|
|
654
|
+
* function in this addon *takes* a header map, so a caller cannot feed a forged or expired
|
|
655
|
+
* one back in.
|
|
656
|
+
*
|
|
657
|
+
* **Empty for a direct session**, which is the true answer rather than a missing one: a
|
|
658
|
+
* daemon reached directly takes no proxy headers, so an empty object is exactly what its
|
|
659
|
+
* requests carry.
|
|
660
|
+
*/
|
|
661
|
+
connectHeaders(port: number): Promise<Record<string, string>>
|
|
662
|
+
/**
|
|
663
|
+
* The three WebSocket subprotocols for `port`, in the order a handshake offers them.
|
|
664
|
+
*
|
|
665
|
+
* `new WebSocket(url, await session.connectSubprotocols(port))` is the whole use. A
|
|
666
|
+
* MicroVM endpoint takes the auth and the target port as `Sec-WebSocket-Protocol` values
|
|
667
|
+
* rather than as headers, because the browser `WebSocket` constructor cannot set a header
|
|
668
|
+
* — and the platform strips all three before forwarding, so a server inside the VM never
|
|
669
|
+
* negotiates them and must not be written to expect them.
|
|
670
|
+
*
|
|
671
|
+
* `null` for a direct session, and deliberately not an empty array: the subprotocol form
|
|
672
|
+
* exists only for a request through the endpoint proxy, so there is nothing for a
|
|
673
|
+
* directly-reached daemon to offer. Answering `["lambda-microvms"]` with no token would
|
|
674
|
+
* open a handshake refused for a reason naming neither the token nor the port.
|
|
675
|
+
*
|
|
676
|
+
* The middle string **contains the credential**. Same rule as `connectHeaders`.
|
|
677
|
+
*/
|
|
678
|
+
connectSubprotocols(port: number): Promise<Array<string> | null>
|
|
549
679
|
/**
|
|
550
680
|
* How many proxy tokens this session has minted, or `null` for a direct session.
|
|
551
681
|
*
|
|
@@ -784,6 +914,29 @@ export interface ExecResult {
|
|
|
784
914
|
ok: boolean
|
|
785
915
|
}
|
|
786
916
|
|
|
917
|
+
/**
|
|
918
|
+
* What to do when the daemon reports evicted output.
|
|
919
|
+
*
|
|
920
|
+
* A string union rather than an enum class, because napi renders `#[napi(string_enum)]` as a
|
|
921
|
+
* TypeScript union of literals — `'error' | 'event'`, which is what a JS caller writes anyway
|
|
922
|
+
* — and there is no closure here to protect (see `lib.rs` on when a class is required
|
|
923
|
+
* instead).
|
|
924
|
+
*/
|
|
925
|
+
export declare const enum GapPolicy {
|
|
926
|
+
/**
|
|
927
|
+
* **The default.** A gap errors both streams, with the lost range in the message. See the
|
|
928
|
+
* module docs for why an error rather than an ignorable event.
|
|
929
|
+
*/
|
|
930
|
+
Error = 'error',
|
|
931
|
+
/**
|
|
932
|
+
* A gap is recorded on [`ExecProcess::gaps`] and both streams stay open.
|
|
933
|
+
*
|
|
934
|
+
* For a caller that wants the surviving bytes more than the completeness guarantee. The
|
|
935
|
+
* consumer is then responsible for reading `gaps`, and nothing forces it to.
|
|
936
|
+
*/
|
|
937
|
+
Event = 'event'
|
|
938
|
+
}
|
|
939
|
+
|
|
787
940
|
/** The daemon's liveness answer. `bootstrapped` is the useful field. */
|
|
788
941
|
export interface Health {
|
|
789
942
|
/** The daemon's own version, distinct from the protocol version. */
|
|
@@ -815,6 +968,21 @@ export interface Health {
|
|
|
815
968
|
* monitor can tell "opted out" from "nothing to do".
|
|
816
969
|
*/
|
|
817
970
|
identityRepaired: boolean
|
|
971
|
+
/**
|
|
972
|
+
* Whether any exec is still running.
|
|
973
|
+
*
|
|
974
|
+
* For an orchestrator *outside* the VM deciding whether to keep it alive. The platform
|
|
975
|
+
* measures idleness by inbound traffic through the endpoint proxy, which terminates
|
|
976
|
+
* outside the guest, so an in-guest keepalive cannot reset the idle timer — polling this
|
|
977
|
+
* from outside is both the traffic and the decision. An exec that exited and is awaiting
|
|
978
|
+
* an ack is not busy.
|
|
979
|
+
*/
|
|
980
|
+
busy: boolean
|
|
981
|
+
/**
|
|
982
|
+
* How many execs are registered, in any phase. `busy: false` with a non-zero count is a
|
|
983
|
+
* VM holding unacked output somebody still has to collect.
|
|
984
|
+
*/
|
|
985
|
+
execs: number
|
|
818
986
|
}
|
|
819
987
|
|
|
820
988
|
/** A built image, and the log group the service created alongside it. */
|
|
@@ -841,6 +1009,25 @@ export interface Image {
|
|
|
841
1009
|
buildLogGroup: string
|
|
842
1010
|
}
|
|
843
1011
|
|
|
1012
|
+
/**
|
|
1013
|
+
* One byte range the daemon could not replay.
|
|
1014
|
+
*
|
|
1015
|
+
* `from` inclusive, `to` exclusive — so `to` is exactly the offset a resume would pass.
|
|
1016
|
+
*/
|
|
1017
|
+
export interface OutputGap {
|
|
1018
|
+
/**
|
|
1019
|
+
* Which stream lost bytes: `"stdout"` or `"stderr"`.
|
|
1020
|
+
*
|
|
1021
|
+
* Read off the *following* output frame rather than from the gap frame, which carries no
|
|
1022
|
+
* discriminator: the wire's offset space is shared, so a gap is a hole in the combined
|
|
1023
|
+
* stream and the daemon cannot say which side's bytes were in it. `null` when the gap was
|
|
1024
|
+
* the last thing on the stream and nothing followed it to attribute it to.
|
|
1025
|
+
*/
|
|
1026
|
+
stream?: string
|
|
1027
|
+
from: number
|
|
1028
|
+
to: number
|
|
1029
|
+
}
|
|
1030
|
+
|
|
844
1031
|
/**
|
|
845
1032
|
* A plan's phases, in plain seconds, before anything is spent.
|
|
846
1033
|
*
|
|
@@ -859,10 +1046,46 @@ export interface PlanUsageOptions {
|
|
|
859
1046
|
label?: string
|
|
860
1047
|
}
|
|
861
1048
|
|
|
1049
|
+
/**
|
|
1050
|
+
* What `wait()` resolves to.
|
|
1051
|
+
*
|
|
1052
|
+
* `exitCode` and nothing else on purpose, matching the harness contract's
|
|
1053
|
+
* `wait(): PromiseLike<{ exitCode: number }>`. A caller wanting the signal, the truncation
|
|
1054
|
+
* flag, or the buffered output polls [`crate::exec::ExecHandle`] instead, which answers with
|
|
1055
|
+
* the whole record.
|
|
1056
|
+
*/
|
|
1057
|
+
export interface ProcessExit {
|
|
1058
|
+
/**
|
|
1059
|
+
* The child's exit status.
|
|
1060
|
+
*
|
|
1061
|
+
* **`null` when the child died to a signal**, which is where this shape and the harness's
|
|
1062
|
+
* `{ exitCode: number }` genuinely differ, and it is deliberate. A signal death has no
|
|
1063
|
+
* exit code, and the two available lies are `0` (a killed build reported as passing) and
|
|
1064
|
+
* `128 + signo` (a number the daemon never published, indistinguishable from a child that
|
|
1065
|
+
* really exited with it). A wrapper that must produce a number can pick one at its own
|
|
1066
|
+
* boundary; this handle will not pick for it.
|
|
1067
|
+
*/
|
|
1068
|
+
exitCode?: number
|
|
1069
|
+
/**
|
|
1070
|
+
* The signal that killed the child, when one did. Not part of the harness shape; here
|
|
1071
|
+
* because it is the only thing that makes a `null` exit code actionable.
|
|
1072
|
+
*/
|
|
1073
|
+
signal?: number
|
|
1074
|
+
}
|
|
1075
|
+
|
|
862
1076
|
/** Everything a launch needs. */
|
|
863
1077
|
export interface RunOptions {
|
|
864
1078
|
/** The image to launch, or omitted for the one `buildImage` built. */
|
|
865
1079
|
imageIdentifier?: string
|
|
1080
|
+
/**
|
|
1081
|
+
* `imageVersion`, or omitted for the image's own latest active version.
|
|
1082
|
+
*
|
|
1083
|
+
* Pinning is what makes a canary launch against the version it means to test rather than
|
|
1084
|
+
* against whatever became latest while it was starting, and it is the half of a rollback
|
|
1085
|
+
* that re-points at the known-good build. A version the control plane has set INACTIVE
|
|
1086
|
+
* refuses to launch when named here.
|
|
1087
|
+
*/
|
|
1088
|
+
imageVersion?: string
|
|
866
1089
|
/** The execution role. Optional in the model; every real launch needs one. */
|
|
867
1090
|
executionRoleArn?: string
|
|
868
1091
|
/**
|
|
@@ -874,6 +1097,15 @@ export interface RunOptions {
|
|
|
874
1097
|
* shared image snapshot.
|
|
875
1098
|
*/
|
|
876
1099
|
agentToken?: string
|
|
1100
|
+
/**
|
|
1101
|
+
* Base environment for every exec in the launched VM, delivered in the same
|
|
1102
|
+
* `runHookPayload` as the token.
|
|
1103
|
+
*
|
|
1104
|
+
* Applied *under* each exec's own `env`, so a per-exec value wins on a shared key.
|
|
1105
|
+
* Shares the token's 4096-byte payload budget; the core refuses an over-ceiling
|
|
1106
|
+
* payload before the launch, naming the byte count.
|
|
1107
|
+
*/
|
|
1108
|
+
launchEnv?: Record<string, string>
|
|
877
1109
|
/** Whether to request the egress connector. Off means no outbound network. */
|
|
878
1110
|
egress?: boolean
|
|
879
1111
|
maxIdleSec?: number
|
|
@@ -945,6 +1177,44 @@ export interface RunUsageOptions {
|
|
|
945
1177
|
*/
|
|
946
1178
|
export declare function sessionConstants(): string
|
|
947
1179
|
|
|
1180
|
+
/**
|
|
1181
|
+
* How a `spawn` should behave: the exec's own options, plus the stream's.
|
|
1182
|
+
*
|
|
1183
|
+
* Nested rather than flattened onto [`ExecOptions`], and the reason is that the two sets are
|
|
1184
|
+
* answered by different people. `cwd`/`env`/`user` describe the *child* and are what a caller
|
|
1185
|
+
* composing a command supplies; `offset`/`reconnect`/`gapPolicy` describe how this client
|
|
1186
|
+
* reads the child's output and are what a caller composing a *resume* supplies. Flattening
|
|
1187
|
+
* them would put `maxReconnects` next to `user` in one bag, which is where a caller reaches
|
|
1188
|
+
* for the wrong one.
|
|
1189
|
+
*/
|
|
1190
|
+
export interface SpawnOptions {
|
|
1191
|
+
/**
|
|
1192
|
+
* How to start the child. Identical to `run`'s options, deliberately: `spawn` is a
|
|
1193
|
+
* different view of one exec rather than a different exec.
|
|
1194
|
+
*/
|
|
1195
|
+
exec?: ExecOptions
|
|
1196
|
+
/**
|
|
1197
|
+
* The byte to start reading at. Non-zero resumes output a previous process was reading —
|
|
1198
|
+
* which, with a stable `exec.execId`, is how a spawned process survives *this* process
|
|
1199
|
+
* restarting.
|
|
1200
|
+
*/
|
|
1201
|
+
offset?: number
|
|
1202
|
+
/**
|
|
1203
|
+
* Whether to reconnect after a cut. Defaults to true, and turning it off is what makes a
|
|
1204
|
+
* suspend/resume look like a stream that ended.
|
|
1205
|
+
*/
|
|
1206
|
+
reconnect?: boolean
|
|
1207
|
+
/** How many reconnects before the streams error. A bound rather than forever. */
|
|
1208
|
+
maxReconnects?: number
|
|
1209
|
+
/** How long the body may be silent before the connection is treated as dead, in seconds. */
|
|
1210
|
+
idleTimeout?: number
|
|
1211
|
+
/**
|
|
1212
|
+
* What to do when the daemon reports evicted output. Defaults to `'error'`; see
|
|
1213
|
+
* [`crate::process`] for why.
|
|
1214
|
+
*/
|
|
1215
|
+
gapPolicy?: GapPolicy
|
|
1216
|
+
}
|
|
1217
|
+
|
|
948
1218
|
/** What a stdin write accomplished. */
|
|
949
1219
|
export interface StdinAck {
|
|
950
1220
|
execId: string
|
package/index.js
CHANGED
|
@@ -75,10 +75,10 @@ function requireNative() {
|
|
|
75
75
|
loadErrors.push(e)
|
|
76
76
|
}
|
|
77
77
|
try {
|
|
78
|
-
const binding = require('microvms-android-arm64')
|
|
79
|
-
const bindingPackageVersion = require('microvms-android-arm64/package.json').version
|
|
80
|
-
if (bindingPackageVersion !== '0.
|
|
81
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
78
|
+
const binding = require('@theagenticguy/microvms-android-arm64')
|
|
79
|
+
const bindingPackageVersion = require('@theagenticguy/microvms-android-arm64/package.json').version
|
|
80
|
+
if (bindingPackageVersion !== '0.2.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
81
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
82
82
|
}
|
|
83
83
|
return binding
|
|
84
84
|
} catch (e) {
|
|
@@ -91,10 +91,10 @@ function requireNative() {
|
|
|
91
91
|
loadErrors.push(e)
|
|
92
92
|
}
|
|
93
93
|
try {
|
|
94
|
-
const binding = require('microvms-android-arm-eabi')
|
|
95
|
-
const bindingPackageVersion = require('microvms-android-arm-eabi/package.json').version
|
|
96
|
-
if (bindingPackageVersion !== '0.
|
|
97
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
94
|
+
const binding = require('@theagenticguy/microvms-android-arm-eabi')
|
|
95
|
+
const bindingPackageVersion = require('@theagenticguy/microvms-android-arm-eabi/package.json').version
|
|
96
|
+
if (bindingPackageVersion !== '0.2.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
97
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
98
98
|
}
|
|
99
99
|
return binding
|
|
100
100
|
} catch (e) {
|
|
@@ -112,10 +112,10 @@ function requireNative() {
|
|
|
112
112
|
loadErrors.push(e)
|
|
113
113
|
}
|
|
114
114
|
try {
|
|
115
|
-
const binding = require('microvms-win32-x64-gnu')
|
|
116
|
-
const bindingPackageVersion = require('microvms-win32-x64-gnu/package.json').version
|
|
117
|
-
if (bindingPackageVersion !== '0.
|
|
118
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
115
|
+
const binding = require('@theagenticguy/microvms-win32-x64-gnu')
|
|
116
|
+
const bindingPackageVersion = require('@theagenticguy/microvms-win32-x64-gnu/package.json').version
|
|
117
|
+
if (bindingPackageVersion !== '0.2.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
118
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
119
119
|
}
|
|
120
120
|
return binding
|
|
121
121
|
} catch (e) {
|
|
@@ -128,10 +128,10 @@ function requireNative() {
|
|
|
128
128
|
loadErrors.push(e)
|
|
129
129
|
}
|
|
130
130
|
try {
|
|
131
|
-
const binding = require('microvms-win32-x64-msvc')
|
|
132
|
-
const bindingPackageVersion = require('microvms-win32-x64-msvc/package.json').version
|
|
133
|
-
if (bindingPackageVersion !== '0.
|
|
134
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
131
|
+
const binding = require('@theagenticguy/microvms-win32-x64-msvc')
|
|
132
|
+
const bindingPackageVersion = require('@theagenticguy/microvms-win32-x64-msvc/package.json').version
|
|
133
|
+
if (bindingPackageVersion !== '0.2.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
134
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
135
135
|
}
|
|
136
136
|
return binding
|
|
137
137
|
} catch (e) {
|
|
@@ -145,10 +145,10 @@ function requireNative() {
|
|
|
145
145
|
loadErrors.push(e)
|
|
146
146
|
}
|
|
147
147
|
try {
|
|
148
|
-
const binding = require('microvms-win32-ia32-msvc')
|
|
149
|
-
const bindingPackageVersion = require('microvms-win32-ia32-msvc/package.json').version
|
|
150
|
-
if (bindingPackageVersion !== '0.
|
|
151
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
148
|
+
const binding = require('@theagenticguy/microvms-win32-ia32-msvc')
|
|
149
|
+
const bindingPackageVersion = require('@theagenticguy/microvms-win32-ia32-msvc/package.json').version
|
|
150
|
+
if (bindingPackageVersion !== '0.2.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
151
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
152
152
|
}
|
|
153
153
|
return binding
|
|
154
154
|
} catch (e) {
|
|
@@ -161,10 +161,10 @@ function requireNative() {
|
|
|
161
161
|
loadErrors.push(e)
|
|
162
162
|
}
|
|
163
163
|
try {
|
|
164
|
-
const binding = require('microvms-win32-arm64-msvc')
|
|
165
|
-
const bindingPackageVersion = require('microvms-win32-arm64-msvc/package.json').version
|
|
166
|
-
if (bindingPackageVersion !== '0.
|
|
167
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
164
|
+
const binding = require('@theagenticguy/microvms-win32-arm64-msvc')
|
|
165
|
+
const bindingPackageVersion = require('@theagenticguy/microvms-win32-arm64-msvc/package.json').version
|
|
166
|
+
if (bindingPackageVersion !== '0.2.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
167
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
168
168
|
}
|
|
169
169
|
return binding
|
|
170
170
|
} catch (e) {
|
|
@@ -180,10 +180,10 @@ function requireNative() {
|
|
|
180
180
|
loadErrors.push(e)
|
|
181
181
|
}
|
|
182
182
|
try {
|
|
183
|
-
const binding = require('microvms-darwin-universal')
|
|
184
|
-
const bindingPackageVersion = require('microvms-darwin-universal/package.json').version
|
|
185
|
-
if (bindingPackageVersion !== '0.
|
|
186
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
183
|
+
const binding = require('@theagenticguy/microvms-darwin-universal')
|
|
184
|
+
const bindingPackageVersion = require('@theagenticguy/microvms-darwin-universal/package.json').version
|
|
185
|
+
if (bindingPackageVersion !== '0.2.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
186
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
187
187
|
}
|
|
188
188
|
return binding
|
|
189
189
|
} catch (e) {
|
|
@@ -196,10 +196,10 @@ function requireNative() {
|
|
|
196
196
|
loadErrors.push(e)
|
|
197
197
|
}
|
|
198
198
|
try {
|
|
199
|
-
const binding = require('microvms-darwin-x64')
|
|
200
|
-
const bindingPackageVersion = require('microvms-darwin-x64/package.json').version
|
|
201
|
-
if (bindingPackageVersion !== '0.
|
|
202
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
199
|
+
const binding = require('@theagenticguy/microvms-darwin-x64')
|
|
200
|
+
const bindingPackageVersion = require('@theagenticguy/microvms-darwin-x64/package.json').version
|
|
201
|
+
if (bindingPackageVersion !== '0.2.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
202
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
203
203
|
}
|
|
204
204
|
return binding
|
|
205
205
|
} catch (e) {
|
|
@@ -212,10 +212,10 @@ function requireNative() {
|
|
|
212
212
|
loadErrors.push(e)
|
|
213
213
|
}
|
|
214
214
|
try {
|
|
215
|
-
const binding = require('microvms-darwin-arm64')
|
|
216
|
-
const bindingPackageVersion = require('microvms-darwin-arm64/package.json').version
|
|
217
|
-
if (bindingPackageVersion !== '0.
|
|
218
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
215
|
+
const binding = require('@theagenticguy/microvms-darwin-arm64')
|
|
216
|
+
const bindingPackageVersion = require('@theagenticguy/microvms-darwin-arm64/package.json').version
|
|
217
|
+
if (bindingPackageVersion !== '0.2.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
218
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
219
219
|
}
|
|
220
220
|
return binding
|
|
221
221
|
} catch (e) {
|
|
@@ -232,10 +232,10 @@ function requireNative() {
|
|
|
232
232
|
loadErrors.push(e)
|
|
233
233
|
}
|
|
234
234
|
try {
|
|
235
|
-
const binding = require('microvms-freebsd-x64')
|
|
236
|
-
const bindingPackageVersion = require('microvms-freebsd-x64/package.json').version
|
|
237
|
-
if (bindingPackageVersion !== '0.
|
|
238
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
235
|
+
const binding = require('@theagenticguy/microvms-freebsd-x64')
|
|
236
|
+
const bindingPackageVersion = require('@theagenticguy/microvms-freebsd-x64/package.json').version
|
|
237
|
+
if (bindingPackageVersion !== '0.2.0' && 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.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
239
239
|
}
|
|
240
240
|
return binding
|
|
241
241
|
} catch (e) {
|
|
@@ -248,10 +248,10 @@ function requireNative() {
|
|
|
248
248
|
loadErrors.push(e)
|
|
249
249
|
}
|
|
250
250
|
try {
|
|
251
|
-
const binding = require('microvms-freebsd-arm64')
|
|
252
|
-
const bindingPackageVersion = require('microvms-freebsd-arm64/package.json').version
|
|
253
|
-
if (bindingPackageVersion !== '0.
|
|
254
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
251
|
+
const binding = require('@theagenticguy/microvms-freebsd-arm64')
|
|
252
|
+
const bindingPackageVersion = require('@theagenticguy/microvms-freebsd-arm64/package.json').version
|
|
253
|
+
if (bindingPackageVersion !== '0.2.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
254
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
255
255
|
}
|
|
256
256
|
return binding
|
|
257
257
|
} catch (e) {
|
|
@@ -269,10 +269,10 @@ function requireNative() {
|
|
|
269
269
|
loadErrors.push(e)
|
|
270
270
|
}
|
|
271
271
|
try {
|
|
272
|
-
const binding = require('microvms-linux-x64-musl')
|
|
273
|
-
const bindingPackageVersion = require('microvms-linux-x64-musl/package.json').version
|
|
274
|
-
if (bindingPackageVersion !== '0.
|
|
275
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
272
|
+
const binding = require('@theagenticguy/microvms-linux-x64-musl')
|
|
273
|
+
const bindingPackageVersion = require('@theagenticguy/microvms-linux-x64-musl/package.json').version
|
|
274
|
+
if (bindingPackageVersion !== '0.2.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
275
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
276
276
|
}
|
|
277
277
|
return binding
|
|
278
278
|
} catch (e) {
|
|
@@ -285,10 +285,10 @@ function requireNative() {
|
|
|
285
285
|
loadErrors.push(e)
|
|
286
286
|
}
|
|
287
287
|
try {
|
|
288
|
-
const binding = require('microvms-linux-x64-gnu')
|
|
289
|
-
const bindingPackageVersion = require('microvms-linux-x64-gnu/package.json').version
|
|
290
|
-
if (bindingPackageVersion !== '0.
|
|
291
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
288
|
+
const binding = require('@theagenticguy/microvms-linux-x64-gnu')
|
|
289
|
+
const bindingPackageVersion = require('@theagenticguy/microvms-linux-x64-gnu/package.json').version
|
|
290
|
+
if (bindingPackageVersion !== '0.2.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
291
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
292
292
|
}
|
|
293
293
|
return binding
|
|
294
294
|
} catch (e) {
|
|
@@ -303,10 +303,10 @@ function requireNative() {
|
|
|
303
303
|
loadErrors.push(e)
|
|
304
304
|
}
|
|
305
305
|
try {
|
|
306
|
-
const binding = require('microvms-linux-arm64-musl')
|
|
307
|
-
const bindingPackageVersion = require('microvms-linux-arm64-musl/package.json').version
|
|
308
|
-
if (bindingPackageVersion !== '0.
|
|
309
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
306
|
+
const binding = require('@theagenticguy/microvms-linux-arm64-musl')
|
|
307
|
+
const bindingPackageVersion = require('@theagenticguy/microvms-linux-arm64-musl/package.json').version
|
|
308
|
+
if (bindingPackageVersion !== '0.2.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
309
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
310
310
|
}
|
|
311
311
|
return binding
|
|
312
312
|
} catch (e) {
|
|
@@ -319,10 +319,10 @@ function requireNative() {
|
|
|
319
319
|
loadErrors.push(e)
|
|
320
320
|
}
|
|
321
321
|
try {
|
|
322
|
-
const binding = require('microvms-linux-arm64-gnu')
|
|
323
|
-
const bindingPackageVersion = require('microvms-linux-arm64-gnu/package.json').version
|
|
324
|
-
if (bindingPackageVersion !== '0.
|
|
325
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
322
|
+
const binding = require('@theagenticguy/microvms-linux-arm64-gnu')
|
|
323
|
+
const bindingPackageVersion = require('@theagenticguy/microvms-linux-arm64-gnu/package.json').version
|
|
324
|
+
if (bindingPackageVersion !== '0.2.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
325
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
326
326
|
}
|
|
327
327
|
return binding
|
|
328
328
|
} catch (e) {
|
|
@@ -337,10 +337,10 @@ function requireNative() {
|
|
|
337
337
|
loadErrors.push(e)
|
|
338
338
|
}
|
|
339
339
|
try {
|
|
340
|
-
const binding = require('microvms-linux-arm-musleabihf')
|
|
341
|
-
const bindingPackageVersion = require('microvms-linux-arm-musleabihf/package.json').version
|
|
342
|
-
if (bindingPackageVersion !== '0.
|
|
343
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
340
|
+
const binding = require('@theagenticguy/microvms-linux-arm-musleabihf')
|
|
341
|
+
const bindingPackageVersion = require('@theagenticguy/microvms-linux-arm-musleabihf/package.json').version
|
|
342
|
+
if (bindingPackageVersion !== '0.2.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
343
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
344
344
|
}
|
|
345
345
|
return binding
|
|
346
346
|
} catch (e) {
|
|
@@ -353,10 +353,10 @@ function requireNative() {
|
|
|
353
353
|
loadErrors.push(e)
|
|
354
354
|
}
|
|
355
355
|
try {
|
|
356
|
-
const binding = require('microvms-linux-arm-gnueabihf')
|
|
357
|
-
const bindingPackageVersion = require('microvms-linux-arm-gnueabihf/package.json').version
|
|
358
|
-
if (bindingPackageVersion !== '0.
|
|
359
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
356
|
+
const binding = require('@theagenticguy/microvms-linux-arm-gnueabihf')
|
|
357
|
+
const bindingPackageVersion = require('@theagenticguy/microvms-linux-arm-gnueabihf/package.json').version
|
|
358
|
+
if (bindingPackageVersion !== '0.2.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
359
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
360
360
|
}
|
|
361
361
|
return binding
|
|
362
362
|
} catch (e) {
|
|
@@ -371,10 +371,10 @@ function requireNative() {
|
|
|
371
371
|
loadErrors.push(e)
|
|
372
372
|
}
|
|
373
373
|
try {
|
|
374
|
-
const binding = require('microvms-linux-loong64-musl')
|
|
375
|
-
const bindingPackageVersion = require('microvms-linux-loong64-musl/package.json').version
|
|
376
|
-
if (bindingPackageVersion !== '0.
|
|
377
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
374
|
+
const binding = require('@theagenticguy/microvms-linux-loong64-musl')
|
|
375
|
+
const bindingPackageVersion = require('@theagenticguy/microvms-linux-loong64-musl/package.json').version
|
|
376
|
+
if (bindingPackageVersion !== '0.2.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
377
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
378
378
|
}
|
|
379
379
|
return binding
|
|
380
380
|
} catch (e) {
|
|
@@ -387,10 +387,10 @@ function requireNative() {
|
|
|
387
387
|
loadErrors.push(e)
|
|
388
388
|
}
|
|
389
389
|
try {
|
|
390
|
-
const binding = require('microvms-linux-loong64-gnu')
|
|
391
|
-
const bindingPackageVersion = require('microvms-linux-loong64-gnu/package.json').version
|
|
392
|
-
if (bindingPackageVersion !== '0.
|
|
393
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
390
|
+
const binding = require('@theagenticguy/microvms-linux-loong64-gnu')
|
|
391
|
+
const bindingPackageVersion = require('@theagenticguy/microvms-linux-loong64-gnu/package.json').version
|
|
392
|
+
if (bindingPackageVersion !== '0.2.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
393
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
394
394
|
}
|
|
395
395
|
return binding
|
|
396
396
|
} catch (e) {
|
|
@@ -405,10 +405,10 @@ function requireNative() {
|
|
|
405
405
|
loadErrors.push(e)
|
|
406
406
|
}
|
|
407
407
|
try {
|
|
408
|
-
const binding = require('microvms-linux-riscv64-musl')
|
|
409
|
-
const bindingPackageVersion = require('microvms-linux-riscv64-musl/package.json').version
|
|
410
|
-
if (bindingPackageVersion !== '0.
|
|
411
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
408
|
+
const binding = require('@theagenticguy/microvms-linux-riscv64-musl')
|
|
409
|
+
const bindingPackageVersion = require('@theagenticguy/microvms-linux-riscv64-musl/package.json').version
|
|
410
|
+
if (bindingPackageVersion !== '0.2.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
411
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
412
412
|
}
|
|
413
413
|
return binding
|
|
414
414
|
} catch (e) {
|
|
@@ -421,10 +421,10 @@ function requireNative() {
|
|
|
421
421
|
loadErrors.push(e)
|
|
422
422
|
}
|
|
423
423
|
try {
|
|
424
|
-
const binding = require('microvms-linux-riscv64-gnu')
|
|
425
|
-
const bindingPackageVersion = require('microvms-linux-riscv64-gnu/package.json').version
|
|
426
|
-
if (bindingPackageVersion !== '0.
|
|
427
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
424
|
+
const binding = require('@theagenticguy/microvms-linux-riscv64-gnu')
|
|
425
|
+
const bindingPackageVersion = require('@theagenticguy/microvms-linux-riscv64-gnu/package.json').version
|
|
426
|
+
if (bindingPackageVersion !== '0.2.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
427
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
428
428
|
}
|
|
429
429
|
return binding
|
|
430
430
|
} catch (e) {
|
|
@@ -438,10 +438,10 @@ function requireNative() {
|
|
|
438
438
|
loadErrors.push(e)
|
|
439
439
|
}
|
|
440
440
|
try {
|
|
441
|
-
const binding = require('microvms-linux-ppc64-gnu')
|
|
442
|
-
const bindingPackageVersion = require('microvms-linux-ppc64-gnu/package.json').version
|
|
443
|
-
if (bindingPackageVersion !== '0.
|
|
444
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
441
|
+
const binding = require('@theagenticguy/microvms-linux-ppc64-gnu')
|
|
442
|
+
const bindingPackageVersion = require('@theagenticguy/microvms-linux-ppc64-gnu/package.json').version
|
|
443
|
+
if (bindingPackageVersion !== '0.2.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
444
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
445
445
|
}
|
|
446
446
|
return binding
|
|
447
447
|
} catch (e) {
|
|
@@ -454,10 +454,10 @@ function requireNative() {
|
|
|
454
454
|
loadErrors.push(e)
|
|
455
455
|
}
|
|
456
456
|
try {
|
|
457
|
-
const binding = require('microvms-linux-s390x-gnu')
|
|
458
|
-
const bindingPackageVersion = require('microvms-linux-s390x-gnu/package.json').version
|
|
459
|
-
if (bindingPackageVersion !== '0.
|
|
460
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
457
|
+
const binding = require('@theagenticguy/microvms-linux-s390x-gnu')
|
|
458
|
+
const bindingPackageVersion = require('@theagenticguy/microvms-linux-s390x-gnu/package.json').version
|
|
459
|
+
if (bindingPackageVersion !== '0.2.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
460
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
461
461
|
}
|
|
462
462
|
return binding
|
|
463
463
|
} catch (e) {
|
|
@@ -474,10 +474,10 @@ function requireNative() {
|
|
|
474
474
|
loadErrors.push(e)
|
|
475
475
|
}
|
|
476
476
|
try {
|
|
477
|
-
const binding = require('microvms-openharmony-arm64')
|
|
478
|
-
const bindingPackageVersion = require('microvms-openharmony-arm64/package.json').version
|
|
479
|
-
if (bindingPackageVersion !== '0.
|
|
480
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
477
|
+
const binding = require('@theagenticguy/microvms-openharmony-arm64')
|
|
478
|
+
const bindingPackageVersion = require('@theagenticguy/microvms-openharmony-arm64/package.json').version
|
|
479
|
+
if (bindingPackageVersion !== '0.2.0' && 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.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
481
481
|
}
|
|
482
482
|
return binding
|
|
483
483
|
} catch (e) {
|
|
@@ -490,10 +490,10 @@ function requireNative() {
|
|
|
490
490
|
loadErrors.push(e)
|
|
491
491
|
}
|
|
492
492
|
try {
|
|
493
|
-
const binding = require('microvms-openharmony-x64')
|
|
494
|
-
const bindingPackageVersion = require('microvms-openharmony-x64/package.json').version
|
|
495
|
-
if (bindingPackageVersion !== '0.
|
|
496
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
493
|
+
const binding = require('@theagenticguy/microvms-openharmony-x64')
|
|
494
|
+
const bindingPackageVersion = require('@theagenticguy/microvms-openharmony-x64/package.json').version
|
|
495
|
+
if (bindingPackageVersion !== '0.2.0' && 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.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
497
497
|
}
|
|
498
498
|
return binding
|
|
499
499
|
} catch (e) {
|
|
@@ -506,10 +506,10 @@ function requireNative() {
|
|
|
506
506
|
loadErrors.push(e)
|
|
507
507
|
}
|
|
508
508
|
try {
|
|
509
|
-
const binding = require('microvms-openharmony-arm')
|
|
510
|
-
const bindingPackageVersion = require('microvms-openharmony-arm/package.json').version
|
|
511
|
-
if (bindingPackageVersion !== '0.
|
|
512
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
509
|
+
const binding = require('@theagenticguy/microvms-openharmony-arm')
|
|
510
|
+
const bindingPackageVersion = require('@theagenticguy/microvms-openharmony-arm/package.json').version
|
|
511
|
+
if (bindingPackageVersion !== '0.2.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
512
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
513
513
|
}
|
|
514
514
|
return binding
|
|
515
515
|
} catch (e) {
|
|
@@ -643,16 +643,16 @@ if (!nativeBinding || forceWasi) {
|
|
|
643
643
|
let candidateError = null
|
|
644
644
|
let candidateFailed = false
|
|
645
645
|
try {
|
|
646
|
-
candidateError = __napiWasiResolveCandidate('microvms-wasm32-wasi', true, undefined)
|
|
646
|
+
candidateError = __napiWasiResolveCandidate('@theagenticguy/microvms-wasm32-wasi', true, undefined)
|
|
647
647
|
candidateFailed = candidateError !== null
|
|
648
648
|
if (!candidateFailed) {
|
|
649
649
|
if (process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
650
|
-
const bindingPackageVersion = require('microvms-wasm32-wasi/package.json').version
|
|
651
|
-
if (bindingPackageVersion !== '0.
|
|
652
|
-
throw new Error(`WASI binding package version mismatch, expected 0.
|
|
650
|
+
const bindingPackageVersion = require('@theagenticguy/microvms-wasm32-wasi/package.json').version
|
|
651
|
+
if (bindingPackageVersion !== '0.2.0') {
|
|
652
|
+
throw new Error(`WASI binding package version mismatch, expected 0.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
653
653
|
}
|
|
654
654
|
}
|
|
655
|
-
wasiBinding = require('microvms-wasm32-wasi')
|
|
655
|
+
wasiBinding = require('@theagenticguy/microvms-wasm32-wasi')
|
|
656
656
|
nativeBinding = wasiBinding
|
|
657
657
|
wasiBindingLoaded = true
|
|
658
658
|
}
|
|
@@ -706,6 +706,7 @@ module.exports.CostReport = nativeBinding.CostReport
|
|
|
706
706
|
module.exports.Duration = nativeBinding.Duration
|
|
707
707
|
module.exports.EstimatedUsd = nativeBinding.EstimatedUsd
|
|
708
708
|
module.exports.ExecHandle = nativeBinding.ExecHandle
|
|
709
|
+
module.exports.ExecProcess = nativeBinding.ExecProcess
|
|
709
710
|
module.exports.ExecStream = nativeBinding.ExecStream
|
|
710
711
|
module.exports.LineItem = nativeBinding.LineItem
|
|
711
712
|
module.exports.RateTable = nativeBinding.RateTable
|
|
@@ -724,6 +725,7 @@ module.exports.costConstants = nativeBinding.costConstants
|
|
|
724
725
|
module.exports.defaultBaseImage = nativeBinding.defaultBaseImage
|
|
725
726
|
module.exports.errorCodes = nativeBinding.errorCodes
|
|
726
727
|
module.exports.estimateRun = nativeBinding.estimateRun
|
|
728
|
+
module.exports.GapPolicy = nativeBinding.GapPolicy
|
|
727
729
|
module.exports.runReport = nativeBinding.runReport
|
|
728
730
|
module.exports.sessionConstants = nativeBinding.sessionConstants
|
|
729
731
|
module.exports.wireKinds = nativeBinding.wireKinds
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theagenticguy/microvms",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Node bindings over microvms-core: the MicroVMs client with every trap closure",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Laith Al-Saadoon",
|
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
"files": [
|
|
27
27
|
"index.js",
|
|
28
28
|
"index.d.ts",
|
|
29
|
-
"README.md"
|
|
29
|
+
"README.md",
|
|
30
|
+
"*.node"
|
|
30
31
|
],
|
|
31
32
|
"publishConfig": {
|
|
32
33
|
"access": "public"
|
|
@@ -51,11 +52,5 @@
|
|
|
51
52
|
},
|
|
52
53
|
"engines": {
|
|
53
54
|
"node": ">=22.13.0"
|
|
54
|
-
},
|
|
55
|
-
"optionalDependencies": {
|
|
56
|
-
"@theagenticguy/microvms-linux-x64-gnu": "0.1.0-rc.1",
|
|
57
|
-
"@theagenticguy/microvms-linux-arm64-gnu": "0.1.0-rc.1",
|
|
58
|
-
"@theagenticguy/microvms-darwin-arm64": "0.1.0-rc.1",
|
|
59
|
-
"@theagenticguy/microvms-win32-x64-msvc": "0.1.0-rc.1"
|
|
60
55
|
}
|
|
61
|
-
}
|
|
56
|
+
}
|