提交 eb5e962d 编写于 作者: G Guy Bedford 提交者: Joe Haddad

async-retry

上级 b215348c
import path from 'path'
import fs from 'fs'
import { promisify } from 'util'
import { Sema } from 'async-sema'
import { Sema } from 'next/dist/compiled/async-sema'
const mkdir = promisify(fs.mkdir)
const stat = promisify(fs.stat)
......
......@@ -61,8 +61,6 @@
"@babel/runtime": "7.7.2",
"@next/polyfill-nomodule": "9.3.4-canary.0",
"amphtml-validator": "1.0.30",
"async-retry": "1.2.3",
"async-sema": "3.0.0",
"autodll-webpack-plugin": "0.4.2",
"browserslist": "4.8.3",
"cache-loader": "4.1.0",
......@@ -186,6 +184,8 @@
"@zeit/ncc": "0.22.0",
"arg": "4.1.0",
"ast-types": "0.13.2",
"async-retry": "1.2.3",
"async-sema": "3.0.0",
"babel-loader": "8.0.6",
"babel-plugin-dynamic-import-node": "2.3.0",
"babel-plugin-syntax-jsx": "6.18.0",
......
......@@ -9,6 +9,20 @@ export async function ncc_arg(task, opts) {
.target('dist/compiled/arg')
}
// eslint-disable-next-line camelcase
export async function ncc_async_retry(task, opts) {
await task
.source(opts.src || relative(__dirname, require.resolve('async-retry')))
.ncc({ packageName: 'async-retry' })
.target('dist/compiled/async-retry')
}
// eslint-disable-next-line camelcase
export async function ncc_async_sema(task, opts) {
await task
.source(opts.src || relative(__dirname, require.resolve('async-sema')))
.ncc({ packageName: 'async-sema' })
.target('dist/compiled/async-sema')
}
// eslint-disable-next-line camelcase
export async function ncc_babel__core(task, opts) {
await task
.source(opts.src || relative(__dirname, require.resolve('@babel/core')))
......@@ -271,6 +285,8 @@ export async function ncc_unistore(task, opts) {
export async function precompile(task) {
await task.parallel([
'ncc_arg',
'ncc_async_retry',
'ncc_async_sema',
'ncc_babel__core',
'ncc_babel__plugin_proposal_class_properties',
'ncc_babel__plugin_proposal_nullish_coalescing_operator',
......
import retry from 'async-retry'
import retry from 'next/dist/compiled/async-retry'
import fetch from 'node-fetch'
export function _postPayload(endpoint: string, body: object) {
......
......@@ -4,7 +4,6 @@ declare module 'webpack/lib/DynamicEntryPlugin'
declare module 'unfetch'
declare module 'launch-editor'
declare module 'styled-jsx/server'
declare module 'async-retry'
declare module 'browserslist'
declare module 'cssnano-simple' {
......@@ -13,6 +12,11 @@ declare module 'cssnano-simple' {
export = cssnanoSimple
}
declare module 'next/dist/compiled/async-retry'
declare module 'next/dist/compiled/async-sema' {
import m from 'async-sema'
export = m
}
declare module 'next/dist/compiled/arg/index.js' {
function arg<T extends arg.Spec>(
spec: T,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册