Website Structure

This commit is contained in:
supalerk-ar66 2026-01-13 10:46:40 +07:00
parent 62812f2090
commit 71f0676a62
22365 changed files with 4265753 additions and 791 deletions

21
Frontend-Learner/node_modules/errx/LICENCE generated vendored Normal file
View file

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2024 Daniel Roe
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.

61
Frontend-Learner/node_modules/errx/README.md generated vendored Normal file
View file

@ -0,0 +1,61 @@
# errx
[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![Github Actions][github-actions-src]][github-actions-href]
[![Codecov][codecov-src]][codecov-href]
> Zero dependency library to capture and parse stack traces in Node, Bun, Deno and more.
## Usage
Install package:
```sh
# npm
npm install errx
# pnpm
pnpm install errx
```
```js
import { captureRawStackTrace, captureStackTrace, parseRawStackTrace } from 'errx'
// returns raw string stack trace
captureRawStackTrace()
// returns parsed stack trace
captureStackTrace()
console.log(captureStackTrace())
// [{
// function: undefined,
// source: 'file:///code/danielroe/errx/playground/index.js',
// line: '5',
// column: '13'
// }]
```
## 💻 Development
- Clone this repository
- Enable [Corepack](https://github.com/nodejs/corepack) using `corepack enable`
- Install dependencies using `pnpm install`
- Run interactive tests using `pnpm dev`
## License
Made with ❤️
Published under [MIT License](./LICENCE).
<!-- Badges -->
[npm-version-src]: https://img.shields.io/npm/v/errx?style=flat-square
[npm-version-href]: https://npmjs.com/package/errx
[npm-downloads-src]: https://img.shields.io/npm/dm/errx?style=flat-square
[npm-downloads-href]: https://npmjs.com/package/errx
[github-actions-src]: https://img.shields.io/github/workflow/status/danielroe/errx/ci/main?style=flat-square
[github-actions-href]: https://github.com/danielroe/errx/actions?query=workflow%3Aci
[codecov-src]: https://img.shields.io/codecov/c/gh/danielroe/errx/main?style=flat-square
[codecov-href]: https://codecov.io/gh/danielroe/errx

11
Frontend-Learner/node_modules/errx/dist/index.d.ts generated vendored Normal file
View file

@ -0,0 +1,11 @@
interface ParsedTrace {
column?: number;
function?: string;
line?: number;
source: string;
}
declare function captureRawStackTrace(): string | undefined;
declare function captureStackTrace(): ParsedTrace[];
declare function parseRawStackTrace(stacktrace: string): ParsedTrace[];
export { type ParsedTrace, captureRawStackTrace, captureStackTrace, parseRawStackTrace };

46
Frontend-Learner/node_modules/errx/dist/index.js generated vendored Normal file
View file

@ -0,0 +1,46 @@
const IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[a-z]:[/\\]/i;
const LINE_RE = /^\s+at (?:(?<function>[^)]+) \()?(?<source>[^)]+)\)?$/u;
const SOURCE_RE = /^(?<source>.+):(?<line>\d+):(?<column>\d+)$/u;
function captureRawStackTrace() {
if (!Error.captureStackTrace) {
return;
}
const stack = new Error();
Error.captureStackTrace(stack);
return stack.stack;
}
function captureStackTrace() {
const stack = captureRawStackTrace();
return stack ? parseRawStackTrace(stack) : [];
}
function parseRawStackTrace(stacktrace) {
const trace = [];
for (const line of stacktrace.split("\n")) {
const parsed = LINE_RE.exec(line)?.groups;
if (!parsed) {
continue;
}
if (!parsed.source) {
continue;
}
const parsedSource = SOURCE_RE.exec(parsed.source)?.groups;
if (parsedSource) {
Object.assign(parsed, parsedSource);
}
if (IS_ABSOLUTE_RE.test(parsed.source)) {
parsed.source = `file://${parsed.source}`;
}
if (parsed.source === import.meta.url) {
continue;
}
for (const key of ["line", "column"]) {
if (parsed[key]) {
parsed[key] = Number(parsed[key]);
}
}
trace.push(parsed);
}
return trace;
}
export { captureRawStackTrace, captureStackTrace, parseRawStackTrace };

51
Frontend-Learner/node_modules/errx/package.json generated vendored Normal file
View file

@ -0,0 +1,51 @@
{
"name": "errx",
"type": "module",
"version": "0.1.0",
"description": "Zero dependency library to capture and parse stack traces in Node, Bun and Deno",
"license": "MIT",
"repository": "danielroe/errx",
"sideEffects": false,
"exports": {
".": "./dist/index.js"
},
"main": "./dist/index.js",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"dist"
],
"devDependencies": {
"@antfu/eslint-config": "latest",
"@types/node": "^20.14.9",
"@vitest/coverage-v8": "latest",
"bumpp": "latest",
"eslint": "latest",
"lint-staged": "latest",
"simple-git-hooks": "latest",
"typescript": "latest",
"unbuild": "latest",
"vite": "latest",
"vitest": "latest"
},
"resolutions": {
"errx": "link:."
},
"simple-git-hooks": {
"pre-commit": "npx lint-staged"
},
"lint-staged": {
"*.{js,ts,mjs,cjs,json,.*rc}": [
"pnpm eslint --fix"
]
},
"scripts": {
"build": "unbuild",
"dev": "vitest dev",
"lint": "eslint . --fix",
"release": "bumpp && pnpm publish",
"test": "pnpm test:unit && pnpm test:types",
"test:unit": "vitest",
"test:types": "tsc --noEmit"
}
}