@toolproof-npm/shared 0.1.89 → 0.1.91

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.
@@ -8,6 +8,7 @@ export declare const CONSTANTS: {
8
8
  readonly STORAGE: {
9
9
  readonly BUCKETS: {
10
10
  readonly tp_resources: "tp-resources";
11
+ readonly tp_strategies: "tp-strategies";
11
12
  };
12
13
  readonly COLLECTIONS: {
13
14
  readonly resources: "resources";
package/dist/constants.js CHANGED
@@ -8,6 +8,7 @@ export const CONSTANTS = {
8
8
  STORAGE: {
9
9
  BUCKETS: {
10
10
  tp_resources: 'tp-resources',
11
+ tp_strategies: 'tp-strategies',
11
12
  },
12
13
  COLLECTIONS: {
13
14
  resources: 'resources',
@@ -9,8 +9,12 @@ export function getNewIdentity(identifiable) {
9
9
  }
10
10
  export async function listResources(// ATTENTION: must clean up
11
11
  resourceTypeRefs) {
12
- const bucket = storageAdmin.bucket(CONSTANTS.STORAGE.BUCKETS.tp_resources);
12
+ const bucket_resources = storageAdmin.bucket(CONSTANTS.STORAGE.BUCKETS.tp_resources);
13
+ const bucket_strategies = storageAdmin.bucket(CONSTANTS.STORAGE.BUCKETS.tp_strategies);
13
14
  async function fetchFilesUnder(resourceTypeRef) {
15
+ const bucket = resourceTypeRef === CONSTANTS.SPECIALS.TYPE_StatefulStrategy
16
+ ? bucket_strategies
17
+ : bucket_resources;
14
18
  const prefix = `${resourceTypeRef}/`;
15
19
  const [found] = await bucket.getFiles({ prefix });
16
20
  const files = found.filter(f => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toolproof-npm/shared",
3
- "version": "0.1.89",
3
+ "version": "0.1.91",
4
4
  "description": "Core library utilities for ToolProof",
5
5
  "keywords": [
6
6
  "toolproof",
@@ -59,7 +59,7 @@
59
59
  "typescript": "^5.9.3"
60
60
  },
61
61
  "dependencies": {
62
- "@toolproof-npm/schema": "^0.1.65",
62
+ "@toolproof-npm/schema": "^0.1.67",
63
63
  "firebase-admin": "^13.6.0"
64
64
  }
65
65
  }