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

chalk, ci-info

上级 90a0cef8
import chalk from 'chalk' import chalk from 'next/dist/compiled/chalk'
import { join } from 'path' import { join } from 'path'
import { stringify } from 'querystring' import { stringify } from 'querystring'
import { API_ROUTE, DOT_NEXT_ALIAS, PAGES_DIR_ALIAS } from '../lib/constants' import { API_ROUTE, DOT_NEXT_ALIAS, PAGES_DIR_ALIAS } from '../lib/constants'
......
import chalk from 'chalk' import chalk from 'next/dist/compiled/chalk'
import ciEnvironment from 'ci-info' import ciEnvironment from 'next/dist/compiled/ci-info'
import crypto from 'crypto' import crypto from 'crypto'
import devalue from 'devalue' import devalue from 'devalue'
import escapeStringRegexp from 'escape-string-regexp' import escapeStringRegexp from 'escape-string-regexp'
......
import chalk from 'chalk' import chalk from 'next/dist/compiled/chalk'
import textTable from 'next/dist/compiled/text-table' import textTable from 'next/dist/compiled/text-table'
import createStore from 'next/dist/compiled/unistore' import createStore from 'next/dist/compiled/unistore'
import stripAnsi from 'strip-ansi' import stripAnsi from 'strip-ansi'
......
import chalk from 'chalk' import chalk from 'next/dist/compiled/chalk'
const prefixes = { const prefixes = {
wait: chalk`[ {cyan wait} ] `, wait: chalk`[ {cyan wait} ] `,
......
import chalk from 'chalk' import chalk from 'next/dist/compiled/chalk'
import gzipSize from 'gzip-size' import gzipSize from 'gzip-size'
import textTable from 'next/dist/compiled/text-table' import textTable from 'next/dist/compiled/text-table'
import path from 'path' import path from 'path'
......
import chalk from 'chalk' import chalk from 'next/dist/compiled/chalk'
import crypto from 'crypto' import crypto from 'crypto'
import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin' import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin'
import path from 'path' import path from 'path'
......
import chalk from 'chalk' import chalk from 'next/dist/compiled/chalk'
export function getGlobalImportError(file: string | null) { export function getGlobalImportError(file: string | null) {
return `Global CSS ${chalk.bold( return `Global CSS ${chalk.bold(
......
import chalk from 'chalk' import chalk from 'next/dist/compiled/chalk'
import { findConfig } from '../../../../../lib/find-config' import { findConfig } from '../../../../../lib/find-config'
import { resolveRequest } from '../../../../../lib/resolve-request' import { resolveRequest } from '../../../../../lib/resolve-request'
import browserslist from 'next/dist/compiled/browserslist' import browserslist from 'next/dist/compiled/browserslist'
......
import chalk from 'chalk' import chalk from 'next/dist/compiled/chalk'
import loaderUtils from 'loader-utils' import loaderUtils from 'loader-utils'
import path from 'path' import path from 'path'
import { loader } from 'webpack' import { loader } from 'webpack'
......
import chalk from 'chalk' import chalk from 'next/dist/compiled/chalk'
const { red, yellow } = chalk const { red, yellow } = chalk
......
#!/usr/bin/env node #!/usr/bin/env node
import chalk from 'chalk' import chalk from 'next/dist/compiled/chalk'
import arg from 'next/dist/compiled/arg/index.js' import arg from 'next/dist/compiled/arg/index.js'
import { cliCommand } from '../bin/next' import { cliCommand } from '../bin/next'
......
import chalk from 'chalk' import chalk from 'next/dist/compiled/chalk'
import findUp from 'find-up' import findUp from 'find-up'
import { import {
copyFile as copyFileOrig, copyFile as copyFileOrig,
......
import fs from 'fs' import fs from 'fs'
import path from 'path' import path from 'path'
import chalk from 'chalk' import chalk from 'next/dist/compiled/chalk'
import dotenvExpand from 'next/dist/compiled/dotenv-expand' import dotenvExpand from 'next/dist/compiled/dotenv-expand'
import dotenv, { DotenvConfigOutput } from 'next/dist/compiled/dotenv' import dotenv, { DotenvConfigOutput } from 'next/dist/compiled/dotenv'
import findUp from 'find-up' import findUp from 'find-up'
......
import chalk from 'chalk' import chalk from 'next/dist/compiled/chalk'
import fs from 'fs' import fs from 'fs'
import os from 'os' import os from 'os'
import path from 'path' import path from 'path'
......
import chalk from 'chalk' import chalk from 'next/dist/compiled/chalk'
import findUp from 'find-up' import findUp from 'find-up'
import os from 'os' import os from 'os'
import { basename, extname } from 'path' import { basename, extname } from 'path'
......
...@@ -62,8 +62,6 @@ ...@@ -62,8 +62,6 @@
"@next/polyfill-nomodule": "9.3.4-canary.0", "@next/polyfill-nomodule": "9.3.4-canary.0",
"autodll-webpack-plugin": "0.4.2", "autodll-webpack-plugin": "0.4.2",
"cache-loader": "4.1.0", "cache-loader": "4.1.0",
"chalk": "2.4.2",
"ci-info": "2.0.0",
"compression": "1.7.4", "compression": "1.7.4",
"conf": "5.0.0", "conf": "5.0.0",
"content-type": "1.0.4", "content-type": "1.0.4",
...@@ -191,6 +189,8 @@ ...@@ -191,6 +189,8 @@
"babel-plugin-transform-define": "2.0.0", "babel-plugin-transform-define": "2.0.0",
"babel-plugin-transform-react-remove-prop-types": "0.4.24", "babel-plugin-transform-react-remove-prop-types": "0.4.24",
"browserslist": "4.8.3", "browserslist": "4.8.3",
"chalk": "2.4.2",
"ci-info": "2.0.0",
"dotenv": "8.2.0", "dotenv": "8.2.0",
"dotenv-expand": "5.1.0", "dotenv-expand": "5.1.0",
"nanoid": "2.0.3", "nanoid": "2.0.3",
......
import { join } from 'path' import { join } from 'path'
import chalk from 'chalk' import chalk from 'next/dist/compiled/chalk'
import { isWriteable } from '../../build/is-writeable' import { isWriteable } from '../../build/is-writeable'
import { warn } from '../../build/output/log' import { warn } from '../../build/output/log'
......
...@@ -256,6 +256,20 @@ export async function ncc_browserslist(task, opts) { ...@@ -256,6 +256,20 @@ export async function ncc_browserslist(task, opts) {
.target('dist/compiled/browserslist') .target('dist/compiled/browserslist')
} }
// eslint-disable-next-line camelcase // eslint-disable-next-line camelcase
export async function ncc_chalk(task, opts) {
await task
.source(opts.src || relative(__dirname, require.resolve('chalk')))
.ncc({ packageName: 'chalk' })
.target('dist/compiled/chalk')
}
// eslint-disable-next-line camelcase
export async function ncc_ci_info(task, opts) {
await task
.source(opts.src || relative(__dirname, require.resolve('ci-info')))
.ncc({ packageName: 'ci-info' })
.target('dist/compiled/ci-info')
}
// eslint-disable-next-line camelcase
export async function ncc_dotenv(task, opts) { export async function ncc_dotenv(task, opts) {
await task await task
.source(opts.src || relative(__dirname, require.resolve('dotenv'))) .source(opts.src || relative(__dirname, require.resolve('dotenv')))
...@@ -325,6 +339,8 @@ export async function precompile(task) { ...@@ -325,6 +339,8 @@ export async function precompile(task) {
'ncc_babel_plugin_transform_define', 'ncc_babel_plugin_transform_define',
'ncc_babel_plugin_transform_react_remove_prop_types', 'ncc_babel_plugin_transform_react_remove_prop_types',
'ncc_browserslist', 'ncc_browserslist',
'ncc_chalk',
'ncc_ci_info',
'ncc_dotenv', 'ncc_dotenv',
'ncc_dotenv_expand', 'ncc_dotenv_expand',
'ncc_nanoid', 'ncc_nanoid',
......
import ciEnvironment from 'ci-info' import ciEnvironment from 'next/dist/compiled/ci-info'
const { isCI: _isCI, name: _name } = ciEnvironment const { isCI: _isCI, name: _name } = ciEnvironment
......
import chalk from 'chalk' import chalk from 'next/dist/compiled/chalk'
import Conf from 'conf' import Conf from 'conf'
import { BinaryLike, createHash, randomBytes } from 'crypto' import { BinaryLike, createHash, randomBytes } from 'crypto'
import isDockerFunction from 'is-docker' import isDockerFunction from 'is-docker'
......
...@@ -55,6 +55,14 @@ declare module 'next/dist/compiled/babel--types' { ...@@ -55,6 +55,14 @@ declare module 'next/dist/compiled/babel--types' {
export = m export = m
} }
declare module 'next/dist/compiled/browserslist' declare module 'next/dist/compiled/browserslist'
declare module 'next/dist/compiled/chalk' {
import m from 'chalk'
export = m
}
declare module 'next/dist/compiled/ci-info' {
import m from 'ci-info'
export = m
}
declare module 'next/dist/compiled/dotenv' { declare module 'next/dist/compiled/dotenv' {
import m from 'dotenv' import m from 'dotenv'
export = m export = m
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册