commandkit 0.0.6 → 0.0.8

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/CHANGELOG.md CHANGED
@@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  The format is based on [Keep a Changelog](http://keepachangelog.com/)
6
6
 
7
+ ## [0.0.8] - 2023-07-03
8
+
9
+ ### Added
10
+
11
+ - Support for nested files inside of each event folder.
12
+
13
+ ## [0.0.7] - 2023-07-02
14
+
15
+ ### Changed
16
+
17
+ - Give validation functions access to the full command object (commandObj) excluding the run function (as that is handled by the command handler), as opposed to just the `data` and `options` properties.
18
+
7
19
  ## [0.0.6] - 2023-07-02
8
20
 
9
21
  ### Fixed
@@ -218,9 +218,11 @@ class CommandHandler {
218
218
  }
219
219
  // Run user validation functions
220
220
  const validationFunctions = this._data.validations;
221
+ const { data, options, run, ...rest } = targetCommand;
221
222
  const commandObj = {
222
223
  data: targetCommand.data,
223
224
  options: targetCommand.options,
225
+ ...rest,
224
226
  };
225
227
  let canRun = true;
226
228
  for (const validationFunction of validationFunctions) {
@@ -16,7 +16,7 @@ class EventHandler {
16
16
  const eventFolderPaths = (0, get_paths_1.getFolderPaths)(this._data.eventsPath);
17
17
  for (const eventFolderPath of eventFolderPaths) {
18
18
  const eventName = eventFolderPath.replace(/\\/g, '/').split('/').pop();
19
- const eventFilePaths = (0, get_paths_1.getFilePaths)(eventFolderPath).filter((path) => path.endsWith('.js') || path.endsWith('.ts'));
19
+ const eventFilePaths = (0, get_paths_1.getFilePaths)(eventFolderPath, true).filter((path) => path.endsWith('.js') || path.endsWith('.ts'));
20
20
  const eventObj = {
21
21
  name: eventName,
22
22
  functions: [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "commandkit",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "main": "dist/index.js",
5
5
  "license": "MIT",
6
6
  "scripts": {