@thegetty/quire-cli 1.0.0-rc.25 → 1.0.0-rc.26

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
@@ -12,6 +12,13 @@ Changelog entries are classified using the following labels:
12
12
  - `Fixed`: for any bug fixes
13
13
  - `Removed`: for deprecated features removed in this release
14
14
 
15
+ ## [1.0.0-rc.26]
16
+
17
+ ### Changed
18
+
19
+ - Import path using node namespace in the cli info command
20
+ - Correct file extension of cmd module called by the cli
21
+
15
22
  ## [1.0.0-rc.25]
16
23
 
17
24
  ### Changed
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@thegetty/quire-cli",
3
3
  "description": "Quire command-line interface",
4
- "version": "1.0.0-rc.25",
4
+ "version": "1.0.0-rc.26",
5
5
  "author": "Getty Digital",
6
6
  "license": "SEE LICENSE IN https://github.com/thegetty/quire/blob/main/LICENSE",
7
7
  "bugs": {
@@ -2,7 +2,7 @@ import Command from '#src/Command.js'
2
2
  import { execaCommand } from 'execa'
3
3
  import fs from 'node:fs'
4
4
  import os from 'node:os'
5
- import path from 'path'
5
+ import path from 'node:path'
6
6
  import testcwd from '#helpers/test-cwd.js'
7
7
 
8
8
  /**
@@ -19,7 +19,7 @@ const factory = (options = {}) => {
19
19
  * Use the version of Eleventy installed to `lib/quire/versions`
20
20
  */
21
21
  const eleventy =
22
- path.join(eleventyRoot, 'node_modules', '@11ty', 'eleventy', 'cmd.js')
22
+ path.join(eleventyRoot, 'node_modules', '@11ty', 'eleventy', 'cmd.cjs')
23
23
 
24
24
  const command = [
25
25
  eleventy,
package/src/LOGGING.md DELETED
@@ -1,16 +0,0 @@
1
-
2
- ## Logging
3
-
4
- - https://betterstack.com/community/guides/logging/nodejs-logging-best-practices/
5
-
6
- ### `debug-js`
7
- - https://github.com/debug-js/debug
8
- - https://github.com/commenthol/debug-level
9
-
10
- ### Pino
11
- - https://betterstack.com/community/guides/logging/how-to-install-setup-and-use-pino-to-log-node-js-applications/
12
- - https://github.com/pinojs/pino
13
-
14
- ### Winston
15
- - https://betterstack.com/community/guides/logging/how-to-install-setup-and-use-winston-and-morgan-to-log-node-js-applications/
16
- - https://github.com/winstonjs/winston
package/src/PLUGIN.md DELETED
@@ -1,57 +0,0 @@
1
- ## Quire Plugins
2
-
3
- ### Defining Plugins
4
-
5
- ```javascript
6
- import { definePlugin } from 'quire-cli/plugins'
7
-
8
- definePlugin({
9
- commands: [],
10
- compatability: {
11
- // quire-cli version
12
- },
13
- name: 'plugin-name',
14
- version: 'semantic-version',
15
- install: () => {},
16
- prepare: () => {},
17
- })
18
- ```
19
-
20
- ### Adding Quire Commands
21
-
22
-
23
-
24
- ### Modifying Quire Commands
25
-
26
- ```javascript
27
- import { modifyCommand } from 'quire-cli/plugins'
28
-
29
- /**
30
- * Extend an existing quire-cli command with additional aliases or options
31
- *
32
- * @todo how should the version be updated when a command is extended?
33
- *
34
- * @typedef {CommandDefinition}
35
- * @property {String} alias
36
- * @property {Array<String>} aliases
37
- * @property {Array<CommandOption>} options
38
- *
39
- * @returns {Command} instance of the extended command object
40
- */
41
- modifyCommand(commandName, {})
42
- ```
43
-
44
- ### Overriding Quire Commands
45
-
46
- ```javascript
47
- import { replaceCommand } from 'quire-cli/plugins'
48
-
49
- /**
50
- * Override an existing quire-cli command
51
- *
52
- * @params {CommandDefinition} A complete Command definition
53
- *
54
- * @returns {Command} instance of the extended command object
55
- */
56
- replaceCommand({})
57
- ```
@@ -1,35 +0,0 @@
1
- import Command from '#src/Command.js'
2
-
3
- /**
4
- * Quire CLI `config get` Command
5
- *
6
- * @class ConfigGetCommand
7
- * @extends {Command}
8
- */
9
- export default class ConfigGetCommand extends Command {
10
- static definition = {
11
- name: 'config-get',
12
- description: 'Get the value of a Quire CLI configuration property',
13
- summary: 'get a cli configuration property',
14
- version: '1.0.0',
15
- args: [
16
- [ '[property]', 'configuration property' ]
17
- ]
18
- }
19
-
20
- constructor() {
21
- super(ConfigGetCommand.definition)
22
- }
23
-
24
- /**
25
- * @param {String} key
26
- * @param {Object} options
27
- * @return {Promise}
28
- */
29
- async action(property, options = {}) {
30
- for (const [ key, value ] of Object.entries(this.config.store)) {
31
- if (key.startsWith('__internal__') && !options.debug) continue
32
- console.info(`${key}: ${JSON.stringify(value, null, 2)}`)
33
- }
34
- }
35
- }
@@ -1,34 +0,0 @@
1
- import Command from '#src/Command.js'
2
-
3
- /**
4
- * Quire CLI `config reset` Command
5
- *
6
- * @class ConfigResetCommand
7
- * @extends {Command}
8
- */
9
- export default class ConfigResetCommand extends Command {
10
- static definition = {
11
- name: 'config-reset',
12
- description: 'Reset the Quire CLI configuration to the default',
13
- summary: 'reset cli configuration properties to default values',
14
- version: '1.0.0',
15
- }
16
-
17
- constructor() {
18
- super(ConfigResetCommand.definition)
19
- }
20
-
21
- /**
22
- * @return {Promise}
23
- */
24
- async action(options = {}) {
25
- if (options.debug) {
26
- console.info('Command \'%s\' called with options %o', this.name(), options)
27
- }
28
-
29
- for (const [ key, value ] of Object.entries(this.config.store)) {
30
- if (key.startsWith('__internal__') && !options.debug) continue
31
- console.info(`${key}: ${JSON.stringify(value, null, 2)}`)
32
- }
33
- }
34
- }
@@ -1,37 +0,0 @@
1
- import Command from '#src/Command.js'
2
-
3
- /**
4
- * Quire CLI `config set` Command
5
- *
6
- * @class ConfigCommand
7
- * @extends {Command}
8
- */
9
- export default class ConfigSetCommand extends Command {
10
- static definition = {
11
- name: 'config-set',
12
- description: 'Set a Quire CLI configuration property',
13
- summary: 'set a cli configuration property',
14
- version: '1.0.0',
15
- args: [
16
- [ '[key]', 'configuration property key' ],
17
- [ '[value]', 'configuration property value' ]
18
- ]
19
- }
20
-
21
- constructor() {
22
- super(ConfigSetCommand.definition)
23
- }
24
-
25
- /**
26
- * @param {String} key
27
- * @param {String} value
28
- * @param {Object} options
29
- * @return {Promise}
30
- */
31
- async action(key, value, options = {}) {
32
- for (const [ key, value ] of Object.entries(this.config.store)) {
33
- if (key.startsWith('__internal__') && !options.debug) continue
34
- console.info(`${key}: ${JSON.stringify(value, null, 2)}`)
35
- }
36
- }
37
- }