@gesslar/sassy 0.20.2 → 0.21.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/src/Util.js CHANGED
@@ -102,7 +102,7 @@ export default class Util {
102
102
  * Wrapper around Promise.all for consistency with other utility methods.
103
103
  *
104
104
  * @param {Promise[]} promises - Array of promises to await
105
- * @returns {Promise<any[]>} Results of all promises
105
+ * @returns {Promise<unknown[]>} Results of all promises
106
106
  */
107
107
  static async awaitAll(promises) {
108
108
  return await Promise.all(promises)
@@ -124,7 +124,7 @@ export default class Util {
124
124
  * Wrapper around Promise.race for consistency with other utility methods.
125
125
  *
126
126
  * @param {Promise[]} promises - Array of promises to race
127
- * @returns {Promise<any>} Result of the first settled promise
127
+ * @returns {Promise<unknown>} Result of the first settled promise
128
128
  */
129
129
  static async race(promises) {
130
130
  return await Promise.race(promises)
package/src/Valid.js CHANGED
@@ -7,7 +7,7 @@ export default class Valid {
7
7
  /**
8
8
  * Validates a value against a type
9
9
  *
10
- * @param {*} value - The value to validate
10
+ * @param {unknown} value - The value to validate
11
11
  * @param {string} type - The expected type in the form of "object",
12
12
  * "object[]", "object|object[]"
13
13
  * @param {object} [options] - Additional options for validation.
package/src/cli.js CHANGED
@@ -110,26 +110,39 @@ void (async function main() {
110
110
  .description(pkgJson.description)
111
111
  .version(pkgJson.version)
112
112
 
113
- // Add the build subcommand
114
- const buildCommand = new BuildCommand({cwd, packageJson: pkgJson})
115
- buildCommand.cache = cache
113
+ const commands = [BuildCommand, ResolveCommand, LintCommand]
116
114
 
117
- void(await buildCommand.buildCli(program))
118
- .addCliOptions(alwaysAvailable, false)
115
+ for(const CommandClass of commands) {
116
+ const command = new CommandClass({cwd, packageJson: pkgJson})
119
117
 
120
- // Add the resolve subcommand
121
- const resolveCommand = new ResolveCommand({cwd, packageJson: pkgJson})
122
- resolveCommand.cache = cache
118
+ command.setCache(cache)
119
+ await command.buildCli(program)
120
+ command.addCliOptions(alwaysAvailable, false)
121
+ }
122
+
123
+ // // Add the build subcommand
124
+ // const buildCommand = new BuildCommand({cwd, packageJson: pkgJson})
125
+
126
+ // buildCommand.cache = cache
127
+
128
+ // void(await buildCommand.buildCli(program))
129
+ // .addCliOptions(alwaysAvailable, false)
130
+
131
+ // // Add the resolve subcommand
132
+ // const resolveCommand = new ResolveCommand({cwd, packageJson: pkgJson})
133
+
134
+ // resolveCommand.cache = cache
135
+
136
+ // void(await resolveCommand.buildCli(program))
137
+ // .addCliOptions(alwaysAvailable, false)
123
138
 
124
- void(await resolveCommand.buildCli(program))
125
- .addCliOptions(alwaysAvailable, false)
139
+ // // Add the lint subcommand
140
+ // const lintCommand = new LintCommand({cwd, packageJson: pkgJson})
126
141
 
127
- // Add the lint subcommand
128
- const lintCommand = new LintCommand({cwd, packageJson: pkgJson})
129
- lintCommand.cache = cache
142
+ // lintCommand.cache = cache
130
143
 
131
- void(await lintCommand.buildCli(program))
132
- .addCliOptions(alwaysAvailable, false)
144
+ // void(await lintCommand.buildCli(program))
145
+ // .addCliOptions(alwaysAvailable, false)
133
146
 
134
147
  // Let'er rip, bitches! VROOM VROOM, motherfucker!!
135
148
  await program.parseAsync()