Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/code-frame/LICENSE +22 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/code-frame/README.md +19 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/code-frame/package.json +31 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/compat-data/LICENSE +22 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/compat-data/README.md +19 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/compat-data/corejs2-built-ins.js +2 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/compat-data/corejs3-shipped-proposals.js +2 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/compat-data/native-modules.js +2 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/compat-data/overlapping-plugins.js +2 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/compat-data/package.json +40 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/compat-data/plugin-bugfixes.js +2 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/compat-data/plugins.js +2 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/core/LICENSE +22 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/core/README.md +19 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/core/package.json +82 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/LICENSE +22 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/README.md +19 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/buffer.js +317 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/buffer.js.map +1 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/generators/base.js +87 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/generators/base.js.map +1 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/generators/classes.js +212 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/generators/classes.js.map +1 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/generators/deprecated.js +28 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/generators/deprecated.js.map +1 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/generators/expressions.js +300 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/generators/expressions.js.map +1 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/generators/flow.js +660 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/generators/flow.js.map +1 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/generators/index.js +128 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/generators/index.js.map +1 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/generators/jsx.js +126 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/generators/jsx.js.map +1 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/generators/methods.js +198 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/generators/methods.js.map +1 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/generators/modules.js +287 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/generators/modules.js.map +1 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/generators/statements.js +279 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/generators/statements.js.map +1 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/generators/template-literals.js +40 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/generators/template-literals.js.map +1 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/generators/types.js +238 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/generators/types.js.map +1 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/generators/typescript.js +724 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/generators/typescript.js.map +1 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/index.js +112 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/index.js.map +1 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/node/index.js +122 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/node/index.js.map +1 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/node/parentheses.js +262 -0
novas/novacore-zephyr/claude-code-router/node_modules/@babel/code-frame/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2014-present Sebastian McKenzie and other contributors
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted, free of charge, to any person obtaining
|
| 6 |
+
a copy of this software and associated documentation files (the
|
| 7 |
+
"Software"), to deal in the Software without restriction, including
|
| 8 |
+
without limitation the rights to use, copy, modify, merge, publish,
|
| 9 |
+
distribute, sublicense, and/or sell copies of the Software, and to
|
| 10 |
+
permit persons to whom the Software is furnished to do so, subject to
|
| 11 |
+
the following conditions:
|
| 12 |
+
|
| 13 |
+
The above copyright notice and this permission notice shall be
|
| 14 |
+
included in all copies or substantial portions of the Software.
|
| 15 |
+
|
| 16 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
| 17 |
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
| 18 |
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
| 19 |
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
| 20 |
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
| 21 |
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
| 22 |
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
novas/novacore-zephyr/claude-code-router/node_modules/@babel/code-frame/README.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# @babel/code-frame
|
| 2 |
+
|
| 3 |
+
> Generate errors that contain a code frame that point to source locations.
|
| 4 |
+
|
| 5 |
+
See our website [@babel/code-frame](https://babeljs.io/docs/babel-code-frame) for more information.
|
| 6 |
+
|
| 7 |
+
## Install
|
| 8 |
+
|
| 9 |
+
Using npm:
|
| 10 |
+
|
| 11 |
+
```sh
|
| 12 |
+
npm install --save-dev @babel/code-frame
|
| 13 |
+
```
|
| 14 |
+
|
| 15 |
+
or using yarn:
|
| 16 |
+
|
| 17 |
+
```sh
|
| 18 |
+
yarn add @babel/code-frame --dev
|
| 19 |
+
```
|
novas/novacore-zephyr/claude-code-router/node_modules/@babel/code-frame/package.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "@babel/code-frame",
|
| 3 |
+
"version": "7.27.1",
|
| 4 |
+
"description": "Generate errors that contain a code frame that point to source locations.",
|
| 5 |
+
"author": "The Babel Team (https://babel.dev/team)",
|
| 6 |
+
"homepage": "https://babel.dev/docs/en/next/babel-code-frame",
|
| 7 |
+
"bugs": "https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen",
|
| 8 |
+
"license": "MIT",
|
| 9 |
+
"publishConfig": {
|
| 10 |
+
"access": "public"
|
| 11 |
+
},
|
| 12 |
+
"repository": {
|
| 13 |
+
"type": "git",
|
| 14 |
+
"url": "https://github.com/babel/babel.git",
|
| 15 |
+
"directory": "packages/babel-code-frame"
|
| 16 |
+
},
|
| 17 |
+
"main": "./lib/index.js",
|
| 18 |
+
"dependencies": {
|
| 19 |
+
"@babel/helper-validator-identifier": "^7.27.1",
|
| 20 |
+
"js-tokens": "^4.0.0",
|
| 21 |
+
"picocolors": "^1.1.1"
|
| 22 |
+
},
|
| 23 |
+
"devDependencies": {
|
| 24 |
+
"import-meta-resolve": "^4.1.0",
|
| 25 |
+
"strip-ansi": "^4.0.0"
|
| 26 |
+
},
|
| 27 |
+
"engines": {
|
| 28 |
+
"node": ">=6.9.0"
|
| 29 |
+
},
|
| 30 |
+
"type": "commonjs"
|
| 31 |
+
}
|
novas/novacore-zephyr/claude-code-router/node_modules/@babel/compat-data/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2014-present Sebastian McKenzie and other contributors
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted, free of charge, to any person obtaining
|
| 6 |
+
a copy of this software and associated documentation files (the
|
| 7 |
+
"Software"), to deal in the Software without restriction, including
|
| 8 |
+
without limitation the rights to use, copy, modify, merge, publish,
|
| 9 |
+
distribute, sublicense, and/or sell copies of the Software, and to
|
| 10 |
+
permit persons to whom the Software is furnished to do so, subject to
|
| 11 |
+
the following conditions:
|
| 12 |
+
|
| 13 |
+
The above copyright notice and this permission notice shall be
|
| 14 |
+
included in all copies or substantial portions of the Software.
|
| 15 |
+
|
| 16 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
| 17 |
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
| 18 |
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
| 19 |
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
| 20 |
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
| 21 |
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
| 22 |
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
novas/novacore-zephyr/claude-code-router/node_modules/@babel/compat-data/README.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# @babel/compat-data
|
| 2 |
+
|
| 3 |
+
> The compat-data to determine required Babel plugins
|
| 4 |
+
|
| 5 |
+
See our website [@babel/compat-data](https://babeljs.io/docs/babel-compat-data) for more information.
|
| 6 |
+
|
| 7 |
+
## Install
|
| 8 |
+
|
| 9 |
+
Using npm:
|
| 10 |
+
|
| 11 |
+
```sh
|
| 12 |
+
npm install --save @babel/compat-data
|
| 13 |
+
```
|
| 14 |
+
|
| 15 |
+
or using yarn:
|
| 16 |
+
|
| 17 |
+
```sh
|
| 18 |
+
yarn add @babel/compat-data
|
| 19 |
+
```
|
novas/novacore-zephyr/claude-code-router/node_modules/@babel/compat-data/corejs2-built-ins.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Todo (Babel 8): remove this file as Babel 8 drop support of core-js 2
|
| 2 |
+
module.exports = require("./data/corejs2-built-ins.json");
|
novas/novacore-zephyr/claude-code-router/node_modules/@babel/compat-data/corejs3-shipped-proposals.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Todo (Babel 8): remove this file now that it is included in babel-plugin-polyfill-corejs3
|
| 2 |
+
module.exports = require("./data/corejs3-shipped-proposals.json");
|
novas/novacore-zephyr/claude-code-router/node_modules/@babel/compat-data/native-modules.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Todo (Babel 8): remove this file, in Babel 8 users import the .json directly
|
| 2 |
+
module.exports = require("./data/native-modules.json");
|
novas/novacore-zephyr/claude-code-router/node_modules/@babel/compat-data/overlapping-plugins.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Todo (Babel 8): remove this file, in Babel 8 users import the .json directly
|
| 2 |
+
module.exports = require("./data/overlapping-plugins.json");
|
novas/novacore-zephyr/claude-code-router/node_modules/@babel/compat-data/package.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "@babel/compat-data",
|
| 3 |
+
"version": "7.28.0",
|
| 4 |
+
"author": "The Babel Team (https://babel.dev/team)",
|
| 5 |
+
"license": "MIT",
|
| 6 |
+
"description": "The compat-data to determine required Babel plugins",
|
| 7 |
+
"repository": {
|
| 8 |
+
"type": "git",
|
| 9 |
+
"url": "https://github.com/babel/babel.git",
|
| 10 |
+
"directory": "packages/babel-compat-data"
|
| 11 |
+
},
|
| 12 |
+
"publishConfig": {
|
| 13 |
+
"access": "public"
|
| 14 |
+
},
|
| 15 |
+
"exports": {
|
| 16 |
+
"./plugins": "./plugins.js",
|
| 17 |
+
"./native-modules": "./native-modules.js",
|
| 18 |
+
"./corejs2-built-ins": "./corejs2-built-ins.js",
|
| 19 |
+
"./corejs3-shipped-proposals": "./corejs3-shipped-proposals.js",
|
| 20 |
+
"./overlapping-plugins": "./overlapping-plugins.js",
|
| 21 |
+
"./plugin-bugfixes": "./plugin-bugfixes.js"
|
| 22 |
+
},
|
| 23 |
+
"scripts": {
|
| 24 |
+
"build-data": "./scripts/download-compat-table.sh && node ./scripts/build-data.mjs && node ./scripts/build-modules-support.mjs && node ./scripts/build-bugfixes-targets.mjs"
|
| 25 |
+
},
|
| 26 |
+
"keywords": [
|
| 27 |
+
"babel",
|
| 28 |
+
"compat-table",
|
| 29 |
+
"compat-data"
|
| 30 |
+
],
|
| 31 |
+
"devDependencies": {
|
| 32 |
+
"@mdn/browser-compat-data": "^6.0.8",
|
| 33 |
+
"core-js-compat": "^3.43.0",
|
| 34 |
+
"electron-to-chromium": "^1.5.140"
|
| 35 |
+
},
|
| 36 |
+
"engines": {
|
| 37 |
+
"node": ">=6.9.0"
|
| 38 |
+
},
|
| 39 |
+
"type": "commonjs"
|
| 40 |
+
}
|
novas/novacore-zephyr/claude-code-router/node_modules/@babel/compat-data/plugin-bugfixes.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Todo (Babel 8): remove this file, in Babel 8 users import the .json directly
|
| 2 |
+
module.exports = require("./data/plugin-bugfixes.json");
|
novas/novacore-zephyr/claude-code-router/node_modules/@babel/compat-data/plugins.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Todo (Babel 8): remove this file, in Babel 8 users import the .json directly
|
| 2 |
+
module.exports = require("./data/plugins.json");
|
novas/novacore-zephyr/claude-code-router/node_modules/@babel/core/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2014-present Sebastian McKenzie and other contributors
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted, free of charge, to any person obtaining
|
| 6 |
+
a copy of this software and associated documentation files (the
|
| 7 |
+
"Software"), to deal in the Software without restriction, including
|
| 8 |
+
without limitation the rights to use, copy, modify, merge, publish,
|
| 9 |
+
distribute, sublicense, and/or sell copies of the Software, and to
|
| 10 |
+
permit persons to whom the Software is furnished to do so, subject to
|
| 11 |
+
the following conditions:
|
| 12 |
+
|
| 13 |
+
The above copyright notice and this permission notice shall be
|
| 14 |
+
included in all copies or substantial portions of the Software.
|
| 15 |
+
|
| 16 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
| 17 |
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
| 18 |
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
| 19 |
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
| 20 |
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
| 21 |
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
| 22 |
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
novas/novacore-zephyr/claude-code-router/node_modules/@babel/core/README.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# @babel/core
|
| 2 |
+
|
| 3 |
+
> Babel compiler core.
|
| 4 |
+
|
| 5 |
+
See our website [@babel/core](https://babeljs.io/docs/babel-core) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20core%22+is%3Aopen) associated with this package.
|
| 6 |
+
|
| 7 |
+
## Install
|
| 8 |
+
|
| 9 |
+
Using npm:
|
| 10 |
+
|
| 11 |
+
```sh
|
| 12 |
+
npm install --save-dev @babel/core
|
| 13 |
+
```
|
| 14 |
+
|
| 15 |
+
or using yarn:
|
| 16 |
+
|
| 17 |
+
```sh
|
| 18 |
+
yarn add @babel/core --dev
|
| 19 |
+
```
|
novas/novacore-zephyr/claude-code-router/node_modules/@babel/core/package.json
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "@babel/core",
|
| 3 |
+
"version": "7.28.3",
|
| 4 |
+
"description": "Babel compiler core.",
|
| 5 |
+
"main": "./lib/index.js",
|
| 6 |
+
"author": "The Babel Team (https://babel.dev/team)",
|
| 7 |
+
"license": "MIT",
|
| 8 |
+
"publishConfig": {
|
| 9 |
+
"access": "public"
|
| 10 |
+
},
|
| 11 |
+
"repository": {
|
| 12 |
+
"type": "git",
|
| 13 |
+
"url": "https://github.com/babel/babel.git",
|
| 14 |
+
"directory": "packages/babel-core"
|
| 15 |
+
},
|
| 16 |
+
"homepage": "https://babel.dev/docs/en/next/babel-core",
|
| 17 |
+
"bugs": "https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20core%22+is%3Aopen",
|
| 18 |
+
"keywords": [
|
| 19 |
+
"6to5",
|
| 20 |
+
"babel",
|
| 21 |
+
"classes",
|
| 22 |
+
"const",
|
| 23 |
+
"es6",
|
| 24 |
+
"harmony",
|
| 25 |
+
"let",
|
| 26 |
+
"modules",
|
| 27 |
+
"transpile",
|
| 28 |
+
"transpiler",
|
| 29 |
+
"var",
|
| 30 |
+
"babel-core",
|
| 31 |
+
"compiler"
|
| 32 |
+
],
|
| 33 |
+
"engines": {
|
| 34 |
+
"node": ">=6.9.0"
|
| 35 |
+
},
|
| 36 |
+
"funding": {
|
| 37 |
+
"type": "opencollective",
|
| 38 |
+
"url": "https://opencollective.com/babel"
|
| 39 |
+
},
|
| 40 |
+
"browser": {
|
| 41 |
+
"./lib/config/files/index.js": "./lib/config/files/index-browser.js",
|
| 42 |
+
"./lib/config/resolve-targets.js": "./lib/config/resolve-targets-browser.js",
|
| 43 |
+
"./lib/transform-file.js": "./lib/transform-file-browser.js",
|
| 44 |
+
"./src/config/files/index.ts": "./src/config/files/index-browser.ts",
|
| 45 |
+
"./src/config/resolve-targets.ts": "./src/config/resolve-targets-browser.ts",
|
| 46 |
+
"./src/transform-file.ts": "./src/transform-file-browser.ts"
|
| 47 |
+
},
|
| 48 |
+
"dependencies": {
|
| 49 |
+
"@ampproject/remapping": "^2.2.0",
|
| 50 |
+
"@babel/code-frame": "^7.27.1",
|
| 51 |
+
"@babel/generator": "^7.28.3",
|
| 52 |
+
"@babel/helper-compilation-targets": "^7.27.2",
|
| 53 |
+
"@babel/helper-module-transforms": "^7.28.3",
|
| 54 |
+
"@babel/helpers": "^7.28.3",
|
| 55 |
+
"@babel/parser": "^7.28.3",
|
| 56 |
+
"@babel/template": "^7.27.2",
|
| 57 |
+
"@babel/traverse": "^7.28.3",
|
| 58 |
+
"@babel/types": "^7.28.2",
|
| 59 |
+
"convert-source-map": "^2.0.0",
|
| 60 |
+
"debug": "^4.1.0",
|
| 61 |
+
"gensync": "^1.0.0-beta.2",
|
| 62 |
+
"json5": "^2.2.3",
|
| 63 |
+
"semver": "^6.3.1"
|
| 64 |
+
},
|
| 65 |
+
"devDependencies": {
|
| 66 |
+
"@babel/helper-transform-fixture-test-runner": "^7.28.3",
|
| 67 |
+
"@babel/plugin-syntax-flow": "^7.27.1",
|
| 68 |
+
"@babel/plugin-transform-flow-strip-types": "^7.27.1",
|
| 69 |
+
"@babel/plugin-transform-modules-commonjs": "^7.27.1",
|
| 70 |
+
"@babel/preset-env": "^7.28.3",
|
| 71 |
+
"@babel/preset-typescript": "^7.27.1",
|
| 72 |
+
"@jridgewell/trace-mapping": "^0.3.28",
|
| 73 |
+
"@types/convert-source-map": "^2.0.0",
|
| 74 |
+
"@types/debug": "^4.1.0",
|
| 75 |
+
"@types/resolve": "^1.3.2",
|
| 76 |
+
"@types/semver": "^5.4.0",
|
| 77 |
+
"rimraf": "^3.0.0",
|
| 78 |
+
"ts-node": "^11.0.0-beta.1",
|
| 79 |
+
"tsx": "^4.20.3"
|
| 80 |
+
},
|
| 81 |
+
"type": "commonjs"
|
| 82 |
+
}
|
novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2014-present Sebastian McKenzie and other contributors
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted, free of charge, to any person obtaining
|
| 6 |
+
a copy of this software and associated documentation files (the
|
| 7 |
+
"Software"), to deal in the Software without restriction, including
|
| 8 |
+
without limitation the rights to use, copy, modify, merge, publish,
|
| 9 |
+
distribute, sublicense, and/or sell copies of the Software, and to
|
| 10 |
+
permit persons to whom the Software is furnished to do so, subject to
|
| 11 |
+
the following conditions:
|
| 12 |
+
|
| 13 |
+
The above copyright notice and this permission notice shall be
|
| 14 |
+
included in all copies or substantial portions of the Software.
|
| 15 |
+
|
| 16 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
| 17 |
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
| 18 |
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
| 19 |
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
| 20 |
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
| 21 |
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
| 22 |
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/README.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# @babel/generator
|
| 2 |
+
|
| 3 |
+
> Turns an AST into code.
|
| 4 |
+
|
| 5 |
+
See our website [@babel/generator](https://babeljs.io/docs/babel-generator) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20generator%22+is%3Aopen) associated with this package.
|
| 6 |
+
|
| 7 |
+
## Install
|
| 8 |
+
|
| 9 |
+
Using npm:
|
| 10 |
+
|
| 11 |
+
```sh
|
| 12 |
+
npm install --save-dev @babel/generator
|
| 13 |
+
```
|
| 14 |
+
|
| 15 |
+
or using yarn:
|
| 16 |
+
|
| 17 |
+
```sh
|
| 18 |
+
yarn add @babel/generator --dev
|
| 19 |
+
```
|
novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/buffer.js
ADDED
|
@@ -0,0 +1,317 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
|
| 3 |
+
Object.defineProperty(exports, "__esModule", {
|
| 4 |
+
value: true
|
| 5 |
+
});
|
| 6 |
+
exports.default = void 0;
|
| 7 |
+
class Buffer {
|
| 8 |
+
constructor(map, indentChar) {
|
| 9 |
+
this._map = null;
|
| 10 |
+
this._buf = "";
|
| 11 |
+
this._str = "";
|
| 12 |
+
this._appendCount = 0;
|
| 13 |
+
this._last = 0;
|
| 14 |
+
this._queue = [];
|
| 15 |
+
this._queueCursor = 0;
|
| 16 |
+
this._canMarkIdName = true;
|
| 17 |
+
this._indentChar = "";
|
| 18 |
+
this._fastIndentations = [];
|
| 19 |
+
this._position = {
|
| 20 |
+
line: 1,
|
| 21 |
+
column: 0
|
| 22 |
+
};
|
| 23 |
+
this._sourcePosition = {
|
| 24 |
+
identifierName: undefined,
|
| 25 |
+
identifierNamePos: undefined,
|
| 26 |
+
line: undefined,
|
| 27 |
+
column: undefined,
|
| 28 |
+
filename: undefined
|
| 29 |
+
};
|
| 30 |
+
this._map = map;
|
| 31 |
+
this._indentChar = indentChar;
|
| 32 |
+
for (let i = 0; i < 64; i++) {
|
| 33 |
+
this._fastIndentations.push(indentChar.repeat(i));
|
| 34 |
+
}
|
| 35 |
+
this._allocQueue();
|
| 36 |
+
}
|
| 37 |
+
_allocQueue() {
|
| 38 |
+
const queue = this._queue;
|
| 39 |
+
for (let i = 0; i < 16; i++) {
|
| 40 |
+
queue.push({
|
| 41 |
+
char: 0,
|
| 42 |
+
repeat: 1,
|
| 43 |
+
line: undefined,
|
| 44 |
+
column: undefined,
|
| 45 |
+
identifierName: undefined,
|
| 46 |
+
identifierNamePos: undefined,
|
| 47 |
+
filename: ""
|
| 48 |
+
});
|
| 49 |
+
}
|
| 50 |
+
}
|
| 51 |
+
_pushQueue(char, repeat, line, column, filename) {
|
| 52 |
+
const cursor = this._queueCursor;
|
| 53 |
+
if (cursor === this._queue.length) {
|
| 54 |
+
this._allocQueue();
|
| 55 |
+
}
|
| 56 |
+
const item = this._queue[cursor];
|
| 57 |
+
item.char = char;
|
| 58 |
+
item.repeat = repeat;
|
| 59 |
+
item.line = line;
|
| 60 |
+
item.column = column;
|
| 61 |
+
item.filename = filename;
|
| 62 |
+
this._queueCursor++;
|
| 63 |
+
}
|
| 64 |
+
_popQueue() {
|
| 65 |
+
if (this._queueCursor === 0) {
|
| 66 |
+
throw new Error("Cannot pop from empty queue");
|
| 67 |
+
}
|
| 68 |
+
return this._queue[--this._queueCursor];
|
| 69 |
+
}
|
| 70 |
+
get() {
|
| 71 |
+
this._flush();
|
| 72 |
+
const map = this._map;
|
| 73 |
+
const result = {
|
| 74 |
+
code: (this._buf + this._str).trimRight(),
|
| 75 |
+
decodedMap: map == null ? void 0 : map.getDecoded(),
|
| 76 |
+
get __mergedMap() {
|
| 77 |
+
return this.map;
|
| 78 |
+
},
|
| 79 |
+
get map() {
|
| 80 |
+
const resultMap = map ? map.get() : null;
|
| 81 |
+
result.map = resultMap;
|
| 82 |
+
return resultMap;
|
| 83 |
+
},
|
| 84 |
+
set map(value) {
|
| 85 |
+
Object.defineProperty(result, "map", {
|
| 86 |
+
value,
|
| 87 |
+
writable: true
|
| 88 |
+
});
|
| 89 |
+
},
|
| 90 |
+
get rawMappings() {
|
| 91 |
+
const mappings = map == null ? void 0 : map.getRawMappings();
|
| 92 |
+
result.rawMappings = mappings;
|
| 93 |
+
return mappings;
|
| 94 |
+
},
|
| 95 |
+
set rawMappings(value) {
|
| 96 |
+
Object.defineProperty(result, "rawMappings", {
|
| 97 |
+
value,
|
| 98 |
+
writable: true
|
| 99 |
+
});
|
| 100 |
+
}
|
| 101 |
+
};
|
| 102 |
+
return result;
|
| 103 |
+
}
|
| 104 |
+
append(str, maybeNewline) {
|
| 105 |
+
this._flush();
|
| 106 |
+
this._append(str, this._sourcePosition, maybeNewline);
|
| 107 |
+
}
|
| 108 |
+
appendChar(char) {
|
| 109 |
+
this._flush();
|
| 110 |
+
this._appendChar(char, 1, this._sourcePosition);
|
| 111 |
+
}
|
| 112 |
+
queue(char) {
|
| 113 |
+
if (char === 10) {
|
| 114 |
+
while (this._queueCursor !== 0) {
|
| 115 |
+
const char = this._queue[this._queueCursor - 1].char;
|
| 116 |
+
if (char !== 32 && char !== 9) {
|
| 117 |
+
break;
|
| 118 |
+
}
|
| 119 |
+
this._queueCursor--;
|
| 120 |
+
}
|
| 121 |
+
}
|
| 122 |
+
const sourcePosition = this._sourcePosition;
|
| 123 |
+
this._pushQueue(char, 1, sourcePosition.line, sourcePosition.column, sourcePosition.filename);
|
| 124 |
+
}
|
| 125 |
+
queueIndentation(repeat) {
|
| 126 |
+
if (repeat === 0) return;
|
| 127 |
+
this._pushQueue(-1, repeat, undefined, undefined, undefined);
|
| 128 |
+
}
|
| 129 |
+
_flush() {
|
| 130 |
+
const queueCursor = this._queueCursor;
|
| 131 |
+
const queue = this._queue;
|
| 132 |
+
for (let i = 0; i < queueCursor; i++) {
|
| 133 |
+
const item = queue[i];
|
| 134 |
+
this._appendChar(item.char, item.repeat, item);
|
| 135 |
+
}
|
| 136 |
+
this._queueCursor = 0;
|
| 137 |
+
}
|
| 138 |
+
_appendChar(char, repeat, sourcePos) {
|
| 139 |
+
this._last = char;
|
| 140 |
+
if (char === -1) {
|
| 141 |
+
const fastIndentation = this._fastIndentations[repeat];
|
| 142 |
+
if (fastIndentation !== undefined) {
|
| 143 |
+
this._str += fastIndentation;
|
| 144 |
+
} else {
|
| 145 |
+
this._str += repeat > 1 ? this._indentChar.repeat(repeat) : this._indentChar;
|
| 146 |
+
}
|
| 147 |
+
} else {
|
| 148 |
+
this._str += repeat > 1 ? String.fromCharCode(char).repeat(repeat) : String.fromCharCode(char);
|
| 149 |
+
}
|
| 150 |
+
if (char !== 10) {
|
| 151 |
+
this._mark(sourcePos.line, sourcePos.column, sourcePos.identifierName, sourcePos.identifierNamePos, sourcePos.filename);
|
| 152 |
+
this._position.column += repeat;
|
| 153 |
+
} else {
|
| 154 |
+
this._position.line++;
|
| 155 |
+
this._position.column = 0;
|
| 156 |
+
}
|
| 157 |
+
if (this._canMarkIdName) {
|
| 158 |
+
sourcePos.identifierName = undefined;
|
| 159 |
+
sourcePos.identifierNamePos = undefined;
|
| 160 |
+
}
|
| 161 |
+
}
|
| 162 |
+
_append(str, sourcePos, maybeNewline) {
|
| 163 |
+
const len = str.length;
|
| 164 |
+
const position = this._position;
|
| 165 |
+
this._last = str.charCodeAt(len - 1);
|
| 166 |
+
if (++this._appendCount > 4096) {
|
| 167 |
+
+this._str;
|
| 168 |
+
this._buf += this._str;
|
| 169 |
+
this._str = str;
|
| 170 |
+
this._appendCount = 0;
|
| 171 |
+
} else {
|
| 172 |
+
this._str += str;
|
| 173 |
+
}
|
| 174 |
+
if (!maybeNewline && !this._map) {
|
| 175 |
+
position.column += len;
|
| 176 |
+
return;
|
| 177 |
+
}
|
| 178 |
+
const {
|
| 179 |
+
column,
|
| 180 |
+
identifierName,
|
| 181 |
+
identifierNamePos,
|
| 182 |
+
filename
|
| 183 |
+
} = sourcePos;
|
| 184 |
+
let line = sourcePos.line;
|
| 185 |
+
if ((identifierName != null || identifierNamePos != null) && this._canMarkIdName) {
|
| 186 |
+
sourcePos.identifierName = undefined;
|
| 187 |
+
sourcePos.identifierNamePos = undefined;
|
| 188 |
+
}
|
| 189 |
+
let i = str.indexOf("\n");
|
| 190 |
+
let last = 0;
|
| 191 |
+
if (i !== 0) {
|
| 192 |
+
this._mark(line, column, identifierName, identifierNamePos, filename);
|
| 193 |
+
}
|
| 194 |
+
while (i !== -1) {
|
| 195 |
+
position.line++;
|
| 196 |
+
position.column = 0;
|
| 197 |
+
last = i + 1;
|
| 198 |
+
if (last < len && line !== undefined) {
|
| 199 |
+
this._mark(++line, 0, null, null, filename);
|
| 200 |
+
}
|
| 201 |
+
i = str.indexOf("\n", last);
|
| 202 |
+
}
|
| 203 |
+
position.column += len - last;
|
| 204 |
+
}
|
| 205 |
+
_mark(line, column, identifierName, identifierNamePos, filename) {
|
| 206 |
+
var _this$_map;
|
| 207 |
+
(_this$_map = this._map) == null || _this$_map.mark(this._position, line, column, identifierName, identifierNamePos, filename);
|
| 208 |
+
}
|
| 209 |
+
removeTrailingNewline() {
|
| 210 |
+
const queueCursor = this._queueCursor;
|
| 211 |
+
if (queueCursor !== 0 && this._queue[queueCursor - 1].char === 10) {
|
| 212 |
+
this._queueCursor--;
|
| 213 |
+
}
|
| 214 |
+
}
|
| 215 |
+
removeLastSemicolon() {
|
| 216 |
+
const queueCursor = this._queueCursor;
|
| 217 |
+
if (queueCursor !== 0 && this._queue[queueCursor - 1].char === 59) {
|
| 218 |
+
this._queueCursor--;
|
| 219 |
+
}
|
| 220 |
+
}
|
| 221 |
+
getLastChar() {
|
| 222 |
+
const queueCursor = this._queueCursor;
|
| 223 |
+
return queueCursor !== 0 ? this._queue[queueCursor - 1].char : this._last;
|
| 224 |
+
}
|
| 225 |
+
getNewlineCount() {
|
| 226 |
+
const queueCursor = this._queueCursor;
|
| 227 |
+
let count = 0;
|
| 228 |
+
if (queueCursor === 0) return this._last === 10 ? 1 : 0;
|
| 229 |
+
for (let i = queueCursor - 1; i >= 0; i--) {
|
| 230 |
+
if (this._queue[i].char !== 10) {
|
| 231 |
+
break;
|
| 232 |
+
}
|
| 233 |
+
count++;
|
| 234 |
+
}
|
| 235 |
+
return count === queueCursor && this._last === 10 ? count + 1 : count;
|
| 236 |
+
}
|
| 237 |
+
endsWithCharAndNewline() {
|
| 238 |
+
const queue = this._queue;
|
| 239 |
+
const queueCursor = this._queueCursor;
|
| 240 |
+
if (queueCursor !== 0) {
|
| 241 |
+
const lastCp = queue[queueCursor - 1].char;
|
| 242 |
+
if (lastCp !== 10) return;
|
| 243 |
+
if (queueCursor > 1) {
|
| 244 |
+
return queue[queueCursor - 2].char;
|
| 245 |
+
} else {
|
| 246 |
+
return this._last;
|
| 247 |
+
}
|
| 248 |
+
}
|
| 249 |
+
}
|
| 250 |
+
hasContent() {
|
| 251 |
+
return this._queueCursor !== 0 || !!this._last;
|
| 252 |
+
}
|
| 253 |
+
exactSource(loc, cb) {
|
| 254 |
+
if (!this._map) {
|
| 255 |
+
cb();
|
| 256 |
+
return;
|
| 257 |
+
}
|
| 258 |
+
this.source("start", loc);
|
| 259 |
+
const identifierName = loc.identifierName;
|
| 260 |
+
const sourcePos = this._sourcePosition;
|
| 261 |
+
if (identifierName) {
|
| 262 |
+
this._canMarkIdName = false;
|
| 263 |
+
sourcePos.identifierName = identifierName;
|
| 264 |
+
}
|
| 265 |
+
cb();
|
| 266 |
+
if (identifierName) {
|
| 267 |
+
this._canMarkIdName = true;
|
| 268 |
+
sourcePos.identifierName = undefined;
|
| 269 |
+
sourcePos.identifierNamePos = undefined;
|
| 270 |
+
}
|
| 271 |
+
this.source("end", loc);
|
| 272 |
+
}
|
| 273 |
+
source(prop, loc) {
|
| 274 |
+
if (!this._map) return;
|
| 275 |
+
this._normalizePosition(prop, loc, 0);
|
| 276 |
+
}
|
| 277 |
+
sourceWithOffset(prop, loc, columnOffset) {
|
| 278 |
+
if (!this._map) return;
|
| 279 |
+
this._normalizePosition(prop, loc, columnOffset);
|
| 280 |
+
}
|
| 281 |
+
_normalizePosition(prop, loc, columnOffset) {
|
| 282 |
+
const pos = loc[prop];
|
| 283 |
+
const target = this._sourcePosition;
|
| 284 |
+
if (pos) {
|
| 285 |
+
target.line = pos.line;
|
| 286 |
+
target.column = Math.max(pos.column + columnOffset, 0);
|
| 287 |
+
target.filename = loc.filename;
|
| 288 |
+
}
|
| 289 |
+
}
|
| 290 |
+
getCurrentColumn() {
|
| 291 |
+
const queue = this._queue;
|
| 292 |
+
const queueCursor = this._queueCursor;
|
| 293 |
+
let lastIndex = -1;
|
| 294 |
+
let len = 0;
|
| 295 |
+
for (let i = 0; i < queueCursor; i++) {
|
| 296 |
+
const item = queue[i];
|
| 297 |
+
if (item.char === 10) {
|
| 298 |
+
lastIndex = len;
|
| 299 |
+
}
|
| 300 |
+
len += item.repeat;
|
| 301 |
+
}
|
| 302 |
+
return lastIndex === -1 ? this._position.column + len : len - 1 - lastIndex;
|
| 303 |
+
}
|
| 304 |
+
getCurrentLine() {
|
| 305 |
+
let count = 0;
|
| 306 |
+
const queue = this._queue;
|
| 307 |
+
for (let i = 0; i < this._queueCursor; i++) {
|
| 308 |
+
if (queue[i].char === 10) {
|
| 309 |
+
count++;
|
| 310 |
+
}
|
| 311 |
+
}
|
| 312 |
+
return this._position.line + count;
|
| 313 |
+
}
|
| 314 |
+
}
|
| 315 |
+
exports.default = Buffer;
|
| 316 |
+
|
| 317 |
+
//# sourceMappingURL=buffer.js.map
|
novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/buffer.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"names":["Buffer","constructor","map","indentChar","_map","_buf","_str","_appendCount","_last","_queue","_queueCursor","_canMarkIdName","_indentChar","_fastIndentations","_position","line","column","_sourcePosition","identifierName","undefined","identifierNamePos","filename","i","push","repeat","_allocQueue","queue","char","_pushQueue","cursor","length","item","_popQueue","Error","get","_flush","result","code","trimRight","decodedMap","getDecoded","__mergedMap","resultMap","value","Object","defineProperty","writable","rawMappings","mappings","getRawMappings","append","str","maybeNewline","_append","appendChar","_appendChar","sourcePosition","queueIndentation","queueCursor","sourcePos","fastIndentation","String","fromCharCode","_mark","len","position","charCodeAt","indexOf","last","_this$_map","mark","removeTrailingNewline","removeLastSemicolon","getLastChar","getNewlineCount","count","endsWithCharAndNewline","lastCp","hasContent","exactSource","loc","cb","source","prop","_normalizePosition","sourceWithOffset","columnOffset","pos","target","Math","max","getCurrentColumn","lastIndex","getCurrentLine","exports","default"],"sources":["../src/buffer.ts"],"sourcesContent":["import type SourceMap from \"./source-map.ts\";\n\n// We inline this package\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as charcodes from \"charcodes\";\n\nexport type Pos = {\n line: number;\n column: number;\n index: number;\n};\nexport type Loc = {\n start?: Pos;\n end?: Pos;\n filename?: string;\n};\ntype SourcePos = {\n line: number | undefined;\n column: number | undefined;\n identifierName: string | undefined;\n filename: string | undefined;\n};\ntype InternalSourcePos = SourcePos & { identifierNamePos: Pos };\n\ntype QueueItem = {\n char: number;\n repeat: number;\n line: number | undefined;\n column: number | undefined;\n identifierName: undefined; // Not used, it always undefined.\n identifierNamePos: undefined; // Not used, it always undefined.\n filename: string | undefined;\n};\n\nexport default class Buffer {\n constructor(map: SourceMap | null, indentChar: string) {\n this._map = map;\n this._indentChar = indentChar;\n\n for (let i = 0; i < 64; i++) {\n this._fastIndentations.push(indentChar.repeat(i));\n }\n\n this._allocQueue();\n }\n\n _map: SourceMap = null;\n _buf = \"\";\n _str = \"\";\n _appendCount = 0;\n _last = 0;\n _queue: QueueItem[] = [];\n _queueCursor = 0;\n _canMarkIdName = true;\n _indentChar = \"\";\n _fastIndentations: string[] = [];\n\n _position = {\n line: 1,\n column: 0,\n };\n _sourcePosition: InternalSourcePos = {\n identifierName: undefined,\n identifierNamePos: undefined,\n line: undefined,\n column: undefined,\n filename: undefined,\n };\n\n _allocQueue() {\n const queue = this._queue;\n\n for (let i = 0; i < 16; i++) {\n queue.push({\n char: 0,\n repeat: 1,\n line: undefined,\n column: undefined,\n identifierName: undefined,\n identifierNamePos: undefined,\n filename: \"\",\n });\n }\n }\n\n _pushQueue(\n char: number,\n repeat: number,\n line: number | undefined,\n column: number | undefined,\n filename: string | undefined,\n ) {\n const cursor = this._queueCursor;\n if (cursor === this._queue.length) {\n this._allocQueue();\n }\n const item = this._queue[cursor];\n item.char = char;\n item.repeat = repeat;\n item.line = line;\n item.column = column;\n item.filename = filename;\n\n this._queueCursor++;\n }\n\n _popQueue(): QueueItem {\n if (this._queueCursor === 0) {\n throw new Error(\"Cannot pop from empty queue\");\n }\n return this._queue[--this._queueCursor];\n }\n\n /**\n * Get the final string output from the buffer, along with the sourcemap if one exists.\n */\n\n get() {\n this._flush();\n\n const map = this._map;\n const result = {\n // Whatever trim is used here should not execute a regex against the\n // source string since it may be arbitrarily large after all transformations\n code: (this._buf + this._str).trimRight(),\n // Decoded sourcemap is free to generate.\n decodedMap: map?.getDecoded(),\n // Used as a marker for backwards compatibility. We moved input map merging\n // into the generator. We cannot merge the input map a second time, so the\n // presence of this field tells us we've already done the work.\n get __mergedMap() {\n return this.map;\n },\n // Encoding the sourcemap is moderately CPU expensive.\n get map() {\n const resultMap = map ? map.get() : null;\n result.map = resultMap;\n return resultMap;\n },\n set map(value) {\n Object.defineProperty(result, \"map\", { value, writable: true });\n },\n // Retrieving the raw mappings is very memory intensive.\n get rawMappings() {\n const mappings = map?.getRawMappings();\n result.rawMappings = mappings;\n return mappings;\n },\n set rawMappings(value) {\n Object.defineProperty(result, \"rawMappings\", { value, writable: true });\n },\n };\n\n return result;\n }\n\n /**\n * Add a string to the buffer that cannot be reverted.\n */\n\n append(str: string, maybeNewline: boolean): void {\n this._flush();\n\n this._append(str, this._sourcePosition, maybeNewline);\n }\n\n appendChar(char: number): void {\n this._flush();\n this._appendChar(char, 1, this._sourcePosition);\n }\n\n /**\n * Add a string to the buffer than can be reverted.\n */\n queue(char: number): void {\n // Drop trailing spaces when a newline is inserted.\n if (char === charcodes.lineFeed) {\n while (this._queueCursor !== 0) {\n const char = this._queue[this._queueCursor - 1].char;\n if (char !== charcodes.space && char !== charcodes.tab) {\n break;\n }\n\n this._queueCursor--;\n }\n }\n\n const sourcePosition = this._sourcePosition;\n this._pushQueue(\n char,\n 1,\n sourcePosition.line,\n sourcePosition.column,\n sourcePosition.filename,\n );\n }\n\n /**\n * Same as queue, but this indentation will never have a sourcemap marker.\n */\n queueIndentation(repeat: number): void {\n if (repeat === 0) return;\n this._pushQueue(-1, repeat, undefined, undefined, undefined);\n }\n\n _flush(): void {\n const queueCursor = this._queueCursor;\n const queue = this._queue;\n for (let i = 0; i < queueCursor; i++) {\n const item: QueueItem = queue[i];\n this._appendChar(item.char, item.repeat, item);\n }\n this._queueCursor = 0;\n }\n\n _appendChar(\n char: number,\n repeat: number,\n sourcePos: InternalSourcePos,\n ): void {\n this._last = char;\n\n if (char === -1) {\n const fastIndentation = this._fastIndentations[repeat];\n if (fastIndentation !== undefined) {\n this._str += fastIndentation;\n } else {\n this._str +=\n repeat > 1 ? this._indentChar.repeat(repeat) : this._indentChar;\n }\n } else {\n this._str +=\n repeat > 1\n ? String.fromCharCode(char).repeat(repeat)\n : String.fromCharCode(char);\n }\n\n if (char !== charcodes.lineFeed) {\n this._mark(\n sourcePos.line,\n sourcePos.column,\n sourcePos.identifierName,\n sourcePos.identifierNamePos,\n sourcePos.filename,\n );\n this._position.column += repeat;\n } else {\n this._position.line++;\n this._position.column = 0;\n }\n\n if (this._canMarkIdName) {\n sourcePos.identifierName = undefined;\n sourcePos.identifierNamePos = undefined;\n }\n }\n\n _append(\n str: string,\n sourcePos: InternalSourcePos,\n maybeNewline: boolean,\n ): void {\n const len = str.length;\n const position = this._position;\n\n this._last = str.charCodeAt(len - 1);\n\n if (++this._appendCount > 4096) {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n +this._str; // Unexplainable huge performance boost. Ref: https://github.com/davidmarkclements/flatstr License: MIT\n this._buf += this._str;\n this._str = str;\n this._appendCount = 0;\n } else {\n this._str += str;\n }\n\n if (!maybeNewline && !this._map) {\n position.column += len;\n return;\n }\n\n const { column, identifierName, identifierNamePos, filename } = sourcePos;\n let line = sourcePos.line;\n\n if (\n (identifierName != null || identifierNamePos != null) &&\n this._canMarkIdName\n ) {\n sourcePos.identifierName = undefined;\n sourcePos.identifierNamePos = undefined;\n }\n\n // Search for newline chars. We search only for `\\n`, since both `\\r` and\n // `\\r\\n` are normalized to `\\n` during parse. We exclude `\\u2028` and\n // `\\u2029` for performance reasons, they're so uncommon that it's probably\n // ok. It's also unclear how other sourcemap utilities handle them...\n let i = str.indexOf(\"\\n\");\n let last = 0;\n\n // If the string starts with a newline char, then adding a mark is redundant.\n // This catches both \"no newlines\" and \"newline after several chars\".\n if (i !== 0) {\n this._mark(line, column, identifierName, identifierNamePos, filename);\n }\n\n // Now, find each remaining newline char in the string.\n while (i !== -1) {\n position.line++;\n position.column = 0;\n last = i + 1;\n\n // We mark the start of each line, which happens directly after this newline char\n // unless this is the last char.\n // When manually adding multi-line content (such as a comment), `line` will be `undefined`.\n if (last < len && line !== undefined) {\n this._mark(++line, 0, null, null, filename);\n }\n i = str.indexOf(\"\\n\", last);\n }\n position.column += len - last;\n }\n\n _mark(\n line: number | undefined,\n column: number | undefined,\n identifierName: string | undefined,\n identifierNamePos: Pos | undefined,\n filename: string | undefined,\n ): void {\n this._map?.mark(\n this._position,\n line,\n column,\n identifierName,\n identifierNamePos,\n filename,\n );\n }\n\n removeTrailingNewline(): void {\n const queueCursor = this._queueCursor;\n if (\n queueCursor !== 0 &&\n this._queue[queueCursor - 1].char === charcodes.lineFeed\n ) {\n this._queueCursor--;\n }\n }\n\n removeLastSemicolon(): void {\n const queueCursor = this._queueCursor;\n if (\n queueCursor !== 0 &&\n this._queue[queueCursor - 1].char === charcodes.semicolon\n ) {\n this._queueCursor--;\n }\n }\n\n getLastChar(): number {\n const queueCursor = this._queueCursor;\n return queueCursor !== 0 ? this._queue[queueCursor - 1].char : this._last;\n }\n\n /**\n * This will only detect at most 1 newline after a call to `flush()`,\n * but this has not been found so far, and an accurate count can be achieved if needed later.\n */\n getNewlineCount(): number {\n const queueCursor = this._queueCursor;\n let count = 0;\n if (queueCursor === 0) return this._last === charcodes.lineFeed ? 1 : 0;\n for (let i = queueCursor - 1; i >= 0; i--) {\n if (this._queue[i].char !== charcodes.lineFeed) {\n break;\n }\n count++;\n }\n return count === queueCursor && this._last === charcodes.lineFeed\n ? count + 1\n : count;\n }\n\n /**\n * check if current _last + queue ends with newline, return the character before newline\n */\n endsWithCharAndNewline(): number {\n const queue = this._queue;\n const queueCursor = this._queueCursor;\n if (queueCursor !== 0) {\n // every element in queue is one-length whitespace string\n const lastCp = queue[queueCursor - 1].char;\n if (lastCp !== charcodes.lineFeed) return;\n if (queueCursor > 1) {\n return queue[queueCursor - 2].char;\n } else {\n return this._last;\n }\n }\n // We assume that everything being matched is at most a single token plus some whitespace,\n // which everything currently is, but otherwise we'd have to expand _last or check _buf.\n }\n\n hasContent(): boolean {\n return this._queueCursor !== 0 || !!this._last;\n }\n\n /**\n * Certain sourcemap usecases expect mappings to be more accurate than\n * Babel's generic sourcemap handling allows. For now, we special-case\n * identifiers to allow for the primary cases to work.\n * The goal of this line is to ensure that the map output from Babel will\n * have an exact range on identifiers in the output code. Without this\n * line, Babel would potentially include some number of trailing tokens\n * that are printed after the identifier, but before another location has\n * been assigned.\n * This allows tooling like Rollup and Webpack to more accurately perform\n * their own transformations. Most importantly, this allows the import/export\n * transformations performed by those tools to loose less information when\n * applying their own transformations on top of the code and map results\n * generated by Babel itself.\n *\n * The primary example of this is the snippet:\n *\n * import mod from \"mod\";\n * mod();\n *\n * With this line, there will be one mapping range over \"mod\" and another\n * over \"();\", where previously it would have been a single mapping.\n */\n exactSource(loc: Loc | undefined, cb: () => void) {\n if (!this._map) {\n cb();\n return;\n }\n\n this.source(\"start\", loc);\n // @ts-expect-error identifierName is not defined\n const identifierName = loc.identifierName;\n const sourcePos = this._sourcePosition;\n if (identifierName) {\n this._canMarkIdName = false;\n sourcePos.identifierName = identifierName;\n }\n cb();\n\n if (identifierName) {\n this._canMarkIdName = true;\n sourcePos.identifierName = undefined;\n sourcePos.identifierNamePos = undefined;\n }\n this.source(\"end\", loc);\n }\n\n /**\n * Sets a given position as the current source location so generated code after this call\n * will be given this position in the sourcemap.\n */\n\n source(prop: \"start\" | \"end\", loc: Loc | undefined): void {\n if (!this._map) return;\n\n // Since this is called extremely often, we reuse the same _sourcePosition\n // object for the whole lifetime of the buffer.\n this._normalizePosition(prop, loc, 0);\n }\n\n sourceWithOffset(\n prop: \"start\" | \"end\",\n loc: Loc | undefined,\n columnOffset: number,\n ): void {\n if (!this._map) return;\n\n this._normalizePosition(prop, loc, columnOffset);\n }\n\n _normalizePosition(prop: \"start\" | \"end\", loc: Loc, columnOffset: number) {\n const pos = loc[prop];\n const target = this._sourcePosition;\n\n if (pos) {\n target.line = pos.line;\n // TODO: Fix https://github.com/babel/babel/issues/15712 in downstream\n target.column = Math.max(pos.column + columnOffset, 0);\n target.filename = loc.filename;\n }\n }\n\n getCurrentColumn(): number {\n const queue = this._queue;\n const queueCursor = this._queueCursor;\n\n let lastIndex = -1;\n let len = 0;\n for (let i = 0; i < queueCursor; i++) {\n const item = queue[i];\n if (item.char === charcodes.lineFeed) {\n lastIndex = len;\n }\n len += item.repeat;\n }\n\n return lastIndex === -1 ? this._position.column + len : len - 1 - lastIndex;\n }\n\n getCurrentLine(): number {\n let count = 0;\n\n const queue = this._queue;\n for (let i = 0; i < this._queueCursor; i++) {\n if (queue[i].char === charcodes.lineFeed) {\n count++;\n }\n }\n\n return this._position.line + count;\n }\n}\n"],"mappings":";;;;;;AAkCe,MAAMA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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
|
| 3 |
+
Object.defineProperty(exports, "__esModule", {
|
| 4 |
+
value: true
|
| 5 |
+
});
|
| 6 |
+
exports.BlockStatement = BlockStatement;
|
| 7 |
+
exports.Directive = Directive;
|
| 8 |
+
exports.DirectiveLiteral = DirectiveLiteral;
|
| 9 |
+
exports.File = File;
|
| 10 |
+
exports.InterpreterDirective = InterpreterDirective;
|
| 11 |
+
exports.Placeholder = Placeholder;
|
| 12 |
+
exports.Program = Program;
|
| 13 |
+
function File(node) {
|
| 14 |
+
if (node.program) {
|
| 15 |
+
this.print(node.program.interpreter);
|
| 16 |
+
}
|
| 17 |
+
this.print(node.program);
|
| 18 |
+
}
|
| 19 |
+
function Program(node) {
|
| 20 |
+
var _node$directives;
|
| 21 |
+
this.noIndentInnerCommentsHere();
|
| 22 |
+
this.printInnerComments();
|
| 23 |
+
const directivesLen = (_node$directives = node.directives) == null ? void 0 : _node$directives.length;
|
| 24 |
+
if (directivesLen) {
|
| 25 |
+
var _node$directives$trai;
|
| 26 |
+
const newline = node.body.length ? 2 : 1;
|
| 27 |
+
this.printSequence(node.directives, undefined, newline);
|
| 28 |
+
if (!((_node$directives$trai = node.directives[directivesLen - 1].trailingComments) != null && _node$directives$trai.length)) {
|
| 29 |
+
this.newline(newline);
|
| 30 |
+
}
|
| 31 |
+
}
|
| 32 |
+
this.printSequence(node.body);
|
| 33 |
+
}
|
| 34 |
+
function BlockStatement(node) {
|
| 35 |
+
var _node$directives2;
|
| 36 |
+
this.tokenChar(123);
|
| 37 |
+
const exit = this.enterDelimited();
|
| 38 |
+
const directivesLen = (_node$directives2 = node.directives) == null ? void 0 : _node$directives2.length;
|
| 39 |
+
if (directivesLen) {
|
| 40 |
+
var _node$directives$trai2;
|
| 41 |
+
const newline = node.body.length ? 2 : 1;
|
| 42 |
+
this.printSequence(node.directives, true, newline);
|
| 43 |
+
if (!((_node$directives$trai2 = node.directives[directivesLen - 1].trailingComments) != null && _node$directives$trai2.length)) {
|
| 44 |
+
this.newline(newline);
|
| 45 |
+
}
|
| 46 |
+
}
|
| 47 |
+
this.printSequence(node.body, true);
|
| 48 |
+
exit();
|
| 49 |
+
this.rightBrace(node);
|
| 50 |
+
}
|
| 51 |
+
function Directive(node) {
|
| 52 |
+
this.print(node.value);
|
| 53 |
+
this.semicolon();
|
| 54 |
+
}
|
| 55 |
+
const unescapedSingleQuoteRE = /(?:^|[^\\])(?:\\\\)*'/;
|
| 56 |
+
const unescapedDoubleQuoteRE = /(?:^|[^\\])(?:\\\\)*"/;
|
| 57 |
+
function DirectiveLiteral(node) {
|
| 58 |
+
const raw = this.getPossibleRaw(node);
|
| 59 |
+
if (!this.format.minified && raw !== undefined) {
|
| 60 |
+
this.token(raw);
|
| 61 |
+
return;
|
| 62 |
+
}
|
| 63 |
+
const {
|
| 64 |
+
value
|
| 65 |
+
} = node;
|
| 66 |
+
if (!unescapedDoubleQuoteRE.test(value)) {
|
| 67 |
+
this.token(`"${value}"`);
|
| 68 |
+
} else if (!unescapedSingleQuoteRE.test(value)) {
|
| 69 |
+
this.token(`'${value}'`);
|
| 70 |
+
} else {
|
| 71 |
+
throw new Error("Malformed AST: it is not possible to print a directive containing" + " both unescaped single and double quotes.");
|
| 72 |
+
}
|
| 73 |
+
}
|
| 74 |
+
function InterpreterDirective(node) {
|
| 75 |
+
this.token(`#!${node.value}`);
|
| 76 |
+
this.newline(1, true);
|
| 77 |
+
}
|
| 78 |
+
function Placeholder(node) {
|
| 79 |
+
this.token("%%");
|
| 80 |
+
this.print(node.name);
|
| 81 |
+
this.token("%%");
|
| 82 |
+
if (node.expectedNode === "Statement") {
|
| 83 |
+
this.semicolon();
|
| 84 |
+
}
|
| 85 |
+
}
|
| 86 |
+
|
| 87 |
+
//# sourceMappingURL=base.js.map
|
novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/generators/base.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"names":["File","node","program","print","interpreter","Program","_node$directives","noIndentInnerCommentsHere","printInnerComments","directivesLen","directives","length","_node$directives$trai","newline","body","printSequence","undefined","trailingComments","BlockStatement","_node$directives2","token","exit","enterDelimited","_node$directives$trai2","rightBrace","Directive","value","semicolon","unescapedSingleQuoteRE","unescapedDoubleQuoteRE","DirectiveLiteral","raw","getPossibleRaw","format","minified","test","Error","InterpreterDirective","Placeholder","name","expectedNode"],"sources":["../../src/generators/base.ts"],"sourcesContent":["import type Printer from \"../printer.ts\";\nimport type * as t from \"@babel/types\";\n\nexport function File(this: Printer, node: t.File) {\n if (node.program) {\n // Print this here to ensure that Program node 'leadingComments' still\n // get printed after the hashbang.\n this.print(node.program.interpreter);\n }\n\n this.print(node.program);\n}\n\nexport function Program(this: Printer, node: t.Program) {\n // An empty Program doesn't have any inner tokens, so\n // we must explicitly print its inner comments.\n this.noIndentInnerCommentsHere();\n this.printInnerComments();\n\n const directivesLen = node.directives?.length;\n if (directivesLen) {\n const newline = node.body.length ? 2 : 1;\n this.printSequence(node.directives, undefined, newline);\n if (!node.directives[directivesLen - 1].trailingComments?.length) {\n this.newline(newline);\n }\n }\n\n this.printSequence(node.body);\n}\n\nexport function BlockStatement(this: Printer, node: t.BlockStatement) {\n this.token(\"{\");\n const exit = this.enterDelimited();\n\n const directivesLen = node.directives?.length;\n if (directivesLen) {\n const newline = node.body.length ? 2 : 1;\n this.printSequence(node.directives, true, newline);\n if (!node.directives[directivesLen - 1].trailingComments?.length) {\n this.newline(newline);\n }\n }\n\n this.printSequence(node.body, true);\n\n exit();\n this.rightBrace(node);\n}\n\nexport function Directive(this: Printer, node: t.Directive) {\n this.print(node.value);\n this.semicolon();\n}\n\n// These regexes match an even number of \\ followed by a quote\nconst unescapedSingleQuoteRE = /(?:^|[^\\\\])(?:\\\\\\\\)*'/;\nconst unescapedDoubleQuoteRE = /(?:^|[^\\\\])(?:\\\\\\\\)*\"/;\n\nexport function DirectiveLiteral(this: Printer, node: t.DirectiveLiteral) {\n const raw = this.getPossibleRaw(node);\n if (!this.format.minified && raw !== undefined) {\n this.token(raw);\n return;\n }\n\n const { value } = node;\n\n // NOTE: In directives we can't change escapings,\n // because they change the behavior.\n // e.g. \"us\\x65 strict\" (\\x65 is e) is not a \"use strict\" directive.\n\n if (!unescapedDoubleQuoteRE.test(value)) {\n this.token(`\"${value}\"`);\n } else if (!unescapedSingleQuoteRE.test(value)) {\n this.token(`'${value}'`);\n } else {\n throw new Error(\n \"Malformed AST: it is not possible to print a directive containing\" +\n \" both unescaped single and double quotes.\",\n );\n }\n}\n\nexport function InterpreterDirective(\n this: Printer,\n node: t.InterpreterDirective,\n) {\n this.token(`#!${node.value}`);\n this.newline(1, true);\n}\n\nexport function Placeholder(this: Printer, node: t.Placeholder) {\n this.token(\"%%\");\n this.print(node.name);\n this.token(\"%%\");\n\n if (node.expectedNode === \"Statement\") {\n this.semicolon();\n }\n}\n"],"mappings":";;;;;;;;;;;;AAGO,SAASA,IAAIA,CAAgBC,IAAY,EAAE;EAChD,IAAIA,IAAI,CAACC,OAAO,EAAE;IAGhB,IAAI,CAACC,KAAK,CAACF,IAAI,CAACC,OAAO,CAACE,WAAW,CAAC;EACtC;EAEA,IAAI,CAACD,KAAK,CAACF,IAAI,CAACC,OAAO,CAAC;AAC1B;AAEO,SAASG,OAAOA,CAAgBJ,IAAe,EAAE;EAAA,IAAAK,gBAAA;EAGtD,IAAI,CAACC,yBAAyB,CAAC,CAAC;EAChC,IAAI,CAACC,kBAAkB,CAAC,CAAC;EAEzB,MAAMC,aAAa,IAAAH,gBAAA,GAAGL,IAAI,CAACS,U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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
|
| 3 |
+
Object.defineProperty(exports, "__esModule", {
|
| 4 |
+
value: true
|
| 5 |
+
});
|
| 6 |
+
exports.ClassAccessorProperty = ClassAccessorProperty;
|
| 7 |
+
exports.ClassBody = ClassBody;
|
| 8 |
+
exports.ClassExpression = exports.ClassDeclaration = ClassDeclaration;
|
| 9 |
+
exports.ClassMethod = ClassMethod;
|
| 10 |
+
exports.ClassPrivateMethod = ClassPrivateMethod;
|
| 11 |
+
exports.ClassPrivateProperty = ClassPrivateProperty;
|
| 12 |
+
exports.ClassProperty = ClassProperty;
|
| 13 |
+
exports.StaticBlock = StaticBlock;
|
| 14 |
+
exports._classMethodHead = _classMethodHead;
|
| 15 |
+
var _t = require("@babel/types");
|
| 16 |
+
const {
|
| 17 |
+
isExportDefaultDeclaration,
|
| 18 |
+
isExportNamedDeclaration
|
| 19 |
+
} = _t;
|
| 20 |
+
function ClassDeclaration(node, parent) {
|
| 21 |
+
const inExport = isExportDefaultDeclaration(parent) || isExportNamedDeclaration(parent);
|
| 22 |
+
if (!inExport || !this._shouldPrintDecoratorsBeforeExport(parent)) {
|
| 23 |
+
this.printJoin(node.decorators);
|
| 24 |
+
}
|
| 25 |
+
if (node.declare) {
|
| 26 |
+
this.word("declare");
|
| 27 |
+
this.space();
|
| 28 |
+
}
|
| 29 |
+
if (node.abstract) {
|
| 30 |
+
this.word("abstract");
|
| 31 |
+
this.space();
|
| 32 |
+
}
|
| 33 |
+
this.word("class");
|
| 34 |
+
if (node.id) {
|
| 35 |
+
this.space();
|
| 36 |
+
this.print(node.id);
|
| 37 |
+
}
|
| 38 |
+
this.print(node.typeParameters);
|
| 39 |
+
if (node.superClass) {
|
| 40 |
+
this.space();
|
| 41 |
+
this.word("extends");
|
| 42 |
+
this.space();
|
| 43 |
+
this.print(node.superClass);
|
| 44 |
+
this.print(node.superTypeParameters);
|
| 45 |
+
}
|
| 46 |
+
if (node.implements) {
|
| 47 |
+
this.space();
|
| 48 |
+
this.word("implements");
|
| 49 |
+
this.space();
|
| 50 |
+
this.printList(node.implements);
|
| 51 |
+
}
|
| 52 |
+
this.space();
|
| 53 |
+
this.print(node.body);
|
| 54 |
+
}
|
| 55 |
+
function ClassBody(node) {
|
| 56 |
+
this.tokenChar(123);
|
| 57 |
+
if (node.body.length === 0) {
|
| 58 |
+
this.tokenChar(125);
|
| 59 |
+
} else {
|
| 60 |
+
this.newline();
|
| 61 |
+
const separator = classBodyEmptySemicolonsPrinter(this, node);
|
| 62 |
+
separator == null || separator(-1);
|
| 63 |
+
const exit = this.enterDelimited();
|
| 64 |
+
this.printJoin(node.body, true, true, separator, true);
|
| 65 |
+
exit();
|
| 66 |
+
if (!this.endsWith(10)) this.newline();
|
| 67 |
+
this.rightBrace(node);
|
| 68 |
+
}
|
| 69 |
+
}
|
| 70 |
+
function classBodyEmptySemicolonsPrinter(printer, node) {
|
| 71 |
+
if (!printer.tokenMap || node.start == null || node.end == null) {
|
| 72 |
+
return null;
|
| 73 |
+
}
|
| 74 |
+
const indexes = printer.tokenMap.getIndexes(node);
|
| 75 |
+
if (!indexes) return null;
|
| 76 |
+
let k = 1;
|
| 77 |
+
let occurrenceCount = 0;
|
| 78 |
+
let nextLocIndex = 0;
|
| 79 |
+
const advanceNextLocIndex = () => {
|
| 80 |
+
while (nextLocIndex < node.body.length && node.body[nextLocIndex].start == null) {
|
| 81 |
+
nextLocIndex++;
|
| 82 |
+
}
|
| 83 |
+
};
|
| 84 |
+
advanceNextLocIndex();
|
| 85 |
+
return i => {
|
| 86 |
+
if (nextLocIndex <= i) {
|
| 87 |
+
nextLocIndex = i + 1;
|
| 88 |
+
advanceNextLocIndex();
|
| 89 |
+
}
|
| 90 |
+
const end = nextLocIndex === node.body.length ? node.end : node.body[nextLocIndex].start;
|
| 91 |
+
let tok;
|
| 92 |
+
while (k < indexes.length && printer.tokenMap.matchesOriginal(tok = printer._tokens[indexes[k]], ";") && tok.start < end) {
|
| 93 |
+
printer.token(";", undefined, occurrenceCount++);
|
| 94 |
+
k++;
|
| 95 |
+
}
|
| 96 |
+
};
|
| 97 |
+
}
|
| 98 |
+
function ClassProperty(node) {
|
| 99 |
+
this.printJoin(node.decorators);
|
| 100 |
+
if (!node.static && !this.format.preserveFormat) {
|
| 101 |
+
var _node$key$loc;
|
| 102 |
+
const endLine = (_node$key$loc = node.key.loc) == null || (_node$key$loc = _node$key$loc.end) == null ? void 0 : _node$key$loc.line;
|
| 103 |
+
if (endLine) this.catchUp(endLine);
|
| 104 |
+
}
|
| 105 |
+
this.tsPrintClassMemberModifiers(node);
|
| 106 |
+
if (node.computed) {
|
| 107 |
+
this.tokenChar(91);
|
| 108 |
+
this.print(node.key);
|
| 109 |
+
this.tokenChar(93);
|
| 110 |
+
} else {
|
| 111 |
+
this._variance(node);
|
| 112 |
+
this.print(node.key);
|
| 113 |
+
}
|
| 114 |
+
if (node.optional) {
|
| 115 |
+
this.tokenChar(63);
|
| 116 |
+
}
|
| 117 |
+
if (node.definite) {
|
| 118 |
+
this.tokenChar(33);
|
| 119 |
+
}
|
| 120 |
+
this.print(node.typeAnnotation);
|
| 121 |
+
if (node.value) {
|
| 122 |
+
this.space();
|
| 123 |
+
this.tokenChar(61);
|
| 124 |
+
this.space();
|
| 125 |
+
this.print(node.value);
|
| 126 |
+
}
|
| 127 |
+
this.semicolon();
|
| 128 |
+
}
|
| 129 |
+
function ClassAccessorProperty(node) {
|
| 130 |
+
var _node$key$loc2;
|
| 131 |
+
this.printJoin(node.decorators);
|
| 132 |
+
const endLine = (_node$key$loc2 = node.key.loc) == null || (_node$key$loc2 = _node$key$loc2.end) == null ? void 0 : _node$key$loc2.line;
|
| 133 |
+
if (endLine) this.catchUp(endLine);
|
| 134 |
+
this.tsPrintClassMemberModifiers(node);
|
| 135 |
+
this.word("accessor", true);
|
| 136 |
+
this.space();
|
| 137 |
+
if (node.computed) {
|
| 138 |
+
this.tokenChar(91);
|
| 139 |
+
this.print(node.key);
|
| 140 |
+
this.tokenChar(93);
|
| 141 |
+
} else {
|
| 142 |
+
this._variance(node);
|
| 143 |
+
this.print(node.key);
|
| 144 |
+
}
|
| 145 |
+
if (node.optional) {
|
| 146 |
+
this.tokenChar(63);
|
| 147 |
+
}
|
| 148 |
+
if (node.definite) {
|
| 149 |
+
this.tokenChar(33);
|
| 150 |
+
}
|
| 151 |
+
this.print(node.typeAnnotation);
|
| 152 |
+
if (node.value) {
|
| 153 |
+
this.space();
|
| 154 |
+
this.tokenChar(61);
|
| 155 |
+
this.space();
|
| 156 |
+
this.print(node.value);
|
| 157 |
+
}
|
| 158 |
+
this.semicolon();
|
| 159 |
+
}
|
| 160 |
+
function ClassPrivateProperty(node) {
|
| 161 |
+
this.printJoin(node.decorators);
|
| 162 |
+
this.tsPrintClassMemberModifiers(node);
|
| 163 |
+
this.print(node.key);
|
| 164 |
+
if (node.optional) {
|
| 165 |
+
this.tokenChar(63);
|
| 166 |
+
}
|
| 167 |
+
if (node.definite) {
|
| 168 |
+
this.tokenChar(33);
|
| 169 |
+
}
|
| 170 |
+
this.print(node.typeAnnotation);
|
| 171 |
+
if (node.value) {
|
| 172 |
+
this.space();
|
| 173 |
+
this.tokenChar(61);
|
| 174 |
+
this.space();
|
| 175 |
+
this.print(node.value);
|
| 176 |
+
}
|
| 177 |
+
this.semicolon();
|
| 178 |
+
}
|
| 179 |
+
function ClassMethod(node) {
|
| 180 |
+
this._classMethodHead(node);
|
| 181 |
+
this.space();
|
| 182 |
+
this.print(node.body);
|
| 183 |
+
}
|
| 184 |
+
function ClassPrivateMethod(node) {
|
| 185 |
+
this._classMethodHead(node);
|
| 186 |
+
this.space();
|
| 187 |
+
this.print(node.body);
|
| 188 |
+
}
|
| 189 |
+
function _classMethodHead(node) {
|
| 190 |
+
this.printJoin(node.decorators);
|
| 191 |
+
if (!this.format.preserveFormat) {
|
| 192 |
+
var _node$key$loc3;
|
| 193 |
+
const endLine = (_node$key$loc3 = node.key.loc) == null || (_node$key$loc3 = _node$key$loc3.end) == null ? void 0 : _node$key$loc3.line;
|
| 194 |
+
if (endLine) this.catchUp(endLine);
|
| 195 |
+
}
|
| 196 |
+
this.tsPrintClassMemberModifiers(node);
|
| 197 |
+
this._methodHead(node);
|
| 198 |
+
}
|
| 199 |
+
function StaticBlock(node) {
|
| 200 |
+
this.word("static");
|
| 201 |
+
this.space();
|
| 202 |
+
this.tokenChar(123);
|
| 203 |
+
if (node.body.length === 0) {
|
| 204 |
+
this.tokenChar(125);
|
| 205 |
+
} else {
|
| 206 |
+
this.newline();
|
| 207 |
+
this.printSequence(node.body, true);
|
| 208 |
+
this.rightBrace(node);
|
| 209 |
+
}
|
| 210 |
+
}
|
| 211 |
+
|
| 212 |
+
//# sourceMappingURL=classes.js.map
|
novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/generators/classes.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"names":["_t","require","isExportDefaultDeclaration","isExportNamedDeclaration","ClassDeclaration","node","parent","inExport","_shouldPrintDecoratorsBeforeExport","printJoin","decorators","declare","word","space","abstract","id","print","typeParameters","superClass","superTypeParameters","implements","printList","body","ClassBody","token","length","newline","separator","classBodyEmptySemicolonsPrinter","exit","enterDelimited","endsWith","rightBrace","printer","tokenMap","start","end","indexes","getIndexes","k","occurrenceCount","nextLocIndex","advanceNextLocIndex","i","tok","matchesOriginal","_tokens","undefined","ClassProperty","static","format","preserveFormat","_node$key$loc","endLine","key","loc","line","catchUp","tsPrintClassMemberModifiers","computed","_variance","optional","definite","typeAnnotation","value","semicolon","ClassAccessorProperty","_node$key$loc2","ClassPrivateProperty","ClassMethod","_classMethodHead","ClassPrivateMethod","_node$key$loc3","_methodHead","StaticBlock","printSequence"],"sources":["../../src/generators/classes.ts"],"sourcesContent":["import type Printer from \"../printer.ts\";\nimport {\n isExportDefaultDeclaration,\n isExportNamedDeclaration,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\n\n// We inline this package\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as charCodes from \"charcodes\";\n\nexport function ClassDeclaration(\n this: Printer,\n node: t.ClassDeclaration,\n parent: t.Node,\n) {\n const inExport =\n isExportDefaultDeclaration(parent) || isExportNamedDeclaration(parent);\n\n if (\n !inExport ||\n !this._shouldPrintDecoratorsBeforeExport(\n parent as t.ExportDeclaration & { declaration: t.ClassDeclaration },\n )\n ) {\n this.printJoin(node.decorators);\n }\n\n if (node.declare) {\n // TS\n this.word(\"declare\");\n this.space();\n }\n\n if (node.abstract) {\n // TS\n this.word(\"abstract\");\n this.space();\n }\n\n this.word(\"class\");\n\n if (node.id) {\n this.space();\n this.print(node.id);\n }\n\n this.print(node.typeParameters);\n\n if (node.superClass) {\n this.space();\n this.word(\"extends\");\n this.space();\n this.print(node.superClass);\n this.print(\n process.env.BABEL_8_BREAKING\n ? // @ts-ignore(Babel 7 vs Babel 8) Renamed\n node.superTypeArguments\n : // @ts-ignore(Babel 7 vs Babel 8) Renamed\n node.superTypeParameters,\n );\n }\n\n if (node.implements) {\n this.space();\n this.word(\"implements\");\n this.space();\n this.printList(node.implements);\n }\n\n this.space();\n this.print(node.body);\n}\n\nexport { ClassDeclaration as ClassExpression };\n\nexport function ClassBody(this: Printer, node: t.ClassBody) {\n this.token(\"{\");\n if (node.body.length === 0) {\n this.token(\"}\");\n } else {\n this.newline();\n\n const separator = classBodyEmptySemicolonsPrinter(this, node);\n separator?.(-1); // print leading semicolons in preserveFormat mode\n\n const exit = this.enterDelimited();\n this.printJoin(node.body, true, true, separator, true);\n exit();\n\n if (!this.endsWith(charCodes.lineFeed)) this.newline();\n\n this.rightBrace(node);\n }\n}\n\nfunction classBodyEmptySemicolonsPrinter(printer: Printer, node: t.ClassBody) {\n if (!printer.tokenMap || node.start == null || node.end == null) {\n return null;\n }\n\n // \"empty statements\" in class bodies are not represented in the AST.\n // Print them by checking if there are any ; tokens between the current AST\n // member and the next one.\n\n const indexes = printer.tokenMap.getIndexes(node);\n if (!indexes) return null;\n\n let k = 1; // start from 1 to skip '{'\n\n let occurrenceCount = 0;\n\n let nextLocIndex = 0;\n const advanceNextLocIndex = () => {\n while (\n nextLocIndex < node.body.length &&\n node.body[nextLocIndex].start == null\n ) {\n nextLocIndex++;\n }\n };\n advanceNextLocIndex();\n\n return (i: number) => {\n if (nextLocIndex <= i) {\n nextLocIndex = i + 1;\n advanceNextLocIndex();\n }\n\n const end =\n nextLocIndex === node.body.length\n ? node.end\n : node.body[nextLocIndex].start;\n\n let tok;\n while (\n k < indexes.length &&\n printer.tokenMap.matchesOriginal(\n (tok = printer._tokens[indexes[k]]),\n \";\",\n ) &&\n tok.start < end\n ) {\n printer.token(\";\", undefined, occurrenceCount++);\n k++;\n }\n };\n}\n\nexport function ClassProperty(this: Printer, node: t.ClassProperty) {\n this.printJoin(node.decorators);\n\n if (!node.static && !this.format.preserveFormat) {\n // catch up to property key, avoid line break\n // between member TS modifiers and the property key.\n const endLine = node.key.loc?.end?.line;\n if (endLine) this.catchUp(endLine);\n }\n\n this.tsPrintClassMemberModifiers(node);\n\n if (node.computed) {\n this.token(\"[\");\n this.print(node.key);\n this.token(\"]\");\n } else {\n this._variance(node);\n this.print(node.key);\n }\n\n // TS\n if (node.optional) {\n this.token(\"?\");\n }\n if (node.definite) {\n this.token(\"!\");\n }\n\n this.print(node.typeAnnotation);\n if (node.value) {\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.value);\n }\n this.semicolon();\n}\n\nexport function ClassAccessorProperty(\n this: Printer,\n node: t.ClassAccessorProperty,\n) {\n this.printJoin(node.decorators);\n\n // catch up to property key, avoid line break\n // between member modifiers and the property key.\n const endLine = node.key.loc?.end?.line;\n if (endLine) this.catchUp(endLine);\n\n // TS does not support class accessor property yet\n this.tsPrintClassMemberModifiers(node);\n\n this.word(\"accessor\", true);\n this.space();\n\n if (node.computed) {\n this.token(\"[\");\n this.print(node.key);\n this.token(\"]\");\n } else {\n // Todo: Flow does not support class accessor property yet.\n this._variance(node);\n this.print(node.key);\n }\n\n // TS\n if (node.optional) {\n this.token(\"?\");\n }\n if (node.definite) {\n this.token(\"!\");\n }\n\n this.print(node.typeAnnotation);\n if (node.value) {\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.value);\n }\n this.semicolon();\n}\n\nexport function ClassPrivateProperty(\n this: Printer,\n node: t.ClassPrivateProperty,\n) {\n this.printJoin(node.decorators);\n this.tsPrintClassMemberModifiers(node);\n this.print(node.key);\n // TS\n if (node.optional) {\n this.token(\"?\");\n }\n if (node.definite) {\n this.token(\"!\");\n }\n this.print(node.typeAnnotation);\n if (node.value) {\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.value);\n }\n this.semicolon();\n}\n\nexport function ClassMethod(this: Printer, node: t.ClassMethod) {\n this._classMethodHead(node);\n this.space();\n this.print(node.body);\n}\n\nexport function ClassPrivateMethod(this: Printer, node: t.ClassPrivateMethod) {\n this._classMethodHead(node);\n this.space();\n this.print(node.body);\n}\n\nexport function _classMethodHead(\n this: Printer,\n node: t.ClassMethod | t.ClassPrivateMethod | t.TSDeclareMethod,\n) {\n this.printJoin(node.decorators);\n\n if (!this.format.preserveFormat) {\n // catch up to method key, avoid line break\n // between member modifiers/method heads and the method key.\n const endLine = node.key.loc?.end?.line;\n if (endLine) this.catchUp(endLine);\n }\n\n this.tsPrintClassMemberModifiers(node);\n this._methodHead(node);\n}\n\nexport function StaticBlock(this: Printer, node: t.StaticBlock) {\n this.word(\"static\");\n this.space();\n this.token(\"{\");\n if (node.body.length === 0) {\n this.token(\"}\");\n } else {\n this.newline();\n this.printSequence(node.body, true);\n this.rightBrace(node);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AACA,IAAAA,EAAA,GAAAC,OAAA;AAGsB;EAFpBC,0BAA0B;EAC1BC;AAAwB,IAAAH,EAAA;AAQnB,SAASI,gBAAgBA,CAE9BC,IAAwB,EACxBC,MAAc,EACd;EACA,MAAMC,QAAQ,GACZL,0BAA0B,CAACI,MAAM,CAAC,IAAIH,wBAAwB,CAACG,MAAM,CAAC;EAExE,IACE,CAACC,QAAQ,IACT,CAAC,IAAI,CAACC,kCAAkC,CACtCF,MACF,CAAC,EACD;IACA,IAAI,CAACG,SAAS,CAACJ,IAAI,CAACK,UAAU,CAAC;EACjC;EAEA,IAAIL,IAAI,CAACM,OAAO,EAAE;IAEhB,IAAI,CAACC,IAAI,CAAC,SAAS,CAAC;IACpB,IAAI,CAACC,KAAK,CAAC,CAAC;EACd;EAEA,IAAIR,IAAI,CAACS,QAAQ,EAAE;IAEjB,IAAI,CAACF,IAAI,CAAC,UAAU,CAAC;IACrB,IAAI,CAACC,KAAK,CAAC,CAAC;EACd;EAEA,IAAI,CAACD,IAAI,CAAC,OAAO,CAAC;EAElB,IAAIP,IAAI,CAACU,EAAE,EAAE;IACX,IAAI,CAACF,KAAK,CAAC,CAAC;IACZ,IAAI,CAACG,KAAK,CAACX,IAAI,CAACU,EAAE,CAAC;EACrB;EAEA,IAAI,CAACC,KAAK,CAACX,IAAI,CAACY,cAAc,CAAC;EAE/B,IAAIZ,IAAI,CAACa,UAAU,EAAE;IACnB,IAAI,CAACL,KAAK,CAAC,CAAC;IACZ,IAAI,CAACD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cAAc,EAAE;IAAA,IAAAqB,cAAA;IAG/B,MAAMnB,OAAO,IAAAmB,cAAA,GAAGnE,IAAI,CAACiD,GAAG,CAACC,GAAG,cAAAiB,cAAA,GAAZA,cAAA,CAAcpC,GAAG,qBAAjBoC,cAAA,CAAmBhB,IAAI;IACvC,IAAIH,OAAO,EAAE,IAAI,CAACI,OAAO,CAACJ,OAAO,CAAC;EACpC;EAEA,IAAI,CAACK,2BAA2B,CAACrD,IAAI,CAAC;EACtC,IAAI,CAACoE,WAAW,CAACpE,IAAI,CAAC;AACxB;AAEO,SAASqE,WAAWA,CAAgBrE,IAAmB,EAAE;EAC9D,IAAI,CAACO,IAAI,CAAC,QAAQ,CAAC;EACnB,IAAI,CAACC,KAAK,CAAC,CAAC;EACZ,IAAI,CAACW,SAAK,IAAI,CAAC;EACf,IAAInB,IAAI,CAACiB,IAAI,CAACG,MAAM,KAAK,CAAC,EAAE;IAC1B,IAAI,CAACD,SAAK,IAAI,CAAC;EACjB,CAAC,MAAM;IACL,IAAI,CAACE,OAAO,CAAC,CAAC;IACd,IAAI,CAACiD,aAAa,CAACtE,IAAI,CAACiB,IAAI,EAAE,IAAI,CAAC;IACnC,IAAI,CAACU,UAAU,CAAC3B,IAAI,CAAC;EACvB;AACF","ignoreList":[]}
|
novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/generators/deprecated.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
|
| 3 |
+
Object.defineProperty(exports, "__esModule", {
|
| 4 |
+
value: true
|
| 5 |
+
});
|
| 6 |
+
exports.addDeprecatedGenerators = addDeprecatedGenerators;
|
| 7 |
+
function addDeprecatedGenerators(PrinterClass) {
|
| 8 |
+
{
|
| 9 |
+
const deprecatedBabel7Generators = {
|
| 10 |
+
Noop() {},
|
| 11 |
+
TSExpressionWithTypeArguments(node) {
|
| 12 |
+
this.print(node.expression);
|
| 13 |
+
this.print(node.typeParameters);
|
| 14 |
+
},
|
| 15 |
+
DecimalLiteral(node) {
|
| 16 |
+
const raw = this.getPossibleRaw(node);
|
| 17 |
+
if (!this.format.minified && raw !== undefined) {
|
| 18 |
+
this.word(raw);
|
| 19 |
+
return;
|
| 20 |
+
}
|
| 21 |
+
this.word(node.value + "m");
|
| 22 |
+
}
|
| 23 |
+
};
|
| 24 |
+
Object.assign(PrinterClass.prototype, deprecatedBabel7Generators);
|
| 25 |
+
}
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
//# sourceMappingURL=deprecated.js.map
|
novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/generators/deprecated.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"names":["addDeprecatedGenerators","PrinterClass","deprecatedBabel7Generators","Noop","TSExpressionWithTypeArguments","node","print","expression","typeParameters","DecimalLiteral","raw","getPossibleRaw","format","minified","undefined","word","value","Object","assign","prototype"],"sources":["../../src/generators/deprecated.ts"],"sourcesContent":["import type Printer from \"../printer\";\nimport type * as t from \"@babel/types\";\n\nexport type DeprecatedBabel7ASTTypes =\n | \"Noop\"\n | \"TSExpressionWithTypeArguments\"\n | \"DecimalLiteral\";\n\nexport function addDeprecatedGenerators(PrinterClass: typeof Printer) {\n // Add Babel 7 generator methods that is removed in Babel 8\n if (!process.env.BABEL_8_BREAKING) {\n const deprecatedBabel7Generators = {\n Noop(this: Printer) {},\n\n TSExpressionWithTypeArguments(\n this: Printer,\n // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST\n node: t.TSExpressionWithTypeArguments,\n ) {\n this.print(node.expression);\n this.print(node.typeParameters);\n },\n\n DecimalLiteral(this: Printer, node: any) {\n const raw = this.getPossibleRaw(node);\n if (!this.format.minified && raw !== undefined) {\n this.word(raw);\n return;\n }\n this.word(node.value + \"m\");\n },\n } satisfies Record<\n DeprecatedBabel7ASTTypes,\n (this: Printer, node: any) => void\n >;\n Object.assign(PrinterClass.prototype, deprecatedBabel7Generators);\n }\n}\n"],"mappings":";;;;;;AAQO,SAASA,uBAAuBA,CAACC,YAA4B,EAAE;EAEjC;IACjC,MAAMC,0BAA0B,GAAG;MACjCC,IAAIA,CAAA,EAAgB,CAAC,CAAC;MAEtBC,6BAA6BA,CAG3BC,IAAqC,EACrC;QACA,IAAI,CAACC,KAAK,CAACD,IAAI,CAACE,UAAU,CAAC;QAC3B,IAAI,CAACD,KAAK,CAACD,IAAI,CAACG,cAAc,CAAC;MACjC,CAAC;MAEDC,cAAcA,CAAgBJ,IAAS,EAAE;QACvC,MAAMK,GAAG,GAAG,IAAI,CAACC,cAAc,CAACN,IAAI,CAAC;QACrC,IAAI,CAAC,IAAI,CAACO,MAAM,CAACC,QAAQ,IAAIH,GAAG,KAAKI,SAAS,EAAE;UAC9C,IAAI,CAACC,IAAI,CAACL,GAAG,CAAC;UACd;QACF;QACA,IAAI,CAACK,IAAI,CAACV,IAAI,CAACW,KAAK,GAAG,GAAG,CAAC;MAC7B;IACF,CAGC;IACDC,MAAM,CAACC,MAAM,CAACjB,YAAY,CAACkB,SAAS,EAAEjB,0BAA0B,CAAC;EACnE;AACF","ignoreList":[]}
|
novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/generators/expressions.js
ADDED
|
@@ -0,0 +1,300 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
|
| 3 |
+
Object.defineProperty(exports, "__esModule", {
|
| 4 |
+
value: true
|
| 5 |
+
});
|
| 6 |
+
exports.LogicalExpression = exports.BinaryExpression = exports.AssignmentExpression = AssignmentExpression;
|
| 7 |
+
exports.AssignmentPattern = AssignmentPattern;
|
| 8 |
+
exports.AwaitExpression = AwaitExpression;
|
| 9 |
+
exports.BindExpression = BindExpression;
|
| 10 |
+
exports.CallExpression = CallExpression;
|
| 11 |
+
exports.ConditionalExpression = ConditionalExpression;
|
| 12 |
+
exports.Decorator = Decorator;
|
| 13 |
+
exports.DoExpression = DoExpression;
|
| 14 |
+
exports.EmptyStatement = EmptyStatement;
|
| 15 |
+
exports.ExpressionStatement = ExpressionStatement;
|
| 16 |
+
exports.Import = Import;
|
| 17 |
+
exports.MemberExpression = MemberExpression;
|
| 18 |
+
exports.MetaProperty = MetaProperty;
|
| 19 |
+
exports.ModuleExpression = ModuleExpression;
|
| 20 |
+
exports.NewExpression = NewExpression;
|
| 21 |
+
exports.OptionalCallExpression = OptionalCallExpression;
|
| 22 |
+
exports.OptionalMemberExpression = OptionalMemberExpression;
|
| 23 |
+
exports.ParenthesizedExpression = ParenthesizedExpression;
|
| 24 |
+
exports.PrivateName = PrivateName;
|
| 25 |
+
exports.SequenceExpression = SequenceExpression;
|
| 26 |
+
exports.Super = Super;
|
| 27 |
+
exports.ThisExpression = ThisExpression;
|
| 28 |
+
exports.UnaryExpression = UnaryExpression;
|
| 29 |
+
exports.UpdateExpression = UpdateExpression;
|
| 30 |
+
exports.V8IntrinsicIdentifier = V8IntrinsicIdentifier;
|
| 31 |
+
exports.YieldExpression = YieldExpression;
|
| 32 |
+
exports._shouldPrintDecoratorsBeforeExport = _shouldPrintDecoratorsBeforeExport;
|
| 33 |
+
var _t = require("@babel/types");
|
| 34 |
+
var _index = require("../node/index.js");
|
| 35 |
+
const {
|
| 36 |
+
isCallExpression,
|
| 37 |
+
isLiteral,
|
| 38 |
+
isMemberExpression,
|
| 39 |
+
isNewExpression,
|
| 40 |
+
isPattern
|
| 41 |
+
} = _t;
|
| 42 |
+
function UnaryExpression(node) {
|
| 43 |
+
const {
|
| 44 |
+
operator
|
| 45 |
+
} = node;
|
| 46 |
+
if (operator === "void" || operator === "delete" || operator === "typeof" || operator === "throw") {
|
| 47 |
+
this.word(operator);
|
| 48 |
+
this.space();
|
| 49 |
+
} else {
|
| 50 |
+
this.token(operator);
|
| 51 |
+
}
|
| 52 |
+
this.print(node.argument);
|
| 53 |
+
}
|
| 54 |
+
function DoExpression(node) {
|
| 55 |
+
if (node.async) {
|
| 56 |
+
this.word("async", true);
|
| 57 |
+
this.space();
|
| 58 |
+
}
|
| 59 |
+
this.word("do");
|
| 60 |
+
this.space();
|
| 61 |
+
this.print(node.body);
|
| 62 |
+
}
|
| 63 |
+
function ParenthesizedExpression(node) {
|
| 64 |
+
this.tokenChar(40);
|
| 65 |
+
const exit = this.enterDelimited();
|
| 66 |
+
this.print(node.expression);
|
| 67 |
+
exit();
|
| 68 |
+
this.rightParens(node);
|
| 69 |
+
}
|
| 70 |
+
function UpdateExpression(node) {
|
| 71 |
+
if (node.prefix) {
|
| 72 |
+
this.token(node.operator);
|
| 73 |
+
this.print(node.argument);
|
| 74 |
+
} else {
|
| 75 |
+
this.print(node.argument, true);
|
| 76 |
+
this.token(node.operator);
|
| 77 |
+
}
|
| 78 |
+
}
|
| 79 |
+
function ConditionalExpression(node) {
|
| 80 |
+
this.print(node.test);
|
| 81 |
+
this.space();
|
| 82 |
+
this.tokenChar(63);
|
| 83 |
+
this.space();
|
| 84 |
+
this.print(node.consequent);
|
| 85 |
+
this.space();
|
| 86 |
+
this.tokenChar(58);
|
| 87 |
+
this.space();
|
| 88 |
+
this.print(node.alternate);
|
| 89 |
+
}
|
| 90 |
+
function NewExpression(node, parent) {
|
| 91 |
+
this.word("new");
|
| 92 |
+
this.space();
|
| 93 |
+
this.print(node.callee);
|
| 94 |
+
if (this.format.minified && node.arguments.length === 0 && !node.optional && !isCallExpression(parent, {
|
| 95 |
+
callee: node
|
| 96 |
+
}) && !isMemberExpression(parent) && !isNewExpression(parent)) {
|
| 97 |
+
return;
|
| 98 |
+
}
|
| 99 |
+
this.print(node.typeArguments);
|
| 100 |
+
{
|
| 101 |
+
this.print(node.typeParameters);
|
| 102 |
+
if (node.optional) {
|
| 103 |
+
this.token("?.");
|
| 104 |
+
}
|
| 105 |
+
}
|
| 106 |
+
if (node.arguments.length === 0 && this.tokenMap && !this.tokenMap.endMatches(node, ")")) {
|
| 107 |
+
return;
|
| 108 |
+
}
|
| 109 |
+
this.tokenChar(40);
|
| 110 |
+
const exit = this.enterDelimited();
|
| 111 |
+
this.printList(node.arguments, this.shouldPrintTrailingComma(")"));
|
| 112 |
+
exit();
|
| 113 |
+
this.rightParens(node);
|
| 114 |
+
}
|
| 115 |
+
function SequenceExpression(node) {
|
| 116 |
+
this.printList(node.expressions);
|
| 117 |
+
}
|
| 118 |
+
function ThisExpression() {
|
| 119 |
+
this.word("this");
|
| 120 |
+
}
|
| 121 |
+
function Super() {
|
| 122 |
+
this.word("super");
|
| 123 |
+
}
|
| 124 |
+
function _shouldPrintDecoratorsBeforeExport(node) {
|
| 125 |
+
if (typeof this.format.decoratorsBeforeExport === "boolean") {
|
| 126 |
+
return this.format.decoratorsBeforeExport;
|
| 127 |
+
}
|
| 128 |
+
return typeof node.start === "number" && node.start === node.declaration.start;
|
| 129 |
+
}
|
| 130 |
+
function Decorator(node) {
|
| 131 |
+
this.tokenChar(64);
|
| 132 |
+
this.print(node.expression);
|
| 133 |
+
this.newline();
|
| 134 |
+
}
|
| 135 |
+
function OptionalMemberExpression(node) {
|
| 136 |
+
let {
|
| 137 |
+
computed
|
| 138 |
+
} = node;
|
| 139 |
+
const {
|
| 140 |
+
optional,
|
| 141 |
+
property
|
| 142 |
+
} = node;
|
| 143 |
+
this.print(node.object);
|
| 144 |
+
if (!computed && isMemberExpression(property)) {
|
| 145 |
+
throw new TypeError("Got a MemberExpression for MemberExpression property");
|
| 146 |
+
}
|
| 147 |
+
if (isLiteral(property) && typeof property.value === "number") {
|
| 148 |
+
computed = true;
|
| 149 |
+
}
|
| 150 |
+
if (optional) {
|
| 151 |
+
this.token("?.");
|
| 152 |
+
}
|
| 153 |
+
if (computed) {
|
| 154 |
+
this.tokenChar(91);
|
| 155 |
+
this.print(property);
|
| 156 |
+
this.tokenChar(93);
|
| 157 |
+
} else {
|
| 158 |
+
if (!optional) {
|
| 159 |
+
this.tokenChar(46);
|
| 160 |
+
}
|
| 161 |
+
this.print(property);
|
| 162 |
+
}
|
| 163 |
+
}
|
| 164 |
+
function OptionalCallExpression(node) {
|
| 165 |
+
this.print(node.callee);
|
| 166 |
+
{
|
| 167 |
+
this.print(node.typeParameters);
|
| 168 |
+
}
|
| 169 |
+
if (node.optional) {
|
| 170 |
+
this.token("?.");
|
| 171 |
+
}
|
| 172 |
+
this.print(node.typeArguments);
|
| 173 |
+
this.tokenChar(40);
|
| 174 |
+
const exit = this.enterDelimited();
|
| 175 |
+
this.printList(node.arguments);
|
| 176 |
+
exit();
|
| 177 |
+
this.rightParens(node);
|
| 178 |
+
}
|
| 179 |
+
function CallExpression(node) {
|
| 180 |
+
this.print(node.callee);
|
| 181 |
+
this.print(node.typeArguments);
|
| 182 |
+
{
|
| 183 |
+
this.print(node.typeParameters);
|
| 184 |
+
}
|
| 185 |
+
this.tokenChar(40);
|
| 186 |
+
const exit = this.enterDelimited();
|
| 187 |
+
this.printList(node.arguments, this.shouldPrintTrailingComma(")"));
|
| 188 |
+
exit();
|
| 189 |
+
this.rightParens(node);
|
| 190 |
+
}
|
| 191 |
+
function Import() {
|
| 192 |
+
this.word("import");
|
| 193 |
+
}
|
| 194 |
+
function AwaitExpression(node) {
|
| 195 |
+
this.word("await");
|
| 196 |
+
this.space();
|
| 197 |
+
this.print(node.argument);
|
| 198 |
+
}
|
| 199 |
+
function YieldExpression(node) {
|
| 200 |
+
if (node.delegate) {
|
| 201 |
+
this.word("yield", true);
|
| 202 |
+
this.tokenChar(42);
|
| 203 |
+
if (node.argument) {
|
| 204 |
+
this.space();
|
| 205 |
+
this.print(node.argument);
|
| 206 |
+
}
|
| 207 |
+
} else if (node.argument) {
|
| 208 |
+
this.word("yield", true);
|
| 209 |
+
this.space();
|
| 210 |
+
this.print(node.argument);
|
| 211 |
+
} else {
|
| 212 |
+
this.word("yield");
|
| 213 |
+
}
|
| 214 |
+
}
|
| 215 |
+
function EmptyStatement() {
|
| 216 |
+
this.semicolon(true);
|
| 217 |
+
}
|
| 218 |
+
function ExpressionStatement(node) {
|
| 219 |
+
this.tokenContext |= _index.TokenContext.expressionStatement;
|
| 220 |
+
this.print(node.expression);
|
| 221 |
+
this.semicolon();
|
| 222 |
+
}
|
| 223 |
+
function AssignmentPattern(node) {
|
| 224 |
+
this.print(node.left);
|
| 225 |
+
if (node.left.type === "Identifier" || isPattern(node.left)) {
|
| 226 |
+
if (node.left.optional) this.tokenChar(63);
|
| 227 |
+
this.print(node.left.typeAnnotation);
|
| 228 |
+
}
|
| 229 |
+
this.space();
|
| 230 |
+
this.tokenChar(61);
|
| 231 |
+
this.space();
|
| 232 |
+
this.print(node.right);
|
| 233 |
+
}
|
| 234 |
+
function AssignmentExpression(node) {
|
| 235 |
+
this.print(node.left);
|
| 236 |
+
this.space();
|
| 237 |
+
if (node.operator === "in" || node.operator === "instanceof") {
|
| 238 |
+
this.word(node.operator);
|
| 239 |
+
} else {
|
| 240 |
+
this.token(node.operator);
|
| 241 |
+
this._endsWithDiv = node.operator === "/";
|
| 242 |
+
}
|
| 243 |
+
this.space();
|
| 244 |
+
this.print(node.right);
|
| 245 |
+
}
|
| 246 |
+
function BindExpression(node) {
|
| 247 |
+
this.print(node.object);
|
| 248 |
+
this.token("::");
|
| 249 |
+
this.print(node.callee);
|
| 250 |
+
}
|
| 251 |
+
function MemberExpression(node) {
|
| 252 |
+
this.print(node.object);
|
| 253 |
+
if (!node.computed && isMemberExpression(node.property)) {
|
| 254 |
+
throw new TypeError("Got a MemberExpression for MemberExpression property");
|
| 255 |
+
}
|
| 256 |
+
let computed = node.computed;
|
| 257 |
+
if (isLiteral(node.property) && typeof node.property.value === "number") {
|
| 258 |
+
computed = true;
|
| 259 |
+
}
|
| 260 |
+
if (computed) {
|
| 261 |
+
const exit = this.enterDelimited();
|
| 262 |
+
this.tokenChar(91);
|
| 263 |
+
this.print(node.property);
|
| 264 |
+
this.tokenChar(93);
|
| 265 |
+
exit();
|
| 266 |
+
} else {
|
| 267 |
+
this.tokenChar(46);
|
| 268 |
+
this.print(node.property);
|
| 269 |
+
}
|
| 270 |
+
}
|
| 271 |
+
function MetaProperty(node) {
|
| 272 |
+
this.print(node.meta);
|
| 273 |
+
this.tokenChar(46);
|
| 274 |
+
this.print(node.property);
|
| 275 |
+
}
|
| 276 |
+
function PrivateName(node) {
|
| 277 |
+
this.tokenChar(35);
|
| 278 |
+
this.print(node.id);
|
| 279 |
+
}
|
| 280 |
+
function V8IntrinsicIdentifier(node) {
|
| 281 |
+
this.tokenChar(37);
|
| 282 |
+
this.word(node.name);
|
| 283 |
+
}
|
| 284 |
+
function ModuleExpression(node) {
|
| 285 |
+
this.word("module", true);
|
| 286 |
+
this.space();
|
| 287 |
+
this.tokenChar(123);
|
| 288 |
+
this.indent();
|
| 289 |
+
const {
|
| 290 |
+
body
|
| 291 |
+
} = node;
|
| 292 |
+
if (body.body.length || body.directives.length) {
|
| 293 |
+
this.newline();
|
| 294 |
+
}
|
| 295 |
+
this.print(body);
|
| 296 |
+
this.dedent();
|
| 297 |
+
this.rightBrace(node);
|
| 298 |
+
}
|
| 299 |
+
|
| 300 |
+
//# sourceMappingURL=expressions.js.map
|
novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/generators/expressions.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"names":["_t","require","_index","isCallExpression","isLiteral","isMemberExpression","isNewExpression","isPattern","UnaryExpression","node","operator","word","space","token","print","argument","DoExpression","async","body","ParenthesizedExpression","exit","enterDelimited","expression","rightParens","UpdateExpression","prefix","ConditionalExpression","test","consequent","alternate","NewExpression","parent","callee","format","minified","arguments","length","optional","typeArguments","typeParameters","tokenMap","endMatches","printList","shouldPrintTrailingComma","SequenceExpression","expressions","ThisExpression","Super","_shouldPrintDecoratorsBeforeExport","decoratorsBeforeExport","start","declaration","Decorator","newline","OptionalMemberExpression","computed","property","object","TypeError","value","OptionalCallExpression","CallExpression","Import","AwaitExpression","YieldExpression","delegate","EmptyStatement","semicolon","ExpressionStatement","tokenContext","TokenContext","expressionStatement","AssignmentPattern","left","type","typeAnnotation","right","AssignmentExpression","_endsWithDiv","BindExpression","MemberExpression","MetaProperty","meta","PrivateName","id","V8IntrinsicIdentifier","name","ModuleExpression","indent","directives","dedent","rightBrace"],"sources":["../../src/generators/expressions.ts"],"sourcesContent":["import type Printer from \"../printer.ts\";\nimport {\n isCallExpression,\n isLiteral,\n isMemberExpression,\n isNewExpression,\n isPattern,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport { TokenContext } from \"../node/index.ts\";\n\nexport function UnaryExpression(this: Printer, node: t.UnaryExpression) {\n const { operator } = node;\n if (\n operator === \"void\" ||\n operator === \"delete\" ||\n operator === \"typeof\" ||\n // throwExpressions\n operator === \"throw\"\n ) {\n this.word(operator);\n this.space();\n } else {\n this.token(operator);\n }\n\n this.print(node.argument);\n}\n\nexport function DoExpression(this: Printer, node: t.DoExpression) {\n if (node.async) {\n this.word(\"async\", true);\n this.space();\n }\n this.word(\"do\");\n this.space();\n this.print(node.body);\n}\n\nexport function ParenthesizedExpression(\n this: Printer,\n node: t.ParenthesizedExpression,\n) {\n this.token(\"(\");\n const exit = this.enterDelimited();\n this.print(node.expression);\n exit();\n this.rightParens(node);\n}\n\nexport function UpdateExpression(this: Printer, node: t.UpdateExpression) {\n if (node.prefix) {\n this.token(node.operator);\n this.print(node.argument);\n } else {\n this.print(node.argument, true);\n this.token(node.operator);\n }\n}\n\nexport function ConditionalExpression(\n this: Printer,\n node: t.ConditionalExpression,\n) {\n this.print(node.test);\n this.space();\n this.token(\"?\");\n this.space();\n this.print(node.consequent);\n this.space();\n this.token(\":\");\n this.space();\n this.print(node.alternate);\n}\n\nexport function NewExpression(\n this: Printer,\n node: t.NewExpression,\n parent: t.Node,\n) {\n this.word(\"new\");\n this.space();\n this.print(node.callee);\n if (\n this.format.minified &&\n node.arguments.length === 0 &&\n // @ts-ignore(Babel 7 vs Babel 8) Removed in Babel 8\n !node.optional &&\n !isCallExpression(parent, { callee: node }) &&\n !isMemberExpression(parent) &&\n !isNewExpression(parent)\n ) {\n return;\n }\n\n this.print(node.typeArguments);\n if (!process.env.BABEL_8_BREAKING) {\n // @ts-ignore(Babel 7 vs Babel 8) Removed in Babel 8\n this.print(node.typeParameters); // Legacy TS AST\n // @ts-ignore(Babel 7 vs Babel 8) Removed in Babel 8\n if (node.optional) {\n this.token(\"?.\");\n }\n }\n\n if (\n node.arguments.length === 0 &&\n this.tokenMap &&\n !this.tokenMap.endMatches(node, \")\")\n ) {\n return;\n }\n\n this.token(\"(\");\n const exit = this.enterDelimited();\n this.printList(node.arguments, this.shouldPrintTrailingComma(\")\"));\n exit();\n this.rightParens(node);\n}\n\nexport function SequenceExpression(this: Printer, node: t.SequenceExpression) {\n this.printList(node.expressions);\n}\n\nexport function ThisExpression(this: Printer) {\n this.word(\"this\");\n}\n\nexport function Super(this: Printer) {\n this.word(\"super\");\n}\n\nexport function _shouldPrintDecoratorsBeforeExport(\n this: Printer,\n node: t.ExportDeclaration & { declaration: t.ClassDeclaration },\n) {\n if (typeof this.format.decoratorsBeforeExport === \"boolean\") {\n return this.format.decoratorsBeforeExport;\n }\n return (\n typeof node.start === \"number\" && node.start === node.declaration.start\n );\n}\n\nexport function Decorator(this: Printer, node: t.Decorator) {\n this.token(\"@\");\n this.print(node.expression);\n this.newline();\n}\n\nexport function OptionalMemberExpression(\n this: Printer,\n node: t.OptionalMemberExpression,\n) {\n let { computed } = node;\n const { optional, property } = node;\n\n this.print(node.object);\n\n if (!computed && isMemberExpression(property)) {\n throw new TypeError(\"Got a MemberExpression for MemberExpression property\");\n }\n\n // @ts-expect-error todo(flow->ts) maybe instead of typeof check specific literal types?\n if (isLiteral(property) && typeof property.value === \"number\") {\n computed = true;\n }\n if (optional) {\n this.token(\"?.\");\n }\n\n if (computed) {\n this.token(\"[\");\n this.print(property);\n this.token(\"]\");\n } else {\n if (!optional) {\n this.token(\".\");\n }\n this.print(property);\n }\n}\n\nexport function OptionalCallExpression(\n this: Printer,\n node: t.OptionalCallExpression,\n) {\n this.print(node.callee);\n\n if (!process.env.BABEL_8_BREAKING) {\n // @ts-ignore(Babel 7 vs Babel 8) Removed in Babel 8\n this.print(node.typeParameters); // legacy TS AST\n }\n\n if (node.optional) {\n this.token(\"?.\");\n }\n\n this.print(node.typeArguments);\n\n this.token(\"(\");\n const exit = this.enterDelimited();\n this.printList(node.arguments);\n exit();\n this.rightParens(node);\n}\n\nexport function CallExpression(this: Printer, node: t.CallExpression) {\n this.print(node.callee);\n\n this.print(node.typeArguments);\n if (!process.env.BABEL_8_BREAKING) {\n // @ts-ignore(Babel 7 vs Babel 8) Removed in Babel 8\n this.print(node.typeParameters); // legacy TS AST\n }\n this.token(\"(\");\n const exit = this.enterDelimited();\n this.printList(node.arguments, this.shouldPrintTrailingComma(\")\"));\n exit();\n this.rightParens(node);\n}\n\nexport function Import(this: Printer) {\n this.word(\"import\");\n}\n\nexport function AwaitExpression(this: Printer, node: t.AwaitExpression) {\n this.word(\"await\");\n this.space();\n this.print(node.argument);\n}\n\nexport function YieldExpression(this: Printer, node: t.YieldExpression) {\n if (node.delegate) {\n this.word(\"yield\", true);\n this.token(\"*\");\n if (node.argument) {\n this.space();\n // line terminators are allowed after yield*\n this.print(node.argument);\n }\n } else if (node.argument) {\n this.word(\"yield\", true);\n this.space();\n this.print(node.argument);\n } else {\n this.word(\"yield\");\n }\n}\n\nexport function EmptyStatement(this: Printer) {\n this.semicolon(true /* force */);\n}\n\nexport function ExpressionStatement(\n this: Printer,\n node: t.ExpressionStatement,\n) {\n this.tokenContext |= TokenContext.expressionStatement;\n this.print(node.expression);\n this.semicolon();\n}\n\nexport function AssignmentPattern(this: Printer, node: t.AssignmentPattern) {\n this.print(node.left);\n if (node.left.type === \"Identifier\" || isPattern(node.left)) {\n if (node.left.optional) this.token(\"?\");\n this.print(node.left.typeAnnotation);\n }\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.right);\n}\n\nexport function AssignmentExpression(\n this: Printer,\n node: t.AssignmentExpression | t.BinaryExpression | t.LogicalExpression,\n) {\n this.print(node.left);\n\n this.space();\n if (node.operator === \"in\" || node.operator === \"instanceof\") {\n this.word(node.operator);\n } else {\n this.token(node.operator);\n this._endsWithDiv = node.operator === \"/\";\n }\n this.space();\n\n this.print(node.right);\n}\n\nexport function BindExpression(this: Printer, node: t.BindExpression) {\n this.print(node.object);\n this.token(\"::\");\n this.print(node.callee);\n}\n\nexport {\n AssignmentExpression as BinaryExpression,\n AssignmentExpression as LogicalExpression,\n};\n\nexport function MemberExpression(this: Printer, node: t.MemberExpression) {\n this.print(node.object);\n\n if (!node.computed && isMemberExpression(node.property)) {\n throw new TypeError(\"Got a MemberExpression for MemberExpression property\");\n }\n\n let computed = node.computed;\n // @ts-expect-error todo(flow->ts) maybe use specific literal types\n if (isLiteral(node.property) && typeof node.property.value === \"number\") {\n computed = true;\n }\n\n if (computed) {\n const exit = this.enterDelimited();\n this.token(\"[\");\n this.print(node.property);\n this.token(\"]\");\n exit();\n } else {\n this.token(\".\");\n this.print(node.property);\n }\n}\n\nexport function MetaProperty(this: Printer, node: t.MetaProperty) {\n this.print(node.meta);\n this.token(\".\");\n this.print(node.property);\n}\n\nexport function PrivateName(this: Printer, node: t.PrivateName) {\n this.token(\"#\");\n this.print(node.id);\n}\n\nexport function V8IntrinsicIdentifier(\n this: Printer,\n node: t.V8IntrinsicIdentifier,\n) {\n this.token(\"%\");\n this.word(node.name);\n}\n\nexport function ModuleExpression(this: Printer, node: t.ModuleExpression) {\n this.word(\"module\", true);\n this.space();\n this.token(\"{\");\n this.indent();\n const { body } = node;\n if (body.body.length || body.directives.length) {\n this.newline();\n }\n this.print(body);\n this.dedent();\n this.rightBrace(node);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,EAAA,GAAAC,OAAA;AAQA,IAAAC,MAAA,GAAAD,OAAA;AAAgD;EAP9CE,gBAAgB;EAChBC,SAAS;EACTC,kBAAkB;EAClBC,eAAe;EACfC;AAAS,IAAAP,EAAA;AAKJ,SAASQ,eAAeA,CAAgBC,IAAuB,EAAE;EACtE,MAAM;IAAEC;EAAS,CAAC,GAAGD,IAAI;EACzB,IACEC,QAAQ,KAAK,MAAM,IACnBA,QAAQ,KAAK,QAAQ,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AAEO,SAASyB,YAAYA,CAAgBxE,IAAoB,EAAE;EAChE,IAAI,CAACK,KAAK,CAACL,IAAI,CAACyE,IAAI,CAAC;EACrB,IAAI,CAACrE,SAAK,GAAI,CAAC;EACf,IAAI,CAACC,KAAK,CAACL,IAAI,CAAC+C,QAAQ,CAAC;AAC3B;AAEO,SAAS2B,WAAWA,CAAgB1E,IAAmB,EAAE;EAC9D,IAAI,CAACI,SAAK,GAAI,CAAC;EACf,IAAI,CAACC,KAAK,CAACL,IAAI,CAAC2E,EAAE,CAAC;AACrB;AAEO,SAASC,qBAAqBA,CAEnC5E,IAA6B,EAC7B;EACA,IAAI,CAACI,SAAK,GAAI,CAAC;EACf,IAAI,CAACF,IAAI,CAACF,IAAI,CAAC6E,IAAI,CAAC;AACtB;AAEO,SAASC,gBAAgBA,CAAgB9E,IAAwB,EAAE;EACxE,IAAI,CAACE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC;EACzB,IAAI,CAACC,KAAK,CAAC,CAAC;EACZ,IAAI,CAACC,SAAK,IAAI,CAAC;EACf,IAAI,CAAC2E,MAAM,CAAC,CAAC;EACb,MAAM;IAAEtE;EAAK,CAAC,GAAGT,IAAI;EACrB,IAAIS,IAAI,CAACA,IAAI,CAACkB,MAAM,IAAIlB,IAAI,CAACuE,UAAU,CAACrD,MAAM,EAAE;IAC9C,IAAI,CAACiB,OAAO,CAAC,CAAC;EAChB;EACA,IAAI,CAACvC,KAAK,CAACI,IAAI,CAAC;EAChB,IAAI,CAACwE,MAAM,CAAC,CAAC;EACb,IAAI,CAACC,UAAU,CAAClF,IAAI,CAAC;AACvB","ignoreList":[]}
|
novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/generators/flow.js
ADDED
|
@@ -0,0 +1,660 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
|
| 3 |
+
Object.defineProperty(exports, "__esModule", {
|
| 4 |
+
value: true
|
| 5 |
+
});
|
| 6 |
+
exports.AnyTypeAnnotation = AnyTypeAnnotation;
|
| 7 |
+
exports.ArrayTypeAnnotation = ArrayTypeAnnotation;
|
| 8 |
+
exports.BooleanLiteralTypeAnnotation = BooleanLiteralTypeAnnotation;
|
| 9 |
+
exports.BooleanTypeAnnotation = BooleanTypeAnnotation;
|
| 10 |
+
exports.DeclareClass = DeclareClass;
|
| 11 |
+
exports.DeclareExportAllDeclaration = DeclareExportAllDeclaration;
|
| 12 |
+
exports.DeclareExportDeclaration = DeclareExportDeclaration;
|
| 13 |
+
exports.DeclareFunction = DeclareFunction;
|
| 14 |
+
exports.DeclareInterface = DeclareInterface;
|
| 15 |
+
exports.DeclareModule = DeclareModule;
|
| 16 |
+
exports.DeclareModuleExports = DeclareModuleExports;
|
| 17 |
+
exports.DeclareOpaqueType = DeclareOpaqueType;
|
| 18 |
+
exports.DeclareTypeAlias = DeclareTypeAlias;
|
| 19 |
+
exports.DeclareVariable = DeclareVariable;
|
| 20 |
+
exports.DeclaredPredicate = DeclaredPredicate;
|
| 21 |
+
exports.EmptyTypeAnnotation = EmptyTypeAnnotation;
|
| 22 |
+
exports.EnumBooleanBody = EnumBooleanBody;
|
| 23 |
+
exports.EnumBooleanMember = EnumBooleanMember;
|
| 24 |
+
exports.EnumDeclaration = EnumDeclaration;
|
| 25 |
+
exports.EnumDefaultedMember = EnumDefaultedMember;
|
| 26 |
+
exports.EnumNumberBody = EnumNumberBody;
|
| 27 |
+
exports.EnumNumberMember = EnumNumberMember;
|
| 28 |
+
exports.EnumStringBody = EnumStringBody;
|
| 29 |
+
exports.EnumStringMember = EnumStringMember;
|
| 30 |
+
exports.EnumSymbolBody = EnumSymbolBody;
|
| 31 |
+
exports.ExistsTypeAnnotation = ExistsTypeAnnotation;
|
| 32 |
+
exports.FunctionTypeAnnotation = FunctionTypeAnnotation;
|
| 33 |
+
exports.FunctionTypeParam = FunctionTypeParam;
|
| 34 |
+
exports.IndexedAccessType = IndexedAccessType;
|
| 35 |
+
exports.InferredPredicate = InferredPredicate;
|
| 36 |
+
exports.InterfaceDeclaration = InterfaceDeclaration;
|
| 37 |
+
exports.GenericTypeAnnotation = exports.ClassImplements = exports.InterfaceExtends = InterfaceExtends;
|
| 38 |
+
exports.InterfaceTypeAnnotation = InterfaceTypeAnnotation;
|
| 39 |
+
exports.IntersectionTypeAnnotation = IntersectionTypeAnnotation;
|
| 40 |
+
exports.MixedTypeAnnotation = MixedTypeAnnotation;
|
| 41 |
+
exports.NullLiteralTypeAnnotation = NullLiteralTypeAnnotation;
|
| 42 |
+
exports.NullableTypeAnnotation = NullableTypeAnnotation;
|
| 43 |
+
Object.defineProperty(exports, "NumberLiteralTypeAnnotation", {
|
| 44 |
+
enumerable: true,
|
| 45 |
+
get: function () {
|
| 46 |
+
return _types2.NumericLiteral;
|
| 47 |
+
}
|
| 48 |
+
});
|
| 49 |
+
exports.NumberTypeAnnotation = NumberTypeAnnotation;
|
| 50 |
+
exports.ObjectTypeAnnotation = ObjectTypeAnnotation;
|
| 51 |
+
exports.ObjectTypeCallProperty = ObjectTypeCallProperty;
|
| 52 |
+
exports.ObjectTypeIndexer = ObjectTypeIndexer;
|
| 53 |
+
exports.ObjectTypeInternalSlot = ObjectTypeInternalSlot;
|
| 54 |
+
exports.ObjectTypeProperty = ObjectTypeProperty;
|
| 55 |
+
exports.ObjectTypeSpreadProperty = ObjectTypeSpreadProperty;
|
| 56 |
+
exports.OpaqueType = OpaqueType;
|
| 57 |
+
exports.OptionalIndexedAccessType = OptionalIndexedAccessType;
|
| 58 |
+
exports.QualifiedTypeIdentifier = QualifiedTypeIdentifier;
|
| 59 |
+
Object.defineProperty(exports, "StringLiteralTypeAnnotation", {
|
| 60 |
+
enumerable: true,
|
| 61 |
+
get: function () {
|
| 62 |
+
return _types2.StringLiteral;
|
| 63 |
+
}
|
| 64 |
+
});
|
| 65 |
+
exports.StringTypeAnnotation = StringTypeAnnotation;
|
| 66 |
+
exports.SymbolTypeAnnotation = SymbolTypeAnnotation;
|
| 67 |
+
exports.ThisTypeAnnotation = ThisTypeAnnotation;
|
| 68 |
+
exports.TupleTypeAnnotation = TupleTypeAnnotation;
|
| 69 |
+
exports.TypeAlias = TypeAlias;
|
| 70 |
+
exports.TypeAnnotation = TypeAnnotation;
|
| 71 |
+
exports.TypeCastExpression = TypeCastExpression;
|
| 72 |
+
exports.TypeParameter = TypeParameter;
|
| 73 |
+
exports.TypeParameterDeclaration = exports.TypeParameterInstantiation = TypeParameterInstantiation;
|
| 74 |
+
exports.TypeofTypeAnnotation = TypeofTypeAnnotation;
|
| 75 |
+
exports.UnionTypeAnnotation = UnionTypeAnnotation;
|
| 76 |
+
exports.Variance = Variance;
|
| 77 |
+
exports.VoidTypeAnnotation = VoidTypeAnnotation;
|
| 78 |
+
exports._interfaceish = _interfaceish;
|
| 79 |
+
exports._variance = _variance;
|
| 80 |
+
var _t = require("@babel/types");
|
| 81 |
+
var _modules = require("./modules.js");
|
| 82 |
+
var _index = require("../node/index.js");
|
| 83 |
+
var _types2 = require("./types.js");
|
| 84 |
+
const {
|
| 85 |
+
isDeclareExportDeclaration,
|
| 86 |
+
isStatement
|
| 87 |
+
} = _t;
|
| 88 |
+
function AnyTypeAnnotation() {
|
| 89 |
+
this.word("any");
|
| 90 |
+
}
|
| 91 |
+
function ArrayTypeAnnotation(node) {
|
| 92 |
+
this.print(node.elementType, true);
|
| 93 |
+
this.tokenChar(91);
|
| 94 |
+
this.tokenChar(93);
|
| 95 |
+
}
|
| 96 |
+
function BooleanTypeAnnotation() {
|
| 97 |
+
this.word("boolean");
|
| 98 |
+
}
|
| 99 |
+
function BooleanLiteralTypeAnnotation(node) {
|
| 100 |
+
this.word(node.value ? "true" : "false");
|
| 101 |
+
}
|
| 102 |
+
function NullLiteralTypeAnnotation() {
|
| 103 |
+
this.word("null");
|
| 104 |
+
}
|
| 105 |
+
function DeclareClass(node, parent) {
|
| 106 |
+
if (!isDeclareExportDeclaration(parent)) {
|
| 107 |
+
this.word("declare");
|
| 108 |
+
this.space();
|
| 109 |
+
}
|
| 110 |
+
this.word("class");
|
| 111 |
+
this.space();
|
| 112 |
+
this._interfaceish(node);
|
| 113 |
+
}
|
| 114 |
+
function DeclareFunction(node, parent) {
|
| 115 |
+
if (!isDeclareExportDeclaration(parent)) {
|
| 116 |
+
this.word("declare");
|
| 117 |
+
this.space();
|
| 118 |
+
}
|
| 119 |
+
this.word("function");
|
| 120 |
+
this.space();
|
| 121 |
+
this.print(node.id);
|
| 122 |
+
this.print(node.id.typeAnnotation.typeAnnotation);
|
| 123 |
+
if (node.predicate) {
|
| 124 |
+
this.space();
|
| 125 |
+
this.print(node.predicate);
|
| 126 |
+
}
|
| 127 |
+
this.semicolon();
|
| 128 |
+
}
|
| 129 |
+
function InferredPredicate() {
|
| 130 |
+
this.tokenChar(37);
|
| 131 |
+
this.word("checks");
|
| 132 |
+
}
|
| 133 |
+
function DeclaredPredicate(node) {
|
| 134 |
+
this.tokenChar(37);
|
| 135 |
+
this.word("checks");
|
| 136 |
+
this.tokenChar(40);
|
| 137 |
+
this.print(node.value);
|
| 138 |
+
this.tokenChar(41);
|
| 139 |
+
}
|
| 140 |
+
function DeclareInterface(node) {
|
| 141 |
+
this.word("declare");
|
| 142 |
+
this.space();
|
| 143 |
+
this.InterfaceDeclaration(node);
|
| 144 |
+
}
|
| 145 |
+
function DeclareModule(node) {
|
| 146 |
+
this.word("declare");
|
| 147 |
+
this.space();
|
| 148 |
+
this.word("module");
|
| 149 |
+
this.space();
|
| 150 |
+
this.print(node.id);
|
| 151 |
+
this.space();
|
| 152 |
+
this.print(node.body);
|
| 153 |
+
}
|
| 154 |
+
function DeclareModuleExports(node) {
|
| 155 |
+
this.word("declare");
|
| 156 |
+
this.space();
|
| 157 |
+
this.word("module");
|
| 158 |
+
this.tokenChar(46);
|
| 159 |
+
this.word("exports");
|
| 160 |
+
this.print(node.typeAnnotation);
|
| 161 |
+
}
|
| 162 |
+
function DeclareTypeAlias(node) {
|
| 163 |
+
this.word("declare");
|
| 164 |
+
this.space();
|
| 165 |
+
this.TypeAlias(node);
|
| 166 |
+
}
|
| 167 |
+
function DeclareOpaqueType(node, parent) {
|
| 168 |
+
if (!isDeclareExportDeclaration(parent)) {
|
| 169 |
+
this.word("declare");
|
| 170 |
+
this.space();
|
| 171 |
+
}
|
| 172 |
+
this.OpaqueType(node);
|
| 173 |
+
}
|
| 174 |
+
function DeclareVariable(node, parent) {
|
| 175 |
+
if (!isDeclareExportDeclaration(parent)) {
|
| 176 |
+
this.word("declare");
|
| 177 |
+
this.space();
|
| 178 |
+
}
|
| 179 |
+
this.word("var");
|
| 180 |
+
this.space();
|
| 181 |
+
this.print(node.id);
|
| 182 |
+
this.print(node.id.typeAnnotation);
|
| 183 |
+
this.semicolon();
|
| 184 |
+
}
|
| 185 |
+
function DeclareExportDeclaration(node) {
|
| 186 |
+
this.word("declare");
|
| 187 |
+
this.space();
|
| 188 |
+
this.word("export");
|
| 189 |
+
this.space();
|
| 190 |
+
if (node.default) {
|
| 191 |
+
this.word("default");
|
| 192 |
+
this.space();
|
| 193 |
+
}
|
| 194 |
+
FlowExportDeclaration.call(this, node);
|
| 195 |
+
}
|
| 196 |
+
function DeclareExportAllDeclaration(node) {
|
| 197 |
+
this.word("declare");
|
| 198 |
+
this.space();
|
| 199 |
+
_modules.ExportAllDeclaration.call(this, node);
|
| 200 |
+
}
|
| 201 |
+
function EnumDeclaration(node) {
|
| 202 |
+
const {
|
| 203 |
+
id,
|
| 204 |
+
body
|
| 205 |
+
} = node;
|
| 206 |
+
this.word("enum");
|
| 207 |
+
this.space();
|
| 208 |
+
this.print(id);
|
| 209 |
+
this.print(body);
|
| 210 |
+
}
|
| 211 |
+
function enumExplicitType(context, name, hasExplicitType) {
|
| 212 |
+
if (hasExplicitType) {
|
| 213 |
+
context.space();
|
| 214 |
+
context.word("of");
|
| 215 |
+
context.space();
|
| 216 |
+
context.word(name);
|
| 217 |
+
}
|
| 218 |
+
context.space();
|
| 219 |
+
}
|
| 220 |
+
function enumBody(context, node) {
|
| 221 |
+
const {
|
| 222 |
+
members
|
| 223 |
+
} = node;
|
| 224 |
+
context.token("{");
|
| 225 |
+
context.indent();
|
| 226 |
+
context.newline();
|
| 227 |
+
for (const member of members) {
|
| 228 |
+
context.print(member);
|
| 229 |
+
context.newline();
|
| 230 |
+
}
|
| 231 |
+
if (node.hasUnknownMembers) {
|
| 232 |
+
context.token("...");
|
| 233 |
+
context.newline();
|
| 234 |
+
}
|
| 235 |
+
context.dedent();
|
| 236 |
+
context.token("}");
|
| 237 |
+
}
|
| 238 |
+
function EnumBooleanBody(node) {
|
| 239 |
+
const {
|
| 240 |
+
explicitType
|
| 241 |
+
} = node;
|
| 242 |
+
enumExplicitType(this, "boolean", explicitType);
|
| 243 |
+
enumBody(this, node);
|
| 244 |
+
}
|
| 245 |
+
function EnumNumberBody(node) {
|
| 246 |
+
const {
|
| 247 |
+
explicitType
|
| 248 |
+
} = node;
|
| 249 |
+
enumExplicitType(this, "number", explicitType);
|
| 250 |
+
enumBody(this, node);
|
| 251 |
+
}
|
| 252 |
+
function EnumStringBody(node) {
|
| 253 |
+
const {
|
| 254 |
+
explicitType
|
| 255 |
+
} = node;
|
| 256 |
+
enumExplicitType(this, "string", explicitType);
|
| 257 |
+
enumBody(this, node);
|
| 258 |
+
}
|
| 259 |
+
function EnumSymbolBody(node) {
|
| 260 |
+
enumExplicitType(this, "symbol", true);
|
| 261 |
+
enumBody(this, node);
|
| 262 |
+
}
|
| 263 |
+
function EnumDefaultedMember(node) {
|
| 264 |
+
const {
|
| 265 |
+
id
|
| 266 |
+
} = node;
|
| 267 |
+
this.print(id);
|
| 268 |
+
this.tokenChar(44);
|
| 269 |
+
}
|
| 270 |
+
function enumInitializedMember(context, node) {
|
| 271 |
+
context.print(node.id);
|
| 272 |
+
context.space();
|
| 273 |
+
context.token("=");
|
| 274 |
+
context.space();
|
| 275 |
+
context.print(node.init);
|
| 276 |
+
context.token(",");
|
| 277 |
+
}
|
| 278 |
+
function EnumBooleanMember(node) {
|
| 279 |
+
enumInitializedMember(this, node);
|
| 280 |
+
}
|
| 281 |
+
function EnumNumberMember(node) {
|
| 282 |
+
enumInitializedMember(this, node);
|
| 283 |
+
}
|
| 284 |
+
function EnumStringMember(node) {
|
| 285 |
+
enumInitializedMember(this, node);
|
| 286 |
+
}
|
| 287 |
+
function FlowExportDeclaration(node) {
|
| 288 |
+
if (node.declaration) {
|
| 289 |
+
const declar = node.declaration;
|
| 290 |
+
this.print(declar);
|
| 291 |
+
if (!isStatement(declar)) this.semicolon();
|
| 292 |
+
} else {
|
| 293 |
+
this.tokenChar(123);
|
| 294 |
+
if (node.specifiers.length) {
|
| 295 |
+
this.space();
|
| 296 |
+
this.printList(node.specifiers);
|
| 297 |
+
this.space();
|
| 298 |
+
}
|
| 299 |
+
this.tokenChar(125);
|
| 300 |
+
if (node.source) {
|
| 301 |
+
this.space();
|
| 302 |
+
this.word("from");
|
| 303 |
+
this.space();
|
| 304 |
+
this.print(node.source);
|
| 305 |
+
}
|
| 306 |
+
this.semicolon();
|
| 307 |
+
}
|
| 308 |
+
}
|
| 309 |
+
function ExistsTypeAnnotation() {
|
| 310 |
+
this.tokenChar(42);
|
| 311 |
+
}
|
| 312 |
+
function FunctionTypeAnnotation(node, parent) {
|
| 313 |
+
this.print(node.typeParameters);
|
| 314 |
+
this.tokenChar(40);
|
| 315 |
+
if (node.this) {
|
| 316 |
+
this.word("this");
|
| 317 |
+
this.tokenChar(58);
|
| 318 |
+
this.space();
|
| 319 |
+
this.print(node.this.typeAnnotation);
|
| 320 |
+
if (node.params.length || node.rest) {
|
| 321 |
+
this.tokenChar(44);
|
| 322 |
+
this.space();
|
| 323 |
+
}
|
| 324 |
+
}
|
| 325 |
+
this.printList(node.params);
|
| 326 |
+
if (node.rest) {
|
| 327 |
+
if (node.params.length) {
|
| 328 |
+
this.tokenChar(44);
|
| 329 |
+
this.space();
|
| 330 |
+
}
|
| 331 |
+
this.token("...");
|
| 332 |
+
this.print(node.rest);
|
| 333 |
+
}
|
| 334 |
+
this.tokenChar(41);
|
| 335 |
+
const type = parent == null ? void 0 : parent.type;
|
| 336 |
+
if (type != null && (type === "ObjectTypeCallProperty" || type === "ObjectTypeInternalSlot" || type === "DeclareFunction" || type === "ObjectTypeProperty" && parent.method)) {
|
| 337 |
+
this.tokenChar(58);
|
| 338 |
+
} else {
|
| 339 |
+
this.space();
|
| 340 |
+
this.token("=>");
|
| 341 |
+
}
|
| 342 |
+
this.space();
|
| 343 |
+
this.print(node.returnType);
|
| 344 |
+
}
|
| 345 |
+
function FunctionTypeParam(node) {
|
| 346 |
+
this.print(node.name);
|
| 347 |
+
if (node.optional) this.tokenChar(63);
|
| 348 |
+
if (node.name) {
|
| 349 |
+
this.tokenChar(58);
|
| 350 |
+
this.space();
|
| 351 |
+
}
|
| 352 |
+
this.print(node.typeAnnotation);
|
| 353 |
+
}
|
| 354 |
+
function InterfaceExtends(node) {
|
| 355 |
+
this.print(node.id);
|
| 356 |
+
this.print(node.typeParameters, true);
|
| 357 |
+
}
|
| 358 |
+
function _interfaceish(node) {
|
| 359 |
+
var _node$extends;
|
| 360 |
+
this.print(node.id);
|
| 361 |
+
this.print(node.typeParameters);
|
| 362 |
+
if ((_node$extends = node.extends) != null && _node$extends.length) {
|
| 363 |
+
this.space();
|
| 364 |
+
this.word("extends");
|
| 365 |
+
this.space();
|
| 366 |
+
this.printList(node.extends);
|
| 367 |
+
}
|
| 368 |
+
if (node.type === "DeclareClass") {
|
| 369 |
+
var _node$mixins, _node$implements;
|
| 370 |
+
if ((_node$mixins = node.mixins) != null && _node$mixins.length) {
|
| 371 |
+
this.space();
|
| 372 |
+
this.word("mixins");
|
| 373 |
+
this.space();
|
| 374 |
+
this.printList(node.mixins);
|
| 375 |
+
}
|
| 376 |
+
if ((_node$implements = node.implements) != null && _node$implements.length) {
|
| 377 |
+
this.space();
|
| 378 |
+
this.word("implements");
|
| 379 |
+
this.space();
|
| 380 |
+
this.printList(node.implements);
|
| 381 |
+
}
|
| 382 |
+
}
|
| 383 |
+
this.space();
|
| 384 |
+
this.print(node.body);
|
| 385 |
+
}
|
| 386 |
+
function _variance(node) {
|
| 387 |
+
var _node$variance;
|
| 388 |
+
const kind = (_node$variance = node.variance) == null ? void 0 : _node$variance.kind;
|
| 389 |
+
if (kind != null) {
|
| 390 |
+
if (kind === "plus") {
|
| 391 |
+
this.tokenChar(43);
|
| 392 |
+
} else if (kind === "minus") {
|
| 393 |
+
this.tokenChar(45);
|
| 394 |
+
}
|
| 395 |
+
}
|
| 396 |
+
}
|
| 397 |
+
function InterfaceDeclaration(node) {
|
| 398 |
+
this.word("interface");
|
| 399 |
+
this.space();
|
| 400 |
+
this._interfaceish(node);
|
| 401 |
+
}
|
| 402 |
+
function andSeparator(occurrenceCount) {
|
| 403 |
+
this.space();
|
| 404 |
+
this.token("&", false, occurrenceCount);
|
| 405 |
+
this.space();
|
| 406 |
+
}
|
| 407 |
+
function InterfaceTypeAnnotation(node) {
|
| 408 |
+
var _node$extends2;
|
| 409 |
+
this.word("interface");
|
| 410 |
+
if ((_node$extends2 = node.extends) != null && _node$extends2.length) {
|
| 411 |
+
this.space();
|
| 412 |
+
this.word("extends");
|
| 413 |
+
this.space();
|
| 414 |
+
this.printList(node.extends);
|
| 415 |
+
}
|
| 416 |
+
this.space();
|
| 417 |
+
this.print(node.body);
|
| 418 |
+
}
|
| 419 |
+
function IntersectionTypeAnnotation(node) {
|
| 420 |
+
this.printJoin(node.types, undefined, undefined, andSeparator);
|
| 421 |
+
}
|
| 422 |
+
function MixedTypeAnnotation() {
|
| 423 |
+
this.word("mixed");
|
| 424 |
+
}
|
| 425 |
+
function EmptyTypeAnnotation() {
|
| 426 |
+
this.word("empty");
|
| 427 |
+
}
|
| 428 |
+
function NullableTypeAnnotation(node) {
|
| 429 |
+
this.tokenChar(63);
|
| 430 |
+
this.print(node.typeAnnotation);
|
| 431 |
+
}
|
| 432 |
+
function NumberTypeAnnotation() {
|
| 433 |
+
this.word("number");
|
| 434 |
+
}
|
| 435 |
+
function StringTypeAnnotation() {
|
| 436 |
+
this.word("string");
|
| 437 |
+
}
|
| 438 |
+
function ThisTypeAnnotation() {
|
| 439 |
+
this.word("this");
|
| 440 |
+
}
|
| 441 |
+
function TupleTypeAnnotation(node) {
|
| 442 |
+
this.tokenChar(91);
|
| 443 |
+
this.printList(node.types);
|
| 444 |
+
this.tokenChar(93);
|
| 445 |
+
}
|
| 446 |
+
function TypeofTypeAnnotation(node) {
|
| 447 |
+
this.word("typeof");
|
| 448 |
+
this.space();
|
| 449 |
+
this.print(node.argument);
|
| 450 |
+
}
|
| 451 |
+
function TypeAlias(node) {
|
| 452 |
+
this.word("type");
|
| 453 |
+
this.space();
|
| 454 |
+
this.print(node.id);
|
| 455 |
+
this.print(node.typeParameters);
|
| 456 |
+
this.space();
|
| 457 |
+
this.tokenChar(61);
|
| 458 |
+
this.space();
|
| 459 |
+
this.print(node.right);
|
| 460 |
+
this.semicolon();
|
| 461 |
+
}
|
| 462 |
+
function TypeAnnotation(node, parent) {
|
| 463 |
+
this.tokenChar(58);
|
| 464 |
+
this.space();
|
| 465 |
+
if (parent.type === "ArrowFunctionExpression") {
|
| 466 |
+
this.tokenContext |= _index.TokenContext.arrowFlowReturnType;
|
| 467 |
+
} else if (node.optional) {
|
| 468 |
+
this.tokenChar(63);
|
| 469 |
+
}
|
| 470 |
+
this.print(node.typeAnnotation);
|
| 471 |
+
}
|
| 472 |
+
function TypeParameterInstantiation(node) {
|
| 473 |
+
this.tokenChar(60);
|
| 474 |
+
this.printList(node.params);
|
| 475 |
+
this.tokenChar(62);
|
| 476 |
+
}
|
| 477 |
+
function TypeParameter(node) {
|
| 478 |
+
this._variance(node);
|
| 479 |
+
this.word(node.name);
|
| 480 |
+
if (node.bound) {
|
| 481 |
+
this.print(node.bound);
|
| 482 |
+
}
|
| 483 |
+
if (node.default) {
|
| 484 |
+
this.space();
|
| 485 |
+
this.tokenChar(61);
|
| 486 |
+
this.space();
|
| 487 |
+
this.print(node.default);
|
| 488 |
+
}
|
| 489 |
+
}
|
| 490 |
+
function OpaqueType(node) {
|
| 491 |
+
this.word("opaque");
|
| 492 |
+
this.space();
|
| 493 |
+
this.word("type");
|
| 494 |
+
this.space();
|
| 495 |
+
this.print(node.id);
|
| 496 |
+
this.print(node.typeParameters);
|
| 497 |
+
if (node.supertype) {
|
| 498 |
+
this.tokenChar(58);
|
| 499 |
+
this.space();
|
| 500 |
+
this.print(node.supertype);
|
| 501 |
+
}
|
| 502 |
+
if (node.impltype) {
|
| 503 |
+
this.space();
|
| 504 |
+
this.tokenChar(61);
|
| 505 |
+
this.space();
|
| 506 |
+
this.print(node.impltype);
|
| 507 |
+
}
|
| 508 |
+
this.semicolon();
|
| 509 |
+
}
|
| 510 |
+
function ObjectTypeAnnotation(node) {
|
| 511 |
+
if (node.exact) {
|
| 512 |
+
this.token("{|");
|
| 513 |
+
} else {
|
| 514 |
+
this.tokenChar(123);
|
| 515 |
+
}
|
| 516 |
+
const props = [...node.properties, ...(node.callProperties || []), ...(node.indexers || []), ...(node.internalSlots || [])];
|
| 517 |
+
if (props.length) {
|
| 518 |
+
this.newline();
|
| 519 |
+
this.space();
|
| 520 |
+
this.printJoin(props, true, true, undefined, undefined, function addNewlines(leading) {
|
| 521 |
+
if (leading && !props[0]) return 1;
|
| 522 |
+
}, () => {
|
| 523 |
+
if (props.length !== 1 || node.inexact) {
|
| 524 |
+
this.tokenChar(44);
|
| 525 |
+
this.space();
|
| 526 |
+
}
|
| 527 |
+
});
|
| 528 |
+
this.space();
|
| 529 |
+
}
|
| 530 |
+
if (node.inexact) {
|
| 531 |
+
this.indent();
|
| 532 |
+
this.token("...");
|
| 533 |
+
if (props.length) {
|
| 534 |
+
this.newline();
|
| 535 |
+
}
|
| 536 |
+
this.dedent();
|
| 537 |
+
}
|
| 538 |
+
if (node.exact) {
|
| 539 |
+
this.token("|}");
|
| 540 |
+
} else {
|
| 541 |
+
this.tokenChar(125);
|
| 542 |
+
}
|
| 543 |
+
}
|
| 544 |
+
function ObjectTypeInternalSlot(node) {
|
| 545 |
+
if (node.static) {
|
| 546 |
+
this.word("static");
|
| 547 |
+
this.space();
|
| 548 |
+
}
|
| 549 |
+
this.tokenChar(91);
|
| 550 |
+
this.tokenChar(91);
|
| 551 |
+
this.print(node.id);
|
| 552 |
+
this.tokenChar(93);
|
| 553 |
+
this.tokenChar(93);
|
| 554 |
+
if (node.optional) this.tokenChar(63);
|
| 555 |
+
if (!node.method) {
|
| 556 |
+
this.tokenChar(58);
|
| 557 |
+
this.space();
|
| 558 |
+
}
|
| 559 |
+
this.print(node.value);
|
| 560 |
+
}
|
| 561 |
+
function ObjectTypeCallProperty(node) {
|
| 562 |
+
if (node.static) {
|
| 563 |
+
this.word("static");
|
| 564 |
+
this.space();
|
| 565 |
+
}
|
| 566 |
+
this.print(node.value);
|
| 567 |
+
}
|
| 568 |
+
function ObjectTypeIndexer(node) {
|
| 569 |
+
if (node.static) {
|
| 570 |
+
this.word("static");
|
| 571 |
+
this.space();
|
| 572 |
+
}
|
| 573 |
+
this._variance(node);
|
| 574 |
+
this.tokenChar(91);
|
| 575 |
+
if (node.id) {
|
| 576 |
+
this.print(node.id);
|
| 577 |
+
this.tokenChar(58);
|
| 578 |
+
this.space();
|
| 579 |
+
}
|
| 580 |
+
this.print(node.key);
|
| 581 |
+
this.tokenChar(93);
|
| 582 |
+
this.tokenChar(58);
|
| 583 |
+
this.space();
|
| 584 |
+
this.print(node.value);
|
| 585 |
+
}
|
| 586 |
+
function ObjectTypeProperty(node) {
|
| 587 |
+
if (node.proto) {
|
| 588 |
+
this.word("proto");
|
| 589 |
+
this.space();
|
| 590 |
+
}
|
| 591 |
+
if (node.static) {
|
| 592 |
+
this.word("static");
|
| 593 |
+
this.space();
|
| 594 |
+
}
|
| 595 |
+
if (node.kind === "get" || node.kind === "set") {
|
| 596 |
+
this.word(node.kind);
|
| 597 |
+
this.space();
|
| 598 |
+
}
|
| 599 |
+
this._variance(node);
|
| 600 |
+
this.print(node.key);
|
| 601 |
+
if (node.optional) this.tokenChar(63);
|
| 602 |
+
if (!node.method) {
|
| 603 |
+
this.tokenChar(58);
|
| 604 |
+
this.space();
|
| 605 |
+
}
|
| 606 |
+
this.print(node.value);
|
| 607 |
+
}
|
| 608 |
+
function ObjectTypeSpreadProperty(node) {
|
| 609 |
+
this.token("...");
|
| 610 |
+
this.print(node.argument);
|
| 611 |
+
}
|
| 612 |
+
function QualifiedTypeIdentifier(node) {
|
| 613 |
+
this.print(node.qualification);
|
| 614 |
+
this.tokenChar(46);
|
| 615 |
+
this.print(node.id);
|
| 616 |
+
}
|
| 617 |
+
function SymbolTypeAnnotation() {
|
| 618 |
+
this.word("symbol");
|
| 619 |
+
}
|
| 620 |
+
function orSeparator(occurrenceCount) {
|
| 621 |
+
this.space();
|
| 622 |
+
this.token("|", false, occurrenceCount);
|
| 623 |
+
this.space();
|
| 624 |
+
}
|
| 625 |
+
function UnionTypeAnnotation(node) {
|
| 626 |
+
this.printJoin(node.types, undefined, undefined, orSeparator);
|
| 627 |
+
}
|
| 628 |
+
function TypeCastExpression(node) {
|
| 629 |
+
this.tokenChar(40);
|
| 630 |
+
this.print(node.expression);
|
| 631 |
+
this.print(node.typeAnnotation);
|
| 632 |
+
this.tokenChar(41);
|
| 633 |
+
}
|
| 634 |
+
function Variance(node) {
|
| 635 |
+
if (node.kind === "plus") {
|
| 636 |
+
this.tokenChar(43);
|
| 637 |
+
} else {
|
| 638 |
+
this.tokenChar(45);
|
| 639 |
+
}
|
| 640 |
+
}
|
| 641 |
+
function VoidTypeAnnotation() {
|
| 642 |
+
this.word("void");
|
| 643 |
+
}
|
| 644 |
+
function IndexedAccessType(node) {
|
| 645 |
+
this.print(node.objectType, true);
|
| 646 |
+
this.tokenChar(91);
|
| 647 |
+
this.print(node.indexType);
|
| 648 |
+
this.tokenChar(93);
|
| 649 |
+
}
|
| 650 |
+
function OptionalIndexedAccessType(node) {
|
| 651 |
+
this.print(node.objectType);
|
| 652 |
+
if (node.optional) {
|
| 653 |
+
this.token("?.");
|
| 654 |
+
}
|
| 655 |
+
this.tokenChar(91);
|
| 656 |
+
this.print(node.indexType);
|
| 657 |
+
this.tokenChar(93);
|
| 658 |
+
}
|
| 659 |
+
|
| 660 |
+
//# sourceMappingURL=flow.js.map
|
novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/generators/flow.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"names":["_t","require","_modules","_index","_types2","isDeclareExportDeclaration","isStatement","AnyTypeAnnotation","word","ArrayTypeAnnotation","node","print","elementType","token","BooleanTypeAnnotation","BooleanLiteralTypeAnnotation","value","NullLiteralTypeAnnotation","DeclareClass","parent","space","_interfaceish","DeclareFunction","id","typeAnnotation","predicate","semicolon","InferredPredicate","DeclaredPredicate","DeclareInterface","InterfaceDeclaration","DeclareModule","body","DeclareModuleExports","DeclareTypeAlias","TypeAlias","DeclareOpaqueType","OpaqueType","DeclareVariable","DeclareExportDeclaration","default","FlowExportDeclaration","call","DeclareExportAllDeclaration","ExportAllDeclaration","EnumDeclaration","enumExplicitType","context","name","hasExplicitType","enumBody","members","indent","newline","member","hasUnknownMembers","dedent","EnumBooleanBody","explicitType","EnumNumberBody","EnumStringBody","EnumSymbolBody","EnumDefaultedMember","enumInitializedMember","init","EnumBooleanMember","EnumNumberMember","EnumStringMember","declaration","declar","specifiers","length","printList","source","ExistsTypeAnnotation","FunctionTypeAnnotation","typeParameters","this","params","rest","type","method","returnType","FunctionTypeParam","optional","InterfaceExtends","_node$extends","extends","_node$mixins","_node$implements","mixins","implements","_variance","_node$variance","kind","variance","andSeparator","occurrenceCount","InterfaceTypeAnnotation","_node$extends2","IntersectionTypeAnnotation","printJoin","types","undefined","MixedTypeAnnotation","EmptyTypeAnnotation","NullableTypeAnnotation","NumberTypeAnnotation","StringTypeAnnotation","ThisTypeAnnotation","TupleTypeAnnotation","TypeofTypeAnnotation","argument","right","TypeAnnotation","tokenContext","TokenContext","arrowFlowReturnType","TypeParameterInstantiation","TypeParameter","bound","supertype","impltype","ObjectTypeAnnotation","exact","props","properties","callProperties","indexers","internalSlots","addNewlines","leading","inexact","ObjectTypeInternalSlot","static","ObjectTypeCallProperty","ObjectTypeIndexer","key","ObjectTypeProperty","proto","ObjectTypeSpreadProperty","QualifiedTypeIdentifier","qualification","SymbolTypeAnnotation","orSeparator","UnionTypeAnnotation","TypeCastExpression","expression","Variance","VoidTypeAnnotation","IndexedAccessType","objectType","indexType","OptionalIndexedAccessType"],"sources":["../../src/generators/flow.ts"],"sourcesContent":["import type Printer from \"../printer.ts\";\nimport { isDeclareExportDeclaration, isStatement } from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport { ExportAllDeclaration } from \"./modules.ts\";\nimport { TokenContext } from \"../node/index.ts\";\n\nexport function AnyTypeAnnotation(this: Printer) {\n this.word(\"any\");\n}\n\nexport function ArrayTypeAnnotation(\n this: Printer,\n node: t.ArrayTypeAnnotation,\n) {\n this.print(node.elementType, true);\n this.token(\"[\");\n this.token(\"]\");\n}\n\nexport function BooleanTypeAnnotation(this: Printer) {\n this.word(\"boolean\");\n}\n\nexport function BooleanLiteralTypeAnnotation(\n this: Printer,\n node: t.BooleanLiteralTypeAnnotation,\n) {\n this.word(node.value ? \"true\" : \"false\");\n}\n\nexport function NullLiteralTypeAnnotation(this: Printer) {\n this.word(\"null\");\n}\n\nexport function DeclareClass(\n this: Printer,\n node: t.DeclareClass,\n parent: t.Node,\n) {\n if (!isDeclareExportDeclaration(parent)) {\n this.word(\"declare\");\n this.space();\n }\n this.word(\"class\");\n this.space();\n this._interfaceish(node);\n}\n\nexport function DeclareFunction(\n this: Printer,\n node: t.DeclareFunction,\n parent: t.Node,\n) {\n if (!isDeclareExportDeclaration(parent)) {\n this.word(\"declare\");\n this.space();\n }\n this.word(\"function\");\n this.space();\n this.print(node.id);\n // @ts-ignore(Babel 7 vs Babel 8) TODO(Babel 8) Remove this comment, since we'll remove the Noop node\n this.print(node.id.typeAnnotation.typeAnnotation);\n\n if (node.predicate) {\n this.space();\n this.print(node.predicate);\n }\n\n this.semicolon();\n}\n\nexport function InferredPredicate(this: Printer) {\n this.token(\"%\");\n this.word(\"checks\");\n}\n\nexport function DeclaredPredicate(this: Printer, node: t.DeclaredPredicate) {\n this.token(\"%\");\n this.word(\"checks\");\n this.token(\"(\");\n this.print(node.value);\n this.token(\")\");\n}\n\nexport function DeclareInterface(this: Printer, node: t.DeclareInterface) {\n this.word(\"declare\");\n this.space();\n this.InterfaceDeclaration(node);\n}\n\nexport function DeclareModule(this: Printer, node: t.DeclareModule) {\n this.word(\"declare\");\n this.space();\n this.word(\"module\");\n this.space();\n this.print(node.id);\n this.space();\n this.print(node.body);\n}\n\nexport function DeclareModuleExports(\n this: Printer,\n node: t.DeclareModuleExports,\n) {\n this.word(\"declare\");\n this.space();\n this.word(\"module\");\n this.token(\".\");\n this.word(\"exports\");\n this.print(node.typeAnnotation);\n}\n\nexport function DeclareTypeAlias(this: Printer, node: t.DeclareTypeAlias) {\n this.word(\"declare\");\n this.space();\n this.TypeAlias(node);\n}\n\nexport function DeclareOpaqueType(\n this: Printer,\n node: t.DeclareOpaqueType,\n parent: t.Node,\n) {\n if (!isDeclareExportDeclaration(parent)) {\n this.word(\"declare\");\n this.space();\n }\n this.OpaqueType(node);\n}\n\nexport function DeclareVariable(\n this: Printer,\n node: t.DeclareVariable,\n parent: t.Node,\n) {\n if (!isDeclareExportDeclaration(parent)) {\n this.word(\"declare\");\n this.space();\n }\n this.word(\"var\");\n this.space();\n this.print(node.id);\n this.print(node.id.typeAnnotation);\n this.semicolon();\n}\n\nexport function DeclareExportDeclaration(\n this: Printer,\n node: t.DeclareExportDeclaration,\n) {\n this.word(\"declare\");\n this.space();\n this.word(\"export\");\n this.space();\n if (node.default) {\n this.word(\"default\");\n this.space();\n }\n\n FlowExportDeclaration.call(this, node);\n}\n\nexport function DeclareExportAllDeclaration(\n this: Printer,\n node: t.DeclareExportAllDeclaration,\n) {\n this.word(\"declare\");\n this.space();\n ExportAllDeclaration.call(this, node);\n}\n\nexport function EnumDeclaration(this: Printer, node: t.EnumDeclaration) {\n const { id, body } = node;\n this.word(\"enum\");\n this.space();\n this.print(id);\n this.print(body);\n}\n\nfunction enumExplicitType(\n context: Printer,\n name: string,\n hasExplicitType: boolean,\n) {\n if (hasExplicitType) {\n context.space();\n context.word(\"of\");\n context.space();\n context.word(name);\n }\n context.space();\n}\n\nfunction enumBody(context: Printer, node: t.EnumBody) {\n const { members } = node;\n context.token(\"{\");\n context.indent();\n context.newline();\n for (const member of members) {\n context.print(member);\n context.newline();\n }\n if (node.hasUnknownMembers) {\n context.token(\"...\");\n context.newline();\n }\n context.dedent();\n context.token(\"}\");\n}\n\nexport function EnumBooleanBody(this: Printer, node: t.EnumBooleanBody) {\n const { explicitType } = node;\n enumExplicitType(this, \"boolean\", explicitType);\n enumBody(this, node);\n}\n\nexport function EnumNumberBody(this: Printer, node: t.EnumNumberBody) {\n const { explicitType } = node;\n enumExplicitType(this, \"number\", explicitType);\n enumBody(this, node);\n}\n\nexport function EnumStringBody(this: Printer, node: t.EnumStringBody) {\n const { explicitType } = node;\n enumExplicitType(this, \"string\", explicitType);\n enumBody(this, node);\n}\n\nexport function EnumSymbolBody(this: Printer, node: t.EnumSymbolBody) {\n enumExplicitType(this, \"symbol\", true);\n enumBody(this, node);\n}\n\nexport function EnumDefaultedMember(\n this: Printer,\n node: t.EnumDefaultedMember,\n) {\n const { id } = node;\n this.print(id);\n this.token(\",\");\n}\n\nfunction enumInitializedMember(\n context: Printer,\n node: t.EnumBooleanMember | t.EnumNumberMember | t.EnumStringMember,\n) {\n context.print(node.id);\n context.space();\n context.token(\"=\");\n context.space();\n context.print(node.init);\n context.token(\",\");\n}\n\nexport function EnumBooleanMember(this: Printer, node: t.EnumBooleanMember) {\n enumInitializedMember(this, node);\n}\n\nexport function EnumNumberMember(this: Printer, node: t.EnumNumberMember) {\n enumInitializedMember(this, node);\n}\n\nexport function EnumStringMember(this: Printer, node: t.EnumStringMember) {\n enumInitializedMember(this, node);\n}\n\nfunction FlowExportDeclaration(\n this: Printer,\n node: t.DeclareExportDeclaration,\n) {\n if (node.declaration) {\n const declar = node.declaration;\n this.print(declar);\n if (!isStatement(declar)) this.semicolon();\n } else {\n this.token(\"{\");\n if (node.specifiers.length) {\n this.space();\n this.printList(node.specifiers);\n this.space();\n }\n this.token(\"}\");\n\n if (node.source) {\n this.space();\n this.word(\"from\");\n this.space();\n this.print(node.source);\n }\n\n this.semicolon();\n }\n}\n\nexport function ExistsTypeAnnotation(this: Printer) {\n this.token(\"*\");\n}\n\nexport function FunctionTypeAnnotation(\n this: Printer,\n node: t.FunctionTypeAnnotation,\n parent?: t.Node,\n) {\n this.print(node.typeParameters);\n this.token(\"(\");\n\n if (node.this) {\n this.word(\"this\");\n this.token(\":\");\n this.space();\n this.print(node.this.typeAnnotation);\n if (node.params.length || node.rest) {\n this.token(\",\");\n this.space();\n }\n }\n\n this.printList(node.params);\n\n if (node.rest) {\n if (node.params.length) {\n this.token(\",\");\n this.space();\n }\n this.token(\"...\");\n this.print(node.rest);\n }\n\n this.token(\")\");\n\n // this node type is overloaded, not sure why but it makes it EXTREMELY annoying\n\n const type = parent?.type;\n if (\n type != null &&\n (type === \"ObjectTypeCallProperty\" ||\n type === \"ObjectTypeInternalSlot\" ||\n type === \"DeclareFunction\" ||\n (type === \"ObjectTypeProperty\" && parent.method))\n ) {\n this.token(\":\");\n } else {\n this.space();\n this.token(\"=>\");\n }\n\n this.space();\n this.print(node.returnType);\n}\n\nexport function FunctionTypeParam(this: Printer, node: t.FunctionTypeParam) {\n this.print(node.name);\n if (node.optional) this.token(\"?\");\n if (node.name) {\n this.token(\":\");\n this.space();\n }\n this.print(node.typeAnnotation);\n}\n\nexport function InterfaceExtends(this: Printer, node: t.InterfaceExtends) {\n this.print(node.id);\n this.print(node.typeParameters, true);\n}\n\nexport {\n InterfaceExtends as ClassImplements,\n InterfaceExtends as GenericTypeAnnotation,\n};\n\nexport function _interfaceish(\n this: Printer,\n node: t.InterfaceDeclaration | t.DeclareInterface | t.DeclareClass,\n) {\n this.print(node.id);\n this.print(node.typeParameters);\n if (node.extends?.length) {\n this.space();\n this.word(\"extends\");\n this.space();\n this.printList(node.extends);\n }\n if (node.type === \"DeclareClass\") {\n if (node.mixins?.length) {\n this.space();\n this.word(\"mixins\");\n this.space();\n this.printList(node.mixins);\n }\n if (node.implements?.length) {\n this.space();\n this.word(\"implements\");\n this.space();\n this.printList(node.implements);\n }\n }\n this.space();\n this.print(node.body);\n}\n\nexport function _variance(\n this: Printer,\n node:\n | t.TypeParameter\n | t.ObjectTypeIndexer\n | t.ObjectTypeProperty\n | t.ClassProperty\n | t.ClassPrivateProperty\n | t.ClassAccessorProperty,\n) {\n const kind = node.variance?.kind;\n if (kind != null) {\n if (kind === \"plus\") {\n this.token(\"+\");\n } else if (kind === \"minus\") {\n this.token(\"-\");\n }\n }\n}\n\nexport function InterfaceDeclaration(\n this: Printer,\n node: t.InterfaceDeclaration | t.DeclareInterface,\n) {\n this.word(\"interface\");\n this.space();\n this._interfaceish(node);\n}\n\nfunction andSeparator(this: Printer, occurrenceCount: number) {\n this.space();\n this.token(\"&\", false, occurrenceCount);\n this.space();\n}\n\nexport function InterfaceTypeAnnotation(\n this: Printer,\n node: t.InterfaceTypeAnnotation,\n) {\n this.word(\"interface\");\n if (node.extends?.length) {\n this.space();\n this.word(\"extends\");\n this.space();\n this.printList(node.extends);\n }\n this.space();\n this.print(node.body);\n}\n\nexport function IntersectionTypeAnnotation(\n this: Printer,\n node: t.IntersectionTypeAnnotation,\n) {\n this.printJoin(node.types, undefined, undefined, andSeparator);\n}\n\nexport function MixedTypeAnnotation(this: Printer) {\n this.word(\"mixed\");\n}\n\nexport function EmptyTypeAnnotation(this: Printer) {\n this.word(\"empty\");\n}\n\nexport function NullableTypeAnnotation(\n this: Printer,\n node: t.NullableTypeAnnotation,\n) {\n this.token(\"?\");\n this.print(node.typeAnnotation);\n}\n\nexport {\n NumericLiteral as NumberLiteralTypeAnnotation,\n StringLiteral as StringLiteralTypeAnnotation,\n} from \"./types.ts\";\n\nexport function NumberTypeAnnotation(this: Printer) {\n this.word(\"number\");\n}\n\nexport function StringTypeAnnotation(this: Printer) {\n this.word(\"string\");\n}\n\nexport function ThisTypeAnnotation(this: Printer) {\n this.word(\"this\");\n}\n\nexport function TupleTypeAnnotation(\n this: Printer,\n node: t.TupleTypeAnnotation,\n) {\n this.token(\"[\");\n this.printList(node.types);\n this.token(\"]\");\n}\n\nexport function TypeofTypeAnnotation(\n this: Printer,\n node: t.TypeofTypeAnnotation,\n) {\n this.word(\"typeof\");\n this.space();\n this.print(node.argument);\n}\n\nexport function TypeAlias(\n this: Printer,\n node: t.TypeAlias | t.DeclareTypeAlias,\n) {\n this.word(\"type\");\n this.space();\n this.print(node.id);\n this.print(node.typeParameters);\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.right);\n this.semicolon();\n}\n\nexport function TypeAnnotation(\n this: Printer,\n node: t.TypeAnnotation,\n parent: t.Node,\n) {\n this.token(\":\");\n this.space();\n if (parent.type === \"ArrowFunctionExpression\") {\n this.tokenContext |= TokenContext.arrowFlowReturnType;\n } else if (\n // @ts-expect-error todo(flow->ts) can this be removed? `.optional` looks to be not existing property\n node.optional\n ) {\n this.token(\"?\");\n }\n this.print(node.typeAnnotation);\n}\n\nexport function TypeParameterInstantiation(\n this: Printer,\n node: t.TypeParameterInstantiation,\n): void {\n this.token(\"<\");\n this.printList(node.params);\n this.token(\">\");\n}\n\nexport { TypeParameterInstantiation as TypeParameterDeclaration };\n\nexport function TypeParameter(this: Printer, node: t.TypeParameter) {\n this._variance(node);\n\n this.word(node.name);\n\n if (node.bound) {\n this.print(node.bound);\n }\n\n if (node.default) {\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.default);\n }\n}\n\nexport function OpaqueType(\n this: Printer,\n node: t.OpaqueType | t.DeclareOpaqueType,\n) {\n this.word(\"opaque\");\n this.space();\n this.word(\"type\");\n this.space();\n this.print(node.id);\n this.print(node.typeParameters);\n if (node.supertype) {\n this.token(\":\");\n this.space();\n this.print(node.supertype);\n }\n\n if (node.impltype) {\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.impltype);\n }\n this.semicolon();\n}\n\nexport function ObjectTypeAnnotation(\n this: Printer,\n node: t.ObjectTypeAnnotation,\n) {\n if (node.exact) {\n this.token(\"{|\");\n } else {\n this.token(\"{\");\n }\n\n // TODO: remove the array fallbacks and instead enforce the types to require an array\n const props = [\n ...node.properties,\n ...(node.callProperties || []),\n ...(node.indexers || []),\n ...(node.internalSlots || []),\n ];\n\n if (props.length) {\n this.newline();\n\n this.space();\n\n this.printJoin(\n props,\n true,\n true,\n undefined,\n undefined,\n function addNewlines(leading) {\n if (leading && !props[0]) return 1;\n },\n () => {\n if (props.length !== 1 || node.inexact) {\n this.token(\",\");\n this.space();\n }\n },\n );\n\n this.space();\n }\n\n if (node.inexact) {\n this.indent();\n this.token(\"...\");\n if (props.length) {\n this.newline();\n }\n this.dedent();\n }\n\n if (node.exact) {\n this.token(\"|}\");\n } else {\n this.token(\"}\");\n }\n}\n\nexport function ObjectTypeInternalSlot(\n this: Printer,\n node: t.ObjectTypeInternalSlot,\n) {\n if (node.static) {\n this.word(\"static\");\n this.space();\n }\n this.token(\"[\");\n this.token(\"[\");\n this.print(node.id);\n this.token(\"]\");\n this.token(\"]\");\n if (node.optional) this.token(\"?\");\n if (!node.method) {\n this.token(\":\");\n this.space();\n }\n this.print(node.value);\n}\n\nexport function ObjectTypeCallProperty(\n this: Printer,\n node: t.ObjectTypeCallProperty,\n) {\n if (node.static) {\n this.word(\"static\");\n this.space();\n }\n this.print(node.value);\n}\n\nexport function ObjectTypeIndexer(this: Printer, node: t.ObjectTypeIndexer) {\n if (node.static) {\n this.word(\"static\");\n this.space();\n }\n this._variance(node);\n this.token(\"[\");\n if (node.id) {\n this.print(node.id);\n this.token(\":\");\n this.space();\n }\n this.print(node.key);\n this.token(\"]\");\n this.token(\":\");\n this.space();\n this.print(node.value);\n}\n\nexport function ObjectTypeProperty(this: Printer, node: t.ObjectTypeProperty) {\n if (node.proto) {\n this.word(\"proto\");\n this.space();\n }\n if (node.static) {\n this.word(\"static\");\n this.space();\n }\n if (node.kind === \"get\" || node.kind === \"set\") {\n this.word(node.kind);\n this.space();\n }\n this._variance(node);\n this.print(node.key);\n if (node.optional) this.token(\"?\");\n if (!node.method) {\n this.token(\":\");\n this.space();\n }\n this.print(node.value);\n}\n\nexport function ObjectTypeSpreadProperty(\n this: Printer,\n node: t.ObjectTypeSpreadProperty,\n) {\n this.token(\"...\");\n this.print(node.argument);\n}\n\nexport function QualifiedTypeIdentifier(\n this: Printer,\n node: t.QualifiedTypeIdentifier,\n) {\n this.print(node.qualification);\n this.token(\".\");\n this.print(node.id);\n}\n\nexport function SymbolTypeAnnotation(this: Printer) {\n this.word(\"symbol\");\n}\n\nfunction orSeparator(this: Printer, occurrenceCount: number) {\n this.space();\n this.token(\"|\", false, occurrenceCount);\n this.space();\n}\n\nexport function UnionTypeAnnotation(\n this: Printer,\n node: t.UnionTypeAnnotation,\n) {\n this.printJoin(node.types, undefined, undefined, orSeparator);\n}\n\nexport function TypeCastExpression(this: Printer, node: t.TypeCastExpression) {\n this.token(\"(\");\n this.print(node.expression);\n this.print(node.typeAnnotation);\n this.token(\")\");\n}\n\nexport function Variance(this: Printer, node: t.Variance) {\n if (node.kind === \"plus\") {\n this.token(\"+\");\n } else {\n this.token(\"-\");\n }\n}\n\nexport function VoidTypeAnnotation(this: Printer) {\n this.word(\"void\");\n}\n\nexport function IndexedAccessType(this: Printer, node: t.IndexedAccessType) {\n this.print(node.objectType, true);\n this.token(\"[\");\n this.print(node.indexType);\n this.token(\"]\");\n}\n\nexport function OptionalIndexedAccessType(\n this: Printer,\n node: t.OptionalIndexedAccessType,\n) {\n this.print(node.objectType);\n if (node.optional) {\n this.token(\"?.\");\n }\n this.token(\"[\");\n this.print(node.indexType);\n this.token(\"]\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,EAAA,GAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,MAA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,CAAC;EAC1B,IAAI,CAAC3I,SAAK,GAAI,CAAC;AACjB","ignoreList":[]}
|
novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/generators/index.js
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
|
| 3 |
+
Object.defineProperty(exports, "__esModule", {
|
| 4 |
+
value: true
|
| 5 |
+
});
|
| 6 |
+
var _templateLiterals = require("./template-literals.js");
|
| 7 |
+
Object.keys(_templateLiterals).forEach(function (key) {
|
| 8 |
+
if (key === "default" || key === "__esModule") return;
|
| 9 |
+
if (key in exports && exports[key] === _templateLiterals[key]) return;
|
| 10 |
+
Object.defineProperty(exports, key, {
|
| 11 |
+
enumerable: true,
|
| 12 |
+
get: function () {
|
| 13 |
+
return _templateLiterals[key];
|
| 14 |
+
}
|
| 15 |
+
});
|
| 16 |
+
});
|
| 17 |
+
var _expressions = require("./expressions.js");
|
| 18 |
+
Object.keys(_expressions).forEach(function (key) {
|
| 19 |
+
if (key === "default" || key === "__esModule") return;
|
| 20 |
+
if (key in exports && exports[key] === _expressions[key]) return;
|
| 21 |
+
Object.defineProperty(exports, key, {
|
| 22 |
+
enumerable: true,
|
| 23 |
+
get: function () {
|
| 24 |
+
return _expressions[key];
|
| 25 |
+
}
|
| 26 |
+
});
|
| 27 |
+
});
|
| 28 |
+
var _statements = require("./statements.js");
|
| 29 |
+
Object.keys(_statements).forEach(function (key) {
|
| 30 |
+
if (key === "default" || key === "__esModule") return;
|
| 31 |
+
if (key in exports && exports[key] === _statements[key]) return;
|
| 32 |
+
Object.defineProperty(exports, key, {
|
| 33 |
+
enumerable: true,
|
| 34 |
+
get: function () {
|
| 35 |
+
return _statements[key];
|
| 36 |
+
}
|
| 37 |
+
});
|
| 38 |
+
});
|
| 39 |
+
var _classes = require("./classes.js");
|
| 40 |
+
Object.keys(_classes).forEach(function (key) {
|
| 41 |
+
if (key === "default" || key === "__esModule") return;
|
| 42 |
+
if (key in exports && exports[key] === _classes[key]) return;
|
| 43 |
+
Object.defineProperty(exports, key, {
|
| 44 |
+
enumerable: true,
|
| 45 |
+
get: function () {
|
| 46 |
+
return _classes[key];
|
| 47 |
+
}
|
| 48 |
+
});
|
| 49 |
+
});
|
| 50 |
+
var _methods = require("./methods.js");
|
| 51 |
+
Object.keys(_methods).forEach(function (key) {
|
| 52 |
+
if (key === "default" || key === "__esModule") return;
|
| 53 |
+
if (key in exports && exports[key] === _methods[key]) return;
|
| 54 |
+
Object.defineProperty(exports, key, {
|
| 55 |
+
enumerable: true,
|
| 56 |
+
get: function () {
|
| 57 |
+
return _methods[key];
|
| 58 |
+
}
|
| 59 |
+
});
|
| 60 |
+
});
|
| 61 |
+
var _modules = require("./modules.js");
|
| 62 |
+
Object.keys(_modules).forEach(function (key) {
|
| 63 |
+
if (key === "default" || key === "__esModule") return;
|
| 64 |
+
if (key in exports && exports[key] === _modules[key]) return;
|
| 65 |
+
Object.defineProperty(exports, key, {
|
| 66 |
+
enumerable: true,
|
| 67 |
+
get: function () {
|
| 68 |
+
return _modules[key];
|
| 69 |
+
}
|
| 70 |
+
});
|
| 71 |
+
});
|
| 72 |
+
var _types = require("./types.js");
|
| 73 |
+
Object.keys(_types).forEach(function (key) {
|
| 74 |
+
if (key === "default" || key === "__esModule") return;
|
| 75 |
+
if (key in exports && exports[key] === _types[key]) return;
|
| 76 |
+
Object.defineProperty(exports, key, {
|
| 77 |
+
enumerable: true,
|
| 78 |
+
get: function () {
|
| 79 |
+
return _types[key];
|
| 80 |
+
}
|
| 81 |
+
});
|
| 82 |
+
});
|
| 83 |
+
var _flow = require("./flow.js");
|
| 84 |
+
Object.keys(_flow).forEach(function (key) {
|
| 85 |
+
if (key === "default" || key === "__esModule") return;
|
| 86 |
+
if (key in exports && exports[key] === _flow[key]) return;
|
| 87 |
+
Object.defineProperty(exports, key, {
|
| 88 |
+
enumerable: true,
|
| 89 |
+
get: function () {
|
| 90 |
+
return _flow[key];
|
| 91 |
+
}
|
| 92 |
+
});
|
| 93 |
+
});
|
| 94 |
+
var _base = require("./base.js");
|
| 95 |
+
Object.keys(_base).forEach(function (key) {
|
| 96 |
+
if (key === "default" || key === "__esModule") return;
|
| 97 |
+
if (key in exports && exports[key] === _base[key]) return;
|
| 98 |
+
Object.defineProperty(exports, key, {
|
| 99 |
+
enumerable: true,
|
| 100 |
+
get: function () {
|
| 101 |
+
return _base[key];
|
| 102 |
+
}
|
| 103 |
+
});
|
| 104 |
+
});
|
| 105 |
+
var _jsx = require("./jsx.js");
|
| 106 |
+
Object.keys(_jsx).forEach(function (key) {
|
| 107 |
+
if (key === "default" || key === "__esModule") return;
|
| 108 |
+
if (key in exports && exports[key] === _jsx[key]) return;
|
| 109 |
+
Object.defineProperty(exports, key, {
|
| 110 |
+
enumerable: true,
|
| 111 |
+
get: function () {
|
| 112 |
+
return _jsx[key];
|
| 113 |
+
}
|
| 114 |
+
});
|
| 115 |
+
});
|
| 116 |
+
var _typescript = require("./typescript.js");
|
| 117 |
+
Object.keys(_typescript).forEach(function (key) {
|
| 118 |
+
if (key === "default" || key === "__esModule") return;
|
| 119 |
+
if (key in exports && exports[key] === _typescript[key]) return;
|
| 120 |
+
Object.defineProperty(exports, key, {
|
| 121 |
+
enumerable: true,
|
| 122 |
+
get: function () {
|
| 123 |
+
return _typescript[key];
|
| 124 |
+
}
|
| 125 |
+
});
|
| 126 |
+
});
|
| 127 |
+
|
| 128 |
+
//# sourceMappingURL=index.js.map
|
novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/generators/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"names":["_templateLiterals","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_expressions","_statements","_classes","_methods","_modules","_types","_flow","_base","_jsx","_typescript"],"sources":["../../src/generators/index.ts"],"sourcesContent":["export * from \"./template-literals.ts\";\nexport * from \"./expressions.ts\";\nexport * from \"./statements.ts\";\nexport * from \"./classes.ts\";\nexport * from \"./methods.ts\";\nexport * from \"./modules.ts\";\nexport * from \"./types.ts\";\nexport * from \"./flow.ts\";\nexport * from \"./base.ts\";\nexport * from \"./jsx.ts\";\nexport * from \"./typescript.ts\";\n"],"mappings":";;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,iBAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,O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A,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAU,WAAA,CAAAd,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/generators/jsx.js
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
|
| 3 |
+
Object.defineProperty(exports, "__esModule", {
|
| 4 |
+
value: true
|
| 5 |
+
});
|
| 6 |
+
exports.JSXAttribute = JSXAttribute;
|
| 7 |
+
exports.JSXClosingElement = JSXClosingElement;
|
| 8 |
+
exports.JSXClosingFragment = JSXClosingFragment;
|
| 9 |
+
exports.JSXElement = JSXElement;
|
| 10 |
+
exports.JSXEmptyExpression = JSXEmptyExpression;
|
| 11 |
+
exports.JSXExpressionContainer = JSXExpressionContainer;
|
| 12 |
+
exports.JSXFragment = JSXFragment;
|
| 13 |
+
exports.JSXIdentifier = JSXIdentifier;
|
| 14 |
+
exports.JSXMemberExpression = JSXMemberExpression;
|
| 15 |
+
exports.JSXNamespacedName = JSXNamespacedName;
|
| 16 |
+
exports.JSXOpeningElement = JSXOpeningElement;
|
| 17 |
+
exports.JSXOpeningFragment = JSXOpeningFragment;
|
| 18 |
+
exports.JSXSpreadAttribute = JSXSpreadAttribute;
|
| 19 |
+
exports.JSXSpreadChild = JSXSpreadChild;
|
| 20 |
+
exports.JSXText = JSXText;
|
| 21 |
+
function JSXAttribute(node) {
|
| 22 |
+
this.print(node.name);
|
| 23 |
+
if (node.value) {
|
| 24 |
+
this.tokenChar(61);
|
| 25 |
+
this.print(node.value);
|
| 26 |
+
}
|
| 27 |
+
}
|
| 28 |
+
function JSXIdentifier(node) {
|
| 29 |
+
this.word(node.name);
|
| 30 |
+
}
|
| 31 |
+
function JSXNamespacedName(node) {
|
| 32 |
+
this.print(node.namespace);
|
| 33 |
+
this.tokenChar(58);
|
| 34 |
+
this.print(node.name);
|
| 35 |
+
}
|
| 36 |
+
function JSXMemberExpression(node) {
|
| 37 |
+
this.print(node.object);
|
| 38 |
+
this.tokenChar(46);
|
| 39 |
+
this.print(node.property);
|
| 40 |
+
}
|
| 41 |
+
function JSXSpreadAttribute(node) {
|
| 42 |
+
this.tokenChar(123);
|
| 43 |
+
this.token("...");
|
| 44 |
+
this.print(node.argument);
|
| 45 |
+
this.rightBrace(node);
|
| 46 |
+
}
|
| 47 |
+
function JSXExpressionContainer(node) {
|
| 48 |
+
this.tokenChar(123);
|
| 49 |
+
this.print(node.expression);
|
| 50 |
+
this.rightBrace(node);
|
| 51 |
+
}
|
| 52 |
+
function JSXSpreadChild(node) {
|
| 53 |
+
this.tokenChar(123);
|
| 54 |
+
this.token("...");
|
| 55 |
+
this.print(node.expression);
|
| 56 |
+
this.rightBrace(node);
|
| 57 |
+
}
|
| 58 |
+
function JSXText(node) {
|
| 59 |
+
const raw = this.getPossibleRaw(node);
|
| 60 |
+
if (raw !== undefined) {
|
| 61 |
+
this.token(raw, true);
|
| 62 |
+
} else {
|
| 63 |
+
this.token(node.value, true);
|
| 64 |
+
}
|
| 65 |
+
}
|
| 66 |
+
function JSXElement(node) {
|
| 67 |
+
const open = node.openingElement;
|
| 68 |
+
this.print(open);
|
| 69 |
+
if (open.selfClosing) return;
|
| 70 |
+
this.indent();
|
| 71 |
+
for (const child of node.children) {
|
| 72 |
+
this.print(child);
|
| 73 |
+
}
|
| 74 |
+
this.dedent();
|
| 75 |
+
this.print(node.closingElement);
|
| 76 |
+
}
|
| 77 |
+
function spaceSeparator() {
|
| 78 |
+
this.space();
|
| 79 |
+
}
|
| 80 |
+
function JSXOpeningElement(node) {
|
| 81 |
+
this.tokenChar(60);
|
| 82 |
+
this.print(node.name);
|
| 83 |
+
{
|
| 84 |
+
if (node.typeArguments) {
|
| 85 |
+
this.print(node.typeArguments);
|
| 86 |
+
}
|
| 87 |
+
this.print(node.typeParameters);
|
| 88 |
+
}
|
| 89 |
+
if (node.attributes.length > 0) {
|
| 90 |
+
this.space();
|
| 91 |
+
this.printJoin(node.attributes, undefined, undefined, spaceSeparator);
|
| 92 |
+
}
|
| 93 |
+
if (node.selfClosing) {
|
| 94 |
+
this.space();
|
| 95 |
+
this.tokenChar(47);
|
| 96 |
+
}
|
| 97 |
+
this.tokenChar(62);
|
| 98 |
+
}
|
| 99 |
+
function JSXClosingElement(node) {
|
| 100 |
+
this.tokenChar(60);
|
| 101 |
+
this.tokenChar(47);
|
| 102 |
+
this.print(node.name);
|
| 103 |
+
this.tokenChar(62);
|
| 104 |
+
}
|
| 105 |
+
function JSXEmptyExpression() {
|
| 106 |
+
this.printInnerComments();
|
| 107 |
+
}
|
| 108 |
+
function JSXFragment(node) {
|
| 109 |
+
this.print(node.openingFragment);
|
| 110 |
+
this.indent();
|
| 111 |
+
for (const child of node.children) {
|
| 112 |
+
this.print(child);
|
| 113 |
+
}
|
| 114 |
+
this.dedent();
|
| 115 |
+
this.print(node.closingFragment);
|
| 116 |
+
}
|
| 117 |
+
function JSXOpeningFragment() {
|
| 118 |
+
this.tokenChar(60);
|
| 119 |
+
this.tokenChar(62);
|
| 120 |
+
}
|
| 121 |
+
function JSXClosingFragment() {
|
| 122 |
+
this.token("</");
|
| 123 |
+
this.tokenChar(62);
|
| 124 |
+
}
|
| 125 |
+
|
| 126 |
+
//# sourceMappingURL=jsx.js.map
|
novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/generators/jsx.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"names":["JSXAttribute","node","print","name","value","token","JSXIdentifier","word","JSXNamespacedName","namespace","JSXMemberExpression","object","property","JSXSpreadAttribute","argument","rightBrace","JSXExpressionContainer","expression","JSXSpreadChild","JSXText","raw","getPossibleRaw","undefined","JSXElement","open","openingElement","selfClosing","indent","child","children","dedent","closingElement","spaceSeparator","space","JSXOpeningElement","typeArguments","typeParameters","attributes","length","printJoin","JSXClosingElement","JSXEmptyExpression","printInnerComments","JSXFragment","openingFragment","closingFragment","JSXOpeningFragment","JSXClosingFragment"],"sources":["../../src/generators/jsx.ts"],"sourcesContent":["import type Printer from \"../printer.ts\";\nimport type * as t from \"@babel/types\";\n\nexport function JSXAttribute(this: Printer, node: t.JSXAttribute) {\n this.print(node.name);\n if (node.value) {\n this.token(\"=\");\n this.print(node.value);\n }\n}\n\nexport function JSXIdentifier(this: Printer, node: t.JSXIdentifier) {\n this.word(node.name);\n}\n\nexport function JSXNamespacedName(this: Printer, node: t.JSXNamespacedName) {\n this.print(node.namespace);\n this.token(\":\");\n this.print(node.name);\n}\n\nexport function JSXMemberExpression(\n this: Printer,\n node: t.JSXMemberExpression,\n) {\n this.print(node.object);\n this.token(\".\");\n this.print(node.property);\n}\n\nexport function JSXSpreadAttribute(this: Printer, node: t.JSXSpreadAttribute) {\n this.token(\"{\");\n this.token(\"...\");\n this.print(node.argument);\n this.rightBrace(node);\n}\n\nexport function JSXExpressionContainer(\n this: Printer,\n node: t.JSXExpressionContainer,\n) {\n this.token(\"{\");\n this.print(node.expression);\n this.rightBrace(node);\n}\n\nexport function JSXSpreadChild(this: Printer, node: t.JSXSpreadChild) {\n this.token(\"{\");\n this.token(\"...\");\n this.print(node.expression);\n this.rightBrace(node);\n}\n\nexport function JSXText(this: Printer, node: t.JSXText) {\n const raw = this.getPossibleRaw(node);\n\n if (raw !== undefined) {\n this.token(raw, true);\n } else {\n this.token(node.value, true);\n }\n}\n\nexport function JSXElement(this: Printer, node: t.JSXElement) {\n const open = node.openingElement;\n this.print(open);\n if (open.selfClosing) return;\n\n this.indent();\n for (const child of node.children) {\n this.print(child);\n }\n this.dedent();\n\n this.print(node.closingElement);\n}\n\nfunction spaceSeparator(this: Printer) {\n this.space();\n}\n\nexport function JSXOpeningElement(this: Printer, node: t.JSXOpeningElement) {\n this.token(\"<\");\n this.print(node.name);\n if (process.env.BABEL_8_BREAKING) {\n //@ts-ignore(Babel 7 vs Babel 8) Babel 8 AST\n this.print(node.typeArguments);\n } else {\n if (node.typeArguments) {\n this.print(node.typeArguments); // Flow AST\n }\n // @ts-ignore(Babel 7 vs Babel 8) Removed in Babel 8\n this.print(node.typeParameters); // Legacy TS AST\n }\n\n if (node.attributes.length > 0) {\n this.space();\n this.printJoin(node.attributes, undefined, undefined, spaceSeparator);\n }\n if (node.selfClosing) {\n this.space();\n this.token(\"/\");\n }\n this.token(\">\");\n}\n\nexport function JSXClosingElement(this: Printer, node: t.JSXClosingElement) {\n this.token(\"<\");\n this.token(\"/\");\n this.print(node.name);\n this.token(\">\");\n}\n\nexport function JSXEmptyExpression(this: Printer) {\n // This node is empty, so forcefully print its inner comments.\n this.printInnerComments();\n}\n\nexport function JSXFragment(this: Printer, node: t.JSXFragment) {\n this.print(node.openingFragment);\n\n this.indent();\n for (const child of node.children) {\n this.print(child);\n }\n this.dedent();\n\n this.print(node.closingFragment);\n}\n\nexport function JSXOpeningFragment(this: Printer) {\n this.token(\"<\");\n this.token(\">\");\n}\n\nexport function JSXClosingFragment(this: Printer) {\n this.token(\"</\");\n this.token(\">\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAGO,SAASA,YAAYA,CAAgBC,IAAoB,EAAE;EAChE,IAAI,CAACC,KAAK,CAACD,IAAI,CAACE,IAAI,CAAC;EACrB,IAAIF,IAAI,CAACG,KAAK,EAAE;IACd,IAAI,CAACC,SAAK,GAAI,CAAC;IACf,IAAI,CAACH,KAAK,CAACD,IAAI,CAACG,KAAK,CAAC;EACxB;AACF;AAEO,SAASE,aAAaA,CAAgBL,IAAqB,EAAE;EAClE,IAAI,CAACM,IAAI,CAACN,IAAI,CAACE,IAAI,CAAC;AACtB;AAEO,SAASK,iBAAiBA,CAAgBP,IAAyB,EAAE;EAC1E,IAAI,CAACC,KAAK,CAACD,IAAI,CAACQ,SAAS,CAAC;EAC1B,IAAI,CAACJ,SAAK,GAAI,CAAC;EACf,IAAI,CAACH,KAAK,CAACD,IAAI,CAACE,IAAI,CAAC;AACvB;AAEO,SAASO,mBAAmBA,CAEjCT,IAA2B,EAC3B;EACA,IAAI,CAACC,KAAK,CAACD,IAAI,CAACU,MAAM,CAAC;EACvB,IAAI,CAACN,SAAK,GAAI,CAAC;EACf,IAAI,CAACH,KAAK,CAACD,IAAI,CAACW,QAAQ,CAAC;AAC3B;AAEO,SAASC,kBAAkBA,CAAgBZ,IAA0B,EAAE;EAC5E,IAAI,CAACI,SAAK,IAAI,CAAC;EACf,IAAI,CAACA,KAAK,CAAC,KAAK,CAAC;EACjB,IAAI,C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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
|
| 3 |
+
Object.defineProperty(exports, "__esModule", {
|
| 4 |
+
value: true
|
| 5 |
+
});
|
| 6 |
+
exports.ArrowFunctionExpression = ArrowFunctionExpression;
|
| 7 |
+
exports.FunctionDeclaration = exports.FunctionExpression = FunctionExpression;
|
| 8 |
+
exports._functionHead = _functionHead;
|
| 9 |
+
exports._methodHead = _methodHead;
|
| 10 |
+
exports._param = _param;
|
| 11 |
+
exports._parameters = _parameters;
|
| 12 |
+
exports._params = _params;
|
| 13 |
+
exports._predicate = _predicate;
|
| 14 |
+
exports._shouldPrintArrowParamsParens = _shouldPrintArrowParamsParens;
|
| 15 |
+
var _t = require("@babel/types");
|
| 16 |
+
var _index = require("../node/index.js");
|
| 17 |
+
const {
|
| 18 |
+
isIdentifier
|
| 19 |
+
} = _t;
|
| 20 |
+
function _params(node, idNode, parentNode) {
|
| 21 |
+
this.print(node.typeParameters);
|
| 22 |
+
const nameInfo = _getFuncIdName.call(this, idNode, parentNode);
|
| 23 |
+
if (nameInfo) {
|
| 24 |
+
this.sourceIdentifierName(nameInfo.name, nameInfo.pos);
|
| 25 |
+
}
|
| 26 |
+
this.tokenChar(40);
|
| 27 |
+
this._parameters(node.params, ")");
|
| 28 |
+
const noLineTerminator = node.type === "ArrowFunctionExpression";
|
| 29 |
+
this.print(node.returnType, noLineTerminator);
|
| 30 |
+
this._noLineTerminator = noLineTerminator;
|
| 31 |
+
}
|
| 32 |
+
function _parameters(parameters, endToken) {
|
| 33 |
+
const exit = this.enterDelimited();
|
| 34 |
+
const trailingComma = this.shouldPrintTrailingComma(endToken);
|
| 35 |
+
const paramLength = parameters.length;
|
| 36 |
+
for (let i = 0; i < paramLength; i++) {
|
| 37 |
+
this._param(parameters[i]);
|
| 38 |
+
if (trailingComma || i < paramLength - 1) {
|
| 39 |
+
this.token(",", null, i);
|
| 40 |
+
this.space();
|
| 41 |
+
}
|
| 42 |
+
}
|
| 43 |
+
this.token(endToken);
|
| 44 |
+
exit();
|
| 45 |
+
}
|
| 46 |
+
function _param(parameter) {
|
| 47 |
+
this.printJoin(parameter.decorators);
|
| 48 |
+
this.print(parameter);
|
| 49 |
+
if (parameter.optional) {
|
| 50 |
+
this.tokenChar(63);
|
| 51 |
+
}
|
| 52 |
+
this.print(parameter.typeAnnotation);
|
| 53 |
+
}
|
| 54 |
+
function _methodHead(node) {
|
| 55 |
+
const kind = node.kind;
|
| 56 |
+
const key = node.key;
|
| 57 |
+
if (kind === "get" || kind === "set") {
|
| 58 |
+
this.word(kind);
|
| 59 |
+
this.space();
|
| 60 |
+
}
|
| 61 |
+
if (node.async) {
|
| 62 |
+
this.word("async", true);
|
| 63 |
+
this.space();
|
| 64 |
+
}
|
| 65 |
+
if (kind === "method" || kind === "init") {
|
| 66 |
+
if (node.generator) {
|
| 67 |
+
this.tokenChar(42);
|
| 68 |
+
}
|
| 69 |
+
}
|
| 70 |
+
if (node.computed) {
|
| 71 |
+
this.tokenChar(91);
|
| 72 |
+
this.print(key);
|
| 73 |
+
this.tokenChar(93);
|
| 74 |
+
} else {
|
| 75 |
+
this.print(key);
|
| 76 |
+
}
|
| 77 |
+
if (node.optional) {
|
| 78 |
+
this.tokenChar(63);
|
| 79 |
+
}
|
| 80 |
+
this._params(node, node.computed && node.key.type !== "StringLiteral" ? undefined : node.key, undefined);
|
| 81 |
+
}
|
| 82 |
+
function _predicate(node, noLineTerminatorAfter) {
|
| 83 |
+
if (node.predicate) {
|
| 84 |
+
if (!node.returnType) {
|
| 85 |
+
this.tokenChar(58);
|
| 86 |
+
}
|
| 87 |
+
this.space();
|
| 88 |
+
this.print(node.predicate, noLineTerminatorAfter);
|
| 89 |
+
}
|
| 90 |
+
}
|
| 91 |
+
function _functionHead(node, parent) {
|
| 92 |
+
if (node.async) {
|
| 93 |
+
this.word("async");
|
| 94 |
+
if (!this.format.preserveFormat) {
|
| 95 |
+
this._endsWithInnerRaw = false;
|
| 96 |
+
}
|
| 97 |
+
this.space();
|
| 98 |
+
}
|
| 99 |
+
this.word("function");
|
| 100 |
+
if (node.generator) {
|
| 101 |
+
if (!this.format.preserveFormat) {
|
| 102 |
+
this._endsWithInnerRaw = false;
|
| 103 |
+
}
|
| 104 |
+
this.tokenChar(42);
|
| 105 |
+
}
|
| 106 |
+
this.space();
|
| 107 |
+
if (node.id) {
|
| 108 |
+
this.print(node.id);
|
| 109 |
+
}
|
| 110 |
+
this._params(node, node.id, parent);
|
| 111 |
+
if (node.type !== "TSDeclareFunction") {
|
| 112 |
+
this._predicate(node);
|
| 113 |
+
}
|
| 114 |
+
}
|
| 115 |
+
function FunctionExpression(node, parent) {
|
| 116 |
+
this._functionHead(node, parent);
|
| 117 |
+
this.space();
|
| 118 |
+
this.print(node.body);
|
| 119 |
+
}
|
| 120 |
+
function ArrowFunctionExpression(node, parent) {
|
| 121 |
+
if (node.async) {
|
| 122 |
+
this.word("async", true);
|
| 123 |
+
this.space();
|
| 124 |
+
}
|
| 125 |
+
if (this._shouldPrintArrowParamsParens(node)) {
|
| 126 |
+
this._params(node, undefined, parent);
|
| 127 |
+
} else {
|
| 128 |
+
this.print(node.params[0], true);
|
| 129 |
+
}
|
| 130 |
+
this._predicate(node, true);
|
| 131 |
+
this.space();
|
| 132 |
+
this.printInnerComments();
|
| 133 |
+
this.token("=>");
|
| 134 |
+
this.space();
|
| 135 |
+
this.tokenContext |= _index.TokenContext.arrowBody;
|
| 136 |
+
this.print(node.body);
|
| 137 |
+
}
|
| 138 |
+
function _shouldPrintArrowParamsParens(node) {
|
| 139 |
+
var _firstParam$leadingCo, _firstParam$trailingC;
|
| 140 |
+
if (node.params.length !== 1) return true;
|
| 141 |
+
if (node.typeParameters || node.returnType || node.predicate) {
|
| 142 |
+
return true;
|
| 143 |
+
}
|
| 144 |
+
const firstParam = node.params[0];
|
| 145 |
+
if (!isIdentifier(firstParam) || firstParam.typeAnnotation || firstParam.optional || (_firstParam$leadingCo = firstParam.leadingComments) != null && _firstParam$leadingCo.length || (_firstParam$trailingC = firstParam.trailingComments) != null && _firstParam$trailingC.length) {
|
| 146 |
+
return true;
|
| 147 |
+
}
|
| 148 |
+
if (this.tokenMap) {
|
| 149 |
+
if (node.loc == null) return true;
|
| 150 |
+
if (this.tokenMap.findMatching(node, "(") !== null) return true;
|
| 151 |
+
const arrowToken = this.tokenMap.findMatching(node, "=>");
|
| 152 |
+
if ((arrowToken == null ? void 0 : arrowToken.loc) == null) return true;
|
| 153 |
+
return arrowToken.loc.start.line !== node.loc.start.line;
|
| 154 |
+
}
|
| 155 |
+
if (this.format.retainLines) return true;
|
| 156 |
+
return false;
|
| 157 |
+
}
|
| 158 |
+
function _getFuncIdName(idNode, parent) {
|
| 159 |
+
let id = idNode;
|
| 160 |
+
if (!id && parent) {
|
| 161 |
+
const parentType = parent.type;
|
| 162 |
+
if (parentType === "VariableDeclarator") {
|
| 163 |
+
id = parent.id;
|
| 164 |
+
} else if (parentType === "AssignmentExpression" || parentType === "AssignmentPattern") {
|
| 165 |
+
id = parent.left;
|
| 166 |
+
} else if (parentType === "ObjectProperty" || parentType === "ClassProperty") {
|
| 167 |
+
if (!parent.computed || parent.key.type === "StringLiteral") {
|
| 168 |
+
id = parent.key;
|
| 169 |
+
}
|
| 170 |
+
} else if (parentType === "ClassPrivateProperty" || parentType === "ClassAccessorProperty") {
|
| 171 |
+
id = parent.key;
|
| 172 |
+
}
|
| 173 |
+
}
|
| 174 |
+
if (!id) return;
|
| 175 |
+
let nameInfo;
|
| 176 |
+
if (id.type === "Identifier") {
|
| 177 |
+
var _id$loc, _id$loc2;
|
| 178 |
+
nameInfo = {
|
| 179 |
+
pos: (_id$loc = id.loc) == null ? void 0 : _id$loc.start,
|
| 180 |
+
name: ((_id$loc2 = id.loc) == null ? void 0 : _id$loc2.identifierName) || id.name
|
| 181 |
+
};
|
| 182 |
+
} else if (id.type === "PrivateName") {
|
| 183 |
+
var _id$loc3;
|
| 184 |
+
nameInfo = {
|
| 185 |
+
pos: (_id$loc3 = id.loc) == null ? void 0 : _id$loc3.start,
|
| 186 |
+
name: "#" + id.id.name
|
| 187 |
+
};
|
| 188 |
+
} else if (id.type === "StringLiteral") {
|
| 189 |
+
var _id$loc4;
|
| 190 |
+
nameInfo = {
|
| 191 |
+
pos: (_id$loc4 = id.loc) == null ? void 0 : _id$loc4.start,
|
| 192 |
+
name: id.value
|
| 193 |
+
};
|
| 194 |
+
}
|
| 195 |
+
return nameInfo;
|
| 196 |
+
}
|
| 197 |
+
|
| 198 |
+
//# sourceMappingURL=methods.js.map
|
novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/generators/methods.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"names":["_t","require","_index","isIdentifier","_params","node","idNode","parentNode","print","typeParameters","nameInfo","_getFuncIdName","call","sourceIdentifierName","name","pos","token","_parameters","params","noLineTerminator","type","returnType","_noLineTerminator","parameters","endToken","exit","enterDelimited","trailingComma","shouldPrintTrailingComma","paramLength","length","i","_param","space","parameter","printJoin","decorators","optional","typeAnnotation","_methodHead","kind","key","word","async","generator","computed","undefined","_predicate","noLineTerminatorAfter","predicate","_functionHead","parent","format","preserveFormat","_endsWithInnerRaw","id","FunctionExpression","body","ArrowFunctionExpression","_shouldPrintArrowParamsParens","printInnerComments","tokenContext","TokenContext","arrowBody","_firstParam$leadingCo","_firstParam$trailingC","firstParam","leadingComments","trailingComments","tokenMap","loc","findMatching","arrowToken","start","line","retainLines","parentType","left","_id$loc","_id$loc2","identifierName","_id$loc3","_id$loc4","value"],"sources":["../../src/generators/methods.ts"],"sourcesContent":["import type Printer from \"../printer.ts\";\nimport type * as t from \"@babel/types\";\nimport { isIdentifier, type ParentMaps } from \"@babel/types\";\nimport { TokenContext } from \"../node/index.ts\";\n\ntype ParentsOf<T extends t.Node> = ParentMaps[T[\"type\"]];\n\nexport function _params(\n this: Printer,\n node: t.Function | t.TSDeclareMethod | t.TSDeclareFunction,\n idNode: t.Expression | t.PrivateName,\n parentNode: ParentsOf<typeof node>,\n) {\n this.print(node.typeParameters);\n\n const nameInfo = _getFuncIdName.call(this, idNode, parentNode);\n if (nameInfo) {\n this.sourceIdentifierName(nameInfo.name, nameInfo.pos);\n }\n\n this.token(\"(\");\n this._parameters(node.params, \")\");\n\n const noLineTerminator = node.type === \"ArrowFunctionExpression\";\n this.print(node.returnType, noLineTerminator);\n\n this._noLineTerminator = noLineTerminator;\n}\n\nexport function _parameters(\n this: Printer,\n parameters: t.Function[\"params\"],\n endToken: string,\n) {\n const exit = this.enterDelimited();\n\n const trailingComma = this.shouldPrintTrailingComma(endToken);\n\n const paramLength = parameters.length;\n for (let i = 0; i < paramLength; i++) {\n this._param(parameters[i]);\n\n if (trailingComma || i < paramLength - 1) {\n this.token(\",\", null, i);\n this.space();\n }\n }\n\n this.token(endToken);\n exit();\n}\n\nexport function _param(\n this: Printer,\n parameter: t.Identifier | t.RestElement | t.Pattern | t.TSParameterProperty,\n) {\n // @ts-expect-error decorators is not in VoidPattern\n this.printJoin(parameter.decorators);\n this.print(parameter);\n if (\n // @ts-expect-error optional is not in TSParameterProperty\n parameter.optional\n ) {\n this.token(\"?\"); // TS / flow\n }\n\n this.print(\n // @ts-expect-error typeAnnotation is not in TSParameterProperty\n parameter.typeAnnotation,\n ); // TS / flow\n}\n\nexport function _methodHead(this: Printer, node: t.Method | t.TSDeclareMethod) {\n const kind = node.kind;\n const key = node.key;\n\n if (kind === \"get\" || kind === \"set\") {\n this.word(kind);\n this.space();\n }\n\n if (node.async) {\n this.word(\"async\", true);\n this.space();\n }\n\n if (\n kind === \"method\" ||\n // @ts-expect-error Fixme: kind: \"init\" is not defined\n kind === \"init\"\n ) {\n if (node.generator) {\n this.token(\"*\");\n }\n }\n\n if (node.computed) {\n this.token(\"[\");\n this.print(key);\n this.token(\"]\");\n } else {\n this.print(key);\n }\n\n if (\n // @ts-expect-error optional is not in ObjectMethod\n node.optional\n ) {\n // TS\n this.token(\"?\");\n }\n\n this._params(\n node,\n node.computed && node.key.type !== \"StringLiteral\" ? undefined : node.key,\n undefined,\n );\n}\n\nexport function _predicate(\n this: Printer,\n node:\n | t.FunctionDeclaration\n | t.FunctionExpression\n | t.ArrowFunctionExpression,\n noLineTerminatorAfter?: boolean,\n) {\n if (node.predicate) {\n if (!node.returnType) {\n this.token(\":\");\n }\n this.space();\n this.print(node.predicate, noLineTerminatorAfter);\n }\n}\n\nexport function _functionHead(\n this: Printer,\n node: t.FunctionDeclaration | t.FunctionExpression | t.TSDeclareFunction,\n parent: ParentsOf<typeof node>,\n) {\n if (node.async) {\n this.word(\"async\");\n if (!this.format.preserveFormat) {\n // We prevent inner comments from being printed here,\n // so that they are always consistently printed in the\n // same place regardless of the function type.\n this._endsWithInnerRaw = false;\n }\n this.space();\n }\n this.word(\"function\");\n if (node.generator) {\n if (!this.format.preserveFormat) {\n // We prevent inner comments from being printed here,\n // so that they are always consistently printed in the\n // same place regardless of the function type.\n this._endsWithInnerRaw = false;\n }\n this.token(\"*\");\n }\n\n this.space();\n if (node.id) {\n this.print(node.id);\n }\n\n this._params(node, node.id, parent);\n if (node.type !== \"TSDeclareFunction\") {\n this._predicate(node);\n }\n}\n\nexport function FunctionExpression(\n this: Printer,\n node: t.FunctionExpression,\n parent: ParentsOf<typeof node>,\n) {\n this._functionHead(node, parent);\n this.space();\n this.print(node.body);\n}\n\nexport { FunctionExpression as FunctionDeclaration };\n\nexport function ArrowFunctionExpression(\n this: Printer,\n node: t.ArrowFunctionExpression,\n parent: ParentsOf<typeof node>,\n) {\n if (node.async) {\n this.word(\"async\", true);\n this.space();\n }\n\n if (this._shouldPrintArrowParamsParens(node)) {\n this._params(node, undefined, parent);\n } else {\n this.print(node.params[0], true);\n }\n\n this._predicate(node, true);\n this.space();\n // When printing (x)/*1*/=>{}, we remove the parentheses\n // and thus there aren't two contiguous inner tokens.\n // We forcefully print inner comments here.\n this.printInnerComments();\n this.token(\"=>\");\n\n this.space();\n\n this.tokenContext |= TokenContext.arrowBody;\n this.print(node.body);\n}\n\n// Try to avoid printing parens in simple cases, but only if we're pretty\n// sure that they aren't needed by type annotations or potential newlines.\nexport function _shouldPrintArrowParamsParens(\n this: Printer,\n node: t.ArrowFunctionExpression,\n): boolean {\n if (node.params.length !== 1) return true;\n\n if (node.typeParameters || node.returnType || node.predicate) {\n return true;\n }\n\n const firstParam = node.params[0];\n if (\n !isIdentifier(firstParam) ||\n firstParam.typeAnnotation ||\n firstParam.optional ||\n // Flow does not support `foo /*: string*/ => {};`\n firstParam.leadingComments?.length ||\n firstParam.trailingComments?.length\n ) {\n return true;\n }\n\n if (this.tokenMap) {\n if (node.loc == null) return true;\n if (this.tokenMap.findMatching(node, \"(\") !== null) return true;\n const arrowToken = this.tokenMap.findMatching(node, \"=>\");\n if (arrowToken?.loc == null) return true;\n return arrowToken.loc.start.line !== node.loc.start.line;\n }\n\n if (this.format.retainLines) return true;\n\n return false;\n}\n\nfunction _getFuncIdName(\n this: Printer,\n idNode: t.Expression | t.PrivateName,\n parent: ParentsOf<t.Function | t.TSDeclareMethod | t.TSDeclareFunction>,\n) {\n let id: t.Expression | t.PrivateName | t.LVal | t.VoidPattern = idNode;\n\n if (!id && parent) {\n const parentType = parent.type;\n\n if (parentType === \"VariableDeclarator\") {\n id = parent.id;\n } else if (\n parentType === \"AssignmentExpression\" ||\n parentType === \"AssignmentPattern\"\n ) {\n id = parent.left;\n } else if (\n parentType === \"ObjectProperty\" ||\n parentType === \"ClassProperty\"\n ) {\n if (!parent.computed || parent.key.type === \"StringLiteral\") {\n id = parent.key;\n }\n } else if (\n parentType === \"ClassPrivateProperty\" ||\n parentType === \"ClassAccessorProperty\"\n ) {\n id = parent.key;\n }\n }\n\n if (!id) return;\n\n let nameInfo;\n\n if (id.type === \"Identifier\") {\n nameInfo = {\n pos: id.loc?.start,\n name: id.loc?.identifierName || id.name,\n };\n } else if (id.type === \"PrivateName\") {\n nameInfo = {\n pos: id.loc?.start,\n name: \"#\" + id.id.name,\n };\n } else if (id.type === \"StringLiteral\") {\n nameInfo = {\n pos: id.loc?.start,\n name: id.value,\n };\n }\n\n return nameInfo;\n}\n"],"mappings":";;;;;;;;;;;;;;AAEA,IAAAA,EAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAAgD;EADvCE;AAAY,IAAAH,EAAA;AAKd,SAASI,OAAOA,CAErBC,IAA0D,EAC1DC,MAAoC,EACpCC,UAAkC,EAClC;EACA,IAAI,CAACC,KAAK,CAACH,IAAI,CAACI,cAAc,CAAC;EAE/B,MAAMC,QAAQ,GAAGC,cAAc,CAACC,IAAI,CAAC,IAAI,EAAEN,MAAM,EAAEC,UAAU,CAAC;EAC9D,IAAIG,QAAQ,EAAE;IACZ,IAAI,CAACG,oBAAoB,CAACH,QAAQ,CAACI,IAAI,EAAEJ,QAAQ,CAACK,GAAG,CAAC;EACxD;EAEA,IAAI,CAACC,SAAK,GAAI,CAAC;EACf,IAA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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
|
| 3 |
+
Object.defineProperty(exports, "__esModule", {
|
| 4 |
+
value: true
|
| 5 |
+
});
|
| 6 |
+
exports.ExportAllDeclaration = ExportAllDeclaration;
|
| 7 |
+
exports.ExportDefaultDeclaration = ExportDefaultDeclaration;
|
| 8 |
+
exports.ExportDefaultSpecifier = ExportDefaultSpecifier;
|
| 9 |
+
exports.ExportNamedDeclaration = ExportNamedDeclaration;
|
| 10 |
+
exports.ExportNamespaceSpecifier = ExportNamespaceSpecifier;
|
| 11 |
+
exports.ExportSpecifier = ExportSpecifier;
|
| 12 |
+
exports.ImportAttribute = ImportAttribute;
|
| 13 |
+
exports.ImportDeclaration = ImportDeclaration;
|
| 14 |
+
exports.ImportDefaultSpecifier = ImportDefaultSpecifier;
|
| 15 |
+
exports.ImportExpression = ImportExpression;
|
| 16 |
+
exports.ImportNamespaceSpecifier = ImportNamespaceSpecifier;
|
| 17 |
+
exports.ImportSpecifier = ImportSpecifier;
|
| 18 |
+
exports._printAttributes = _printAttributes;
|
| 19 |
+
var _t = require("@babel/types");
|
| 20 |
+
var _index = require("../node/index.js");
|
| 21 |
+
const {
|
| 22 |
+
isClassDeclaration,
|
| 23 |
+
isExportDefaultSpecifier,
|
| 24 |
+
isExportNamespaceSpecifier,
|
| 25 |
+
isImportDefaultSpecifier,
|
| 26 |
+
isImportNamespaceSpecifier,
|
| 27 |
+
isStatement
|
| 28 |
+
} = _t;
|
| 29 |
+
function ImportSpecifier(node) {
|
| 30 |
+
if (node.importKind === "type" || node.importKind === "typeof") {
|
| 31 |
+
this.word(node.importKind);
|
| 32 |
+
this.space();
|
| 33 |
+
}
|
| 34 |
+
this.print(node.imported);
|
| 35 |
+
if (node.local && node.local.name !== node.imported.name) {
|
| 36 |
+
this.space();
|
| 37 |
+
this.word("as");
|
| 38 |
+
this.space();
|
| 39 |
+
this.print(node.local);
|
| 40 |
+
}
|
| 41 |
+
}
|
| 42 |
+
function ImportDefaultSpecifier(node) {
|
| 43 |
+
this.print(node.local);
|
| 44 |
+
}
|
| 45 |
+
function ExportDefaultSpecifier(node) {
|
| 46 |
+
this.print(node.exported);
|
| 47 |
+
}
|
| 48 |
+
function ExportSpecifier(node) {
|
| 49 |
+
if (node.exportKind === "type") {
|
| 50 |
+
this.word("type");
|
| 51 |
+
this.space();
|
| 52 |
+
}
|
| 53 |
+
this.print(node.local);
|
| 54 |
+
if (node.exported && node.local.name !== node.exported.name) {
|
| 55 |
+
this.space();
|
| 56 |
+
this.word("as");
|
| 57 |
+
this.space();
|
| 58 |
+
this.print(node.exported);
|
| 59 |
+
}
|
| 60 |
+
}
|
| 61 |
+
function ExportNamespaceSpecifier(node) {
|
| 62 |
+
this.tokenChar(42);
|
| 63 |
+
this.space();
|
| 64 |
+
this.word("as");
|
| 65 |
+
this.space();
|
| 66 |
+
this.print(node.exported);
|
| 67 |
+
}
|
| 68 |
+
let warningShown = false;
|
| 69 |
+
function _printAttributes(node, hasPreviousBrace) {
|
| 70 |
+
var _node$extra;
|
| 71 |
+
const {
|
| 72 |
+
importAttributesKeyword
|
| 73 |
+
} = this.format;
|
| 74 |
+
const {
|
| 75 |
+
attributes,
|
| 76 |
+
assertions
|
| 77 |
+
} = node;
|
| 78 |
+
if (attributes && !importAttributesKeyword && node.extra && (node.extra.deprecatedAssertSyntax || node.extra.deprecatedWithLegacySyntax) && !warningShown) {
|
| 79 |
+
warningShown = true;
|
| 80 |
+
console.warn(`\
|
| 81 |
+
You are using import attributes, without specifying the desired output syntax.
|
| 82 |
+
Please specify the "importAttributesKeyword" generator option, whose value can be one of:
|
| 83 |
+
- "with" : \`import { a } from "b" with { type: "json" };\`
|
| 84 |
+
- "assert" : \`import { a } from "b" assert { type: "json" };\`
|
| 85 |
+
- "with-legacy" : \`import { a } from "b" with type: "json";\`
|
| 86 |
+
`);
|
| 87 |
+
}
|
| 88 |
+
const useAssertKeyword = importAttributesKeyword === "assert" || !importAttributesKeyword && assertions;
|
| 89 |
+
this.word(useAssertKeyword ? "assert" : "with");
|
| 90 |
+
this.space();
|
| 91 |
+
if (!useAssertKeyword && (importAttributesKeyword === "with-legacy" || !importAttributesKeyword && (_node$extra = node.extra) != null && _node$extra.deprecatedWithLegacySyntax)) {
|
| 92 |
+
this.printList(attributes || assertions);
|
| 93 |
+
return;
|
| 94 |
+
}
|
| 95 |
+
const occurrenceCount = hasPreviousBrace ? 1 : 0;
|
| 96 |
+
this.token("{", null, occurrenceCount);
|
| 97 |
+
this.space();
|
| 98 |
+
this.printList(attributes || assertions, this.shouldPrintTrailingComma("}"));
|
| 99 |
+
this.space();
|
| 100 |
+
this.token("}", null, occurrenceCount);
|
| 101 |
+
}
|
| 102 |
+
function ExportAllDeclaration(node) {
|
| 103 |
+
var _node$attributes, _node$assertions;
|
| 104 |
+
this.word("export");
|
| 105 |
+
this.space();
|
| 106 |
+
if (node.exportKind === "type") {
|
| 107 |
+
this.word("type");
|
| 108 |
+
this.space();
|
| 109 |
+
}
|
| 110 |
+
this.tokenChar(42);
|
| 111 |
+
this.space();
|
| 112 |
+
this.word("from");
|
| 113 |
+
this.space();
|
| 114 |
+
if ((_node$attributes = node.attributes) != null && _node$attributes.length || (_node$assertions = node.assertions) != null && _node$assertions.length) {
|
| 115 |
+
this.print(node.source, true);
|
| 116 |
+
this.space();
|
| 117 |
+
this._printAttributes(node, false);
|
| 118 |
+
} else {
|
| 119 |
+
this.print(node.source);
|
| 120 |
+
}
|
| 121 |
+
this.semicolon();
|
| 122 |
+
}
|
| 123 |
+
function maybePrintDecoratorsBeforeExport(printer, node) {
|
| 124 |
+
if (isClassDeclaration(node.declaration) && printer._shouldPrintDecoratorsBeforeExport(node)) {
|
| 125 |
+
printer.printJoin(node.declaration.decorators);
|
| 126 |
+
}
|
| 127 |
+
}
|
| 128 |
+
function ExportNamedDeclaration(node) {
|
| 129 |
+
maybePrintDecoratorsBeforeExport(this, node);
|
| 130 |
+
this.word("export");
|
| 131 |
+
this.space();
|
| 132 |
+
if (node.declaration) {
|
| 133 |
+
const declar = node.declaration;
|
| 134 |
+
this.print(declar);
|
| 135 |
+
if (!isStatement(declar)) this.semicolon();
|
| 136 |
+
} else {
|
| 137 |
+
if (node.exportKind === "type") {
|
| 138 |
+
this.word("type");
|
| 139 |
+
this.space();
|
| 140 |
+
}
|
| 141 |
+
const specifiers = node.specifiers.slice(0);
|
| 142 |
+
let hasSpecial = false;
|
| 143 |
+
for (;;) {
|
| 144 |
+
const first = specifiers[0];
|
| 145 |
+
if (isExportDefaultSpecifier(first) || isExportNamespaceSpecifier(first)) {
|
| 146 |
+
hasSpecial = true;
|
| 147 |
+
this.print(specifiers.shift());
|
| 148 |
+
if (specifiers.length) {
|
| 149 |
+
this.tokenChar(44);
|
| 150 |
+
this.space();
|
| 151 |
+
}
|
| 152 |
+
} else {
|
| 153 |
+
break;
|
| 154 |
+
}
|
| 155 |
+
}
|
| 156 |
+
let hasBrace = false;
|
| 157 |
+
if (specifiers.length || !specifiers.length && !hasSpecial) {
|
| 158 |
+
hasBrace = true;
|
| 159 |
+
this.tokenChar(123);
|
| 160 |
+
if (specifiers.length) {
|
| 161 |
+
this.space();
|
| 162 |
+
this.printList(specifiers, this.shouldPrintTrailingComma("}"));
|
| 163 |
+
this.space();
|
| 164 |
+
}
|
| 165 |
+
this.tokenChar(125);
|
| 166 |
+
}
|
| 167 |
+
if (node.source) {
|
| 168 |
+
var _node$attributes2, _node$assertions2;
|
| 169 |
+
this.space();
|
| 170 |
+
this.word("from");
|
| 171 |
+
this.space();
|
| 172 |
+
if ((_node$attributes2 = node.attributes) != null && _node$attributes2.length || (_node$assertions2 = node.assertions) != null && _node$assertions2.length) {
|
| 173 |
+
this.print(node.source, true);
|
| 174 |
+
this.space();
|
| 175 |
+
this._printAttributes(node, hasBrace);
|
| 176 |
+
} else {
|
| 177 |
+
this.print(node.source);
|
| 178 |
+
}
|
| 179 |
+
}
|
| 180 |
+
this.semicolon();
|
| 181 |
+
}
|
| 182 |
+
}
|
| 183 |
+
function ExportDefaultDeclaration(node) {
|
| 184 |
+
maybePrintDecoratorsBeforeExport(this, node);
|
| 185 |
+
this.word("export");
|
| 186 |
+
this.noIndentInnerCommentsHere();
|
| 187 |
+
this.space();
|
| 188 |
+
this.word("default");
|
| 189 |
+
this.space();
|
| 190 |
+
this.tokenContext |= _index.TokenContext.exportDefault;
|
| 191 |
+
const declar = node.declaration;
|
| 192 |
+
this.print(declar);
|
| 193 |
+
if (!isStatement(declar)) this.semicolon();
|
| 194 |
+
}
|
| 195 |
+
function ImportDeclaration(node) {
|
| 196 |
+
var _node$attributes3, _node$assertions3;
|
| 197 |
+
this.word("import");
|
| 198 |
+
this.space();
|
| 199 |
+
const isTypeKind = node.importKind === "type" || node.importKind === "typeof";
|
| 200 |
+
if (isTypeKind) {
|
| 201 |
+
this.noIndentInnerCommentsHere();
|
| 202 |
+
this.word(node.importKind);
|
| 203 |
+
this.space();
|
| 204 |
+
} else if (node.module) {
|
| 205 |
+
this.noIndentInnerCommentsHere();
|
| 206 |
+
this.word("module");
|
| 207 |
+
this.space();
|
| 208 |
+
} else if (node.phase) {
|
| 209 |
+
this.noIndentInnerCommentsHere();
|
| 210 |
+
this.word(node.phase);
|
| 211 |
+
this.space();
|
| 212 |
+
}
|
| 213 |
+
const specifiers = node.specifiers.slice(0);
|
| 214 |
+
const hasSpecifiers = !!specifiers.length;
|
| 215 |
+
while (hasSpecifiers) {
|
| 216 |
+
const first = specifiers[0];
|
| 217 |
+
if (isImportDefaultSpecifier(first) || isImportNamespaceSpecifier(first)) {
|
| 218 |
+
this.print(specifiers.shift());
|
| 219 |
+
if (specifiers.length) {
|
| 220 |
+
this.tokenChar(44);
|
| 221 |
+
this.space();
|
| 222 |
+
}
|
| 223 |
+
} else {
|
| 224 |
+
break;
|
| 225 |
+
}
|
| 226 |
+
}
|
| 227 |
+
let hasBrace = false;
|
| 228 |
+
if (specifiers.length) {
|
| 229 |
+
hasBrace = true;
|
| 230 |
+
this.tokenChar(123);
|
| 231 |
+
this.space();
|
| 232 |
+
this.printList(specifiers, this.shouldPrintTrailingComma("}"));
|
| 233 |
+
this.space();
|
| 234 |
+
this.tokenChar(125);
|
| 235 |
+
} else if (isTypeKind && !hasSpecifiers) {
|
| 236 |
+
hasBrace = true;
|
| 237 |
+
this.tokenChar(123);
|
| 238 |
+
this.tokenChar(125);
|
| 239 |
+
}
|
| 240 |
+
if (hasSpecifiers || isTypeKind) {
|
| 241 |
+
this.space();
|
| 242 |
+
this.word("from");
|
| 243 |
+
this.space();
|
| 244 |
+
}
|
| 245 |
+
if ((_node$attributes3 = node.attributes) != null && _node$attributes3.length || (_node$assertions3 = node.assertions) != null && _node$assertions3.length) {
|
| 246 |
+
this.print(node.source, true);
|
| 247 |
+
this.space();
|
| 248 |
+
this._printAttributes(node, hasBrace);
|
| 249 |
+
} else {
|
| 250 |
+
this.print(node.source);
|
| 251 |
+
}
|
| 252 |
+
this.semicolon();
|
| 253 |
+
}
|
| 254 |
+
function ImportAttribute(node) {
|
| 255 |
+
this.print(node.key);
|
| 256 |
+
this.tokenChar(58);
|
| 257 |
+
this.space();
|
| 258 |
+
this.print(node.value);
|
| 259 |
+
}
|
| 260 |
+
function ImportNamespaceSpecifier(node) {
|
| 261 |
+
this.tokenChar(42);
|
| 262 |
+
this.space();
|
| 263 |
+
this.word("as");
|
| 264 |
+
this.space();
|
| 265 |
+
this.print(node.local);
|
| 266 |
+
}
|
| 267 |
+
function ImportExpression(node) {
|
| 268 |
+
this.word("import");
|
| 269 |
+
if (node.phase) {
|
| 270 |
+
this.tokenChar(46);
|
| 271 |
+
this.word(node.phase);
|
| 272 |
+
}
|
| 273 |
+
this.tokenChar(40);
|
| 274 |
+
const shouldPrintTrailingComma = this.shouldPrintTrailingComma(")");
|
| 275 |
+
this.print(node.source);
|
| 276 |
+
if (node.options != null) {
|
| 277 |
+
this.tokenChar(44);
|
| 278 |
+
this.space();
|
| 279 |
+
this.print(node.options);
|
| 280 |
+
}
|
| 281 |
+
if (shouldPrintTrailingComma) {
|
| 282 |
+
this.tokenChar(44);
|
| 283 |
+
}
|
| 284 |
+
this.rightParens(node);
|
| 285 |
+
}
|
| 286 |
+
|
| 287 |
+
//# sourceMappingURL=modules.js.map
|
novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/generators/modules.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"names":["_t","require","_index","isClassDeclaration","isExportDefaultSpecifier","isExportNamespaceSpecifier","isImportDefaultSpecifier","isImportNamespaceSpecifier","isStatement","ImportSpecifier","node","importKind","word","space","print","imported","local","name","ImportDefaultSpecifier","ExportDefaultSpecifier","exported","ExportSpecifier","exportKind","ExportNamespaceSpecifier","token","warningShown","_printAttributes","hasPreviousBrace","_node$extra","importAttributesKeyword","format","attributes","assertions","extra","deprecatedAssertSyntax","deprecatedWithLegacySyntax","console","warn","useAssertKeyword","printList","occurrenceCount","shouldPrintTrailingComma","ExportAllDeclaration","_node$attributes","_node$assertions","length","source","semicolon","maybePrintDecoratorsBeforeExport","printer","declaration","_shouldPrintDecoratorsBeforeExport","printJoin","decorators","ExportNamedDeclaration","declar","specifiers","slice","hasSpecial","first","shift","hasBrace","_node$attributes2","_node$assertions2","ExportDefaultDeclaration","noIndentInnerCommentsHere","tokenContext","TokenContext","exportDefault","ImportDeclaration","_node$attributes3","_node$assertions3","isTypeKind","module","phase","hasSpecifiers","ImportAttribute","key","value","ImportNamespaceSpecifier","ImportExpression","options","rightParens"],"sources":["../../src/generators/modules.ts"],"sourcesContent":["import type Printer from \"../printer.ts\";\nimport {\n isClassDeclaration,\n isExportDefaultSpecifier,\n isExportNamespaceSpecifier,\n isImportDefaultSpecifier,\n isImportNamespaceSpecifier,\n isStatement,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport { TokenContext } from \"../node/index.ts\";\n\nexport function ImportSpecifier(this: Printer, node: t.ImportSpecifier) {\n if (node.importKind === \"type\" || node.importKind === \"typeof\") {\n this.word(node.importKind);\n this.space();\n }\n\n this.print(node.imported);\n // @ts-expect-error todo(flow-ts) maybe check node type instead of relying on name to be undefined on t.StringLiteral\n if (node.local && node.local.name !== node.imported.name) {\n this.space();\n this.word(\"as\");\n this.space();\n this.print(node.local);\n }\n}\n\nexport function ImportDefaultSpecifier(\n this: Printer,\n node: t.ImportDefaultSpecifier,\n) {\n this.print(node.local);\n}\n\nexport function ExportDefaultSpecifier(\n this: Printer,\n node: t.ExportDefaultSpecifier,\n) {\n this.print(node.exported);\n}\n\nexport function ExportSpecifier(this: Printer, node: t.ExportSpecifier) {\n if (node.exportKind === \"type\") {\n this.word(\"type\");\n this.space();\n }\n\n this.print(node.local);\n // @ts-expect-error todo(flow-ts) maybe check node type instead of relying on name to be undefined on t.StringLiteral\n if (node.exported && node.local.name !== node.exported.name) {\n this.space();\n this.word(\"as\");\n this.space();\n this.print(node.exported);\n }\n}\n\nexport function ExportNamespaceSpecifier(\n this: Printer,\n node: t.ExportNamespaceSpecifier,\n) {\n this.token(\"*\");\n this.space();\n this.word(\"as\");\n this.space();\n this.print(node.exported);\n}\n\nlet warningShown = false;\n\nexport function _printAttributes(\n this: Printer,\n node: Extract<t.Node, { attributes?: t.ImportAttribute[] }>,\n hasPreviousBrace: boolean,\n) {\n const { importAttributesKeyword } = this.format;\n const { attributes, assertions } = node;\n\n if (\n !process.env.BABEL_8_BREAKING &&\n attributes &&\n !importAttributesKeyword &&\n node.extra &&\n (node.extra.deprecatedAssertSyntax ||\n node.extra.deprecatedWithLegacySyntax) &&\n // In the production build only show the warning once.\n // We want to show it per-usage locally for tests.\n (!process.env.IS_PUBLISH || !warningShown)\n ) {\n warningShown = true;\n console.warn(`\\\nYou are using import attributes, without specifying the desired output syntax.\nPlease specify the \"importAttributesKeyword\" generator option, whose value can be one of:\n - \"with\" : \\`import { a } from \"b\" with { type: \"json\" };\\`\n - \"assert\" : \\`import { a } from \"b\" assert { type: \"json\" };\\`\n - \"with-legacy\" : \\`import { a } from \"b\" with type: \"json\";\\`\n`);\n }\n\n const useAssertKeyword =\n importAttributesKeyword === \"assert\" ||\n (!importAttributesKeyword && assertions);\n\n this.word(useAssertKeyword ? \"assert\" : \"with\");\n this.space();\n\n if (\n !process.env.BABEL_8_BREAKING &&\n !useAssertKeyword &&\n (importAttributesKeyword === \"with-legacy\" ||\n (!importAttributesKeyword && node.extra?.deprecatedWithLegacySyntax))\n ) {\n // with-legacy\n this.printList(attributes || assertions);\n return;\n }\n\n const occurrenceCount = hasPreviousBrace ? 1 : 0;\n\n this.token(\"{\", null, occurrenceCount);\n this.space();\n this.printList(attributes || assertions, this.shouldPrintTrailingComma(\"}\"));\n this.space();\n this.token(\"}\", null, occurrenceCount);\n}\n\nexport function ExportAllDeclaration(\n this: Printer,\n node: t.ExportAllDeclaration | t.DeclareExportAllDeclaration,\n) {\n this.word(\"export\");\n this.space();\n if (node.exportKind === \"type\") {\n this.word(\"type\");\n this.space();\n }\n this.token(\"*\");\n this.space();\n this.word(\"from\");\n this.space();\n if (node.attributes?.length || node.assertions?.length) {\n this.print(node.source, true);\n this.space();\n this._printAttributes(node, false);\n } else {\n this.print(node.source);\n }\n\n this.semicolon();\n}\n\nfunction maybePrintDecoratorsBeforeExport(\n printer: Printer,\n node: t.ExportNamedDeclaration | t.ExportDefaultDeclaration,\n) {\n if (\n isClassDeclaration(node.declaration) &&\n printer._shouldPrintDecoratorsBeforeExport(\n node as t.ExportNamedDeclaration & { declaration: t.ClassDeclaration },\n )\n ) {\n printer.printJoin(node.declaration.decorators);\n }\n}\n\nexport function ExportNamedDeclaration(\n this: Printer,\n node: t.ExportNamedDeclaration,\n) {\n maybePrintDecoratorsBeforeExport(this, node);\n\n this.word(\"export\");\n this.space();\n if (node.declaration) {\n const declar = node.declaration;\n this.print(declar);\n if (!isStatement(declar)) this.semicolon();\n } else {\n if (node.exportKind === \"type\") {\n this.word(\"type\");\n this.space();\n }\n\n const specifiers = node.specifiers.slice(0);\n\n // print \"special\" specifiers first\n let hasSpecial = false;\n for (;;) {\n const first = specifiers[0];\n if (\n isExportDefaultSpecifier(first) ||\n isExportNamespaceSpecifier(first)\n ) {\n hasSpecial = true;\n this.print(specifiers.shift());\n if (specifiers.length) {\n this.token(\",\");\n this.space();\n }\n } else {\n break;\n }\n }\n\n let hasBrace = false;\n if (specifiers.length || (!specifiers.length && !hasSpecial)) {\n hasBrace = true;\n this.token(\"{\");\n if (specifiers.length) {\n this.space();\n this.printList(specifiers, this.shouldPrintTrailingComma(\"}\"));\n this.space();\n }\n this.token(\"}\");\n }\n\n if (node.source) {\n this.space();\n this.word(\"from\");\n this.space();\n if (node.attributes?.length || node.assertions?.length) {\n this.print(node.source, true);\n this.space();\n this._printAttributes(node, hasBrace);\n } else {\n this.print(node.source);\n }\n }\n\n this.semicolon();\n }\n}\n\nexport function ExportDefaultDeclaration(\n this: Printer,\n node: t.ExportDefaultDeclaration,\n) {\n maybePrintDecoratorsBeforeExport(this, node);\n\n this.word(\"export\");\n this.noIndentInnerCommentsHere();\n this.space();\n this.word(\"default\");\n this.space();\n this.tokenContext |= TokenContext.exportDefault;\n const declar = node.declaration;\n this.print(declar);\n if (!isStatement(declar)) this.semicolon();\n}\n\nexport function ImportDeclaration(this: Printer, node: t.ImportDeclaration) {\n this.word(\"import\");\n this.space();\n\n const isTypeKind = node.importKind === \"type\" || node.importKind === \"typeof\";\n if (isTypeKind) {\n this.noIndentInnerCommentsHere();\n this.word(node.importKind);\n this.space();\n } else if (node.module) {\n this.noIndentInnerCommentsHere();\n this.word(\"module\");\n this.space();\n } else if (node.phase) {\n this.noIndentInnerCommentsHere();\n this.word(node.phase);\n this.space();\n }\n\n const specifiers = node.specifiers.slice(0);\n const hasSpecifiers = !!specifiers.length;\n // print \"special\" specifiers first. The loop condition is constant,\n // but there is a \"break\" in the body.\n while (hasSpecifiers) {\n const first = specifiers[0];\n if (isImportDefaultSpecifier(first) || isImportNamespaceSpecifier(first)) {\n this.print(specifiers.shift());\n if (specifiers.length) {\n this.token(\",\");\n this.space();\n }\n } else {\n break;\n }\n }\n\n let hasBrace = false;\n if (specifiers.length) {\n hasBrace = true;\n this.token(\"{\");\n this.space();\n this.printList(specifiers, this.shouldPrintTrailingComma(\"}\"));\n this.space();\n this.token(\"}\");\n } else if (isTypeKind && !hasSpecifiers) {\n hasBrace = true;\n this.token(\"{\");\n this.token(\"}\");\n }\n\n if (hasSpecifiers || isTypeKind) {\n this.space();\n this.word(\"from\");\n this.space();\n }\n\n if (node.attributes?.length || node.assertions?.length) {\n this.print(node.source, true);\n this.space();\n this._printAttributes(node, hasBrace);\n } else {\n this.print(node.source);\n }\n\n this.semicolon();\n}\n\nexport function ImportAttribute(this: Printer, node: t.ImportAttribute) {\n this.print(node.key);\n this.token(\":\");\n this.space();\n this.print(node.value);\n}\n\nexport function ImportNamespaceSpecifier(\n this: Printer,\n node: t.ImportNamespaceSpecifier,\n) {\n this.token(\"*\");\n this.space();\n this.word(\"as\");\n this.space();\n this.print(node.local);\n}\n\nexport function ImportExpression(this: Printer, node: t.ImportExpression) {\n this.word(\"import\");\n if (node.phase) {\n this.token(\".\");\n this.word(node.phase);\n }\n this.token(\"(\");\n const shouldPrintTrailingComma = this.shouldPrintTrailingComma(\")\");\n this.print(node.source);\n if (node.options != null) {\n this.token(\",\");\n this.space();\n this.print(node.options);\n }\n if (shouldPrintTrailingComma) {\n this.token(\",\");\n }\n this.rightParens(node);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AACA,IAAAA,EAAA,GAAAC,OAAA;AASA,IAAAC,MAAA,GAAAD,OAAA;AAAgD;EAR9CE,kBAAkB;EAClBC,wBAAwB;EACxBC,0BAA0B;EAC1BC,wBAAwB;EACxBC,0BAA0B;EAC1BC;AAAW,IAAAR,EAAA;AAKN,SAASS,eAAeA,CAAgBC,IAAuB,EAAE;EACtE,IAAIA,IAAI,CAACC,UAAU,KAAK,MAAM,IAAID,IAAI,CAACC,UAAU,KAAK,QAAQ,EAAE;IAC9D,IAAI,CAACC,IAAI,CAACF,IAAI,CAACC,UAAU,CAAC;IAC1B,IAAI,CAACE,KAAK,CAAC,CAAC;EACd;EAEA,IAAI,CAACC,KAAK,CAACJ,IAAI,CAACK,QAAQ,CAAC;EAEzB,IAAIL,IAAI,CAACM,KAAK,IAAIN,IAAI,CAACM,KAAK,CAACC,IAAI,KAAKP,IAAI,CAACK,QAAQ,CAACE,IAAI,EAAE;IACxD,IAAI,CAACJ,KAAK,CAAC,CAAC;IACZ,IAAI,CAACD,IAAI,CAAC,IAAI,CAAC;IACf,IAAI,CAACC,KAAK,CAAC,CAAC;IACZ,IAAI,CAACC,KAAK,CAACJ,IAAI,CAACM,KAAK,CAAC;EACxB;AACF;AAEO,SAASE,sBAAsBA,CAEpCR,IAA8B,EAC9B;EACA,IAAI,CAACI,KAAK,CAACJ,IAAI,CAACM,KAAK,CAAC;AACxB;AAEO,SAASG,sBAA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AC;AACxB;AAEO,SAASC,wBAAwBA,CAEtCrE,IAAgC,EAChC;EACA,IAAI,CAACc,SAAK,GAAI,CAAC;EACf,IAAI,CAACX,KAAK,CAAC,CAAC;EACZ,IAAI,CAACD,IAAI,CAAC,IAAI,CAAC;EACf,IAAI,CAACC,KAAK,CAAC,CAAC;EACZ,IAAI,CAACC,KAAK,CAACJ,IAAI,CAACM,KAAK,CAAC;AACxB;AAEO,SAASgE,gBAAgBA,CAAgBtE,IAAwB,EAAE;EACxE,IAAI,CAACE,IAAI,CAAC,QAAQ,CAAC;EACnB,IAAIF,IAAI,CAACgE,KAAK,EAAE;IACd,IAAI,CAAClD,SAAK,GAAI,CAAC;IACf,IAAI,CAACZ,IAAI,CAACF,IAAI,CAACgE,KAAK,CAAC;EACvB;EACA,IAAI,CAAClD,SAAK,GAAI,CAAC;EACf,MAAMiB,wBAAwB,GAAG,IAAI,CAACA,wBAAwB,CAAC,GAAG,CAAC;EACnE,IAAI,CAAC3B,KAAK,CAACJ,IAAI,CAACoC,MAAM,CAAC;EACvB,IAAIpC,IAAI,CAACuE,OAAO,IAAI,IAAI,EAAE;IACxB,IAAI,CAACzD,SAAK,GAAI,CAAC;IACf,IAAI,CAACX,KAAK,CAAC,CAAC;IACZ,IAAI,CAACC,KAAK,CAACJ,IAAI,CAACuE,OAAO,CAAC;EAC1B;EACA,IAAIxC,wBAAwB,EAAE;IAC5B,IAAI,CAACjB,SAAK,GAAI,CAAC;EACjB;EACA,IAAI,CAAC0D,WAAW,CAACxE,IAAI,CAAC;AACxB","ignoreList":[]}
|
novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/generators/statements.js
ADDED
|
@@ -0,0 +1,279 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
|
| 3 |
+
Object.defineProperty(exports, "__esModule", {
|
| 4 |
+
value: true
|
| 5 |
+
});
|
| 6 |
+
exports.BreakStatement = BreakStatement;
|
| 7 |
+
exports.CatchClause = CatchClause;
|
| 8 |
+
exports.ContinueStatement = ContinueStatement;
|
| 9 |
+
exports.DebuggerStatement = DebuggerStatement;
|
| 10 |
+
exports.DoWhileStatement = DoWhileStatement;
|
| 11 |
+
exports.ForOfStatement = exports.ForInStatement = void 0;
|
| 12 |
+
exports.ForStatement = ForStatement;
|
| 13 |
+
exports.IfStatement = IfStatement;
|
| 14 |
+
exports.LabeledStatement = LabeledStatement;
|
| 15 |
+
exports.ReturnStatement = ReturnStatement;
|
| 16 |
+
exports.SwitchCase = SwitchCase;
|
| 17 |
+
exports.SwitchStatement = SwitchStatement;
|
| 18 |
+
exports.ThrowStatement = ThrowStatement;
|
| 19 |
+
exports.TryStatement = TryStatement;
|
| 20 |
+
exports.VariableDeclaration = VariableDeclaration;
|
| 21 |
+
exports.VariableDeclarator = VariableDeclarator;
|
| 22 |
+
exports.WhileStatement = WhileStatement;
|
| 23 |
+
exports.WithStatement = WithStatement;
|
| 24 |
+
var _t = require("@babel/types");
|
| 25 |
+
const {
|
| 26 |
+
isFor,
|
| 27 |
+
isForStatement,
|
| 28 |
+
isIfStatement,
|
| 29 |
+
isStatement
|
| 30 |
+
} = _t;
|
| 31 |
+
function WithStatement(node) {
|
| 32 |
+
this.word("with");
|
| 33 |
+
this.space();
|
| 34 |
+
this.tokenChar(40);
|
| 35 |
+
this.print(node.object);
|
| 36 |
+
this.tokenChar(41);
|
| 37 |
+
this.printBlock(node);
|
| 38 |
+
}
|
| 39 |
+
function IfStatement(node) {
|
| 40 |
+
this.word("if");
|
| 41 |
+
this.space();
|
| 42 |
+
this.tokenChar(40);
|
| 43 |
+
this.print(node.test);
|
| 44 |
+
this.tokenChar(41);
|
| 45 |
+
this.space();
|
| 46 |
+
const needsBlock = node.alternate && isIfStatement(getLastStatement(node.consequent));
|
| 47 |
+
if (needsBlock) {
|
| 48 |
+
this.tokenChar(123);
|
| 49 |
+
this.newline();
|
| 50 |
+
this.indent();
|
| 51 |
+
}
|
| 52 |
+
this.printAndIndentOnComments(node.consequent);
|
| 53 |
+
if (needsBlock) {
|
| 54 |
+
this.dedent();
|
| 55 |
+
this.newline();
|
| 56 |
+
this.tokenChar(125);
|
| 57 |
+
}
|
| 58 |
+
if (node.alternate) {
|
| 59 |
+
if (this.endsWith(125)) this.space();
|
| 60 |
+
this.word("else");
|
| 61 |
+
this.space();
|
| 62 |
+
this.printAndIndentOnComments(node.alternate);
|
| 63 |
+
}
|
| 64 |
+
}
|
| 65 |
+
function getLastStatement(statement) {
|
| 66 |
+
const {
|
| 67 |
+
body
|
| 68 |
+
} = statement;
|
| 69 |
+
if (isStatement(body) === false) {
|
| 70 |
+
return statement;
|
| 71 |
+
}
|
| 72 |
+
return getLastStatement(body);
|
| 73 |
+
}
|
| 74 |
+
function ForStatement(node) {
|
| 75 |
+
this.word("for");
|
| 76 |
+
this.space();
|
| 77 |
+
this.tokenChar(40);
|
| 78 |
+
{
|
| 79 |
+
const exit = this.enterForStatementInit();
|
| 80 |
+
this.print(node.init);
|
| 81 |
+
exit();
|
| 82 |
+
}
|
| 83 |
+
this.tokenChar(59);
|
| 84 |
+
if (node.test) {
|
| 85 |
+
this.space();
|
| 86 |
+
this.print(node.test);
|
| 87 |
+
}
|
| 88 |
+
this.token(";", false, 1);
|
| 89 |
+
if (node.update) {
|
| 90 |
+
this.space();
|
| 91 |
+
this.print(node.update);
|
| 92 |
+
}
|
| 93 |
+
this.tokenChar(41);
|
| 94 |
+
this.printBlock(node);
|
| 95 |
+
}
|
| 96 |
+
function WhileStatement(node) {
|
| 97 |
+
this.word("while");
|
| 98 |
+
this.space();
|
| 99 |
+
this.tokenChar(40);
|
| 100 |
+
this.print(node.test);
|
| 101 |
+
this.tokenChar(41);
|
| 102 |
+
this.printBlock(node);
|
| 103 |
+
}
|
| 104 |
+
function ForXStatement(node) {
|
| 105 |
+
this.word("for");
|
| 106 |
+
this.space();
|
| 107 |
+
const isForOf = node.type === "ForOfStatement";
|
| 108 |
+
if (isForOf && node.await) {
|
| 109 |
+
this.word("await");
|
| 110 |
+
this.space();
|
| 111 |
+
}
|
| 112 |
+
this.noIndentInnerCommentsHere();
|
| 113 |
+
this.tokenChar(40);
|
| 114 |
+
{
|
| 115 |
+
const exit = this.enterForXStatementInit(isForOf);
|
| 116 |
+
this.print(node.left);
|
| 117 |
+
exit == null || exit();
|
| 118 |
+
}
|
| 119 |
+
this.space();
|
| 120 |
+
this.word(isForOf ? "of" : "in");
|
| 121 |
+
this.space();
|
| 122 |
+
this.print(node.right);
|
| 123 |
+
this.tokenChar(41);
|
| 124 |
+
this.printBlock(node);
|
| 125 |
+
}
|
| 126 |
+
const ForInStatement = exports.ForInStatement = ForXStatement;
|
| 127 |
+
const ForOfStatement = exports.ForOfStatement = ForXStatement;
|
| 128 |
+
function DoWhileStatement(node) {
|
| 129 |
+
this.word("do");
|
| 130 |
+
this.space();
|
| 131 |
+
this.print(node.body);
|
| 132 |
+
this.space();
|
| 133 |
+
this.word("while");
|
| 134 |
+
this.space();
|
| 135 |
+
this.tokenChar(40);
|
| 136 |
+
this.print(node.test);
|
| 137 |
+
this.tokenChar(41);
|
| 138 |
+
this.semicolon();
|
| 139 |
+
}
|
| 140 |
+
function printStatementAfterKeyword(printer, node) {
|
| 141 |
+
if (node) {
|
| 142 |
+
printer.space();
|
| 143 |
+
printer.printTerminatorless(node);
|
| 144 |
+
}
|
| 145 |
+
printer.semicolon();
|
| 146 |
+
}
|
| 147 |
+
function BreakStatement(node) {
|
| 148 |
+
this.word("break");
|
| 149 |
+
printStatementAfterKeyword(this, node.label);
|
| 150 |
+
}
|
| 151 |
+
function ContinueStatement(node) {
|
| 152 |
+
this.word("continue");
|
| 153 |
+
printStatementAfterKeyword(this, node.label);
|
| 154 |
+
}
|
| 155 |
+
function ReturnStatement(node) {
|
| 156 |
+
this.word("return");
|
| 157 |
+
printStatementAfterKeyword(this, node.argument);
|
| 158 |
+
}
|
| 159 |
+
function ThrowStatement(node) {
|
| 160 |
+
this.word("throw");
|
| 161 |
+
printStatementAfterKeyword(this, node.argument);
|
| 162 |
+
}
|
| 163 |
+
function LabeledStatement(node) {
|
| 164 |
+
this.print(node.label);
|
| 165 |
+
this.tokenChar(58);
|
| 166 |
+
this.space();
|
| 167 |
+
this.print(node.body);
|
| 168 |
+
}
|
| 169 |
+
function TryStatement(node) {
|
| 170 |
+
this.word("try");
|
| 171 |
+
this.space();
|
| 172 |
+
this.print(node.block);
|
| 173 |
+
this.space();
|
| 174 |
+
if (node.handlers) {
|
| 175 |
+
this.print(node.handlers[0]);
|
| 176 |
+
} else {
|
| 177 |
+
this.print(node.handler);
|
| 178 |
+
}
|
| 179 |
+
if (node.finalizer) {
|
| 180 |
+
this.space();
|
| 181 |
+
this.word("finally");
|
| 182 |
+
this.space();
|
| 183 |
+
this.print(node.finalizer);
|
| 184 |
+
}
|
| 185 |
+
}
|
| 186 |
+
function CatchClause(node) {
|
| 187 |
+
this.word("catch");
|
| 188 |
+
this.space();
|
| 189 |
+
if (node.param) {
|
| 190 |
+
this.tokenChar(40);
|
| 191 |
+
this.print(node.param);
|
| 192 |
+
this.print(node.param.typeAnnotation);
|
| 193 |
+
this.tokenChar(41);
|
| 194 |
+
this.space();
|
| 195 |
+
}
|
| 196 |
+
this.print(node.body);
|
| 197 |
+
}
|
| 198 |
+
function SwitchStatement(node) {
|
| 199 |
+
this.word("switch");
|
| 200 |
+
this.space();
|
| 201 |
+
this.tokenChar(40);
|
| 202 |
+
this.print(node.discriminant);
|
| 203 |
+
this.tokenChar(41);
|
| 204 |
+
this.space();
|
| 205 |
+
this.tokenChar(123);
|
| 206 |
+
this.printSequence(node.cases, true, undefined, function addNewlines(leading, cas) {
|
| 207 |
+
if (!leading && node.cases[node.cases.length - 1] === cas) return -1;
|
| 208 |
+
});
|
| 209 |
+
this.rightBrace(node);
|
| 210 |
+
}
|
| 211 |
+
function SwitchCase(node) {
|
| 212 |
+
if (node.test) {
|
| 213 |
+
this.word("case");
|
| 214 |
+
this.space();
|
| 215 |
+
this.print(node.test);
|
| 216 |
+
this.tokenChar(58);
|
| 217 |
+
} else {
|
| 218 |
+
this.word("default");
|
| 219 |
+
this.tokenChar(58);
|
| 220 |
+
}
|
| 221 |
+
if (node.consequent.length) {
|
| 222 |
+
this.newline();
|
| 223 |
+
this.printSequence(node.consequent, true);
|
| 224 |
+
}
|
| 225 |
+
}
|
| 226 |
+
function DebuggerStatement() {
|
| 227 |
+
this.word("debugger");
|
| 228 |
+
this.semicolon();
|
| 229 |
+
}
|
| 230 |
+
function VariableDeclaration(node, parent) {
|
| 231 |
+
if (node.declare) {
|
| 232 |
+
this.word("declare");
|
| 233 |
+
this.space();
|
| 234 |
+
}
|
| 235 |
+
const {
|
| 236 |
+
kind
|
| 237 |
+
} = node;
|
| 238 |
+
if (kind === "await using") {
|
| 239 |
+
this.word("await");
|
| 240 |
+
this.space();
|
| 241 |
+
this.word("using", true);
|
| 242 |
+
} else {
|
| 243 |
+
this.word(kind, kind === "using");
|
| 244 |
+
}
|
| 245 |
+
this.space();
|
| 246 |
+
let hasInits = false;
|
| 247 |
+
if (!isFor(parent)) {
|
| 248 |
+
for (const declar of node.declarations) {
|
| 249 |
+
if (declar.init) {
|
| 250 |
+
hasInits = true;
|
| 251 |
+
}
|
| 252 |
+
}
|
| 253 |
+
}
|
| 254 |
+
this.printList(node.declarations, undefined, undefined, node.declarations.length > 1, hasInits ? function (occurrenceCount) {
|
| 255 |
+
this.token(",", false, occurrenceCount);
|
| 256 |
+
this.newline();
|
| 257 |
+
} : undefined);
|
| 258 |
+
if (isFor(parent)) {
|
| 259 |
+
if (isForStatement(parent)) {
|
| 260 |
+
if (parent.init === node) return;
|
| 261 |
+
} else {
|
| 262 |
+
if (parent.left === node) return;
|
| 263 |
+
}
|
| 264 |
+
}
|
| 265 |
+
this.semicolon();
|
| 266 |
+
}
|
| 267 |
+
function VariableDeclarator(node) {
|
| 268 |
+
this.print(node.id);
|
| 269 |
+
if (node.definite) this.tokenChar(33);
|
| 270 |
+
this.print(node.id.typeAnnotation);
|
| 271 |
+
if (node.init) {
|
| 272 |
+
this.space();
|
| 273 |
+
this.tokenChar(61);
|
| 274 |
+
this.space();
|
| 275 |
+
this.print(node.init);
|
| 276 |
+
}
|
| 277 |
+
}
|
| 278 |
+
|
| 279 |
+
//# sourceMappingURL=statements.js.map
|
novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/generators/statements.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"names":["_t","require","isFor","isForStatement","isIfStatement","isStatement","WithStatement","node","word","space","token","print","object","printBlock","IfStatement","test","needsBlock","alternate","getLastStatement","consequent","newline","indent","printAndIndentOnComments","dedent","endsWith","statement","body","ForStatement","exit","enterForStatementInit","init","update","WhileStatement","ForXStatement","isForOf","type","await","noIndentInnerCommentsHere","enterForXStatementInit","left","right","ForInStatement","exports","ForOfStatement","DoWhileStatement","semicolon","printStatementAfterKeyword","printer","printTerminatorless","BreakStatement","label","ContinueStatement","ReturnStatement","argument","ThrowStatement","LabeledStatement","TryStatement","block","handlers","handler","finalizer","CatchClause","param","typeAnnotation","SwitchStatement","discriminant","printSequence","cases","undefined","addNewlines","leading","cas","length","rightBrace","SwitchCase","DebuggerStatement","VariableDeclaration","parent","declare","kind","hasInits","declar","declarations","printList","occurrenceCount","VariableDeclarator","id","definite"],"sources":["../../src/generators/statements.ts"],"sourcesContent":["import type Printer from \"../printer.ts\";\nimport {\n isFor,\n isForStatement,\n isIfStatement,\n isStatement,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\n\n// We inline this package\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as charCodes from \"charcodes\";\n\nexport function WithStatement(this: Printer, node: t.WithStatement) {\n this.word(\"with\");\n this.space();\n this.token(\"(\");\n this.print(node.object);\n this.token(\")\");\n this.printBlock(node);\n}\n\nexport function IfStatement(this: Printer, node: t.IfStatement) {\n this.word(\"if\");\n this.space();\n this.token(\"(\");\n this.print(node.test);\n this.token(\")\");\n this.space();\n\n const needsBlock =\n node.alternate && isIfStatement(getLastStatement(node.consequent));\n if (needsBlock) {\n this.token(\"{\");\n this.newline();\n this.indent();\n }\n\n this.printAndIndentOnComments(node.consequent);\n\n if (needsBlock) {\n this.dedent();\n this.newline();\n this.token(\"}\");\n }\n\n if (node.alternate) {\n if (this.endsWith(charCodes.rightCurlyBrace)) this.space();\n this.word(\"else\");\n this.space();\n this.printAndIndentOnComments(node.alternate);\n }\n}\n\n// Recursively get the last statement.\nfunction getLastStatement(statement: t.Statement): t.Statement {\n // @ts-expect-error: If statement.body is empty or not a Node, isStatement will return false\n const { body } = statement;\n if (isStatement(body) === false) {\n return statement;\n }\n\n return getLastStatement(body);\n}\n\nexport function ForStatement(this: Printer, node: t.ForStatement) {\n this.word(\"for\");\n this.space();\n this.token(\"(\");\n\n {\n const exit = this.enterForStatementInit();\n this.print(node.init);\n exit();\n }\n\n this.token(\";\");\n\n if (node.test) {\n this.space();\n this.print(node.test);\n }\n this.token(\";\", false, 1);\n\n if (node.update) {\n this.space();\n this.print(node.update);\n }\n\n this.token(\")\");\n this.printBlock(node);\n}\n\nexport function WhileStatement(this: Printer, node: t.WhileStatement) {\n this.word(\"while\");\n this.space();\n this.token(\"(\");\n this.print(node.test);\n this.token(\")\");\n this.printBlock(node);\n}\n\nfunction ForXStatement(this: Printer, node: t.ForXStatement) {\n this.word(\"for\");\n this.space();\n const isForOf = node.type === \"ForOfStatement\";\n if (isForOf && node.await) {\n this.word(\"await\");\n this.space();\n }\n this.noIndentInnerCommentsHere();\n this.token(\"(\");\n {\n const exit = this.enterForXStatementInit(isForOf);\n this.print(node.left);\n exit?.();\n }\n this.space();\n this.word(isForOf ? \"of\" : \"in\");\n this.space();\n this.print(node.right);\n this.token(\")\");\n this.printBlock(node);\n}\n\nexport const ForInStatement = ForXStatement;\nexport const ForOfStatement = ForXStatement;\n\nexport function DoWhileStatement(this: Printer, node: t.DoWhileStatement) {\n this.word(\"do\");\n this.space();\n this.print(node.body);\n this.space();\n this.word(\"while\");\n this.space();\n this.token(\"(\");\n this.print(node.test);\n this.token(\")\");\n this.semicolon();\n}\n\nfunction printStatementAfterKeyword(printer: Printer, node: t.Node) {\n if (node) {\n printer.space();\n printer.printTerminatorless(node);\n }\n\n printer.semicolon();\n}\n\nexport function BreakStatement(this: Printer, node: t.ContinueStatement) {\n this.word(\"break\");\n printStatementAfterKeyword(this, node.label);\n}\n\nexport function ContinueStatement(this: Printer, node: t.ContinueStatement) {\n this.word(\"continue\");\n printStatementAfterKeyword(this, node.label);\n}\n\nexport function ReturnStatement(this: Printer, node: t.ReturnStatement) {\n this.word(\"return\");\n printStatementAfterKeyword(this, node.argument);\n}\n\nexport function ThrowStatement(this: Printer, node: t.ThrowStatement) {\n this.word(\"throw\");\n printStatementAfterKeyword(this, node.argument);\n}\n\nexport function LabeledStatement(this: Printer, node: t.LabeledStatement) {\n this.print(node.label);\n this.token(\":\");\n this.space();\n this.print(node.body);\n}\n\nexport function TryStatement(this: Printer, node: t.TryStatement) {\n this.word(\"try\");\n this.space();\n this.print(node.block);\n this.space();\n\n // Esprima bug puts the catch clause in a `handlers` array.\n // see https://code.google.com/p/esprima/issues/detail?id=433\n // We run into this from regenerator generated ast.\n // @ts-expect-error todo(flow->ts) should ast node type be updated to support this?\n if (node.handlers) {\n // @ts-expect-error todo(flow->ts) should ast node type be updated to support this?\n this.print(node.handlers[0]);\n } else {\n this.print(node.handler);\n }\n\n if (node.finalizer) {\n this.space();\n this.word(\"finally\");\n this.space();\n this.print(node.finalizer);\n }\n}\n\nexport function CatchClause(this: Printer, node: t.CatchClause) {\n this.word(\"catch\");\n this.space();\n if (node.param) {\n this.token(\"(\");\n this.print(node.param);\n this.print(node.param.typeAnnotation);\n this.token(\")\");\n this.space();\n }\n this.print(node.body);\n}\n\nexport function SwitchStatement(this: Printer, node: t.SwitchStatement) {\n this.word(\"switch\");\n this.space();\n this.token(\"(\");\n this.print(node.discriminant);\n this.token(\")\");\n this.space();\n this.token(\"{\");\n\n this.printSequence(\n node.cases,\n true,\n undefined,\n function addNewlines(leading, cas) {\n if (!leading && node.cases[node.cases.length - 1] === cas) return -1;\n },\n );\n\n this.rightBrace(node);\n}\n\nexport function SwitchCase(this: Printer, node: t.SwitchCase) {\n if (node.test) {\n this.word(\"case\");\n this.space();\n this.print(node.test);\n this.token(\":\");\n } else {\n this.word(\"default\");\n this.token(\":\");\n }\n\n if (node.consequent.length) {\n this.newline();\n this.printSequence(node.consequent, true);\n }\n}\n\nexport function DebuggerStatement(this: Printer) {\n this.word(\"debugger\");\n this.semicolon();\n}\n\nexport function VariableDeclaration(\n this: Printer,\n node: t.VariableDeclaration,\n parent: t.Node,\n) {\n if (node.declare) {\n // TS\n this.word(\"declare\");\n this.space();\n }\n\n const { kind } = node;\n if (kind === \"await using\") {\n this.word(\"await\");\n this.space();\n this.word(\"using\", true);\n } else {\n this.word(kind, kind === \"using\");\n }\n this.space();\n\n let hasInits = false;\n // don't add whitespace to loop heads\n if (!isFor(parent)) {\n for (const declar of node.declarations) {\n if (declar.init) {\n // has an init so let's split it up over multiple lines\n hasInits = true;\n }\n }\n }\n\n //\n // use a pretty separator when we aren't in compact mode, have initializers and don't have retainLines on\n // this will format declarations like:\n //\n // let foo = \"bar\", bar = \"foo\";\n //\n // into\n //\n // let foo = \"bar\",\n // bar = \"foo\";\n //\n\n this.printList(\n node.declarations,\n undefined,\n undefined,\n node.declarations.length > 1,\n hasInits\n ? function (this: Printer, occurrenceCount: number) {\n this.token(\",\", false, occurrenceCount);\n this.newline();\n }\n : undefined,\n );\n\n if (isFor(parent)) {\n // don't give semicolons to these nodes since they'll be inserted in the parent generator\n if (isForStatement(parent)) {\n if (parent.init === node) return;\n } else {\n if (parent.left === node) return;\n }\n }\n\n this.semicolon();\n}\n\nexport function VariableDeclarator(this: Printer, node: t.VariableDeclarator) {\n this.print(node.id);\n if (node.definite) this.token(\"!\"); // TS\n // @ts-ignore(Babel 7 vs Babel 8) Property 'typeAnnotation' does not exist on type 'MemberExpression'.\n this.print(node.id.typeAnnotation);\n if (node.init) {\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.init);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,EAAA,GAAAC,OAAA;AAKsB;EAJpBC,KAAK;EACLC,cAAc;EACdC,aAAa;EACbC;AAAW,IAAAL,EAAA;AAQN,SAASM,aAAaA,CAAgBC,IAAqB,EAAE;EAClE,IAAI,CAACC,IAAI,CAAC,MAAM,CAAC;EACjB,IAAI,CAACC,KAAK,CAAC,CAAC;EACZ,IAAI,CAACC,SAAK,GAAI,CAAC;EACf,IAAI,CAACC,KAAK,CAACJ,IAAI,CAACK,MAAM,CAAC;EACvB,IAAI,CAACF,SAAK,GAAI,CAAC;EACf,IAA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AAgB9E,IAA0B,EAAE;EAC5E,IAAI,CAACI,KAAK,CAACJ,IAAI,CAAC+E,EAAE,CAAC;EACnB,IAAI/E,IAAI,CAACgF,QAAQ,EAAE,IAAI,CAAC7E,SAAK,GAAI,CAAC;EAElC,IAAI,CAACC,KAAK,CAACJ,IAAI,CAAC+E,EAAE,CAACvB,cAAc,CAAC;EAClC,IAAIxD,IAAI,CAACuB,IAAI,EAAE;IACb,IAAI,CAACrB,KAAK,CAAC,CAAC;IACZ,IAAI,CAACC,SAAK,GAAI,CAAC;IACf,IAAI,CAACD,KAAK,CAAC,CAAC;IACZ,IAAI,CAACE,KAAK,CAACJ,IAAI,CAACuB,IAAI,CAAC;EACvB;AACF","ignoreList":[]}
|
novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/generators/template-literals.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
|
| 3 |
+
Object.defineProperty(exports, "__esModule", {
|
| 4 |
+
value: true
|
| 5 |
+
});
|
| 6 |
+
exports.TaggedTemplateExpression = TaggedTemplateExpression;
|
| 7 |
+
exports.TemplateElement = TemplateElement;
|
| 8 |
+
exports.TemplateLiteral = TemplateLiteral;
|
| 9 |
+
exports._printTemplate = _printTemplate;
|
| 10 |
+
function TaggedTemplateExpression(node) {
|
| 11 |
+
this.print(node.tag);
|
| 12 |
+
{
|
| 13 |
+
this.print(node.typeParameters);
|
| 14 |
+
}
|
| 15 |
+
this.print(node.quasi);
|
| 16 |
+
}
|
| 17 |
+
function TemplateElement() {
|
| 18 |
+
throw new Error("TemplateElement printing is handled in TemplateLiteral");
|
| 19 |
+
}
|
| 20 |
+
function _printTemplate(node, substitutions) {
|
| 21 |
+
const quasis = node.quasis;
|
| 22 |
+
let partRaw = "`";
|
| 23 |
+
for (let i = 0; i < quasis.length - 1; i++) {
|
| 24 |
+
partRaw += quasis[i].value.raw;
|
| 25 |
+
this.token(partRaw + "${", true);
|
| 26 |
+
this.print(substitutions[i]);
|
| 27 |
+
partRaw = "}";
|
| 28 |
+
if (this.tokenMap) {
|
| 29 |
+
const token = this.tokenMap.findMatching(node, "}", i);
|
| 30 |
+
if (token) this._catchUpTo(token.loc.start);
|
| 31 |
+
}
|
| 32 |
+
}
|
| 33 |
+
partRaw += quasis[quasis.length - 1].value.raw;
|
| 34 |
+
this.token(partRaw + "`", true);
|
| 35 |
+
}
|
| 36 |
+
function TemplateLiteral(node) {
|
| 37 |
+
this._printTemplate(node, node.expressions);
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
//# sourceMappingURL=template-literals.js.map
|
novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/generators/template-literals.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"names":["TaggedTemplateExpression","node","print","tag","typeParameters","quasi","TemplateElement","Error","_printTemplate","substitutions","quasis","partRaw","i","length","value","raw","token","tokenMap","findMatching","_catchUpTo","loc","start","TemplateLiteral","expressions"],"sources":["../../src/generators/template-literals.ts"],"sourcesContent":["import type Printer from \"../printer.ts\";\nimport type * as t from \"@babel/types\";\n\nexport function TaggedTemplateExpression(\n this: Printer,\n node: t.TaggedTemplateExpression,\n) {\n this.print(node.tag);\n if (process.env.BABEL_8_BREAKING) {\n // @ts-ignore(Babel 7 vs Babel 8) Babel 8 AST\n this.print(node.typeArguments);\n } else {\n // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST\n this.print(node.typeParameters);\n }\n this.print(node.quasi);\n}\n\nexport function TemplateElement(this: Printer) {\n throw new Error(\"TemplateElement printing is handled in TemplateLiteral\");\n}\n\nexport type TemplateLiteralBase = t.Node & {\n quasis: t.TemplateElement[];\n};\n\nexport function _printTemplate<T extends t.Node>(\n this: Printer,\n node: TemplateLiteralBase,\n substitutions: T[],\n) {\n const quasis = node.quasis;\n let partRaw = \"`\";\n for (let i = 0; i < quasis.length - 1; i++) {\n partRaw += quasis[i].value.raw;\n this.token(partRaw + \"${\", true);\n this.print(substitutions[i]);\n partRaw = \"}\";\n\n // In Babel 7 we have individual tokens for ${ and }, so the automatic\n // catchup logic does not work. Manually look for those tokens.\n if (!process.env.BABEL_8_BREAKING && this.tokenMap) {\n const token = this.tokenMap.findMatching(node, \"}\", i);\n if (token) this._catchUpTo(token.loc.start);\n }\n }\n partRaw += quasis[quasis.length - 1].value.raw;\n this.token(partRaw + \"`\", true);\n}\n\nexport function TemplateLiteral(this: Printer, node: t.TemplateLiteral) {\n this._printTemplate(node, node.expressions);\n}\n"],"mappings":";;;;;;;;;AAGO,SAASA,wBAAwBA,CAEtCC,IAAgC,EAChC;EACA,IAAI,CAACC,KAAK,CAACD,IAAI,CAACE,GAAG,CAAC;EAIb;IAEL,IAAI,CAACD,KAAK,CAACD,IAAI,CAACG,cAAc,CAAC;EACjC;EACA,IAAI,CAACF,KAAK,CAACD,IAAI,CAACI,KAAK,CAAC;AACxB;AAEO,SAASC,eAAeA,CAAA,EAAgB;EAC7C,MAAM,IAAIC,KAAK,CAAC,wDAAwD,CAAC;AAC3E;AAMO,SAASC,cAAcA,CAE5BP,IAAyB,EACzBQ,aAAkB,EAClB;EACA,MAAMC,MAAM,GAAGT,IAAI,CAACS,MAAM;EAC1B,IAAIC,OAAO,GAAG,GAAG;EACjB,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGF,MAAM,CAACG,MAAM,GAAG,CAAC,EAAED,CAAC,EAAE,EAAE;IAC1CD,OAAO,IAAID,MAAM,CAACE,CAAC,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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
|
| 3 |
+
Object.defineProperty(exports, "__esModule", {
|
| 4 |
+
value: true
|
| 5 |
+
});
|
| 6 |
+
exports.ArgumentPlaceholder = ArgumentPlaceholder;
|
| 7 |
+
exports.ArrayPattern = exports.ArrayExpression = ArrayExpression;
|
| 8 |
+
exports.BigIntLiteral = BigIntLiteral;
|
| 9 |
+
exports.BooleanLiteral = BooleanLiteral;
|
| 10 |
+
exports.Identifier = Identifier;
|
| 11 |
+
exports.NullLiteral = NullLiteral;
|
| 12 |
+
exports.NumericLiteral = NumericLiteral;
|
| 13 |
+
exports.ObjectPattern = exports.ObjectExpression = ObjectExpression;
|
| 14 |
+
exports.ObjectMethod = ObjectMethod;
|
| 15 |
+
exports.ObjectProperty = ObjectProperty;
|
| 16 |
+
exports.PipelineBareFunction = PipelineBareFunction;
|
| 17 |
+
exports.PipelinePrimaryTopicReference = PipelinePrimaryTopicReference;
|
| 18 |
+
exports.PipelineTopicExpression = PipelineTopicExpression;
|
| 19 |
+
exports.RecordExpression = RecordExpression;
|
| 20 |
+
exports.RegExpLiteral = RegExpLiteral;
|
| 21 |
+
exports.SpreadElement = exports.RestElement = RestElement;
|
| 22 |
+
exports.StringLiteral = StringLiteral;
|
| 23 |
+
exports.TopicReference = TopicReference;
|
| 24 |
+
exports.TupleExpression = TupleExpression;
|
| 25 |
+
exports.VoidPattern = VoidPattern;
|
| 26 |
+
exports._getRawIdentifier = _getRawIdentifier;
|
| 27 |
+
var _t = require("@babel/types");
|
| 28 |
+
var _jsesc = require("jsesc");
|
| 29 |
+
const {
|
| 30 |
+
isAssignmentPattern,
|
| 31 |
+
isIdentifier
|
| 32 |
+
} = _t;
|
| 33 |
+
let lastRawIdentNode = null;
|
| 34 |
+
let lastRawIdentResult = "";
|
| 35 |
+
function _getRawIdentifier(node) {
|
| 36 |
+
if (node === lastRawIdentNode) return lastRawIdentResult;
|
| 37 |
+
lastRawIdentNode = node;
|
| 38 |
+
const {
|
| 39 |
+
name
|
| 40 |
+
} = node;
|
| 41 |
+
const token = this.tokenMap.find(node, tok => tok.value === name);
|
| 42 |
+
if (token) {
|
| 43 |
+
lastRawIdentResult = this._originalCode.slice(token.start, token.end);
|
| 44 |
+
return lastRawIdentResult;
|
| 45 |
+
}
|
| 46 |
+
return lastRawIdentResult = node.name;
|
| 47 |
+
}
|
| 48 |
+
function Identifier(node) {
|
| 49 |
+
var _node$loc;
|
| 50 |
+
this.sourceIdentifierName(((_node$loc = node.loc) == null ? void 0 : _node$loc.identifierName) || node.name);
|
| 51 |
+
this.word(this.tokenMap ? this._getRawIdentifier(node) : node.name);
|
| 52 |
+
}
|
| 53 |
+
function ArgumentPlaceholder() {
|
| 54 |
+
this.tokenChar(63);
|
| 55 |
+
}
|
| 56 |
+
function RestElement(node) {
|
| 57 |
+
this.token("...");
|
| 58 |
+
this.print(node.argument);
|
| 59 |
+
}
|
| 60 |
+
function ObjectExpression(node) {
|
| 61 |
+
const props = node.properties;
|
| 62 |
+
this.tokenChar(123);
|
| 63 |
+
if (props.length) {
|
| 64 |
+
const exit = this.enterDelimited();
|
| 65 |
+
this.space();
|
| 66 |
+
this.printList(props, this.shouldPrintTrailingComma("}"), true, true);
|
| 67 |
+
this.space();
|
| 68 |
+
exit();
|
| 69 |
+
}
|
| 70 |
+
this.sourceWithOffset("end", node.loc, -1);
|
| 71 |
+
this.tokenChar(125);
|
| 72 |
+
}
|
| 73 |
+
function ObjectMethod(node) {
|
| 74 |
+
this.printJoin(node.decorators);
|
| 75 |
+
this._methodHead(node);
|
| 76 |
+
this.space();
|
| 77 |
+
this.print(node.body);
|
| 78 |
+
}
|
| 79 |
+
function ObjectProperty(node) {
|
| 80 |
+
this.printJoin(node.decorators);
|
| 81 |
+
if (node.computed) {
|
| 82 |
+
this.tokenChar(91);
|
| 83 |
+
this.print(node.key);
|
| 84 |
+
this.tokenChar(93);
|
| 85 |
+
} else {
|
| 86 |
+
if (isAssignmentPattern(node.value) && isIdentifier(node.key) && node.key.name === node.value.left.name) {
|
| 87 |
+
this.print(node.value);
|
| 88 |
+
return;
|
| 89 |
+
}
|
| 90 |
+
this.print(node.key);
|
| 91 |
+
if (node.shorthand && isIdentifier(node.key) && isIdentifier(node.value) && node.key.name === node.value.name) {
|
| 92 |
+
return;
|
| 93 |
+
}
|
| 94 |
+
}
|
| 95 |
+
this.tokenChar(58);
|
| 96 |
+
this.space();
|
| 97 |
+
this.print(node.value);
|
| 98 |
+
}
|
| 99 |
+
function ArrayExpression(node) {
|
| 100 |
+
const elems = node.elements;
|
| 101 |
+
const len = elems.length;
|
| 102 |
+
this.tokenChar(91);
|
| 103 |
+
const exit = this.enterDelimited();
|
| 104 |
+
for (let i = 0; i < elems.length; i++) {
|
| 105 |
+
const elem = elems[i];
|
| 106 |
+
if (elem) {
|
| 107 |
+
if (i > 0) this.space();
|
| 108 |
+
this.print(elem);
|
| 109 |
+
if (i < len - 1 || this.shouldPrintTrailingComma("]")) {
|
| 110 |
+
this.token(",", false, i);
|
| 111 |
+
}
|
| 112 |
+
} else {
|
| 113 |
+
this.token(",", false, i);
|
| 114 |
+
}
|
| 115 |
+
}
|
| 116 |
+
exit();
|
| 117 |
+
this.tokenChar(93);
|
| 118 |
+
}
|
| 119 |
+
function RecordExpression(node) {
|
| 120 |
+
const props = node.properties;
|
| 121 |
+
let startToken;
|
| 122 |
+
let endToken;
|
| 123 |
+
{
|
| 124 |
+
if (this.format.recordAndTupleSyntaxType === "bar") {
|
| 125 |
+
startToken = "{|";
|
| 126 |
+
endToken = "|}";
|
| 127 |
+
} else if (this.format.recordAndTupleSyntaxType !== "hash" && this.format.recordAndTupleSyntaxType != null) {
|
| 128 |
+
throw new Error(`The "recordAndTupleSyntaxType" generator option must be "bar" or "hash" (${JSON.stringify(this.format.recordAndTupleSyntaxType)} received).`);
|
| 129 |
+
} else {
|
| 130 |
+
startToken = "#{";
|
| 131 |
+
endToken = "}";
|
| 132 |
+
}
|
| 133 |
+
}
|
| 134 |
+
this.token(startToken);
|
| 135 |
+
if (props.length) {
|
| 136 |
+
this.space();
|
| 137 |
+
this.printList(props, this.shouldPrintTrailingComma(endToken), true, true);
|
| 138 |
+
this.space();
|
| 139 |
+
}
|
| 140 |
+
this.token(endToken);
|
| 141 |
+
}
|
| 142 |
+
function TupleExpression(node) {
|
| 143 |
+
const elems = node.elements;
|
| 144 |
+
const len = elems.length;
|
| 145 |
+
let startToken;
|
| 146 |
+
let endToken;
|
| 147 |
+
{
|
| 148 |
+
if (this.format.recordAndTupleSyntaxType === "bar") {
|
| 149 |
+
startToken = "[|";
|
| 150 |
+
endToken = "|]";
|
| 151 |
+
} else if (this.format.recordAndTupleSyntaxType === "hash") {
|
| 152 |
+
startToken = "#[";
|
| 153 |
+
endToken = "]";
|
| 154 |
+
} else {
|
| 155 |
+
throw new Error(`${this.format.recordAndTupleSyntaxType} is not a valid recordAndTuple syntax type`);
|
| 156 |
+
}
|
| 157 |
+
}
|
| 158 |
+
this.token(startToken);
|
| 159 |
+
for (let i = 0; i < elems.length; i++) {
|
| 160 |
+
const elem = elems[i];
|
| 161 |
+
if (elem) {
|
| 162 |
+
if (i > 0) this.space();
|
| 163 |
+
this.print(elem);
|
| 164 |
+
if (i < len - 1 || this.shouldPrintTrailingComma(endToken)) {
|
| 165 |
+
this.token(",", false, i);
|
| 166 |
+
}
|
| 167 |
+
}
|
| 168 |
+
}
|
| 169 |
+
this.token(endToken);
|
| 170 |
+
}
|
| 171 |
+
function RegExpLiteral(node) {
|
| 172 |
+
this.word(`/${node.pattern}/${node.flags}`);
|
| 173 |
+
}
|
| 174 |
+
function BooleanLiteral(node) {
|
| 175 |
+
this.word(node.value ? "true" : "false");
|
| 176 |
+
}
|
| 177 |
+
function NullLiteral() {
|
| 178 |
+
this.word("null");
|
| 179 |
+
}
|
| 180 |
+
function NumericLiteral(node) {
|
| 181 |
+
const raw = this.getPossibleRaw(node);
|
| 182 |
+
const opts = this.format.jsescOption;
|
| 183 |
+
const value = node.value;
|
| 184 |
+
const str = value + "";
|
| 185 |
+
if (opts.numbers) {
|
| 186 |
+
this.number(_jsesc(value, opts), value);
|
| 187 |
+
} else if (raw == null) {
|
| 188 |
+
this.number(str, value);
|
| 189 |
+
} else if (this.format.minified) {
|
| 190 |
+
this.number(raw.length < str.length ? raw : str, value);
|
| 191 |
+
} else {
|
| 192 |
+
this.number(raw, value);
|
| 193 |
+
}
|
| 194 |
+
}
|
| 195 |
+
function StringLiteral(node) {
|
| 196 |
+
const raw = this.getPossibleRaw(node);
|
| 197 |
+
if (!this.format.minified && raw !== undefined) {
|
| 198 |
+
this.token(raw);
|
| 199 |
+
return;
|
| 200 |
+
}
|
| 201 |
+
const val = _jsesc(node.value, this.format.jsescOption);
|
| 202 |
+
this.token(val);
|
| 203 |
+
}
|
| 204 |
+
function BigIntLiteral(node) {
|
| 205 |
+
const raw = this.getPossibleRaw(node);
|
| 206 |
+
if (!this.format.minified && raw !== undefined) {
|
| 207 |
+
this.word(raw);
|
| 208 |
+
return;
|
| 209 |
+
}
|
| 210 |
+
this.word(node.value + "n");
|
| 211 |
+
}
|
| 212 |
+
const validTopicTokenSet = new Set(["^^", "@@", "^", "%", "#"]);
|
| 213 |
+
function TopicReference() {
|
| 214 |
+
const {
|
| 215 |
+
topicToken
|
| 216 |
+
} = this.format;
|
| 217 |
+
if (validTopicTokenSet.has(topicToken)) {
|
| 218 |
+
this.token(topicToken);
|
| 219 |
+
} else {
|
| 220 |
+
const givenTopicTokenJSON = JSON.stringify(topicToken);
|
| 221 |
+
const validTopics = Array.from(validTopicTokenSet, v => JSON.stringify(v));
|
| 222 |
+
throw new Error(`The "topicToken" generator option must be one of ` + `${validTopics.join(", ")} (${givenTopicTokenJSON} received instead).`);
|
| 223 |
+
}
|
| 224 |
+
}
|
| 225 |
+
function PipelineTopicExpression(node) {
|
| 226 |
+
this.print(node.expression);
|
| 227 |
+
}
|
| 228 |
+
function PipelineBareFunction(node) {
|
| 229 |
+
this.print(node.callee);
|
| 230 |
+
}
|
| 231 |
+
function PipelinePrimaryTopicReference() {
|
| 232 |
+
this.tokenChar(35);
|
| 233 |
+
}
|
| 234 |
+
function VoidPattern() {
|
| 235 |
+
this.word("void");
|
| 236 |
+
}
|
| 237 |
+
|
| 238 |
+
//# sourceMappingURL=types.js.map
|
novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/generators/types.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"names":["_t","require","_jsesc","isAssignmentPattern","isIdentifier","lastRawIdentNode","lastRawIdentResult","_getRawIdentifier","node","name","token","tokenMap","find","tok","value","_originalCode","slice","start","end","Identifier","_node$loc","sourceIdentifierName","loc","identifierName","word","ArgumentPlaceholder","RestElement","print","argument","ObjectExpression","props","properties","length","exit","enterDelimited","space","printList","shouldPrintTrailingComma","sourceWithOffset","ObjectMethod","printJoin","decorators","_methodHead","body","ObjectProperty","computed","key","left","shorthand","ArrayExpression","elems","elements","len","i","elem","RecordExpression","startToken","endToken","format","recordAndTupleSyntaxType","Error","JSON","stringify","TupleExpression","RegExpLiteral","pattern","flags","BooleanLiteral","NullLiteral","NumericLiteral","raw","getPossibleRaw","opts","jsescOption","str","numbers","number","jsesc","minified","StringLiteral","undefined","val","BigIntLiteral","validTopicTokenSet","Set","TopicReference","topicToken","has","givenTopicTokenJSON","validTopics","Array","from","v","join","PipelineTopicExpression","expression","PipelineBareFunction","callee","PipelinePrimaryTopicReference","VoidPattern"],"sources":["../../src/generators/types.ts"],"sourcesContent":["import type Printer from \"../printer.ts\";\nimport { isAssignmentPattern, isIdentifier } from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport jsesc from \"jsesc\";\n\nlet lastRawIdentNode: t.Identifier | null = null;\nlet lastRawIdentResult: string = \"\";\nexport function _getRawIdentifier(this: Printer, node: t.Identifier) {\n if (node === lastRawIdentNode) return lastRawIdentResult;\n lastRawIdentNode = node;\n\n const { name } = node;\n const token = this.tokenMap.find(node, tok => tok.value === name);\n if (token) {\n lastRawIdentResult = this._originalCode.slice(token.start, token.end);\n return lastRawIdentResult;\n }\n return (lastRawIdentResult = node.name);\n}\n\nexport function Identifier(this: Printer, node: t.Identifier) {\n this.sourceIdentifierName(node.loc?.identifierName || node.name);\n\n this.word(this.tokenMap ? this._getRawIdentifier(node) : node.name);\n}\n\nexport function ArgumentPlaceholder(this: Printer) {\n this.token(\"?\");\n}\n\nexport function RestElement(this: Printer, node: t.RestElement) {\n this.token(\"...\");\n this.print(node.argument);\n}\n\nexport { RestElement as SpreadElement };\n\nexport function ObjectExpression(this: Printer, node: t.ObjectExpression) {\n const props = node.properties;\n\n this.token(\"{\");\n\n if (props.length) {\n const exit = this.enterDelimited();\n this.space();\n this.printList(props, this.shouldPrintTrailingComma(\"}\"), true, true);\n this.space();\n exit();\n }\n\n this.sourceWithOffset(\"end\", node.loc, -1);\n\n this.token(\"}\");\n}\n\nexport { ObjectExpression as ObjectPattern };\n\nexport function ObjectMethod(this: Printer, node: t.ObjectMethod) {\n this.printJoin(node.decorators);\n this._methodHead(node);\n this.space();\n this.print(node.body);\n}\n\nexport function ObjectProperty(this: Printer, node: t.ObjectProperty) {\n this.printJoin(node.decorators);\n\n if (node.computed) {\n this.token(\"[\");\n this.print(node.key);\n this.token(\"]\");\n } else {\n // print `({ foo: foo = 5 } = {})` as `({ foo = 5 } = {});`\n if (\n isAssignmentPattern(node.value) &&\n isIdentifier(node.key) &&\n // @ts-expect-error todo(flow->ts) `.name` does not exist on some types in union\n node.key.name === node.value.left.name\n ) {\n this.print(node.value);\n return;\n }\n\n this.print(node.key);\n\n // shorthand!\n if (\n node.shorthand &&\n isIdentifier(node.key) &&\n isIdentifier(node.value) &&\n node.key.name === node.value.name\n ) {\n return;\n }\n }\n\n this.token(\":\");\n this.space();\n this.print(node.value);\n}\n\nexport function ArrayExpression(this: Printer, node: t.ArrayExpression) {\n const elems = node.elements;\n const len = elems.length;\n\n this.token(\"[\");\n\n const exit = this.enterDelimited();\n\n for (let i = 0; i < elems.length; i++) {\n const elem = elems[i];\n if (elem) {\n if (i > 0) this.space();\n this.print(elem);\n if (i < len - 1 || this.shouldPrintTrailingComma(\"]\")) {\n this.token(\",\", false, i);\n }\n } else {\n // If the array expression ends with a hole, that hole\n // will be ignored by the interpreter, but if it ends with\n // two (or more) holes, we need to write out two (or more)\n // commas so that the resulting code is interpreted with\n // both (all) of the holes.\n this.token(\",\", false, i);\n }\n }\n\n exit();\n\n this.token(\"]\");\n}\n\nexport { ArrayExpression as ArrayPattern };\n\nexport function RecordExpression(this: Printer, node: t.RecordExpression) {\n const props = node.properties;\n\n let startToken;\n let endToken;\n if (process.env.BABEL_8_BREAKING) {\n startToken = \"#{\";\n endToken = \"}\";\n } else {\n if (this.format.recordAndTupleSyntaxType === \"bar\") {\n startToken = \"{|\";\n endToken = \"|}\";\n } else if (\n this.format.recordAndTupleSyntaxType !== \"hash\" &&\n this.format.recordAndTupleSyntaxType != null\n ) {\n throw new Error(\n `The \"recordAndTupleSyntaxType\" generator option must be \"bar\" or \"hash\" (${JSON.stringify(\n this.format.recordAndTupleSyntaxType,\n )} received).`,\n );\n } else {\n startToken = \"#{\";\n endToken = \"}\";\n }\n }\n\n this.token(startToken);\n\n if (props.length) {\n this.space();\n this.printList(props, this.shouldPrintTrailingComma(endToken), true, true);\n this.space();\n }\n this.token(endToken);\n}\n\nexport function TupleExpression(this: Printer, node: t.TupleExpression) {\n const elems = node.elements;\n const len = elems.length;\n\n let startToken;\n let endToken;\n if (process.env.BABEL_8_BREAKING) {\n startToken = \"#[\";\n endToken = \"]\";\n } else {\n if (this.format.recordAndTupleSyntaxType === \"bar\") {\n startToken = \"[|\";\n endToken = \"|]\";\n } else if (this.format.recordAndTupleSyntaxType === \"hash\") {\n startToken = \"#[\";\n endToken = \"]\";\n } else {\n throw new Error(\n `${this.format.recordAndTupleSyntaxType} is not a valid recordAndTuple syntax type`,\n );\n }\n }\n\n this.token(startToken);\n\n for (let i = 0; i < elems.length; i++) {\n const elem = elems[i];\n if (elem) {\n if (i > 0) this.space();\n this.print(elem);\n if (i < len - 1 || this.shouldPrintTrailingComma(endToken)) {\n this.token(\",\", false, i);\n }\n }\n }\n\n this.token(endToken);\n}\n\nexport function RegExpLiteral(this: Printer, node: t.RegExpLiteral) {\n this.word(`/${node.pattern}/${node.flags}`);\n}\n\nexport function BooleanLiteral(this: Printer, node: t.BooleanLiteral) {\n this.word(node.value ? \"true\" : \"false\");\n}\n\nexport function NullLiteral(this: Printer) {\n this.word(\"null\");\n}\n\nexport function NumericLiteral(this: Printer, node: t.NumericLiteral) {\n const raw = this.getPossibleRaw(node);\n const opts = this.format.jsescOption;\n const value = node.value;\n const str = value + \"\";\n if (opts.numbers) {\n this.number(jsesc(value, opts), value);\n } else if (raw == null) {\n this.number(str, value); // normalize\n } else if (this.format.minified) {\n this.number(raw.length < str.length ? raw : str, value);\n } else {\n this.number(raw, value);\n }\n}\n\nexport function StringLiteral(this: Printer, node: t.StringLiteral) {\n const raw = this.getPossibleRaw(node);\n if (!this.format.minified && raw !== undefined) {\n this.token(raw);\n return;\n }\n\n const val = jsesc(node.value, this.format.jsescOption);\n\n this.token(val);\n}\n\nexport function BigIntLiteral(this: Printer, node: t.BigIntLiteral) {\n const raw = this.getPossibleRaw(node);\n if (!this.format.minified && raw !== undefined) {\n this.word(raw);\n return;\n }\n this.word(node.value + \"n\");\n}\n\n// Hack pipe operator\nconst validTopicTokenSet = new Set([\"^^\", \"@@\", \"^\", \"%\", \"#\"]);\nexport function TopicReference(this: Printer) {\n const { topicToken } = this.format;\n\n if (validTopicTokenSet.has(topicToken)) {\n this.token(topicToken);\n } else {\n const givenTopicTokenJSON = JSON.stringify(topicToken);\n const validTopics = Array.from(validTopicTokenSet, v => JSON.stringify(v));\n throw new Error(\n `The \"topicToken\" generator option must be one of ` +\n `${validTopics.join(\", \")} (${givenTopicTokenJSON} received instead).`,\n );\n }\n}\n\n// Smart-mix pipe operator\nexport function PipelineTopicExpression(\n this: Printer,\n node: t.PipelineTopicExpression,\n) {\n this.print(node.expression);\n}\n\nexport function PipelineBareFunction(\n this: Printer,\n node: t.PipelineBareFunction,\n) {\n this.print(node.callee);\n}\n\nexport function PipelinePrimaryTopicReference(this: Printer) {\n this.token(\"#\");\n}\n\n// discard binding\nexport function VoidPattern(this: Printer) {\n this.word(\"void\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,EAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAA0B;EAFjBE,mBAAmB;EAAEC;AAAY,IAAAJ,EAAA;AAI1C,IAAIK,gBAAqC,GAAG,IAAI;AAChD,IAAIC,kBAA0B,GAAG,EAAE;AAC5B,SAASC,iBAAiBA,CAAgBC,IAAkB,EAAE;EACnE,IAAIA,IAAI,KAAKH,gBAAgB,EAAE,OAAOC,kBAAkB;EACxDD,gBAAgB,GAAGG,IAAI;EAEvB,MAAM;IAAEC;EAAK,CAAC,GAAGD,IAAI;EACrB,MAAME,KAAK,GAAG,IAAI,CAACC,QAAQ,CAACC,IAAI,CAACJ,IAAI,EAAEK,GAAG,IAAIA,GAAG,CAACC,KAAK,KAAKL,IAAI,CAAC;EACjE,IAAIC,KAAK,EAAE;IACTJ,kBAAkB,GAAG,IAAI,CAACS,aAAa,CAACC,KAAK,CAACN,KAAK,CAACO,KAAK,EAAEP,KAAK,CAACQ,GAAG,CAAC;IACrE,OAAOZ,kBAAkB;EAC3B;EACA,OAAQA,kBAAkB,GAAGE,IAAI,CAACC,IAAI;AACxC;AAEO,SAASU,UAAUA,CAAgBX,IAAkB,EAAE;EAAA,IAAAY,SAAA;EAC5D,IAAI,CAACC,oBAAoB,CAAC,EAAAD,SAAA,GAAAZ,IAAI,CAACc,GAAG,qBAARF,SAAA,CAAUG,cAAc,KAAIf,IAAI,CAACC,IAAI,CAAC;EAEhE,IAAI,CAACe,IAAI,CAAC,IAAI,CAACb,QAAQ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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
|
| 3 |
+
Object.defineProperty(exports, "__esModule", {
|
| 4 |
+
value: true
|
| 5 |
+
});
|
| 6 |
+
exports.TSAnyKeyword = TSAnyKeyword;
|
| 7 |
+
exports.TSArrayType = TSArrayType;
|
| 8 |
+
exports.TSSatisfiesExpression = exports.TSAsExpression = TSTypeExpression;
|
| 9 |
+
exports.TSBigIntKeyword = TSBigIntKeyword;
|
| 10 |
+
exports.TSBooleanKeyword = TSBooleanKeyword;
|
| 11 |
+
exports.TSCallSignatureDeclaration = TSCallSignatureDeclaration;
|
| 12 |
+
exports.TSInterfaceHeritage = exports.TSClassImplements = TSClassImplements;
|
| 13 |
+
exports.TSConditionalType = TSConditionalType;
|
| 14 |
+
exports.TSConstructSignatureDeclaration = TSConstructSignatureDeclaration;
|
| 15 |
+
exports.TSConstructorType = TSConstructorType;
|
| 16 |
+
exports.TSDeclareFunction = TSDeclareFunction;
|
| 17 |
+
exports.TSDeclareMethod = TSDeclareMethod;
|
| 18 |
+
exports.TSEnumBody = TSEnumBody;
|
| 19 |
+
exports.TSEnumDeclaration = TSEnumDeclaration;
|
| 20 |
+
exports.TSEnumMember = TSEnumMember;
|
| 21 |
+
exports.TSExportAssignment = TSExportAssignment;
|
| 22 |
+
exports.TSExternalModuleReference = TSExternalModuleReference;
|
| 23 |
+
exports.TSFunctionType = TSFunctionType;
|
| 24 |
+
exports.TSImportEqualsDeclaration = TSImportEqualsDeclaration;
|
| 25 |
+
exports.TSImportType = TSImportType;
|
| 26 |
+
exports.TSIndexSignature = TSIndexSignature;
|
| 27 |
+
exports.TSIndexedAccessType = TSIndexedAccessType;
|
| 28 |
+
exports.TSInferType = TSInferType;
|
| 29 |
+
exports.TSInstantiationExpression = TSInstantiationExpression;
|
| 30 |
+
exports.TSInterfaceBody = TSInterfaceBody;
|
| 31 |
+
exports.TSInterfaceDeclaration = TSInterfaceDeclaration;
|
| 32 |
+
exports.TSIntersectionType = TSIntersectionType;
|
| 33 |
+
exports.TSIntrinsicKeyword = TSIntrinsicKeyword;
|
| 34 |
+
exports.TSLiteralType = TSLiteralType;
|
| 35 |
+
exports.TSMappedType = TSMappedType;
|
| 36 |
+
exports.TSMethodSignature = TSMethodSignature;
|
| 37 |
+
exports.TSModuleBlock = TSModuleBlock;
|
| 38 |
+
exports.TSModuleDeclaration = TSModuleDeclaration;
|
| 39 |
+
exports.TSNamedTupleMember = TSNamedTupleMember;
|
| 40 |
+
exports.TSNamespaceExportDeclaration = TSNamespaceExportDeclaration;
|
| 41 |
+
exports.TSNeverKeyword = TSNeverKeyword;
|
| 42 |
+
exports.TSNonNullExpression = TSNonNullExpression;
|
| 43 |
+
exports.TSNullKeyword = TSNullKeyword;
|
| 44 |
+
exports.TSNumberKeyword = TSNumberKeyword;
|
| 45 |
+
exports.TSObjectKeyword = TSObjectKeyword;
|
| 46 |
+
exports.TSOptionalType = TSOptionalType;
|
| 47 |
+
exports.TSParameterProperty = TSParameterProperty;
|
| 48 |
+
exports.TSParenthesizedType = TSParenthesizedType;
|
| 49 |
+
exports.TSPropertySignature = TSPropertySignature;
|
| 50 |
+
exports.TSQualifiedName = TSQualifiedName;
|
| 51 |
+
exports.TSRestType = TSRestType;
|
| 52 |
+
exports.TSStringKeyword = TSStringKeyword;
|
| 53 |
+
exports.TSSymbolKeyword = TSSymbolKeyword;
|
| 54 |
+
exports.TSTemplateLiteralType = TSTemplateLiteralType;
|
| 55 |
+
exports.TSThisType = TSThisType;
|
| 56 |
+
exports.TSTupleType = TSTupleType;
|
| 57 |
+
exports.TSTypeAliasDeclaration = TSTypeAliasDeclaration;
|
| 58 |
+
exports.TSTypeAnnotation = TSTypeAnnotation;
|
| 59 |
+
exports.TSTypeAssertion = TSTypeAssertion;
|
| 60 |
+
exports.TSTypeLiteral = TSTypeLiteral;
|
| 61 |
+
exports.TSTypeOperator = TSTypeOperator;
|
| 62 |
+
exports.TSTypeParameter = TSTypeParameter;
|
| 63 |
+
exports.TSTypeParameterDeclaration = exports.TSTypeParameterInstantiation = TSTypeParameterInstantiation;
|
| 64 |
+
exports.TSTypePredicate = TSTypePredicate;
|
| 65 |
+
exports.TSTypeQuery = TSTypeQuery;
|
| 66 |
+
exports.TSTypeReference = TSTypeReference;
|
| 67 |
+
exports.TSUndefinedKeyword = TSUndefinedKeyword;
|
| 68 |
+
exports.TSUnionType = TSUnionType;
|
| 69 |
+
exports.TSUnknownKeyword = TSUnknownKeyword;
|
| 70 |
+
exports.TSVoidKeyword = TSVoidKeyword;
|
| 71 |
+
exports.tsPrintClassMemberModifiers = tsPrintClassMemberModifiers;
|
| 72 |
+
exports.tsPrintFunctionOrConstructorType = tsPrintFunctionOrConstructorType;
|
| 73 |
+
exports.tsPrintPropertyOrMethodName = tsPrintPropertyOrMethodName;
|
| 74 |
+
exports.tsPrintSignatureDeclarationBase = tsPrintSignatureDeclarationBase;
|
| 75 |
+
function TSTypeAnnotation(node, parent) {
|
| 76 |
+
this.token((parent.type === "TSFunctionType" || parent.type === "TSConstructorType") && parent.typeAnnotation === node ? "=>" : ":");
|
| 77 |
+
this.space();
|
| 78 |
+
if (node.optional) this.tokenChar(63);
|
| 79 |
+
this.print(node.typeAnnotation);
|
| 80 |
+
}
|
| 81 |
+
function TSTypeParameterInstantiation(node, parent) {
|
| 82 |
+
this.tokenChar(60);
|
| 83 |
+
let printTrailingSeparator = parent.type === "ArrowFunctionExpression" && node.params.length === 1;
|
| 84 |
+
if (this.tokenMap && node.start != null && node.end != null) {
|
| 85 |
+
printTrailingSeparator && (printTrailingSeparator = !!this.tokenMap.find(node, t => this.tokenMap.matchesOriginal(t, ",")));
|
| 86 |
+
printTrailingSeparator || (printTrailingSeparator = this.shouldPrintTrailingComma(">"));
|
| 87 |
+
}
|
| 88 |
+
this.printList(node.params, printTrailingSeparator);
|
| 89 |
+
this.tokenChar(62);
|
| 90 |
+
}
|
| 91 |
+
function TSTypeParameter(node) {
|
| 92 |
+
if (node.const) {
|
| 93 |
+
this.word("const");
|
| 94 |
+
this.space();
|
| 95 |
+
}
|
| 96 |
+
if (node.in) {
|
| 97 |
+
this.word("in");
|
| 98 |
+
this.space();
|
| 99 |
+
}
|
| 100 |
+
if (node.out) {
|
| 101 |
+
this.word("out");
|
| 102 |
+
this.space();
|
| 103 |
+
}
|
| 104 |
+
this.word(node.name);
|
| 105 |
+
if (node.constraint) {
|
| 106 |
+
this.space();
|
| 107 |
+
this.word("extends");
|
| 108 |
+
this.space();
|
| 109 |
+
this.print(node.constraint);
|
| 110 |
+
}
|
| 111 |
+
if (node.default) {
|
| 112 |
+
this.space();
|
| 113 |
+
this.tokenChar(61);
|
| 114 |
+
this.space();
|
| 115 |
+
this.print(node.default);
|
| 116 |
+
}
|
| 117 |
+
}
|
| 118 |
+
function TSParameterProperty(node) {
|
| 119 |
+
if (node.accessibility) {
|
| 120 |
+
this.word(node.accessibility);
|
| 121 |
+
this.space();
|
| 122 |
+
}
|
| 123 |
+
if (node.readonly) {
|
| 124 |
+
this.word("readonly");
|
| 125 |
+
this.space();
|
| 126 |
+
}
|
| 127 |
+
this._param(node.parameter);
|
| 128 |
+
}
|
| 129 |
+
function TSDeclareFunction(node, parent) {
|
| 130 |
+
if (node.declare) {
|
| 131 |
+
this.word("declare");
|
| 132 |
+
this.space();
|
| 133 |
+
}
|
| 134 |
+
this._functionHead(node, parent);
|
| 135 |
+
this.semicolon();
|
| 136 |
+
}
|
| 137 |
+
function TSDeclareMethod(node) {
|
| 138 |
+
this._classMethodHead(node);
|
| 139 |
+
this.semicolon();
|
| 140 |
+
}
|
| 141 |
+
function TSQualifiedName(node) {
|
| 142 |
+
this.print(node.left);
|
| 143 |
+
this.tokenChar(46);
|
| 144 |
+
this.print(node.right);
|
| 145 |
+
}
|
| 146 |
+
function TSCallSignatureDeclaration(node) {
|
| 147 |
+
this.tsPrintSignatureDeclarationBase(node);
|
| 148 |
+
maybePrintTrailingCommaOrSemicolon(this, node);
|
| 149 |
+
}
|
| 150 |
+
function maybePrintTrailingCommaOrSemicolon(printer, node) {
|
| 151 |
+
if (!printer.tokenMap || !node.start || !node.end) {
|
| 152 |
+
printer.semicolon();
|
| 153 |
+
return;
|
| 154 |
+
}
|
| 155 |
+
if (printer.tokenMap.endMatches(node, ",")) {
|
| 156 |
+
printer.token(",");
|
| 157 |
+
} else if (printer.tokenMap.endMatches(node, ";")) {
|
| 158 |
+
printer.semicolon();
|
| 159 |
+
}
|
| 160 |
+
}
|
| 161 |
+
function TSConstructSignatureDeclaration(node) {
|
| 162 |
+
this.word("new");
|
| 163 |
+
this.space();
|
| 164 |
+
this.tsPrintSignatureDeclarationBase(node);
|
| 165 |
+
maybePrintTrailingCommaOrSemicolon(this, node);
|
| 166 |
+
}
|
| 167 |
+
function TSPropertySignature(node) {
|
| 168 |
+
const {
|
| 169 |
+
readonly
|
| 170 |
+
} = node;
|
| 171 |
+
if (readonly) {
|
| 172 |
+
this.word("readonly");
|
| 173 |
+
this.space();
|
| 174 |
+
}
|
| 175 |
+
this.tsPrintPropertyOrMethodName(node);
|
| 176 |
+
this.print(node.typeAnnotation);
|
| 177 |
+
maybePrintTrailingCommaOrSemicolon(this, node);
|
| 178 |
+
}
|
| 179 |
+
function tsPrintPropertyOrMethodName(node) {
|
| 180 |
+
if (node.computed) {
|
| 181 |
+
this.tokenChar(91);
|
| 182 |
+
}
|
| 183 |
+
this.print(node.key);
|
| 184 |
+
if (node.computed) {
|
| 185 |
+
this.tokenChar(93);
|
| 186 |
+
}
|
| 187 |
+
if (node.optional) {
|
| 188 |
+
this.tokenChar(63);
|
| 189 |
+
}
|
| 190 |
+
}
|
| 191 |
+
function TSMethodSignature(node) {
|
| 192 |
+
const {
|
| 193 |
+
kind
|
| 194 |
+
} = node;
|
| 195 |
+
if (kind === "set" || kind === "get") {
|
| 196 |
+
this.word(kind);
|
| 197 |
+
this.space();
|
| 198 |
+
}
|
| 199 |
+
this.tsPrintPropertyOrMethodName(node);
|
| 200 |
+
this.tsPrintSignatureDeclarationBase(node);
|
| 201 |
+
maybePrintTrailingCommaOrSemicolon(this, node);
|
| 202 |
+
}
|
| 203 |
+
function TSIndexSignature(node) {
|
| 204 |
+
const {
|
| 205 |
+
readonly,
|
| 206 |
+
static: isStatic
|
| 207 |
+
} = node;
|
| 208 |
+
if (isStatic) {
|
| 209 |
+
this.word("static");
|
| 210 |
+
this.space();
|
| 211 |
+
}
|
| 212 |
+
if (readonly) {
|
| 213 |
+
this.word("readonly");
|
| 214 |
+
this.space();
|
| 215 |
+
}
|
| 216 |
+
this.tokenChar(91);
|
| 217 |
+
this._parameters(node.parameters, "]");
|
| 218 |
+
this.print(node.typeAnnotation);
|
| 219 |
+
maybePrintTrailingCommaOrSemicolon(this, node);
|
| 220 |
+
}
|
| 221 |
+
function TSAnyKeyword() {
|
| 222 |
+
this.word("any");
|
| 223 |
+
}
|
| 224 |
+
function TSBigIntKeyword() {
|
| 225 |
+
this.word("bigint");
|
| 226 |
+
}
|
| 227 |
+
function TSUnknownKeyword() {
|
| 228 |
+
this.word("unknown");
|
| 229 |
+
}
|
| 230 |
+
function TSNumberKeyword() {
|
| 231 |
+
this.word("number");
|
| 232 |
+
}
|
| 233 |
+
function TSObjectKeyword() {
|
| 234 |
+
this.word("object");
|
| 235 |
+
}
|
| 236 |
+
function TSBooleanKeyword() {
|
| 237 |
+
this.word("boolean");
|
| 238 |
+
}
|
| 239 |
+
function TSStringKeyword() {
|
| 240 |
+
this.word("string");
|
| 241 |
+
}
|
| 242 |
+
function TSSymbolKeyword() {
|
| 243 |
+
this.word("symbol");
|
| 244 |
+
}
|
| 245 |
+
function TSVoidKeyword() {
|
| 246 |
+
this.word("void");
|
| 247 |
+
}
|
| 248 |
+
function TSUndefinedKeyword() {
|
| 249 |
+
this.word("undefined");
|
| 250 |
+
}
|
| 251 |
+
function TSNullKeyword() {
|
| 252 |
+
this.word("null");
|
| 253 |
+
}
|
| 254 |
+
function TSNeverKeyword() {
|
| 255 |
+
this.word("never");
|
| 256 |
+
}
|
| 257 |
+
function TSIntrinsicKeyword() {
|
| 258 |
+
this.word("intrinsic");
|
| 259 |
+
}
|
| 260 |
+
function TSThisType() {
|
| 261 |
+
this.word("this");
|
| 262 |
+
}
|
| 263 |
+
function TSFunctionType(node) {
|
| 264 |
+
this.tsPrintFunctionOrConstructorType(node);
|
| 265 |
+
}
|
| 266 |
+
function TSConstructorType(node) {
|
| 267 |
+
if (node.abstract) {
|
| 268 |
+
this.word("abstract");
|
| 269 |
+
this.space();
|
| 270 |
+
}
|
| 271 |
+
this.word("new");
|
| 272 |
+
this.space();
|
| 273 |
+
this.tsPrintFunctionOrConstructorType(node);
|
| 274 |
+
}
|
| 275 |
+
function tsPrintFunctionOrConstructorType(node) {
|
| 276 |
+
const {
|
| 277 |
+
typeParameters
|
| 278 |
+
} = node;
|
| 279 |
+
const parameters = node.parameters;
|
| 280 |
+
this.print(typeParameters);
|
| 281 |
+
this.tokenChar(40);
|
| 282 |
+
this._parameters(parameters, ")");
|
| 283 |
+
this.space();
|
| 284 |
+
const returnType = node.typeAnnotation;
|
| 285 |
+
this.print(returnType);
|
| 286 |
+
}
|
| 287 |
+
function TSTypeReference(node) {
|
| 288 |
+
const typeArguments = node.typeParameters;
|
| 289 |
+
this.print(node.typeName, !!typeArguments);
|
| 290 |
+
this.print(typeArguments);
|
| 291 |
+
}
|
| 292 |
+
function TSTypePredicate(node) {
|
| 293 |
+
if (node.asserts) {
|
| 294 |
+
this.word("asserts");
|
| 295 |
+
this.space();
|
| 296 |
+
}
|
| 297 |
+
this.print(node.parameterName);
|
| 298 |
+
if (node.typeAnnotation) {
|
| 299 |
+
this.space();
|
| 300 |
+
this.word("is");
|
| 301 |
+
this.space();
|
| 302 |
+
this.print(node.typeAnnotation.typeAnnotation);
|
| 303 |
+
}
|
| 304 |
+
}
|
| 305 |
+
function TSTypeQuery(node) {
|
| 306 |
+
this.word("typeof");
|
| 307 |
+
this.space();
|
| 308 |
+
this.print(node.exprName);
|
| 309 |
+
const typeArguments = node.typeParameters;
|
| 310 |
+
if (typeArguments) {
|
| 311 |
+
this.print(typeArguments);
|
| 312 |
+
}
|
| 313 |
+
}
|
| 314 |
+
function TSTypeLiteral(node) {
|
| 315 |
+
printBraced(this, node, () => this.printJoin(node.members, true, true));
|
| 316 |
+
}
|
| 317 |
+
function TSArrayType(node) {
|
| 318 |
+
this.print(node.elementType, true);
|
| 319 |
+
this.tokenChar(91);
|
| 320 |
+
this.tokenChar(93);
|
| 321 |
+
}
|
| 322 |
+
function TSTupleType(node) {
|
| 323 |
+
this.tokenChar(91);
|
| 324 |
+
this.printList(node.elementTypes, this.shouldPrintTrailingComma("]"));
|
| 325 |
+
this.tokenChar(93);
|
| 326 |
+
}
|
| 327 |
+
function TSOptionalType(node) {
|
| 328 |
+
this.print(node.typeAnnotation);
|
| 329 |
+
this.tokenChar(63);
|
| 330 |
+
}
|
| 331 |
+
function TSRestType(node) {
|
| 332 |
+
this.token("...");
|
| 333 |
+
this.print(node.typeAnnotation);
|
| 334 |
+
}
|
| 335 |
+
function TSNamedTupleMember(node) {
|
| 336 |
+
this.print(node.label);
|
| 337 |
+
if (node.optional) this.tokenChar(63);
|
| 338 |
+
this.tokenChar(58);
|
| 339 |
+
this.space();
|
| 340 |
+
this.print(node.elementType);
|
| 341 |
+
}
|
| 342 |
+
function TSUnionType(node) {
|
| 343 |
+
tsPrintUnionOrIntersectionType(this, node, "|");
|
| 344 |
+
}
|
| 345 |
+
function TSIntersectionType(node) {
|
| 346 |
+
tsPrintUnionOrIntersectionType(this, node, "&");
|
| 347 |
+
}
|
| 348 |
+
function tsPrintUnionOrIntersectionType(printer, node, sep) {
|
| 349 |
+
var _printer$tokenMap;
|
| 350 |
+
let hasLeadingToken = 0;
|
| 351 |
+
if ((_printer$tokenMap = printer.tokenMap) != null && _printer$tokenMap.startMatches(node, sep)) {
|
| 352 |
+
hasLeadingToken = 1;
|
| 353 |
+
printer.token(sep);
|
| 354 |
+
}
|
| 355 |
+
printer.printJoin(node.types, undefined, undefined, function (i) {
|
| 356 |
+
this.space();
|
| 357 |
+
this.token(sep, null, i + hasLeadingToken);
|
| 358 |
+
this.space();
|
| 359 |
+
});
|
| 360 |
+
}
|
| 361 |
+
function TSConditionalType(node) {
|
| 362 |
+
this.print(node.checkType);
|
| 363 |
+
this.space();
|
| 364 |
+
this.word("extends");
|
| 365 |
+
this.space();
|
| 366 |
+
this.print(node.extendsType);
|
| 367 |
+
this.space();
|
| 368 |
+
this.tokenChar(63);
|
| 369 |
+
this.space();
|
| 370 |
+
this.print(node.trueType);
|
| 371 |
+
this.space();
|
| 372 |
+
this.tokenChar(58);
|
| 373 |
+
this.space();
|
| 374 |
+
this.print(node.falseType);
|
| 375 |
+
}
|
| 376 |
+
function TSInferType(node) {
|
| 377 |
+
this.word("infer");
|
| 378 |
+
this.print(node.typeParameter);
|
| 379 |
+
}
|
| 380 |
+
function TSParenthesizedType(node) {
|
| 381 |
+
this.tokenChar(40);
|
| 382 |
+
this.print(node.typeAnnotation);
|
| 383 |
+
this.tokenChar(41);
|
| 384 |
+
}
|
| 385 |
+
function TSTypeOperator(node) {
|
| 386 |
+
this.word(node.operator);
|
| 387 |
+
this.space();
|
| 388 |
+
this.print(node.typeAnnotation);
|
| 389 |
+
}
|
| 390 |
+
function TSIndexedAccessType(node) {
|
| 391 |
+
this.print(node.objectType, true);
|
| 392 |
+
this.tokenChar(91);
|
| 393 |
+
this.print(node.indexType);
|
| 394 |
+
this.tokenChar(93);
|
| 395 |
+
}
|
| 396 |
+
function TSMappedType(node) {
|
| 397 |
+
const {
|
| 398 |
+
nameType,
|
| 399 |
+
optional,
|
| 400 |
+
readonly,
|
| 401 |
+
typeAnnotation
|
| 402 |
+
} = node;
|
| 403 |
+
this.tokenChar(123);
|
| 404 |
+
const exit = this.enterDelimited();
|
| 405 |
+
this.space();
|
| 406 |
+
if (readonly) {
|
| 407 |
+
tokenIfPlusMinus(this, readonly);
|
| 408 |
+
this.word("readonly");
|
| 409 |
+
this.space();
|
| 410 |
+
}
|
| 411 |
+
this.tokenChar(91);
|
| 412 |
+
{
|
| 413 |
+
this.word(node.typeParameter.name);
|
| 414 |
+
}
|
| 415 |
+
this.space();
|
| 416 |
+
this.word("in");
|
| 417 |
+
this.space();
|
| 418 |
+
{
|
| 419 |
+
this.print(node.typeParameter.constraint);
|
| 420 |
+
}
|
| 421 |
+
if (nameType) {
|
| 422 |
+
this.space();
|
| 423 |
+
this.word("as");
|
| 424 |
+
this.space();
|
| 425 |
+
this.print(nameType);
|
| 426 |
+
}
|
| 427 |
+
this.tokenChar(93);
|
| 428 |
+
if (optional) {
|
| 429 |
+
tokenIfPlusMinus(this, optional);
|
| 430 |
+
this.tokenChar(63);
|
| 431 |
+
}
|
| 432 |
+
if (typeAnnotation) {
|
| 433 |
+
this.tokenChar(58);
|
| 434 |
+
this.space();
|
| 435 |
+
this.print(typeAnnotation);
|
| 436 |
+
}
|
| 437 |
+
this.space();
|
| 438 |
+
exit();
|
| 439 |
+
this.tokenChar(125);
|
| 440 |
+
}
|
| 441 |
+
function tokenIfPlusMinus(self, tok) {
|
| 442 |
+
if (tok !== true) {
|
| 443 |
+
self.token(tok);
|
| 444 |
+
}
|
| 445 |
+
}
|
| 446 |
+
function TSTemplateLiteralType(node) {
|
| 447 |
+
this._printTemplate(node, node.types);
|
| 448 |
+
}
|
| 449 |
+
function TSLiteralType(node) {
|
| 450 |
+
this.print(node.literal);
|
| 451 |
+
}
|
| 452 |
+
function TSClassImplements(node) {
|
| 453 |
+
this.print(node.expression);
|
| 454 |
+
this.print(node.typeArguments);
|
| 455 |
+
}
|
| 456 |
+
function TSInterfaceDeclaration(node) {
|
| 457 |
+
const {
|
| 458 |
+
declare,
|
| 459 |
+
id,
|
| 460 |
+
typeParameters,
|
| 461 |
+
extends: extendz,
|
| 462 |
+
body
|
| 463 |
+
} = node;
|
| 464 |
+
if (declare) {
|
| 465 |
+
this.word("declare");
|
| 466 |
+
this.space();
|
| 467 |
+
}
|
| 468 |
+
this.word("interface");
|
| 469 |
+
this.space();
|
| 470 |
+
this.print(id);
|
| 471 |
+
this.print(typeParameters);
|
| 472 |
+
if (extendz != null && extendz.length) {
|
| 473 |
+
this.space();
|
| 474 |
+
this.word("extends");
|
| 475 |
+
this.space();
|
| 476 |
+
this.printList(extendz);
|
| 477 |
+
}
|
| 478 |
+
this.space();
|
| 479 |
+
this.print(body);
|
| 480 |
+
}
|
| 481 |
+
function TSInterfaceBody(node) {
|
| 482 |
+
printBraced(this, node, () => this.printJoin(node.body, true, true));
|
| 483 |
+
}
|
| 484 |
+
function TSTypeAliasDeclaration(node) {
|
| 485 |
+
const {
|
| 486 |
+
declare,
|
| 487 |
+
id,
|
| 488 |
+
typeParameters,
|
| 489 |
+
typeAnnotation
|
| 490 |
+
} = node;
|
| 491 |
+
if (declare) {
|
| 492 |
+
this.word("declare");
|
| 493 |
+
this.space();
|
| 494 |
+
}
|
| 495 |
+
this.word("type");
|
| 496 |
+
this.space();
|
| 497 |
+
this.print(id);
|
| 498 |
+
this.print(typeParameters);
|
| 499 |
+
this.space();
|
| 500 |
+
this.tokenChar(61);
|
| 501 |
+
this.space();
|
| 502 |
+
this.print(typeAnnotation);
|
| 503 |
+
this.semicolon();
|
| 504 |
+
}
|
| 505 |
+
function TSTypeExpression(node) {
|
| 506 |
+
const {
|
| 507 |
+
type,
|
| 508 |
+
expression,
|
| 509 |
+
typeAnnotation
|
| 510 |
+
} = node;
|
| 511 |
+
this.print(expression, true);
|
| 512 |
+
this.space();
|
| 513 |
+
this.word(type === "TSAsExpression" ? "as" : "satisfies");
|
| 514 |
+
this.space();
|
| 515 |
+
this.print(typeAnnotation);
|
| 516 |
+
}
|
| 517 |
+
function TSTypeAssertion(node) {
|
| 518 |
+
const {
|
| 519 |
+
typeAnnotation,
|
| 520 |
+
expression
|
| 521 |
+
} = node;
|
| 522 |
+
this.tokenChar(60);
|
| 523 |
+
this.print(typeAnnotation);
|
| 524 |
+
this.tokenChar(62);
|
| 525 |
+
this.space();
|
| 526 |
+
this.print(expression);
|
| 527 |
+
}
|
| 528 |
+
function TSInstantiationExpression(node) {
|
| 529 |
+
this.print(node.expression);
|
| 530 |
+
{
|
| 531 |
+
this.print(node.typeParameters);
|
| 532 |
+
}
|
| 533 |
+
}
|
| 534 |
+
function TSEnumDeclaration(node) {
|
| 535 |
+
const {
|
| 536 |
+
declare,
|
| 537 |
+
const: isConst,
|
| 538 |
+
id
|
| 539 |
+
} = node;
|
| 540 |
+
if (declare) {
|
| 541 |
+
this.word("declare");
|
| 542 |
+
this.space();
|
| 543 |
+
}
|
| 544 |
+
if (isConst) {
|
| 545 |
+
this.word("const");
|
| 546 |
+
this.space();
|
| 547 |
+
}
|
| 548 |
+
this.word("enum");
|
| 549 |
+
this.space();
|
| 550 |
+
this.print(id);
|
| 551 |
+
this.space();
|
| 552 |
+
{
|
| 553 |
+
TSEnumBody.call(this, node);
|
| 554 |
+
}
|
| 555 |
+
}
|
| 556 |
+
function TSEnumBody(node) {
|
| 557 |
+
printBraced(this, node, () => {
|
| 558 |
+
var _this$shouldPrintTrai;
|
| 559 |
+
return this.printList(node.members, (_this$shouldPrintTrai = this.shouldPrintTrailingComma("}")) != null ? _this$shouldPrintTrai : true, true, true);
|
| 560 |
+
});
|
| 561 |
+
}
|
| 562 |
+
function TSEnumMember(node) {
|
| 563 |
+
const {
|
| 564 |
+
id,
|
| 565 |
+
initializer
|
| 566 |
+
} = node;
|
| 567 |
+
this.print(id);
|
| 568 |
+
if (initializer) {
|
| 569 |
+
this.space();
|
| 570 |
+
this.tokenChar(61);
|
| 571 |
+
this.space();
|
| 572 |
+
this.print(initializer);
|
| 573 |
+
}
|
| 574 |
+
}
|
| 575 |
+
function TSModuleDeclaration(node) {
|
| 576 |
+
const {
|
| 577 |
+
declare,
|
| 578 |
+
id,
|
| 579 |
+
kind
|
| 580 |
+
} = node;
|
| 581 |
+
if (declare) {
|
| 582 |
+
this.word("declare");
|
| 583 |
+
this.space();
|
| 584 |
+
}
|
| 585 |
+
{
|
| 586 |
+
if (!node.global) {
|
| 587 |
+
this.word(kind != null ? kind : id.type === "Identifier" ? "namespace" : "module");
|
| 588 |
+
this.space();
|
| 589 |
+
}
|
| 590 |
+
this.print(id);
|
| 591 |
+
if (!node.body) {
|
| 592 |
+
this.semicolon();
|
| 593 |
+
return;
|
| 594 |
+
}
|
| 595 |
+
let body = node.body;
|
| 596 |
+
while (body.type === "TSModuleDeclaration") {
|
| 597 |
+
this.tokenChar(46);
|
| 598 |
+
this.print(body.id);
|
| 599 |
+
body = body.body;
|
| 600 |
+
}
|
| 601 |
+
this.space();
|
| 602 |
+
this.print(body);
|
| 603 |
+
}
|
| 604 |
+
}
|
| 605 |
+
function TSModuleBlock(node) {
|
| 606 |
+
printBraced(this, node, () => this.printSequence(node.body, true));
|
| 607 |
+
}
|
| 608 |
+
function TSImportType(node) {
|
| 609 |
+
const {
|
| 610 |
+
argument,
|
| 611 |
+
qualifier,
|
| 612 |
+
options
|
| 613 |
+
} = node;
|
| 614 |
+
this.word("import");
|
| 615 |
+
this.tokenChar(40);
|
| 616 |
+
this.print(argument);
|
| 617 |
+
if (options) {
|
| 618 |
+
this.tokenChar(44);
|
| 619 |
+
this.print(options);
|
| 620 |
+
}
|
| 621 |
+
this.tokenChar(41);
|
| 622 |
+
if (qualifier) {
|
| 623 |
+
this.tokenChar(46);
|
| 624 |
+
this.print(qualifier);
|
| 625 |
+
}
|
| 626 |
+
const typeArguments = node.typeParameters;
|
| 627 |
+
if (typeArguments) {
|
| 628 |
+
this.print(typeArguments);
|
| 629 |
+
}
|
| 630 |
+
}
|
| 631 |
+
function TSImportEqualsDeclaration(node) {
|
| 632 |
+
const {
|
| 633 |
+
id,
|
| 634 |
+
moduleReference
|
| 635 |
+
} = node;
|
| 636 |
+
if (node.isExport) {
|
| 637 |
+
this.word("export");
|
| 638 |
+
this.space();
|
| 639 |
+
}
|
| 640 |
+
this.word("import");
|
| 641 |
+
this.space();
|
| 642 |
+
this.print(id);
|
| 643 |
+
this.space();
|
| 644 |
+
this.tokenChar(61);
|
| 645 |
+
this.space();
|
| 646 |
+
this.print(moduleReference);
|
| 647 |
+
this.semicolon();
|
| 648 |
+
}
|
| 649 |
+
function TSExternalModuleReference(node) {
|
| 650 |
+
this.token("require(");
|
| 651 |
+
this.print(node.expression);
|
| 652 |
+
this.tokenChar(41);
|
| 653 |
+
}
|
| 654 |
+
function TSNonNullExpression(node) {
|
| 655 |
+
this.print(node.expression);
|
| 656 |
+
this.tokenChar(33);
|
| 657 |
+
}
|
| 658 |
+
function TSExportAssignment(node) {
|
| 659 |
+
this.word("export");
|
| 660 |
+
this.space();
|
| 661 |
+
this.tokenChar(61);
|
| 662 |
+
this.space();
|
| 663 |
+
this.print(node.expression);
|
| 664 |
+
this.semicolon();
|
| 665 |
+
}
|
| 666 |
+
function TSNamespaceExportDeclaration(node) {
|
| 667 |
+
this.word("export");
|
| 668 |
+
this.space();
|
| 669 |
+
this.word("as");
|
| 670 |
+
this.space();
|
| 671 |
+
this.word("namespace");
|
| 672 |
+
this.space();
|
| 673 |
+
this.print(node.id);
|
| 674 |
+
this.semicolon();
|
| 675 |
+
}
|
| 676 |
+
function tsPrintSignatureDeclarationBase(node) {
|
| 677 |
+
const {
|
| 678 |
+
typeParameters
|
| 679 |
+
} = node;
|
| 680 |
+
const parameters = node.parameters;
|
| 681 |
+
this.print(typeParameters);
|
| 682 |
+
this.tokenChar(40);
|
| 683 |
+
this._parameters(parameters, ")");
|
| 684 |
+
const returnType = node.typeAnnotation;
|
| 685 |
+
this.print(returnType);
|
| 686 |
+
}
|
| 687 |
+
function tsPrintClassMemberModifiers(node) {
|
| 688 |
+
const isPrivateField = node.type === "ClassPrivateProperty";
|
| 689 |
+
const isPublicField = node.type === "ClassAccessorProperty" || node.type === "ClassProperty";
|
| 690 |
+
printModifiersList(this, node, [isPublicField && node.declare && "declare", !isPrivateField && node.accessibility]);
|
| 691 |
+
if (node.static) {
|
| 692 |
+
this.word("static");
|
| 693 |
+
this.space();
|
| 694 |
+
}
|
| 695 |
+
printModifiersList(this, node, [!isPrivateField && node.abstract && "abstract", !isPrivateField && node.override && "override", (isPublicField || isPrivateField) && node.readonly && "readonly"]);
|
| 696 |
+
}
|
| 697 |
+
function printBraced(printer, node, cb) {
|
| 698 |
+
printer.token("{");
|
| 699 |
+
const exit = printer.enterDelimited();
|
| 700 |
+
cb();
|
| 701 |
+
exit();
|
| 702 |
+
printer.rightBrace(node);
|
| 703 |
+
}
|
| 704 |
+
function printModifiersList(printer, node, modifiers) {
|
| 705 |
+
var _printer$tokenMap2;
|
| 706 |
+
const modifiersSet = new Set();
|
| 707 |
+
for (const modifier of modifiers) {
|
| 708 |
+
if (modifier) modifiersSet.add(modifier);
|
| 709 |
+
}
|
| 710 |
+
(_printer$tokenMap2 = printer.tokenMap) == null || _printer$tokenMap2.find(node, tok => {
|
| 711 |
+
if (modifiersSet.has(tok.value)) {
|
| 712 |
+
printer.token(tok.value);
|
| 713 |
+
printer.space();
|
| 714 |
+
modifiersSet.delete(tok.value);
|
| 715 |
+
return modifiersSet.size === 0;
|
| 716 |
+
}
|
| 717 |
+
});
|
| 718 |
+
for (const modifier of modifiersSet) {
|
| 719 |
+
printer.word(modifier);
|
| 720 |
+
printer.space();
|
| 721 |
+
}
|
| 722 |
+
}
|
| 723 |
+
|
| 724 |
+
//# sourceMappingURL=typescript.js.map
|
novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/generators/typescript.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"names":["TSTypeAnnotation","node","parent","token","type","typeAnnotation","space","optional","print","TSTypeParameterInstantiation","printTrailingSeparator","params","length","tokenMap","start","end","find","t","matchesOriginal","shouldPrintTrailingComma","printList","TSTypeParameter","const","word","in","out","name","constraint","default","TSParameterProperty","accessibility","readonly","_param","parameter","TSDeclareFunction","declare","_functionHead","semicolon","TSDeclareMethod","_classMethodHead","TSQualifiedName","left","right","TSCallSignatureDeclaration","tsPrintSignatureDeclarationBase","maybePrintTrailingCommaOrSemicolon","printer","endMatches","TSConstructSignatureDeclaration","TSPropertySignature","tsPrintPropertyOrMethodName","computed","key","TSMethodSignature","kind","TSIndexSignature","static","isStatic","_parameters","parameters","TSAnyKeyword","TSBigIntKeyword","TSUnknownKeyword","TSNumberKeyword","TSObjectKeyword","TSBooleanKeyword","TSStringKeyword","TSSymbolKeyword","TSVoidKeyword","TSUndefinedKeyword","TSNullKeyword","TSNeverKeyword","TSIntrinsicKeyword","TSThisType","TSFunctionType","tsPrintFunctionOrConstructorType","TSConstructorType","abstract","typeParameters","returnType","TSTypeReference","typeArguments","typeName","TSTypePredicate","asserts","parameterName","TSTypeQuery","exprName","TSTypeLiteral","printBraced","printJoin","members","TSArrayType","elementType","TSTupleType","elementTypes","TSOptionalType","TSRestType","TSNamedTupleMember","label","TSUnionType","tsPrintUnionOrIntersectionType","TSIntersectionType","sep","_printer$tokenMap","hasLeadingToken","startMatches","types","undefined","i","TSConditionalType","checkType","extendsType","trueType","falseType","TSInferType","typeParameter","TSParenthesizedType","TSTypeOperator","operator","TSIndexedAccessType","objectType","indexType","TSMappedType","nameType","exit","enterDelimited","tokenIfPlusMinus","self","tok","TSTemplateLiteralType","_printTemplate","TSLiteralType","literal","TSClassImplements","expression","TSInterfaceDeclaration","id","extends","extendz","body","TSInterfaceBody","TSTypeAliasDeclaration","TSTypeExpression","TSTypeAssertion","TSInstantiationExpression","TSEnumDeclaration","isConst","TSEnumBody","call","_this$shouldPrintTrai","TSEnumMember","initializer","TSModuleDeclaration","global","TSModuleBlock","printSequence","TSImportType","argument","qualifier","options","TSImportEqualsDeclaration","moduleReference","isExport","TSExternalModuleReference","TSNonNullExpression","TSExportAssignment","TSNamespaceExportDeclaration","tsPrintClassMemberModifiers","isPrivateField","isPublicField","printModifiersList","override","cb","rightBrace","modifiers","_printer$tokenMap2","modifiersSet","Set","modifier","add","has","value","delete","size"],"sources":["../../src/generators/typescript.ts"],"sourcesContent":["import type Printer from \"../printer.ts\";\nimport type * as t from \"@babel/types\";\n\nexport function TSTypeAnnotation(\n this: Printer,\n node: t.TSTypeAnnotation,\n parent: t.Node,\n) {\n // TODO(@nicolo-ribaudo): investigate not including => in the range\n // of the return type of an arrow function type\n this.token(\n (parent.type === \"TSFunctionType\" || parent.type === \"TSConstructorType\") &&\n (process.env.BABEL_8_BREAKING\n ? // @ts-ignore(Babel 7 vs Babel 8) Babel 8 AST shape\n parent.returnType\n : // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST shape\n parent.typeAnnotation) === node\n ? \"=>\"\n : \":\",\n );\n this.space();\n // @ts-expect-error todo(flow->ts) can this be removed? `.optional` looks to be not existing property\n if (node.optional) this.token(\"?\");\n this.print(node.typeAnnotation);\n}\n\nexport function TSTypeParameterInstantiation(\n this: Printer,\n node: t.TSTypeParameterInstantiation,\n parent: t.Node,\n): void {\n this.token(\"<\");\n\n let printTrailingSeparator =\n parent.type === \"ArrowFunctionExpression\" && node.params.length === 1;\n if (this.tokenMap && node.start != null && node.end != null) {\n // Only force the trailing comma for pre-existing nodes if they\n // already had a comma (either because they were multi-param, or\n // because they had a trailing comma)\n printTrailingSeparator &&= !!this.tokenMap.find(node, t =>\n this.tokenMap.matchesOriginal(t, \",\"),\n );\n // Preserve the trailing comma if it was there before\n printTrailingSeparator ||= this.shouldPrintTrailingComma(\">\");\n }\n\n this.printList(node.params, printTrailingSeparator);\n this.token(\">\");\n}\n\nexport { TSTypeParameterInstantiation as TSTypeParameterDeclaration };\n\nexport function TSTypeParameter(this: Printer, node: t.TSTypeParameter) {\n if (node.const) {\n this.word(\"const\");\n this.space();\n }\n\n if (node.in) {\n this.word(\"in\");\n this.space();\n }\n\n if (node.out) {\n this.word(\"out\");\n this.space();\n }\n\n this.word(\n !process.env.BABEL_8_BREAKING\n ? (node.name as unknown as string)\n : (node.name as unknown as t.Identifier).name,\n );\n\n if (node.constraint) {\n this.space();\n this.word(\"extends\");\n this.space();\n this.print(node.constraint);\n }\n\n if (node.default) {\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.default);\n }\n}\n\nexport function TSParameterProperty(\n this: Printer,\n node: t.TSParameterProperty,\n) {\n if (node.accessibility) {\n this.word(node.accessibility);\n this.space();\n }\n\n if (node.readonly) {\n this.word(\"readonly\");\n this.space();\n }\n\n this._param(node.parameter);\n}\n\nexport function TSDeclareFunction(\n this: Printer,\n node: t.TSDeclareFunction,\n parent: t.ParentMaps[\"TSDeclareFunction\"],\n) {\n if (node.declare) {\n this.word(\"declare\");\n this.space();\n }\n this._functionHead(node, parent);\n this.semicolon();\n}\n\nexport function TSDeclareMethod(this: Printer, node: t.TSDeclareMethod) {\n this._classMethodHead(node);\n this.semicolon();\n}\n\nexport function TSQualifiedName(this: Printer, node: t.TSQualifiedName) {\n this.print(node.left);\n this.token(\".\");\n this.print(node.right);\n}\n\nexport function TSCallSignatureDeclaration(\n this: Printer,\n node: t.TSCallSignatureDeclaration,\n) {\n this.tsPrintSignatureDeclarationBase(node);\n maybePrintTrailingCommaOrSemicolon(this, node);\n}\n\nfunction maybePrintTrailingCommaOrSemicolon(printer: Printer, node: t.Node) {\n if (!printer.tokenMap || !node.start || !node.end) {\n printer.semicolon();\n return;\n }\n\n if (printer.tokenMap.endMatches(node, \",\")) {\n printer.token(\",\");\n } else if (printer.tokenMap.endMatches(node, \";\")) {\n printer.semicolon();\n }\n}\n\nexport function TSConstructSignatureDeclaration(\n this: Printer,\n node: t.TSConstructSignatureDeclaration,\n) {\n this.word(\"new\");\n this.space();\n this.tsPrintSignatureDeclarationBase(node);\n maybePrintTrailingCommaOrSemicolon(this, node);\n}\n\nexport function TSPropertySignature(\n this: Printer,\n node: t.TSPropertySignature,\n) {\n const { readonly } = node;\n if (readonly) {\n this.word(\"readonly\");\n this.space();\n }\n this.tsPrintPropertyOrMethodName(node);\n this.print(node.typeAnnotation);\n maybePrintTrailingCommaOrSemicolon(this, node);\n}\n\nexport function tsPrintPropertyOrMethodName(\n this: Printer,\n node: t.TSPropertySignature | t.TSMethodSignature,\n) {\n if (node.computed) {\n this.token(\"[\");\n }\n this.print(node.key);\n if (node.computed) {\n this.token(\"]\");\n }\n if (node.optional) {\n this.token(\"?\");\n }\n}\n\nexport function TSMethodSignature(this: Printer, node: t.TSMethodSignature) {\n const { kind } = node;\n if (kind === \"set\" || kind === \"get\") {\n this.word(kind);\n this.space();\n }\n this.tsPrintPropertyOrMethodName(node);\n this.tsPrintSignatureDeclarationBase(node);\n maybePrintTrailingCommaOrSemicolon(this, node);\n}\n\nexport function TSIndexSignature(this: Printer, node: t.TSIndexSignature) {\n const { readonly, static: isStatic } = node;\n if (isStatic) {\n this.word(\"static\");\n this.space();\n }\n if (readonly) {\n this.word(\"readonly\");\n this.space();\n }\n this.token(\"[\");\n this._parameters(node.parameters, \"]\");\n this.print(node.typeAnnotation);\n maybePrintTrailingCommaOrSemicolon(this, node);\n}\n\nexport function TSAnyKeyword(this: Printer) {\n this.word(\"any\");\n}\nexport function TSBigIntKeyword(this: Printer) {\n this.word(\"bigint\");\n}\nexport function TSUnknownKeyword(this: Printer) {\n this.word(\"unknown\");\n}\nexport function TSNumberKeyword(this: Printer) {\n this.word(\"number\");\n}\nexport function TSObjectKeyword(this: Printer) {\n this.word(\"object\");\n}\nexport function TSBooleanKeyword(this: Printer) {\n this.word(\"boolean\");\n}\nexport function TSStringKeyword(this: Printer) {\n this.word(\"string\");\n}\nexport function TSSymbolKeyword(this: Printer) {\n this.word(\"symbol\");\n}\nexport function TSVoidKeyword(this: Printer) {\n this.word(\"void\");\n}\nexport function TSUndefinedKeyword(this: Printer) {\n this.word(\"undefined\");\n}\nexport function TSNullKeyword(this: Printer) {\n this.word(\"null\");\n}\nexport function TSNeverKeyword(this: Printer) {\n this.word(\"never\");\n}\nexport function TSIntrinsicKeyword(this: Printer) {\n this.word(\"intrinsic\");\n}\n\nexport function TSThisType(this: Printer) {\n this.word(\"this\");\n}\n\nexport function TSFunctionType(this: Printer, node: t.TSFunctionType) {\n this.tsPrintFunctionOrConstructorType(node);\n}\n\nexport function TSConstructorType(this: Printer, node: t.TSConstructorType) {\n if (node.abstract) {\n this.word(\"abstract\");\n this.space();\n }\n this.word(\"new\");\n this.space();\n this.tsPrintFunctionOrConstructorType(node);\n}\n\nexport function tsPrintFunctionOrConstructorType(\n this: Printer,\n node: t.TSFunctionType | t.TSConstructorType,\n) {\n const { typeParameters } = node;\n const parameters = process.env.BABEL_8_BREAKING\n ? // @ts-ignore(Babel 7 vs Babel 8) Babel 8 AST shape\n node.params\n : // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST shape\n node.parameters;\n this.print(typeParameters);\n this.token(\"(\");\n this._parameters(parameters, \")\");\n this.space();\n const returnType = process.env.BABEL_8_BREAKING\n ? // @ts-ignore(Babel 7 vs Babel 8) Babel 8 AST shape\n node.returnType\n : // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST shape\n node.typeAnnotation;\n this.print(returnType);\n}\n\nexport function TSTypeReference(this: Printer, node: t.TSTypeReference) {\n const typeArguments = process.env.BABEL_8_BREAKING\n ? // @ts-ignore(Babel 7 vs Babel 8) Babel 8 AST shape\n node.typeArguments\n : // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST shape\n node.typeParameters;\n this.print(node.typeName, !!typeArguments);\n this.print(typeArguments);\n}\n\nexport function TSTypePredicate(this: Printer, node: t.TSTypePredicate) {\n if (node.asserts) {\n this.word(\"asserts\");\n this.space();\n }\n this.print(node.parameterName);\n if (node.typeAnnotation) {\n this.space();\n this.word(\"is\");\n this.space();\n this.print(node.typeAnnotation.typeAnnotation);\n }\n}\n\nexport function TSTypeQuery(this: Printer, node: t.TSTypeQuery) {\n this.word(\"typeof\");\n this.space();\n this.print(node.exprName);\n\n const typeArguments = process.env.BABEL_8_BREAKING\n ? //@ts-ignore(Babel 7 vs Babel 8) Babel 8 AST\n node.typeArguments\n : //@ts-ignore(Babel 7 vs Babel 8) Babel 7 AST\n node.typeParameters;\n if (typeArguments) {\n this.print(typeArguments);\n }\n}\n\nexport function TSTypeLiteral(this: Printer, node: t.TSTypeLiteral) {\n printBraced(this, node, () => this.printJoin(node.members, true, true));\n}\n\nexport function TSArrayType(this: Printer, node: t.TSArrayType) {\n this.print(node.elementType, true);\n\n this.token(\"[\");\n this.token(\"]\");\n}\n\nexport function TSTupleType(this: Printer, node: t.TSTupleType) {\n this.token(\"[\");\n this.printList(node.elementTypes, this.shouldPrintTrailingComma(\"]\"));\n this.token(\"]\");\n}\n\nexport function TSOptionalType(this: Printer, node: t.TSOptionalType) {\n this.print(node.typeAnnotation);\n this.token(\"?\");\n}\n\nexport function TSRestType(this: Printer, node: t.TSRestType) {\n this.token(\"...\");\n this.print(node.typeAnnotation);\n}\n\nexport function TSNamedTupleMember(this: Printer, node: t.TSNamedTupleMember) {\n this.print(node.label);\n if (node.optional) this.token(\"?\");\n this.token(\":\");\n this.space();\n this.print(node.elementType);\n}\n\nexport function TSUnionType(this: Printer, node: t.TSUnionType) {\n tsPrintUnionOrIntersectionType(this, node, \"|\");\n}\n\nexport function TSIntersectionType(this: Printer, node: t.TSIntersectionType) {\n tsPrintUnionOrIntersectionType(this, node, \"&\");\n}\n\nfunction tsPrintUnionOrIntersectionType(\n printer: Printer,\n node: t.TSUnionType | t.TSIntersectionType,\n sep: \"|\" | \"&\",\n) {\n let hasLeadingToken = 0;\n if (printer.tokenMap?.startMatches(node, sep)) {\n hasLeadingToken = 1;\n printer.token(sep);\n }\n\n printer.printJoin(node.types, undefined, undefined, function (i) {\n this.space();\n this.token(sep, null, i + hasLeadingToken);\n this.space();\n });\n}\n\nexport function TSConditionalType(this: Printer, node: t.TSConditionalType) {\n this.print(node.checkType);\n this.space();\n this.word(\"extends\");\n this.space();\n this.print(node.extendsType);\n this.space();\n this.token(\"?\");\n this.space();\n this.print(node.trueType);\n this.space();\n this.token(\":\");\n this.space();\n this.print(node.falseType);\n}\n\nexport function TSInferType(this: Printer, node: t.TSInferType) {\n this.word(\"infer\");\n this.print(node.typeParameter);\n}\n\nexport function TSParenthesizedType(\n this: Printer,\n node: t.TSParenthesizedType,\n) {\n this.token(\"(\");\n this.print(node.typeAnnotation);\n this.token(\")\");\n}\n\nexport function TSTypeOperator(this: Printer, node: t.TSTypeOperator) {\n this.word(node.operator);\n this.space();\n this.print(node.typeAnnotation);\n}\n\nexport function TSIndexedAccessType(\n this: Printer,\n node: t.TSIndexedAccessType,\n) {\n this.print(node.objectType, true);\n this.token(\"[\");\n this.print(node.indexType);\n this.token(\"]\");\n}\n\nexport function TSMappedType(this: Printer, node: t.TSMappedType) {\n const { nameType, optional, readonly, typeAnnotation } = node;\n this.token(\"{\");\n const exit = this.enterDelimited();\n this.space();\n if (readonly) {\n tokenIfPlusMinus(this, readonly);\n this.word(\"readonly\");\n this.space();\n }\n\n this.token(\"[\");\n if (process.env.BABEL_8_BREAKING) {\n // @ts-ignore(Babel 7 vs Babel 8) Babel 8 AST shape\n this.word(node.key.name);\n } else {\n // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST shape\n this.word(node.typeParameter.name);\n }\n\n this.space();\n this.word(\"in\");\n this.space();\n if (process.env.BABEL_8_BREAKING) {\n // @ts-ignore(Babel 7 vs Babel 8) Babel 8 AST shape\n this.print(node.constraint);\n } else {\n // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST shape\n this.print(node.typeParameter.constraint);\n }\n\n if (nameType) {\n this.space();\n this.word(\"as\");\n this.space();\n this.print(nameType);\n }\n\n this.token(\"]\");\n\n if (optional) {\n tokenIfPlusMinus(this, optional);\n this.token(\"?\");\n }\n\n if (typeAnnotation) {\n this.token(\":\");\n this.space();\n this.print(typeAnnotation);\n }\n this.space();\n exit();\n this.token(\"}\");\n}\n\nfunction tokenIfPlusMinus(self: Printer, tok: true | \"+\" | \"-\") {\n if (tok !== true) {\n self.token(tok);\n }\n}\n\nexport function TSTemplateLiteralType(\n this: Printer,\n node: t.TSTemplateLiteralType,\n) {\n this._printTemplate(node, node.types);\n}\n\nexport function TSLiteralType(this: Printer, node: t.TSLiteralType) {\n this.print(node.literal);\n}\n\nexport function TSClassImplements(\n this: Printer,\n // TODO(Babel 8): Just use t.TSClassImplements\n node: t.Node & {\n expression: t.TSEntityName;\n typeArguments?: t.TSTypeParameterInstantiation;\n },\n) {\n this.print(node.expression);\n this.print(node.typeArguments);\n}\n\nexport { TSClassImplements as TSInterfaceHeritage };\n\nexport function TSInterfaceDeclaration(\n this: Printer,\n node: t.TSInterfaceDeclaration,\n) {\n const { declare, id, typeParameters, extends: extendz, body } = node;\n if (declare) {\n this.word(\"declare\");\n this.space();\n }\n this.word(\"interface\");\n this.space();\n this.print(id);\n this.print(typeParameters);\n if (extendz?.length) {\n this.space();\n this.word(\"extends\");\n this.space();\n this.printList(extendz);\n }\n this.space();\n this.print(body);\n}\n\nexport function TSInterfaceBody(this: Printer, node: t.TSInterfaceBody) {\n printBraced(this, node, () => this.printJoin(node.body, true, true));\n}\n\nexport function TSTypeAliasDeclaration(\n this: Printer,\n node: t.TSTypeAliasDeclaration,\n) {\n const { declare, id, typeParameters, typeAnnotation } = node;\n if (declare) {\n this.word(\"declare\");\n this.space();\n }\n this.word(\"type\");\n this.space();\n this.print(id);\n this.print(typeParameters);\n this.space();\n this.token(\"=\");\n this.space();\n this.print(typeAnnotation);\n this.semicolon();\n}\n\nfunction TSTypeExpression(\n this: Printer,\n node: t.TSAsExpression | t.TSSatisfiesExpression,\n) {\n const { type, expression, typeAnnotation } = node;\n this.print(expression, true);\n this.space();\n this.word(type === \"TSAsExpression\" ? \"as\" : \"satisfies\");\n this.space();\n this.print(typeAnnotation);\n}\n\nexport {\n TSTypeExpression as TSAsExpression,\n TSTypeExpression as TSSatisfiesExpression,\n};\n\nexport function TSTypeAssertion(this: Printer, node: t.TSTypeAssertion) {\n const { typeAnnotation, expression } = node;\n this.token(\"<\");\n this.print(typeAnnotation);\n this.token(\">\");\n this.space();\n this.print(expression);\n}\n\nexport function TSInstantiationExpression(\n this: Printer,\n node: t.TSInstantiationExpression,\n) {\n this.print(node.expression);\n if (process.env.BABEL_8_BREAKING) {\n // @ts-ignore(Babel 7 vs Babel 8) Babel 8 AST\n this.print(node.typeArguments);\n } else {\n // @ts-ignore(Babel 7 vs Babel 8) Removed in Babel 8\n this.print(node.typeParameters);\n }\n}\n\nexport function TSEnumDeclaration(this: Printer, node: t.TSEnumDeclaration) {\n const { declare, const: isConst, id } = node;\n if (declare) {\n this.word(\"declare\");\n this.space();\n }\n if (isConst) {\n this.word(\"const\");\n this.space();\n }\n this.word(\"enum\");\n this.space();\n this.print(id);\n this.space();\n\n if (process.env.BABEL_8_BREAKING) {\n // @ts-ignore(Babel 7 vs Babel 8) Babel 8 AST\n this.print(node.body);\n } else {\n // cast to TSEnumBody for Babel 7 AST\n TSEnumBody.call(this, node as unknown as t.TSEnumBody);\n }\n}\n\nexport function TSEnumBody(this: Printer, node: t.TSEnumBody) {\n printBraced(this, node, () =>\n this.printList(\n node.members,\n this.shouldPrintTrailingComma(\"}\") ??\n (process.env.BABEL_8_BREAKING ? false : true),\n true,\n true,\n ),\n );\n}\n\nexport function TSEnumMember(this: Printer, node: t.TSEnumMember) {\n const { id, initializer } = node;\n this.print(id);\n if (initializer) {\n this.space();\n this.token(\"=\");\n this.space();\n this.print(initializer);\n }\n}\n\nexport function TSModuleDeclaration(\n this: Printer,\n node: t.TSModuleDeclaration,\n) {\n const { declare, id, kind } = node;\n\n if (declare) {\n this.word(\"declare\");\n this.space();\n }\n\n if (process.env.BABEL_8_BREAKING) {\n if (kind !== \"global\") {\n this.word(kind);\n this.space();\n }\n\n this.print(node.id);\n if (!node.body) {\n this.semicolon();\n return;\n }\n this.space();\n this.print(node.body);\n } else {\n // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST shape\n if (!node.global) {\n this.word(kind ?? (id.type === \"Identifier\" ? \"namespace\" : \"module\"));\n this.space();\n }\n\n this.print(id);\n\n if (!node.body) {\n this.semicolon();\n return;\n }\n\n let body = node.body;\n // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST shape\n while (body.type === \"TSModuleDeclaration\") {\n this.token(\".\");\n // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST shape\n this.print(body.id);\n // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST shape\n body = body.body;\n }\n\n this.space();\n this.print(body);\n }\n}\n\nexport function TSModuleBlock(this: Printer, node: t.TSModuleBlock) {\n printBraced(this, node, () => this.printSequence(node.body, true));\n}\n\nexport function TSImportType(this: Printer, node: t.TSImportType) {\n const { argument, qualifier, options } = node;\n this.word(\"import\");\n this.token(\"(\");\n this.print(argument);\n if (options) {\n this.token(\",\");\n this.print(options);\n }\n this.token(\")\");\n if (qualifier) {\n this.token(\".\");\n this.print(qualifier);\n }\n const typeArguments = process.env.BABEL_8_BREAKING\n ? //@ts-ignore(Babel 7 vs Babel 8) Babel 8 AST\n node.typeArguments\n : //@ts-ignore(Babel 7 vs Babel 8) Babel 7 AST\n node.typeParameters;\n if (typeArguments) {\n this.print(typeArguments);\n }\n}\n\nexport function TSImportEqualsDeclaration(\n this: Printer,\n node: t.TSImportEqualsDeclaration,\n) {\n const { id, moduleReference } = node;\n if (\n !process.env.BABEL_8_BREAKING &&\n // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST\n node.isExport\n ) {\n this.word(\"export\");\n this.space();\n }\n this.word(\"import\");\n this.space();\n this.print(id);\n this.space();\n this.token(\"=\");\n this.space();\n this.print(moduleReference);\n this.semicolon();\n}\n\nexport function TSExternalModuleReference(\n this: Printer,\n node: t.TSExternalModuleReference,\n) {\n this.token(\"require(\");\n this.print(node.expression);\n this.token(\")\");\n}\n\nexport function TSNonNullExpression(\n this: Printer,\n node: t.TSNonNullExpression,\n) {\n this.print(node.expression);\n this.token(\"!\");\n}\n\nexport function TSExportAssignment(this: Printer, node: t.TSExportAssignment) {\n this.word(\"export\");\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.expression);\n this.semicolon();\n}\n\nexport function TSNamespaceExportDeclaration(\n this: Printer,\n node: t.TSNamespaceExportDeclaration,\n) {\n this.word(\"export\");\n this.space();\n this.word(\"as\");\n this.space();\n this.word(\"namespace\");\n this.space();\n this.print(node.id);\n this.semicolon();\n}\n\nexport function tsPrintSignatureDeclarationBase(this: Printer, node: any) {\n const { typeParameters } = node;\n const parameters = process.env.BABEL_8_BREAKING\n ? node.params\n : node.parameters;\n this.print(typeParameters);\n this.token(\"(\");\n this._parameters(parameters, \")\");\n const returnType = process.env.BABEL_8_BREAKING\n ? node.returnType\n : node.typeAnnotation;\n this.print(returnType);\n}\n\nexport function tsPrintClassMemberModifiers(\n this: Printer,\n node:\n | t.ClassProperty\n | t.ClassAccessorProperty\n | t.ClassPrivateProperty\n | t.ClassMethod\n | t.ClassPrivateMethod\n | t.TSDeclareMethod,\n) {\n const isPrivateField = node.type === \"ClassPrivateProperty\";\n const isPublicField =\n node.type === \"ClassAccessorProperty\" || node.type === \"ClassProperty\";\n printModifiersList(this, node, [\n isPublicField && node.declare && \"declare\",\n !isPrivateField && node.accessibility,\n ]);\n if (node.static) {\n this.word(\"static\");\n this.space();\n }\n printModifiersList(this, node, [\n !isPrivateField && node.abstract && \"abstract\",\n !isPrivateField && node.override && \"override\",\n (isPublicField || isPrivateField) && node.readonly && \"readonly\",\n ]);\n}\n\nfunction printBraced(printer: Printer, node: t.Node, cb: () => void) {\n printer.token(\"{\");\n const exit = printer.enterDelimited();\n cb();\n exit();\n printer.rightBrace(node);\n}\n\nfunction printModifiersList(\n printer: Printer,\n node: t.Node,\n modifiers: (string | false | null)[],\n) {\n const modifiersSet = new Set<string>();\n for (const modifier of modifiers) {\n if (modifier) modifiersSet.add(modifier);\n }\n\n printer.tokenMap?.find(node, tok => {\n if (modifiersSet.has(tok.value)) {\n printer.token(tok.value);\n printer.space();\n modifiersSet.delete(tok.value);\n return modifiersSet.size === 0;\n }\n });\n\n for (const modifier of modifiersSet) {\n printer.word(modifier);\n printer.space();\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGO,SAASA,gBAAgBA,CAE9BC,IAAwB,EACxBC,MAAc,EACd;EAGA,IAAI,CAACC,KAAK,CACR,CAACD,MAAM,CAACE,IAAI,KAAK,gBAAgB,IAAIF,MAAM,CAACE,IAAI,KAAK,mBAAmB,KAKlEF,MAAM,CAACG,cAAc,KAAMJ,IAAI,GACjC,IAAI,GACJ,GACN,CAAC;EACD,IAAI,CAACK,KAAK,CAAC,CAAC;EAEZ,IAAIL,IAAI,CAACM,QAAQ,EAAE,IAAI,CAACJ,SAAK,GAAI,CAAC;EAClC,I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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
|
| 3 |
+
Object.defineProperty(exports, "__esModule", {
|
| 4 |
+
value: true
|
| 5 |
+
});
|
| 6 |
+
exports.default = void 0;
|
| 7 |
+
exports.generate = generate;
|
| 8 |
+
var _sourceMap = require("./source-map.js");
|
| 9 |
+
var _printer = require("./printer.js");
|
| 10 |
+
function normalizeOptions(code, opts, ast) {
|
| 11 |
+
if (opts.experimental_preserveFormat) {
|
| 12 |
+
if (typeof code !== "string") {
|
| 13 |
+
throw new Error("`experimental_preserveFormat` requires the original `code` to be passed to @babel/generator as a string");
|
| 14 |
+
}
|
| 15 |
+
if (!opts.retainLines) {
|
| 16 |
+
throw new Error("`experimental_preserveFormat` requires `retainLines` to be set to `true`");
|
| 17 |
+
}
|
| 18 |
+
if (opts.compact && opts.compact !== "auto") {
|
| 19 |
+
throw new Error("`experimental_preserveFormat` is not compatible with the `compact` option");
|
| 20 |
+
}
|
| 21 |
+
if (opts.minified) {
|
| 22 |
+
throw new Error("`experimental_preserveFormat` is not compatible with the `minified` option");
|
| 23 |
+
}
|
| 24 |
+
if (opts.jsescOption) {
|
| 25 |
+
throw new Error("`experimental_preserveFormat` is not compatible with the `jsescOption` option");
|
| 26 |
+
}
|
| 27 |
+
if (!Array.isArray(ast.tokens)) {
|
| 28 |
+
throw new Error("`experimental_preserveFormat` requires the AST to have attached the token of the input code. Make sure to enable the `tokens: true` parser option.");
|
| 29 |
+
}
|
| 30 |
+
}
|
| 31 |
+
const format = {
|
| 32 |
+
auxiliaryCommentBefore: opts.auxiliaryCommentBefore,
|
| 33 |
+
auxiliaryCommentAfter: opts.auxiliaryCommentAfter,
|
| 34 |
+
shouldPrintComment: opts.shouldPrintComment,
|
| 35 |
+
preserveFormat: opts.experimental_preserveFormat,
|
| 36 |
+
retainLines: opts.retainLines,
|
| 37 |
+
retainFunctionParens: opts.retainFunctionParens,
|
| 38 |
+
comments: opts.comments == null || opts.comments,
|
| 39 |
+
compact: opts.compact,
|
| 40 |
+
minified: opts.minified,
|
| 41 |
+
concise: opts.concise,
|
| 42 |
+
indent: {
|
| 43 |
+
adjustMultilineComment: true,
|
| 44 |
+
style: " "
|
| 45 |
+
},
|
| 46 |
+
jsescOption: Object.assign({
|
| 47 |
+
quotes: "double",
|
| 48 |
+
wrap: true,
|
| 49 |
+
minimal: false
|
| 50 |
+
}, opts.jsescOption),
|
| 51 |
+
topicToken: opts.topicToken,
|
| 52 |
+
importAttributesKeyword: opts.importAttributesKeyword
|
| 53 |
+
};
|
| 54 |
+
{
|
| 55 |
+
var _opts$recordAndTupleS;
|
| 56 |
+
format.decoratorsBeforeExport = opts.decoratorsBeforeExport;
|
| 57 |
+
format.jsescOption.json = opts.jsonCompatibleStrings;
|
| 58 |
+
format.recordAndTupleSyntaxType = (_opts$recordAndTupleS = opts.recordAndTupleSyntaxType) != null ? _opts$recordAndTupleS : "hash";
|
| 59 |
+
}
|
| 60 |
+
if (format.minified) {
|
| 61 |
+
format.compact = true;
|
| 62 |
+
format.shouldPrintComment = format.shouldPrintComment || (() => format.comments);
|
| 63 |
+
} else {
|
| 64 |
+
format.shouldPrintComment = format.shouldPrintComment || (value => format.comments || value.includes("@license") || value.includes("@preserve"));
|
| 65 |
+
}
|
| 66 |
+
if (format.compact === "auto") {
|
| 67 |
+
format.compact = typeof code === "string" && code.length > 500000;
|
| 68 |
+
if (format.compact) {
|
| 69 |
+
console.error("[BABEL] Note: The code generator has deoptimised the styling of " + `${opts.filename} as it exceeds the max of ${"500KB"}.`);
|
| 70 |
+
}
|
| 71 |
+
}
|
| 72 |
+
if (format.compact || format.preserveFormat) {
|
| 73 |
+
format.indent.adjustMultilineComment = false;
|
| 74 |
+
}
|
| 75 |
+
const {
|
| 76 |
+
auxiliaryCommentBefore,
|
| 77 |
+
auxiliaryCommentAfter,
|
| 78 |
+
shouldPrintComment
|
| 79 |
+
} = format;
|
| 80 |
+
if (auxiliaryCommentBefore && !shouldPrintComment(auxiliaryCommentBefore)) {
|
| 81 |
+
format.auxiliaryCommentBefore = undefined;
|
| 82 |
+
}
|
| 83 |
+
if (auxiliaryCommentAfter && !shouldPrintComment(auxiliaryCommentAfter)) {
|
| 84 |
+
format.auxiliaryCommentAfter = undefined;
|
| 85 |
+
}
|
| 86 |
+
return format;
|
| 87 |
+
}
|
| 88 |
+
{
|
| 89 |
+
exports.CodeGenerator = class CodeGenerator {
|
| 90 |
+
constructor(ast, opts = {}, code) {
|
| 91 |
+
this._ast = void 0;
|
| 92 |
+
this._format = void 0;
|
| 93 |
+
this._map = void 0;
|
| 94 |
+
this._ast = ast;
|
| 95 |
+
this._format = normalizeOptions(code, opts, ast);
|
| 96 |
+
this._map = opts.sourceMaps ? new _sourceMap.default(opts, code) : null;
|
| 97 |
+
}
|
| 98 |
+
generate() {
|
| 99 |
+
const printer = new _printer.default(this._format, this._map);
|
| 100 |
+
return printer.generate(this._ast);
|
| 101 |
+
}
|
| 102 |
+
};
|
| 103 |
+
}
|
| 104 |
+
function generate(ast, opts = {}, code) {
|
| 105 |
+
const format = normalizeOptions(code, opts, ast);
|
| 106 |
+
const map = opts.sourceMaps ? new _sourceMap.default(opts, code) : null;
|
| 107 |
+
const printer = new _printer.default(format, map, ast.tokens, typeof code === "string" ? code : null);
|
| 108 |
+
return printer.generate(ast);
|
| 109 |
+
}
|
| 110 |
+
var _default = exports.default = generate;
|
| 111 |
+
|
| 112 |
+
//# sourceMappingURL=index.js.map
|
novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"names":["_sourceMap","require","_printer","normalizeOptions","code","opts","ast","experimental_preserveFormat","Error","retainLines","compact","minified","jsescOption","Array","isArray","tokens","format","auxiliaryCommentBefore","auxiliaryCommentAfter","shouldPrintComment","preserveFormat","retainFunctionParens","comments","concise","indent","adjustMultilineComment","style","Object","assign","quotes","wrap","minimal","topicToken","importAttributesKeyword","_opts$recordAndTupleS","decoratorsBeforeExport","json","jsonCompatibleStrings","recordAndTupleSyntaxType","value","includes","length","console","error","filename","undefined","exports","CodeGenerator","constructor","_ast","_format","_map","sourceMaps","SourceMap","generate","printer","Printer","map","_default","default"],"sources":["../src/index.ts"],"sourcesContent":["import SourceMap from \"./source-map.ts\";\nimport Printer from \"./printer.ts\";\nimport type * as t from \"@babel/types\";\nimport type { Opts as jsescOptions } from \"jsesc\";\nimport type { Format } from \"./printer.ts\";\nimport type {\n EncodedSourceMap,\n DecodedSourceMap,\n Mapping,\n} from \"@jridgewell/gen-mapping\";\n\n/**\n * Normalize generator options, setting defaults.\n *\n * - Detects code indentation.\n * - If `opts.compact = \"auto\"` and the code is over 500KB, `compact` will be set to `true`.\n */\n\nfunction normalizeOptions(\n code: string | { [filename: string]: string },\n opts: GeneratorOptions,\n ast: t.Node,\n): Format {\n if (opts.experimental_preserveFormat) {\n if (typeof code !== \"string\") {\n throw new Error(\n \"`experimental_preserveFormat` requires the original `code` to be passed to @babel/generator as a string\",\n );\n }\n if (!opts.retainLines) {\n throw new Error(\n \"`experimental_preserveFormat` requires `retainLines` to be set to `true`\",\n );\n }\n if (opts.compact && opts.compact !== \"auto\") {\n throw new Error(\n \"`experimental_preserveFormat` is not compatible with the `compact` option\",\n );\n }\n if (opts.minified) {\n throw new Error(\n \"`experimental_preserveFormat` is not compatible with the `minified` option\",\n );\n }\n if (opts.jsescOption) {\n throw new Error(\n \"`experimental_preserveFormat` is not compatible with the `jsescOption` option\",\n );\n }\n if (!Array.isArray((ast as any).tokens)) {\n throw new Error(\n \"`experimental_preserveFormat` requires the AST to have attached the token of the input code. Make sure to enable the `tokens: true` parser option.\",\n );\n }\n }\n\n const format: Format = {\n auxiliaryCommentBefore: opts.auxiliaryCommentBefore,\n auxiliaryCommentAfter: opts.auxiliaryCommentAfter,\n shouldPrintComment: opts.shouldPrintComment,\n preserveFormat: opts.experimental_preserveFormat,\n retainLines: opts.retainLines,\n retainFunctionParens: opts.retainFunctionParens,\n comments: opts.comments == null || opts.comments,\n compact: opts.compact,\n minified: opts.minified,\n concise: opts.concise,\n indent: {\n adjustMultilineComment: true,\n style: \" \",\n },\n jsescOption: {\n quotes: \"double\",\n wrap: true,\n minimal: process.env.BABEL_8_BREAKING ? true : false,\n ...opts.jsescOption,\n },\n topicToken: opts.topicToken,\n importAttributesKeyword: opts.importAttributesKeyword,\n };\n\n if (!process.env.BABEL_8_BREAKING) {\n format.decoratorsBeforeExport = opts.decoratorsBeforeExport;\n format.jsescOption.json = opts.jsonCompatibleStrings;\n format.recordAndTupleSyntaxType = opts.recordAndTupleSyntaxType ?? \"hash\";\n }\n\n if (format.minified) {\n format.compact = true;\n\n format.shouldPrintComment =\n format.shouldPrintComment || (() => format.comments);\n } else {\n format.shouldPrintComment =\n format.shouldPrintComment ||\n (value =>\n format.comments ||\n value.includes(\"@license\") ||\n value.includes(\"@preserve\"));\n }\n\n if (format.compact === \"auto\") {\n format.compact = typeof code === \"string\" && code.length > 500_000; // 500KB\n\n if (format.compact) {\n console.error(\n \"[BABEL] Note: The code generator has deoptimised the styling of \" +\n `${opts.filename} as it exceeds the max of ${\"500KB\"}.`,\n );\n }\n }\n\n if (format.compact || format.preserveFormat) {\n format.indent.adjustMultilineComment = false;\n }\n\n const { auxiliaryCommentBefore, auxiliaryCommentAfter, shouldPrintComment } =\n format;\n\n if (auxiliaryCommentBefore && !shouldPrintComment(auxiliaryCommentBefore)) {\n format.auxiliaryCommentBefore = undefined;\n }\n if (auxiliaryCommentAfter && !shouldPrintComment(auxiliaryCommentAfter)) {\n format.auxiliaryCommentAfter = undefined;\n }\n\n return format;\n}\n\nexport interface GeneratorOptions {\n /**\n * Optional string to add as a block comment at the start of the output file.\n */\n auxiliaryCommentBefore?: string;\n\n /**\n * Optional string to add as a block comment at the end of the output file.\n */\n auxiliaryCommentAfter?: string;\n\n /**\n * Function that takes a comment (as a string) and returns true if the comment should be included in the output.\n * By default, comments are included if `opts.comments` is `true` or if `opts.minified` is `false` and the comment\n * contains `@preserve` or `@license`.\n */\n shouldPrintComment?(comment: string): boolean;\n\n /**\n * Preserve the input code format while printing the transformed code.\n * This is experimental, and may have breaking changes in future\n * patch releases. It will be removed in a future minor release,\n * when it will graduate to stable.\n */\n experimental_preserveFormat?: boolean;\n\n /**\n * Attempt to use the same line numbers in the output code as in the source code (helps preserve stack traces).\n * Defaults to `false`.\n */\n retainLines?: boolean;\n\n /**\n * Retain parens around function expressions (could be used to change engine parsing behavior)\n * Defaults to `false`.\n */\n retainFunctionParens?: boolean;\n\n /**\n * Should comments be included in output? Defaults to `true`.\n */\n comments?: boolean;\n\n /**\n * Set to true to avoid adding whitespace for formatting. Defaults to the value of `opts.minified`.\n */\n compact?: boolean | \"auto\";\n\n /**\n * Should the output be minified. Defaults to `false`.\n */\n minified?: boolean;\n\n /**\n * Set to true to reduce whitespace (but not as much as opts.compact). Defaults to `false`.\n */\n concise?: boolean;\n\n /**\n * Used in warning messages\n */\n filename?: string;\n\n /**\n * Enable generating source maps. Defaults to `false`.\n */\n sourceMaps?: boolean;\n\n inputSourceMap?: any;\n\n /**\n * A root for all relative URLs in the source map.\n */\n sourceRoot?: string;\n\n /**\n * The filename for the source code (i.e. the code in the `code` argument).\n * This will only be used if `code` is a string.\n */\n sourceFileName?: string;\n\n /**\n * Set to true to run jsesc with \"json\": true to print \"\\u00A9\" vs. \"©\";\n * @deprecated use `jsescOptions: { json: true }` instead\n */\n jsonCompatibleStrings?: boolean;\n\n /**\n * Set to true to enable support for experimental decorators syntax before\n * module exports. If not specified, decorators will be printed in the same\n * position as they were in the input source code.\n * @deprecated Removed in Babel 8\n */\n decoratorsBeforeExport?: boolean;\n\n /**\n * Options for outputting jsesc representation.\n */\n jsescOption?: jsescOptions;\n\n /**\n * For use with the recordAndTuple token.\n * @deprecated It will be removed in Babel 8.\n */\n recordAndTupleSyntaxType?: \"bar\" | \"hash\";\n\n /**\n * For use with the Hack-style pipe operator.\n * Changes what token is used for pipe bodies’ topic references.\n */\n topicToken?: \"%\" | \"#\" | \"@@\" | \"^^\" | \"^\";\n\n /**\n * The import attributes syntax style:\n * - \"with\" : `import { a } from \"b\" with { type: \"json\" };`\n * - \"assert\" : `import { a } from \"b\" assert { type: \"json\" };`\n * - \"with-legacy\" : `import { a } from \"b\" with type: \"json\";`\n */\n importAttributesKeyword?: \"with\" | \"assert\" | \"with-legacy\";\n}\n\nexport interface GeneratorResult {\n code: string;\n map: EncodedSourceMap | null;\n decodedMap: DecodedSourceMap | undefined;\n rawMappings: Mapping[] | undefined;\n}\n\nif (!process.env.BABEL_8_BREAKING && !USE_ESM) {\n /**\n * We originally exported the Generator class above, but to make it extra clear that it is a private API,\n * we have moved that to an internal class instance and simplified the interface to the two public methods\n * that we wish to support.\n */\n\n // eslint-disable-next-line no-restricted-globals\n exports.CodeGenerator = class CodeGenerator {\n private _ast: t.Node;\n private _format: Format | undefined;\n private _map: SourceMap | null;\n constructor(ast: t.Node, opts: GeneratorOptions = {}, code?: string) {\n this._ast = ast;\n this._format = normalizeOptions(code, opts, ast);\n this._map = opts.sourceMaps ? new SourceMap(opts, code) : null;\n }\n generate(): GeneratorResult {\n const printer = new Printer(this._format, this._map);\n\n return printer.generate(this._ast);\n }\n };\n}\n\n/**\n * Turns an AST into code, maintaining sourcemaps, user preferences, and valid output.\n * @param ast - the abstract syntax tree from which to generate output code.\n * @param opts - used for specifying options for code generation.\n * @param code - the original source code, used for source maps.\n * @returns - an object containing the output code and source map.\n */\nexport function generate(\n ast: t.Node,\n opts: GeneratorOptions = {},\n code?: string | { [filename: string]: string },\n): GeneratorResult {\n const format = normalizeOptions(code, opts, ast);\n const map = opts.sourceMaps ? new SourceMap(opts, code) : null;\n\n const printer = new Printer(\n format,\n map,\n (ast as any).tokens,\n typeof code === \"string\" ? code : null,\n );\n\n return printer.generate(ast);\n}\n\nexport default generate;\n"],"mappings":";;;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAiBA,SAASE,gBAAgBA,CACvBC,IAA6C,EAC7CC,IAAsB,EACtBC,GAAW,EACH;EACR,IAAID,IAAI,CAACE,2BAA2B,EAAE;IACpC,IAAI,OAAOH,IAAI,KAAK,QAAQ,EAAE;MAC5B,MAAM,IAAII,KAAK,CACb,yGACF,CAAC;IACH;IACA,IAAI,CAACH,IAAI,CAACI,WAAW,EAAE;MACrB,MAAM,IAAID,KAAK,CACb,0EACF,CAAC;IACH;IACA,IAAIH,IAAI,CAACK,OAAO,IAAIL,IAAI,CAACK,OAAO,KAAK,MAAM,EAAE;MAC3C,MAAM,IAAIF,KAAK,CACb,2EACF,CAAC;IACH;IACA,IAAIH,IAAI,CAACM,QAAQ,EAAE;MACjB,MAAM,IAAIH,KAAK,CACb,4EACF,CAAC;IACH;IACA,IAAIH,IAAI,CAACO,WAAW,EAAE;MACpB,MAAM,IAAIJ,KAAK,CACb,+EACF,CAAC;IACH;IACA,IAAI,CAACK,KAAK,CAACC,OAAO,CAAER,GAAG,CAASS,MAAM,CAAC,EAAE;MACvC,MAAM,IAAIP,KAAK,CACb,oJACF,CAAC;IACH;EACF;EAEA,MAAMQ,MAAc,GAAG;IACrBC,sBAAsB,EAAEZ,IAAI,CAACY,sBAAsB;IACnDC,qBAAqB,EAAEb,IAAI,CAACa,qBAAqB;IACjDC,kBAAkB,EAAEd,IAAI,CAACc,kBAAkB;IAC3CC,cAAc,EAAEf,IAAI,CAACE,2BAA2B;IAChDE,WAAW,EAAEJ,IAAI,CAACI,WAAW;IAC7BY,oBAAoB,EAAEhB,IAAI,CAACgB,oBAAoB;IAC/CC,QAAQ,EAAEjB,IAAI,CAACiB,QAAQ,IAAI,IAAI,IA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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
|
| 3 |
+
Object.defineProperty(exports, "__esModule", {
|
| 4 |
+
value: true
|
| 5 |
+
});
|
| 6 |
+
exports.TokenContext = void 0;
|
| 7 |
+
exports.isLastChild = isLastChild;
|
| 8 |
+
exports.needsParens = needsParens;
|
| 9 |
+
exports.needsWhitespace = needsWhitespace;
|
| 10 |
+
exports.needsWhitespaceAfter = needsWhitespaceAfter;
|
| 11 |
+
exports.needsWhitespaceBefore = needsWhitespaceBefore;
|
| 12 |
+
var whitespace = require("./whitespace.js");
|
| 13 |
+
var parens = require("./parentheses.js");
|
| 14 |
+
var _t = require("@babel/types");
|
| 15 |
+
const {
|
| 16 |
+
FLIPPED_ALIAS_KEYS,
|
| 17 |
+
VISITOR_KEYS,
|
| 18 |
+
isCallExpression,
|
| 19 |
+
isDecorator,
|
| 20 |
+
isExpressionStatement,
|
| 21 |
+
isMemberExpression,
|
| 22 |
+
isNewExpression,
|
| 23 |
+
isParenthesizedExpression
|
| 24 |
+
} = _t;
|
| 25 |
+
const TokenContext = exports.TokenContext = {
|
| 26 |
+
normal: 0,
|
| 27 |
+
expressionStatement: 1,
|
| 28 |
+
arrowBody: 2,
|
| 29 |
+
exportDefault: 4,
|
| 30 |
+
arrowFlowReturnType: 8,
|
| 31 |
+
forInitHead: 16,
|
| 32 |
+
forInHead: 32,
|
| 33 |
+
forOfHead: 64,
|
| 34 |
+
forInOrInitHeadAccumulate: 128,
|
| 35 |
+
forInOrInitHeadAccumulatePassThroughMask: 128
|
| 36 |
+
};
|
| 37 |
+
function expandAliases(obj) {
|
| 38 |
+
const map = new Map();
|
| 39 |
+
function add(type, func) {
|
| 40 |
+
const fn = map.get(type);
|
| 41 |
+
map.set(type, fn ? function (node, parent, stack, getRawIdentifier) {
|
| 42 |
+
var _fn;
|
| 43 |
+
return (_fn = fn(node, parent, stack, getRawIdentifier)) != null ? _fn : func(node, parent, stack, getRawIdentifier);
|
| 44 |
+
} : func);
|
| 45 |
+
}
|
| 46 |
+
for (const type of Object.keys(obj)) {
|
| 47 |
+
const aliases = FLIPPED_ALIAS_KEYS[type];
|
| 48 |
+
if (aliases) {
|
| 49 |
+
for (const alias of aliases) {
|
| 50 |
+
add(alias, obj[type]);
|
| 51 |
+
}
|
| 52 |
+
} else {
|
| 53 |
+
add(type, obj[type]);
|
| 54 |
+
}
|
| 55 |
+
}
|
| 56 |
+
return map;
|
| 57 |
+
}
|
| 58 |
+
const expandedParens = expandAliases(parens);
|
| 59 |
+
const expandedWhitespaceNodes = expandAliases(whitespace.nodes);
|
| 60 |
+
function isOrHasCallExpression(node) {
|
| 61 |
+
if (isCallExpression(node)) {
|
| 62 |
+
return true;
|
| 63 |
+
}
|
| 64 |
+
return isMemberExpression(node) && isOrHasCallExpression(node.object);
|
| 65 |
+
}
|
| 66 |
+
function needsWhitespace(node, parent, type) {
|
| 67 |
+
var _expandedWhitespaceNo;
|
| 68 |
+
if (!node) return false;
|
| 69 |
+
if (isExpressionStatement(node)) {
|
| 70 |
+
node = node.expression;
|
| 71 |
+
}
|
| 72 |
+
const flag = (_expandedWhitespaceNo = expandedWhitespaceNodes.get(node.type)) == null ? void 0 : _expandedWhitespaceNo(node, parent);
|
| 73 |
+
if (typeof flag === "number") {
|
| 74 |
+
return (flag & type) !== 0;
|
| 75 |
+
}
|
| 76 |
+
return false;
|
| 77 |
+
}
|
| 78 |
+
function needsWhitespaceBefore(node, parent) {
|
| 79 |
+
return needsWhitespace(node, parent, 1);
|
| 80 |
+
}
|
| 81 |
+
function needsWhitespaceAfter(node, parent) {
|
| 82 |
+
return needsWhitespace(node, parent, 2);
|
| 83 |
+
}
|
| 84 |
+
function needsParens(node, parent, tokenContext, getRawIdentifier) {
|
| 85 |
+
var _expandedParens$get;
|
| 86 |
+
if (!parent) return false;
|
| 87 |
+
if (isNewExpression(parent) && parent.callee === node) {
|
| 88 |
+
if (isOrHasCallExpression(node)) return true;
|
| 89 |
+
}
|
| 90 |
+
if (isDecorator(parent)) {
|
| 91 |
+
return !isDecoratorMemberExpression(node) && !(isCallExpression(node) && isDecoratorMemberExpression(node.callee)) && !isParenthesizedExpression(node);
|
| 92 |
+
}
|
| 93 |
+
return (_expandedParens$get = expandedParens.get(node.type)) == null ? void 0 : _expandedParens$get(node, parent, tokenContext, getRawIdentifier);
|
| 94 |
+
}
|
| 95 |
+
function isDecoratorMemberExpression(node) {
|
| 96 |
+
switch (node.type) {
|
| 97 |
+
case "Identifier":
|
| 98 |
+
return true;
|
| 99 |
+
case "MemberExpression":
|
| 100 |
+
return !node.computed && node.property.type === "Identifier" && isDecoratorMemberExpression(node.object);
|
| 101 |
+
default:
|
| 102 |
+
return false;
|
| 103 |
+
}
|
| 104 |
+
}
|
| 105 |
+
function isLastChild(parent, child) {
|
| 106 |
+
const visitorKeys = VISITOR_KEYS[parent.type];
|
| 107 |
+
for (let i = visitorKeys.length - 1; i >= 0; i--) {
|
| 108 |
+
const val = parent[visitorKeys[i]];
|
| 109 |
+
if (val === child) {
|
| 110 |
+
return true;
|
| 111 |
+
} else if (Array.isArray(val)) {
|
| 112 |
+
let j = val.length - 1;
|
| 113 |
+
while (j >= 0 && val[j] === null) j--;
|
| 114 |
+
return j >= 0 && val[j] === child;
|
| 115 |
+
} else if (val) {
|
| 116 |
+
return false;
|
| 117 |
+
}
|
| 118 |
+
}
|
| 119 |
+
return false;
|
| 120 |
+
}
|
| 121 |
+
|
| 122 |
+
//# sourceMappingURL=index.js.map
|
novas/novacore-zephyr/claude-code-router/node_modules/@babel/generator/lib/node/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"names":["whitespace","require","parens","_t","FLIPPED_ALIAS_KEYS","VISITOR_KEYS","isCallExpression","isDecorator","isExpressionStatement","isMemberExpression","isNewExpression","isParenthesizedExpression","TokenContext","exports","normal","expressionStatement","arrowBody","exportDefault","arrowFlowReturnType","forInitHead","forInHead","forOfHead","forInOrInitHeadAccumulate","forInOrInitHeadAccumulatePassThroughMask","expandAliases","obj","map","Map","add","type","func","fn","get","set","node","parent","stack","getRawIdentifier","_fn","Object","keys","aliases","alias","expandedParens","expandedWhitespaceNodes","nodes","isOrHasCallExpression","object","needsWhitespace","_expandedWhitespaceNo","expression","flag","needsWhitespaceBefore","needsWhitespaceAfter","needsParens","tokenContext","_expandedParens$get","callee","isDecoratorMemberExpression","computed","property","isLastChild","child","visitorKeys","i","length","val","Array","isArray","j"],"sources":["../../src/node/index.ts"],"sourcesContent":["import * as whitespace from \"./whitespace.ts\";\nimport * as parens from \"./parentheses.ts\";\nimport {\n FLIPPED_ALIAS_KEYS,\n VISITOR_KEYS,\n isCallExpression,\n isDecorator,\n isExpressionStatement,\n isMemberExpression,\n isNewExpression,\n isParenthesizedExpression,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\n\nimport type { WhitespaceFlag } from \"./whitespace.ts\";\n\nexport const enum TokenContext {\n normal = 0,\n expressionStatement = 1 << 0,\n arrowBody = 1 << 1,\n exportDefault = 1 << 2,\n arrowFlowReturnType = 1 << 3,\n forInitHead = 1 << 4,\n forInHead = 1 << 5,\n forOfHead = 1 << 6,\n // This flag lives across the token boundary, and will\n // be reset after forIn or forInit head is printed\n forInOrInitHeadAccumulate = 1 << 7,\n forInOrInitHeadAccumulatePassThroughMask = 0x80,\n}\n\ntype NodeHandler<R> = (\n node: t.Node,\n // todo:\n // node: K extends keyof typeof t\n // ? Extract<typeof t[K], { type: \"string\" }>\n // : t.Node,\n parent: t.Node,\n tokenContext?: number,\n getRawIdentifier?: (node: t.Identifier) => string,\n) => R;\n\nexport type NodeHandlers<R> = {\n [K in string]?: NodeHandler<R>;\n};\n\nfunction expandAliases<R>(obj: NodeHandlers<R>) {\n const map = new Map<string, NodeHandler<R>>();\n\n function add(type: string, func: NodeHandler<R>) {\n const fn = map.get(type);\n map.set(\n type,\n fn\n ? function (node, parent, stack, getRawIdentifier) {\n return (\n fn(node, parent, stack, getRawIdentifier) ??\n func(node, parent, stack, getRawIdentifier)\n );\n }\n : func,\n );\n }\n\n for (const type of Object.keys(obj)) {\n const aliases = FLIPPED_ALIAS_KEYS[type];\n if (aliases) {\n for (const alias of aliases) {\n add(alias, obj[type]);\n }\n } else {\n add(type, obj[type]);\n }\n }\n\n return map;\n}\n\n// Rather than using `t.is` on each object property, we pre-expand any type aliases\n// into concrete types so that the 'find' call below can be as fast as possible.\nconst expandedParens = expandAliases(parens);\nconst expandedWhitespaceNodes = expandAliases(whitespace.nodes);\n\nfunction isOrHasCallExpression(node: t.Node): boolean {\n if (isCallExpression(node)) {\n return true;\n }\n\n return isMemberExpression(node) && isOrHasCallExpression(node.object);\n}\n\nexport function needsWhitespace(\n node: t.Node,\n parent: t.Node,\n type: WhitespaceFlag,\n): boolean {\n if (!node) return false;\n\n if (isExpressionStatement(node)) {\n node = node.expression;\n }\n\n const flag = expandedWhitespaceNodes.get(node.type)?.(node, parent);\n\n if (typeof flag === \"number\") {\n return (flag & type) !== 0;\n }\n\n return false;\n}\n\nexport function needsWhitespaceBefore(node: t.Node, parent: t.Node) {\n return needsWhitespace(node, parent, 1);\n}\n\nexport function needsWhitespaceAfter(node: t.Node, parent: t.Node) {\n return needsWhitespace(node, parent, 2);\n}\n\nexport function needsParens(\n node: t.Node,\n parent: t.Node,\n tokenContext?: number,\n getRawIdentifier?: (node: t.Identifier) => string,\n) {\n if (!parent) return false;\n\n if (isNewExpression(parent) && parent.callee === node) {\n if (isOrHasCallExpression(node)) return true;\n }\n\n if (isDecorator(parent)) {\n return (\n !isDecoratorMemberExpression(node) &&\n !(isCallExpression(node) && isDecoratorMemberExpression(node.callee)) &&\n !isParenthesizedExpression(node)\n );\n }\n\n return expandedParens.get(node.type)?.(\n node,\n parent,\n tokenContext,\n getRawIdentifier,\n );\n}\n\nfunction isDecoratorMemberExpression(node: t.Node): boolean {\n switch (node.type) {\n case \"Identifier\":\n return true;\n case \"MemberExpression\":\n return (\n !node.computed &&\n node.property.type === \"Identifier\" &&\n isDecoratorMemberExpression(node.object)\n );\n default:\n return false;\n }\n}\n\nexport function isLastChild(parent: t.Node, child: t.Node) {\n const visitorKeys = VISITOR_KEYS[parent.type];\n for (let i = visitorKeys.length - 1; i >= 0; i--) {\n const val = (parent as any)[visitorKeys[i]] as t.Node | t.Node[] | null;\n if (val === child) {\n return true;\n } else if (Array.isArray(val)) {\n let j = val.length - 1;\n while (j >= 0 && val[j] === null) j--;\n return j >= 0 && val[j] === child;\n } else if (val) {\n return false;\n }\n }\n return false;\n}\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,EAAA,GAAAF,OAAA;AASsB;EARpBG,kBAAkB;EAClBC,YAAY;EACZC,gBAAgB;EAChBC,WAAW;EACXC,qBAAqB;EACrBC,kBAAkB;EAClBC,eAAe;EACfC;AAAyB,IAAAR,EAAA;AAAA,MAMTS,YAAY,GAAAC,OAAA,CAAAD,YAAA;EAAAE,MAAA;EAAAC,mBAAA;EAAAC,SAAA;EAAAC,aAAA;EAAAC,mBAAA;EAAAC,WAAA;EAAAC,SAAA;EAAAC,SAAA;EAAAC,yBAAA;EAAAC,wCAAA;AAAA;AA8B9B,SAASC,aAAaA,CAAIC,GAAoB,EAAE;EAC9C,MAAMC,GAAG,GAAG,IAAIC,GAAG,CAAyB,CAAC;EAE7C,SAASC,GAAG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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
|
| 3 |
+
Object.defineProperty(exports, "__esModule", {
|
| 4 |
+
value: true
|
| 5 |
+
});
|
| 6 |
+
exports.AssignmentExpression = AssignmentExpression;
|
| 7 |
+
exports.Binary = Binary;
|
| 8 |
+
exports.BinaryExpression = BinaryExpression;
|
| 9 |
+
exports.ClassExpression = ClassExpression;
|
| 10 |
+
exports.ArrowFunctionExpression = exports.ConditionalExpression = ConditionalExpression;
|
| 11 |
+
exports.DoExpression = DoExpression;
|
| 12 |
+
exports.FunctionExpression = FunctionExpression;
|
| 13 |
+
exports.FunctionTypeAnnotation = FunctionTypeAnnotation;
|
| 14 |
+
exports.Identifier = Identifier;
|
| 15 |
+
exports.LogicalExpression = LogicalExpression;
|
| 16 |
+
exports.NullableTypeAnnotation = NullableTypeAnnotation;
|
| 17 |
+
exports.ObjectExpression = ObjectExpression;
|
| 18 |
+
exports.OptionalIndexedAccessType = OptionalIndexedAccessType;
|
| 19 |
+
exports.OptionalCallExpression = exports.OptionalMemberExpression = OptionalMemberExpression;
|
| 20 |
+
exports.SequenceExpression = SequenceExpression;
|
| 21 |
+
exports.TSSatisfiesExpression = exports.TSAsExpression = TSAsExpression;
|
| 22 |
+
exports.TSConditionalType = TSConditionalType;
|
| 23 |
+
exports.TSConstructorType = exports.TSFunctionType = TSFunctionType;
|
| 24 |
+
exports.TSInferType = TSInferType;
|
| 25 |
+
exports.TSInstantiationExpression = TSInstantiationExpression;
|
| 26 |
+
exports.TSIntersectionType = TSIntersectionType;
|
| 27 |
+
exports.UnaryLike = exports.TSTypeAssertion = UnaryLike;
|
| 28 |
+
exports.TSTypeOperator = TSTypeOperator;
|
| 29 |
+
exports.TSUnionType = TSUnionType;
|
| 30 |
+
exports.IntersectionTypeAnnotation = exports.UnionTypeAnnotation = UnionTypeAnnotation;
|
| 31 |
+
exports.UpdateExpression = UpdateExpression;
|
| 32 |
+
exports.AwaitExpression = exports.YieldExpression = YieldExpression;
|
| 33 |
+
var _t = require("@babel/types");
|
| 34 |
+
var _index = require("./index.js");
|
| 35 |
+
const {
|
| 36 |
+
isArrayTypeAnnotation,
|
| 37 |
+
isBinaryExpression,
|
| 38 |
+
isCallExpression,
|
| 39 |
+
isForOfStatement,
|
| 40 |
+
isIndexedAccessType,
|
| 41 |
+
isMemberExpression,
|
| 42 |
+
isObjectPattern,
|
| 43 |
+
isOptionalMemberExpression,
|
| 44 |
+
isYieldExpression,
|
| 45 |
+
isStatement
|
| 46 |
+
} = _t;
|
| 47 |
+
const PRECEDENCE = new Map([["||", 0], ["??", 0], ["|>", 0], ["&&", 1], ["|", 2], ["^", 3], ["&", 4], ["==", 5], ["===", 5], ["!=", 5], ["!==", 5], ["<", 6], [">", 6], ["<=", 6], [">=", 6], ["in", 6], ["instanceof", 6], [">>", 7], ["<<", 7], [">>>", 7], ["+", 8], ["-", 8], ["*", 9], ["/", 9], ["%", 9], ["**", 10]]);
|
| 48 |
+
function getBinaryPrecedence(node, nodeType) {
|
| 49 |
+
if (nodeType === "BinaryExpression" || nodeType === "LogicalExpression") {
|
| 50 |
+
return PRECEDENCE.get(node.operator);
|
| 51 |
+
}
|
| 52 |
+
if (nodeType === "TSAsExpression" || nodeType === "TSSatisfiesExpression") {
|
| 53 |
+
return PRECEDENCE.get("in");
|
| 54 |
+
}
|
| 55 |
+
}
|
| 56 |
+
function isTSTypeExpression(nodeType) {
|
| 57 |
+
return nodeType === "TSAsExpression" || nodeType === "TSSatisfiesExpression" || nodeType === "TSTypeAssertion";
|
| 58 |
+
}
|
| 59 |
+
const isClassExtendsClause = (node, parent) => {
|
| 60 |
+
const parentType = parent.type;
|
| 61 |
+
return (parentType === "ClassDeclaration" || parentType === "ClassExpression") && parent.superClass === node;
|
| 62 |
+
};
|
| 63 |
+
const hasPostfixPart = (node, parent) => {
|
| 64 |
+
const parentType = parent.type;
|
| 65 |
+
return (parentType === "MemberExpression" || parentType === "OptionalMemberExpression") && parent.object === node || (parentType === "CallExpression" || parentType === "OptionalCallExpression" || parentType === "NewExpression") && parent.callee === node || parentType === "TaggedTemplateExpression" && parent.tag === node || parentType === "TSNonNullExpression";
|
| 66 |
+
};
|
| 67 |
+
function NullableTypeAnnotation(node, parent) {
|
| 68 |
+
return isArrayTypeAnnotation(parent);
|
| 69 |
+
}
|
| 70 |
+
function FunctionTypeAnnotation(node, parent, tokenContext) {
|
| 71 |
+
const parentType = parent.type;
|
| 72 |
+
return (parentType === "UnionTypeAnnotation" || parentType === "IntersectionTypeAnnotation" || parentType === "ArrayTypeAnnotation" || Boolean(tokenContext & _index.TokenContext.arrowFlowReturnType)
|
| 73 |
+
);
|
| 74 |
+
}
|
| 75 |
+
function UpdateExpression(node, parent) {
|
| 76 |
+
return hasPostfixPart(node, parent) || isClassExtendsClause(node, parent);
|
| 77 |
+
}
|
| 78 |
+
function needsParenBeforeExpressionBrace(tokenContext) {
|
| 79 |
+
return Boolean(tokenContext & (_index.TokenContext.expressionStatement | _index.TokenContext.arrowBody));
|
| 80 |
+
}
|
| 81 |
+
function ObjectExpression(node, parent, tokenContext) {
|
| 82 |
+
return needsParenBeforeExpressionBrace(tokenContext);
|
| 83 |
+
}
|
| 84 |
+
function DoExpression(node, parent, tokenContext) {
|
| 85 |
+
return !node.async && Boolean(tokenContext & _index.TokenContext.expressionStatement);
|
| 86 |
+
}
|
| 87 |
+
function Binary(node, parent) {
|
| 88 |
+
const parentType = parent.type;
|
| 89 |
+
if (node.type === "BinaryExpression" && node.operator === "**" && parentType === "BinaryExpression" && parent.operator === "**") {
|
| 90 |
+
return parent.left === node;
|
| 91 |
+
}
|
| 92 |
+
if (isClassExtendsClause(node, parent)) {
|
| 93 |
+
return true;
|
| 94 |
+
}
|
| 95 |
+
if (hasPostfixPart(node, parent) || parentType === "UnaryExpression" || parentType === "SpreadElement" || parentType === "AwaitExpression") {
|
| 96 |
+
return true;
|
| 97 |
+
}
|
| 98 |
+
const parentPos = getBinaryPrecedence(parent, parentType);
|
| 99 |
+
if (parentPos != null) {
|
| 100 |
+
const nodePos = getBinaryPrecedence(node, node.type);
|
| 101 |
+
if (parentPos === nodePos && parentType === "BinaryExpression" && parent.right === node || parentPos > nodePos) {
|
| 102 |
+
return true;
|
| 103 |
+
}
|
| 104 |
+
}
|
| 105 |
+
return undefined;
|
| 106 |
+
}
|
| 107 |
+
function UnionTypeAnnotation(node, parent) {
|
| 108 |
+
const parentType = parent.type;
|
| 109 |
+
return parentType === "ArrayTypeAnnotation" || parentType === "NullableTypeAnnotation" || parentType === "IntersectionTypeAnnotation" || parentType === "UnionTypeAnnotation";
|
| 110 |
+
}
|
| 111 |
+
function OptionalIndexedAccessType(node, parent) {
|
| 112 |
+
return isIndexedAccessType(parent) && parent.objectType === node;
|
| 113 |
+
}
|
| 114 |
+
function TSAsExpression(node, parent) {
|
| 115 |
+
if ((parent.type === "AssignmentExpression" || parent.type === "AssignmentPattern") && parent.left === node) {
|
| 116 |
+
return true;
|
| 117 |
+
}
|
| 118 |
+
if (parent.type === "BinaryExpression" && (parent.operator === "|" || parent.operator === "&") && node === parent.left) {
|
| 119 |
+
return true;
|
| 120 |
+
}
|
| 121 |
+
return Binary(node, parent);
|
| 122 |
+
}
|
| 123 |
+
function TSConditionalType(node, parent) {
|
| 124 |
+
const parentType = parent.type;
|
| 125 |
+
if (parentType === "TSArrayType" || parentType === "TSIndexedAccessType" && parent.objectType === node || parentType === "TSOptionalType" || parentType === "TSTypeOperator" || parentType === "TSTypeParameter") {
|
| 126 |
+
return true;
|
| 127 |
+
}
|
| 128 |
+
if ((parentType === "TSIntersectionType" || parentType === "TSUnionType") && parent.types[0] === node) {
|
| 129 |
+
return true;
|
| 130 |
+
}
|
| 131 |
+
if (parentType === "TSConditionalType" && (parent.checkType === node || parent.extendsType === node)) {
|
| 132 |
+
return true;
|
| 133 |
+
}
|
| 134 |
+
return false;
|
| 135 |
+
}
|
| 136 |
+
function TSUnionType(node, parent) {
|
| 137 |
+
const parentType = parent.type;
|
| 138 |
+
return parentType === "TSIntersectionType" || parentType === "TSTypeOperator" || parentType === "TSArrayType" || parentType === "TSIndexedAccessType" && parent.objectType === node || parentType === "TSOptionalType";
|
| 139 |
+
}
|
| 140 |
+
function TSIntersectionType(node, parent) {
|
| 141 |
+
const parentType = parent.type;
|
| 142 |
+
return parentType === "TSTypeOperator" || parentType === "TSArrayType" || parentType === "TSIndexedAccessType" && parent.objectType === node || parentType === "TSOptionalType";
|
| 143 |
+
}
|
| 144 |
+
function TSInferType(node, parent) {
|
| 145 |
+
const parentType = parent.type;
|
| 146 |
+
if (parentType === "TSArrayType" || parentType === "TSIndexedAccessType" && parent.objectType === node || parentType === "TSOptionalType") {
|
| 147 |
+
return true;
|
| 148 |
+
}
|
| 149 |
+
if (node.typeParameter.constraint) {
|
| 150 |
+
if ((parentType === "TSIntersectionType" || parentType === "TSUnionType") && parent.types[0] === node) {
|
| 151 |
+
return true;
|
| 152 |
+
}
|
| 153 |
+
}
|
| 154 |
+
return false;
|
| 155 |
+
}
|
| 156 |
+
function TSTypeOperator(node, parent) {
|
| 157 |
+
const parentType = parent.type;
|
| 158 |
+
return parentType === "TSArrayType" || parentType === "TSIndexedAccessType" && parent.objectType === node || parentType === "TSOptionalType";
|
| 159 |
+
}
|
| 160 |
+
function TSInstantiationExpression(node, parent) {
|
| 161 |
+
const parentType = parent.type;
|
| 162 |
+
return (parentType === "CallExpression" || parentType === "OptionalCallExpression" || parentType === "NewExpression" || parentType === "TSInstantiationExpression") && !!parent.typeParameters;
|
| 163 |
+
}
|
| 164 |
+
function TSFunctionType(node, parent) {
|
| 165 |
+
const parentType = parent.type;
|
| 166 |
+
return parentType === "TSIntersectionType" || parentType === "TSUnionType" || parentType === "TSTypeOperator" || parentType === "TSOptionalType" || parentType === "TSArrayType" || parentType === "TSIndexedAccessType" && parent.objectType === node || parentType === "TSConditionalType" && (parent.checkType === node || parent.extendsType === node);
|
| 167 |
+
}
|
| 168 |
+
function BinaryExpression(node, parent, tokenContext) {
|
| 169 |
+
return node.operator === "in" && Boolean(tokenContext & _index.TokenContext.forInOrInitHeadAccumulate);
|
| 170 |
+
}
|
| 171 |
+
function SequenceExpression(node, parent) {
|
| 172 |
+
const parentType = parent.type;
|
| 173 |
+
if (parentType === "SequenceExpression" || parentType === "ParenthesizedExpression" || parentType === "MemberExpression" && parent.property === node || parentType === "OptionalMemberExpression" && parent.property === node || parentType === "TemplateLiteral") {
|
| 174 |
+
return false;
|
| 175 |
+
}
|
| 176 |
+
if (parentType === "ClassDeclaration") {
|
| 177 |
+
return true;
|
| 178 |
+
}
|
| 179 |
+
if (parentType === "ForOfStatement") {
|
| 180 |
+
return parent.right === node;
|
| 181 |
+
}
|
| 182 |
+
if (parentType === "ExportDefaultDeclaration") {
|
| 183 |
+
return true;
|
| 184 |
+
}
|
| 185 |
+
return !isStatement(parent);
|
| 186 |
+
}
|
| 187 |
+
function YieldExpression(node, parent) {
|
| 188 |
+
const parentType = parent.type;
|
| 189 |
+
return parentType === "BinaryExpression" || parentType === "LogicalExpression" || parentType === "UnaryExpression" || parentType === "SpreadElement" || hasPostfixPart(node, parent) || parentType === "AwaitExpression" && isYieldExpression(node) || parentType === "ConditionalExpression" && node === parent.test || isClassExtendsClause(node, parent) || isTSTypeExpression(parentType);
|
| 190 |
+
}
|
| 191 |
+
function ClassExpression(node, parent, tokenContext) {
|
| 192 |
+
return Boolean(tokenContext & (_index.TokenContext.expressionStatement | _index.TokenContext.exportDefault));
|
| 193 |
+
}
|
| 194 |
+
function UnaryLike(node, parent) {
|
| 195 |
+
return hasPostfixPart(node, parent) || isBinaryExpression(parent) && parent.operator === "**" && parent.left === node || isClassExtendsClause(node, parent);
|
| 196 |
+
}
|
| 197 |
+
function FunctionExpression(node, parent, tokenContext) {
|
| 198 |
+
return Boolean(tokenContext & (_index.TokenContext.expressionStatement | _index.TokenContext.exportDefault));
|
| 199 |
+
}
|
| 200 |
+
function ConditionalExpression(node, parent) {
|
| 201 |
+
const parentType = parent.type;
|
| 202 |
+
if (parentType === "UnaryExpression" || parentType === "SpreadElement" || parentType === "BinaryExpression" || parentType === "LogicalExpression" || parentType === "ConditionalExpression" && parent.test === node || parentType === "AwaitExpression" || isTSTypeExpression(parentType)) {
|
| 203 |
+
return true;
|
| 204 |
+
}
|
| 205 |
+
return UnaryLike(node, parent);
|
| 206 |
+
}
|
| 207 |
+
function OptionalMemberExpression(node, parent) {
|
| 208 |
+
return isCallExpression(parent) && parent.callee === node || isMemberExpression(parent) && parent.object === node;
|
| 209 |
+
}
|
| 210 |
+
function AssignmentExpression(node, parent, tokenContext) {
|
| 211 |
+
if (needsParenBeforeExpressionBrace(tokenContext) && isObjectPattern(node.left)) {
|
| 212 |
+
return true;
|
| 213 |
+
} else {
|
| 214 |
+
return ConditionalExpression(node, parent);
|
| 215 |
+
}
|
| 216 |
+
}
|
| 217 |
+
function LogicalExpression(node, parent) {
|
| 218 |
+
const parentType = parent.type;
|
| 219 |
+
if (isTSTypeExpression(parentType)) return true;
|
| 220 |
+
if (parentType !== "LogicalExpression") return false;
|
| 221 |
+
switch (node.operator) {
|
| 222 |
+
case "||":
|
| 223 |
+
return parent.operator === "??" || parent.operator === "&&";
|
| 224 |
+
case "&&":
|
| 225 |
+
return parent.operator === "??";
|
| 226 |
+
case "??":
|
| 227 |
+
return parent.operator !== "??";
|
| 228 |
+
}
|
| 229 |
+
}
|
| 230 |
+
function Identifier(node, parent, tokenContext, getRawIdentifier) {
|
| 231 |
+
var _node$extra;
|
| 232 |
+
const parentType = parent.type;
|
| 233 |
+
if ((_node$extra = node.extra) != null && _node$extra.parenthesized && parentType === "AssignmentExpression" && parent.left === node) {
|
| 234 |
+
const rightType = parent.right.type;
|
| 235 |
+
if ((rightType === "FunctionExpression" || rightType === "ClassExpression") && parent.right.id == null) {
|
| 236 |
+
return true;
|
| 237 |
+
}
|
| 238 |
+
}
|
| 239 |
+
if (getRawIdentifier && getRawIdentifier(node) !== node.name) {
|
| 240 |
+
return false;
|
| 241 |
+
}
|
| 242 |
+
if (node.name === "let") {
|
| 243 |
+
const isFollowedByBracket = isMemberExpression(parent, {
|
| 244 |
+
object: node,
|
| 245 |
+
computed: true
|
| 246 |
+
}) || isOptionalMemberExpression(parent, {
|
| 247 |
+
object: node,
|
| 248 |
+
computed: true,
|
| 249 |
+
optional: false
|
| 250 |
+
});
|
| 251 |
+
if (isFollowedByBracket && tokenContext & (_index.TokenContext.expressionStatement | _index.TokenContext.forInitHead | _index.TokenContext.forInHead)) {
|
| 252 |
+
return true;
|
| 253 |
+
}
|
| 254 |
+
return Boolean(tokenContext & _index.TokenContext.forOfHead);
|
| 255 |
+
}
|
| 256 |
+
return node.name === "async" && isForOfStatement(parent, {
|
| 257 |
+
left: node,
|
| 258 |
+
await: false
|
| 259 |
+
});
|
| 260 |
+
}
|
| 261 |
+
|
| 262 |
+
//# sourceMappingURL=parentheses.js.map
|