uawdijnntqw1x1x1
IP : 216.73.216.110
Hostname : 6.87.74.97.host.secureserver.net
Kernel : Linux 6.87.74.97.host.secureserver.net 4.18.0-553.83.1.el8_10.x86_64 #1 SMP Mon Nov 10 04:22:44 EST 2025 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
home
/
emeraadmin
/
www
/
node_modules
/
xmlbuilder
/
..
/
debug
/
..
/
object.defaults
/
..
/
..
/
4d695
/
libnpmpack.tar
/
/
package.json000064400000003263151701423450007040 0ustar00{ "_id": "libnpmpack@7.0.3", "_inBundle": true, "_location": "/npm/libnpmpack", "_phantomChildren": {}, "_requiredBy": [ "/npm" ], "author": { "name": "GitHub Inc." }, "bugs": { "url": "https://github.com/npm/libnpmpack/issues" }, "contributors": [ { "name": "Claudia Hernández", "email": "claudia@npmjs.com" } ], "dependencies": { "@npmcli/arborist": "^7.5.3", "@npmcli/run-script": "^8.1.0", "npm-package-arg": "^11.0.2", "pacote": "^18.0.6" }, "description": "Programmatic API for the bits behind npm pack", "devDependencies": { "@npmcli/eslint-config": "^4.0.0", "@npmcli/template-oss": "4.22.0", "nock": "^13.3.3", "spawk": "^1.7.1", "tap": "^16.3.8" }, "engines": { "node": "^16.14.0 || >=18.0.0" }, "files": [ "bin/", "lib/" ], "homepage": "https://npmjs.com/package/libnpmpack", "license": "ISC", "main": "lib/index.js", "name": "libnpmpack", "repository": { "type": "git", "url": "git+https://github.com/npm/cli.git", "directory": "workspaces/libnpmpack" }, "scripts": { "lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"", "lintfix": "npm run lint -- --fix", "postlint": "template-oss-check", "posttest": "npm run lint", "snap": "tap", "template-oss-apply": "template-oss-apply --force", "test": "tap" }, "tap": { "nyc-arg": [ "--exclude", "tap-snapshots/**" ] }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", "version": "4.22.0", "content": "../../scripts/template-oss/index.js" }, "version": "7.0.3" } lib/index.js000064400000003043151701423450006761 0ustar00'use strict' const pacote = require('pacote') const npa = require('npm-package-arg') const runScript = require('@npmcli/run-script') const path = require('node:path') const Arborist = require('@npmcli/arborist') const { writeFile } = require('node:fs/promises') module.exports = pack async function pack (spec = 'file:.', opts = {}) { // gets spec spec = npa(spec) const manifest = await pacote.manifest(spec, opts) const stdio = opts.foregroundScripts ? 'inherit' : 'pipe' if (spec.type === 'directory' && !opts.ignoreScripts) { // prepack await runScript({ ...opts, event: 'prepack', path: spec.fetchSpec, stdio, pkg: manifest, }) } // packs tarball const tarball = await pacote.tarball(manifest._resolved, { ...opts, Arborist, integrity: manifest._integrity, }) // check for explicit `false` so the default behavior is to skip writing to disk if (opts.dryRun === false) { const filename = `${manifest.name}-${manifest.version}.tgz` .replace(/^@/, '').replace(/\//, '-') const destination = path.resolve(opts.packDestination, filename) await writeFile(destination, tarball) } if (spec.type === 'directory' && !opts.ignoreScripts) { // postpack await runScript({ ...opts, event: 'postpack', path: spec.fetchSpec, stdio, pkg: manifest, env: { npm_package_from: tarball.from, npm_package_resolved: tarball.resolved, npm_package_integrity: tarball.integrity, }, }) } return tarball } LICENSE000064400000001315151701423450005553 0ustar00Copyright npm, Inc Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. README.md000064400000003361151701423450006030 0ustar00# libnpmpack [](https://npm.im/libnpmpack) [](https://npm.im/libnpmpack) [](https://github.com/npm/cli/actions/workflows/ci-libnpmpack.yml) [`libnpmpack`](https://github.com/npm/libnpmpack) is a Node.js library for programmatically packing tarballs from a local directory or from a registry or github spec. If packing from a local source, `libnpmpack` will also run the `prepack` and `postpack` lifecycles. ## Table of Contents * [Example](#example) * [Install](#install) * [API](#api) * [`pack()`](#pack) ## Example ```js const pack = require('libnpmpack') ``` ## Install `$ npm install libnpmpack` ### API #### <a name="pack"></a> `> pack(spec, [opts]) -> Promise` Packs a tarball from a local directory or from a registry or github spec and returns a Promise that resolves to the tarball data Buffer, with from, resolved, and integrity fields attached. If no options are passed, the tarball file will be saved on the same directory from which `pack` was called in. `libnpmpack` uses [`pacote`](https://npm.im/pacote). Most options are passed through directly to that library, so please refer to [its own `opts` documentation](https://www.npmjs.com/package/pacote#options) for options that can be passed in. ##### Examples ```javascript // packs from cwd const tarball = await pack() // packs from a local directory const localTar = await pack('/Users/claudiahdz/projects/my-cool-pkg') // packs from a registry spec const registryTar = await pack('abbrev@1.0.3') // packs from a github spec const githubTar = await pack('isaacs/rimraf#PR-192') ```
/home/emeraadmin/www/node_modules/xmlbuilder/../debug/../object.defaults/../../4d695/libnpmpack.tar