arcanajs 4.0.0 → 5.0.0
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/dist/529.js +2 -0
- package/dist/529.js.map +1 -0
- package/dist/630.js +3 -0
- package/dist/630.js.LICENSE.txt +14 -0
- package/dist/630.js.map +1 -0
- package/dist/arcanajs.auth.js +3 -0
- package/dist/arcanajs.auth.js.LICENSE.txt +14 -0
- package/dist/arcanajs.auth.js.map +1 -0
- package/dist/arcanajs.js +1 -1
- package/dist/arcanajs.js.map +1 -1
- package/dist/arcanajs.mail.js +2 -0
- package/dist/arcanajs.mail.js.map +1 -0
- package/dist/arcanajs.validator.js +2 -0
- package/dist/arcanajs.validator.js.map +1 -0
- package/dist/arcanox.js +1 -1
- package/dist/arcanox.js.map +1 -1
- package/dist/cli/commands/dependency.d.ts +1 -0
- package/dist/cli/commands/make/Controller.d.ts +3 -0
- package/dist/cli/commands/make/Factory.d.ts +2 -0
- package/dist/cli/commands/make/Middleware.d.ts +1 -0
- package/dist/cli/commands/make/Migration.d.ts +2 -0
- package/dist/cli/commands/make/Model.d.ts +2 -0
- package/dist/cli/commands/make/Provider.d.ts +1 -0
- package/dist/cli/commands/make/Request.d.ts +1 -0
- package/dist/cli/commands/make/Seeder.d.ts +2 -0
- package/dist/cli/index.js +1 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/utils/toPascalCase.d.ts +1 -0
- package/dist/cli/utils/writeFile.d.ts +1 -0
- package/dist/lib/arcanox/providers/DatabaseProvider.d.ts +9 -4
- package/dist/lib/auth/AuthProvider.d.ts +10 -0
- package/dist/lib/auth/JWTService.d.ts +11 -0
- package/dist/lib/auth/SessionManager.d.ts +4 -0
- package/dist/lib/auth/middleware/AuthMiddleware.d.ts +5 -0
- package/dist/lib/auth/middleware/AuthenticatedMiddleware.d.ts +5 -0
- package/dist/lib/auth/middleware/GuestMiddleware.d.ts +5 -0
- package/dist/lib/auth/middleware/RoleMiddleware.d.ts +7 -0
- package/dist/lib/auth/types/AuthConfig.d.ts +24 -0
- package/dist/lib/auth/types/JWTPayload.d.ts +10 -0
- package/dist/lib/auth/types/index.d.ts +2 -0
- package/dist/lib/auth/utils/PasswordHasher.d.ts +16 -0
- package/dist/lib/auth/utils/TokenBlacklist.d.ts +9 -0
- package/dist/lib/index.arcanox.d.ts +16 -2
- package/dist/lib/index.auth.d.ts +11 -0
- package/dist/lib/index.client.d.ts +2 -0
- package/dist/lib/index.mail.d.ts +8 -0
- package/dist/lib/index.server.d.ts +4 -6
- package/dist/lib/index.validator.d.ts +6 -0
- package/dist/lib/mail/MailProvider.d.ts +10 -0
- package/dist/lib/mail/MailService.d.ts +57 -0
- package/dist/lib/mail/Mailable.d.ts +106 -0
- package/dist/lib/mail/index.d.ts +6 -0
- package/dist/lib/mail/queue/MailQueue.d.ts +51 -0
- package/dist/lib/mail/queue/index.d.ts +1 -0
- package/dist/lib/mail/types/MailConfig.d.ts +146 -0
- package/dist/lib/mail/types/index.d.ts +1 -0
- package/dist/lib/mail/utils/TemplateRenderer.d.ts +34 -0
- package/dist/lib/mail/utils/index.d.ts +1 -0
- package/dist/lib/server/ArcanaJSServer.d.ts +15 -8
- package/dist/lib/server/Container.d.ts +8 -0
- package/dist/lib/server/Router.d.ts +23 -33
- package/dist/lib/server/support/ServiceProvider.d.ts +4 -0
- package/dist/lib/validation/Validator.d.ts +55 -0
- package/dist/types/global.d.ts +102 -0
- package/package.json +68 -15
- package/dist/lib/arcanox/index.d.ts +0 -13
- package/dist/lib/server/validation/Validator.d.ts +0 -12
- /package/dist/lib/{server/validation → validation}/ValidationException.d.ts +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Express, RequestHandler } from "express";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { ServiceProvider } from "./support/ServiceProvider";
|
|
4
|
-
export interface ArcanaJSConfig
|
|
4
|
+
export interface ArcanaJSConfig {
|
|
5
5
|
port?: number | string;
|
|
6
6
|
views?: Record<string, React.FC<any>>;
|
|
7
7
|
viewsDir?: string;
|
|
@@ -15,10 +15,14 @@ export interface ArcanaJSConfig<TDb = any> {
|
|
|
15
15
|
distDir?: string;
|
|
16
16
|
indexFile?: string;
|
|
17
17
|
layout?: React.FC<any>;
|
|
18
|
-
/** Optional function to establish a DB connection. Should return a Promise resolving to the DB client/connection. */
|
|
19
|
-
dbConnect?: () => Promise<TDb> | TDb;
|
|
20
18
|
/** Automatically register SIGINT/SIGTERM handlers to call stop(). Default: true */
|
|
21
19
|
autoHandleSignals?: boolean;
|
|
20
|
+
/** Auth configuration */
|
|
21
|
+
auth?: any;
|
|
22
|
+
/** Mail configuration */
|
|
23
|
+
mail?: any;
|
|
24
|
+
/** Database configuration */
|
|
25
|
+
database?: any;
|
|
22
26
|
/** Service providers to load */
|
|
23
27
|
providers?: (new (app: ArcanaJSServer) => ServiceProvider)[];
|
|
24
28
|
}
|
|
@@ -43,7 +47,7 @@ declare global {
|
|
|
43
47
|
* @param data - Optional data payload to include in the error response (default: null).
|
|
44
48
|
* @returns The Express Response object.
|
|
45
49
|
*/
|
|
46
|
-
error: (message?: string, status?: number, error?: string | object | null, data?: string | object | null) => Response;
|
|
50
|
+
error: (message?: string, status?: number, error?: string | object | null | undefined | unknown, data?: string | object | null) => Response;
|
|
47
51
|
/**
|
|
48
52
|
* Renders a React page using ArcanaJS SSR.
|
|
49
53
|
*
|
|
@@ -57,7 +61,7 @@ declare global {
|
|
|
57
61
|
}
|
|
58
62
|
}
|
|
59
63
|
import { Container } from "./Container";
|
|
60
|
-
declare class ArcanaJSServer
|
|
64
|
+
declare class ArcanaJSServer {
|
|
61
65
|
app: Express;
|
|
62
66
|
container: Container;
|
|
63
67
|
private config;
|
|
@@ -65,14 +69,17 @@ declare class ArcanaJSServer<TDb = any> {
|
|
|
65
69
|
private _sigintHandler?;
|
|
66
70
|
private _sigtermHandler?;
|
|
67
71
|
private providers;
|
|
68
|
-
|
|
72
|
+
private initialized;
|
|
73
|
+
constructor(config: ArcanaJSConfig);
|
|
74
|
+
private initializeAsync;
|
|
75
|
+
private loadConfigurations;
|
|
69
76
|
private registerProviders;
|
|
70
77
|
private bootProviders;
|
|
71
|
-
private
|
|
78
|
+
private setupMiddleware;
|
|
72
79
|
private loadViewsFromContext;
|
|
73
80
|
private loadViewsFromAlias;
|
|
74
81
|
private discoverViews;
|
|
75
|
-
start(): void
|
|
82
|
+
start(): Promise<void>;
|
|
76
83
|
/**
|
|
77
84
|
* Stop the HTTP server and close DB connection if present.
|
|
78
85
|
*/
|
|
@@ -22,6 +22,14 @@ export declare class Container {
|
|
|
22
22
|
* Resolve a dependency from the container
|
|
23
23
|
*/
|
|
24
24
|
make<T>(key: string | ClassConstructor<T>): T;
|
|
25
|
+
/**
|
|
26
|
+
* Check if a service is registered in the container
|
|
27
|
+
*/
|
|
28
|
+
has(key: string | ClassConstructor): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Alias for make() - resolve a dependency from the container
|
|
31
|
+
*/
|
|
32
|
+
resolve<T>(key: string | ClassConstructor<T>): T;
|
|
25
33
|
/**
|
|
26
34
|
* Instantiate a class, resolving its dependencies
|
|
27
35
|
*/
|
|
@@ -1,65 +1,57 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Router as ExpressRouter } from "express";
|
|
2
2
|
/**
|
|
3
|
-
* Provides Routing syntax for defining routes with prefixes, middlewares, and groups
|
|
3
|
+
* Provides Routing syntax for defining routes with prefixes, middlewares, and groups for ArcanaJS Framework
|
|
4
4
|
*/
|
|
5
|
-
export declare class
|
|
5
|
+
export declare class ArcanaJSRouter {
|
|
6
6
|
private router;
|
|
7
7
|
private middlewareStack;
|
|
8
8
|
private prefixStack;
|
|
9
9
|
constructor();
|
|
10
|
-
/**
|
|
11
|
-
* Create a new router instance
|
|
12
|
-
*/
|
|
13
|
-
static create(): Router;
|
|
14
10
|
/**
|
|
15
11
|
* Add middleware to the current stack
|
|
16
12
|
*/
|
|
17
|
-
middleware(...middleware: any[]):
|
|
13
|
+
middleware(...middleware: any[]): ArcanaJSRouter;
|
|
18
14
|
/**
|
|
19
15
|
* Add prefix to the current stack
|
|
20
16
|
*/
|
|
21
|
-
prefix(prefix: string):
|
|
17
|
+
prefix(prefix: string): ArcanaJSRouter;
|
|
22
18
|
/**
|
|
23
19
|
* Create a route group
|
|
24
20
|
*/
|
|
25
|
-
group(callback: (router:
|
|
21
|
+
group(callback: (router: ArcanaJSRouter) => void): ArcanaJSRouter;
|
|
26
22
|
/**
|
|
27
23
|
* Define a GET route
|
|
28
24
|
*/
|
|
29
|
-
get(path: string, ...args: any[]):
|
|
25
|
+
get(path: string, ...args: any[]): ArcanaJSRouter;
|
|
30
26
|
/**
|
|
31
27
|
* Define a POST route
|
|
32
28
|
*/
|
|
33
|
-
post(path: string, ...args: any[]):
|
|
29
|
+
post(path: string, ...args: any[]): ArcanaJSRouter;
|
|
34
30
|
/**
|
|
35
31
|
* Define a PUT route
|
|
36
32
|
*/
|
|
37
|
-
put(path: string, ...args: any[]):
|
|
33
|
+
put(path: string, ...args: any[]): ArcanaJSRouter;
|
|
38
34
|
/**
|
|
39
35
|
* Define a DELETE route
|
|
40
36
|
*/
|
|
41
|
-
delete(path: string, ...args: any[]):
|
|
37
|
+
delete(path: string, ...args: any[]): ArcanaJSRouter;
|
|
42
38
|
/**
|
|
43
39
|
* Define a PATCH route
|
|
44
40
|
*/
|
|
45
|
-
patch(path: string, ...args: any[]):
|
|
41
|
+
patch(path: string, ...args: any[]): ArcanaJSRouter;
|
|
46
42
|
/**
|
|
47
43
|
* Define an OPTIONS route
|
|
48
44
|
*/
|
|
49
|
-
options(path: string, ...args: any[]):
|
|
45
|
+
options(path: string, ...args: any[]): ArcanaJSRouter;
|
|
50
46
|
/**
|
|
51
47
|
* Define a resource route
|
|
52
48
|
* Registers index, create, store, show, edit, update, destroy routes
|
|
53
49
|
*/
|
|
54
|
-
resource(path: string, controller: any):
|
|
50
|
+
resource(path: string, controller: any): ArcanaJSRouter;
|
|
55
51
|
/**
|
|
56
52
|
* Get the underlying Express router
|
|
57
53
|
*/
|
|
58
54
|
getRouter(): ExpressRouter;
|
|
59
|
-
/**
|
|
60
|
-
* Mount this router to an Express app or router
|
|
61
|
-
*/
|
|
62
|
-
mount(app: express.Application | ExpressRouter, basePath?: string): void;
|
|
63
55
|
/**
|
|
64
56
|
* Clone the current router instance
|
|
65
57
|
*/
|
|
@@ -86,18 +78,16 @@ export declare class Router {
|
|
|
86
78
|
*/
|
|
87
79
|
export declare class Route {
|
|
88
80
|
private static _router;
|
|
89
|
-
static
|
|
90
|
-
static
|
|
91
|
-
static
|
|
92
|
-
static
|
|
93
|
-
static
|
|
94
|
-
static
|
|
95
|
-
static
|
|
96
|
-
static
|
|
97
|
-
static
|
|
98
|
-
static
|
|
81
|
+
static middleware(...middleware: any[]): typeof Route;
|
|
82
|
+
static prefix(prefix: string): typeof Route;
|
|
83
|
+
static group(callback: (router: ArcanaJSRouter) => void): typeof Route;
|
|
84
|
+
static get(path: string, ...args: any[]): typeof Route;
|
|
85
|
+
static post(path: string, ...args: any[]): typeof Route;
|
|
86
|
+
static put(path: string, ...args: any[]): typeof Route;
|
|
87
|
+
static delete(path: string, ...args: any[]): typeof Route;
|
|
88
|
+
static patch(path: string, ...args: any[]): typeof Route;
|
|
89
|
+
static options(path: string, ...args: any[]): typeof Route;
|
|
90
|
+
static resource(path: string, controller: any): typeof Route;
|
|
99
91
|
static getRouter(): ExpressRouter;
|
|
100
|
-
static mount(app: express.Application, basePath?: string): void;
|
|
101
|
-
static reset(): void;
|
|
102
92
|
}
|
|
103
93
|
export default Route;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { DatabaseAdapter } from "../arcanox/types";
|
|
2
|
+
export declare class Validator {
|
|
3
|
+
protected data: any;
|
|
4
|
+
protected rules: Record<string, string>;
|
|
5
|
+
protected errors: Record<string, string[]>;
|
|
6
|
+
protected databaseAdapter?: DatabaseAdapter;
|
|
7
|
+
/**
|
|
8
|
+
* Map of custom validator functions.
|
|
9
|
+
*/
|
|
10
|
+
private static customValidators;
|
|
11
|
+
/**
|
|
12
|
+
* Register a custom validator.
|
|
13
|
+
*/
|
|
14
|
+
static registerValidator(name: string, fn: (value: any, data: any, param?: string) => true | string | Promise<true | string>): void;
|
|
15
|
+
constructor(data: any, rules: Record<string, string>);
|
|
16
|
+
static make(data: any, rules: Record<string, string>): Validator;
|
|
17
|
+
/**
|
|
18
|
+
* Set the database adapter for database validation rules
|
|
19
|
+
*/
|
|
20
|
+
setDatabaseAdapter(adapter: DatabaseAdapter): this;
|
|
21
|
+
fails(): Promise<boolean>;
|
|
22
|
+
passes(): Promise<boolean>;
|
|
23
|
+
errors_(): Record<string, string[]>;
|
|
24
|
+
validate(): Promise<Record<string, any>>;
|
|
25
|
+
protected validateRules(): Promise<Record<string, any>>;
|
|
26
|
+
/**
|
|
27
|
+
* Check if any rules require database adapter
|
|
28
|
+
*/
|
|
29
|
+
protected needsDatabaseAdapter(): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Auto-inject database adapter from Container
|
|
32
|
+
*/
|
|
33
|
+
protected autoInjectDatabaseAdapter(): Promise<void>;
|
|
34
|
+
protected getValue(field: string): any;
|
|
35
|
+
protected applyRule(field: string, value: any, rule: string): Promise<void>;
|
|
36
|
+
protected validateArrayContent(field: string, array: any[], type: string): Promise<void>;
|
|
37
|
+
protected validateMin(field: string, value: any, param: string): void;
|
|
38
|
+
protected validateMax(field: string, value: any, param: string): void;
|
|
39
|
+
protected isValidJson(value: any): boolean;
|
|
40
|
+
protected isEmpty(value: any): boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Validate unique rule: unique:table,column,ignoreId,ignoreColumn
|
|
43
|
+
* Examples:
|
|
44
|
+
* - unique:users,email
|
|
45
|
+
* - unique:users,email,5 (ignore record with id=5)
|
|
46
|
+
* - unique:users,email,5,user_id (ignore record where user_id=5)
|
|
47
|
+
*/
|
|
48
|
+
protected validateUnique(field: string, value: any, param: string): Promise<void>;
|
|
49
|
+
/**
|
|
50
|
+
* Validate exists rule: exists:table,column
|
|
51
|
+
* Example: exists:riads,id
|
|
52
|
+
*/
|
|
53
|
+
protected validateExists(field: string, value: any, param: string): Promise<void>;
|
|
54
|
+
protected addError(field: string, message: string): void;
|
|
55
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Global type declarations for ArcanaJS
|
|
3
|
+
* This file provides type support for CSS imports in projects using ArcanaJS
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/// <reference types="react" />
|
|
7
|
+
|
|
8
|
+
// CSS Module declarations
|
|
9
|
+
declare module "*.css" {
|
|
10
|
+
const content: { [className: string]: string };
|
|
11
|
+
export default content;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare module "*.module.css" {
|
|
15
|
+
const classes: { [key: string]: string };
|
|
16
|
+
export default classes;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// SCSS declarations
|
|
20
|
+
declare module "*.scss" {
|
|
21
|
+
const content: { [className: string]: string };
|
|
22
|
+
export default content;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
declare module "*.module.scss" {
|
|
26
|
+
const classes: { [key: string]: string };
|
|
27
|
+
export default classes;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// SASS declarations
|
|
31
|
+
declare module "*.sass" {
|
|
32
|
+
const content: { [className: string]: string };
|
|
33
|
+
export default content;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
declare module "*.module.sass" {
|
|
37
|
+
const classes: { [key: string]: string };
|
|
38
|
+
export default classes;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// LESS declarations
|
|
42
|
+
declare module "*.less" {
|
|
43
|
+
const content: { [className: string]: string };
|
|
44
|
+
export default content;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
declare module "*.module.less" {
|
|
48
|
+
const classes: { [key: string]: string };
|
|
49
|
+
export default classes;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Image file declarations
|
|
53
|
+
declare module "*.png" {
|
|
54
|
+
const value: string;
|
|
55
|
+
export default value;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
declare module "*.jpg" {
|
|
59
|
+
const value: string;
|
|
60
|
+
export default value;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
declare module "*.jpeg" {
|
|
64
|
+
const value: string;
|
|
65
|
+
export default value;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
declare module "*.gif" {
|
|
69
|
+
const value: string;
|
|
70
|
+
export default value;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
declare module "*.svg" {
|
|
74
|
+
const value: string;
|
|
75
|
+
export default value;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
declare module "*.webp" {
|
|
79
|
+
const value: string;
|
|
80
|
+
export default value;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// Font file declarations
|
|
84
|
+
declare module "*.woff" {
|
|
85
|
+
const value: string;
|
|
86
|
+
export default value;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
declare module "*.woff2" {
|
|
90
|
+
const value: string;
|
|
91
|
+
export default value;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
declare module "*.ttf" {
|
|
95
|
+
const value: string;
|
|
96
|
+
export default value;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
declare module "*.eot" {
|
|
100
|
+
const value: string;
|
|
101
|
+
export default value;
|
|
102
|
+
}
|
package/package.json
CHANGED
|
@@ -5,13 +5,18 @@
|
|
|
5
5
|
"email": "mohammed.bencheikh.dev@gmail.com",
|
|
6
6
|
"url": "https://mohammedbencheikh.com/"
|
|
7
7
|
},
|
|
8
|
-
"version": "
|
|
8
|
+
"version": "5.0.0",
|
|
9
9
|
"description": "ArcanaJS Framework",
|
|
10
10
|
"main": "./dist/arcanajs.js",
|
|
11
11
|
"scripts": {
|
|
12
|
-
"build": "tsc -p tsconfig.json --emitDeclarationOnly && webpack --config webpack.config.ts"
|
|
12
|
+
"build": "tsc -p tsconfig.json --emitDeclarationOnly && webpack --config webpack.config.ts && cp -r src/types dist/ && node scripts/post-build.js",
|
|
13
|
+
"test": "echo \"No tests specified\" && exit 0"
|
|
13
14
|
},
|
|
14
15
|
"exports": {
|
|
16
|
+
"./server": {
|
|
17
|
+
"types": "./dist/lib/index.server.d.ts",
|
|
18
|
+
"default": "./dist/arcanajs.js"
|
|
19
|
+
},
|
|
15
20
|
"./arcanox": {
|
|
16
21
|
"types": "./dist/lib/index.arcanox.d.ts",
|
|
17
22
|
"default": "./dist/arcanox.js"
|
|
@@ -20,9 +25,17 @@
|
|
|
20
25
|
"types": "./dist/lib/index.client.d.ts",
|
|
21
26
|
"default": "./dist/arcanajs.client.js"
|
|
22
27
|
},
|
|
23
|
-
"./
|
|
24
|
-
"types": "./dist/lib/index.
|
|
25
|
-
"default": "./dist/arcanajs.js"
|
|
28
|
+
"./auth": {
|
|
29
|
+
"types": "./dist/lib/index.auth.d.ts",
|
|
30
|
+
"default": "./dist/arcanajs.auth.js"
|
|
31
|
+
},
|
|
32
|
+
"./validator": {
|
|
33
|
+
"types": "./dist/lib/index.validator.d.ts",
|
|
34
|
+
"default": "./dist/arcanajs.validator.js"
|
|
35
|
+
},
|
|
36
|
+
"./mail": {
|
|
37
|
+
"types": "./dist/lib/index.mail.d.ts",
|
|
38
|
+
"default": "./dist/arcanajs.mail.js"
|
|
26
39
|
}
|
|
27
40
|
},
|
|
28
41
|
"bin": {
|
|
@@ -33,6 +46,14 @@
|
|
|
33
46
|
"bin"
|
|
34
47
|
],
|
|
35
48
|
"peerDependencies": {
|
|
49
|
+
"@aws-sdk/client-ses": "^3.0.0",
|
|
50
|
+
"connect-redis": "^7.0.0",
|
|
51
|
+
"handlebars": "^4.7.0",
|
|
52
|
+
"ioredis": "^5.0.0",
|
|
53
|
+
"mongodb": "^6.0.0 || ^7.0.0",
|
|
54
|
+
"mysql2": "^3.0.0",
|
|
55
|
+
"nodemailer-mailgun-transport": "^2.0.0",
|
|
56
|
+
"pg": "^8.0.0",
|
|
36
57
|
"react": "^19.0.0",
|
|
37
58
|
"react-dom": "^19.0.0"
|
|
38
59
|
},
|
|
@@ -48,6 +69,21 @@
|
|
|
48
69
|
},
|
|
49
70
|
"mongodb": {
|
|
50
71
|
"optional": true
|
|
72
|
+
},
|
|
73
|
+
"@aws-sdk/client-ses": {
|
|
74
|
+
"optional": true
|
|
75
|
+
},
|
|
76
|
+
"ioredis": {
|
|
77
|
+
"optional": true
|
|
78
|
+
},
|
|
79
|
+
"connect-redis": {
|
|
80
|
+
"optional": true
|
|
81
|
+
},
|
|
82
|
+
"handlebars": {
|
|
83
|
+
"optional": true
|
|
84
|
+
},
|
|
85
|
+
"nodemailer-mailgun-transport": {
|
|
86
|
+
"optional": true
|
|
51
87
|
}
|
|
52
88
|
},
|
|
53
89
|
"dependencies": {
|
|
@@ -55,31 +91,30 @@
|
|
|
55
91
|
"@babel/preset-env": "^7.23.0",
|
|
56
92
|
"@babel/preset-react": "^7.22.15",
|
|
57
93
|
"@babel/preset-typescript": "^7.23.0",
|
|
58
|
-
"@tailwindcss/postcss": "^4.1.17",
|
|
59
|
-
"@types/compression": "^1.8.1",
|
|
60
|
-
"@types/cookie-parser": "^1.4.10",
|
|
61
|
-
"@types/express": "^5.0.5",
|
|
62
|
-
"@types/node": "^24.10.1",
|
|
63
|
-
"@types/react": "^19.2.7",
|
|
64
|
-
"@types/react-dom": "^19.2.3",
|
|
65
94
|
"@types/ws": "^8.18.1",
|
|
66
|
-
"autoprefixer": "^10.4.22",
|
|
67
95
|
"babel-loader": "^10.0.0",
|
|
96
|
+
"bcryptjs": "^2.4.3",
|
|
68
97
|
"clean-webpack-plugin": "^4.0.0",
|
|
69
98
|
"compression": "^1.8.1",
|
|
70
99
|
"cookie-parser": "^1.4.7",
|
|
71
100
|
"cross-env": "^10.1.0",
|
|
72
101
|
"css-loader": "^7.1.2",
|
|
102
|
+
"dotenv": "^16.6.1",
|
|
103
|
+
"ejs": "^3.1.9",
|
|
73
104
|
"express": "^5.1.0",
|
|
105
|
+
"express-session": "^1.18.0",
|
|
106
|
+
"express-validator": "^7.3.1",
|
|
74
107
|
"helmet": "^8.1.0",
|
|
75
108
|
"html-webpack-plugin": "^5.6.5",
|
|
109
|
+
"jsonwebtoken": "^9.0.2",
|
|
76
110
|
"mini-css-extract-plugin": "^2.9.4",
|
|
111
|
+
"nodemailer": "^7.0.11",
|
|
77
112
|
"null-loader": "^4.0.1",
|
|
78
113
|
"postcss": "^8.5.6",
|
|
79
114
|
"postcss-loader": "^8.2.0",
|
|
115
|
+
"redis": "^4.6.12",
|
|
80
116
|
"reflect-metadata": "^0.2.2",
|
|
81
117
|
"style-loader": "^4.0.0",
|
|
82
|
-
"tailwindcss": "^4.1.17",
|
|
83
118
|
"ts-node": "^10.9.2",
|
|
84
119
|
"tsx": "^4.20.6",
|
|
85
120
|
"typescript": "^5.9.3",
|
|
@@ -89,14 +124,32 @@
|
|
|
89
124
|
"ws": "^8.18.3"
|
|
90
125
|
},
|
|
91
126
|
"devDependencies": {
|
|
127
|
+
"@aws-sdk/client-ses": "^3.490.0",
|
|
92
128
|
"@faker-js/faker": "^10.1.0",
|
|
129
|
+
"@tailwindcss/postcss": "^4.1.17",
|
|
130
|
+
"@types/bcryptjs": "^2.4.6",
|
|
131
|
+
"@types/compression": "^1.8.1",
|
|
132
|
+
"@types/cookie-parser": "^1.4.10",
|
|
133
|
+
"@types/ejs": "^3.1.5",
|
|
134
|
+
"@types/express-session": "^1.18.0",
|
|
135
|
+
"@types/jsonwebtoken": "^9.0.5",
|
|
136
|
+
"@types/node": "^24.10.1",
|
|
137
|
+
"@types/nodemailer": "^7.0.4",
|
|
93
138
|
"@types/pg": "^8.15.6",
|
|
139
|
+
"@types/react": "^19.2.7",
|
|
140
|
+
"@types/react-dom": "^19.2.3",
|
|
94
141
|
"@types/webpack-node-externals": "^3.0.4",
|
|
142
|
+
"autoprefixer": "^10.4.22",
|
|
143
|
+
"connect-redis": "^7.1.0",
|
|
144
|
+
"handlebars": "^4.7.8",
|
|
145
|
+
"ioredis": "^5.3.2",
|
|
95
146
|
"mongodb": "^7.0.0",
|
|
96
147
|
"mysql2": "^3.15.3",
|
|
148
|
+
"nodemailer-mailgun-transport": "^2.1.5",
|
|
97
149
|
"pg": "^8.16.3",
|
|
98
150
|
"react": "^19.2.0",
|
|
99
|
-
"react-dom": "^19.2.0"
|
|
151
|
+
"react-dom": "^19.2.0",
|
|
152
|
+
"tailwindcss": "^4.1.17"
|
|
100
153
|
},
|
|
101
154
|
"keywords": [
|
|
102
155
|
"arcanajs",
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export { MongoAdapter } from "./adapters/MongoAdapter";
|
|
2
|
-
export { MySQLAdapter } from "./adapters/MySQLAdapter";
|
|
3
|
-
export { PostgresAdapter } from "./adapters/PostgresAdapter";
|
|
4
|
-
export { Model } from "./Model";
|
|
5
|
-
export { QueryBuilder } from "./QueryBuilder";
|
|
6
|
-
export { BelongsTo } from "./relations/BelongsTo";
|
|
7
|
-
export { BelongsToMany } from "./relations/BelongsToMany";
|
|
8
|
-
export { HasMany } from "./relations/HasMany";
|
|
9
|
-
export { HasOne } from "./relations/HasOne";
|
|
10
|
-
export { Relation } from "./relations/Relation";
|
|
11
|
-
export { Macroable } from "./support/Macroable";
|
|
12
|
-
export type { ColumnDefinition, Connection, DatabaseAdapter, DatabaseConfig, JoinClause, OrderByClause, SelectOptions, WhereClause, } from "./types";
|
|
13
|
-
export * from "./extensions/MongoExtensions";
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare class Validator {
|
|
2
|
-
protected data: any;
|
|
3
|
-
protected rules: Record<string, string>;
|
|
4
|
-
protected errors: Record<string, string[]>;
|
|
5
|
-
constructor(data: any, rules: Record<string, string>);
|
|
6
|
-
static make(data: any, rules: Record<string, string>): Validator;
|
|
7
|
-
fails(): boolean;
|
|
8
|
-
passes(): boolean;
|
|
9
|
-
errors_(): Record<string, string[]>;
|
|
10
|
-
validate(): Record<string, any>;
|
|
11
|
-
protected addError(field: string, message: string): void;
|
|
12
|
-
}
|
|
File without changes
|