UNPKG

1.03 kBJavaScriptView Raw
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.default = void 0;
7
8class PluginPass {
9 constructor(file, key, options) {
10 this._map = new Map();
11 this.key = void 0;
12 this.file = void 0;
13 this.opts = void 0;
14 this.cwd = void 0;
15 this.filename = void 0;
16 this.key = key;
17 this.file = file;
18 this.opts = options || {};
19 this.cwd = file.opts.cwd;
20 this.filename = file.opts.filename;
21 }
22
23 set(key, val) {
24 this._map.set(key, val);
25 }
26
27 get(key) {
28 return this._map.get(key);
29 }
30
31 availableHelper(name, versionRange) {
32 return this.file.availableHelper(name, versionRange);
33 }
34
35 addHelper(name) {
36 return this.file.addHelper(name);
37 }
38
39 addImport() {
40 return this.file.addImport();
41 }
42
43 buildCodeFrameError(node, msg, _Error) {
44 return this.file.buildCodeFrameError(node, msg, _Error);
45 }
46
47}
48
49exports.default = PluginPass;
50{
51 PluginPass.prototype.getModuleName = function getModuleName() {
52 return this.file.getModuleName();
53 };
54}
\No newline at end of file