Compare commits

..

3 Commits

Author SHA1 Message Date
06003f6f37 Test macos-14-large x64 runner 2025-07-30 14:32:01 +05:30
06a5327ecf Bump undici from 5.28.5 to 5.29.0 (#641)
* Bump undici from 5.28.5 to 5.29.0

Bumps [undici](https://github.com/nodejs/undici) from 5.28.5 to 5.29.0.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v5.28.5...v5.29.0)

---
updated-dependencies:
- dependency-name: undici
  dependency-version: 5.29.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Check failure fix

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: lmvysakh <lmvysakh@github.com>
2025-07-29 12:06:55 -05:00
e8e5b8203e Bump eslint-config-prettier from 9.1.0 to 10.1.5 (#639)
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 9.1.0 to 10.1.5.
- [Release notes](https://github.com/prettier/eslint-config-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-config-prettier/compare/v9.1.0...v10.1.5)

---
updated-dependencies:
- dependency-name: eslint-config-prettier
  dependency-version: 10.1.5
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-15 12:29:20 -05:00
8 changed files with 417 additions and 408 deletions

View File

@ -6,7 +6,7 @@ on:
- '**.md'
push:
branches:
- main
- test-macos-x64-runner
- releases/*
paths-ignore:
- '**.md'
@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-22.04, windows-latest, macos-13]
operating-system: [macos-14-large]
steps:
- name: Checkout
uses: actions/checkout@v4
@ -61,7 +61,7 @@ jobs:
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-22.04, windows-latest, macos-13]
operating-system: [macos-14-large]
steps:
- name: Checkout
uses: actions/checkout@v4
@ -117,7 +117,7 @@ jobs:
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-22.04, windows-latest, macos-13]
operating-system: [macos-14-large]
steps:
- name: Checkout
uses: actions/checkout@v4
@ -165,7 +165,7 @@ jobs:
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-22.04, windows-latest, macos-13]
operating-system: [macos-14-large ]
steps:
- name: Checkout
uses: actions/checkout@v4
@ -205,7 +205,7 @@ jobs:
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-22.04, windows-latest, macos-13]
operating-system: [macos-14-large]
steps:
- name: Checkout
uses: actions/checkout@v4
@ -253,7 +253,7 @@ jobs:
fail-fast: false
matrix:
operating-system:
[ubuntu-latest, windows-latest, macos-13, macos-latest]
[macos-14-large]
steps:
- name: Checkout
uses: actions/checkout@v4
@ -274,7 +274,7 @@ jobs:
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-22.04, windows-latest, macos-13]
operating-system: [macos-14-large]
steps:
- name: Checkout
uses: actions/checkout@v4
@ -321,7 +321,7 @@ jobs:
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-22.04, windows-latest, macos-13]
operating-system: [macos-14-large]
steps:
- name: Checkout
uses: actions/checkout@v4
@ -372,7 +372,7 @@ jobs:
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-22.04, windows-latest, macos-13]
operating-system: [macos-14-large]
steps:
- name: Checkout
uses: actions/checkout@v4
@ -422,7 +422,7 @@ jobs:
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-22.04, windows-latest, macos-13]
operating-system: [macos-14-large]
steps:
- name: Checkout
uses: actions/checkout@v4
@ -473,7 +473,7 @@ jobs:
fail-fast: false
matrix:
operating-system:
[ubuntu-latest, windows-latest, macos-13, macos-latest]
[macos-14-large]
steps:
- name: Checkout
uses: actions/checkout@v4
@ -495,7 +495,7 @@ jobs:
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-22.04, windows-latest, macos-13]
operating-system: [macos-14-large]
env:
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
steps:
@ -557,7 +557,7 @@ jobs:
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-22.04, windows-latest, macos-13]
operating-system: [macos-14-large]
env:
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
steps:
@ -616,7 +616,7 @@ jobs:
fail-fast: false
matrix:
operating-system:
[ubuntu-latest, windows-latest, macos-13, macos-latest]
[macos-14-large]
steps:
- name: Checkout
uses: actions/checkout@v4
@ -643,7 +643,7 @@ jobs:
fail-fast: false
matrix:
operating-system:
[ubuntu-latest, windows-latest, macos-13, macos-latest]
[macos-14-large]
steps:
- name: Checkout
uses: actions/checkout@v4
@ -755,7 +755,7 @@ jobs:
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-22.04, windows-latest, macos-13]
operating-system: [macos-14-large]
lower-version: ['6.0.427']
higher-version: ['7.0.203']
steps:

View File

@ -6,7 +6,7 @@ on:
- '**.md'
push:
branches:
- main
- test-macos-x64-runner
- releases/*
paths-ignore:
- '**.md'
@ -18,7 +18,7 @@ jobs:
fail-fast: false
matrix:
operating-system:
[ubuntu-latest, ubuntu-22.04, windows-latest, macos-13, macos-latest]
[macos-14-large]
dotnet-version: ['6.0', '7.0', '8.0', '9.0']
steps:
- name: Checkout

View File

@ -1,6 +1,6 @@
---
name: undici
version: 5.28.5
version: 5.29.0
type: npm
summary: An HTTP/1.1 client, written from scratch for Node.js
homepage: https://undici.nodejs.org

View File

@ -64776,7 +64776,7 @@ module.exports = {
const { parseSetCookie } = __nccwpck_require__(4408)
const { stringify, getHeadersList } = __nccwpck_require__(3121)
const { stringify } = __nccwpck_require__(3121)
const { webidl } = __nccwpck_require__(1744)
const { Headers } = __nccwpck_require__(554)
@ -64852,14 +64852,13 @@ function getSetCookies (headers) {
webidl.brandCheck(headers, Headers, { strict: false })
const cookies = getHeadersList(headers).cookies
const cookies = headers.getSetCookie()
if (!cookies) {
return []
}
// In older versions of undici, cookies is a list of name:value.
return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair))
return cookies.map((pair) => parseSetCookie(pair))
}
/**
@ -65287,14 +65286,15 @@ module.exports = {
/***/ }),
/***/ 3121:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
/***/ ((module) => {
"use strict";
const assert = __nccwpck_require__(9491)
const { kHeadersList } = __nccwpck_require__(2785)
/**
* @param {string} value
* @returns {boolean}
*/
function isCTLExcludingHtab (value) {
if (value.length === 0) {
return false
@ -65555,31 +65555,13 @@ function stringify (cookie) {
return out.join('; ')
}
let kHeadersListNode
function getHeadersList (headers) {
if (headers[kHeadersList]) {
return headers[kHeadersList]
}
if (!kHeadersListNode) {
kHeadersListNode = Object.getOwnPropertySymbols(headers).find(
(symbol) => symbol.description === 'headers list'
)
assert(kHeadersListNode, 'Headers cannot be parsed')
}
const headersList = headers[kHeadersListNode]
assert(headersList)
return headersList
}
module.exports = {
isCTLExcludingHtab,
stringify,
getHeadersList
validateCookieName,
validateCookiePath,
validateCookieValue,
toIMFDate,
stringify
}
@ -69583,6 +69565,7 @@ const {
isValidHeaderName,
isValidHeaderValue
} = __nccwpck_require__(2538)
const util = __nccwpck_require__(3837)
const { webidl } = __nccwpck_require__(1744)
const assert = __nccwpck_require__(9491)
@ -70136,6 +70119,9 @@ Object.defineProperties(Headers.prototype, {
[Symbol.toStringTag]: {
value: 'Headers',
configurable: true
},
[util.inspect.custom]: {
enumerable: false
}
})
@ -79312,6 +79298,20 @@ class Pool extends PoolBase {
? { ...options.interceptors }
: undefined
this[kFactory] = factory
this.on('connectionError', (origin, targets, error) => {
// If a connection error occurs, we remove the client from the pool,
// and emit a connectionError event. They will not be re-used.
// Fixes https://github.com/nodejs/undici/issues/3895
for (const target of targets) {
// Do not use kRemoveClient here, as it will close the client,
// but the client cannot be closed in this state.
const idx = this[kClients].indexOf(target)
if (idx !== -1) {
this[kClients].splice(idx, 1)
}
}
})
}
[kGetDispatcher] () {
@ -86644,28 +86644,27 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.run = run;
exports.run = void 0;
const core = __importStar(__nccwpck_require__(2186));
const cache = __importStar(__nccwpck_require__(7799));
const node_fs_1 = __importDefault(__nccwpck_require__(7561));
@ -86678,24 +86677,27 @@ process.on('uncaughtException', e => {
const warningPrefix = '[warning]';
core.info(`${warningPrefix}${e.message}`);
});
async function run() {
try {
if (core.getBooleanInput('cache')) {
await cachePackages();
function run() {
return __awaiter(this, void 0, void 0, function* () {
try {
if (core.getBooleanInput('cache')) {
yield cachePackages();
}
}
}
catch (error) {
core.setFailed(error.message);
}
catch (error) {
core.setFailed(error.message);
}
});
}
const cachePackages = async () => {
exports.run = run;
const cachePackages = () => __awaiter(void 0, void 0, void 0, function* () {
const state = core.getState(constants_1.State.CacheMatchedKey);
const primaryKey = core.getState(constants_1.State.CachePrimaryKey);
if (!primaryKey) {
core.info('Primary key was not generated, not saving cache.');
return;
}
const { 'global-packages': cachePath } = await (0, cache_utils_1.getNuGetFolderPath)();
const { 'global-packages': cachePath } = yield (0, cache_utils_1.getNuGetFolderPath)();
if (!node_fs_1.default.existsSync(cachePath)) {
throw new Error(`Cache folder path is retrieved for .NET CLI but doesn't exist on disk: ${cachePath}`);
}
@ -86703,12 +86705,12 @@ const cachePackages = async () => {
core.info(`Cache hit occurred on the primary key ${primaryKey}, not saving cache.`);
return;
}
const cacheId = await cache.saveCache([cachePath], primaryKey);
const cacheId = yield cache.saveCache([cachePath], primaryKey);
if (cacheId == -1) {
return;
}
core.info(`Cache saved with the key: ${primaryKey}`);
};
});
run();
@ -86735,26 +86737,24 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getNuGetFolderPath = void 0;
exports.isCacheFeatureAvailable = isCacheFeatureAvailable;
exports.isCacheFeatureAvailable = exports.getNuGetFolderPath = void 0;
const cache = __importStar(__nccwpck_require__(7799));
const core = __importStar(__nccwpck_require__(2186));
const exec = __importStar(__nccwpck_require__(1514));
@ -86784,8 +86784,8 @@ const constants_1 = __nccwpck_require__(9042);
* }
* ```
*/
const getNuGetFolderPath = async () => {
const { stdout, stderr, exitCode } = await exec.getExecOutput(constants_1.cliCommand, undefined, { ignoreReturnCode: true, silent: true });
const getNuGetFolderPath = () => __awaiter(void 0, void 0, void 0, function* () {
const { stdout, stderr, exitCode } = yield exec.getExecOutput(constants_1.cliCommand, undefined, { ignoreReturnCode: true, silent: true });
if (exitCode) {
throw new Error(!stderr.trim()
? `The '${constants_1.cliCommand}' command failed with exit code: ${exitCode}`
@ -86806,7 +86806,7 @@ const getNuGetFolderPath = async () => {
}
}
return result;
};
});
exports.getNuGetFolderPath = getNuGetFolderPath;
function isCacheFeatureAvailable() {
if (cache.isFeatureAvailable()) {
@ -86819,6 +86819,7 @@ function isCacheFeatureAvailable() {
core.warning('The runner was not able to contact the cache service. Caching will be skipped');
return false;
}
exports.isCacheFeatureAvailable = isCacheFeatureAvailable;
/**
* Returns this action runs on GitHub Enterprise Server or not.
*/

586
dist/setup/index.js vendored
View File

@ -77025,7 +77025,7 @@ module.exports = {
const { parseSetCookie } = __nccwpck_require__(4408)
const { stringify, getHeadersList } = __nccwpck_require__(3121)
const { stringify } = __nccwpck_require__(3121)
const { webidl } = __nccwpck_require__(1744)
const { Headers } = __nccwpck_require__(554)
@ -77101,14 +77101,13 @@ function getSetCookies (headers) {
webidl.brandCheck(headers, Headers, { strict: false })
const cookies = getHeadersList(headers).cookies
const cookies = headers.getSetCookie()
if (!cookies) {
return []
}
// In older versions of undici, cookies is a list of name:value.
return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair))
return cookies.map((pair) => parseSetCookie(pair))
}
/**
@ -77536,14 +77535,15 @@ module.exports = {
/***/ }),
/***/ 3121:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
/***/ ((module) => {
"use strict";
const assert = __nccwpck_require__(9491)
const { kHeadersList } = __nccwpck_require__(2785)
/**
* @param {string} value
* @returns {boolean}
*/
function isCTLExcludingHtab (value) {
if (value.length === 0) {
return false
@ -77804,31 +77804,13 @@ function stringify (cookie) {
return out.join('; ')
}
let kHeadersListNode
function getHeadersList (headers) {
if (headers[kHeadersList]) {
return headers[kHeadersList]
}
if (!kHeadersListNode) {
kHeadersListNode = Object.getOwnPropertySymbols(headers).find(
(symbol) => symbol.description === 'headers list'
)
assert(kHeadersListNode, 'Headers cannot be parsed')
}
const headersList = headers[kHeadersListNode]
assert(headersList)
return headersList
}
module.exports = {
isCTLExcludingHtab,
stringify,
getHeadersList
validateCookieName,
validateCookiePath,
validateCookieValue,
toIMFDate,
stringify
}
@ -81832,6 +81814,7 @@ const {
isValidHeaderName,
isValidHeaderValue
} = __nccwpck_require__(2538)
const util = __nccwpck_require__(3837)
const { webidl } = __nccwpck_require__(1744)
const assert = __nccwpck_require__(9491)
@ -82385,6 +82368,9 @@ Object.defineProperties(Headers.prototype, {
[Symbol.toStringTag]: {
value: 'Headers',
configurable: true
},
[util.inspect.custom]: {
enumerable: false
}
})
@ -91561,6 +91547,20 @@ class Pool extends PoolBase {
? { ...options.interceptors }
: undefined
this[kFactory] = factory
this.on('connectionError', (origin, targets, error) => {
// If a connection error occurs, we remove the client from the pool,
// and emit a connectionError event. They will not be re-used.
// Fixes https://github.com/nodejs/undici/issues/3895
for (const target of targets) {
// Do not use kRemoveClient here, as it will close the client,
// but the client cannot be closed in this state.
const idx = this[kClients].indexOf(target)
if (idx !== -1) {
this[kClients].splice(idx, 1)
}
}
})
}
[kGetDispatcher] () {
@ -98959,25 +98959,15 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.configAuthentication = configAuthentication;
exports.configAuthentication = void 0;
const fs = __importStar(__nccwpck_require__(7147));
const path = __importStar(__nccwpck_require__(1017));
const core = __importStar(__nccwpck_require__(2186));
@ -98990,6 +98980,7 @@ function configAuthentication(feedUrl, existingFileLocation = '', processRoot =
const tempNuGetConfig = path.resolve(processRoot, '../', 'nuget.config');
writeFeedToFile(feedUrl, existingNuGetConfig, tempNuGetConfig);
}
exports.configAuthentication = configAuthentication;
function isValidKey(key) {
return /^[\w\-.]+$/i.test(key);
}
@ -99004,6 +98995,7 @@ function getExistingNugetConfig(processRoot) {
return defaultConfigName;
}
function writeFeedToFile(feedUrl, existingFileLocation, tempFileLocation) {
var _a, _b;
core.info(`dotnet-auth: Finding any source references in ${existingFileLocation}, writing a new temporary configuration file with credentials to ${tempFileLocation}`);
const sourceKeys = [];
let owner = core.getInput('owner');
@ -99025,7 +99017,7 @@ function writeFeedToFile(feedUrl, existingFileLocation, tempFileLocation) {
if (typeof json.configuration === 'undefined') {
throw new Error(`The provided NuGet.config seems invalid.`);
}
if (json.configuration?.packageSources?.add) {
if ((_b = (_a = json.configuration) === null || _a === void 0 ? void 0 : _a.packageSources) === null || _b === void 0 ? void 0 : _b.add) {
const packageSources = json.configuration.packageSources.add;
if (Array.isArray(packageSources)) {
packageSources.forEach(source => {
@ -99155,23 +99147,22 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.restoreCache = void 0;
const promises_1 = __nccwpck_require__(3977);
@ -99181,9 +99172,9 @@ const core = __importStar(__nccwpck_require__(2186));
const glob = __importStar(__nccwpck_require__(8090));
const cache_utils_1 = __nccwpck_require__(1678);
const constants_1 = __nccwpck_require__(9042);
const restoreCache = async (cacheDependencyPath) => {
const lockFilePath = cacheDependencyPath || (await findLockFile());
const fileHash = await glob.hashFiles(lockFilePath);
const restoreCache = (cacheDependencyPath) => __awaiter(void 0, void 0, void 0, function* () {
const lockFilePath = cacheDependencyPath || (yield findLockFile());
const fileHash = yield glob.hashFiles(lockFilePath);
if (!fileHash) {
throw new Error('Some specified paths were not resolved, unable to cache dependencies.');
}
@ -99191,8 +99182,8 @@ const restoreCache = async (cacheDependencyPath) => {
const primaryKey = `dotnet-cache-${platform}-${fileHash}`;
core.debug(`primary key is ${primaryKey}`);
core.saveState(constants_1.State.CachePrimaryKey, primaryKey);
const { 'global-packages': cachePath } = await (0, cache_utils_1.getNuGetFolderPath)();
const cacheKey = await cache.restoreCache([cachePath], primaryKey);
const { 'global-packages': cachePath } = yield (0, cache_utils_1.getNuGetFolderPath)();
const cacheKey = yield cache.restoreCache([cachePath], primaryKey);
core.setOutput(constants_1.Outputs.CacheHit, Boolean(cacheKey));
if (!cacheKey) {
core.info('Dotnet cache is not found');
@ -99200,17 +99191,17 @@ const restoreCache = async (cacheDependencyPath) => {
}
core.saveState(constants_1.State.CacheMatchedKey, cacheKey);
core.info(`Cache restored from key: ${cacheKey}`);
};
});
exports.restoreCache = restoreCache;
const findLockFile = async () => {
const findLockFile = () => __awaiter(void 0, void 0, void 0, function* () {
const workspace = process.env.GITHUB_WORKSPACE;
const rootContent = await (0, promises_1.readdir)(workspace);
const rootContent = yield (0, promises_1.readdir)(workspace);
const lockFile = constants_1.lockFilePatterns.find(item => rootContent.includes(item));
if (!lockFile) {
throw new Error(`Dependencies lock file is not found in ${workspace}. Supported file patterns: ${constants_1.lockFilePatterns.toString()}`);
}
return (0, node_path_1.join)(workspace, lockFile);
};
});
/***/ }),
@ -99236,26 +99227,24 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getNuGetFolderPath = void 0;
exports.isCacheFeatureAvailable = isCacheFeatureAvailable;
exports.isCacheFeatureAvailable = exports.getNuGetFolderPath = void 0;
const cache = __importStar(__nccwpck_require__(7799));
const core = __importStar(__nccwpck_require__(2186));
const exec = __importStar(__nccwpck_require__(1514));
@ -99285,8 +99274,8 @@ const constants_1 = __nccwpck_require__(9042);
* }
* ```
*/
const getNuGetFolderPath = async () => {
const { stdout, stderr, exitCode } = await exec.getExecOutput(constants_1.cliCommand, undefined, { ignoreReturnCode: true, silent: true });
const getNuGetFolderPath = () => __awaiter(void 0, void 0, void 0, function* () {
const { stdout, stderr, exitCode } = yield exec.getExecOutput(constants_1.cliCommand, undefined, { ignoreReturnCode: true, silent: true });
if (exitCode) {
throw new Error(!stderr.trim()
? `The '${constants_1.cliCommand}' command failed with exit code: ${exitCode}`
@ -99307,7 +99296,7 @@ const getNuGetFolderPath = async () => {
}
}
return result;
};
});
exports.getNuGetFolderPath = getNuGetFolderPath;
function isCacheFeatureAvailable() {
if (cache.isFeatureAvailable()) {
@ -99320,6 +99309,7 @@ function isCacheFeatureAvailable() {
core.warning('The runner was not able to contact the cache service. Caching will be skipped');
return false;
}
exports.isCacheFeatureAvailable = isCacheFeatureAvailable;
/**
* Returns this action runs on GitHub Enterprise Server or not.
*/
@ -99384,23 +99374,22 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
@ -99423,22 +99412,25 @@ class DotnetVersionResolver {
this.inputVersion = version.trim();
this.resolvedArgument = { type: '', value: '', qualityFlag: false };
}
async resolveVersionInput() {
if (!semver_1.default.validRange(this.inputVersion) && !this.isLatestPatchSyntax()) {
throw new Error(`The 'dotnet-version' was supplied in invalid format: ${this.inputVersion}! Supported syntax: A.B.C, A.B, A.B.x, A, A.x, A.B.Cxx`);
}
if (semver_1.default.valid(this.inputVersion)) {
this.createVersionArgument();
}
else {
await this.createChannelArgument();
}
resolveVersionInput() {
return __awaiter(this, void 0, void 0, function* () {
if (!semver_1.default.validRange(this.inputVersion) && !this.isLatestPatchSyntax()) {
throw new Error(`The 'dotnet-version' was supplied in invalid format: ${this.inputVersion}! Supported syntax: A.B.C, A.B, A.B.x, A, A.x, A.B.Cxx`);
}
if (semver_1.default.valid(this.inputVersion)) {
this.createVersionArgument();
}
else {
yield this.createChannelArgument();
}
});
}
isNumericTag(versionTag) {
return /^\d+$/.test(versionTag);
}
isLatestPatchSyntax() {
const majorTag = this.inputVersion.match(/^(?<majorTag>\d+)\.\d+\.\d{1}x{2}$/)?.groups?.majorTag;
var _a, _b;
const majorTag = (_b = (_a = this.inputVersion.match(/^(?<majorTag>\d+)\.\d+\.\d{1}x{2}$/)) === null || _a === void 0 ? void 0 : _a.groups) === null || _b === void 0 ? void 0 : _b.majorTag;
if (majorTag &&
parseInt(majorTag) < LATEST_PATCH_SYNTAX_MINIMAL_MAJOR_TAG) {
throw new Error(`The 'dotnet-version' was supplied in invalid format: ${this.inputVersion}! The A.B.Cxx syntax is available since the .NET 5.0 release.`);
@ -99449,56 +99441,62 @@ class DotnetVersionResolver {
this.resolvedArgument.type = 'version';
this.resolvedArgument.value = this.inputVersion;
}
async createChannelArgument() {
this.resolvedArgument.type = 'channel';
const [major, minor] = this.inputVersion.split('.');
if (this.isLatestPatchSyntax()) {
this.resolvedArgument.value = this.inputVersion;
}
else if (this.isNumericTag(major) && this.isNumericTag(minor)) {
this.resolvedArgument.value = `${major}.${minor}`;
}
else if (this.isNumericTag(major)) {
this.resolvedArgument.value = await this.getLatestByMajorTag(major);
}
else {
// If "dotnet-version" is specified as *, x or X resolve latest version of .NET explicitly from LTS channel. The version argument will default to "latest" by install-dotnet script.
this.resolvedArgument.value = 'LTS';
}
this.resolvedArgument.qualityFlag =
parseInt(major) >= QUALITY_INPUT_MINIMAL_MAJOR_TAG ? true : false;
createChannelArgument() {
return __awaiter(this, void 0, void 0, function* () {
this.resolvedArgument.type = 'channel';
const [major, minor] = this.inputVersion.split('.');
if (this.isLatestPatchSyntax()) {
this.resolvedArgument.value = this.inputVersion;
}
else if (this.isNumericTag(major) && this.isNumericTag(minor)) {
this.resolvedArgument.value = `${major}.${minor}`;
}
else if (this.isNumericTag(major)) {
this.resolvedArgument.value = yield this.getLatestByMajorTag(major);
}
else {
// If "dotnet-version" is specified as *, x or X resolve latest version of .NET explicitly from LTS channel. The version argument will default to "latest" by install-dotnet script.
this.resolvedArgument.value = 'LTS';
}
this.resolvedArgument.qualityFlag =
parseInt(major) >= QUALITY_INPUT_MINIMAL_MAJOR_TAG ? true : false;
});
}
async createDotnetVersion() {
await this.resolveVersionInput();
if (!this.resolvedArgument.type) {
createDotnetVersion() {
return __awaiter(this, void 0, void 0, function* () {
yield this.resolveVersionInput();
if (!this.resolvedArgument.type) {
return this.resolvedArgument;
}
if (utils_1.IS_WINDOWS) {
this.resolvedArgument.type =
this.resolvedArgument.type === 'channel' ? '-Channel' : '-Version';
}
else {
this.resolvedArgument.type =
this.resolvedArgument.type === 'channel' ? '--channel' : '--version';
}
return this.resolvedArgument;
}
if (utils_1.IS_WINDOWS) {
this.resolvedArgument.type =
this.resolvedArgument.type === 'channel' ? '-Channel' : '-Version';
}
else {
this.resolvedArgument.type =
this.resolvedArgument.type === 'channel' ? '--channel' : '--version';
}
return this.resolvedArgument;
});
}
async getLatestByMajorTag(majorTag) {
const httpClient = new hc.HttpClient('actions/setup-dotnet', [], {
allowRetries: true,
maxRetries: 3
getLatestByMajorTag(majorTag) {
return __awaiter(this, void 0, void 0, function* () {
const httpClient = new hc.HttpClient('actions/setup-dotnet', [], {
allowRetries: true,
maxRetries: 3
});
const response = yield httpClient.getJson(DotnetVersionResolver.DotnetCoreIndexUrl);
const result = response.result || {};
const releasesInfo = result['releases-index'];
const releaseInfo = releasesInfo.find(info => {
const sdkParts = info['channel-version'].split('.');
return sdkParts[0] === majorTag;
});
if (!releaseInfo) {
throw new Error(`Could not find info for version with major tag: "${majorTag}" at ${DotnetVersionResolver.DotnetCoreIndexUrl}`);
}
return releaseInfo['channel-version'];
});
const response = await httpClient.getJson(DotnetVersionResolver.DotnetCoreIndexUrl);
const result = response.result || {};
const releasesInfo = result['releases-index'];
const releaseInfo = releasesInfo.find(info => {
const sdkParts = info['channel-version'].split('.');
return sdkParts[0] === majorTag;
});
if (!releaseInfo) {
throw new Error(`Could not find info for version with major tag: "${majorTag}" at ${DotnetVersionResolver.DotnetCoreIndexUrl}`);
}
return releaseInfo['channel-version'];
}
}
exports.DotnetVersionResolver = DotnetVersionResolver;
@ -99538,11 +99536,13 @@ class DotnetInstallScript {
setupScriptBash() {
(0, fs_1.chmodSync)(this.escapedScript, '777');
}
async getScriptPath() {
if (utils_1.IS_WINDOWS) {
return (await io.which('pwsh', false)) || io.which('powershell', true);
}
return io.which(this.escapedScript, true);
getScriptPath() {
return __awaiter(this, void 0, void 0, function* () {
if (utils_1.IS_WINDOWS) {
return (yield io.which('pwsh', false)) || io.which('powershell', true);
}
return io.which(this.escapedScript, true);
});
}
useArguments(...args) {
this.scriptArguments.push(...args);
@ -99561,12 +99561,14 @@ class DotnetInstallScript {
}
return this;
}
async execute() {
const getExecOutputOptions = {
ignoreReturnCode: true,
env: process.env
};
return exec.getExecOutput(`"${await this.getScriptPath()}"`, this.scriptArguments, getExecOutputOptions);
execute() {
return __awaiter(this, void 0, void 0, function* () {
const getExecOutputOptions = {
ignoreReturnCode: true,
env: process.env
};
return exec.getExecOutput(`"${yield this.getScriptPath()}"`, this.scriptArguments, getExecOutputOptions);
});
}
}
exports.DotnetInstallScript = DotnetInstallScript;
@ -99601,42 +99603,44 @@ class DotnetCoreInstaller {
this.version = version;
this.quality = quality;
}
async installDotnet() {
const versionResolver = new DotnetVersionResolver(this.version);
const dotnetVersion = await versionResolver.createDotnetVersion();
/**
* Install dotnet runitme first in order to get
* the latest stable version of dotnet CLI
*/
const runtimeInstallOutput = await new DotnetInstallScript()
// If dotnet CLI is already installed - avoid overwriting it
.useArguments(utils_1.IS_WINDOWS ? '-SkipNonVersionedFiles' : '--skip-non-versioned-files')
// Install only runtime + CLI
.useArguments(utils_1.IS_WINDOWS ? '-Runtime' : '--runtime', 'dotnet')
// Use latest stable version
.useArguments(utils_1.IS_WINDOWS ? '-Channel' : '--channel', 'LTS')
.execute();
if (runtimeInstallOutput.exitCode) {
installDotnet() {
return __awaiter(this, void 0, void 0, function* () {
const versionResolver = new DotnetVersionResolver(this.version);
const dotnetVersion = yield versionResolver.createDotnetVersion();
/**
* dotnetInstallScript will install CLI and runtime even if previous script haven't succeded,
* so at this point it's too early to throw an error
* Install dotnet runitme first in order to get
* the latest stable version of dotnet CLI
*/
core.warning(`Failed to install dotnet runtime + cli, exit code: ${runtimeInstallOutput.exitCode}. ${runtimeInstallOutput.stderr}`);
}
/**
* Install dotnet over the latest version of
* dotnet CLI
*/
const dotnetInstallOutput = await new DotnetInstallScript()
// Don't overwrite CLI because it should be already installed
.useArguments(utils_1.IS_WINDOWS ? '-SkipNonVersionedFiles' : '--skip-non-versioned-files')
// Use version provided by user
.useVersion(dotnetVersion, this.quality)
.execute();
if (dotnetInstallOutput.exitCode) {
throw new Error(`Failed to install dotnet, exit code: ${dotnetInstallOutput.exitCode}. ${dotnetInstallOutput.stderr}`);
}
return this.parseInstalledVersion(dotnetInstallOutput.stdout);
const runtimeInstallOutput = yield new DotnetInstallScript()
// If dotnet CLI is already installed - avoid overwriting it
.useArguments(utils_1.IS_WINDOWS ? '-SkipNonVersionedFiles' : '--skip-non-versioned-files')
// Install only runtime + CLI
.useArguments(utils_1.IS_WINDOWS ? '-Runtime' : '--runtime', 'dotnet')
// Use latest stable version
.useArguments(utils_1.IS_WINDOWS ? '-Channel' : '--channel', 'LTS')
.execute();
if (runtimeInstallOutput.exitCode) {
/**
* dotnetInstallScript will install CLI and runtime even if previous script haven't succeded,
* so at this point it's too early to throw an error
*/
core.warning(`Failed to install dotnet runtime + cli, exit code: ${runtimeInstallOutput.exitCode}. ${runtimeInstallOutput.stderr}`);
}
/**
* Install dotnet over the latest version of
* dotnet CLI
*/
const dotnetInstallOutput = yield new DotnetInstallScript()
// Don't overwrite CLI because it should be already installed
.useArguments(utils_1.IS_WINDOWS ? '-SkipNonVersionedFiles' : '--skip-non-versioned-files')
// Use version provided by user
.useVersion(dotnetVersion, this.quality)
.execute();
if (dotnetInstallOutput.exitCode) {
throw new Error(`Failed to install dotnet, exit code: ${dotnetInstallOutput.exitCode}. ${dotnetInstallOutput.stderr}`);
}
return this.parseInstalledVersion(dotnetInstallOutput.stdout);
});
}
parseInstalledVersion(stdout) {
const regex = /(?<version>\d+\.\d+\.\d+[a-z0-9._-]*)/gm;
@ -99677,28 +99681,27 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.run = run;
exports.run = void 0;
const core = __importStar(__nccwpck_require__(2186));
const installer_1 = __nccwpck_require__(2574);
const fs = __importStar(__nccwpck_require__(7147));
@ -99716,69 +99719,72 @@ const qualityOptions = [
'preview',
'ga'
];
async function run() {
try {
//
// dotnet-version is optional, but needs to be provided for most use cases.
// If supplied, install / use from the tool cache.
// global-version-file may be specified to point to a specific global.json
// and will be used to install an additional version.
// If not supplied, look for version in ./global.json.
// If a valid version still can't be identified, nothing will be installed.
// Proxy, auth, (etc) are still set up, even if no version is identified
//
const versions = core.getMultilineInput('dotnet-version');
const installedDotnetVersions = [];
const globalJsonFileInput = core.getInput('global-json-file');
if (globalJsonFileInput) {
const globalJsonPath = path_1.default.resolve(process.cwd(), globalJsonFileInput);
if (!fs.existsSync(globalJsonPath)) {
throw new Error(`The specified global.json file '${globalJsonFileInput}' does not exist`);
}
versions.push(getVersionFromGlobalJson(globalJsonPath));
}
if (!versions.length) {
// Try to fall back to global.json
core.debug('No version found, trying to find version from global.json');
const globalJsonPath = path_1.default.join(process.cwd(), 'global.json');
if (fs.existsSync(globalJsonPath)) {
function run() {
return __awaiter(this, void 0, void 0, function* () {
try {
//
// dotnet-version is optional, but needs to be provided for most use cases.
// If supplied, install / use from the tool cache.
// global-version-file may be specified to point to a specific global.json
// and will be used to install an additional version.
// If not supplied, look for version in ./global.json.
// If a valid version still can't be identified, nothing will be installed.
// Proxy, auth, (etc) are still set up, even if no version is identified
//
const versions = core.getMultilineInput('dotnet-version');
const installedDotnetVersions = [];
const globalJsonFileInput = core.getInput('global-json-file');
if (globalJsonFileInput) {
const globalJsonPath = path_1.default.resolve(process.cwd(), globalJsonFileInput);
if (!fs.existsSync(globalJsonPath)) {
throw new Error(`The specified global.json file '${globalJsonFileInput}' does not exist`);
}
versions.push(getVersionFromGlobalJson(globalJsonPath));
}
else {
core.info(`The global.json wasn't found in the root directory. No .NET version will be installed.`);
if (!versions.length) {
// Try to fall back to global.json
core.debug('No version found, trying to find version from global.json');
const globalJsonPath = path_1.default.join(process.cwd(), 'global.json');
if (fs.existsSync(globalJsonPath)) {
versions.push(getVersionFromGlobalJson(globalJsonPath));
}
else {
core.info(`The global.json wasn't found in the root directory. No .NET version will be installed.`);
}
}
}
if (versions.length) {
const quality = core.getInput('dotnet-quality');
if (quality && !qualityOptions.includes(quality)) {
throw new Error(`Value '${quality}' is not supported for the 'dotnet-quality' option. Supported values are: daily, signed, validated, preview, ga.`);
if (versions.length) {
const quality = core.getInput('dotnet-quality');
if (quality && !qualityOptions.includes(quality)) {
throw new Error(`Value '${quality}' is not supported for the 'dotnet-quality' option. Supported values are: daily, signed, validated, preview, ga.`);
}
let dotnetInstaller;
const uniqueVersions = new Set(versions);
for (const version of uniqueVersions) {
dotnetInstaller = new installer_1.DotnetCoreInstaller(version, quality);
const installedVersion = yield dotnetInstaller.installDotnet();
installedDotnetVersions.push(installedVersion);
}
installer_1.DotnetInstallDir.addToPath();
}
let dotnetInstaller;
const uniqueVersions = new Set(versions);
for (const version of uniqueVersions) {
dotnetInstaller = new installer_1.DotnetCoreInstaller(version, quality);
const installedVersion = await dotnetInstaller.installDotnet();
installedDotnetVersions.push(installedVersion);
const sourceUrl = core.getInput('source-url');
const configFile = core.getInput('config-file');
if (sourceUrl) {
auth.configAuthentication(sourceUrl, configFile);
}
installer_1.DotnetInstallDir.addToPath();
outputInstalledVersion(installedDotnetVersions, globalJsonFileInput);
if (core.getBooleanInput('cache') && (0, cache_utils_1.isCacheFeatureAvailable)()) {
const cacheDependencyPath = core.getInput('cache-dependency-path');
yield (0, cache_restore_1.restoreCache)(cacheDependencyPath);
}
const matchersPath = path_1.default.join(__dirname, '..', '..', '.github');
core.info(`##[add-matcher]${path_1.default.join(matchersPath, 'csc.json')}`);
}
const sourceUrl = core.getInput('source-url');
const configFile = core.getInput('config-file');
if (sourceUrl) {
auth.configAuthentication(sourceUrl, configFile);
catch (error) {
core.setFailed(error.message);
}
outputInstalledVersion(installedDotnetVersions, globalJsonFileInput);
if (core.getBooleanInput('cache') && (0, cache_utils_1.isCacheFeatureAvailable)()) {
const cacheDependencyPath = core.getInput('cache-dependency-path');
await (0, cache_restore_1.restoreCache)(cacheDependencyPath);
}
const matchersPath = path_1.default.join(__dirname, '..', '..', '.github');
core.info(`##[add-matcher]${path_1.default.join(matchersPath, 'csc.json')}`);
}
catch (error) {
core.setFailed(error.message);
}
});
}
exports.run = run;
function getVersionFromGlobalJson(globalJsonPath) {
let version = '';
const globalJson = json5_1.default.parse(

26
package-lock.json generated
View File

@ -28,7 +28,7 @@
"@typescript-eslint/parser": "^7.3.0",
"@vercel/ncc": "^0.38.1",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-prettier": "^10.1.5",
"eslint-plugin-jest": "^27.9.0",
"eslint-plugin-node": "^11.1.0",
"husky": "^9.1.7",
@ -37,7 +37,7 @@
"jest-each": "^29.7.0",
"prettier": "^3.2.5",
"ts-jest": "^29.1.2",
"typescript": "^5.8.3",
"typescript": "^5.4.2",
"wget-improved": "^3.2.1"
}
},
@ -3119,13 +3119,16 @@
}
},
"node_modules/eslint-config-prettier": {
"version": "9.1.0",
"resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz",
"integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==",
"version": "10.1.5",
"resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-10.1.5.tgz",
"integrity": "sha512-zc1UmCpNltmVY34vuLRV61r1K27sWuX39E+uyUnY8xS2Bex88VV9cugG+UZbRSRGtGyFboj+D8JODyme1plMpw==",
"dev": true,
"bin": {
"eslint-config-prettier": "bin/cli.js"
},
"funding": {
"url": "https://opencollective.com/eslint-config-prettier"
},
"peerDependencies": {
"eslint": ">=7.0.0"
}
@ -5789,11 +5792,10 @@
}
},
"node_modules/typescript": {
"version": "5.8.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz",
"integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==",
"version": "5.4.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.2.tgz",
"integrity": "sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==",
"dev": true,
"license": "Apache-2.0",
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
@ -5803,9 +5805,9 @@
}
},
"node_modules/undici": {
"version": "5.28.5",
"resolved": "https://registry.npmjs.org/undici/-/undici-5.28.5.tgz",
"integrity": "sha512-zICwjrDrcrUE0pyyJc1I2QzBkLM8FINsgOrt6WjA+BgajVq9Nxu2PbFFXUrAggLfDXlZGZBVZYw7WNV5KiBiBA==",
"version": "5.29.0",
"resolved": "https://registry.npmjs.org/undici/-/undici-5.29.0.tgz",
"integrity": "sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg==",
"license": "MIT",
"dependencies": {
"@fastify/busboy": "^2.0.0"

View File

@ -45,7 +45,7 @@
"@typescript-eslint/parser": "^7.3.0",
"@vercel/ncc": "^0.38.1",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-prettier": "^10.1.5",
"eslint-plugin-jest": "^27.9.0",
"eslint-plugin-node": "^11.1.0",
"husky": "^9.1.7",
@ -54,7 +54,7 @@
"jest-each": "^29.7.0",
"prettier": "^3.2.5",
"ts-jest": "^29.1.2",
"typescript": "^5.8.3",
"typescript": "^5.4.2",
"wget-improved": "^3.2.1"
},
"jest": {

View File

@ -2,7 +2,7 @@
"compilerOptions": {
/* Basic Options */
// "incremental": true, /* Enable incremental compilation */
"target": "es2021", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
"target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
"lib": [
"es6"