flightdeck 0.0.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.
@@ -0,0 +1,39 @@
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "secret": {
5
+ "type": "string"
6
+ },
7
+ "repo": {
8
+ "type": "string"
9
+ },
10
+ "app": {
11
+ "type": "string"
12
+ },
13
+ "runCmd": {
14
+ "type": "array",
15
+ "items": {
16
+ "type": "string"
17
+ }
18
+ },
19
+ "serviceDir": {
20
+ "type": "string"
21
+ },
22
+ "updateCmd": {
23
+ "type": "array",
24
+ "items": {
25
+ "type": "string"
26
+ }
27
+ }
28
+ },
29
+ "required": [
30
+ "secret",
31
+ "repo",
32
+ "app",
33
+ "runCmd",
34
+ "serviceDir",
35
+ "updateCmd"
36
+ ],
37
+ "additionalProperties": false,
38
+ "$schema": "http://json-schema.org/draft-07/schema#"
39
+ }
@@ -0,0 +1,39 @@
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "secret": {
5
+ "type": "string"
6
+ },
7
+ "repo": {
8
+ "type": "string"
9
+ },
10
+ "app": {
11
+ "type": "string"
12
+ },
13
+ "runCmd": {
14
+ "type": "array",
15
+ "items": {
16
+ "type": "string"
17
+ }
18
+ },
19
+ "serviceDir": {
20
+ "type": "string"
21
+ },
22
+ "updateCmd": {
23
+ "type": "array",
24
+ "items": {
25
+ "type": "string"
26
+ }
27
+ }
28
+ },
29
+ "required": [
30
+ "secret",
31
+ "repo",
32
+ "app",
33
+ "runCmd",
34
+ "serviceDir",
35
+ "updateCmd"
36
+ ],
37
+ "additionalProperties": false,
38
+ "$schema": "http://json-schema.org/draft-07/schema#"
39
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "outdir": {
5
+ "type": "string"
6
+ }
7
+ },
8
+ "additionalProperties": false,
9
+ "$schema": "http://json-schema.org/draft-07/schema#"
10
+ }
package/dist/lib.d.ts ADDED
@@ -0,0 +1,36 @@
1
+ import { Http2Server } from 'node:http2';
2
+ import { Future } from 'atom.io/internal';
3
+ import { ChildSocket } from 'atom.io/realtime-server';
4
+
5
+ type FlightDeckOptions = {
6
+ secret: string;
7
+ repo: string;
8
+ app: string;
9
+ runCmd: string[];
10
+ updateCmd: string[];
11
+ serviceDir?: string | undefined;
12
+ };
13
+ declare class FlightDeck {
14
+ readonly options: FlightDeckOptions;
15
+ get serviceName(): string;
16
+ protected webhookServer: Http2Server;
17
+ protected service: ChildSocket<{
18
+ updatesReady: [];
19
+ }, {
20
+ readyToUpdate: [];
21
+ alive: [];
22
+ }> | null;
23
+ protected restartTimes: number[];
24
+ alive: Future<unknown>;
25
+ dead: Future<unknown>;
26
+ readonly currentServiceDir: string;
27
+ readonly updateServiceDir: string;
28
+ readonly backupServiceDir: string;
29
+ constructor(options: FlightDeckOptions);
30
+ protected startService(): void;
31
+ protected applyUpdate(): void;
32
+ protected fetchLatestRelease(): void;
33
+ stopService(): void;
34
+ }
35
+
36
+ export { FlightDeck, type FlightDeckOptions };