[internals] Create @vercel-internals/types (#9608)

Moves the type file out of the cli package and into its own standalone
package. utilizes `@vercel/style-guide` too for typescript config,
eslint, and prettier.
This commit is contained in:
Ethan Arrowood
2023-03-07 08:44:25 -07:00
committed by GitHub
parent 38244c8ed6
commit af239b5fa5
111 changed files with 1447 additions and 298 deletions

View File

@@ -300,6 +300,7 @@ export interface Secret {
createdAt: number;
}
// TODO (Ethan-Arrowood) - Replace enums
export enum ProjectEnvTarget {
Production = 'production',
Preview = 'preview',

View File

@@ -0,0 +1,17 @@
{
"private": true,
"name": "@vercel-internals/types",
"types": "dist/index.d.ts",
"main": "dist/index.js",
"scripts": {
"build": "tsc -p tsconfig.json"
},
"dependencies": {
"@vercel/build-utils": "6.3.2",
"@vercel/routing-utils": "2.1.10"
},
"devDependencies": {
"@vercel/style-guide": "4.0.2",
"typescript": "4.9.4"
}
}

View File

@@ -0,0 +1,8 @@
{
"extends": "@vercel/style-guide/typescript",
"compilerOptions": {
"outDir": "dist",
"declaration": true
},
"include": ["index.ts"]
}

View File

@@ -93,6 +93,7 @@
"@types/which": "1.3.2",
"@types/write-json-file": "2.2.1",
"@types/yauzl-promise": "2.1.0",
"@vercel-internals/types": "*",
"@vercel/client": "12.4.2",
"@vercel/error-utils": "1.0.8",
"@vercel/frameworks": "1.3.2",

View File

@@ -12,7 +12,7 @@ import stamp from '../../util/output/stamp';
import strlen from '../../util/strlen';
import getCommandFlags from '../../util/get-command-flags';
import { getCommandName } from '../../util/pkg-name';
import { Alias } from '../../types';
import { Alias } from '@vercel-internals/types';
export default async function ls(
client: Client,

View File

@@ -9,7 +9,7 @@ import strlen from '../../util/strlen';
import confirm from '../../util/input/confirm';
import findAliasByAliasOrId from '../../util/alias/find-alias-by-alias-or-id';
import { Alias } from '../../types';
import { Alias } from '@vercel-internals/types';
import { isValidName } from '../../util/is-valid-name';
import { getCommandName } from '../../util/pkg-name';

View File

@@ -1,7 +1,7 @@
import chalk from 'chalk';
import { SetDifference } from 'utility-types';
import { AliasRecord } from '../../util/alias/create-alias';
import { Domain } from '../../types';
import { Domain } from '@vercel-internals/types';
import { Output } from '../../util/output';
import * as ERRORS from '../../util/errors-ts';
import assignAlias from '../../util/alias/assign-alias';

View File

@@ -13,7 +13,7 @@ import logo from '../../util/output/logo';
import getArgs from '../../util/get-args';
import Client from '../../util/client';
import { getPkgName } from '../../util/pkg-name';
import { Deployment, PaginationOptions } from '../../types';
import { Deployment, PaginationOptions } from '@vercel-internals/types';
import { normalizeURL } from '../../util/bisect/normalize-url';
import getScope from '../../util/get-scope';
import getDeployment from '../../util/get-deployment';

View File

@@ -5,7 +5,7 @@ import stamp from '../../util/output/stamp';
import createCertFromFile from '../../util/certs/create-cert-from-file';
import createCertForCns from '../../util/certs/create-cert-for-cns';
import { getCommandName } from '../../util/pkg-name';
import { Cert } from '../../types';
import { Cert } from '@vercel-internals/types';
interface Options {
'--overwrite'?: boolean;

View File

@@ -10,7 +10,7 @@ import {
import stamp from '../../util/output/stamp';
import getCerts from '../../util/certs/get-certs';
import strlen from '../../util/strlen';
import { Cert } from '../../types';
import { Cert } from '@vercel-internals/types';
import getCommandFlags from '../../util/get-command-flags';
import { getCommandName } from '../../util/pkg-name';

View File

@@ -2,7 +2,7 @@ import chalk from 'chalk';
import ms from 'ms';
import plural from 'pluralize';
import table from 'text-table';
import { Cert } from '../../types';
import { Cert } from '@vercel-internals/types';
import * as ERRORS from '../../util/errors-ts';
import { Output } from '../../util/output';
import deleteCertById from '../../util/certs/delete-cert-by-id';

View File

@@ -5,7 +5,7 @@ import DevServer from '../../util/dev/server';
import { parseListen } from '../../util/dev/parse-listen';
import Client from '../../util/client';
import { getLinkedProject } from '../../util/projects/link';
import { ProjectSettings } from '../../types';
import { ProjectSettings } from '@vercel-internals/types';
import setupAndLink from '../../util/link/setup-and-link';
import { getCommandName } from '../../util/pkg-name';
import param from '../../util/output/param';

View File

@@ -1,7 +1,7 @@
import chalk from 'chalk';
import ms from 'ms';
import { DomainNotFound } from '../../util/errors-ts';
import { DNSRecord } from '../../types';
import { DNSRecord } from '@vercel-internals/types';
import Client from '../../util/client';
import formatTable from '../../util/format-table';
import getDNSRecords, {

View File

@@ -1,7 +1,7 @@
import chalk from 'chalk';
import ms from 'ms';
import table from 'text-table';
import { DNSRecord } from '../../types';
import { DNSRecord } from '@vercel-internals/types';
import { Output } from '../../util/output';
import Client from '../../util/client';
import deleteDNSRecordById from '../../util/dns/delete-dns-record-by-id';

View File

@@ -8,7 +8,7 @@ import getScope from '../../util/get-scope';
import stamp from '../../util/output/stamp';
import formatTable from '../../util/format-table';
import { formatDateWithoutTime } from '../../util/format-date';
import { Domain } from '../../types';
import { Domain } from '@vercel-internals/types';
import getCommandFlags from '../../util/get-command-flags';
import {
PaginationOptions,

View File

@@ -1,7 +1,7 @@
import chalk from 'chalk';
import plural from 'pluralize';
import { User, Team } from '../../types';
import { User, Team } from '@vercel-internals/types';
import * as ERRORS from '../../util/errors-ts';
import Client from '../../util/client';
import getScope from '../../util/get-scope';

View File

@@ -2,7 +2,7 @@ import chalk from 'chalk';
import plural from 'pluralize';
import { DomainNotFound, DomainPermissionDenied } from '../../util/errors-ts';
import { Domain } from '../../types';
import { Domain } from '@vercel-internals/types';
import { Output } from '../../util/output';
import Client from '../../util/client';
import deleteCertById from '../../util/certs/delete-cert-by-id';

View File

@@ -1,5 +1,5 @@
import chalk from 'chalk';
import { ProjectEnvTarget, Project, ProjectEnvType } from '../../types';
import { ProjectEnvTarget, Project, ProjectEnvType } from '@vercel-internals/types';
import { Output } from '../../util/output';
import Client from '../../util/client';
import stamp from '../../util/output/stamp';

View File

@@ -1,7 +1,7 @@
import chalk from 'chalk';
import ms from 'ms';
import { Output } from '../../util/output';
import { Project, ProjectEnvVariable, ProjectEnvType } from '../../types';
import { Project, ProjectEnvVariable, ProjectEnvType } from '@vercel-internals/types';
import Client from '../../util/client';
import formatTable from '../../util/format-table';
import getEnvRecords from '../../util/env/get-env-records';

View File

@@ -2,7 +2,7 @@ import chalk from 'chalk';
import { outputFile } from 'fs-extra';
import { closeSync, openSync, readSync } from 'fs';
import { resolve } from 'path';
import { Project, ProjectEnvTarget } from '../../types';
import { Project, ProjectEnvTarget } from '@vercel-internals/types';
import Client from '../../util/client';
import { emoji, prependEmoji } from '../../util/emoji';
import confirm from '../../util/input/confirm';

View File

@@ -1,5 +1,5 @@
import chalk from 'chalk';
import { Project } from '../../types';
import { Project } from '@vercel-internals/types';
import { Output } from '../../util/output';
import confirm from '../../util/input/confirm';
import removeEnvRecord from '../../util/env/remove-env-record';

View File

@@ -1,7 +1,7 @@
import { Dictionary } from '@vercel/client';
import chalk from 'chalk';
import { join } from 'path';
import { Org, Project, ProjectLinkData } from '../../types';
import { Org, Project, ProjectLinkData } from '@vercel-internals/types';
import Client from '../../util/client';
import { parseGitConfig, pluckRemoteUrls } from '../../util/create-git-meta';
import confirm from '../../util/input/confirm';

View File

@@ -1,5 +1,5 @@
import chalk from 'chalk';
import { Org, Project } from '../../types';
import { Org, Project } from '@vercel-internals/types';
import Client from '../../util/client';
import confirm from '../../util/input/confirm';
import { getCommandName } from '../../util/pkg-name';

View File

@@ -10,7 +10,7 @@ import getScope from '../util/get-scope';
import { getPkgName, getCommandName } from '../util/pkg-name';
import Client from '../util/client';
import getDeployment from '../util/get-deployment';
import { Build, Deployment } from '../types';
import { Build, Deployment } from '@vercel-internals/types';
import title from 'title';
import { isErrnoException } from '@vercel/error-utils';
import { URL } from 'url';

View File

@@ -1,7 +1,7 @@
import chalk from 'chalk';
import ms from 'ms';
import table from 'text-table';
import { Project } from '../../types';
import { Project } from '@vercel-internals/types';
import Client from '../../util/client';
import getCommandFlags from '../../util/get-command-flags';
import { getCommandName } from '../../util/pkg-name';

View File

@@ -1,7 +1,7 @@
import chalk from 'chalk';
import { join } from 'path';
import Client from '../util/client';
import { ProjectEnvTarget } from '../types';
import type { Project, ProjectEnvTarget } from '@vercel-internals/types';
import { emoji, prependEmoji } from '../util/emoji';
import getArgs from '../util/get-args';
import logo from '../util/output/logo';
@@ -10,7 +10,6 @@ import { getPkgName } from '../util/pkg-name';
import { VERCEL_DIR, VERCEL_DIR_PROJECT } from '../util/projects/link';
import { writeProjectSettings } from '../util/projects/project-settings';
import envPull from './env/pull';
import type { Project } from '../types';
import {
isValidEnvTarget,
getEnvTargetPlaceholder,

View File

@@ -18,7 +18,7 @@ import getArgs from '../util/get-args';
import handleError from '../util/handle-error';
import type Client from '../util/client';
import { Output } from '../util/output';
import { Alias, Deployment, Project } from '../types';
import { Alias, Deployment, Project } from '@vercel-internals/types';
import { NowError } from '../util/now-error';
type DeploymentWithAliases = Deployment & {

View File

@@ -7,7 +7,7 @@ import { emoji } from '../../util/emoji';
import getUser from '../../util/get-user';
import getTeams from '../../util/teams/get-teams';
import listInput from '../../util/input/list';
import { Team, GlobalConfig } from '../../types';
import { Team, GlobalConfig } from '@vercel-internals/types';
import { writeToConfigFile } from '../../util/config/files';
const updateCurrentTeam = (config: GlobalConfig, team?: Team) => {

View File

@@ -50,7 +50,7 @@ import getUpdateCommand from './util/get-update-command';
import { metrics, shouldCollectMetrics } from './util/metrics';
import { getCommandName, getTitleName } from './util/pkg-name';
import doLoginPrompt from './util/login/prompt';
import { AuthConfig, GlobalConfig } from './types';
import { AuthConfig, GlobalConfig } from '@vercel-internals/types';
import { VercelConfig } from '@vercel/client';
import box from './util/output/box';

View File

@@ -1,4 +1,4 @@
import type { Deployment } from '../../types';
import type { Deployment } from '@vercel-internals/types';
import { Output } from '../output';
import Client from '../client';
import createAlias from './create-alias';

View File

@@ -1,4 +1,4 @@
import type { Deployment } from '../../types';
import type { Deployment } from '@vercel-internals/types';
import { Output } from '../output';
import * as ERRORS from '../errors-ts';
import Client from '../client';

View File

@@ -1,5 +1,5 @@
import { Output } from '../output';
import { Alias } from '../../types';
import { Alias } from '@vercel-internals/types';
import Client from '../client';

View File

@@ -1,4 +1,4 @@
import { Alias, PaginationOptions } from '../../types';
import { Alias, PaginationOptions } from '@vercel-internals/types';
import Client from '../client';
type Response = {

View File

@@ -2,7 +2,7 @@ import path from 'path';
import chalk from 'chalk';
import Client from '../client';
import { Output } from '../output';
import { User } from '../../types';
import { User } from '@vercel-internals/types';
import { VercelConfig } from '../dev/types';
import getDeploymentsByAppName from '../deploy/get-deployments-by-appname';
import getDeployment from '../get-deployment';

View File

@@ -1,6 +1,6 @@
import Client from '../client';
import getAliases from './get-aliases';
import { Alias } from '../../types';
import { Alias } from '@vercel-internals/types';
export default async function getDomainAliases(client: Client, domain: string) {
const { aliases } = await getAliases(client);

View File

@@ -1,4 +1,4 @@
import { Build } from '../types';
import { Build } from '@vercel-internals/types';
export const isReady = ({ readyState }: Pick<Build, 'readyState'>) =>
readyState === 'READY';

View File

@@ -1,7 +1,7 @@
import { readFileSync } from 'fs';
import { resolve } from 'path';
import Client from '../client';
import { Cert } from '../../types';
import { Cert } from '@vercel-internals/types';
import { isErrnoException } from '@vercel/error-utils';
import { isAPIError } from '../errors-ts';

View File

@@ -1,6 +1,6 @@
import chalk from 'chalk';
import { Cert } from '../../types';
import { Cert } from '@vercel-internals/types';
import * as ERRORS from '../errors-ts';
import Client from '../client';
import mapCertError from './map-cert-error';

View File

@@ -1,4 +1,4 @@
import { Cert } from '../../types';
import { Cert } from '@vercel-internals/types';
import Client from '../client';
import * as ERRORS from '../errors-ts';

View File

@@ -1,5 +1,5 @@
import { stringify } from 'querystring';
import { Cert } from '../../types';
import { Cert } from '@vercel-internals/types';
import Client from '../client';
/**

View File

@@ -1,5 +1,5 @@
import Client from '../client';
import { Cert, PaginationOptions } from '../../types';
import { Cert, PaginationOptions } from '@vercel-internals/types';
type Response = {
certs: Cert[];

View File

@@ -1,5 +1,5 @@
import { stringify } from 'querystring';
import { Cert } from '../../types';
import { Cert } from '@vercel-internals/types';
import * as ERRORS from '../errors-ts';
import Client from '../client';

View File

@@ -1,5 +1,5 @@
import retry from 'async-retry';
import { Cert } from '../../types';
import { Cert } from '@vercel-internals/types';
import Client from '../client';
import { isAPIError } from '../errors-ts';
import { isError } from '@vercel/error-utils';

View File

@@ -19,7 +19,7 @@ import type {
Stdio,
ReadableTTY,
WritableTTY,
} from '../types';
} from '@vercel-internals/types';
import { sharedPromise } from './promise';
import { APIError } from './errors-ts';
import { normalizeError } from '@vercel/error-utils';

View File

@@ -9,7 +9,7 @@ import { NowError } from '../now-error';
import error from '../output/error';
import highlight from '../output/highlight';
import { VercelConfig } from '../dev/types';
import { AuthConfig, GlobalConfig } from '../../types';
import { AuthConfig, GlobalConfig } from '@vercel-internals/types';
import { isErrnoException, isError } from '@vercel/error-utils';
const VERCEL_DIR = getGlobalPathConfig();

View File

@@ -1,4 +1,4 @@
import { AuthConfig, GlobalConfig } from '../../types';
import { AuthConfig, GlobalConfig } from '@vercel-internals/types';
export const defaultGlobalConfig: GlobalConfig = {
'// Note':

View File

@@ -3,7 +3,7 @@ import { join } from 'path';
import ini from 'ini';
import git from 'git-last-commit';
import { exec } from 'child_process';
import { GitMetadata, Project } from '../types';
import { GitMetadata, Project } from '@vercel-internals/types';
import { Output } from './output';
import { errorToString, normalizeError } from '@vercel/error-utils';

View File

@@ -3,7 +3,7 @@ import * as ERRORS_TS from '../errors-ts';
import * as ERRORS from '../errors';
import { NowError } from '../now-error';
import mapCertError from '../certs/map-cert-error';
import { Org } from '../../types';
import { Org } from '@vercel-internals/types';
import Now, { CreateOptions } from '..';
import Client from '../client';
import { ArchiveFormat, DeploymentError } from '@vercel/client';

View File

@@ -1,5 +1,5 @@
import { URLSearchParams } from 'url';
import { Deployment } from '../../types';
import { Deployment } from '@vercel-internals/types';
import Client from '../client';
type LegacyDeployment = {

View File

@@ -9,7 +9,7 @@ import {
import { Output } from '../output';
import { progress } from '../output/progress';
import Now from '../../util';
import { Org } from '../../types';
import { Org } from '@vercel-internals/types';
import ua from '../ua';
import { linkFolderToProject } from '../projects/link';
import { prependEmoji, emoji } from '../emoji';

View File

@@ -85,7 +85,7 @@ import {
HttpHeadersConfig,
EnvConfigs,
} from './types';
import { ProjectSettings } from '../../types';
import { ProjectSettings } from '@vercel-internals/types';
import { treeKill } from '../tree-kill';
import { applyOverriddenHeaders, nodeHeadersToFetchHeaders } from './headers';
import { formatQueryString, parseQueryString } from './parse-query-string';

View File

@@ -16,7 +16,7 @@ import {
import { VercelConfig } from '@vercel/client';
import { HandleValue, Route } from '@vercel/routing-utils';
import { Output } from '../output';
import { ProjectSettings } from '../../types';
import { ProjectSettings } from '@vercel-internals/types';
import { BuilderWithPkg } from '../build/import-builders';
export { VercelConfig };

View File

@@ -7,7 +7,7 @@ import {
DNSConflictingRecord,
isAPIError,
} from '../errors-ts';
import { DNSRecordData } from '../../types';
import { DNSRecordData } from '@vercel-internals/types';
type Response = {
uid: string;

View File

@@ -1,5 +1,5 @@
import chalk from 'chalk';
import { DNSRecordData } from '../../types';
import { DNSRecordData } from '@vercel-internals/types';
import textInput from '../input/text';
import promptBool from '../input/prompt-bool';
import Client from '../client';

View File

@@ -1,4 +1,4 @@
import { DNSRecord } from '../../types';
import { DNSRecord } from '@vercel-internals/types';
import Client from '../client';
export default async function getDNSRecordById(

View File

@@ -1,4 +1,4 @@
import { DNSRecord } from '../../types';
import { DNSRecord } from '@vercel-internals/types';
import { DomainNotFound } from '../errors-ts';
import { Output } from '../output';
import Client from '../client';

View File

@@ -1,4 +1,4 @@
import { DNSRecord, PaginationOptions } from '../../types';
import { DNSRecord, PaginationOptions } from '@vercel-internals/types';
import { DomainNotFound, isAPIError } from '../errors-ts';
import { Output } from '../output';
import Client from '../client';

View File

@@ -1,4 +1,4 @@
import { DNSRecordData } from '../../types';
import { DNSRecordData } from '@vercel-internals/types';
export default function parseAddArgs(
args: string[]

View File

@@ -1,7 +1,7 @@
import chalk from 'chalk';
import retry from 'async-retry';
import { DomainAlreadyExists, InvalidDomain, isAPIError } from '../errors-ts';
import { Domain } from '../../types';
import { Domain } from '@vercel-internals/types';
import Client from '../client';
type Response = {

View File

@@ -1,6 +1,6 @@
import chalk from 'chalk';
import Client from '../client';
import { Domain } from '../../types';
import { Domain } from '@vercel-internals/types';
import {
DomainPermissionDenied,
DomainNotFound,

View File

@@ -1,5 +1,5 @@
import Client from '../client';
import { DomainConfig } from '../../types';
import { DomainConfig } from '@vercel-internals/types';
import { isAPIError } from '../errors-ts';
export async function getDomainConfig(client: Client, domainName: string) {

View File

@@ -1,4 +1,4 @@
import { Domain } from '../../types';
import { Domain } from '@vercel-internals/types';
export type DomainRegistrar = 'Vercel' | 'Purchase in Process' | 'Third Party';

View File

@@ -1,6 +1,6 @@
import chalk from 'chalk';
import Client from '../client';
import { Domain } from '../../types';
import { Domain } from '@vercel-internals/types';
import { isAPIError } from '../errors-ts';
type Response = {

View File

@@ -1,4 +1,4 @@
import { Domain, PaginationOptions } from '../../types';
import { Domain, PaginationOptions } from '@vercel-internals/types';
import Client from '../client';
type Response = {

View File

@@ -1,4 +1,4 @@
import { Domain } from '../../types';
import { Domain } from '@vercel-internals/types';
export default function isDomainExternal(domain: Domain) {
return domain.serviceType !== 'zeit.world';

View File

@@ -1,6 +1,6 @@
import psl from 'psl';
import { NowError } from '../now-error';
import { Domain } from '../../types';
import { Domain } from '@vercel-internals/types';
import { Output } from '../output';
import * as ERRORS from '../errors-ts';
import addDomain from './add-domain';

View File

@@ -1,6 +1,6 @@
import * as ERRORS from '../errors-ts';
import Client from '../client';
import { Domain } from '../../types';
import { Domain } from '@vercel-internals/types';
type Response = {
domain: Domain;

View File

@@ -4,7 +4,7 @@ import {
ProjectEnvTarget,
ProjectEnvVariable,
ProjectEnvType,
} from '../../types';
} from '@vercel-internals/types';
export default async function addEnvRecord(
output: Output,

View File

@@ -1,4 +1,4 @@
import { ProjectEnvTarget } from '../../types';
import { ProjectEnvTarget } from '@vercel-internals/types';
function envTargets(): string[] {
return Object.values(ProjectEnvTarget);

View File

@@ -1,5 +1,5 @@
import title from 'title';
import { ProjectEnvVariable } from '../../types';
import { ProjectEnvVariable } from '@vercel-internals/types';
export default function formatEnvTarget(env: ProjectEnvVariable): string {
const target = (Array.isArray(env.target) ? env.target : [env.target || ''])

View File

@@ -1,6 +1,6 @@
import { Output } from '../output';
import Client from '../client';
import { ProjectEnvVariable, ProjectEnvTarget } from '../../types';
import { ProjectEnvVariable, ProjectEnvTarget } from '@vercel-internals/types';
import { URLSearchParams } from 'url';
/** The CLI command that was used that needs the environment variables. */

View File

@@ -1,6 +1,6 @@
import { Output } from '../output';
import Client from '../client';
import { ProjectEnvVariable } from '../../types';
import { ProjectEnvVariable } from '@vercel-internals/types';
export default async function removeEnvRecord(
output: Output,

View File

@@ -5,7 +5,7 @@ import {
InvalidDeploymentId,
isAPIError,
} from './errors-ts';
import type { Deployment } from '../types';
import type { Deployment } from '@vercel-internals/types';
import mapCertError from './certs/map-cert-error';
import toHost from './to-host';

View File

@@ -2,7 +2,7 @@ import Client from './client';
import getUser from './get-user';
import getTeamById from './teams/get-team-by-id';
import { TeamDeleted } from './errors-ts';
import { Team } from '../types';
import { Team } from '@vercel-internals/types';
interface GetScopeOptions {
getTeam?: boolean;

View File

@@ -1,5 +1,5 @@
import Client from './client';
import { User } from '../types';
import { User } from '@vercel-internals/types';
import { APIError, InvalidToken, MissingUser } from './errors-ts';
export default async function getUser(client: Client) {

View File

@@ -1,5 +1,5 @@
import Client from '../client';
import { Org } from '../../types';
import { Org } from '@vercel-internals/types';
import chalk from 'chalk';
import link from '../output/link';
import { isAPIError } from '../errors-ts';

View File

@@ -14,7 +14,7 @@ import { responseError } from './error';
import stamp from './output/stamp';
import { APIError, BuildError } from './errors-ts';
import printIndications from './print-indications';
import { GitMetadata, Org } from '../types';
import { GitMetadata, Org } from '@vercel-internals/types';
import { VercelConfig } from './dev/types';
import Client, { FetchOptions, isJSONObject } from './client';
import { ArchiveFormat, Dictionary } from '@vercel/client';

View File

@@ -4,7 +4,7 @@ import chalk from 'chalk';
import frameworkList, { Framework } from '@vercel/frameworks';
import Client from '../client';
import { isSettingValue } from '../is-setting-value';
import { ProjectSettings } from '../../types';
import { ProjectSettings } from '@vercel-internals/types';
const settingMap = {
buildCommand: 'Build Command',

View File

@@ -3,7 +3,7 @@ import confirm from './confirm';
import getProjectByIdOrName from '../projects/get-project-by-id-or-name';
import chalk from 'chalk';
import { ProjectNotFound } from '../../util/errors-ts';
import { Project, Org } from '../../types';
import { Project, Org } from '@vercel-internals/types';
import slugify from '@sindresorhus/slugify';
export default async function inputProject(

View File

@@ -1,5 +1,5 @@
import chalk from 'chalk';
import type { ReadableTTY, WritableTTY } from '../../types';
import type { ReadableTTY, WritableTTY } from '@vercel-internals/types';
type Options = {
abortSequences?: Set<string>;

View File

@@ -1,4 +1,4 @@
import type { ReadableTTY } from '../../types';
import type { ReadableTTY } from '@vercel-internals/types';
export default async function readStandardInput(
stdin: ReadableTTY

View File

@@ -1,7 +1,7 @@
import Client from '../client';
import getUser from '../get-user';
import getTeams from '../teams/get-teams';
import { User, Team, Org } from '../../types';
import { User, Team, Org } from '@vercel-internals/types';
type Choice = { name: string; value: Org };

View File

@@ -1,4 +1,4 @@
import { Org, Project } from '../../types';
import { Org, Project } from '@vercel-internals/types';
import Client from '../client';
import setupAndLink from '../link/setup-and-link';
import param from '../output/param';

View File

@@ -1,7 +1,7 @@
import { join, basename } from 'path';
import chalk from 'chalk';
import { remove } from 'fs-extra';
import { ProjectLinkResult, ProjectSettings } from '../../types';
import { ProjectLinkResult, ProjectSettings } from '@vercel-internals/types';
import {
getLinkedProject,
linkFolderToProject,

View File

@@ -1,7 +1,7 @@
import chalk from 'chalk';
import bytes from 'bytes';
import { isReady, isFailed } from '../build-state';
import { Build, BuildOutput } from '../../types';
import { Build, BuildOutput } from '@vercel-internals/types';
export interface Times {
[id: string]: string | null;

View File

@@ -3,7 +3,7 @@ import * as ansiEscapes from 'ansi-escapes';
import { supportsHyperlink as detectSupportsHyperlink } from 'supports-hyperlinks';
import renderLink from './link';
import wait, { StopSpinner } from './wait';
import type { WritableTTY } from '../../types';
import type { WritableTTY } from '@vercel-internals/types';
import { errorToString } from '@vercel/error-utils';
import { removeEmoji } from '../emoji';

View File

@@ -1,6 +1,6 @@
import chalk from 'chalk';
import Client from '../client';
import { ProjectAliasTarget } from '../../types';
import { ProjectAliasTarget } from '@vercel-internals/types';
import { isAPIError } from '../errors-ts';
export async function addDomainToProject(

View File

@@ -1,5 +1,5 @@
import Client from '../client';
import { Project } from '../../types';
import { Project } from '@vercel-internals/types';
export default async function createProject(
client: Client,

View File

@@ -1,5 +1,5 @@
import Client from '../client';
import { Project } from '../../types';
import { Project } from '@vercel-internals/types';
import { URLSearchParams } from 'url';
import { isAPIError } from '../errors-ts';

View File

@@ -1,5 +1,5 @@
import Client from '../client';
import { Project } from '../../types';
import { Project } from '@vercel-internals/types';
import { isAPIError, ProjectNotFound } from '../errors-ts';
export default async function getProjectByNameOrId(

View File

@@ -12,8 +12,12 @@ import { InvalidToken, isAPIError, ProjectNotFound } from '../errors-ts';
import getUser from '../get-user';
import getTeamById from '../teams/get-team-by-id';
import { Output } from '../output';
import { Project, ProjectLinkResult } from '../../types';
import { Org, ProjectLink } from '../../types';
import {
Project,
ProjectLinkResult,
Org,
ProjectLink,
} from '@vercel-internals/types';
import { prependEmoji, emoji, EmojiLabel } from '../emoji';
import { isDirectory } from '../config/global-path';
import { NowBuildError, getPlatformEnv } from '@vercel/build-utils';

View File

@@ -1,5 +1,5 @@
import { outputJSON } from 'fs-extra';
import { Org, Project, ProjectLink } from '../../types';
import { Org, Project, ProjectLink } from '@vercel-internals/types';
import { getLinkFromDir, VERCEL_DIR, VERCEL_DIR_PROJECT } from './link';
import { join } from 'path';
import { VercelConfig } from '@vercel/client';

View File

@@ -1,6 +1,6 @@
import chalk from 'chalk';
import Client from '../client';
import { ProjectAliasTarget } from '../../types';
import { ProjectAliasTarget } from '@vercel-internals/types';
import { isAPIError } from '../errors-ts';
export async function removeDomainFromProject(

View File

@@ -1,5 +1,5 @@
import Client from '../client';
import type { JSONObject, ProjectSettings } from '../../types';
import type { JSONObject, ProjectSettings } from '@vercel-internals/types';
interface ProjectSettingsResponse extends ProjectSettings {
id: string;

View File

@@ -2,7 +2,7 @@ import Client from './client';
import getScope from './get-scope';
import getArgs from './get-args';
import { isError } from '@vercel/error-utils';
import type { Team, User } from '../types';
import type { Team, User } from '@vercel-internals/types';
export default async function reportError(
sentry: typeof import('@sentry/node'),

View File

@@ -1,6 +1,6 @@
import chalk from 'chalk';
import type Client from '../client';
import type { Deployment, Project, Team } from '../../types';
import type { Deployment, Project, Team } from '@vercel-internals/types';
import { getCommandName } from '../pkg-name';
import getDeployment from '../get-deployment';
import getScope from '../get-scope';

View File

@@ -5,7 +5,7 @@ import type {
PaginationOptions,
Project,
RollbackTarget,
} from '../../types';
} from '@vercel-internals/types';
import elapsed from '../output/elapsed';
import formatDate from '../format-date';
import getDeployment from '../get-deployment';

View File

@@ -1,4 +1,4 @@
import { Team } from '../../types';
import { Team } from '@vercel-internals/types';
import Client from '../client';
export default async function createTeam(

View File

@@ -1,5 +1,5 @@
import Client from '../client';
import { Team } from '../../types';
import { Team } from '@vercel-internals/types';
const teamCache = new Map<string, Team>();

View File

@@ -1,6 +1,6 @@
import { URLSearchParams } from 'url';
import Client from '../client';
import { Team } from '../../types';
import { Team } from '@vercel-internals/types';
import { APIError, InvalidToken } from '../errors-ts';
export interface GetTeamsV1Options {

Some files were not shown because too many files have changed in this diff Show More