@forinda/kickjs 2.0.0 → 2.1.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/README.md +85 -584
- package/dist/adapter-BqGjZCSm.d.mts +122 -0
- package/dist/adapter-BqGjZCSm.d.mts.map +1 -0
- package/dist/app-module-CcEbAVtB.d.mts +33 -0
- package/dist/app-module-CcEbAVtB.d.mts.map +1 -0
- package/dist/application-DNHj-_UL.mjs +449 -0
- package/dist/application-DNHj-_UL.mjs.map +1 -0
- package/dist/bootstrap-DLEZaJ3b.mjs +205 -0
- package/dist/bootstrap-DLEZaJ3b.mjs.map +1 -0
- package/dist/{core/cache.d.ts → cache-DJeMaGqb.d.mts} +33 -31
- package/dist/cache-DJeMaGqb.d.mts.map +1 -0
- package/dist/chunk-C5Qp-JxE.mjs +15 -0
- package/dist/container-nBSIhyqV.d.mts +141 -0
- package/dist/container-nBSIhyqV.d.mts.map +1 -0
- package/dist/core/adapter.d.mts +3 -0
- package/dist/core/adapter.mjs +11 -0
- package/dist/core/app-module.d.mts +3 -0
- package/dist/core/app-module.mjs +11 -0
- package/dist/core/cache.d.mts +3 -0
- package/dist/core/cache.mjs +113 -0
- package/dist/core/cache.mjs.map +1 -0
- package/dist/core/container.d.mts +3 -0
- package/dist/core/container.mjs +426 -0
- package/dist/core/container.mjs.map +1 -0
- package/dist/core/cron.d.mts +3 -0
- package/dist/core/cron.mjs +42 -0
- package/dist/core/cron.mjs.map +1 -0
- package/dist/core/decorators.d.mts +3 -0
- package/dist/core/decorators.mjs +213 -0
- package/dist/core/decorators.mjs.map +1 -0
- package/dist/core/errors.d.mts +3 -0
- package/dist/core/errors.mjs +97 -0
- package/dist/core/errors.mjs.map +1 -0
- package/dist/core/interfaces.d.mts +3 -0
- package/dist/core/interfaces.mjs +44 -0
- package/dist/core/interfaces.mjs.map +1 -0
- package/dist/core/logger.d.mts +3 -0
- package/dist/core/logger.mjs +217 -0
- package/dist/core/logger.mjs.map +1 -0
- package/dist/core/path.d.mts +3 -0
- package/dist/core/path.mjs +45 -0
- package/dist/core/path.mjs.map +1 -0
- package/dist/core/plugin.d.mts +3 -0
- package/dist/core/plugin.mjs +11 -0
- package/dist/core/reactivity.d.mts +3 -0
- package/dist/core/reactivity.mjs +189 -0
- package/dist/core/reactivity.mjs.map +1 -0
- package/dist/core-BL_H8fEZ.mjs +121 -0
- package/dist/core-BL_H8fEZ.mjs.map +1 -0
- package/dist/{core/cron.d.ts → cron-RKhH5TOd.d.mts} +16 -14
- package/dist/cron-RKhH5TOd.d.mts.map +1 -0
- package/dist/decorators-CQ93ak6Z.d.mts +154 -0
- package/dist/decorators-CQ93ak6Z.d.mts.map +1 -0
- package/dist/errors-te5Km00o.d.mts +68 -0
- package/dist/errors-te5Km00o.d.mts.map +1 -0
- package/dist/http/application.d.mts +220 -0
- package/dist/http/application.d.mts.map +1 -0
- package/dist/http/application.mjs +12 -0
- package/dist/http/bootstrap.d.mts +43 -0
- package/dist/http/bootstrap.d.mts.map +1 -0
- package/dist/http/bootstrap.mjs +12 -0
- package/dist/http/context.d.mts +131 -0
- package/dist/http/context.d.mts.map +1 -0
- package/dist/http/context.mjs +220 -0
- package/dist/http/context.mjs.map +1 -0
- package/dist/http/middleware/cors.d.mts +48 -0
- package/dist/http/middleware/cors.d.mts.map +1 -0
- package/dist/http/middleware/cors.mjs +83 -0
- package/dist/http/middleware/cors.mjs.map +1 -0
- package/dist/http/middleware/csrf.d.mts +52 -0
- package/dist/http/middleware/csrf.d.mts.map +1 -0
- package/dist/http/middleware/csrf.mjs +72 -0
- package/dist/http/middleware/csrf.mjs.map +1 -0
- package/dist/http/middleware/error-handler.d.mts +11 -0
- package/dist/http/middleware/error-handler.d.mts.map +1 -0
- package/dist/http/middleware/error-handler.mjs +52 -0
- package/dist/http/middleware/error-handler.mjs.map +1 -0
- package/dist/http/middleware/helmet.d.mts +41 -0
- package/dist/http/middleware/helmet.d.mts.map +1 -0
- package/dist/http/middleware/helmet.mjs +51 -0
- package/dist/http/middleware/helmet.mjs.map +1 -0
- package/dist/http/middleware/rate-limit.d.mts +56 -0
- package/dist/http/middleware/rate-limit.d.mts.map +1 -0
- package/dist/http/middleware/rate-limit.mjs +101 -0
- package/dist/http/middleware/rate-limit.mjs.map +1 -0
- package/dist/http/middleware/request-id.d.mts +10 -0
- package/dist/http/middleware/request-id.d.mts.map +1 -0
- package/dist/http/middleware/request-id.mjs +26 -0
- package/dist/http/middleware/request-id.mjs.map +1 -0
- package/dist/http/middleware/request-logger.d.mts +32 -0
- package/dist/http/middleware/request-logger.d.mts.map +1 -0
- package/dist/http/middleware/request-logger.mjs +49 -0
- package/dist/http/middleware/request-logger.mjs.map +1 -0
- package/dist/http/middleware/session.d.mts +67 -0
- package/dist/http/middleware/session.d.mts.map +1 -0
- package/dist/http/middleware/session.mjs +152 -0
- package/dist/http/middleware/session.mjs.map +1 -0
- package/dist/http/middleware/spa.d.mts +101 -0
- package/dist/http/middleware/spa.d.mts.map +1 -0
- package/dist/http/middleware/spa.mjs +108 -0
- package/dist/http/middleware/spa.mjs.map +1 -0
- package/dist/http/middleware/{upload.d.ts → upload.d.mts} +21 -17
- package/dist/http/middleware/upload.d.mts.map +1 -0
- package/dist/http/middleware/upload.mjs +191 -0
- package/dist/http/middleware/upload.mjs.map +1 -0
- package/dist/http/middleware/validate.d.mts +18 -0
- package/dist/http/middleware/validate.d.mts.map +1 -0
- package/dist/http/middleware/validate.mjs +62 -0
- package/dist/http/middleware/validate.mjs.map +1 -0
- package/dist/http/middleware/views.d.mts +62 -0
- package/dist/http/middleware/views.d.mts.map +1 -0
- package/dist/http/middleware/views.mjs +65 -0
- package/dist/http/middleware/views.mjs.map +1 -0
- package/dist/http/query/index.d.mts +3 -0
- package/dist/http/query/index.mjs +12 -0
- package/dist/http/{router-builder.d.ts → router-builder.d.mts} +9 -5
- package/dist/http/router-builder.d.mts.map +1 -0
- package/dist/http/router-builder.mjs +67 -0
- package/dist/http/router-builder.mjs.map +1 -0
- package/dist/index-C0gbnpSg.d.mts +107 -0
- package/dist/index-C0gbnpSg.d.mts.map +1 -0
- package/dist/index-Cls52etj.d.mts +148 -0
- package/dist/index-Cls52etj.d.mts.map +1 -0
- package/dist/index.d.mts +133 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +126 -0
- package/dist/index.mjs.map +1 -0
- package/dist/interfaces-D-48zotH.d.mts +52 -0
- package/dist/interfaces-D-48zotH.d.mts.map +1 -0
- package/dist/logger-Dzj-TF0t.d.mts +119 -0
- package/dist/logger-Dzj-TF0t.d.mts.map +1 -0
- package/dist/metadata-fmvikBA0.mjs +76 -0
- package/dist/metadata-fmvikBA0.mjs.map +1 -0
- package/dist/{core/path.d.ts → path-LmwfhfyH.d.mts} +7 -3
- package/dist/path-LmwfhfyH.d.mts.map +1 -0
- package/dist/plugin-DIoPIpSm.d.mts +95 -0
- package/dist/plugin-DIoPIpSm.d.mts.map +1 -0
- package/dist/query-7cdHF6ry.mjs +164 -0
- package/dist/query-7cdHF6ry.mjs.map +1 -0
- package/dist/{core/reactivity.d.ts → reactivity-BbS-99ow.d.mts} +21 -20
- package/dist/reactivity-BbS-99ow.d.mts.map +1 -0
- package/package.json +73 -43
- package/dist/chunk-DVVP7zzD.js +0 -7
- package/dist/core/adapter.d.ts +0 -109
- package/dist/core/adapter.d.ts.map +0 -1
- package/dist/core/adapter.js +0 -0
- package/dist/core/app-module.d.ts +0 -28
- package/dist/core/app-module.d.ts.map +0 -1
- package/dist/core/app-module.js +0 -0
- package/dist/core/cache.d.ts.map +0 -1
- package/dist/core/cache.js +0 -57
- package/dist/core/container.d.ts +0 -63
- package/dist/core/container.d.ts.map +0 -1
- package/dist/core/container.js +0 -117
- package/dist/core/cron.d.ts.map +0 -1
- package/dist/core/cron.js +0 -22
- package/dist/core/decorators.d.ts +0 -153
- package/dist/core/decorators.d.ts.map +0 -1
- package/dist/core/decorators.js +0 -141
- package/dist/core/errors.d.ts +0 -64
- package/dist/core/errors.d.ts.map +0 -1
- package/dist/core/errors.js +0 -67
- package/dist/core/index.d.ts +0 -14
- package/dist/core/index.d.ts.map +0 -1
- package/dist/core/interfaces.d.ts +0 -44
- package/dist/core/interfaces.d.ts.map +0 -1
- package/dist/core/interfaces.js +0 -25
- package/dist/core/logger.d.ts +0 -43
- package/dist/core/logger.d.ts.map +0 -1
- package/dist/core/logger.js +0 -54
- package/dist/core/path.d.ts.map +0 -1
- package/dist/core/path.js +0 -12
- package/dist/core/plugin.d.ts +0 -90
- package/dist/core/plugin.d.ts.map +0 -1
- package/dist/core/plugin.js +0 -0
- package/dist/core/reactivity.d.ts.map +0 -1
- package/dist/core/reactivity.js +0 -101
- package/dist/core-B6Okew3W.js +0 -7
- package/dist/http/application.d.ts +0 -103
- package/dist/http/application.d.ts.map +0 -1
- package/dist/http/application.js +0 -167
- package/dist/http/bootstrap.d.ts +0 -22
- package/dist/http/bootstrap.d.ts.map +0 -1
- package/dist/http/bootstrap.js +0 -40
- package/dist/http/context.d.ts +0 -129
- package/dist/http/context.d.ts.map +0 -1
- package/dist/http/context.js +0 -115
- package/dist/http/index.d.ts +0 -16
- package/dist/http/index.d.ts.map +0 -1
- package/dist/http/middleware/cors.d.ts +0 -43
- package/dist/http/middleware/cors.d.ts.map +0 -1
- package/dist/http/middleware/cors.js +0 -31
- package/dist/http/middleware/csrf.d.ts +0 -47
- package/dist/http/middleware/csrf.d.ts.map +0 -1
- package/dist/http/middleware/csrf.js +0 -25
- package/dist/http/middleware/error-handler.d.ts +0 -6
- package/dist/http/middleware/error-handler.d.ts.map +0 -1
- package/dist/http/middleware/error-handler.js +0 -37
- package/dist/http/middleware/helmet.d.ts +0 -36
- package/dist/http/middleware/helmet.d.ts.map +0 -1
- package/dist/http/middleware/helmet.js +0 -20
- package/dist/http/middleware/rate-limit.d.ts +0 -51
- package/dist/http/middleware/rate-limit.d.ts.map +0 -1
- package/dist/http/middleware/rate-limit.js +0 -46
- package/dist/http/middleware/request-id.d.ts +0 -5
- package/dist/http/middleware/request-id.d.ts.map +0 -1
- package/dist/http/middleware/request-id.js +0 -12
- package/dist/http/middleware/request-logger.d.ts +0 -27
- package/dist/http/middleware/request-logger.d.ts.map +0 -1
- package/dist/http/middleware/request-logger.js +0 -16
- package/dist/http/middleware/session.d.ts +0 -62
- package/dist/http/middleware/session.d.ts.map +0 -1
- package/dist/http/middleware/session.js +0 -76
- package/dist/http/middleware/spa.d.ts +0 -93
- package/dist/http/middleware/spa.d.ts.map +0 -1
- package/dist/http/middleware/spa.js +0 -52
- package/dist/http/middleware/upload.d.ts.map +0 -1
- package/dist/http/middleware/upload.js +0 -119
- package/dist/http/middleware/validate.d.ts +0 -13
- package/dist/http/middleware/validate.d.ts.map +0 -1
- package/dist/http/middleware/validate.js +0 -45
- package/dist/http/middleware/views.d.ts +0 -56
- package/dist/http/middleware/views.d.ts.map +0 -1
- package/dist/http/middleware/views.js +0 -18
- package/dist/http/query/index.d.ts +0 -4
- package/dist/http/query/index.d.ts.map +0 -1
- package/dist/http/query/index.js +0 -10
- package/dist/http/query/parse-query.d.ts +0 -44
- package/dist/http/query/parse-query.d.ts.map +0 -1
- package/dist/http/query/types.d.ts +0 -100
- package/dist/http/query/types.d.ts.map +0 -1
- package/dist/http/router-builder.d.ts.map +0 -1
- package/dist/http/router-builder.js +0 -37
- package/dist/index.d.ts +0 -25
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -103
- package/dist/query-Bym31XRp.js +0 -88
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"router-builder.d.ts","sourceRoot":"","sources":["../../src/http/router-builder.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAA;AACzB,OAAO,EAAE,MAAM,EAAkD,MAAM,SAAS,CAAA;AAYhF,0DAA0D;AAC1D,wBAAgB,iBAAiB,CAAC,eAAe,EAAE,GAAG,GAAG,MAAM,CAE9D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,eAAe,EAAE,GAAG,GAAG,MAAM,CAyDxD"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { METADATA as r } from "../core/interfaces.js";
|
|
2
|
-
import { Container as E } from "../core/container.js";
|
|
3
|
-
import "../core-B6Okew3W.js";
|
|
4
|
-
import { RequestContext as m } from "./context.js";
|
|
5
|
-
import { validate as g } from "./middleware/validate.js";
|
|
6
|
-
import { buildUploadMiddleware as w } from "./middleware/upload.js";
|
|
7
|
-
import "reflect-metadata";
|
|
8
|
-
import { Router as A } from "express";
|
|
9
|
-
function N(t) {
|
|
10
|
-
return Reflect.getMetadata(r.CONTROLLER_PATH, t) || "/";
|
|
11
|
-
}
|
|
12
|
-
function U(t) {
|
|
13
|
-
const s = A(), u = E.getInstance(), h = Reflect.getMetadata(r.ROUTES, t) || [], p = Reflect.getMetadata(r.CLASS_MIDDLEWARES, t) || [];
|
|
14
|
-
for (const e of h) {
|
|
15
|
-
const l = e.method.toLowerCase(), R = e.path || "/", M = Reflect.getMetadata(r.METHOD_MIDDLEWARES, t, e.handlerName) || [], o = [];
|
|
16
|
-
e.validation && o.push(g(e.validation));
|
|
17
|
-
const f = Reflect.getMetadata(r.FILE_UPLOAD, t, e.handlerName);
|
|
18
|
-
f && o.push(w(f));
|
|
19
|
-
for (const i of [...p, ...M]) o.push((c, n, a) => {
|
|
20
|
-
const d = new m(c, n, a);
|
|
21
|
-
Promise.resolve(i(d, a)).catch(a);
|
|
22
|
-
});
|
|
23
|
-
o.push(async (i, c, n) => {
|
|
24
|
-
const a = new m(i, c, n);
|
|
25
|
-
try {
|
|
26
|
-
await u.resolve(t)[e.handlerName](a);
|
|
27
|
-
} catch (d) {
|
|
28
|
-
n(d);
|
|
29
|
-
}
|
|
30
|
-
}), s[l](R, ...o);
|
|
31
|
-
}
|
|
32
|
-
return s;
|
|
33
|
-
}
|
|
34
|
-
export {
|
|
35
|
-
U as buildRoutes,
|
|
36
|
-
N as getControllerPath
|
|
37
|
-
};
|
package/dist/index.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @forinda/kickjs — unified KickJS framework package.
|
|
3
|
-
*
|
|
4
|
-
* Exports everything from core (DI, decorators, logger) and
|
|
5
|
-
* http (Express app, middleware, RequestContext, routing).
|
|
6
|
-
*/
|
|
7
|
-
export * from './core';
|
|
8
|
-
export { Application, type ApplicationOptions, type MiddlewareEntry } from './http/application';
|
|
9
|
-
export { bootstrap } from './http/bootstrap';
|
|
10
|
-
export { RequestContext } from './http/context';
|
|
11
|
-
export { buildRoutes, getControllerPath } from './http/router-builder';
|
|
12
|
-
export { requestId, REQUEST_ID_HEADER } from './http/middleware/request-id';
|
|
13
|
-
export { validate } from './http/middleware/validate';
|
|
14
|
-
export { notFoundHandler, errorHandler } from './http/middleware/error-handler';
|
|
15
|
-
export { csrf, type CsrfOptions } from './http/middleware/csrf';
|
|
16
|
-
export { requestLogger, type RequestLoggerOptions } from './http/middleware/request-logger';
|
|
17
|
-
export { helmet, type HelmetOptions } from './http/middleware/helmet';
|
|
18
|
-
export { cors, type CorsOptions } from './http/middleware/cors';
|
|
19
|
-
export { rateLimit, type RateLimitOptions, type RateLimitStore } from './http/middleware/rate-limit';
|
|
20
|
-
export { session, type SessionOptions, type SessionStore, type SessionData, type Session, } from './http/middleware/session';
|
|
21
|
-
export { upload, cleanupFiles, resolveMimeTypes, buildUploadMiddleware, type UploadOptions, } from './http/middleware/upload';
|
|
22
|
-
export { parseQuery, parseFilters, parseSort, parsePagination, parseSearchQuery, buildQueryParams, FILTER_OPERATORS, type FilterOperator, type FilterItem, type SortItem, type PaginationParams, type ParsedQuery, type QueryFieldConfig, type QueryBuilderAdapter, type PaginatedResponse, } from './http/query';
|
|
23
|
-
export { ViewAdapter, type ViewAdapterOptions } from './http/middleware/views';
|
|
24
|
-
export { SpaAdapter, type SpaAdapterOptions } from './http/middleware/spa';
|
|
25
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,cAAc,QAAQ,CAAA;AAGtB,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAE/F,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAE5C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE/C,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AAGtE,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAC3E,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AACrD,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AAC/E,OAAO,EAAE,IAAI,EAAE,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAE,KAAK,oBAAoB,EAAE,MAAM,kCAAkC,CAAA;AAC3F,OAAO,EAAE,MAAM,EAAE,KAAK,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACrE,OAAO,EAAE,IAAI,EAAE,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,EAAE,SAAS,EAAE,KAAK,gBAAgB,EAAE,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAA;AACpG,OAAO,EACL,OAAO,EACP,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,OAAO,GACb,MAAM,2BAA2B,CAAA;AAClC,OAAO,EACL,MAAM,EACN,YAAY,EACZ,gBAAgB,EAChB,qBAAqB,EACrB,KAAK,aAAa,GACnB,MAAM,0BAA0B,CAAA;AAGjC,OAAO,EACL,UAAU,EACV,YAAY,EACZ,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,GACvB,MAAM,cAAc,CAAA;AAGrB,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAC9E,OAAO,EAAE,UAAU,EAAE,KAAK,iBAAiB,EAAE,MAAM,uBAAuB,CAAA"}
|
package/dist/index.js
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { METADATA as o, Scope as e } from "./core/interfaces.js";
|
|
2
|
-
import { Container as i } from "./core/container.js";
|
|
3
|
-
import { ApiQueryParams as a, Autowired as p, Builder as s, Component as f, Controller as l, Delete as n, FileUpload as d, Get as u, Inject as c, Injectable as g, Middleware as C, Patch as P, Post as h, PostConstruct as A, Put as R, Repository as E, Service as v, Value as y, normalizeApiQueryParamsConfig as S } from "./core/decorators.js";
|
|
4
|
-
import { CRON_META as T, Cron as L, getCronJobs as M } from "./core/cron.js";
|
|
5
|
-
import { CacheEvict as w, Cacheable as F, MemoryCacheProvider as H, getCacheProvider as I, setCacheProvider as D } from "./core/cache.js";
|
|
6
|
-
import { Logger as j, createLogger as q, logger as x, rootLogger as O } from "./core/logger.js";
|
|
7
|
-
import { HttpException as z, HttpStatus as V } from "./core/errors.js";
|
|
8
|
-
import { joinPaths as G, normalizePath as J } from "./core/path.js";
|
|
9
|
-
import { computed as k, isRef as K, reactive as W, ref as X, toRefs as Y, unref as Z, watch as $ } from "./core/reactivity.js";
|
|
10
|
-
import "./core-B6Okew3W.js";
|
|
11
|
-
import { REQUEST_ID_HEADER as er, requestId as tr } from "./http/middleware/request-id.js";
|
|
12
|
-
import { errorHandler as mr, notFoundHandler as ar } from "./http/middleware/error-handler.js";
|
|
13
|
-
import { Application as sr } from "./http/application.js";
|
|
14
|
-
import { bootstrap as lr } from "./http/bootstrap.js";
|
|
15
|
-
import { a as dr, i as ur, n as cr, o as gr, r as Cr, s as Pr, t as hr } from "./query-Bym31XRp.js";
|
|
16
|
-
import { RequestContext as Rr } from "./http/context.js";
|
|
17
|
-
import { validate as vr } from "./http/middleware/validate.js";
|
|
18
|
-
import { buildUploadMiddleware as Sr, cleanupFiles as br, resolveMimeTypes as Tr, upload as Lr } from "./http/middleware/upload.js";
|
|
19
|
-
import { buildRoutes as Qr, getControllerPath as wr } from "./http/router-builder.js";
|
|
20
|
-
import { csrf as Hr } from "./http/middleware/csrf.js";
|
|
21
|
-
import { requestLogger as Dr } from "./http/middleware/request-logger.js";
|
|
22
|
-
import { helmet as jr } from "./http/middleware/helmet.js";
|
|
23
|
-
import { cors as xr } from "./http/middleware/cors.js";
|
|
24
|
-
import { rateLimit as Ur } from "./http/middleware/rate-limit.js";
|
|
25
|
-
import { session as Vr } from "./http/middleware/session.js";
|
|
26
|
-
import { ViewAdapter as Gr } from "./http/middleware/views.js";
|
|
27
|
-
import { SpaAdapter as Nr } from "./http/middleware/spa.js";
|
|
28
|
-
export {
|
|
29
|
-
a as ApiQueryParams,
|
|
30
|
-
sr as Application,
|
|
31
|
-
p as Autowired,
|
|
32
|
-
s as Builder,
|
|
33
|
-
T as CRON_META,
|
|
34
|
-
w as CacheEvict,
|
|
35
|
-
F as Cacheable,
|
|
36
|
-
f as Component,
|
|
37
|
-
i as Container,
|
|
38
|
-
l as Controller,
|
|
39
|
-
L as Cron,
|
|
40
|
-
n as Delete,
|
|
41
|
-
Pr as FILTER_OPERATORS,
|
|
42
|
-
d as FileUpload,
|
|
43
|
-
u as Get,
|
|
44
|
-
z as HttpException,
|
|
45
|
-
V as HttpStatus,
|
|
46
|
-
c as Inject,
|
|
47
|
-
g as Injectable,
|
|
48
|
-
j as Logger,
|
|
49
|
-
o as METADATA,
|
|
50
|
-
H as MemoryCacheProvider,
|
|
51
|
-
C as Middleware,
|
|
52
|
-
P as Patch,
|
|
53
|
-
h as Post,
|
|
54
|
-
A as PostConstruct,
|
|
55
|
-
R as Put,
|
|
56
|
-
er as REQUEST_ID_HEADER,
|
|
57
|
-
E as Repository,
|
|
58
|
-
Rr as RequestContext,
|
|
59
|
-
e as Scope,
|
|
60
|
-
v as Service,
|
|
61
|
-
Nr as SpaAdapter,
|
|
62
|
-
y as Value,
|
|
63
|
-
Gr as ViewAdapter,
|
|
64
|
-
lr as bootstrap,
|
|
65
|
-
hr as buildQueryParams,
|
|
66
|
-
Qr as buildRoutes,
|
|
67
|
-
Sr as buildUploadMiddleware,
|
|
68
|
-
br as cleanupFiles,
|
|
69
|
-
k as computed,
|
|
70
|
-
xr as cors,
|
|
71
|
-
q as createLogger,
|
|
72
|
-
Hr as csrf,
|
|
73
|
-
mr as errorHandler,
|
|
74
|
-
I as getCacheProvider,
|
|
75
|
-
wr as getControllerPath,
|
|
76
|
-
M as getCronJobs,
|
|
77
|
-
jr as helmet,
|
|
78
|
-
K as isRef,
|
|
79
|
-
G as joinPaths,
|
|
80
|
-
x as logger,
|
|
81
|
-
S as normalizeApiQueryParamsConfig,
|
|
82
|
-
J as normalizePath,
|
|
83
|
-
ar as notFoundHandler,
|
|
84
|
-
cr as parseFilters,
|
|
85
|
-
Cr as parsePagination,
|
|
86
|
-
ur as parseQuery,
|
|
87
|
-
dr as parseSearchQuery,
|
|
88
|
-
gr as parseSort,
|
|
89
|
-
Ur as rateLimit,
|
|
90
|
-
W as reactive,
|
|
91
|
-
X as ref,
|
|
92
|
-
tr as requestId,
|
|
93
|
-
Dr as requestLogger,
|
|
94
|
-
Tr as resolveMimeTypes,
|
|
95
|
-
O as rootLogger,
|
|
96
|
-
Vr as session,
|
|
97
|
-
D as setCacheProvider,
|
|
98
|
-
Y as toRefs,
|
|
99
|
-
Z as unref,
|
|
100
|
-
Lr as upload,
|
|
101
|
-
vr as validate,
|
|
102
|
-
$ as watch
|
|
103
|
-
};
|
package/dist/query-Bym31XRp.js
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
var b = /* @__PURE__ */ new Set([
|
|
2
|
-
"eq",
|
|
3
|
-
"neq",
|
|
4
|
-
"gt",
|
|
5
|
-
"gte",
|
|
6
|
-
"lt",
|
|
7
|
-
"lte",
|
|
8
|
-
"between",
|
|
9
|
-
"in",
|
|
10
|
-
"contains",
|
|
11
|
-
"starts",
|
|
12
|
-
"ends"
|
|
13
|
-
]), h = 200, u = 1, p = 20, g = 100;
|
|
14
|
-
function m(t, i) {
|
|
15
|
-
if (!t) return [];
|
|
16
|
-
const e = Array.isArray(t) ? t : [t], l = [], c = i ? new Set(i) : null;
|
|
17
|
-
for (const n of e) {
|
|
18
|
-
const o = n.indexOf(":");
|
|
19
|
-
if (o === -1) continue;
|
|
20
|
-
const s = n.indexOf(":", o + 1);
|
|
21
|
-
if (s === -1) continue;
|
|
22
|
-
const r = n.slice(0, o), a = n.slice(o + 1, s), f = n.slice(s + 1);
|
|
23
|
-
!r || !f || b.has(a) && (c && !c.has(r) || l.push({
|
|
24
|
-
field: r,
|
|
25
|
-
operator: a,
|
|
26
|
-
value: f
|
|
27
|
-
}));
|
|
28
|
-
}
|
|
29
|
-
return l;
|
|
30
|
-
}
|
|
31
|
-
function A(t, i) {
|
|
32
|
-
if (!t) return [];
|
|
33
|
-
const e = Array.isArray(t) ? t : [t], l = [], c = i ? new Set(i) : null;
|
|
34
|
-
for (const n of e) {
|
|
35
|
-
const o = n.lastIndexOf(":");
|
|
36
|
-
if (o === -1) continue;
|
|
37
|
-
const s = n.slice(0, o), r = n.slice(o + 1).toLowerCase();
|
|
38
|
-
s && (r !== "asc" && r !== "desc" || c && !c.has(s) || l.push({
|
|
39
|
-
field: s,
|
|
40
|
-
direction: r
|
|
41
|
-
}));
|
|
42
|
-
}
|
|
43
|
-
return l;
|
|
44
|
-
}
|
|
45
|
-
function v(t) {
|
|
46
|
-
let i = typeof t.page == "string" ? parseInt(t.page, 10) : t.page ?? u, e = typeof t.limit == "string" ? parseInt(t.limit, 10) : t.limit ?? p;
|
|
47
|
-
return (isNaN(i) || i < 1) && (i = u), (isNaN(e) || e < 1) && (e = p), e > g && (e = g), {
|
|
48
|
-
page: i,
|
|
49
|
-
limit: e,
|
|
50
|
-
offset: (i - 1) * e
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
function d(t) {
|
|
54
|
-
return t ? t.trim().slice(0, h) : "";
|
|
55
|
-
}
|
|
56
|
-
function y(t) {
|
|
57
|
-
if (t)
|
|
58
|
-
return "columns" in t && t.columns && typeof t.columns == "object" ? {
|
|
59
|
-
filterable: Object.keys(t.columns),
|
|
60
|
-
sortable: t.sortable ? Object.keys(t.sortable) : void 0,
|
|
61
|
-
searchable: void 0
|
|
62
|
-
} : t;
|
|
63
|
-
}
|
|
64
|
-
function I(t, i) {
|
|
65
|
-
const e = y(i);
|
|
66
|
-
return {
|
|
67
|
-
filters: m(t.filter, e?.filterable),
|
|
68
|
-
sort: A(t.sort, e?.sortable),
|
|
69
|
-
pagination: v({
|
|
70
|
-
page: t.page,
|
|
71
|
-
limit: t.limit
|
|
72
|
-
}),
|
|
73
|
-
search: d(t.q)
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
function E(t) {
|
|
77
|
-
const i = {};
|
|
78
|
-
return t.filters?.length && (i.filter = t.filters.map((e) => `${e.field}:${e.operator}:${e.value}`)), t.sort?.length && (i.sort = t.sort.map((e) => `${e.field}:${e.direction}`)), t.pagination && (i.page = t.pagination.page, i.limit = t.pagination.limit), t.search && (i.q = t.search), i;
|
|
79
|
-
}
|
|
80
|
-
export {
|
|
81
|
-
d as a,
|
|
82
|
-
I as i,
|
|
83
|
-
m as n,
|
|
84
|
-
A as o,
|
|
85
|
-
v as r,
|
|
86
|
-
b as s,
|
|
87
|
-
E as t
|
|
88
|
-
};
|