@thegetty/quire-cli 1.0.0-rc.5 → 1.0.0-rc.50
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 +154 -7
- package/README.md +15 -0
- package/bin/cli.js +13 -7
- package/package.json +17 -11
- package/patches/README.md +19 -0
- package/patches/install-npm-version+1.0.9.patch +12119 -0
- package/src/Command.js +14 -0
- package/src/commands/README.md +28 -8
- package/src/commands/conf.js +43 -0
- package/src/commands/create.js +22 -10
- package/src/commands/epub.js +1 -2
- package/src/commands/info.js +130 -0
- package/src/commands/pdf.js +60 -10
- package/src/commands/validate.js +64 -0
- package/src/errors/validation/validation-error.js +13 -0
- package/src/errors/validation/yaml-duplicate-error.js +11 -0
- package/src/errors/validation/yaml-parse-error.js +11 -0
- package/src/errors/validation/yaml-validation-error.js +11 -0
- package/src/helpers/clean.js +5 -0
- package/src/helpers/is-empty.js +4 -0
- package/src/helpers/is-quire.js +4 -0
- package/src/helpers/os-utils.js +4 -0
- package/src/helpers/test-cwd.js +4 -0
- package/src/helpers/which.js +4 -0
- package/src/lib/11ty/cli.js +26 -4
- package/src/lib/conf/README.md +104 -0
- package/src/lib/conf/config.js +35 -0
- package/src/lib/conf/defaults.js +37 -0
- package/src/lib/conf/migrations.js +11 -0
- package/src/lib/conf/schema.js +30 -0
- package/src/lib/epub/index.js +3 -1
- package/src/lib/pdf/README.md +11 -4
- package/src/lib/pdf/index.js +7 -5
- package/src/lib/pdf/paged.js +88 -9
- package/src/lib/pdf/pagedPlugin.js +49 -0
- package/src/lib/pdf/prince.js +79 -4
- package/src/lib/pdf/princePlugin.js +35 -0
- package/src/lib/pdf/split.js +61 -0
- package/src/lib/quire/index.js +89 -143
- package/src/main.js +21 -6
- package/src/packageConfig.js +15 -0
- package/src/validators/utils.js +98 -0
- package/src/validators/validate-yaml.js +38 -0
- package/src/lib/config/README.md +0 -3
- package/src/lib/config/index.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,19 +5,166 @@ All notable changes to the `quire-cli` will be documented in this file.
|
|
|
5
5
|
The log format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
7
|
Changelog entries are classified using the following labels:
|
|
8
|
-
|
|
9
8
|
- `Added`: for new features
|
|
10
|
-
|
|
11
9
|
- `Bumped`: updated dependencies, only minor or higher will be listed
|
|
12
|
-
|
|
13
10
|
- `Changed`: for changes in existing functionality
|
|
14
|
-
|
|
15
11
|
- `Deprecated`: for once-stable features removed in upcoming releases
|
|
16
|
-
|
|
17
12
|
- `Fixed`: for any bug fixes
|
|
18
|
-
|
|
19
13
|
- `Removed`: for deprecated features removed in this release
|
|
20
14
|
|
|
15
|
+
## [1.0.0-rc.33]
|
|
16
|
+
|
|
17
|
+
### Bumped
|
|
18
|
+
|
|
19
|
+
- Bumped minimum supported node engine verison to 22.
|
|
20
|
+
|
|
21
|
+
## [1.0.0-rc.31]
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
|
|
25
|
+
- Improved accessibility of PDFs generated with prince with `--pdf-profile=PDF/UA-1` flag
|
|
26
|
+
|
|
27
|
+
### Removed
|
|
28
|
+
|
|
29
|
+
- Removed `install-npm-version` in favor of `npm pack` and `tar xfz` run as subprocesses
|
|
30
|
+
- Removed `patch-package`
|
|
31
|
+
|
|
32
|
+
## [1.0.0-rc.30]
|
|
33
|
+
## [1.0.0-rc.29]
|
|
34
|
+
|
|
35
|
+
Candidate versions skipped to align with @thegetty/quire-11ty
|
|
36
|
+
|
|
37
|
+
## [1.0.0-rc.28]
|
|
38
|
+
|
|
39
|
+
### Fixed
|
|
40
|
+
|
|
41
|
+
- Fixed issue where `quire pdf` errored and failed (DEV-20270)
|
|
42
|
+
|
|
43
|
+
## [1.0.0-rc.27]
|
|
44
|
+
|
|
45
|
+
### Fixed
|
|
46
|
+
|
|
47
|
+
- Fixed post-v3 `quire info` bug (DEV-19984)
|
|
48
|
+
|
|
49
|
+
## [1.0.0-rc.26]
|
|
50
|
+
|
|
51
|
+
### Changed
|
|
52
|
+
|
|
53
|
+
- Import path using node namespace in the cli info command
|
|
54
|
+
- Correct file extension of cmd module called by the cli
|
|
55
|
+
|
|
56
|
+
## [1.0.0-rc.25]
|
|
57
|
+
|
|
58
|
+
### Changed
|
|
59
|
+
|
|
60
|
+
- Use quire-cli config values for quire-11ty version and version file name
|
|
61
|
+
|
|
62
|
+
### Fixed
|
|
63
|
+
|
|
64
|
+
- Install path for quire-11ty versions
|
|
65
|
+
|
|
66
|
+
## [1.0.0-rc.24]
|
|
67
|
+
|
|
68
|
+
### Changed
|
|
69
|
+
|
|
70
|
+
- Replace Node `import` assertions (deprecated) with a packageConfig module
|
|
71
|
+
|
|
72
|
+
### Fixed
|
|
73
|
+
|
|
74
|
+
- Quire new command fails with newer version of Node #968
|
|
75
|
+
|
|
76
|
+
## [1.0.0-rc.23]
|
|
77
|
+
|
|
78
|
+
:warning: broken release candidate
|
|
79
|
+
|
|
80
|
+
## [1.0.0-rc.22]
|
|
81
|
+
|
|
82
|
+
:warning: broken release candidate
|
|
83
|
+
|
|
84
|
+
## [1.0.0-rc.21]
|
|
85
|
+
|
|
86
|
+
:warning: broken release candidate
|
|
87
|
+
|
|
88
|
+
## [1.0.0-rc.20]
|
|
89
|
+
|
|
90
|
+
:warning: broken release candidate
|
|
91
|
+
|
|
92
|
+
## [1.0.0-rc.19]
|
|
93
|
+
|
|
94
|
+
### Added
|
|
95
|
+
|
|
96
|
+
- `jsdoc-to-markdown` to development dependencies
|
|
97
|
+
- JSDoc configuration (see https://jsdoc.app/about-configuring-jsdoc)
|
|
98
|
+
- Npm script `docs` to run jsdoc-to-markdown
|
|
99
|
+
|
|
100
|
+
## [1.0.0-rc.18]
|
|
101
|
+
|
|
102
|
+
### Added
|
|
103
|
+
|
|
104
|
+
- Quire CLI configuration management using the `conf` package
|
|
105
|
+
- `quire conf` command to manage cli configuration properties
|
|
106
|
+
|
|
107
|
+
## [1.0.0-rc.17]
|
|
108
|
+
|
|
109
|
+
### Bumped
|
|
110
|
+
|
|
111
|
+
- `install-npm-version` patch version
|
|
112
|
+
|
|
113
|
+
### Changed
|
|
114
|
+
|
|
115
|
+
- update patch `install-npm-version`
|
|
116
|
+
|
|
117
|
+
## [1.0.0-rc.16]
|
|
118
|
+
|
|
119
|
+
### Added
|
|
120
|
+
|
|
121
|
+
- Patch for `install-npm-version`; see https://nodejs.org/en/blog/vulnerability/april-2024-security-releases-2
|
|
122
|
+
|
|
123
|
+
### Changed
|
|
124
|
+
|
|
125
|
+
**Nota bene** installing `quire-cli` as a _local package_ requires running `npm install` with the `--install-strategy=nested` flag; installing `quire-cli` as a global node module has not changed.
|
|
126
|
+
|
|
127
|
+
### Fixed
|
|
128
|
+
|
|
129
|
+
- Dependency instal error on Windows when running quire new DEV-19124
|
|
130
|
+
|
|
131
|
+
## [1.0.0-rc.12]
|
|
132
|
+
|
|
133
|
+
### Added
|
|
134
|
+
- Handling for single-page PDFs
|
|
135
|
+
- Paged and Prince plugins to map quire pages to PDF page sections
|
|
136
|
+
|
|
137
|
+
### Changed
|
|
138
|
+
|
|
139
|
+
- `quire clean` also removes `.11ty-vite` in the project root
|
|
140
|
+
|
|
141
|
+
## [1.0.0-rc.11]
|
|
142
|
+
|
|
143
|
+
### Bumped
|
|
144
|
+
- `epubjs-cli` to version 0.1.6
|
|
145
|
+
- `pagedjs-cli` to version 0.4.3
|
|
146
|
+
|
|
147
|
+
### Fixed
|
|
148
|
+
- EPUB validation error where pages that include SVGs must include SVG as property under `readingOrder`
|
|
149
|
+
|
|
150
|
+
## [1.0.0-rc.10]
|
|
151
|
+
|
|
152
|
+
### Added
|
|
153
|
+
- Support semantic version ranges for `quire-11ty` in quire starter projects and the `--quire-version` option of the `quire new` command, and use the latest compatible `quire-11ty` version when creating and installing a new project.
|
|
154
|
+
|
|
155
|
+
## [1.0.0-rc.9]
|
|
156
|
+
|
|
157
|
+
### Added
|
|
158
|
+
- Update old `.quire` files when running `info` command on versions prior to `1.0.0-rc.8`
|
|
159
|
+
- Include `quire-cli` version used to generate project in `info` output
|
|
160
|
+
- Adds headings to `info` output
|
|
161
|
+
|
|
162
|
+
## [1.0.0-rc.8]
|
|
163
|
+
|
|
164
|
+
### Added
|
|
165
|
+
- Added `info` command to output package versions
|
|
21
166
|
|
|
22
|
-
## [
|
|
167
|
+
## [1.0.0-rc.7]
|
|
23
168
|
|
|
169
|
+
### Added
|
|
170
|
+
- Added `new` command `--quire-path` option to support development with local version of `quire-11ty`
|
package/README.md
CHANGED
|
@@ -1,7 +1,22 @@
|
|
|
1
1
|
## Quire CLI
|
|
2
|
+
[](https://dl.circleci.com/status-badge/redirect/gh/thegetty/quire/tree/main)
|
|
2
3
|
|
|
3
4
|
The `quire-cli` implements the [command pattern](https://en.wikipedia.org/wiki/Command_pattern) to receive input from a user and delegate command behavoir to modules for the services, such as `git` and `11ty`, involved in working on Quire publications.
|
|
4
5
|
|
|
6
|
+
### Installing the CLI
|
|
7
|
+
|
|
8
|
+
The `quire-cli` can be installed as a global npm module as follows
|
|
9
|
+
|
|
10
|
+
```sh
|
|
11
|
+
npm install quire-cli --global
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Installing the `quire-cli` as a _local package dependency_ requires additional npm command flags to support patching package dependencies as follows,
|
|
15
|
+
|
|
16
|
+
```sh
|
|
17
|
+
npm install quire-cli --install-strategy=nested
|
|
18
|
+
```
|
|
19
|
+
|
|
5
20
|
### Using the CLI
|
|
6
21
|
|
|
7
22
|
`npx` supports executing npm package binaries even when they are not yet installed and will download the package into a cache if it does not find either a locally or globally installed version. Simply run
|
package/bin/cli.js
CHANGED
|
@@ -1,28 +1,34 @@
|
|
|
1
1
|
#!/usr/bin/env -S node --no-warnings
|
|
2
|
-
|
|
3
2
|
import cli from '#src/main.js'
|
|
4
|
-
import
|
|
3
|
+
import config from '#src/lib/conf/config.js'
|
|
4
|
+
import packageConfig from '#src/packageConfig.js'
|
|
5
5
|
import updateNotifier from 'update-notifier'
|
|
6
6
|
|
|
7
7
|
process.removeAllListeners('warning')
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* Interval constants in milliseconds
|
|
11
|
+
*/
|
|
9
12
|
const INTERVAL = Object.freeze({
|
|
10
|
-
|
|
13
|
+
MINUTE: 1000 * 60 * 1,
|
|
11
14
|
HOURLY: 1000 * 60 * 60,
|
|
12
15
|
DAILY: 1000 * 60 * 60 * 24,
|
|
13
16
|
WEEKLY: 1000 * 60 * 60 * 24 * 7
|
|
14
17
|
})
|
|
15
18
|
|
|
19
|
+
const updateChannel = config.get('updateChannel')
|
|
20
|
+
const updateIterval = config.get('updateIterval')
|
|
21
|
+
|
|
16
22
|
/**
|
|
17
|
-
* Check for quire-cli updates
|
|
23
|
+
* Create a notifier to Check for quire-cli updates
|
|
18
24
|
* @see https://github.com/yeoman/update-notifier#usage
|
|
19
25
|
*
|
|
20
|
-
* @todo
|
|
26
|
+
* @todo refactor to check multiple channels
|
|
21
27
|
*/
|
|
22
28
|
const notifier = updateNotifier({
|
|
23
|
-
distTag:
|
|
29
|
+
distTag: updateChannel,
|
|
24
30
|
pkg: packageConfig,
|
|
25
|
-
updateCheckInterval: INTERVAL
|
|
31
|
+
updateCheckInterval: INTERVAL[updateIterval],
|
|
26
32
|
})
|
|
27
33
|
|
|
28
34
|
notifier.notify({ defer: false })
|
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.
|
|
4
|
+
"version": "1.0.0-rc.50",
|
|
5
5
|
"author": "Getty Digital",
|
|
6
6
|
"license": "SEE LICENSE IN https://github.com/thegetty/quire/blob/main/LICENSE",
|
|
7
7
|
"bugs": {
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
"type": "module",
|
|
20
20
|
"files": [
|
|
21
21
|
"bin/",
|
|
22
|
-
"
|
|
22
|
+
"patches/",
|
|
23
|
+
"scripts/",
|
|
23
24
|
"src/",
|
|
24
25
|
"CHANGELOG.md",
|
|
25
26
|
"LICENSE",
|
|
@@ -34,9 +35,10 @@
|
|
|
34
35
|
"directory": "packages/cli"
|
|
35
36
|
},
|
|
36
37
|
"scripts": {
|
|
38
|
+
"docs": "jsdoc2md --configure jsdoc.json --files src/**/*.js > docs/cli.md",
|
|
37
39
|
"lint": "eslint src --ext .js",
|
|
38
40
|
"lint:fix": "npm run lint -- --fix",
|
|
39
|
-
"test": "
|
|
41
|
+
"test": "ava ./_tests/**"
|
|
40
42
|
},
|
|
41
43
|
"imports": {
|
|
42
44
|
"#root/*": "./*",
|
|
@@ -45,31 +47,35 @@
|
|
|
45
47
|
"#lib/*.js": "./src/lib/*.js"
|
|
46
48
|
},
|
|
47
49
|
"dependencies": {
|
|
50
|
+
"ajv": "^8.16.0",
|
|
48
51
|
"boxen": "^7.0.1",
|
|
49
52
|
"chalk": "^5.2.0",
|
|
50
|
-
"commander": "^
|
|
51
|
-
"conf": "^
|
|
53
|
+
"commander": "^12.1.0",
|
|
54
|
+
"conf": "^13.1.0",
|
|
52
55
|
"cross-env": "^7.0.3",
|
|
53
56
|
"del": "^7.0.0",
|
|
54
|
-
"epubjs-cli": "^0.1.
|
|
57
|
+
"epubjs-cli": "^0.1.6",
|
|
55
58
|
"execa": "^6.1.0",
|
|
56
59
|
"fs-extra": "^11.1.0",
|
|
57
60
|
"hosted-git-info": "^6.1.1",
|
|
58
61
|
"i18next": "^22.4.9",
|
|
59
62
|
"inquirer": "^9.1.4",
|
|
60
|
-
"
|
|
63
|
+
"js-yaml": "^4.1.0",
|
|
61
64
|
"loglevel": "^1.8.1",
|
|
65
|
+
"node-fetch": "^3.3.2",
|
|
62
66
|
"open": "^8.4.0",
|
|
63
67
|
"ora": "^6.1.2",
|
|
64
|
-
"pagedjs-cli": "^0.
|
|
68
|
+
"pagedjs-cli": "^0.4.3",
|
|
69
|
+
"read-package-up": "^11.0.0",
|
|
65
70
|
"semver": "^7.3.8",
|
|
66
71
|
"simple-git": "^3.16.0",
|
|
67
|
-
"update-notifier": "^
|
|
72
|
+
"update-notifier": "^7.3.1"
|
|
68
73
|
},
|
|
69
74
|
"devDependencies": {
|
|
70
|
-
"eslint": "^8.32.0"
|
|
75
|
+
"eslint": "^8.32.0",
|
|
76
|
+
"jsdoc-to-markdown": "^9.1.1"
|
|
71
77
|
},
|
|
72
78
|
"engines": {
|
|
73
|
-
"node": ">=
|
|
79
|
+
"node": ">=22"
|
|
74
80
|
}
|
|
75
81
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
## Quire CLI Patches
|
|
2
|
+
|
|
3
|
+
Patches in this directory are applied to locally installed `node_modules` by the npm `postinstall` script ([npm scripts docs](https://docs.npmjs.com/cli/v10/using-npm/scripts)).
|
|
4
|
+
|
|
5
|
+
See [`patch-package`](https://github.com/ds300/patch-package) documenation for [making](https://github.com/ds300/patch-package#making-patches), [updating](https://github.com/ds300/patch-package#updating-patches), [applying](https://github.com/ds300/patch-package#applying-patches) and [reversing](https://github.com/ds300/patch-package#applying-patches) patches.
|
|
6
|
+
|
|
7
|
+
*Nota bene*
|
|
8
|
+
|
|
9
|
+
Patching the `quire-cli` package dependencies changes the way in which it must be must be installed. When installing the `quire-cli` as a _local package dependency_ the `--install-strategy=nested` flag must be used as follows
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
npm install quire-cli --install-strategy=nested
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Installing the `quire-cli` as a global npm module has not changed,
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
npm install quire-cli --global
|
|
19
|
+
```
|