@lappis/cg-manager 0.0.26 → 0.0.28
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/LICENSE +20 -20
- package/dist/basic.d.ts +22 -22
- package/dist/command.d.ts +48 -48
- package/dist/commands/add.d.ts +4 -4
- package/dist/commands/call.d.ts +9 -9
- package/dist/commands/cg.d.ts +20 -20
- package/dist/commands/clear.d.ts +5 -5
- package/dist/commands/load.d.ts +4 -4
- package/dist/commands/loadbg.d.ts +42 -42
- package/dist/commands/mixer.d.ts +89 -89
- package/dist/commands/pause.d.ts +4 -4
- package/dist/commands/play.d.ts +4 -4
- package/dist/commands/print.d.ts +4 -4
- package/dist/commands/remove.d.ts +4 -4
- package/dist/commands/resume.d.ts +4 -4
- package/dist/commands/stop.d.ts +4 -4
- package/dist/commands/swap.d.ts +15 -15
- package/dist/commands.d.ts +14 -14
- package/dist/effect.d.ts +47 -47
- package/dist/executor.d.ts +64 -64
- package/dist/index.d.ts +9 -9
- package/dist/index.js +1 -1
- package/dist/layers.d.ts +66 -66
- package/dist/plugin.d.ts +54 -55
- package/dist/transform.d.ts +46 -46
- package/dist/types/caspar/executor.d.ts +11 -11
- package/dist/types/caspar/process.d.ts +14 -14
- package/dist/types/index.d.ts +4 -4
- package/dist/types/log.d.ts +19 -19
- package/dist/types/manager.d.ts +37 -37
- package/dist/types/plugin.d.ts +10 -10
- package/dist/types/routes.d.ts +46 -47
- package/dist/types/rundown.d.ts +27 -27
- package/dist/types/scanner/db.d.ts +74 -74
- package/dist/types/scanner/dir.d.ts +16 -16
- package/dist/types/scanner/scanner.d.ts +7 -7
- package/dist/types/server.d.ts +15 -15
- package/dist/types/ui.d.ts +22 -21
- package/package.json +49 -49
package/dist/types/rundown.d.ts
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
export interface RundownItem {
|
|
2
|
-
id: string;
|
|
3
|
-
title: string;
|
|
4
|
-
type: string;
|
|
5
|
-
data: any;
|
|
6
|
-
metadata: {
|
|
7
|
-
autoNext: boolean;
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
export interface Rundown {
|
|
11
|
-
id: string;
|
|
12
|
-
name: string;
|
|
13
|
-
items: RundownItem[];
|
|
14
|
-
}
|
|
15
|
-
export declare class RundownManager {
|
|
16
|
-
private rundowns;
|
|
17
|
-
executor: RundownExecutor;
|
|
18
|
-
createRundown(name: string): Rundown;
|
|
19
|
-
getRundown(id: string): Rundown | null;
|
|
20
|
-
loadRundowns(): Promise<void>;
|
|
21
|
-
saveRundown(rundown: Rundown): Promise<void>;
|
|
22
|
-
deleteRundown(id: string): Promise<void>;
|
|
23
|
-
}
|
|
24
|
-
export declare class RundownExecutor {
|
|
25
|
-
registerAction(type: string, action: (item: RundownItem) => Promise<void> | void): void;
|
|
26
|
-
executeItem(item: RundownItem): Promise<void>;
|
|
27
|
-
}
|
|
1
|
+
export interface RundownItem {
|
|
2
|
+
id: string;
|
|
3
|
+
title: string;
|
|
4
|
+
type: string;
|
|
5
|
+
data: any;
|
|
6
|
+
metadata: {
|
|
7
|
+
autoNext: boolean;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export interface Rundown {
|
|
11
|
+
id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
items: RundownItem[];
|
|
14
|
+
}
|
|
15
|
+
export declare class RundownManager {
|
|
16
|
+
private rundowns;
|
|
17
|
+
executor: RundownExecutor;
|
|
18
|
+
createRundown(name: string): Rundown;
|
|
19
|
+
getRundown(id: string): Rundown | null;
|
|
20
|
+
loadRundowns(): Promise<void>;
|
|
21
|
+
saveRundown(rundown: Rundown): Promise<void>;
|
|
22
|
+
deleteRundown(id: string): Promise<void>;
|
|
23
|
+
}
|
|
24
|
+
export declare class RundownExecutor {
|
|
25
|
+
registerAction(type: string, action: (item: RundownItem) => Promise<void> | void): void;
|
|
26
|
+
executeItem(item: RundownItem): Promise<void>;
|
|
27
|
+
}
|
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
import { EventEmitter } from 'events';
|
|
4
|
-
export interface MediaDoc {
|
|
5
|
-
id: string;
|
|
6
|
-
_invalidate?: boolean;
|
|
7
|
-
mediaPath?: string;
|
|
8
|
-
mediaSize?: number;
|
|
9
|
-
mediaTime?: number;
|
|
10
|
-
thumbSize?: number;
|
|
11
|
-
thumbTime?: number;
|
|
12
|
-
cinf?: string;
|
|
13
|
-
tinf?: string;
|
|
14
|
-
mediainfo?: {
|
|
15
|
-
name: string;
|
|
16
|
-
path: string;
|
|
17
|
-
size: number;
|
|
18
|
-
time: number;
|
|
19
|
-
field_order: string;
|
|
20
|
-
streams: {
|
|
21
|
-
codec: {
|
|
22
|
-
long_name: string;
|
|
23
|
-
type: string;
|
|
24
|
-
time_base: string;
|
|
25
|
-
tag_string: string;
|
|
26
|
-
is_avc: any;
|
|
27
|
-
};
|
|
28
|
-
width: number;
|
|
29
|
-
height: number;
|
|
30
|
-
sample_aspect_ratio: string;
|
|
31
|
-
display_aspect_ratio: string;
|
|
32
|
-
pix_fmt: string;
|
|
33
|
-
bits_per_raw_sample: string;
|
|
34
|
-
sample_fmt: string;
|
|
35
|
-
sample_rate: number;
|
|
36
|
-
channels: number;
|
|
37
|
-
channel_layout: string;
|
|
38
|
-
bits_per_sample: number;
|
|
39
|
-
time_base: string;
|
|
40
|
-
start_time: number;
|
|
41
|
-
duration_ts: string;
|
|
42
|
-
duration: string;
|
|
43
|
-
bit_rate: string;
|
|
44
|
-
max_bit_rate: string;
|
|
45
|
-
nb_frames: string;
|
|
46
|
-
}[];
|
|
47
|
-
format: {
|
|
48
|
-
name: string;
|
|
49
|
-
long_name: string;
|
|
50
|
-
size: string;
|
|
51
|
-
start_time: number;
|
|
52
|
-
duration: number;
|
|
53
|
-
bit_rate: number;
|
|
54
|
-
max_bit_rate: number;
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
_attachments?: {
|
|
58
|
-
'thumb.png': {
|
|
59
|
-
content_type: string;
|
|
60
|
-
data: Buffer;
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
export declare class FileDatabase extends EventEmitter {
|
|
65
|
-
get(id: string): MediaDoc;
|
|
66
|
-
retrieve(hash: string): MediaDoc;
|
|
67
|
-
getHash(id: string): string;
|
|
68
|
-
put(hash: string, doc: MediaDoc): MediaDoc;
|
|
69
|
-
remove(id: string): MediaDoc;
|
|
70
|
-
allDocs(): MediaDoc[];
|
|
71
|
-
close(): void;
|
|
72
|
-
save(): string;
|
|
73
|
-
load(data: string): void;
|
|
74
|
-
}
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
import { EventEmitter } from 'events';
|
|
4
|
+
export interface MediaDoc {
|
|
5
|
+
id: string;
|
|
6
|
+
_invalidate?: boolean;
|
|
7
|
+
mediaPath?: string;
|
|
8
|
+
mediaSize?: number;
|
|
9
|
+
mediaTime?: number;
|
|
10
|
+
thumbSize?: number;
|
|
11
|
+
thumbTime?: number;
|
|
12
|
+
cinf?: string;
|
|
13
|
+
tinf?: string;
|
|
14
|
+
mediainfo?: {
|
|
15
|
+
name: string;
|
|
16
|
+
path: string;
|
|
17
|
+
size: number;
|
|
18
|
+
time: number;
|
|
19
|
+
field_order: string;
|
|
20
|
+
streams: {
|
|
21
|
+
codec: {
|
|
22
|
+
long_name: string;
|
|
23
|
+
type: string;
|
|
24
|
+
time_base: string;
|
|
25
|
+
tag_string: string;
|
|
26
|
+
is_avc: any;
|
|
27
|
+
};
|
|
28
|
+
width: number;
|
|
29
|
+
height: number;
|
|
30
|
+
sample_aspect_ratio: string;
|
|
31
|
+
display_aspect_ratio: string;
|
|
32
|
+
pix_fmt: string;
|
|
33
|
+
bits_per_raw_sample: string;
|
|
34
|
+
sample_fmt: string;
|
|
35
|
+
sample_rate: number;
|
|
36
|
+
channels: number;
|
|
37
|
+
channel_layout: string;
|
|
38
|
+
bits_per_sample: number;
|
|
39
|
+
time_base: string;
|
|
40
|
+
start_time: number;
|
|
41
|
+
duration_ts: string;
|
|
42
|
+
duration: string;
|
|
43
|
+
bit_rate: string;
|
|
44
|
+
max_bit_rate: string;
|
|
45
|
+
nb_frames: string;
|
|
46
|
+
}[];
|
|
47
|
+
format: {
|
|
48
|
+
name: string;
|
|
49
|
+
long_name: string;
|
|
50
|
+
size: string;
|
|
51
|
+
start_time: number;
|
|
52
|
+
duration: number;
|
|
53
|
+
bit_rate: number;
|
|
54
|
+
max_bit_rate: number;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
_attachments?: {
|
|
58
|
+
'thumb.png': {
|
|
59
|
+
content_type: string;
|
|
60
|
+
data: Buffer;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
export declare class FileDatabase extends EventEmitter {
|
|
65
|
+
get(id: string): MediaDoc;
|
|
66
|
+
retrieve(hash: string): MediaDoc;
|
|
67
|
+
getHash(id: string): string;
|
|
68
|
+
put(hash: string, doc: MediaDoc): MediaDoc;
|
|
69
|
+
remove(id: string): MediaDoc;
|
|
70
|
+
allDocs(): MediaDoc[];
|
|
71
|
+
close(): void;
|
|
72
|
+
save(): string;
|
|
73
|
+
load(data: string): void;
|
|
74
|
+
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export interface InternalMediaData {
|
|
2
|
-
name: string;
|
|
3
|
-
id: string;
|
|
4
|
-
identifier: string;
|
|
5
|
-
location: string;
|
|
6
|
-
type: 'media' | 'template';
|
|
7
|
-
}
|
|
8
|
-
export declare class DirectoryManager {
|
|
9
|
-
private constructor();
|
|
10
|
-
initialize(mediaPath: string, templatePath: string): Promise<void>;
|
|
11
|
-
createDirectories(): Promise<void>;
|
|
12
|
-
deleteDirectories(): Promise<void>;
|
|
13
|
-
createDirectory(type: 'media' | 'template', from: string): Promise<InternalMediaData>;
|
|
14
|
-
deleteDirectory(id: string): Promise<void>;
|
|
15
|
-
getDirectory(id: string): Promise<InternalMediaData>;
|
|
16
|
-
}
|
|
1
|
+
export interface InternalMediaData {
|
|
2
|
+
name: string;
|
|
3
|
+
id: string;
|
|
4
|
+
identifier: string;
|
|
5
|
+
location: string;
|
|
6
|
+
type: 'media' | 'template';
|
|
7
|
+
}
|
|
8
|
+
export declare class DirectoryManager {
|
|
9
|
+
private constructor();
|
|
10
|
+
initialize(mediaPath: string, templatePath: string): Promise<void>;
|
|
11
|
+
createDirectories(): Promise<void>;
|
|
12
|
+
deleteDirectories(): Promise<void>;
|
|
13
|
+
createDirectory(type: 'media' | 'template', from: string): Promise<InternalMediaData>;
|
|
14
|
+
deleteDirectory(id: string): Promise<void>;
|
|
15
|
+
getDirectory(id: string): Promise<InternalMediaData>;
|
|
16
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { FileDatabase } from './db';
|
|
2
|
-
export declare class MediaScanner {
|
|
3
|
-
started: boolean;
|
|
4
|
-
start(): Promise<void>;
|
|
5
|
-
stop(): Promise<void>;
|
|
6
|
-
getDatabase(): FileDatabase;
|
|
7
|
-
}
|
|
1
|
+
import { FileDatabase } from './db';
|
|
2
|
+
export declare class MediaScanner {
|
|
3
|
+
started: boolean;
|
|
4
|
+
start(): Promise<void>;
|
|
5
|
+
stop(): Promise<void>;
|
|
6
|
+
getDatabase(): FileDatabase;
|
|
7
|
+
}
|
package/dist/types/server.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { Client, Method, Middleware, TypedClient, WebsocketOutboundMethod } from 'rest-exchange-protocol';
|
|
2
|
-
import { Route } from 'rest-exchange-protocol/dist/route';
|
|
3
|
-
export type CGClient = TypedClient<{}>;
|
|
4
|
-
export declare class CGServer {
|
|
5
|
-
private constructor();
|
|
6
|
-
broadcast<T>(target: string, method: WebsocketOutboundMethod, data: T, exclude?: Client): any;
|
|
7
|
-
log(): Middleware;
|
|
8
|
-
upload(): Middleware;
|
|
9
|
-
web(): Middleware;
|
|
10
|
-
cors(): Middleware;
|
|
11
|
-
start(): Promise<void>;
|
|
12
|
-
stop(): Promise<void>;
|
|
13
|
-
registerRoute(path: string, handler: Route['handler'], method: Method): Route;
|
|
14
|
-
unregisterRoute(route: Route): void;
|
|
15
|
-
}
|
|
1
|
+
import { Client, Method, Middleware, TypedClient, WebsocketOutboundMethod } from 'rest-exchange-protocol';
|
|
2
|
+
import { Route } from 'rest-exchange-protocol/dist/route';
|
|
3
|
+
export type CGClient = TypedClient<{}>;
|
|
4
|
+
export declare class CGServer {
|
|
5
|
+
private constructor();
|
|
6
|
+
broadcast<T>(target: string, method: WebsocketOutboundMethod, data: T, exclude?: Client): any;
|
|
7
|
+
log(): Middleware;
|
|
8
|
+
upload(): Middleware;
|
|
9
|
+
web(): Middleware;
|
|
10
|
+
cors(): Middleware;
|
|
11
|
+
start(): Promise<void>;
|
|
12
|
+
stop(): Promise<void>;
|
|
13
|
+
registerRoute(path: string, handler: Route['handler'], method: Method): Route;
|
|
14
|
+
unregisterRoute(route: Route): void;
|
|
15
|
+
}
|
package/dist/types/ui.d.ts
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
export declare const UI_INJECTION_ZONE: {
|
|
2
|
-
readonly PLUGIN_PAGE: "plugin-page";
|
|
3
|
-
readonly RUNDOWN_ITEM: "rundown-item";
|
|
4
|
-
readonly RUNDOWN_EDITOR: "rundown-editor";
|
|
5
|
-
readonly RUNDOWN_SIDE: "rundown-side";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export type
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
export declare const UI_INJECTION_ZONE: {
|
|
2
|
+
readonly PLUGIN_PAGE: "plugin-page";
|
|
3
|
+
readonly RUNDOWN_ITEM: "rundown-item";
|
|
4
|
+
readonly RUNDOWN_EDITOR: "rundown-editor";
|
|
5
|
+
readonly RUNDOWN_SIDE: "rundown-side";
|
|
6
|
+
readonly RUNDOWN_BOTTOM_PANEL: "rundown-bottom-panel";
|
|
7
|
+
};
|
|
8
|
+
export type UI_INJECTION_ZONE = typeof UI_INJECTION_ZONE[keyof typeof UI_INJECTION_ZONE];
|
|
9
|
+
export type UI_INJECTION_ZONE_KEY = UI_INJECTION_ZONE | `${UI_INJECTION_ZONE}.${string}`;
|
|
10
|
+
export interface Injection {
|
|
11
|
+
zone: UI_INJECTION_ZONE;
|
|
12
|
+
file: string;
|
|
13
|
+
plugin: string;
|
|
14
|
+
id: string;
|
|
15
|
+
}
|
|
16
|
+
export declare class UIInjector {
|
|
17
|
+
register(zone: UI_INJECTION_ZONE_KEY, file: string, plugin: string): string;
|
|
18
|
+
unregister(id: string): void;
|
|
19
|
+
getInjections(zone?: UI_INJECTION_ZONE_KEY): Injection[];
|
|
20
|
+
bundle(id: string): Promise<string | null>;
|
|
21
|
+
getInjectionZone(zone: UI_INJECTION_ZONE_KEY, key: string): UI_INJECTION_ZONE_KEY;
|
|
22
|
+
}
|
package/package.json
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@lappis/cg-manager",
|
|
3
|
-
"repository": "https://github.com/Lapplandsveckan/cg-manager-plugin",
|
|
4
|
-
"author": "firecraftgaming <eliyah@sundstroem.com>",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"version": "0.0.
|
|
7
|
-
"main": "dist/index.js",
|
|
8
|
-
"types": "dist/index.d.ts",
|
|
9
|
-
"devDependencies": {
|
|
10
|
-
"@babel/core": "^7.19.3",
|
|
11
|
-
"@babel/preset-env": "^7.19.3",
|
|
12
|
-
"@babel/preset-typescript": "^7.18.6",
|
|
13
|
-
"@testdeck/mocha": "^0.3.3",
|
|
14
|
-
"@typescript-eslint/eslint-plugin": "^7.1.1",
|
|
15
|
-
"@typescript-eslint/parser": "^7.1.1",
|
|
16
|
-
"chai": "^4.3.7",
|
|
17
|
-
"eslint": "^8.57.0",
|
|
18
|
-
"mocha": "10.2.0",
|
|
19
|
-
"mocha-typescript": "^1.1.17",
|
|
20
|
-
"nyc": "^15.1.0",
|
|
21
|
-
"ts-loader": "^9.2.6",
|
|
22
|
-
"ts-mockito": "^2.6.1",
|
|
23
|
-
"tsconfig-paths": "^4.2.0",
|
|
24
|
-
"typescript": "^4.9.5",
|
|
25
|
-
"webpack": "^5.69.0",
|
|
26
|
-
"webpack-cli": "^4.9.2"
|
|
27
|
-
},
|
|
28
|
-
"files": [
|
|
29
|
-
"dist",
|
|
30
|
-
"LICENSE",
|
|
31
|
-
"package.json"
|
|
32
|
-
],
|
|
33
|
-
"scripts": {
|
|
34
|
-
"tsc": "tsc --noEmit",
|
|
35
|
-
"build": "webpack && tsc --emitDeclarationOnly",
|
|
36
|
-
"watch": "webpack --watch",
|
|
37
|
-
"test": "mocha 'test/**/*.test.ts'",
|
|
38
|
-
"test:coverage": "nyc mocha 'test/**/*.test.ts'",
|
|
39
|
-
"lint": "eslint src test --ext .ts",
|
|
40
|
-
"lint:fix": "eslint src test --ext .ts --fix"
|
|
41
|
-
},
|
|
42
|
-
"dependencies": {
|
|
43
|
-
"babel-loader": "^8.2.5",
|
|
44
|
-
"no-try": "^3.1.0",
|
|
45
|
-
"rest-exchange-protocol": "^0.0.16",
|
|
46
|
-
"ts-node": "^10.9.1",
|
|
47
|
-
"uuid": "^9.0.1"
|
|
48
|
-
}
|
|
49
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@lappis/cg-manager",
|
|
3
|
+
"repository": "https://github.com/Lapplandsveckan/cg-manager-plugin",
|
|
4
|
+
"author": "firecraftgaming <eliyah@sundstroem.com>",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"version": "0.0.28",
|
|
7
|
+
"main": "dist/index.js",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"devDependencies": {
|
|
10
|
+
"@babel/core": "^7.19.3",
|
|
11
|
+
"@babel/preset-env": "^7.19.3",
|
|
12
|
+
"@babel/preset-typescript": "^7.18.6",
|
|
13
|
+
"@testdeck/mocha": "^0.3.3",
|
|
14
|
+
"@typescript-eslint/eslint-plugin": "^7.1.1",
|
|
15
|
+
"@typescript-eslint/parser": "^7.1.1",
|
|
16
|
+
"chai": "^4.3.7",
|
|
17
|
+
"eslint": "^8.57.0",
|
|
18
|
+
"mocha": "10.2.0",
|
|
19
|
+
"mocha-typescript": "^1.1.17",
|
|
20
|
+
"nyc": "^15.1.0",
|
|
21
|
+
"ts-loader": "^9.2.6",
|
|
22
|
+
"ts-mockito": "^2.6.1",
|
|
23
|
+
"tsconfig-paths": "^4.2.0",
|
|
24
|
+
"typescript": "^4.9.5",
|
|
25
|
+
"webpack": "^5.69.0",
|
|
26
|
+
"webpack-cli": "^4.9.2"
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"dist",
|
|
30
|
+
"LICENSE",
|
|
31
|
+
"package.json"
|
|
32
|
+
],
|
|
33
|
+
"scripts": {
|
|
34
|
+
"tsc": "tsc --noEmit",
|
|
35
|
+
"build": "webpack && tsc --emitDeclarationOnly",
|
|
36
|
+
"watch": "webpack --watch",
|
|
37
|
+
"test": "mocha 'test/**/*.test.ts'",
|
|
38
|
+
"test:coverage": "nyc mocha 'test/**/*.test.ts'",
|
|
39
|
+
"lint": "eslint src test --ext .ts",
|
|
40
|
+
"lint:fix": "eslint src test --ext .ts --fix"
|
|
41
|
+
},
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"babel-loader": "^8.2.5",
|
|
44
|
+
"no-try": "^3.1.0",
|
|
45
|
+
"rest-exchange-protocol": "^0.0.16",
|
|
46
|
+
"ts-node": "^10.9.1",
|
|
47
|
+
"uuid": "^9.0.1"
|
|
48
|
+
}
|
|
49
|
+
}
|