@bridgething/core-node 0.0.1 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.d.ts +69 -69
  2. package/package.json +13 -3
package/index.d.ts CHANGED
@@ -1,111 +1,111 @@
1
1
  /* auto-generated by NAPI-RS */
2
2
  /* eslint-disable */
3
3
  export declare class BundleStore {
4
- constructor(kind: string, platform: string, storageDir: string)
5
- ensure(): Promise<BundleStatus>
6
- status(): BundleStatus
4
+ constructor(kind: string, platform: string, storageDir: string);
5
+ ensure(): Promise<BundleStatus>;
6
+ status(): BundleStatus;
7
7
  }
8
8
 
9
9
  export declare class DeliveryClient {
10
- static connect(url: string, options?: ConnectOptions | undefined | null): Promise<DeliveryClient>
11
- deviceId(): string
12
- meta(): Promise<any | null>
13
- discoverManifest(rootUrl: string): Promise<any>
14
- applyVersion(channel: string, version: string, rootUrl: string): Promise<void>
15
- push(kind: string, artifact: string | Buffer, options?: PushOptions | undefined | null): Promise<Phase>
16
- installWebapp(bundle: string | Buffer, provenance?: string | undefined | null): Promise<InstalledWebapp>
17
- switchWebapp(id: string): Promise<string>
18
- nextEvent(): Promise<UpdateEvent>
19
- closed(): Promise<void>
10
+ static connect(url: string, options?: ConnectOptions | undefined | null): Promise<DeliveryClient>;
11
+ deviceId(): string;
12
+ meta(): Promise<any | null>;
13
+ discoverManifest(rootUrl: string): Promise<any>;
14
+ applyVersion(channel: string, version: string, rootUrl: string): Promise<void>;
15
+ push(kind: string, artifact: string | Buffer, options?: PushOptions | undefined | null): Promise<Phase>;
16
+ installWebapp(bundle: string | Buffer, provenance?: string | undefined | null): Promise<InstalledWebapp>;
17
+ switchWebapp(id: string): Promise<string>;
18
+ nextEvent(): Promise<UpdateEvent>;
19
+ closed(): Promise<void>;
20
20
  }
21
21
 
22
22
  export declare class Discovery {
23
- constructor()
24
- endpoints(): Array<Endpoint>
25
- nextChange(): Promise<EndpointChange>
23
+ constructor();
24
+ endpoints(): Array<Endpoint>;
25
+ nextChange(): Promise<EndpointChange>;
26
26
  }
27
27
 
28
28
  export interface BundleStatus {
29
- state: string
30
- version?: string
31
- received?: number
32
- total?: number
33
- reason?: string
34
- path?: string
29
+ state: string;
30
+ version?: string;
31
+ received?: number;
32
+ total?: number;
33
+ reason?: string;
34
+ path?: string;
35
35
  }
36
36
 
37
37
  export interface CompositeVersion {
38
- daemon: string
39
- image: string
38
+ daemon: string;
39
+ image: string;
40
40
  }
41
41
 
42
42
  export interface ConnectOptions {
43
- deviceId?: string
44
- cacheDir?: string
45
- appName?: string
46
- appVersion?: string
43
+ deviceId?: string;
44
+ cacheDir?: string;
45
+ appName?: string;
46
+ appVersion?: string;
47
47
  }
48
48
 
49
49
  export interface Endpoint {
50
- id: string
51
- url: string
52
- host: string
53
- nickname?: string
50
+ id: string;
51
+ url: string;
52
+ host: string;
53
+ nickname?: string;
54
54
  }
55
55
 
56
56
  export interface EndpointChange {
57
- kind: string
58
- endpoint: Endpoint
57
+ kind: string;
58
+ endpoint: Endpoint;
59
59
  }
60
60
 
61
- export declare function initLogging(directive?: string | undefined | null): void
61
+ export declare function initLogging(directive?: string | undefined | null): void;
62
62
 
63
63
  export interface InstalledWebapp {
64
- id: string
65
- name: string
66
- version: string
67
- provenance?: string
64
+ id: string;
65
+ name: string;
66
+ version: string;
67
+ provenance?: string;
68
68
  }
69
69
 
70
- export declare function parseCompositeVersion(raw: string): CompositeVersion | null
70
+ export declare function parseCompositeVersion(raw: string): CompositeVersion | null;
71
71
 
72
72
  export interface Phase {
73
- kind: string
74
- asset?: string
75
- received?: number
76
- sent?: number
77
- total?: number
78
- ratePerSec?: number
79
- etaSeconds?: number
80
- writePercent?: number
81
- reason?: string
73
+ kind: string;
74
+ asset?: string;
75
+ received?: number;
76
+ sent?: number;
77
+ total?: number;
78
+ ratePerSec?: number;
79
+ etaSeconds?: number;
80
+ writePercent?: number;
81
+ reason?: string;
82
82
  }
83
83
 
84
84
  export interface PlanStep {
85
- id: number
86
- kind: string
87
- label: string
88
- bytes: number
85
+ id: number;
86
+ kind: string;
87
+ label: string;
88
+ bytes: number;
89
89
  }
90
90
 
91
91
  export interface PushOptions {
92
- updateUrlBase?: string
93
- zcks?: Record<string, string>
94
- label?: string
95
- version?: string
92
+ updateUrlBase?: string;
93
+ zcks?: Record<string, string>;
94
+ label?: string;
95
+ version?: string;
96
96
  }
97
97
 
98
98
  export interface UpdateEvent {
99
- kind: string
100
- deviceId?: string
101
- updateKind?: string
102
- release?: string
103
- daemonVersion?: string
104
- imageVersion?: string
105
- version?: string
106
- updatedAt?: string
107
- reason?: string
108
- stepId?: number
109
- steps?: Array<PlanStep>
110
- phase?: Phase
99
+ kind: string;
100
+ deviceId?: string;
101
+ updateKind?: string;
102
+ release?: string;
103
+ daemonVersion?: string;
104
+ imageVersion?: string;
105
+ version?: string;
106
+ updatedAt?: string;
107
+ reason?: string;
108
+ stepId?: number;
109
+ steps?: Array<PlanStep>;
110
+ phase?: Phase;
111
111
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bridgething/core-node",
3
- "version": "0.0.1",
3
+ "version": "0.9.1",
4
4
  "description": "N-API bindings for the bridgething delivery core: gateway link, updates, webapp install, bundle store.",
5
5
  "author": "Joey Eamigh <55670930+JoeyEamigh@users.noreply.github.com> (https://github.com/JoeyEamigh)",
6
6
  "homepage": "https://bridgething.com",
@@ -41,7 +41,7 @@
41
41
  "napi:version": "napi version"
42
42
  },
43
43
  "devDependencies": {
44
- "@napi-rs/cli": "^3.6.2"
44
+ "@napi-rs/cli": "^3.8.5"
45
45
  },
46
46
  "napi": {
47
47
  "binaryName": "bridgething-core-node",
@@ -56,5 +56,15 @@
56
56
  "x86_64-unknown-linux-musl"
57
57
  ],
58
58
  "npmClient": "npm"
59
+ },
60
+ "optionalDependencies": {
61
+ "@bridgething/core-node-darwin-arm64": "0.9.1",
62
+ "@bridgething/core-node-win32-arm64-msvc": "0.9.1",
63
+ "@bridgething/core-node-linux-arm64-gnu": "0.9.1",
64
+ "@bridgething/core-node-linux-arm64-musl": "0.9.1",
65
+ "@bridgething/core-node-darwin-x64": "0.9.1",
66
+ "@bridgething/core-node-win32-x64-msvc": "0.9.1",
67
+ "@bridgething/core-node-linux-x64-gnu": "0.9.1",
68
+ "@bridgething/core-node-linux-x64-musl": "0.9.1"
59
69
  }
60
- }
70
+ }