@rxdi/hapi 0.7.190 → 0.7.191-nightly.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/dist/hapi.module.config.d.ts +2 -2
- package/dist/main.js +7 -3
- package/dist/plugins/hapi.plugin.js +2 -2
- package/dist/plugins/index.js +5 -1
- package/dist/plugins/inert/inert.plugin.js +2 -2
- package/dist/services/index.js +5 -1
- package/dist/services/open/open.service.js +6 -6
- package/dist/services/server/server.service.d.ts +1 -1
- package/dist/services/server/server.service.js +2 -2
- package/package.json +5 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InjectionToken } from "@rxdi/core";
|
|
2
|
-
import { PluginNameVersion, PluginBase, PluginPackage, ServerOptions, ServerRoute } from '@hapi/hapi';
|
|
2
|
+
import { PluginNameVersion, PluginBase, PluginPackage, ServerOptions, ServerRoute, RouteDefMethods } from '@hapi/hapi';
|
|
3
3
|
export declare class HapiConfigModel {
|
|
4
4
|
randomPort?: boolean;
|
|
5
5
|
staticConfig?: ServerRoute | ServerRoute[];
|
|
@@ -11,5 +11,5 @@ export declare const HAPI_SERVER: InjectionToken<any>;
|
|
|
11
11
|
export declare const HAPI_PLUGINS: InjectionToken<(PluginBase<any, any> & (PluginNameVersion | PluginPackage))[]>;
|
|
12
12
|
export declare const Route: ({ method, path }: {
|
|
13
13
|
path: string;
|
|
14
|
-
method:
|
|
14
|
+
method: RouteDefMethods;
|
|
15
15
|
}) => (target: unknown, key: string, descriptor: PropertyDescriptor) => void;
|
package/dist/main.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -55,13 +59,13 @@ let HapiModule = HapiModule_1 = class HapiModule {
|
|
|
55
59
|
};
|
|
56
60
|
}
|
|
57
61
|
};
|
|
58
|
-
HapiModule =
|
|
62
|
+
exports.HapiModule = HapiModule;
|
|
63
|
+
exports.HapiModule = HapiModule = HapiModule_1 = __decorate([
|
|
59
64
|
(0, core_1.Module)({
|
|
60
65
|
services: [],
|
|
61
66
|
plugins: []
|
|
62
67
|
})
|
|
63
68
|
], HapiModule);
|
|
64
|
-
exports.HapiModule = HapiModule;
|
|
65
69
|
__exportStar(require("./hapi.module.config"), exports);
|
|
66
70
|
__exportStar(require("./plugins/index"), exports);
|
|
67
71
|
__exportStar(require("./services/index"), exports);
|
|
@@ -31,8 +31,8 @@ let HapiPlugin = class HapiPlugin {
|
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
|
-
HapiPlugin =
|
|
34
|
+
exports.HapiPlugin = HapiPlugin;
|
|
35
|
+
exports.HapiPlugin = HapiPlugin = __decorate([
|
|
35
36
|
(0, core_1.Plugin)(),
|
|
36
37
|
__metadata("design:paramtypes", [server_service_1.ServerService])
|
|
37
38
|
], HapiPlugin);
|
|
38
|
-
exports.HapiPlugin = HapiPlugin;
|
package/dist/plugins/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -48,11 +48,11 @@ let InertPlugin = class InertPlugin {
|
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
|
-
InertPlugin =
|
|
51
|
+
exports.InertPlugin = InertPlugin;
|
|
52
|
+
exports.InertPlugin = InertPlugin = __decorate([
|
|
52
53
|
(0, core_1.Plugin)(),
|
|
53
54
|
__param(0, (0, core_1.Inject)(hapi_module_config_1.HAPI_SERVER)),
|
|
54
55
|
__param(1, (0, core_1.Inject)(hapi_module_config_1.HAPI_CONFIG)),
|
|
55
56
|
__metadata("design:paramtypes", [hapi_1.Server,
|
|
56
57
|
hapi_module_config_1.HapiConfigModel])
|
|
57
58
|
], InertPlugin);
|
|
58
|
-
exports.InertPlugin = InertPlugin;
|
package/dist/services/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -23,7 +23,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
23
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
24
|
exports.OpenService = void 0;
|
|
25
25
|
const core_1 = require("@rxdi/core");
|
|
26
|
-
const
|
|
26
|
+
const open_1 = require("open");
|
|
27
27
|
const hapi_module_config_1 = require("../../hapi.module.config");
|
|
28
28
|
const hapi_1 = require("@hapi/hapi");
|
|
29
29
|
let OpenService = class OpenService {
|
|
@@ -32,23 +32,23 @@ let OpenService = class OpenService {
|
|
|
32
32
|
}
|
|
33
33
|
openServerPage() {
|
|
34
34
|
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
-
yield
|
|
35
|
+
yield (0, open_1.default)(`http://${this.server.info.address}:${this.server.info.port}/public`);
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
openGraphQLPage() {
|
|
39
39
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
-
yield
|
|
40
|
+
yield (0, open_1.default)(`http://${this.server.info.address}:${this.server.info.port}/graphiql`);
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
43
|
openPage(link) {
|
|
44
44
|
return __awaiter(this, void 0, void 0, function* () {
|
|
45
|
-
yield
|
|
45
|
+
yield (0, open_1.default)(link);
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
|
-
OpenService =
|
|
49
|
+
exports.OpenService = OpenService;
|
|
50
|
+
exports.OpenService = OpenService = __decorate([
|
|
50
51
|
(0, core_1.Service)(),
|
|
51
52
|
__param(0, (0, core_1.Inject)(hapi_module_config_1.HAPI_SERVER)),
|
|
52
53
|
__metadata("design:paramtypes", [hapi_1.Server])
|
|
53
54
|
], OpenService);
|
|
54
|
-
exports.OpenService = OpenService;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BootstrapLogger, ExitHandlerService } from "@rxdi/core";
|
|
2
2
|
import { Server, PluginBase, PluginNameVersion, PluginPackage } from "@hapi/hapi";
|
|
3
|
-
export
|
|
3
|
+
export type PluginType<T> = (PluginBase<T, any> & (PluginNameVersion | PluginPackage))[];
|
|
4
4
|
export declare class ServerService {
|
|
5
5
|
private server;
|
|
6
6
|
private plugins;
|
|
@@ -56,11 +56,11 @@ let ServerService = class ServerService {
|
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
58
|
};
|
|
59
|
-
ServerService =
|
|
59
|
+
exports.ServerService = ServerService;
|
|
60
|
+
exports.ServerService = ServerService = __decorate([
|
|
60
61
|
(0, core_1.Service)(),
|
|
61
62
|
__param(0, (0, core_1.Inject)(hapi_module_config_1.HAPI_SERVER)),
|
|
62
63
|
__param(1, (0, core_1.Inject)(hapi_module_config_1.HAPI_PLUGINS)),
|
|
63
64
|
__metadata("design:paramtypes", [hapi_1.Server, Array, core_1.BootstrapLogger,
|
|
64
65
|
core_1.ExitHandlerService])
|
|
65
66
|
], ServerService);
|
|
66
|
-
exports.ServerService = ServerService;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rxdi/hapi",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.191-nightly.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/rxdi/hapi"
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@hapi/hapi": "^21.3.2",
|
|
32
32
|
"@hapi/inert": "^7.1.0",
|
|
33
|
-
"
|
|
33
|
+
"open": "^11.0.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@rxdi/core": "^0.7.
|
|
37
|
-
"@types/node": "^
|
|
38
|
-
"typescript": "^
|
|
36
|
+
"@rxdi/core": "^0.7.190",
|
|
37
|
+
"@types/node": "^25.0.3",
|
|
38
|
+
"typescript": "^5.9.3"
|
|
39
39
|
}
|
|
40
40
|
}
|