PHP 8.2.30
Preview: make-command.js Size: 1.83 KB
/proc/thread-self/root/opt/alt/alt-nodejs24/root/lib/node_modules/npm/node_modules/tar/dist/esm/make-command.js

import { dealias, isAsyncFile, isAsyncNoFile, isSyncFile, isSyncNoFile, } from './options.js';
export const makeCommand = (syncFile, asyncFile, syncNoFile, asyncNoFile, validate) => {
    return Object.assign((opt_ = [], entries, cb) => {
        if (Array.isArray(opt_)) {
            entries = opt_;
            opt_ = {};
        }
        if (typeof entries === 'function') {
            cb = entries;
            entries = undefined;
        }
        if (!entries) {
            entries = [];
        }
        else {
            entries = Array.from(entries);
        }
        const opt = dealias(opt_);
        validate?.(opt, entries);
        if (isSyncFile(opt)) {
            if (typeof cb === 'function') {
                throw new TypeError('callback not supported for sync tar functions');
            }
            return syncFile(opt, entries);
        }
        else if (isAsyncFile(opt)) {
            const p = asyncFile(opt, entries);
            // weirdness to make TS happy
            const c = cb ? cb : undefined;
            return c ? p.then(() => c(), c) : p;
        }
        else if (isSyncNoFile(opt)) {
            if (typeof cb === 'function') {
                throw new TypeError('callback not supported for sync tar functions');
            }
            return syncNoFile(opt, entries);
        }
        else if (isAsyncNoFile(opt)) {
            if (typeof cb === 'function') {
                throw new TypeError('callback only supported with file option');
            }
            return asyncNoFile(opt, entries);
            /* c8 ignore start */
        }
        else {
            throw new Error('impossible options??');
        }
        /* c8 ignore stop */
    }, {
        syncFile,
        asyncFile,
        syncNoFile,
        asyncNoFile,
        validate,
    });
};
//# sourceMappingURL=make-command.js.map

Directory Contents

Dirs: 0 × Files: 30

Name Size Perms Modified Actions
2.11 KB lrw-r--r-- 2026-02-23 07:38:42
Edit Download
310 B lrw-r--r-- 2026-02-23 07:38:42
Edit Download
1.65 KB lrw-r--r-- 2026-02-23 07:38:42
Edit Download
1018 B lrw-r--r-- 2026-02-23 07:38:42
Edit Download
10.36 KB lrw-r--r-- 2026-02-23 07:38:42
Edit Download
647 B lrw-r--r-- 2026-02-23 07:38:42
Edit Download
2.52 KB lrw-r--r-- 2026-02-23 07:38:42
Edit Download
3.24 KB lrw-r--r-- 2026-02-23 07:38:42
Edit Download
1.83 KB lrw-r--r-- 2026-02-23 07:38:42
Edit Download
5.60 KB lrw-r--r-- 2026-02-23 07:38:42
Edit Download
753 B lrw-r--r-- 2026-02-23 07:38:42
Edit Download
869 B lrw-r--r-- 2026-02-23 07:38:42
Edit Download
490 B lrw-r--r-- 2026-02-23 07:38:42
Edit Download
1.60 KB lrw-r--r-- 2026-02-23 07:38:42
Edit Download
13.52 KB lrw-r--r-- 2026-02-23 07:38:42
Edit Download
23 B lrw-r--r-- 2026-02-23 07:38:42
Edit Download
22.31 KB lrw-r--r-- 2026-02-23 07:38:42
Edit Download
5.33 KB lrw-r--r-- 2026-02-23 07:38:42
Edit Download
4.64 KB lrw-r--r-- 2026-02-23 07:38:42
Edit Download
4.08 KB lrw-r--r-- 2026-02-23 07:38:42
Edit Download
7.03 KB lrw-r--r-- 2026-02-23 07:38:42
Edit Download
1.04 KB lrw-r--r-- 2026-02-23 07:38:42
Edit Download
489 B lrw-r--r-- 2026-02-23 07:38:42
Edit Download
390 B lrw-r--r-- 2026-02-23 07:38:42
Edit Download
1.25 KB lrw-r--r-- 2026-02-23 07:38:42
Edit Download
29.50 KB lrw-r--r-- 2026-02-23 07:38:42
Edit Download
1006 B lrw-r--r-- 2026-02-23 07:38:42
Edit Download
795 B lrw-r--r-- 2026-02-23 07:38:42
Edit Download
549 B lrw-r--r-- 2026-02-23 07:38:42
Edit Download
22.25 KB lrw-r--r-- 2026-02-23 07:38:42
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).