@gp2f/server 0.1.3 → 0.1.4

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.
Binary file
package/index.d.ts CHANGED
@@ -0,0 +1,29 @@
1
+ // Auto-resolve library typings for GP2F
2
+
3
+ export interface PolicyNode {
4
+ kind: string;
5
+ path?: string;
6
+ value?: string;
7
+ children?: PolicyNode[];
8
+ }
9
+
10
+ export interface ActivityConfig {
11
+ policy: PolicyNode;
12
+ }
13
+
14
+ export class JsGp2FServer {
15
+ constructor(config: { port: number });
16
+ register(workflow: JsWorkflow): void;
17
+ start(): Promise<void>;
18
+ }
19
+
20
+ export class JsWorkflow {
21
+ constructor(id: string);
22
+ addActivity(
23
+ name: string,
24
+ config: ActivityConfig,
25
+ handler: (ctx: any) => Promise<void>
26
+ ): void;
27
+ activityCount(): number;
28
+ id(): string;
29
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gp2f/server",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Native Node.js bindings for the GP2F policy engine – powered by napi-rs",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -10,8 +10,8 @@
10
10
  "gp2f_node.*.node"
11
11
  ],
12
12
  "scripts": {
13
- "build": "napi build --platform --release",
14
- "build:debug": "napi build --platform",
13
+ "build": "napi build --platform --release --dts .napi-empty.d.ts",
14
+ "build:debug": "napi build --platform --dts .napi-empty.d.ts",
15
15
  "artifacts": "napi artifacts",
16
16
  "test": "jest --passWithNoTests"
17
17
  },