@meltstudio/config-loader 1.0.1 → 1.0.3

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 +3 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -436,7 +436,7 @@ var Settings = class {
436
436
  constructor(schema, sources) {
437
437
  this.schema = schema;
438
438
  this.sources = sources;
439
- this.program = new import_commander.Command();
439
+ this.program = new import_commander.Command().allowUnknownOption(true).allowExcessArguments(true);
440
440
  this.load();
441
441
  }
442
442
  validateFiles() {
@@ -466,7 +466,7 @@ var Settings = class {
466
466
  if (!(fs2.existsSync(dir) && fs2.lstatSync(dir).isDirectory())) {
467
467
  throw new Error(`'${dir}' not exists or is not a dir`);
468
468
  }
469
- const filesInDirectory = fs2.readdirSync(dir);
469
+ const filesInDirectory = fs2.readdirSync(dir).sort();
470
470
  if (filesInDirectory.length === 0) {
471
471
  throw new Error(`Directory '${dir}' is empty`);
472
472
  }
@@ -474,7 +474,7 @@ var Settings = class {
474
474
  if (!Array.isArray(this.sourceFile)) {
475
475
  this.sourceFile = [];
476
476
  }
477
- this.sourceFile.unshift(`${dir}/${file}`);
477
+ this.sourceFile.push(`${dir}/${file}`);
478
478
  });
479
479
  }
480
480
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meltstudio/config-loader",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Melt Studio's tool for loading configurations into a Node.js application.",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",