@cloud-copilot/iam-data 0.2.202408313 → 0.3.202409011-beta
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.
- package/README.md +6 -4
- package/data/actions/bedrock.json +161 -2
- package/data/actions/cloudfront.json +1 -1
- package/data/actions/frauddetector.json +2 -2
- package/data/actions/healthlake.json +1 -1
- package/data/actions/pcs.json +409 -0
- package/data/actions/quicksight.json +41 -2
- package/data/actions/redshift-serverless.json +48 -4
- package/data/actions/redshift.json +41 -3
- package/data/actions/securitylake.json +1 -1
- package/data/actions/thinclient.json +46 -14
- package/data/actions/wickr.json +8 -0
- package/data/actions/wisdom.json +114 -114
- package/data/actions/workspaces-web.json +1 -2
- package/data/conditionKeys/bedrock.json +5 -0
- package/data/conditionKeys/pcs.json +17 -0
- package/data/conditionKeys/ram.json +1 -1
- package/data/resourceTypes/bedrock.json +18 -0
- package/data/resourceTypes/events.json +16 -0
- package/data/resourceTypes/pcs.json +23 -0
- package/data/resourceTypes/wisdom.json +7 -7
- package/data/serviceNames.json +3 -2
- package/data/services.json +1 -0
- package/dist/cjs/actions.d.ts +3 -3
- package/dist/cjs/actions.d.ts.map +1 -1
- package/dist/cjs/actions.js +6 -6
- package/dist/cjs/actions.js.map +1 -1
- package/dist/cjs/conditionKeys.d.ts +3 -3
- package/dist/cjs/conditionKeys.d.ts.map +1 -1
- package/dist/cjs/conditionKeys.js +6 -6
- package/dist/cjs/conditionKeys.js.map +1 -1
- package/dist/cjs/data.d.ts +4 -4
- package/dist/cjs/data.d.ts.map +1 -1
- package/dist/cjs/data.js +5 -5
- package/dist/cjs/data.js.map +1 -1
- package/dist/cjs/readRelativeFile.d.ts +1 -1
- package/dist/cjs/readRelativeFile.d.ts.map +1 -1
- package/dist/cjs/readRelativeFile.js +4 -3
- package/dist/cjs/readRelativeFile.js.map +1 -1
- package/dist/cjs/resourceTypes.d.ts +3 -3
- package/dist/cjs/resourceTypes.d.ts.map +1 -1
- package/dist/cjs/resourceTypes.js +6 -6
- package/dist/cjs/resourceTypes.js.map +1 -1
- package/dist/cjs/services.d.ts +3 -3
- package/dist/cjs/services.d.ts.map +1 -1
- package/dist/cjs/services.js +5 -5
- package/dist/cjs/services.js.map +1 -1
- package/dist/cjs/version.d.ts +7 -1
- package/dist/cjs/version.d.ts.map +1 -1
- package/dist/cjs/version.js +26 -8
- package/dist/cjs/version.js.map +1 -1
- package/dist/esm/actions.d.ts +3 -3
- package/dist/esm/actions.d.ts.map +1 -1
- package/dist/esm/actions.js +6 -6
- package/dist/esm/actions.js.map +1 -1
- package/dist/esm/conditionKeys.d.ts +3 -3
- package/dist/esm/conditionKeys.d.ts.map +1 -1
- package/dist/esm/conditionKeys.js +6 -6
- package/dist/esm/conditionKeys.js.map +1 -1
- package/dist/esm/data.d.ts +4 -4
- package/dist/esm/data.d.ts.map +1 -1
- package/dist/esm/data.js +5 -5
- package/dist/esm/data.js.map +1 -1
- package/dist/esm/readRelativeFile.d.ts +1 -1
- package/dist/esm/readRelativeFile.d.ts.map +1 -1
- package/dist/esm/readRelativeFile.js +11 -4
- package/dist/esm/readRelativeFile.js.map +1 -1
- package/dist/esm/readRelativeFileEsm.d.ts.map +1 -1
- package/dist/esm/resourceTypes.d.ts +3 -3
- package/dist/esm/resourceTypes.d.ts.map +1 -1
- package/dist/esm/resourceTypes.js +6 -6
- package/dist/esm/resourceTypes.js.map +1 -1
- package/dist/esm/services.d.ts +3 -3
- package/dist/esm/services.d.ts.map +1 -1
- package/dist/esm/services.js +5 -5
- package/dist/esm/services.js.map +1 -1
- package/dist/esm/version.d.ts +7 -1
- package/dist/esm/version.d.ts.map +1 -1
- package/dist/esm/version.js +25 -8
- package/dist/esm/version.js.map +1 -1
- package/package.json +4 -2
package/dist/esm/data.d.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
export declare function readDataFile<T>(...pathParts: string[]): T
|
|
1
|
+
export declare function readDataFile<T>(...pathParts: string[]): Promise<T>;
|
|
2
2
|
/**
|
|
3
3
|
* Read the action data for a service
|
|
4
4
|
*
|
|
5
5
|
* @param serviceKey the service key to read the action data for
|
|
6
6
|
* @returns the action data for the service
|
|
7
7
|
*/
|
|
8
|
-
export declare function readActionData<T>(serviceKey: string): T
|
|
8
|
+
export declare function readActionData<T>(serviceKey: string): Promise<T>;
|
|
9
9
|
/**
|
|
10
10
|
* Read the condition key data for a service
|
|
11
11
|
*
|
|
12
12
|
* @param serviceKey the service key to read the condition key data for
|
|
13
13
|
* @returns the condition key data
|
|
14
14
|
*/
|
|
15
|
-
export declare function readConditionKeys<T>(serviceKey: string): T
|
|
15
|
+
export declare function readConditionKeys<T>(serviceKey: string): Promise<T>;
|
|
16
16
|
/**
|
|
17
17
|
* Read the resource type data for a service
|
|
18
18
|
*
|
|
19
19
|
* @param serviceKey the service key to read the resource type data for
|
|
20
20
|
* @returns the resource type data
|
|
21
21
|
*/
|
|
22
|
-
export declare function readResourceTypes<T>(serviceKey: string): T
|
|
22
|
+
export declare function readResourceTypes<T>(serviceKey: string): Promise<T>;
|
|
23
23
|
//# sourceMappingURL=data.d.ts.map
|
package/dist/esm/data.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../src/data.ts"],"names":[],"mappings":"AAKA,
|
|
1
|
+
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../src/data.ts"],"names":[],"mappings":"AAKA,wBAAsB,YAAY,CAAC,CAAC,EAAE,GAAG,SAAS,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,CAAC,CAAC,CAQxE;AAED;;;;;GAKG;AACH,wBAAsB,cAAc,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAEtE;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAEzE;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAEzE"}
|
package/dist/esm/data.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { join } from "path";
|
|
2
2
|
import { readRelativeFile } from "./readRelativeFile.js";
|
|
3
3
|
const dataCache = {};
|
|
4
|
-
export function readDataFile(...pathParts) {
|
|
4
|
+
export async function readDataFile(...pathParts) {
|
|
5
5
|
pathParts.unshift('data');
|
|
6
6
|
const file = join(...pathParts);
|
|
7
7
|
if (!dataCache[file]) {
|
|
8
8
|
const data = readRelativeFile(pathParts);
|
|
9
|
-
dataCache[file] =
|
|
9
|
+
dataCache[file] = data;
|
|
10
10
|
}
|
|
11
11
|
return dataCache[file];
|
|
12
12
|
}
|
|
@@ -16,7 +16,7 @@ export function readDataFile(...pathParts) {
|
|
|
16
16
|
* @param serviceKey the service key to read the action data for
|
|
17
17
|
* @returns the action data for the service
|
|
18
18
|
*/
|
|
19
|
-
export function readActionData(serviceKey) {
|
|
19
|
+
export async function readActionData(serviceKey) {
|
|
20
20
|
return readDataFile('actions', `${serviceKey}.json`);
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
@@ -25,7 +25,7 @@ export function readActionData(serviceKey) {
|
|
|
25
25
|
* @param serviceKey the service key to read the condition key data for
|
|
26
26
|
* @returns the condition key data
|
|
27
27
|
*/
|
|
28
|
-
export function readConditionKeys(serviceKey) {
|
|
28
|
+
export async function readConditionKeys(serviceKey) {
|
|
29
29
|
return readDataFile('conditionKeys', `${serviceKey}.json`);
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
@@ -34,7 +34,7 @@ export function readConditionKeys(serviceKey) {
|
|
|
34
34
|
* @param serviceKey the service key to read the resource type data for
|
|
35
35
|
* @returns the resource type data
|
|
36
36
|
*/
|
|
37
|
-
export function readResourceTypes(serviceKey) {
|
|
37
|
+
export async function readResourceTypes(serviceKey) {
|
|
38
38
|
return readDataFile('resourceTypes', `${serviceKey}.json`);
|
|
39
39
|
}
|
|
40
40
|
//# sourceMappingURL=data.js.map
|
package/dist/esm/data.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data.js","sourceRoot":"","sources":["../../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;
|
|
1
|
+
{"version":3,"file":"data.js","sourceRoot":"","sources":["../../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,CAAC,KAAK,UAAU,YAAY,CAAI,GAAG,SAAmB;IAC1D,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,CAAA;IACxB,CAAC;IACD,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC;AACzB,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAI,UAAkB;IACxD,OAAO,YAAY,CAAI,SAAS,EAAE,GAAG,UAAU,OAAO,CAAC,CAAC;AAC1D,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAI,UAAkB;IAC3D,OAAO,YAAY,CAAI,eAAe,EAAE,GAAG,UAAU,OAAO,CAAC,CAAC;AAChE,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAI,UAAkB;IAC3D,OAAO,YAAY,CAAI,eAAe,EAAE,GAAG,UAAU,OAAO,CAAC,CAAC;AAChE,CAAC"}
|
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
* @param file the path to the file to retrieve data for.
|
|
5
5
|
* @returns the data from the file
|
|
6
6
|
*/
|
|
7
|
-
export declare function readRelativeFile(pathParts: string[]):
|
|
7
|
+
export declare function readRelativeFile<T>(pathParts: string[]): Promise<T>;
|
|
8
8
|
//# sourceMappingURL=readRelativeFileEsm.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readRelativeFile.d.ts","sourceRoot":"","sources":["../../src/readRelativeFile.ts"],"names":[],"mappings":"AAQA;;;;;GAKG;AACH,
|
|
1
|
+
{"version":3,"file":"readRelativeFile.d.ts","sourceRoot":"","sources":["../../src/readRelativeFile.ts"],"names":[],"mappings":"AAQA;;;;;GAKG;AACH,wBAAsB,gBAAgB,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,CAAC,CAAC,CAGzE"}
|
|
@@ -1,18 +1,25 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { readFile } from "fs/promises";
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
import { fileURLToPath, resolve } from "node:url";
|
|
4
|
-
// import { join } from "path";
|
|
5
4
|
// @ts-ignore
|
|
6
5
|
let root = import.meta.url;
|
|
7
6
|
root = resolve(root, join('..', '..'));
|
|
7
|
+
const fileSystem = root.startsWith('file://');
|
|
8
8
|
/**
|
|
9
9
|
* Get a data file from the data directory in ESM
|
|
10
10
|
*
|
|
11
11
|
* @param file the path to the file to retrieve data for.
|
|
12
12
|
* @returns the data from the file
|
|
13
13
|
*/
|
|
14
|
-
export function readRelativeFile(pathParts) {
|
|
14
|
+
export async function readRelativeFile(pathParts) {
|
|
15
15
|
const relativePath = join(...pathParts);
|
|
16
|
-
|
|
16
|
+
if (fileSystem) {
|
|
17
|
+
const contents = await readFile(fileURLToPath(resolve(root, relativePath)), 'utf-8');
|
|
18
|
+
return JSON.parse(contents);
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
const contents = await fetch(relativePath);
|
|
22
|
+
return await contents.json();
|
|
23
|
+
}
|
|
17
24
|
}
|
|
18
25
|
//# sourceMappingURL=readRelativeFileEsm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readRelativeFileEsm.js","sourceRoot":"","sources":["../../src/readRelativeFileEsm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"readRelativeFileEsm.js","sourceRoot":"","sources":["../../src/readRelativeFileEsm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAElD,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;AACtC,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAA;AAE7C;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAI,SAAmB;IAC3D,MAAM,YAAY,GAAG,IAAI,CAAC,GAAG,SAAS,CAAC,CAAA;IACvC,IAAG,UAAU,EAAE,CAAC;QACd,MAAM,QAAQ,GAAG,MAAM,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC,EAAE,OAAO,CAAC,CAAA;QACpF,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC9B,CAAC;SAAM,CAAC;QACN,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,YAAY,CAAC,CAAA;QAC1C,OAAO,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAA;IAC9B,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readRelativeFileEsm.d.ts","sourceRoot":"","sources":["../../src/readRelativeFileEsm.ts"],"names":[],"mappings":"AASA;;;;;GAKG;AACH,
|
|
1
|
+
{"version":3,"file":"readRelativeFileEsm.d.ts","sourceRoot":"","sources":["../../src/readRelativeFileEsm.ts"],"names":[],"mappings":"AASA;;;;;GAKG;AACH,wBAAsB,gBAAgB,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,CAAC,CAAC,CASzE"}
|
|
@@ -8,7 +8,7 @@ export interface ResourceType {
|
|
|
8
8
|
* @param serviceKey the service key to get the resource types for, is case insensitive
|
|
9
9
|
* @returns the resource types for the service
|
|
10
10
|
*/
|
|
11
|
-
export declare function iamResourceTypesForService(serviceKey: string): string[]
|
|
11
|
+
export declare function iamResourceTypesForService(serviceKey: string): Promise<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 iamResourceTypesForService(serviceKey: string): string[]
|
|
|
16
16
|
* @param resourceTypeKey the resource type key to check for, is case insensitive
|
|
17
17
|
* @returns true if the resource type exists, false otherwise
|
|
18
18
|
*/
|
|
19
|
-
export declare function iamResourceTypeExists(serviceKey: string, resourceTypeKey: string): boolean
|
|
19
|
+
export declare function iamResourceTypeExists(serviceKey: string, resourceTypeKey: string): Promise<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 iamResourceTypeExists(serviceKey: string, resourceTypeKe
|
|
|
25
25
|
* @throws an error if the resource type does not exist
|
|
26
26
|
* @returns the resource type
|
|
27
27
|
*/
|
|
28
|
-
export declare function iamResourceTypeDetails(serviceKey: string, resourceTypeKey: string): ResourceType
|
|
28
|
+
export declare function iamResourceTypeDetails(serviceKey: string, resourceTypeKey: string): Promise<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,
|
|
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,wBAAsB,0BAA0B,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAGtF;AAED;;;;;;GAMG;AACH,wBAAsB,qBAAqB,CAAC,UAAU,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAGzG;AAED;;;;;;;GAOG;AACH,wBAAsB,sBAAsB,CAAC,UAAU,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAM/G"}
|
|
@@ -4,8 +4,8 @@ import { readResourceTypes } from "./data.js";
|
|
|
4
4
|
* @param serviceKey the service key to get the resource types for, is case insensitive
|
|
5
5
|
* @returns the resource types for the service
|
|
6
6
|
*/
|
|
7
|
-
export function iamResourceTypesForService(serviceKey) {
|
|
8
|
-
const data = readResourceTypes(serviceKey.toLowerCase());
|
|
7
|
+
export async function iamResourceTypesForService(serviceKey) {
|
|
8
|
+
const data = await readResourceTypes(serviceKey.toLowerCase());
|
|
9
9
|
return Object.values(data).map(resourceType => resourceType.key);
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
@@ -15,8 +15,8 @@ export function iamResourceTypesForService(serviceKey) {
|
|
|
15
15
|
* @param resourceTypeKey the resource type key to check for, is case insensitive
|
|
16
16
|
* @returns true if the resource type exists, false otherwise
|
|
17
17
|
*/
|
|
18
|
-
export function iamResourceTypeExists(serviceKey, resourceTypeKey) {
|
|
19
|
-
const data = readResourceTypes(serviceKey.toLowerCase());
|
|
18
|
+
export async function iamResourceTypeExists(serviceKey, resourceTypeKey) {
|
|
19
|
+
const data = await readResourceTypes(serviceKey.toLowerCase());
|
|
20
20
|
return !!data[resourceTypeKey.toLowerCase()];
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
@@ -27,8 +27,8 @@ export function iamResourceTypeExists(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 iamResourceTypeDetails(serviceKey, resourceTypeKey) {
|
|
31
|
-
const data = readResourceTypes(serviceKey.toLowerCase());
|
|
30
|
+
export async function iamResourceTypeDetails(serviceKey, resourceTypeKey) {
|
|
31
|
+
const data = await readResourceTypes(serviceKey.toLowerCase());
|
|
32
32
|
if (!data[resourceTypeKey.toLowerCase()]) {
|
|
33
33
|
throw new Error(`Resource type ${resourceTypeKey} does not exist for service ${serviceKey}`);
|
|
34
34
|
}
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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,CAAC,KAAK,UAAU,0BAA0B,CAAC,UAAkB;IACjE,MAAM,IAAI,GAAG,MAAM,iBAAiB,CAA+B,UAAU,CAAC,WAAW,EAAE,CAAC,CAAC;IAC7F,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;AACnE,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,UAAkB,EAAE,eAAuB;IACrF,MAAM,IAAI,GAAG,MAAM,iBAAiB,CAA+B,UAAU,CAAC,WAAW,EAAE,CAAC,CAAC;IAC7F,OAAO,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,WAAW,EAAE,CAAC,CAAC;AAC/C,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAAC,UAAkB,EAAE,eAAuB;IACtF,MAAM,IAAI,GAAG,MAAM,iBAAiB,CAA+B,UAAU,CAAC,WAAW,EAAE,CAAC,CAAC;IAC7F,IAAG,CAAC,IAAI,CAAC,eAAe,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC;QACxC,MAAM,IAAI,KAAK,CAAC,iBAAiB,eAAe,+BAA+B,UAAU,EAAE,CAAC,CAAC;IAC/F,CAAC;IACD,OAAO,IAAI,CAAC,eAAe,CAAC,WAAW,EAAE,CAAC,CAAC;AAC7C,CAAC"}
|
package/dist/esm/services.d.ts
CHANGED
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @returns an array of all service keys
|
|
5
5
|
*/
|
|
6
|
-
export declare function iamServiceKeys(): string[]
|
|
6
|
+
export declare function iamServiceKeys(): Promise<string[]>;
|
|
7
7
|
/**
|
|
8
8
|
* Check if a service exists
|
|
9
9
|
*
|
|
10
10
|
* @param serviceKey the service key to check, is case insensitive
|
|
11
11
|
* @returns true if the service exists, false otherwise
|
|
12
12
|
*/
|
|
13
|
-
export declare function iamServiceExists(serviceKey: string): boolean
|
|
13
|
+
export declare function iamServiceExists(serviceKey: string): Promise<boolean>;
|
|
14
14
|
/**
|
|
15
15
|
* Get the name of a service
|
|
16
16
|
*
|
|
@@ -18,5 +18,5 @@ export declare function iamServiceExists(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 iamServiceName(serviceKey: string): string
|
|
21
|
+
export declare function iamServiceName(serviceKey: string): Promise<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,
|
|
1
|
+
{"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../src/services.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAsB,cAAc,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAExD;AAED;;;;;GAKG;AACH,wBAAsB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAG3E;AAED;;;;;;GAMG;AACH,wBAAsB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAMxE"}
|
package/dist/esm/services.js
CHANGED
|
@@ -4,7 +4,7 @@ import { readDataFile } from './data.js';
|
|
|
4
4
|
*
|
|
5
5
|
* @returns an array of all service keys
|
|
6
6
|
*/
|
|
7
|
-
export function iamServiceKeys() {
|
|
7
|
+
export async function iamServiceKeys() {
|
|
8
8
|
return readDataFile('services.json');
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
@@ -13,8 +13,8 @@ export function iamServiceKeys() {
|
|
|
13
13
|
* @param serviceKey the service key to check, is case insensitive
|
|
14
14
|
* @returns true if the service exists, false otherwise
|
|
15
15
|
*/
|
|
16
|
-
export function iamServiceExists(serviceKey) {
|
|
17
|
-
const data = readDataFile('serviceNames.json');
|
|
16
|
+
export async function iamServiceExists(serviceKey) {
|
|
17
|
+
const data = await readDataFile('serviceNames.json');
|
|
18
18
|
return !!data[serviceKey.toLowerCase()];
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
@@ -24,8 +24,8 @@ export function iamServiceExists(serviceKey) {
|
|
|
24
24
|
* @throws error if the service does not exist
|
|
25
25
|
* @returns the name of the service
|
|
26
26
|
*/
|
|
27
|
-
export function iamServiceName(serviceKey) {
|
|
28
|
-
const data = readDataFile('serviceNames.json');
|
|
27
|
+
export async function iamServiceName(serviceKey) {
|
|
28
|
+
const data = await readDataFile('serviceNames.json');
|
|
29
29
|
if (!data[serviceKey.toLowerCase()]) {
|
|
30
30
|
throw new Error(`Service ${serviceKey} does not exist`);
|
|
31
31
|
}
|
package/dist/esm/services.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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;
|
|
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,CAAC,KAAK,UAAU,cAAc;IAClC,OAAO,YAAY,CAAW,eAAe,CAAC,CAAA;AAChD,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,UAAkB;IACvD,MAAM,IAAI,GAAG,MAAM,YAAY,CAAyB,mBAAmB,CAAC,CAAA;IAC5E,OAAO,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,CAAC;AAC1C,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,UAAkB;IACrD,MAAM,IAAI,GAAG,MAAM,YAAY,CAAyB,mBAAmB,CAAC,CAAA;IAC5E,IAAG,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC;QACnC,MAAM,IAAI,KAAK,CAAC,WAAW,UAAU,iBAAiB,CAAC,CAAA;IACzD,CAAC;IACD,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,CAAA;AACvC,CAAC"}
|
package/dist/esm/version.d.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Get the version of the package
|
|
3
3
|
*/
|
|
4
|
-
export declare function iamDataVersion(): string
|
|
4
|
+
export declare function iamDataVersion(): Promise<string>;
|
|
5
|
+
/**
|
|
6
|
+
* Get the date the data was last updated
|
|
7
|
+
*
|
|
8
|
+
* @returns the date the data was last updated
|
|
9
|
+
*/
|
|
10
|
+
export declare function iamDataUpdatedAt(): Promise<Date>;
|
|
5
11
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAsBA;;GAEG;AACH,wBAAsB,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAGtD;AAED;;;;GAIG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CAGtD"}
|
package/dist/esm/version.js
CHANGED
|
@@ -1,14 +1,31 @@
|
|
|
1
1
|
import { readRelativeFile } from "./readRelativeFile.js";
|
|
2
|
-
let
|
|
2
|
+
let packageCache = undefined;
|
|
3
3
|
/**
|
|
4
|
-
* Get the
|
|
4
|
+
* Get the package data version
|
|
5
|
+
*
|
|
6
|
+
* @returns the package data version
|
|
5
7
|
*/
|
|
6
|
-
|
|
7
|
-
if (!
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
versionCache = packageInfo.version;
|
|
8
|
+
async function getPackageData() {
|
|
9
|
+
if (!packageCache) {
|
|
10
|
+
const packageInfo = await readRelativeFile(['package.json']);
|
|
11
|
+
packageCache = packageInfo;
|
|
11
12
|
}
|
|
12
|
-
return
|
|
13
|
+
return packageCache;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Get the version of the package
|
|
17
|
+
*/
|
|
18
|
+
export async function iamDataVersion() {
|
|
19
|
+
const data = await getPackageData();
|
|
20
|
+
return data.version;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Get the date the data was last updated
|
|
24
|
+
*
|
|
25
|
+
* @returns the date the data was last updated
|
|
26
|
+
*/
|
|
27
|
+
export async function iamDataUpdatedAt() {
|
|
28
|
+
const data = await getPackageData();
|
|
29
|
+
return new Date(data.updatedAt);
|
|
13
30
|
}
|
|
14
31
|
//# sourceMappingURL=version.js.map
|
package/dist/esm/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAOzD,IAAI,YAAY,GAA4B,SAAS,CAAC;AAEtD;;;;GAIG;AACH,KAAK,UAAU,cAAc;IAC3B,IAAG,CAAC,YAAY,EAAE,CAAC;QACjB,MAAM,WAAW,GAAG,MAAM,gBAAgB,CAAsB,CAAC,cAAc,CAAC,CAAC,CAAC;QAClF,YAAY,GAAG,WAAW,CAAC;IAC7B,CAAC;IACD,OAAO,YAAa,CAAC;AACvB,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc;IAClC,MAAM,IAAI,GAAG,MAAM,cAAc,EAAE,CAAC;IACpC,OAAO,IAAI,CAAC,OAAO,CAAC;AACtB,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB;IACpC,MAAM,IAAI,GAAG,MAAM,cAAc,EAAE,CAAC;IACpC,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AAClC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloud-copilot/iam-data",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.202409011-beta",
|
|
4
4
|
"description": "AWS IAM Data",
|
|
5
5
|
"repository": "github:cloud-copilot/iam-data",
|
|
6
|
+
"updatedAt": "2024-09-01T05:38:06.234Z",
|
|
6
7
|
"exports": {
|
|
7
8
|
".": {
|
|
8
9
|
"import": "./dist/esm/index.js",
|
|
@@ -17,7 +18,8 @@
|
|
|
17
18
|
"types": "dist/cjs/index.d.ts",
|
|
18
19
|
"scripts": {
|
|
19
20
|
"test": "npx vitest --run",
|
|
20
|
-
"build": "npx tsc -p tsconfig.cjs.json && npx tsc -p tsconfig.esm.json && ./postbuild.sh"
|
|
21
|
+
"build": "npx tsc -p tsconfig.cjs.json && npx tsc -p tsconfig.esm.json && ./postbuild.sh",
|
|
22
|
+
"prepare": "npm run build"
|
|
21
23
|
},
|
|
22
24
|
"keywords": [
|
|
23
25
|
"AWS",
|