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/note.picotech.app/public_html/node_modules/sequelize-cli/lib/helpers/ drwxr-xr-x | |
| Viewing file: Select action/file-type: "use strict";
var _url = _interopRequireDefault(require("url"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
async function supportsDynamicImport() {
try {
// imports are cached.
// no need to worry about perf here.
// Don't remove .js: extension must be included for ESM imports!
await import('./dummy-file.js');
return true;
} catch (e) {
return false;
}
}
/**
* Imports a JSON, CommonJS or ESM module
* based on feature detection.
*
* @param modulePath path to the module to import
* @returns {Promise<unknown>} the imported module.
*/
async function importModule(modulePath) {
// JSON modules are still behind a flag. Fallback to require for now.
// https://nodejs.org/api/esm.html#json-modules
if (_url.default.pathToFileURL && !modulePath.endsWith('.json') && (await supportsDynamicImport())) {
// 'import' expects a URL. (https://github.com/sequelize/cli/issues/994)
return import(_url.default.pathToFileURL(modulePath));
}
// mimics what `import()` would return for
// cjs modules.
return {
default: require(modulePath)
};
}
module.exports = {
supportsDynamicImport,
importModule
}; |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0037 ]-- |