@cloud-copilot/iam-data 0.1.202408301 → 0.2.202408302

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.
Files changed (59) hide show
  1. package/README.md +19 -19
  2. package/dist/cjs/actions.d.ts +3 -3
  3. package/dist/cjs/actions.d.ts.map +1 -1
  4. package/dist/cjs/actions.js +10 -10
  5. package/dist/cjs/actions.js.map +1 -1
  6. package/dist/cjs/conditionKeys.d.ts +3 -3
  7. package/dist/cjs/conditionKeys.d.ts.map +1 -1
  8. package/dist/cjs/conditionKeys.js +10 -10
  9. package/dist/cjs/conditionKeys.js.map +1 -1
  10. package/dist/cjs/data.d.ts +1 -7
  11. package/dist/cjs/data.d.ts.map +1 -1
  12. package/dist/cjs/data.js +8 -25
  13. package/dist/cjs/data.js.map +1 -1
  14. package/dist/cjs/index.d.ts +5 -5
  15. package/dist/cjs/index.d.ts.map +1 -1
  16. package/dist/cjs/index.js +5 -5
  17. package/dist/cjs/index.js.map +1 -1
  18. package/dist/cjs/readRelativeFile.d.ts +8 -0
  19. package/dist/cjs/readRelativeFile.d.ts.map +1 -0
  20. package/dist/cjs/readRelativeFile.js +19 -0
  21. package/dist/cjs/readRelativeFile.js.map +1 -0
  22. package/dist/cjs/resourceTypes.d.ts +3 -3
  23. package/dist/cjs/resourceTypes.d.ts.map +1 -1
  24. package/dist/cjs/resourceTypes.js +10 -10
  25. package/dist/cjs/resourceTypes.js.map +1 -1
  26. package/dist/cjs/services.d.ts +3 -3
  27. package/dist/cjs/services.d.ts.map +1 -1
  28. package/dist/cjs/services.js +10 -10
  29. package/dist/cjs/services.js.map +1 -1
  30. package/dist/esm/actions.d.ts +3 -3
  31. package/dist/esm/actions.d.ts.map +1 -1
  32. package/dist/esm/actions.js +4 -4
  33. package/dist/esm/actions.js.map +1 -1
  34. package/dist/esm/conditionKeys.d.ts +3 -3
  35. package/dist/esm/conditionKeys.d.ts.map +1 -1
  36. package/dist/esm/conditionKeys.js +4 -4
  37. package/dist/esm/conditionKeys.js.map +1 -1
  38. package/dist/esm/data.d.ts +1 -7
  39. package/dist/esm/data.d.ts.map +1 -1
  40. package/dist/esm/data.js +8 -25
  41. package/dist/esm/data.js.map +1 -1
  42. package/dist/esm/index.d.ts +5 -5
  43. package/dist/esm/index.d.ts.map +1 -1
  44. package/dist/esm/index.js +5 -5
  45. package/dist/esm/index.js.map +1 -1
  46. package/dist/esm/readRelativeFile.d.ts +8 -0
  47. package/dist/esm/readRelativeFile.d.ts.map +1 -0
  48. package/dist/esm/readRelativeFile.js +18 -0
  49. package/dist/esm/readRelativeFile.js.map +1 -0
  50. package/dist/esm/readRelativeFileEsm.d.ts.map +1 -0
  51. package/dist/esm/resourceTypes.d.ts +3 -3
  52. package/dist/esm/resourceTypes.d.ts.map +1 -1
  53. package/dist/esm/resourceTypes.js +4 -4
  54. package/dist/esm/resourceTypes.js.map +1 -1
  55. package/dist/esm/services.d.ts +3 -3
  56. package/dist/esm/services.d.ts.map +1 -1
  57. package/dist/esm/services.js +4 -4
  58. package/dist/esm/services.js.map +1 -1
  59. package/package.json +4 -6
package/README.md CHANGED
@@ -10,14 +10,14 @@ npm install @cloud-copilot/iam-data
10
10
  ```
11
11
 
12
12
  ```typescript
13
- import { allServiceKeys, getActionDetails, getActionsForService, getServiceName } from '@cloud-copilot/iam-data';
13
+ import { iamServiceKeys, iamActionDetails, iamActionsForService, iamServiceName } from '@cloud-copilot/iam-data';
14
14
 
15
15
  // Iterate through all actions in all services
16
- for(const serviceKey of allServiceKeys()) {
17
- console.log(`Getting Actions for ${getServiceName(serviceKey)}`);
18
- const actions = getActionsForService(serviceKey);
16
+ for(const serviceKey of iamServiceKeys()) {
17
+ console.log(`Getting Actions for ${iamServiceName(serviceKey)}`);
18
+ const actions = iamActionsForService(serviceKey);
19
19
  for(const action of actions) {
20
- const actionDetails = getActionDetails(serviceKey, action);
20
+ const actionDetails = iamActionDetails(serviceKey, action);
21
21
  console.log(actionDetails);
22
22
  }
23
23
  }
@@ -25,24 +25,24 @@ for(const serviceKey of allServiceKeys()) {
25
25
 
26
26
  ## API
27
27
  ### Services
28
- * `allServiceKeys()` - Returns an array of all service keys such as 's3', 'ec2', etc.
29
- * `getServiceName(serviceKey: string)` - Returns the service name for a given service key.
30
- * `serviceExists(serviceKey: string)` - Returns true if the service key exists.
28
+ * `iamServiceKeys()` - Returns an array of all service keys such as 's3', 'ec2', etc.
29
+ * `iamServiceName(serviceKey: string)` - Returns the service name for a given service key.
30
+ * `iamServiceExists(serviceKey: string)` - Returns true if the service key exists.
31
31
 
32
32
  ### Actions
33
- * `allActions(serviceKey: string)` - Returns an array of all actions for a given service key.
34
- * `getActionDetails(action: string)` - Returns an object with the action details such as `description`, `resourceTypes`, and `conditionKeys`.
35
- * `actionExists(action: string)` - Returns true if the action exists.
33
+ * `iamActionsForService(serviceKey: string)` - Returns an array of all actions for a given service key.
34
+ * `iamActionDetails(serviceKey: string, actionKey: string)` - Returns an object with the action details such as `description`, `resourceTypes`, and `conditionKeys`.
35
+ * `iamActionExists(serviceKey: string, actionKey: string)` - Returns true if the action exists.
36
36
 
37
37
  ### Resources
38
- * `allResourceTypes(serviceKey: string)` - Returns an array of all resource types for a given service key.
39
- * `getResourceTypeDetails(serviceKey: string, resourceType: string)` - Returns an object with the resource type details such as `description`, `arnFormat`, and `conditionKeys`.
40
- * `resourceTypeExists(serviceKey: string, resourceType: string)` - Returns true if the resource type exists.
41
-
42
- ### Conditions
43
- * `allConditionKeys(serviceKey: string)` - Returns an array of all condition keys for a given service key.
44
- * `getConditionKeyDetails(serviceKey: string, conditionKey: string)` - Returns an object with the condition key details such as `description`, `conditionValueTypes`, and `conditionOperators`.
45
- * `conditionKeyExists(serviceKey: string, conditionKey: string)` - Returns true if the condition key exists.
38
+ * `iamResourceTypesForService(serviceKey: string)` - Returns an array of all resource types for a given service key.
39
+ * `iamResourceTypeDetails(serviceKey: string, resourceTypeKey: string)` - Returns an object with the resource type details such as `description`, `arnFormat`, and `conditionKeys`.
40
+ * `iamResourceTypeExists(serviceKey: string, resourceTypeKey: string)` - Returns true if the resource type exists.
41
+
42
+ ### Conditions Keys
43
+ * `iamConditionKeysForService(serviceKey: string)` - Returns an array of all condition keys for a given service key.
44
+ * `iamConditionKeyDetails(serviceKey: string, conditionKey: string)` - Returns an object with the condition key details such as `description`, `conditionValueTypes`, and `conditionOperators`.
45
+ * `iamConditionKeyExists(serviceKey: string, conditionKey: string)` - Returns true if the condition key exists.
46
46
 
47
47
  ### Version Info
48
48
  The version is numper is formatted as `major.minor.updatedAt`. The updatedAt is the date the data was last updated in the format `YYYYMMDDX` where `X` is a counter to enable deploying more than once per day if necessary. For example version `0.1.202408291` has data updated on August 29th, 2024.
@@ -18,7 +18,7 @@ interface Action {
18
18
  * @param serviceKey the service key to get actions for
19
19
  * @returns the actions for the service
20
20
  */
21
- export declare function getActionsForService(serviceKey: string): string[];
21
+ export declare function iamActionsForService(serviceKey: string): string[];
22
22
  /**
23
23
  * Check if an action exists
24
24
  *
@@ -26,7 +26,7 @@ export declare function getActionsForService(serviceKey: string): string[];
26
26
  * @param actionKey the action key to check for
27
27
  * @returns true if the action exists, false otherwise
28
28
  */
29
- export declare function actionExists(serviceKey: string, actionKey: string): boolean;
29
+ export declare function iamActionExists(serviceKey: string, actionKey: string): boolean;
30
30
  /**
31
31
  * Get the details for an action
32
32
  *
@@ -35,6 +35,6 @@ export declare function actionExists(serviceKey: string, actionKey: string): boo
35
35
  * @throws error if the service or action does not exist
36
36
  * @returns the details for the action
37
37
  */
38
- export declare function getActionDetails(serviceKey: string, actionKey: string): Action;
38
+ export declare function iamActionDetails(serviceKey: string, actionKey: string): Action;
39
39
  export {};
40
40
  //# sourceMappingURL=actions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/actions.ts"],"names":[],"mappings":"AAEA,UAAU,kBAAkB;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,OAAO,CA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ED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAG9E;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAM9E"}
@@ -1,17 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getActionsForService = getActionsForService;
4
- exports.actionExists = actionExists;
5
- exports.getActionDetails = getActionDetails;
6
- const data_1 = require("./data");
3
+ exports.iamActionsForService = iamActionsForService;
4
+ exports.iamActionExists = iamActionExists;
5
+ exports.iamActionDetails = iamActionDetails;
6
+ const data_js_1 = require("./data.js");
7
7
  /**
8
8
  * Get all actions for a service
9
9
  *
10
10
  * @param serviceKey the service key to get actions for
11
11
  * @returns the actions for the service
12
12
  */
13
- function getActionsForService(serviceKey) {
14
- const data = (0, data_1.readActionData)(serviceKey);
13
+ function iamActionsForService(serviceKey) {
14
+ const data = (0, data_js_1.readActionData)(serviceKey);
15
15
  return Object.keys(data);
16
16
  }
17
17
  /**
@@ -21,8 +21,8 @@ function getActionsForService(serviceKey) {
21
21
  * @param actionKey the action key to check for
22
22
  * @returns true if the action exists, false otherwise
23
23
  */
24
- function actionExists(serviceKey, actionKey) {
25
- const data = (0, data_1.readActionData)(serviceKey);
24
+ function iamActionExists(serviceKey, actionKey) {
25
+ const data = (0, data_js_1.readActionData)(serviceKey);
26
26
  return !!data[actionKey];
27
27
  }
28
28
  /**
@@ -33,8 +33,8 @@ function actionExists(serviceKey, actionKey) {
33
33
  * @throws error if the service or action does not exist
34
34
  * @returns the details for the action
35
35
  */
36
- function getActionDetails(serviceKey, actionKey) {
37
- const data = (0, data_1.readActionData)(serviceKey);
36
+ function iamActionDetails(serviceKey, actionKey) {
37
+ const data = (0, data_js_1.readActionData)(serviceKey);
38
38
  if (!data[actionKey]) {
39
39
  throw new Error(`Action ${actionKey} does not exist for service ${serviceKey}`);
40
40
  }
@@ -1 +1 @@
1
- {"version":3,"file":"actions.js","sourceRoot":"","sources":["../../src/actions.ts"],"names":[],"mappings":";;AAwBA,oDAGC;AASD,oCAGC;AAUD,4CAMC;AAvDD,iCAAuC;AAkBvC;;;;;GAKG;AACH,SAAgB,oBAAoB,CAAC,UAAkB;IACrD,MAAM,IAAI,GAAG,IAAA,qBAAc,EAAyB,UAAU,CAAC,CAAA;IAC/D,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AAC1B,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,YAAY,CAAC,UAAkB,EAAE,SAAiB;IAChE,MAAM,IAAI,GAAG,IAAA,qBAAc,EAAyB,UAAU,CAAC,CAAA;IAC/D,OAAO,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;AAC1B,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,gBAAgB,CAAC,UAAkB,EAAE,SAAiB;IACpE,MAAM,IAAI,GAAG,IAAA,qBAAc,EAAyB,UAAU,CAAC,CAAA;IAC/D,IAAG,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CAAC,UAAU,SAAS,+BAA+B,UAAU,EAAE,CAAC,CAAA;IACjF,CAAC;IACD,OAAO,IAAI,CAAC,SAAS,CAAC,CAAA;AACxB,CAAC"}
1
+ {"version":3,"file":"actions.js","sourceRoot":"","sources":["../../src/actions.ts"],"names":[],"mappings":";;AAwBA,oDAGC;AASD,0CAGC;AAUD,4CAMC;AAvDD,uCAA0C;AAkB1C;;;;;GAKG;AACH,SAAgB,oBAAoB,CAAC,UAAkB;IACrD,MAAM,IAAI,GAAG,IAAA,wBAAc,EAAyB,UAAU,CAAC,CAAA;IAC/D,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AAC1B,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,eAAe,CAAC,UAAkB,EAAE,SAAiB;IACnE,MAAM,IAAI,GAAG,IAAA,wBAAc,EAAyB,UAAU,CAAC,CAAA;IAC/D,OAAO,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;AAC1B,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,gBAAgB,CAAC,UAAkB,EAAE,SAAiB;IACpE,MAAM,IAAI,GAAG,IAAA,wBAAc,EAAyB,UAAU,CAAC,CAAA;IAC/D,IAAG,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CAAC,UAAU,SAAS,+BAA+B,UAAU,EAAE,CAAC,CAAA;IACjF,CAAC;IACD,OAAO,IAAI,CAAC,SAAS,CAAC,CAAA;AACxB,CAAC"}
@@ -9,7 +9,7 @@ export interface ConditionKey {
9
9
  * @param serviceKey the service key to read the condition keys for
10
10
  * @returns the condition keys for the service
11
11
  */
12
- export declare function getConditionKeysForService(serviceKey: string): string[];
12
+ export declare function iamConditionKeysForService(serviceKey: string): string[];
13
13
  /**
14
14
  * Check if a condition key exists
15
15
  *
@@ -17,7 +17,7 @@ export declare function getConditionKeysForService(serviceKey: string): string[]
17
17
  * @param conditionKey the condition key to check for
18
18
  * @returns true if the condition key exists, false otherwise
19
19
  */
20
- export declare function conditionKeyExists(serviceKey: string, conditionKey: string): boolean;
20
+ export declare function iamConditionKeyExists(serviceKey: string, conditionKey: string): boolean;
21
21
  /**
22
22
  * Get the details for a condition key
23
23
  *
@@ -26,5 +26,5 @@ export declare function conditionKeyExists(serviceKey: string, conditionKey: str
26
26
  * @throws error if the service or condition key does not exist
27
27
  * @returns the details for the condition key
28
28
  */
29
- export declare function getConditionKeyDetails(serviceKey: string, conditionKey: string): ConditionKey;
29
+ export declare function iamConditionKeyDetails(serviceKey: string, conditionKey: string): ConditionKey;
30
30
  //# sourceMappingURL=conditionKeys.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"conditionKeys.d.ts","sourceRoot":"","sources":["../../src/conditionKeys.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAA;CACb;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CAGvE;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAGpF;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,YAAY,CAM7F"}
1
+ {"version":3,"file":"conditionKeys.d.ts","sourceRoot":"","sources":["../../src/conditionKeys.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAA;CACb;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CAGvE;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAGvF;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,YAAY,CAM7F"}
@@ -1,17 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getConditionKeysForService = getConditionKeysForService;
4
- exports.conditionKeyExists = conditionKeyExists;
5
- exports.getConditionKeyDetails = getConditionKeyDetails;
6
- const data_1 = require("./data");
3
+ exports.iamConditionKeysForService = iamConditionKeysForService;
4
+ exports.iamConditionKeyExists = iamConditionKeyExists;
5
+ exports.iamConditionKeyDetails = iamConditionKeyDetails;
6
+ const data_js_1 = require("./data.js");
7
7
  /**
8
8
  * Reads the condition keys for a service
9
9
  *
10
10
  * @param serviceKey the service key to read the condition keys for
11
11
  * @returns the condition keys for the service
12
12
  */
13
- function getConditionKeysForService(serviceKey) {
14
- const data = (0, data_1.readConditionKeys)(serviceKey);
13
+ function iamConditionKeysForService(serviceKey) {
14
+ const data = (0, data_js_1.readConditionKeys)(serviceKey);
15
15
  return Object.keys(data);
16
16
  }
17
17
  /**
@@ -21,8 +21,8 @@ function getConditionKeysForService(serviceKey) {
21
21
  * @param conditionKey the condition key to check for
22
22
  * @returns true if the condition key exists, false otherwise
23
23
  */
24
- function conditionKeyExists(serviceKey, conditionKey) {
25
- const data = (0, data_1.readConditionKeys)(serviceKey);
24
+ function iamConditionKeyExists(serviceKey, conditionKey) {
25
+ const data = (0, data_js_1.readConditionKeys)(serviceKey);
26
26
  return !!data[conditionKey];
27
27
  }
28
28
  /**
@@ -33,8 +33,8 @@ function conditionKeyExists(serviceKey, conditionKey) {
33
33
  * @throws error if the service or condition key does not exist
34
34
  * @returns the details for the condition key
35
35
  */
36
- function getConditionKeyDetails(serviceKey, conditionKey) {
37
- const data = (0, data_1.readConditionKeys)(serviceKey);
36
+ function iamConditionKeyDetails(serviceKey, conditionKey) {
37
+ const data = (0, data_js_1.readConditionKeys)(serviceKey);
38
38
  if (!data[conditionKey]) {
39
39
  throw new Error(`Condition key ${conditionKey} does not exist for service ${serviceKey}`);
40
40
  }
@@ -1 +1 @@
1
- {"version":3,"file":"conditionKeys.js","sourceRoot":"","sources":["../../src/conditionKeys.ts"],"names":[],"mappings":";;AAcA,gEAGC;AASD,gDAGC;AAUD,wDAMC;AA7CD,iCAA0C;AAQ1C;;;;;GAKG;AACH,SAAgB,0BAA0B,CAAC,UAAkB;IAC3D,MAAM,IAAI,GAAG,IAAA,wBAAiB,EAA+B,UAAU,CAAC,CAAA;IACxE,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AAC1B,CAAC;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,IAAI,KAAK,CAAC,iBAAiB,YAAY,+BAA+B,UAAU,EAAE,CAAC,CAAA;IAC3F,CAAC;IACD,OAAO,IAAI,CAAC,YAAY,CAAC,CAAA;AAC3B,CAAC"}
@@ -1,10 +1,4 @@
1
- /**
2
- * Get a data file from the data directory
3
- *
4
- * @param file the path to the file to retrieve data for.
5
- * @returns the data from the file
6
- */
7
- export declare function readDataFile<T>(file: string): T;
1
+ export declare function readDataFile<T>(...pathParts: string[]): T;
8
2
  /**
9
3
  * Read the action data for a service
10
4
  *
@@ -1 +1 @@
1
- {"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../src/data.ts"],"names":[],"mappings":"AAoBA;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,CAM/C;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC,CAEvD;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC,CAE1D;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC,CAE1D"}
1
+ {"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../src/data.ts"],"names":[],"mappings":"AAKA,wBAAgB,YAAY,CAAC,CAAC,EAAE,GAAG,SAAS,EAAE,MAAM,EAAE,GAAG,CAAC,CAQzD;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC,CAEvD;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC,CAE1D;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC,CAE1D"}
package/dist/cjs/data.js CHANGED
@@ -4,31 +4,14 @@ exports.readDataFile = readDataFile;
4
4
  exports.readActionData = readActionData;
5
5
  exports.readConditionKeys = readConditionKeys;
6
6
  exports.readResourceTypes = readResourceTypes;
7
- const fs_1 = require("fs");
8
7
  const path_1 = require("path");
9
- let dataRoot = (0, path_1.join)(__dirname, '..', '..', 'data');
10
- if (__dirname.endsWith('src')) {
11
- dataRoot = (0, path_1.join)(__dirname, '..', 'data');
12
- }
13
- /**
14
- * Get the root path to the data directory
15
- *
16
- * @returns the root path to the data directory
17
- */
18
- // function dataRoot(): string {
19
- // console.log(__dirname);
20
- // return join(__dirname, '..', 'data');
21
- // }
8
+ const readRelativeFile_js_1 = require("./readRelativeFile.js");
22
9
  const dataCache = {};
23
- /**
24
- * Get a data file from the data directory
25
- *
26
- * @param file the path to the file to retrieve data for.
27
- * @returns the data from the file
28
- */
29
- function readDataFile(file) {
10
+ function readDataFile(...pathParts) {
11
+ pathParts.unshift('data');
12
+ const file = (0, path_1.join)(...pathParts);
30
13
  if (!dataCache[file]) {
31
- const data = (0, fs_1.readFileSync)((0, path_1.join)(dataRoot, file), 'utf8');
14
+ const data = (0, readRelativeFile_js_1.readRelativeFile)(pathParts);
32
15
  dataCache[file] = JSON.parse(data);
33
16
  }
34
17
  return dataCache[file];
@@ -40,7 +23,7 @@ function readDataFile(file) {
40
23
  * @returns the action data for the service
41
24
  */
42
25
  function readActionData(serviceKey) {
43
- return readDataFile((0, path_1.join)('actions', `${serviceKey}.json`));
26
+ return readDataFile('actions', `${serviceKey}.json`);
44
27
  }
45
28
  /**
46
29
  * Read the condition key data for a service
@@ -49,7 +32,7 @@ function readActionData(serviceKey) {
49
32
  * @returns the condition key data
50
33
  */
51
34
  function readConditionKeys(serviceKey) {
52
- return readDataFile((0, path_1.join)('conditionKeys', `${serviceKey}.json`));
35
+ return readDataFile('conditionKeys', `${serviceKey}.json`);
53
36
  }
54
37
  /**
55
38
  * Read the resource type data for a service
@@ -58,6 +41,6 @@ function readConditionKeys(serviceKey) {
58
41
  * @returns the resource type data
59
42
  */
60
43
  function readResourceTypes(serviceKey) {
61
- return readDataFile((0, path_1.join)('resourceTypes', `${serviceKey}.json`));
44
+ return readDataFile('resourceTypes', `${serviceKey}.json`);
62
45
  }
63
46
  //# sourceMappingURL=data.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"data.js","sourceRoot":"","sources":["../../src/data.ts"],"names":[],"mappings":";;AA0BA,oCAMC;AAQD,wCAEC;AAQD,8CAEC;AAQD,8CAEC;AA9DD,2BAAkC;AAClC,+BAA4B;AAE5B,IAAI,QAAQ,GAAG,IAAA,WAAI,EAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AACnD,IAAG,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;IAC7B,QAAQ,GAAG,IAAA,WAAI,EAAC,SAAS,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AAC3C,CAAC;AAED;;;;GAIG;AACH,gCAAgC;AAChC,4BAA4B;AAC5B,0CAA0C;AAC1C,IAAI;AAEJ,MAAM,SAAS,GAAwB,EAAE,CAAC;AAE1C;;;;;GAKG;AACH,SAAgB,YAAY,CAAI,IAAY;IAC1C,IAAG,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;QACpB,MAAM,IAAI,GAAG,IAAA,iBAAY,EAAC,IAAA,WAAI,EAAC,QAAQ,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC;QACxD,SAAS,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACrC,CAAC;IACD,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC;AACzB,CAAC;AAED;;;;;GAKG;AACH,SAAgB,cAAc,CAAI,UAAkB;IAClD,OAAO,YAAY,CAAI,IAAA,WAAI,EAAC,SAAS,EAAE,GAAG,UAAU,OAAO,CAAC,CAAC,CAAC;AAChE,CAAC;AAED;;;;;GAKG;AACH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,UAAU,OAAO,CAAC,CAAC;AAChE,CAAC"}
@@ -1,6 +1,6 @@
1
- export * from './actions';
2
- export * from './conditionKeys';
3
- export * from './resourceTypes';
4
- export * from './services';
5
- export * from './version';
1
+ export * from './actions.js';
2
+ export * from './conditionKeys.js';
3
+ export * from './resourceTypes.js';
4
+ export * from './services.js';
5
+ export * from './version.js';
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA"}
package/dist/cjs/index.js CHANGED
@@ -14,9 +14,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./actions"), exports);
18
- __exportStar(require("./conditionKeys"), exports);
19
- __exportStar(require("./resourceTypes"), exports);
20
- __exportStar(require("./services"), exports);
21
- __exportStar(require("./version"), exports);
17
+ __exportStar(require("./actions.js"), exports);
18
+ __exportStar(require("./conditionKeys.js"), exports);
19
+ __exportStar(require("./resourceTypes.js"), exports);
20
+ __exportStar(require("./services.js"), exports);
21
+ __exportStar(require("./version.js"), exports);
22
22
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,kDAAgC;AAChC,kDAAgC;AAChC,6CAA2B;AAC3B,4CAA0B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA4B;AAC5B,qDAAkC;AAClC,qDAAkC;AAClC,gDAA6B;AAC7B,+CAA4B"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Get a data file from the data directory in CommonJS
3
+ *
4
+ * @param file the path to the file to retrieve data for.
5
+ * @returns the data from the file
6
+ */
7
+ export declare function readRelativeFile(pathParts: string[]): string;
8
+ //# sourceMappingURL=readRelativeFile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readRelativeFile.d.ts","sourceRoot":"","sources":["../../src/readRelativeFile.ts"],"names":[],"mappings":"AAQA;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,MAAM,CAE5D"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.readRelativeFile = readRelativeFile;
4
+ const fs_1 = require("fs");
5
+ const path_1 = require("path");
6
+ let root = (0, path_1.join)(__dirname, '..', '..');
7
+ if (__dirname.endsWith('src')) {
8
+ root = (0, path_1.join)(__dirname, '..');
9
+ }
10
+ /**
11
+ * Get a data file from the data directory in CommonJS
12
+ *
13
+ * @param file the path to the file to retrieve data for.
14
+ * @returns the data from the file
15
+ */
16
+ function readRelativeFile(pathParts) {
17
+ return (0, fs_1.readFileSync)((0, path_1.join)(root, ...pathParts), 'utf8');
18
+ }
19
+ //# sourceMappingURL=readRelativeFile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readRelativeFile.js","sourceRoot":"","sources":["../../src/readRelativeFile.ts"],"names":[],"mappings":";;AAcA,4CAEC;AAhBD,2BAAkC;AAClC,+BAA4B;AAE5B,IAAI,IAAI,GAAG,IAAA,WAAI,EAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AACvC,IAAG,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;IAC7B,IAAI,GAAG,IAAA,WAAI,EAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAC/B,CAAC;AAED;;;;;GAKG;AACH,SAAgB,gBAAgB,CAAC,SAAmB;IAClD,OAAO,IAAA,iBAAY,EAAC,IAAA,WAAI,EAAC,IAAI,EAAE,GAAG,SAAS,CAAC,EAAE,MAAM,CAAC,CAAC;AACxD,CAAC"}
@@ -8,7 +8,7 @@ export interface ResourceType {
8
8
  * @param serviceKey the service key to get the resource types for
9
9
  * @returns the resource types for the service
10
10
  */
11
- export declare function resourceTypesForService(serviceKey: string): string[];
11
+ export declare function iamResourceTypesForService(serviceKey: string): string[];
12
12
  /**
13
13
  * Check if a resource type exists for a service and resource type key
14
14
  *
@@ -16,7 +16,7 @@ export declare function resourceTypesForService(serviceKey: string): string[];
16
16
  * @param resourceTypeKey the resource type key to check for
17
17
  * @returns true if the resource type exists, false otherwise
18
18
  */
19
- export declare function resourceTypeExists(serviceKey: string, resourceTypeKey: string): boolean;
19
+ export declare function iamResourceTypeExists(serviceKey: string, resourceTypeKey: string): boolean;
20
20
  /**
21
21
  * Get the resource type for a service and resource type key
22
22
  *
@@ -25,5 +25,5 @@ export declare function resourceTypeExists(serviceKey: string, resourceTypeKey:
25
25
  * @throws an error if the resource type does not exist
26
26
  * @returns the resource type
27
27
  */
28
- export declare function getResourceTypeDetails(serviceKey: string, resourceTypeKey: string): ResourceType;
28
+ export declare function iamResourceTypeDetails(serviceKey: string, resourceTypeKey: string): ResourceType;
29
29
  //# sourceMappingURL=resourceTypes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"resourceTypes.d.ts","sourceRoot":"","sources":["../../src/resourceTypes.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CAGpE;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,OAAO,CAGvF;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,YAAY,CAMhG"}
1
+ {"version":3,"file":"resourceTypes.d.ts","sourceRoot":"","sources":["../../src/resourceTypes.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CAGvE;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,OAAO,CAG1F;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,YAAY,CAMhG"}
@@ -1,16 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.resourceTypesForService = resourceTypesForService;
4
- exports.resourceTypeExists = resourceTypeExists;
5
- exports.getResourceTypeDetails = getResourceTypeDetails;
6
- const data_1 = require("./data");
3
+ exports.iamResourceTypesForService = iamResourceTypesForService;
4
+ exports.iamResourceTypeExists = iamResourceTypeExists;
5
+ exports.iamResourceTypeDetails = iamResourceTypeDetails;
6
+ const data_js_1 = require("./data.js");
7
7
  /**
8
8
  *
9
9
  * @param serviceKey the service key to get the resource types for
10
10
  * @returns the resource types for the service
11
11
  */
12
- function resourceTypesForService(serviceKey) {
13
- const data = (0, data_1.readResourceTypes)(serviceKey);
12
+ function iamResourceTypesForService(serviceKey) {
13
+ const data = (0, data_js_1.readResourceTypes)(serviceKey);
14
14
  return Object.keys(data);
15
15
  }
16
16
  /**
@@ -20,8 +20,8 @@ function resourceTypesForService(serviceKey) {
20
20
  * @param resourceTypeKey the resource type key to check for
21
21
  * @returns true if the resource type exists, false otherwise
22
22
  */
23
- function resourceTypeExists(serviceKey, resourceTypeKey) {
24
- const data = (0, data_1.readResourceTypes)(serviceKey);
23
+ function iamResourceTypeExists(serviceKey, resourceTypeKey) {
24
+ const data = (0, data_js_1.readResourceTypes)(serviceKey);
25
25
  return !!data[resourceTypeKey];
26
26
  }
27
27
  /**
@@ -32,8 +32,8 @@ function resourceTypeExists(serviceKey, resourceTypeKey) {
32
32
  * @throws an error if the resource type does not exist
33
33
  * @returns the resource type
34
34
  */
35
- function getResourceTypeDetails(serviceKey, resourceTypeKey) {
36
- const data = (0, data_1.readResourceTypes)(serviceKey);
35
+ function iamResourceTypeDetails(serviceKey, resourceTypeKey) {
36
+ const data = (0, data_js_1.readResourceTypes)(serviceKey);
37
37
  if (!data[resourceTypeKey]) {
38
38
  throw new Error(`Resource type ${resourceTypeKey} does not exist for service ${serviceKey}`);
39
39
  }
@@ -1 +1 @@
1
- {"version":3,"file":"resourceTypes.js","sourceRoot":"","sources":["../../src/resourceTypes.ts"],"names":[],"mappings":";;AAaA,0DAGC;AASD,gDAGC;AAUD,wDAMC;AA5CD,iCAA2C;AAQ3C;;;;GAIG;AACH,SAAgB,uBAAuB,CAAC,UAAkB;IACxD,MAAM,IAAI,GAAG,IAAA,wBAAiB,EAA+B,UAAU,CAAC,CAAC;IACzE,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AAC1B,CAAC;AA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I,KAAK,CAAC,iBAAiB,eAAe,+BAA+B,UAAU,EAAE,CAAC,CAAC;IAC/F,CAAC;IACD,OAAO,IAAI,CAAC,eAAe,CAAC,CAAC;AAC/B,CAAC"}
@@ -3,14 +3,14 @@
3
3
  *
4
4
  * @returns an array of all service keys
5
5
  */
6
- export declare function allServiceKeys(): string[];
6
+ export declare function iamServiceKeys(): string[];
7
7
  /**
8
8
  * Check if a service exists
9
9
  *
10
10
  * @param serviceKey the service key to check
11
11
  * @returns true if the service exists, false otherwise
12
12
  */
13
- export declare function serviceExists(serviceKey: string): boolean;
13
+ export declare function iamServiceExists(serviceKey: string): boolean;
14
14
  /**
15
15
  * Get the name of a service
16
16
  *
@@ -18,5 +18,5 @@ export declare function serviceExists(serviceKey: string): boolean;
18
18
  * @throws error if the service does not exist
19
19
  * @returns the name of the service
20
20
  */
21
- export declare function getServiceName(serviceKey: string): string;
21
+ export declare function iamServiceName(serviceKey: string): string;
22
22
  //# sourceMappingURL=services.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../src/services.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,MAAM,EAAE,CAEzC;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAGzD;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAMzD"}
1
+ {"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../src/services.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,MAAM,EAAE,CAEzC;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAG5D;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAMzD"}
@@ -1,16 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.allServiceKeys = allServiceKeys;
4
- exports.serviceExists = serviceExists;
5
- exports.getServiceName = getServiceName;
6
- const data_1 = require("./data");
3
+ exports.iamServiceKeys = iamServiceKeys;
4
+ exports.iamServiceExists = iamServiceExists;
5
+ exports.iamServiceName = iamServiceName;
6
+ const data_js_1 = require("./data.js");
7
7
  /**
8
8
  * Get keys for all services
9
9
  *
10
10
  * @returns an array of all service keys
11
11
  */
12
- function allServiceKeys() {
13
- return (0, data_1.readDataFile)('services.json');
12
+ function iamServiceKeys() {
13
+ return (0, data_js_1.readDataFile)('services.json');
14
14
  }
15
15
  /**
16
16
  * Check if a service exists
@@ -18,8 +18,8 @@ function allServiceKeys() {
18
18
  * @param serviceKey the service key to check
19
19
  * @returns true if the service exists, false otherwise
20
20
  */
21
- function serviceExists(serviceKey) {
22
- const data = (0, data_1.readDataFile)('serviceNames.json');
21
+ function iamServiceExists(serviceKey) {
22
+ const data = (0, data_js_1.readDataFile)('serviceNames.json');
23
23
  return !!data[serviceKey];
24
24
  }
25
25
  /**
@@ -29,8 +29,8 @@ function serviceExists(serviceKey) {
29
29
  * @throws error if the service does not exist
30
30
  * @returns the name of the service
31
31
  */
32
- function getServiceName(serviceKey) {
33
- const data = (0, data_1.readDataFile)('serviceNames.json');
32
+ function iamServiceName(serviceKey) {
33
+ const data = (0, data_js_1.readDataFile)('serviceNames.json');
34
34
  if (!data[serviceKey]) {
35
35
  throw new Error(`Service ${serviceKey} does not exist`);
36
36
  }
@@ -1 +1 @@
1
- {"version":3,"file":"services.js","sourceRoot":"","sources":["../../src/services.ts"],"names":[],"mappings":";;AAOA,wCAEC;AAQD,sCAGC;AASD,wCAMC;AAnCD,iCAAsC;AAEtC;;;;GAIG;AACH,SAAgB,cAAc;IAC5B,OAAO,IAAA,mBAAY,EAAW,eAAe,CAAC,CAAA;AAChD,CAAC;AAED;;;;;GAKG;AACH,SAAgB,aAAa,CAAC,UAAkB;IAC9C,MAAM,IAAI,GAAG,IAAA,mBAAY,EAAyB,mBAAmB,CAAC,CAAA;IACtE,OAAO,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;AAC5B,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,cAAc,CAAC,UAAkB;IAC/C,MAAM,IAAI,GAAG,IAAA,mBAAY,EAAyB,mBAAmB,CAAC,CAAA;IACtE,IAAG,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;QACrB,MAAM,IAAI,KAAK,CAAC,WAAW,UAAU,iBAAiB,CAAC,CAAA;IACzD,CAAC;IACD,OAAO,IAAI,CAAC,UAAU,CAAC,CAAA;AACzB,CAAC"}
1
+ {"version":3,"file":"services.js","sourceRoot":"","sources":["../../src/services.ts"],"names":[],"mappings":";;AAOA,wCAEC;AAQD,4CAGC;AASD,wCAMC;AAnCD,uCAAyC;AAEzC;;;;GAIG;AACH,SAAgB,cAAc;IAC5B,OAAO,IAAA,sBAAY,EAAW,eAAe,CAAC,CAAA;AAChD,CAAC;AAED;;;;;GAKG;AACH,SAAgB,gBAAgB,CAAC,UAAkB;IACjD,MAAM,IAAI,GAAG,IAAA,sBAAY,EAAyB,mBAAmB,CAAC,CAAA;IACtE,OAAO,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;AAC5B,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,cAAc,CAAC,UAAkB;IAC/C,MAAM,IAAI,GAAG,IAAA,sBAAY,EAAyB,mBAAmB,CAAC,CAAA;IACtE,IAAG,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;QACrB,MAAM,IAAI,KAAK,CAAC,WAAW,UAAU,iBAAiB,CAAC,CAAA;IACzD,CAAC;IACD,OAAO,IAAI,CAAC,UAAU,CAAC,CAAA;AACzB,CAAC"}
@@ -18,7 +18,7 @@ interface Action {
18
18
  * @param serviceKey the service key to get actions for
19
19
  * @returns the actions for the service
20
20
  */
21
- export declare function getActionsForService(serviceKey: string): string[];
21
+ export declare function iamActionsForService(serviceKey: string): string[];
22
22
  /**
23
23
  * Check if an action exists
24
24
  *
@@ -26,7 +26,7 @@ export declare function getActionsForService(serviceKey: string): string[];
26
26
  * @param actionKey the action key to check for
27
27
  * @returns true if the action exists, false otherwise
28
28
  */
29
- export declare function actionExists(serviceKey: string, actionKey: string): boolean;
29
+ export declare function iamActionExists(serviceKey: string, actionKey: string): boolean;
30
30
  /**
31
31
  * Get the details for an action
32
32
  *
@@ -35,6 +35,6 @@ export declare function actionExists(serviceKey: string, actionKey: string): boo
35
35
  * @throws error if the service or action does not exist
36
36
  * @returns the details for the action
37
37
  */
38
- export declare function getActionDetails(serviceKey: string, actionKey: string): Action;
38
+ export declare function iamActionDetails(serviceKey: string, actionKey: string): Action;
39
39
  export {};
40
40
  //# sourceMappingURL=actions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/actions.ts"],"names":[],"mappings":"AAEA,UAAU,kBAAkB;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,OAAO,CAAC;IACpB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,kBAAkB,EAAE,MAAM,EAAE,CAAA;CAC7B;AAED,UAAU,MAAM;IACd,MAAM,EAAE,MAAM,CAAA;IACd,aAAa,EAAE,MAAM,CAAA;IACrB,aAAa,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;IACrD,eAAe,EAAE,kBAAkB,EAAE,CAAC;IACtC,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,kBAAkB,EAAE,MAAM,EAAE,CAAA;CAC7B;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CAGjE;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAG3E;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAM9E"}
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/actions.ts"],"names":[],"mappings":"AAEA,UAAU,kBAAkB;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,OAAO,CAAC;IACpB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,kBAAkB,EAAE,MAAM,EAAE,CAAA;CAC7B;AAED,UAAU,MAAM;IACd,MAAM,EAAE,MAAM,CAAA;IACd,aAAa,EAAE,MAAM,CAAA;IACrB,aAAa,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;IACrD,eAAe,EAAE,kBAAkB,EAAE,CAAC;IACtC,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,kBAAkB,EAAE,MAAM,EAAE,CAAA;CAC7B;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CAGjE;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAG9E;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAM9E"}
@@ -1,11 +1,11 @@
1
- import { readActionData } from "./data";
1
+ import { readActionData } from "./data.js";
2
2
  /**
3
3
  * Get all actions for a service
4
4
  *
5
5
  * @param serviceKey the service key to get actions for
6
6
  * @returns the actions for the service
7
7
  */
8
- export function getActionsForService(serviceKey) {
8
+ export function iamActionsForService(serviceKey) {
9
9
  const data = readActionData(serviceKey);
10
10
  return Object.keys(data);
11
11
  }
@@ -16,7 +16,7 @@ export function getActionsForService(serviceKey) {
16
16
  * @param actionKey the action key to check for
17
17
  * @returns true if the action exists, false otherwise
18
18
  */
19
- export function actionExists(serviceKey, actionKey) {
19
+ export function iamActionExists(serviceKey, actionKey) {
20
20
  const data = readActionData(serviceKey);
21
21
  return !!data[actionKey];
22
22
  }
@@ -28,7 +28,7 @@ export function actionExists(serviceKey, actionKey) {
28
28
  * @throws error if the service or action does not exist
29
29
  * @returns the details for the action
30
30
  */
31
- export function getActionDetails(serviceKey, actionKey) {
31
+ export function iamActionDetails(serviceKey, actionKey) {
32
32
  const data = readActionData(serviceKey);
33
33
  if (!data[actionKey]) {
34
34
  throw new Error(`Action ${actionKey} does not exist for service ${serviceKey}`);
@@ -1 +1 @@
1
- {"version":3,"file":"actions.js","sourceRoot":"","sources":["../../src/actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAA;AAkBvC;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAAC,UAAkB;IACrD,MAAM,IAAI,GAAG,cAAc,CAAyB,UAAU,CAAC,CAAA;IAC/D,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AAC1B,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAAC,UAAkB,EAAE,SAAiB;IAChE,MAAM,IAAI,GAAG,cAAc,CAAyB,UAAU,CAAC,CAAA;IAC/D,OAAO,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;AAC1B,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,gBAAgB,CAAC,UAAkB,EAAE,SAAiB;IACpE,MAAM,IAAI,GAAG,cAAc,CAAyB,UAAU,CAAC,CAAA;IAC/D,IAAG,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CAAC,UAAU,SAAS,+BAA+B,UAAU,EAAE,CAAC,CAAA;IACjF,CAAC;IACD,OAAO,IAAI,CAAC,SAAS,CAAC,CAAA;AACxB,CAAC"}
1
+ {"version":3,"file":"actions.js","sourceRoot":"","sources":["../../src/actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAkB1C;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAAC,UAAkB;IACrD,MAAM,IAAI,GAAG,cAAc,CAAyB,UAAU,CAAC,CAAA;IAC/D,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AAC1B,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAAC,UAAkB,EAAE,SAAiB;IACnE,MAAM,IAAI,GAAG,cAAc,CAAyB,UAAU,CAAC,CAAA;IAC/D,OAAO,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;AAC1B,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,gBAAgB,CAAC,UAAkB,EAAE,SAAiB;IACpE,MAAM,IAAI,GAAG,cAAc,CAAyB,UAAU,CAAC,CAAA;IAC/D,IAAG,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CAAC,UAAU,SAAS,+BAA+B,UAAU,EAAE,CAAC,CAAA;IACjF,CAAC;IACD,OAAO,IAAI,CAAC,SAAS,CAAC,CAAA;AACxB,CAAC"}
@@ -9,7 +9,7 @@ export interface ConditionKey {
9
9
  * @param serviceKey the service key to read the condition keys for
10
10
  * @returns the condition keys for the service
11
11
  */
12
- export declare function getConditionKeysForService(serviceKey: string): string[];
12
+ export declare function iamConditionKeysForService(serviceKey: string): string[];
13
13
  /**
14
14
  * Check if a condition key exists
15
15
  *
@@ -17,7 +17,7 @@ export declare function getConditionKeysForService(serviceKey: string): string[]
17
17
  * @param conditionKey the condition key to check for
18
18
  * @returns true if the condition key exists, false otherwise
19
19
  */
20
- export declare function conditionKeyExists(serviceKey: string, conditionKey: string): boolean;
20
+ export declare function iamConditionKeyExists(serviceKey: string, conditionKey: string): boolean;
21
21
  /**
22
22
  * Get the details for a condition key
23
23
  *
@@ -26,5 +26,5 @@ export declare function conditionKeyExists(serviceKey: string, conditionKey: str
26
26
  * @throws error if the service or condition key does not exist
27
27
  * @returns the details for the condition key
28
28
  */
29
- export declare function getConditionKeyDetails(serviceKey: string, conditionKey: string): ConditionKey;
29
+ export declare function iamConditionKeyDetails(serviceKey: string, conditionKey: string): ConditionKey;
30
30
  //# sourceMappingURL=conditionKeys.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"conditionKeys.d.ts","sourceRoot":"","sources":["../../src/conditionKeys.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAA;CACb;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CAGvE;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAGpF;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,YAAY,CAM7F"}
1
+ {"version":3,"file":"conditionKeys.d.ts","sourceRoot":"","sources":["../../src/conditionKeys.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAA;CACb;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CAGvE;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAGvF;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,YAAY,CAM7F"}
@@ -1,11 +1,11 @@
1
- import { readConditionKeys } from "./data";
1
+ import { readConditionKeys } from "./data.js";
2
2
  /**
3
3
  * Reads the condition keys for a service
4
4
  *
5
5
  * @param serviceKey the service key to read the condition keys for
6
6
  * @returns the condition keys for the service
7
7
  */
8
- export function getConditionKeysForService(serviceKey) {
8
+ export function iamConditionKeysForService(serviceKey) {
9
9
  const data = readConditionKeys(serviceKey);
10
10
  return Object.keys(data);
11
11
  }
@@ -16,7 +16,7 @@ export function getConditionKeysForService(serviceKey) {
16
16
  * @param conditionKey the condition key to check for
17
17
  * @returns true if the condition key exists, false otherwise
18
18
  */
19
- export function conditionKeyExists(serviceKey, conditionKey) {
19
+ export function iamConditionKeyExists(serviceKey, conditionKey) {
20
20
  const data = readConditionKeys(serviceKey);
21
21
  return !!data[conditionKey];
22
22
  }
@@ -28,7 +28,7 @@ export function conditionKeyExists(serviceKey, conditionKey) {
28
28
  * @throws error if the service or condition key does not exist
29
29
  * @returns the details for the condition key
30
30
  */
31
- export function getConditionKeyDetails(serviceKey, conditionKey) {
31
+ export function iamConditionKeyDetails(serviceKey, conditionKey) {
32
32
  const data = readConditionKeys(serviceKey);
33
33
  if (!data[conditionKey]) {
34
34
  throw new Error(`Condition key ${conditionKey} does not exist for service ${serviceKey}`);
@@ -1 +1 @@
1
- {"version":3,"file":"conditionKeys.js","sourceRoot":"","sources":["../../src/conditionKeys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAA;AAQ1C;;;;;GAKG;AACH,MAAM,UAAU,0BAA0B,CAAC,UAAkB;IAC3D,MAAM,IAAI,GAAG,iBAAiB,CAA+B,UAAU,CAAC,CAAA;IACxE,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AAC1B,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAAC,UAAkB,EAAE,YAAoB;IACzE,MAAM,IAAI,GAAG,iBAAiB,CAA+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AA;AAC3B,CAAC"}
@@ -1,10 +1,4 @@
1
- /**
2
- * Get a data file from the data directory
3
- *
4
- * @param file the path to the file to retrieve data for.
5
- * @returns the data from the file
6
- */
7
- export declare function readDataFile<T>(file: string): T;
1
+ export declare function readDataFile<T>(...pathParts: string[]): T;
8
2
  /**
9
3
  * Read the action data for a service
10
4
  *
@@ -1 +1 @@
1
- {"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../src/data.ts"],"names":[],"mappings":"AAoBA;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,CAM/C;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC,CAEvD;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC,CAE1D;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC,CAE1D"}
1
+ {"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../src/data.ts"],"names":[],"mappings":"AAKA,wBAAgB,YAAY,CAAC,CAAC,EAAE,GAAG,SAAS,EAAE,MAAM,EAAE,GAAG,CAAC,CAQzD;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC,CAEvD;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC,CAE1D;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC,CAE1D"}
package/dist/esm/data.js CHANGED
@@ -1,28 +1,11 @@
1
- import { readFileSync } from "fs";
2
1
  import { join } from "path";
3
- let dataRoot = join(__dirname, '..', '..', 'data');
4
- if (__dirname.endsWith('src')) {
5
- dataRoot = join(__dirname, '..', 'data');
6
- }
7
- /**
8
- * Get the root path to the data directory
9
- *
10
- * @returns the root path to the data directory
11
- */
12
- // function dataRoot(): string {
13
- // console.log(__dirname);
14
- // return join(__dirname, '..', 'data');
15
- // }
2
+ import { readRelativeFile } from "./readRelativeFile.js";
16
3
  const dataCache = {};
17
- /**
18
- * Get a data file from the data directory
19
- *
20
- * @param file the path to the file to retrieve data for.
21
- * @returns the data from the file
22
- */
23
- export function readDataFile(file) {
4
+ export function readDataFile(...pathParts) {
5
+ pathParts.unshift('data');
6
+ const file = join(...pathParts);
24
7
  if (!dataCache[file]) {
25
- const data = readFileSync(join(dataRoot, file), 'utf8');
8
+ const data = readRelativeFile(pathParts);
26
9
  dataCache[file] = JSON.parse(data);
27
10
  }
28
11
  return dataCache[file];
@@ -34,7 +17,7 @@ export function readDataFile(file) {
34
17
  * @returns the action data for the service
35
18
  */
36
19
  export function readActionData(serviceKey) {
37
- return readDataFile(join('actions', `${serviceKey}.json`));
20
+ return readDataFile('actions', `${serviceKey}.json`);
38
21
  }
39
22
  /**
40
23
  * Read the condition key data for a service
@@ -43,7 +26,7 @@ export function readActionData(serviceKey) {
43
26
  * @returns the condition key data
44
27
  */
45
28
  export function readConditionKeys(serviceKey) {
46
- return readDataFile(join('conditionKeys', `${serviceKey}.json`));
29
+ return readDataFile('conditionKeys', `${serviceKey}.json`);
47
30
  }
48
31
  /**
49
32
  * Read the resource type data for a service
@@ -52,6 +35,6 @@ export function readConditionKeys(serviceKey) {
52
35
  * @returns the resource type data
53
36
  */
54
37
  export function readResourceTypes(serviceKey) {
55
- return readDataFile(join('resourceTypes', `${serviceKey}.json`));
38
+ return readDataFile('resourceTypes', `${serviceKey}.json`);
56
39
  }
57
40
  //# sourceMappingURL=data.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"data.js","sourceRoot":"","sources":["../../src/data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AACl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["../../src/data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,MAAM,SAAS,GAAwB,EAAE,CAAC;AAE1C,MAAM,UAAU,YAAY,CAAI,GAAG,SAAmB;IACpD,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC1B,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,SAAS,CAAC,CAAC;IAChC,IAAG,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;QACpB,MAAM,IAAI,GAAG,gBAAgB,CAAC,SAAS,CAAC,CAAA;QACxC,SAAS,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACrC,CAAC;IACD,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC;AACzB,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAI,UAAkB;IAClD,OAAO,YAAY,CAAI,SAAS,EAAE,GAAG,UAAU,OAAO,CAAC,CAAC;AAC1D,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAI,UAAkB;IACrD,OAAO,YAAY,CAAI,eAAe,EAAE,GAAG,UAAU,OAAO,CAAC,CAAC;AAChE,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAI,UAAkB;IACrD,OAAO,YAAY,CAAI,eAAe,EAAE,GAAG,UAAU,OAAO,CAAC,CAAC;AAChE,CAAC"}
@@ -1,6 +1,6 @@
1
- export * from './actions';
2
- export * from './conditionKeys';
3
- export * from './resourceTypes';
4
- export * from './services';
5
- export * from './version';
1
+ export * from './actions.js';
2
+ export * from './conditionKeys.js';
3
+ export * from './resourceTypes.js';
4
+ export * from './services.js';
5
+ export * from './version.js';
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA"}
package/dist/esm/index.js CHANGED
@@ -1,6 +1,6 @@
1
- export * from './actions';
2
- export * from './conditionKeys';
3
- export * from './resourceTypes';
4
- export * from './services';
5
- export * from './version';
1
+ export * from './actions.js';
2
+ export * from './conditionKeys.js';
3
+ export * from './resourceTypes.js';
4
+ export * from './services.js';
5
+ export * from './version.js';
6
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Get a data file from the data directory in ESM
3
+ *
4
+ * @param file the path to the file to retrieve data for.
5
+ * @returns the data from the file
6
+ */
7
+ export declare function readRelativeFile(pathParts: string[]): string;
8
+ //# sourceMappingURL=readRelativeFileEsm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readRelativeFile.d.ts","sourceRoot":"","sources":["../../src/readRelativeFile.ts"],"names":[],"mappings":"AAQA;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,MAAM,CAE5D"}
@@ -0,0 +1,18 @@
1
+ import { readFileSync } from "fs";
2
+ import { join } from "node:path";
3
+ import { fileURLToPath, resolve } from "node:url";
4
+ // import { join } from "path";
5
+ // @ts-ignore
6
+ let root = import.meta.url;
7
+ root = resolve(root, join('..', '..'));
8
+ /**
9
+ * Get a data file from the data directory in ESM
10
+ *
11
+ * @param file the path to the file to retrieve data for.
12
+ * @returns the data from the file
13
+ */
14
+ export function readRelativeFile(pathParts) {
15
+ const relativePath = join(...pathParts);
16
+ return readFileSync(fileURLToPath(resolve(root, relativePath)), 'utf-8');
17
+ }
18
+ //# sourceMappingURL=readRelativeFileEsm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readRelativeFileEsm.js","sourceRoot":"","sources":["../../src/readRelativeFileEsm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAClD,+BAA+B;AAE/B,aAAa;AACb,IAAI,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAA;AAC1B,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAA;AAEtC;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,SAAmB;IAClD,MAAM,YAAY,GAAG,IAAI,CAAC,GAAG,SAAS,CAAC,CAAA;IACvC,OAAO,YAAY,CAAC,aAAa,CAAC,OAAO,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC,EAAE,OAAO,CAAC,CAAA;AAC1E,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readRelativeFileEsm.d.ts","sourceRoot":"","sources":["../../src/readRelativeFileEsm.ts"],"names":[],"mappings":"AASA;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,MAAM,CAG5D"}
@@ -8,7 +8,7 @@ export interface ResourceType {
8
8
  * @param serviceKey the service key to get the resource types for
9
9
  * @returns the resource types for the service
10
10
  */
11
- export declare function resourceTypesForService(serviceKey: string): string[];
11
+ export declare function iamResourceTypesForService(serviceKey: string): string[];
12
12
  /**
13
13
  * Check if a resource type exists for a service and resource type key
14
14
  *
@@ -16,7 +16,7 @@ export declare function resourceTypesForService(serviceKey: string): string[];
16
16
  * @param resourceTypeKey the resource type key to check for
17
17
  * @returns true if the resource type exists, false otherwise
18
18
  */
19
- export declare function resourceTypeExists(serviceKey: string, resourceTypeKey: string): boolean;
19
+ export declare function iamResourceTypeExists(serviceKey: string, resourceTypeKey: string): boolean;
20
20
  /**
21
21
  * Get the resource type for a service and resource type key
22
22
  *
@@ -25,5 +25,5 @@ export declare function resourceTypeExists(serviceKey: string, resourceTypeKey:
25
25
  * @throws an error if the resource type does not exist
26
26
  * @returns the resource type
27
27
  */
28
- export declare function getResourceTypeDetails(serviceKey: string, resourceTypeKey: string): ResourceType;
28
+ export declare function iamResourceTypeDetails(serviceKey: string, resourceTypeKey: string): ResourceType;
29
29
  //# sourceMappingURL=resourceTypes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"resourceTypes.d.ts","sourceRoot":"","sources":["../../src/resourceTypes.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CAGpE;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,OAAO,CAGvF;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,YAAY,CAMhG"}
1
+ {"version":3,"file":"resourceTypes.d.ts","sourceRoot":"","sources":["../../src/resourceTypes.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CAGvE;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,OAAO,CAG1F;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,YAAY,CAMhG"}
@@ -1,10 +1,10 @@
1
- import { readResourceTypes } from "./data";
1
+ import { readResourceTypes } from "./data.js";
2
2
  /**
3
3
  *
4
4
  * @param serviceKey the service key to get the resource types for
5
5
  * @returns the resource types for the service
6
6
  */
7
- export function resourceTypesForService(serviceKey) {
7
+ export function iamResourceTypesForService(serviceKey) {
8
8
  const data = readResourceTypes(serviceKey);
9
9
  return Object.keys(data);
10
10
  }
@@ -15,7 +15,7 @@ export function resourceTypesForService(serviceKey) {
15
15
  * @param resourceTypeKey the resource type key to check for
16
16
  * @returns true if the resource type exists, false otherwise
17
17
  */
18
- export function resourceTypeExists(serviceKey, resourceTypeKey) {
18
+ export function iamResourceTypeExists(serviceKey, resourceTypeKey) {
19
19
  const data = readResourceTypes(serviceKey);
20
20
  return !!data[resourceTypeKey];
21
21
  }
@@ -27,7 +27,7 @@ export function resourceTypeExists(serviceKey, resourceTypeKey) {
27
27
  * @throws an error if the resource type does not exist
28
28
  * @returns the resource type
29
29
  */
30
- export function getResourceTypeDetails(serviceKey, resourceTypeKey) {
30
+ export function iamResourceTypeDetails(serviceKey, resourceTypeKey) {
31
31
  const data = readResourceTypes(serviceKey);
32
32
  if (!data[resourceTypeKey]) {
33
33
  throw new Error(`Resource type ${resourceTypeKey} does not exist for service ${serviceKey}`);
@@ -1 +1 @@
1
- {"version":3,"file":"resourceTypes.js","sourceRoot":"","sources":["../../src/resourceTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAQ3C;;;;GAIG;AACH,MAAM,UAAU,uBAAuB,CAAC,UAAkB;IACxD,MAAM,IAAI,GAAG,iBAAiB,CAA+B,UAAU,CAAC,CAAC;IACzE,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AAC1B,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAAC,UAAkB,EAAE,eAAuB;IAC5E,MAAM,IAAI,GAAG,iBAAiB,CAA+B,UAAU,CAAC,CAAC;IACzE,OAAO,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;AACjC,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,sBAAsB,CAAC,UAAkB,EAAE,eAAuB;IAChF,MAAM,IAAI,GAAG,iBAAiB,CAA+B,UAAU,CAAC,CAAC;IACzE,IAAG,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CAAC,iBAAiB,eAAe,+BAA+B,UAAU,EAAE,CAAC,CAAC;IAC/F,CAAC;IACD,OAAO,IAAI,CAAC,eAAe,CAAC,CAAC;AAC/B,CAAC"}
1
+ {"version":3,"file":"resourceTypes.js","sourceRoot":"","sources":["../../src/resourceTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAQ9C;;;;GAIG;AACH,MAAM,UAAU,0BAA0B,CAAC,UAAkB;IAC3D,MAAM,IAAI,GAAG,iBAAiB,CAA+B,UAAU,CAAC,CAAC;IACzE,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AAC1B,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CAAC,UAAkB,EAAE,eAAuB;IAC/E,MAAM,IAAI,GAAG,iBAAiB,CAA+B,UAAU,CAAC,CAAC;IACzE,OAAO,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;AACjC,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,sBAAsB,CAAC,UAAkB,EAAE,eAAuB;IAChF,MAAM,IAAI,GAAG,iBAAiB,CAA+B,UAAU,CAAC,CAAC;IACzE,IAAG,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CAAC,iBAAiB,eAAe,+BAA+B,UAAU,EAAE,CAAC,CAAC;IAC/F,CAAC;IACD,OAAO,IAAI,CAAC,eAAe,CAAC,CAAC;AAC/B,CAAC"}
@@ -3,14 +3,14 @@
3
3
  *
4
4
  * @returns an array of all service keys
5
5
  */
6
- export declare function allServiceKeys(): string[];
6
+ export declare function iamServiceKeys(): string[];
7
7
  /**
8
8
  * Check if a service exists
9
9
  *
10
10
  * @param serviceKey the service key to check
11
11
  * @returns true if the service exists, false otherwise
12
12
  */
13
- export declare function serviceExists(serviceKey: string): boolean;
13
+ export declare function iamServiceExists(serviceKey: string): boolean;
14
14
  /**
15
15
  * Get the name of a service
16
16
  *
@@ -18,5 +18,5 @@ export declare function serviceExists(serviceKey: string): boolean;
18
18
  * @throws error if the service does not exist
19
19
  * @returns the name of the service
20
20
  */
21
- export declare function getServiceName(serviceKey: string): string;
21
+ export declare function iamServiceName(serviceKey: string): string;
22
22
  //# sourceMappingURL=services.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../src/services.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,MAAM,EAAE,CAEzC;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAGzD;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAMzD"}
1
+ {"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../src/services.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,MAAM,EAAE,CAEzC;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAG5D;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAMzD"}
@@ -1,10 +1,10 @@
1
- import { readDataFile } from './data';
1
+ import { readDataFile } from './data.js';
2
2
  /**
3
3
  * Get keys for all services
4
4
  *
5
5
  * @returns an array of all service keys
6
6
  */
7
- export function allServiceKeys() {
7
+ export function iamServiceKeys() {
8
8
  return readDataFile('services.json');
9
9
  }
10
10
  /**
@@ -13,7 +13,7 @@ export function allServiceKeys() {
13
13
  * @param serviceKey the service key to check
14
14
  * @returns true if the service exists, false otherwise
15
15
  */
16
- export function serviceExists(serviceKey) {
16
+ export function iamServiceExists(serviceKey) {
17
17
  const data = readDataFile('serviceNames.json');
18
18
  return !!data[serviceKey];
19
19
  }
@@ -24,7 +24,7 @@ export function serviceExists(serviceKey) {
24
24
  * @throws error if the service does not exist
25
25
  * @returns the name of the service
26
26
  */
27
- export function getServiceName(serviceKey) {
27
+ export function iamServiceName(serviceKey) {
28
28
  const data = readDataFile('serviceNames.json');
29
29
  if (!data[serviceKey]) {
30
30
  throw new Error(`Service ${serviceKey} does not exist`);
@@ -1 +1 @@
1
- {"version":3,"file":"services.js","sourceRoot":"","sources":["../../src/services.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC;;;;GAIG;AACH,MAAM,UAAU,cAAc;IAC5B,OAAO,YAAY,CAAW,eAAe,CAAC,CAAA;AAChD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAAC,UAAkB;IAC9C,MAAM,IAAI,GAAG,YAAY,CAAyB,mBAAmB,CAAC,CAAA;IACtE,OAAO,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;AAC5B,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAC,UAAkB;IAC/C,MAAM,IAAI,GAAG,YAAY,CAAyB,mBAAmB,CAAC,CAAA;IACtE,IAAG,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;QACrB,MAAM,IAAI,KAAK,CAAC,WAAW,UAAU,iBAAiB,CAAC,CAAA;IACzD,CAAC;IACD,OAAO,IAAI,CAAC,UAAU,CAAC,CAAA;AACzB,CAAC"}
1
+ {"version":3,"file":"services.js","sourceRoot":"","sources":["../../src/services.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC;;;;GAIG;AACH,MAAM,UAAU,cAAc;IAC5B,OAAO,YAAY,CAAW,eAAe,CAAC,CAAA;AAChD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,UAAkB;IACjD,MAAM,IAAI,GAAG,YAAY,CAAyB,mBAAmB,CAAC,CAAA;IACtE,OAAO,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;AAC5B,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAC,UAAkB;IAC/C,MAAM,IAAI,GAAG,YAAY,CAAyB,mBAAmB,CAAC,CAAA;IACtE,IAAG,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;QACrB,MAAM,IAAI,KAAK,CAAC,WAAW,UAAU,iBAAiB,CAAC,CAAA;IACzD,CAAC;IACD,OAAO,IAAI,CAAC,UAAU,CAAC,CAAA;AACzB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloud-copilot/iam-data",
3
- "version": "0.1.202408301",
3
+ "version": "0.2.202408302",
4
4
  "description": "AWS IAM Data",
5
5
  "repository": "github:cloud-copilot/iam-data",
6
6
  "exports": {
@@ -16,7 +16,7 @@
16
16
  ],
17
17
  "types": "dist/cjs/index.d.ts",
18
18
  "scripts": {
19
- "test": "npx jest",
19
+ "test": "npx vitest --run",
20
20
  "build": "npx tsc -p tsconfig.cjs.json && npx tsc -p tsconfig.esm.json && ./postbuild.sh"
21
21
  },
22
22
  "keywords": [
@@ -26,10 +26,8 @@
26
26
  "author": "David Kerber <dave@cloudcopilot.io>",
27
27
  "license": "GPL-3.0-or-later",
28
28
  "devDependencies": {
29
- "@types/jest": "^29.5.12",
30
29
  "@types/node": "^22.5.0",
31
- "jest": "^29.7.0",
32
- "ts-jest": "^29.2.5",
33
- "typescript": "^5.5.4"
30
+ "typescript": "^5.5.4",
31
+ "vitest": "^2.0.5"
34
32
  }
35
33
  }