@vnodes/errors 0.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,35 @@
1
+ ![Npm version](https://img.shields.io/npm/v/@vnodes/errors)
2
+ ![Npm downloads](https://img.shields.io/npm/dm/@vnodes/errors)
3
+ ![Build Status](https://img.shields.io/github/actions/workflow/status/vnodes/vnodes/ci.yml)
4
+ ![Doc Status](https://img.shields.io/github/actions/workflow/status/vnodes/vnodes/doc.yml)
5
+ ![Bundle size](https://img.shields.io/bundlephobia/min/@vnodes/errors)
6
+
7
+ <p align="center">
8
+ <img srcset="./assets/favicon.png, https://vnodes.github.io/vnodes/libs/errors/assets/favicon.png" alt="Logo" width="200" height="200" style="border-radius: 100%"/>
9
+ </p>
10
+
11
+ ## @vnodes/errors
12
+
13
+ @vnodes/errors
14
+
15
+ ## Installation
16
+
17
+ ```bash
18
+ pnpm add @vnodes/errors
19
+ ```
20
+
21
+ ## 💖 Support My Work
22
+
23
+ If you find my open-source contributions or the **@vnodes/errors** project helpful, consider supporting my work. Your sponsorship helps me maintain these projects and explore new enterprise patterns.
24
+
25
+ [![CashApp](https://img.shields.io/badge/Sponsor%20me-%23EA4AAA.svg?style=for-the-badge&logo=github-sponsors&logoColor=white)](https://cash.app/$puqlib)
26
+
27
+ ---
28
+
29
+ ## 🤝 Connect with Me
30
+
31
+ <p align="left">
32
+ <a href="mailto:robert.brightline+vnodes-errors@gmail.com">
33
+ <img src="https://img.shields.io/badge/Email-D14836?style=for-the-badge&logo=gmail&logoColor=white" />
34
+ </a>
35
+ </p>
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { readFileSync } from 'node:fs';
4
+ import { dirname, join } from 'node:path';
5
+ import { fileURLToPath } from 'node:url';
6
+
7
+ const __filename = fileURLToPath(import.meta.url);
8
+ const __dirname = dirname(__filename);
9
+ const packageJsonPath = join(__dirname, '..', 'package.json');
10
+ const packageJson = readFileSync(packageJsonPath, { encoding: 'utf-8' });
11
+ const version = JSON.parse(packageJson).version;
12
+ console.log(version);
@@ -0,0 +1,2 @@
1
+ export * from './lib/errors.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,iBAAiB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,4 @@
1
+ // @index(['./**/*.ts', '!./**/*.{spec,test}.ts'], f => `export * from '${f.path}.js'`)
2
+ export * from './lib/errors.js';
3
+
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["// @index(['./**/*.ts', '!./**/*.{spec,test}.ts'], f => `export * from '${f.path}.js'`)\nexport * from './lib/errors.js';\n"],"names":[],"mappings":"AAAA,uFAAuF;AACvF,cAAc,kBAAkB"}
@@ -0,0 +1,37 @@
1
+ export declare class AccessDeniedError extends Error {
2
+ constructor(message?: string);
3
+ }
4
+ export declare class RequiredError extends Error {
5
+ constructor(message?: string);
6
+ }
7
+ export declare class UndefinedError extends Error {
8
+ constructor(message?: string);
9
+ }
10
+ export declare class NullError extends Error {
11
+ constructor(message?: string);
12
+ }
13
+ export declare class NotImplementedError extends Error {
14
+ constructor(message?: string);
15
+ }
16
+ export declare class NotNumberError extends Error {
17
+ constructor(message?: string);
18
+ }
19
+ export declare class NotStringError extends Error {
20
+ constructor(message?: string);
21
+ }
22
+ export declare class NotBooleanError extends Error {
23
+ constructor(message?: string);
24
+ }
25
+ export declare class NotObjectError extends Error {
26
+ constructor(message?: string);
27
+ }
28
+ export declare class EmptyStringError extends Error {
29
+ constructor(message?: string);
30
+ }
31
+ export declare class InvalidDateError extends Error {
32
+ constructor(message?: string);
33
+ }
34
+ export declare class UnsupportedError extends Error {
35
+ constructor(message?: string);
36
+ }
37
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/lib/errors.ts"],"names":[],"mappings":"AAAA,qBAAa,iBAAkB,SAAQ,KAAK;gBAC5B,OAAO,SAAK;CAQ3B;AACD,qBAAa,aAAc,SAAQ,KAAK;gBACxB,OAAO,SAAK;CAQ3B;AACD,qBAAa,cAAe,SAAQ,KAAK;gBACzB,OAAO,SAAK;CAQ3B;AACD,qBAAa,SAAU,SAAQ,KAAK;gBACpB,OAAO,SAAK;CAQ3B;AACD,qBAAa,mBAAoB,SAAQ,KAAK;gBAC9B,OAAO,SAAK;CAQ3B;AACD,qBAAa,cAAe,SAAQ,KAAK;gBACzB,OAAO,SAAK;CAQ3B;AACD,qBAAa,cAAe,SAAQ,KAAK;gBACzB,OAAO,SAAK;CAQ3B;AACD,qBAAa,eAAgB,SAAQ,KAAK;gBAC1B,OAAO,SAAK;CAQ3B;AACD,qBAAa,cAAe,SAAQ,KAAK;gBACzB,OAAO,SAAK;CAQ3B;AACD,qBAAa,gBAAiB,SAAQ,KAAK;gBAC3B,OAAO,SAAK;CAQ3B;AACD,qBAAa,gBAAiB,SAAQ,KAAK;gBAC3B,OAAO,SAAK;CAQ3B;AACD,qBAAa,gBAAiB,SAAQ,KAAK;gBAC3B,OAAO,SAAK;CAQ3B"}
@@ -0,0 +1,122 @@
1
+ export class AccessDeniedError extends Error {
2
+ constructor(message = ''){
3
+ super(message);
4
+ Object.setPrototypeOf(this, AccessDeniedError.prototype);
5
+ this.name = this.constructor.name;
6
+ if (Error.captureStackTrace) {
7
+ Error.captureStackTrace(this, this.constructor);
8
+ }
9
+ }
10
+ }
11
+ export class RequiredError extends Error {
12
+ constructor(message = ''){
13
+ super(message);
14
+ Object.setPrototypeOf(this, RequiredError.prototype);
15
+ this.name = this.constructor.name;
16
+ if (Error.captureStackTrace) {
17
+ Error.captureStackTrace(this, this.constructor);
18
+ }
19
+ }
20
+ }
21
+ export class UndefinedError extends Error {
22
+ constructor(message = ''){
23
+ super(message);
24
+ Object.setPrototypeOf(this, UndefinedError.prototype);
25
+ this.name = this.constructor.name;
26
+ if (Error.captureStackTrace) {
27
+ Error.captureStackTrace(this, this.constructor);
28
+ }
29
+ }
30
+ }
31
+ export class NullError extends Error {
32
+ constructor(message = ''){
33
+ super(message);
34
+ Object.setPrototypeOf(this, NullError.prototype);
35
+ this.name = this.constructor.name;
36
+ if (Error.captureStackTrace) {
37
+ Error.captureStackTrace(this, this.constructor);
38
+ }
39
+ }
40
+ }
41
+ export class NotImplementedError extends Error {
42
+ constructor(message = ''){
43
+ super(message);
44
+ Object.setPrototypeOf(this, NotImplementedError.prototype);
45
+ this.name = this.constructor.name;
46
+ if (Error.captureStackTrace) {
47
+ Error.captureStackTrace(this, this.constructor);
48
+ }
49
+ }
50
+ }
51
+ export class NotNumberError extends Error {
52
+ constructor(message = ''){
53
+ super(message);
54
+ Object.setPrototypeOf(this, NotNumberError.prototype);
55
+ this.name = this.constructor.name;
56
+ if (Error.captureStackTrace) {
57
+ Error.captureStackTrace(this, this.constructor);
58
+ }
59
+ }
60
+ }
61
+ export class NotStringError extends Error {
62
+ constructor(message = ''){
63
+ super(message);
64
+ Object.setPrototypeOf(this, NotStringError.prototype);
65
+ this.name = this.constructor.name;
66
+ if (Error.captureStackTrace) {
67
+ Error.captureStackTrace(this, this.constructor);
68
+ }
69
+ }
70
+ }
71
+ export class NotBooleanError extends Error {
72
+ constructor(message = ''){
73
+ super(message);
74
+ Object.setPrototypeOf(this, NotBooleanError.prototype);
75
+ this.name = this.constructor.name;
76
+ if (Error.captureStackTrace) {
77
+ Error.captureStackTrace(this, this.constructor);
78
+ }
79
+ }
80
+ }
81
+ export class NotObjectError extends Error {
82
+ constructor(message = ''){
83
+ super(message);
84
+ Object.setPrototypeOf(this, NotObjectError.prototype);
85
+ this.name = this.constructor.name;
86
+ if (Error.captureStackTrace) {
87
+ Error.captureStackTrace(this, this.constructor);
88
+ }
89
+ }
90
+ }
91
+ export class EmptyStringError extends Error {
92
+ constructor(message = ''){
93
+ super(message);
94
+ Object.setPrototypeOf(this, EmptyStringError.prototype);
95
+ this.name = this.constructor.name;
96
+ if (Error.captureStackTrace) {
97
+ Error.captureStackTrace(this, this.constructor);
98
+ }
99
+ }
100
+ }
101
+ export class InvalidDateError extends Error {
102
+ constructor(message = ''){
103
+ super(message);
104
+ Object.setPrototypeOf(this, InvalidDateError.prototype);
105
+ this.name = this.constructor.name;
106
+ if (Error.captureStackTrace) {
107
+ Error.captureStackTrace(this, this.constructor);
108
+ }
109
+ }
110
+ }
111
+ export class UnsupportedError extends Error {
112
+ constructor(message = ''){
113
+ super(message);
114
+ Object.setPrototypeOf(this, UnsupportedError.prototype);
115
+ this.name = this.constructor.name;
116
+ if (Error.captureStackTrace) {
117
+ Error.captureStackTrace(this, this.constructor);
118
+ }
119
+ }
120
+ }
121
+
122
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/errors.ts"],"sourcesContent":["export class AccessDeniedError extends Error {\n constructor(message = '') {\n super(message);\n Object.setPrototypeOf(this, AccessDeniedError.prototype);\n this.name = this.constructor.name;\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n }\n}\nexport class RequiredError extends Error {\n constructor(message = '') {\n super(message);\n Object.setPrototypeOf(this, RequiredError.prototype);\n this.name = this.constructor.name;\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n }\n}\nexport class UndefinedError extends Error {\n constructor(message = '') {\n super(message);\n Object.setPrototypeOf(this, UndefinedError.prototype);\n this.name = this.constructor.name;\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n }\n}\nexport class NullError extends Error {\n constructor(message = '') {\n super(message);\n Object.setPrototypeOf(this, NullError.prototype);\n this.name = this.constructor.name;\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n }\n}\nexport class NotImplementedError extends Error {\n constructor(message = '') {\n super(message);\n Object.setPrototypeOf(this, NotImplementedError.prototype);\n this.name = this.constructor.name;\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n }\n}\nexport class NotNumberError extends Error {\n constructor(message = '') {\n super(message);\n Object.setPrototypeOf(this, NotNumberError.prototype);\n this.name = this.constructor.name;\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n }\n}\nexport class NotStringError extends Error {\n constructor(message = '') {\n super(message);\n Object.setPrototypeOf(this, NotStringError.prototype);\n this.name = this.constructor.name;\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n }\n}\nexport class NotBooleanError extends Error {\n constructor(message = '') {\n super(message);\n Object.setPrototypeOf(this, NotBooleanError.prototype);\n this.name = this.constructor.name;\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n }\n}\nexport class NotObjectError extends Error {\n constructor(message = '') {\n super(message);\n Object.setPrototypeOf(this, NotObjectError.prototype);\n this.name = this.constructor.name;\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n }\n}\nexport class EmptyStringError extends Error {\n constructor(message = '') {\n super(message);\n Object.setPrototypeOf(this, EmptyStringError.prototype);\n this.name = this.constructor.name;\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n }\n}\nexport class InvalidDateError extends Error {\n constructor(message = '') {\n super(message);\n Object.setPrototypeOf(this, InvalidDateError.prototype);\n this.name = this.constructor.name;\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n }\n}\nexport class UnsupportedError extends Error {\n constructor(message = '') {\n super(message);\n Object.setPrototypeOf(this, UnsupportedError.prototype);\n this.name = this.constructor.name;\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n }\n}"],"names":["AccessDeniedError","Error","message","Object","setPrototypeOf","prototype","name","captureStackTrace","RequiredError","UndefinedError","NullError","NotImplementedError","NotNumberError","NotStringError","NotBooleanError","Not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 -0,0 +1,58 @@
1
+ {
2
+ "name": "@vnodes/errors",
3
+ "version": "0.0.23",
4
+ "description": "@vnodes/errors",
5
+ "keywords": [
6
+ "errors"
7
+ ],
8
+ "author": {
9
+ "name": "Robert Brightline",
10
+ "email": "robert.brightline+vnodes-errors@gmail.com",
11
+ "url": "https://vnodes.github.io/vnodes"
12
+ },
13
+ "homepage": "https://vnodes.github.io/vnodes/libs/errors",
14
+ "icon": "https://vnodes.github.io/vnodes/libs/errors/assets/favicon.png",
15
+ "funding": [
16
+ "https://cash.app/$puqlib"
17
+ ],
18
+ "bin": {
19
+ "version": "./bin/version.mjs"
20
+ },
21
+ "type": "module",
22
+ "main": "./dist/index.js",
23
+ "module": "./dist/index.js",
24
+ "types": "./dist/index.d.ts",
25
+ "exports": {
26
+ "./package.json": "./package.json",
27
+ ".": {
28
+ "@vnodes/source": "./src/index.ts",
29
+ "types": "./dist/index.d.ts",
30
+ "import": "./dist/index.js",
31
+ "default": "./dist/index.js"
32
+ }
33
+ },
34
+ "files": [
35
+ "dist",
36
+ "bin",
37
+ "!**/*.tsbuildinfo"
38
+ ],
39
+ "nx": {
40
+ "sourceRoot": "libs/errors/src",
41
+ "targets": {
42
+ "build-script": {},
43
+ "build": {},
44
+ "doc": {},
45
+ "lint": {}
46
+ },
47
+ "tags": [
48
+ "lib"
49
+ ]
50
+ },
51
+ "dependencies": {
52
+ "@swc/helpers": "~0.5.18"
53
+ },
54
+ "publishConfig": {
55
+ "access": "public",
56
+ "tag": "latest"
57
+ }
58
+ }