feat: install corepack before enabling

This commit is contained in:
Jacob Parish 2025-03-25 09:53:39 -05:00
parent dfc689aeba
commit 4c2fa5a76f
4 changed files with 72 additions and 60 deletions

View File

@ -288,30 +288,37 @@ describe('main tests', () => {
it('should not enable corepack when no input', async () => {
inputs['corepack'] = '';
await main.run();
expect(getCommandOutputSpy).not.toHaveBeenCalledWith(expect.stringContaining('corepack'));
expect(getCommandOutputSpy).not.toHaveBeenCalledWith(
expect.stringContaining('corepack')
);
});
it('should not enable corepack when input is "false"', async () => {
inputs['corepack'] = 'false';
await main.run();
expect(getCommandOutputSpy).not.toHaveBeenCalledWith(expect.stringContaining('corepack'));
expect(getCommandOutputSpy).not.toHaveBeenCalledWith(
expect.stringContaining('corepack')
);
});
it('should enable corepack when input is "true"', async () => {
inputs['corepack'] = 'true';
await main.run();
expect(getCommandOutputSpy).toHaveBeenCalledWith('npm i -g corepack');
expect(getCommandOutputSpy).toHaveBeenCalledWith('corepack enable');
});
it('should enable corepack with a single package manager', async () => {
inputs['corepack'] = 'npm';
await main.run();
expect(getCommandOutputSpy).toHaveBeenCalledWith('npm i -g corepack');
expect(getCommandOutputSpy).toHaveBeenCalledWith('corepack enable npm');
});
it('should enable corepack with multiple package managers', async () => {
inputs['corepack'] = 'npm yarn';
await main.run();
expect(getCommandOutputSpy).toHaveBeenCalledWith('npm i -g corepack');
expect(getCommandOutputSpy).toHaveBeenCalledWith(
'corepack enable npm yarn'
);

View File

@ -2151,7 +2151,7 @@ function retry(name, method, getStatusCode, maxAttempts = constants_1.DefaultRet
exports.retry = retry;
function retryTypedResponse(name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay = constants_1.DefaultRetryDelay) {
return __awaiter(this, void 0, void 0, function* () {
return yield retry(name, method, (response) => response.statusCode, maxAttempts, delay,
return yield retry(name, method, (response) => response.statusCode, maxAttempts, delay,
// If the error object contains the statusCode property, extract it and return
// an TypedResponse<T> so it can be processed by the retry logic.
(error) => {
@ -6305,8 +6305,8 @@ class OidcClient {
const res = yield httpclient
.getJson(id_token_url)
.catch(error => {
throw new Error(`Failed to get ID Token. \n
Error Code : ${error.statusCode}\n
throw new Error(`Failed to get ID Token. \n
Error Code : ${error.statusCode}\n
Error Message: ${error.message}`);
});
const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value;
@ -11102,7 +11102,7 @@ class Serializer {
/**
* The provided model mapper.
*/
modelMappers = {},
modelMappers = {},
/**
* Whether the contents are XML or not.
*/
@ -13218,7 +13218,7 @@ class NodeFetchHttpClient {
body = uploadReportStream;
}
const platformSpecificRequestInit = await this.prepareRequest(httpRequest);
const requestInit = Object.assign({ body: body, headers: httpRequest.headers.rawHeaders(), method: httpRequest.method,
const requestInit = Object.assign({ body: body, headers: httpRequest.headers.rawHeaders(), method: httpRequest.method,
// the types for RequestInit are from the browser, which expects AbortSignal to
// have `reason` and `throwIfAborted`, but these don't exist on our polyfill
// for Node.
@ -13417,7 +13417,7 @@ class BaseRequestPolicy {
/**
* The next policy in the pipeline. Each policy is responsible for executing the next one if the request is to continue through the pipeline.
*/
_nextPolicy,
_nextPolicy,
/**
* The options that can be passed to a given request policy.
*/
@ -14395,7 +14395,7 @@ function createTokenCycler(credential, scopes, tokenCyclerOptions) {
const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions);
// Take advantage of promise chaining to insert an assignment to `token`
// before the refresh can be considered done.
refreshWorker = beginRefresh(tryGetAccessToken, options.retryIntervalInMs,
refreshWorker = beginRefresh(tryGetAccessToken, options.retryIntervalInMs,
// If we don't have a token, then we should timeout immediately
(_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : Date.now())
.then((_token) => {
@ -15202,7 +15202,7 @@ class ServiceClient {
* @param credentials - The credentials used for authentication with the service.
* @param options - The service client options that govern the behavior of the client.
*/
constructor(credentials,
constructor(credentials,
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */
options) {
if (!options) {
@ -34182,7 +34182,7 @@ function createTokenCycler(credential, scopes, tokenCyclerOptions) {
const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions);
// Take advantage of promise chaining to insert an assignment to `token`
// before the refresh can be considered done.
refreshWorker = beginRefresh(tryGetAccessToken, options.retryIntervalInMs,
refreshWorker = beginRefresh(tryGetAccessToken, options.retryIntervalInMs,
// If we don't have a token, then we should timeout immediately
(_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : Date.now())
.then((_token) => {
@ -38602,7 +38602,7 @@ const fsCreateReadStream = fs__namespace.createReadStream;
* append blob, or page blob.
*/
class BlobClient extends StorageClient {
constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions,
constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions,
// Legacy, no fix for eslint error without breaking. Disable it for this interface.
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
options) {
@ -39650,7 +39650,7 @@ class BlobClient extends StorageClient {
* AppendBlobClient defines a set of operations applicable to append blobs.
*/
class AppendBlobClient extends BlobClient {
constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions,
constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions,
// Legacy, no fix for eslint error without breaking. Disable it for this interface.
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
options) {
@ -39906,7 +39906,7 @@ class AppendBlobClient extends BlobClient {
* BlockBlobClient defines a set of operations applicable to block blobs.
*/
class BlockBlobClient extends BlobClient {
constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions,
constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions,
// Legacy, no fix for eslint error without breaking. Disable it for this interface.
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
options) {
@ -40535,7 +40535,7 @@ class BlockBlobClient extends BlobClient {
if (options.onProgress) {
options.onProgress({ loadedBytes: transferProgress });
}
},
},
// concurrency should set a smaller value than maxConcurrency, which is helpful to
// reduce the possibility when a outgoing handler waits for stream data, in
// this situation, outgoing handlers are blocked.
@ -40560,7 +40560,7 @@ class BlockBlobClient extends BlobClient {
* PageBlobClient defines a set of operations applicable to page blobs.
*/
class PageBlobClient extends BlobClient {
constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions,
constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions,
// Legacy, no fix for eslint error without breaking. Disable it for this interface.
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
options) {
@ -41818,7 +41818,7 @@ class BatchHeaderFilterPolicyFactory {
* @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch
*/
class BlobBatchClient {
constructor(url, credentialOrPipeline,
constructor(url, credentialOrPipeline,
// Legacy, no fix for eslint error without breaking. Disable it for this interface.
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
options) {
@ -41850,7 +41850,7 @@ class BlobBatchClient {
createBatch() {
return new BlobBatch();
}
async deleteBlobs(urlsOrBlobClients, credentialOrOptions,
async deleteBlobs(urlsOrBlobClients, credentialOrOptions,
// Legacy, no fix for eslint error without breaking. Disable it for this interface.
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
options) {
@ -41865,7 +41865,7 @@ class BlobBatchClient {
}
return this.submitBatch(batch);
}
async setBlobsAccessTier(urlsOrBlobClients, credentialOrTier, tierOrOptions,
async setBlobsAccessTier(urlsOrBlobClients, credentialOrTier, tierOrOptions,
// Legacy, no fix for eslint error without breaking. Disable it for this interface.
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
options) {
@ -41957,7 +41957,7 @@ class BlobBatchClient {
* A ContainerClient represents a URL to the Azure Storage container allowing you to manipulate its blobs.
*/
class ContainerClient extends StorageClient {
constructor(urlOrConnectionString, credentialOrPipelineOrContainerName,
constructor(urlOrConnectionString, credentialOrPipelineOrContainerName,
// Legacy, no fix for eslint error without breaking. Disable it for this interface.
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
options) {
@ -43669,7 +43669,7 @@ function generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyC
* to manipulate blob containers.
*/
class BlobServiceClient extends StorageClient {
constructor(url, credentialOrPipeline,
constructor(url, credentialOrPipeline,
// Legacy, no fix for eslint error without breaking. Disable it for this interface.
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
options) {
@ -43701,7 +43701,7 @@ class BlobServiceClient extends StorageClient {
* `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString`
* @param options - Optional. Options to configure the HTTP pipeline.
*/
static fromConnectionString(connectionString,
static fromConnectionString(connectionString,
// Legacy, no fix for eslint error without breaking. Disable it for this interface.
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
options) {
@ -49137,7 +49137,7 @@ class BinaryWriter {
* Write a `sint64` value, a signed, zig-zag-encoded 64-bit varint.
*/
sint64(value) {
let long = pb_long_1.PbLong.from(value),
let long = pb_long_1.PbLong.from(value),
// zigzag encode
sign = long.hi >> 31, lo = (long.lo << 1) ^ sign, hi = ((long.hi << 1) | (long.lo >>> 31)) ^ sign;
goog_varint_1.varint64write(lo, hi, this.buf);
@ -88239,12 +88239,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.unique = exports.printEnvDetailsAndSetOutput = exports.getNodeVersionFromFile = void 0;
exports.enableCorepack = exports.unique = exports.printEnvDetailsAndSetOutput = exports.getNodeVersionFromFile = void 0;
const core = __importStar(__nccwpck_require__(7484));
const exec = __importStar(__nccwpck_require__(5236));
const io = __importStar(__nccwpck_require__(4994));
const fs_1 = __importDefault(__nccwpck_require__(9896));
const path_1 = __importDefault(__nccwpck_require__(6928));
const cache_utils_1 = __nccwpck_require__(4673);
function getNodeVersionFromFile(versionFilePath) {
var _a, _b, _c, _d, _e;
if (!fs_1.default.existsSync(versionFilePath)) {
@ -88345,6 +88346,7 @@ function enableCorepack(input) {
const packageManagers = input.split(' ');
corepackArgs.push(...packageManagers);
}
yield (0, cache_utils_1.getCommandOutput)('npm i -g corepack');
yield (0, cache_utils_1.getCommandOutput)(`corepack ${corepackArgs.join(' ')}`);
}
});
@ -90271,7 +90273,7 @@ module.exports = /*#__PURE__*/JSON.parse('[[[0,44],"disallowed_STD3_valid"],[[45
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/
/******/ // The require function
/******/ function __nccwpck_require__(moduleId) {
/******/ // Check if module is in cache
@ -90285,7 +90287,7 @@ module.exports = /*#__PURE__*/JSON.parse('[[[0,44],"disallowed_STD3_valid"],[[45
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/
/******/ // Execute the module function
/******/ var threw = true;
/******/ try {
@ -90294,23 +90296,23 @@ module.exports = /*#__PURE__*/JSON.parse('[[[0,44],"disallowed_STD3_valid"],[[45
/******/ } finally {
/******/ if(threw) delete __webpack_module_cache__[moduleId];
/******/ }
/******/
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/************************************************************************/
/******/ /* webpack/runtime/compat */
/******/
/******/
/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/";
/******/
/******/
/************************************************************************/
/******/
/******/
/******/ // startup
/******/ // Load entry module and return exports
/******/ // This entry module is referenced by other modules so it can't be inlined
/******/ var __webpack_exports__ = __nccwpck_require__(3579);
/******/ module.exports = __webpack_exports__;
/******/
/******/
/******/ })()
;

58
dist/setup/index.js vendored
View File

@ -2151,7 +2151,7 @@ function retry(name, method, getStatusCode, maxAttempts = constants_1.DefaultRet
exports.retry = retry;
function retryTypedResponse(name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay = constants_1.DefaultRetryDelay) {
return __awaiter(this, void 0, void 0, function* () {
return yield retry(name, method, (response) => response.statusCode, maxAttempts, delay,
return yield retry(name, method, (response) => response.statusCode, maxAttempts, delay,
// If the error object contains the statusCode property, extract it and return
// an TypedResponse<T> so it can be processed by the retry logic.
(error) => {
@ -6305,8 +6305,8 @@ class OidcClient {
const res = yield httpclient
.getJson(id_token_url)
.catch(error => {
throw new Error(`Failed to get ID Token. \n
Error Code : ${error.statusCode}\n
throw new Error(`Failed to get ID Token. \n
Error Code : ${error.statusCode}\n
Error Message: ${error.message}`);
});
const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value;
@ -13871,7 +13871,7 @@ class Serializer {
/**
* The provided model mapper.
*/
modelMappers = {},
modelMappers = {},
/**
* Whether the contents are XML or not.
*/
@ -15987,7 +15987,7 @@ class NodeFetchHttpClient {
body = uploadReportStream;
}
const platformSpecificRequestInit = await this.prepareRequest(httpRequest);
const requestInit = Object.assign({ body: body, headers: httpRequest.headers.rawHeaders(), method: httpRequest.method,
const requestInit = Object.assign({ body: body, headers: httpRequest.headers.rawHeaders(), method: httpRequest.method,
// the types for RequestInit are from the browser, which expects AbortSignal to
// have `reason` and `throwIfAborted`, but these don't exist on our polyfill
// for Node.
@ -16186,7 +16186,7 @@ class BaseRequestPolicy {
/**
* The next policy in the pipeline. Each policy is responsible for executing the next one if the request is to continue through the pipeline.
*/
_nextPolicy,
_nextPolicy,
/**
* The options that can be passed to a given request policy.
*/
@ -17164,7 +17164,7 @@ function createTokenCycler(credential, scopes, tokenCyclerOptions) {
const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions);
// Take advantage of promise chaining to insert an assignment to `token`
// before the refresh can be considered done.
refreshWorker = beginRefresh(tryGetAccessToken, options.retryIntervalInMs,
refreshWorker = beginRefresh(tryGetAccessToken, options.retryIntervalInMs,
// If we don't have a token, then we should timeout immediately
(_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : Date.now())
.then((_token) => {
@ -17971,7 +17971,7 @@ class ServiceClient {
* @param credentials - The credentials used for authentication with the service.
* @param options - The service client options that govern the behavior of the client.
*/
constructor(credentials,
constructor(credentials,
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */
options) {
if (!options) {
@ -36951,7 +36951,7 @@ function createTokenCycler(credential, scopes, tokenCyclerOptions) {
const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions);
// Take advantage of promise chaining to insert an assignment to `token`
// before the refresh can be considered done.
refreshWorker = beginRefresh(tryGetAccessToken, options.retryIntervalInMs,
refreshWorker = beginRefresh(tryGetAccessToken, options.retryIntervalInMs,
// If we don't have a token, then we should timeout immediately
(_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : Date.now())
.then((_token) => {
@ -41371,7 +41371,7 @@ const fsCreateReadStream = fs__namespace.createReadStream;
* append blob, or page blob.
*/
class BlobClient extends StorageClient {
constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions,
constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions,
// Legacy, no fix for eslint error without breaking. Disable it for this interface.
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
options) {
@ -42419,7 +42419,7 @@ class BlobClient extends StorageClient {
* AppendBlobClient defines a set of operations applicable to append blobs.
*/
class AppendBlobClient extends BlobClient {
constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions,
constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions,
// Legacy, no fix for eslint error without breaking. Disable it for this interface.
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
options) {
@ -42675,7 +42675,7 @@ class AppendBlobClient extends BlobClient {
* BlockBlobClient defines a set of operations applicable to block blobs.
*/
class BlockBlobClient extends BlobClient {
constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions,
constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions,
// Legacy, no fix for eslint error without breaking. Disable it for this interface.
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
options) {
@ -43304,7 +43304,7 @@ class BlockBlobClient extends BlobClient {
if (options.onProgress) {
options.onProgress({ loadedBytes: transferProgress });
}
},
},
// concurrency should set a smaller value than maxConcurrency, which is helpful to
// reduce the possibility when a outgoing handler waits for stream data, in
// this situation, outgoing handlers are blocked.
@ -43329,7 +43329,7 @@ class BlockBlobClient extends BlobClient {
* PageBlobClient defines a set of operations applicable to page blobs.
*/
class PageBlobClient extends BlobClient {
constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions,
constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions,
// Legacy, no fix for eslint error without breaking. Disable it for this interface.
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
options) {
@ -44587,7 +44587,7 @@ class BatchHeaderFilterPolicyFactory {
* @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch
*/
class BlobBatchClient {
constructor(url, credentialOrPipeline,
constructor(url, credentialOrPipeline,
// Legacy, no fix for eslint error without breaking. Disable it for this interface.
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
options) {
@ -44619,7 +44619,7 @@ class BlobBatchClient {
createBatch() {
return new BlobBatch();
}
async deleteBlobs(urlsOrBlobClients, credentialOrOptions,
async deleteBlobs(urlsOrBlobClients, credentialOrOptions,
// Legacy, no fix for eslint error without breaking. Disable it for this interface.
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
options) {
@ -44634,7 +44634,7 @@ class BlobBatchClient {
}
return this.submitBatch(batch);
}
async setBlobsAccessTier(urlsOrBlobClients, credentialOrTier, tierOrOptions,
async setBlobsAccessTier(urlsOrBlobClients, credentialOrTier, tierOrOptions,
// Legacy, no fix for eslint error without breaking. Disable it for this interface.
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
options) {
@ -44726,7 +44726,7 @@ class BlobBatchClient {
* A ContainerClient represents a URL to the Azure Storage container allowing you to manipulate its blobs.
*/
class ContainerClient extends StorageClient {
constructor(urlOrConnectionString, credentialOrPipelineOrContainerName,
constructor(urlOrConnectionString, credentialOrPipelineOrContainerName,
// Legacy, no fix for eslint error without breaking. Disable it for this interface.
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
options) {
@ -46438,7 +46438,7 @@ function generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyC
* to manipulate blob containers.
*/
class BlobServiceClient extends StorageClient {
constructor(url, credentialOrPipeline,
constructor(url, credentialOrPipeline,
// Legacy, no fix for eslint error without breaking. Disable it for this interface.
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
options) {
@ -46470,7 +46470,7 @@ class BlobServiceClient extends StorageClient {
* `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString`
* @param options - Optional. Options to configure the HTTP pipeline.
*/
static fromConnectionString(connectionString,
static fromConnectionString(connectionString,
// Legacy, no fix for eslint error without breaking. Disable it for this interface.
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
options) {
@ -54272,7 +54272,7 @@ class BinaryWriter {
* Write a `sint64` value, a signed, zig-zag-encoded 64-bit varint.
*/
sint64(value) {
let long = pb_long_1.PbLong.from(value),
let long = pb_long_1.PbLong.from(value),
// zigzag encode
sign = long.hi >> 31, lo = (long.lo << 1) ^ sign, hi = ((long.hi << 1) | (long.lo >>> 31)) ^ sign;
goog_varint_1.varint64write(lo, hi, this.buf);
@ -97917,12 +97917,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.unique = exports.printEnvDetailsAndSetOutput = exports.getNodeVersionFromFile = void 0;
exports.enableCorepack = exports.unique = exports.printEnvDetailsAndSetOutput = exports.getNodeVersionFromFile = void 0;
const core = __importStar(__nccwpck_require__(7484));
const exec = __importStar(__nccwpck_require__(5236));
const io = __importStar(__nccwpck_require__(4994));
const fs_1 = __importDefault(__nccwpck_require__(9896));
const path_1 = __importDefault(__nccwpck_require__(6928));
const cache_utils_1 = __nccwpck_require__(4673);
function getNodeVersionFromFile(versionFilePath) {
var _a, _b, _c, _d, _e;
if (!fs_1.default.existsSync(versionFilePath)) {
@ -98023,6 +98024,7 @@ function enableCorepack(input) {
const packageManagers = input.split(' ');
corepackArgs.push(...packageManagers);
}
yield (0, cache_utils_1.getCommandOutput)('npm i -g corepack');
yield (0, cache_utils_1.getCommandOutput)(`corepack ${corepackArgs.join(' ')}`);
}
});
@ -99949,7 +99951,7 @@ module.exports = /*#__PURE__*/JSON.parse('[[[0,44],"disallowed_STD3_valid"],[[45
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/
/******/ // The require function
/******/ function __nccwpck_require__(moduleId) {
/******/ // Check if module is in cache
@ -99963,7 +99965,7 @@ module.exports = /*#__PURE__*/JSON.parse('[[[0,44],"disallowed_STD3_valid"],[[45
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/
/******/ // Execute the module function
/******/ var threw = true;
/******/ try {
@ -99972,16 +99974,16 @@ module.exports = /*#__PURE__*/JSON.parse('[[[0,44],"disallowed_STD3_valid"],[[45
/******/ } finally {
/******/ if(threw) delete __webpack_module_cache__[moduleId];
/******/ }
/******/
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/************************************************************************/
/******/ /* webpack/runtime/compat */
/******/
/******/
/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/";
/******/
/******/
/************************************************************************/
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be in strict mode.

View File

@ -115,6 +115,7 @@ export async function enableCorepack(input: string): Promise<void> {
const packageManagers = input.split(' ');
corepackArgs.push(...packageManagers);
}
await getCommandOutput('npm i -g corepack');
await getCommandOutput(`corepack ${corepackArgs.join(' ')}`);
}
}