Compare commits

..

35 Commits

Author SHA1 Message Date
semantic-release-bot
62a89fb127 chore(release): 2.0.0-pre.3 [skip ci]
# [2.0.0-pre.3](https://github.com/chenasraf/simple-scaffold/compare/v2.0.0-pre.2...v2.0.0-pre.3) (2024-01-30)

### Bug Fixes

* tests ([c219d38](c219d382e6))
2024-01-30 00:21:39 +00:00
c219d382e6 fix: tests 2024-01-30 02:21:05 +02:00
90ba9f72f2 feat!: rename createSubFolder and subFolderNameHelper 2024-01-30 02:21:05 +02:00
09d330af63 docs: regenerate changelog
d
2024-01-30 02:21:05 +02:00
Chen Asraf
f38ca060de Update README.md 2024-01-30 02:21:05 +02:00
semantic-release-bot
41e85b824d chore(release): 2.0.0-pre.2 [skip ci]
# [2.0.0-pre.2](https://github.com/chenasraf/simple-scaffold/compare/v2.0.0-pre.1...v2.0.0-pre.2) (2024-01-29)
2024-01-29 01:39:04 +00:00
6553fbef95 docs: fix readme doc links
a
2024-01-29 03:38:28 +02:00
semantic-release-bot
add794a7db chore(release): 2.0.0-pre.1 [skip ci]
# [2.0.0-pre.1](https://github.com/chenasraf/simple-scaffold/compare/v1.9.0...v2.0.0-pre.1) (2024-01-29)

### Bug Fixes

* remove gh flag ([e66d6ba](e66d6ba86a))

### Features

* try multiple default config files ([f25cda7](f25cda738b))
2024-01-29 01:28:54 +00:00
d4cb767484 ci: fix docs 2024-01-29 03:28:21 +02:00
570b00d01b ci: fix docs 2024-01-29 03:28:21 +02:00
7ef34210a5 ci: fix docs 2024-01-29 03:28:21 +02:00
b6fed83c91 ci: use tag versions 2024-01-29 03:28:21 +02:00
e0c0f5c1ce docs: gtag + update deps 2024-01-29 03:28:21 +02:00
5cf569262c ci: fix docs command 2024-01-29 03:28:21 +02:00
29a7aa3971 ci: fix 2024-01-29 03:28:21 +02:00
b4f0731345 chore: fix docs & formatting 2024-01-29 03:28:21 +02:00
e66d6ba86a fix: remove gh flag 2024-01-29 03:28:21 +02:00
96c1d5a759 ci: fix docs build dir 2024-01-29 03:28:21 +02:00
f25cda738b feat: try multiple default config files 2024-01-29 03:28:21 +02:00
995b43380f feat!: separate git/github/config flags
feat: separate git/github/config

t

test

cleanup
2024-01-29 03:28:21 +02:00
4821be6a00 docs: update 2024-01-29 03:28:21 +02:00
f59111f1fe docs: update docs 2024-01-29 03:28:21 +02:00
8478d36ec1 docs: update readme image 2024-01-29 03:28:21 +02:00
f0a080cadc docs: update docs, remove generated files from git 2024-01-29 03:28:21 +02:00
c95477d02b docs: update 2024-01-29 03:28:21 +02:00
a955c4da0d docs: docusaurus initial commit 2024-01-29 03:28:21 +02:00
17fdf0c4a6 feat!: rename verbose to logLevel 2024-01-29 03:28:21 +02:00
22ad5d4c75 chore: update deps 2024-01-29 03:28:21 +02:00
b2373aa5fa chore: update deps 2024-01-29 03:28:21 +02:00
3b0fc7a8c1 docs: update docs 2024-01-29 03:28:21 +02:00
0bb282c7b6 chore!: remove Name from default data 2024-01-29 03:28:21 +02:00
b57be8ed66 feat!: remove url colon syntax 2024-01-29 03:28:21 +02:00
55877f0bcd chore!: update massarg 2024-01-29 03:28:21 +02:00
9830df8bd7 ci: update docs build 2024-01-02 02:26:28 +02:00
d168dc1988 ci: update build 2024-01-02 02:25:40 +02:00
32 changed files with 410 additions and 666 deletions

View File

@@ -31,6 +31,8 @@ jobs:
run: pnpm test
- name: Build Package
run: pnpm build
- name: Pack
run: cd ./dist && pnpm pack --pack-destination=../
- name: Semantic Release
run: npx semantic-release
env:

View File

@@ -1,36 +1,21 @@
# Change Log
# [2.1.0](https://github.com/chenasraf/simple-scaffold/compare/v2.0.2...v2.1.0) (2024-02-12)
### Features
* support directory in --config flag ([e48b832](https://github.com/chenasraf/simple-scaffold/commit/e48b832e0b72a084d33fa2cbcca332e8209a734f))
* support providing name in config ([4e7ac34](https://github.com/chenasraf/simple-scaffold/commit/4e7ac34db9bf67d012bbd1c06c1a26bc5ac93559))
## [2.0.2](https://github.com/chenasraf/simple-scaffold/compare/v2.0.1...v2.0.2) (2024-02-04)
# [2.0.0-pre.3](https://github.com/chenasraf/simple-scaffold/compare/v2.0.0-pre.2...v2.0.0-pre.3) (2024-01-30)
### Bug Fixes
* try to await scaffold before finally ([1b70897](https://github.com/chenasraf/simple-scaffold/commit/1b70897f9840e6365ff800490fbb813b9840177d))
* tests ([c219d38](https://github.com/chenasraf/simple-scaffold/commit/c219d382e6df8b2ca1157544a7785f6645d04be2))
## [2.0.1](https://github.com/chenasraf/simple-scaffold/compare/v2.0.0...v2.0.1) (2024-02-02)
## 2.0.0-pre.2 (2024-01-29)
### Bug Fixes
* log level flag ([5d7f449](https://github.com/chenasraf/simple-scaffold/commit/5d7f449050e50a6e4b2d00b7a2215cdb5fc9b611))
* rm tmp dir too early ([4aa52c8](https://github.com/chenasraf/simple-scaffold/commit/4aa52c84bd8cf302031e9f7f6407466aa736beb7))
# [2.0.0](https://github.com/chenasraf/simple-scaffold/compare/v1.9.0...v2.0.0) (2024-01-31)
* fix!: version number ([bc0a18d](https://github.com/chenasraf/simple-scaffold/commit/bc0a18dce01fefec6187192cb20c9303f7f7dbfa))
* remove gh flag ([939200c](https://github.com/chenasraf/simple-scaffold/commit/939200c9f21be240485ea602a73b983ba2f47aaf))
* tests ([ff92fd7](https://github.com/chenasraf/simple-scaffold/commit/ff92fd7607f1b86f36fc6b62652fdfc81cb391a3))
* try multiple default config files ([89aacb5](https://github.com/chenasraf/simple-scaffold/commit/89aacb58fd90a892f4994c758c61c43b2a6b1fba))
* Update README.md ([e012d51](https://github.com/chenasraf/simple-scaffold/commit/e012d51))
* docs: fix readme doc links ([55e561b](https://github.com/chenasraf/simple-scaffold/commit/55e561b))
## 2.0.0-pre.1 (2024-01-29)
* chore: fix docs & formatting ([b4f0731](https://github.com/chenasraf/simple-scaffold/commit/b4f0731))
* chore: update deps ([22ad5d4](https://github.com/chenasraf/simple-scaffold/commit/22ad5d4))
* chore: update deps ([b2373aa](https://github.com/chenasraf/simple-scaffold/commit/b2373aa))

198
README.md
View File

@@ -1,6 +1,4 @@
<p align="center">
<img src="https://chenasraf.github.io//simple-scaffold/img/logo-lg.png" alt="Logo" />
</p>
<h1 align="center">Simple Scaffold</h1>
<h2 align="center">
@@ -8,7 +6,7 @@
[Documentation](https://chenasraf.github.io/simple-scaffold) |
[NPM](https://npmjs.com/package/simple-scaffold) | [casraf.dev](https://casraf.dev)
![master](https://img.shields.io/github/package-json/v/chenasraf/simple-scaffold/master?label=master)
![version](https://img.shields.io/github/package-json/v/chenasraf/simple-scaffold/master?label=version)
![build](https://img.shields.io/github/actions/workflow/status/chenasraf/simple-scaffold/release.yml?branch=master)
</h2>
@@ -27,82 +25,60 @@ lifting for you and start building your projects faster and more efficiently tod
<div align="center">
![Intro](https://chenasraf.github.io/simple-scaffold/img/intro.gif)
![Intro](https://github.com/chenasraf/simple-scaffold/assets/167217/6341efab-f961-4f1a-83e2-831b1308b9eb)
</div>
---
## Documentation
## Quick Start
See full documentation [here](https://chenasraf.github.io/simple-scaffold).
### Local Templates
- [Command Line Interface (CLI) usage](https://chenasraf.github.io/simple-scaffold/docs/usage/cli)
- [Node.js usage](https://chenasraf.github.io/simple-scaffold/docs/usage/node)
- [Templates](https://chenasraf.github.io/simple-scaffold/docs/usage/templates)
- [Configuration Files](https://chenasraf.github.io/simple-scaffold/docs/usage/configuration_files)
- [Migration](https://chenasraf.github.io/simple-scaffold/docs/usage/migration)
The fastest way to get started is to use `npx` to immediately start a scaffold process.
## Getting Started
Prepare any templates you want to use - for example, in the directory `templates/component`; and use
that in the CLI args. Here is a simple example file:
### Cheat Sheet
Simple Scaffold will maintain any file and directory structure you try to generate.
A quick rundown of common usage scenarios:
`templates/component/{{ pascalName name }}.tsx`
- Remote template config file on GitHub:
```tsx
// Created: {{ now 'yyyy-MM-dd' }}
import React from 'react'
```sh
npx simple-scaffold -g username/repository -c scaffold.js -k component NewComponentName
```
- Local template config file:
```sh
npx simple-scaffold -c scaffold.js -k component NewComponentName
```
- Local one-time usage:
```sh
npx simple-scaffold -t templates/component -o src/components NewComponentName
```
### Remote Configurations
The fastest way to get started is to is to re-use someone else's (or your own) work using a template
repository.
A remote config can be loaded in one of these ways:
- For templates hosted on GitHub, the syntax is `-g user/repository_name`
- For other Git platforms like GitLab, use `-g https://example.com/user/repository_name.git`
These remote configurations support multiple scaffold groups, which can be specified using the
`--key` or `-k` argument:
```sh
$ npx simple-scaffold \
-g chenasraf/simple-scaffold \
-k component \
PageWrapper
# equivalent to:
$ npx simple-scaffold \
-g https://github.com/chenasraf/simple-scaffold.git \
-c scaffold.config.js \
-k component \
PageWrapper
export default {{pascalCase name}}: React.FC = (props) => {
return (
<div className="{{camelCase name}}">{{pascalCase name}} Component</div>
)
}
```
By default, the template name is set to `default` when the `--key` option is not provided.
To generate the template output, run:
See information about each option and flag using the `--help` flag, or read the
[CLI documentation](https://chenasraf.github.io/simple-scaffold/docs/usage/cli). For information
about how configuration files work, [see below](#configuration-files).
```sh
# generate single component
$ npx simple-scaffold@latest \
-t templates/component -o src/components PageWrapper
```
This will immediately create the following file: `src/components/PageWrapper.tsx`
```tsx
// Created: 2077-01-01
import React from 'react'
export default PageWrapper: React.FC = (props) => {
return (
<div className="pageWrapper">PageWrapper Component</div>
)
}
```
### Configuration Files
You can use a config file to more easily maintain all your scaffold definitions.
You can also use a config file to more easily maintain all your scaffold definitions.
`scaffold.config.js`
@@ -123,61 +99,66 @@ module.exports = {
Then call your scaffold like this:
```sh
$ npx simple-scaffold -c scaffold.config.js PageWrapper
$ npx simple-scaffold@latest -c scaffold.config.js PageWrapper
```
This will allow you to avoid needing to remember which configs are needed or to store them in a
one-liner in `package.json` which can get pretty long and messy, and harder to maintain.
1-liner in `packqge.json` which can get pretty long and messy, which is harder to maintain.
Also, this allows you to define more complex scaffolds with logic without having to use the Node.js
API directly. (Of course you always have the option to still do so if you wish)
More information can be found at the
[Configuration Files documentation](https://chenasraf.github.io/simple-scaffold/docs/usage/configuration_files).
See more at the [CLI documentation](https://chenasraf.github.io/simple-scaffold/docs/usage/cli) and
[Configuration Files](https://chenasraf.github.io/simple-scaffold/docs/usage/configuration_files).
### Templates Structure
### Remote Configurations
Templates are **any file** in the a directory given to `--templates`.
Another quick way to start is to re-use someone else's (or your own) work using a template
repository.
Simple Scaffold will maintain any file and directory structure you try to generate, while replacing
any tokens such as `{{ name }}` or other custom-data using
[Handlebars.js](https://handlebarsjs.com/).
A remote config can be loaded in one of these ways:
`templates/component/{{ pascalName name }}.tsx`
- If it's on GitHub, you can use `-g user/repository_name`
- If it's on another git server (such as GitLab), you can use
`-g https://example.com/user/repository_name.git`
```tsx
// Created: {{ now 'yyyy-MM-dd' }}
import React from 'react'
export default {{pascalCase name}}: React.FC = (props) => {
return (
<div className="{{camelCase name}}">{{pascalCase name}} Component</div>
)
}
```
To generate the template output once without saving a configuration file, run:
Configurations can hold multiple scaffold groups. Each group can be accessed using its key by
supplying the `--key` or `-k` argument, like so:
```sh
# generate single component
$ npx simple-scaffold \
-t templates/component \
-o src/components \
-g user/repository_name -c scaffold.js -k key_name`.
```
Here is an example for loading the example component templates in this very repository:
```sh
$ npx simple-scaffold@latest \
-g chenasraf/simple-scaffold \
-k component \
PageWrapper
# equivalent to:
$ npx simple-scaffold@latest \
-g https://github.com/chenasraf/simple-scaffold.git \
-c scaffold.config.js \
-k component \
PageWrapper
```
This will immediately create the following file: `src/components/PageWrapper.tsx`
When template name (`-k component`) is omitted, `default` is used.
```tsx
// Created: 2077-01-01
import React from 'react'
See more at the [CLI documentation](https://chenasraf.github.io/simple-scaffold/docs/usage/cli) and
[Configuration Files](https://chenasraf.github.io/simple-scaffold/docs/usage/configuration_files).
export default PageWrapper: React.FC = (props) => {
return (
<div className="pageWrapper">PageWrapper Component</div>
)
}
```
## Documentation
See full documentation [here](https://chenasraf.github.io/simple-scaffold).
- [Command Line Interface (CLI) usage](https://chenasraf.github.io/simple-scaffold/docs/usage/cli)
- [Node.js usage](https://chenasraf.github.io/simple-scaffold/docs/usage/node)
- [Templates](https://chenasraf.github.io/simple-scaffold/docs/usage/templates)
- [Configuration Files](https://chenasraf.github.io/simple-scaffold/docs/usage/configuration_files)
- [Migration](https://chenasraf.github.io/simple-scaffold/docs/usage/migration)
## Contributing
@@ -208,9 +189,22 @@ If you are a developer and want to contribute code, here are some starting tips:
Some tips on getting around the code:
- Use `pnpm dev` for development - it runs TypeScript compile in watch mode, allowing you to make
changes and immediately be able to try them using `pnpm cmd`.
- Use `pnpm build` to build the output once
- Use `pnpm test` to run tests
- Use `pnpm cmd` to use the CLI feature of Simple Scaffold from within the root directory, enabling
you to test different behaviors. See `pnpm cmd -h` for more information.
- Use `pnpm test` to run tests
- Use `pnpm docs:build` to build the documentation once
- Use `pnpm docs:watch` to start docs in watch mode
- Use `pnpm build` to build the output
> This requires an updated build, and does not trigger one itself. From here you have several
> options:
>
> - Run `pnpm dev` to watch for file changes and build automatically
> - Run `pnpm build` before running this to trigger a one-time build
> - Run `pnpm build-cmd` which triggers a build right before running `pnpm cmd` automatically with
> the rest of the given arguments.
- Use `pnpm build-docs` to build the documentation once
- Use `pnpm watch-docs` to start docs in watch mode
- To see the documentation, currently you have to serve the directory yourself with a static web
server (like node's built in serve, VS code's "Go Live" mode, etc)

View File

@@ -28,7 +28,6 @@ To see this and more information anytime, add the `-h` or `--help` flag to your
| `--log-level` \| `-l` | Determine amount of logs to display. The values are: `none \| debug \| info \| warn \| error`. The provided level will display messages of the same level or higher. |
| `--dry-run` \| `-dr` | Don't emit files. This is good for testing your scaffolds and making sure they don't fail, without having to write actual file contents or create directories. |
| `--help` \| `-h` | Show this help message |
| `--version` \| `-v` | Display version. |
## Examples:

View File

@@ -23,11 +23,48 @@ module.exports = {
}
```
For the full configuration options, see [ScaffoldConfigFile](../api/modules#scaffoldconfigfile).
The configuration contents are identical to the
[Node.js configuration structure](https://chenasraf.github.io/simple-scaffold/docs/usage/node):
```ts
interface ScaffoldConfig {
name: string
templates: string[]
output: FileResponse<string>
subdir?: boolean
git?: string
config?: string
key?: string
data?: Record<string, any>
overwrite?: FileResponse<boolean>
quiet?: boolean
verbose?: LogLevel
dryRun?: boolean
helpers?: Record<string, Helper>
subdirHelper?: DefaultHelpers | string
beforeWrite?(
content: Buffer,
rawContent: Buffer,
outputPath: string,
): string | Buffer | undefined | Promise<string | Buffer | undefined>
}
```
If you want to supply functions inside the configurations, you must use a `.js`/`.cjs`/`.mjs` file
as JSON does not support non-primitives.
A `.js` file can be just like a `.json` file, make sure to export the final configuration:
```js
/** @type {import('simple-scaffold').ScaffoldConfigFile} */
module.exports = {
component: {
templates: ["templates/component"],
output: "src/components",
},
}
```
Another feature of using a JS file is you can export a function which will be loaded with the CMD
config provided to Simple Scaffold. The `extra` key contains any values not consumed by built-in
flags, so you can pre-process your args before outputting a config:
@@ -45,12 +82,6 @@ module.exports = (config) => {
}
```
If you want to provide templates that need no name (such as common config files which are easily
portable between projects), you may provide the `name` property in the config object.
You will always be able to override it using `--name NewName`, but it will be given a value by
default and therefore it will no longer be required in the CLI arguments.
## Using a config file
Once your config is created, you can use it by providing the file name to the `--config` (or `-c`
@@ -85,7 +116,7 @@ And then:
simple-scaffold -c scaffold.json MyComponentName
```
- When the a directory is given, the following files in the given directory will be tried in order:
- When the filename is omitted, the following files will be tried in order:
- `scaffold.config.*`
- `scaffold.*`
@@ -131,12 +162,6 @@ simple-scaffold -g git://gitlab.com/<username>/<project_name> [-c <filename>] [-
simple-scaffold -g https://gitlab.com/<username>/<project_name>.git [-c <filename>] [-k <template_key>]
```
When a config file path is omitted, the files given in the list above will be tried on the root
directory of the git repository.
**Note:** The repository will be cloned to a temporary directory and removed after the scaffolding
has been done.
## Use In Node.js
You can also start a scaffold from Node.js with a remote file or URL config.

View File

@@ -3,7 +3,7 @@ title: Usage
---
- [CLI Usage](cli)
- [Configuration Files](configuration_files)
- [Configuration Files](configuation_files)
- [Examples](examples)
- [Migration](migration)
- [Node.js Usage](node)

View File

@@ -15,7 +15,8 @@ title: Migration
- The `#template_file` syntax has been removed, you may use `--config` or `-c` to tell Simple
Scaffold which file to look for inside the git project. There is a default file priority list
which can find the file for you if it is in one of the supported filenames.
- `verbose` can now take the names `debug`, `info`, `warn`, `error` or `none` (case insensitive).
- `verbose` can now take the names `debug`, `info`, `warn`, `error` or `none` (case insensitive) or
as usual by using the numbering from before.
- `--create-sub-folder` (`-s`) has been renamed to `--subdir` (`-s`) in the CLI. The Node.js names
have been changed as well.
- `--sub-folder-name-helper` (`-sh`) has been renamed to `--subdir-helper` (`-sh`). The Node.js

View File

@@ -50,6 +50,7 @@ The contents of the file will be transformed in a similar fashion.
Your `data` will be pre-populated with the following:
- `{{Name}}`: PascalCase of the component name
- `{{name}}`: raw name of the component as you entered it
> Simple-Scaffold uses [Handlebars.js](https://handlebarsjs.com/) for outputting the file contents.
@@ -109,15 +110,7 @@ Further details:
```
- **The now helper** (for current time) takes the same arguments, minus the first one (`date`) as it
is implicitly the current date:
```typescript
(
format: string,
offsetAmount?: number,
offsetType?: "years" | "months" | "weeks" | "days" | "hours" | "minutes" | "seconds"
)
```
is implicitly the current date.
### Custom Helpers

View File

@@ -5,7 +5,7 @@ import type * as Preset from "@docusaurus/preset-classic"
const config: Config = {
title: "Simple Scaffold",
tagline: "Generate any file structure - from single components to entire app boilerplates, with a single command.",
favicon: "img/favicon.svg",
favicon: "img/favicon.ico",
// Set the production url of your site here
url: "https://chenasraf.github.io",
@@ -64,7 +64,13 @@ const config: Config = {
sidebarPath: "./sidebars.ts",
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl: "https://github.com/chenasraf/simple-scaffold/blob/master/docs",
editUrl: "https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/",
},
blog: {
showReadingTime: true,
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl: "https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/",
},
theme: {
customCss: "./src/css/custom.css",
@@ -83,7 +89,7 @@ const config: Config = {
title: "Simple Scaffold",
logo: {
alt: "Simple Scaffold",
src: "img/favicon.svg",
src: "img/logo.svg",
},
items: [
{
@@ -121,7 +127,7 @@ const config: Config = {
position: "right",
},
{
href: "https://github.com/chenasraf/simple-scaffold",
href: "https://github.com/facebook/docusaurus",
label: "GitHub",
position: "right",
},

View File

@@ -22,13 +22,3 @@
justify-content: center;
gap: 2rem;
}
.heroImage {
margin-bottom: 1.5rem;
}
.logo {
width: 100%;
max-width: 300px;
margin: 0 auto;
}

View File

@@ -12,12 +12,10 @@ function HomepageHeader() {
return (
<header className={clsx("hero hero--primary", styles.heroBanner)}>
<div className="container">
<img className={styles.logo} src="img/logo-lg.svg" alt="Simple Scaffold" />
<Heading as="h1" className="hero__title">
{siteConfig.title}
</Heading>
<p className="hero__subtitle">{siteConfig.tagline}</p>
<img className={styles.heroImage} src="img/intro.gif" alt="Simple-Scaffold doing its thing" />
<div className={styles.buttons}>
<Link className="button button--secondary button--lg" to="/docs/api">
API

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 265 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 385 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 281 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 432 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

View File

@@ -1,19 +1,14 @@
{
"name": "simple-scaffold",
"version": "2.1.0",
"version": "0.0.0",
"description": "Generate any file structure - from single components to entire app boilerplates, with a single command.",
"homepage": "https: //chenasraf.github.io/simple-scaffold",
"repository": {
"type": "git",
"url": "https://github.com/chenasraf/simple-scaffold.git"
},
"author": "Chen Asraf <contact@casraf.dev> (https://casraf.dev)",
"homepage": "https://chenasraf.github.io/simple-scaffold",
"repository": "https://github.com/chenasraf/simple-scaffold.git",
"author": "Chen Asraf <contact@casraf.dev>",
"license": "MIT",
"main": "index.js",
"bin": {
"simple-scaffold": "cmd.js"
},
"packageManager": "pnpm@8.15.1",
"bin": "cmd.js",
"packageManager": "pnpm@8.6.2",
"keywords": [
"javascript",
"cli",
@@ -42,22 +37,22 @@
"date-fns": "^3.3.1",
"glob": "^10.3.10",
"handlebars": "^4.7.8",
"massarg": "2.0.0"
"massarg": "2.0.0-pre.12"
},
"devDependencies": {
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/exec": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@semantic-release/release-notes-generator": "^12.1.0",
"@types/jest": "^29.5.12",
"@types/jest": "^29.5.11",
"@types/mock-fs": "^4.13.4",
"@types/node": "^20.11.17",
"@types/node": "^20.11.10",
"@types/semantic-release": "^20.0.6",
"conventional-changelog": "^5.1.0",
"conventional-changelog-cli": "^4.1.0",
"jest": "^29.7.0",
"mock-fs": "^5.2.0",
"semantic-release": "^23.0.2",
"semantic-release": "^23.0.0",
"semantic-release-conventional-commits": "^3.0.0",
"ts-jest": "^29.1.2",
"ts-node": "^10.9.2",

376
pnpm-lock.yaml generated
View File

@@ -18,31 +18,31 @@ dependencies:
specifier: ^4.7.8
version: 4.7.8
massarg:
specifier: 2.0.0
version: 2.0.0
specifier: 2.0.0-pre.12
version: 2.0.0-pre.12
devDependencies:
'@semantic-release/changelog':
specifier: ^6.0.3
version: 6.0.3(semantic-release@23.0.2)
version: 6.0.3(semantic-release@23.0.0)
'@semantic-release/exec':
specifier: ^6.0.3
version: 6.0.3(semantic-release@23.0.2)
version: 6.0.3(semantic-release@23.0.0)
'@semantic-release/git':
specifier: ^10.0.1
version: 10.0.1(semantic-release@23.0.2)
version: 10.0.1(semantic-release@23.0.0)
'@semantic-release/release-notes-generator':
specifier: ^12.1.0
version: 12.1.0(semantic-release@23.0.2)
version: 12.1.0(semantic-release@23.0.0)
'@types/jest':
specifier: ^29.5.12
version: 29.5.12
specifier: ^29.5.11
version: 29.5.11
'@types/mock-fs':
specifier: ^4.13.4
version: 4.13.4
'@types/node':
specifier: ^20.11.17
version: 20.11.17
specifier: ^20.11.10
version: 20.11.10
'@types/semantic-release':
specifier: ^20.0.6
version: 20.0.6
@@ -54,13 +54,13 @@ devDependencies:
version: 4.1.0
jest:
specifier: ^29.7.0
version: 29.7.0(@types/node@20.11.17)(ts-node@10.9.2)
version: 29.7.0(@types/node@20.11.10)(ts-node@10.9.2)
mock-fs:
specifier: ^5.2.0
version: 5.2.0
semantic-release:
specifier: ^23.0.2
version: 23.0.2(typescript@5.3.3)
specifier: ^23.0.0
version: 23.0.0(typescript@5.3.3)
semantic-release-conventional-commits:
specifier: ^3.0.0
version: 3.0.0
@@ -69,7 +69,7 @@ devDependencies:
version: 29.1.2(@babel/core@7.23.9)(jest@29.7.0)(typescript@5.3.3)
ts-node:
specifier: ^10.9.2
version: 10.9.2(@types/node@20.11.17)(typescript@5.3.3)
version: 10.9.2(@types/node@20.11.10)(typescript@5.3.3)
typescript:
specifier: ^5.3.3
version: 5.3.3
@@ -465,7 +465,7 @@ packages:
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
dependencies:
'@jest/types': 29.6.3
'@types/node': 20.11.17
'@types/node': 20.11.10
chalk: 4.1.2
jest-message-util: 29.7.0
jest-util: 29.7.0
@@ -486,14 +486,14 @@ packages:
'@jest/test-result': 29.7.0
'@jest/transform': 29.7.0
'@jest/types': 29.6.3
'@types/node': 20.11.17
'@types/node': 20.11.10
ansi-escapes: 4.3.2
chalk: 4.1.2
ci-info: 3.9.0
exit: 0.1.2
graceful-fs: 4.2.11
jest-changed-files: 29.7.0
jest-config: 29.7.0(@types/node@20.11.17)(ts-node@10.9.2)
jest-config: 29.7.0(@types/node@20.11.10)(ts-node@10.9.2)
jest-haste-map: 29.7.0
jest-message-util: 29.7.0
jest-regex-util: 29.6.3
@@ -521,7 +521,7 @@ packages:
dependencies:
'@jest/fake-timers': 29.7.0
'@jest/types': 29.6.3
'@types/node': 20.11.17
'@types/node': 20.11.10
jest-mock: 29.7.0
dev: true
@@ -548,7 +548,7 @@ packages:
dependencies:
'@jest/types': 29.6.3
'@sinonjs/fake-timers': 10.3.0
'@types/node': 20.11.17
'@types/node': 20.11.10
jest-message-util: 29.7.0
jest-mock: 29.7.0
jest-util: 29.7.0
@@ -581,7 +581,7 @@ packages:
'@jest/transform': 29.7.0
'@jest/types': 29.6.3
'@jridgewell/trace-mapping': 0.3.22
'@types/node': 20.11.17
'@types/node': 20.11.10
chalk: 4.1.2
collect-v8-coverage: 1.0.2
exit: 0.1.2
@@ -669,7 +669,7 @@ packages:
'@jest/schemas': 29.6.3
'@types/istanbul-lib-coverage': 2.0.6
'@types/istanbul-reports': 3.0.4
'@types/node': 20.11.17
'@types/node': 20.11.10
'@types/yargs': 17.0.32
chalk: 4.1.2
dev: true
@@ -729,7 +729,7 @@ packages:
engines: {node: '>= 8'}
dependencies:
'@nodelib/fs.scandir': 2.1.5
fastq: 1.17.1
fastq: 1.17.0
dev: true
/@octokit/auth-token@4.0.0:
@@ -743,7 +743,7 @@ packages:
dependencies:
'@octokit/auth-token': 4.0.0
'@octokit/graphql': 7.0.2
'@octokit/request': 8.2.0
'@octokit/request': 8.1.6
'@octokit/request-error': 5.0.1
'@octokit/types': 12.4.0
before-after-hook: 2.2.3
@@ -762,7 +762,7 @@ packages:
resolution: {integrity: sha512-OJ2iGMtj5Tg3s6RaXH22cJcxXRi7Y3EBqbHTBRq+PQAqfaS8f/236fUrWhfSn8P4jovyzqucxme7/vWSSZBX2Q==}
engines: {node: '>= 18'}
dependencies:
'@octokit/request': 8.2.0
'@octokit/request': 8.1.6
'@octokit/types': 12.4.0
universal-user-agent: 6.0.1
dev: true
@@ -813,8 +813,8 @@ packages:
once: 1.4.0
dev: true
/@octokit/request@8.2.0:
resolution: {integrity: sha512-exPif6x5uwLqv1N1irkLG1zZNJkOtj8bZxuVHd71U5Ftuxf2wGNvAJyNBcPbPC+EBzwYEbBDdSFb8EPcjpYxPQ==}
/@octokit/request@8.1.6:
resolution: {integrity: sha512-YhPaGml3ncZC1NfXpP3WZ7iliL1ap6tLkAp6MvbK2fTTPytzVUyUesBBogcdMm86uRYO5rHaM1xIWxigWZ17MQ==}
engines: {node: '>= 18'}
dependencies:
'@octokit/endpoint': 9.0.4
@@ -857,7 +857,7 @@ packages:
config-chain: 1.1.13
dev: true
/@semantic-release/changelog@6.0.3(semantic-release@23.0.2):
/@semantic-release/changelog@6.0.3(semantic-release@23.0.0):
resolution: {integrity: sha512-dZuR5qByyfe3Y03TpmCvAxCyTnp7r5XwtHRf/8vD9EAn4ZWbavUX8adMtXYzE86EVh0gyLA7lm5yW4IV30XUag==}
engines: {node: '>=14.17'}
peerDependencies:
@@ -867,10 +867,10 @@ packages:
aggregate-error: 3.1.0
fs-extra: 11.2.0
lodash: 4.17.21
semantic-release: 23.0.2(typescript@5.3.3)
semantic-release: 23.0.0(typescript@5.3.3)
dev: true
/@semantic-release/commit-analyzer@11.1.0(semantic-release@23.0.2):
/@semantic-release/commit-analyzer@11.1.0(semantic-release@23.0.0):
resolution: {integrity: sha512-cXNTbv3nXR2hlzHjAMgbuiQVtvWHTlwwISt60B+4NZv01y/QRY7p2HcJm8Eh2StzcTJoNnflvKjHH/cjFS7d5g==}
engines: {node: ^18.17 || >=20.6.1}
peerDependencies:
@@ -883,7 +883,7 @@ packages:
import-from-esm: 1.3.3
lodash-es: 4.17.21
micromatch: 4.0.5
semantic-release: 23.0.2(typescript@5.3.3)
semantic-release: 23.0.0(typescript@5.3.3)
transitivePeerDependencies:
- supports-color
dev: true
@@ -898,7 +898,7 @@ packages:
engines: {node: '>=18'}
dev: true
/@semantic-release/exec@6.0.3(semantic-release@23.0.2):
/@semantic-release/exec@6.0.3(semantic-release@23.0.0):
resolution: {integrity: sha512-bxAq8vLOw76aV89vxxICecEa8jfaWwYITw6X74zzlO0mc/Bgieqx9kBRz9z96pHectiTAtsCwsQcUyLYWnp3VQ==}
engines: {node: '>=14.17'}
peerDependencies:
@@ -910,12 +910,12 @@ packages:
execa: 5.1.1
lodash: 4.17.21
parse-json: 5.2.0
semantic-release: 23.0.2(typescript@5.3.3)
semantic-release: 23.0.0(typescript@5.3.3)
transitivePeerDependencies:
- supports-color
dev: true
/@semantic-release/git@10.0.1(semantic-release@23.0.2):
/@semantic-release/git@10.0.1(semantic-release@23.0.0):
resolution: {integrity: sha512-eWrx5KguUcU2wUPaO6sfvZI0wPafUKAMNC18aXY4EnNcrZL86dEmpNVnC9uMpGZkmZJ9EfCVJBQx4pV4EMGT1w==}
engines: {node: '>=14.17'}
peerDependencies:
@@ -929,12 +929,12 @@ packages:
lodash: 4.17.21
micromatch: 4.0.5
p-reduce: 2.1.0
semantic-release: 23.0.2(typescript@5.3.3)
semantic-release: 23.0.0(typescript@5.3.3)
transitivePeerDependencies:
- supports-color
dev: true
/@semantic-release/github@9.2.6(semantic-release@23.0.2):
/@semantic-release/github@9.2.6(semantic-release@23.0.0):
resolution: {integrity: sha512-shi+Lrf6exeNZF+sBhK+P011LSbhmIAoUEgEY6SsxF8irJ+J2stwI5jkyDQ+4gzYyDImzV6LCKdYB9FXnQRWKA==}
engines: {node: '>=18'}
peerDependencies:
@@ -948,20 +948,20 @@ packages:
aggregate-error: 5.0.0
debug: 4.3.4
dir-glob: 3.0.1
globby: 14.0.1
http-proxy-agent: 7.0.1
https-proxy-agent: 7.0.3
globby: 14.0.0
http-proxy-agent: 7.0.0
https-proxy-agent: 7.0.2
issue-parser: 6.0.0
lodash-es: 4.17.21
mime: 4.0.1
p-filter: 4.1.0
semantic-release: 23.0.2(typescript@5.3.3)
semantic-release: 23.0.0(typescript@5.3.3)
url-join: 5.0.0
transitivePeerDependencies:
- supports-color
dev: true
/@semantic-release/npm@11.0.2(semantic-release@23.0.2):
/@semantic-release/npm@11.0.2(semantic-release@23.0.0):
resolution: {integrity: sha512-owtf3RjyPvRE63iUKZ5/xO4uqjRpVQDUB9+nnXj0xwfIeM9pRl+cG+zGDzdftR4m3f2s4Wyf3SexW+kF5DFtWA==}
engines: {node: ^18.17 || >=20}
peerDependencies:
@@ -978,12 +978,12 @@ packages:
rc: 1.2.8
read-pkg: 9.0.1
registry-auth-token: 5.0.2
semantic-release: 23.0.2(typescript@5.3.3)
semver: 7.6.0
semantic-release: 23.0.0(typescript@5.3.3)
semver: 7.5.4
tempy: 3.1.0
dev: true
/@semantic-release/release-notes-generator@12.1.0(semantic-release@23.0.2):
/@semantic-release/release-notes-generator@12.1.0(semantic-release@23.0.0):
resolution: {integrity: sha512-g6M9AjUKAZUZnxaJZnouNBeDNTCUrJ5Ltj+VJ60gJeDaRRahcHsry9HW8yKrnKkKNkx5lbWiEP1FPMqVNQz8Kg==}
engines: {node: ^18.17 || >=20.6.1}
peerDependencies:
@@ -999,7 +999,7 @@ packages:
into-stream: 7.0.0
lodash-es: 4.17.21
read-pkg-up: 11.0.0
semantic-release: 23.0.2(typescript@5.3.3)
semantic-release: 23.0.0(typescript@5.3.3)
transitivePeerDependencies:
- supports-color
dev: true
@@ -1013,8 +1013,8 @@ packages:
engines: {node: '>=10'}
dev: true
/@sindresorhus/merge-streams@2.2.0:
resolution: {integrity: sha512-UTce8mUwUW0RikMb/eseJ7ys0BRkZVFB86orHzrfW12ZmFtym5zua8joZ4L7okH2dDFHkcFjqnZ5GocWBXOFtA==}
/@sindresorhus/merge-streams@1.0.0:
resolution: {integrity: sha512-rUV5WyJrJLoloD4NDN1V1+LDMDWOa4OTsT4yYJwQNpTU6FWxkxHpL7eu4w+DmiH8x/EAM1otkPE1+LaspIbplw==}
engines: {node: '>=18'}
dev: true
@@ -1078,7 +1078,7 @@ packages:
/@types/graceful-fs@4.1.9:
resolution: {integrity: sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==}
dependencies:
'@types/node': 20.11.17
'@types/node': 20.11.10
dev: true
/@types/istanbul-lib-coverage@2.0.6:
@@ -1097,8 +1097,8 @@ packages:
'@types/istanbul-lib-report': 3.0.3
dev: true
/@types/jest@29.5.12:
resolution: {integrity: sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==}
/@types/jest@29.5.11:
resolution: {integrity: sha512-S2mHmYIVe13vrm6q4kN6fLYYAka15ALQki/vgDC3mIukEOx8WJlv0kQPM+d4w8Gp6u0uSdKND04IlTXBv0rwnQ==}
dependencies:
expect: 29.7.0
pretty-format: 29.7.0
@@ -1111,11 +1111,11 @@ packages:
/@types/mock-fs@4.13.4:
resolution: {integrity: sha512-mXmM0o6lULPI8z3XNnQCpL0BGxPwx1Ul1wXYEPBGl4efShyxW2Rln0JOPEWGyZaYZMM6OVXM/15zUuFMY52ljg==}
dependencies:
'@types/node': 20.11.17
'@types/node': 20.11.10
dev: true
/@types/node@20.11.17:
resolution: {integrity: sha512-QmgQZGWu1Yw9TDyAP9ZzpFJKynYNeOvwMJmaxABfieQoVoiVOS6MN1WSpqpRcbeA5+RW82kraAVxCCJg+780Qw==}
/@types/node@20.11.10:
resolution: {integrity: sha512-rZEfe/hJSGYmdfX9tvcPMYeYPW2sNl50nsw4jZmRcaG0HIAb0WYEpsB05GOb53vjqpyE9GUhlDQ4jLSoB5q9kg==}
dependencies:
undici-types: 5.26.5
dev: true
@@ -1127,7 +1127,7 @@ packages:
/@types/semantic-release@20.0.6:
resolution: {integrity: sha512-8YJXvsT1FwMrNdZI1e6NBHPzZWendDiUsLryzxurdup+9LnV3s9fF4NgO0D3LkBfLMnocb4Ax6TQ5yFdF3dXGQ==}
dependencies:
'@types/node': 20.11.17
'@types/node': 20.11.10
dev: true
/@types/stack-utils@2.0.3:
@@ -1238,8 +1238,8 @@ packages:
engines: {node: '>=12'}
dev: false
/any-promise@1.3.0:
resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==}
/ansicolors@0.3.2:
resolution: {integrity: sha512-QXu7BPrP29VllRxH8GwB7x5iX5qWKAAMLqKQGWTeLWVlNHNOpVMJ91dsxQAIWXpjuW5wqvxu3Jd/nRjrJ+0pqg==}
dev: true
/anymatch@3.1.3:
@@ -1385,8 +1385,8 @@ packages:
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
hasBin: true
dependencies:
caniuse-lite: 1.0.30001587
electron-to-chromium: 1.4.667
caniuse-lite: 1.0.30001581
electron-to-chromium: 1.4.648
node-releases: 2.0.14
update-browserslist-db: 1.0.13(browserslist@4.22.3)
dev: true
@@ -1432,8 +1432,16 @@ packages:
engines: {node: '>=10'}
dev: true
/caniuse-lite@1.0.30001587:
resolution: {integrity: sha512-HMFNotUmLXn71BQxg8cijvqxnIAofforZOwGsxyXJ0qugTdspUF4sPSJ2vhgprHCB996tIDzEq1ubumPDV8ULA==}
/caniuse-lite@1.0.30001581:
resolution: {integrity: sha512-whlTkwhqV2tUmP3oYhtNfaWGYHDdS3JYFQBKXxcUR9qqPWsRhFHhoISO2Xnl/g0xyKzht9mI1LZpiNWfMzHixQ==}
dev: true
/cardinal@2.1.1:
resolution: {integrity: sha512-JSr5eOgoEymtYHBjNWyjrMqet9Am2miJhlfKNdqLp6zoeAh0KN5dRAcxlecj5mAJrmQomgiOBj35xHLrFjqBpw==}
hasBin: true
dependencies:
ansicolors: 0.3.2
redeyed: 2.1.1
dev: true
/chalk@2.4.2:
@@ -1483,19 +1491,6 @@ packages:
escape-string-regexp: 5.0.0
dev: true
/cli-highlight@2.1.11:
resolution: {integrity: sha512-9KDcoEVwyUXrjcJNvHD0NFc/hiwe/WPVYIleQh2O1N2Zro5gWJZ/K+3DGn8w8P/F6FxOgzyC5bxDyHIgCSPhGg==}
engines: {node: '>=8.0.0', npm: '>=5.0.0'}
hasBin: true
dependencies:
chalk: 4.1.2
highlight.js: 10.7.3
mz: 2.7.0
parse5: 5.1.1
parse5-htmlparser2-tree-adapter: 6.0.1
yargs: 16.2.0
dev: true
/cli-table3@0.6.3:
resolution: {integrity: sha512-w5Jac5SykAeZJKntOxJCrm63Eg5/4dhMWIcuTbo9rpE+brgaSZo0RuNJZeOyMgsUdhDeojvgyQLmjI+K50ZGyg==}
engines: {node: 10.* || >= 12.*}
@@ -1505,14 +1500,6 @@ packages:
'@colors/colors': 1.5.0
dev: true
/cliui@7.0.4:
resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==}
dependencies:
string-width: 4.2.3
strip-ansi: 6.0.1
wrap-ansi: 7.0.0
dev: true
/cliui@8.0.1:
resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==}
engines: {node: '>=12'}
@@ -1660,7 +1647,7 @@ packages:
handlebars: 4.7.8
json-stringify-safe: 5.0.1
meow: 12.1.1
semver: 7.6.0
semver: 7.5.4
split2: 4.2.0
dev: true
@@ -1734,7 +1721,7 @@ packages:
typescript: 5.3.3
dev: true
/create-jest@29.7.0(@types/node@20.11.17)(ts-node@10.9.2):
/create-jest@29.7.0(@types/node@20.11.10)(ts-node@10.9.2):
resolution: {integrity: sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==}
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
hasBin: true
@@ -1743,7 +1730,7 @@ packages:
chalk: 4.1.2
exit: 0.1.2
graceful-fs: 4.2.11
jest-config: 29.7.0(@types/node@20.11.17)(ts-node@10.9.2)
jest-config: 29.7.0(@types/node@20.11.10)(ts-node@10.9.2)
jest-util: 29.7.0
prompts: 2.4.2
transitivePeerDependencies:
@@ -1868,8 +1855,8 @@ packages:
resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==}
dev: false
/electron-to-chromium@1.4.667:
resolution: {integrity: sha512-66L3pLlWhTNVUhnmSA5+qDM3fwnXsM6KAqE36e2w4KN0g6pkEtlT5bs41FQtQwVwKnfhNBXiWRLPs30HSxd7Kw==}
/electron-to-chromium@1.4.648:
resolution: {integrity: sha512-EmFMarXeqJp9cUKu/QEciEApn0S/xRcpZWuAm32U7NgoZCimjsilKXHRO9saeEW55eHZagIDg6XTUOv32w9pjg==}
dev: true
/emittery@0.13.1:
@@ -1907,8 +1894,8 @@ packages:
is-arrayish: 0.2.1
dev: true
/escalade@3.1.2:
resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==}
/escalade@3.1.1:
resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==}
engines: {node: '>=6'}
dev: true
@@ -1994,8 +1981,8 @@ packages:
resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==}
dev: true
/fastq@1.17.1:
resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==}
/fastq@1.17.0:
resolution: {integrity: sha512-zGygtijUMT7jnk3h26kUms3BkSDp4IfIKjmnqI2tvx6nuBfiF1UqOxbnLfzdv+apBy+53oaImsKtMw/xYbW+1w==}
dependencies:
reusify: 1.0.4
dev: true
@@ -2159,7 +2146,7 @@ packages:
hasBin: true
dependencies:
meow: 12.1.1
semver: 7.6.0
semver: 7.5.4
dev: true
/glob-parent@5.1.2:
@@ -2197,13 +2184,13 @@ packages:
engines: {node: '>=4'}
dev: true
/globby@14.0.1:
resolution: {integrity: sha512-jOMLD2Z7MAhyG8aJpNOpmziMOP4rPLcc95oQPKXBazW82z+CEgPFBQvEpRUa1KeIMUJo4Wsm+q6uzO/Q/4BksQ==}
/globby@14.0.0:
resolution: {integrity: sha512-/1WM/LNHRAOH9lZta77uGbq0dAEQM+XjNesWwhlERDVenqothRbnzTrL3/LrIoEPPjeUHC3vrS6TwoyxeHs7MQ==}
engines: {node: '>=18'}
dependencies:
'@sindresorhus/merge-streams': 2.2.0
'@sindresorhus/merge-streams': 1.0.0
fast-glob: 3.3.2
ignore: 5.3.1
ignore: 5.3.0
path-type: 5.0.0
slash: 5.1.0
unicorn-magic: 0.1.0
@@ -2243,17 +2230,13 @@ packages:
resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==}
engines: {node: '>=8'}
/hasown@2.0.1:
resolution: {integrity: sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==}
/hasown@2.0.0:
resolution: {integrity: sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==}
engines: {node: '>= 0.4'}
dependencies:
function-bind: 1.1.2
dev: true
/highlight.js@10.7.3:
resolution: {integrity: sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==}
dev: true
/hook-std@3.0.0:
resolution: {integrity: sha512-jHRQzjSDzMtFy34AGj1DN+vq54WVuhSvKgrHf0OMiFQTwDD4L/qqofVEWjLOBMTn5+lCD3fPg32W9yOfnEJTTw==}
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
@@ -2281,8 +2264,8 @@ packages:
resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==}
dev: true
/http-proxy-agent@7.0.1:
resolution: {integrity: sha512-My1KCEPs6A0hb4qCVzYp8iEvA8j8YqcvXLZZH8C9OFuTYpYjHE7N2dtG3mRl1HMD4+VGXpF3XcDVcxGBT7yDZQ==}
/http-proxy-agent@7.0.0:
resolution: {integrity: sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==}
engines: {node: '>= 14'}
dependencies:
agent-base: 7.1.0
@@ -2291,8 +2274,8 @@ packages:
- supports-color
dev: true
/https-proxy-agent@7.0.3:
resolution: {integrity: sha512-kCnwztfX0KZJSLOBrcL0emLeFako55NWMovvyPP2AjsghNk9RB1yjSI+jVumPHYZsNXegNoqupSW9IY3afSH8w==}
/https-proxy-agent@7.0.2:
resolution: {integrity: sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==}
engines: {node: '>= 14'}
dependencies:
agent-base: 7.1.0
@@ -2311,8 +2294,8 @@ packages:
engines: {node: '>=16.17.0'}
dev: true
/ignore@5.3.1:
resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==}
/ignore@5.3.0:
resolution: {integrity: sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==}
engines: {node: '>= 4'}
dev: true
@@ -2397,7 +2380,7 @@ packages:
/is-core-module@2.13.1:
resolution: {integrity: sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==}
dependencies:
hasown: 2.0.1
hasown: 2.0.0
dev: true
/is-extglob@2.1.1:
@@ -2509,7 +2492,7 @@ packages:
'@babel/parser': 7.23.9
'@istanbuljs/schema': 0.1.3
istanbul-lib-coverage: 3.2.2
semver: 7.6.0
semver: 7.5.4
transitivePeerDependencies:
- supports-color
dev: true
@@ -2573,7 +2556,7 @@ packages:
'@jest/expect': 29.7.0
'@jest/test-result': 29.7.0
'@jest/types': 29.6.3
'@types/node': 20.11.17
'@types/node': 20.11.10
chalk: 4.1.2
co: 4.6.0
dedent: 1.5.1
@@ -2594,7 +2577,7 @@ packages:
- supports-color
dev: true
/jest-cli@29.7.0(@types/node@20.11.17)(ts-node@10.9.2):
/jest-cli@29.7.0(@types/node@20.11.10)(ts-node@10.9.2):
resolution: {integrity: sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==}
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
hasBin: true
@@ -2608,10 +2591,10 @@ packages:
'@jest/test-result': 29.7.0
'@jest/types': 29.6.3
chalk: 4.1.2
create-jest: 29.7.0(@types/node@20.11.17)(ts-node@10.9.2)
create-jest: 29.7.0(@types/node@20.11.10)(ts-node@10.9.2)
exit: 0.1.2
import-local: 3.1.0
jest-config: 29.7.0(@types/node@20.11.17)(ts-node@10.9.2)
jest-config: 29.7.0(@types/node@20.11.10)(ts-node@10.9.2)
jest-util: 29.7.0
jest-validate: 29.7.0
yargs: 17.7.2
@@ -2622,7 +2605,7 @@ packages:
- ts-node
dev: true
/jest-config@29.7.0(@types/node@20.11.17)(ts-node@10.9.2):
/jest-config@29.7.0(@types/node@20.11.10)(ts-node@10.9.2):
resolution: {integrity: sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==}
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
peerDependencies:
@@ -2637,7 +2620,7 @@ packages:
'@babel/core': 7.23.9
'@jest/test-sequencer': 29.7.0
'@jest/types': 29.6.3
'@types/node': 20.11.17
'@types/node': 20.11.10
babel-jest: 29.7.0(@babel/core@7.23.9)
chalk: 4.1.2
ci-info: 3.9.0
@@ -2657,7 +2640,7 @@ packages:
pretty-format: 29.7.0
slash: 3.0.0
strip-json-comments: 3.1.1
ts-node: 10.9.2(@types/node@20.11.17)(typescript@5.3.3)
ts-node: 10.9.2(@types/node@20.11.10)(typescript@5.3.3)
transitivePeerDependencies:
- babel-plugin-macros
- supports-color
@@ -2698,7 +2681,7 @@ packages:
'@jest/environment': 29.7.0
'@jest/fake-timers': 29.7.0
'@jest/types': 29.6.3
'@types/node': 20.11.17
'@types/node': 20.11.10
jest-mock: 29.7.0
jest-util: 29.7.0
dev: true
@@ -2714,7 +2697,7 @@ packages:
dependencies:
'@jest/types': 29.6.3
'@types/graceful-fs': 4.1.9
'@types/node': 20.11.17
'@types/node': 20.11.10
anymatch: 3.1.3
fb-watchman: 2.0.2
graceful-fs: 4.2.11
@@ -2765,7 +2748,7 @@ packages:
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
dependencies:
'@jest/types': 29.6.3
'@types/node': 20.11.17
'@types/node': 20.11.10
jest-util: 29.7.0
dev: true
@@ -2820,7 +2803,7 @@ packages:
'@jest/test-result': 29.7.0
'@jest/transform': 29.7.0
'@jest/types': 29.6.3
'@types/node': 20.11.17
'@types/node': 20.11.10
chalk: 4.1.2
emittery: 0.13.1
graceful-fs: 4.2.11
@@ -2851,7 +2834,7 @@ packages:
'@jest/test-result': 29.7.0
'@jest/transform': 29.7.0
'@jest/types': 29.6.3
'@types/node': 20.11.17
'@types/node': 20.11.10
chalk: 4.1.2
cjs-module-lexer: 1.2.3
collect-v8-coverage: 1.0.2
@@ -2893,7 +2876,7 @@ packages:
jest-util: 29.7.0
natural-compare: 1.4.0
pretty-format: 29.7.0
semver: 7.6.0
semver: 7.5.4
transitivePeerDependencies:
- supports-color
dev: true
@@ -2903,7 +2886,7 @@ packages:
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
dependencies:
'@jest/types': 29.6.3
'@types/node': 20.11.17
'@types/node': 20.11.10
chalk: 4.1.2
ci-info: 3.9.0
graceful-fs: 4.2.11
@@ -2928,7 +2911,7 @@ packages:
dependencies:
'@jest/test-result': 29.7.0
'@jest/types': 29.6.3
'@types/node': 20.11.17
'@types/node': 20.11.10
ansi-escapes: 4.3.2
chalk: 4.1.2
emittery: 0.13.1
@@ -2940,13 +2923,13 @@ packages:
resolution: {integrity: sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==}
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
dependencies:
'@types/node': 20.11.17
'@types/node': 20.11.10
jest-util: 29.7.0
merge-stream: 2.0.0
supports-color: 8.1.1
dev: true
/jest@29.7.0(@types/node@20.11.17)(ts-node@10.9.2):
/jest@29.7.0(@types/node@20.11.10)(ts-node@10.9.2):
resolution: {integrity: sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==}
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
hasBin: true
@@ -2959,7 +2942,7 @@ packages:
'@jest/core': 29.7.0(ts-node@10.9.2)
'@jest/types': 29.6.3
import-local: 3.1.0
jest-cli: 29.7.0(@types/node@20.11.17)(ts-node@10.9.2)
jest-cli: 29.7.0(@types/node@20.11.10)(ts-node@10.9.2)
transitivePeerDependencies:
- '@types/node'
- babel-plugin-macros
@@ -3137,7 +3120,7 @@ packages:
resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==}
engines: {node: '>=10'}
dependencies:
semver: 7.6.0
semver: 7.5.4
dev: true
/make-error@1.3.6:
@@ -3160,29 +3143,29 @@ packages:
engines: {node: '>=8'}
dev: true
/marked-terminal@7.0.0(marked@12.0.0):
resolution: {integrity: sha512-sNEx8nn9Ktcm6pL0TnRz8tnXq/mSS0Q1FRSwJOAqw4lAB4l49UeDf85Gm1n9RPFm5qurCPjwi1StAQT2XExhZw==}
/marked-terminal@6.2.0(marked@11.2.0):
resolution: {integrity: sha512-ubWhwcBFHnXsjYNsu+Wndpg0zhY4CahSpPlA70PlO0rR9r2sZpkyU+rkCsOWH+KMEkx847UpALON+HWgxowFtw==}
engines: {node: '>=16.0.0'}
peerDependencies:
marked: '>=1 <13'
marked: '>=1 <12'
dependencies:
ansi-escapes: 6.2.0
cardinal: 2.1.1
chalk: 5.3.0
cli-highlight: 2.1.11
cli-table3: 0.6.3
marked: 12.0.0
marked: 11.2.0
node-emoji: 2.1.3
supports-hyperlinks: 3.0.0
dev: true
/marked@12.0.0:
resolution: {integrity: sha512-Vkwtq9rLqXryZnWaQc86+FHLC6tr/fycMfYAhiOIXkrNmeGAyhSxjqu0Rs1i0bBqw5u0S7+lV9fdH2ZSVaoa0w==}
/marked@11.2.0:
resolution: {integrity: sha512-HR0m3bvu0jAPYiIvLUUQtdg1g6D247//lvcekpHO1WMvbwDlwSkZAX9Lw4F4YHE1T0HaaNve0tuAWuV1UJ6vtw==}
engines: {node: '>= 18'}
hasBin: true
dev: true
/massarg@2.0.0:
resolution: {integrity: sha512-oeB1dT/e4K3GBCPmUPwPXybeZbjrAnjsoMWSqshlfs4ndkeNdyxEHr6UAf0bkZMu3pqxT/QqembAM4nrUcPrAQ==}
/massarg@2.0.0-pre.12:
resolution: {integrity: sha512-ncD9mXRQh4y8IIi5qcNEzh0qsqXyVq0FH0/v2vdMy/+WJCdAIuKG3TqlWML1SWMH4QdqZ/XJnbDfp8u2i91NNg==}
dependencies:
zod: 3.22.4
dev: false
@@ -3286,14 +3269,6 @@ packages:
resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==}
dev: true
/mz@2.7.0:
resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==}
dependencies:
any-promise: 1.3.0
object-assign: 4.1.1
thenify-all: 1.6.0
dev: true
/natural-compare@1.4.0:
resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==}
dev: true
@@ -3338,7 +3313,7 @@ packages:
dependencies:
hosted-git-info: 4.1.0
is-core-module: 2.13.1
semver: 7.6.0
semver: 7.5.4
validate-npm-package-license: 3.0.4
dev: true
@@ -3348,7 +3323,7 @@ packages:
dependencies:
hosted-git-info: 7.0.1
is-core-module: 2.13.1
semver: 7.6.0
semver: 7.5.4
validate-npm-package-license: 3.0.4
dev: true
@@ -3453,11 +3428,6 @@ packages:
- which
- write-file-atomic
/object-assign@4.1.1:
resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==}
engines: {node: '>=0.10.0'}
dev: true
/once@1.4.0:
resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==}
dependencies:
@@ -3611,21 +3581,7 @@ packages:
dependencies:
'@babel/code-frame': 7.23.5
index-to-position: 0.1.2
type-fest: 4.10.2
dev: true
/parse5-htmlparser2-tree-adapter@6.0.1:
resolution: {integrity: sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==}
dependencies:
parse5: 6.0.1
dev: true
/parse5@5.1.1:
resolution: {integrity: sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==}
dev: true
/parse5@6.0.1:
resolution: {integrity: sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==}
type-fest: 4.10.1
dev: true
/path-exists@3.0.0:
@@ -3771,7 +3727,7 @@ packages:
dependencies:
find-up: 6.3.0
read-pkg: 8.1.0
type-fest: 4.10.2
type-fest: 4.10.1
dev: true
/read-pkg-up@11.0.0:
@@ -3781,7 +3737,7 @@ packages:
dependencies:
find-up-simple: 1.0.0
read-pkg: 9.0.1
type-fest: 4.10.2
type-fest: 4.10.1
dev: true
/read-pkg-up@7.0.1:
@@ -3810,7 +3766,7 @@ packages:
'@types/normalize-package-data': 2.4.4
normalize-package-data: 6.0.0
parse-json: 7.1.1
type-fest: 4.10.2
type-fest: 4.10.1
dev: true
/read-pkg@9.0.1:
@@ -3820,7 +3776,7 @@ packages:
'@types/normalize-package-data': 2.4.4
normalize-package-data: 6.0.0
parse-json: 8.1.0
type-fest: 4.10.2
type-fest: 4.10.1
unicorn-magic: 0.1.0
dev: true
@@ -3853,6 +3809,12 @@ packages:
strip-indent: 3.0.0
dev: true
/redeyed@2.1.1:
resolution: {integrity: sha512-FNpGGo1DycYAdnrKFxCMmKYgo/mILAqtRYbkdQD8Ep/Hk2PQ5+aEAEx+IU713RTDmuBaH0c8P5ZozurNu5ObRQ==}
dependencies:
esprima: 4.0.1
dev: true
/registry-auth-token@5.0.2:
resolution: {integrity: sha512-o/3ikDxtXaA59BmZuZrJZDJv8NMDGSj+6j6XaeBmHw8eY1i1qd9+6H+LjVvQXx3HN6aRCGa1cUdJ9RaJZUugnQ==}
engines: {node: '>=14'}
@@ -3922,16 +3884,16 @@ packages:
conventional-commits-parser: 3.2.4
dev: true
/semantic-release@23.0.2(typescript@5.3.3):
resolution: {integrity: sha512-OnVYJ6Xgzwe1x8MKswba7RU9+5djS1MWRTrTn5qsq3xZYpslroZkV9Pt0dA2YcIuieeuSZWJhn+yUWoBUHO5Fw==}
/semantic-release@23.0.0(typescript@5.3.3):
resolution: {integrity: sha512-Jz7jEWO2igTtske112gC4PPE2whCMVrsgxUPG3/SZI7VE357suIUZFlJd1Yu0g2I6RPc2HxNEfUg7KhmDTjwqg==}
engines: {node: '>=20.8.1'}
hasBin: true
dependencies:
'@semantic-release/commit-analyzer': 11.1.0(semantic-release@23.0.2)
'@semantic-release/commit-analyzer': 11.1.0(semantic-release@23.0.0)
'@semantic-release/error': 4.0.0
'@semantic-release/github': 9.2.6(semantic-release@23.0.2)
'@semantic-release/npm': 11.0.2(semantic-release@23.0.2)
'@semantic-release/release-notes-generator': 12.1.0(semantic-release@23.0.2)
'@semantic-release/github': 9.2.6(semantic-release@23.0.0)
'@semantic-release/npm': 11.0.2(semantic-release@23.0.0)
'@semantic-release/release-notes-generator': 12.1.0(semantic-release@23.0.0)
aggregate-error: 5.0.0
cosmiconfig: 9.0.0(typescript@5.3.3)
debug: 4.3.4
@@ -3945,14 +3907,14 @@ packages:
hosted-git-info: 7.0.1
import-from-esm: 1.3.3
lodash-es: 4.17.21
marked: 12.0.0
marked-terminal: 7.0.0(marked@12.0.0)
marked: 11.2.0
marked-terminal: 6.2.0(marked@11.2.0)
micromatch: 4.0.5
p-each-series: 3.0.0
p-reduce: 3.0.0
read-pkg-up: 11.0.0
resolve-from: 5.0.0
semver: 7.6.0
semver: 7.5.4
semver-diff: 4.0.0
signale: 1.4.0
yargs: 17.7.2
@@ -3965,7 +3927,7 @@ packages:
resolution: {integrity: sha512-0Ju4+6A8iOnpL/Thra7dZsSlOHYAHIeMxfhWQRI1/VLcT3WDBZKKtQt/QkBOsiIN9ZpuvHE6cGZ0x4glCMmfiA==}
engines: {node: '>=12'}
dependencies:
semver: 7.6.0
semver: 7.5.4
dev: true
/semver-regex@4.0.5:
@@ -3983,8 +3945,8 @@ packages:
hasBin: true
dev: true
/semver@7.6.0:
resolution: {integrity: sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==}
/semver@7.5.4:
resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==}
engines: {node: '>=10'}
hasBin: true
dependencies:
@@ -4058,7 +4020,7 @@ packages:
resolution: {integrity: sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==}
dependencies:
spdx-expression-parse: 3.0.1
spdx-license-ids: 3.0.17
spdx-license-ids: 3.0.16
dev: true
/spdx-exceptions@2.4.0:
@@ -4069,11 +4031,11 @@ packages:
resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==}
dependencies:
spdx-exceptions: 2.4.0
spdx-license-ids: 3.0.17
spdx-license-ids: 3.0.16
dev: true
/spdx-license-ids@3.0.17:
resolution: {integrity: sha512-sh8PWc/ftMqAAdFiBu6Fy6JUOYjqDJBJvIhpfDMyHrr0Rbp5liZqd4TjtQ/RgfLjKFZb+LMx5hpml5qOWy0qvg==}
/spdx-license-ids@3.0.16:
resolution: {integrity: sha512-eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw==}
dev: true
/split2@1.0.0:
@@ -4272,19 +4234,6 @@ packages:
engines: {node: '>=8'}
dev: true
/thenify-all@1.6.0:
resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==}
engines: {node: '>=0.8'}
dependencies:
thenify: 3.3.1
dev: true
/thenify@3.3.1:
resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==}
dependencies:
any-promise: 1.3.0
dev: true
/through2@2.0.5:
resolution: {integrity: sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==}
dependencies:
@@ -4352,17 +4301,17 @@ packages:
'@babel/core': 7.23.9
bs-logger: 0.2.6
fast-json-stable-stringify: 2.1.0
jest: 29.7.0(@types/node@20.11.17)(ts-node@10.9.2)
jest: 29.7.0(@types/node@20.11.10)(ts-node@10.9.2)
jest-util: 29.7.0
json5: 2.2.3
lodash.memoize: 4.1.2
make-error: 1.3.6
semver: 7.6.0
semver: 7.5.4
typescript: 5.3.3
yargs-parser: 21.1.1
dev: true
/ts-node@10.9.2(@types/node@20.11.17)(typescript@5.3.3):
/ts-node@10.9.2(@types/node@20.11.10)(typescript@5.3.3):
resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==}
hasBin: true
peerDependencies:
@@ -4381,7 +4330,7 @@ packages:
'@tsconfig/node12': 1.0.11
'@tsconfig/node14': 1.0.3
'@tsconfig/node16': 1.0.4
'@types/node': 20.11.17
'@types/node': 20.11.10
acorn: 8.11.3
acorn-walk: 8.3.2
arg: 4.1.3
@@ -4433,8 +4382,8 @@ packages:
engines: {node: '>=14.16'}
dev: true
/type-fest@4.10.2:
resolution: {integrity: sha512-anpAG63wSpdEbLwOqH8L84urkL6PiVIov3EMmgIhhThevh9aiMQov+6Btx0wldNcvm4wV+e2/Rt1QdDwKHFbHw==}
/type-fest@4.10.1:
resolution: {integrity: sha512-7ZnJYTp6uc04uYRISWtiX3DSKB/fxNQT0B5o1OUeCqiQiwF+JC9+rJiZIDrPrNCLLuTqyQmh4VdQqh/ZOkv9MQ==}
engines: {node: '>=16'}
dev: true
@@ -4488,7 +4437,7 @@ packages:
browserslist: '>= 4.21.0'
dependencies:
browserslist: 4.22.3
escalade: 3.1.2
escalade: 3.1.1
picocolors: 1.0.0
dev: true
@@ -4594,25 +4543,12 @@ packages:
engines: {node: '>=12'}
dev: true
/yargs@16.2.0:
resolution: {integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==}
engines: {node: '>=10'}
dependencies:
cliui: 7.0.4
escalade: 3.1.2
get-caller-file: 2.0.5
require-directory: 2.1.1
string-width: 4.2.3
y18n: 5.0.8
yargs-parser: 20.2.9
dev: true
/yargs@17.7.2:
resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==}
engines: {node: '>=12'}
dependencies:
cliui: 8.0.1
escalade: 3.1.2
escalade: 3.1.1
get-caller-file: 2.0.5
require-directory: 2.1.1
string-width: 4.2.3

View File

@@ -1,69 +1,37 @@
const ref = process.env.GITHUB_REF || ""
const branch = ref.split("/").pop()
/**
* @type {import('semantic-release').GlobalConfig}
*/
/** @type {import('semantic-release').Options} */
module.exports = {
branches: ["master", { name: "pre", prerelease: true }],
analyzeCommits: {
path: "semantic-release-conventional-commits",
},
plugins: [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/npm",
"@semantic-release/changelog",
{
// only update the pkg version on root, don't publish
npmPublish: false,
},
],
// [
// '@semantic-release/npm',
// {
// // only update the pkg version on doc, don't publish
// npmPublish: false,
// pkgRoot: 'doc',
// },
// ]
[
"@semantic-release/exec",
{
publish: "cd ./dist && pnpm pack --pack-destination=../",
changelogFile: "CHANGELOG.md",
changelogTitle: "# Change Log",
},
],
[
"@semantic-release/npm",
{
// publish from dist dir instead of root
npmPublish: true,
pkgRoot: "dist",
},
],
[
"@semantic-release/git",
{
assets: ["CHANGELOG.md"],
},
],
[
"@semantic-release/github",
{
assets: ["*.tgz"],
},
],
branch === "master"
? [
"@semantic-release/changelog",
{
changelogFile: "CHANGELOG.md",
changelogTitle: "# Change Log",
},
]
: undefined,
[
"@semantic-release/git",
{
assets: ["package.json", "CHANGELOG.md"].filter(Boolean),
},
],
//
// [
// '@semantic-release/exec',
// {
// verifyReleaseCmd: 'echo ${nextRelease.version} > .VERSION',
// },
// ],
].filter(Boolean),
],
}

View File

@@ -1,5 +1,4 @@
// @ts-check
/** @type {import('./dist').ScaffoldConfigFile} */
/** @type {import('simple-scaffold').ScaffoldConfigFile} */
module.exports = (conf) => {
console.log("Config:", conf)
return {
@@ -13,10 +12,5 @@ module.exports = (conf) => {
output: "examples/test-output/component",
data: { property: "myProp", value: "10" },
},
configs: {
templates: ["examples/test-input/**/.*"],
output: "examples/test-output/configs",
name: "---",
},
}
}

View File

@@ -1,6 +1,4 @@
#!/usr/bin/env node
import os from "node:os"
import { massarg } from "massarg"
import chalk from "chalk"
import { LogLevel, ScaffoldCmdConfig } from "./types"
@@ -8,38 +6,21 @@ import { Scaffold } from "./scaffold"
import path from "node:path"
import fs from "node:fs/promises"
import { parseAppendData, parseConfigFile } from "./config"
import { log } from "./logger"
export async function parseCliArgs(args = process.argv.slice(2)) {
const isProjectRoot = Boolean(await fs.stat(path.join(__dirname, "package.json")).catch(() => false))
const pkgFile = await fs.readFile(path.resolve(__dirname, isProjectRoot ? "." : "..", "package.json"))
const pkg = JSON.parse(pkgFile.toString())
const isVersionFlag = args.includes("--version") || args.includes("-v")
const isConfigProvided =
args.includes("--config") || args.includes("-c") || args.includes("--git") || args.includes("-g") || isVersionFlag
args.includes("--config") || args.includes("-c") || args.includes("--git") || args.includes("-g")
return massarg<ScaffoldCmdConfig>({
name: pkg.name,
description: pkg.description,
})
.main(async (config) => {
if (config.version) {
console.log(pkg.version)
return
}
log(config, LogLevel.info, `Simple Scaffold v${pkg.version}`)
const tmpPath = path.resolve(os.tmpdir(), `scaffold-config-${Date.now()}`)
try {
log(config, LogLevel.debug, "Parsing config file...", config)
const parsed = await parseConfigFile(config, tmpPath)
await Scaffold(parsed)
} catch (e) {
const message = "message" in (e as any) ? (e as any).message : e?.toString()
log(config, LogLevel.error, message)
} finally {
log(config, LogLevel.debug, "Cleaning up temporary files...", tmpPath)
await fs.rm(tmpPath, { recursive: true, force: true })
}
const parsed = await parseConfigFile(config)
return Scaffold(parsed)
})
.option({
name: "name",
@@ -48,7 +29,7 @@ export async function parseCliArgs(args = process.argv.slice(2)) {
"Name to be passed to the generated files. `{{name}}` and other data parameters inside " +
"contents and file names will be replaced accordingly. You may omit the `--name` or `-n` for this specific option.",
isDefault: true,
required: !isConfigProvided,
required: true,
})
.option({
name: "config",
@@ -138,13 +119,7 @@ export async function parseCliArgs(args = process.argv.slice(2)) {
"Determine amount of logs to display. The values are: " +
`${chalk.bold`\`none | debug | info | warn | error\``}. ` +
"The provided level will display messages of the same level or higher.",
parse: (v) => {
const val = v.toLowerCase()
if (!(val in LogLevel)) {
throw new Error(`Invalid log level: ${val}, must be one of: ${Object.keys(LogLevel).join(", ")}`)
}
return val
},
parse: Number,
})
.flag({
name: "dry-run",
@@ -154,11 +129,6 @@ export async function parseCliArgs(args = process.argv.slice(2)) {
"Don't emit files. This is good for testing your scaffolds and making sure they " +
"don't fail, without having to write actual file contents or create directories.",
})
.flag({
name: "version",
aliases: ["v"],
description: "Display version.",
})
.example({
description: "Usage with config file",
input: "simple-scaffold -c scaffold.cmd.js --key component",

View File

@@ -1,5 +1,4 @@
import path from "node:path"
import fs from "node:fs/promises"
import {
ConfigLoadConfig,
FileResponse,
@@ -15,7 +14,6 @@ import { handlebarsParse } from "./parser"
import { log } from "./logger"
import { resolve, wrapNoopResolver } from "./utils"
import { getGitConfig } from "./git"
import { isDir, pathExists } from "./file"
/** @internal */
export function getOptionValueForFile<T>(
@@ -50,7 +48,7 @@ function isWrappedWithQuotes(string: string): boolean {
}
/** @internal */
export async function parseConfigFile(config: ScaffoldCmdConfig, tmpPath: string): Promise<ScaffoldConfig> {
export async function parseConfigFile(config: ScaffoldCmdConfig): Promise<ScaffoldConfig> {
let output: ScaffoldConfig = config
if (config.quiet) {
@@ -70,10 +68,9 @@ export async function parseConfigFile(config: ScaffoldCmdConfig, tmpPath: string
const configFilename = config.config
const configPath = isGit ? config.git : configFilename
log(config, LogLevel.info, `Loading config from file ${configFilename} with key ${key}`)
const configPromise = await (isGit
? getRemoteConfig({ git: configPath, config: configFilename, logLevel: config.logLevel, tmpPath })
log(config, LogLevel.info, `Loading config from ${configFilename} with key ${key}`)
const configPromise = await (config.git
? getRemoteConfig({ git: configPath, config: configFilename, logLevel: config.logLevel })
: getLocalConfig({ config: configFilename, logLevel: config.logLevel }))
// resolve the config
@@ -81,7 +78,6 @@ export async function parseConfigFile(config: ScaffoldCmdConfig, tmpPath: string
// If the config is a function or promise, return the output
if (typeof configImport.default === "function" || configImport.default instanceof Promise) {
log(config, LogLevel.debug, "Config is a function or promise, resolving...")
configImport = await resolve(configImport.default, config)
}
@@ -89,23 +85,19 @@ export async function parseConfigFile(config: ScaffoldCmdConfig, tmpPath: string
throw new Error(`Template "${key}" not found in ${configFilename}`)
}
const imported = configImport[key]
log(config, LogLevel.debug, "Imported result", imported)
const importedKey = configImport[key]
output = {
...config,
...imported,
...importedKey,
data: {
...(imported as any).data,
...(importedKey as any).data,
...config.data,
},
}
}
output.data = { ...output.data, ...config.appendData }
if (!output.name) {
throw new Error("simple-scaffold: Missing required option: name")
}
log(output, LogLevel.debug, "Parsed config", output)
delete config.appendData
return output
}
@@ -122,22 +114,8 @@ export function githubPartToUrl(part: string): string {
export async function getLocalConfig(config: ConfigLoadConfig & Partial<LogConfig>): Promise<ScaffoldConfigFile> {
const { config: configFile, ...logConfig } = config as Required<typeof config>
log(logConfig, LogLevel.info, `Loading config from file ${configFile}`)
const absolutePath = path.resolve(process.cwd(), configFile)
const _isDir = await isDir(absolutePath)
if (_isDir) {
log(logConfig, LogLevel.debug, `Resolving config file from directory ${absolutePath}`)
const file = await findConfigFile(absolutePath)
const exists = await pathExists(file)
if (!exists) {
throw new Error(`Could not find config file in directory ${absolutePath}`)
}
log(logConfig, LogLevel.info, `Loading config from: ${path.resolve(absolutePath, file)}`)
return wrapNoopResolver(import(path.resolve(absolutePath, file)))
}
log(logConfig, LogLevel.info, `Loading config from: ${absolutePath}`)
return wrapNoopResolver(import(absolutePath))
}
@@ -145,7 +123,7 @@ export async function getLocalConfig(config: ConfigLoadConfig & Partial<LogConfi
export async function getRemoteConfig(
config: RemoteConfigLoadConfig & Partial<LogConfig>,
): Promise<ScaffoldConfigFile> {
const { config: configFile, git, tmpPath, ...logConfig } = config as Required<typeof config>
const { config: configFile, git, ...logConfig } = config as Required<typeof config>
log(logConfig, LogLevel.info, `Loading config from remote ${git}, file ${configFile}`)
@@ -157,21 +135,5 @@ export async function getRemoteConfig(
throw new Error(`Unsupported protocol ${url.protocol}`)
}
return getGitConfig(url, configFile, tmpPath, logConfig)
}
/** @internal */
export async function findConfigFile(root: string): Promise<string> {
const allowed = ["mjs", "cjs", "js", "json"].reduce((acc, ext) => {
acc.push(`scaffold.config.${ext}`)
acc.push(`scaffold.${ext}`)
return acc
}, [] as string[])
for (const file of allowed) {
const exists = await pathExists(path.resolve(root, file))
if (exists) {
return file
}
}
throw new Error(`Could not find config file in git repo`)
return getGitConfig(url, configFile, logConfig)
}

View File

@@ -1,22 +1,23 @@
import path from "node:path"
import os from "node:os"
import fs from "node:fs/promises"
import { log } from "./logger"
import { AsyncResolver, LogConfig, LogLevel, ScaffoldCmdConfig, ScaffoldConfigMap } from "./types"
import { spawn } from "node:child_process"
import { resolve, wrapNoopResolver } from "./utils"
import { findConfigFile } from "./config"
export async function getGitConfig(
url: URL,
file: string,
tmpPath: string,
logConfig: LogConfig,
): Promise<AsyncResolver<ScaffoldCmdConfig, ScaffoldConfigMap>> {
const repoUrl = `${url.protocol}//${url.host}${url.pathname}`
log(logConfig, LogLevel.info, `Cloning git repo ${repoUrl}`)
const tmpPath = path.resolve(os.tmpdir(), `scaffold-config-${Date.now()}`)
return new Promise((res, reject) => {
log(logConfig, LogLevel.debug, `Cloning git repo to ${tmpPath}`)
const clone = spawn("git", ["clone", "--recurse-submodules", "--depth", "1", repoUrl, tmpPath])
clone.on("error", reject)
@@ -46,7 +47,6 @@ export async function loadGitConfig({
log(logConfig, LogLevel.info, `Loading config from git repo: ${repoUrl}`)
const filename = file || (await findConfigFile(tmpPath))
const absolutePath = path.resolve(tmpPath, filename)
log(logConfig, LogLevel.debug, `Resolving config file: ${absolutePath}`)
const loadedConfig = await resolve(async () => (await import(absolutePath)).default as ScaffoldConfigMap, logConfig)
log(logConfig, LogLevel.info, `Loaded config from git`)
@@ -58,5 +58,25 @@ export async function loadGitConfig({
templates: v.templates.map((t) => path.resolve(tmpPath, t)),
}
}
await fs.rm(tmpPath, { recursive: true })
return wrapNoopResolver(fixedConfig)
}
/** @internal */
export async function findConfigFile(root: string): Promise<string> {
const allowed = ["mjs", "cjs", "js", "json"].reduce((acc, ext) => {
acc.push(`scaffold.config.${ext}`)
acc.push(`scaffold.${ext}`)
return acc
}, [] as string[])
for (const file of allowed) {
const exists = await fs
.stat(path.resolve(root, file))
.then(() => true)
.catch(() => false)
if (exists) {
return file
}
}
throw new Error(`Could not find config file in git repo`)
}

View File

@@ -1,5 +1,4 @@
export * from "./scaffold"
export * from "./types"
import Scaffold from "./scaffold"
export default Scaffold

View File

@@ -121,7 +121,7 @@ export function handlebarsParse(
return Buffer.from(outputContents)
} catch (e) {
log(config, LogLevel.debug, e)
log(config, LogLevel.info, "Couldn't parse file with handlebars, returning original content")
log(config, LogLevel.warning, "Couldn't parse file with handlebars, returning original content")
return Buffer.from(templateBuffer)
}
}

View File

@@ -5,8 +5,6 @@
* See [readme](README.md)
*/
import path from "node:path"
import os from "node:os"
import { handleErr, resolve } from "./utils"
import {
isDir,
@@ -128,12 +126,10 @@ Scaffold.fromConfig = async function (
subdir: false,
quiet: false,
config: pathOrUrl,
version: false,
...config,
}
const tmpPath = path.resolve(os.tmpdir(), `scaffold-config-${Date.now()}`)
const _overrides = resolve(overrides, _cmdConfig)
const _config = await parseConfigFile(_cmdConfig, tmpPath)
const _config = await parseConfigFile(_cmdConfig)
return Scaffold({ ..._config, ..._overrides })
}

View File

@@ -257,18 +257,6 @@ export type DefaultHelpers = CaseHelpers | DateHelpers
*/
export type Helper = HelperDelegate
/**
* The amount of information to log when generating scaffold.
* When not `none`, the selected level will be the lowest level included.
*
* For example, level `info` will include `info`, `warning` and `error`, but not `debug`; and `warning` will only
* show `warning` and `error`, but not `info` or `debug`.
*
* @default `info`
*
* @category Logging (const)
*/
export const LogLevel = {
/** Silent output */
none: "none",
@@ -288,14 +276,17 @@ export const LogLevel = {
/**
* The amount of information to log when generating scaffold.
* When not `none`, the selected level will be the lowest level included.
* When not `None`, the selected level will be the lowest level included.
*
* For example, level `info` will include `info`, `warning` and `error`, but not `debug`; and `warning` will only
* show `warning` and `error`, but not `info` or `debug`.
* For example, level `Info` (2) will include `Info`, `Warning` and `Error`, but not `Debug`; and `Warning` will only
* show `Warning` and `Error`.
*
* @default `info`
* You may use either the number or the name of the level.
* For example, `2` or `info` are both valid.
*
* @category Logging (type)
* @default `2 (info)`
*
* @category Logging
*/
export type LogLevel = (typeof LogLevel)[keyof typeof LogLevel]
@@ -333,7 +324,7 @@ export type FileResponse<T> = T | FileResponseHandler<T>
* The Scaffold config for CLI
* Contains less and more specific options than {@link ScaffoldConfig}
*/
export type ScaffoldCmdConfig = {
export interface ScaffoldCmdConfig {
/** The name of the scaffold template to use. */
name: string
/** The templates to use for generation */
@@ -366,8 +357,6 @@ export type ScaffoldCmdConfig = {
key?: string
/** The git repository to use to fetch the config file */
git?: string
/** Display version */
version: boolean
}
/**
@@ -380,19 +369,14 @@ export type ScaffoldCmdConfig = {
* When no template key is provided to the scaffold command, the "default" template is used.
*
* @see {@link ScaffoldConfig}
*
* @category Config
*/
export type ScaffoldConfigMap = Record<string, ScaffoldConfig>
/**
* The scaffold config file is either:
/** The scaffold config file is either:
* - A {@link ScaffoldConfigMap} object
* - A function that returns a {@link ScaffoldConfigMap} object
* - A promise that resolves to a {@link ScaffoldConfigMap} object
* - A function that returns a promise that resolves to a {@link ScaffoldConfigMap} object
*
* @category Config
*/
export type ScaffoldConfigFile = AsyncResolver<ScaffoldCmdConfig, ScaffoldConfigMap>
@@ -409,7 +393,7 @@ export type LogConfig = Pick<ScaffoldConfig, "logLevel">
export type ConfigLoadConfig = LogConfig & Pick<ScaffoldCmdConfig, "config">
/** @internal */
export type RemoteConfigLoadConfig = LogConfig & Pick<ScaffoldCmdConfig, "config" | "git"> & { tmpPath: string }
export type RemoteConfigLoadConfig = LogConfig & Pick<ScaffoldCmdConfig, "config" | "git">
/** @internal */
export type MinimalConfig = Pick<ScaffoldCmdConfig, "name" | "key">

View File

@@ -6,7 +6,7 @@ import * as config from "../src/config"
import { resolve } from "../src/utils"
// @ts-ignore
import * as configFile from "../scaffold.config"
import { findConfigFile } from "../src/config"
import { findConfigFile } from "../src/git"
jest.mock("../src/git", () => {
return {
@@ -30,7 +30,6 @@ const blankCliConf: ScaffoldCmdConfig = {
subdir: false,
dryRun: false,
quiet: false,
version: false,
}
const blankConfig: ScaffoldCmdConfig = {
@@ -69,37 +68,25 @@ describe("config", () => {
describe("parseConfigFile", () => {
test("normal config does not change", async () => {
expect(
await parseConfigFile(
{
...blankCliConf,
name: "-",
},
`/tmp/scaffold-config-${Date.now()}`,
),
).toEqual({ ...blankCliConf, name: "-" })
await parseConfigFile({
...blankCliConf,
}),
).toEqual(blankCliConf)
})
describe("appendData", () => {
test("appends", async () => {
const result = await parseConfigFile(
{
...blankCliConf,
name: "-",
appendData: { key: "value" },
},
`/tmp/scaffold-config-${Date.now()}`,
)
const result = await parseConfigFile({
...blankCliConf,
appendData: { key: "value" },
})
expect(result?.data?.key).toEqual("value")
})
test("overwrites existing value", async () => {
const result = await parseConfigFile(
{
...blankCliConf,
name: "-",
data: { num: "123" },
appendData: { num: "1234" },
},
`/tmp/scaffold-config-${Date.now()}`,
)
const result = await parseConfigFile({
...blankCliConf,
data: { num: "123" },
appendData: { num: "1234" },
})
expect(result?.data?.num).toEqual("1234")
})
})
@@ -110,7 +97,6 @@ describe("config", () => {
const resultFn = await config.getRemoteConfig({
git: "https://github.com/chenasraf/simple-scaffold.git",
logLevel: LogLevel.none,
tmpPath: `/tmp/scaffold-config-${Date.now()}`,
})
const result = await resolve(resultFn, blankCliConf)
expect(result).toEqual(blankCliConf)