This commit is contained in:
118
node_modules/confbox/LICENSE
generated
vendored
Normal file
118
node_modules/confbox/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,118 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Pooya Parsa <pooya@pi0.io>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
js-yaml: https://github.com/nodeca/js-yaml/tree/master
|
||||
|
||||
(The MIT License)
|
||||
|
||||
Copyright (C) 2011-2015 by Vitaly Puzrin
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
smol-toml: https://github.com/squirrelchat/smol-toml/blob/mistress/LICENSE
|
||||
|
||||
Copyright (c) Squirrel Chat et al., All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. Neither the name of the copyright holder nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
---
|
||||
|
||||
jsonc-parser: https://github.com/microsoft/node-jsonc-parser/blob/main/LICENSE.md
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Microsoft
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
json5: https://github.com/json5/json5/blob/main/LICENSE.md
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2012-2018 Aseem Kishore, and others (https://github.com/json5/json5/graphs/contributors)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
detect-indent: https://github.com/sindresorhus/detect-indent/blob/main/license
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
191
node_modules/confbox/README.md
generated
vendored
Normal file
191
node_modules/confbox/README.md
generated
vendored
Normal file
@@ -0,0 +1,191 @@
|
||||
# confbox
|
||||
|
||||
<!-- automd:badges color=yellow bundlephobia packagephobia -->
|
||||
|
||||
[](https://npmjs.com/package/confbox)
|
||||
[](https://npm.chart.dev/confbox)
|
||||
[](https://bundlephobia.com/package/confbox)
|
||||
|
||||
<!-- /automd -->
|
||||
|
||||
Parsing and serialization utils for [YAML](https://yaml.org/) ([js-yaml](https://github.com/nodeca/js-yaml)), [TOML](https://toml.io/) ([smol-toml](https://github.com/squirrelchat/smol-toml)), [JSONC](https://github.com/microsoft/node-jsonc-parser) ([jsonc-parser](https://github.com/microsoft/node-jsonc-parser)), [JSON5](https://json5.org/) ([json5](https://github.com/json5/json5)), and [JSON](https://www.json.org/json-en.html).
|
||||
|
||||
✨ Zero dependency and tree-shakable
|
||||
|
||||
✨ Types exported out of the box
|
||||
|
||||
✨ Presrves code style (indentation and whitespace)
|
||||
|
||||
> [!TIP]
|
||||
> Use [unjs/c12](https://github.com/unjs/c12) for a full featured configuration loader!
|
||||
|
||||
## Usage
|
||||
|
||||
Install package:
|
||||
|
||||
<!-- automd:pm-i no-version -->
|
||||
|
||||
```sh
|
||||
# ✨ Auto-detect
|
||||
npx nypm install confbox
|
||||
|
||||
# npm
|
||||
npm install confbox
|
||||
|
||||
# yarn
|
||||
yarn add confbox
|
||||
|
||||
# pnpm
|
||||
pnpm install confbox
|
||||
|
||||
# bun
|
||||
bun install confbox
|
||||
|
||||
# deno
|
||||
deno install confbox
|
||||
```
|
||||
|
||||
<!-- /automd -->
|
||||
|
||||
Import:
|
||||
|
||||
<!-- automd:jsimport cjs cdn src="./src/index.ts" -->
|
||||
|
||||
**ESM** (Node.js, Bun, Deno)
|
||||
|
||||
```js
|
||||
import {
|
||||
parseJSON5,
|
||||
stringifyJSON5,
|
||||
parseJSONC,
|
||||
stringifyJSONC,
|
||||
parseYAML,
|
||||
stringifyYAML,
|
||||
parseJSON,
|
||||
stringifyJSON,
|
||||
parseTOML,
|
||||
stringifyTOML,
|
||||
} from "confbox";
|
||||
```
|
||||
|
||||
**CommonJS** (Legacy Node.js)
|
||||
|
||||
```js
|
||||
const {
|
||||
parseJSON5,
|
||||
stringifyJSON5,
|
||||
parseJSONC,
|
||||
stringifyJSONC,
|
||||
parseYAML,
|
||||
stringifyYAML,
|
||||
parseJSON,
|
||||
stringifyJSON,
|
||||
parseTOML,
|
||||
stringifyTOML,
|
||||
} = require("confbox");
|
||||
```
|
||||
|
||||
**CDN** (Deno, Bun and Browsers)
|
||||
|
||||
```js
|
||||
import {
|
||||
parseJSON5,
|
||||
stringifyJSON5,
|
||||
parseJSONC,
|
||||
stringifyJSONC,
|
||||
parseYAML,
|
||||
stringifyYAML,
|
||||
parseJSON,
|
||||
stringifyJSON,
|
||||
parseTOML,
|
||||
stringifyTOML,
|
||||
} from "https://esm.sh/confbox";
|
||||
```
|
||||
|
||||
<!-- /automd -->
|
||||
|
||||
<!-- automd:jsdocs src="./src/index" -->
|
||||
|
||||
### `parseJSON(text, options?)`
|
||||
|
||||
Converts a [JSON](https://www.json.org/json-en.html) string into an object.
|
||||
|
||||
Indentation status is auto-detected and preserved when stringifying back using `stringifyJSON`
|
||||
|
||||
### `parseJSON5(text, options?)`
|
||||
|
||||
Converts a [JSON5](https://json5.org/) string into an object.
|
||||
|
||||
### `parseJSONC(text, options?)`
|
||||
|
||||
Converts a [JSONC](https://github.com/microsoft/node-jsonc-parser) string into an object.
|
||||
|
||||
### `parseTOML(text)`
|
||||
|
||||
Converts a [TOML](https://toml.io/) string into an object.
|
||||
|
||||
### `parseYAML(text, options?)`
|
||||
|
||||
Converts a [YAML](https://yaml.org/) string into an object.
|
||||
|
||||
### `stringifyJSON(value, options?)`
|
||||
|
||||
Converts a JavaScript value to a [JSON](https://www.json.org/json-en.html) string.
|
||||
|
||||
Indentation status is auto detected and preserved when using value from parseJSON.
|
||||
|
||||
### `stringifyJSON5(value, options?)`
|
||||
|
||||
Converts a JavaScript value to a [JSON5](https://json5.org/) string.
|
||||
|
||||
### `stringifyJSONC(value, options?)`
|
||||
|
||||
Converts a JavaScript value to a [JSONC](https://github.com/microsoft/node-jsonc-parser) string.
|
||||
|
||||
### `stringifyTOML(value)`
|
||||
|
||||
Converts a JavaScript value to a [TOML](https://toml.io/) string.
|
||||
|
||||
### `stringifyYAML(value, options?)`
|
||||
|
||||
Converts a JavaScript value to a [YAML](https://yaml.org/) string.
|
||||
|
||||
<!-- /automd -->
|
||||
|
||||
<!-- automd:fetch url="gh:unjs/.github/main/snippets/readme-contrib-node-pnpm.md" -->
|
||||
|
||||
## Contribution
|
||||
|
||||
<details>
|
||||
<summary>Local development</summary>
|
||||
|
||||
- Clone this repository
|
||||
- Install the latest LTS version of [Node.js](https://nodejs.org/en/)
|
||||
- Enable [Corepack](https://github.com/nodejs/corepack) using `corepack enable`
|
||||
- Install dependencies using `pnpm install`
|
||||
- Run tests using `pnpm dev` or `pnpm test`
|
||||
|
||||
</details>
|
||||
|
||||
<!-- /automd -->
|
||||
|
||||
## License
|
||||
|
||||
<!-- automd:contributors license=MIT author=pi0 -->
|
||||
|
||||
Published under the [MIT](https://github.com/unjs/confbox/blob/main/LICENSE) license.
|
||||
Made by [@pi0](https://github.com/pi0) and [community](https://github.com/unjs/confbox/graphs/contributors) 💛
|
||||
<br><br>
|
||||
<a href="https://github.com/unjs/confbox/graphs/contributors">
|
||||
<img src="https://contrib.rocks/image?repo=unjs/confbox" />
|
||||
</a>
|
||||
|
||||
<!-- /automd -->
|
||||
|
||||
<!-- automd:with-automd -->
|
||||
|
||||
---
|
||||
|
||||
_🤖 auto updated with [automd](https://automd.unjs.io)_
|
||||
|
||||
<!-- /automd -->
|
||||
2
node_modules/confbox/json5.d.ts
generated
vendored
Normal file
2
node_modules/confbox/json5.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export * from "./dist/json5";
|
||||
export { default } from "./dist/json5";
|
||||
2
node_modules/confbox/jsonc.d.ts
generated
vendored
Normal file
2
node_modules/confbox/jsonc.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export * from "./dist/jsonc";
|
||||
export { default } from "./dist/jsonc";
|
||||
86
node_modules/confbox/package.json
generated
vendored
Normal file
86
node_modules/confbox/package.json
generated
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
{
|
||||
"name": "confbox",
|
||||
"version": "0.1.8",
|
||||
"description": "Compact and high quality YAML, TOML, JSONC and JSON5 parsers",
|
||||
"keywords": [
|
||||
"yaml",
|
||||
"toml",
|
||||
"jsonc",
|
||||
"json5",
|
||||
"unjs",
|
||||
"config"
|
||||
],
|
||||
"repository": "unjs/confbox",
|
||||
"license": "MIT",
|
||||
"sideEffects": false,
|
||||
"type": "module",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"import": "./dist/index.mjs",
|
||||
"require": "./dist/index.cjs"
|
||||
},
|
||||
"./json5": {
|
||||
"types": "./dist/json5.d.ts",
|
||||
"import": "./dist/json5.mjs",
|
||||
"require": "./dist/json5.cjs"
|
||||
},
|
||||
"./jsonc": {
|
||||
"types": "./dist/jsonc.d.ts",
|
||||
"import": "./dist/jsonc.mjs",
|
||||
"require": "./dist/jsonc.cjs"
|
||||
},
|
||||
"./toml": {
|
||||
"types": "./dist/toml.d.ts",
|
||||
"import": "./dist/toml.mjs",
|
||||
"require": "./dist/toml.cjs"
|
||||
},
|
||||
"./yaml": {
|
||||
"types": "./dist/yaml.d.ts",
|
||||
"import": "./dist/yaml.mjs",
|
||||
"require": "./dist/yaml.cjs"
|
||||
}
|
||||
},
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts",
|
||||
"files": [
|
||||
"dist",
|
||||
"*.d.ts"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "unbuild",
|
||||
"dev": "vitest dev --coverage",
|
||||
"bench": "pnpm build && node test/bench.mjs",
|
||||
"lint": "eslint && prettier -c src test",
|
||||
"lint:fix": "eslint --fix && prettier -c src test -w",
|
||||
"prepack": "pnpm build",
|
||||
"release": "pnpm test && changelogen --release && npm publish && git push --follow-tags",
|
||||
"test": "pnpm lint && pnpm test:types && vitest run --coverage",
|
||||
"test:types": "tsc --noEmit --skipLibCheck"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/js-yaml": "^4.0.9",
|
||||
"@types/node": "^22.7.4",
|
||||
"@vitest/coverage-v8": "^2.1.2",
|
||||
"automd": "^0.3.10",
|
||||
"changelogen": "^0.5.7",
|
||||
"detect-indent": "^7.0.1",
|
||||
"eslint": "^9.12.0",
|
||||
"eslint-config-unjs": "^0.4.1",
|
||||
"jiti": "^2.3.1",
|
||||
"js-toml": "^1.0.0",
|
||||
"js-yaml": "^4.1.0",
|
||||
"json5": "^2.2.3",
|
||||
"jsonc-parser": "^3.3.1",
|
||||
"mitata": "^1.0.10",
|
||||
"prettier": "^3.3.3",
|
||||
"smol-toml": "^1.3.0",
|
||||
"toml": "^3.0.0",
|
||||
"typescript": "^5.6.2",
|
||||
"unbuild": "^2.0.0",
|
||||
"vitest": "^2.1.2",
|
||||
"yaml": "^2.5.1"
|
||||
},
|
||||
"packageManager": "pnpm@9.12.0"
|
||||
}
|
||||
2
node_modules/confbox/toml.d.ts
generated
vendored
Normal file
2
node_modules/confbox/toml.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export * from "./dist/toml";
|
||||
export { default } from "./dist/toml";
|
||||
2
node_modules/confbox/yaml.d.ts
generated
vendored
Normal file
2
node_modules/confbox/yaml.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export * from "./dist/yaml";
|
||||
export { default } from "./dist/yaml";
|
||||
Reference in New Issue
Block a user