404

[ Avaa Bypassed ]




Upload:

Command:

botdev@18.117.7.15: ~ $
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.resolveBin = exports.compileNodeModulesPaths = exports.readPackageJsonFile = exports.isValidPackageName = exports.ERROR_BIN_NOT_FOUND = exports.ERROR_INVALID_PACKAGE_JSON = void 0;
const utils_fs_1 = require("@ionic/utils-fs");
const fs = require("fs");
const path = require("path");
const guards_1 = require("../guards");
exports.ERROR_INVALID_PACKAGE_JSON = 'INVALID_PACKAGE_JSON';
exports.ERROR_BIN_NOT_FOUND = 'BIN_NOT_FOUND';
/**
 * Lightweight version of https://github.com/npm/validate-npm-package-name
 */
function isValidPackageName(name) {
    return encodeURIComponent(name) === name;
}
exports.isValidPackageName = isValidPackageName;
async function readPackageJsonFile(p) {
    const packageJson = await utils_fs_1.readJson(p);
    if (!guards_1.isPackageJson(packageJson)) {
        throw exports.ERROR_INVALID_PACKAGE_JSON;
    }
    return packageJson;
}
exports.readPackageJsonFile = readPackageJsonFile;
function compileNodeModulesPaths(filePath) {
    return utils_fs_1.compilePaths(filePath).map(f => path.join(f, 'node_modules'));
}
exports.compileNodeModulesPaths = compileNodeModulesPaths;
function resolveBin(m, bin, options) {
    const packageJsonPath = require.resolve(`${m}/package`, options);
    const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, { encoding: 'utf8' }));
    if (!guards_1.isPackageJson(packageJson) || !packageJson.bin) {
        throw exports.ERROR_INVALID_PACKAGE_JSON;
    }
    const desiredBin = packageJson.bin[bin];
    if (!desiredBin) {
        throw exports.ERROR_BIN_NOT_FOUND;
    }
    return path.resolve(path.dirname(packageJsonPath), desiredBin);
}
exports.resolveBin = resolveBin;

Filemanager

Name Type Size Permission Actions
fn.d.ts File 200 B 0644
fn.js File 591 B 0644
ipc.d.ts File 1.67 KB 0644
ipc.js File 5.2 KB 0644
node.d.ts File 637 B 0644
node.js File 1.7 KB 0644
promise.d.ts File 1.22 KB 0644
promise.js File 1.64 KB 0644
string.d.ts File 677 B 0644
string.js File 1.53 KB 0644