Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
package.lib.transformation.plugin-pass.js.map Maven / Gradle / Ivy
{"version":3,"names":["PluginPass","constructor","file","key","options","_map","Map","opts","cwd","filename","set","val","get","availableHelper","name","versionRange","addHelper","buildCodeFrameError","node","msg","_Error","exports","default","prototype","getModuleName","addImport"],"sources":["../../src/transformation/plugin-pass.ts"],"sourcesContent":["import type * as t from \"@babel/types\";\nimport type File from \"./file/file.ts\";\n\nexport default class PluginPass {\n _map: Map = new Map();\n key: string | undefined | null;\n file: File;\n opts: Partial;\n\n // The working directory that Babel's programmatic options are loaded\n // relative to.\n cwd: string;\n\n // The absolute path of the file being compiled.\n filename: string | void;\n\n constructor(file: File, key?: string | null, options?: Options) {\n this.key = key;\n this.file = file;\n this.opts = options || {};\n this.cwd = file.opts.cwd;\n this.filename = file.opts.filename;\n }\n\n set(key: unknown, val: unknown) {\n this._map.set(key, val);\n }\n\n get(key: unknown): any {\n return this._map.get(key);\n }\n\n availableHelper(name: string, versionRange?: string | null) {\n return this.file.availableHelper(name, versionRange);\n }\n\n addHelper(name: string) {\n return this.file.addHelper(name);\n }\n\n buildCodeFrameError(\n node: t.Node | undefined | null,\n msg: string,\n _Error?: typeof Error,\n ) {\n return this.file.buildCodeFrameError(node, msg, _Error);\n }\n}\n\nif (!process.env.BABEL_8_BREAKING) {\n (PluginPass as any).prototype.getModuleName = function getModuleName(\n this: PluginPass,\n ): string | undefined {\n // @ts-expect-error only exists in Babel 7\n return this.file.getModuleName();\n };\n (PluginPass as any).prototype.addImport = function addImport(\n this: PluginPass,\n ): void {\n // @ts-expect-error only exists in Babel 7\n this.file.addImport();\n };\n}\n"],"mappings":";;;;;;AAGe,MAAMA,UAAU,CAAmB;EAahDC,WAAWA,CAACC,IAAU,EAAEC,GAAmB,EAAEC,OAAiB,EAAE;IAAA,KAZhEC,IAAI,GAA0B,IAAIC,GAAG,C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