Fix bin/publish: copy docs.dist from project root

Fix bin/publish: use correct .env path for rspade_system
Fix bin/publish script: prevent grep exit code 1 from terminating script

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2025-10-21 02:08:33 +00:00
commit f6fac6c4bc
79758 changed files with 10547827 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
'use strict'
module.exports = parse
var search = /[#.]/g
// Create a hast element from a simple CSS selector.
function parse(selector, defaultTagName) {
var value = selector || ''
var name = defaultTagName || 'div'
var props = {}
var start = 0
var subvalue
var previous
var match
while (start < value.length) {
search.lastIndex = start
match = search.exec(value)
subvalue = value.slice(start, match ? match.index : value.length)
if (subvalue) {
if (!previous) {
name = subvalue
} else if (previous === '#') {
props.id = subvalue
} else if (props.className) {
props.className.push(subvalue)
} else {
props.className = [subvalue]
}
start += subvalue.length
}
if (match) {
previous = match[0]
start++
}
}
return {type: 'element', tagName: name, properties: props, children: []}
}

View 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.

View File

@@ -0,0 +1,136 @@
# hast-util-parse-selector
[![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]
[**hast**][hast] utility to create an [*element*][element] from a simple CSS
selector.
## Install
[npm][]:
```sh
npm install hast-util-parse-selector
```
## Use
```js
var parseSelector = require('hast-util-parse-selector')
console.log(parseSelector('.quux#bar.baz.qux'))
```
Yields:
```js
{ type: 'element',
tagName: 'div',
properties: { id: 'bar', className: [ 'quux', 'baz', 'qux' ] },
children: [] }
```
## API
### `parseSelector([selector][, defaultTagName])`
Create an [*element*][element] [*node*][node] from a simple CSS selector.
###### `selector`
`string`, optional — Can contain a tag-name (`foo`), classes (`.bar`),
and an ID (`#baz`).
Multiple classes are allowed.
Uses the last ID if multiple IDs are found.
###### `defaultTagName`
`string`, optional, defaults to `div` — Tag name to use if `selector` does not
specify one.
###### Returns
[`Element`][element].
## Security
Improper use of the `selector` or `defaultTagName` can open you up to a
[cross-site scripting (XSS)][xss] attack as the value of `tagName`, when
resolving to `script`, injects a `script` element into the syntax tree.
Do not use user input in `selector` or use [`hast-util-santize`][sanitize].
## Related
* [`hast-util-from-selector`](https://github.com/syntax-tree/hast-util-from-selector)
— parse complex CSS selectors to nodes
## Contribute
See [`contributing.md` in `syntax-tree/.github`][contributing] 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]
<!-- Definitions -->
[build-badge]: https://img.shields.io/travis/syntax-tree/hast-util-parse-selector.svg
[build]: https://travis-ci.org/syntax-tree/hast-util-parse-selector
[coverage-badge]: https://img.shields.io/codecov/c/github/syntax-tree/hast-util-parse-selector.svg
[coverage]: https://codecov.io/github/syntax-tree/hast-util-parse-selector
[downloads-badge]: https://img.shields.io/npm/dm/hast-util-parse-selector.svg
[downloads]: https://www.npmjs.com/package/hast-util-parse-selector
[size-badge]: https://img.shields.io/bundlephobia/minzip/hast-util-parse-selector.svg
[size]: https://bundlephobia.com/result?p=hast-util-parse-selector
[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
[license]: license
[author]: https://wooorm.com
[contributing]: https://github.com/syntax-tree/.github/blob/HEAD/contributing.md
[support]: https://github.com/syntax-tree/.github/blob/HEAD/support.md
[coc]: https://github.com/syntax-tree/.github/blob/HEAD/code-of-conduct.md
[hast]: https://github.com/syntax-tree/hast
[node]: https://github.com/syntax-tree/hast#nodes
[element]: https://github.com/syntax-tree/hast#element
[xss]: https://en.wikipedia.org/wiki/Cross-site_scripting
[sanitize]: https://github.com/syntax-tree/hast-util-sanitize