@ttoss/cloudformation 0.9.8 → 0.10.1

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/dist/esm/index.js CHANGED
@@ -167,7 +167,8 @@ var defaultTemplatePaths = ["ts", "js", "yaml", "yml", "json"].map(extension =>
167
167
  return `./src/cloudformation.${extension}`;
168
168
  });
169
169
  var findAndReadCloudFormationTemplate = async ({
170
- templatePath: defaultTemplatePath
170
+ templatePath: defaultTemplatePath,
171
+ options = {}
171
172
  }) => {
172
173
  const templatePath = defaultTemplatePath || defaultTemplatePaths.reduce((acc, cur) => {
173
174
  if (acc) {
@@ -186,7 +187,8 @@ var findAndReadCloudFormationTemplate = async ({
186
187
  }
187
188
  const configFilePath = path2.resolve(process.cwd(), templatePath);
188
189
  return readConfigFile({
189
- configFilePath
190
+ configFilePath,
191
+ options
190
192
  });
191
193
  };
192
194
  export { findAndReadCloudFormationTemplate };
package/dist/index.d.cts CHANGED
@@ -76,8 +76,9 @@ type CloudFormationTemplate = {
76
76
  Outputs?: Outputs;
77
77
  };
78
78
 
79
- declare const findAndReadCloudFormationTemplate: ({ templatePath: defaultTemplatePath, }: {
79
+ declare const findAndReadCloudFormationTemplate: ({ templatePath: defaultTemplatePath, options, }: {
80
80
  templatePath?: string;
81
+ options?: unknown;
81
82
  }) => Promise<CloudFormationTemplate>;
82
83
 
83
84
  export { type CloudFormationTemplate, type IAMRoleResource, type Output, type Outputs, type Parameter, type Parameters, type Policy, type Resource, type Resources, findAndReadCloudFormationTemplate };
package/dist/index.d.ts CHANGED
@@ -76,8 +76,9 @@ type CloudFormationTemplate = {
76
76
  Outputs?: Outputs;
77
77
  };
78
78
 
79
- declare const findAndReadCloudFormationTemplate: ({ templatePath: defaultTemplatePath, }: {
79
+ declare const findAndReadCloudFormationTemplate: ({ templatePath: defaultTemplatePath, options, }: {
80
80
  templatePath?: string;
81
+ options?: unknown;
81
82
  }) => Promise<CloudFormationTemplate>;
82
83
 
83
84
  export { type CloudFormationTemplate, type IAMRoleResource, type Output, type Outputs, type Parameter, type Parameters, type Policy, type Resource, type Resources, findAndReadCloudFormationTemplate };
package/dist/index.js CHANGED
@@ -209,7 +209,8 @@ var defaultTemplatePaths = ["ts", "js", "yaml", "yml", "json"].map(extension =>
209
209
  return `./src/cloudformation.${extension}`;
210
210
  });
211
211
  var findAndReadCloudFormationTemplate = async ({
212
- templatePath: defaultTemplatePath
212
+ templatePath: defaultTemplatePath,
213
+ options = {}
213
214
  }) => {
214
215
  const templatePath = defaultTemplatePath || defaultTemplatePaths.reduce((acc, cur) => {
215
216
  if (acc) {
@@ -228,7 +229,8 @@ var findAndReadCloudFormationTemplate = async ({
228
229
  }
229
230
  const configFilePath = path2.resolve(process.cwd(), templatePath);
230
231
  return (0, import_read_config_file.readConfigFile)({
231
- configFilePath
232
+ configFilePath,
233
+ options
232
234
  });
233
235
  };
234
236
  // Annotate the CommonJS export names for ESM import in node:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttoss/cloudformation",
3
- "version": "0.9.8",
3
+ "version": "0.10.1",
4
4
  "description": "CloudFormation utils.",
5
5
  "author": "ttoss",
6
6
  "contributors": [
@@ -24,7 +24,7 @@
24
24
  ],
25
25
  "dependencies": {
26
26
  "js-yaml": "^4.1.0",
27
- "@ttoss/read-config-file": "^1.0.3"
27
+ "@ttoss/read-config-file": "^1.1.1"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@types/jest": "^29.5.12",
@@ -33,7 +33,7 @@
33
33
  "jest": "^29.7.0",
34
34
  "tsup": "^8.0.2",
35
35
  "@ttoss/config": "^1.32.4",
36
- "@ttoss/test-utils": "^2.1.7"
36
+ "@ttoss/test-utils": "^2.1.8"
37
37
  },
38
38
  "keywords": [],
39
39
  "publishConfig": {
@@ -1,6 +1,6 @@
1
- import * as fs from 'fs';
2
- import * as path from 'path';
3
- import { CloudFormationTemplate } from './CloudFormationTemplate';
1
+ import * as fs from 'node:fs';
2
+ import * as path from 'node:path';
3
+ import { type CloudFormationTemplate } from './CloudFormationTemplate';
4
4
  import { readCloudFormationYamlTemplate } from './readCloudFormationYamlTemplate';
5
5
  import { readConfigFile } from '@ttoss/read-config-file';
6
6
 
@@ -12,8 +12,10 @@ export const defaultTemplatePaths = ['ts', 'js', 'yaml', 'yml', 'json'].map(
12
12
 
13
13
  export const findAndReadCloudFormationTemplate = async ({
14
14
  templatePath: defaultTemplatePath,
15
+ options = {},
15
16
  }: {
16
17
  templatePath?: string;
18
+ options?: unknown;
17
19
  }): Promise<CloudFormationTemplate> => {
18
20
  const templatePath =
19
21
  defaultTemplatePath ||
@@ -48,5 +50,5 @@ export const findAndReadCloudFormationTemplate = async ({
48
50
 
49
51
  const configFilePath = path.resolve(process.cwd(), templatePath);
50
52
 
51
- return readConfigFile({ configFilePath });
53
+ return readConfigFile({ configFilePath, options });
52
54
  };