Update app and tooling
This commit is contained in:
parent
3046531bdd
commit
e620ec7349
4950 changed files with 2975120 additions and 10 deletions
37
node_modules/@vercel/error-utils/dist/index.d.ts
generated
vendored
Normal file
37
node_modules/@vercel/error-utils/dist/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/// <reference types="node" />
|
||||
export interface SpawnError extends NodeJS.ErrnoException {
|
||||
spawnargs: string[];
|
||||
}
|
||||
/**
|
||||
* A simple type guard for objects.
|
||||
*
|
||||
* @param obj - A possible object
|
||||
*/
|
||||
export declare const isObject: (obj: unknown) => obj is Record<string, unknown>;
|
||||
/**
|
||||
* A type guard for `try...catch` errors.
|
||||
* @deprecated use `require('node:util').types.isNativeError(error)` instead
|
||||
*/
|
||||
export declare const isError: (error: unknown) => error is Error;
|
||||
export declare const isErrnoException: (error: unknown) => error is NodeJS.ErrnoException;
|
||||
interface ErrorLike {
|
||||
message: string;
|
||||
name?: string;
|
||||
stack?: string;
|
||||
}
|
||||
/**
|
||||
* A type guard for error-like objects.
|
||||
*/
|
||||
export declare const isErrorLike: (error: unknown) => error is ErrorLike;
|
||||
/**
|
||||
* Parses errors to string, useful for getting the error message in a
|
||||
* `try...catch` statement.
|
||||
*/
|
||||
export declare const errorToString: (error: unknown, fallback?: string) => string;
|
||||
/**
|
||||
* Normalizes unknown errors to the Error type, useful for working with errors
|
||||
* in a `try...catch` statement.
|
||||
*/
|
||||
export declare const normalizeError: (error: unknown) => Error;
|
||||
export declare function isSpawnError(v: unknown): v is SpawnError;
|
||||
export {};
|
||||
75
node_modules/@vercel/error-utils/dist/index.js
generated
vendored
Normal file
75
node_modules/@vercel/error-utils/dist/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
"use strict";
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||||
// If the importer is in node compatibility mode or this is not an ESM
|
||||
// file that has been converted to a CommonJS file using a Babel-
|
||||
// compatible transform (i.e. "__esModule" has not been set), then set
|
||||
// "default" to the CommonJS "module.exports" for node compatibility.
|
||||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||||
mod
|
||||
));
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var src_exports = {};
|
||||
__export(src_exports, {
|
||||
errorToString: () => errorToString,
|
||||
isErrnoException: () => isErrnoException,
|
||||
isError: () => isError,
|
||||
isErrorLike: () => isErrorLike,
|
||||
isObject: () => isObject,
|
||||
isSpawnError: () => isSpawnError,
|
||||
normalizeError: () => normalizeError
|
||||
});
|
||||
module.exports = __toCommonJS(src_exports);
|
||||
var import_node_util = __toESM(require("node:util"));
|
||||
const isObject = (obj) => typeof obj === "object" && obj !== null;
|
||||
const isError = (error) => {
|
||||
return import_node_util.default.types.isNativeError(error);
|
||||
};
|
||||
const isErrnoException = (error) => {
|
||||
return isError(error) && "code" in error;
|
||||
};
|
||||
const isErrorLike = (error) => isObject(error) && "message" in error;
|
||||
const errorToString = (error, fallback) => {
|
||||
if (isError(error) || isErrorLike(error))
|
||||
return error.message;
|
||||
if (typeof error === "string")
|
||||
return error;
|
||||
return fallback ?? "An unknown error has ocurred.";
|
||||
};
|
||||
const normalizeError = (error) => {
|
||||
if (isError(error))
|
||||
return error;
|
||||
const errorMessage = errorToString(error);
|
||||
return isErrorLike(error) ? Object.assign(new Error(errorMessage), error) : new Error(errorMessage);
|
||||
};
|
||||
function isSpawnError(v) {
|
||||
return isErrnoException(v) && "spawnargs" in v;
|
||||
}
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
errorToString,
|
||||
isErrnoException,
|
||||
isError,
|
||||
isErrorLike,
|
||||
isObject,
|
||||
isSpawnError,
|
||||
normalizeError
|
||||
});
|
||||
//# sourceMappingURL=index.js.map
|
||||
7
node_modules/@vercel/error-utils/dist/index.js.map
generated
vendored
Normal file
7
node_modules/@vercel/error-utils/dist/index.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"version": 3,
|
||||
"sources": ["../src/index.ts"],
|
||||
"sourcesContent": ["import util from 'node:util';\n\nexport interface SpawnError extends NodeJS.ErrnoException {\n spawnargs: string[];\n}\n\n/**\n * A simple type guard for objects.\n *\n * @param obj - A possible object\n */\nexport const isObject = (obj: unknown): obj is Record<string, unknown> =>\n typeof obj === 'object' && obj !== null;\n\n/**\n * A type guard for `try...catch` errors.\n * @deprecated use `require('node:util').types.isNativeError(error)` instead\n */\nexport const isError = (error: unknown): error is Error => {\n return util.types.isNativeError(error);\n};\n\nexport const isErrnoException = (\n error: unknown\n): error is NodeJS.ErrnoException => {\n return isError(error) && 'code' in error;\n};\n\ninterface ErrorLike {\n message: string;\n name?: string;\n stack?: string;\n}\n\n/**\n * A type guard for error-like objects.\n */\nexport const isErrorLike = (error: unknown): error is ErrorLike =>\n isObject(error) && 'message' in error;\n\n/**\n * Parses errors to string, useful for getting the error message in a\n * `try...catch` statement.\n */\nexport const errorToString = (error: unknown, fallback?: string): string => {\n if (isError(error) || isErrorLike(error)) return error.message;\n\n if (typeof error === 'string') return error;\n\n return fallback ?? 'An unknown error has ocurred.';\n};\n\n/**\n * Normalizes unknown errors to the Error type, useful for working with errors\n * in a `try...catch` statement.\n */\nexport const normalizeError = (error: unknown): Error => {\n if (isError(error)) return error;\n\n const errorMessage = errorToString(error);\n\n // Copy over additional properties if the object is error-like.\n return isErrorLike(error)\n ? Object.assign(new Error(errorMessage), error)\n : new Error(errorMessage);\n};\n\nexport function isSpawnError(v: unknown): v is SpawnError {\n return isErrnoException(v) && 'spawnargs' in v;\n}\n"],
|
||||
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAiB;AAWV,MAAM,WAAW,CAAC,QACvB,OAAO,QAAQ,YAAY,QAAQ;AAM9B,MAAM,UAAU,CAAC,UAAmC;AACzD,SAAO,iBAAAA,QAAK,MAAM,cAAc,KAAK;AACvC;AAEO,MAAM,mBAAmB,CAC9B,UACmC;AACnC,SAAO,QAAQ,KAAK,KAAK,UAAU;AACrC;AAWO,MAAM,cAAc,CAAC,UAC1B,SAAS,KAAK,KAAK,aAAa;AAM3B,MAAM,gBAAgB,CAAC,OAAgB,aAA8B;AAC1E,MAAI,QAAQ,KAAK,KAAK,YAAY,KAAK;AAAG,WAAO,MAAM;AAEvD,MAAI,OAAO,UAAU;AAAU,WAAO;AAEtC,SAAO,YAAY;AACrB;AAMO,MAAM,iBAAiB,CAAC,UAA0B;AACvD,MAAI,QAAQ,KAAK;AAAG,WAAO;AAE3B,QAAM,eAAe,cAAc,KAAK;AAGxC,SAAO,YAAY,KAAK,IACpB,OAAO,OAAO,IAAI,MAAM,YAAY,GAAG,KAAK,IAC5C,IAAI,MAAM,YAAY;AAC5B;AAEO,SAAS,aAAa,GAA6B;AACxD,SAAO,iBAAiB,CAAC,KAAK,eAAe;AAC/C;",
|
||||
"names": ["util"]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue