@opengis/fcore 0.0.1-beta.0 → 0.0.1-beta.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/LICENSE +3 -3
- package/README.md +71 -71
- package/dist/config.d.ts +1 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +1 -1
- package/dist/context.d.ts +4 -4
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +1 -1
- package/dist/errors.js +1 -1
- package/dist/fastify.d.ts.map +1 -1
- package/dist/fastify.js +1 -1
- package/dist/fcore.js +1 -1
- package/dist/index.js +1 -1
- package/dist/migrations/cli.js +1 -1
- package/dist/migrations/runner.d.ts.map +1 -1
- package/dist/migrations/runner.js +1 -1
- package/dist/modules/auth/index.js +1 -1
- package/dist/modules/auth/route.js +1 -1
- package/dist/modules/auth/schema.js +1 -1
- package/dist/modules/auth/services/get-current-user.js +1 -1
- package/dist/modules/auth/services/login.js +1 -1
- package/dist/modules/auth/services/logout.js +1 -1
- package/dist/modules/auth/services/verify-two-factor.js +1 -1
- package/dist/modules/auth/services/verifyPassword.js +1 -1
- package/dist/modules/file/index.js +1 -1
- package/dist/modules/file/route.js +1 -1
- package/dist/modules/file/schema.js +1 -1
- package/dist/modules/file/services/get-file.js +1 -1
- package/dist/modules/file/services/resize-file.js +1 -1
- package/dist/modules/file/services/upload-file.d.ts.map +1 -1
- package/dist/modules/file/services/upload-file.js +1 -1
- package/dist/modules/resource/index.js +1 -1
- package/dist/modules/resource/route.js +1 -1
- package/dist/modules/resource/schema.js +1 -1
- package/dist/modules/resource/services/add-note.d.ts.map +1 -1
- package/dist/modules/resource/services/add-note.js +1 -1
- package/dist/modules/resource/services/add-resource-file.d.ts.map +1 -1
- package/dist/modules/resource/services/add-resource-file.js +1 -1
- package/dist/modules/resource/services/create-resource-relation.js +1 -1
- package/dist/modules/resource/services/create-resource.js +1 -1
- package/dist/modules/resource/services/delete-resource-relation.js +1 -1
- package/dist/modules/resource/services/delete-resource.js +1 -1
- package/dist/modules/resource/services/export-resource.js +1 -1
- package/dist/modules/resource/services/get-resource.js +1 -1
- package/dist/modules/resource/services/list-children.js +1 -1
- package/dist/modules/resource/services/list-resource-relation.js +1 -1
- package/dist/modules/resource/services/list-resources.js +1 -1
- package/dist/modules/resource/services/search-resource.js +1 -1
- package/dist/modules/resource/services/suggest-resource.js +1 -1
- package/dist/modules/resource/services/update-resource.js +1 -1
- package/dist/modules/resource/services/upload-resource-file.d.ts.map +1 -1
- package/dist/modules/resource/services/upload-resource-file.js +1 -1
- package/dist/modules/system/index.js +1 -1
- package/dist/modules/system/route.js +1 -1
- package/dist/modules/system/schema.js +1 -1
- package/dist/modules/system/services/check-system.d.ts.map +1 -1
- package/dist/modules/system/services/check-system.js +1 -1
- package/dist/modules/system/services/get-api-list.js +1 -1
- package/dist/modules/system/services/get-audit-log.d.ts.map +1 -1
- package/dist/modules/system/services/get-audit-log.js +1 -1
- package/dist/modules/system/services/get-dictionary.js +1 -1
- package/dist/modules/system/services/get-system-log.d.ts.map +1 -1
- package/dist/modules/system/services/get-system-log.js +1 -1
- package/dist/modules/system/services/get-system-settings.d.ts.map +1 -1
- package/dist/modules/system/services/get-system-settings.js +1 -1
- package/dist/modules/system/services/list-dictionaries.js +1 -1
- package/dist/modules/system/services/update-system-settings.d.ts.map +1 -1
- package/dist/modules/system/services/update-system-settings.js +1 -1
- package/dist/modules/utils/get-user-permissions.d.ts.map +1 -1
- package/dist/modules/utils/get-user-permissions.js +1 -1
- package/dist/modules/utils/require-admin.d.ts +1 -1
- package/dist/modules/utils/require-admin.d.ts.map +1 -1
- package/dist/modules/utils/require-admin.js +1 -1
- package/dist/modules/utils/safe-user.js +1 -1
- package/dist/modules/utils/unsupported.js +1 -1
- package/dist/plugins/audit/audit.d.ts +2 -2
- package/dist/plugins/audit/audit.d.ts.map +1 -1
- package/dist/plugins/audit/audit.js +1 -1
- package/dist/plugins/audit/index.js +1 -1
- package/dist/plugins/audit/services/write-audit.d.ts +2 -2
- package/dist/plugins/audit/services/write-audit.d.ts.map +1 -1
- package/dist/plugins/audit/services/write-audit.js +1 -1
- package/dist/plugins/auth/index.js +1 -1
- package/dist/plugins/dictionary.d.ts.map +1 -1
- package/dist/plugins/dictionary.js +1 -1
- package/dist/plugins/file.d.ts +1 -1
- package/dist/plugins/file.d.ts.map +1 -1
- package/dist/plugins/file.js +1 -1
- package/dist/plugins/index.js +1 -1
- package/dist/plugins/logger/index.d.ts +9 -4
- package/dist/plugins/logger/index.d.ts.map +1 -1
- package/dist/plugins/logger/index.js +1 -1
- package/dist/plugins/pg.d.ts +1 -1
- package/dist/plugins/pg.d.ts.map +1 -1
- package/dist/plugins/pg.js +1 -1
- package/dist/plugins/redis.js +1 -1
- package/dist/plugins/resource/index.js +1 -1
- package/dist/plugins/resource/resource.js +1 -1
- package/dist/plugins/resource/resource.registry.js +1 -1
- package/dist/plugins/resource/resource.types.d.ts +2 -2
- package/dist/plugins/resource/resource.types.d.ts.map +1 -1
- package/dist/plugins/resource/services/create.js +1 -1
- package/dist/plugins/resource/services/delete.js +1 -1
- package/dist/plugins/resource/services/find-one.js +1 -1
- package/dist/plugins/resource/services/find.js +1 -1
- package/dist/plugins/resource/services/update.js +1 -1
- package/dist/plugins/resource/utils/fields.js +1 -1
- package/dist/plugins/resource/utils/filters.js +1 -1
- package/dist/plugins/resource/utils/permissions.js +1 -1
- package/dist/plugins/resource/utils/sort.js +1 -1
- package/dist/plugins/resource/utils/sql.js +1 -1
- package/dist/shared/getIP.js +1 -1
- package/migrations/20260903120000_core_schema.sql +256 -0
- package/migrations/20260903130000_move_notes_files_to_admin.sql +18 -0
- package/migrations/20260903140000_settings_nulls_not_distinct.sql +19 -0
- package/package.json +87 -86
- package/dist/plugins/logger/checkUserAccess.d.ts +0 -11
- package/dist/plugins/logger/checkUserAccess.d.ts.map +0 -1
- package/dist/plugins/logger/checkUserAccess.js +0 -1
- package/dist/plugins/logger/createFileStream.d.ts +0 -3
- package/dist/plugins/logger/createFileStream.d.ts.map +0 -1
- package/dist/plugins/logger/createFileStream.js +0 -1
- package/dist/plugins/logger/createLogger.d.ts +0 -9
- package/dist/plugins/logger/createLogger.d.ts.map +0 -1
- package/dist/plugins/logger/createLogger.js +0 -1
- package/dist/plugins/logger/errorStatus.d.ts +0 -2
- package/dist/plugins/logger/errorStatus.d.ts.map +0 -1
- package/dist/plugins/logger/errorStatus.js +0 -1
- package/dist/plugins/logger/getHooks.d.ts +0 -5
- package/dist/plugins/logger/getHooks.d.ts.map +0 -1
- package/dist/plugins/logger/getHooks.js +0 -1
- package/dist/plugins/logger/getRootDir.d.ts +0 -3
- package/dist/plugins/logger/getRootDir.d.ts.map +0 -1
- package/dist/plugins/logger/getRootDir.js +0 -1
- package/dist/plugins/logger/labels.d.ts +0 -3
- package/dist/plugins/logger/labels.d.ts.map +0 -1
- package/dist/plugins/logger/labels.js +0 -1
- package/dist/plugins/logger/serializers.d.ts +0 -14
- package/dist/plugins/logger/serializers.d.ts.map +0 -1
- package/dist/plugins/logger/serializers.js +0 -1
- package/dist/plugins/logger/timestampWithTimeZone.d.ts +0 -2
- package/dist/plugins/logger/timestampWithTimeZone.d.ts.map +0 -1
- package/dist/plugins/logger/timestampWithTimeZone.js +0 -1
package/LICENSE
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
Copyright (c) OpenGIS. All rights reserved.
|
|
2
|
-
|
|
3
|
-
Proprietary and confidential.
|
|
1
|
+
Copyright (c) OpenGIS. All rights reserved.
|
|
2
|
+
|
|
3
|
+
Proprietary and confidential.
|
package/README.md
CHANGED
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
# @opengis/fcore
|
|
2
|
-
|
|
3
|
-
Reusable backend foundation for OpenGIS Node.js applications: config, typed application context, PostgreSQL, Redis, S3 file storage, audit, trusted Resource CRUD, Core modules, Fastify integration and SQL migration runner.
|
|
4
|
-
|
|
5
|
-
## Install
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install @opengis/fcore
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Bootstrap
|
|
12
|
-
|
|
13
|
-
```ts
|
|
14
|
-
import { createFCore } from '@opengis/fcore';
|
|
15
|
-
import resources from './resources/index.js';
|
|
16
|
-
|
|
17
|
-
export const ctx = await createFCore({ resources });
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
```ts
|
|
21
|
-
import Fastify from 'fastify';
|
|
22
|
-
import fcoreFastify from '@opengis/fcore/fastify';
|
|
23
|
-
import { ctx } from './app.js';
|
|
24
|
-
|
|
25
|
-
const app = Fastify();
|
|
26
|
-
await app.register(fcoreFastify, { ctx });
|
|
27
|
-
await app.listen({ port: ctx.config.port });
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## Resource
|
|
31
|
-
|
|
32
|
-
All dynamic table/column identifiers come from registered `ResourceContract` metadata. Values are SQL parameters.
|
|
33
|
-
|
|
34
|
-
## Migrations
|
|
35
|
-
|
|
36
|
-
Project SQL files stay in `./migrations`. Build the package/application, then run `fcore-migrate` or import `runMigrations()`.
|
|
37
|
-
|
|
38
|
-
## Module service convention
|
|
39
|
-
|
|
40
|
-
Module services are plain async functions with the canonical `service(params, ctx)` signature. `ctx` is passed explicitly from `fastify.ts` to each module `route.ts`; there is no `service.ts` or `createService()` factory.
|
|
41
|
-
|
|
42
|
-
## Structure
|
|
43
|
-
|
|
44
|
-
```bash
|
|
45
|
-
@opengis/fcore
|
|
46
|
-
├── src/
|
|
47
|
-
│ ├── plugins/
|
|
48
|
-
│ │ ├── logger/
|
|
49
|
-
│ │ ├── redis/
|
|
50
|
-
│ │ ├── pg/
|
|
51
|
-
│ │ ├── file/
|
|
52
|
-
│ │ ├── audit/
|
|
53
|
-
│ │ └── resource/
|
|
54
|
-
│ ├── modules/
|
|
55
|
-
│ │ ├── auth/
|
|
56
|
-
│ │ ├── access/
|
|
57
|
-
│ │ ├── resource/
|
|
58
|
-
│ │ ├── file/
|
|
59
|
-
│ │ ├── template/
|
|
60
|
-
│ │ └── system/
|
|
61
|
-
│ ├── migrations/
|
|
62
|
-
│ ├── config.ts # loadConfig
|
|
63
|
-
│ ├── context.ts # createContext, set, get
|
|
64
|
-
│ ├── errors.ts # standard Errors
|
|
65
|
-
│ ├── fastify.ts # fastify Plugins
|
|
66
|
-
│ ├── fcore.ts # createFcore
|
|
67
|
-
│ └── index.ts # export type, methods, etc
|
|
68
|
-
├── test/
|
|
69
|
-
├── engineering/
|
|
70
|
-
├── package.json
|
|
71
|
-
└── tsconfig.json
|
|
1
|
+
# @opengis/fcore
|
|
2
|
+
|
|
3
|
+
Reusable backend foundation for OpenGIS Node.js applications: config, typed application context, PostgreSQL, Redis, S3 file storage, audit, trusted Resource CRUD, Core modules, Fastify integration and SQL migration runner.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @opengis/fcore
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Bootstrap
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import { createFCore } from '@opengis/fcore';
|
|
15
|
+
import resources from './resources/index.js';
|
|
16
|
+
|
|
17
|
+
export const ctx = await createFCore({ resources });
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
import Fastify from 'fastify';
|
|
22
|
+
import fcoreFastify from '@opengis/fcore/fastify';
|
|
23
|
+
import { ctx } from './app.js';
|
|
24
|
+
|
|
25
|
+
const app = Fastify();
|
|
26
|
+
await app.register(fcoreFastify, { ctx });
|
|
27
|
+
await app.listen({ port: ctx.config.port });
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Resource
|
|
31
|
+
|
|
32
|
+
All dynamic table/column identifiers come from registered `ResourceContract` metadata. Values are SQL parameters.
|
|
33
|
+
|
|
34
|
+
## Migrations
|
|
35
|
+
|
|
36
|
+
Project SQL files stay in `./migrations`. Build the package/application, then run `fcore-migrate` or import `runMigrations()`.
|
|
37
|
+
|
|
38
|
+
## Module service convention
|
|
39
|
+
|
|
40
|
+
Module services are plain async functions with the canonical `service(params, ctx)` signature. `ctx` is passed explicitly from `fastify.ts` to each module `route.ts`; there is no `service.ts` or `createService()` factory.
|
|
41
|
+
|
|
42
|
+
## Structure
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
@opengis/fcore
|
|
46
|
+
├── src/
|
|
47
|
+
│ ├── plugins/
|
|
48
|
+
│ │ ├── logger/
|
|
49
|
+
│ │ ├── redis/
|
|
50
|
+
│ │ ├── pg/
|
|
51
|
+
│ │ ├── file/
|
|
52
|
+
│ │ ├── audit/
|
|
53
|
+
│ │ └── resource/
|
|
54
|
+
│ ├── modules/
|
|
55
|
+
│ │ ├── auth/
|
|
56
|
+
│ │ ├── access/
|
|
57
|
+
│ │ ├── resource/
|
|
58
|
+
│ │ ├── file/
|
|
59
|
+
│ │ ├── template/
|
|
60
|
+
│ │ └── system/
|
|
61
|
+
│ ├── migrations/
|
|
62
|
+
│ ├── config.ts # loadConfig
|
|
63
|
+
│ ├── context.ts # createContext, set, get
|
|
64
|
+
│ ├── errors.ts # standard Errors
|
|
65
|
+
│ ├── fastify.ts # fastify Plugins
|
|
66
|
+
│ ├── fcore.ts # createFcore
|
|
67
|
+
│ └── index.ts # export type, methods, etc
|
|
68
|
+
├── test/
|
|
69
|
+
├── engineering/
|
|
70
|
+
├── package.json
|
|
71
|
+
└── tsconfig.json
|
|
72
72
|
```
|
package/dist/config.d.ts
CHANGED
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,eAAe,CAAC;AACvB,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,KAAK,qBAAqB,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;AAIvD,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,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AC;QACnB,SAAS,EAAE,MAAM,CAAC;QAClB,IAAI,CAAC,EAAE;YACL,IAAI,EAAE;gBACJ,KAAK,EAAE,MAAM,CAAC;gBACd,UAAU,CAAC,EAAE,MAAM,CAAC;aACrB,CAAC;YACF,SAAS,CAAC,EAAE;gBACV,KAAK,EAAE,MAAM,CAAC;gBACd,UAAU,CAAC,EAAE,MAAM,CAAC;aACrB,CAAC;SACH,CAAC;QACF,aAAa,EAAE;YACb,MAAM,CAAC,EAAE,MAAM,CAAC;YAChB,IAAI,CAAC,EAAE,MAAM,CAAC;YACd,QAAQ,CAAC,EAAE,OAAO,CAAC;YACnB,MAAM,CAAC,EAAE,OAAO,CAAC;YACjB,QAAQ,CAAC,EAAE,OAAO,GAAG,qBAAqB,CAAC;SAC5C,CAAC;KACH,CAAC;CACH;AAED,iBAAS,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAItC;AAED,wBAAgB,UAAU,CAAC,SAAS,GAAE,OAAO,CAAC,WAAW,CAAM,GAAG,WAAW,CAsG5E;AACD,OAAO,EAAE,QAAQ,IAAI,UAAU,EAAE,CAAC"}
|
package/dist/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
(function(D,L){const pc=p,s=D();while(!![]){try{const X=parseInt(pc(0x1d4))/0x1*(-parseInt(pc(0x1df))/0x2)+parseInt(pc(0x1d5))/0x3+-parseInt(pc(0x1bd))/0x4+parseInt(pc(0x1b5))/0x5*(-parseInt(pc(0x1ad))/0x6)+-parseInt(pc(0x1aa))/0x7*(parseInt(pc(0x1ca))/0x8)+-parseInt(pc(0x1ae))/0x9*(-parseInt(pc(0x1c4))/0xa)+-parseInt(pc(0x1b7))/0xb*(-parseInt(pc(0x1c2))/0xc);if(X===L)break;else s['push'](s['shift']());}catch(M){s['push'](s['shift']());}}}(m,0x8d03c));function p(D,L){D=D-0x1a9;const s=m();let X=s[D];return X;}function m(){const pV=['HPtrG','XlCGa','path','localhost','1465kxPtMR','Mqeud','1075019FenPyn','strict','jLojK','ezvij','redis','xvSMb','3945372RoeIEu','us-east-1','XdkxQ','BDqKd','none','156USObRG','info','570JbsEnI','true','parse','cwd','Missing\x20environment\x20variable:\x20','EYIMx','200lgWeTM','DmIRh','/2factor','lrPxb','MhsvH','./storage','0ua4b1Tz21m47z13U3EO0uN9e0WE7hqRFbcZ72cbdWqZBzemf9cAU865xan1s81TdNpUKKfF','KQjae','ngxAT','wqBQg','69LojUHq','2871711noydrs','development','session_user_auth','map','includes','secure','/log','pQyXc','password','LGPXG','7220dPexUa','cvnPP','UyDAk','oFeCJ','sameSite','gFxXd','WDduh','/login','httpOnly','split','jxPEt','auth','x5y30KBsEKCENT04tu6549Vxx3No1ztJ2q2K8r79S59420RaZ5','xVUDo','Ch7QR4e73Jg0wx0xOjm','141771jTvpbL','logger','lax','17454WobbyT','149049yGjbOV','AwVEN','false'];m=function(){return pV;};return m();}import'dotenv/config';const DEFAULT_LOG_RESPONSE_STATUS_CODES=[0x193,0x199,0x19d,0x19f,0x1ad];function required(D){const pH=p,L=process.env[D];if(!L)throw new Error(pH(0x1c8)+D);return L;}export function loadConfig(s={}){const pA=p,X={'oFeCJ':pA(0x1d6),'KQjae':function(r,i){return r===i;},'XlCGa':pA(0x1c5),'jLojK':function(r,i){return r(i);},'lrPxb':pA(0x1b0),'wqBQg':pA(0x1cf),'AwVEN':pA(0x1dd),'xvSMb':function(r,i){return r===i;},'pQyXc':pA(0x1b4),'HPtrG':function(r,i){return r(i);},'MhsvH':function(r,i){return r(i);},'LGPXG':pA(0x1be),'DmIRh':function(r,i){return r!==i;},'jxPEt':function(r,i){return r(i);},'BDqKd':pA(0x1a9),'ezvij':pA(0x1eb),'xVUDo':pA(0x1d7),'EYIMx':pA(0x1d0),'XdkxQ':pA(0x1e6),'gFxXd':pA(0x1cc),'Mqeud':function(r,i){return r(i);},'UyDAk':function(r,i){return r(i);},'ngxAT':pA(0x1b8),'WDduh':pA(0x1c1),'cvnPP':function(r,i){return r(i);}},M={};M[pA(0x1b3)]='/',M[pA(0x1e7)]=!![],M[pA(0x1da)]=![],M[pA(0x1e3)]=!![];const u={'env':process.env.NODE_ENV??X[pA(0x1e2)],'debug':X[pA(0x1d1)](process.env.DEBUG,X[pA(0x1b2)]),'port':X[pA(0x1b9)](Number,process.env.PORT??0xbb8),'maxFileSize':+(process.env.MAX_FILE_SIZE||0x200),'rateLimit':{'disabled':X[pA(0x1d1)](process.env.RATE_LIMIT,X[pA(0x1cd)]),'max':+(process.env.RATE_LIMIT_MAX||0x64),'timeWindow':+(process.env.RATE_LIMIT_TIME_WINDOW||0xea60)},'storagePath':process.env.STORAGE_PATH??X[pA(0x1d3)],'redactionList':(process.env.REDACTION_LIST||X[pA(0x1af)])[pA(0x1e8)](','),'logger':{'level':process.env.LOG_LEVEL??pA(0x1c3),'responses':X[pA(0x1bc)](process.env.LOG_RESPONSES,pA(0x1c5))?!![]:![],'responseCodes':process.env.LOG_RESPONSE_STATUS_CODES?process.env.LOG_RESPONSE_STATUS_CODES[pA(0x1e8)](',')[pA(0x1d8)](r=>r-0x0):DEFAULT_LOG_RESPONSE_STATUS_CODES,'directory':process.env.LOG_DIRECTORY||process[pA(0x1c7)]()+pA(0x1db)},'pg':{'host':process.env.PG_HOST??X[pA(0x1dc)],'port':X[pA(0x1b1)](Number,process.env.PG_PORT??0x1538),'database':process.env.PG_DATABASE??'','user':process.env.PG_USER??'','password':process.env.PG_PASSWORD??''},'redis':{'host':process.env.REDIS_HOST??'','port':Number(process.env.REDIS_PORT??0x18eb),'password':process.env.REDIS_PASSWORD,'lazyConnect':!![],'db':process.env.REDIS_DB?X[pA(0x1ce)](Number,process.env.REDIS_DB):undefined},'s3':{'endpoint':process.env.S3_ENDPOINT,'region':process.env.S3_REGION??X[pA(0x1de)],'bucket':process.env.S3_BUCKET??'','accessKey':process.env.S3_ACCESS_KEY,'secretKey':process.env.S3_SECRET_KEY,'folder':process.env.S3_FOLDER,'forcePathStyle':X[pA(0x1cb)](process.env.S3_FORCE_PATH_STYLE,X[pA(0x1cd)]),'tokenSecret':process.env.FILE_TOKEN_SECRET,'tokenTtl':X[pA(0x1e9)](Number,process.env.FILE_TOKEN_TTL??0xe10)},'auth':{'accessToken':process.env.AUTH_ACCESS_TOKEN||X[pA(0x1c0)],'user':process.env.AUTH_USER?JSON[pA(0x1c6)](process.env.AUTH_USER):undefined,'sessionTimeout':+(process.env.AUTH_SESSION_TIMEOUT||0x258),'secret':process.env.AUTH_SECRET??X[pA(0x1ba)],'cookieName':process.env.AUTH_COOKIE_NAME??X[pA(0x1ec)],'jwtSecret':process.env.AUTH_JWT_SECRET??X[pA(0x1c9)],'link':{'base':{'login':process.env.AUTH_BASE_LINK_LOGIN??X[pA(0x1bf)],'afterLogin':process.env.AUTH_BASE_LINK_LOGIN??'/'},'twoFactor':{'login':process.env.AUTH_TWOFACTOR_LINK_LOGIN??X[pA(0x1e4)],'afterLogin':process.env.AUTH_TWOFACTOR_LINK_LOGIN??'/'}},'cookieOptions':process.env.AUTH_COOKIE_OPTIONS_DOMAIN?{'domain':process.env.AUTH_COOKIE_OPTIONS_DOMAIN,'path':process.env.AUTH_COOKIE_OPTIONS_PATH||'/','httpOnly':X[pA(0x1b6)](Boolean,process.env.AUTH_COOKIE_OPTIONS_HTTP_ONLY||X[pA(0x1b2)]),'secure':X[pA(0x1e1)](Boolean,process.env.AUTH_COOKIE_OPTIONS_SECURE||X[pA(0x1b2)]),'sameSite':process.env.AUTH_COOKIE_OPTIONS_SAME_SITE&&[pA(0x1ac),X[pA(0x1d2)],X[pA(0x1e5)]][pA(0x1d9)](process.env.AUTH_COOKIE_OPTIONS_SAME_SITE)?process.env.AUTH_COOKIE_OPTIONS_SAME_SITE:X[pA(0x1e0)](Boolean,process.env.AUTH_COOKIE_OPTIONS_SAME_SITE||X[pA(0x1b2)])}:M}},o={...u,...s};return o[pA(0x1ab)]={...u[pA(0x1ab)],...s[pA(0x1ab)]},o['pg']={...u['pg'],...s['pg']},o[pA(0x1bb)]={...u[pA(0x1bb)],...s[pA(0x1bb)]},o['s3']={...u['s3'],...s['s3']},o[pA(0x1ea)]={...u[pA(0x1ea)],...s[pA(0x1ea)]},o;}export{required as requireEnv};
|
package/dist/context.d.ts
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* Defines the typed dependency context shared by FCore routes and services.
|
|
3
3
|
*/
|
|
4
4
|
import type { FCoreConfig } from "./config.js";
|
|
5
|
-
import type { ExtendedLogger } from "./plugins/logger/index.js";
|
|
6
5
|
import type { RedisAdapter } from "./plugins/redis.js";
|
|
7
6
|
import type { DatabaseAdapter } from "./plugins/pg.js";
|
|
8
7
|
import type { FileAdapter } from "./plugins/file.js";
|
|
@@ -10,13 +9,14 @@ import type { ResourcePlugin } from "./plugins/resource/index.js";
|
|
|
10
9
|
import type { AuditPlugin } from "./plugins/audit/index.js";
|
|
11
10
|
import type { DictionaryPlugin } from "./plugins/dictionary.js";
|
|
12
11
|
import { AuthUser } from "./plugins/auth/auth.types.js";
|
|
12
|
+
import { AppLogger } from "./plugins/index.js";
|
|
13
13
|
export type User = AuthUser;
|
|
14
14
|
export interface AppContext {
|
|
15
15
|
config: FCoreConfig;
|
|
16
|
-
logger:
|
|
16
|
+
logger: AppLogger;
|
|
17
17
|
redis: RedisAdapter;
|
|
18
|
-
pg: DatabaseAdapter
|
|
19
|
-
file: FileAdapter
|
|
18
|
+
pg: DatabaseAdapter;
|
|
19
|
+
file: FileAdapter;
|
|
20
20
|
resource: ResourcePlugin;
|
|
21
21
|
audit: AuditPlugin;
|
|
22
22
|
dictionary: DictionaryPlugin;
|
package/dist/context.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src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(!![]){try{const X=-parseInt(r(0x150))/0x1+-parseInt(r(0x14c))/0x2+-parseInt(r(0x154))/0x3+-parseInt(r(0x153))/0x4*(-parseInt(r(0x14d))/0x5)+parseInt(r(0x147))/0x6*(-parseInt(r(0x14f))/0x7)+parseInt(r(0x148))/0x8*(-parseInt(r(0x14e))/0x9)+parseInt(r(0x156))/0xa;if(X===L)break;else s['push'](s['shift']());}catch(M){s['push'](s['shift']());}}}(m,0x6a798));let defaultContext;export function setContext(D){defaultContext=D;}function m(){const R=['271170MlhqCh','43456cavTRW','XbxDy','Application\x20context\x20is\x20not\x20initialized','logger','712634rdmfQt','8430cNqnuP','1116FaDzzH','119uWUTUb','251735qQRjgX','end','close','2044YjlKOF','1124397sUVcQe','redis','19993080CfssFQ','allSettled'];m=function(){return R;};return m();}export function getContext(){const i=p,L={};L[i(0x149)]=i(0x14a);const s=L;if(!defaultContext)throw new Error(s[i(0x149)]);return defaultContext;}function p(D,L){D=D-0x147;const s=m();let X=s[D];return X;}export function createContext(D){return{...D,async 'close'(){const q=p;await Promise[q(0x157)]([D[q(0x155)]?.[q(0x152)](),D['pg']?.[q(0x151)]()]),await D[q(0x14b)][q(0x152)]();}};}
|
package/dist/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var R=p;function m(){var t=['Authentication\x20required','84504RkMxtS','1804136hkbQms','3585WgAFCS','statusCode','427166zsmisL','125410qiVbqT','FORBIDDEN','Conflict','IeCqx','split','356uFyfvc','details','6VhfKhX','UaShV','NOT_FOUND','CONFLICT','551175StKnyt','UNAUTHORIZED','name','Operation\x20is\x20not\x20configured','306HSxIOT','3|4|0|1|2','134773NjhdpS','Not\x20found','OwOyy','code','BAD_REQUEST_ERROR','cuxCZ','VALIDATION_ERROR','ljjTb','Access\x20denied','UNSUPPORTED'];m=function(){return t;};return m();}(function(D,L){var q=p,s=D();while(!![]){try{var X=-parseInt(q(0x12e))/0x1+parseInt(q(0x13d))/0x2+parseInt(q(0x128))/0x3+-parseInt(q(0x122))/0x4*(-parseInt(q(0x13b))/0x5)+parseInt(q(0x124))/0x6*(-parseInt(q(0x139))/0x7)+parseInt(q(0x13a))/0x8+-parseInt(q(0x12c))/0x9*(parseInt(q(0x11d))/0xa);if(X===L)break;else s['push'](s['shift']());}catch(M){s['push'](s['shift']());}}}(m,0x1baf7));export class FCoreError extends Error{[R(0x131)];[R(0x13c)];[R(0x123)];constructor(L,s,X=0x1f4,M){var B=R,u={};u[B(0x120)]=B(0x12d);var o=u,r=o[B(0x120)][B(0x121)]('|'),i=0x0;while(!![]){switch(r[i++]){case'0':this[B(0x13c)]=X;continue;case'1':this[B(0x123)]=M;continue;case'2':this[B(0x12a)]=new.target.name;continue;case'3':super(s);continue;case'4':this[B(0x131)]=L;continue;}break;}}}export class BadRequestError extends FCoreError{constructor(L,s){var O=R,X={};X[O(0x125)]=O(0x132);var M=X;super(M[O(0x125)],L,0x190,s);}}export class UnauthorizedError extends FCoreError{constructor(L=R(0x138)){var h=R,s={};s[h(0x135)]=h(0x129);var X=s;super(X[h(0x135)],L,0x191);}}export class ForbiddenError extends FCoreError{constructor(D=R(0x136)){var g=R;super(g(0x11e),D,0x193);}}export class NotFoundError extends FCoreError{constructor(D=R(0x12f)){var J=R;super(J(0x126),D,0x194);}}export class ConflictError extends FCoreError{constructor(L=R(0x11f)){var S=R,s={};s[S(0x133)]=S(0x127);var X=s;super(X[S(0x133)],L,0x199);}}export class ValidationError extends FCoreError{constructor(L,s){var z=R,X={};X[z(0x130)]=z(0x134);var M=X;super(M[z(0x130)],L,0x1a6,s);}}function p(D,L){D=D-0x11d;var s=m();var X=s[D];return X;}export class UnsupportedError extends FCoreError{constructor(D=R(0x12b)){var l=R;super(l(0x137),D,0x1f5);}}
|
package/dist/fastify.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fastify.d.ts","sourceRoot":"","sources":["../src/fastify.ts"],"names":[],"mappings":"AAIA,OAAO,EAAgB,KAAK,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"fastify.d.ts","sourceRoot":"","sources":["../src/fastify.ts"],"names":[],"mappings":"AAIA,OAAO,EAAgB,KAAK,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAkB/C,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,UAAU,CAAC;CACjB"}
|
package/dist/fastify.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const j=p;(function(D,L){const T=p,s=D();while(!![]){try{const X=parseInt(T(0x1ed))/0x1+-parseInt(T(0x1d5))/0x2*(-parseInt(T(0x1d2))/0x3)+-parseInt(T(0x1be))/0x4*(-parseInt(T(0x1db))/0x5)+-parseInt(T(0x1e6))/0x6+parseInt(T(0x1ce))/0x7*(-parseInt(T(0x1c6))/0x8)+parseInt(T(0x1c5))/0x9+-parseInt(T(0x1e0))/0xa*(parseInt(T(0x1cb))/0xb);if(X===L)break;else s['push'](s['shift']());}catch(M){s['push'](s['shift']());}}}(m,0x2eaf3));import d from'fastify-plugin';import{FCoreError}from'./errors.js';import{authRoutes}from'./modules/auth/index.js';function m(){const e=['toString','433367FJgLRa','FST_ERR_VALIDATION','eXGFC','1743MCggDz','⚠️\x20rate\x20limit\x20is\x20disabled','mefDP','setErrorHandler','75QTWGEx','jsLke','max','2702VrpkSL','code','gkUwK','ctx','statusCode','logger','279865TbMfLH','application/x-www-form-urlencoded','timeWindow','rateLimit','iQkWo','110kXoQVw','maxFileSize','XYLAD','reduce','XXWAK','OuzCp','577170PiiasI','user','addContentTypeParser','preHandler','split','@fastify/rate-limit','NMMxR','170648GdmPsx','disabled','buffer','register','iMTFd','rrGVs','message','error','xkRSF','kcMMh','details','NyWDP','test','name','url','kcLzc','Internal\x20server\x20error','@opengis/fcore','INTERNAL_ERROR','yBvJs','guPMe','20WewSIL','raw','log','decorate','send','@fastify/multipart','true','2166534NvrKhu','136XvaNHf','tmIeD','nVzaJ','ZHHoe'];m=function(){return e;};return m();}import{fileRoutes}from'./modules/file/index.js';import{resourceRoutes}from'./modules/resource/index.js';function p(D,L){D=D-0x1ae;const s=m();let X=s[D];return X;}import{systemRoutes}from'./modules/system/index.js';import{createSessionStore}from'./plugins/auth/index.js';function urlencodedContentParser(D,L,s){const K=p,X={'eXGFC':function(u,o){return u(o);},'XXWAK':function(u,o,r){return u(o,r);}},M=X[K(0x1cd)](decodeURIComponent,L[K(0x1ca)]())[K(0x1ea)]('&')[K(0x1e3)]((u,o)=>{const C=K,[r,i]=o[C(0x1ea)]('='),q={...u};return q[r]=i,q;},{});X[K(0x1e4)](s,null,M);}const plugin=async(D,{ctx:L})=>{const k=p,s={'rrGVs':function(M,u){return M instanceof u;},'guPMe':function(M,u){return M===u;},'xkRSF':k(0x1cc),'ZHHoe':function(M,u){return M===u;},'iMTFd':k(0x1c4),'gkUwK':k(0x1b9),'kcMMh':k(0x1cf),'nVzaJ':k(0x1d8),'NyWDP':function(M,u){return M(u);},'tmIeD':k(0x1dc),'yBvJs':k(0x1ef),'jsLke':k(0x1e5),'XYLAD':k(0x1eb),'NMMxR':k(0x1e9),'iQkWo':k(0x1c3),'kcLzc':function(M,u){return M*u;},'mefDP':function(M,u){return M*u;}};D[k(0x1c1)](s[k(0x1c8)],L);const {config:X}=L;await createSessionStore(D,L),D[k(0x1d1)]((M,u,o)=>{const G=k;if(s[G(0x1ae)](M,FCoreError)||s[G(0x1bd)](M[G(0x1d6)],s[G(0x1b1)]))return o[G(0x1d6)](M[G(0x1d9)])[G(0x1c2)]({'error':M[G(0x1d6)],'message':M[G(0x1af)],'details':M[G(0x1b3)]});L[G(0x1da)][G(0x1b0)](M);(s[G(0x1c9)](process.env.trace,s[G(0x1f1)])||process.env.NODE_ENV===G(0x1b5)||process.env.VITEST)&&console[G(0x1b0)](M);const r={};return r[G(0x1b0)]=G(0x1bb),r[G(0x1af)]=s[G(0x1d7)],o[G(0x1d6)](0x1f4)[G(0x1c2)](r);}),await D[k(0x1f0)](s[k(0x1b4)](authRoutes,L)),await D[k(0x1f0)](resourceRoutes(L)),await D[k(0x1f0)](fileRoutes(L)),await D[k(0x1f0)](systemRoutes(L)),D[k(0x1e8)](s[k(0x1c7)],{'parseAs':s[k(0x1bc)]},urlencodedContentParser),!X[k(0x1de)]?.[k(0x1ee)]?s[k(0x1c9)](k(0x1e5),s[k(0x1d3)])?D[k(0x1f0)](import(s[k(0x1e2)]),{'max':X[k(0x1de)]?.[k(0x1d4)]||0x64,'timeWindow':X[k(0x1de)]?.[k(0x1dd)]||0xea60,'hook':s[k(0x1ec)],'global':!![],'keyGenerator':M=>(M[k(0x1e7)]?.['id']||M['ip'])+'-'+M[k(0x1bf)][k(0x1b7)][k(0x1ea)]('?')[0x0]}):L[k(0x1c0)](s[k(0x1b2)]):console[k(0x1c0)](s[k(0x1b2)]),D[k(0x1f0)](import(s[k(0x1df)]),{'limits':{'fileSize':s[k(0x1b8)](s[k(0x1d0)](X[k(0x1e1)],0x400),0x400)}});},Q={};Q[j(0x1b6)]=j(0x1ba);export default d(plugin,Q);
|
package/dist/fcore.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function p(D,L){D=D-0x139;const s=m();let X=s[D];return X;}(function(D,L){const f=p,s=D();while(!![]){try{const X=-parseInt(f(0x13a))/0x1*(-parseInt(f(0x149))/0x2)+parseInt(f(0x15e))/0x3*(-parseInt(f(0x14b))/0x4)+parseInt(f(0x15c))/0x5*(-parseInt(f(0x13b))/0x6)+parseInt(f(0x14e))/0x7*(-parseInt(f(0x146))/0x8)+parseInt(f(0x15b))/0x9+-parseInt(f(0x159))/0xa*(parseInt(f(0x155))/0xb)+-parseInt(f(0x148))/0xc*(-parseInt(f(0x14f))/0xd);if(X===L)break;else s['push'](s['shift']());}catch(M){s['push'](s['shift']());}}}(m,0xa64e6));import{loadConfig}from'./config.js';function m(){const d=['forcePathStyle','15932BfmuCU','config','eOmUZ','25144zSPbHA','29580213KnFSUx','BiHeJ','logger','audit','folder','endpoint','291841XNIAaX','accessKey','region','length','460cyYsnQ','dictionary','2460483nKNOxz','553610sSIUeF','bucket','681OnaQwf','eRTXr','2785uzLOty','30gDQrPQ','resource','tokenTtl','register','secretKey','resources','dictionaries','redis','file','tokenSecret','ttllh','744XYBhDc','EcMdh','12wtuOWx','822jgPcaT'];m=function(){return d;};return m();}import{createContext,setContext}from'./context.js';import{createAudit,createDatabase,createDictionary,createFileS3,createLogger,createRedis,createResource}from'./plugins/index.js';export async function createFCore(u={}){const Q=p,o={'EcMdh':function(E,c){return E(c);},'eOmUZ':function(E,c){return E(c);},'ttllh':function(E){return E();},'BiHeJ':function(E,c){return E(c);},'eRTXr':function(E,c){return E(c);}},r=o[Q(0x147)](loadConfig,u[Q(0x14c)]),i=o[Q(0x14d)](createRedis,r[Q(0x142)]),q=o[Q(0x145)](createLogger),R=o[Q(0x147)](createDatabase,r['pg']),B={};B[Q(0x154)]=r['s3'][Q(0x154)],B[Q(0x157)]=r['s3'][Q(0x157)],B[Q(0x15d)]=r['s3'][Q(0x15d)],B[Q(0x156)]=r['s3'][Q(0x156)],B[Q(0x13f)]=r['s3'][Q(0x13f)],B[Q(0x153)]=r['s3'][Q(0x153)],B[Q(0x14a)]=r['s3'][Q(0x14a)],B[Q(0x144)]=r['s3'][Q(0x144)],B[Q(0x13d)]=r['s3'][Q(0x13d)];const O=o[Q(0x150)](createFileS3,B),h={};h['pg']=R,h[Q(0x151)]=q;const g=o[Q(0x139)](createAudit,h),J={};J['pg']=R,J[Q(0x141)]=u[Q(0x141)];const S=o[Q(0x14d)](createDictionary,J),z={};z['pg']=R,z[Q(0x151)]=q,z[Q(0x152)]=g;const l=o[Q(0x14d)](createResource,z);u[Q(0x140)]?.[Q(0x158)]&&l[Q(0x13e)](u[Q(0x140)]);const t={};t[Q(0x14c)]=r,t[Q(0x151)]=q,t[Q(0x142)]=i,t['pg']=R,t[Q(0x143)]=O,t[Q(0x13c)]=l,t[Q(0x152)]=g,t[Q(0x15a)]=S;const y=o[Q(0x139)](createContext,t);return o[Q(0x150)](setContext,y),y;}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(D,L){var u=p,s=D();while(!![]){try{var X=parseInt(u(0x18f))/0x1+-parseInt(u(0x191))/0x2+parseInt(u(0x18d))/0x3*(-parseInt(u(0x196))/0x4)+-parseInt(u(0x193))/0x5*(parseInt(u(0x18e))/0x6)+parseInt(u(0x192))/0x7*(parseInt(u(0x190))/0x8)+-parseInt(u(0x18c))/0x9*(parseInt(u(0x194))/0xa)+parseInt(u(0x195))/0xb*(parseInt(u(0x18b))/0xc);if(X===L)break;else s['push'](s['shift']());}catch(M){s['push'](s['shift']());}}}(m,0x60e21));export*from'./errors.js';function p(D,L){D=D-0x18b;var s=m();var X=s[D];return X;}export*from'./config.js';export*from'./context.js';export*from'./plugins/index.js';export*from'./fcore.js';export*from'./migrations/runner.js';function m(){var o=['743896zawzKF','7CwMMuJ','102995uOMpZp','7601270ZYtAtm','11FmjrbA','4wTJpkG','22139484uioXFu','9ZZOiEW','1419291ENSueE','132OXNGGW','361008BpCArm','1993744oxFSqe'];m=function(){return o;};return m();}
|
package/dist/migrations/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const
|
|
2
|
+
const R=p;(function(D,L){const q=p,s=D();while(!![]){try{const X=-parseInt(q(0xa0))/0x1+parseInt(q(0xb3))/0x2*(-parseInt(q(0xb1))/0x3)+parseInt(q(0xad))/0x4*(parseInt(q(0xa9))/0x5)+-parseInt(q(0xac))/0x6+-parseInt(q(0xa6))/0x7+-parseInt(q(0xb0))/0x8*(-parseInt(q(0xa1))/0x9)+-parseInt(q(0xa2))/0xa*(-parseInt(q(0xa8))/0xb);if(X===L)break;else s['push'](s['shift']());}catch(M){s['push'](s['shift']());}}}(m,0xb3827));import{runMigrations}from'./runner.js';import{loadConfig}from'../config.js';function p(D,L){D=D-0x9f;const s=m();let X=s[D];return X;}function m(){const B=['status','6913698vunfkV','3237816lFgcyV','error','database','472aOctMV','191358NvrjnW','exitCode','6ggEgkA','OK\x20\x20','1426410HgEQmy','184347UbwpFB','1575820kzKmuV','Loaded\x20configuration:','SKIP','file','5031439VpJhGn','log','154SIYQBh','5PabQLY','run'];m=function(){return B;};return m();}try{const config=loadConfig();console[R(0xa7)](R(0xa3),config['pg']);const o={};o[R(0xaf)]=config['pg'];for(const r of await runMigrations(o))console[R(0xa7)]((r[R(0xab)]===R(0xaa)?R(0x9f):R(0xa4))+'\x20'+r[R(0xa5)]);}catch(i){console[R(0xae)](i),process[R(0xb2)]=0x1;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../src/migrations/runner.ts"],"names":[],"mappings":"AAKA,OAAO,EAAkB,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvE,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,KAAK,GAAG,MAAM,CAAC;CACxB;AACD,MAAM,WAAW,oBAAoB;IACnC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AACD,wBAAsB,aAAa,CACjC,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,eAAe,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../src/migrations/runner.ts"],"names":[],"mappings":"AAKA,OAAO,EAAkB,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvE,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,KAAK,GAAG,MAAM,CAAC;CACxB;AACD,MAAM,WAAW,oBAAoB;IACnC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AACD,wBAAsB,aAAa,CACjC,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,eAAe,EAAE,CAAC,CA4D5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(D,L){const E=p,s=D();while(!![]){try{const X=-parseInt(E(0x222))/0x1+-parseInt(E(0x204))/0x2*(-parseInt(E(0x1f6))/0x3)+parseInt(E(0x200))/0x4*(parseInt(E(0x224))/0x5)+-parseInt(E(0x205))/0x6+parseInt(E(0x1f4))/0x7+-parseInt(E(0x1e2))/0x8+-parseInt(E(0x20c))/0x9*(-parseInt(E(0x202))/0xa);if(X===L)break;else s['push'](s['shift']());}catch(M){s['push'](s['shift']());}}}(m,0xb4650));import S from'node:fs/promises';import z from'node:path';function p(D,L){D=D-0x1e2;const s=m();let X=s[D];return X;}import{createDatabase}from'../plugins/pg.js';function m(){const A=['\x0a\x20\x20\x20\x20\x20\x20CREATE\x20TABLE\x20IF\x20NOT\x20EXISTS\x20schema_migrations\x20(\x0a\x20\x20\x20\x20\x20\x20\x20\x20version\x20varchar(255)\x20PRIMARY\x20KEY,\x0a\x20\x20\x20\x20\x20\x20\x20\x20applied_at\x20timestamptz\x20NOT\x20NULL\x20DEFAULT\x20now()\x0a\x20\x20\x20\x20\x20\x20)\x0a\x20\x20\x20\x20','WNJrM','file','database','dir','648LAsCiV','SELECT\x20version\x20FROM\x20schema_migrations','620rDubKZ','xdMRa','10060KtgwoP','8051418iyIBMy','has','status','eGNvz','connect','sort','filter','255699mesTdi','COMMIT','query','CuLeV','readdir','map','rows','ROLLBACK','INSERT\x20INTO\x20schema_migrations(version)\x20VALUES\x20($1)','username','CeeaG','hostname','DUTPX','empty\x20pg','OWODj','eLWYz','DATABASE_URL\x20or\x20database\x20config\x20is\x20required','push','XofrR','pathname','port','end','634880MSCzXR','version','8515QTUDee','3313200PrjAil','KnsZG','join','databaseUrl','jgfpD','WMiSK','skip','endsWith','migrations','run','IeCuy','.sql','password','BEGIN','release','zcOaF','readFile','utf8','4654377FBOlvl','VHqZA','255KAUxfx','BuVns','slice','FSyWe','resolve'];m=function(){return A;};return m();}export async function runMigrations(s={}){const c=p,X={'CuLeV':c(0x21c),'jgfpD':c(0x1ea),'OWODj':function(i,q){return i(q);},'VHqZA':c(0x201),'CeeaG':function(i,q){return i!==q;},'zcOaF':c(0x21b),'KnsZG':c(0x1e8),'BuVns':c(0x1f3),'FSyWe':c(0x1ef),'IeCuy':c(0x214),'XofrR':c(0x20d),'WNJrM':c(0x208),'WMiSK':c(0x213)},M=z[c(0x1fa)](s[c(0x1ff)]??X[c(0x1e6)]),u=s[c(0x1fe)]??X[c(0x21a)](databaseFromUrl,s[c(0x1e5)]??process.env.DATABASE_URL);if(!u)throw new Error(X[c(0x20f)]);const o=X[c(0x21a)](createDatabase,u);if(!o)throw new Error(c(0x219));const r=[];try{await o[c(0x20e)](c(0x1fb));const i=await o[c(0x20e)](X[c(0x1f5)]),q=new Set(i[c(0x212)][c(0x211)](B=>B[c(0x223)])),R=(await S[c(0x210)](M))[c(0x20b)](B=>B[c(0x1e9)](c(0x1ed)))[c(0x20a)]();for(const B of R){if(q[c(0x206)](B)){if(X[c(0x216)](X[c(0x1f1)],X[c(0x1f1)]))g[c(0x1f0)]();else{const l={};l[c(0x1fd)]=B,l[c(0x207)]=X[c(0x1e3)],r[c(0x21d)](l);continue;}}const O=await S[c(0x1f2)](z[c(0x1e4)](M,B),X[c(0x1f7)]),h=await o[c(0x209)]();try{await h[c(0x20e)](X[c(0x1f9)]),await h[c(0x20e)](O),await h[c(0x20e)](X[c(0x1ec)],[B]),await h[c(0x20e)](X[c(0x21e)]);}catch(t){if(X[c(0x1fc)]===X[c(0x1fc)]){await h[c(0x20e)](X[c(0x1e7)]);throw t;}else throw new g(X[c(0x20f)]);}finally{h[c(0x1f0)]();}const g={};g[c(0x1fd)]=B,g[c(0x207)]=c(0x1eb),r[c(0x21d)](g);}return r;}finally{await o[c(0x221)]();}}function databaseFromUrl(D){const H=p,L={'DUTPX':function(X,M){return X(M);},'xdMRa':function(X,M){return X(M);}};if(!D)return undefined;const s=new URL(D);return{'host':s[H(0x217)],'port':L[H(0x218)](Number,s[H(0x220)]||0x1538),'database':s[H(0x21f)][H(0x1f8)](0x1),'user':L[H(0x218)](decodeURIComponent,s[H(0x215)]),'password':L[H(0x203)](decodeURIComponent,s[H(0x1ee)])};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(D,L){var u=p,s=D();while(!![]){try{var X=parseInt(u(0x13d))/0x1+-parseInt(u(0x13c))/0x2+parseInt(u(0x13a))/0x3*(-parseInt(u(0x139))/0x4)+-parseInt(u(0x13f))/0x5*(-parseInt(u(0x138))/0x6)+-parseInt(u(0x13b))/0x7+parseInt(u(0x140))/0x8*(parseInt(u(0x13e))/0x9)+parseInt(u(0x141))/0xa;if(X===L)break;else s['push'](s['shift']());}catch(M){s['push'](s['shift']());}}}(m,0x1d6b9));export*from'./route.js';export*from'./services/login.js';export*from'./services/logout.js';export*from'./services/get-current-user.js';export*from'./services/verify-two-factor.js';function p(D,L){D=D-0x138;var s=m();var X=s[D];return X;}function m(){var o=['163010nlDWSg','182760GfkcnL','1561670eACybB','42cqGqIv','85368zVBqKO','18TbexbA','847441EsuIsX','273684NJUOYy','30701HrMfwi','36eRoojh'];m=function(){return o;};return m();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(D,L){const V=p,s=D();while(!![]){try{const X=-parseInt(V(0x8d))/0x1+parseInt(V(0xd1))/0x2*(parseInt(V(0xa3))/0x3)+parseInt(V(0x10d))/0x4*(parseInt(V(0xa6))/0x5)+-parseInt(V(0xef))/0x6*(parseInt(V(0xf1))/0x7)+-parseInt(V(0x107))/0x8*(-parseInt(V(0xb3))/0x9)+parseInt(V(0xc0))/0xa*(-parseInt(V(0xc5))/0xb)+-parseInt(V(0xd9))/0xc*(-parseInt(V(0xb0))/0xd);if(X===L)break;else s['push'](s['shift']());}catch(M){s['push'](s['shift']());}}}(m,0x1890f));function p(D,L){D=D-0x88;const s=m();let X=s[D];return X;}import r from'./services/login.js';function m(){const Q=['MEdDy','EZDrS','DWxUI','Bqlxg','PTSyR','writable','Returns\x20the\x20QR\x20code\x20required\x20to\x20configure\x20two-factor\x20authentication.','ILUxQ','auth','mmkKP','heJQI','uyPVM','qhhRK','destroy','Sign\x20in','Bsksd','19242MWJAOJ','Not\x20authorized','type','12185UHtBHo','/api/2factor/reset','MIgut','summary','access','MNfgW','post','/api/logout','bozeE','Reset\x20two-factor\x20authentication','6552dByghA','Verify\x20two-factor\x20code','DtTjE','63jCxUPu','Returns\x20the\x20current\x20two-factor\x20authentication\x20status.','IjKLf','GgIXJ','XviRx','Get\x20two-factor\x20status','uOZdM','Sign\x20out','Verifies\x20a\x20two-factor\x20authentication\x20code.','Recover\x20two-factor\x20access','fFQgP','lMDoa','Lcxql','24540GVycaP','cookieName','body','goyZe','ruRCM','803OuYgiC','Terminates\x20the\x20current\x20user\x20session.','otFiv','iwdau','value','public','iLdyx','session','Get\x20two-factor\x20QR\x20code','iGfiI','schema','credentials','10jKeimY','byChg','iIOXW','vVXJo','FtncU','INTNW','/api/2factor','AVOdg','8292xvclie','pWabr','cookie','klILN','clearCookie','uuWWS','sessionTimeout','XzMCz','tags','redirectUrl','sessionId','wYMMF','Resets\x20two-factor\x20authentication\x20for\x20the\x20current\x20user.','Get\x20current\x20user','/api/2factor/qr','get','/api/user','ajjui','not\x20supported\x20yet','maxAge','IjPyZ','dxOMw','3084WfYbci','permissions','1799bKxTdc','QDzJt','JYiQc','sfrww','Rxxpp','/api/2factor/verify','hxfwh','XhRci','xAKYe','defineProperty','/api/login','save','nfonG','Authenticates\x20a\x20user\x20and\x20returns\x20a\x20bearer\x20access\x20token.','QXzTe','fcore','RjwTG','Uses\x20a\x20recovery\x20code\x20to\x20restore\x20two-factor\x20access.','YBOfk','config','bfLeM','TITmz','169184fMcHOr','qloqX','description','user','rwniJ','DgagK','4JazOoe','VYAWI','lgKmY','oaATA','AynOD','login','Returns\x20the\x20authenticated\x20user\x27s\x20safe\x20profile.','118944lRBeBZ','/api/2factor/recovery','twoFactor','configurable','gZZwG','uNwoC'];m=function(){return Q;};return m();}import i from'./services/logout.js';import q from'./services/get-current-user.js';import{authSchemas}from'./schema.js';import R from'../../shared/getIP.js';import{UnauthorizedError,UnsupportedError}from'../../errors.js';export function authRoutes(D){const a=p,L={'vVXJo':a(0xa4),'otFiv':a(0xeb),'dxOMw':function(s,X){return s!==X;},'rwniJ':function(s,X,M){return s(X,M);},'TITmz':a(0xcc),'DgagK':a(0xd3),'XzMCz':function(s,X){return s===X;},'MIgut':a(0x105),'IjKLf':function(s,X){return s*X;},'wYMMF':function(s,X){return s!==X;},'XviRx':a(0x93),'AVOdg':a(0x9f),'sfrww':a(0xf7),'ILUxQ':a(0xfb),'INTNW':a(0x100),'uNwoC':a(0xa1),'QXzTe':a(0xad),'EZDrS':a(0xba),'bozeE':a(0xc6),'FtncU':a(0x10a),'klILN':a(0xe9),'gZZwG':a(0x9b),'JYiQc':a(0xe6),'Bqlxg':a(0x8c),'MNfgW':a(0xd7),'uOZdM':a(0xb8),'mmkKP':a(0xb4),'Lcxql':a(0xcd),'lMDoa':a(0x99),'IjPyZ':a(0xf6),'byChg':a(0xb1),'uyPVM':a(0xbb),'PTSyR':a(0x102),'AynOD':a(0xa7),'pWabr':a(0xaf)};return async M=>{const F=a,u={'Rxxpp':F(0xa4),'qloqX':function(g,J){return g===J;},'YBOfk':F(0xf9),'iwdau':function(g,J){return g(J);},'DWxUI':function(g,J,S){const w=F;return L[w(0x10b)](g,J,S);},'RjwTG':function(g,J){const W=F;return L[W(0xb5)](g,J);},'goyZe':function(g,J){const P=F;return L[P(0xe4)](g,J);},'heJQI':L[F(0xb7)],'uuWWS':L[F(0xc7)],'Bsksd':function(g,J){const v=F;return L[v(0xe0)](g,J);},'DtTjE':L[F(0xd8)],'iGfiI':L[F(0xf4)]};M[F(0xac)](L[F(0x9a)],{'schema':{'tags':[L[F(0xd6)],F(0x9b)],'summary':L[F(0x92)],'description':F(0xfe),'access':F(0xca),'permissions':[],'body':authSchemas[F(0xd0)]}},async g=>{const n=F,J={};J[n(0xcb)]=u[n(0xf5)];const S=J;if(u[n(0x108)](u[n(0x103)],u[n(0x103)])){const z=u[n(0xc8)](R,g),l={...g[n(0xc2)]};l['ip']=z;const {user:t,redirectUrl:redirectUrl='/'}=await u[n(0x95)](r,l,D);await g[n(0x8b)](t);const y=u[n(0x101)](u[n(0x101)](D[n(0x104)][n(0x9b)][n(0xdf)],0x3e8),0x3c);if(g[n(0xcc)]?.[n(0xdb)]){if(u[n(0xc3)](n(0x93),u[n(0x9d)]))throw new l(u[n(0xf5)]);else g[n(0xcc)][n(0xdb)][n(0xec)]=y;}await g[n(0xcc)][n(0xfc)]();const E={};E['id']=t['id'],E[n(0xa5)]=t[n(0xa5)];const c={};return c[n(0x10a)]=E,c[n(0xe2)]=redirectUrl,c;}else throw new B(S[n(0xcb)]);}),M[F(0xac)](L[F(0xff)],{'schema':{'tags':[L[F(0xd6)],F(0x9b)],'summary':L[F(0x94)],'description':L[F(0xae)],'access':L[F(0xd5)],'permissions':[]}},async(g,J)=>{const Z=F,S={};S[Z(0x88)]=L[Z(0xd4)],S[Z(0xf8)]=L[Z(0xc7)];const z=S,l={};l[Z(0xe2)]='/';const t=l;if(!g[Z(0x10a)]){if(L[Z(0xee)](Z(0xea),Z(0xea))){if(!E[Z(0x10a)])throw new o(z[Z(0x88)]);throw new u(z[Z(0xf8)]);}else return t;}const y={};y[Z(0xe3)]=g[Z(0xcc)][Z(0xe3)],y[Z(0x10a)]=g[Z(0x10a)],await L[Z(0x10b)](i,y,D),await g[Z(0xcc)][Z(0xa0)](),J[Z(0xdd)](D[Z(0x104)][Z(0x9b)][Z(0xc1)]);const E={};return E[Z(0xc9)]=null,E[Z(0x98)]=![],E[Z(0x90)]=![],Object[Z(0xfa)](g,L[Z(0x106)],E),t;}),M[F(0xe8)](L[F(0xdc)],{'schema':{'tags':[L[F(0xd6)],L[F(0x91)]],'summary':L[F(0xf3)],'description':L[F(0x96)],'access':L[F(0xd5)],'permissions':[]}},async g=>q({'user':g[F(0x10a)]})),M[F(0xe8)](L[F(0xab)],{'schema':{'tags':[L[F(0xd6)],F(0x9b)],'summary':L[F(0xb9)],'description':L[F(0x9c)],'access':L[F(0xd5)],'permissions':[]}},async g=>{const x=F;if(u[x(0x108)](x(0x10e),x(0x89))){if(!h[x(0x10a)])throw new o(x(0xa4));throw new u(u[x(0xde)]);}else{if(!g[x(0x10a)])throw new UnauthorizedError(u[x(0xf5)]);throw new UnsupportedError(x(0xeb));}});const o={};o[F(0xe1)]=[L[F(0xd6)],L[F(0x91)]],o[F(0xa9)]=L[F(0xbf)],o[F(0x109)]=L[F(0xbe)],o[F(0xaa)]=L[F(0xd5)],o[F(0xf0)]=[];const B={};B[F(0xcf)]=o,M[F(0xe8)](F(0xe7),B,async g=>{const N=F;if(!g[N(0x10a)])throw new UnauthorizedError(u[N(0xf5)]);throw new UnsupportedError(N(0xeb));}),M[F(0xac)](L[F(0xed)],{'schema':{'tags':[L[F(0xd6)],L[F(0x91)]],'summary':L[F(0xd2)],'description':L[F(0x9e)],'access':L[F(0xd5)],'permissions':[],'body':authSchemas[F(0x8f)]}},async g=>{const U=F,J={};J[U(0xb6)]=u[U(0xf5)],J[U(0xc4)]=U(0xeb);const S=J;if(u[U(0xa2)](U(0xfd),u[U(0xb2)])){if(!h[U(0x10a)])throw new o(S[U(0xb6)]);throw new u(S[U(0xc4)]);}else{if(!g[U(0x10a)]){if(u[U(0x108)](u[U(0xce)],u[U(0xce)]))throw new UnauthorizedError(U(0xa4));else throw new B(u[U(0xf5)]);}throw new UnsupportedError(U(0xeb));}});const O={};O[F(0xe1)]=[L[F(0xd6)],L[F(0x91)]],O[F(0xa9)]=F(0xbc),O[F(0x109)]=L[F(0x97)],O[F(0xaa)]=F(0x10a),O[F(0xf0)]=[],O[F(0xc2)]=authSchemas[F(0x8f)];const h={};h[F(0xcf)]=O,M[F(0xac)](F(0x8e),h,async g=>{const b=F;if(!g[b(0x10a)]){if(L[b(0xee)](L[b(0x10c)],L[b(0x10c)]))O[b(0xcc)][b(0xdb)][b(0xec)]=h;else throw new UnauthorizedError(L[b(0xd4)]);}throw new UnsupportedError(L[b(0xc7)]);}),M[F(0xac)](L[F(0x8a)],{'schema':{'tags':[L[F(0xd6)],L[F(0x91)]],'summary':L[F(0xda)],'description':F(0xe5),'access':L[F(0xd5)],'permissions':[],'body':authSchemas[F(0x8f)]}},async g=>{const f=F,J={};J[f(0xbd)]=L[f(0xd4)],J[f(0xf2)]=L[f(0xc7)];const S=J;if(L[f(0xe0)](L[f(0xa8)],L[f(0xa8)])){if(!g[f(0x10a)])throw new UnauthorizedError(L[f(0xd4)]);throw new UnsupportedError(L[f(0xc7)]);}else{if(!h[f(0x10a)])throw new o(ZXFSJj[f(0xbd)]);throw new u(ZXFSJj[f(0xf2)]);}});};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const q=p;function m(){const R=['minLength','255322HtpAcz','504024sCnjyA','762360LZEBOG','6PRpRct','2172AkuOre','235mtcoXm','45ixvApF','12439BUTYnN','Object','26237585WjiWqP','String','15236EbOYYy','6898280uZzHPC','maxLength'];m=function(){return R;};return m();}(function(X,M){const i=p,u=X();while(!![]){try{const o=-parseInt(i(0xeb))/0x1+parseInt(i(0xe9))/0x2*(-parseInt(i(0xec))/0x3)+parseInt(i(0xf4))/0x4*(parseInt(i(0xee))/0x5)+-parseInt(i(0xed))/0x6*(parseInt(i(0xf0))/0x7)+parseInt(i(0xea))/0x8*(parseInt(i(0xef))/0x9)+-parseInt(i(0xe6))/0xa+parseInt(i(0xf2))/0xb;if(o===M)break;else u['push'](u['shift']());}catch(r){u['push'](u['shift']());}}}(m,0x81069));import{Type}from'@sinclair/typebox';const D={};D[q(0xe8)]=0x1,D[q(0xe7)]=0x64;const L={};function p(D,L){D=D-0xe6;const s=m();let X=s[D];return X;}L[q(0xe8)]=0x1,L[q(0xe7)]=0x64;const s={};s[q(0xe8)]=0x1;export const authSchemas={'credentials':Type[q(0xf1)]({'login':Type[q(0xf3)](D),'password':Type[q(0xf3)](L)}),'twoFactor':Type[q(0xf1)]({'code':Type[q(0xf3)](s)})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(D,L){const r=p,s=D();while(!![]){try{const X=parseInt(r(0x18d))/0x1*(parseInt(r(0x187))/0x2)+-parseInt(r(0x18e))/0x3*(-parseInt(r(0x184))/0x4)+parseInt(r(0x183))/0x5+parseInt(r(0x18c))/0x6+parseInt(r(0x186))/0x7*(-parseInt(r(0x18b))/0x8)+-parseInt(r(0x188))/0x9*(parseInt(r(0x189))/0xa)+-parseInt(r(0x185))/0xb;if(X===L)break;else s['push'](s['shift']());}catch(M){s['push'](s['shift']());}}}(m,0xbf041));function p(D,L){D=D-0x183;const s=m();let X=s[D];return X;}import{safeUser}from'../../utils/safe-user.js';function m(){const q=['5457060EDVDIW','215708eTljLZ','489dJbaxL','5525975WlFKZF','32068qJCSdE','30347482KAZfqp','129059CqIQGY','12lAKtxq','5355891FvgloO','10BOToHj','nviWK','208Ukjdjq'];m=function(){return q;};return m();}export default async function getCurrentUser(L){const i=p,s={};s[i(0x18a)]=function(u,o){return u||o;};const X=s,{user:M}=L;return safeUser(X[i(0x18a)](M,{}));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(D,L){const y=p,s=D();while(!![]){try{const M=-parseInt(y(0x195))/0x1+-parseInt(y(0x17d))/0x2+parseInt(y(0x194))/0x3*(-parseInt(y(0x199))/0x4)+parseInt(y(0x196))/0x5*(-parseInt(y(0x184))/0x6)+-parseInt(y(0x183))/0x7+-parseInt(y(0x181))/0x8+-parseInt(y(0x18e))/0x9*(-parseInt(y(0x191))/0xa);if(M===L)break;else s['push'](s['shift']());}catch(u){s['push'](s['shift']());}}}(m,0x955a6));function p(D,L){D=D-0x17b;const s=m();let X=s[D];return X;}import X from'./verifyPassword.js';function m(){const c=['base','AuAxd','login','metrics','redirectUrl','2547wasnKP','empty\x20redis','logger','157490HqCvKz','link','user.login','1680dfylLD','115308HsjJkw','176885kptDPm','empty\x20pg','tFlVp','4372xtfmBE','auth','hzgzz','948064ZJSgWc','user','jpQJF','afterLogin','7426960IxMipD','password','6312292LmIpLo','138IQzBbO','twofa','twoFactor','empty\x20user','kmKpG'];m=function(){return c;};return m();}export default async function login({ip:M,login:u,password:o},{config:r,pg:i,logger:q,redis:R}){const E=p,B={'AuAxd':function(z,l){return z(l);},'kmKpG':E(0x197),'jpQJF':E(0x18f),'hzgzz':function(z,l,t){return z(l,t);},'tFlVp':E(0x187)};if(!i)throw B[E(0x18a)](Error,B[E(0x188)]);if(!R)throw B[E(0x18a)](Error,B[E(0x17f)]);const O={};O[E(0x18b)]=u,O[E(0x182)]=o,O['ip']=M;const h={};h['pg']=i,h[E(0x190)]=q;const {user:g}=await B[E(0x17c)](X,O,h);if(!g)throw new Error(B[E(0x198)]);q[E(0x18c)](E(0x193));const J=g[E(0x185)]?r[E(0x17b)][E(0x192)]?.[E(0x186)]?.[E(0x18b)]:r[E(0x17b)][E(0x192)]?.[E(0x189)][E(0x180)],S={};return S[E(0x17e)]=g,S[E(0x18d)]=J||'/',S;}
|