4
4
/******/ (() => { // webpackBootstrap
5
5
/******/ var __webpack_modules__ = ({
6
6
7
- /***/ 970:
8
- /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
9
-
10
- const core = __nccwpck_require__(2186);
11
-
12
- /**
13
- * Safely parse a JSON input to a GitHub Action.
14
- *
15
- * @param {String} name - The name of the input.
16
- * @param {Object} options - Options to pass to core.getInput
17
- * @param {*} [defaultValue] - A default value to provide for the input.
18
- * Not required if the {required: true} option is given in the second arg to this function.
19
- * @returns {any}
20
- */
21
- function getJSONInput(name, options, defaultValue = undefined) {
22
- const input = core.getInput(name, options);
23
- if (input) {
24
- return JSON.parse(input);
25
- }
26
- return defaultValue;
27
- }
28
-
29
- /**
30
- * Safely access a string input to a GitHub Action, or fall back on a default if the string is empty.
31
- *
32
- * @param {String} name
33
- * @param {Object} options
34
- * @param {*} [defaultValue]
35
- * @returns {string|undefined}
36
- */
37
- function getStringInput(name, options, defaultValue = undefined) {
38
- const input = core.getInput(name, options);
39
- if (!input) {
40
- return defaultValue;
41
- }
42
- return input;
43
- }
44
-
45
- module.exports = {
46
- getJSONInput,
47
- getStringInput,
48
- };
49
-
50
-
51
- /***/ }),
52
-
53
- /***/ 4502:
54
- /***/ ((module) => {
55
-
56
- /**
57
- * Simulates a while loop where the condition is determined by the result of a Promise.
58
- *
59
- * @param {Function} condition
60
- * @param {Function} action
61
- * @returns {Promise}
62
- */
63
- function promiseWhile(condition, action) {
64
- console.info('[promiseWhile] promiseWhile()');
65
-
66
- return new Promise((resolve, reject) => {
67
- const loop = function () {
68
- if (!condition()) {
69
- resolve();
70
- } else {
71
- const actionResult = action();
72
- console.info('[promiseWhile] promiseWhile() actionResult', actionResult);
73
- Promise.resolve(actionResult).then(loop).catch(reject);
74
- }
75
- };
76
- loop();
77
- });
78
- }
79
-
80
- /**
81
- * Simulates a do-while loop where the condition is determined by the result of a Promise.
82
- *
83
- * @param {Function} condition
84
- * @param {Function} action
85
- * @returns {Promise}
86
- */
87
- function promiseDoWhile(condition, action) {
88
- console.info('[promiseWhile] promiseDoWhile()');
89
-
90
- return new Promise((resolve, reject) => {
91
- console.info('[promiseWhile] promiseDoWhile() condition', condition);
92
- const actionResult = action();
93
- console.info('[promiseWhile] promiseDoWhile() actionResult', actionResult);
94
- actionResult
95
- .then(() => promiseWhile(condition, action))
96
- .then(() => resolve())
97
- .catch(reject);
98
- });
99
- }
100
-
101
- module.exports = {
102
- promiseWhile,
103
- promiseDoWhile,
104
- };
105
-
106
-
107
- /***/ }),
108
-
109
7
/***/ 7351:
110
8
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
111
9
@@ -12251,16 +12149,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
12251
12149
Object.defineProperty(exports, "__esModule", ({ value: true }));
12252
12150
/* eslint-disable @typescript-eslint/naming-convention */
12253
12151
const throttle_1 = __importDefault(__nccwpck_require__(2891));
12254
- const ActionUtils_1 = __importDefault( __nccwpck_require__(970) );
12152
+ const ActionUtils_1 = __nccwpck_require__(6981 );
12255
12153
const CONST_1 = __importDefault(__nccwpck_require__(9873));
12256
12154
const GithubUtils_1 = __importStar(__nccwpck_require__(9296));
12257
- const promiseWhile_1 = __nccwpck_require__(4502 );
12155
+ const promiseWhile_1 = __nccwpck_require__(9438 );
12258
12156
function run() {
12259
12157
console.info('[awaitStagingDeploys] run()');
12260
- console.info('[awaitStagingDeploys] ActionUtils ', ActionUtils_1.default );
12158
+ console.info('[awaitStagingDeploys] getStringInput ', ActionUtils_1.getStringInput );
12261
12159
console.info('[awaitStagingDeploys] GitHubUtils', GithubUtils_1.default);
12262
12160
console.info('[awaitStagingDeploys] promiseDoWhile', promiseWhile_1.promiseDoWhile);
12263
- const tag = ActionUtils_1.default. getStringInput('TAG', { required: false });
12161
+ const tag = (0, ActionUtils_1.getStringInput) ('TAG', { required: false });
12264
12162
console.info('[awaitStagingDeploys] run() tag', tag);
12265
12163
let currentStagingDeploys = [];
12266
12164
console.info('[awaitStagingDeploys] run() _.throttle', throttle_1.default);
@@ -12304,6 +12202,68 @@ if (require.main === require.cache[eval('__filename')]) {
12304
12202
exports["default"] = run;
12305
12203
12306
12204
12205
+ /***/ }),
12206
+
12207
+ /***/ 6981:
12208
+ /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
12209
+
12210
+ "use strict";
12211
+
12212
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
12213
+ if (k2 === undefined) k2 = k;
12214
+ var desc = Object.getOwnPropertyDescriptor(m, k);
12215
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12216
+ desc = { enumerable: true, get: function() { return m[k]; } };
12217
+ }
12218
+ Object.defineProperty(o, k2, desc);
12219
+ }) : (function(o, m, k, k2) {
12220
+ if (k2 === undefined) k2 = k;
12221
+ o[k2] = m[k];
12222
+ }));
12223
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
12224
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
12225
+ }) : function(o, v) {
12226
+ o["default"] = v;
12227
+ });
12228
+ var __importStar = (this && this.__importStar) || function (mod) {
12229
+ if (mod && mod.__esModule) return mod;
12230
+ var result = {};
12231
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
12232
+ __setModuleDefault(result, mod);
12233
+ return result;
12234
+ };
12235
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
12236
+ exports.getStringInput = exports.getJSONInput = void 0;
12237
+ const core = __importStar(__nccwpck_require__(2186));
12238
+ /**
12239
+ * Safely parse a JSON input to a GitHub Action.
12240
+ *
12241
+ * @param name - The name of the input.
12242
+ * @param options - Options to pass to core.getInput
12243
+ * @param [defaultValue] - A default value to provide for the input.
12244
+ * Not required if the {required: true} option is given in the second arg to this function.
12245
+ */
12246
+ function getJSONInput(name, options, defaultValue) {
12247
+ const input = core.getInput(name, options);
12248
+ if (input) {
12249
+ return JSON.parse(input);
12250
+ }
12251
+ return defaultValue;
12252
+ }
12253
+ exports.getJSONInput = getJSONInput;
12254
+ /**
12255
+ * Safely access a string input to a GitHub Action, or fall back on a default if the string is empty.
12256
+ */
12257
+ function getStringInput(name, options, defaultValue) {
12258
+ const input = core.getInput(name, options);
12259
+ if (!input) {
12260
+ return defaultValue;
12261
+ }
12262
+ return input;
12263
+ }
12264
+ exports.getStringInput = getStringInput;
12265
+
12266
+
12307
12267
/***/ }),
12308
12268
12309
12269
/***/ 9873:
@@ -12312,9 +12272,12 @@ exports["default"] = run;
12312
12272
"use strict";
12313
12273
12314
12274
Object.defineProperty(exports, "__esModule", ({ value: true }));
12315
- const CONST = {
12275
+ const GIT_CONST = {
12316
12276
GITHUB_OWNER: 'Expensify',
12317
12277
APP_REPO: 'App',
12278
+ };
12279
+ const CONST = {
12280
+ ...GIT_CONST,
12318
12281
APPLAUSE_BOT: 'applausebot',
12319
12282
OS_BOTIFY: 'OSBotify',
12320
12283
LABELS: {
@@ -12323,11 +12286,9 @@ const CONST = {
12323
12286
INTERNAL_QA: 'InternalQA',
12324
12287
},
12325
12288
DATE_FORMAT_STRING: 'yyyy-MM-dd',
12326
- APP_REPO_URL: '' ,
12327
- APP_REPO_GIT_URL: '' ,
12289
+ APP_REPO_URL: `https://github.com/${GIT_CONST.GITHUB_OWNER}/${GIT_CONST.APP_REPO}` ,
12290
+ APP_REPO_GIT_URL:
`[email protected] :${GIT_CONST.GITHUB_OWNER}/${GIT_CONST.APP_REPO}.git` ,
12328
12291
};
12329
- CONST.APP_REPO_URL = `https://github.com/${CONST.GITHUB_OWNER}/${CONST.APP_REPO}`;
12330
- CONST.APP_REPO_GIT_URL = `
[email protected] :${CONST.GITHUB_OWNER}/${CONST.APP_REPO}.git`;
12331
12292
exports["default"] = CONST;
12332
12293
12333
12294
@@ -12784,6 +12745,53 @@ exports["default"] = GithubUtils;
12784
12745
module.exports = GithubUtils;
12785
12746
12786
12747
12748
+ /***/ }),
12749
+
12750
+ /***/ 9438:
12751
+ /***/ ((__unused_webpack_module, exports) => {
12752
+
12753
+ "use strict";
12754
+
12755
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
12756
+ exports.promiseDoWhile = exports.promiseWhile = void 0;
12757
+ /**
12758
+ * Simulates a while loop where the condition is determined by the result of a Promise.
12759
+ */
12760
+ function promiseWhile(condition, action) {
12761
+ console.info('[promiseWhile] promiseWhile()');
12762
+ return new Promise((resolve, reject) => {
12763
+ const loop = function () {
12764
+ if (!condition()) {
12765
+ resolve();
12766
+ }
12767
+ else {
12768
+ const actionResult = action?.();
12769
+ console.info('[promiseWhile] promiseWhile() actionResult', actionResult);
12770
+ Promise.resolve(actionResult).then(loop).catch(reject);
12771
+ }
12772
+ };
12773
+ loop();
12774
+ });
12775
+ }
12776
+ exports.promiseWhile = promiseWhile;
12777
+ /**
12778
+ * Simulates a do-while loop where the condition is determined by the result of a Promise.
12779
+ */
12780
+ function promiseDoWhile(condition, action) {
12781
+ console.info('[promiseWhile] promiseDoWhile()');
12782
+ return new Promise((resolve, reject) => {
12783
+ console.info('[promiseWhile] promiseDoWhile() condition', condition);
12784
+ const actionResult = action?.();
12785
+ console.info('[promiseWhile] promiseDoWhile() actionResult', actionResult);
12786
+ actionResult
12787
+ ?.then(() => promiseWhile(condition, action))
12788
+ .then(() => resolve())
12789
+ .catch(reject);
12790
+ });
12791
+ }
12792
+ exports.promiseDoWhile = promiseDoWhile;
12793
+
12794
+
12787
12795
/***/ }),
12788
12796
12789
12797
/***/ 8227:
0 commit comments