🎉 initiate project *astro_rewrite*

This commit is contained in:
sindrekjelsrud 2023-07-19 21:31:30 +02:00
parent ffd4d5e86c
commit 2ba37bfbe3
8658 changed files with 2268794 additions and 2538 deletions

21
node_modules/which-pm/LICENSE generated vendored Normal file
View file

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2017-present Zoltan Kochan <z@kochan.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.

34
node_modules/which-pm/README.md generated vendored Normal file
View file

@ -0,0 +1,34 @@
# which-pm
> Detects what package manager was used for installation
[![npm version](https://img.shields.io/npm/v/which-pm.svg)](https://www.npmjs.com/package/which-pm)
Can detect [npm](https://github.com/npm/cli), [pnpm](https://github.com/pnpm/pnpm) and [yarn](https://github.com/yarnpkg/yarn).
## Installation
```bash
<pnpm|yarn|npm> add which-pm
```
## Usage
```js
'use strict'
const whichpm = require('which-pm')
whichpm(process.cwd())
.then(pm => console.log(pm))
.catch(err => console.error(err))
//> {name: "pnpm", version: "0.64.2"}
```
## Related
* [preferred-pm](https://github.com/zkochan/packages/tree/master/preferred-pm) - Returns the preferred package manager of a project
* [which-pm-runs](https://github.com/zkochan/packages/tree/master/which-pm-runs) - Detects what package manager executes the process
## License
[MIT](LICENSE) © [Zoltan Kochan](https://kochan.io)

25
node_modules/which-pm/index.d.ts generated vendored Normal file
View file

@ -0,0 +1,25 @@
declare function whichpm (pkgPath: string): Promise<whichpm.Result>
declare namespace whichpm {
type Result = NPM | YARN | PNPM | Other
interface NPM {
readonly name: 'npm'
}
interface YARN {
readonly name: 'yarn'
}
interface PNPM {
readonly name: 'pnpm'
readonly version: string
}
interface Other {
readonly name: string
readonly version?: string
}
}
export = whichpm

36
node_modules/which-pm/index.js generated vendored Normal file
View file

@ -0,0 +1,36 @@
'use strict'
const path = require('path')
const pathExists = require('path-exists')
const loadYamlFile = require('load-yaml-file')
module.exports = async function (pkgPath) {
const modulesPath = path.join(pkgPath, 'node_modules')
const exists = await pathExists(path.join(modulesPath, '.yarn-integrity'))
if (exists) return { name: 'yarn' }
try {
const modules = await loadYamlFile(path.join(modulesPath, '.modules.yaml'))
return toNameAndVersion(modules.packageManager)
} catch (err) {
if (err.code !== 'ENOENT') throw err
}
const modulesExists = await pathExists(modulesPath)
return modulesExists ? { name: 'npm' } : null
}
function toNameAndVersion (pkgSpec) {
if (pkgSpec[0] === '@') {
const woPrefix = pkgSpec.substr(1)
const parts = woPrefix.split('@')
return {
name: `@${parts[0]}`,
version: parts[1]
}
}
const parts = pkgSpec.split('@')
return {
name: parts[0],
version: parts[1]
}
}

37
node_modules/which-pm/package.json generated vendored Normal file
View file

@ -0,0 +1,37 @@
{
"name": "which-pm",
"version": "2.0.0",
"description": "Detects what package manager was used for installation",
"main": "index.js",
"types": "index.d.ts",
"files": [
"index.js",
"index.d.ts"
],
"scripts": {
"test": "standard && preview && node test"
},
"engines": {
"node": ">=8.15"
},
"repository": "https://github.com/zkochan/packages/tree/master/which-pm",
"bugs": {
"url": "https://github.com/zkochan/packages/labels/package%3A%20which-pm"
},
"keywords": [
"npm",
"pnpm",
"yarn"
],
"author": "Zoltan Kochan",
"license": "MIT",
"dependencies": {
"load-yaml-file": "^0.2.0",
"path-exists": "^4.0.0"
},
"devDependencies": {
"package-preview": "2.0.0",
"standard": "^12.0.1",
"tape": "^4.8.0"
}
}