first commit

This commit is contained in:
2026-04-11 16:59:16 +02:00
commit db373625f5
646 changed files with 576140 additions and 0 deletions

22
node_modules/std-env/LICENCE generated vendored Normal file
View File

@@ -0,0 +1,22 @@
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.

91
node_modules/std-env/README.md generated vendored Normal file
View File

@@ -0,0 +1,91 @@
# std-env
[![npm version](https://img.shields.io/npm/v/std-env.svg?style=flat-square)](http://npmjs.com/package/std-env)
[![npm downloads](https://img.shields.io/npm/dm/std-env.svg?style=flat-square)](http://npmjs.com/package/std-env)
[![bundle size](https://img.shields.io/bundlephobia/min/std-env/latest.svg?style=flat-square)](https://bundlephobia.com/result?p=std-env)
Runtime-agnostic JS utils for detecting environments, runtimes, CI providers, and AI coding agents.
## Runtime Detection
Detects the current JavaScript runtime based on global variables, following the [WinterCG Runtime Keys proposal](https://runtime-keys.proposal.wintercg.org/).
```ts
import { runtime, runtimeInfo } from "std-env";
console.log(runtime); // "" | "node" | "deno" | "bun" | "workerd" ...
console.log(runtimeInfo); // { name: "node" }
```
Individual named exports: `isNode`, `isBun`, `isDeno`, `isNetlify`, `isEdgeLight`, `isWorkerd`, `isFastly`
> [!NOTE]
> `isNode` is also `true` in Bun/Deno with Node.js compatibility mode. Use `runtime === "node"` for strict checks.
See [./src/runtimes.ts](./src/runtimes.ts) for the full list.
## Provider Detection
Detects the current CI/CD provider based on environment variables.
```ts
import { isCI, provider, providerInfo } from "std-env";
console.log({ isCI, provider, providerInfo });
// { isCI: true, provider: "github_actions", providerInfo: { name: "github_actions", ci: true } }
```
Use `detectProvider()` to re-run detection. See [./src/providers.ts](./src/providers.ts) for the full list.
## Agent Detection
Detects if the environment is running inside an AI coding agent.
```ts
import { isAgent, agent, agentInfo } from "std-env";
console.log({ isAgent, agent, agentInfo });
// { isAgent: true, agent: "claude", agentInfo: { name: "claude" } }
```
Set the `AI_AGENT` env var to explicitly specify the agent name. Use `detectAgent()` to re-run detection.
Supported agents: `cursor`, `claude`, `devin`, `replit`, `gemini`, `codex`, `auggie`, `opencode`, `kiro`, `goose`, `pi`
## Flags
```js
import { env, isDevelopment, isProduction } from "std-env";
```
| Export | Description |
| ------------------ | ------------------------------------------------------------ |
| `hasTTY` | stdout TTY is available |
| `hasWindow` | Global `window` is available |
| `isCI` | Running in CI |
| `isColorSupported` | Terminal color output supported |
| `isDebug` | `DEBUG` env var is set |
| `isDevelopment` | `NODE_ENV` is `dev`/`development` or `MODE` is `development` |
| `isLinux` | Linux platform |
| `isMacOS` | macOS (darwin) platform |
| `isMinimal` | `MINIMAL` env is set, CI, test, or no TTY |
| `isProduction` | `NODE_ENV` or `MODE` is `production` |
| `isTest` | `NODE_ENV` is `test` or `TEST` env is set |
| `isWindows` | Windows platform |
| `platform` | Value of `process.platform` |
| `nodeVersion` | Node.js version string (e.g. `"22.0.0"`) |
| `nodeMajorVersion` | Node.js major version number (e.g. `22`) |
See [./src/flags.ts](./src/flags.ts) for details.
## Environment
| Export | Description |
| --------- | ---------------------------------------------------- |
| `env` | Universal `process.env` (works across all runtimes) |
| `process` | Universal `process` shim (works across all runtimes) |
| `nodeENV` | Current `NODE_ENV` value (undefined if unset) |
## License
MIT

42
node_modules/std-env/package.json generated vendored Normal file
View File

@@ -0,0 +1,42 @@
{
"name": "std-env",
"version": "4.0.0",
"description": "Runtime agnostic JS utils",
"license": "MIT",
"repository": "unjs/std-env",
"files": [
"dist"
],
"type": "module",
"sideEffects": false,
"main": "./dist/index.mjs",
"types": "./dist/index.d.mts",
"exports": {
".": "./dist/index.mjs"
},
"scripts": {
"build": "obuild",
"dev": "vitest",
"lint": "oxlint . && oxfmt",
"lint:fix": "oxlint --fix . && oxfmt",
"prepack": "obuild",
"release": "pnpm test && pnpm build && changelogen --release --publish && git push --follow-tags",
"test": "pnpm lint && pnpm typecheck && vitest run --coverage",
"typecheck": "tsgo --noEmit"
},
"devDependencies": {
"@types/node": "^25.2.3",
"@typescript/native-preview": "^7.0.0-dev.20260217.1",
"@vitest/coverage-v8": "^4.0.18",
"changelogen": "^0.6.2",
"esbuild": "^0.27.3",
"mitata": "^1.0.34",
"obuild": "^0.4.28",
"oxfmt": "^0.33.0",
"oxlint": "^1.48.0",
"rollup": "^4.57.1",
"typescript": "^5.9.3",
"vitest": "^4.0.18"
},
"packageManager": "pnpm@10.30.0"
}