@cloud-copilot/iam-policy 0.1.5-2 → 0.1.7
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 +101 -107
- package/dist/cjs/actions/action.d.ts +1 -7
- package/dist/cjs/actions/action.d.ts.map +1 -1
- package/dist/cjs/actions/action.js +0 -9
- package/dist/cjs/actions/action.js.map +1 -1
- package/dist/cjs/conditions/condition.d.ts +1 -7
- package/dist/cjs/conditions/condition.d.ts.map +1 -1
- package/dist/cjs/conditions/condition.js +0 -8
- package/dist/cjs/conditions/condition.js.map +1 -1
- package/dist/cjs/index.d.ts +7 -7
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +1 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/parser.d.ts +1 -2
- package/dist/cjs/parser.d.ts.map +1 -1
- package/dist/cjs/parser.js +1 -5
- package/dist/cjs/parser.js.map +1 -1
- package/dist/cjs/policies/policy.d.ts +3 -13
- package/dist/cjs/policies/policy.d.ts.map +1 -1
- package/dist/cjs/policies/policy.js +3 -21
- package/dist/cjs/policies/policy.js.map +1 -1
- package/dist/cjs/principals/principal.d.ts +1 -7
- package/dist/cjs/principals/principal.d.ts.map +1 -1
- package/dist/cjs/principals/principal.js +0 -9
- package/dist/cjs/principals/principal.js.map +1 -1
- package/dist/cjs/resources/resource.d.ts +1 -7
- package/dist/cjs/resources/resource.d.ts.map +1 -1
- package/dist/cjs/resources/resource.js +0 -8
- package/dist/cjs/resources/resource.js.map +1 -1
- package/dist/cjs/statements/statement.d.ts +20 -64
- package/dist/cjs/statements/statement.d.ts.map +1 -1
- package/dist/cjs/statements/statement.js +20 -68
- package/dist/cjs/statements/statement.js.map +1 -1
- package/dist/cjs/validate/testutil.d.ts +3 -0
- package/dist/cjs/validate/testutil.d.ts.map +1 -0
- package/dist/cjs/validate/testutil.js +21 -0
- package/dist/cjs/validate/testutil.js.map +1 -0
- package/dist/cjs/validate/validate.js +13 -10
- package/dist/cjs/validate/validate.js.map +1 -1
- package/dist/cjs/validate/validateTypes.js +4 -4
- package/dist/cjs/validate/validateTypes.js.map +1 -1
- package/dist/esm/actions/action.d.ts +1 -7
- package/dist/esm/actions/action.d.ts.map +1 -1
- package/dist/esm/actions/action.js +0 -8
- package/dist/esm/actions/action.js.map +1 -1
- package/dist/esm/conditions/condition.d.ts +1 -7
- package/dist/esm/conditions/condition.d.ts.map +1 -1
- package/dist/esm/conditions/condition.js +0 -8
- package/dist/esm/conditions/condition.js.map +1 -1
- package/dist/esm/index.d.ts +7 -7
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/parser.d.ts +1 -2
- package/dist/esm/parser.d.ts.map +1 -1
- package/dist/esm/parser.js +1 -4
- package/dist/esm/parser.js.map +1 -1
- package/dist/esm/policies/policy.d.ts +3 -13
- package/dist/esm/policies/policy.d.ts.map +1 -1
- package/dist/esm/policies/policy.js +3 -18
- package/dist/esm/policies/policy.js.map +1 -1
- package/dist/esm/principals/principal.d.ts +1 -7
- package/dist/esm/principals/principal.d.ts.map +1 -1
- package/dist/esm/principals/principal.js +0 -8
- package/dist/esm/principals/principal.js.map +1 -1
- package/dist/esm/resources/resource.d.ts +1 -7
- package/dist/esm/resources/resource.d.ts.map +1 -1
- package/dist/esm/resources/resource.js +0 -8
- package/dist/esm/resources/resource.js.map +1 -1
- package/dist/esm/statements/statement.d.ts +20 -64
- package/dist/esm/statements/statement.d.ts.map +1 -1
- package/dist/esm/statements/statement.js +20 -59
- package/dist/esm/statements/statement.js.map +1 -1
- package/dist/esm/validate/testutil.d.ts +3 -0
- package/dist/esm/validate/testutil.d.ts.map +1 -0
- package/dist/esm/validate/testutil.js +18 -0
- package/dist/esm/validate/testutil.js.map +1 -0
- package/dist/esm/validate/validate.js +13 -10
- package/dist/esm/validate/validate.js.map +1 -1
- package/dist/esm/validate/validateTypes.js +4 -4
- package/dist/esm/validate/validateTypes.js.map +1 -1
- package/package.json +1 -1
- package/dist/cjs/annotations/annotations.d.ts +0 -55
- package/dist/cjs/annotations/annotations.d.ts.map +0 -1
- package/dist/cjs/annotations/annotations.js +0 -29
- package/dist/cjs/annotations/annotations.js.map +0 -1
- package/dist/esm/annotations/annotations.d.ts +0 -55
- package/dist/esm/annotations/annotations.d.ts.map +0 -1
- package/dist/esm/annotations/annotations.js +0 -24
- package/dist/esm/annotations/annotations.js.map +0 -1
@@ -1,55 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* The annotations on a policy element
|
3
|
-
*/
|
4
|
-
export interface Annotations {
|
5
|
-
/**
|
6
|
-
* The string keys that have annotations
|
7
|
-
*
|
8
|
-
* @returns the keys that have annotations
|
9
|
-
*/
|
10
|
-
keys(): string[];
|
11
|
-
/**
|
12
|
-
* Get the values for a key
|
13
|
-
*
|
14
|
-
* @param key the key to get the values for
|
15
|
-
* @returns the values for the key or an empty array if the key does not exist
|
16
|
-
*/
|
17
|
-
values(key: string): string[];
|
18
|
-
/**
|
19
|
-
* Checks if a key is present in the annotations
|
20
|
-
*
|
21
|
-
* @param key the key to check
|
22
|
-
* @returns true if the key is present, false otherwise
|
23
|
-
*/
|
24
|
-
hasKey(key: string): boolean;
|
25
|
-
}
|
26
|
-
/**
|
27
|
-
* A store for policy annotations
|
28
|
-
*/
|
29
|
-
export declare class AnnotationStore implements Annotations {
|
30
|
-
private annotations;
|
31
|
-
constructor();
|
32
|
-
addAnnotation(key: string, value: string): void;
|
33
|
-
keys(): string[];
|
34
|
-
hasKey(key: string): boolean;
|
35
|
-
values(key: string): string[];
|
36
|
-
}
|
37
|
-
/**
|
38
|
-
* Standard methods for an object that can be annotated
|
39
|
-
*/
|
40
|
-
export interface Annotated {
|
41
|
-
/**
|
42
|
-
* Add an annotation to the object
|
43
|
-
*
|
44
|
-
* @param key the key of the annotation
|
45
|
-
* @param value the value of the annotation
|
46
|
-
*/
|
47
|
-
addAnnotation(key: string, value: string): void;
|
48
|
-
/**
|
49
|
-
* Get the annotations on the object
|
50
|
-
*
|
51
|
-
* @returns the annotations on the object
|
52
|
-
*/
|
53
|
-
getAnnotations(): Annotations;
|
54
|
-
}
|
55
|
-
//# sourceMappingURL=annotations.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"annotations.d.ts","sourceRoot":"","sources":["../../../src/annotations/annotations.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B;;;;OAIG;IACH,IAAI,IAAI,MAAM,EAAE,CAAA;IAEhB;;;;;OAKG;IACH,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAE7B;;;;;OAKG;IACH,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAC7B;AAED;;GAEG;AACH,qBAAa,eAAgB,YAAW,WAAW;IACjD,OAAO,CAAC,WAAW,CAA0B;;IAK7C,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAOxC,IAAI,IAAI,MAAM,EAAE;IAIhB,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAI5B,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE;CAG9B;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB;;;;;OAKG;IACH,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IAE/C;;;;OAIG;IACH,cAAc,IAAI,WAAW,CAAA;CAC9B"}
|
@@ -1,29 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.AnnotationStore = void 0;
|
4
|
-
/**
|
5
|
-
* A store for policy annotations
|
6
|
-
*/
|
7
|
-
class AnnotationStore {
|
8
|
-
annotations;
|
9
|
-
constructor() {
|
10
|
-
this.annotations = {};
|
11
|
-
}
|
12
|
-
addAnnotation(key, value) {
|
13
|
-
if (!this.annotations[key]) {
|
14
|
-
this.annotations[key] = [];
|
15
|
-
}
|
16
|
-
this.annotations[key].push(value);
|
17
|
-
}
|
18
|
-
keys() {
|
19
|
-
return Object.keys(this.annotations);
|
20
|
-
}
|
21
|
-
hasKey(key) {
|
22
|
-
return this.annotations[key] !== undefined;
|
23
|
-
}
|
24
|
-
values(key) {
|
25
|
-
return this.annotations[key] || [];
|
26
|
-
}
|
27
|
-
}
|
28
|
-
exports.AnnotationStore = AnnotationStore;
|
29
|
-
//# sourceMappingURL=annotations.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"annotations.js","sourceRoot":"","sources":["../../../src/annotations/annotations.ts"],"names":[],"mappings":";;;AA4BA;;GAEG;AACH,MAAa,eAAe;IAClB,WAAW,CAA0B;IAC7C;QACE,IAAI,CAAC,WAAW,GAAG,EAAE,CAAA;IACvB,CAAC;IAED,aAAa,CAAC,GAAW,EAAE,KAAa;QACtC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC;YAC3B,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,EAAE,CAAA;QAC5B,CAAC;QACD,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IACnC,CAAC;IAED,IAAI;QACF,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;IACtC,CAAC;IAED,MAAM,CAAC,GAAW;QAChB,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,KAAK,SAAS,CAAA;IAC5C,CAAC;IAED,MAAM,CAAC,GAAW;QAChB,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,EAAE,CAAA;IACpC,CAAC;CACF;AAxBD,0CAwBC"}
|
@@ -1,55 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* The annotations on a policy element
|
3
|
-
*/
|
4
|
-
export interface Annotations {
|
5
|
-
/**
|
6
|
-
* The string keys that have annotations
|
7
|
-
*
|
8
|
-
* @returns the keys that have annotations
|
9
|
-
*/
|
10
|
-
keys(): string[];
|
11
|
-
/**
|
12
|
-
* Get the values for a key
|
13
|
-
*
|
14
|
-
* @param key the key to get the values for
|
15
|
-
* @returns the values for the key or an empty array if the key does not exist
|
16
|
-
*/
|
17
|
-
values(key: string): string[];
|
18
|
-
/**
|
19
|
-
* Checks if a key is present in the annotations
|
20
|
-
*
|
21
|
-
* @param key the key to check
|
22
|
-
* @returns true if the key is present, false otherwise
|
23
|
-
*/
|
24
|
-
hasKey(key: string): boolean;
|
25
|
-
}
|
26
|
-
/**
|
27
|
-
* A store for policy annotations
|
28
|
-
*/
|
29
|
-
export declare class AnnotationStore implements Annotations {
|
30
|
-
private annotations;
|
31
|
-
constructor();
|
32
|
-
addAnnotation(key: string, value: string): void;
|
33
|
-
keys(): string[];
|
34
|
-
hasKey(key: string): boolean;
|
35
|
-
values(key: string): string[];
|
36
|
-
}
|
37
|
-
/**
|
38
|
-
* Standard methods for an object that can be annotated
|
39
|
-
*/
|
40
|
-
export interface Annotated {
|
41
|
-
/**
|
42
|
-
* Add an annotation to the object
|
43
|
-
*
|
44
|
-
* @param key the key of the annotation
|
45
|
-
* @param value the value of the annotation
|
46
|
-
*/
|
47
|
-
addAnnotation(key: string, value: string): void;
|
48
|
-
/**
|
49
|
-
* Get the annotations on the object
|
50
|
-
*
|
51
|
-
* @returns the annotations on the object
|
52
|
-
*/
|
53
|
-
getAnnotations(): Annotations;
|
54
|
-
}
|
55
|
-
//# sourceMappingURL=annotations.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"annotations.d.ts","sourceRoot":"","sources":["../../../src/annotations/annotations.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B;;;;OAIG;IACH,IAAI,IAAI,MAAM,EAAE,CAAA;IAEhB;;;;;OAKG;IACH,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAE7B;;;;;OAKG;IACH,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAC7B;AAED;;GAEG;AACH,qBAAa,eAAgB,YAAW,WAAW;IACjD,OAAO,CAAC,WAAW,CAA0B;;IAK7C,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAOxC,IAAI,IAAI,MAAM,EAAE;IAIhB,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAI5B,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE;CAG9B;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB;;;;;OAKG;IACH,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IAE/C;;;;OAIG;IACH,cAAc,IAAI,WAAW,CAAA;CAC9B"}
|
@@ -1,24 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* A store for policy annotations
|
3
|
-
*/
|
4
|
-
export class AnnotationStore {
|
5
|
-
constructor() {
|
6
|
-
this.annotations = {};
|
7
|
-
}
|
8
|
-
addAnnotation(key, value) {
|
9
|
-
if (!this.annotations[key]) {
|
10
|
-
this.annotations[key] = [];
|
11
|
-
}
|
12
|
-
this.annotations[key].push(value);
|
13
|
-
}
|
14
|
-
keys() {
|
15
|
-
return Object.keys(this.annotations);
|
16
|
-
}
|
17
|
-
hasKey(key) {
|
18
|
-
return this.annotations[key] !== undefined;
|
19
|
-
}
|
20
|
-
values(key) {
|
21
|
-
return this.annotations[key] || [];
|
22
|
-
}
|
23
|
-
}
|
24
|
-
//# sourceMappingURL=annotations.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"annotations.js","sourceRoot":"","sources":["../../../src/annotations/annotations.ts"],"names":[],"mappings":"AA4BA;;GAEG;AACH,MAAM,OAAO,eAAe;IAE1B;QACE,IAAI,CAAC,WAAW,GAAG,EAAE,CAAA;IACvB,CAAC;IAED,aAAa,CAAC,GAAW,EAAE,KAAa;QACtC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC;YAC3B,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,EAAE,CAAA;QAC5B,CAAC;QACD,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IACnC,CAAC;IAED,IAAI;QACF,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;IACtC,CAAC;IAED,MAAM,CAAC,GAAW;QAChB,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,KAAK,SAAS,CAAA;IAC5C,CAAC;IAED,MAAM,CAAC,GAAW;QAChB,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,EAAE,CAAA;IACpC,CAAC;CACF"}
|