@@ -6567,30 +6567,7 @@ module.exports.default = macosRelease;
6567
6567
/* 121 */,
6568
6568
/* 122 */,
6569
6569
/* 123 */,
6570
- /* 124 */
6571
- /***/ (function(__unusedmodule, exports) {
6572
-
6573
- "use strict";
6574
-
6575
- /*
6576
- * Copyright The OpenTelemetry Authors
6577
- *
6578
- * Licensed under the Apache License, Version 2.0 (the "License");
6579
- * you may not use this file except in compliance with the License.
6580
- * You may obtain a copy of the License at
6581
- *
6582
- * https://www.apache.org/licenses/LICENSE-2.0
6583
- *
6584
- * Unless required by applicable law or agreed to in writing, software
6585
- * distributed under the License is distributed on an "AS IS" BASIS,
6586
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6587
- * See the License for the specific language governing permissions and
6588
- * limitations under the License.
6589
- */
6590
- Object.defineProperty(exports, "__esModule", { value: true });
6591
- //# sourceMappingURL=tracer_provider.js.map
6592
-
6593
- /***/ }),
6570
+ /* 124 */,
6594
6571
/* 125 */,
6595
6572
/* 126 */
6596
6573
/***/ (function(module) {
@@ -7530,7 +7507,6 @@ const installer = __importStar(__webpack_require__(923));
7530
7507
const auth = __importStar(__webpack_require__(749));
7531
7508
const path = __importStar(__webpack_require__(622));
7532
7509
const cache_restore_1 = __webpack_require__(409);
7533
- const constants_1 = __webpack_require__(694);
7534
7510
const url_1 = __webpack_require__(835);
7535
7511
const os = __webpack_require__(87);
7536
7512
function run() {
@@ -7540,12 +7516,12 @@ function run() {
7540
7516
// Version is optional. If supplied, install / use from the tool cache
7541
7517
// If not supplied then task is still used to setup proxy, auth, etc...
7542
7518
//
7543
- let version = core.getInput(constants_1.Inputs.NodeVersion );
7519
+ let version = core.getInput('node-version' );
7544
7520
if (!version) {
7545
- version = core.getInput(constants_1.Inputs.Version );
7521
+ version = core.getInput('version' );
7546
7522
}
7547
- let arch = core.getInput(constants_1.Inputs.Architecture );
7548
- const cache = core.getInput(constants_1.Inputs.Cache );
7523
+ let arch = core.getInput('architecture' );
7524
+ const cache = core.getInput('cache' );
7549
7525
core.info(`cache is ${cache}`);
7550
7526
// if architecture supplied but node-version is not
7551
7527
// if we don't throw a warning, the already installed x64 node will be used which is not probably what user meant.
@@ -7556,14 +7532,14 @@ function run() {
7556
7532
arch = os.arch();
7557
7533
}
7558
7534
if (version) {
7559
- let token = core.getInput(constants_1.Inputs.Token );
7535
+ let token = core.getInput('token' );
7560
7536
let auth = !token || isGhes() ? undefined : `token ${token}`;
7561
- let stable = (core.getInput(constants_1.Inputs.Stable ) || 'true').toUpperCase() === 'TRUE';
7562
- const checkLatest = (core.getInput(constants_1.Inputs.CheckLatest ) || 'false').toUpperCase() === 'TRUE';
7537
+ let stable = (core.getInput('stable' ) || 'true').toUpperCase() === 'TRUE';
7538
+ const checkLatest = (core.getInput('check-latest' ) || 'false').toUpperCase() === 'TRUE';
7563
7539
yield installer.getNode(version, stable, checkLatest, auth, arch);
7564
7540
}
7565
- const registryUrl = core.getInput(constants_1.Inputs.RegistryUrl );
7566
- const alwaysAuth = core.getInput(constants_1.Inputs.AlwaysAuth );
7541
+ const registryUrl = core.getInput('registry-url' );
7542
+ const alwaysAuth = core.getInput('always-auth' );
7567
7543
if (registryUrl) {
7568
7544
auth.configAuthentication(registryUrl, alwaysAuth);
7569
7545
}
@@ -9304,7 +9280,29 @@ function authenticationPlugin(octokit, options) {
9304
9280
/* 193 */,
9305
9281
/* 194 */,
9306
9282
/* 195 */,
9307
- /* 196 */,
9283
+ /* 196 */
9284
+ /***/ (function(__unusedmodule, exports) {
9285
+
9286
+ "use strict";
9287
+
9288
+ Object.defineProperty(exports, "__esModule", { value: true });
9289
+ var LockType;
9290
+ (function (LockType) {
9291
+ LockType["Npm"] = "npm";
9292
+ LockType["Yarn"] = "yarn";
9293
+ })(LockType = exports.LockType || (exports.LockType = {}));
9294
+ var State;
9295
+ (function (State) {
9296
+ State["CachePrimaryKey"] = "CACHE_KEY";
9297
+ State["CacheMatchedKey"] = "CACHE_RESULT";
9298
+ })(State = exports.State || (exports.State = {}));
9299
+ var Outputs;
9300
+ (function (Outputs) {
9301
+ Outputs["CacheHit"] = "cache-hit";
9302
+ })(Outputs = exports.Outputs || (exports.Outputs = {}));
9303
+
9304
+
9305
+ /***/ }),
9308
9306
/* 197 */
9309
9307
/***/ (function(module, __unusedexports, __webpack_require__) {
9310
9308
@@ -43394,16 +43392,21 @@ var __importStar = (this && this.__importStar) || function (mod) {
43394
43392
result["default"] = mod;
43395
43393
return result;
43396
43394
};
43395
+ var __importDefault = (this && this.__importDefault) || function (mod) {
43396
+ return (mod && mod.__esModule) ? mod : { "default": mod };
43397
+ };
43397
43398
Object.defineProperty(exports, "__esModule", { value: true });
43398
43399
const cache = __importStar(__webpack_require__(638));
43399
43400
const core = __importStar(__webpack_require__(470));
43400
- const constants_1 = __webpack_require__(694);
43401
+ const path_1 = __importDefault(__webpack_require__(622));
43402
+ const fs_1 = __importDefault(__webpack_require__(747));
43403
+ const constants_1 = __webpack_require__(196);
43401
43404
const cache_utils_1 = __webpack_require__(452);
43402
43405
exports.restoreCache = (toolName, version) => __awaiter(void 0, void 0, void 0, function* () {
43403
43406
if (!cache_utils_1.isPackageManagerCacheSupported(toolName)) {
43404
43407
throw new Error(`${toolName} is not supported`);
43405
43408
}
43406
- const lockKey = core.getInput(constants_1.Inputs.Key, { required: true } );
43409
+ const lockKey = getLockFile(toolName );
43407
43410
const platform = process.env.RUNNER_OS;
43408
43411
const fileHash = yield cache_utils_1.hashFile(lockKey);
43409
43412
const primaryKey = `${platform}-${toolName}-${version}-${fileHash}`;
@@ -43419,6 +43422,19 @@ exports.restoreCache = (toolName, version) => __awaiter(void 0, void 0, void 0,
43419
43422
core.setOutput(constants_1.Outputs.CacheHit, isExactMatch);
43420
43423
core.info(`Cache restored from key: ${cacheKey}`);
43421
43424
});
43425
+ const getLockFile = (cacheType) => {
43426
+ let lockFile = 'package-lock.json';
43427
+ const workspace = process.env.GITHUB_WORKSPACE;
43428
+ const rootContent = fs_1.default.readdirSync(workspace);
43429
+ if (cacheType === 'yarn') {
43430
+ lockFile = 'yarn.lock';
43431
+ }
43432
+ const fullLockFile = rootContent.find(item => lockFile === item);
43433
+ if (!fullLockFile) {
43434
+ throw new Error('No package-lock.json or yarn.lock were found');
43435
+ }
43436
+ return path_1.default.resolve(fullLockFile);
43437
+ };
43422
43438
43423
43439
43424
43440
/***/ }),
@@ -44470,7 +44486,7 @@ __exportStar(__webpack_require__(932), exports);
44470
44486
__exportStar(__webpack_require__(839), exports);
44471
44487
__exportStar(__webpack_require__(975), exports);
44472
44488
__exportStar(__webpack_require__(70), exports);
44473
- __exportStar(__webpack_require__(124 ), exports);
44489
+ __exportStar(__webpack_require__(694 ), exports);
44474
44490
__exportStar(__webpack_require__(695), exports);
44475
44491
var context_base_1 = __webpack_require__(995);
44476
44492
Object.defineProperty(exports, "Context", { enumerable: true, get: function () { return context_base_1.Context; } });
@@ -44661,7 +44677,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
44661
44677
};
44662
44678
Object.defineProperty(exports, "__esModule", { value: true });
44663
44679
const exec = __importStar(__webpack_require__(986));
44664
- const constants_1 = __webpack_require__(694 );
44680
+ const constants_1 = __webpack_require__(196 );
44665
44681
const glob = __importStar(__webpack_require__(281));
44666
44682
const crypto = __importStar(__webpack_require__(417));
44667
44683
const fs = __importStar(__webpack_require__(747));
@@ -55450,37 +55466,23 @@ exports.Deprecation = Deprecation;
55450
55466
55451
55467
"use strict";
55452
55468
55469
+ /*
55470
+ * Copyright The OpenTelemetry Authors
55471
+ *
55472
+ * Licensed under the Apache License, Version 2.0 (the "License");
55473
+ * you may not use this file except in compliance with the License.
55474
+ * You may obtain a copy of the License at
55475
+ *
55476
+ * https://www.apache.org/licenses/LICENSE-2.0
55477
+ *
55478
+ * Unless required by applicable law or agreed to in writing, software
55479
+ * distributed under the License is distributed on an "AS IS" BASIS,
55480
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
55481
+ * See the License for the specific language governing permissions and
55482
+ * limitations under the License.
55483
+ */
55453
55484
Object.defineProperty(exports, "__esModule", { value: true });
55454
- var Inputs;
55455
- (function (Inputs) {
55456
- Inputs["Cache"] = "cache";
55457
- Inputs["Key"] = "key";
55458
- Inputs["RestoreKeys"] = "restore-keys";
55459
- Inputs["NodeVersion"] = "node-version";
55460
- Inputs["Version"] = "version";
55461
- Inputs["Architecture"] = "architecture";
55462
- Inputs["Token"] = "token";
55463
- Inputs["Stable"] = "stable";
55464
- Inputs["CheckLatest"] = "check-latest";
55465
- Inputs["RegistryUrl"] = "registry-url";
55466
- Inputs["AlwaysAuth"] = "always-auth";
55467
- Inputs["Scope"] = "scope";
55468
- })(Inputs = exports.Inputs || (exports.Inputs = {}));
55469
- var LockType;
55470
- (function (LockType) {
55471
- LockType["Npm"] = "npm";
55472
- LockType["Yarn"] = "yarn";
55473
- })(LockType = exports.LockType || (exports.LockType = {}));
55474
- var State;
55475
- (function (State) {
55476
- State["CachePrimaryKey"] = "CACHE_KEY";
55477
- State["CacheMatchedKey"] = "CACHE_RESULT";
55478
- })(State = exports.State || (exports.State = {}));
55479
- var Outputs;
55480
- (function (Outputs) {
55481
- Outputs["CacheHit"] = "cache-hit";
55482
- })(Outputs = exports.Outputs || (exports.Outputs = {}));
55483
-
55485
+ //# sourceMappingURL=tracer_provider.js.map
55484
55486
55485
55487
/***/ }),
55486
55488
/* 695 */
@@ -56711,7 +56713,6 @@ const os = __importStar(__webpack_require__(87));
56711
56713
const path = __importStar(__webpack_require__(622));
56712
56714
const core = __importStar(__webpack_require__(470));
56713
56715
const github = __importStar(__webpack_require__(469));
56714
- const constants_1 = __webpack_require__(694);
56715
56716
function configAuthentication(registryUrl, alwaysAuth) {
56716
56717
const npmrc = path.resolve(process.env['RUNNER_TEMP'] || process.cwd(), '.npmrc');
56717
56718
if (!registryUrl.endsWith('/')) {
@@ -56721,7 +56722,7 @@ function configAuthentication(registryUrl, alwaysAuth) {
56721
56722
}
56722
56723
exports.configAuthentication = configAuthentication;
56723
56724
function writeRegistryToFile(registryUrl, fileLocation, alwaysAuth) {
56724
- let scope = core.getInput(constants_1.Inputs.Scope );
56725
+ let scope = core.getInput('scope' );
56725
56726
if (!scope && registryUrl.indexOf('npm.pkg.github.com') > -1) {
56726
56727
scope = github.context.repo.owner;
56727
56728
}
0 commit comments