@hapiboo/server 2.0.2 → 2.1.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/dist/server.d.ts +1 -0
- package/dist/server.js +10 -1
- package/package.dev.json +7 -7
- package/package.json +8 -8
- package/package.public.json +8 -8
- package/src/server.ts +9 -1
package/dist/server.d.ts
CHANGED
|
@@ -17,4 +17,5 @@ export declare namespace server {
|
|
|
17
17
|
function createValidatedPromise<T>(request: Request, validator: (request: Request) => boolean, delayedPromise: IResponsePromise<T>): IResponsePromise<T>;
|
|
18
18
|
function createValidatedVoidPromise(request: Request, validator: (request: Request) => boolean, delayedPromise: IResponsePromiseVoid): IResponsePromiseVoid;
|
|
19
19
|
function prepareAcceptedResponsewithVerboseOutput(response: Response, promise: IResponsePromiseVoid, operation: string | undefined): void;
|
|
20
|
+
function prepareFailedResponse(response: Response, fail: ResponseError): void;
|
|
20
21
|
}
|
package/dist/server.js
CHANGED
|
@@ -182,7 +182,16 @@ var server;
|
|
|
182
182
|
verboseResponseError(reason);
|
|
183
183
|
});
|
|
184
184
|
response.status(202);
|
|
185
|
-
|
|
185
|
+
if (operation) {
|
|
186
|
+
response.send({ status: 'OK', operation });
|
|
187
|
+
}
|
|
188
|
+
else {
|
|
189
|
+
response.send({ status: 'OK' });
|
|
190
|
+
}
|
|
186
191
|
}
|
|
187
192
|
server.prepareAcceptedResponsewithVerboseOutput = prepareAcceptedResponsewithVerboseOutput;
|
|
193
|
+
function prepareFailedResponse(response, fail) {
|
|
194
|
+
prepareResponse(response, undefined, fail, undefined);
|
|
195
|
+
}
|
|
196
|
+
server.prepareFailedResponse = prepareFailedResponse;
|
|
188
197
|
})(server || (exports.server = server = {}));
|
package/package.dev.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hapiboo/server",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.2-dev",
|
|
4
4
|
"description": "MK13 Studio Hapiboo - API server services",
|
|
5
5
|
"author": "MK13 Studio",
|
|
6
6
|
"license": "ISC",
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
"express": "^5.1.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@types/express": "^5.0.
|
|
25
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
26
|
-
"@typescript-eslint/parser": "^8.
|
|
27
|
-
"eslint": "^9.
|
|
28
|
-
"typescript": "5.
|
|
29
|
-
"typescript-eslint": "^8.
|
|
24
|
+
"@types/express": "^5.0.6",
|
|
25
|
+
"@typescript-eslint/eslint-plugin": "^8.50.1",
|
|
26
|
+
"@typescript-eslint/parser": "^8.50.1",
|
|
27
|
+
"eslint": "^9.39.2",
|
|
28
|
+
"typescript": "5.9.3",
|
|
29
|
+
"typescript-eslint": "^8.50.1"
|
|
30
30
|
}
|
|
31
31
|
}
|
package/package.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hapiboo/server",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "MK13 Studio Hapiboo - API server services",
|
|
5
5
|
"author": "MK13 Studio",
|
|
6
6
|
"license": "ISC",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"types": "dist/index.d.ts",
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@hapiboo/core": "^2.0.
|
|
10
|
+
"@hapiboo/core": "^2.0.3",
|
|
11
11
|
"express": "^5.1.0"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
|
-
"@types/express": "^5.0.
|
|
15
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
16
|
-
"@typescript-eslint/parser": "^8.
|
|
17
|
-
"eslint": "^9.
|
|
18
|
-
"typescript": "5.
|
|
19
|
-
"typescript-eslint": "^8.
|
|
14
|
+
"@types/express": "^5.0.6",
|
|
15
|
+
"@typescript-eslint/eslint-plugin": "^8.50.1",
|
|
16
|
+
"@typescript-eslint/parser": "^8.50.1",
|
|
17
|
+
"eslint": "^9.39.2",
|
|
18
|
+
"typescript": "5.9.3",
|
|
19
|
+
"typescript-eslint": "^8.50.1"
|
|
20
20
|
},
|
|
21
21
|
"scripts": {
|
|
22
22
|
"s_public": "cp package.public.json package.json",
|
package/package.public.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hapiboo/server",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "MK13 Studio Hapiboo - API server services",
|
|
5
5
|
"author": "MK13 Studio",
|
|
6
6
|
"license": "ISC",
|
|
@@ -16,15 +16,15 @@
|
|
|
16
16
|
"s_publish": "pnpm s_clean && pnpm i -w=false && pnpm s_lint && pnpm s_build && pnpm s_check && pnpm s_dev"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@hapiboo/core": "^2.0.
|
|
19
|
+
"@hapiboo/core": "^2.0.3",
|
|
20
20
|
"express": "^5.1.0"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@types/express": "^5.0.
|
|
24
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
25
|
-
"@typescript-eslint/parser": "^8.
|
|
26
|
-
"eslint": "^9.
|
|
27
|
-
"typescript": "5.
|
|
28
|
-
"typescript-eslint": "^8.
|
|
23
|
+
"@types/express": "^5.0.6",
|
|
24
|
+
"@typescript-eslint/eslint-plugin": "^8.50.1",
|
|
25
|
+
"@typescript-eslint/parser": "^8.50.1",
|
|
26
|
+
"eslint": "^9.39.2",
|
|
27
|
+
"typescript": "5.9.3",
|
|
28
|
+
"typescript-eslint": "^8.50.1"
|
|
29
29
|
}
|
|
30
30
|
}
|
package/src/server.ts
CHANGED
|
@@ -163,6 +163,14 @@ export namespace server {
|
|
|
163
163
|
});
|
|
164
164
|
|
|
165
165
|
response.status(202);
|
|
166
|
-
|
|
166
|
+
if (operation){
|
|
167
|
+
response.send({ status: 'OK', operation });
|
|
168
|
+
} else {
|
|
169
|
+
response.send({ status: 'OK' });
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export function prepareFailedResponse(response: Response, fail: ResponseError){
|
|
174
|
+
prepareResponse(response, undefined, fail, undefined);
|
|
167
175
|
}
|
|
168
176
|
}
|