@athree/runner-proto 4.0.0-wip.1 → 4.0.0-wip.3

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.
@@ -1,4 +1,5 @@
1
1
  import { DomainDef } from '@nodescript/protocomm';
2
+ import { StageInfo } from '../schema/StageInfo.js';
2
3
  import { WorkflowInfo } from '../schema/WorkflowInfo.js';
3
4
  export interface WorkflowDomain {
4
5
  loadWorkflow(req: {
@@ -9,5 +10,16 @@ export interface WorkflowDomain {
9
10
  getWorkflowInfo(req: {}): Promise<{
10
11
  workflowInfo: WorkflowInfo;
11
12
  }>;
13
+ listStages(req: {}): Promise<{
14
+ stages: StageInfo[];
15
+ }>;
16
+ runStage(req: {
17
+ stageId: string;
18
+ }): Promise<{}>;
19
+ matchStages(req: {}): Promise<{
20
+ stages: StageInfo[];
21
+ }>;
22
+ runAll(req: {}): Promise<{}>;
23
+ stop(req: {}): Promise<{}>;
12
24
  }
13
25
  export declare const WorkflowDomain: DomainDef<WorkflowDomain>;
@@ -1,3 +1,4 @@
1
+ import { StageInfoSchema } from '../schema/StageInfo.js';
1
2
  import { WorkflowInfoSchema } from '../schema/WorkflowInfo.js';
2
3
  export const WorkflowDomain = {
3
4
  name: 'Workflow',
@@ -18,6 +19,42 @@ export const WorkflowDomain = {
18
19
  workflowInfo: WorkflowInfoSchema.schema,
19
20
  },
20
21
  },
22
+ listStages: {
23
+ type: 'query',
24
+ params: {
25
+ all: { type: 'boolean', optional: true },
26
+ },
27
+ returns: {
28
+ stages: { type: 'array', items: StageInfoSchema.schema },
29
+ },
30
+ },
31
+ runStage: {
32
+ type: 'command',
33
+ params: {
34
+ stageId: { type: 'string' },
35
+ },
36
+ returns: {},
37
+ },
38
+ matchStages: {
39
+ type: 'command',
40
+ params: {},
41
+ returns: {
42
+ stages: {
43
+ type: 'array',
44
+ items: StageInfoSchema.schema
45
+ },
46
+ },
47
+ },
48
+ runAll: {
49
+ type: 'command',
50
+ params: {},
51
+ returns: {},
52
+ },
53
+ stop: {
54
+ type: 'command',
55
+ params: {},
56
+ returns: {},
57
+ },
21
58
  },
22
59
  events: {},
23
60
  };
@@ -1 +1 @@
1
- {"version":3,"file":"WorkflowDomain.js","sourceRoot":"","sources":["../../../src/main/domains/WorkflowDomain.ts"],"names":[],"mappings":"AAEA,OAAO,EAAgB,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAe7E,MAAM,CAAC,MAAM,cAAc,GAA8B;IACrD,IAAI,EAAE,UAAU;IAChB,OAAO,EAAE;QACL,YAAY,EAAE;YACV,IAAI,EAAE,SAAS;YACf,MAAM,EAAE;gBACJ,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;aACjC;YACD,OAAO,EAAE;gBACL,YAAY,EAAE,kBAAkB,CAAC,MAAM;aAC1C;SACJ;QACD,eAAe,EAAE;YACb,IAAI,EAAE,OAAO;YACb,MAAM,EAAE,EAAE;YACV,OAAO,EAAE;gBACL,YAAY,EAAE,kBAAkB,CAAC,MAAM;aAC1C;SACJ;KACJ;IACD,MAAM,EAAE,EAAE;CACb,CAAC"}
1
+ {"version":3,"file":"WorkflowDomain.js","sourceRoot":"","sources":["../../../src/main/domains/WorkflowDomain.ts"],"names":[],"mappings":"AAEA,OAAO,EAAa,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAgB,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAgC7E,MAAM,CAAC,MAAM,cAAc,GAA8B;IACrD,IAAI,EAAE,UAAU;IAChB,OAAO,EAAE;QACL,YAAY,EAAE;YACV,IAAI,EAAE,SAAS;YACf,MAAM,EAAE;gBACJ,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;aACjC;YACD,OAAO,EAAE;gBACL,YAAY,EAAE,kBAAkB,CAAC,MAAM;aAC1C;SACJ;QACD,eAAe,EAAE;YACb,IAAI,EAAE,OAAO;YACb,MAAM,EAAE,EAAE;YACV,OAAO,EAAE;gBACL,YAAY,EAAE,kBAAkB,CAAC,MAAM;aAC1C;SACJ;QACD,UAAU,EAAE;YACR,IAAI,EAAE,OAAO;YACb,MAAM,EAAE;gBACJ,GAAG,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE;aAC3C;YACD,OAAO,EAAE;gBACL,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,eAAe,CAAC,MAAM,EAAE;aAC3D;SACJ;QACD,QAAQ,EAAE;YACN,IAAI,EAAE,SAAS;YACf,MAAM,EAAE;gBACJ,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;aAC9B;YACD,OAAO,EAAE,EAAE;SACd;QACD,WAAW,EAAE;YACT,IAAI,EAAE,SAAS;YACf,MAAM,EAAE,EAAE;YACV,OAAO,EAAE;gBACL,MAAM,EAAE;oBACJ,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE,eAAe,CAAC,MAAM;iBAChC;aACJ;SACJ;QACD,MAAM,EAAE;YACJ,IAAI,EAAE,SAAS;YACf,MAAM,EAAE,EAAE;YACV,OAAO,EAAE,EAAE;SACd;QACD,IAAI,EAAE;YACF,IAAI,EAAE,SAAS;YACf,MAAM,EAAE,EAAE;YACV,OAAO,EAAE,EAAE;SACd;KACJ;IACD,MAAM,EAAE,EAAE;CACb,CAAC"}
@@ -11,6 +11,7 @@ export * from './schema/MessageEvent.js';
11
11
  export * from './schema/MouseEventRequest.js';
12
12
  export * from './schema/PageMetadata.js';
13
13
  export * from './schema/ScreencastFrame.js';
14
+ export * from './schema/StageInfo.js';
14
15
  export * from './schema/StateData.js';
15
16
  export * from './schema/StateUpdate.js';
16
17
  export * from './schema/WorkflowInfo.js';
package/out/main/index.js CHANGED
@@ -11,6 +11,7 @@ export * from './schema/MessageEvent.js';
11
11
  export * from './schema/MouseEventRequest.js';
12
12
  export * from './schema/PageMetadata.js';
13
13
  export * from './schema/ScreencastFrame.js';
14
+ export * from './schema/StageInfo.js';
14
15
  export * from './schema/StateData.js';
15
16
  export * from './schema/StateUpdate.js';
16
17
  export * from './schema/WorkflowInfo.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/main/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,eAAe,CAAC;AAC9B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC;AACjD,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/main/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,eAAe,CAAC;AAC9B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC;AACjD,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { Schema } from 'airtight';
2
+ export interface StageInfo {
3
+ id: string;
4
+ key: string;
5
+ title: string;
6
+ namespace: string;
7
+ modulePath: string;
8
+ description?: string;
9
+ initial?: boolean;
10
+ success?: boolean;
11
+ repeatable?: boolean;
12
+ dependsOn?: string[];
13
+ }
14
+ export declare const StageInfoSchema: Schema<StageInfo>;
@@ -0,0 +1,21 @@
1
+ import { Schema } from 'airtight';
2
+ export const StageInfoSchema = new Schema({
3
+ type: 'object',
4
+ properties: {
5
+ id: { type: 'string' },
6
+ key: { type: 'string' },
7
+ title: { type: 'string' },
8
+ namespace: { type: 'string' },
9
+ modulePath: { type: 'string' },
10
+ description: { type: 'string', optional: true },
11
+ initial: { type: 'boolean', optional: true },
12
+ success: { type: 'boolean', optional: true },
13
+ repeatable: { type: 'boolean', optional: true },
14
+ dependsOn: {
15
+ type: 'array',
16
+ items: { type: 'string' },
17
+ optional: true,
18
+ },
19
+ },
20
+ });
21
+ //# sourceMappingURL=StageInfo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StageInfo.js","sourceRoot":"","sources":["../../../src/main/schema/StageInfo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAelC,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,MAAM,CAAY;IACjD,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACR,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QACtB,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QACvB,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QACzB,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC7B,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC9B,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC/C,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC5C,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC5C,UAAU,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC/C,SAAS,EAAE;YACP,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACzB,QAAQ,EAAE,IAAI;SACjB;KACJ;CACJ,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@athree/runner-proto",
3
- "version": "4.0.0-wip.1",
3
+ "version": "4.0.0-wip.3",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "exports": {
@@ -1,11 +0,0 @@
1
- import { DomainDef } from '@nodescript/protocomm';
2
- import { Stage } from '../schema/Stage.js';
3
- export interface AutomationDomain {
4
- getStages(req: {}): Promise<{
5
- stages: Stage[];
6
- }>;
7
- executeStage(req: {
8
- stageKey: string;
9
- }): Promise<{}>;
10
- }
11
- export declare const AutomationDomain: DomainDef<AutomationDomain>;
@@ -1,25 +0,0 @@
1
- import { StageSchema } from '../schema/Stage.js';
2
- export const AutomationDomain = {
3
- name: 'Automation',
4
- methods: {
5
- getStages: {
6
- type: 'query',
7
- params: {},
8
- returns: {
9
- stages: {
10
- type: 'array',
11
- items: StageSchema.schema,
12
- },
13
- },
14
- },
15
- executeStage: {
16
- type: 'command',
17
- params: {
18
- stageKey: { type: 'string' },
19
- },
20
- returns: {},
21
- }
22
- },
23
- events: {}
24
- };
25
- //# sourceMappingURL=AutomationDomain.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AutomationDomain.js","sourceRoot":"","sources":["../../../src/main/domains/AutomationDomain.ts"],"names":[],"mappings":"AAEA,OAAO,EAAS,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAcxD,MAAM,CAAC,MAAM,gBAAgB,GAAgC;IACzD,IAAI,EAAE,YAAY;IAClB,OAAO,EAAE;QACL,SAAS,EAAE;YACP,IAAI,EAAE,OAAO;YACb,MAAM,EAAE,EAAE;YACV,OAAO,EAAE;gBACL,MAAM,EAAE;oBACJ,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE,WAAW,CAAC,MAAM;iBAC5B;aACJ;SACJ;QACD,YAAY,EAAE;YACV,IAAI,EAAE,SAAS;YACf,MAAM,EAAE;gBACJ,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;aAC/B;YACD,OAAO,EAAE,EAAE;SACd;KACJ;IACD,MAAM,EAAE,EAAE;CACb,CAAC"}
@@ -1,13 +0,0 @@
1
- import { Schema } from 'airtight';
2
- export interface Stage {
3
- key: string;
4
- title: string;
5
- initial: boolean;
6
- overlay: boolean;
7
- final?: 'success' | 'failure' | null;
8
- matchCode: string;
9
- executionCode: string;
10
- verifyCode?: string | null;
11
- matchOnce: boolean;
12
- }
13
- export declare const StageSchema: Schema<Stage>;
@@ -1,16 +0,0 @@
1
- import { Schema } from 'airtight';
2
- export const StageSchema = new Schema({
3
- type: 'object',
4
- properties: {
5
- key: { type: 'string' },
6
- title: { type: 'string' },
7
- initial: { type: 'boolean' },
8
- overlay: { type: 'boolean' },
9
- final: { type: 'string', nullable: true, optional: true },
10
- matchCode: { type: 'string' },
11
- executionCode: { type: 'string' },
12
- verifyCode: { type: 'string', nullable: true, optional: true },
13
- matchOnce: { type: 'boolean' },
14
- },
15
- });
16
- //# sourceMappingURL=Stage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Stage.js","sourceRoot":"","sources":["../../../src/main/schema/Stage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAclC,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,MAAM,CAAQ;IACzC,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACR,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QACvB,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QACzB,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;QAC5B,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;QAC5B,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE;QACzD,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC7B,aAAa,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QACjC,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC9D,SAAS,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;KACjC;CACJ,CAAC,CAAC"}