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,117 @@
# @rollup/plugin-json ChangeLog
## v4.1.0
_2020-06-05_
### Features
- feat: log the filename when JSON.parse fails (#417)
## v4.0.3
_2020-04-19_
### Updates
- chore: add rollup 2 to peer range (06d9d29)
## v4.0.2
_2020-02-01_
### Bugfixes
- fix: correct type definitions (#161)
### Updates
- chore: update dependencies (e1d317b)
## 4.0.1
_2019-12-21_
- fix(json): cannot be imported by rollup (#81)
## 4.0.0
_2019-03-18_
- Pass all JSON data through dataToEsm to consistently support "compact" formatting, support empty keys, abandon Node 4 support, add prettier, update dependencies ([#53](https://github.com/rollup/rollup-plugin-json/issues/53))
## 3.1.0
_2018-09-13_
- Expose "compact" and "namedExports" options ([#45](https://github.com/rollup/rollup-plugin-json/issues/45))
- Update rollup-pluginutils to support null values in JSON ([#44](https://github.com/rollup/rollup-plugin-json/issues/44))
- Update dependencies and ensure rollup@1.0 compatibility ([#46](https://github.com/rollup/rollup-plugin-json/issues/46))
## 3.0.0
_2018-05-11_
- No longer create a fake AST to support tree-shaking with upcoming versions of rollup ([#41](https://github.com/rollup/rollup-plugin-json/issues/41))
## 2.3.1
_2018-05-11_
- Update example in readme ([#38](https://github.com/rollup/rollup-plugin-json/issues/38))
- Warn when using this version with upcoming rollup versions
## 2.3.0
_2017-06-03_
- Always parse JSON, so malformed JSON is identified at bundle time ([#27](https://github.com/rollup/rollup-plugin-json/issues/27))
## 2.2.0
_2017-06-03_
- Add `indent` option ([#24](https://github.com/rollup/rollup-plugin-json/issues/24))
## 2.1.1
_2017-04-09_
- Add license to package.json ([#25](https://github.com/rollup/rollup-plugin-json/pull/25))
## 2.1.0
_2016-12-15_
- Add support for `preferConst` option ([#16](https://github.com/rollup/rollup-plugin-json/pull/16))
- Handle JSON files with no valid identifier keys ([#19](https://github.com/rollup/rollup-plugin-json/issues/19))
## 2.0.2
_2016-09-07_
- Generate correct fake AST
## 2.0.1
_2016-06-23_
- Return a `name`
## 2.0.0
_2015-11-05_
- Generate fake AST to avoid unnecessary traversals within Rollup
## 1.1.0
_unpublished_
- Generate named exports alongside default exports
## 1.0.0
_2015-10-25_
- First release

View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2019 RollupJS Plugin Contributors (https://github.com/rollup/plugins/graphs/contributors)
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,101 @@
[npm]: https://img.shields.io/npm/v/@rollup/plugin-json
[npm-url]: https://www.npmjs.com/package/@rollup/plugin-json
[size]: https://packagephobia.now.sh/badge?p=@rollup/plugin-json
[size-url]: https://packagephobia.now.sh/result?p=@rollup/plugin-json
[![npm][npm]][npm-url]
[![size][size]][size-url]
[![libera manifesto](https://img.shields.io/badge/libera-manifesto-lightgrey.svg)](https://liberamanifesto.com)
# @rollup/plugin-json
🍣 A Rollup plugin which Converts .json files to ES6 modules.
## Requirements
This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v8.0.0+) and Rollup v1.20.0+.
## Install
Using npm:
```console
npm install @rollup/plugin-json --save-dev
```
## Usage
Create a `rollup.config.js` [configuration file](https://www.rollupjs.org/guide/en/#configuration-files) and import the plugin:
```js
import json from '@rollup/plugin-json';
export default {
input: 'src/index.js',
output: {
dir: 'output',
format: 'cjs'
},
plugins: [json()]
};
```
Then call `rollup` either via the [CLI](https://www.rollupjs.org/guide/en/#command-line-reference) or the [API](https://www.rollupjs.org/guide/en/#javascript-api).
With an accompanying file `src/index.js`, the local `package.json` file would now be importable as seen below:
```js
// src/index.js
import pkg from './package.json';
console.log(`running version ${pkg.version}`);
```
## Options
### `compact`
Type: `Boolean`<br>
Default: `false`
If `true`, instructs the plugin to ignore `indent` and generates the smallest code.
### `exclude`
Type: `String` | `Array[...String]`<br>
Default: `null`
A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files in the build the plugin should _ignore_. By default no files are ignored.
### `include`
Type: `String` | `Array[...String]`<br>
Default: `null`
A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files in the build the plugin should operate on. By default all files are targeted.
### `indent`
Type: `String`<br>
Default: `'\t'`
Specifies the indentation for the generated default export.
### `namedExports`
Type: `Boolean`<br>
Default: `true`
If `true`, instructs the plugin to generate a named export for every property of the JSON object.
### `preferConst`
Type: `Boolean`<br>
Default: `false`
If `true`, instructs the plugin to declare properties as variables, using either `var` or `const`. This pertains to tree-shaking.
## Meta
[CONTRIBUTING](/.github/CONTRIBUTING.md)
[LICENSE (MIT)](/LICENSE)

View File

@@ -0,0 +1,38 @@
import { createFilter, dataToEsm } from '@rollup/pluginutils';
function json(options) {
if ( options === void 0 ) options = {};
var filter = createFilter(options.include, options.exclude);
var indent = 'indent' in options ? options.indent : '\t';
return {
name: 'json',
// eslint-disable-next-line no-shadow
transform: function transform(json, id) {
if (id.slice(-5) !== '.json' || !filter(id)) { return null; }
try {
var parsed = JSON.parse(json);
return {
code: dataToEsm(parsed, {
preferConst: options.preferConst,
compact: options.compact,
namedExports: options.namedExports,
indent: indent
}),
map: { mappings: '' }
};
} catch (err) {
var message = 'Could not parse JSON file';
var position = parseInt(/[\d]/.exec(err.message)[0], 10);
this.warn({ message: message, id: id, position: position });
return null;
}
}
};
}
export default json;
//# sourceMappingURL=index.es.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.es.js","sources":["../src/index.js"],"sourcesContent":["import { createFilter, dataToEsm } from '@rollup/pluginutils';\n\nexport default function json(options = {}) {\n const filter = createFilter(options.include, options.exclude);\n const indent = 'indent' in options ? options.indent : '\\t';\n\n return {\n name: 'json',\n\n // eslint-disable-next-line no-shadow\n transform(json, id) {\n if (id.slice(-5) !== '.json' || !filter(id)) return null;\n\n try {\n const parsed = JSON.parse(json);\n return {\n code: dataToEsm(parsed, {\n preferConst: options.preferConst,\n compact: options.compact,\n namedExports: options.namedExports,\n indent\n }),\n map: { mappings: '' }\n };\n } catch (err) {\n const message = 'Could not parse JSON file';\n const position = parseInt(/[\\d]/.exec(err.message)[0], 10);\n this.warn({ message, id, position });\n return null;\n }\n }\n };\n}\n"],"names":["const"],"mappings":";;AAEe,SAAS,IAAI,CAAC,OAAY,EAAE;mCAAP,GAAG;AAAK;AAC5C,EAAEA,IAAM,MAAM,GAAG,YAAY,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;AAChE,EAAEA,IAAM,MAAM,GAAG,QAAQ,IAAI,OAAO,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;AAC7D;AACA,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,MAAM;AAChB;AACA;AACA,IAAI,6BAAS,CAAC,IAAI,EAAE,EAAE,EAAE;AACxB,MAAM,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,IAAE,OAAO,IAAI,GAAC;AAC/D;AACA,MAAM,IAAI;AACV,QAAQA,IAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AACxC,QAAQ,OAAO;AACf,UAAU,IAAI,EAAE,SAAS,CAAC,MAAM,EAAE;AAClC,YAAY,WAAW,EAAE,OAAO,CAAC,WAAW;AAC5C,YAAY,OAAO,EAAE,OAAO,CAAC,OAAO;AACpC,YAAY,YAAY,EAAE,OAAO,CAAC,YAAY;AAC9C,oBAAY,MAAM;AAClB,WAAW,CAAC;AACZ,UAAU,GAAG,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;AAC/B,SAAS,CAAC;AACV,OAAO,CAAC,OAAO,GAAG,EAAE;AACpB,QAAQA,IAAM,OAAO,GAAG,2BAA2B,CAAC;AACpD,QAAQA,IAAM,QAAQ,GAAG,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AACnE,QAAQ,IAAI,CAAC,IAAI,CAAC,WAAE,OAAO,MAAE,EAAE,YAAE,QAAQ,EAAE,CAAC,CAAC;AAC7C,QAAQ,OAAO,IAAI,CAAC;AACpB,OAAO;AACP,KAAK;AACL,GAAG,CAAC;AACJ;;;;"}

View File

@@ -0,0 +1,40 @@
'use strict';
var pluginutils = require('@rollup/pluginutils');
function json(options) {
if ( options === void 0 ) options = {};
var filter = pluginutils.createFilter(options.include, options.exclude);
var indent = 'indent' in options ? options.indent : '\t';
return {
name: 'json',
// eslint-disable-next-line no-shadow
transform: function transform(json, id) {
if (id.slice(-5) !== '.json' || !filter(id)) { return null; }
try {
var parsed = JSON.parse(json);
return {
code: pluginutils.dataToEsm(parsed, {
preferConst: options.preferConst,
compact: options.compact,
namedExports: options.namedExports,
indent: indent
}),
map: { mappings: '' }
};
} catch (err) {
var message = 'Could not parse JSON file';
var position = parseInt(/[\d]/.exec(err.message)[0], 10);
this.warn({ message: message, id: id, position: position });
return null;
}
}
};
}
module.exports = json;
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sources":["../src/index.js"],"sourcesContent":["import { createFilter, dataToEsm } from '@rollup/pluginutils';\n\nexport default function json(options = {}) {\n const filter = createFilter(options.include, options.exclude);\n const indent = 'indent' in options ? options.indent : '\\t';\n\n return {\n name: 'json',\n\n // eslint-disable-next-line no-shadow\n transform(json, id) {\n if (id.slice(-5) !== '.json' || !filter(id)) return null;\n\n try {\n const parsed = JSON.parse(json);\n return {\n code: dataToEsm(parsed, {\n preferConst: options.preferConst,\n compact: options.compact,\n namedExports: options.namedExports,\n indent\n }),\n map: { mappings: '' }\n };\n } catch (err) {\n const message = 'Could not parse JSON file';\n const position = parseInt(/[\\d]/.exec(err.message)[0], 10);\n this.warn({ message, id, position });\n return null;\n }\n }\n };\n}\n"],"names":["const","createFilter","dataToEsm"],"mappings":";;;;AAEe,SAAS,IAAI,CAAC,OAAY,EAAE;mCAAP,GAAG;AAAK;AAC5C,EAAEA,IAAM,MAAM,GAAGC,wBAAY,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;AAChE,EAAED,IAAM,MAAM,GAAG,QAAQ,IAAI,OAAO,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;AAC7D;AACA,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,MAAM;AAChB;AACA;AACA,IAAI,6BAAS,CAAC,IAAI,EAAE,EAAE,EAAE;AACxB,MAAM,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,IAAE,OAAO,IAAI,GAAC;AAC/D;AACA,MAAM,IAAI;AACV,QAAQA,IAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AACxC,QAAQ,OAAO;AACf,UAAU,IAAI,EAAEE,qBAAS,CAAC,MAAM,EAAE;AAClC,YAAY,WAAW,EAAE,OAAO,CAAC,WAAW;AAC5C,YAAY,OAAO,EAAE,OAAO,CAAC,OAAO;AACpC,YAAY,YAAY,EAAE,OAAO,CAAC,YAAY;AAC9C,oBAAY,MAAM;AAClB,WAAW,CAAC;AACZ,UAAU,GAAG,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;AAC/B,SAAS,CAAC;AACV,OAAO,CAAC,OAAO,GAAG,EAAE;AACpB,QAAQF,IAAM,OAAO,GAAG,2BAA2B,CAAC;AACpD,QAAQA,IAAM,QAAQ,GAAG,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AACnE,QAAQ,IAAI,CAAC,IAAI,CAAC,WAAE,OAAO,MAAE,EAAE,YAAE,QAAQ,EAAE,CAAC,CAAC;AAC7C,QAAQ,OAAO,IAAI,CAAC;AACpB,OAAO;AACP,KAAK;AACL,GAAG,CAAC;AACJ;;;;"}

View File

@@ -0,0 +1 @@
../../../../rollup/dist/bin/rollup

View File

@@ -0,0 +1,41 @@
import { FilterPattern } from '@rollup/pluginutils';
import { Plugin } from 'rollup';
export interface RollupJsonOptions {
/**
* All JSON files will be parsed by default,
* but you can also specifically include files
*/
include?: FilterPattern;
/**
* All JSON files will be parsed by default,
* but you can also specifically exclude files
*/
exclude?: FilterPattern;
/**
* For tree-shaking, properties will be declared as variables, using
* either `var` or `const`.
* @default false
*/
preferConst?: boolean;
/**
* Specify indentation for the generated default export
* @default '\t'
*/
indent?: string;
/**
* Ignores indent and generates the smallest code
* @default false
*/
compact?: boolean;
/**
* Generate a named export for every property of the JSON object
* @default true
*/
namedExports?: boolean;
}
/**
* Convert .json files to ES6 modules
*/
export default function json(options?: RollupJsonOptions): Plugin;