Server IP : 185.86.78.101 / Your IP : 216.73.216.124 Web Server : Apache System : Linux 675867-vds-valikoshka1996.gmhost.pp.ua 5.4.0-150-generic #167-Ubuntu SMP Mon May 15 17:35:05 UTC 2023 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /www/wwwroot/mifepriston.org/node_modules/vue-loader/lib/utils/ |
Upload File : |
/* Inter-loader Option Cache Vue-loader works by delegating language blocks to sub-loaders. The main loader needs to share its options object with the sub-loaders. Technically we should pass everything the sub loaders need via their own options, however there are two problems with this approach: 1. Some options (e.g. postcss, compilerModules) may contain non-serializable values and cannot be passed via inline requests 2. Passing everything via inline requests makes the module string extremely verbose, and can be quite annoying in error messages. To get around this, we cache the options in this module here in order to share it between loaders. - In order to support multiple uses of vue-loader with different options, each options object is cached with an id. - To share options across threads in threadMode, options are serialized and cached on disk. */ const fs = require('fs') const path = require('path') const hash = require('hash-sum') const optionsToId = new Map() const idToOptions = new Map() exports.saveOptions = options => { if (optionsToId.has(options)) { return optionsToId.get(options) } const threadMode = options && options.threadMode const serialized = threadMode ? serialize(options) : null const id = serialized ? hash(serialized) : String(idToOptions.size) idToOptions.set(id, options || {}) optionsToId.set(options, id) if (options && serialized) { const fsidToOptionsPath = getidToOptionsPath(id) if (!fs.existsSync(fsidToOptionsPath)) { fs.writeFileSync(fsidToOptionsPath, serialized) } } return id } exports.loadOptions = id => { const res = idToOptions.get(id) if (res) { return res } const fsidToOptionsPath = getidToOptionsPath(id) if (fs.existsSync(fsidToOptionsPath)) { return JSON.parse(fs.readFileSync(fsidToOptionsPath, 'utf-8')) } else { return {} } } function serialize (options) { let res try { res = JSON.stringify(options) } catch (e) { throw new Error(`options must be JSON serializable in thread mode.`) } return res } function getidToOptionsPath (id) { return path.resolve(__dirname, `.options-cache-${id}`) }