UNPKG

@rushstack/package-extractor

Version:

A library for bundling selected files and dependencies into a deployable package.

44 lines 2.16 kB
"use strict"; // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. // See LICENSE in the project root for license information. var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; var _a, _b; Object.defineProperty(exports, "__esModule", { value: true }); exports.TARGET_ROOT_FOLDER = exports.TARGET_ROOT_SCRIPT_RELATIVE_PATH = exports.LINK_BINS_PARAMETER_NAME = exports.REALIZE_FILES_PARAMETER_NAME = exports.REMOVE_ACTION_NAME = exports.CREATE_ACTION_NAME = exports.MAX_CONCURRENCY = void 0; const node_os_1 = __importDefault(require("node:os")); const node_path_1 = __importDefault(require("node:path")); /** * The maximum number of concurrent operations to perform. */ exports.MAX_CONCURRENCY = ((_b = (_a = node_os_1.default.availableParallelism) === null || _a === void 0 ? void 0 : _a.call(node_os_1.default)) !== null && _b !== void 0 ? _b : node_os_1.default.cpus().length) * 2; /** * The name of the action to create symlinks. */ exports.CREATE_ACTION_NAME = 'create'; /** * The name of the action to remove symlinks. */ exports.REMOVE_ACTION_NAME = 'remove'; /** * The name of the parameter to realize files when creating symlinks. */ exports.REALIZE_FILES_PARAMETER_NAME = '--realize-files'; /** * The name of the parameter to link bins when creating symlinks. */ exports.LINK_BINS_PARAMETER_NAME = '--link-bins'; /** * The name of the parameter to link packages when creating symlinks. The actual value of this * export is modified after bundling the script to ensure that the extracted version of the script * contains the relative path from the extraction target folder to the script. Generally, this * value should not be used directly, but rather the `TARGET_ROOT_FOLDER` export should be used * instead. */ exports.TARGET_ROOT_SCRIPT_RELATIVE_PATH = '{TARGET_ROOT_SCRIPT_RELATIVE_PATH}'; /** * The path to the root folder where symlinks are created. */ exports.TARGET_ROOT_FOLDER = node_path_1.default.resolve(__dirname, exports.TARGET_ROOT_SCRIPT_RELATIVE_PATH); //# sourceMappingURL=constants.js.map