1
0
mirror of synced 2025-12-22 11:26:57 -05:00

remove await-sleep, less reliant on external pkgs (#24033)

This commit is contained in:
Mike Surowiec
2022-01-04 15:06:04 -06:00
committed by GitHub
parent a9da0c8681
commit cfbc6f694f
4 changed files with 4 additions and 16 deletions

13
package-lock.json generated
View File

@@ -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",

View File

@@ -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",

View File

@@ -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

View File

@@ -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 }) {