Software: Apache. PHP/8.1.30 uname -a: Linux server1.tuhinhossain.com 5.15.0-163-generic #173-Ubuntu SMP Tue Oct 14 17:51:00 UTC uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root) Safe-mode: OFF (not secure) /home/picotech/domains/rentals.picotech.app/public_html/node_modules/postcss-load-config/src/ drwxr-xr-x | |
| Viewing file: Select action/file-type: // @ts-check
const { createRequire } = require('node:module')
const { pathToFileURL } = require('node:url')
const TS_EXT_RE = /\.[mc]?ts$/
let tsx
let jiti
let importError = []
/**
* @param {string} name
* @param {string} rootFile
* @returns {Promise<any>}
*/
async function req(name, rootFile = __filename) {
let url = createRequire(rootFile).resolve(name)
try {
return (await import(`${pathToFileURL(url)}?t=${Date.now()}`)).default
} catch (err) {
if (!TS_EXT_RE.test(url)) {
/* c8 ignore start */
throw err
}
}
if (tsx === undefined) {
try {
tsx = await import('tsx/cjs/api')
} catch (error) {
importError.push(error)
}
}
if (tsx) {
let loaded = tsx.require(name, rootFile)
return loaded && '__esModule' in loaded ? loaded.default : loaded
}
if (jiti === undefined) {
try {
jiti = (await import('jiti')).default
} catch (error) {
importError.push(error)
}
}
if (jiti) {
return jiti(rootFile, { interopDefault: true })(name)
}
throw new Error(
`'tsx' or 'jiti' is required for the TypeScript configuration files. Make sure it is installed\nError: ${importError
.map(error => error.message)
.join('\n')}`
)
}
module.exports = req
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0034 ]-- |