carlin 1.35.0 → 1.36.0

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 (2) hide show
  1. package/dist/index.js +39 -1
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -4098,7 +4098,7 @@ var options5 = {
4098
4098
  type: "string"
4099
4099
  },
4100
4100
  /**
4101
- * This option has the format:
4101
+ * This option has the format to match [CloudFormation parameter](https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_Parameter.html).
4102
4102
  *
4103
4103
  * ```ts
4104
4104
  * {
@@ -4108,9 +4108,47 @@ var options5 = {
4108
4108
  * resolvedValue: string
4109
4109
  * }[]
4110
4110
  * ```
4111
+ *
4112
+ * For example:
4113
+ *
4114
+ * ```ts
4115
+ * [
4116
+ * {
4117
+ * key: 'key1',
4118
+ * value: 'value1',
4119
+ * },
4120
+ * {
4121
+ * key: 'key2',
4122
+ * value: 'value2',
4123
+ * }
4124
+ * ]
4125
+ * ```
4126
+ *
4127
+ * If you want to simplify the usage, you can pass a object with key and value only:
4128
+ *
4129
+ * ```ts
4130
+ * {
4131
+ * key1: 'value1',
4132
+ * key2: 'value2'
4133
+ * }
4134
+ * ```
4111
4135
  */
4112
4136
  parameters: {
4113
4137
  alias: "p",
4138
+ coerce: (arg) => {
4139
+ if (Array.isArray(arg)) {
4140
+ return arg;
4141
+ }
4142
+ if (typeof arg === "object") {
4143
+ return Object.entries(arg).map(([key, value]) => {
4144
+ return {
4145
+ key,
4146
+ value
4147
+ };
4148
+ });
4149
+ }
4150
+ return [];
4151
+ },
4114
4152
  default: [],
4115
4153
  describe: "A list of parameters that will be passed to CloudFormation Parameters when deploying."
4116
4154
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carlin",
3
- "version": "1.35.0",
3
+ "version": "1.36.0",
4
4
  "description": "",
5
5
  "license": "GPL-3.0",
6
6
  "author": "Pedro Arantes <arantespp@gmail.com> (https://twitter.com/arantespp)",
@@ -45,8 +45,8 @@
45
45
  "uglify-js": "^3.17.4",
46
46
  "vercel": "^34.2.0",
47
47
  "yargs": "^17.7.2",
48
- "@ttoss/cloudformation": "^0.10.0",
49
48
  "@ttoss/config": "^1.32.4",
49
+ "@ttoss/cloudformation": "^0.10.0",
50
50
  "@ttoss/read-config-file": "^1.1.0"
51
51
  },
52
52
  "devDependencies": {