GT2/GT2-Android/node_modules/tar/package.json

131 lines
42 KiB
JSON

{
"_args": [
[
{
"raw": "tar@^4.0.2",
"scope": null,
"escapedName": "tar",
"name": "tar",
"rawSpec": "^4.0.2",
"spec": ">=4.0.2 <5.0.0",
"type": "range"
},
"/home/jdaugherty/work/GT2/GT2-Android/node_modules/xdl"
]
],
"_from": "tar@>=4.0.2 <5.0.0",
"_id": "tar@4.3.3",
"_inCache": true,
"_location": "/tar",
"_nodeVersion": "8.9.1",
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/tar-4.3.3.tgz_1517948326480_0.17111232038587332"
},
"_npmUser": {
"name": "isaacs",
"email": "i@izs.me"
},
"_npmVersion": "5.6.0-canary.8",
"_phantomChildren": {},
"_requested": {
"raw": "tar@^4.0.2",
"scope": null,
"escapedName": "tar",
"name": "tar",
"rawSpec": "^4.0.2",
"spec": ">=4.0.2 <5.0.0",
"type": "range"
},
"_requiredBy": [
"/xdl"
],
"_resolved": "https://registry.npmjs.org/tar/-/tar-4.3.3.tgz",
"_shasum": "e03823dbde4e8060f606fef7d09f92ce06c1064b",
"_shrinkwrap": null,
"_spec": "tar@^4.0.2",
"_where": "/home/jdaugherty/work/GT2/GT2-Android/node_modules/xdl",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
"url": "http://blog.izs.me/"
},
"bugs": {
"url": "https://github.com/npm/node-tar/issues"
},
"dependencies": {
"chownr": "^1.0.1",
"fs-minipass": "^1.2.3",
"minipass": "^2.2.1",
"minizlib": "^1.1.0",
"mkdirp": "^0.5.0",
"yallist": "^3.0.2"
},
"description": "tar for node",
"devDependencies": {
"chmodr": "^1.0.2",
"end-of-stream": "^1.4.0",
"events-to-array": "^1.1.2",
"mutate-fs": "^2.1.1",
"rimraf": "^2.6.2",
"tap": "^11.0.0-rc.3",
"tar-fs": "^1.16.0",
"tar-stream": "^1.5.2"
},
"directories": {},
"dist": {
"integrity": "sha512-v9wjbOXloOIeXifMQGkKhPH3H7tjd+8BubFKOTU+64JpFZ3q2zBfsGlnc7KmyRgl8UxVa1SCRiF3F9tqSOgcaQ==",
"shasum": "e03823dbde4e8060f606fef7d09f92ce06c1064b",
"tarball": "https://registry.npmjs.org/tar/-/tar-4.3.3.tgz"
},
"engines": {
"node": ">=4.5"
},
"files": [
"index.js",
"lib/"
],
"gitHead": "9e92533a0724585c695e775d38fc1f64baf8f6ab",
"homepage": "https://github.com/npm/node-tar#readme",
"license": "ISC",
"maintainers": [
{
"name": "othiym23",
"email": "ogd@aoaioxxysz.net"
},
{
"name": "iarna",
"email": "me@re-becca.org"
},
{
"name": "zkat",
"email": "kzm@sykosomatic.org"
},
{
"name": "soldair",
"email": "soldair@gmail.com"
},
{
"name": "isaacs",
"email": "i@izs.me"
}
],
"name": "tar",
"optionalDependencies": {},
"readme": "# node-tar\n\n[![Build Status](https://travis-ci.org/npm/node-tar.svg?branch=master)](https://travis-ci.org/npm/node-tar)\n\n[Fast](./benchmarks) and full-featured Tar for Node.js\n\nThe API is designed to mimic the behavior of `tar(1)` on unix systems.\nIf you are familiar with how tar works, most of this will hopefully be\nstraightforward for you. If not, then hopefully this module can teach\nyou useful unix skills that may come in handy someday :)\n\n## Background\n\nA \"tar file\" or \"tarball\" is an archive of file system entries\n(directories, files, links, etc.) The name comes from \"tape archive\".\nIf you run `man tar` on almost any Unix command line, you'll learn\nquite a bit about what it can do, and its history.\n\nTar has 5 main top-level commands:\n\n* `c` Create an archive\n* `r` Replace entries within an archive\n* `u` Update entries within an archive (ie, replace if they're newer)\n* `t` List out the contents of an archive\n* `x` Extract an archive to disk\n\nThe other flags and options modify how this top level function works.\n\n## High-Level API\n\nThese 5 functions are the high-level API. All of them have a\nsingle-character name (for unix nerds familiar with `tar(1)`) as well\nas a long name (for everyone else).\n\nAll the high-level functions take the following arguments, all three\nof which are optional and may be omitted.\n\n1. `options` - An optional object specifying various options\n2. `paths` - An array of paths to add or extract\n3. `callback` - Called when the command is completed, if async. (If\n sync or no file specified, providing a callback throws a\n `TypeError`.)\n\nIf the command is sync (ie, if `options.sync=true`), then the\ncallback is not allowed, since the action will be completed immediately.\n\nIf a `file` argument is specified, and the command is async, then a\n`Promise` is returned. In this case, if async, a callback may be\nprovided which is called when the command is completed.\n\nIf a `file` option is not specified, then a stream is returned. For\n`create`, this is a readable stream of the generated archive. For\n`list` and `extract` this is a writable stream that an archive should\nbe written into. If a file is not specified, then a callback is not\nallowed, because you're already getting a stream to work with.\n\n`replace` and `update` only work on existing archives, and so require\na `file` argument.\n\nSync commands without a file argument return a stream that acts on its\ninput immediately in the same tick. For readable streams, this means\nthat all of the data is immediately available by calling\n`stream.read()`. For writable streams, it will be acted upon as soon\nas it is provided, but this can be at any time.\n\n### Warnings\n\nSome things cause tar to emit a warning, but should usually not cause\nthe entire operation to fail. There are three ways to handle\nwarnings:\n\n1. **Ignore them** (default) Invalid entries won't be put in the\n archive, and invalid entries won't be unpacked. This is usually\n fine, but can hide failures that you might care about.\n2. **Notice them** Add an `onwarn` function to the options, or listen\n to the `'warn'` event on any tar stream. The function will get\n called as `onwarn(message, data)`. Handle as appropriate.\n3. **Explode them.** Set `strict: true` in the options object, and\n `warn` messages will be emitted as `'error'` events instead. If\n there's no `error` handler, this causes the program to crash. If\n used with a promise-returning/callback-taking method, then it'll\n send the error to the promise/callback.\n\n### Examples\n\nThe API mimics the `tar(1)` command line functionality, with aliases\nfor more human-readable option and function names. The goal is that\nif you know how to use `tar(1)` in Unix, then you know how to use\n`require('tar')` in JavaScript.\n\nTo replicate `tar czf my-tarball.tgz files and folders`, you'd do:\n\n```js\ntar.c(\n {\n gzip: <true|gzip options>,\n file: 'my-tarball.tgz'\n },\n ['some', 'files', 'and', 'folders']\n).then(_ => { .. tarball has been created .. })\n```\n\nTo replicate `tar cz files and folders > my-tarball.tgz`, you'd do:\n\n```js\ntar.c( // or tar.create\n {\n gzip: <true|gzip options>\n },\n ['some', 'files', 'and', 'folders']\n).pipe(fs.createWriteStream('my-tarball.tgz')\n```\n\nTo replicate `tar xf my-tarball.tgz` you'd do:\n\n```js\ntar.x( // or tar.extract(\n {\n file: 'my-tarball.tgz'\n }\n).then(_=> { .. tarball has been dumped in cwd .. })\n```\n\nTo replicate `cat my-tarball.tgz | tar x -C some-dir --strip=1`:\n\n```js\nfs.createReadStream('my-tarball.tgz').pipe(\n tar.x({\n strip: 1,\n C: 'some-dir' // alias for cwd:'some-dir', also ok\n })\n)\n```\n\nTo replicate `tar tf my-tarball.tgz`, do this:\n\n```js\ntar.t({\n file: 'my-tarball.tgz',\n onentry: entry => { .. do whatever with it .. }\n})\n```\n\nTo replicate `cat my-tarball.tgz | tar t` do:\n\n```js\nfs.createReadStream('my-tarball.tgz')\n .pipe(tar.t())\n .on('entry', entry => { .. do whatever with it .. })\n```\n\nTo do anything synchronous, add `sync: true` to the options. Note\nthat sync functions don't take a callback and don't return a promise.\nWhen the function returns, it's already done. Sync methods without a\nfile argument return a sync stream, which flushes immediately. But,\nof course, it still won't be done until you `.end()` it.\n\nTo filter entries, add `filter: <function>` to the options.\nTar-creating methods call the filter with `filter(path, stat)`.\nTar-reading methods (including extraction) call the filter with\n`filter(path, entry)`. The filter is called in the `this`-context of\nthe `Pack` or `Unpack` stream object.\n\nThe arguments list to `tar t` and `tar x` specify a list of filenames\nto extract or list, so they're equivalent to a filter that tests if\nthe file is in the list.\n\nFor those who _aren't_ fans of tar's single-character command names:\n\n```\ntar.c === tar.create\ntar.r === tar.replace (appends to archive, file is required)\ntar.u === tar.update (appends if newer, file is required)\ntar.x === tar.extract\ntar.t === tar.list\n```\n\nKeep reading for all the command descriptions and options, as well as\nthe low-level API that they are built on.\n\n### tar.c(options, fileList, callback) [alias: tar.create]\n\nCreate a tarball archive.\n\nThe `fileList` is an array of paths to add to the tarball. Adding a\ndirectory also adds its children recursively.\n\nAn entry in `fileList` that starts with an `@` symbol is a tar archive\nwhose entries will be added. To add a file that starts with `@`,\nprepend it with `./`.\n\nThe following options are supported:\n\n- `file` Write the tarball archive to the specified filename. If this\n is specified, then the callback will be fired when the file has been\n written, and a promise will be returned that resolves when the file\n is written. If a filename is not specified, then a Readable Stream\n will be returned which will emit the file data. [Alias: `f`]\n- `sync` Act synchronously. If this is set, then any provided file\n will be fully written after the call to `tar.c`. If this is set,\n and a file is not provided, then the resulting stream will already\n have the data ready to `read` or `emit('data')` as soon as you\n request it.\n- `onwarn` A function that will get called with `(message, data)` for\n any warnings encountered.\n- `strict` Treat warnings as crash-worthy errors. Default false.\n- `cwd` The current working directory for creating the archive.\n Defaults to `process.cwd()`. [Alias: `C`]\n- `prefix` A path portion to prefix onto the entries in the archive.\n- `gzip` Set to any truthy value to create a gzipped archive, or an\n object with settings for `zlib.Gzip()` [Alias: `z`]\n- `filter` A function that gets called with `(path, stat)` for each\n entry being added. Return `true` to add the entry to the archive,\n or `false` to omit it.\n- `portable` Omit metadata that is system-specific: `ctime`, `atime`,\n `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note\n that `mtime` is still included, because this is necessary other\n time-based operations.\n- `preservePaths` Allow absolute paths. By default, `/` is stripped\n from absolute paths. [Alias: `P`]\n- `mode` The mode to set on the created file archive\n- `noDirRecurse` Do not recursively archive the contents of\n directories. [Alias: `n`]\n- `follow` Set to true to pack the targets of symbolic links. Without\n this option, symbolic links are archived as such. [Alias: `L`, `h`]\n- `noPax` Suppress pax extended headers. Note that this means that\n long paths and linkpaths will be truncated, and large or negative\n numeric values may be interpreted incorrectly.\n- `noMtime` Set to true to omit writing `mtime` values for entries.\n Note that this prevents using other mtime-based features like\n `tar.update` or the `keepNewer` option with the resulting tar archive.\n [Alias: `m`, `no-mtime`]\n\nThe following options are mostly internal, but can be modified in some\nadvanced use cases, such as re-using caches between runs.\n\n- `linkCache` A Map object containing the device and inode value for\n any file whose nlink is > 1, to identify hard links.\n- `statCache` A Map object that caches calls `lstat`.\n- `readdirCache` A Map object that caches calls to `readdir`.\n- `jobs` A number specifying how many concurrent jobs to run.\n Defaults to 4.\n- `maxReadSize` The maximum buffer size for `fs.read()` operations.\n Defaults to 16 MB.\n\n### tar.x(options, fileList, callback) [alias: tar.extract]\n\nExtract a tarball archive.\n\nThe `fileList` is an array of paths to extract from the tarball. If\nno paths are provided, then all the entries are extracted.\n\nIf the archive is gzipped, then tar will detect this and unzip it.\n\nNote that all directories that are created will be forced to be\nwritable, readable, and listable by their owner, to avoid cases where\na directory prevents extraction of child entries by virtue of its\nmode.\n\nMost extraction errors will cause a `warn` event to be emitted. If\nthe `cwd` is missing, or not a directory, then the extraction will\nfail completely.\n\nThe following options are supported:\n\n- `cwd` Extract files relative to the specified directory. Defaults\n to `process.cwd()`. If provided, this must exist and must be a\n directory. [Alias: `C`]\n- `file` The archive file to extract. If not specified, then a\n Writable stream is returned where the archive data should be\n written. [Alias: `f`]\n- `sync` Create files and directories synchronously.\n- `strict` Treat warnings as crash-worthy errors. Default false.\n- `filter` A function that gets called with `(path, entry)` for each\n entry being unpacked. Return `true` to unpack the entry from the\n archive, or `false` to skip it.\n- `newer` Set to true to keep the existing file on disk if it's newer\n than the file in the archive. [Alias: `keep-newer`,\n `keep-newer-files`]\n- `keep` Do not overwrite existing files. In particular, if a file\n appears more than once in an archive, later copies will not\n overwrite earlier copies. [Alias: `k`, `keep-existing`]\n- `preservePaths` Allow absolute paths, paths containing `..`, and\n extracting through symbolic links. By default, `/` is stripped from\n absolute paths, `..` paths are not extracted, and any file whose\n location would be modified by a symbolic link is not extracted.\n [Alias: `P`]\n- `unlink` Unlink files before creating them. Without this option,\n tar overwrites existing files, which preserves existing hardlinks.\n With this option, existing hardlinks will be broken, as will any\n symlink that would affect the location of an extracted file. [Alias:\n `U`]\n- `strip` Remove the specified number of leading path elements.\n Pathnames with fewer elements will be silently skipped. Note that\n the pathname is edited after applying the filter, but before\n security checks. [Alias: `strip-components`, `stripComponents`]\n- `onwarn` A function that will get called with `(message, data)` for\n any warnings encountered.\n- `preserveOwner` If true, tar will set the `uid` and `gid` of\n extracted entries to the `uid` and `gid` fields in the archive.\n This defaults to true when run as root, and false otherwise. If\n false, then files and directories will be set with the owner and\n group of the user running the process. This is similar to `-p` in\n `tar(1)`, but ACLs and other system-specific data is never unpacked\n in this implementation, and modes are set by default already.\n [Alias: `p`]\n- `uid` Set to a number to force ownership of all extracted files and\n folders, and all implicitly created directories, to be owned by the\n specified user id, regardless of the `uid` field in the archive.\n Cannot be used along with `preserveOwner`. Requires also setting a\n `gid` option.\n- `gid` Set to a number to force ownership of all extracted files and\n folders, and all implicitly created directories, to be owned by the\n specified group id, regardless of the `gid` field in the archive.\n Cannot be used along with `preserveOwner`. Requires also setting a\n `uid` option.\n- `noMtime` Set to true to omit writing `mtime` value for extracted\n entries. [Alias: `m`, `no-mtime`]\n- `transform` Provide a function that takes an `entry` object, and\n returns a stream, or any falsey value. If a stream is provided,\n then that stream's data will be written instead of the contents of\n the archive entry. If a falsey value is provided, then the entry is\n written to disk as normal. (To exclude items from extraction, use\n the `filter` option described above.)\n- `onentry` A function that gets called with `(entry)` for each entry\n that passes the filter.\n\nThe following options are mostly internal, but can be modified in some\nadvanced use cases, such as re-using caches between runs.\n\n- `maxReadSize` The maximum buffer size for `fs.read()` operations.\n Defaults to 16 MB.\n- `umask` Filter the modes of entries like `process.umask()`.\n- `dmode` Default mode for directories\n- `fmode` Default mode for files\n- `dirCache` A Map object of which directories exist.\n- `maxMetaEntrySize` The maximum size of meta entries that is\n supported. Defaults to 1 MB.\n\nNote that using an asynchronous stream type with the `transform`\noption will cause undefined behavior in sync extractions.\n[MiniPass](http://npm.im/minipass)-based streams are designed for this\nuse case.\n\n### tar.t(options, fileList, callback) [alias: tar.list]\n\nList the contents of a tarball archive.\n\nThe `fileList` is an array of paths to list from the tarball. If\nno paths are provided, then all the entries are listed.\n\nIf the archive is gzipped, then tar will detect this and unzip it.\n\nReturns an event emitter that emits `entry` events with\n`tar.ReadEntry` objects. However, they don't emit `'data'` or `'end'`\nevents. (If you want to get actual readable entries, use the\n`tar.Parse` class instead.)\n\nThe following options are supported:\n\n- `cwd` Extract files relative to the specified directory. Defaults\n to `process.cwd()`. [Alias: `C`]\n- `file` The archive file to list. If not specified, then a\n Writable stream is returned where the archive data should be\n written. [Alias: `f`]\n- `sync` Read the specified file synchronously. (This has no effect\n when a file option isn't specified, because entries are emitted as\n fast as they are parsed from the stream anyway.)\n- `strict` Treat warnings as crash-worthy errors. Default false.\n- `filter` A function that gets called with `(path, entry)` for each\n entry being listed. Return `true` to emit the entry from the\n archive, or `false` to skip it.\n- `onentry` A function that gets called with `(entry)` for each entry\n that passes the filter. This is important for when both `file` and\n `sync` are set, because it will be called synchronously.\n- `maxReadSize` The maximum buffer size for `fs.read()` operations.\n Defaults to 16 MB.\n- `noResume` By default, `entry` streams are resumed immediately after\n the call to `onentry`. Set `noResume: true` to suppress this\n behavior. Note that by opting into this, the stream will never\n complete until the entry data is consumed.\n\n### tar.u(options, fileList, callback) [alias: tar.update]\n\nAdd files to an archive if they are newer than the entry already in\nthe tarball archive.\n\nThe `fileList` is an array of paths to add to the tarball. Adding a\ndirectory also adds its children recursively.\n\nAn entry in `fileList` that starts with an `@` symbol is a tar archive\nwhose entries will be added. To add a file that starts with `@`,\nprepend it with `./`.\n\nThe following options are supported:\n\n- `file` Required. Write the tarball archive to the specified\n filename. [Alias: `f`]\n- `sync` Act synchronously. If this is set, then any provided file\n will be fully written after the call to `tar.c`.\n- `onwarn` A function that will get called with `(message, data)` for\n any warnings encountered.\n- `strict` Treat warnings as crash-worthy errors. Default false.\n- `cwd` The current working directory for adding entries to the\n archive. Defaults to `process.cwd()`. [Alias: `C`]\n- `prefix` A path portion to prefix onto the entries in the archive.\n- `gzip` Set to any truthy value to create a gzipped archive, or an\n object with settings for `zlib.Gzip()` [Alias: `z`]\n- `filter` A function that gets called with `(path, stat)` for each\n entry being added. Return `true` to add the entry to the archive,\n or `false` to omit it.\n- `portable` Omit metadata that is system-specific: `ctime`, `atime`,\n `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note\n that `mtime` is still included, because this is necessary other\n time-based operations.\n- `preservePaths` Allow absolute paths. By default, `/` is stripped\n from absolute paths. [Alias: `P`]\n- `maxReadSize` The maximum buffer size for `fs.read()` operations.\n Defaults to 16 MB.\n- `noDirRecurse` Do not recursively archive the contents of\n directories. [Alias: `n`]\n- `follow` Set to true to pack the targets of symbolic links. Without\n this option, symbolic links are archived as such. [Alias: `L`, `h`]\n- `noPax` Suppress pax extended headers. Note that this means that\n long paths and linkpaths will be truncated, and large or negative\n numeric values may be interpreted incorrectly.\n- `noMtime` Set to true to omit writing `mtime` values for entries.\n Note that this prevents using other mtime-based features like\n `tar.update` or the `keepNewer` option with the resulting tar archive.\n [Alias: `m`, `no-mtime`]\n\n### tar.r(options, fileList, callback) [alias: tar.replace]\n\nAdd files to an existing archive. Because later entries override\nearlier entries, this effectively replaces any existing entries.\n\nThe `fileList` is an array of paths to add to the tarball. Adding a\ndirectory also adds its children recursively.\n\nAn entry in `fileList` that starts with an `@` symbol is a tar archive\nwhose entries will be added. To add a file that starts with `@`,\nprepend it with `./`.\n\nThe following options are supported:\n\n- `file` Required. Write the tarball archive to the specified\n filename. [Alias: `f`]\n- `sync` Act synchronously. If this is set, then any provided file\n will be fully written after the call to `tar.c`.\n- `onwarn` A function that will get called with `(message, data)` for\n any warnings encountered.\n- `strict` Treat warnings as crash-worthy errors. Default false.\n- `cwd` The current working directory for adding entries to the\n archive. Defaults to `process.cwd()`. [Alias: `C`]\n- `prefix` A path portion to prefix onto the entries in the archive.\n- `gzip` Set to any truthy value to create a gzipped archive, or an\n object with settings for `zlib.Gzip()` [Alias: `z`]\n- `filter` A function that gets called with `(path, stat)` for each\n entry being added. Return `true` to add the entry to the archive,\n or `false` to omit it.\n- `portable` Omit metadata that is system-specific: `ctime`, `atime`,\n `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note\n that `mtime` is still included, because this is necessary other\n time-based operations.\n- `preservePaths` Allow absolute paths. By default, `/` is stripped\n from absolute paths. [Alias: `P`]\n- `maxReadSize` The maximum buffer size for `fs.read()` operations.\n Defaults to 16 MB.\n- `noDirRecurse` Do not recursively archive the contents of\n directories. [Alias: `n`]\n- `follow` Set to true to pack the targets of symbolic links. Without\n this option, symbolic links are archived as such. [Alias: `L`, `h`]\n- `noPax` Suppress pax extended headers. Note that this means that\n long paths and linkpaths will be truncated, and large or negative\n numeric values may be interpreted incorrectly.\n- `noMtime` Set to true to omit writing `mtime` values for entries.\n Note that this prevents using other mtime-based features like\n `tar.update` or the `keepNewer` option with the resulting tar archive.\n [Alias: `m`, `no-mtime`]\n\n\n## Low-Level API\n\n### class tar.Pack\n\nA readable tar stream.\n\nHas all the standard readable stream interface stuff. `'data'` and\n`'end'` events, `read()` method, `pause()` and `resume()`, etc.\n\n#### constructor(options)\n\nThe following options are supported:\n\n- `onwarn` A function that will get called with `(message, data)` for\n any warnings encountered.\n- `strict` Treat warnings as crash-worthy errors. Default false.\n- `cwd` The current working directory for creating the archive.\n Defaults to `process.cwd()`.\n- `prefix` A path portion to prefix onto the entries in the archive.\n- `gzip` Set to any truthy value to create a gzipped archive, or an\n object with settings for `zlib.Gzip()`\n- `filter` A function that gets called with `(path, stat)` for each\n entry being added. Return `true` to add the entry to the archive,\n or `false` to omit it.\n- `portable` Omit metadata that is system-specific: `ctime`, `atime`,\n `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note\n that `mtime` is still included, because this is necessary other\n time-based operations.\n- `preservePaths` Allow absolute paths. By default, `/` is stripped\n from absolute paths.\n- `linkCache` A Map object containing the device and inode value for\n any file whose nlink is > 1, to identify hard links.\n- `statCache` A Map object that caches calls `lstat`.\n- `readdirCache` A Map object that caches calls to `readdir`.\n- `jobs` A number specifying how many concurrent jobs to run.\n Defaults to 4.\n- `maxReadSize` The maximum buffer size for `fs.read()` operations.\n Defaults to 16 MB.\n- `noDirRecurse` Do not recursively archive the contents of\n directories.\n- `follow` Set to true to pack the targets of symbolic links. Without\n this option, symbolic links are archived as such.\n- `noPax` Suppress pax extended headers. Note that this means that\n long paths and linkpaths will be truncated, and large or negative\n numeric values may be interpreted incorrectly.\n- `noMtime` Set to true to omit writing `mtime` values for entries.\n Note that this prevents using other mtime-based features like\n `tar.update` or the `keepNewer` option with the resulting tar archive.\n\n\n#### add(path)\n\nAdds an entry to the archive. Returns the Pack stream.\n\n#### write(path)\n\nAdds an entry to the archive. Returns true if flushed.\n\n#### end()\n\nFinishes the archive.\n\n### class tar.Pack.Sync\n\nSynchronous version of `tar.Pack`.\n\n### class tar.Unpack\n\nA writable stream that unpacks a tar archive onto the file system.\n\nAll the normal writable stream stuff is supported. `write()` and\n`end()` methods, `'drain'` events, etc.\n\nNote that all directories that are created will be forced to be\nwritable, readable, and listable by their owner, to avoid cases where\na directory prevents extraction of child entries by virtue of its\nmode.\n\n`'close'` is emitted when it's done writing stuff to the file system.\n\nMost unpack errors will cause a `warn` event to be emitted. If the\n`cwd` is missing, or not a directory, then an error will be emitted.\n\n#### constructor(options)\n\n- `cwd` Extract files relative to the specified directory. Defaults\n to `process.cwd()`. If provided, this must exist and must be a\n directory.\n- `filter` A function that gets called with `(path, entry)` for each\n entry being unpacked. Return `true` to unpack the entry from the\n archive, or `false` to skip it.\n- `newer` Set to true to keep the existing file on disk if it's newer\n than the file in the archive.\n- `keep` Do not overwrite existing files. In particular, if a file\n appears more than once in an archive, later copies will not\n overwrite earlier copies.\n- `preservePaths` Allow absolute paths, paths containing `..`, and\n extracting through symbolic links. By default, `/` is stripped from\n absolute paths, `..` paths are not extracted, and any file whose\n location would be modified by a symbolic link is not extracted.\n- `unlink` Unlink files before creating them. Without this option,\n tar overwrites existing files, which preserves existing hardlinks.\n With this option, existing hardlinks will be broken, as will any\n symlink that would affect the location of an extracted file.\n- `strip` Remove the specified number of leading path elements.\n Pathnames with fewer elements will be silently skipped. Note that\n the pathname is edited after applying the filter, but before\n security checks.\n- `onwarn` A function that will get called with `(message, data)` for\n any warnings encountered.\n- `umask` Filter the modes of entries like `process.umask()`.\n- `dmode` Default mode for directories\n- `fmode` Default mode for files\n- `dirCache` A Map object of which directories exist.\n- `maxMetaEntrySize` The maximum size of meta entries that is\n supported. Defaults to 1 MB.\n- `preserveOwner` If true, tar will set the `uid` and `gid` of\n extracted entries to the `uid` and `gid` fields in the archive.\n This defaults to true when run as root, and false otherwise. If\n false, then files and directories will be set with the owner and\n group of the user running the process. This is similar to `-p` in\n `tar(1)`, but ACLs and other system-specific data is never unpacked\n in this implementation, and modes are set by default already.\n- `win32` True if on a windows platform. Causes behavior where\n filenames containing `<|>?` chars are converted to\n windows-compatible values while being unpacked.\n- `uid` Set to a number to force ownership of all extracted files and\n folders, and all implicitly created directories, to be owned by the\n specified user id, regardless of the `uid` field in the archive.\n Cannot be used along with `preserveOwner`. Requires also setting a\n `gid` option.\n- `gid` Set to a number to force ownership of all extracted files and\n folders, and all implicitly created directories, to be owned by the\n specified group id, regardless of the `gid` field in the archive.\n Cannot be used along with `preserveOwner`. Requires also setting a\n `uid` option.\n- `noMtime` Set to true to omit writing `mtime` value for extracted\n entries.\n- `transform` Provide a function that takes an `entry` object, and\n returns a stream, or any falsey value. If a stream is provided,\n then that stream's data will be written instead of the contents of\n the archive entry. If a falsey value is provided, then the entry is\n written to disk as normal. (To exclude items from extraction, use\n the `filter` option described above.)\n- `strict` Treat warnings as crash-worthy errors. Default false.\n- `onentry` A function that gets called with `(entry)` for each entry\n that passes the filter.\n- `onwarn` A function that will get called with `(message, data)` for\n any warnings encountered.\n\n### class tar.Unpack.Sync\n\nSynchronous version of `tar.Unpack`.\n\nNote that using an asynchronous stream type with the `transform`\noption will cause undefined behavior in sync unpack streams.\n[MiniPass](http://npm.im/minipass)-based streams are designed for this\nuse case.\n\n### class tar.Parse\n\nA writable stream that parses a tar archive stream. All the standard\nwritable stream stuff is supported.\n\nIf the archive is gzipped, then tar will detect this and unzip it.\n\nEmits `'entry'` events with `tar.ReadEntry` objects, which are\nthemselves readable streams that you can pipe wherever.\n\nEach `entry` will not emit until the one before it is flushed through,\nso make sure to either consume the data (with `on('data', ...)` or\n`.pipe(...)`) or throw it away with `.resume()` to keep the stream\nflowing.\n\n#### constructor(options)\n\nReturns an event emitter that emits `entry` events with\n`tar.ReadEntry` objects.\n\nThe following options are supported:\n\n- `strict` Treat warnings as crash-worthy errors. Default false.\n- `filter` A function that gets called with `(path, entry)` for each\n entry being listed. Return `true` to emit the entry from the\n archive, or `false` to skip it.\n- `onentry` A function that gets called with `(entry)` for each entry\n that passes the filter.\n- `onwarn` A function that will get called with `(message, data)` for\n any warnings encountered.\n\n#### abort(message, error)\n\nStop all parsing activities. This is called when there are zlib\nerrors. It also emits a warning with the message and error provided.\n\n### class tar.ReadEntry extends [MiniPass](http://npm.im/minipass)\n\nA representation of an entry that is being read out of a tar archive.\n\nIt has the following fields:\n\n- `extended` The extended metadata object provided to the constructor.\n- `globalExtended` The global extended metadata object provided to the\n constructor.\n- `remain` The number of bytes remaining to be written into the\n stream.\n- `blockRemain` The number of 512-byte blocks remaining to be written\n into the stream.\n- `ignore` Whether this entry should be ignored.\n- `meta` True if this represents metadata about the next entry, false\n if it represents a filesystem object.\n- All the fields from the header, extended header, and global extended\n header are added to the ReadEntry object. So it has `path`, `type`,\n `size, `mode`, and so on.\n\n#### constructor(header, extended, globalExtended)\n\nCreate a new ReadEntry object with the specified header, extended\nheader, and global extended header values.\n\n### class tar.WriteEntry extends [MiniPass](http://npm.im/minipass)\n\nA representation of an entry that is being written from the file\nsystem into a tar archive.\n\nEmits data for the Header, and for the Pax Extended Header if one is\nrequired, as well as any body data.\n\nCreating a WriteEntry for a directory does not also create\nWriteEntry objects for all of the directory contents.\n\nIt has the following fields:\n\n- `path` The path field that will be written to the archive. By\n default, this is also the path from the cwd to the file system\n object.\n- `portable` Omit metadata that is system-specific: `ctime`, `atime`,\n `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note\n that `mtime` is still included, because this is necessary other\n time-based operations.\n- `myuid` If supported, the uid of the user running the current\n process.\n- `myuser` The `env.USER` string if set, or `''`. Set as the entry\n `uname` field if the file's `uid` matches `this.myuid`.\n- `maxReadSize` The maximum buffer size for `fs.read()` operations.\n Defaults to 1 MB.\n- `linkCache` A Map object containing the device and inode value for\n any file whose nlink is > 1, to identify hard links.\n- `statCache` A Map object that caches calls `lstat`.\n- `preservePaths` Allow absolute paths. By default, `/` is stripped\n from absolute paths.\n- `cwd` The current working directory for creating the archive.\n Defaults to `process.cwd()`.\n- `absolute` The absolute path to the entry on the filesystem. By\n default, this is `path.resolve(this.cwd, this.path)`, but it can be\n overridden explicitly.\n- `strict` Treat warnings as crash-worthy errors. Default false.\n- `win32` True if on a windows platform. Causes behavior where paths\n replace `\\` with `/` and filenames containing the windows-compatible\n forms of `<|>?:` characters are converted to actual `<|>?:` characters\n in the archive.\n- `noPax` Suppress pax extended headers. Note that this means that\n long paths and linkpaths will be truncated, and large or negative\n numeric values may be interpreted incorrectly.\n- `noMtime` Set to true to omit writing `mtime` values for entries.\n Note that this prevents using other mtime-based features like\n `tar.update` or the `keepNewer` option with the resulting tar archive.\n\n\n#### constructor(path, options)\n\n`path` is the path of the entry as it is written in the archive.\n\nThe following options are supported:\n\n- `portable` Omit metadata that is system-specific: `ctime`, `atime`,\n `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note\n that `mtime` is still included, because this is necessary other\n time-based operations.\n- `maxReadSize` The maximum buffer size for `fs.read()` operations.\n Defaults to 1 MB.\n- `linkCache` A Map object containing the device and inode value for\n any file whose nlink is > 1, to identify hard links.\n- `statCache` A Map object that caches calls `lstat`.\n- `preservePaths` Allow absolute paths. By default, `/` is stripped\n from absolute paths.\n- `cwd` The current working directory for creating the archive.\n Defaults to `process.cwd()`.\n- `absolute` The absolute path to the entry on the filesystem. By\n default, this is `path.resolve(this.cwd, this.path)`, but it can be\n overridden explicitly.\n- `strict` Treat warnings as crash-worthy errors. Default false.\n- `win32` True if on a windows platform. Causes behavior where paths\n replace `\\` with `/`.\n- `onwarn` A function that will get called with `(message, data)` for\n any warnings encountered.\n- `noMtime` Set to true to omit writing `mtime` values for entries.\n Note that this prevents using other mtime-based features like\n `tar.update` or the `keepNewer` option with the resulting tar archive.\n\n#### warn(message, data)\n\nIf strict, emit an error with the provided message.\n\nOthewise, emit a `'warn'` event with the provided message and data.\n\n### class tar.WriteEntry.Sync\n\nSynchronous version of tar.WriteEntry\n\n### class tar.WriteEntry.Tar\n\nA version of tar.WriteEntry that gets its data from a tar.ReadEntry\ninstead of from the filesystem.\n\n#### constructor(readEntry, options)\n\n`readEntry` is the entry being read out of another archive.\n\nThe following options are supported:\n\n- `portable` Omit metadata that is system-specific: `ctime`, `atime`,\n `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note\n that `mtime` is still included, because this is necessary other\n time-based operations.\n- `preservePaths` Allow absolute paths. By default, `/` is stripped\n from absolute paths.\n- `strict` Treat warnings as crash-worthy errors. Default false.\n- `onwarn` A function that will get called with `(message, data)` for\n any warnings encountered.\n- `noMtime` Set to true to omit writing `mtime` values for entries.\n Note that this prevents using other mtime-based features like\n `tar.update` or the `keepNewer` option with the resulting tar archive.\n\n### class tar.Header\n\nA class for reading and writing header blocks.\n\nIt has the following fields:\n\n- `nullBlock` True if decoding a block which is entirely composed of\n `0x00` null bytes. (Useful because tar files are terminated by\n at least 2 null blocks.)\n- `cksumValid` True if the checksum in the header is valid, false\n otherwise.\n- `needPax` True if the values, as encoded, will require a Pax\n extended header.\n- `path` The path of the entry.\n- `mode` The 4 lowest-order octal digits of the file mode. That is,\n read/write/execute permissions for world, group, and owner, and the\n setuid, setgid, and sticky bits.\n- `uid` Numeric user id of the file owner\n- `gid` Numeric group id of the file owner\n- `size` Size of the file in bytes\n- `mtime` Modified time of the file\n- `cksum` The checksum of the header. This is generated by adding all\n the bytes of the header block, treating the checksum field itself as\n all ascii space characters (that is, `0x20`).\n- `type` The human-readable name of the type of entry this represents,\n or the alphanumeric key if unknown.\n- `typeKey` The alphanumeric key for the type of entry this header\n represents.\n- `linkpath` The target of Link and SymbolicLink entries.\n- `uname` Human-readable user name of the file owner\n- `gname` Human-readable group name of the file owner\n- `devmaj` The major portion of the device number. Always `0` for\n files, directories, and links.\n- `devmin` The minor portion of the device number. Always `0` for\n files, directories, and links.\n- `atime` File access time.\n- `ctime` File change time.\n\n#### constructor(data, [offset=0])\n\n`data` is optional. It is either a Buffer that should be interpreted\nas a tar Header starting at the specified offset and continuing for\n512 bytes, or a data object of keys and values to set on the header\nobject, and eventually encode as a tar Header.\n\n#### decode(block, offset)\n\nDecode the provided buffer starting at the specified offset.\n\nBuffer length must be greater than 512 bytes.\n\n#### set(data)\n\nSet the fields in the data object.\n\n#### encode(buffer, offset)\n\nEncode the header fields into the buffer at the specified offset.\n\nReturns `this.needPax` to indicate whether a Pax Extended Header is\nrequired to properly encode the specified data.\n\n### class tar.Pax\n\nAn object representing a set of key-value pairs in an Pax extended\nheader entry.\n\nIt has the following fields. Where the same name is used, they have\nthe same semantics as the tar.Header field of the same name.\n\n- `global` True if this represents a global extended header, or false\n if it is for a single entry.\n- `atime`\n- `charset`\n- `comment`\n- `ctime`\n- `gid`\n- `gname`\n- `linkpath`\n- `mtime`\n- `path`\n- `size`\n- `uid`\n- `uname`\n- `dev`\n- `ino`\n- `nlink`\n\n#### constructor(object, global)\n\nSet the fields set in the object. `global` is a boolean that defaults\nto false.\n\n#### encode()\n\nReturn a Buffer containing the header and body for the Pax extended\nheader entry, or `null` if there is nothing to encode.\n\n#### encodeBody()\n\nReturn a string representing the body of the pax extended header\nentry.\n\n#### encodeField(fieldName)\n\nReturn a string representing the key/value encoding for the specified\nfieldName, or `''` if the field is unset.\n\n### tar.Pax.parse(string, extended, global)\n\nReturn a new Pax object created by parsing the contents of the string\nprovided.\n\nIf the `extended` object is set, then also add the fields from that\nobject. (This is necessary because multiple metadata entries can\noccur in sequence.)\n\n### tar.types\n\nA translation table for the `type` field in tar headers.\n\n#### tar.types.name.get(code)\n\nGet the human-readable name for a given alphanumeric code.\n\n#### tar.types.code.get(name)\n\nGet the alphanumeric code for a given human-readable name.\n",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git+https://github.com/npm/node-tar.git"
},
"scripts": {
"bench": "for i in benchmarks/*/*.js; do echo $i; for j in {1..5}; do node $i || break; done; done",
"genparse": "node scripts/generate-parse-fixtures.js",
"postpublish": "git push origin --all; git push origin --tags",
"postversion": "npm publish",
"preversion": "npm test",
"test": "tap test/*.js --100 -J --coverage-report=text -c"
},
"version": "4.3.3"
}