remove await-sleep, less reliant on external pkgs (#24033)
This commit is contained in:
13
package-lock.json
generated
13
package-lock.json
generated
@@ -118,7 +118,6 @@
|
|||||||
"@typescript-eslint/eslint-plugin": "^4.33.0",
|
"@typescript-eslint/eslint-plugin": "^4.33.0",
|
||||||
"@typescript-eslint/parser": "^4.31.1",
|
"@typescript-eslint/parser": "^4.31.1",
|
||||||
"async": "^3.2.2",
|
"async": "^3.2.2",
|
||||||
"await-sleep": "0.0.1",
|
|
||||||
"babel-loader": "^8.2.3",
|
"babel-loader": "^8.2.3",
|
||||||
"babel-plugin-styled-components": "^2.0.2",
|
"babel-plugin-styled-components": "^2.0.2",
|
||||||
"babel-preset-env": "^1.7.0",
|
"babel-preset-env": "^1.7.0",
|
||||||
@@ -5031,12 +5030,6 @@
|
|||||||
"url": "https://github.com/sponsors/ljharb"
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/await-sleep": {
|
|
||||||
"version": "0.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/await-sleep/-/await-sleep-0.0.1.tgz",
|
|
||||||
"integrity": "sha512-H3X3eAxwGpeNIk/yvFOs8g7500Q1YvzrxjSC9TNgLGtjrMFxPwhDdcT34QNs2iGWpZ+5WKkMJdjDoYs+Sw+TaA==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"node_modules/aws-sign2": {
|
"node_modules/aws-sign2": {
|
||||||
"version": "0.7.0",
|
"version": "0.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
|
||||||
@@ -27050,12 +27043,6 @@
|
|||||||
"resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz",
|
||||||
"integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw=="
|
"integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw=="
|
||||||
},
|
},
|
||||||
"await-sleep": {
|
|
||||||
"version": "0.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/await-sleep/-/await-sleep-0.0.1.tgz",
|
|
||||||
"integrity": "sha512-H3X3eAxwGpeNIk/yvFOs8g7500Q1YvzrxjSC9TNgLGtjrMFxPwhDdcT34QNs2iGWpZ+5WKkMJdjDoYs+Sw+TaA==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"aws-sign2": {
|
"aws-sign2": {
|
||||||
"version": "0.7.0",
|
"version": "0.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
|
||||||
|
|||||||
@@ -120,7 +120,6 @@
|
|||||||
"@typescript-eslint/eslint-plugin": "^4.33.0",
|
"@typescript-eslint/eslint-plugin": "^4.33.0",
|
||||||
"@typescript-eslint/parser": "^4.31.1",
|
"@typescript-eslint/parser": "^4.31.1",
|
||||||
"async": "^3.2.2",
|
"async": "^3.2.2",
|
||||||
"await-sleep": "0.0.1",
|
|
||||||
"babel-loader": "^8.2.3",
|
"babel-loader": "^8.2.3",
|
||||||
"babel-plugin-styled-components": "^2.0.2",
|
"babel-plugin-styled-components": "^2.0.2",
|
||||||
"babel-preset-env": "^1.7.0",
|
"babel-preset-env": "^1.7.0",
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
import sleep from 'await-sleep'
|
|
||||||
import got from 'got'
|
import got from 'got'
|
||||||
import Heroku from 'heroku-client'
|
import Heroku from 'heroku-client'
|
||||||
import { setOutput } from '@actions/core'
|
import { setOutput } from '@actions/core'
|
||||||
|
|
||||||
|
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms))
|
||||||
|
|
||||||
const SLEEP_INTERVAL = 5000
|
const SLEEP_INTERVAL = 5000
|
||||||
const HEROKU_LOG_LINES_TO_SHOW = 25
|
const HEROKU_LOG_LINES_TO_SHOW = 25
|
||||||
const DELAY_FOR_PREBOOT_SWAP = 135000 // 2:15
|
const DELAY_FOR_PREBOOT_SWAP = 135000 // 2:15
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import sleep from 'await-sleep'
|
|
||||||
import got from 'got'
|
import got from 'got'
|
||||||
|
|
||||||
|
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms))
|
||||||
|
|
||||||
const ONE_SECOND = 1000
|
const ONE_SECOND = 1000
|
||||||
|
|
||||||
async function purgeFastlyBySurrogateKey({ apiToken, serviceId, surrogateKey }) {
|
async function purgeFastlyBySurrogateKey({ apiToken, serviceId, surrogateKey }) {
|
||||||
|
|||||||
Reference in New Issue
Block a user