NET-Web-API-w-Angular/my-app/node_modules/@babel/plugin-transform-export-namespace-from/lib/index.js.map

1 line
No EOL
3.8 KiB
Text
Executable file

{"version":3,"names":["_helperPluginUtils","require","_core","_default","exports","default","declare","api","assertVersion","name","inherits","visitor","ExportNamedDeclaration","path","_exported$name","node","scope","specifiers","index","t","isExportDefaultSpecifier","isExportNamespaceSpecifier","nodes","push","exportNamedDeclaration","shift","source","specifier","exported","uid","generateUidIdentifier","value","importDeclaration","importNamespaceSpecifier","cloneNode","exportSpecifier","length","replaceWithMultiple","registerDeclaration"],"sources":["../src/index.ts"],"sourcesContent":["import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t } from \"@babel/core\";\n\nexport default declare(api => {\n api.assertVersion(\n process.env.BABEL_8_BREAKING && process.env.IS_PUBLISH\n ? PACKAGE_JSON.version\n : 7,\n );\n\n return {\n name: \"transform-export-namespace-from\",\n inherits: USE_ESM\n ? undefined\n : IS_STANDALONE\n ? undefined\n : // eslint-disable-next-line no-restricted-globals\n require(\"@babel/plugin-syntax-export-namespace-from\").default,\n\n visitor: {\n ExportNamedDeclaration(path) {\n const { node, scope } = path;\n const { specifiers } = node;\n\n const index = t.isExportDefaultSpecifier(specifiers[0]) ? 1 : 0;\n if (!t.isExportNamespaceSpecifier(specifiers[index])) return;\n\n const nodes = [];\n\n if (index === 1) {\n nodes.push(\n t.exportNamedDeclaration(null, [specifiers.shift()], node.source),\n );\n }\n\n const specifier = specifiers.shift();\n const { exported } = specifier;\n const uid = scope.generateUidIdentifier(\n // @ts-expect-error Identifier ?? StringLiteral\n exported.name ?? exported.value,\n );\n\n nodes.push(\n t.importDeclaration(\n [t.importNamespaceSpecifier(uid)],\n t.cloneNode(node.source),\n ),\n t.exportNamedDeclaration(null, [\n t.exportSpecifier(t.cloneNode(uid), exported),\n ]),\n );\n\n if (node.specifiers.length >= 1) {\n nodes.push(node);\n }\n\n const [importDeclaration] = path.replaceWithMultiple(nodes);\n path.scope.registerDeclaration(importDeclaration);\n },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