@girs/gck-1 4.2.0 → 4.3.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/README.md +8 -8
- package/gck-1.d.ts +7 -0
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -5,25 +5,25 @@
|
|
|
5
5
|

|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
GJS TypeScript type definitions for Gck-1, generated from library version 1.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.
|
|
8
|
+
GJS TypeScript type definitions for Gck-1, generated from library version 1.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.3.0.
|
|
9
9
|
|
|
10
10
|
## Install
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Install the type definitions with npm:
|
|
13
13
|
```bash
|
|
14
14
|
npm install @girs/gck-1
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
## Usage
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Import it like any other module:
|
|
20
20
|
```ts
|
|
21
21
|
import Gck from '@girs/gck-1';
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
### Ambient Modules
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
[Ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules) let you write the same import you would in plain JavaScript.
|
|
27
27
|
For this you need to include `@girs/gck-1` or `@girs/gck-1/ambient` in your `tsconfig` or entry point Typescript file:
|
|
28
28
|
|
|
29
29
|
`index.ts`:
|
|
@@ -42,7 +42,7 @@ import '@girs/gck-1'
|
|
|
42
42
|
}
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
The ambient module now resolves with types:
|
|
46
46
|
|
|
47
47
|
```ts
|
|
48
48
|
import Gck from 'gi://Gck?version=1';
|
|
@@ -50,7 +50,7 @@ import Gck from 'gi://Gck?version=1';
|
|
|
50
50
|
|
|
51
51
|
### Global import
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
GJS's global `imports.gi` works too, with types.
|
|
54
54
|
For this you need to include `@girs/gck-1` or `@girs/gck-1/import` in your `tsconfig` or entry point Typescript file:
|
|
55
55
|
|
|
56
56
|
`index.ts`:
|
|
@@ -69,7 +69,7 @@ import '@girs/gck-1'
|
|
|
69
69
|
}
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
That form carries types as well:
|
|
73
73
|
|
|
74
74
|
```ts
|
|
75
75
|
const Gck = imports.gi.Gck;
|
|
@@ -77,7 +77,7 @@ const Gck = imports.gi.Gck;
|
|
|
77
77
|
|
|
78
78
|
### Bundle
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
Most projects want a bundler. [esbuild](https://esbuild.github.io/) is the smallest thing that works; the [examples directory](https://github.com/gjsify/ts-for-gir/tree/main/examples) has setups for several others.
|
|
81
81
|
|
|
82
82
|
## Other packages
|
|
83
83
|
|
package/gck-1.d.ts
CHANGED
|
@@ -644,6 +644,7 @@ export namespace Gck {
|
|
|
644
644
|
* This may be set to NULL if this object was created from an already
|
|
645
645
|
* initialized module via the `gck_module_new()` function.
|
|
646
646
|
* @construct-only
|
|
647
|
+
* @default null
|
|
647
648
|
*/
|
|
648
649
|
get path(): string;
|
|
649
650
|
|
|
@@ -790,6 +791,7 @@ export namespace Gck {
|
|
|
790
791
|
/**
|
|
791
792
|
* The raw PKCS11 handle for this object.
|
|
792
793
|
* @construct-only
|
|
794
|
+
* @default 0
|
|
793
795
|
*/
|
|
794
796
|
get handle(): number;
|
|
795
797
|
|
|
@@ -1445,6 +1447,7 @@ export namespace Gck {
|
|
|
1445
1447
|
/**
|
|
1446
1448
|
* The raw CK_SESSION_HANDLE handle of this session.
|
|
1447
1449
|
* @construct-only
|
|
1450
|
+
* @default 0
|
|
1448
1451
|
*/
|
|
1449
1452
|
get handle(): number;
|
|
1450
1453
|
|
|
@@ -1465,18 +1468,21 @@ export namespace Gck {
|
|
|
1465
1468
|
/**
|
|
1466
1469
|
* Raw PKCS#11 flags used to open the PKCS#11 session.
|
|
1467
1470
|
* @construct-only
|
|
1471
|
+
* @default 0
|
|
1468
1472
|
*/
|
|
1469
1473
|
set opening_flags(val: bigint | number);
|
|
1470
1474
|
|
|
1471
1475
|
/**
|
|
1472
1476
|
* Raw PKCS#11 flags used to open the PKCS#11 session.
|
|
1473
1477
|
* @construct-only
|
|
1478
|
+
* @default 0
|
|
1474
1479
|
*/
|
|
1475
1480
|
set openingFlags(val: bigint | number);
|
|
1476
1481
|
|
|
1477
1482
|
/**
|
|
1478
1483
|
* The options this session was opened with.
|
|
1479
1484
|
* @construct-only
|
|
1485
|
+
* @default Gck.SessionOptions.READ_ONLY
|
|
1480
1486
|
*/
|
|
1481
1487
|
get options(): SessionOptions;
|
|
1482
1488
|
|
|
@@ -2847,6 +2853,7 @@ export namespace Gck {
|
|
|
2847
2853
|
/**
|
|
2848
2854
|
* The raw CK_SLOT_ID handle of this slot.
|
|
2849
2855
|
* @construct-only
|
|
2856
|
+
* @default 0
|
|
2850
2857
|
*/
|
|
2851
2858
|
get handle(): number;
|
|
2852
2859
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/gck-1",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.0",
|
|
4
4
|
"libraryVersion": "1.0.0",
|
|
5
5
|
"description": "GJS TypeScript type definitions for Gck-1, generated from library version 1.0.0",
|
|
6
6
|
"type": "module",
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
"test": "tsc --project tsconfig.json"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@girs/gjs": "^4.
|
|
36
|
-
"@girs/gio-2.0": "^4.
|
|
37
|
-
"@girs/gobject-2.0": "^4.
|
|
38
|
-
"@girs/glib-2.0": "^4.
|
|
39
|
-
"@girs/gmodule-2.0": "^4.
|
|
35
|
+
"@girs/gjs": "^4.3.0",
|
|
36
|
+
"@girs/gio-2.0": "^4.3.0",
|
|
37
|
+
"@girs/gobject-2.0": "^4.3.0",
|
|
38
|
+
"@girs/glib-2.0": "^4.3.0",
|
|
39
|
+
"@girs/gmodule-2.0": "^4.3.0" },
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"typescript": "*"
|
|
42
42
|
},
|