refactor: split api into api, api-cli & api-plugin

This commit is contained in:
2023-06-02 16:41:25 +02:00
parent 495a63977c
commit b21833de40
205 changed files with 1981 additions and 1492 deletions

View File

@@ -29,7 +29,6 @@ export type RecursivePartial<T> = {
/**
* Deletes all properties that are undefined from an object
*
* @param object Object to delete undefined properties from
*/
export function deleteUndefinedProperties(object: unknown): unknown {
@@ -47,7 +46,7 @@ export function deleteUndefinedProperties(object: unknown): unknown {
const indexedObject = object as {[k: string]: unknown};
if (typeof indexedObject[key] === 'undefined') {
if (indexedObject[key] === undefined) {
// delete undefined keys
delete indexedObject[key];
} else {
@@ -72,7 +71,7 @@ export function isNodeEnvironment(): boolean {
export function isProductiveEnvironment(): boolean {
return (
typeof process.env === 'object' &&
typeof process.env.NODE_ENV !== 'undefined' &&
process.env.NODE_ENV !== undefined &&
process.env.NODE_ENV === 'production'
);
}
@@ -86,7 +85,6 @@ export function isProductiveNodeEnvironment(): boolean {
/**
* Check if a transport is a verifiable transport
*
* @param transport Transport to check
*/
export function isTransportWithVerification(transport: Transport): transport is VerifiableTransport {