🎉 initiate project *astro_rewrite*
This commit is contained in:
parent
ffd4d5e86c
commit
2ba37bfbe3
8658 changed files with 2268794 additions and 2538 deletions
1
node_modules/unist-util-generated/index.d.ts
generated
vendored
Normal file
1
node_modules/unist-util-generated/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {generated} from './lib/index.js'
|
||||
1
node_modules/unist-util-generated/index.js
generated
vendored
Normal file
1
node_modules/unist-util-generated/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {generated} from './lib/index.js'
|
||||
34
node_modules/unist-util-generated/lib/index.d.ts
generated
vendored
Normal file
34
node_modules/unist-util-generated/lib/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
/**
|
||||
* @typedef PointLike
|
||||
* @property {number | null | undefined} [line]
|
||||
* @property {number | null | undefined} [column]
|
||||
* @property {number | null | undefined} [offset]
|
||||
*
|
||||
* @typedef PositionLike
|
||||
* @property {PointLike | null | undefined} [start]
|
||||
* @property {PointLike | null | undefined} [end]
|
||||
*
|
||||
* @typedef NodeLike
|
||||
* @property {PositionLike | null | undefined} [position]
|
||||
*/
|
||||
/**
|
||||
* Check if `node` is generated.
|
||||
*
|
||||
* @param {NodeLike | null | undefined} [node]
|
||||
* Node to check.
|
||||
* @returns {boolean}
|
||||
* Whether `node` is generated (does not have positional info).
|
||||
*/
|
||||
export function generated(node?: NodeLike | null | undefined): boolean
|
||||
export type PointLike = {
|
||||
line?: number | null | undefined
|
||||
column?: number | null | undefined
|
||||
offset?: number | null | undefined
|
||||
}
|
||||
export type PositionLike = {
|
||||
start?: PointLike | null | undefined
|
||||
end?: PointLike | null | undefined
|
||||
}
|
||||
export type NodeLike = {
|
||||
position?: PositionLike | null | undefined
|
||||
}
|
||||
34
node_modules/unist-util-generated/lib/index.js
generated
vendored
Normal file
34
node_modules/unist-util-generated/lib/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
/**
|
||||
* @typedef PointLike
|
||||
* @property {number | null | undefined} [line]
|
||||
* @property {number | null | undefined} [column]
|
||||
* @property {number | null | undefined} [offset]
|
||||
*
|
||||
* @typedef PositionLike
|
||||
* @property {PointLike | null | undefined} [start]
|
||||
* @property {PointLike | null | undefined} [end]
|
||||
*
|
||||
* @typedef NodeLike
|
||||
* @property {PositionLike | null | undefined} [position]
|
||||
*/
|
||||
|
||||
/**
|
||||
* Check if `node` is generated.
|
||||
*
|
||||
* @param {NodeLike | null | undefined} [node]
|
||||
* Node to check.
|
||||
* @returns {boolean}
|
||||
* Whether `node` is generated (does not have positional info).
|
||||
*/
|
||||
export function generated(node) {
|
||||
return (
|
||||
!node ||
|
||||
!node.position ||
|
||||
!node.position.start ||
|
||||
!node.position.start.line ||
|
||||
!node.position.start.column ||
|
||||
!node.position.end ||
|
||||
!node.position.end.line ||
|
||||
!node.position.end.column
|
||||
)
|
||||
}
|
||||
22
node_modules/unist-util-generated/license
generated
vendored
Normal file
22
node_modules/unist-util-generated/license
generated
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
(The MIT License)
|
||||
|
||||
Copyright (c) 2016 Titus Wormer <tituswormer@gmail.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.
|
||||
73
node_modules/unist-util-generated/package.json
generated
vendored
Normal file
73
node_modules/unist-util-generated/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
{
|
||||
"name": "unist-util-generated",
|
||||
"version": "2.0.1",
|
||||
"description": "unist utility to check if a node is generated",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"unist",
|
||||
"unist-util",
|
||||
"util",
|
||||
"utility",
|
||||
"position",
|
||||
"location",
|
||||
"generated"
|
||||
],
|
||||
"repository": "syntax-tree/unist-util-generated",
|
||||
"bugs": "https://github.com/syntax-tree/unist-util-generated/issues",
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
},
|
||||
"author": "Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)",
|
||||
"contributors": [
|
||||
"Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)"
|
||||
],
|
||||
"sideEffects": false,
|
||||
"type": "module",
|
||||
"main": "index.js",
|
||||
"types": "index.d.ts",
|
||||
"files": [
|
||||
"lib/",
|
||||
"index.d.ts",
|
||||
"index.js"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@types/node": "^18.0.0",
|
||||
"c8": "^7.0.0",
|
||||
"prettier": "^2.0.0",
|
||||
"remark-cli": "^11.0.0",
|
||||
"remark-preset-wooorm": "^9.0.0",
|
||||
"type-coverage": "^2.0.0",
|
||||
"typescript": "^4.0.0",
|
||||
"xo": "^0.53.0"
|
||||
},
|
||||
"scripts": {
|
||||
"prepack": "npm run build && npm run format",
|
||||
"build": "tsc --build --clean && tsc --build && type-coverage",
|
||||
"format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix",
|
||||
"test-api": "node --conditions development test.js",
|
||||
"test-coverage": "c8 --check-coverage --100 --reporter lcov npm run test-api",
|
||||
"test": "npm run build && npm run format && npm run test-coverage"
|
||||
},
|
||||
"prettier": {
|
||||
"tabWidth": 2,
|
||||
"useTabs": false,
|
||||
"singleQuote": true,
|
||||
"bracketSpacing": false,
|
||||
"semi": false,
|
||||
"trailingComma": "none"
|
||||
},
|
||||
"xo": {
|
||||
"prettier": true
|
||||
},
|
||||
"remarkConfig": {
|
||||
"plugins": [
|
||||
"preset-wooorm"
|
||||
]
|
||||
},
|
||||
"typeCoverage": {
|
||||
"atLeast": 100,
|
||||
"detail": true,
|
||||
"strict": true
|
||||
}
|
||||
}
|
||||
194
node_modules/unist-util-generated/readme.md
generated
vendored
Normal file
194
node_modules/unist-util-generated/readme.md
generated
vendored
Normal file
|
|
@ -0,0 +1,194 @@
|
|||
# unist-util-generated
|
||||
|
||||
[![Build][build-badge]][build]
|
||||
[![Coverage][coverage-badge]][coverage]
|
||||
[![Downloads][downloads-badge]][downloads]
|
||||
[![Size][size-badge]][size]
|
||||
[![Sponsors][sponsors-badge]][collective]
|
||||
[![Backers][backers-badge]][collective]
|
||||
[![Chat][chat-badge]][chat]
|
||||
|
||||
[unist][] utility to check if a node is generated.
|
||||
|
||||
## Contents
|
||||
|
||||
* [What is this?](#what-is-this)
|
||||
* [When should I use this?](#when-should-i-use-this)
|
||||
* [Install](#install)
|
||||
* [Use](#use)
|
||||
* [API](#api)
|
||||
* [`generated(node)`](#generatednode)
|
||||
* [Types](#types)
|
||||
* [Compatibility](#compatibility)
|
||||
* [Related](#related)
|
||||
* [Contribute](#contribute)
|
||||
* [License](#license)
|
||||
|
||||
## What is this?
|
||||
|
||||
This utility can be used to check if a node is said to be
|
||||
[generated][generated-term].
|
||||
|
||||
## When should I use this?
|
||||
|
||||
You can use this utility to check is generated.
|
||||
Generated nodes were not in the source of the original file, and thus not
|
||||
authored by a human.
|
||||
This info can then be used to not emit lint messages for generated content.
|
||||
|
||||
You might also find the utility [`unist-util-position`][unist-util-position]
|
||||
useful to get clean positional info.
|
||||
To display positional info to users, use
|
||||
[`unist-util-stringify-position`][unist-util-stringify-position].
|
||||
|
||||
## Install
|
||||
|
||||
This package is [ESM only][esm].
|
||||
In Node.js (version 14.14+ and 16.0+), install with [npm][]:
|
||||
|
||||
```sh
|
||||
npm install unist-util-generated
|
||||
```
|
||||
|
||||
In Deno with [`esm.sh`][esmsh]:
|
||||
|
||||
```js
|
||||
import {generated} from 'https://esm.sh/unist-util-generated@2'
|
||||
```
|
||||
|
||||
In browsers with [`esm.sh`][esmsh]:
|
||||
|
||||
```html
|
||||
<script type="module">
|
||||
import {generated} from 'https://esm.sh/unist-util-generated@2?bundle'
|
||||
</script>
|
||||
```
|
||||
|
||||
## Use
|
||||
|
||||
```js
|
||||
import {generated} from 'unist-util-generated'
|
||||
|
||||
generated({}) // => true
|
||||
|
||||
generated({position: {start: {}, end: {}}}) // => true
|
||||
|
||||
generated({
|
||||
position: {start: {line: 1, column: 1}, end: {line: 1, column: 2}}
|
||||
}) // => false
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
This package exports the identifier [`generated`][generated].
|
||||
There is no default export.
|
||||
|
||||
### `generated(node)`
|
||||
|
||||
Check if `node` is generated.
|
||||
|
||||
###### Parameters
|
||||
|
||||
* `node` ([`Node`][node])
|
||||
— node to check
|
||||
|
||||
###### Returns
|
||||
|
||||
Whether `node` is generated (does not have positional info) (`boolean`).
|
||||
|
||||
## Types
|
||||
|
||||
This package is fully typed with [TypeScript][].
|
||||
It exports no additional types.
|
||||
|
||||
## Compatibility
|
||||
|
||||
Projects maintained by the unified collective are compatible with all maintained
|
||||
versions of Node.js.
|
||||
As of now, that is Node.js 14.14+ and 16.0+.
|
||||
Our projects sometimes work with older versions, but this is not guaranteed.
|
||||
|
||||
## Related
|
||||
|
||||
* [`unist-util-position`](https://github.com/syntax-tree/unist-util-position)
|
||||
— get the position of nodes
|
||||
* [`unist-util-source`](https://github.com/syntax-tree/unist-util-source)
|
||||
— get the source of a node or position
|
||||
* [`unist-util-remove-position`](https://github.com/syntax-tree/unist-util-remove-position)
|
||||
— remove `position`s
|
||||
* [`unist-util-stringify-position`](https://github.com/syntax-tree/unist-util-stringify-position)
|
||||
— serialize positional info
|
||||
|
||||
## Contribute
|
||||
|
||||
See [`contributing.md`][contributing] in [`syntax-tree/.github`][health] for
|
||||
ways to get started.
|
||||
See [`support.md`][support] for ways to get help.
|
||||
|
||||
This project has a [code of conduct][coc].
|
||||
By interacting with this repository, organization, or community you agree to
|
||||
abide by its terms.
|
||||
|
||||
## License
|
||||
|
||||
[MIT][license] © [Titus Wormer][author]
|
||||
|
||||
<!-- Definition -->
|
||||
|
||||
[build-badge]: https://github.com/syntax-tree/unist-util-generated/workflows/main/badge.svg
|
||||
|
||||
[build]: https://github.com/syntax-tree/unist-util-generated/actions
|
||||
|
||||
[coverage-badge]: https://img.shields.io/codecov/c/github/syntax-tree/unist-util-generated.svg
|
||||
|
||||
[coverage]: https://codecov.io/github/syntax-tree/unist-util-generated
|
||||
|
||||
[downloads-badge]: https://img.shields.io/npm/dm/unist-util-generated.svg
|
||||
|
||||
[downloads]: https://www.npmjs.com/package/unist-util-generated
|
||||
|
||||
[size-badge]: https://img.shields.io/bundlephobia/minzip/unist-util-generated.svg
|
||||
|
||||
[size]: https://bundlephobia.com/result?p=unist-util-generated
|
||||
|
||||
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
|
||||
|
||||
[backers-badge]: https://opencollective.com/unified/backers/badge.svg
|
||||
|
||||
[collective]: https://opencollective.com/unified
|
||||
|
||||
[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
|
||||
|
||||
[chat]: https://github.com/syntax-tree/unist/discussions
|
||||
|
||||
[npm]: https://docs.npmjs.com/cli/install
|
||||
|
||||
[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
|
||||
|
||||
[esmsh]: https://esm.sh
|
||||
|
||||
[typescript]: https://www.typescriptlang.org
|
||||
|
||||
[license]: license
|
||||
|
||||
[author]: https://wooorm.com
|
||||
|
||||
[health]: https://github.com/syntax-tree/.github
|
||||
|
||||
[contributing]: https://github.com/syntax-tree/.github/blob/main/contributing.md
|
||||
|
||||
[support]: https://github.com/syntax-tree/.github/blob/main/support.md
|
||||
|
||||
[coc]: https://github.com/syntax-tree/.github/blob/main/code-of-conduct.md
|
||||
|
||||
[unist]: https://github.com/syntax-tree/unist
|
||||
|
||||
[node]: https://github.com/syntax-tree/unist#node
|
||||
|
||||
[generated-term]: https://github.com/syntax-tree/unist#generated
|
||||
|
||||
[unist-util-position]: https://github.com/syntax-tree/unist-util-position
|
||||
|
||||
[unist-util-stringify-position]: https://github.com/syntax-tree/unist-util-stringify-position
|
||||
|
||||
[generated]: #generatednode
|
||||
Loading…
Add table
Add a link
Reference in a new issue