Befor generating
This commit is contained in:
1 parent
3383f4bf4a
commit
1aa1b5f625
6756 files changed
+649946
-1
No files matched your search
Generated
Vendored
+22
@@ -0,0 +1,22 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2014-present Sebastian McKenzie and other contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
Generated
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
# @babel/plugin-bugfix-safari-class-field-initializer-scope
|
||||
|
||||
> Wrap class field initializers with IIFE to workaround https://webkit.org/b/236843
|
||||
|
||||
See our website [@babel/plugin-bugfix-safari-class-field-initializer-scope](https://babeljs.io/docs/babel-plugin-bugfix-safari-class-field-initializer-scope) for more information.
|
||||
|
||||
## Install
|
||||
|
||||
Using npm:
|
||||
|
||||
```sh
|
||||
npm install --save-dev @babel/plugin-bugfix-safari-class-field-initializer-scope
|
||||
```
|
||||
|
||||
or using yarn:
|
||||
|
||||
```sh
|
||||
yarn add @babel/plugin-bugfix-safari-class-field-initializer-scope --dev
|
||||
```
|
||||
openapi_templete/node_modules/@babel/plugin-bugfix-safari-class-field-initializer-scope/lib/index.js
Generated
Vendored
+73
@@ -0,0 +1,73 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
var helperPluginUtils = require('@babel/helper-plugin-utils');
|
||||
var core = require('@babel/core');
|
||||
|
||||
function needsWrapping(node) {
|
||||
if (core.types.isLiteral(node) && !core.types.isTemplateLiteral(node)) {
|
||||
return false;
|
||||
}
|
||||
if (core.types.isCallExpression(node) || core.types.isOptionalCallExpression(node) || core.types.isNewExpression(node)) {
|
||||
return needsWrapping(node.callee) || node.arguments.some(needsWrapping);
|
||||
}
|
||||
if (core.types.isTemplateLiteral(node)) {
|
||||
return node.expressions.some(needsWrapping);
|
||||
}
|
||||
if (core.types.isTaggedTemplateExpression(node)) {
|
||||
return needsWrapping(node.tag) || needsWrapping(node.quasi);
|
||||
}
|
||||
if (core.types.isArrayExpression(node)) {
|
||||
return node.elements.some(needsWrapping);
|
||||
}
|
||||
if (core.types.isObjectExpression(node)) {
|
||||
return node.properties.some(prop => {
|
||||
if (core.types.isObjectProperty(prop)) {
|
||||
return needsWrapping(prop.value) || prop.computed && needsWrapping(prop.key);
|
||||
}
|
||||
if (core.types.isObjectMethod(prop)) {
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
if (core.types.isMemberExpression(node) || core.types.isOptionalMemberExpression(node)) {
|
||||
return needsWrapping(node.object) || node.computed && needsWrapping(node.property);
|
||||
}
|
||||
if (core.types.isFunctionExpression(node) || core.types.isArrowFunctionExpression(node) || core.types.isClassExpression(node)) {
|
||||
return false;
|
||||
}
|
||||
if (core.types.isThisExpression(node)) {
|
||||
return false;
|
||||
}
|
||||
if (core.types.isSequenceExpression(node)) {
|
||||
return node.expressions.some(needsWrapping);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
function wrapInitializer(path) {
|
||||
const {
|
||||
value
|
||||
} = path.node;
|
||||
if (value && needsWrapping(value)) {
|
||||
path.node.value = core.types.callExpression(core.types.arrowFunctionExpression([], value), []);
|
||||
}
|
||||
}
|
||||
var index = helperPluginUtils.declare(api => {
|
||||
api.assertVersion("^7.16.0");
|
||||
return {
|
||||
name: "plugin-bugfix-safari-class-field-initializer-scope",
|
||||
visitor: {
|
||||
ClassProperty(path) {
|
||||
wrapInitializer(path);
|
||||
},
|
||||
ClassPrivateProperty(path) {
|
||||
wrapInitializer(path);
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
exports.default = index;
|
||||
//# sourceMappingURL=index.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t } from \"@babel/core\";\nimport type { NodePath } from \"@babel/core\";\n\nfunction needsWrapping(node: t.Node): boolean {\n if (t.isLiteral(node) && !t.isTemplateLiteral(node)) {\n return false;\n }\n\n if (\n t.isCallExpression(node) ||\n t.isOptionalCallExpression(node) ||\n t.isNewExpression(node)\n ) {\n return needsWrapping(node.callee) || node.arguments.some(needsWrapping);\n }\n\n if (t.isTemplateLiteral(node)) {\n return node.expressions.some(needsWrapping);\n }\n\n if (t.isTaggedTemplateExpression(node)) {\n return needsWrapping(node.tag) || needsWrapping(node.quasi);\n }\n\n if (t.isArrayExpression(node)) {\n return node.elements.some(needsWrapping);\n }\n\n if (t.isObjectExpression(node)) {\n return node.properties.some(prop => {\n if (t.isObjectProperty(prop)) {\n return (\n needsWrapping(prop.value) ||\n (prop.computed && needsWrapping(prop.key))\n );\n }\n if (t.isObjectMethod(prop)) {\n return false;\n }\n return false;\n });\n }\n\n if (t.isMemberExpression(node) || t.isOptionalMemberExpression(node)) {\n return (\n needsWrapping(node.object) ||\n (node.computed && needsWrapping(node.property))\n );\n }\n\n if (\n t.isFunctionExpression(node) ||\n t.isArrowFunctionExpression(node) ||\n t.isClassExpression(node)\n ) {\n return false;\n }\n\n if (t.isThisExpression(node)) {\n return false;\n }\n\n if (t.isSequenceExpression(node)) {\n return node.expressions.some(needsWrapping);\n }\n\n // Is an identifier, or anything else not covered above\n return true;\n}\n\nfunction wrapInitializer(\n path: NodePath<t.ClassProperty | t.ClassPrivateProperty>,\n) {\n const { value } = path.node;\n\n if (value && needsWrapping(value)) {\n path.node.value = t.callExpression(\n t.arrowFunctionExpression([], value),\n [],\n );\n }\n}\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(\"^7.16.0\"));\n\n return {\n name: \"plugin-bugfix-safari-class-field-initializer-scope\",\n\n visitor: {\n ClassProperty(path) {\n wrapInitializer(path);\n },\n ClassPrivateProperty(path) {\n wrapInitializer(path);\n },\n },\n };\n});\n"],"names":["needsWrapping","node","t","isLiteral","isTemplateLiteral","isCallExpression","isOptionalCallExpression","isNewExpression","callee","arguments","some","expressions","isTaggedTemplateExpression","tag","quasi","isArrayExpression","elements","isObjectExpression","properties","prop","isObjectProperty","value","computed","key","isObjectMethod","isMemberExpression","isOptionalMemberExpression","object","property","isFunctionExpression","isArrowFunctionExpression","isClassExpression","isThisExpression","isSequenceExpression","wrapInitializer","path","callExpression","arrowFunctionExpression","declare","api","assertVersion","name","visitor","ClassProperty","ClassPrivateProperty"],"mappings":";;;;;;;AAIA,SAASA,aAAaA,CAACC,IAAY,EAAW;AAC5C,EAAA,IAAIC,UAAC,CAACC,SAAS,CAACF,IAAI,CAAC,IAAI,CAACC,UAAC,CAACE,iBAAiB,CAACH,IAAI,CAAC,EAAE;AACnD,IAAA,OAAO,KAAK,CAAA;AACd,GAAA;EAEA,IACEC,UAAC,CAACG,gBAAgB,CAACJ,IAAI,CAAC,IACxBC,UAAC,CAACI,wBAAwB,CAACL,IAAI,CAAC,IAChCC,UAAC,CAACK,eAAe,CAACN,IAAI,CAAC,EACvB;AACA,IAAA,OAAOD,aAAa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IAAA,OACED,aAAa,CAACC,IAAI,CAAC0B,MAAM,CAAC,IACzB1B,IAAI,CAACqB,QAAQ,IAAItB,aAAa,CAACC,IAAI,CAAC2B,QAAQ,CAAE,CAAA;AAEnD,GAAA;EAEA,IACE1B,UAAC,CAAC2B,oBAAoB,CAAC5B,IAAI,CAAC,IAC5BC,UAAC,CAAC4B,yBAAyB,CAAC7B,IAAI,CAAC,IACjCC,UAAC,CAAC6B,iBAAiB,CAAC9B,IAAI,CAAC,EACzB;AACA,IAAA,OAAO,KAAK,CAAA;AACd,GAAA;AAEA,EAAA,IAAIC,UAAC,CAAC8B,gBAAgB,CAAC/B,IAAI,CAAC,EAAE;AAC5B,IAAA,OAAO,KAAK,CAAA;AACd,GAAA;AAEA,EAAA,IAAIC,UAAC,CAAC+B,oBAAoB,CAAChC,IAAI,CAAC,EAAE;AALine truncated
|
||||
openapi_templete/node_modules/@babel/plugin-bugfix-safari-class-field-initializer-scope/package.json
Generated
Vendored
+43
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"name": "@babel/plugin-bugfix-safari-class-field-initializer-scope",
|
||||
"version": "7.29.7",
|
||||
"description": "Wrap class field initializers with IIFE to workaround https://webkit.org/b/236843",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/babel/babel.git",
|
||||
"directory": "packages/babel-plugin-bugfix-safari-class-field-initializer-scope"
|
||||
},
|
||||
"homepage": "https://babel.dev/docs/en/next/babel-plugin-bugfix-safari-class-field-initializer-scope",
|
||||
"license": "MIT",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"main": "./lib/index.js",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./lib/index.d.ts",
|
||||
"default": "./lib/index.js"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"keywords": [
|
||||
"babel-plugin",
|
||||
"bugfix"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.29.7"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": "^7.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.29.7",
|
||||
"@babel/helper-plugin-test-runner": "^7.29.7",
|
||||
"@babel/traverse": "^7.29.7"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
},
|
||||
"author": "The Babel Team (https://babel.dev/team)",
|
||||
"type": "commonjs"
|
||||
}
|
||||
Reference in new issue
Block a user