Update from Vibe Studio

This commit is contained in:
Vibe Studio
2026-01-16 01:51:36 +00:00
parent a4605e311a
commit 58905d02c2
28599 changed files with 2179074 additions and 0 deletions

21
node_modules/untruncate-json/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2019 David Philipson
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.

85
node_modules/untruncate-json/README.md generated vendored Normal file
View File

@@ -0,0 +1,85 @@
# untruncate-json
Fix up the end of a partial JSON string to create valid JSON.
[![Build Status](https://travis-ci.com/dphilipson/untruncate-json.svg?branch=master)](https://travis-ci.com/dphilipson/untruncate-json)
## Motivation
Have you ever been given a string that started off as valid JSON, but was then
truncated to fit under some maximum length? And even though it was invalid JSON
because it was cut off in the middle, you still wanted to parse it as JSON
anyways so you could extract what information you could from it?
No?
Well if you ever do, then this is the library for you!
## Installation
With NPM:
```
npm install untruncate-json
```
With Yarn:
```
yarn add untruncate-json
```
## Usage
Import the `untruncateJson` function:
```ts
import untruncateJson from "untruncate-json";
```
Call it on a truncated JSON string to get a complete, valid JSON string:
```ts
untruncateJson("[1, 2"); // -> "[1, 2]"
untruncateJson('"Hello, Wor'); // -> '"Hello, Wor"'
untruncateJson('{"votes": [true, fa'); // -> '{"votes": [true, false]}'
untruncateJson("123."); // -> "123.0"
```
`untruncateJson` will sometimes remove characters as well, if there was no way
to infer what value they were starting:
```ts
untruncateJson("[1, 2, "); // -> "[1, 2]"
untruncateJson('"abc\\'); // -> '"abc"'
untruncateJson('{"x": 20, "y": '); // -> '{"x": 20}'
```
Check the [test
cases](https://github.com/dphilipson/untruncate-json/blob/master/test/index.test.ts)
for many more examples.
## Guarantees
- As long as the input is the prefix of a valid JSON string and is not entirely
whitespace, the output will be valid JSON.
- This takes into account all parts of the JSON spec, including rules around
exponents in numbers, Unicode escape sequences in strings, and so forth.
- **`untruncateJson` does not attempt to validate the input JSON.** Therefore if
the input JSON is not the prefix of valid JSON, then the output will not be
valid JSON and will fail if you try to parse it.
- The output will always contain as many correct values as can be determined
under the assumption that the input was indeed the prefix of valid JSON. For
example, if the input is cut off after a bare `t`, then `truncateJson` will
assume that it was the start of the token `true`.
- The last value appearing in the output JSON may have an incorrect value, for
example if it is a truncated number or string. However, it will never have the
incorrect _type_, e.g. if the input contained a string in that position, so
will the output.
- In cases where the type of the last value cannot be inferred, then characters
are removed from the end of the input as needed to avoid making a potentially
incorrect guess. For example, if the truncation occurs after an object key but
before any part of its corresponding value, then the entire key will be
removed.
Copyright © 2019 David Philipson

67
node_modules/untruncate-json/package.json generated vendored Normal file
View File

@@ -0,0 +1,67 @@
{
"name": "untruncate-json",
"version": "0.0.1",
"description": "Fix up the end of a partial JSON string to create valid JSON.",
"module": "dist/esm/index.js",
"main": "dist/cjs/index.js",
"types": "dist/esm/index.d.ts",
"files": [
"dist/"
],
"sideEffects": false,
"repository": {
"type": "git",
"url": "git://github.com/dphilipson/untruncate-json.git"
},
"keywords": [
"json",
"untruncate",
"truncate",
"validate"
],
"homepage": "https://github.com/dphilipson/untruncate-json",
"bugs": {
"url": "https://github.com/dphilipson/untruncate-json/issues",
"email": "david.philipson@gmail.com"
},
"author": "David Philipson <david.philipson@gmail.com> (http://dphil.me)",
"license": "MIT",
"scripts": {
"build": "yarn run clean && tsc -p tsconfig.build-esm.json && tsc -p tsconfig.build-cjs.json",
"clean": "rm -rf dist/*",
"format-file": "prettier --write",
"format": "prettier --write '**/*.{html,js,jsx,json,md,ts,tsx}",
"jest": "jest",
"lint-file": "tslint",
"lint": "tslint --project .",
"prepublishOnly": "yarn run test && yarn run build",
"test": "yarn run lint && tsc && yarn run jest"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"**/*.{js,json}": [
"yarn run format-file",
"git add"
],
"**/*.ts": [
"yarn run lint-file --fix",
"yarn run format-file",
"git add"
]
},
"devDependencies": {
"@types/jest": "^24.0.22",
"husky": "^3.0.9",
"jest": "^24.9.0",
"lint-staged": "^9.4.2",
"prettier": "^1.18.2",
"ts-jest": "^24.1.0",
"tslint": "^5.20.1",
"tslint-config-prettier": "^1.18.0",
"typescript": "^3.7.2"
}
}