carlin 1.31.18 → 1.31.19

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 +4 -3
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -4432,7 +4432,7 @@ var getEnv = () => {
4432
4432
  var cli = () => {
4433
4433
  let finalConfig;
4434
4434
  const getConfig = () => {
4435
- const names = ["js", "yml", "yaml", "json", "ts"].map((ext) => {
4435
+ const names = ["ts", "js", "yml", "yaml", "json"].map((ext) => {
4436
4436
  return `${NAME}.${ext}`;
4437
4437
  });
4438
4438
  const paths = [];
@@ -4451,7 +4451,7 @@ var cli = () => {
4451
4451
  finalConfig = deepMerge.all(configs.reverse());
4452
4452
  return finalConfig;
4453
4453
  };
4454
- return yargs2(hideBin2(process.argv)).strictCommands().scriptName(NAME).env(getEnv()).options(addGroupToOptions(options8, "Common Options")).middleware((argv, { parsed }) => {
4454
+ const handleEnvironments = (argv, { parsed }) => {
4455
4455
  const { environment, environments } = argv;
4456
4456
  if (environment && environments && environments[environment]) {
4457
4457
  Object.entries(environments[environment]).forEach(([key, value]) => {
@@ -4470,7 +4470,8 @@ var cli = () => {
4470
4470
  }
4471
4471
  });
4472
4472
  }
4473
- }).middleware(({ environment }) => {
4473
+ };
4474
+ return yargs2(hideBin2(process.argv)).strictCommands().scriptName(NAME).env(getEnv()).options(addGroupToOptions(options8, "Common Options")).middleware(handleEnvironments).middleware(({ environment }) => {
4474
4475
  if (!["string", "undefined"].includes(typeof environment)) {
4475
4476
  throw new Error(
4476
4477
  `environment type is invalid. The value: ${JSON.stringify(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carlin",
3
- "version": "1.31.18",
3
+ "version": "1.31.19",
4
4
  "description": "",
5
5
  "license": "GPL-3.0",
6
6
  "author": "Pedro Arantes <arantespp@gmail.com> (https://twitter.com/arantespp)",
@@ -63,8 +63,8 @@
63
63
  "jest": "^29.7.0",
64
64
  "tsup": "^8.0.2",
65
65
  "typescript": "~5.4.5",
66
- "@ttoss/cloudformation": "^0.9.5",
67
- "@ttoss/test-utils": "^2.1.5"
66
+ "@ttoss/test-utils": "^2.1.5",
67
+ "@ttoss/cloudformation": "^0.9.5"
68
68
  },
69
69
  "keywords": [],
70
70
  "publishConfig": {