inviton-backduck 1.0.0 → 1.0.1
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 +1 -5
- package/dist/exceptions/badRequestException.d.ts +9 -0
- package/dist/exceptions/badRequestException.d.ts.map +1 -0
- package/dist/exceptions/badRequestException.js +9 -0
- package/dist/exceptions/badRequestException.js.map +1 -0
- package/dist/exceptions/index.d.ts +5 -0
- package/dist/exceptions/index.d.ts.map +1 -0
- package/dist/exceptions/index.js +5 -0
- package/dist/exceptions/index.js.map +1 -0
- package/dist/exceptions/notFoundException.d.ts +9 -0
- package/dist/exceptions/notFoundException.d.ts.map +1 -0
- package/dist/exceptions/notFoundException.js +9 -0
- package/dist/exceptions/notFoundException.js.map +1 -0
- package/dist/exceptions/notImplementedException.d.ts +4 -0
- package/dist/exceptions/notImplementedException.d.ts.map +1 -0
- package/dist/exceptions/notImplementedException.js +8 -0
- package/dist/exceptions/notImplementedException.js.map +1 -0
- package/dist/exceptions/unauthorizedException.d.ts +9 -0
- package/dist/exceptions/unauthorizedException.d.ts.map +1 -0
- package/dist/exceptions/unauthorizedException.js +9 -0
- package/dist/exceptions/unauthorizedException.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface IBadRequestException {
|
|
2
|
+
httpCode?: number;
|
|
3
|
+
name: string;
|
|
4
|
+
}
|
|
5
|
+
export default class BadRequestException extends Error implements IBadRequestException {
|
|
6
|
+
constructor(messageLocalized?: string);
|
|
7
|
+
}
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=badRequestException.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badRequestException.d.ts","sourceRoot":"","sources":["../../src/exceptions/badRequestException.ts"],"names":[],"mappings":"AAAA,UAAU,oBAAoB;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACb;AAED,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,KAAM,YAAW,oBAAoB;gBACzE,gBAAgB,CAAC,EAAE,MAAM;CAMrC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export default class BadRequestException extends Error {
|
|
2
|
+
constructor(messageLocalized) {
|
|
3
|
+
super(messageLocalized || 'Bad request');
|
|
4
|
+
this.name = 'BadRequestException'; // Important for identifying error type
|
|
5
|
+
this.httpCode = 400;
|
|
6
|
+
Object.setPrototypeOf(this, new.target.prototype); // Fix prototype chain
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=badRequestException.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badRequestException.js","sourceRoot":"","sources":["../../src/exceptions/badRequestException.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,KAAK;IACrD,YAAY,gBAAyB;QACpC,KAAK,CAAC,gBAAgB,IAAI,aAAa,CAAC,CAAC;QACzC,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC,CAAC,uCAAuC;QACzE,IAAY,CAAC,QAAQ,GAAG,GAAG,CAAC;QAC7B,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,sBAAsB;IAC1E,CAAC;CACD"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as BadRequestException } from './badRequestException';
|
|
2
|
+
export { default as NotFoundException } from './notFoundException';
|
|
3
|
+
export { default as NotImplementedException } from './notImplementedException';
|
|
4
|
+
export { default as UnauthorizedException } from './unauthorizedException';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/exceptions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as BadRequestException } from './badRequestException';
|
|
2
|
+
export { default as NotFoundException } from './notFoundException';
|
|
3
|
+
export { default as NotImplementedException } from './notImplementedException';
|
|
4
|
+
export { default as UnauthorizedException } from './unauthorizedException';
|
|
5
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/exceptions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface INotFoundException {
|
|
2
|
+
httpCode?: number;
|
|
3
|
+
name: string;
|
|
4
|
+
}
|
|
5
|
+
export default class NotFoundException extends Error implements INotFoundException {
|
|
6
|
+
constructor(messageLocalized?: string);
|
|
7
|
+
}
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=notFoundException.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notFoundException.d.ts","sourceRoot":"","sources":["../../src/exceptions/notFoundException.ts"],"names":[],"mappings":"AAAA,UAAU,kBAAkB;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACb;AAED,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,KAAM,YAAW,kBAAkB;gBACrE,gBAAgB,CAAC,EAAE,MAAM;CAMrC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export default class NotFoundException extends Error {
|
|
2
|
+
constructor(messageLocalized) {
|
|
3
|
+
super(messageLocalized || 'Not found');
|
|
4
|
+
this.name = 'NotFoundException';
|
|
5
|
+
this.httpCode = 404;
|
|
6
|
+
Object.setPrototypeOf(this, new.target.prototype); // Fix prototype chain
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=notFoundException.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notFoundException.js","sourceRoot":"","sources":["../../src/exceptions/notFoundException.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,KAAK;IACnD,YAAY,gBAAyB;QACpC,KAAK,CAAC,gBAAgB,IAAI,WAAW,CAAC,CAAC;QACvC,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;QAC/B,IAAY,CAAC,QAAQ,GAAG,GAAG,CAAC;QAC7B,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,sBAAsB;IAC1E,CAAC;CACD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notImplementedException.d.ts","sourceRoot":"","sources":["../../src/exceptions/notImplementedException.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,OAAO,uBAAwB,SAAQ,KAAK;gBAC7C,OAAO,CAAC,EAAE,MAAM;CAK5B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export default class NotImplementedException extends Error {
|
|
2
|
+
constructor(message) {
|
|
3
|
+
super(message || 'Not implemented');
|
|
4
|
+
this.name = 'NotImplementedException'; // Important for identifying error type
|
|
5
|
+
Object.setPrototypeOf(this, new.target.prototype); // Fix prototype chain
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=notImplementedException.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notImplementedException.js","sourceRoot":"","sources":["../../src/exceptions/notImplementedException.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,OAAO,uBAAwB,SAAQ,KAAK;IACzD,YAAY,OAAgB;QAC3B,KAAK,CAAC,OAAO,IAAI,iBAAiB,CAAC,CAAC;QACpC,IAAI,CAAC,IAAI,GAAG,yBAAyB,CAAC,CAAC,uCAAuC;QAC9E,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,sBAAsB;IAC1E,CAAC;CACD"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface IUnauthorizedException {
|
|
2
|
+
httpCode?: number;
|
|
3
|
+
name: string;
|
|
4
|
+
}
|
|
5
|
+
export default class UnauthorizedException extends Error implements IUnauthorizedException {
|
|
6
|
+
constructor(messageLocalized?: string);
|
|
7
|
+
}
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=unauthorizedException.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unauthorizedException.d.ts","sourceRoot":"","sources":["../../src/exceptions/unauthorizedException.ts"],"names":[],"mappings":"AAAA,UAAU,sBAAsB;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACb;AAED,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,KAAM,YAAW,sBAAsB;gBAC7E,gBAAgB,CAAC,EAAE,MAAM;CAMrC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export default class UnauthorizedException extends Error {
|
|
2
|
+
constructor(messageLocalized) {
|
|
3
|
+
super(messageLocalized || 'Unauthorized');
|
|
4
|
+
this.name = 'UnauthorizedException'; // Important for identifying error type
|
|
5
|
+
this.httpCode = 401;
|
|
6
|
+
Object.setPrototypeOf(this, new.target.prototype); // Fix prototype chain
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=unauthorizedException.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unauthorizedException.js","sourceRoot":"","sources":["../../src/exceptions/unauthorizedException.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,KAAK;IACvD,YAAY,gBAAyB;QACpC,KAAK,CAAC,gBAAgB,IAAI,cAAc,CAAC,CAAC;QAC1C,IAAI,CAAC,IAAI,GAAG,uBAAuB,CAAC,CAAC,uCAAuC;QAC3E,IAAY,CAAC,QAAQ,GAAG,GAAG,CAAC;QAC7B,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,sBAAsB;IAC1E,CAAC;CACD"}
|
package/dist/index.d.ts
CHANGED
|
@@ -43,5 +43,6 @@ export { ControllerGetMiddlewares, Middleware as MiddlewareDecorator, ParseReque
|
|
|
43
43
|
export { ControllerBase, createRouter, type HttpMethod, type IController, WebRouter as UniversalRouter, WebRouter, } from './router';
|
|
44
44
|
export { IS_BUN, RUNTIME } from './runtime-detect';
|
|
45
45
|
export { type BuildableRouter, createServer, type ServerInstance, type StaticFileConfig, UniversalServer, type UniversalServerOptions, } from './server';
|
|
46
|
+
export { BadRequestException, NotFoundException, NotImplementedException, UnauthorizedException, } from './exceptions';
|
|
46
47
|
export { RuntimeUtils } from './utils';
|
|
47
48
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAGH,cAAc,UAAU,CAAC;AAGzB,YAAY,EACX,aAAa,EACb,oBAAoB,IAAI,UAAU,EAClC,YAAY,EACZ,UAAU,IAAI,gBAAgB,EAC9B,UAAU,EACV,WAAW,GACX,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACN,wBAAwB,EACxB,UAAU,IAAI,mBAAmB,EACjC,gBAAgB,EAChB,WAAW,EACX,KAAK,GACL,MAAM,cAAc,CAAC;AAGtB,OAAO,EACN,cAAc,EACd,YAAY,EACZ,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,SAAS,IAAI,eAAe,EAC5B,SAAS,GACT,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAGnD,OAAO,EACN,KAAK,eAAe,EACpB,YAAY,EACZ,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,eAAe,EACf,KAAK,sBAAsB,GAC3B,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAGH,cAAc,UAAU,CAAC;AAGzB,YAAY,EACX,aAAa,EACb,oBAAoB,IAAI,UAAU,EAClC,YAAY,EACZ,UAAU,IAAI,gBAAgB,EAC9B,UAAU,EACV,WAAW,GACX,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACN,wBAAwB,EACxB,UAAU,IAAI,mBAAmB,EACjC,gBAAgB,EAChB,WAAW,EACX,KAAK,GACL,MAAM,cAAc,CAAC;AAGtB,OAAO,EACN,cAAc,EACd,YAAY,EACZ,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,SAAS,IAAI,eAAe,EAC5B,SAAS,GACT,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAGnD,OAAO,EACN,KAAK,eAAe,EACpB,YAAY,EACZ,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,eAAe,EACf,KAAK,sBAAsB,GAC3B,MAAM,UAAU,CAAC;AAGlB,OAAO,EACN,mBAAmB,EACnB,iBAAiB,EACjB,uBAAuB,EACvB,qBAAqB,GACrB,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -47,6 +47,8 @@ export { ControllerBase, createRouter, WebRouter as UniversalRouter, WebRouter,
|
|
|
47
47
|
export { IS_BUN, RUNTIME } from './runtime-detect';
|
|
48
48
|
// Server - Server creation and configuration
|
|
49
49
|
export { createServer, UniversalServer, } from './server';
|
|
50
|
+
// Exceptions - Common HTTP and workflow exceptions
|
|
51
|
+
export { BadRequestException, NotFoundException, NotImplementedException, UnauthorizedException, } from './exceptions';
|
|
50
52
|
// Utils - Request parsing and helper utilities
|
|
51
53
|
export { RuntimeUtils } from './utils';
|
|
52
54
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,0FAA0F;AAC1F,cAAc,UAAU,CAAC;AAYzB,kDAAkD;AAClD,OAAO,EACN,wBAAwB,EACxB,UAAU,IAAI,mBAAmB,EACjC,gBAAgB,EAChB,WAAW,EACX,KAAK,GACL,MAAM,cAAc,CAAC;AAEtB,wDAAwD;AACxD,OAAO,EACN,cAAc,EACd,YAAY,EAGZ,SAAS,IAAI,eAAe,EAC5B,SAAS,GACT,MAAM,UAAU,CAAC;AAElB,yDAAyD;AACzD,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEnD,6CAA6C;AAC7C,OAAO,EAEN,YAAY,EAGZ,eAAe,GAEf,MAAM,UAAU,CAAC;AAElB,+CAA+C;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,0FAA0F;AAC1F,cAAc,UAAU,CAAC;AAYzB,kDAAkD;AAClD,OAAO,EACN,wBAAwB,EACxB,UAAU,IAAI,mBAAmB,EACjC,gBAAgB,EAChB,WAAW,EACX,KAAK,GACL,MAAM,cAAc,CAAC;AAEtB,wDAAwD;AACxD,OAAO,EACN,cAAc,EACd,YAAY,EAGZ,SAAS,IAAI,eAAe,EAC5B,SAAS,GACT,MAAM,UAAU,CAAC;AAElB,yDAAyD;AACzD,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEnD,6CAA6C;AAC7C,OAAO,EAEN,YAAY,EAGZ,eAAe,GAEf,MAAM,UAAU,CAAC;AAElB,mDAAmD;AACnD,OAAO,EACN,mBAAmB,EACnB,iBAAiB,EACjB,uBAAuB,EACvB,qBAAqB,GACrB,MAAM,cAAc,CAAC;AAEtB,+CAA+C;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC"}
|