@formio/appserver 2.0.0-dev.5 → 2.0.0-dev.7
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/lib/actions/index.d.ts +11 -11
- package/lib/modules/auth/auth.js +2 -2
- package/lib/types/server.d.ts +3 -2
- package/package.json +20 -20
package/lib/actions/index.d.ts
CHANGED
|
@@ -15,12 +15,12 @@ declare const _default: {
|
|
|
15
15
|
method: boolean;
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
|
-
mappingComponents(scope: import("
|
|
19
|
-
settingsForm(scope: import("
|
|
20
|
-
saveToForm(scope: import("
|
|
21
|
-
childSubmission(scope: import("
|
|
22
|
-
childResponse(scope: import("
|
|
23
|
-
executor(scope: import("
|
|
18
|
+
mappingComponents(scope: import("src/types/lib").ActionScope): Promise<any>;
|
|
19
|
+
settingsForm(scope: import("src/types/lib").ActionScope): Promise<any>;
|
|
20
|
+
saveToForm(scope: import("src/types/lib").ActionScope, resource: string): undefined;
|
|
21
|
+
childSubmission(scope: import("src/types/lib").ActionScope, req: import("src/types/lib").SubmissionRequest, res: import("src/types/lib").SubmissionResponse, submission: any): any;
|
|
22
|
+
childResponse(scope: import("src/types/lib").ActionScope, req: import("src/types/lib").SubmissionRequest, res: import("src/types/lib").SubmissionResponse): void;
|
|
23
|
+
executor(scope: import("src/types/lib").ActionScope): Promise<(req: import("src/types/lib").SubmissionRequest, res: import("src/types/lib").SubmissionResponse, next: import("express").NextFunction) => Promise<void>>;
|
|
24
24
|
};
|
|
25
25
|
login: {
|
|
26
26
|
readonly info: {
|
|
@@ -37,7 +37,7 @@ declare const _default: {
|
|
|
37
37
|
method: boolean;
|
|
38
38
|
};
|
|
39
39
|
};
|
|
40
|
-
settingsForm(scope: import("
|
|
40
|
+
settingsForm(scope: import("src/types/lib").ActionScope): Promise<({
|
|
41
41
|
type: string;
|
|
42
42
|
label: string;
|
|
43
43
|
key: string;
|
|
@@ -103,8 +103,8 @@ declare const _default: {
|
|
|
103
103
|
validate?: undefined;
|
|
104
104
|
})[]>;
|
|
105
105
|
waitText(time: number): string;
|
|
106
|
-
checkAttempts(scope: import("
|
|
107
|
-
executor(scope: import("
|
|
106
|
+
checkAttempts(scope: import("src/types/lib").ActionScope, error: any, user: import("src/types/lib").User): Promise<any>;
|
|
107
|
+
executor(scope: import("src/types/lib").ActionScope): Promise<(req: import("src/types/lib").SubmissionRequest, res: import("src/types/lib").SubmissionResponse, next: import("express").NextFunction) => Promise<void>>;
|
|
108
108
|
};
|
|
109
109
|
role: {
|
|
110
110
|
readonly info: {
|
|
@@ -121,7 +121,7 @@ declare const _default: {
|
|
|
121
121
|
method: boolean;
|
|
122
122
|
};
|
|
123
123
|
};
|
|
124
|
-
settingsForm(scope: import("
|
|
124
|
+
settingsForm(scope: import("src/types/lib").ActionScope): Promise<({
|
|
125
125
|
type: string;
|
|
126
126
|
input: boolean;
|
|
127
127
|
label: string;
|
|
@@ -154,7 +154,7 @@ declare const _default: {
|
|
|
154
154
|
required: boolean;
|
|
155
155
|
};
|
|
156
156
|
})[]>;
|
|
157
|
-
executor(scope: import("
|
|
157
|
+
executor(scope: import("src/types/lib").ActionScope): Promise<(req: import("src/types/lib").SubmissionRequest, res: import("src/types/lib").SubmissionResponse, next: import("express").NextFunction) => Promise<void | import("src/types/lib").SubmissionResponse>>;
|
|
158
158
|
};
|
|
159
159
|
};
|
|
160
160
|
export default _default;
|
package/lib/modules/auth/auth.js
CHANGED
|
@@ -17,8 +17,8 @@ const jsonwebtoken_1 = __importDefault(require("jsonwebtoken"));
|
|
|
17
17
|
const debug = require('debug')('formio:auth');
|
|
18
18
|
const error = require('debug')('formio:error');
|
|
19
19
|
class Auth {
|
|
20
|
-
token(
|
|
21
|
-
return __awaiter(this,
|
|
20
|
+
token(user_1, secret_1) {
|
|
21
|
+
return __awaiter(this, arguments, void 0, function* (user, secret, expire = 240) {
|
|
22
22
|
user = Object.assign({}, user);
|
|
23
23
|
delete user.iat;
|
|
24
24
|
delete user.exp;
|
package/lib/types/server.d.ts
CHANGED
|
@@ -46,9 +46,10 @@ export interface DBConfig {
|
|
|
46
46
|
export interface ServerDB {
|
|
47
47
|
config: DBConfig;
|
|
48
48
|
connect: (prefix?: string) => Promise<void>;
|
|
49
|
+
saveOne: (collection: string, doc: any) => Promise<any>;
|
|
49
50
|
save: (collection: string, doc: any) => Promise<any>;
|
|
50
|
-
load: (collection: string) => Promise<any>;
|
|
51
|
-
remove: (collection: string) => Promise<any>;
|
|
51
|
+
load: (collection: string, query?: any) => Promise<any>;
|
|
52
|
+
remove: (collection: string, query?: any) => Promise<any>;
|
|
52
53
|
index: (scope: FormScope, query: any) => Promise<any>;
|
|
53
54
|
create: (scope: FormScope, doc: any, allowFields?: string[]) => Promise<any>;
|
|
54
55
|
read: (scope: FormScope, id: string) => Promise<any>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formio/appserver",
|
|
3
|
-
"version": "2.0.0-dev.
|
|
3
|
+
"version": "2.0.0-dev.7",
|
|
4
4
|
"description": "A highly performant and extensible Application Server for Form.io Multi-Tenant Deployments.",
|
|
5
5
|
"main": "server.js",
|
|
6
6
|
"scripts": {
|
|
@@ -29,31 +29,31 @@
|
|
|
29
29
|
],
|
|
30
30
|
"homepage": "https://github.com/formio/appserver#readme",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@formio/appserver-auth-jwt": "^2.0.0-dev.
|
|
33
|
-
"@formio/appserver-core": "^2.0.0-dev.
|
|
34
|
-
"@formio/appserver-db-mongodb": "^2.0.0-dev.
|
|
35
|
-
"@formio/appserver-types": "^2.0.0-dev.
|
|
32
|
+
"@formio/appserver-auth-jwt": "^2.0.0-dev.6",
|
|
33
|
+
"@formio/appserver-core": "^2.0.0-dev.6",
|
|
34
|
+
"@formio/appserver-db-mongodb": "^2.0.0-dev.6",
|
|
35
|
+
"@formio/appserver-types": "^2.0.0-dev.4",
|
|
36
36
|
"@formio/core": "^2.0.0-rc.16",
|
|
37
|
-
"@formio/vm": "^0.0.7-rc.
|
|
38
|
-
"async": "^3.2.
|
|
37
|
+
"@formio/vm": "^0.0.7-rc.10",
|
|
38
|
+
"async": "^3.2.5",
|
|
39
39
|
"bcryptjs": "^2.4.3",
|
|
40
40
|
"debug": "^4.3.4",
|
|
41
|
-
"dotenv": "^16.
|
|
42
|
-
"express": "^4.18.
|
|
43
|
-
"jsonwebtoken": "^9.0.
|
|
41
|
+
"dotenv": "^16.4.5",
|
|
42
|
+
"express": "^4.18.3",
|
|
43
|
+
"jsonwebtoken": "^9.0.2",
|
|
44
44
|
"lodash": "^4.17.21"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@types/async": "^3.2.
|
|
48
|
-
"@types/bcryptjs": "^2.4.
|
|
49
|
-
"@types/express": "^4.17.
|
|
50
|
-
"@types/jsonwebtoken": "^9.0.
|
|
51
|
-
"@types/lodash": "^4.
|
|
52
|
-
"@types/mocha": "^10.0.
|
|
53
|
-
"@types/node": "^20.
|
|
54
|
-
"mocha": "^10.
|
|
55
|
-
"ts-node": "^10.9.
|
|
47
|
+
"@types/async": "^3.2.24",
|
|
48
|
+
"@types/bcryptjs": "^2.4.6",
|
|
49
|
+
"@types/express": "^4.17.21",
|
|
50
|
+
"@types/jsonwebtoken": "^9.0.6",
|
|
51
|
+
"@types/lodash": "^4.17.0",
|
|
52
|
+
"@types/mocha": "^10.0.6",
|
|
53
|
+
"@types/node": "^20.11.28",
|
|
54
|
+
"mocha": "^10.3.0",
|
|
55
|
+
"ts-node": "^10.9.2",
|
|
56
56
|
"tsconfig-paths": "^4.2.0",
|
|
57
|
-
"typescript": "^5.
|
|
57
|
+
"typescript": "^5.4.2"
|
|
58
58
|
}
|
|
59
59
|
}
|