@cypress/github-action 4.1.1 → 4.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +776 -15
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1376,13 +1376,9 @@ function exportVariable(name, val) {
1376
1376
  process.env[name] = convertedVal;
1377
1377
  const filePath = process.env['GITHUB_ENV'] || '';
1378
1378
  if (filePath) {
1379
- const delimiter = '_GitHubActionsFileCommandDelimeter_';
1380
- const commandValue = `${name}<<${delimiter}${os.EOL}${convertedVal}${os.EOL}${delimiter}`;
1381
- file_command_1.issueCommand('ENV', commandValue);
1382
- }
1383
- else {
1384
- command_1.issueCommand('set-env', { name }, convertedVal);
1379
+ return file_command_1.issueFileCommand('ENV', file_command_1.prepareKeyValueMessage(name, val));
1385
1380
  }
1381
+ command_1.issueCommand('set-env', { name }, convertedVal);
1386
1382
  }
1387
1383
  exports.exportVariable = exportVariable;
1388
1384
  /**
@@ -1400,7 +1396,7 @@ exports.setSecret = setSecret;
1400
1396
  function addPath(inputPath) {
1401
1397
  const filePath = process.env['GITHUB_PATH'] || '';
1402
1398
  if (filePath) {
1403
- file_command_1.issueCommand('PATH', inputPath);
1399
+ file_command_1.issueFileCommand('PATH', inputPath);
1404
1400
  }
1405
1401
  else {
1406
1402
  command_1.issueCommand('add-path', {}, inputPath);
@@ -1440,7 +1436,10 @@ function getMultilineInput(name, options) {
1440
1436
  const inputs = getInput(name, options)
1441
1437
  .split('\n')
1442
1438
  .filter(x => x !== '');
1443
- return inputs;
1439
+ if (options && options.trimWhitespace === false) {
1440
+ return inputs;
1441
+ }
1442
+ return inputs.map(input => input.trim());
1444
1443
  }
1445
1444
  exports.getMultilineInput = getMultilineInput;
1446
1445
  /**
@@ -1473,8 +1472,12 @@ exports.getBooleanInput = getBooleanInput;
1473
1472
  */
1474
1473
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1475
1474
  function setOutput(name, value) {
1475
+ const filePath = process.env['GITHUB_OUTPUT'] || '';
1476
+ if (filePath) {
1477
+ return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value));
1478
+ }
1476
1479
  process.stdout.write(os.EOL);
1477
- command_1.issueCommand('set-output', { name }, value);
1480
+ command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(value));
1478
1481
  }
1479
1482
  exports.setOutput = setOutput;
1480
1483
  /**
@@ -1603,7 +1606,11 @@ exports.group = group;
1603
1606
  */
1604
1607
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1605
1608
  function saveState(name, value) {
1606
- command_1.issueCommand('save-state', { name }, value);
1609
+ const filePath = process.env['GITHUB_STATE'] || '';
1610
+ if (filePath) {
1611
+ return file_command_1.issueFileCommand('STATE', file_command_1.prepareKeyValueMessage(name, value));
1612
+ }
1613
+ command_1.issueCommand('save-state', { name }, utils_1.toCommandValue(value));
1607
1614
  }
1608
1615
  exports.saveState = saveState;
1609
1616
  /**
@@ -1632,6 +1639,13 @@ Object.defineProperty(exports, "summary", ({ enumerable: true, get: function ()
1632
1639
  */
1633
1640
  var summary_2 = __nccwpck_require__(1327);
1634
1641
  Object.defineProperty(exports, "markdownSummary", ({ enumerable: true, get: function () { return summary_2.markdownSummary; } }));
1642
+ /**
1643
+ * Path exports
1644
+ */
1645
+ var path_utils_1 = __nccwpck_require__(2981);
1646
+ Object.defineProperty(exports, "toPosixPath", ({ enumerable: true, get: function () { return path_utils_1.toPosixPath; } }));
1647
+ Object.defineProperty(exports, "toWin32Path", ({ enumerable: true, get: function () { return path_utils_1.toWin32Path; } }));
1648
+ Object.defineProperty(exports, "toPlatformPath", ({ enumerable: true, get: function () { return path_utils_1.toPlatformPath; } }));
1635
1649
  //# sourceMappingURL=core.js.map
1636
1650
 
1637
1651
  /***/ }),
@@ -1662,13 +1676,14 @@ var __importStar = (this && this.__importStar) || function (mod) {
1662
1676
  return result;
1663
1677
  };
1664
1678
  Object.defineProperty(exports, "__esModule", ({ value: true }));
1665
- exports.issueCommand = void 0;
1679
+ exports.prepareKeyValueMessage = exports.issueFileCommand = void 0;
1666
1680
  // We use any as a valid input type
1667
1681
  /* eslint-disable @typescript-eslint/no-explicit-any */
1668
1682
  const fs = __importStar(__nccwpck_require__(7147));
1669
1683
  const os = __importStar(__nccwpck_require__(2037));
1684
+ const uuid_1 = __nccwpck_require__(8974);
1670
1685
  const utils_1 = __nccwpck_require__(5278);
1671
- function issueCommand(command, message) {
1686
+ function issueFileCommand(command, message) {
1672
1687
  const filePath = process.env[`GITHUB_${command}`];
1673
1688
  if (!filePath) {
1674
1689
  throw new Error(`Unable to find environment variable for file command ${command}`);
@@ -1680,7 +1695,22 @@ function issueCommand(command, message) {
1680
1695
  encoding: 'utf8'
1681
1696
  });
1682
1697
  }
1683
- exports.issueCommand = issueCommand;
1698
+ exports.issueFileCommand = issueFileCommand;
1699
+ function prepareKeyValueMessage(key, value) {
1700
+ const delimiter = `ghadelimiter_${uuid_1.v4()}`;
1701
+ const convertedValue = utils_1.toCommandValue(value);
1702
+ // These should realistically never happen, but just in case someone finds a
1703
+ // way to exploit uuid generation let's not allow keys or values that contain
1704
+ // the delimiter.
1705
+ if (key.includes(delimiter)) {
1706
+ throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`);
1707
+ }
1708
+ if (convertedValue.includes(delimiter)) {
1709
+ throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`);
1710
+ }
1711
+ return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`;
1712
+ }
1713
+ exports.prepareKeyValueMessage = prepareKeyValueMessage;
1684
1714
  //# sourceMappingURL=file-command.js.map
1685
1715
 
1686
1716
  /***/ }),
@@ -1769,6 +1799,71 @@ exports.OidcClient = OidcClient;
1769
1799
 
1770
1800
  /***/ }),
1771
1801
 
1802
+ /***/ 2981:
1803
+ /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
1804
+
1805
+ "use strict";
1806
+
1807
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
1808
+ if (k2 === undefined) k2 = k;
1809
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
1810
+ }) : (function(o, m, k, k2) {
1811
+ if (k2 === undefined) k2 = k;
1812
+ o[k2] = m[k];
1813
+ }));
1814
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
1815
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
1816
+ }) : function(o, v) {
1817
+ o["default"] = v;
1818
+ });
1819
+ var __importStar = (this && this.__importStar) || function (mod) {
1820
+ if (mod && mod.__esModule) return mod;
1821
+ var result = {};
1822
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
1823
+ __setModuleDefault(result, mod);
1824
+ return result;
1825
+ };
1826
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
1827
+ exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0;
1828
+ const path = __importStar(__nccwpck_require__(1017));
1829
+ /**
1830
+ * toPosixPath converts the given path to the posix form. On Windows, \\ will be
1831
+ * replaced with /.
1832
+ *
1833
+ * @param pth. Path to transform.
1834
+ * @return string Posix path.
1835
+ */
1836
+ function toPosixPath(pth) {
1837
+ return pth.replace(/[\\]/g, '/');
1838
+ }
1839
+ exports.toPosixPath = toPosixPath;
1840
+ /**
1841
+ * toWin32Path converts the given path to the win32 form. On Linux, / will be
1842
+ * replaced with \\.
1843
+ *
1844
+ * @param pth. Path to transform.
1845
+ * @return string Win32 path.
1846
+ */
1847
+ function toWin32Path(pth) {
1848
+ return pth.replace(/[/]/g, '\\');
1849
+ }
1850
+ exports.toWin32Path = toWin32Path;
1851
+ /**
1852
+ * toPlatformPath converts the given path to a platform-specific path. It does
1853
+ * this by replacing instances of / and \ with the platform-specific path
1854
+ * separator.
1855
+ *
1856
+ * @param pth The path to platformize.
1857
+ * @return string The platform-specific path.
1858
+ */
1859
+ function toPlatformPath(pth) {
1860
+ return pth.replace(/[/\\]/g, path.sep);
1861
+ }
1862
+ exports.toPlatformPath = toPlatformPath;
1863
+ //# sourceMappingURL=path-utils.js.map
1864
+
1865
+ /***/ }),
1866
+
1772
1867
  /***/ 1327:
1773
1868
  /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
1774
1869
 
@@ -2874,6 +2969,652 @@ exports.checkBypass = checkBypass;
2874
2969
 
2875
2970
  /***/ }),
2876
2971
 
2972
+ /***/ 8974:
2973
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
2974
+
2975
+ "use strict";
2976
+
2977
+
2978
+ Object.defineProperty(exports, "__esModule", ({
2979
+ value: true
2980
+ }));
2981
+ Object.defineProperty(exports, "v1", ({
2982
+ enumerable: true,
2983
+ get: function () {
2984
+ return _v.default;
2985
+ }
2986
+ }));
2987
+ Object.defineProperty(exports, "v3", ({
2988
+ enumerable: true,
2989
+ get: function () {
2990
+ return _v2.default;
2991
+ }
2992
+ }));
2993
+ Object.defineProperty(exports, "v4", ({
2994
+ enumerable: true,
2995
+ get: function () {
2996
+ return _v3.default;
2997
+ }
2998
+ }));
2999
+ Object.defineProperty(exports, "v5", ({
3000
+ enumerable: true,
3001
+ get: function () {
3002
+ return _v4.default;
3003
+ }
3004
+ }));
3005
+ Object.defineProperty(exports, "NIL", ({
3006
+ enumerable: true,
3007
+ get: function () {
3008
+ return _nil.default;
3009
+ }
3010
+ }));
3011
+ Object.defineProperty(exports, "version", ({
3012
+ enumerable: true,
3013
+ get: function () {
3014
+ return _version.default;
3015
+ }
3016
+ }));
3017
+ Object.defineProperty(exports, "validate", ({
3018
+ enumerable: true,
3019
+ get: function () {
3020
+ return _validate.default;
3021
+ }
3022
+ }));
3023
+ Object.defineProperty(exports, "stringify", ({
3024
+ enumerable: true,
3025
+ get: function () {
3026
+ return _stringify.default;
3027
+ }
3028
+ }));
3029
+ Object.defineProperty(exports, "parse", ({
3030
+ enumerable: true,
3031
+ get: function () {
3032
+ return _parse.default;
3033
+ }
3034
+ }));
3035
+
3036
+ var _v = _interopRequireDefault(__nccwpck_require__(1595));
3037
+
3038
+ var _v2 = _interopRequireDefault(__nccwpck_require__(6993));
3039
+
3040
+ var _v3 = _interopRequireDefault(__nccwpck_require__(1472));
3041
+
3042
+ var _v4 = _interopRequireDefault(__nccwpck_require__(6217));
3043
+
3044
+ var _nil = _interopRequireDefault(__nccwpck_require__(2381));
3045
+
3046
+ var _version = _interopRequireDefault(__nccwpck_require__(427));
3047
+
3048
+ var _validate = _interopRequireDefault(__nccwpck_require__(2609));
3049
+
3050
+ var _stringify = _interopRequireDefault(__nccwpck_require__(1458));
3051
+
3052
+ var _parse = _interopRequireDefault(__nccwpck_require__(6385));
3053
+
3054
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
3055
+
3056
+ /***/ }),
3057
+
3058
+ /***/ 5842:
3059
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
3060
+
3061
+ "use strict";
3062
+
3063
+
3064
+ Object.defineProperty(exports, "__esModule", ({
3065
+ value: true
3066
+ }));
3067
+ exports["default"] = void 0;
3068
+
3069
+ var _crypto = _interopRequireDefault(__nccwpck_require__(6113));
3070
+
3071
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
3072
+
3073
+ function md5(bytes) {
3074
+ if (Array.isArray(bytes)) {
3075
+ bytes = Buffer.from(bytes);
3076
+ } else if (typeof bytes === 'string') {
3077
+ bytes = Buffer.from(bytes, 'utf8');
3078
+ }
3079
+
3080
+ return _crypto.default.createHash('md5').update(bytes).digest();
3081
+ }
3082
+
3083
+ var _default = md5;
3084
+ exports["default"] = _default;
3085
+
3086
+ /***/ }),
3087
+
3088
+ /***/ 2381:
3089
+ /***/ ((__unused_webpack_module, exports) => {
3090
+
3091
+ "use strict";
3092
+
3093
+
3094
+ Object.defineProperty(exports, "__esModule", ({
3095
+ value: true
3096
+ }));
3097
+ exports["default"] = void 0;
3098
+ var _default = '00000000-0000-0000-0000-000000000000';
3099
+ exports["default"] = _default;
3100
+
3101
+ /***/ }),
3102
+
3103
+ /***/ 6385:
3104
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
3105
+
3106
+ "use strict";
3107
+
3108
+
3109
+ Object.defineProperty(exports, "__esModule", ({
3110
+ value: true
3111
+ }));
3112
+ exports["default"] = void 0;
3113
+
3114
+ var _validate = _interopRequireDefault(__nccwpck_require__(2609));
3115
+
3116
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
3117
+
3118
+ function parse(uuid) {
3119
+ if (!(0, _validate.default)(uuid)) {
3120
+ throw TypeError('Invalid UUID');
3121
+ }
3122
+
3123
+ let v;
3124
+ const arr = new Uint8Array(16); // Parse ########-....-....-....-............
3125
+
3126
+ arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;
3127
+ arr[1] = v >>> 16 & 0xff;
3128
+ arr[2] = v >>> 8 & 0xff;
3129
+ arr[3] = v & 0xff; // Parse ........-####-....-....-............
3130
+
3131
+ arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;
3132
+ arr[5] = v & 0xff; // Parse ........-....-####-....-............
3133
+
3134
+ arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;
3135
+ arr[7] = v & 0xff; // Parse ........-....-....-####-............
3136
+
3137
+ arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;
3138
+ arr[9] = v & 0xff; // Parse ........-....-....-....-############
3139
+ // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes)
3140
+
3141
+ arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;
3142
+ arr[11] = v / 0x100000000 & 0xff;
3143
+ arr[12] = v >>> 24 & 0xff;
3144
+ arr[13] = v >>> 16 & 0xff;
3145
+ arr[14] = v >>> 8 & 0xff;
3146
+ arr[15] = v & 0xff;
3147
+ return arr;
3148
+ }
3149
+
3150
+ var _default = parse;
3151
+ exports["default"] = _default;
3152
+
3153
+ /***/ }),
3154
+
3155
+ /***/ 6230:
3156
+ /***/ ((__unused_webpack_module, exports) => {
3157
+
3158
+ "use strict";
3159
+
3160
+
3161
+ Object.defineProperty(exports, "__esModule", ({
3162
+ value: true
3163
+ }));
3164
+ exports["default"] = void 0;
3165
+ var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
3166
+ exports["default"] = _default;
3167
+
3168
+ /***/ }),
3169
+
3170
+ /***/ 9784:
3171
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
3172
+
3173
+ "use strict";
3174
+
3175
+
3176
+ Object.defineProperty(exports, "__esModule", ({
3177
+ value: true
3178
+ }));
3179
+ exports["default"] = rng;
3180
+
3181
+ var _crypto = _interopRequireDefault(__nccwpck_require__(6113));
3182
+
3183
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
3184
+
3185
+ const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate
3186
+
3187
+ let poolPtr = rnds8Pool.length;
3188
+
3189
+ function rng() {
3190
+ if (poolPtr > rnds8Pool.length - 16) {
3191
+ _crypto.default.randomFillSync(rnds8Pool);
3192
+
3193
+ poolPtr = 0;
3194
+ }
3195
+
3196
+ return rnds8Pool.slice(poolPtr, poolPtr += 16);
3197
+ }
3198
+
3199
+ /***/ }),
3200
+
3201
+ /***/ 8844:
3202
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
3203
+
3204
+ "use strict";
3205
+
3206
+
3207
+ Object.defineProperty(exports, "__esModule", ({
3208
+ value: true
3209
+ }));
3210
+ exports["default"] = void 0;
3211
+
3212
+ var _crypto = _interopRequireDefault(__nccwpck_require__(6113));
3213
+
3214
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
3215
+
3216
+ function sha1(bytes) {
3217
+ if (Array.isArray(bytes)) {
3218
+ bytes = Buffer.from(bytes);
3219
+ } else if (typeof bytes === 'string') {
3220
+ bytes = Buffer.from(bytes, 'utf8');
3221
+ }
3222
+
3223
+ return _crypto.default.createHash('sha1').update(bytes).digest();
3224
+ }
3225
+
3226
+ var _default = sha1;
3227
+ exports["default"] = _default;
3228
+
3229
+ /***/ }),
3230
+
3231
+ /***/ 1458:
3232
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
3233
+
3234
+ "use strict";
3235
+
3236
+
3237
+ Object.defineProperty(exports, "__esModule", ({
3238
+ value: true
3239
+ }));
3240
+ exports["default"] = void 0;
3241
+
3242
+ var _validate = _interopRequireDefault(__nccwpck_require__(2609));
3243
+
3244
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
3245
+
3246
+ /**
3247
+ * Convert array of 16 byte values to UUID string format of the form:
3248
+ * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
3249
+ */
3250
+ const byteToHex = [];
3251
+
3252
+ for (let i = 0; i < 256; ++i) {
3253
+ byteToHex.push((i + 0x100).toString(16).substr(1));
3254
+ }
3255
+
3256
+ function stringify(arr, offset = 0) {
3257
+ // Note: Be careful editing this code! It's been tuned for performance
3258
+ // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
3259
+ const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one
3260
+ // of the following:
3261
+ // - One or more input array values don't map to a hex octet (leading to
3262
+ // "undefined" in the uuid)
3263
+ // - Invalid input values for the RFC `version` or `variant` fields
3264
+
3265
+ if (!(0, _validate.default)(uuid)) {
3266
+ throw TypeError('Stringified UUID is invalid');
3267
+ }
3268
+
3269
+ return uuid;
3270
+ }
3271
+
3272
+ var _default = stringify;
3273
+ exports["default"] = _default;
3274
+
3275
+ /***/ }),
3276
+
3277
+ /***/ 1595:
3278
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
3279
+
3280
+ "use strict";
3281
+
3282
+
3283
+ Object.defineProperty(exports, "__esModule", ({
3284
+ value: true
3285
+ }));
3286
+ exports["default"] = void 0;
3287
+
3288
+ var _rng = _interopRequireDefault(__nccwpck_require__(9784));
3289
+
3290
+ var _stringify = _interopRequireDefault(__nccwpck_require__(1458));
3291
+
3292
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
3293
+
3294
+ // **`v1()` - Generate time-based UUID**
3295
+ //
3296
+ // Inspired by https://github.com/LiosK/UUID.js
3297
+ // and http://docs.python.org/library/uuid.html
3298
+ let _nodeId;
3299
+
3300
+ let _clockseq; // Previous uuid creation time
3301
+
3302
+
3303
+ let _lastMSecs = 0;
3304
+ let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details
3305
+
3306
+ function v1(options, buf, offset) {
3307
+ let i = buf && offset || 0;
3308
+ const b = buf || new Array(16);
3309
+ options = options || {};
3310
+ let node = options.node || _nodeId;
3311
+ let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not
3312
+ // specified. We do this lazily to minimize issues related to insufficient
3313
+ // system entropy. See #189
3314
+
3315
+ if (node == null || clockseq == null) {
3316
+ const seedBytes = options.random || (options.rng || _rng.default)();
3317
+
3318
+ if (node == null) {
3319
+ // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
3320
+ node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];
3321
+ }
3322
+
3323
+ if (clockseq == null) {
3324
+ // Per 4.2.2, randomize (14 bit) clockseq
3325
+ clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;
3326
+ }
3327
+ } // UUID timestamps are 100 nano-second units since the Gregorian epoch,
3328
+ // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so
3329
+ // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
3330
+ // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
3331
+
3332
+
3333
+ let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock
3334
+ // cycle to simulate higher resolution clock
3335
+
3336
+ let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)
3337
+
3338
+ const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression
3339
+
3340
+ if (dt < 0 && options.clockseq === undefined) {
3341
+ clockseq = clockseq + 1 & 0x3fff;
3342
+ } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
3343
+ // time interval
3344
+
3345
+
3346
+ if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
3347
+ nsecs = 0;
3348
+ } // Per 4.2.1.2 Throw error if too many uuids are requested
3349
+
3350
+
3351
+ if (nsecs >= 10000) {
3352
+ throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");
3353
+ }
3354
+
3355
+ _lastMSecs = msecs;
3356
+ _lastNSecs = nsecs;
3357
+ _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch
3358
+
3359
+ msecs += 12219292800000; // `time_low`
3360
+
3361
+ const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
3362
+ b[i++] = tl >>> 24 & 0xff;
3363
+ b[i++] = tl >>> 16 & 0xff;
3364
+ b[i++] = tl >>> 8 & 0xff;
3365
+ b[i++] = tl & 0xff; // `time_mid`
3366
+
3367
+ const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;
3368
+ b[i++] = tmh >>> 8 & 0xff;
3369
+ b[i++] = tmh & 0xff; // `time_high_and_version`
3370
+
3371
+ b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
3372
+
3373
+ b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
3374
+
3375
+ b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`
3376
+
3377
+ b[i++] = clockseq & 0xff; // `node`
3378
+
3379
+ for (let n = 0; n < 6; ++n) {
3380
+ b[i + n] = node[n];
3381
+ }
3382
+
3383
+ return buf || (0, _stringify.default)(b);
3384
+ }
3385
+
3386
+ var _default = v1;
3387
+ exports["default"] = _default;
3388
+
3389
+ /***/ }),
3390
+
3391
+ /***/ 6993:
3392
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
3393
+
3394
+ "use strict";
3395
+
3396
+
3397
+ Object.defineProperty(exports, "__esModule", ({
3398
+ value: true
3399
+ }));
3400
+ exports["default"] = void 0;
3401
+
3402
+ var _v = _interopRequireDefault(__nccwpck_require__(5920));
3403
+
3404
+ var _md = _interopRequireDefault(__nccwpck_require__(5842));
3405
+
3406
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
3407
+
3408
+ const v3 = (0, _v.default)('v3', 0x30, _md.default);
3409
+ var _default = v3;
3410
+ exports["default"] = _default;
3411
+
3412
+ /***/ }),
3413
+
3414
+ /***/ 5920:
3415
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
3416
+
3417
+ "use strict";
3418
+
3419
+
3420
+ Object.defineProperty(exports, "__esModule", ({
3421
+ value: true
3422
+ }));
3423
+ exports["default"] = _default;
3424
+ exports.URL = exports.DNS = void 0;
3425
+
3426
+ var _stringify = _interopRequireDefault(__nccwpck_require__(1458));
3427
+
3428
+ var _parse = _interopRequireDefault(__nccwpck_require__(6385));
3429
+
3430
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
3431
+
3432
+ function stringToBytes(str) {
3433
+ str = unescape(encodeURIComponent(str)); // UTF8 escape
3434
+
3435
+ const bytes = [];
3436
+
3437
+ for (let i = 0; i < str.length; ++i) {
3438
+ bytes.push(str.charCodeAt(i));
3439
+ }
3440
+
3441
+ return bytes;
3442
+ }
3443
+
3444
+ const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';
3445
+ exports.DNS = DNS;
3446
+ const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';
3447
+ exports.URL = URL;
3448
+
3449
+ function _default(name, version, hashfunc) {
3450
+ function generateUUID(value, namespace, buf, offset) {
3451
+ if (typeof value === 'string') {
3452
+ value = stringToBytes(value);
3453
+ }
3454
+
3455
+ if (typeof namespace === 'string') {
3456
+ namespace = (0, _parse.default)(namespace);
3457
+ }
3458
+
3459
+ if (namespace.length !== 16) {
3460
+ throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');
3461
+ } // Compute hash of namespace and value, Per 4.3
3462
+ // Future: Use spread syntax when supported on all platforms, e.g. `bytes =
3463
+ // hashfunc([...namespace, ... value])`
3464
+
3465
+
3466
+ let bytes = new Uint8Array(16 + value.length);
3467
+ bytes.set(namespace);
3468
+ bytes.set(value, namespace.length);
3469
+ bytes = hashfunc(bytes);
3470
+ bytes[6] = bytes[6] & 0x0f | version;
3471
+ bytes[8] = bytes[8] & 0x3f | 0x80;
3472
+
3473
+ if (buf) {
3474
+ offset = offset || 0;
3475
+
3476
+ for (let i = 0; i < 16; ++i) {
3477
+ buf[offset + i] = bytes[i];
3478
+ }
3479
+
3480
+ return buf;
3481
+ }
3482
+
3483
+ return (0, _stringify.default)(bytes);
3484
+ } // Function#name is not settable on some platforms (#270)
3485
+
3486
+
3487
+ try {
3488
+ generateUUID.name = name; // eslint-disable-next-line no-empty
3489
+ } catch (err) {} // For CommonJS default export support
3490
+
3491
+
3492
+ generateUUID.DNS = DNS;
3493
+ generateUUID.URL = URL;
3494
+ return generateUUID;
3495
+ }
3496
+
3497
+ /***/ }),
3498
+
3499
+ /***/ 1472:
3500
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
3501
+
3502
+ "use strict";
3503
+
3504
+
3505
+ Object.defineProperty(exports, "__esModule", ({
3506
+ value: true
3507
+ }));
3508
+ exports["default"] = void 0;
3509
+
3510
+ var _rng = _interopRequireDefault(__nccwpck_require__(9784));
3511
+
3512
+ var _stringify = _interopRequireDefault(__nccwpck_require__(1458));
3513
+
3514
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
3515
+
3516
+ function v4(options, buf, offset) {
3517
+ options = options || {};
3518
+
3519
+ const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
3520
+
3521
+
3522
+ rnds[6] = rnds[6] & 0x0f | 0x40;
3523
+ rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
3524
+
3525
+ if (buf) {
3526
+ offset = offset || 0;
3527
+
3528
+ for (let i = 0; i < 16; ++i) {
3529
+ buf[offset + i] = rnds[i];
3530
+ }
3531
+
3532
+ return buf;
3533
+ }
3534
+
3535
+ return (0, _stringify.default)(rnds);
3536
+ }
3537
+
3538
+ var _default = v4;
3539
+ exports["default"] = _default;
3540
+
3541
+ /***/ }),
3542
+
3543
+ /***/ 6217:
3544
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
3545
+
3546
+ "use strict";
3547
+
3548
+
3549
+ Object.defineProperty(exports, "__esModule", ({
3550
+ value: true
3551
+ }));
3552
+ exports["default"] = void 0;
3553
+
3554
+ var _v = _interopRequireDefault(__nccwpck_require__(5920));
3555
+
3556
+ var _sha = _interopRequireDefault(__nccwpck_require__(8844));
3557
+
3558
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
3559
+
3560
+ const v5 = (0, _v.default)('v5', 0x50, _sha.default);
3561
+ var _default = v5;
3562
+ exports["default"] = _default;
3563
+
3564
+ /***/ }),
3565
+
3566
+ /***/ 2609:
3567
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
3568
+
3569
+ "use strict";
3570
+
3571
+
3572
+ Object.defineProperty(exports, "__esModule", ({
3573
+ value: true
3574
+ }));
3575
+ exports["default"] = void 0;
3576
+
3577
+ var _regex = _interopRequireDefault(__nccwpck_require__(6230));
3578
+
3579
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
3580
+
3581
+ function validate(uuid) {
3582
+ return typeof uuid === 'string' && _regex.default.test(uuid);
3583
+ }
3584
+
3585
+ var _default = validate;
3586
+ exports["default"] = _default;
3587
+
3588
+ /***/ }),
3589
+
3590
+ /***/ 427:
3591
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
3592
+
3593
+ "use strict";
3594
+
3595
+
3596
+ Object.defineProperty(exports, "__esModule", ({
3597
+ value: true
3598
+ }));
3599
+ exports["default"] = void 0;
3600
+
3601
+ var _validate = _interopRequireDefault(__nccwpck_require__(2609));
3602
+
3603
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
3604
+
3605
+ function version(uuid) {
3606
+ if (!(0, _validate.default)(uuid)) {
3607
+ throw TypeError('Invalid UUID');
3608
+ }
3609
+
3610
+ return parseInt(uuid.substr(14, 1), 16);
3611
+ }
3612
+
3613
+ var _default = version;
3614
+ exports["default"] = _default;
3615
+
3616
+ /***/ }),
3617
+
2877
3618
  /***/ 1514:
2878
3619
  /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
2879
3620
 
@@ -74706,6 +75447,7 @@ const yarnFilename = path.join(
74706
75447
  findYarnWorkspaceRoot(workingDirectory) || workingDirectory,
74707
75448
  'yarn.lock'
74708
75449
  )
75450
+ const pnpmLockFilename = path.join(workingDirectory, 'pnpm-lock.yaml')
74709
75451
  const packageLockFilename = path.join(
74710
75452
  workingDirectory,
74711
75453
  'package-lock.json'
@@ -74713,8 +75455,14 @@ const packageLockFilename = path.join(
74713
75455
 
74714
75456
  const useYarn = () => fs.existsSync(yarnFilename)
74715
75457
 
75458
+ const usePnpm = () => fs.existsSync(pnpmLockFilename)
75459
+
74716
75460
  const lockHash = () => {
74717
- const lockFilename = useYarn() ? yarnFilename : packageLockFilename
75461
+ const lockFilename = useYarn()
75462
+ ? yarnFilename
75463
+ : usePnpm()
75464
+ ? pnpmLockFilename
75465
+ : packageLockFilename
74718
75466
  const fileHash = hasha.fromFileSync(lockFilename)
74719
75467
  debug(`Hash from file ${lockFilename} is ${fileHash}`)
74720
75468
  return fileHash
@@ -74729,6 +75477,8 @@ const getNpmCache = () => {
74729
75477
  if (!key) {
74730
75478
  if (useYarn()) {
74731
75479
  key = `yarn-${platformAndArch}-${hash}`
75480
+ } else if (usePnpm()) {
75481
+ key = `pnpm-${platformAndArch}-${hash}`
74732
75482
  } else {
74733
75483
  key = `npm-${platformAndArch}-${hash}`
74734
75484
  }
@@ -74738,6 +75488,8 @@ const getNpmCache = () => {
74738
75488
 
74739
75489
  if (useYarn()) {
74740
75490
  o.inputPath = path.join(homeDirectory, '.cache', 'yarn')
75491
+ } else if (usePnpm()) {
75492
+ o.inputPath = NPM_CACHE_FOLDER
74741
75493
  } else {
74742
75494
  o.inputPath = NPM_CACHE_FOLDER
74743
75495
  }
@@ -74842,9 +75594,18 @@ const install = () => {
74842
75594
  cypressCommandOptions
74843
75595
  )
74844
75596
  })
75597
+ } else if (usePnpm()) {
75598
+ debug('installing NPM dependencies using pnpm')
75599
+ return io.which('pnpm', true).then((pnpmPath) => {
75600
+ debug(`pnpm at "${pnpmPath}"`)
75601
+ return exec.exec(
75602
+ quote(pnpmPath),
75603
+ ['install', '--frozen-lockfile'],
75604
+ cypressCommandOptions
75605
+ )
75606
+ })
74845
75607
  } else {
74846
75608
  debug('installing NPM dependencies')
74847
-
74848
75609
  return io.which('npm', true).then((npmPath) => {
74849
75610
  debug(`npm at "${npmPath}"`)
74850
75611
  return exec.exec(quote(npmPath), ['ci'], cypressCommandOptions)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cypress/github-action",
3
- "version": "4.1.1",
3
+ "version": "4.2.2",
4
4
  "description": "GitHub Action for running Cypress end-to-end tests",
5
5
  "private": false,
6
6
  "main": "dist/index.js",
@@ -32,7 +32,7 @@
32
32
  "homepage": "https://github.com/cypress-io/github-action#readme",
33
33
  "dependencies": {
34
34
  "@actions/cache": "1.0.11",
35
- "@actions/core": "1.8.2",
35
+ "@actions/core": "1.10.0",
36
36
  "@actions/exec": "1.1.1",
37
37
  "@actions/io": "1.1.2",
38
38
  "@octokit/core": "3.6.0",