@trycua/cua-driver 0.11.0 → 0.12.2

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.
@@ -0,0 +1,72 @@
1
+ import { resolveLibPath } from "@ubjs/node/typescript/dist/resolve-lib.js";
2
+ declare const _default: {
3
+ FfiType: {
4
+ UInt8: {
5
+ tag: string;
6
+ };
7
+ Int8: {
8
+ tag: string;
9
+ };
10
+ UInt16: {
11
+ tag: string;
12
+ };
13
+ Int16: {
14
+ tag: string;
15
+ };
16
+ UInt32: {
17
+ tag: string;
18
+ };
19
+ Int32: {
20
+ tag: string;
21
+ };
22
+ UInt64: {
23
+ tag: string;
24
+ };
25
+ Int64: {
26
+ tag: string;
27
+ };
28
+ Float32: {
29
+ tag: string;
30
+ };
31
+ Float64: {
32
+ tag: string;
33
+ };
34
+ Handle: {
35
+ tag: string;
36
+ };
37
+ RustBuffer: {
38
+ tag: string;
39
+ };
40
+ ForeignBytes: {
41
+ tag: string;
42
+ };
43
+ RustCallStatus: {
44
+ tag: string;
45
+ };
46
+ VoidPointer: {
47
+ tag: string;
48
+ };
49
+ Void: {
50
+ tag: string;
51
+ };
52
+ Callback: (name: string) => {
53
+ tag: string;
54
+ name: string;
55
+ };
56
+ Struct: (name: string) => {
57
+ tag: string;
58
+ name: string;
59
+ };
60
+ Reference: (inner: unknown) => {
61
+ tag: string;
62
+ inner: unknown;
63
+ };
64
+ MutReference: (inner: unknown) => {
65
+ tag: string;
66
+ inner: unknown;
67
+ };
68
+ };
69
+ resolveLibPath: typeof resolveLibPath;
70
+ UniffiNativeModule: unknown;
71
+ };
72
+ export default _default;
@@ -0,0 +1,35 @@
1
+ import { createRequire } from "node:module";
2
+ import { dirname, join } from "node:path";
3
+ import { resolveLibPath } from "@ubjs/node/typescript/dist/resolve-lib.js";
4
+ const FfiType = {
5
+ UInt8: { tag: "UInt8" },
6
+ Int8: { tag: "Int8" },
7
+ UInt16: { tag: "UInt16" },
8
+ Int16: { tag: "Int16" },
9
+ UInt32: { tag: "UInt32" },
10
+ Int32: { tag: "Int32" },
11
+ UInt64: { tag: "UInt64" },
12
+ Int64: { tag: "Int64" },
13
+ Float32: { tag: "Float32" },
14
+ Float64: { tag: "Float64" },
15
+ Handle: { tag: "Handle" },
16
+ RustBuffer: { tag: "RustBuffer" },
17
+ ForeignBytes: { tag: "ForeignBytes" },
18
+ RustCallStatus: { tag: "RustCallStatus" },
19
+ VoidPointer: { tag: "VoidPointer" },
20
+ Void: { tag: "Void" },
21
+ Callback: (name) => ({ tag: "Callback", name }),
22
+ Struct: (name) => ({ tag: "Struct", name }),
23
+ Reference: (inner) => ({ tag: "Reference", inner }),
24
+ MutReference: (inner) => ({ tag: "MutReference", inner }),
25
+ };
26
+ const sdkLibrary = resolveLibPath({
27
+ crateName: "cua_driver_sdk",
28
+ callerUrl: import.meta.url,
29
+ npmPackageBase: "@trycua/cua-driver-",
30
+ tripleStyle: "node",
31
+ });
32
+ const runtimePath = join(dirname(sdkLibrary), "cua_driver_node_runtime.node");
33
+ const require = createRequire(import.meta.url);
34
+ const { UniffiNativeModule } = require(runtimePath);
35
+ export default { FfiType, resolveLibPath, UniffiNativeModule };
package/package.json CHANGED
@@ -1,9 +1,13 @@
1
1
  {
2
2
  "name": "@trycua/cua-driver",
3
- "version": "0.11.0",
3
+ "version": "0.12.2",
4
4
  "description": "Rust-backed Cua Driver SDK and embedded Node host",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/trycua/cua.git"
10
+ },
7
11
  "main": "./dist/index.js",
8
12
  "types": "./dist/index.d.ts",
9
13
  "exports": {
@@ -37,16 +41,12 @@
37
41
  "@ubjs/core": "0.31.0-3",
38
42
  "@ubjs/node": "0.31.0-3"
39
43
  },
40
- "repository": {
41
- "type": "git",
42
- "url": "git+https://github.com/trycua/cua.git"
43
- },
44
44
  "optionalDependencies": {
45
- "@trycua/cua-driver-darwin-arm64": "0.11.0",
46
- "@trycua/cua-driver-darwin-x64": "0.11.0",
47
- "@trycua/cua-driver-linux-arm64-gnu": "0.11.0",
48
- "@trycua/cua-driver-linux-x64-gnu": "0.11.0",
49
- "@trycua/cua-driver-win32-arm64-msvc": "0.11.0",
50
- "@trycua/cua-driver-win32-x64-msvc": "0.11.0"
45
+ "@trycua/cua-driver-darwin-arm64": "0.12.2",
46
+ "@trycua/cua-driver-darwin-x64": "0.12.2",
47
+ "@trycua/cua-driver-linux-arm64-gnu": "0.12.2",
48
+ "@trycua/cua-driver-linux-x64-gnu": "0.12.2",
49
+ "@trycua/cua-driver-win32-arm64-msvc": "0.12.2",
50
+ "@trycua/cua-driver-win32-x64-msvc": "0.12.2"
51
51
  }
52
52
  }