@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.
Files changed (90) hide show
  1. package/README.md +101 -107
  2. package/dist/cjs/actions/action.d.ts +1 -7
  3. package/dist/cjs/actions/action.d.ts.map +1 -1
  4. package/dist/cjs/actions/action.js +0 -9
  5. package/dist/cjs/actions/action.js.map +1 -1
  6. package/dist/cjs/conditions/condition.d.ts +1 -7
  7. package/dist/cjs/conditions/condition.d.ts.map +1 -1
  8. package/dist/cjs/conditions/condition.js +0 -8
  9. package/dist/cjs/conditions/condition.js.map +1 -1
  10. package/dist/cjs/index.d.ts +7 -7
  11. package/dist/cjs/index.d.ts.map +1 -1
  12. package/dist/cjs/index.js +1 -2
  13. package/dist/cjs/index.js.map +1 -1
  14. package/dist/cjs/parser.d.ts +1 -2
  15. package/dist/cjs/parser.d.ts.map +1 -1
  16. package/dist/cjs/parser.js +1 -5
  17. package/dist/cjs/parser.js.map +1 -1
  18. package/dist/cjs/policies/policy.d.ts +3 -13
  19. package/dist/cjs/policies/policy.d.ts.map +1 -1
  20. package/dist/cjs/policies/policy.js +3 -21
  21. package/dist/cjs/policies/policy.js.map +1 -1
  22. package/dist/cjs/principals/principal.d.ts +1 -7
  23. package/dist/cjs/principals/principal.d.ts.map +1 -1
  24. package/dist/cjs/principals/principal.js +0 -9
  25. package/dist/cjs/principals/principal.js.map +1 -1
  26. package/dist/cjs/resources/resource.d.ts +1 -7
  27. package/dist/cjs/resources/resource.d.ts.map +1 -1
  28. package/dist/cjs/resources/resource.js +0 -8
  29. package/dist/cjs/resources/resource.js.map +1 -1
  30. package/dist/cjs/statements/statement.d.ts +20 -64
  31. package/dist/cjs/statements/statement.d.ts.map +1 -1
  32. package/dist/cjs/statements/statement.js +20 -68
  33. package/dist/cjs/statements/statement.js.map +1 -1
  34. package/dist/cjs/validate/testutil.d.ts +3 -0
  35. package/dist/cjs/validate/testutil.d.ts.map +1 -0
  36. package/dist/cjs/validate/testutil.js +21 -0
  37. package/dist/cjs/validate/testutil.js.map +1 -0
  38. package/dist/cjs/validate/validate.js +13 -10
  39. package/dist/cjs/validate/validate.js.map +1 -1
  40. package/dist/cjs/validate/validateTypes.js +4 -4
  41. package/dist/cjs/validate/validateTypes.js.map +1 -1
  42. package/dist/esm/actions/action.d.ts +1 -7
  43. package/dist/esm/actions/action.d.ts.map +1 -1
  44. package/dist/esm/actions/action.js +0 -8
  45. package/dist/esm/actions/action.js.map +1 -1
  46. package/dist/esm/conditions/condition.d.ts +1 -7
  47. package/dist/esm/conditions/condition.d.ts.map +1 -1
  48. package/dist/esm/conditions/condition.js +0 -8
  49. package/dist/esm/conditions/condition.js.map +1 -1
  50. package/dist/esm/index.d.ts +7 -7
  51. package/dist/esm/index.d.ts.map +1 -1
  52. package/dist/esm/index.js +1 -1
  53. package/dist/esm/index.js.map +1 -1
  54. package/dist/esm/parser.d.ts +1 -2
  55. package/dist/esm/parser.d.ts.map +1 -1
  56. package/dist/esm/parser.js +1 -4
  57. package/dist/esm/parser.js.map +1 -1
  58. package/dist/esm/policies/policy.d.ts +3 -13
  59. package/dist/esm/policies/policy.d.ts.map +1 -1
  60. package/dist/esm/policies/policy.js +3 -18
  61. package/dist/esm/policies/policy.js.map +1 -1
  62. package/dist/esm/principals/principal.d.ts +1 -7
  63. package/dist/esm/principals/principal.d.ts.map +1 -1
  64. package/dist/esm/principals/principal.js +0 -8
  65. package/dist/esm/principals/principal.js.map +1 -1
  66. package/dist/esm/resources/resource.d.ts +1 -7
  67. package/dist/esm/resources/resource.d.ts.map +1 -1
  68. package/dist/esm/resources/resource.js +0 -8
  69. package/dist/esm/resources/resource.js.map +1 -1
  70. package/dist/esm/statements/statement.d.ts +20 -64
  71. package/dist/esm/statements/statement.d.ts.map +1 -1
  72. package/dist/esm/statements/statement.js +20 -59
  73. package/dist/esm/statements/statement.js.map +1 -1
  74. package/dist/esm/validate/testutil.d.ts +3 -0
  75. package/dist/esm/validate/testutil.d.ts.map +1 -0
  76. package/dist/esm/validate/testutil.js +18 -0
  77. package/dist/esm/validate/testutil.js.map +1 -0
  78. package/dist/esm/validate/validate.js +13 -10
  79. package/dist/esm/validate/validate.js.map +1 -1
  80. package/dist/esm/validate/validateTypes.js +4 -4
  81. package/dist/esm/validate/validateTypes.js.map +1 -1
  82. package/package.json +1 -1
  83. package/dist/cjs/annotations/annotations.d.ts +0 -55
  84. package/dist/cjs/annotations/annotations.d.ts.map +0 -1
  85. package/dist/cjs/annotations/annotations.js +0 -29
  86. package/dist/cjs/annotations/annotations.js.map +0 -1
  87. package/dist/esm/annotations/annotations.d.ts +0 -55
  88. package/dist/esm/annotations/annotations.d.ts.map +0 -1
  89. package/dist/esm/annotations/annotations.js +0 -24
  90. 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"}