added orai

This commit is contained in:
szabomarton
2025-03-11 12:57:30 +01:00
parent 13254e5623
commit fe52ae8683
2177 changed files with 289592 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
/**
Check if your code is running as an [npm](https://docs.npmjs.com/misc/scripts) or [yarn](https://yarnpkg.com/lang/en/docs/cli/run/) script.
@example
```
import {isNpmOrYarn} from 'is-npm';
if (isNpmOrYarn) {
console.log('Running as an npm or yarn script!');
}
```
*/
export const isNpmOrYarn: boolean;
/**
Check if your code is running as an [npm](https://docs.npmjs.com/misc/scripts) script.
@example
```
import {isNpm} from 'is-npm';
if (isNpm) {
console.log('Running as an npm script!');
}
```
*/
export const isNpm: boolean;
/**
Check if your code is running as a [yarn](https://yarnpkg.com/lang/en/docs/cli/run/) script.
@example
```
import {isYarn} from 'is-npm';
if (isYarn) {
console.log('Running as a yarn script!');
}
```
*/
export const isYarn: boolean;

View File

@@ -0,0 +1,11 @@
'use strict';
const packageJson = process.env.npm_package_json;
const userAgent = process.env.npm_config_user_agent;
const isYarn = Boolean(userAgent && userAgent.startsWith('yarn'));
const isNpm = Boolean(userAgent && userAgent.startsWith('npm'));
const isNpm7 = Boolean(packageJson && packageJson.endsWith('package.json'));
module.exports.isNpmOrYarn = isNpm || isNpm7 || isYarn;
module.exports.isNpm = isNpm || isNpm7;
module.exports.isYarn = isYarn;

View File

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

@@ -0,0 +1,71 @@
{
"_from": "is-npm@^5.0.0",
"_id": "is-npm@5.0.0",
"_inBundle": false,
"_integrity": "sha512-WW/rQLOazUq+ST/bCAVBp/2oMERWLsR7OrKyt052dNDk4DHcDE0/7QSXITlmi+VBcV13DfIbysG3tZJm5RfdBA==",
"_location": "/is-npm",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "is-npm@^5.0.0",
"name": "is-npm",
"escapedName": "is-npm",
"rawSpec": "^5.0.0",
"saveSpec": null,
"fetchSpec": "^5.0.0"
},
"_requiredBy": [
"/update-notifier"
],
"_resolved": "https://registry.npmjs.org/is-npm/-/is-npm-5.0.0.tgz",
"_shasum": "43e8d65cc56e1b67f8d47262cf667099193f45a8",
"_spec": "is-npm@^5.0.0",
"_where": "D:\\rud\\kodtarak\\14d_frontend_2021\\chinook\\node_modules\\update-notifier",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "https://sindresorhus.com"
},
"bugs": {
"url": "https://github.com/sindresorhus/is-npm/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "Check if your code is running as an npm script",
"devDependencies": {
"ava": "^2.4.0",
"tsd": "^0.11.0",
"xo": "^0.30.0"
},
"engines": {
"node": ">=10"
},
"files": [
"index.js",
"index.d.ts"
],
"funding": "https://github.com/sponsors/sindresorhus",
"homepage": "https://github.com/sindresorhus/is-npm#readme",
"keywords": [
"npm",
"yarn",
"is",
"check",
"detect",
"env",
"environment",
"run",
"script"
],
"license": "MIT",
"name": "is-npm",
"repository": {
"type": "git",
"url": "git+https://github.com/sindresorhus/is-npm.git"
},
"scripts": {
"test": "xo && ava && tsd"
},
"version": "5.0.0"
}

View File

@@ -0,0 +1,60 @@
# is-npm [![Build Status](https://travis-ci.com/sindresorhus/is-npm.svg?branch=master)](https://travis-ci.com/sindresorhus/is-npm)
> Check if your code is running as an [npm](https://docs.npmjs.com/misc/scripts) or [yarn](https://yarnpkg.com/lang/en/docs/cli/run/) script
## Install
```
$ npm install is-npm
```
## Usage
```js
const {isNpmOrYarn, isNpm, isYarn} = require('is-npm');
console.table({isNpmOrYarn, isNpm, isYarn});
```
```sh
$ node foo.js
# ┌─────────────┬────────┐
# │ (index) │ Values │
# ├─────────────┼────────┤
# │ isNpmOrYarn │ false │
# │ isNpm │ false │
# │ isYarn │ false │
# └─────────────┴────────┘
$ npm run foo
# ┌─────────────┬────────┐
# │ (index) │ Values │
# ├─────────────┼────────┤
# │ isNpmOrYarn │ true │
# │ isNpm │ true │
# │ isYarn │ false │
# └─────────────┴────────┘
$ yarn run foo
# ┌─────────────┬────────┐
# │ (index) │ Values │
# ├─────────────┼────────┤
# │ isNpmOrYarn │ true │
# │ isNpm │ false │
# │ isYarn │ true │
# └─────────────┴────────┘
```
## Related
- [is-npm-cli](https://github.com/sindresorhus/is-npm-cli) - CLI for this module
---
<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-is-npm?utm_source=npm-is-npm&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
</b>
<br>
<sub>
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
</sub>
</div>