39b2c31cf5ef1d65706e8b2a36939a68959d72b9aa3494e37133ef7fe3330f08ccd28eb78425ac3564678a2e0855120fa02f0704f175d0882428bb0daa6dc8 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = void 0;
  6. class PluginPass {
  7. constructor(file, key, options, isAsync) {
  8. this._map = new Map();
  9. this.key = void 0;
  10. this.file = void 0;
  11. this.opts = void 0;
  12. this.cwd = void 0;
  13. this.filename = void 0;
  14. this.isAsync = void 0;
  15. this.key = key;
  16. this.file = file;
  17. this.opts = options || {};
  18. this.cwd = file.opts.cwd;
  19. this.filename = file.opts.filename;
  20. this.isAsync = isAsync;
  21. }
  22. set(key, val) {
  23. this._map.set(key, val);
  24. }
  25. get(key) {
  26. return this._map.get(key);
  27. }
  28. availableHelper(name, versionRange) {
  29. return this.file.availableHelper(name, versionRange);
  30. }
  31. addHelper(name) {
  32. return this.file.addHelper(name);
  33. }
  34. buildCodeFrameError(node, msg, _Error) {
  35. return this.file.buildCodeFrameError(node, msg, _Error);
  36. }
  37. }
  38. exports.default = PluginPass;
  39. {
  40. PluginPass.prototype.getModuleName = function getModuleName() {
  41. return this.file.getModuleName();
  42. };
  43. PluginPass.prototype.addImport = function addImport() {
  44. this.file.addImport();
  45. };
  46. }
  47. 0 && 0;
  48. //# sourceMappingURL=plugin-pass.js.map