@ttoss/cloud-roles 0.8.37 → 0.8.39

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttoss/cloud-roles",
3
- "version": "0.8.37",
3
+ "version": "0.8.39",
4
4
  "description": "Create CloudFormation templates for roles with TypeScript.",
5
5
  "license": "MIT",
6
6
  "author": "ttoss",
@@ -23,14 +23,14 @@
23
23
  "dist"
24
24
  ],
25
25
  "dependencies": {
26
- "@ttoss/cloudformation": "^0.11.7"
26
+ "@ttoss/cloudformation": "^0.11.9"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@types/jest": "^30.0.0",
30
30
  "jest": "^30.2.0",
31
31
  "tsup": "^8.5.1",
32
- "@ttoss/test-utils": "^4.0.0",
33
- "@ttoss/config": "^1.35.12"
32
+ "@ttoss/config": "^1.35.12",
33
+ "@ttoss/test-utils": "^4.0.2"
34
34
  },
35
35
  "keywords": [],
36
36
  "publishConfig": {
package/dist/esm/index.js DELETED
@@ -1,43 +0,0 @@
1
- /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
- var __defProp = Object.defineProperty;
3
- var __name = (target, value) => __defProp(target, "name", {
4
- value,
5
- configurable: true
6
- });
7
-
8
- // src/index.ts
9
- var IAM_PATH = "/custom-iam/";
10
- var createRolesTemplate = /* @__PURE__ */__name(({
11
- path = IAM_PATH,
12
- resources
13
- }) => {
14
- Object.values(resources).forEach(resource => {
15
- if (!resource.Properties.Path) {
16
- resource.Properties.Path = path;
17
- }
18
- });
19
- const outputs = Object.keys(resources).reduce((acc, key) => {
20
- const newKey = key + "Arn";
21
- acc[newKey] = {
22
- Description: `Arn of the ${key} role.`,
23
- Value: {
24
- "Fn::GetAtt": [key, "Arn"]
25
- },
26
- Export: {
27
- Name: {
28
- "Fn::Join": [":", [{
29
- Ref: "AWS::StackName"
30
- }, newKey]]
31
- }
32
- }
33
- };
34
- return acc;
35
- }, {});
36
- return {
37
- AWSTemplateFormatVersion: "2010-09-09",
38
- Description: "Roles template. Created by @ttoss/cloud-roles.",
39
- Resources: resources,
40
- Outputs: outputs
41
- };
42
- }, "createRolesTemplate");
43
- export { IAM_PATH, createRolesTemplate };
package/dist/index.d.mts DELETED
@@ -1,13 +0,0 @@
1
- import { IAMRoleResource } from '@ttoss/cloudformation';
2
- export { CloudFormationTemplate, IAMRoleResource, Outputs } from '@ttoss/cloudformation';
3
-
4
- declare const IAM_PATH = "/custom-iam/";
5
-
6
- declare const createRolesTemplate: ({ path, resources, }: {
7
- path?: string;
8
- resources: {
9
- [key: string]: IAMRoleResource;
10
- };
11
- }) => any;
12
-
13
- export { IAM_PATH, createRolesTemplate };
package/dist/index.d.ts DELETED
@@ -1,13 +0,0 @@
1
- import { IAMRoleResource } from '@ttoss/cloudformation';
2
- export { CloudFormationTemplate, IAMRoleResource, Outputs } from '@ttoss/cloudformation';
3
-
4
- declare const IAM_PATH = "/custom-iam/";
5
-
6
- declare const createRolesTemplate: ({ path, resources, }: {
7
- path?: string;
8
- resources: {
9
- [key: string]: IAMRoleResource;
10
- };
11
- }) => any;
12
-
13
- export { IAM_PATH, createRolesTemplate };
package/dist/index.js DELETED
@@ -1,76 +0,0 @@
1
- /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
- "use strict";
3
-
4
- var __defProp = Object.defineProperty;
5
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __name = (target, value) => __defProp(target, "name", {
9
- value,
10
- configurable: true
11
- });
12
- var __export = (target, all) => {
13
- for (var name in all) __defProp(target, name, {
14
- get: all[name],
15
- enumerable: true
16
- });
17
- };
18
- var __copyProps = (to, from, except, desc) => {
19
- if (from && typeof from === "object" || typeof from === "function") {
20
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
21
- get: () => from[key],
22
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
23
- });
24
- }
25
- return to;
26
- };
27
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
28
- value: true
29
- }), mod);
30
-
31
- // src/index.ts
32
- var index_exports = {};
33
- __export(index_exports, {
34
- IAM_PATH: () => IAM_PATH,
35
- createRolesTemplate: () => createRolesTemplate
36
- });
37
- module.exports = __toCommonJS(index_exports);
38
- var IAM_PATH = "/custom-iam/";
39
- var createRolesTemplate = /* @__PURE__ */__name(({
40
- path = IAM_PATH,
41
- resources
42
- }) => {
43
- Object.values(resources).forEach(resource => {
44
- if (!resource.Properties.Path) {
45
- resource.Properties.Path = path;
46
- }
47
- });
48
- const outputs = Object.keys(resources).reduce((acc, key) => {
49
- const newKey = key + "Arn";
50
- acc[newKey] = {
51
- Description: `Arn of the ${key} role.`,
52
- Value: {
53
- "Fn::GetAtt": [key, "Arn"]
54
- },
55
- Export: {
56
- Name: {
57
- "Fn::Join": [":", [{
58
- Ref: "AWS::StackName"
59
- }, newKey]]
60
- }
61
- }
62
- };
63
- return acc;
64
- }, {});
65
- return {
66
- AWSTemplateFormatVersion: "2010-09-09",
67
- Description: "Roles template. Created by @ttoss/cloud-roles.",
68
- Resources: resources,
69
- Outputs: outputs
70
- };
71
- }, "createRolesTemplate");
72
- // Annotate the CommonJS export names for ESM import in node:
73
- 0 && (module.exports = {
74
- IAM_PATH,
75
- createRolesTemplate
76
- });