删除 node_modules

This commit is contained in:
2025-06-22 17:27:35 +08:00
parent ebcd00ed99
commit 912d2d4a12
3852 changed files with 0 additions and 1061355 deletions

View File

@@ -1,5 +0,0 @@
#!/usr/bin/env node
import process from 'node:process';
import isInsideContainer from './index.js';
process.exitCode = isInsideContainer() ? 0 : 2;

View File

@@ -1,13 +0,0 @@
/**
Check if the process is running inside a container.
@example
```
import isInsideContainer from 'is-inside-container';
if (isInsideContainer()) {
console.log('Running inside a container');
}
```
*/
export default function isInsideContainer(): boolean;

View File

@@ -1,23 +0,0 @@
import fs from 'node:fs';
import isDocker from 'is-docker';
let cachedResult;
// Podman detection
const hasContainerEnv = () => {
try {
fs.statSync('/run/.containerenv');
return true;
} catch {
return false;
}
};
export default function isInsideContainer() {
// TODO: Use `??=` when targeting Node.js 16.
if (cachedResult === undefined) {
cachedResult = hasContainerEnv() || isDocker();
}
return cachedResult;
}

View File

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

View File

@@ -1,51 +0,0 @@
{
"name": "is-inside-container",
"version": "1.0.0",
"description": "Check if the process is running inside a container (Docker/Podman)",
"license": "MIT",
"repository": "sindresorhus/is-inside-container",
"funding": "https://github.com/sponsors/sindresorhus",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "https://sindresorhus.com"
},
"type": "module",
"exports": {
"types": "./index.d.ts",
"default": "./index.js"
},
"bin": "./cli.js",
"engines": {
"node": ">=14.16"
},
"scripts": {
"test": "xo && NODE_OPTIONS='--loader=esmock --no-warnings' ava && tsd"
},
"files": [
"index.js",
"index.d.ts",
"cli.js"
],
"keywords": [
"detect",
"inside",
"container",
"docker",
"dockerized",
"podman",
"is",
"env",
"environment",
"process"
],
"dependencies": {
"is-docker": "^3.0.0"
},
"devDependencies": {
"ava": "^5.2.0",
"esmock": "^2.1.0",
"tsd": "^0.25.0",
"xo": "^0.53.1"
}
}

View File

@@ -1,36 +0,0 @@
# is-inside-container
> Check if the process is running inside a container
## Install
```sh
npm install is-inside-container
```
## Usage
```js
import isInsideContainer from 'is-inside-container';
if (isInsideContainer()) {
console.log('Running inside a container');
}
```
## CLI
```sh
is-inside-container
```
Exits with code 0 if inside a container and 2 if not.
## Supported containers
- Docker
- Podman
## Related
- [is-docker](https://github.com/sindresorhus/is-docker) - Check if the process is running inside a Docker container