PHP 8.2.30
Preview: make-command.js Size: 2.00 KB
//opt/alt/alt-nodejs24/root/usr/lib/node_modules/npm/node_modules.bundled/tar/dist/commonjs/make-command.js

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.makeCommand = void 0;
const options_js_1 = require("./options.js");
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 = (0, options_js_1.dealias)(opt_);
        validate?.(opt, entries);
        if ((0, options_js_1.isSyncFile)(opt)) {
            if (typeof cb === 'function') {
                throw new TypeError('callback not supported for sync tar functions');
            }
            return syncFile(opt, entries);
        }
        else if ((0, options_js_1.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 ((0, options_js_1.isSyncNoFile)(opt)) {
            if (typeof cb === 'function') {
                throw new TypeError('callback not supported for sync tar functions');
            }
            return syncNoFile(opt, entries);
        }
        else if ((0, options_js_1.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,
    });
};
exports.makeCommand = makeCommand;
//# sourceMappingURL=make-command.js.map

Directory Contents

Dirs: 0 × Files: 30

Name Size Perms Modified Actions
2.51 KB lrw-r--r-- 2026-02-23 07:38:42
Edit Download
436 B lrw-r--r-- 2026-02-23 07:38:42
Edit Download
3.04 KB lrw-r--r-- 2026-02-23 07:38:42
Edit Download
1.27 KB lrw-r--r-- 2026-02-23 07:38:42
Edit Download
11.54 KB lrw-r--r-- 2026-02-23 07:38:42
Edit Download
2.74 KB lrw-r--r-- 2026-02-23 07:38:42
Edit Download
2.67 KB lrw-r--r-- 2026-02-23 07:38:42
Edit Download
4.86 KB lrw-r--r-- 2026-02-23 07:38:42
Edit Download
2.00 KB lrw-r--r-- 2026-02-23 07:38:42
Edit Download
6.64 KB lrw-r--r-- 2026-02-23 07:38:42
Edit Download
876 B lrw-r--r-- 2026-02-23 07:38:42
Edit Download
1019 B lrw-r--r-- 2026-02-23 07:38:42
Edit Download
601 B lrw-r--r-- 2026-02-23 07:38:42
Edit Download
2.07 KB lrw-r--r-- 2026-02-23 07:38:42
Edit Download
15.17 KB lrw-r--r-- 2026-02-23 07:38:42
Edit Download
25 B lrw-r--r-- 2026-02-23 07:38:42
Edit Download
22.55 KB lrw-r--r-- 2026-02-23 07:38:42
Edit Download
5.59 KB lrw-r--r-- 2026-02-23 07:38:42
Edit Download
4.79 KB lrw-r--r-- 2026-02-23 07:38:42
Edit Download
4.35 KB lrw-r--r-- 2026-02-23 07:38:42
Edit Download
7.69 KB lrw-r--r-- 2026-02-23 07:38:42
Edit Download
1.20 KB lrw-r--r-- 2026-02-23 07:38:42
Edit Download
651 B lrw-r--r-- 2026-02-23 07:38:42
Edit Download
528 B lrw-r--r-- 2026-02-23 07:38:42
Edit Download
1.44 KB lrw-r--r-- 2026-02-23 07:38:42
Edit Download
32.10 KB lrw-r--r-- 2026-02-23 07:38:42
Edit Download
1.20 KB lrw-r--r-- 2026-02-23 07:38:42
Edit Download
927 B lrw-r--r-- 2026-02-23 07:38:42
Edit Download
704 B lrw-r--r-- 2026-02-23 07:38:42
Edit Download
24.45 KB lrw-r--r-- 2026-02-23 07:38:42
Edit Download

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