@toolproof-npm/shared 0.1.48 → 0.1.50

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.
@@ -42,7 +42,7 @@ export declare const CONSTANTS: {
42
42
  readonly workflowSpec: "workflowSpec";
43
43
  };
44
44
  readonly ENGINE: {
45
- readonly GraphRunWorkflow: "GraphRunWorkflow";
45
+ readonly GraphRunStrategy: "GraphRunStrategy";
46
46
  };
47
47
  readonly SPECIALS: {
48
48
  readonly FORMAT_ApplicationJson: "FORMAT-ApplicationJson";
package/dist/constants.js CHANGED
@@ -42,7 +42,7 @@ export const CONSTANTS = {
42
42
  workflowSpec: 'workflowSpec',
43
43
  },
44
44
  ENGINE: {
45
- GraphRunWorkflow: 'GraphRunWorkflow',
45
+ GraphRunStrategy: 'GraphRunStrategy',
46
46
  },
47
47
  SPECIALS: {
48
48
  FORMAT_ApplicationJson: 'FORMAT-ApplicationJson',
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export * as CONSTANTS from './constants.js';
2
2
  export * as TYPES from './types.js';
3
+ export * as UTILS from './utils.js';
3
4
  export * from './firebaseAdminHelpers.js';
4
5
  export * from './firebaseAdminInit.js';
5
- export * from './utils.js';
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export * as CONSTANTS from './constants.js';
2
2
  export * as TYPES from './types.js';
3
+ export * as UTILS from './utils.js';
3
4
  export * from './firebaseAdminHelpers.js';
4
5
  export * from './firebaseAdminInit.js';
5
- export * from './utils.js';
package/dist/utils.d.ts CHANGED
@@ -1,3 +1,4 @@
1
- import type { ResourceIdJson, ResourceTypeIdJson, ResourceJson } from '@toolproof-npm/schema';
1
+ import type { ResourceIdJson, ResourceTypeIdJson, ResourceJson, JobJson } from '@toolproof-npm/schema';
2
2
  import type { ResourceMap } from './types.js';
3
3
  export declare function extractResourcesByType(resourceMap: ResourceMap, resourceTypeId: ResourceTypeIdJson): Record<ResourceIdJson, ResourceJson>;
4
+ export declare function extractJobMap(resourceMap: ResourceMap): Map<string, JobJson>;
package/dist/utils.js CHANGED
@@ -6,3 +6,13 @@ export function extractResourcesByType(resourceMap, resourceTypeId) {
6
6
  }
7
7
  return result;
8
8
  }
9
+ export function extractJobMap(resourceMap) {
10
+ const resourceJobMap = extractResourcesByType(resourceMap, 'TYPE-Job');
11
+ const jobMap = new Map();
12
+ Object.values(resourceJobMap).forEach((resource) => {
13
+ if (resource.extractedData?.identity) {
14
+ jobMap.set(resource.extractedData.identity, resource.extractedData);
15
+ }
16
+ });
17
+ return jobMap;
18
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toolproof-npm/shared",
3
- "version": "0.1.48",
3
+ "version": "0.1.50",
4
4
  "description": "Core library utilities for ToolProof",
5
5
  "keywords": [
6
6
  "toolproof",
@@ -35,6 +35,10 @@
35
35
  "import": "./dist/types.js",
36
36
  "types": "./dist/types.d.ts"
37
37
  },
38
+ "./utils": {
39
+ "import": "./dist/utils.js",
40
+ "types": "./dist/utils.d.ts"
41
+ },
38
42
  "./server": {
39
43
  "node": "./dist/firebaseAdminHelpers.js",
40
44
  "types": "./dist/firebaseAdminHelpers.d.ts"
@@ -52,7 +56,7 @@
52
56
  "typescript": "^5.9.3"
53
57
  },
54
58
  "dependencies": {
55
- "@toolproof-npm/schema": "^0.1.40",
59
+ "@toolproof-npm/schema": "^0.1.41",
56
60
  "firebase-admin": "^13.6.0"
57
61
  },
58
62
  "scripts": {