[all] Remove now prefix in packages (#5928)

* remove prefix from codeowners

* remove references from ignore files

* Remove prefix from package json and tests

* Add run js without prefixes

* Rename package folders

* Delete auto generated test files

* Remove now-node in integration test

* Put back deleted vercel json files

* Remove eol

* Add styfle suggestion to comment in utils/run.js

Co-authored-by: Steven <steven@ceriously.com>
This commit is contained in:
ernestd
2021-03-06 01:55:30 +01:00
committed by GitHub
parent 85b253cdd0
commit cfae7ec3c2
1890 changed files with 82 additions and 97 deletions

View File

@@ -0,0 +1,23 @@
import Client from '../client';
import { Project } from '../../types';
import { ProjectNotFound } from '../errors-ts';
export default async function getProjectByNameOrId(
client: Client,
projectNameOrId: string,
accountId?: string
) {
try {
const project = await client.fetch<Project>(
`/projects/${encodeURIComponent(projectNameOrId)}`,
{ accountId }
);
return project;
} catch (error) {
if (error.status === 404) {
return new ProjectNotFound(projectNameOrId);
}
throw error;
}
}