@adaptivestone/framework 5.0.0-beta.18 → 5.0.0-beta.19
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/commands/GenerateTypes.js +1 -1
- package/dist/helpers/crypto.js +1 -1
- package/package.json +1 -1
- package/cliCommand.ts +0 -10
- package/eslint.config.ts +0 -76
- package/genTypes.d.ts +0 -101
|
@@ -45,7 +45,7 @@ class GenerateTypes extends AbstractCommand {
|
|
|
45
45
|
}))).join('\n');
|
|
46
46
|
return `
|
|
47
47
|
import type {} from '@adaptivestone/framework/server.js';
|
|
48
|
-
import type { GetModelTypeFromClass } from '
|
|
48
|
+
import type { GetModelTypeFromClass } from '@adaptivestone/framework/modules/BaseModel.js';
|
|
49
49
|
|
|
50
50
|
declare module '@adaptivestone/framework/server.js' {
|
|
51
51
|
export interface IApp {
|
package/dist/helpers/crypto.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { scrypt } from 'node:crypto';
|
|
2
2
|
import { promisify } from 'node:util';
|
|
3
|
-
import { appInstance } from
|
|
3
|
+
import { appInstance } from "./appInstance.js";
|
|
4
4
|
export const scryptAsync = promisify(scrypt);
|
|
5
5
|
export const scryptAsyncWithSalt = async (stringToHash) => {
|
|
6
6
|
const { saltSecret, hashRounds } = appInstance.getConfig('auth');
|
package/package.json
CHANGED
package/cliCommand.ts
DELETED
package/eslint.config.ts
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import globals from 'globals';
|
|
2
|
-
import pluginJs from '@eslint/js';
|
|
3
|
-
// eslint-disable-next-line import-x/no-unresolved
|
|
4
|
-
import tseslint from 'typescript-eslint';
|
|
5
|
-
|
|
6
|
-
import { flatConfigs as importPlugin } from 'eslint-plugin-import-x';
|
|
7
|
-
import vitest from '@vitest/eslint-plugin';
|
|
8
|
-
import eslintConfigPrettier from 'eslint-config-prettier';
|
|
9
|
-
// eslint-disable-next-line import-x/extensions
|
|
10
|
-
import prettierPlugin from 'eslint-plugin-prettier/recommended';
|
|
11
|
-
|
|
12
|
-
// /** @type {import('eslint').Linter.Config[]} */
|
|
13
|
-
export default tseslint.config([
|
|
14
|
-
{
|
|
15
|
-
ignores: ['dist/'],
|
|
16
|
-
},
|
|
17
|
-
// tseslint.configs.recommended,
|
|
18
|
-
pluginJs.configs.recommended,
|
|
19
|
-
importPlugin.recommended,
|
|
20
|
-
eslintConfigPrettier,
|
|
21
|
-
prettierPlugin,
|
|
22
|
-
{
|
|
23
|
-
languageOptions: {
|
|
24
|
-
sourceType: 'module',
|
|
25
|
-
ecmaVersion: 'latest',
|
|
26
|
-
globals: {
|
|
27
|
-
...globals.es2024,
|
|
28
|
-
...globals.node,
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
rules: {
|
|
34
|
-
'no-await-in-loop': 'error',
|
|
35
|
-
'no-param-reassign': 'error',
|
|
36
|
-
'class-methods-use-this': 'error',
|
|
37
|
-
'no-shadow': 'error',
|
|
38
|
-
'prefer-const': 'error',
|
|
39
|
-
'import-x/no-extraneous-dependencies': ['error'],
|
|
40
|
-
'import-x/extensions': ['error', 'always'],
|
|
41
|
-
'import-x/first': ['error'],
|
|
42
|
-
camelcase: ['error', { properties: 'never', ignoreDestructuring: false }],
|
|
43
|
-
'prefer-destructuring': [
|
|
44
|
-
'error',
|
|
45
|
-
{
|
|
46
|
-
VariableDeclarator: {
|
|
47
|
-
array: false,
|
|
48
|
-
object: true,
|
|
49
|
-
},
|
|
50
|
-
AssignmentExpression: {
|
|
51
|
-
array: true,
|
|
52
|
-
object: false,
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
enforceForRenamedProperties: false,
|
|
57
|
-
},
|
|
58
|
-
],
|
|
59
|
-
'no-plusplus': 'error',
|
|
60
|
-
'consistent-return': 'error',
|
|
61
|
-
'no-return-await': 'error',
|
|
62
|
-
'arrow-body-style': 'error',
|
|
63
|
-
'dot-notation': 'error',
|
|
64
|
-
curly: 'error',
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
files: ['**/*.test.js', '**/*.test.ts'],
|
|
69
|
-
plugins: {
|
|
70
|
-
vitest,
|
|
71
|
-
},
|
|
72
|
-
rules: {
|
|
73
|
-
...vitest.configs.recommended.rules,
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
]);
|
package/genTypes.d.ts
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import type {} from '@adaptivestone/framework/server.js';
|
|
3
|
-
import type { GetModelTypeFromClass } from './src/modules/BaseModel.ts';
|
|
4
|
-
|
|
5
|
-
declare module '@adaptivestone/framework/server.js' {
|
|
6
|
-
export interface IApp {
|
|
7
|
-
getConfig(configName: 'auth'): {
|
|
8
|
-
"hashRounds": 64,
|
|
9
|
-
"isAuthWithVefificationFlow": true
|
|
10
|
-
};
|
|
11
|
-
getConfig(configName: 'http'): {
|
|
12
|
-
"port": "3300",
|
|
13
|
-
"hostname": "0.0.0.0",
|
|
14
|
-
"corsDomains": [
|
|
15
|
-
"http://localhost:3000"
|
|
16
|
-
],
|
|
17
|
-
"myDomain": "http://localhost:3300",
|
|
18
|
-
"siteDomain": "http://localhost:3000"
|
|
19
|
-
};
|
|
20
|
-
getConfig(configName: 'i18n'): {
|
|
21
|
-
"enabled": true,
|
|
22
|
-
"preload": [
|
|
23
|
-
"en",
|
|
24
|
-
"ru"
|
|
25
|
-
],
|
|
26
|
-
"supportedLngs": [
|
|
27
|
-
"en",
|
|
28
|
-
"ru"
|
|
29
|
-
],
|
|
30
|
-
"fallbackLng": "en",
|
|
31
|
-
"saveMissing": false,
|
|
32
|
-
"debug": false,
|
|
33
|
-
"lookupQuerystring": "lng"
|
|
34
|
-
};
|
|
35
|
-
getConfig(configName: 'ipDetector'): {
|
|
36
|
-
"headers": [
|
|
37
|
-
"X-Forwarded-For"
|
|
38
|
-
],
|
|
39
|
-
"trustedProxy": [
|
|
40
|
-
"169.254.0.0/16",
|
|
41
|
-
"fe80::/10",
|
|
42
|
-
"127.0.0.1/8",
|
|
43
|
-
"::1/128",
|
|
44
|
-
"10.0.0.0/8",
|
|
45
|
-
"172.16.0.0/12",
|
|
46
|
-
"192.168.0.0/16",
|
|
47
|
-
"fc00::/7"
|
|
48
|
-
]
|
|
49
|
-
};
|
|
50
|
-
getConfig(configName: 'log'): {
|
|
51
|
-
"transports": [
|
|
52
|
-
{
|
|
53
|
-
"transport": "winston-transport-sentry-node",
|
|
54
|
-
"transportOptions": {
|
|
55
|
-
"sentry": {
|
|
56
|
-
"dsn": ""
|
|
57
|
-
},
|
|
58
|
-
"level": "info"
|
|
59
|
-
},
|
|
60
|
-
"enable": false
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
"transport": "console",
|
|
64
|
-
"transportOptions": {
|
|
65
|
-
"level": "silly",
|
|
66
|
-
"timestamp": true
|
|
67
|
-
},
|
|
68
|
-
"enable": true
|
|
69
|
-
}
|
|
70
|
-
]
|
|
71
|
-
};
|
|
72
|
-
getConfig(configName: 'mongo'): {
|
|
73
|
-
"connectionString": "mongodb://localhost/andrey_framework_dev"
|
|
74
|
-
};
|
|
75
|
-
getConfig(configName: 'rateLimiter'): {
|
|
76
|
-
"limiterOptions": {
|
|
77
|
-
"points": 10,
|
|
78
|
-
"duration": 60
|
|
79
|
-
},
|
|
80
|
-
"driver": "memory",
|
|
81
|
-
"consumePoints": 1,
|
|
82
|
-
"consumeKeyComponents": {
|
|
83
|
-
"ip": true,
|
|
84
|
-
"route": true,
|
|
85
|
-
"user": true,
|
|
86
|
-
"request": []
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
|
-
getConfig(configName: 'redis'): {
|
|
90
|
-
"url": "redis://localhost",
|
|
91
|
-
"namespace": "main"
|
|
92
|
-
};
|
|
93
|
-
getConfig(configName: 'validate'): {
|
|
94
|
-
"controllerValidationAbortEarly": true
|
|
95
|
-
};
|
|
96
|
-
getModel(modelName: 'Lock'): import('./src/models/Lock.ts').default['mongooseModel']
|
|
97
|
-
getModel(modelName: 'Migration'): GetModelTypeFromClass<typeof import('./src/models/Migration.ts').default>
|
|
98
|
-
getModel(modelName: 'Sequence'): GetModelTypeFromClass<typeof import('./src/models/Sequence.ts').default>
|
|
99
|
-
getModel(modelName: 'User'): import('./src/models/User.ts').default['mongooseModel']
|
|
100
|
-
}
|
|
101
|
-
}
|