mirror of
https://github.com/chenasraf/simple-scaffold.git
synced 2026-05-18 01:29:09 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8834e49085 | |||
| c797893eb5 | |||
| 5b5a1fa9a4 | |||
| f5ed38ad95 | |||
| 6f15f3db14 |
12
.github/workflows/release.yml
vendored
12
.github/workflows/release.yml
vendored
@@ -22,7 +22,7 @@ jobs:
|
||||
- uses: pnpm/action-setup@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
node-version: 22
|
||||
cache: pnpm
|
||||
- run: pnpm install --frozen-lockfile
|
||||
- run: pnpm test
|
||||
@@ -35,7 +35,7 @@ jobs:
|
||||
- uses: pnpm/action-setup@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
node-version: 22
|
||||
cache: pnpm
|
||||
- run: pnpm install --frozen-lockfile
|
||||
- run: pnpm build
|
||||
@@ -73,10 +73,12 @@ jobs:
|
||||
node-version: 22
|
||||
cache: pnpm
|
||||
registry-url: "https://registry.npmjs.org"
|
||||
- run: npm --version
|
||||
- run: |
|
||||
echo "node: $(node --version)"
|
||||
echo "npm: $(npm --version)"
|
||||
- run: pnpm install --frozen-lockfile
|
||||
- run: pnpm build
|
||||
- run: cd dist && npm publish --provenance --access public
|
||||
- run: npm publish ./dist --provenance
|
||||
|
||||
docs:
|
||||
name: Deploy Documentation
|
||||
@@ -88,7 +90,7 @@ jobs:
|
||||
- uses: pnpm/action-setup@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
node-version: 22
|
||||
cache: pnpm
|
||||
- run: pnpm install --frozen-lockfile
|
||||
- run: cd docs && pnpm install --frozen-lockfile
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# Change Log
|
||||
|
||||
## [3.1.1](https://github.com/chenasraf/simple-scaffold/compare/v3.1.0...v3.1.1) (2026-03-26)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **deps:** update dependencies ([f5ed38a](https://github.com/chenasraf/simple-scaffold/commit/f5ed38ad950e3738b173cd39baf2acc9e35bf8de))
|
||||
|
||||
## [3.1.0](https://github.com/chenasraf/simple-scaffold/compare/v3.0.0...v3.1.0) (2026-03-23)
|
||||
|
||||
|
||||
|
||||
374
README.md
374
README.md
@@ -28,95 +28,144 @@ of files you're generating.
|
||||
|
||||
---
|
||||
|
||||
## Documentation
|
||||
> **Full documentation is available at
|
||||
> [chenasraf.github.io/simple-scaffold](https://chenasraf.github.io/simple-scaffold)** — including
|
||||
> detailed guides on [CLI usage](https://chenasraf.github.io/simple-scaffold/docs/usage/cli),
|
||||
> [Node.js API](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),
|
||||
> [examples](https://chenasraf.github.io/simple-scaffold/docs/usage/examples), and
|
||||
> [migration from v1/v2](https://chenasraf.github.io/simple-scaffold/docs/usage/migration).
|
||||
|
||||
See full documentation [here](https://chenasraf.github.io/simple-scaffold).
|
||||
## Table of Contents
|
||||
|
||||
- [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)
|
||||
- [Getting Started](#getting-started)
|
||||
- [Configuration Files](#configuration-files)
|
||||
- [Templates](#templates)
|
||||
- [Interactive Mode & Inputs](#interactive-mode--inputs)
|
||||
- [Remote Templates](#remote-templates)
|
||||
- [CLI Reference](#cli-reference)
|
||||
- [Node.js API](#nodejs-api)
|
||||
- [Built-in Helpers](#built-in-helpers)
|
||||
- [Contributing](#contributing)
|
||||
|
||||
## Getting Started
|
||||
|
||||
### Quick Start
|
||||
### Install
|
||||
|
||||
The fastest way to get started is to run `init` in your project directory:
|
||||
```sh
|
||||
npm install -D simple-scaffold
|
||||
# or use directly with npx
|
||||
npx simple-scaffold
|
||||
```
|
||||
|
||||
### Initialize a Project
|
||||
|
||||
Run `init` to create a config file and an example template:
|
||||
|
||||
```sh
|
||||
npx simple-scaffold init
|
||||
```
|
||||
|
||||
This creates a `scaffold.config.js` and an example template in `templates/default/`. Then generate
|
||||
files with:
|
||||
This creates `scaffold.config.js` and `templates/default/{{name}}.md`. Now generate files:
|
||||
|
||||
```sh
|
||||
npx simple-scaffold MyProject
|
||||
```
|
||||
|
||||
### Cheat Sheet
|
||||
### One-off Usage (No Config)
|
||||
|
||||
A quick rundown of common usage scenarios:
|
||||
|
||||
- Remote template config file on GitHub:
|
||||
|
||||
```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:
|
||||
Generate files from a template directory without a config file:
|
||||
|
||||
```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
|
||||
npx simple-scaffold -t templates/component -o src/components MyComponent
|
||||
```
|
||||
|
||||
By default, the template name is set to `default` when the `--key` option is not provided.
|
||||
## Configuration Files
|
||||
|
||||
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).
|
||||
Config files let you define reusable scaffold definitions. Simple Scaffold **auto-detects** config
|
||||
files in the current directory — no `--config` flag needed.
|
||||
|
||||
### Interactive Mode
|
||||
It searches for these files in order:
|
||||
|
||||
When running in a terminal, Simple Scaffold will interactively prompt for any missing required
|
||||
values — name, output directory, template paths, and template key (if multiple are available).
|
||||
`scaffold.config.{mjs,cjs,js,json}`, `scaffold.{mjs,cjs,js,json}`, `.scaffold.{mjs,cjs,js,json}`
|
||||
|
||||
Config files can also define **inputs** — custom fields that are prompted interactively and become
|
||||
template data:
|
||||
### Example
|
||||
|
||||
```js
|
||||
// scaffold.config.js
|
||||
module.exports = {
|
||||
component: {
|
||||
templates: ["templates/component"],
|
||||
output: "src/components",
|
||||
},
|
||||
page: {
|
||||
templates: ["templates/page"],
|
||||
output: "src/pages",
|
||||
subdir: true,
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
Then run:
|
||||
|
||||
```sh
|
||||
npx simple-scaffold -k component MyComponent
|
||||
npx simple-scaffold -k page Dashboard
|
||||
```
|
||||
|
||||
Use the key `default` to skip the `-k` flag entirely.
|
||||
|
||||
### Listing Available Templates
|
||||
|
||||
```sh
|
||||
npx simple-scaffold list
|
||||
npx simple-scaffold list -c path/to/config.js
|
||||
```
|
||||
|
||||
## Templates
|
||||
|
||||
Templates are regular files in a directory. Both **file names** and **file contents** support
|
||||
Handlebars syntax. Simple Scaffold preserves the directory structure of your template folder.
|
||||
|
||||
### Example Template
|
||||
|
||||
`templates/component/{{pascalCase name}}.tsx`
|
||||
|
||||
```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>
|
||||
)
|
||||
}
|
||||
```
|
||||
|
||||
Running `npx simple-scaffold -t templates/component -o src/components PageWrapper` produces
|
||||
`src/components/PageWrapper.tsx` with all tokens replaced.
|
||||
|
||||
### Glob Patterns & Exclusions
|
||||
|
||||
Template paths support globs and negation:
|
||||
|
||||
```js
|
||||
{
|
||||
templates: ["templates/component/**", "!templates/component/README.md"]
|
||||
}
|
||||
```
|
||||
|
||||
### .scaffoldignore
|
||||
|
||||
Place a `.scaffoldignore` file in your template directory to exclude files. It works like
|
||||
`.gitignore` — one pattern per line, `#` for comments.
|
||||
|
||||
## Interactive Mode & Inputs
|
||||
|
||||
When running in a terminal, Simple Scaffold prompts for any missing required values (name, output,
|
||||
template key). Config files can also define **inputs** — custom fields that are prompted
|
||||
interactively:
|
||||
|
||||
```js
|
||||
module.exports = {
|
||||
@@ -124,103 +173,150 @@ module.exports = {
|
||||
templates: ["templates/component"],
|
||||
output: "src/components",
|
||||
inputs: {
|
||||
author: { message: "Author name", required: true },
|
||||
license: { message: "License", default: "MIT" },
|
||||
author: { type: "text", message: "Author name", required: true },
|
||||
license: { type: "select", message: "License", options: ["MIT", "Apache-2.0", "GPL-3.0"] },
|
||||
isPublic: { type: "confirm", message: "Public package?" },
|
||||
priority: { type: "number", message: "Priority level", default: 1 },
|
||||
},
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
Inputs can be pre-provided via `--data` or `-D` to skip the prompt:
|
||||
**Input types:** `text` (default), `select`, `confirm`, `number`
|
||||
|
||||
Pre-fill inputs from the command line to skip prompts:
|
||||
|
||||
```sh
|
||||
npx simple-scaffold -c scaffold.config.js -k component -D author=John MyComponent
|
||||
npx simple-scaffold -k component -D author=John -D license=MIT MyComponent
|
||||
```
|
||||
|
||||
### Configuration Files
|
||||
## Remote Templates
|
||||
|
||||
You can use a config file to more easily maintain all your scaffold definitions. Simple Scaffold
|
||||
**auto-detects** config files in the current directory — no `--config` flag needed.
|
||||
Use templates from any Git repository:
|
||||
|
||||
It searches for these files in order: `scaffold.config.{mjs,cjs,js,json}`,
|
||||
`scaffold.{mjs,cjs,js,json}`, `.scaffold.{mjs,cjs,js,json}`.
|
||||
```sh
|
||||
# GitHub shorthand
|
||||
npx simple-scaffold -g username/repo -k component MyComponent
|
||||
|
||||
`scaffold.config.js`
|
||||
# Full Git URL (GitLab, Bitbucket, etc.)
|
||||
npx simple-scaffold -g https://gitlab.com/user/repo.git -k component MyComponent
|
||||
```
|
||||
|
||||
The repository is cloned to a temporary directory, used, and cleaned up automatically.
|
||||
|
||||
## CLI Reference
|
||||
|
||||
### Commands
|
||||
|
||||
| Command | Description |
|
||||
| ------------- | ---------------------------------------- |
|
||||
| `[name]` | Generate files from a template (default) |
|
||||
| `init` | Create config file and example template |
|
||||
| `list` / `ls` | List available template keys in a config |
|
||||
|
||||
### Options
|
||||
|
||||
| Flag | Short | Description | Default |
|
||||
| ------------------------------ | --------- | ---------------------------------------------------- | ----------- |
|
||||
| `--config` | `-c` | Path to config file or directory | auto-detect |
|
||||
| `--git` | `-g` | Git URL or GitHub shorthand | |
|
||||
| `--key` | `-k` | Template key from config | `default` |
|
||||
| `--output` | `-o` | Output directory | |
|
||||
| `--templates` | `-t` | Template file paths or globs | |
|
||||
| `--data` | `-d` | Custom JSON data | |
|
||||
| `--append-data` | `-D` | Key-value data (`key=string`, `key:=raw`) | |
|
||||
| `--subdir`/`--no-subdir` | `-s`/`-S` | Create parent directory with input name | `false` |
|
||||
| `--subdir-helper` | `-H` | Helper to transform subdir name | |
|
||||
| `--overwrite`/`--no-overwrite` | `-w`/`-W` | Overwrite existing files | `false` |
|
||||
| `--dry-run` | `-dr` | Preview output without writing files | `false` |
|
||||
| `--before-write` | `-B` | Script to run before each file is written | |
|
||||
| `--after-scaffold` | `-A` | Shell command to run after scaffolding | |
|
||||
| `--quiet` | `-q` | Suppress output | |
|
||||
| `--log-level` | `-l` | Log level (`none`, `debug`, `info`, `warn`, `error`) | `info` |
|
||||
| `--version` | `-v` | Show version | |
|
||||
| `--help` | `-h` | Show help | |
|
||||
|
||||
## Node.js API
|
||||
|
||||
```js
|
||||
import Scaffold from "simple-scaffold"
|
||||
|
||||
// Basic usage
|
||||
const scaffold = new Scaffold({
|
||||
name: "MyComponent",
|
||||
templates: ["templates/component"],
|
||||
output: "src/components",
|
||||
})
|
||||
await scaffold.run()
|
||||
|
||||
// Load from config file
|
||||
const scaffold = await Scaffold.fromConfig("scaffold.config.js", {
|
||||
key: "component",
|
||||
name: "MyComponent",
|
||||
})
|
||||
await scaffold.run()
|
||||
```
|
||||
|
||||
### Config Options
|
||||
|
||||
| Option | Type | Description |
|
||||
| --------------- | -------------------------- | ------------------------------------- |
|
||||
| `name` | `string` | Name for generated files (required) |
|
||||
| `templates` | `string[]` | Template paths or globs (required) |
|
||||
| `output` | `string \| Function` | Output directory or per-file function |
|
||||
| `data` | `Record<string, unknown>` | Custom template data |
|
||||
| `inputs` | `Record<string, Input>` | Interactive input definitions |
|
||||
| `helpers` | `Record<string, Function>` | Custom Handlebars helpers |
|
||||
| `subdir` | `boolean` | Create parent directory with name |
|
||||
| `subdirHelper` | `string` | Helper for subdir name transformation |
|
||||
| `overwrite` | `boolean \| Function` | Overwrite existing files |
|
||||
| `dryRun` | `boolean` | Preview without writing |
|
||||
| `logLevel` | `string` | Log verbosity |
|
||||
| `beforeWrite` | `Function` | Async hook before each file write |
|
||||
| `afterScaffold` | `Function \| string` | Hook after all files are written |
|
||||
|
||||
## Built-in Helpers
|
||||
|
||||
All helpers work in both file names and file contents.
|
||||
|
||||
### Case Helpers
|
||||
|
||||
| Helper | Example Input | Output |
|
||||
| ------------ | ------------- | --------- |
|
||||
| `camelCase` | `my name` | `myName` |
|
||||
| `pascalCase` | `my name` | `MyName` |
|
||||
| `snakeCase` | `my name` | `my_name` |
|
||||
| `kebabCase` | `my name` | `my-name` |
|
||||
| `hyphenCase` | `my name` | `my-name` |
|
||||
| `startCase` | `my name` | `My Name` |
|
||||
| `upperCase` | `my name` | `MY NAME` |
|
||||
| `lowerCase` | `My Name` | `my name` |
|
||||
|
||||
### Date Helpers
|
||||
|
||||
```handlebars
|
||||
{{now "yyyy-MM-dd"}}
|
||||
{{now "yyyy-MM-dd HH:mm" -1 "hours"}}
|
||||
{{date myDateVar "yyyy-MM-dd"}}
|
||||
{{date "2077-01-01T00:00:00Z" "yyyy-MM-dd" 7 "days"}}
|
||||
```
|
||||
|
||||
### Custom Helpers
|
||||
|
||||
Add your own via config:
|
||||
|
||||
```js
|
||||
module.exports = {
|
||||
// use "default" to avoid needing to specify key
|
||||
// in this case the key is "component"
|
||||
component: {
|
||||
templates: ["templates/component"],
|
||||
output: "src/components",
|
||||
data: {
|
||||
// ...
|
||||
helpers: {
|
||||
shout: (str) => str.toUpperCase() + "!!!",
|
||||
},
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
Then just run from the same directory:
|
||||
|
||||
```sh
|
||||
$ npx simple-scaffold PageWrapper
|
||||
# or explicitly: npx simple-scaffold -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.
|
||||
|
||||
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).
|
||||
|
||||
### Templates Structure
|
||||
|
||||
Templates are **any file** in the a directory given to `--templates`.
|
||||
|
||||
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/).
|
||||
|
||||
`templates/component/{{ pascalName name }}.tsx`
|
||||
|
||||
```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:
|
||||
|
||||
```sh
|
||||
# generate single component
|
||||
$ npx simple-scaffold \
|
||||
-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>
|
||||
)
|
||||
}
|
||||
```
|
||||
|
||||
## Contributing
|
||||
|
||||
I am developing this package on my free time, so any support, whether code, issues, or just stars is
|
||||
@@ -231,7 +327,7 @@ just a small amount to help sustain this project, I would be very very thankful!
|
||||
<img
|
||||
height='36'
|
||||
src='https://cdn.ko-fi.com/cdn/kofi1.png?v=3'
|
||||
alt='Buy Me a Coffee at ko-fi.com'
|
||||
alt='Buy Me a Coffee at ko-fi.com'
|
||||
/>
|
||||
</a>
|
||||
|
||||
|
||||
@@ -1,31 +1,40 @@
|
||||
---
|
||||
title: Template Files
|
||||
title: Templates
|
||||
---
|
||||
|
||||
# Preparing template files
|
||||
# Templates
|
||||
|
||||
Put your template files anywhere, and fill them with tokens for replacement.
|
||||
Templates are regular files in a directory. Both **file names** and **file contents** support
|
||||
[Handlebars.js](https://handlebarsjs.com/) syntax for token replacement.
|
||||
|
||||
Each template (not file) in the config array is parsed individually, and copied to the output
|
||||
directory. If a single template path contains multiple files (e.g. if you use a folder path or a
|
||||
glob pattern), the first directory up the tree of that template will become the base inside the
|
||||
defined output path for that template, while copying files recursively and maintaining their
|
||||
relative structure.
|
||||
## How Templates Are Resolved
|
||||
|
||||
Examples:
|
||||
Each path in the `templates` array is resolved individually. If a path points to a directory or glob
|
||||
pattern containing multiple files, the first directory up the tree becomes the base path — files are
|
||||
then copied recursively into `output`, preserving their relative structure.
|
||||
|
||||
> In the following examples, the config `name` is `AppName`, and the config `output` is `src`.
|
||||
> In the examples below, `name` is `AppName` and `output` is `src`.
|
||||
|
||||
| Input template | Files in template | Output path(s) |
|
||||
| Template path | Files found | Output |
|
||||
| ----------------------------- | ------------------------------------------------------ | ------------------------------------------------------------ |
|
||||
| `./templates/{{ name }}.txt` | `./templates/{{ name }}.txt` | `src/AppName.txt` |
|
||||
| `./templates/directory` | `outer/{{name}}.txt`,<br />`outer2/inner/{{name}}.txt` | `src/outer/AppName.txt`,<br />`src/outer2/inner/AppName.txt` |
|
||||
| `./templates/others/**/*.txt` | `outer/{{name}}.jpg`,<br />`outer2/inner/{{name}}.txt` | `src/outer2/inner/AppName.txt` |
|
||||
|
||||
## Ignoring files
|
||||
### Glob Patterns & Exclusions
|
||||
|
||||
You can create a `.scaffoldignore` file in your template directory to exclude files from being
|
||||
copied to the output. It works like `.gitignore` — one pattern per line, comments with `#`.
|
||||
Template paths support glob patterns and negation with `!`:
|
||||
|
||||
```js
|
||||
{
|
||||
templates: ["templates/component/**", "!templates/component/README.md"]
|
||||
}
|
||||
```
|
||||
|
||||
## Ignoring Files
|
||||
|
||||
Place a `.scaffoldignore` file in your template directory to exclude files. It works like
|
||||
`.gitignore` — one pattern per line, `#` for comments.
|
||||
|
||||
```text
|
||||
# .scaffoldignore
|
||||
@@ -38,120 +47,88 @@ dist/**
|
||||
The `.scaffoldignore` file itself is never copied to the output.
|
||||
|
||||
Patterns are matched against both the file's basename and its path relative to the template
|
||||
directory, so `README.md` will match at any depth, while `dist/**` only matches a `dist` directory
|
||||
at the template root.
|
||||
directory, so `README.md` matches at any depth while `dist/**` only matches a `dist` directory at
|
||||
the template root.
|
||||
|
||||
## Variable/token replacement
|
||||
## Token Replacement
|
||||
|
||||
Scaffolding will replace `{{ varName }}` in both the file name and its contents and put the
|
||||
transformed files in the output directory.
|
||||
Handlebars expressions like `{{ name }}` are replaced in both file names and file contents. The
|
||||
`name` variable is always available — it's the name you pass when running the scaffold.
|
||||
|
||||
The data available for the template parser is the data you pass to the `data` config option (or
|
||||
`--data` argument in CLI).
|
||||
|
||||
For example, using the following command:
|
||||
Any additional data from `--data`, `-D`, `data` config, or [inputs](configuration_files#inputs) is
|
||||
also available.
|
||||
|
||||
```bash
|
||||
npx simple-scaffold@latest \
|
||||
--templates templates/components/{{name}}.jsx \
|
||||
--output src/components \
|
||||
--create-sub-folder true \
|
||||
npx simple-scaffold \
|
||||
-t templates/component/{{name}}.jsx \
|
||||
-o src/components \
|
||||
MyComponent
|
||||
```
|
||||
|
||||
Will output a file with the path:
|
||||
This produces `src/components/MyComponent.jsx`, with all tokens inside the file replaced as well.
|
||||
|
||||
```text
|
||||
<working_dir>/src/components/MyComponent.jsx
|
||||
```
|
||||
All standard Handlebars features work — `{{#if}}`, `{{#each}}`, `{{#with}}`, and more. See
|
||||
[Handlebars.js Language Features](https://handlebarsjs.com/guide/#language-features) for details.
|
||||
|
||||
The contents of the file will be transformed in a similar fashion.
|
||||
## Built-in Helpers
|
||||
|
||||
Your `data` will be pre-populated with the following:
|
||||
Simple Scaffold includes helpers you can use in templates and file names. Helpers can also be
|
||||
nested: `{{ pascalCase (snakeCase name) }}`.
|
||||
|
||||
- `{{name}}`: raw name of the component as you entered it
|
||||
### Case Helpers
|
||||
|
||||
> Simple-Scaffold uses [Handlebars.js](https://handlebarsjs.com/) for outputting the file contents.
|
||||
> Any `data` you add in the config will be available for use with their names wrapped in `{{` and
|
||||
> `}}`. Other Handlebars built-ins such as `each`, `if` and `with` are also supported, see
|
||||
> [Handlebars.js Language Features](https://handlebarsjs.com/guide/#language-features) for more
|
||||
> information.
|
||||
| Helper | Usage | `my name` becomes |
|
||||
| ------------ | ----------------------- | ----------------- |
|
||||
| _(none)_ | `{{ name }}` | `my name` |
|
||||
| `camelCase` | `{{ camelCase name }}` | `myName` |
|
||||
| `pascalCase` | `{{ pascalCase name }}` | `MyName` |
|
||||
| `snakeCase` | `{{ snakeCase name }}` | `my_name` |
|
||||
| `kebabCase` | `{{ kebabCase name }}` | `my-name` |
|
||||
| `hyphenCase` | `{{ hyphenCase name }}` | `my-name` |
|
||||
| `startCase` | `{{ startCase name }}` | `My Name` |
|
||||
| `upperCase` | `{{ upperCase name }}` | `MY NAME` |
|
||||
| `lowerCase` | `{{ lowerCase name }}` | `my name` |
|
||||
|
||||
## Helpers
|
||||
### Date Helpers
|
||||
|
||||
### Built-in Helpers
|
||||
Both `now` and `date` use [`date-fns`](https://date-fns.org/docs/format) format tokens.
|
||||
|
||||
Simple-Scaffold provides some built-in text transformation filters usable by Handlebars.
|
||||
| Helper | Example | Output |
|
||||
| -------------------- | ---------------------------------------------------------------- | ------------------- |
|
||||
| `now` | `{{ now "yyyy-MM-dd HH:mm" }}` | `2042-01-01 15:00` |
|
||||
| `now` (with offset) | `{{ now "yyyy-MM-dd HH:mm" -1 "hours" }}` | `2042-01-01 14:00` |
|
||||
| `date` | `{{ date "2042-01-01T15:00:00Z" "yyyy-MM-dd HH:mm" }}` | `2042-01-01 15:00` |
|
||||
| `date` (with offset) | `{{ date "2042-01-01T15:00:00Z" "yyyy-MM-dd HH:mm" -1 "days" }}` | `2041-12-31 15:00` |
|
||||
| `date` (from data) | `{{ date myCustomDate "yyyy-MM-dd HH:mm" }}` | _(depends on data)_ |
|
||||
|
||||
For example, you may use `{{ snakeCase name }}` inside a template file or filename, and it will
|
||||
replace `My Name` with `my_name` when producing the final value.
|
||||
|
||||
#### Capitalization Helpers
|
||||
|
||||
| Helper name | Example code | Example output |
|
||||
| ------------ | ----------------------- | -------------- |
|
||||
| [None] | `{{ name }}` | my name |
|
||||
| `camelCase` | `{{ camelCase name }}` | myName |
|
||||
| `snakeCase` | `{{ snakeCase name }}` | my_name |
|
||||
| `startCase` | `{{ startCase name }}` | My Name |
|
||||
| `kebabCase` | `{{ kebabCase name }}` | my-name |
|
||||
| `hyphenCase` | `{{ hyphenCase name }}` | my-name |
|
||||
| `pascalCase` | `{{ pascalCase name }}` | MyName |
|
||||
| `upperCase` | `{{ upperCase name }}` | MY NAME |
|
||||
| `lowerCase` | `{{ lowerCase name }}` | my name |
|
||||
|
||||
#### Date helpers
|
||||
|
||||
| Helper name | Description | Example code | Example output |
|
||||
| -------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ------------------ |
|
||||
| `now` | Current date with format | `{{ now "yyyy-MM-dd HH:mm" }}` | `2042-01-01 15:00` |
|
||||
| `now` (with offset) | Current date with format, and with offset | `{{ now "yyyy-MM-dd HH:mm" -1 "hours" }}` | `2042-01-01 14:00` |
|
||||
| `date` | Custom date with format | `{{ date "2042-01-01T15:00:00Z" "yyyy-MM-dd HH:mm" }}` | `2042-01-01 15:00` |
|
||||
| `date` (with offset) | Custom date with format, and with offset | `{{ date "2042-01-01T15:00:00Z" "yyyy-MM-dd HH:mm" -1 "days" }}` | `2041-31-12 15:00` |
|
||||
| `date` (with date from `--data`) | Custom date with format, with data from the `data` config option | `{{ date myCustomDate "yyyy-MM-dd HH:mm" }}` | `2042-01-01 12:00` |
|
||||
|
||||
Further details:
|
||||
|
||||
- We use [`date-fns`](https://date-fns.org/docs/) for parsing/manipulating the dates. If you want
|
||||
more information on the date tokens to use, refer to
|
||||
[their format documentation](https://date-fns.org/docs/format).
|
||||
|
||||
- The date helper format takes the following arguments:
|
||||
|
||||
```typescript
|
||||
(
|
||||
date: string,
|
||||
format: string,
|
||||
offsetAmount?: number,
|
||||
offsetType?: "years" | "months" | "weeks" | "days" | "hours" | "minutes" | "seconds"
|
||||
)
|
||||
```
|
||||
|
||||
- **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"
|
||||
)
|
||||
```
|
||||
|
||||
### Custom Helpers
|
||||
|
||||
You may also add your own custom helpers using the `helpers` options when using the JS API (rather
|
||||
than the CLI). The `helpers` option takes an object whose keys are helper names, and values are the
|
||||
transformation functions. For example, `upperCase` is implemented like so:
|
||||
**Signatures:**
|
||||
|
||||
```typescript
|
||||
config.helpers = {
|
||||
upperCase: (text) => text.toUpperCase(),
|
||||
now(format: string, offsetAmount?: number, offsetType?: "years" | "months" | "weeks" | "days" | "hours" | "minutes" | "seconds")
|
||||
|
||||
date(date: string, format: string, offsetAmount?: number, offsetType?: "years" | "months" | "weeks" | "days" | "hours" | "minutes" | "seconds")
|
||||
```
|
||||
|
||||
## Custom Helpers
|
||||
|
||||
You can register custom Handlebars helpers via the `helpers` config option:
|
||||
|
||||
```js
|
||||
module.exports = {
|
||||
component: {
|
||||
templates: ["templates/component"],
|
||||
output: "src/components",
|
||||
helpers: {
|
||||
shout: (text) => text.toUpperCase() + "!!!",
|
||||
},
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
All of the above helpers (built in and custom) will also be available to you when using
|
||||
`subdirHelper` (`--sub-dir-helper`/`-H`) as a possible value.
|
||||
Then use in templates: `{{ shout name }}`.
|
||||
|
||||
> To see more information on how helpers work and more features, see
|
||||
> [Handlebars.js docs](https://handlebarsjs.com/guide/#custom-helpers).
|
||||
All helpers (built-in and custom) are also available as values for `subdirHelper` (`--subdir-helper`
|
||||
/ `-H`).
|
||||
|
||||
For more on Handlebars helpers, see the
|
||||
[Handlebars.js docs](https://handlebarsjs.com/guide/#custom-helpers).
|
||||
|
||||
@@ -2,54 +2,137 @@
|
||||
title: Configuration Files
|
||||
---
|
||||
|
||||
If you want to have reusable configurations which are complex and don't fit into command lines
|
||||
easily, or just want to manage your templates easier, you can use configuration files to load your
|
||||
scaffolding configurations.
|
||||
# Configuration Files
|
||||
|
||||
## Creating config files
|
||||
Config files let you define reusable scaffold definitions — template paths, output directories,
|
||||
custom data, inputs, and hooks — all in one place.
|
||||
|
||||
Configuration files should be valid `.js`/`.mjs`/`.cjs`/`.json` files that contain valid Scaffold
|
||||
configurations.
|
||||
## Creating a Config File
|
||||
|
||||
Each file hold multiple scaffolds. Each scaffold is a key, and its value is the configuration. For
|
||||
example:
|
||||
The fastest way is to run `init`:
|
||||
|
||||
```sh
|
||||
npx simple-scaffold init
|
||||
```
|
||||
|
||||
This creates a `scaffold.config.js` and an example template in `templates/default/`. See
|
||||
[`init` command](cli#init) for options.
|
||||
|
||||
### Config Structure
|
||||
|
||||
A config file exports an object mapping **template keys** to scaffold configurations:
|
||||
|
||||
```js
|
||||
// scaffold.config.js
|
||||
module.exports = {
|
||||
component: {
|
||||
templates: ["templates/component"],
|
||||
output: "src/components",
|
||||
},
|
||||
page: {
|
||||
templates: ["templates/page"],
|
||||
output: "src/pages",
|
||||
subdir: true,
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
For the full configuration options, see
|
||||
[ScaffoldConfigFile](../api/type-aliases/ScaffoldConfigFile).
|
||||
For the full list of options, see [ScaffoldConfig](../api/interfaces/ScaffoldConfig) or the
|
||||
[Node.js API](node) page.
|
||||
|
||||
If you want to supply functions inside the configurations, you must use a `.js`/`.cjs`/`.mjs` file
|
||||
as JSON does not support non-primitives.
|
||||
### Dynamic Configs
|
||||
|
||||
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:
|
||||
JS config files can export a **function** that receives the CLI config and returns the scaffold map.
|
||||
This lets you pre-process arguments or add logic:
|
||||
|
||||
```js
|
||||
/** @type {import('simple-scaffold').ScaffoldConfigFile} */
|
||||
module.exports = (config) => {
|
||||
console.log("Config:", config)
|
||||
return {
|
||||
component: {
|
||||
templates: ["templates/component"],
|
||||
output: "src/components",
|
||||
},
|
||||
}
|
||||
module.exports = (config) => ({
|
||||
component: {
|
||||
templates: ["templates/component"],
|
||||
output: "src/components",
|
||||
data: { timestamp: Date.now() },
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
The function can also be `async`.
|
||||
|
||||
### Supported Formats
|
||||
|
||||
- `.js` (CommonJS)
|
||||
- `.cjs` (CommonJS, explicit)
|
||||
- `.mjs` (ESM)
|
||||
- `.json`
|
||||
|
||||
:::note The correct extension may depend on your `package.json` `"type"` field. Packages with
|
||||
`"type": "module"` may require `.mjs` or `.cjs` instead of `.js`. :::
|
||||
|
||||
## Using a Config File
|
||||
|
||||
### Auto-detection
|
||||
|
||||
Simple Scaffold automatically searches the current directory for a config file — no `--config` flag
|
||||
needed. The following names are tried in order:
|
||||
|
||||
1. `scaffold.config.{mjs,cjs,js,json}`
|
||||
2. `scaffold.{mjs,cjs,js,json}`
|
||||
3. `.scaffold.{mjs,cjs,js,json}`
|
||||
|
||||
```sh
|
||||
# Just run from the project root — config is found automatically
|
||||
npx simple-scaffold -k component MyComponent
|
||||
```
|
||||
|
||||
### Explicit Path
|
||||
|
||||
Use `--config` (`-c`) to point to a specific file or directory:
|
||||
|
||||
```sh
|
||||
npx simple-scaffold -c path/to/scaffold.config.js -k component MyComponent
|
||||
```
|
||||
|
||||
When a directory is given, the auto-detection order above is used within that directory.
|
||||
|
||||
### Default Template Key
|
||||
|
||||
If you don't provide `--key`, the `default` key is used:
|
||||
|
||||
```js
|
||||
module.exports = {
|
||||
default: {
|
||||
templates: ["templates/default"],
|
||||
output: "src",
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
### Template Inputs
|
||||
```sh
|
||||
# Uses the "default" key — no -k needed
|
||||
npx simple-scaffold MyProject
|
||||
```
|
||||
|
||||
You can define **inputs** in your config to prompt users for custom values when scaffolding. Each
|
||||
input becomes a template data variable:
|
||||
If multiple keys exist and no `--key` is provided, you'll be prompted to select one interactively.
|
||||
|
||||
### Providing a Default Name
|
||||
|
||||
If your template doesn't need a dynamic name (e.g. common config files), set `name` in the config:
|
||||
|
||||
```js
|
||||
module.exports = {
|
||||
eslint: {
|
||||
name: ".eslintrc",
|
||||
templates: ["templates/eslint"],
|
||||
output: ".",
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
The name can still be overridden with `--name` on the command line.
|
||||
|
||||
## Inputs
|
||||
|
||||
Inputs define custom fields that are prompted interactively and become template data variables:
|
||||
|
||||
```js
|
||||
module.exports = {
|
||||
@@ -70,146 +153,53 @@ module.exports = {
|
||||
}
|
||||
```
|
||||
|
||||
In your templates, use these as `{{ author }}`, `{{ license }}`, `{{ private }}`, `{{ port }}`.
|
||||
Use them in templates as `{{ author }}`, `{{ license }}`, `{{ private }}`, `{{ port }}`.
|
||||
|
||||
Supported input types: `text` (default), `select`, `confirm`, `number`. See
|
||||
[Template Inputs](cli#template-inputs) for the full reference.
|
||||
**Input types:**
|
||||
|
||||
- **Required** inputs are prompted interactively if not provided via `--data` or `-D`
|
||||
| Type | Description | Value type |
|
||||
| --------- | ------------------------------ | ---------- |
|
||||
| `text` | Free-form text input (default) | `string` |
|
||||
| `select` | Choose from a list of options | `string` |
|
||||
| `confirm` | Yes/no prompt | `boolean` |
|
||||
| `number` | Numeric input | `number` |
|
||||
|
||||
**Behavior:**
|
||||
|
||||
- **Required** inputs are prompted if not provided via `--data` or `-D`
|
||||
- **Select and confirm** inputs are always prompted unless pre-provided
|
||||
- **Optional** inputs with a `default` use that value silently if not provided
|
||||
- In non-interactive environments, only defaults are applied
|
||||
- **Optional** inputs with a `default` use that value silently
|
||||
- In non-interactive environments (CI, piped input), only defaults are applied
|
||||
|
||||
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
|
||||
|
||||
### Auto-detection
|
||||
|
||||
By default, Simple Scaffold automatically searches the current working directory for a config file.
|
||||
No `--config` flag is needed if your config file uses one of the standard names.
|
||||
|
||||
The following files are tried in order:
|
||||
|
||||
1. `scaffold.config.mjs`
|
||||
2. `scaffold.config.cjs`
|
||||
3. `scaffold.config.js`
|
||||
4. `scaffold.config.json`
|
||||
5. `scaffold.mjs`
|
||||
6. `scaffold.cjs`
|
||||
7. `scaffold.js`
|
||||
8. `scaffold.json`
|
||||
9. `.scaffold.mjs`
|
||||
10. `.scaffold.cjs`
|
||||
11. `.scaffold.js`
|
||||
12. `.scaffold.json`
|
||||
|
||||
If a config file is found, it is loaded automatically. If multiple templates are defined and no
|
||||
`--key` is provided, you'll be prompted to select one interactively.
|
||||
Pre-fill inputs from the CLI:
|
||||
|
||||
```sh
|
||||
# Just run from a directory containing scaffold.config.js — no flags needed
|
||||
simple-scaffold MyComponentName
|
||||
npx simple-scaffold -k component -D author=John -D license=MIT MyComponent
|
||||
```
|
||||
|
||||
### Explicit config path
|
||||
## Remote Templates (Git)
|
||||
|
||||
You can also provide a specific file or directory path using `--config` (or `-c`), optionally
|
||||
alongside `--key` or `-k`:
|
||||
|
||||
```sh
|
||||
simple-scaffold -c <file> -k <template_key>
|
||||
```
|
||||
|
||||
For example:
|
||||
|
||||
```sh
|
||||
simple-scaffold -c scaffold.json -k component MyComponentName
|
||||
```
|
||||
|
||||
When a directory is given, the same auto-detection order listed above is used to find a config file
|
||||
within that directory.
|
||||
|
||||
### Default template key
|
||||
|
||||
If you don't supply a template key (e.g. `component`), `default` will be used:
|
||||
|
||||
```js
|
||||
/** @type {import('simple-scaffold').ScaffoldConfigFile} */
|
||||
module.exports = {
|
||||
default: {
|
||||
// ...
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
```sh
|
||||
# will use 'default' template
|
||||
simple-scaffold -c scaffold.json MyComponentName
|
||||
```
|
||||
|
||||
If multiple keys exist and no key is specified, you'll be prompted to choose one interactively.
|
||||
|
||||
### Supported file types
|
||||
|
||||
Any importable file is supported, depending on your build process.
|
||||
|
||||
Common extensions:
|
||||
|
||||
- `.mjs`
|
||||
- `.cjs`
|
||||
- `.js`
|
||||
- `.json`
|
||||
|
||||
Note that you might need to find the correct extension of `.js`, `.cjs` or `.mjs` depending on your
|
||||
build process and your package type (for example, packages with `"type": "module"` in their
|
||||
`package.json` might be required to use `.mjs`.)
|
||||
|
||||
### Git/GitHub Templates
|
||||
|
||||
You may specify a git or GitHub url to use remote templates.
|
||||
|
||||
The command line option is `--git` or `-g`.
|
||||
|
||||
- You may specify a full git or HTTPS git URL, which will be tried
|
||||
- You may specify a git username and project if the project is on GitHub
|
||||
Load config files and templates from any Git repository:
|
||||
|
||||
```sh
|
||||
# GitHub shorthand
|
||||
simple-scaffold -g <username>/<project_name> [-c <filename>] [-k <template_key>]
|
||||
npx simple-scaffold -g username/repo -k component MyComponent
|
||||
|
||||
# Any git URL, git:// and https:// are supported
|
||||
simple-scaffold -g git://gitlab.com/<username>/<project_name> [-c <filename>] [-k <template_key>]
|
||||
simple-scaffold -g https://gitlab.com/<username>/<project_name>.git [-c <filename>] [-k <template_key>]
|
||||
# Full Git URL (GitLab, Bitbucket, etc.)
|
||||
npx simple-scaffold -g https://gitlab.com/user/repo.git -k component MyComponent
|
||||
```
|
||||
|
||||
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.
|
||||
When `--config` is omitted, the standard auto-detection order is used within the cloned repo. The
|
||||
repository is cloned to a temporary directory and cleaned up automatically.
|
||||
|
||||
**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.
|
||||
|
||||
Just use the `Scaffold.fromConfig` function:
|
||||
### From Node.js
|
||||
|
||||
```ts
|
||||
Scaffold.fromConfig(
|
||||
"scaffold.config.js", // file or HTTPS git URL
|
||||
{
|
||||
// name of the generated component
|
||||
name: "My Component",
|
||||
// key to load from the config
|
||||
key: "component",
|
||||
},
|
||||
{
|
||||
// other config overrides
|
||||
},
|
||||
import Scaffold from "simple-scaffold"
|
||||
|
||||
const scaffold = await Scaffold.fromConfig(
|
||||
"https://github.com/user/repo.git", // or a local file path
|
||||
{ name: "MyComponent", key: "component" },
|
||||
)
|
||||
await scaffold.run()
|
||||
```
|
||||
|
||||
@@ -1,243 +1,162 @@
|
||||
---
|
||||
title: CLI Usage
|
||||
title: CLI
|
||||
---
|
||||
|
||||
## Available flags
|
||||
# CLI
|
||||
|
||||
```text
|
||||
Usage: simple-scaffold [options]
|
||||
```sh
|
||||
npx simple-scaffold [options] [name]
|
||||
```
|
||||
|
||||
To see this and more information anytime, add the `-h` or `--help` flag to your call, e.g.
|
||||
`npx simple-scaffold@latest -h`.
|
||||
Use `--help` (`-h`) to see all available options at any time.
|
||||
|
||||
Options:
|
||||
## Commands
|
||||
|
||||
| Option/flag \| Alias | Description |
|
||||
| ------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `--name` \| `-n` | Name to be passed to the generated files. `{{name}}` and other data parameters inside contents and file names will be replaced accordingly. If omitted in an interactive terminal, you will be prompted. |
|
||||
| `--config` \| `-c` | Filename or directory to load config from. If omitted, the current directory is searched automatically for a config file (see [Auto-detection](configuration_files#auto-detection)). |
|
||||
| `--git` \| `-g` | Git URL or GitHub path to load a template from. |
|
||||
| `--key` \| `-k` | Key to load inside the config file. If omitted and multiple templates are available, you will be prompted to select one. |
|
||||
| `--output` \| `-o` | Path to output to. If `--subdir` is enabled, the subdir will be created inside this path. If omitted in an interactive terminal, you will be prompted. |
|
||||
| `--templates` \| `-t` | Template files to use as input. You may provide multiple files, each of which can be a relative or absolute path, or a glob pattern for multiple file matching easily. If omitted in an interactive terminal, you will be prompted for a comma-separated list. |
|
||||
| `--overwrite` \| `-w` \| `--no-overwrite` \| `-W` | Enable to override output files, even if they already exist. (default: false) |
|
||||
| `--data` \| `-d` | Add custom data to the templates. By default, only your app name is included. |
|
||||
| `--append-data` \| `-D` | Append additional custom data to the templates, which will overwrite `--data`, using an alternate syntax, which is easier to use with CLI: `-D key1=string -D key2:=raw` |
|
||||
| `--subdir` \| `-s` \| `--no-subdir` \| `-S` | Create a parent directory with the input name (and possibly `--subdir-helper` (default: false) |
|
||||
| `--subdir-helper` \| `-H` | Default helper to apply to subdir name when using `--subdir`. |
|
||||
| `--quiet` \| `-q` | Suppress output logs (Same as `--log-level none`)(default: false) |
|
||||
| `--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. (default: info) |
|
||||
| `--before-write` \| `-B` | Run a script before writing the files. This can be a command or a path to a file. A temporary file path will be passed to the given command and the command should return a string for the final output. |
|
||||
| `--after-scaffold` \| `-A` | Run a shell command after all files have been written. The command is executed in the output directory (e.g. `--after-scaffold 'npm install'`). |
|
||||
| `--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. (default: false) |
|
||||
| `--version` \| `-v` | Display version. |
|
||||
|
||||
### Interactive Mode
|
||||
|
||||
When running in a terminal (TTY), Simple Scaffold will prompt for any missing required values:
|
||||
|
||||
- **Name** — text input if `--name` is not provided
|
||||
- **Template key** — selectable list if `--key` is not provided and the config file has multiple
|
||||
templates
|
||||
- **Output directory** — text input if `--output` is not provided
|
||||
- **Template paths** — comma-separated text input if `--templates` is not provided
|
||||
|
||||
In non-interactive environments (CI, piped input), missing values will cause an error instead of
|
||||
prompting.
|
||||
|
||||
### Template Inputs
|
||||
|
||||
Config files can define **inputs** — custom fields that are prompted interactively and injected as
|
||||
template data. This is useful for templates that need user-specific values like author name,
|
||||
license, or description.
|
||||
|
||||
```js
|
||||
module.exports = {
|
||||
component: {
|
||||
templates: ["templates/component"],
|
||||
output: "src/components",
|
||||
inputs: {
|
||||
author: { message: "Author name", required: true },
|
||||
license: {
|
||||
type: "select",
|
||||
message: "License",
|
||||
options: ["MIT", "Apache-2.0", "GPL-3.0"],
|
||||
},
|
||||
private: { type: "confirm", message: "Private package?", default: false },
|
||||
port: { type: "number", message: "Dev server port", default: 3000 },
|
||||
description: { message: "Description" },
|
||||
},
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
Each input becomes available as a Handlebars variable in your templates (e.g., `{{ author }}`,
|
||||
`{{ license }}`).
|
||||
|
||||
**Input types:**
|
||||
|
||||
| Type | Description | Value type |
|
||||
| --------- | ------------------------------ | ---------- |
|
||||
| `text` | Free-form text input (default) | `string` |
|
||||
| `select` | Choose from a list of options | `string` |
|
||||
| `confirm` | Yes/no prompt | `boolean` |
|
||||
| `number` | Numeric input | `number` |
|
||||
|
||||
- **Required inputs** without a value will be prompted interactively
|
||||
- **Select and confirm** inputs are always prompted (unless pre-provided)
|
||||
- **Optional text/number inputs** with a `default` will use that value silently
|
||||
- All inputs can be pre-provided via `--data` or `-D` to skip the prompt:
|
||||
|
||||
```shell
|
||||
simple-scaffold -c scaffold.config.js -k component -D author=John -D license=Apache-2.0 MyComponent
|
||||
```
|
||||
|
||||
### Before Write option
|
||||
|
||||
This option allows you to preprocess a file before it is being written, such as running a formatter,
|
||||
linter or other commands.
|
||||
|
||||
To use this option, pass it the command you would like to run. The following tokens will be replaced
|
||||
in your string:
|
||||
|
||||
- `{{path}}` - the temporary file path for you to read from
|
||||
- `{{rawpath}}` - a different file path containing the raw file contents **before** they were
|
||||
handled by Handlebars.js.
|
||||
|
||||
If none of these tokens are found, the regular (non-raw) path will be appended to the end of the
|
||||
command.
|
||||
|
||||
```shell
|
||||
simple-scaffold -c . --before-write prettier
|
||||
# command: prettier /tmp/somefile
|
||||
|
||||
simple-scaffold -c . --before-write 'cat {{path}} | my-linter'
|
||||
# command: cat /tmp/somefile | my-linter
|
||||
```
|
||||
|
||||
The command should return the string to write to the file through standard output (stdout), and not
|
||||
re-write the tmp file as it is not used for writing. Returning an empty string (after trimming) will
|
||||
discard the result and write the original file contents.
|
||||
|
||||
See
|
||||
[beforeWrite](https://chenasraf.github.io/simple-scaffold/docs/api/interfaces/ScaffoldConfig#beforewrite)
|
||||
Node.js API for more details. Instead of returning `undefined` to keep the default behavior, you can
|
||||
output `''` for the same effect.
|
||||
|
||||
### After Scaffold option
|
||||
|
||||
This option runs a shell command after all files have been written. The command is executed in the
|
||||
output directory, making it useful for post-scaffolding tasks like installing dependencies or
|
||||
initializing a git repo.
|
||||
|
||||
```shell
|
||||
simple-scaffold -c . --after-scaffold 'npm install'
|
||||
simple-scaffold -c . --after-scaffold 'git init && git add .'
|
||||
```
|
||||
|
||||
In a config file, you can use a function for more control:
|
||||
|
||||
```js
|
||||
module.exports = {
|
||||
default: {
|
||||
templates: ["templates/app"],
|
||||
output: ".",
|
||||
afterScaffold: async ({ config, files }) => {
|
||||
console.log(`Created ${files.length} files in ${config.output}`)
|
||||
// run any post-processing here
|
||||
},
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
The function receives a context with the resolved `config` and an array of `files` (absolute paths)
|
||||
that were written.
|
||||
|
||||
## Available Commands:
|
||||
|
||||
| Command \| Alias | Description |
|
||||
| ---------------- | ------------------------------------------------------------------------------------ |
|
||||
| `init` | Initialize a new scaffold config file and example template in the current directory. |
|
||||
| `list` \| `ls` | List all available templates for a given config. See `list -h` for more information. |
|
||||
| Command | Description |
|
||||
| ------------- | ----------------------------------------- |
|
||||
| _(default)_ | Generate files from a template |
|
||||
| `init` | Create a config file and example template |
|
||||
| `list` / `ls` | List available template keys in a config |
|
||||
|
||||
### `init`
|
||||
|
||||
Creates a scaffold config file and an example template directory to get you started quickly.
|
||||
Scaffolds a config file and example template directory to get you started:
|
||||
|
||||
```shell
|
||||
simple-scaffold init
|
||||
```sh
|
||||
npx simple-scaffold init
|
||||
npx simple-scaffold init --format mjs
|
||||
npx simple-scaffold init --dir packages/my-lib
|
||||
```
|
||||
|
||||
Options:
|
||||
| Option | Description |
|
||||
| ----------------- | ----------------------------------------------------------------- |
|
||||
| `--dir` / `-d` | Directory to create the config in (defaults to current directory) |
|
||||
| `--format` / `-f` | Config format: `js`, `mjs`, or `json` (prompts if omitted) |
|
||||
|
||||
| Option | Description |
|
||||
| ------------------ | -------------------------------------------------------------------- |
|
||||
| `--dir` \| `-d` | Directory to create the config in. Defaults to current directory. |
|
||||
| `--format` \| `-f` | Config format: `js`, `mjs`, or `json`. If omitted, you are prompted. |
|
||||
|
||||
The command creates:
|
||||
Creates:
|
||||
|
||||
- A config file (`scaffold.config.js` by default) with a `default` template key
|
||||
- A `templates/default/` directory with an example `{{name}}.md` template
|
||||
|
||||
Existing files are never overwritten.
|
||||
|
||||
## Examples:
|
||||
### `list`
|
||||
|
||||
> See
|
||||
> [Configuration Files](https://chenasraf.github.io/simple-scaffold/docs/usage/configuration_files)
|
||||
> for organizing multiple scaffold types into easy-to-maintain files
|
||||
Lists all template keys defined in a config file:
|
||||
|
||||
Usage with config file
|
||||
|
||||
```shell
|
||||
$ simple-scaffold -c scaffold.cmd.js -k component MyComponent
|
||||
```sh
|
||||
npx simple-scaffold list
|
||||
npx simple-scaffold list -c path/to/config.js
|
||||
npx simple-scaffold list -g username/repo
|
||||
```
|
||||
|
||||
Usage with GitHub config file
|
||||
## Options
|
||||
|
||||
```shell
|
||||
$ simple-scaffold -g chenasraf/simple-scaffold -k component MyComponent
|
||||
| Flag | Short | Description | Default |
|
||||
| -------------------------------- | --------- | ----------------------------------------------------- | --------------- |
|
||||
| `--name` | `-n` | Name for generated files (can also be positional arg) | |
|
||||
| `--config` | `-c` | Path to config file or directory | _(auto-detect)_ |
|
||||
| `--git` | `-g` | Git URL or GitHub shorthand (`user/repo`) | |
|
||||
| `--key` | `-k` | Template key from config | `default` |
|
||||
| `--output` | `-o` | Output directory | |
|
||||
| `--templates` | `-t` | Template paths or glob patterns (repeatable) | |
|
||||
| `--data` | `-d` | Custom data as JSON string | |
|
||||
| `--append-data` | `-D` | Key-value data (`key=string`, `key:=raw`), repeatable | |
|
||||
| `--subdir` / `--no-subdir` | `-s`/`-S` | Create parent directory with the input name | `false` |
|
||||
| `--subdir-helper` | `-H` | Helper to transform subdir name | |
|
||||
| `--overwrite` / `--no-overwrite` | `-w`/`-W` | Overwrite existing files | `false` |
|
||||
| `--dry-run` | `-dr` | Preview output without writing files | `false` |
|
||||
| `--before-write` | `-B` | Command to run before each file is written | |
|
||||
| `--after-scaffold` | `-A` | Shell command to run after all files are written | |
|
||||
| `--quiet` | `-q` | Suppress output (same as `--log-level none`) | |
|
||||
| `--log-level` | `-l` | Log level: `none`, `debug`, `info`, `warn`, `error` | `info` |
|
||||
| `--version` | `-v` | Show version | |
|
||||
| `--help` | `-h` | Show help | |
|
||||
|
||||
## Interactive Mode
|
||||
|
||||
When running in a terminal (TTY), Simple Scaffold prompts for any missing required values:
|
||||
|
||||
- **Name** — if `--name` is not provided
|
||||
- **Template key** — if `--key` is not provided and the config has multiple templates
|
||||
- **Output directory** — if `--output` is not provided
|
||||
- **Template paths** — if `--templates` is not provided (comma-separated)
|
||||
|
||||
[Inputs](configuration_files#inputs) defined in config files are also prompted interactively.
|
||||
|
||||
In non-interactive environments (CI, piped input), missing required values cause an error.
|
||||
|
||||
## Hooks
|
||||
|
||||
### Before Write
|
||||
|
||||
Runs a command before each file is written. The command receives a temporary file path and should
|
||||
output the final content to stdout.
|
||||
|
||||
```sh
|
||||
# Appends file path automatically
|
||||
npx simple-scaffold -c . --before-write prettier
|
||||
|
||||
# Use tokens for explicit control
|
||||
npx simple-scaffold -c . --before-write 'cat {{path}} | my-linter'
|
||||
```
|
||||
|
||||
Usage with https git URL (for non-GitHub)
|
||||
**Tokens:**
|
||||
|
||||
```shell
|
||||
$ simple-scaffold \
|
||||
-g https://example.com/user/template.git \
|
||||
-c scaffold.cmd.js \
|
||||
-k component \
|
||||
MyComponent
|
||||
- `{{path}}` — temporary file path with Handlebars-processed contents
|
||||
- `{{rawpath}}` — temporary file path with raw (unprocessed) contents
|
||||
|
||||
If no tokens are found, `{{path}}` is appended automatically. Returning an empty string (after
|
||||
trimming) discards the result and writes the original contents.
|
||||
|
||||
### After Scaffold
|
||||
|
||||
Runs a shell command after all files are written. The command executes in the output directory:
|
||||
|
||||
```sh
|
||||
npx simple-scaffold -c . --after-scaffold 'npm install'
|
||||
npx simple-scaffold -c . --after-scaffold 'git init && git add .'
|
||||
```
|
||||
|
||||
Full syntax with config path and template key (applicable to all above methods)
|
||||
See the [Node.js API](node#after-scaffold-hook) for the function-based equivalent.
|
||||
|
||||
```shell
|
||||
$ simple-scaffold -c scaffold.cmd.js -k component MyComponent
|
||||
## CLI Examples
|
||||
|
||||
```sh
|
||||
# Use auto-detected config, default key
|
||||
npx simple-scaffold MyProject
|
||||
|
||||
# Specify config and key
|
||||
npx simple-scaffold -c scaffold.config.js -k component MyComponent
|
||||
|
||||
# GitHub remote template
|
||||
npx simple-scaffold -g username/repo -k component MyComponent
|
||||
|
||||
# Full Git URL
|
||||
npx simple-scaffold -g https://gitlab.com/user/repo.git -k component MyComponent
|
||||
|
||||
# One-off (no config file)
|
||||
npx simple-scaffold -t templates/component -o src/components MyComponent
|
||||
|
||||
# With custom data
|
||||
npx simple-scaffold -k component -D author=John -D license:='"MIT"' MyComponent
|
||||
|
||||
# Dry run
|
||||
npx simple-scaffold -k component --dry-run MyComponent
|
||||
```
|
||||
|
||||
Excluded template key, assumes 'default' key
|
||||
|
||||
```shell
|
||||
$ simple-scaffold -c scaffold.cmd.js MyComponent
|
||||
```
|
||||
|
||||
Shortest syntax for GitHub, assumes file 'scaffold.cmd.js' and template key 'default'
|
||||
|
||||
```shell
|
||||
$ simple-scaffold -g chenasraf/simple-scaffold MyComponent
|
||||
```
|
||||
|
||||
You can also add this as a script in your `package.json`:
|
||||
### package.json Scripts
|
||||
|
||||
```json
|
||||
{
|
||||
"scripts": {
|
||||
"scaffold-cfg": "npx simple-scaffold -c scaffold.cmd.js -k component",
|
||||
"scaffold-gh": "npx simple-scaffold -g chenasraf/simple-scaffold -k component",
|
||||
"scaffold": "npx simple-scaffold@latest -t scaffolds/component/**/* -o src/components -d '{\"myProp\": \"propName\", \"myVal\": 123}'"
|
||||
"scaffold-component": "npx simple-scaffold -c scaffold.cmd.js -k"
|
||||
"scaffold": "simple-scaffold -k component",
|
||||
"scaffold:page": "simple-scaffold -k page"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```sh
|
||||
npm run scaffold -- MyComponent
|
||||
npm run scaffold:page -- Dashboard
|
||||
```
|
||||
|
||||
@@ -1,28 +1,54 @@
|
||||
---
|
||||
title: Node.js Usage
|
||||
title: Node.js API
|
||||
---
|
||||
|
||||
## Overview
|
||||
# Node.js API
|
||||
|
||||
You can build the scaffold yourself, if you want to create more complex arguments, scaffold groups,
|
||||
etc - simply pass a config object to the Scaffold function when you are ready to start.
|
||||
Use Simple Scaffold programmatically for more complex workflows, custom logic, or integration into
|
||||
build tools.
|
||||
|
||||
The config takes similar arguments to the command line. See the full
|
||||
[API documentation](https://chenasraf.github.io/simple-scaffold/docs/api/interfaces/ScaffoldConfig)
|
||||
for all configuration options and their behavior.
|
||||
## Basic Usage
|
||||
|
||||
```ts
|
||||
```typescript
|
||||
import Scaffold from "simple-scaffold"
|
||||
|
||||
const scaffold = new Scaffold({
|
||||
name: "MyComponent",
|
||||
templates: ["templates/component"],
|
||||
output: "src/components",
|
||||
})
|
||||
await scaffold.run()
|
||||
```
|
||||
|
||||
## Loading from a Config File
|
||||
|
||||
```typescript
|
||||
import Scaffold from "simple-scaffold"
|
||||
|
||||
const scaffold = await Scaffold.fromConfig(
|
||||
"scaffold.config.js", // local path or HTTPS Git URL
|
||||
{ name: "MyComponent", key: "component" },
|
||||
{
|
||||
/* optional config overrides */
|
||||
},
|
||||
)
|
||||
await scaffold.run()
|
||||
```
|
||||
|
||||
## Config Interface
|
||||
|
||||
```typescript
|
||||
interface ScaffoldConfig {
|
||||
name: string
|
||||
templates: string[]
|
||||
output: FileResponse<string>
|
||||
subdir?: boolean
|
||||
subdirHelper?: string
|
||||
data?: Record<string, unknown>
|
||||
overwrite?: FileResponse<boolean>
|
||||
logLevel?: LogLevel
|
||||
logLevel?: "none" | "debug" | "info" | "warn" | "error"
|
||||
dryRun?: boolean
|
||||
helpers?: Record<string, Helper>
|
||||
subdirHelper?: DefaultHelpers | string
|
||||
inputs?: Record<string, ScaffoldInput>
|
||||
beforeWrite?(
|
||||
content: Buffer,
|
||||
@@ -31,43 +57,56 @@ interface ScaffoldConfig {
|
||||
): string | Buffer | undefined | Promise<string | Buffer | undefined>
|
||||
afterScaffold?: AfterScaffoldHook
|
||||
}
|
||||
|
||||
interface ScaffoldInput {
|
||||
type?: "text" | "select" | "confirm" | "number"
|
||||
message?: string
|
||||
required?: boolean
|
||||
default?: string | boolean | number
|
||||
options?: (string | { name: string; value: string })[] // for type: "select"
|
||||
}
|
||||
|
||||
interface AfterScaffoldContext {
|
||||
config: ScaffoldConfig
|
||||
files: string[] // absolute paths of written files
|
||||
}
|
||||
|
||||
type AfterScaffoldHook = ((context: AfterScaffoldContext) => void | Promise<void>) | string
|
||||
```
|
||||
|
||||
### Before Write option
|
||||
For the full API reference, see [ScaffoldConfig](../api/interfaces/ScaffoldConfig).
|
||||
|
||||
This option allows you to preprocess a file before it is being written, such as running a formatter,
|
||||
linter or other commands.
|
||||
### Options
|
||||
|
||||
To use this option, you can run any async/blocking command, and return a string as the final output
|
||||
to be used as the file contents.
|
||||
| Option | Type | Description |
|
||||
| --------------- | ------------------------------- | ------------------------------------------------------------------------ |
|
||||
| `name` | `string` | Name for generated files _(required)_ |
|
||||
| `templates` | `string[]` | Template paths or globs; prefix with `!` to exclude _(required)_ |
|
||||
| `output` | `string \| Function` | Output directory, or a function for per-file control |
|
||||
| `data` | `Record<string, unknown>` | Custom data available in templates |
|
||||
| `inputs` | `Record<string, ScaffoldInput>` | Interactive input definitions (see [Inputs](configuration_files#inputs)) |
|
||||
| `helpers` | `Record<string, Function>` | Custom Handlebars helpers |
|
||||
| `subdir` | `boolean` | Create a parent directory with the input name (default: `false`) |
|
||||
| `subdirHelper` | `string` | Helper to transform the subdir name (e.g. `"pascalCase"`) |
|
||||
| `overwrite` | `boolean \| Function` | Overwrite existing files (default: `false`); function for per-file logic |
|
||||
| `dryRun` | `boolean` | Preview without writing files (default: `false`) |
|
||||
| `logLevel` | `string` | Log verbosity (default: `"info"`) |
|
||||
| `beforeWrite` | `Function` | Async hook before each file is written |
|
||||
| `afterScaffold` | `Function \| string` | Hook after all files are written |
|
||||
|
||||
Returning `undefined` will keep the file contents as-is, after normal Handlebars.js procesing by
|
||||
Simple Scaffold.
|
||||
## Hooks
|
||||
|
||||
### After Scaffold hook
|
||||
### Before Write
|
||||
|
||||
The `afterScaffold` option runs after all files have been written. It receives a context object with
|
||||
the resolved config and the list of files that were created.
|
||||
Runs before each file is written. Return a `string` or `Buffer` to replace the file contents, or
|
||||
`undefined` to keep the default (Handlebars-processed) output.
|
||||
|
||||
```typescript
|
||||
import Scaffold from "simple-scaffold"
|
||||
await new Scaffold({
|
||||
name: "MyComponent",
|
||||
templates: ["templates/component"],
|
||||
output: "src/components",
|
||||
beforeWrite: async (content, rawContent, outputPath) => {
|
||||
// Format the output, transform it, or return undefined to keep as-is
|
||||
return content.toString().trim()
|
||||
},
|
||||
}).run()
|
||||
```
|
||||
|
||||
await Scaffold({
|
||||
### After Scaffold Hook
|
||||
|
||||
Runs after all files have been written. Pass a **function** for full control, or a **string** to run
|
||||
a shell command in the output directory.
|
||||
|
||||
**Function:**
|
||||
|
||||
```typescript
|
||||
await new Scaffold({
|
||||
name: "my-app",
|
||||
templates: ["templates/app"],
|
||||
output: ".",
|
||||
@@ -75,32 +114,37 @@ await Scaffold({
|
||||
console.log(`Created ${files.length} files`)
|
||||
// e.g. run npm install, git init, open editor, etc.
|
||||
},
|
||||
})
|
||||
}).run()
|
||||
```
|
||||
|
||||
You can also pass a shell command string, which will be executed in the output directory:
|
||||
**Shell command:**
|
||||
|
||||
```typescript
|
||||
await Scaffold({
|
||||
await new Scaffold({
|
||||
name: "my-app",
|
||||
templates: ["templates/app"],
|
||||
output: "my-app",
|
||||
afterScaffold: "npm install && git init",
|
||||
})
|
||||
}).run()
|
||||
```
|
||||
|
||||
The context object:
|
||||
|
||||
```typescript
|
||||
interface AfterScaffoldContext {
|
||||
config: ScaffoldConfig
|
||||
files: string[] // absolute paths of written files
|
||||
}
|
||||
```
|
||||
|
||||
In dry-run mode, the hook is still called but the `files` array will be empty.
|
||||
|
||||
### Inputs
|
||||
## Inputs
|
||||
|
||||
The `inputs` option lets you define fields that will be prompted interactively (when running in a
|
||||
TTY) and merged into the template data. This is useful when your templates need user-specific
|
||||
values.
|
||||
Define interactive prompts that merge into template data:
|
||||
|
||||
```typescript
|
||||
import Scaffold from "simple-scaffold"
|
||||
|
||||
await Scaffold({
|
||||
await new Scaffold({
|
||||
name: "component",
|
||||
templates: ["templates/component"],
|
||||
output: "src/components",
|
||||
@@ -114,27 +158,36 @@ await Scaffold({
|
||||
private: { type: "confirm", message: "Private package?", default: false },
|
||||
port: { type: "number", message: "Dev server port", default: 3000 },
|
||||
},
|
||||
})
|
||||
// In templates: {{ author }}, {{ license }}
|
||||
}).run()
|
||||
// In templates: {{ author }}, {{ license }}, {{ private }}, {{ port }}
|
||||
```
|
||||
|
||||
```typescript
|
||||
interface ScaffoldInput {
|
||||
type?: "text" | "select" | "confirm" | "number"
|
||||
message?: string
|
||||
required?: boolean
|
||||
default?: string | boolean | number
|
||||
options?: (string | { name: string; value: string })[] // for type: "select"
|
||||
}
|
||||
```
|
||||
|
||||
- **Required** inputs are prompted if not already in `data`
|
||||
- **Optional** inputs with a `default` are applied silently
|
||||
- Pre-providing values in `data` skips the prompt for that input
|
||||
|
||||
## Example
|
||||
|
||||
This is an example of loading a complete scaffold via Node.js:
|
||||
## Full Example
|
||||
|
||||
```typescript
|
||||
import path from "path"
|
||||
import Scaffold from "simple-scaffold"
|
||||
|
||||
await Scaffold({
|
||||
name: "component",
|
||||
await new Scaffold({
|
||||
name: "MyComponent",
|
||||
templates: [path.join(__dirname, "scaffolds", "component")],
|
||||
output: path.join(__dirname, "src", "components"),
|
||||
subdir: true,
|
||||
subdirHelper: "upperCase",
|
||||
subdirHelper: "pascalCase",
|
||||
data: {
|
||||
property: "value",
|
||||
},
|
||||
@@ -145,8 +198,11 @@ await Scaffold({
|
||||
author: { message: "Author name", required: true },
|
||||
license: { message: "License", default: "MIT" },
|
||||
},
|
||||
// return a string to replace the final file contents after pre-processing, or `undefined`
|
||||
// to keep it as-is
|
||||
beforeWrite: (content, rawContent, outputPath) => content.toString().toUpperCase(),
|
||||
})
|
||||
beforeWrite: (content, rawContent, outputPath) => {
|
||||
return content.toString().toUpperCase()
|
||||
},
|
||||
afterScaffold: async ({ config, files }) => {
|
||||
console.log(`Created ${files.length} files in ${config.output}`)
|
||||
},
|
||||
}).run()
|
||||
```
|
||||
|
||||
@@ -2,139 +2,185 @@
|
||||
title: Examples
|
||||
---
|
||||
|
||||
## Example files
|
||||
# Examples
|
||||
|
||||
### Input
|
||||
## React Component
|
||||
|
||||
- Input file path:
|
||||
### Template
|
||||
|
||||
```text
|
||||
project → scaffold → {{Name}}.js → src → components
|
||||
```
|
||||
**File:** `templates/component/{{pascalCase name}}.tsx`
|
||||
|
||||
- Input file contents:
|
||||
```tsx
|
||||
/**
|
||||
* Author: {{ author }}
|
||||
* Date: {{ now "yyyy-MM-dd" }}
|
||||
*/
|
||||
import React from "react"
|
||||
|
||||
```typescript
|
||||
/**
|
||||
* Author: {{ author }}
|
||||
* Date: {{ now "yyyy-MM-dd" }}
|
||||
*/
|
||||
import React from 'react'
|
||||
export default {{ pascalCase name }}: React.FC = (props) => {
|
||||
return (
|
||||
<div className="{{ camelCase name }}">{{ pascalCase name }} Component</div>
|
||||
)
|
||||
}
|
||||
```
|
||||
|
||||
export default {{camelCase name}}: React.FC = (props) => {
|
||||
return (
|
||||
<div className="{{className}}">{{camelCase name}} Component</div>
|
||||
)
|
||||
}
|
||||
```
|
||||
### Config
|
||||
|
||||
```js
|
||||
// scaffold.config.js
|
||||
module.exports = {
|
||||
component: {
|
||||
templates: ["templates/component"],
|
||||
output: "src/components",
|
||||
data: {
|
||||
author: "My Name",
|
||||
},
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
### Running
|
||||
|
||||
```sh
|
||||
npx simple-scaffold -k component MyComponent
|
||||
```
|
||||
|
||||
### Output
|
||||
|
||||
- Output file path:
|
||||
- With `subdir = false` (default):
|
||||
**File:** `src/components/MyComponent.tsx`
|
||||
|
||||
```text
|
||||
project → src → components → MyComponent.js
|
||||
```
|
||||
```tsx
|
||||
/**
|
||||
* Author: My Name
|
||||
* Date: 2077-01-01
|
||||
*/
|
||||
import React from "react"
|
||||
|
||||
- With `subdir = true`:
|
||||
|
||||
```text
|
||||
project → src → components → MyComponent → MyComponent.js
|
||||
```
|
||||
|
||||
- With `subdir = true` and `subdirHelper = 'upperCase'`:
|
||||
|
||||
```text
|
||||
project → src → components → MYCOMPONENT → MyComponent.js
|
||||
```
|
||||
|
||||
- Output file contents:
|
||||
|
||||
```typescript
|
||||
/**
|
||||
* Author: My Name
|
||||
* Date: 2077-01-01
|
||||
*/
|
||||
import React from 'react'
|
||||
|
||||
export default MyComponent: React.FC = (props) => {
|
||||
return (
|
||||
<div className="myClassName">MyComponent Component</div>
|
||||
)
|
||||
}
|
||||
```
|
||||
|
||||
## Example run commands
|
||||
|
||||
### Command Example
|
||||
|
||||
```bash
|
||||
simple-scaffold \
|
||||
-t project/scaffold/**/* \
|
||||
-o src/components \
|
||||
-d '{"className": "myClassName","author": "My Name"}'
|
||||
MyComponent
|
||||
export default MyComponent: React.FC = (props) => {
|
||||
return (
|
||||
<div className="myComponent">MyComponent Component</div>
|
||||
)
|
||||
}
|
||||
```
|
||||
|
||||
### Equivalent Node Module Example
|
||||
## Subdir Variations
|
||||
|
||||
Given the template and config above, the output path changes based on `subdir` settings:
|
||||
|
||||
| Setting | Output path |
|
||||
| ------------------------------------------- | -------------------------------------------- |
|
||||
| `subdir: false` (default) | `src/components/MyComponent.tsx` |
|
||||
| `subdir: true` | `src/components/MyComponent/MyComponent.tsx` |
|
||||
| `subdir: true`, `subdirHelper: "upperCase"` | `src/components/MYCOMPONENT/MyComponent.tsx` |
|
||||
|
||||
## CLI One-liner (No Config)
|
||||
|
||||
```sh
|
||||
npx simple-scaffold \
|
||||
-t templates/component/**/* \
|
||||
-o src/components \
|
||||
-d '{"author": "My Name"}' \
|
||||
MyComponent
|
||||
```
|
||||
|
||||
## Node.js Equivalent
|
||||
|
||||
```typescript
|
||||
import Scaffold from "simple-scaffold"
|
||||
|
||||
async function main() {
|
||||
await Scaffold({
|
||||
name: "MyComponent",
|
||||
templates: ["project/scaffold/**/*"],
|
||||
output: ["src/components"],
|
||||
data: {
|
||||
className: "myClassName",
|
||||
author: "My Name",
|
||||
},
|
||||
})
|
||||
console.log("Done.")
|
||||
await new Scaffold({
|
||||
name: "MyComponent",
|
||||
templates: ["templates/component"],
|
||||
output: "src/components",
|
||||
data: {
|
||||
author: "My Name",
|
||||
},
|
||||
}).run()
|
||||
```
|
||||
|
||||
## Reusable Config Files
|
||||
|
||||
### CommonJS (`scaffold.config.js`)
|
||||
|
||||
```js
|
||||
module.exports = {
|
||||
default: {
|
||||
templates: ["templates/component"],
|
||||
output: "src/components",
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
### Re-usable config
|
||||
### ESM (`scaffold.config.mjs`)
|
||||
|
||||
#### Shell
|
||||
|
||||
```bash
|
||||
# cjs
|
||||
simple-scaffold -c scaffold.cjs MyComponent \
|
||||
-d '{"className": "myClassName","author": "My Name"}'
|
||||
# mjs
|
||||
simple-scaffold -c scaffold.mjs MyComponent \
|
||||
-d '{"className": "myClassName","author": "My Name"}'
|
||||
```js
|
||||
export default {
|
||||
default: {
|
||||
templates: ["templates/component"],
|
||||
output: "src/components",
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
#### scaffold.cjs
|
||||
### Dynamic Config (with function)
|
||||
|
||||
```js
|
||||
module.exports = (config) => ({
|
||||
default: {
|
||||
templates: ["project/scaffold/**/*"],
|
||||
output: ["src/components"],
|
||||
templates: ["templates/component"],
|
||||
output: "src/components",
|
||||
data: {
|
||||
className: "myClassName",
|
||||
author: "My Name",
|
||||
generatedAt: new Date().toISOString(),
|
||||
},
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
#### scaffold.mjs
|
||||
## With Inputs
|
||||
|
||||
```js
|
||||
export default (config) => ({
|
||||
default: {
|
||||
templates: ["project/scaffold/**/*"],
|
||||
output: ["src/components"],
|
||||
data: {
|
||||
className: "myClassName",
|
||||
author: "My Name",
|
||||
// scaffold.config.js
|
||||
module.exports = {
|
||||
package: {
|
||||
templates: ["templates/package"],
|
||||
output: "packages",
|
||||
subdir: true,
|
||||
inputs: {
|
||||
description: { message: "Package description", required: true },
|
||||
author: { message: "Author", default: "Team" },
|
||||
license: {
|
||||
type: "select",
|
||||
message: "License",
|
||||
options: ["MIT", "Apache-2.0", "ISC"],
|
||||
},
|
||||
private: { type: "confirm", message: "Private package?", default: true },
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
```
|
||||
|
||||
```sh
|
||||
# Interactive — prompts for each input
|
||||
npx simple-scaffold -k package my-lib
|
||||
|
||||
# Non-interactive — provide all values upfront
|
||||
npx simple-scaffold -k package -D description="A utility library" -D author=John my-lib
|
||||
```
|
||||
|
||||
## With Hooks
|
||||
|
||||
```js
|
||||
module.exports = {
|
||||
app: {
|
||||
templates: ["templates/app"],
|
||||
output: ".",
|
||||
subdir: true,
|
||||
afterScaffold: "cd {{name}} && npm install && git init",
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
```sh
|
||||
npx simple-scaffold -k app my-app
|
||||
# Files are generated, then npm install and git init run automatically
|
||||
```
|
||||
|
||||
@@ -2,60 +2,63 @@
|
||||
title: Migration
|
||||
---
|
||||
|
||||
# Migration
|
||||
|
||||
## v1.x to v2.x
|
||||
|
||||
### CLI option changes
|
||||
### CLI Changes
|
||||
|
||||
- Several changes to how remote configs are loaded via CLI:
|
||||
- The `:template_key` syntax has been removed. You can still use `-k template_key` to achieve the
|
||||
same result.
|
||||
- The `--github` (`-gh`) flag has been replaced by a generic `--git` (`-g`) one, which handles any
|
||||
git URL. Providing a partial GitHub path will default to trying to find the project on GitHub,
|
||||
e.g. `-g username/project`
|
||||
- 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).
|
||||
- `--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
|
||||
names have been changed as well.
|
||||
- All boolean flags no longer take a value. `-q` instead of `-q 1` or `-q true`, `-s` instead of
|
||||
`-s 1`, `-w` instead of `-w 1`, etc.
|
||||
**Remote config syntax:**
|
||||
|
||||
### Behavior changes
|
||||
- The `:template_key` suffix syntax has been removed. Use `-k template_key` instead.
|
||||
- `--github` (`-gh`) is now `--git` (`-g`) and supports any Git URL. GitHub shorthand still works:
|
||||
`-g username/project`.
|
||||
- The `#template_file` suffix syntax has been removed. Use `--config` (`-c`) to specify which file
|
||||
to look for inside the Git project.
|
||||
|
||||
- Data is no longer auto-populated with `Name` (PascalCase) by default. You can just use the helper
|
||||
in your templates contents and file names, simply use `{{ pascalCase name }}` instead of
|
||||
`{{ Name }}`. `Name` was arbitrary and it is confusing (is it `Title Case`? `PascalCase`? only
|
||||
reading the docs can tell). Alternatively, you can inject the transformed name into your `data`
|
||||
manually using a scaffold config file, by using the Node API or by appending the data to the CLI
|
||||
invocation.
|
||||
**Renamed flags:**
|
||||
|
||||
| v1.x | v2.x |
|
||||
| ---------------------------------- | -------------------------------------------------------- |
|
||||
| `--create-sub-folder` / `-s` | `--subdir` / `-s` |
|
||||
| `--sub-folder-name-helper` / `-sh` | `--subdir-helper` / `-H` |
|
||||
| `--verbose` (true/false) | `--log-level` (`debug`, `info`, `warn`, `error`, `none`) |
|
||||
|
||||
**Boolean flags** no longer take a value. Use `-q` instead of `-q true`, `-s` instead of `-s 1`,
|
||||
etc.
|
||||
|
||||
### Behavior Changes
|
||||
|
||||
**`{{ Name }}` removed.** The auto-populated `Name` (PascalCase) variable is gone. Use
|
||||
`{{ pascalCase name }}` in your templates instead. If you need the old behavior, inject it manually
|
||||
via `data`:
|
||||
|
||||
```js
|
||||
module.exports = {
|
||||
default: {
|
||||
templates: ["templates/default"],
|
||||
output: "src",
|
||||
data: { Name: "{{ pascalCase name }}" }, // or set it programmatically
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
## v0.x to v1.x
|
||||
|
||||
In Simple Scaffold v1.0, the entire codebase was overhauled, yet usage remains mostly the same
|
||||
between versions. With these notable exceptions:
|
||||
In v1.0, the codebase was overhauled but usage remained mostly the same.
|
||||
|
||||
- Some of the argument names have changed
|
||||
- Template syntax has been improved
|
||||
- The command to run Scaffold has been simplified from `new SimpleScaffold(opts).run()` to
|
||||
`SimpleScaffold(opts)`, which now returns a promise that you can await to know when the process
|
||||
has been completed.
|
||||
### API Changes
|
||||
|
||||
### Argument changes
|
||||
| v0.x | v1.x |
|
||||
| -------------------------------- | ------------------------------------------ |
|
||||
| `new SimpleScaffold(opts).run()` | `SimpleScaffold(opts)` (returns a Promise) |
|
||||
| `locals` option | `data` option |
|
||||
| `--locals` / `-l` flag | `--data` / `-d` flag |
|
||||
|
||||
- `locals` has been renamed to `data`. The appropriate command line args have been updated as well
|
||||
to `--data` | `-d`.
|
||||
- Additional options have been added to both CLI and Node interfaces. See
|
||||
[Command Line Interface (CLI) usage](https://chenasraf.github.io/simple-scaffold/docs/usage/cli)
|
||||
and [Node.js usage](https://chenasraf.github.io/simple-scaffold/docs/usage/node) for more
|
||||
information.
|
||||
### Template Syntax
|
||||
|
||||
### Template syntax changes
|
||||
Templates still use Handlebars.js. v1.x added **built-in helpers** (case transformations, date
|
||||
formatting), removing the need to pre-process template data for common operations like `camelCase`,
|
||||
`snakeCase`, etc.
|
||||
|
||||
Simple Scaffold still uses Handlebars.js to handle template content and file names. However, helpers
|
||||
have been added to remove the need for you to pre-process the template data on simple use-cases such
|
||||
as case type manipulation (converting to camel case, snake case, etc)
|
||||
|
||||
See the readme for the full information on how to use these helpers and which are available.
|
||||
See [Templates](templates#built-in-helpers) for the full list of available helpers.
|
||||
|
||||
@@ -3,9 +3,16 @@ title: Usage
|
||||
sidebar_position: 0
|
||||
---
|
||||
|
||||
- [Template Files](templates)
|
||||
- [Configuration Files](configuration_files)
|
||||
- [CLI Usage](cli)
|
||||
- [Node.js Usage](node)
|
||||
- [Examples](examples)
|
||||
- [Migration](migration)
|
||||
# Usage
|
||||
|
||||
Simple Scaffold can be used as a **CLI tool** or as a **Node.js library**. Both approaches share the
|
||||
same core concepts: templates, configuration files, and Handlebars-based token replacement.
|
||||
|
||||
- [Templates](./usage/templates) — how template files and directories work, built-in helpers, and
|
||||
custom helpers
|
||||
- [Configuration Files](./usage/configuration_files) — reusable scaffold definitions,
|
||||
auto-detection, inputs, and remote Git templates
|
||||
- [CLI](./usage/cli) — all commands, flags, interactive mode, and hooks
|
||||
- [Node.js API](./usage/node) — programmatic usage, full config interface, and hooks
|
||||
- [Examples](./usage/examples) — end-to-end examples for CLI and Node.js
|
||||
- [Migration](./usage/migration) — upgrading from v1.x or v0.x to the latest version
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
"docusaurus-plugin-typedoc": "^1.4.2",
|
||||
"typedoc": "^0.28.18",
|
||||
"typedoc-plugin-markdown": "^4.11.0",
|
||||
"typescript": "~5.9.3"
|
||||
"typescript": "~6.0.2"
|
||||
},
|
||||
"browserslist": {
|
||||
"production": [
|
||||
|
||||
516
docs/pnpm-lock.yaml
generated
516
docs/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
14
package.json
14
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "simple-scaffold",
|
||||
"version": "3.1.0",
|
||||
"version": "3.1.1",
|
||||
"description": "Generate any file structure - from single components to entire app boilerplates, with a single command.",
|
||||
"homepage": "https://chenasraf.github.io/simple-scaffold",
|
||||
"repository": {
|
||||
@@ -59,7 +59,7 @@
|
||||
"@inquirer/select": "^5.1.2",
|
||||
"date-fns": "^4.1.0",
|
||||
"glob": "^13.0.6",
|
||||
"handlebars": "^4.7.8",
|
||||
"handlebars": "^4.7.9",
|
||||
"massarg": "2.1.1",
|
||||
"minimatch": "^10.2.4",
|
||||
"zod": "^4.3.6"
|
||||
@@ -67,16 +67,16 @@
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^10.0.1",
|
||||
"@types/node": "^25.5.0",
|
||||
"@vitest/coverage-v8": "^4.1.0",
|
||||
"@vitest/coverage-v8": "^4.1.2",
|
||||
"husky": "^9.1.7",
|
||||
"lint-staged": "^16.4.0",
|
||||
"mock-fs": "^5.5.0",
|
||||
"prettier": "^3.8.1",
|
||||
"rimraf": "^6.1.3",
|
||||
"typescript": "^5.9.3",
|
||||
"typescript-eslint": "^8.57.1",
|
||||
"vite": "^8.0.1",
|
||||
"typescript": "^6.0.2",
|
||||
"typescript-eslint": "^8.57.2",
|
||||
"vite": "^8.0.3",
|
||||
"vite-node": "^6.0.0",
|
||||
"vitest": "^4.1.0"
|
||||
"vitest": "^4.1.2"
|
||||
}
|
||||
}
|
||||
|
||||
472
pnpm-lock.yaml
generated
472
pnpm-lock.yaml
generated
@@ -27,8 +27,8 @@ importers:
|
||||
specifier: ^13.0.6
|
||||
version: 13.0.6
|
||||
handlebars:
|
||||
specifier: ^4.7.8
|
||||
version: 4.7.8
|
||||
specifier: ^4.7.9
|
||||
version: 4.7.9
|
||||
massarg:
|
||||
specifier: 2.1.1
|
||||
version: 2.1.1
|
||||
@@ -46,8 +46,8 @@ importers:
|
||||
specifier: ^25.5.0
|
||||
version: 25.5.0
|
||||
'@vitest/coverage-v8':
|
||||
specifier: ^4.1.0
|
||||
version: 4.1.0(vitest@4.1.0(@types/node@25.5.0)(vite@8.0.1(@types/node@25.5.0)(yaml@2.8.3)))
|
||||
specifier: ^4.1.2
|
||||
version: 4.1.2(vitest@4.1.2(@types/node@25.5.0)(vite@8.0.3(@types/node@25.5.0)(yaml@2.8.3)))
|
||||
husky:
|
||||
specifier: ^9.1.7
|
||||
version: 9.1.7
|
||||
@@ -64,20 +64,20 @@ importers:
|
||||
specifier: ^6.1.3
|
||||
version: 6.1.3
|
||||
typescript:
|
||||
specifier: ^5.9.3
|
||||
version: 5.9.3
|
||||
specifier: ^6.0.2
|
||||
version: 6.0.2
|
||||
typescript-eslint:
|
||||
specifier: ^8.57.1
|
||||
version: 8.57.1(eslint@10.1.0)(typescript@5.9.3)
|
||||
specifier: ^8.57.2
|
||||
version: 8.57.2(eslint@10.1.0)(typescript@6.0.2)
|
||||
vite:
|
||||
specifier: ^8.0.1
|
||||
version: 8.0.1(@types/node@25.5.0)(yaml@2.8.3)
|
||||
specifier: ^8.0.3
|
||||
version: 8.0.3(@types/node@25.5.0)(yaml@2.8.3)
|
||||
vite-node:
|
||||
specifier: ^6.0.0
|
||||
version: 6.0.0(@types/node@25.5.0)(yaml@2.8.3)
|
||||
vitest:
|
||||
specifier: ^4.1.0
|
||||
version: 4.1.0(@types/node@25.5.0)(vite@8.0.1(@types/node@25.5.0)(yaml@2.8.3))
|
||||
specifier: ^4.1.2
|
||||
version: 4.1.2(@types/node@25.5.0)(vite@8.0.3(@types/node@25.5.0)(yaml@2.8.3))
|
||||
|
||||
packages:
|
||||
|
||||
@@ -241,100 +241,100 @@ packages:
|
||||
'@napi-rs/wasm-runtime@1.1.1':
|
||||
resolution: {integrity: sha512-p64ah1M1ld8xjWv3qbvFwHiFVWrq1yFvV4f7w+mzaqiR4IlSgkqhcRdHwsGgomwzBH51sRY4NEowLxnaBjcW/A==}
|
||||
|
||||
'@oxc-project/types@0.120.0':
|
||||
resolution: {integrity: sha512-k1YNu55DuvAip/MGE1FTsIuU3FUCn6v/ujG9V7Nq5Df/kX2CWb13hhwD0lmJGMGqE+bE1MXvv9SZVnMzEXlWcg==}
|
||||
'@oxc-project/types@0.122.0':
|
||||
resolution: {integrity: sha512-oLAl5kBpV4w69UtFZ9xqcmTi+GENWOcPF7FCrczTiBbmC0ibXxCwyvZGbO39rCVEuLGAZM84DH0pUIyyv/YJzA==}
|
||||
|
||||
'@rolldown/binding-android-arm64@1.0.0-rc.10':
|
||||
resolution: {integrity: sha512-jOHxwXhxmFKuXztiu1ORieJeTbx5vrTkcOkkkn2d35726+iwhrY1w/+nYY/AGgF12thg33qC3R1LMBF5tHTZHg==}
|
||||
'@rolldown/binding-android-arm64@1.0.0-rc.12':
|
||||
resolution: {integrity: sha512-pv1y2Fv0JybcykuiiD3qBOBdz6RteYojRFY1d+b95WVuzx211CRh+ytI/+9iVyWQ6koTh5dawe4S/yRfOFjgaA==}
|
||||
engines: {node: ^20.19.0 || >=22.12.0}
|
||||
cpu: [arm64]
|
||||
os: [android]
|
||||
|
||||
'@rolldown/binding-darwin-arm64@1.0.0-rc.10':
|
||||
resolution: {integrity: sha512-gED05Teg/vtTZbIJBc4VNMAxAFDUPkuO/rAIyyxZjTj1a1/s6z5TII/5yMGZ0uLRCifEtwUQn8OlYzuYc0m70w==}
|
||||
'@rolldown/binding-darwin-arm64@1.0.0-rc.12':
|
||||
resolution: {integrity: sha512-cFYr6zTG/3PXXF3pUO+umXxt1wkRK/0AYT8lDwuqvRC+LuKYWSAQAQZjCWDQpAH172ZV6ieYrNnFzVVcnSflAg==}
|
||||
engines: {node: ^20.19.0 || >=22.12.0}
|
||||
cpu: [arm64]
|
||||
os: [darwin]
|
||||
|
||||
'@rolldown/binding-darwin-x64@1.0.0-rc.10':
|
||||
resolution: {integrity: sha512-rI15NcM1mA48lqrIxVkHfAqcyFLcQwyXWThy+BQ5+mkKKPvSO26ir+ZDp36AgYoYVkqvMcdS8zOE6SeBsR9e8A==}
|
||||
'@rolldown/binding-darwin-x64@1.0.0-rc.12':
|
||||
resolution: {integrity: sha512-ZCsYknnHzeXYps0lGBz8JrF37GpE9bFVefrlmDrAQhOEi4IOIlcoU1+FwHEtyXGx2VkYAvhu7dyBf75EJQffBw==}
|
||||
engines: {node: ^20.19.0 || >=22.12.0}
|
||||
cpu: [x64]
|
||||
os: [darwin]
|
||||
|
||||
'@rolldown/binding-freebsd-x64@1.0.0-rc.10':
|
||||
resolution: {integrity: sha512-XZRXHdTa+4ME1MuDVp021+doQ+z6Ei4CCFmNc5/sKbqb8YmkiJdj8QKlV3rCI0AJtAeSB5n0WGPuJWNL9p/L2w==}
|
||||
'@rolldown/binding-freebsd-x64@1.0.0-rc.12':
|
||||
resolution: {integrity: sha512-dMLeprcVsyJsKolRXyoTH3NL6qtsT0Y2xeuEA8WQJquWFXkEC4bcu1rLZZSnZRMtAqwtrF/Ib9Ddtpa/Gkge9Q==}
|
||||
engines: {node: ^20.19.0 || >=22.12.0}
|
||||
cpu: [x64]
|
||||
os: [freebsd]
|
||||
|
||||
'@rolldown/binding-linux-arm-gnueabihf@1.0.0-rc.10':
|
||||
resolution: {integrity: sha512-R0SQMRluISSLzFE20sPWYHVmJdDQnRyc/FzSCN72BqQmh2SOZUFG+N3/vBZpR4C6WpEUVYJLrYUXaj43sJsNLA==}
|
||||
'@rolldown/binding-linux-arm-gnueabihf@1.0.0-rc.12':
|
||||
resolution: {integrity: sha512-YqWjAgGC/9M1lz3GR1r1rP79nMgo3mQiiA+Hfo+pvKFK1fAJ1bCi0ZQVh8noOqNacuY1qIcfyVfP6HoyBRZ85Q==}
|
||||
engines: {node: ^20.19.0 || >=22.12.0}
|
||||
cpu: [arm]
|
||||
os: [linux]
|
||||
|
||||
'@rolldown/binding-linux-arm64-gnu@1.0.0-rc.10':
|
||||
resolution: {integrity: sha512-Y1reMrV/o+cwpduYhJuOE3OMKx32RMYCidf14y+HssARRmhDuWXJ4yVguDg2R/8SyyGNo+auzz64LnPK9Hq6jg==}
|
||||
'@rolldown/binding-linux-arm64-gnu@1.0.0-rc.12':
|
||||
resolution: {integrity: sha512-/I5AS4cIroLpslsmzXfwbe5OmWvSsrFuEw3mwvbQ1kDxJ822hFHIx+vsN/TAzNVyepI/j/GSzrtCIwQPeKCLIg==}
|
||||
engines: {node: ^20.19.0 || >=22.12.0}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
|
||||
'@rolldown/binding-linux-arm64-musl@1.0.0-rc.10':
|
||||
resolution: {integrity: sha512-vELN+HNb2IzuzSBUOD4NHmP9yrGwl1DVM29wlQvx1OLSclL0NgVWnVDKl/8tEks79EFek/kebQKnNJkIAA4W2g==}
|
||||
'@rolldown/binding-linux-arm64-musl@1.0.0-rc.12':
|
||||
resolution: {integrity: sha512-V6/wZztnBqlx5hJQqNWwFdxIKN0m38p8Jas+VoSfgH54HSj9tKTt1dZvG6JRHcjh6D7TvrJPWFGaY9UBVOaWPw==}
|
||||
engines: {node: ^20.19.0 || >=22.12.0}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
|
||||
'@rolldown/binding-linux-ppc64-gnu@1.0.0-rc.10':
|
||||
resolution: {integrity: sha512-ZqrufYTgzxbHwpqOjzSsb0UV/aV2TFIY5rP8HdsiPTv/CuAgCRjM6s9cYFwQ4CNH+hf9Y4erHW1GjZuZ7WoI7w==}
|
||||
'@rolldown/binding-linux-ppc64-gnu@1.0.0-rc.12':
|
||||
resolution: {integrity: sha512-AP3E9BpcUYliZCxa3w5Kwj9OtEVDYK6sVoUzy4vTOJsjPOgdaJZKFmN4oOlX0Wp0RPV2ETfmIra9x1xuayFB7g==}
|
||||
engines: {node: ^20.19.0 || >=22.12.0}
|
||||
cpu: [ppc64]
|
||||
os: [linux]
|
||||
|
||||
'@rolldown/binding-linux-s390x-gnu@1.0.0-rc.10':
|
||||
resolution: {integrity: sha512-gSlmVS1FZJSRicA6IyjoRoKAFK7IIHBs7xJuHRSmjImqk3mPPWbR7RhbnfH2G6bcmMEllCt2vQ/7u9e6bBnByg==}
|
||||
'@rolldown/binding-linux-s390x-gnu@1.0.0-rc.12':
|
||||
resolution: {integrity: sha512-nWwpvUSPkoFmZo0kQazZYOrT7J5DGOJ/+QHHzjvNlooDZED8oH82Yg67HvehPPLAg5fUff7TfWFHQS8IV1n3og==}
|
||||
engines: {node: ^20.19.0 || >=22.12.0}
|
||||
cpu: [s390x]
|
||||
os: [linux]
|
||||
|
||||
'@rolldown/binding-linux-x64-gnu@1.0.0-rc.10':
|
||||
resolution: {integrity: sha512-eOCKUpluKgfObT2pHjztnaWEIbUabWzk3qPZ5PuacuPmr4+JtQG4k2vGTY0H15edaTnicgU428XW/IH6AimcQw==}
|
||||
'@rolldown/binding-linux-x64-gnu@1.0.0-rc.12':
|
||||
resolution: {integrity: sha512-RNrafz5bcwRy+O9e6P8Z/OCAJW/A+qtBczIqVYwTs14pf4iV1/+eKEjdOUta93q2TsT/FI0XYDP3TCky38LMAg==}
|
||||
engines: {node: ^20.19.0 || >=22.12.0}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
|
||||
'@rolldown/binding-linux-x64-musl@1.0.0-rc.10':
|
||||
resolution: {integrity: sha512-Xdf2jQbfQowJnLcgYfD/m0Uu0Qj5OdxKallD78/IPPfzaiaI4KRAwZzHcKQ4ig1gtg1SuzC7jovNiM2TzQsBXA==}
|
||||
'@rolldown/binding-linux-x64-musl@1.0.0-rc.12':
|
||||
resolution: {integrity: sha512-Jpw/0iwoKWx3LJ2rc1yjFrj+T7iHZn2JDg1Yny1ma0luviFS4mhAIcd1LFNxK3EYu3DHWCps0ydXQ5i/rrJ2ig==}
|
||||
engines: {node: ^20.19.0 || >=22.12.0}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
|
||||
'@rolldown/binding-openharmony-arm64@1.0.0-rc.10':
|
||||
resolution: {integrity: sha512-o1hYe8hLi1EY6jgPFyxQgQ1wcycX+qz8eEbVmot2hFkgUzPxy9+kF0u0NIQBeDq+Mko47AkaFFaChcvZa9UX9Q==}
|
||||
'@rolldown/binding-openharmony-arm64@1.0.0-rc.12':
|
||||
resolution: {integrity: sha512-vRugONE4yMfVn0+7lUKdKvN4D5YusEiPilaoO2sgUWpCvrncvWgPMzK00ZFFJuiPgLwgFNP5eSiUlv2tfc+lpA==}
|
||||
engines: {node: ^20.19.0 || >=22.12.0}
|
||||
cpu: [arm64]
|
||||
os: [openharmony]
|
||||
|
||||
'@rolldown/binding-wasm32-wasi@1.0.0-rc.10':
|
||||
resolution: {integrity: sha512-Ugv9o7qYJudqQO5Y5y2N2SOo6S4WiqiNOpuQyoPInnhVzCY+wi/GHltcLHypG9DEUYMB0iTB/huJrpadiAcNcA==}
|
||||
'@rolldown/binding-wasm32-wasi@1.0.0-rc.12':
|
||||
resolution: {integrity: sha512-ykGiLr/6kkiHc0XnBfmFJuCjr5ZYKKofkx+chJWDjitX+KsJuAmrzWhwyOMSHzPhzOHOy7u9HlFoa5MoAOJ/Zg==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
cpu: [wasm32]
|
||||
|
||||
'@rolldown/binding-win32-arm64-msvc@1.0.0-rc.10':
|
||||
resolution: {integrity: sha512-7UODQb4fQUNT/vmgDZBl3XOBAIOutP5R3O/rkxg0aLfEGQ4opbCgU5vOw/scPe4xOqBwL9fw7/RP1vAMZ6QlAQ==}
|
||||
'@rolldown/binding-win32-arm64-msvc@1.0.0-rc.12':
|
||||
resolution: {integrity: sha512-5eOND4duWkwx1AzCxadcOrNeighiLwMInEADT0YM7xeEOOFcovWZCq8dadXgcRHSf3Ulh1kFo/qvzoFiCLOL1Q==}
|
||||
engines: {node: ^20.19.0 || >=22.12.0}
|
||||
cpu: [arm64]
|
||||
os: [win32]
|
||||
|
||||
'@rolldown/binding-win32-x64-msvc@1.0.0-rc.10':
|
||||
resolution: {integrity: sha512-PYxKHMVHOb5NJuDL53vBUl1VwUjymDcYI6rzpIni0C9+9mTiJedvUxSk7/RPp7OOAm3v+EjgMu9bIy3N6b408w==}
|
||||
'@rolldown/binding-win32-x64-msvc@1.0.0-rc.12':
|
||||
resolution: {integrity: sha512-PyqoipaswDLAZtot351MLhrlrh6lcZPo2LSYE+VDxbVk24LVKAGOuE4hb8xZQmrPAuEtTZW8E6D2zc5EUZX4Lw==}
|
||||
engines: {node: ^20.19.0 || >=22.12.0}
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
|
||||
'@rolldown/pluginutils@1.0.0-rc.10':
|
||||
resolution: {integrity: sha512-UkVDEFk1w3mveXeKgaTuYfKWtPbvgck1dT8TUG3bnccrH0XtLTuAyfCoks4Q/M5ZGToSVJTIQYCzy2g/atAOeg==}
|
||||
'@rolldown/pluginutils@1.0.0-rc.12':
|
||||
resolution: {integrity: sha512-HHMwmarRKvoFsJorqYlFeFRzXZqCt2ETQlEDOb9aqssrnVBB1/+xgTGtuTrIk5vzLNX1MjMtTf7W9z3tsSbrxw==}
|
||||
|
||||
'@standard-schema/spec@1.1.0':
|
||||
resolution: {integrity: sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==}
|
||||
@@ -360,102 +360,102 @@ packages:
|
||||
'@types/node@25.5.0':
|
||||
resolution: {integrity: sha512-jp2P3tQMSxWugkCUKLRPVUpGaL5MVFwF8RDuSRztfwgN1wmqJeMSbKlnEtQqU8UrhTmzEmZdu2I6v2dpp7XIxw==}
|
||||
|
||||
'@typescript-eslint/eslint-plugin@8.57.1':
|
||||
resolution: {integrity: sha512-Gn3aqnvNl4NGc6x3/Bqk1AOn0thyTU9bqDRhiRnUWezgvr2OnhYCWCgC8zXXRVqBsIL1pSDt7T9nJUe0oM0kDQ==}
|
||||
'@typescript-eslint/eslint-plugin@8.57.2':
|
||||
resolution: {integrity: sha512-NZZgp0Fm2IkD+La5PR81sd+g+8oS6JwJje+aRWsDocxHkjyRw0J5L5ZTlN3LI1LlOcGL7ph3eaIUmTXMIjLk0w==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
'@typescript-eslint/parser': ^8.57.1
|
||||
'@typescript-eslint/parser': ^8.57.2
|
||||
eslint: ^8.57.0 || ^9.0.0 || ^10.0.0
|
||||
typescript: '>=4.8.4 <6.0.0'
|
||||
|
||||
'@typescript-eslint/parser@8.57.1':
|
||||
resolution: {integrity: sha512-k4eNDan0EIMTT/dUKc/g+rsJ6wcHYhNPdY19VoX/EOtaAG8DLtKCykhrUnuHPYvinn5jhAPgD2Qw9hXBwrahsw==}
|
||||
'@typescript-eslint/parser@8.57.2':
|
||||
resolution: {integrity: sha512-30ScMRHIAD33JJQkgfGW1t8CURZtjc2JpTrq5n2HFhOefbAhb7ucc7xJwdWcrEtqUIYJ73Nybpsggii6GtAHjA==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
eslint: ^8.57.0 || ^9.0.0 || ^10.0.0
|
||||
typescript: '>=4.8.4 <6.0.0'
|
||||
|
||||
'@typescript-eslint/project-service@8.57.1':
|
||||
resolution: {integrity: sha512-vx1F37BRO1OftsYlmG9xay1TqnjNVlqALymwWVuYTdo18XuKxtBpCj1QlzNIEHlvlB27osvXFWptYiEWsVdYsg==}
|
||||
'@typescript-eslint/project-service@8.57.2':
|
||||
resolution: {integrity: sha512-FuH0wipFywXRTHf+bTTjNyuNQQsQC3qh/dYzaM4I4W0jrCqjCVuUh99+xd9KamUfmCGPvbO8NDngo/vsnNVqgw==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
typescript: '>=4.8.4 <6.0.0'
|
||||
|
||||
'@typescript-eslint/scope-manager@8.57.1':
|
||||
resolution: {integrity: sha512-hs/QcpCwlwT2L5S+3fT6gp0PabyGk4Q0Rv2doJXA0435/OpnSR3VRgvrp8Xdoc3UAYSg9cyUjTeFXZEPg/3OKg==}
|
||||
'@typescript-eslint/scope-manager@8.57.2':
|
||||
resolution: {integrity: sha512-snZKH+W4WbWkrBqj4gUNRIGb/jipDW3qMqVJ4C9rzdFc+wLwruxk+2a5D+uoFcKPAqyqEnSb4l2ULuZf95eSkw==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
|
||||
'@typescript-eslint/tsconfig-utils@8.57.1':
|
||||
resolution: {integrity: sha512-0lgOZB8cl19fHO4eI46YUx2EceQqhgkPSuCGLlGi79L2jwYY1cxeYc1Nae8Aw1xjgW3PKVDLlr3YJ6Bxx8HkWg==}
|
||||
'@typescript-eslint/tsconfig-utils@8.57.2':
|
||||
resolution: {integrity: sha512-3Lm5DSM+DCowsUOJC+YqHHnKEfFh5CoGkj5Z31NQSNF4l5wdOwqGn99wmwN/LImhfY3KJnmordBq/4+VDe2eKw==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
typescript: '>=4.8.4 <6.0.0'
|
||||
|
||||
'@typescript-eslint/type-utils@8.57.1':
|
||||
resolution: {integrity: sha512-+Bwwm0ScukFdyoJsh2u6pp4S9ktegF98pYUU0hkphOOqdMB+1sNQhIz8y5E9+4pOioZijrkfNO/HUJVAFFfPKA==}
|
||||
'@typescript-eslint/type-utils@8.57.2':
|
||||
resolution: {integrity: sha512-Co6ZCShm6kIbAM/s+oYVpKFfW7LBc6FXoPXjTRQ449PPNBY8U0KZXuevz5IFuuUj2H9ss40atTaf9dlGLzbWZg==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
eslint: ^8.57.0 || ^9.0.0 || ^10.0.0
|
||||
typescript: '>=4.8.4 <6.0.0'
|
||||
|
||||
'@typescript-eslint/types@8.57.1':
|
||||
resolution: {integrity: sha512-S29BOBPJSFUiblEl6RzPPjJt6w25A6XsBqRVDt53tA/tlL8q7ceQNZHTjPeONt/3S7KRI4quk+yP9jK2WjBiPQ==}
|
||||
'@typescript-eslint/types@8.57.2':
|
||||
resolution: {integrity: sha512-/iZM6FnM4tnx9csuTxspMW4BOSegshwX5oBDznJ7S4WggL7Vczz5d2W11ecc4vRrQMQHXRSxzrCsyG5EsPPTbA==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
|
||||
'@typescript-eslint/typescript-estree@8.57.1':
|
||||
resolution: {integrity: sha512-ybe2hS9G6pXpqGtPli9Gx9quNV0TWLOmh58ADlmZe9DguLq0tiAKVjirSbtM1szG6+QH6rVXyU6GTLQbWnMY+g==}
|
||||
'@typescript-eslint/typescript-estree@8.57.2':
|
||||
resolution: {integrity: sha512-2MKM+I6g8tJxfSmFKOnHv2t8Sk3T6rF20A1Puk0svLK+uVapDZB/4pfAeB7nE83uAZrU6OxW+HmOd5wHVdXwXA==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
typescript: '>=4.8.4 <6.0.0'
|
||||
|
||||
'@typescript-eslint/utils@8.57.1':
|
||||
resolution: {integrity: sha512-XUNSJ/lEVFttPMMoDVA2r2bwrl8/oPx8cURtczkSEswY5T3AeLmCy+EKWQNdL4u0MmAHOjcWrqJp2cdvgjn8dQ==}
|
||||
'@typescript-eslint/utils@8.57.2':
|
||||
resolution: {integrity: sha512-krRIbvPK1ju1WBKIefiX+bngPs+odIQUtR7kymzPfo1POVw3jlF+nLkmexdSSd4UCbDcQn+wMBATOOmpBbqgKg==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
eslint: ^8.57.0 || ^9.0.0 || ^10.0.0
|
||||
typescript: '>=4.8.4 <6.0.0'
|
||||
|
||||
'@typescript-eslint/visitor-keys@8.57.1':
|
||||
resolution: {integrity: sha512-YWnmJkXbofiz9KbnbbwuA2rpGkFPLbAIetcCNO6mJ8gdhdZ/v7WDXsoGFAJuM6ikUFKTlSQnjWnVO4ux+UzS6A==}
|
||||
'@typescript-eslint/visitor-keys@8.57.2':
|
||||
resolution: {integrity: sha512-zhahknjobV2FiD6Ee9iLbS7OV9zi10rG26odsQdfBO/hjSzUQbkIYgda+iNKK1zNiW2ey+Lf8MU5btN17V3dUw==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
|
||||
'@vitest/coverage-v8@4.1.0':
|
||||
resolution: {integrity: sha512-nDWulKeik2bL2Va/Wl4x7DLuTKAXa906iRFooIRPR+huHkcvp9QDkPQ2RJdmjOFrqOqvNfoSQLF68deE3xC3CQ==}
|
||||
'@vitest/coverage-v8@4.1.2':
|
||||
resolution: {integrity: sha512-sPK//PHO+kAkScb8XITeB1bf7fsk85Km7+rt4eeuRR3VS1/crD47cmV5wicisJmjNdfeokTZwjMk4Mj2d58Mgg==}
|
||||
peerDependencies:
|
||||
'@vitest/browser': 4.1.0
|
||||
vitest: 4.1.0
|
||||
'@vitest/browser': 4.1.2
|
||||
vitest: 4.1.2
|
||||
peerDependenciesMeta:
|
||||
'@vitest/browser':
|
||||
optional: true
|
||||
|
||||
'@vitest/expect@4.1.0':
|
||||
resolution: {integrity: sha512-EIxG7k4wlWweuCLG9Y5InKFwpMEOyrMb6ZJ1ihYu02LVj/bzUwn2VMU+13PinsjRW75XnITeFrQBMH5+dLvCDA==}
|
||||
'@vitest/expect@4.1.2':
|
||||
resolution: {integrity: sha512-gbu+7B0YgUJ2nkdsRJrFFW6X7NTP44WlhiclHniUhxADQJH5Szt9mZ9hWnJPJ8YwOK5zUOSSlSvyzRf0u1DSBQ==}
|
||||
|
||||
'@vitest/mocker@4.1.0':
|
||||
resolution: {integrity: sha512-evxREh+Hork43+Y4IOhTo+h5lGmVRyjqI739Rz4RlUPqwrkFFDF6EMvOOYjTx4E8Tl6gyCLRL8Mu7Ry12a13Tw==}
|
||||
'@vitest/mocker@4.1.2':
|
||||
resolution: {integrity: sha512-Ize4iQtEALHDttPRCmN+FKqOl2vxTiNUhzobQFFt/BM1lRUTG7zRCLOykG/6Vo4E4hnUdfVLo5/eqKPukcWW7Q==}
|
||||
peerDependencies:
|
||||
msw: ^2.4.9
|
||||
vite: ^6.0.0 || ^7.0.0 || ^8.0.0-0
|
||||
vite: ^6.0.0 || ^7.0.0 || ^8.0.0
|
||||
peerDependenciesMeta:
|
||||
msw:
|
||||
optional: true
|
||||
vite:
|
||||
optional: true
|
||||
|
||||
'@vitest/pretty-format@4.1.0':
|
||||
resolution: {integrity: sha512-3RZLZlh88Ib0J7NQTRATfc/3ZPOnSUn2uDBUoGNn5T36+bALixmzphN26OUD3LRXWkJu4H0s5vvUeqBiw+kS0A==}
|
||||
'@vitest/pretty-format@4.1.2':
|
||||
resolution: {integrity: sha512-dwQga8aejqeuB+TvXCMzSQemvV9hNEtDDpgUKDzOmNQayl2OG241PSWeJwKRH3CiC+sESrmoFd49rfnq7T4RnA==}
|
||||
|
||||
'@vitest/runner@4.1.0':
|
||||
resolution: {integrity: sha512-Duvx2OzQ7d6OjchL+trw+aSrb9idh7pnNfxrklo14p3zmNL4qPCDeIJAK+eBKYjkIwG96Bc6vYuxhqDXQOWpoQ==}
|
||||
'@vitest/runner@4.1.2':
|
||||
resolution: {integrity: sha512-Gr+FQan34CdiYAwpGJmQG8PgkyFVmARK8/xSijia3eTFgVfpcpztWLuP6FttGNfPLJhaZVP/euvujeNYar36OQ==}
|
||||
|
||||
'@vitest/snapshot@4.1.0':
|
||||
resolution: {integrity: sha512-0Vy9euT1kgsnj1CHttwi9i9o+4rRLEaPRSOJ5gyv579GJkNpgJK+B4HSv/rAWixx2wdAFci1X4CEPjiu2bXIMg==}
|
||||
'@vitest/snapshot@4.1.2':
|
||||
resolution: {integrity: sha512-g7yfUmxYS4mNxk31qbOYsSt2F4m1E02LFqO53Xpzg3zKMhLAPZAjjfyl9e6z7HrW6LvUdTwAQR3HHfLjpko16A==}
|
||||
|
||||
'@vitest/spy@4.1.0':
|
||||
resolution: {integrity: sha512-pz77k+PgNpyMDv2FV6qmk5ZVau6c3R8HC8v342T2xlFxQKTrSeYw9waIJG8KgV9fFwAtTu4ceRzMivPTH6wSxw==}
|
||||
'@vitest/spy@4.1.2':
|
||||
resolution: {integrity: sha512-DU4fBnbVCJGNBwVA6xSToNXrkZNSiw59H8tcuUspVMsBDBST4nfvsPsEHDHGtWRRnqBERBQu7TrTKskmjqTXKA==}
|
||||
|
||||
'@vitest/utils@4.1.0':
|
||||
resolution: {integrity: sha512-XfPXT6a8TZY3dcGY8EdwsBulFCIw+BeeX0RZn2x/BtiY/75YGh8FeWGG8QISN/WhaqSrE2OrlDgtF8q5uhOTmw==}
|
||||
'@vitest/utils@4.1.2':
|
||||
resolution: {integrity: sha512-xw2/TiX82lQHA06cgbqRKFb5lCAy3axQ4H4SoUFhUsg+wztiet+co86IAMDtF6Vm1hc7J6j09oh/rgDn+JdKIQ==}
|
||||
|
||||
acorn-jsx@5.3.2:
|
||||
resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==}
|
||||
@@ -493,8 +493,8 @@ packages:
|
||||
resolution: {integrity: sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==}
|
||||
engines: {node: 18 || 20 || >=22}
|
||||
|
||||
brace-expansion@5.0.4:
|
||||
resolution: {integrity: sha512-h+DEnpVvxmfVefa4jFbCf5HdH5YMDXRsmKflpf1pILZWRFlTbJpxeU55nJl4Smt5HQaGzg1o6RHFPJaOqnmBDg==}
|
||||
brace-expansion@5.0.5:
|
||||
resolution: {integrity: sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==}
|
||||
engines: {node: 18 || 20 || >=22}
|
||||
|
||||
cac@7.0.0:
|
||||
@@ -675,8 +675,8 @@ packages:
|
||||
resolution: {integrity: sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==}
|
||||
engines: {node: 18 || 20 || >=22}
|
||||
|
||||
handlebars@4.7.8:
|
||||
resolution: {integrity: sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==}
|
||||
handlebars@4.7.9:
|
||||
resolution: {integrity: sha512-4E71E0rpOaQuJR2A3xDZ+GM1HyWYv1clR58tC8emQNeQe3RH7MAzSbat+V0wG78LQBo6m6bzSG/L4pBuCsgnUQ==}
|
||||
engines: {node: '>=0.4.7'}
|
||||
hasBin: true
|
||||
|
||||
@@ -931,8 +931,8 @@ packages:
|
||||
picocolors@1.1.1:
|
||||
resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==}
|
||||
|
||||
picomatch@4.0.3:
|
||||
resolution: {integrity: sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==}
|
||||
picomatch@4.0.4:
|
||||
resolution: {integrity: sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==}
|
||||
engines: {node: '>=12'}
|
||||
|
||||
postcss@8.5.8:
|
||||
@@ -964,8 +964,8 @@ packages:
|
||||
engines: {node: 20 || >=22}
|
||||
hasBin: true
|
||||
|
||||
rolldown@1.0.0-rc.10:
|
||||
resolution: {integrity: sha512-q7j6vvarRFmKpgJUT8HCAUljkgzEp4LAhPlJUvQhA5LA1SUL36s5QCysMutErzL3EbNOZOkoziSx9iZC4FddKA==}
|
||||
rolldown@1.0.0-rc.12:
|
||||
resolution: {integrity: sha512-yP4USLIMYrwpPHEFB5JGH1uxhcslv6/hL0OyvTuY+3qlOSJvZ7ntYnoWpehBxufkgN0cvXxppuTu5hHa/zPh+A==}
|
||||
engines: {node: ^20.19.0 || >=22.12.0}
|
||||
hasBin: true
|
||||
|
||||
@@ -1059,15 +1059,15 @@ packages:
|
||||
resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==}
|
||||
engines: {node: '>= 0.8.0'}
|
||||
|
||||
typescript-eslint@8.57.1:
|
||||
resolution: {integrity: sha512-fLvZWf+cAGw3tqMCYzGIU6yR8K+Y9NT2z23RwOjlNFF2HwSB3KhdEFI5lSBv8tNmFkkBShSjsCjzx1vahZfISA==}
|
||||
typescript-eslint@8.57.2:
|
||||
resolution: {integrity: sha512-VEPQ0iPgWO/sBaZOU1xo4nuNdODVOajPnTIbog2GKYr31nIlZ0fWPoCQgGfF3ETyBl1vn63F/p50Um9Z4J8O8A==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
eslint: ^8.57.0 || ^9.0.0 || ^10.0.0
|
||||
typescript: '>=4.8.4 <6.0.0'
|
||||
|
||||
typescript@5.9.3:
|
||||
resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==}
|
||||
typescript@6.0.2:
|
||||
resolution: {integrity: sha512-bGdAIrZ0wiGDo5l8c++HWtbaNCWTS4UTv7RaTH/ThVIgjkveJt83m74bBHMJkuCbslY8ixgLBVZJIOiQlQTjfQ==}
|
||||
engines: {node: '>=14.17'}
|
||||
hasBin: true
|
||||
|
||||
@@ -1087,8 +1087,8 @@ packages:
|
||||
engines: {node: ^20.19.0 || >=22.12.0}
|
||||
hasBin: true
|
||||
|
||||
vite@8.0.1:
|
||||
resolution: {integrity: sha512-wt+Z2qIhfFt85uiyRt5LPU4oVEJBXj8hZNWKeqFG4gRG/0RaRGJ7njQCwzFVjO+v4+Ipmf5CY7VdmZRAYYBPHw==}
|
||||
vite@8.0.3:
|
||||
resolution: {integrity: sha512-B9ifbFudT1TFhfltfaIPgjo9Z3mDynBTJSUYxTjOQruf/zHH+ezCQKcoqO+h7a9Pw9Nm/OtlXAiGT1axBgwqrQ==}
|
||||
engines: {node: ^20.19.0 || >=22.12.0}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
@@ -1130,21 +1130,21 @@ packages:
|
||||
yaml:
|
||||
optional: true
|
||||
|
||||
vitest@4.1.0:
|
||||
resolution: {integrity: sha512-YbDrMF9jM2Lqc++2530UourxZHmkKLxrs4+mYhEwqWS97WJ7wOYEkcr+QfRgJ3PW9wz3odRijLZjHEaRLTNbqw==}
|
||||
vitest@4.1.2:
|
||||
resolution: {integrity: sha512-xjR1dMTVHlFLh98JE3i/f/WePqJsah4A0FK9cc8Ehp9Udk0AZk6ccpIZhh1qJ/yxVWRZ+Q54ocnD8TXmkhspGg==}
|
||||
engines: {node: ^20.0.0 || ^22.0.0 || >=24.0.0}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
'@edge-runtime/vm': '*'
|
||||
'@opentelemetry/api': ^1.9.0
|
||||
'@types/node': ^20.0.0 || ^22.0.0 || >=24.0.0
|
||||
'@vitest/browser-playwright': 4.1.0
|
||||
'@vitest/browser-preview': 4.1.0
|
||||
'@vitest/browser-webdriverio': 4.1.0
|
||||
'@vitest/ui': 4.1.0
|
||||
'@vitest/browser-playwright': 4.1.2
|
||||
'@vitest/browser-preview': 4.1.2
|
||||
'@vitest/browser-webdriverio': 4.1.2
|
||||
'@vitest/ui': 4.1.2
|
||||
happy-dom: '*'
|
||||
jsdom: '*'
|
||||
vite: ^6.0.0 || ^7.0.0 || ^8.0.0-0
|
||||
vite: ^6.0.0 || ^7.0.0 || ^8.0.0
|
||||
peerDependenciesMeta:
|
||||
'@edge-runtime/vm':
|
||||
optional: true
|
||||
@@ -1342,56 +1342,56 @@ snapshots:
|
||||
'@tybys/wasm-util': 0.10.1
|
||||
optional: true
|
||||
|
||||
'@oxc-project/types@0.120.0': {}
|
||||
'@oxc-project/types@0.122.0': {}
|
||||
|
||||
'@rolldown/binding-android-arm64@1.0.0-rc.10':
|
||||
'@rolldown/binding-android-arm64@1.0.0-rc.12':
|
||||
optional: true
|
||||
|
||||
'@rolldown/binding-darwin-arm64@1.0.0-rc.10':
|
||||
'@rolldown/binding-darwin-arm64@1.0.0-rc.12':
|
||||
optional: true
|
||||
|
||||
'@rolldown/binding-darwin-x64@1.0.0-rc.10':
|
||||
'@rolldown/binding-darwin-x64@1.0.0-rc.12':
|
||||
optional: true
|
||||
|
||||
'@rolldown/binding-freebsd-x64@1.0.0-rc.10':
|
||||
'@rolldown/binding-freebsd-x64@1.0.0-rc.12':
|
||||
optional: true
|
||||
|
||||
'@rolldown/binding-linux-arm-gnueabihf@1.0.0-rc.10':
|
||||
'@rolldown/binding-linux-arm-gnueabihf@1.0.0-rc.12':
|
||||
optional: true
|
||||
|
||||
'@rolldown/binding-linux-arm64-gnu@1.0.0-rc.10':
|
||||
'@rolldown/binding-linux-arm64-gnu@1.0.0-rc.12':
|
||||
optional: true
|
||||
|
||||
'@rolldown/binding-linux-arm64-musl@1.0.0-rc.10':
|
||||
'@rolldown/binding-linux-arm64-musl@1.0.0-rc.12':
|
||||
optional: true
|
||||
|
||||
'@rolldown/binding-linux-ppc64-gnu@1.0.0-rc.10':
|
||||
'@rolldown/binding-linux-ppc64-gnu@1.0.0-rc.12':
|
||||
optional: true
|
||||
|
||||
'@rolldown/binding-linux-s390x-gnu@1.0.0-rc.10':
|
||||
'@rolldown/binding-linux-s390x-gnu@1.0.0-rc.12':
|
||||
optional: true
|
||||
|
||||
'@rolldown/binding-linux-x64-gnu@1.0.0-rc.10':
|
||||
'@rolldown/binding-linux-x64-gnu@1.0.0-rc.12':
|
||||
optional: true
|
||||
|
||||
'@rolldown/binding-linux-x64-musl@1.0.0-rc.10':
|
||||
'@rolldown/binding-linux-x64-musl@1.0.0-rc.12':
|
||||
optional: true
|
||||
|
||||
'@rolldown/binding-openharmony-arm64@1.0.0-rc.10':
|
||||
'@rolldown/binding-openharmony-arm64@1.0.0-rc.12':
|
||||
optional: true
|
||||
|
||||
'@rolldown/binding-wasm32-wasi@1.0.0-rc.10':
|
||||
'@rolldown/binding-wasm32-wasi@1.0.0-rc.12':
|
||||
dependencies:
|
||||
'@napi-rs/wasm-runtime': 1.1.1
|
||||
optional: true
|
||||
|
||||
'@rolldown/binding-win32-arm64-msvc@1.0.0-rc.10':
|
||||
'@rolldown/binding-win32-arm64-msvc@1.0.0-rc.12':
|
||||
optional: true
|
||||
|
||||
'@rolldown/binding-win32-x64-msvc@1.0.0-rc.10':
|
||||
'@rolldown/binding-win32-x64-msvc@1.0.0-rc.12':
|
||||
optional: true
|
||||
|
||||
'@rolldown/pluginutils@1.0.0-rc.10': {}
|
||||
'@rolldown/pluginutils@1.0.0-rc.12': {}
|
||||
|
||||
'@standard-schema/spec@1.1.0': {}
|
||||
|
||||
@@ -1417,101 +1417,101 @@ snapshots:
|
||||
dependencies:
|
||||
undici-types: 7.18.2
|
||||
|
||||
'@typescript-eslint/eslint-plugin@8.57.1(@typescript-eslint/parser@8.57.1(eslint@10.1.0)(typescript@5.9.3))(eslint@10.1.0)(typescript@5.9.3)':
|
||||
'@typescript-eslint/eslint-plugin@8.57.2(@typescript-eslint/parser@8.57.2(eslint@10.1.0)(typescript@6.0.2))(eslint@10.1.0)(typescript@6.0.2)':
|
||||
dependencies:
|
||||
'@eslint-community/regexpp': 4.12.2
|
||||
'@typescript-eslint/parser': 8.57.1(eslint@10.1.0)(typescript@5.9.3)
|
||||
'@typescript-eslint/scope-manager': 8.57.1
|
||||
'@typescript-eslint/type-utils': 8.57.1(eslint@10.1.0)(typescript@5.9.3)
|
||||
'@typescript-eslint/utils': 8.57.1(eslint@10.1.0)(typescript@5.9.3)
|
||||
'@typescript-eslint/visitor-keys': 8.57.1
|
||||
'@typescript-eslint/parser': 8.57.2(eslint@10.1.0)(typescript@6.0.2)
|
||||
'@typescript-eslint/scope-manager': 8.57.2
|
||||
'@typescript-eslint/type-utils': 8.57.2(eslint@10.1.0)(typescript@6.0.2)
|
||||
'@typescript-eslint/utils': 8.57.2(eslint@10.1.0)(typescript@6.0.2)
|
||||
'@typescript-eslint/visitor-keys': 8.57.2
|
||||
eslint: 10.1.0
|
||||
ignore: 7.0.5
|
||||
natural-compare: 1.4.0
|
||||
ts-api-utils: 2.5.0(typescript@5.9.3)
|
||||
typescript: 5.9.3
|
||||
ts-api-utils: 2.5.0(typescript@6.0.2)
|
||||
typescript: 6.0.2
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/parser@8.57.1(eslint@10.1.0)(typescript@5.9.3)':
|
||||
'@typescript-eslint/parser@8.57.2(eslint@10.1.0)(typescript@6.0.2)':
|
||||
dependencies:
|
||||
'@typescript-eslint/scope-manager': 8.57.1
|
||||
'@typescript-eslint/types': 8.57.1
|
||||
'@typescript-eslint/typescript-estree': 8.57.1(typescript@5.9.3)
|
||||
'@typescript-eslint/visitor-keys': 8.57.1
|
||||
'@typescript-eslint/scope-manager': 8.57.2
|
||||
'@typescript-eslint/types': 8.57.2
|
||||
'@typescript-eslint/typescript-estree': 8.57.2(typescript@6.0.2)
|
||||
'@typescript-eslint/visitor-keys': 8.57.2
|
||||
debug: 4.4.3
|
||||
eslint: 10.1.0
|
||||
typescript: 5.9.3
|
||||
typescript: 6.0.2
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/project-service@8.57.1(typescript@5.9.3)':
|
||||
'@typescript-eslint/project-service@8.57.2(typescript@6.0.2)':
|
||||
dependencies:
|
||||
'@typescript-eslint/tsconfig-utils': 8.57.1(typescript@5.9.3)
|
||||
'@typescript-eslint/types': 8.57.1
|
||||
'@typescript-eslint/tsconfig-utils': 8.57.2(typescript@6.0.2)
|
||||
'@typescript-eslint/types': 8.57.2
|
||||
debug: 4.4.3
|
||||
typescript: 5.9.3
|
||||
typescript: 6.0.2
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/scope-manager@8.57.1':
|
||||
'@typescript-eslint/scope-manager@8.57.2':
|
||||
dependencies:
|
||||
'@typescript-eslint/types': 8.57.1
|
||||
'@typescript-eslint/visitor-keys': 8.57.1
|
||||
'@typescript-eslint/types': 8.57.2
|
||||
'@typescript-eslint/visitor-keys': 8.57.2
|
||||
|
||||
'@typescript-eslint/tsconfig-utils@8.57.1(typescript@5.9.3)':
|
||||
'@typescript-eslint/tsconfig-utils@8.57.2(typescript@6.0.2)':
|
||||
dependencies:
|
||||
typescript: 5.9.3
|
||||
typescript: 6.0.2
|
||||
|
||||
'@typescript-eslint/type-utils@8.57.1(eslint@10.1.0)(typescript@5.9.3)':
|
||||
'@typescript-eslint/type-utils@8.57.2(eslint@10.1.0)(typescript@6.0.2)':
|
||||
dependencies:
|
||||
'@typescript-eslint/types': 8.57.1
|
||||
'@typescript-eslint/typescript-estree': 8.57.1(typescript@5.9.3)
|
||||
'@typescript-eslint/utils': 8.57.1(eslint@10.1.0)(typescript@5.9.3)
|
||||
'@typescript-eslint/types': 8.57.2
|
||||
'@typescript-eslint/typescript-estree': 8.57.2(typescript@6.0.2)
|
||||
'@typescript-eslint/utils': 8.57.2(eslint@10.1.0)(typescript@6.0.2)
|
||||
debug: 4.4.3
|
||||
eslint: 10.1.0
|
||||
ts-api-utils: 2.5.0(typescript@5.9.3)
|
||||
typescript: 5.9.3
|
||||
ts-api-utils: 2.5.0(typescript@6.0.2)
|
||||
typescript: 6.0.2
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/types@8.57.1': {}
|
||||
'@typescript-eslint/types@8.57.2': {}
|
||||
|
||||
'@typescript-eslint/typescript-estree@8.57.1(typescript@5.9.3)':
|
||||
'@typescript-eslint/typescript-estree@8.57.2(typescript@6.0.2)':
|
||||
dependencies:
|
||||
'@typescript-eslint/project-service': 8.57.1(typescript@5.9.3)
|
||||
'@typescript-eslint/tsconfig-utils': 8.57.1(typescript@5.9.3)
|
||||
'@typescript-eslint/types': 8.57.1
|
||||
'@typescript-eslint/visitor-keys': 8.57.1
|
||||
'@typescript-eslint/project-service': 8.57.2(typescript@6.0.2)
|
||||
'@typescript-eslint/tsconfig-utils': 8.57.2(typescript@6.0.2)
|
||||
'@typescript-eslint/types': 8.57.2
|
||||
'@typescript-eslint/visitor-keys': 8.57.2
|
||||
debug: 4.4.3
|
||||
minimatch: 10.2.4
|
||||
semver: 7.7.4
|
||||
tinyglobby: 0.2.15
|
||||
ts-api-utils: 2.5.0(typescript@5.9.3)
|
||||
typescript: 5.9.3
|
||||
ts-api-utils: 2.5.0(typescript@6.0.2)
|
||||
typescript: 6.0.2
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/utils@8.57.1(eslint@10.1.0)(typescript@5.9.3)':
|
||||
'@typescript-eslint/utils@8.57.2(eslint@10.1.0)(typescript@6.0.2)':
|
||||
dependencies:
|
||||
'@eslint-community/eslint-utils': 4.9.1(eslint@10.1.0)
|
||||
'@typescript-eslint/scope-manager': 8.57.1
|
||||
'@typescript-eslint/types': 8.57.1
|
||||
'@typescript-eslint/typescript-estree': 8.57.1(typescript@5.9.3)
|
||||
'@typescript-eslint/scope-manager': 8.57.2
|
||||
'@typescript-eslint/types': 8.57.2
|
||||
'@typescript-eslint/typescript-estree': 8.57.2(typescript@6.0.2)
|
||||
eslint: 10.1.0
|
||||
typescript: 5.9.3
|
||||
typescript: 6.0.2
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/visitor-keys@8.57.1':
|
||||
'@typescript-eslint/visitor-keys@8.57.2':
|
||||
dependencies:
|
||||
'@typescript-eslint/types': 8.57.1
|
||||
'@typescript-eslint/types': 8.57.2
|
||||
eslint-visitor-keys: 5.0.1
|
||||
|
||||
'@vitest/coverage-v8@4.1.0(vitest@4.1.0(@types/node@25.5.0)(vite@8.0.1(@types/node@25.5.0)(yaml@2.8.3)))':
|
||||
'@vitest/coverage-v8@4.1.2(vitest@4.1.2(@types/node@25.5.0)(vite@8.0.3(@types/node@25.5.0)(yaml@2.8.3)))':
|
||||
dependencies:
|
||||
'@bcoe/v8-coverage': 1.0.2
|
||||
'@vitest/utils': 4.1.0
|
||||
'@vitest/utils': 4.1.2
|
||||
ast-v8-to-istanbul: 1.0.0
|
||||
istanbul-lib-coverage: 3.2.2
|
||||
istanbul-lib-report: 3.0.1
|
||||
@@ -1520,46 +1520,46 @@ snapshots:
|
||||
obug: 2.1.1
|
||||
std-env: 4.0.0
|
||||
tinyrainbow: 3.1.0
|
||||
vitest: 4.1.0(@types/node@25.5.0)(vite@8.0.1(@types/node@25.5.0)(yaml@2.8.3))
|
||||
vitest: 4.1.2(@types/node@25.5.0)(vite@8.0.3(@types/node@25.5.0)(yaml@2.8.3))
|
||||
|
||||
'@vitest/expect@4.1.0':
|
||||
'@vitest/expect@4.1.2':
|
||||
dependencies:
|
||||
'@standard-schema/spec': 1.1.0
|
||||
'@types/chai': 5.2.3
|
||||
'@vitest/spy': 4.1.0
|
||||
'@vitest/utils': 4.1.0
|
||||
'@vitest/spy': 4.1.2
|
||||
'@vitest/utils': 4.1.2
|
||||
chai: 6.2.2
|
||||
tinyrainbow: 3.1.0
|
||||
|
||||
'@vitest/mocker@4.1.0(vite@8.0.1(@types/node@25.5.0)(yaml@2.8.3))':
|
||||
'@vitest/mocker@4.1.2(vite@8.0.3(@types/node@25.5.0)(yaml@2.8.3))':
|
||||
dependencies:
|
||||
'@vitest/spy': 4.1.0
|
||||
'@vitest/spy': 4.1.2
|
||||
estree-walker: 3.0.3
|
||||
magic-string: 0.30.21
|
||||
optionalDependencies:
|
||||
vite: 8.0.1(@types/node@25.5.0)(yaml@2.8.3)
|
||||
vite: 8.0.3(@types/node@25.5.0)(yaml@2.8.3)
|
||||
|
||||
'@vitest/pretty-format@4.1.0':
|
||||
'@vitest/pretty-format@4.1.2':
|
||||
dependencies:
|
||||
tinyrainbow: 3.1.0
|
||||
|
||||
'@vitest/runner@4.1.0':
|
||||
'@vitest/runner@4.1.2':
|
||||
dependencies:
|
||||
'@vitest/utils': 4.1.0
|
||||
'@vitest/utils': 4.1.2
|
||||
pathe: 2.0.3
|
||||
|
||||
'@vitest/snapshot@4.1.0':
|
||||
'@vitest/snapshot@4.1.2':
|
||||
dependencies:
|
||||
'@vitest/pretty-format': 4.1.0
|
||||
'@vitest/utils': 4.1.0
|
||||
'@vitest/pretty-format': 4.1.2
|
||||
'@vitest/utils': 4.1.2
|
||||
magic-string: 0.30.21
|
||||
pathe: 2.0.3
|
||||
|
||||
'@vitest/spy@4.1.0': {}
|
||||
'@vitest/spy@4.1.2': {}
|
||||
|
||||
'@vitest/utils@4.1.0':
|
||||
'@vitest/utils@4.1.2':
|
||||
dependencies:
|
||||
'@vitest/pretty-format': 4.1.0
|
||||
'@vitest/pretty-format': 4.1.2
|
||||
convert-source-map: 2.0.0
|
||||
tinyrainbow: 3.1.0
|
||||
|
||||
@@ -1594,7 +1594,7 @@ snapshots:
|
||||
|
||||
balanced-match@4.0.4: {}
|
||||
|
||||
brace-expansion@5.0.4:
|
||||
brace-expansion@5.0.5:
|
||||
dependencies:
|
||||
balanced-match: 4.0.4
|
||||
|
||||
@@ -1731,9 +1731,9 @@ snapshots:
|
||||
dependencies:
|
||||
fast-string-width: 3.0.2
|
||||
|
||||
fdir@6.5.0(picomatch@4.0.3):
|
||||
fdir@6.5.0(picomatch@4.0.4):
|
||||
optionalDependencies:
|
||||
picomatch: 4.0.3
|
||||
picomatch: 4.0.4
|
||||
|
||||
file-entry-cache@8.0.0:
|
||||
dependencies:
|
||||
@@ -1766,7 +1766,7 @@ snapshots:
|
||||
minipass: 7.1.3
|
||||
path-scurry: 2.0.2
|
||||
|
||||
handlebars@4.7.8:
|
||||
handlebars@4.7.9:
|
||||
dependencies:
|
||||
minimist: 1.2.8
|
||||
neo-async: 2.6.2
|
||||
@@ -1882,7 +1882,7 @@ snapshots:
|
||||
dependencies:
|
||||
commander: 14.0.3
|
||||
listr2: 9.0.5
|
||||
picomatch: 4.0.3
|
||||
picomatch: 4.0.4
|
||||
string-argv: 0.3.2
|
||||
tinyexec: 1.0.4
|
||||
yaml: 2.8.3
|
||||
@@ -1932,7 +1932,7 @@ snapshots:
|
||||
|
||||
minimatch@10.2.4:
|
||||
dependencies:
|
||||
brace-expansion: 5.0.4
|
||||
brace-expansion: 5.0.5
|
||||
|
||||
minimist@1.2.8: {}
|
||||
|
||||
@@ -1988,7 +1988,7 @@ snapshots:
|
||||
|
||||
picocolors@1.1.1: {}
|
||||
|
||||
picomatch@4.0.3: {}
|
||||
picomatch@4.0.4: {}
|
||||
|
||||
postcss@8.5.8:
|
||||
dependencies:
|
||||
@@ -2014,26 +2014,26 @@ snapshots:
|
||||
glob: 13.0.6
|
||||
package-json-from-dist: 1.0.1
|
||||
|
||||
rolldown@1.0.0-rc.10:
|
||||
rolldown@1.0.0-rc.12:
|
||||
dependencies:
|
||||
'@oxc-project/types': 0.120.0
|
||||
'@rolldown/pluginutils': 1.0.0-rc.10
|
||||
'@oxc-project/types': 0.122.0
|
||||
'@rolldown/pluginutils': 1.0.0-rc.12
|
||||
optionalDependencies:
|
||||
'@rolldown/binding-android-arm64': 1.0.0-rc.10
|
||||
'@rolldown/binding-darwin-arm64': 1.0.0-rc.10
|
||||
'@rolldown/binding-darwin-x64': 1.0.0-rc.10
|
||||
'@rolldown/binding-freebsd-x64': 1.0.0-rc.10
|
||||
'@rolldown/binding-linux-arm-gnueabihf': 1.0.0-rc.10
|
||||
'@rolldown/binding-linux-arm64-gnu': 1.0.0-rc.10
|
||||
'@rolldown/binding-linux-arm64-musl': 1.0.0-rc.10
|
||||
'@rolldown/binding-linux-ppc64-gnu': 1.0.0-rc.10
|
||||
'@rolldown/binding-linux-s390x-gnu': 1.0.0-rc.10
|
||||
'@rolldown/binding-linux-x64-gnu': 1.0.0-rc.10
|
||||
'@rolldown/binding-linux-x64-musl': 1.0.0-rc.10
|
||||
'@rolldown/binding-openharmony-arm64': 1.0.0-rc.10
|
||||
'@rolldown/binding-wasm32-wasi': 1.0.0-rc.10
|
||||
'@rolldown/binding-win32-arm64-msvc': 1.0.0-rc.10
|
||||
'@rolldown/binding-win32-x64-msvc': 1.0.0-rc.10
|
||||
'@rolldown/binding-android-arm64': 1.0.0-rc.12
|
||||
'@rolldown/binding-darwin-arm64': 1.0.0-rc.12
|
||||
'@rolldown/binding-darwin-x64': 1.0.0-rc.12
|
||||
'@rolldown/binding-freebsd-x64': 1.0.0-rc.12
|
||||
'@rolldown/binding-linux-arm-gnueabihf': 1.0.0-rc.12
|
||||
'@rolldown/binding-linux-arm64-gnu': 1.0.0-rc.12
|
||||
'@rolldown/binding-linux-arm64-musl': 1.0.0-rc.12
|
||||
'@rolldown/binding-linux-ppc64-gnu': 1.0.0-rc.12
|
||||
'@rolldown/binding-linux-s390x-gnu': 1.0.0-rc.12
|
||||
'@rolldown/binding-linux-x64-gnu': 1.0.0-rc.12
|
||||
'@rolldown/binding-linux-x64-musl': 1.0.0-rc.12
|
||||
'@rolldown/binding-openharmony-arm64': 1.0.0-rc.12
|
||||
'@rolldown/binding-wasm32-wasi': 1.0.0-rc.12
|
||||
'@rolldown/binding-win32-arm64-msvc': 1.0.0-rc.12
|
||||
'@rolldown/binding-win32-x64-msvc': 1.0.0-rc.12
|
||||
|
||||
semver@7.7.4: {}
|
||||
|
||||
@@ -2092,14 +2092,14 @@ snapshots:
|
||||
|
||||
tinyglobby@0.2.15:
|
||||
dependencies:
|
||||
fdir: 6.5.0(picomatch@4.0.3)
|
||||
picomatch: 4.0.3
|
||||
fdir: 6.5.0(picomatch@4.0.4)
|
||||
picomatch: 4.0.4
|
||||
|
||||
tinyrainbow@3.1.0: {}
|
||||
|
||||
ts-api-utils@2.5.0(typescript@5.9.3):
|
||||
ts-api-utils@2.5.0(typescript@6.0.2):
|
||||
dependencies:
|
||||
typescript: 5.9.3
|
||||
typescript: 6.0.2
|
||||
|
||||
tslib@2.8.1:
|
||||
optional: true
|
||||
@@ -2108,18 +2108,18 @@ snapshots:
|
||||
dependencies:
|
||||
prelude-ls: 1.2.1
|
||||
|
||||
typescript-eslint@8.57.1(eslint@10.1.0)(typescript@5.9.3):
|
||||
typescript-eslint@8.57.2(eslint@10.1.0)(typescript@6.0.2):
|
||||
dependencies:
|
||||
'@typescript-eslint/eslint-plugin': 8.57.1(@typescript-eslint/parser@8.57.1(eslint@10.1.0)(typescript@5.9.3))(eslint@10.1.0)(typescript@5.9.3)
|
||||
'@typescript-eslint/parser': 8.57.1(eslint@10.1.0)(typescript@5.9.3)
|
||||
'@typescript-eslint/typescript-estree': 8.57.1(typescript@5.9.3)
|
||||
'@typescript-eslint/utils': 8.57.1(eslint@10.1.0)(typescript@5.9.3)
|
||||
'@typescript-eslint/eslint-plugin': 8.57.2(@typescript-eslint/parser@8.57.2(eslint@10.1.0)(typescript@6.0.2))(eslint@10.1.0)(typescript@6.0.2)
|
||||
'@typescript-eslint/parser': 8.57.2(eslint@10.1.0)(typescript@6.0.2)
|
||||
'@typescript-eslint/typescript-estree': 8.57.2(typescript@6.0.2)
|
||||
'@typescript-eslint/utils': 8.57.2(eslint@10.1.0)(typescript@6.0.2)
|
||||
eslint: 10.1.0
|
||||
typescript: 5.9.3
|
||||
typescript: 6.0.2
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
typescript@5.9.3: {}
|
||||
typescript@6.0.2: {}
|
||||
|
||||
uglify-js@3.19.3:
|
||||
optional: true
|
||||
@@ -2136,7 +2136,7 @@ snapshots:
|
||||
es-module-lexer: 2.0.0
|
||||
obug: 2.1.1
|
||||
pathe: 2.0.3
|
||||
vite: 8.0.1(@types/node@25.5.0)(yaml@2.8.3)
|
||||
vite: 8.0.3(@types/node@25.5.0)(yaml@2.8.3)
|
||||
transitivePeerDependencies:
|
||||
- '@types/node'
|
||||
- '@vitejs/devtools'
|
||||
@@ -2151,39 +2151,39 @@ snapshots:
|
||||
- tsx
|
||||
- yaml
|
||||
|
||||
vite@8.0.1(@types/node@25.5.0)(yaml@2.8.3):
|
||||
vite@8.0.3(@types/node@25.5.0)(yaml@2.8.3):
|
||||
dependencies:
|
||||
lightningcss: 1.32.0
|
||||
picomatch: 4.0.3
|
||||
picomatch: 4.0.4
|
||||
postcss: 8.5.8
|
||||
rolldown: 1.0.0-rc.10
|
||||
rolldown: 1.0.0-rc.12
|
||||
tinyglobby: 0.2.15
|
||||
optionalDependencies:
|
||||
'@types/node': 25.5.0
|
||||
fsevents: 2.3.3
|
||||
yaml: 2.8.3
|
||||
|
||||
vitest@4.1.0(@types/node@25.5.0)(vite@8.0.1(@types/node@25.5.0)(yaml@2.8.3)):
|
||||
vitest@4.1.2(@types/node@25.5.0)(vite@8.0.3(@types/node@25.5.0)(yaml@2.8.3)):
|
||||
dependencies:
|
||||
'@vitest/expect': 4.1.0
|
||||
'@vitest/mocker': 4.1.0(vite@8.0.1(@types/node@25.5.0)(yaml@2.8.3))
|
||||
'@vitest/pretty-format': 4.1.0
|
||||
'@vitest/runner': 4.1.0
|
||||
'@vitest/snapshot': 4.1.0
|
||||
'@vitest/spy': 4.1.0
|
||||
'@vitest/utils': 4.1.0
|
||||
'@vitest/expect': 4.1.2
|
||||
'@vitest/mocker': 4.1.2(vite@8.0.3(@types/node@25.5.0)(yaml@2.8.3))
|
||||
'@vitest/pretty-format': 4.1.2
|
||||
'@vitest/runner': 4.1.2
|
||||
'@vitest/snapshot': 4.1.2
|
||||
'@vitest/spy': 4.1.2
|
||||
'@vitest/utils': 4.1.2
|
||||
es-module-lexer: 2.0.0
|
||||
expect-type: 1.3.0
|
||||
magic-string: 0.30.21
|
||||
obug: 2.1.1
|
||||
pathe: 2.0.3
|
||||
picomatch: 4.0.3
|
||||
picomatch: 4.0.4
|
||||
std-env: 4.0.0
|
||||
tinybench: 2.9.0
|
||||
tinyexec: 1.0.4
|
||||
tinyglobby: 0.2.15
|
||||
tinyrainbow: 3.1.0
|
||||
vite: 8.0.1(@types/node@25.5.0)(yaml@2.8.3)
|
||||
vite: 8.0.3(@types/node@25.5.0)(yaml@2.8.3)
|
||||
why-is-node-running: 2.3.0
|
||||
optionalDependencies:
|
||||
'@types/node': 25.5.0
|
||||
|
||||
@@ -2,28 +2,21 @@
|
||||
"$schema": "https://json.schemastore.org/tsconfig",
|
||||
"compilerOptions": {
|
||||
"target": "ESNext",
|
||||
"module": "commonjs",
|
||||
"moduleResolution": "node",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"rootDir": "./src",
|
||||
"esModuleInterop": true,
|
||||
"lib": [
|
||||
"ESNext"
|
||||
],
|
||||
"lib": ["ESNext"],
|
||||
"declaration": true,
|
||||
"outDir": "dist",
|
||||
"strict": true,
|
||||
"sourceMap": true,
|
||||
"removeComments": false,
|
||||
"paths": {
|
||||
"@/*": [
|
||||
"./src/*"
|
||||
],
|
||||
"@/*": ["./src/*"]
|
||||
},
|
||||
"types": ["node"]
|
||||
},
|
||||
"include": [
|
||||
"src/index.ts",
|
||||
"src/cmd.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"tests/*"
|
||||
],
|
||||
"include": ["src/index.ts", "src/cmd.ts"],
|
||||
"exclude": ["tests/*"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user