@rvoh/psychic 0.28.2 → 0.28.4
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/cjs/src/bin/helpers/enumsFileStr.js +6 -3
- package/dist/cjs/src/bin/helpers/generateRouteTypes.js +29 -3
- package/dist/cjs/src/bin/helpers/printRoutes.js +5 -2
- package/dist/cjs/src/bin/index.js +37 -11
- package/dist/cjs/src/cli/helpers/TypesBuilder.js +29 -3
- package/dist/cjs/src/cli/index.js +4 -1
- package/dist/cjs/src/controller/decorators.js +4 -1
- package/dist/cjs/src/controller/index.js +59 -33
- package/dist/cjs/src/devtools/helpers/launchDevServer.js +5 -2
- package/dist/cjs/src/encrypt/internal-encrypt.js +5 -2
- package/dist/cjs/src/env/Loader.js +28 -2
- package/dist/cjs/src/error/db/failed-to-connect.js +4 -1
- package/dist/cjs/src/error/db/missing-options.js +4 -1
- package/dist/cjs/src/error/http/BadGateway.js +4 -1
- package/dist/cjs/src/error/http/BadRequest.js +4 -1
- package/dist/cjs/src/error/http/Conflict.js +4 -1
- package/dist/cjs/src/error/http/ContentTooLarge.js +4 -1
- package/dist/cjs/src/error/http/ExpectationFailed.js +4 -1
- package/dist/cjs/src/error/http/FailedDependency.js +4 -1
- package/dist/cjs/src/error/http/Forbidden.js +4 -1
- package/dist/cjs/src/error/http/GatewayTimeout.js +4 -1
- package/dist/cjs/src/error/http/Gone.js +4 -1
- package/dist/cjs/src/error/http/ImATeapot.js +4 -1
- package/dist/cjs/src/error/http/InsufficientStorage.js +4 -1
- package/dist/cjs/src/error/http/InternalServerError.js +4 -1
- package/dist/cjs/src/error/http/Locked.js +4 -1
- package/dist/cjs/src/error/http/MethodNotAllowed.js +4 -1
- package/dist/cjs/src/error/http/MisdirectedRequest.js +4 -1
- package/dist/cjs/src/error/http/NotAcceptable.js +4 -1
- package/dist/cjs/src/error/http/NotExtended.js +4 -1
- package/dist/cjs/src/error/http/NotFound.js +4 -1
- package/dist/cjs/src/error/http/NotImplemented.js +4 -1
- package/dist/cjs/src/error/http/PaymentRequired.js +4 -1
- package/dist/cjs/src/error/http/PreconditionFailed.js +4 -1
- package/dist/cjs/src/error/http/PreconditionRequired.js +4 -1
- package/dist/cjs/src/error/http/ProxyAuthenticationRequired.js +4 -1
- package/dist/cjs/src/error/http/RequestHeaderFieldsTooLarge.js +4 -1
- package/dist/cjs/src/error/http/ServiceUnavailable.js +4 -1
- package/dist/cjs/src/error/http/TooManyRequests.js +4 -1
- package/dist/cjs/src/error/http/Unauthorized.js +4 -1
- package/dist/cjs/src/error/http/UnavailableForLegalReasons.js +4 -1
- package/dist/cjs/src/error/http/UnprocessableContent.js +4 -1
- package/dist/cjs/src/error/http/UnsupportedMediaType.js +4 -1
- package/dist/cjs/src/error/http/router/index.js +4 -1
- package/dist/cjs/src/error/http/router/missing-controller-method.js +4 -1
- package/dist/cjs/src/error/http/router/missing-controller.js +4 -1
- package/dist/cjs/src/error/psychic-application/init-missing-package-manager.js +2 -2
- package/dist/cjs/src/generate/controller.js +34 -8
- package/dist/cjs/src/generate/helpers/addResourceToRoutes.js +31 -5
- package/dist/cjs/src/generate/helpers/generateControllerContent.js +5 -2
- package/dist/cjs/src/generate/helpers/generateResourceControllerSpecContent.js +5 -2
- package/dist/cjs/src/generate/resource.js +6 -3
- package/dist/cjs/src/helpers/autogeneratedFileDisclaimer.js +1 -1
- package/dist/cjs/src/helpers/error/httpErrorClasses.js +33 -30
- package/dist/cjs/src/helpers/importFileWithDefault.js +24 -1
- package/dist/cjs/src/helpers/importFileWithNamedExport.js +24 -1
- package/dist/cjs/src/helpers/loadEnv.js +28 -2
- package/dist/cjs/src/helpers/openapiJsonPath.js +29 -3
- package/dist/cjs/src/helpers/path/psychicFileAndDirPaths.js +28 -2
- package/dist/cjs/src/helpers/path/psychicPath.js +4 -1
- package/dist/cjs/src/helpers/path/relativePsychicPath.js +5 -2
- package/dist/cjs/src/index.js +50 -47
- package/dist/cjs/src/openapi-renderer/app.js +32 -6
- package/dist/cjs/src/openapi-renderer/body-segment.js +5 -2
- package/dist/cjs/src/openapi-renderer/endpoint.js +7 -4
- package/dist/cjs/src/openapi-renderer/serializer.js +8 -5
- package/dist/cjs/src/psychic-application/helpers/import/importControllers.js +6 -3
- package/dist/cjs/src/psychic-application/helpers/import/importServices.js +5 -2
- package/dist/cjs/src/psychic-application/helpers/loadAppEnv.js +28 -2
- package/dist/cjs/src/psychic-application/index.js +36 -10
- package/dist/cjs/src/router/helpers.js +7 -4
- package/dist/cjs/src/router/index.js +8 -5
- package/dist/cjs/src/server/helpers/startPsychicServer.js +31 -5
- package/dist/cjs/src/server/index.js +37 -12
- package/dist/cjs/src/server/params.js +4 -1
- package/dist/cjs/src/session/index.js +7 -4
- package/dist/esm/src/bin/helpers/generateRouteTypes.js +2 -2
- package/dist/esm/src/bin/index.js +2 -2
- package/dist/esm/src/cli/helpers/TypesBuilder.js +2 -2
- package/dist/esm/src/error/psychic-application/init-missing-package-manager.js +2 -2
- package/dist/esm/src/generate/controller.js +1 -1
- package/dist/esm/src/generate/helpers/addResourceToRoutes.js +2 -2
- package/dist/esm/src/helpers/autogeneratedFileDisclaimer.js +2 -2
- package/dist/esm/src/helpers/openapiJsonPath.js +1 -1
- package/dist/esm/src/helpers/path/psychicFileAndDirPaths.js +1 -1
- package/dist/esm/src/openapi-renderer/app.js +1 -1
- package/dist/esm/src/psychic-application/index.js +3 -3
- package/dist/esm/src/server/helpers/startPsychicServer.js +3 -3
- package/dist/esm/src/server/index.js +3 -4
- package/dist/types/src/psychic-application/index.d.ts +1 -1
- package/dist/types/src/router/index.d.ts +5 -5
- package/dist/types/src/server/helpers/startPsychicServer.d.ts +6 -6
- package/dist/types/src/server/index.d.ts +4 -4
- package/package.json +8 -8
package/dist/cjs/src/index.js
CHANGED
|
@@ -1,106 +1,109 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.Params = exports.PsychicServer = exports.getPsychicHttpInstance = exports.PsychicRouter = exports.PsychicApplication = exports.PsychicImporter = exports.MissingControllerActionPairingInRoutes = exports.pathifyNestedObject = exports.cookieMaxAgeFromCookieOpts = exports.generateResource = exports.generateController = exports.HttpStatusUnsupportedMediaType = exports.HttpStatusUnprocessableContent = exports.HttpStatusUnavailableForLegalReasons = exports.HttpStatusUnauthorized = exports.HttpStatusTooManyRequests = exports.HttpStatusServiceUnavailable = exports.HttpStatusRequestHeaderFieldsTooLarge = exports.HttpStatusProxyAuthenticationRequired = exports.HttpStatusPreconditionRequired = exports.HttpStatusPreconditionFailed = exports.HttpStatusPaymentRequired = exports.HttpStatusNotImplemented = exports.HttpStatusNotFound = exports.HttpStatusNotExtended = exports.HttpStatusNotAcceptable = exports.HttpStatusMisdirectedRequest = exports.HttpStatusMethodNotAllowed = exports.HttpStatusLocked = exports.HttpStatusInternalServerError = exports.HttpStatusInsufficientStorage = exports.HttpStatusImATeapot = exports.HttpStatusGone = exports.HttpStatusGatewayTimeout = exports.HttpStatusForbidden = exports.HttpStatusFailedDependency = exports.HttpStatusExpectationFailed = exports.HttpStatusContentTooLarge = exports.HttpStatusConflict = exports.HttpStatusBadRequest = exports.HttpStatusBadGateway = exports.I18nProvider = exports.envLoader = exports.PsychicController = exports.OpenAPI = exports.BeforeAction = exports.PsychicDevtools = exports.PsychicCLI = exports.PsychicBin = exports.pluralize = void 0;
|
|
4
7
|
exports.PsychicSession = exports.ParamValidationError = void 0;
|
|
5
|
-
const pluralize_esm_1 = require("pluralize-esm");
|
|
8
|
+
const pluralize_esm_1 = __importDefault(require("pluralize-esm"));
|
|
6
9
|
exports.pluralize = pluralize_esm_1.default;
|
|
7
10
|
var index_js_1 = require("./bin/index.js");
|
|
8
|
-
Object.defineProperty(exports, "PsychicBin", { enumerable: true, get: function () { return index_js_1.default; } });
|
|
11
|
+
Object.defineProperty(exports, "PsychicBin", { enumerable: true, get: function () { return __importDefault(index_js_1).default; } });
|
|
9
12
|
var index_js_2 = require("./cli/index.js");
|
|
10
|
-
Object.defineProperty(exports, "PsychicCLI", { enumerable: true, get: function () { return index_js_2.default; } });
|
|
13
|
+
Object.defineProperty(exports, "PsychicCLI", { enumerable: true, get: function () { return __importDefault(index_js_2).default; } });
|
|
11
14
|
var PsychicDevtools_js_1 = require("./devtools/PsychicDevtools.js");
|
|
12
|
-
Object.defineProperty(exports, "PsychicDevtools", { enumerable: true, get: function () { return PsychicDevtools_js_1.default; } });
|
|
15
|
+
Object.defineProperty(exports, "PsychicDevtools", { enumerable: true, get: function () { return __importDefault(PsychicDevtools_js_1).default; } });
|
|
13
16
|
var decorators_js_1 = require("./controller/decorators.js");
|
|
14
17
|
Object.defineProperty(exports, "BeforeAction", { enumerable: true, get: function () { return decorators_js_1.BeforeAction; } });
|
|
15
18
|
Object.defineProperty(exports, "OpenAPI", { enumerable: true, get: function () { return decorators_js_1.OpenAPI; } });
|
|
16
19
|
var index_js_3 = require("./controller/index.js");
|
|
17
|
-
Object.defineProperty(exports, "PsychicController", { enumerable: true, get: function () { return index_js_3.default; } });
|
|
20
|
+
Object.defineProperty(exports, "PsychicController", { enumerable: true, get: function () { return __importDefault(index_js_3).default; } });
|
|
18
21
|
var Loader_js_1 = require("./env/Loader.js");
|
|
19
|
-
Object.defineProperty(exports, "envLoader", { enumerable: true, get: function () { return Loader_js_1.default; } });
|
|
22
|
+
Object.defineProperty(exports, "envLoader", { enumerable: true, get: function () { return __importDefault(Loader_js_1).default; } });
|
|
20
23
|
var provider_js_1 = require("./i18n/provider.js");
|
|
21
|
-
Object.defineProperty(exports, "I18nProvider", { enumerable: true, get: function () { return provider_js_1.default; } });
|
|
24
|
+
Object.defineProperty(exports, "I18nProvider", { enumerable: true, get: function () { return __importDefault(provider_js_1).default; } });
|
|
22
25
|
var BadGateway_js_1 = require("./error/http/BadGateway.js");
|
|
23
|
-
Object.defineProperty(exports, "HttpStatusBadGateway", { enumerable: true, get: function () { return BadGateway_js_1.default; } });
|
|
26
|
+
Object.defineProperty(exports, "HttpStatusBadGateway", { enumerable: true, get: function () { return __importDefault(BadGateway_js_1).default; } });
|
|
24
27
|
var BadRequest_js_1 = require("./error/http/BadRequest.js");
|
|
25
|
-
Object.defineProperty(exports, "HttpStatusBadRequest", { enumerable: true, get: function () { return BadRequest_js_1.default; } });
|
|
28
|
+
Object.defineProperty(exports, "HttpStatusBadRequest", { enumerable: true, get: function () { return __importDefault(BadRequest_js_1).default; } });
|
|
26
29
|
var Conflict_js_1 = require("./error/http/Conflict.js");
|
|
27
|
-
Object.defineProperty(exports, "HttpStatusConflict", { enumerable: true, get: function () { return Conflict_js_1.default; } });
|
|
30
|
+
Object.defineProperty(exports, "HttpStatusConflict", { enumerable: true, get: function () { return __importDefault(Conflict_js_1).default; } });
|
|
28
31
|
var ContentTooLarge_js_1 = require("./error/http/ContentTooLarge.js");
|
|
29
|
-
Object.defineProperty(exports, "HttpStatusContentTooLarge", { enumerable: true, get: function () { return ContentTooLarge_js_1.default; } });
|
|
32
|
+
Object.defineProperty(exports, "HttpStatusContentTooLarge", { enumerable: true, get: function () { return __importDefault(ContentTooLarge_js_1).default; } });
|
|
30
33
|
var ExpectationFailed_js_1 = require("./error/http/ExpectationFailed.js");
|
|
31
|
-
Object.defineProperty(exports, "HttpStatusExpectationFailed", { enumerable: true, get: function () { return ExpectationFailed_js_1.default; } });
|
|
34
|
+
Object.defineProperty(exports, "HttpStatusExpectationFailed", { enumerable: true, get: function () { return __importDefault(ExpectationFailed_js_1).default; } });
|
|
32
35
|
var FailedDependency_js_1 = require("./error/http/FailedDependency.js");
|
|
33
|
-
Object.defineProperty(exports, "HttpStatusFailedDependency", { enumerable: true, get: function () { return FailedDependency_js_1.default; } });
|
|
36
|
+
Object.defineProperty(exports, "HttpStatusFailedDependency", { enumerable: true, get: function () { return __importDefault(FailedDependency_js_1).default; } });
|
|
34
37
|
var Forbidden_js_1 = require("./error/http/Forbidden.js");
|
|
35
|
-
Object.defineProperty(exports, "HttpStatusForbidden", { enumerable: true, get: function () { return Forbidden_js_1.default; } });
|
|
38
|
+
Object.defineProperty(exports, "HttpStatusForbidden", { enumerable: true, get: function () { return __importDefault(Forbidden_js_1).default; } });
|
|
36
39
|
var GatewayTimeout_js_1 = require("./error/http/GatewayTimeout.js");
|
|
37
|
-
Object.defineProperty(exports, "HttpStatusGatewayTimeout", { enumerable: true, get: function () { return GatewayTimeout_js_1.default; } });
|
|
40
|
+
Object.defineProperty(exports, "HttpStatusGatewayTimeout", { enumerable: true, get: function () { return __importDefault(GatewayTimeout_js_1).default; } });
|
|
38
41
|
var Gone_js_1 = require("./error/http/Gone.js");
|
|
39
|
-
Object.defineProperty(exports, "HttpStatusGone", { enumerable: true, get: function () { return Gone_js_1.default; } });
|
|
42
|
+
Object.defineProperty(exports, "HttpStatusGone", { enumerable: true, get: function () { return __importDefault(Gone_js_1).default; } });
|
|
40
43
|
var ImATeapot_js_1 = require("./error/http/ImATeapot.js");
|
|
41
|
-
Object.defineProperty(exports, "HttpStatusImATeapot", { enumerable: true, get: function () { return ImATeapot_js_1.default; } });
|
|
44
|
+
Object.defineProperty(exports, "HttpStatusImATeapot", { enumerable: true, get: function () { return __importDefault(ImATeapot_js_1).default; } });
|
|
42
45
|
var InsufficientStorage_js_1 = require("./error/http/InsufficientStorage.js");
|
|
43
|
-
Object.defineProperty(exports, "HttpStatusInsufficientStorage", { enumerable: true, get: function () { return InsufficientStorage_js_1.default; } });
|
|
46
|
+
Object.defineProperty(exports, "HttpStatusInsufficientStorage", { enumerable: true, get: function () { return __importDefault(InsufficientStorage_js_1).default; } });
|
|
44
47
|
var InternalServerError_js_1 = require("./error/http/InternalServerError.js");
|
|
45
|
-
Object.defineProperty(exports, "HttpStatusInternalServerError", { enumerable: true, get: function () { return InternalServerError_js_1.default; } });
|
|
48
|
+
Object.defineProperty(exports, "HttpStatusInternalServerError", { enumerable: true, get: function () { return __importDefault(InternalServerError_js_1).default; } });
|
|
46
49
|
var Locked_js_1 = require("./error/http/Locked.js");
|
|
47
|
-
Object.defineProperty(exports, "HttpStatusLocked", { enumerable: true, get: function () { return Locked_js_1.default; } });
|
|
50
|
+
Object.defineProperty(exports, "HttpStatusLocked", { enumerable: true, get: function () { return __importDefault(Locked_js_1).default; } });
|
|
48
51
|
var MethodNotAllowed_js_1 = require("./error/http/MethodNotAllowed.js");
|
|
49
|
-
Object.defineProperty(exports, "HttpStatusMethodNotAllowed", { enumerable: true, get: function () { return MethodNotAllowed_js_1.default; } });
|
|
52
|
+
Object.defineProperty(exports, "HttpStatusMethodNotAllowed", { enumerable: true, get: function () { return __importDefault(MethodNotAllowed_js_1).default; } });
|
|
50
53
|
var MisdirectedRequest_js_1 = require("./error/http/MisdirectedRequest.js");
|
|
51
|
-
Object.defineProperty(exports, "HttpStatusMisdirectedRequest", { enumerable: true, get: function () { return MisdirectedRequest_js_1.default; } });
|
|
54
|
+
Object.defineProperty(exports, "HttpStatusMisdirectedRequest", { enumerable: true, get: function () { return __importDefault(MisdirectedRequest_js_1).default; } });
|
|
52
55
|
var NotAcceptable_js_1 = require("./error/http/NotAcceptable.js");
|
|
53
|
-
Object.defineProperty(exports, "HttpStatusNotAcceptable", { enumerable: true, get: function () { return NotAcceptable_js_1.default; } });
|
|
56
|
+
Object.defineProperty(exports, "HttpStatusNotAcceptable", { enumerable: true, get: function () { return __importDefault(NotAcceptable_js_1).default; } });
|
|
54
57
|
var NotExtended_js_1 = require("./error/http/NotExtended.js");
|
|
55
|
-
Object.defineProperty(exports, "HttpStatusNotExtended", { enumerable: true, get: function () { return NotExtended_js_1.default; } });
|
|
58
|
+
Object.defineProperty(exports, "HttpStatusNotExtended", { enumerable: true, get: function () { return __importDefault(NotExtended_js_1).default; } });
|
|
56
59
|
var NotFound_js_1 = require("./error/http/NotFound.js");
|
|
57
|
-
Object.defineProperty(exports, "HttpStatusNotFound", { enumerable: true, get: function () { return NotFound_js_1.default; } });
|
|
60
|
+
Object.defineProperty(exports, "HttpStatusNotFound", { enumerable: true, get: function () { return __importDefault(NotFound_js_1).default; } });
|
|
58
61
|
var NotImplemented_js_1 = require("./error/http/NotImplemented.js");
|
|
59
|
-
Object.defineProperty(exports, "HttpStatusNotImplemented", { enumerable: true, get: function () { return NotImplemented_js_1.default; } });
|
|
62
|
+
Object.defineProperty(exports, "HttpStatusNotImplemented", { enumerable: true, get: function () { return __importDefault(NotImplemented_js_1).default; } });
|
|
60
63
|
var PaymentRequired_js_1 = require("./error/http/PaymentRequired.js");
|
|
61
|
-
Object.defineProperty(exports, "HttpStatusPaymentRequired", { enumerable: true, get: function () { return PaymentRequired_js_1.default; } });
|
|
64
|
+
Object.defineProperty(exports, "HttpStatusPaymentRequired", { enumerable: true, get: function () { return __importDefault(PaymentRequired_js_1).default; } });
|
|
62
65
|
var PreconditionFailed_js_1 = require("./error/http/PreconditionFailed.js");
|
|
63
|
-
Object.defineProperty(exports, "HttpStatusPreconditionFailed", { enumerable: true, get: function () { return PreconditionFailed_js_1.default; } });
|
|
66
|
+
Object.defineProperty(exports, "HttpStatusPreconditionFailed", { enumerable: true, get: function () { return __importDefault(PreconditionFailed_js_1).default; } });
|
|
64
67
|
var PreconditionRequired_js_1 = require("./error/http/PreconditionRequired.js");
|
|
65
|
-
Object.defineProperty(exports, "HttpStatusPreconditionRequired", { enumerable: true, get: function () { return PreconditionRequired_js_1.default; } });
|
|
68
|
+
Object.defineProperty(exports, "HttpStatusPreconditionRequired", { enumerable: true, get: function () { return __importDefault(PreconditionRequired_js_1).default; } });
|
|
66
69
|
var ProxyAuthenticationRequired_js_1 = require("./error/http/ProxyAuthenticationRequired.js");
|
|
67
|
-
Object.defineProperty(exports, "HttpStatusProxyAuthenticationRequired", { enumerable: true, get: function () { return ProxyAuthenticationRequired_js_1.default; } });
|
|
70
|
+
Object.defineProperty(exports, "HttpStatusProxyAuthenticationRequired", { enumerable: true, get: function () { return __importDefault(ProxyAuthenticationRequired_js_1).default; } });
|
|
68
71
|
var RequestHeaderFieldsTooLarge_js_1 = require("./error/http/RequestHeaderFieldsTooLarge.js");
|
|
69
|
-
Object.defineProperty(exports, "HttpStatusRequestHeaderFieldsTooLarge", { enumerable: true, get: function () { return RequestHeaderFieldsTooLarge_js_1.default; } });
|
|
72
|
+
Object.defineProperty(exports, "HttpStatusRequestHeaderFieldsTooLarge", { enumerable: true, get: function () { return __importDefault(RequestHeaderFieldsTooLarge_js_1).default; } });
|
|
70
73
|
var ServiceUnavailable_js_1 = require("./error/http/ServiceUnavailable.js");
|
|
71
|
-
Object.defineProperty(exports, "HttpStatusServiceUnavailable", { enumerable: true, get: function () { return ServiceUnavailable_js_1.default; } });
|
|
74
|
+
Object.defineProperty(exports, "HttpStatusServiceUnavailable", { enumerable: true, get: function () { return __importDefault(ServiceUnavailable_js_1).default; } });
|
|
72
75
|
var TooManyRequests_js_1 = require("./error/http/TooManyRequests.js");
|
|
73
|
-
Object.defineProperty(exports, "HttpStatusTooManyRequests", { enumerable: true, get: function () { return TooManyRequests_js_1.default; } });
|
|
76
|
+
Object.defineProperty(exports, "HttpStatusTooManyRequests", { enumerable: true, get: function () { return __importDefault(TooManyRequests_js_1).default; } });
|
|
74
77
|
var Unauthorized_js_1 = require("./error/http/Unauthorized.js");
|
|
75
|
-
Object.defineProperty(exports, "HttpStatusUnauthorized", { enumerable: true, get: function () { return Unauthorized_js_1.default; } });
|
|
78
|
+
Object.defineProperty(exports, "HttpStatusUnauthorized", { enumerable: true, get: function () { return __importDefault(Unauthorized_js_1).default; } });
|
|
76
79
|
var UnavailableForLegalReasons_js_1 = require("./error/http/UnavailableForLegalReasons.js");
|
|
77
|
-
Object.defineProperty(exports, "HttpStatusUnavailableForLegalReasons", { enumerable: true, get: function () { return UnavailableForLegalReasons_js_1.default; } });
|
|
80
|
+
Object.defineProperty(exports, "HttpStatusUnavailableForLegalReasons", { enumerable: true, get: function () { return __importDefault(UnavailableForLegalReasons_js_1).default; } });
|
|
78
81
|
var UnprocessableContent_js_1 = require("./error/http/UnprocessableContent.js");
|
|
79
|
-
Object.defineProperty(exports, "HttpStatusUnprocessableContent", { enumerable: true, get: function () { return UnprocessableContent_js_1.default; } });
|
|
82
|
+
Object.defineProperty(exports, "HttpStatusUnprocessableContent", { enumerable: true, get: function () { return __importDefault(UnprocessableContent_js_1).default; } });
|
|
80
83
|
var UnsupportedMediaType_js_1 = require("./error/http/UnsupportedMediaType.js");
|
|
81
|
-
Object.defineProperty(exports, "HttpStatusUnsupportedMediaType", { enumerable: true, get: function () { return UnsupportedMediaType_js_1.default; } });
|
|
84
|
+
Object.defineProperty(exports, "HttpStatusUnsupportedMediaType", { enumerable: true, get: function () { return __importDefault(UnsupportedMediaType_js_1).default; } });
|
|
82
85
|
var controller_js_1 = require("./generate/controller.js");
|
|
83
|
-
Object.defineProperty(exports, "generateController", { enumerable: true, get: function () { return controller_js_1.default; } });
|
|
86
|
+
Object.defineProperty(exports, "generateController", { enumerable: true, get: function () { return __importDefault(controller_js_1).default; } });
|
|
84
87
|
var resource_js_1 = require("./generate/resource.js");
|
|
85
|
-
Object.defineProperty(exports, "generateResource", { enumerable: true, get: function () { return resource_js_1.default; } });
|
|
88
|
+
Object.defineProperty(exports, "generateResource", { enumerable: true, get: function () { return __importDefault(resource_js_1).default; } });
|
|
86
89
|
var cookieMaxAgeFromCookieOpts_js_1 = require("./helpers/cookieMaxAgeFromCookieOpts.js");
|
|
87
|
-
Object.defineProperty(exports, "cookieMaxAgeFromCookieOpts", { enumerable: true, get: function () { return cookieMaxAgeFromCookieOpts_js_1.default; } });
|
|
90
|
+
Object.defineProperty(exports, "cookieMaxAgeFromCookieOpts", { enumerable: true, get: function () { return __importDefault(cookieMaxAgeFromCookieOpts_js_1).default; } });
|
|
88
91
|
var pathifyNestedObject_js_1 = require("./helpers/pathifyNestedObject.js");
|
|
89
|
-
Object.defineProperty(exports, "pathifyNestedObject", { enumerable: true, get: function () { return pathifyNestedObject_js_1.default; } });
|
|
92
|
+
Object.defineProperty(exports, "pathifyNestedObject", { enumerable: true, get: function () { return __importDefault(pathifyNestedObject_js_1).default; } });
|
|
90
93
|
var endpoint_js_1 = require("./openapi-renderer/endpoint.js");
|
|
91
94
|
Object.defineProperty(exports, "MissingControllerActionPairingInRoutes", { enumerable: true, get: function () { return endpoint_js_1.MissingControllerActionPairingInRoutes; } });
|
|
92
95
|
var PsychicImporter_js_1 = require("./psychic-application/helpers/PsychicImporter.js");
|
|
93
|
-
Object.defineProperty(exports, "PsychicImporter", { enumerable: true, get: function () { return PsychicImporter_js_1.default; } });
|
|
96
|
+
Object.defineProperty(exports, "PsychicImporter", { enumerable: true, get: function () { return __importDefault(PsychicImporter_js_1).default; } });
|
|
94
97
|
var index_js_4 = require("./psychic-application/index.js");
|
|
95
|
-
Object.defineProperty(exports, "PsychicApplication", { enumerable: true, get: function () { return index_js_4.default; } });
|
|
98
|
+
Object.defineProperty(exports, "PsychicApplication", { enumerable: true, get: function () { return __importDefault(index_js_4).default; } });
|
|
96
99
|
var index_js_5 = require("./router/index.js");
|
|
97
|
-
Object.defineProperty(exports, "PsychicRouter", { enumerable: true, get: function () { return index_js_5.default; } });
|
|
100
|
+
Object.defineProperty(exports, "PsychicRouter", { enumerable: true, get: function () { return __importDefault(index_js_5).default; } });
|
|
98
101
|
var startPsychicServer_js_1 = require("./server/helpers/startPsychicServer.js");
|
|
99
102
|
Object.defineProperty(exports, "getPsychicHttpInstance", { enumerable: true, get: function () { return startPsychicServer_js_1.createPsychicHttpInstance; } });
|
|
100
103
|
var index_js_6 = require("./server/index.js");
|
|
101
|
-
Object.defineProperty(exports, "PsychicServer", { enumerable: true, get: function () { return index_js_6.default; } });
|
|
104
|
+
Object.defineProperty(exports, "PsychicServer", { enumerable: true, get: function () { return __importDefault(index_js_6).default; } });
|
|
102
105
|
var params_js_1 = require("./server/params.js");
|
|
103
|
-
Object.defineProperty(exports, "Params", { enumerable: true, get: function () { return params_js_1.default; } });
|
|
106
|
+
Object.defineProperty(exports, "Params", { enumerable: true, get: function () { return __importDefault(params_js_1).default; } });
|
|
104
107
|
Object.defineProperty(exports, "ParamValidationError", { enumerable: true, get: function () { return params_js_1.ParamValidationError; } });
|
|
105
108
|
var index_js_7 = require("./session/index.js");
|
|
106
|
-
Object.defineProperty(exports, "PsychicSession", { enumerable: true, get: function () { return index_js_7.default; } });
|
|
109
|
+
Object.defineProperty(exports, "PsychicSession", { enumerable: true, get: function () { return __importDefault(index_js_7).default; } });
|
|
@@ -1,14 +1,40 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
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);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
2
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
29
|
const dream_1 = require("@rvoh/dream");
|
|
4
|
-
const fs = require("fs/promises");
|
|
5
30
|
const lodash_es_1 = require("lodash-es");
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
31
|
+
const fs = __importStar(require("node:fs/promises"));
|
|
32
|
+
const UnexpectedUndefined_js_1 = __importDefault(require("../error/UnexpectedUndefined.js"));
|
|
33
|
+
const EnvInternal_js_1 = __importDefault(require("../helpers/EnvInternal.js"));
|
|
34
|
+
const openapiJsonPath_js_1 = __importDefault(require("../helpers/openapiJsonPath.js"));
|
|
35
|
+
const index_js_1 = __importDefault(require("../psychic-application/index.js"));
|
|
10
36
|
const types_js_1 = require("../router/types.js");
|
|
11
|
-
const index_js_2 = require("../server/index.js");
|
|
37
|
+
const index_js_2 = __importDefault(require("../server/index.js"));
|
|
12
38
|
const defaults_js_1 = require("./defaults.js");
|
|
13
39
|
class OpenapiAppRenderer {
|
|
14
40
|
/**
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
const dream_1 = require("@rvoh/dream");
|
|
4
7
|
const cache_js_1 = require("../psychic-application/cache.js");
|
|
5
|
-
const isBlankDescription_js_1 = require("./helpers/isBlankDescription.js");
|
|
6
|
-
const serializer_js_1 = require("./serializer.js");
|
|
8
|
+
const isBlankDescription_js_1 = __importDefault(require("./helpers/isBlankDescription.js"));
|
|
9
|
+
const serializer_js_1 = __importDefault(require("./serializer.js"));
|
|
7
10
|
class OpenapiBodySegmentRenderer {
|
|
8
11
|
controllerClass;
|
|
9
12
|
bodySegment;
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.MissingControllerActionPairingInRoutes = void 0;
|
|
4
7
|
const dream_1 = require("@rvoh/dream");
|
|
5
8
|
const lodash_es_1 = require("lodash-es");
|
|
6
|
-
const index_js_1 = require("../psychic-application/index.js");
|
|
7
|
-
const body_segment_js_1 = require("./body-segment.js");
|
|
9
|
+
const index_js_1 = __importDefault(require("../psychic-application/index.js"));
|
|
10
|
+
const body_segment_js_1 = __importDefault(require("./body-segment.js"));
|
|
8
11
|
const defaults_js_1 = require("./defaults.js");
|
|
9
|
-
const openapiRoute_js_1 = require("./helpers/openapiRoute.js");
|
|
10
|
-
const serializer_js_1 = require("./serializer.js");
|
|
12
|
+
const openapiRoute_js_1 = __importDefault(require("./helpers/openapiRoute.js"));
|
|
13
|
+
const serializer_js_1 = __importDefault(require("./serializer.js"));
|
|
11
14
|
class OpenapiEndpointRenderer {
|
|
12
15
|
dreamsOrSerializers;
|
|
13
16
|
controllerClass;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
const dream_1 = require("@rvoh/dream");
|
|
4
|
-
const CannotFlattenMultiplePolymorphicRendersOneAssociations_js_1 = require("../error/openapi/CannotFlattenMultiplePolymorphicRendersOneAssociations.js");
|
|
5
|
-
const UnexpectedUndefined_js_1 = require("../error/UnexpectedUndefined.js");
|
|
6
|
-
const EnvInternal_js_1 = require("../helpers/EnvInternal.js");
|
|
7
|
-
const index_js_1 = require("../psychic-application/index.js");
|
|
8
|
-
const body_segment_js_1 = require("./body-segment.js");
|
|
7
|
+
const CannotFlattenMultiplePolymorphicRendersOneAssociations_js_1 = __importDefault(require("../error/openapi/CannotFlattenMultiplePolymorphicRendersOneAssociations.js"));
|
|
8
|
+
const UnexpectedUndefined_js_1 = __importDefault(require("../error/UnexpectedUndefined.js"));
|
|
9
|
+
const EnvInternal_js_1 = __importDefault(require("../helpers/EnvInternal.js"));
|
|
10
|
+
const index_js_1 = __importDefault(require("../psychic-application/index.js"));
|
|
11
|
+
const body_segment_js_1 = __importDefault(require("./body-segment.js"));
|
|
9
12
|
class OpenapiSerializerRenderer {
|
|
10
13
|
openapiName;
|
|
11
14
|
controllerClass;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.default = importControllers;
|
|
4
7
|
exports.getControllersOrFail = getControllersOrFail;
|
|
5
8
|
exports.getControllersOrBlank = getControllersOrBlank;
|
|
6
|
-
const index_js_1 = require("../../../controller/index.js");
|
|
7
|
-
const globalControllerKeyFromPath_js_1 = require("../globalControllerKeyFromPath.js");
|
|
8
|
-
const PsychicImporter_js_1 = require("../PsychicImporter.js");
|
|
9
|
+
const index_js_1 = __importDefault(require("../../../controller/index.js"));
|
|
10
|
+
const globalControllerKeyFromPath_js_1 = __importDefault(require("../globalControllerKeyFromPath.js"));
|
|
11
|
+
const PsychicImporter_js_1 = __importDefault(require("../PsychicImporter.js"));
|
|
9
12
|
let _controllers;
|
|
10
13
|
async function importControllers(psychicApp, controllersPath,
|
|
11
14
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.default = importServices;
|
|
4
7
|
exports.setCachedServices = setCachedServices;
|
|
5
8
|
exports.getServicesOrFail = getServicesOrFail;
|
|
6
9
|
exports.getServicesOrBlank = getServicesOrBlank;
|
|
7
|
-
const globalServiceKeyFromPath_js_1 = require("../globalServiceKeyFromPath.js");
|
|
8
|
-
const PsychicImporter_js_1 = require("../PsychicImporter.js");
|
|
10
|
+
const globalServiceKeyFromPath_js_1 = __importDefault(require("../globalServiceKeyFromPath.js"));
|
|
11
|
+
const PsychicImporter_js_1 = __importDefault(require("../PsychicImporter.js"));
|
|
9
12
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10
13
|
let _services;
|
|
11
14
|
async function importServices(servicesPath,
|
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
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);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
2
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const dotenv = require("dotenv");
|
|
4
|
-
const EnvInternal_js_1 = require("../../helpers/EnvInternal.js");
|
|
29
|
+
const dotenv = __importStar(require("dotenv"));
|
|
30
|
+
const EnvInternal_js_1 = __importDefault(require("../../helpers/EnvInternal.js"));
|
|
5
31
|
dotenv.config({ path: EnvInternal_js_1.default.isTest ? '../../.env.test' : '../../.env' });
|
|
@@ -1,18 +1,44 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
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);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
2
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
29
|
exports.PsychicApplicationAllowedPackageManagersEnumValues = void 0;
|
|
4
30
|
const dream_1 = require("@rvoh/dream");
|
|
5
|
-
const init_missing_api_root_js_1 = require("../error/psychic-application/init-missing-api-root.js");
|
|
6
|
-
const init_missing_call_to_load_controllers_js_1 = require("../error/psychic-application/init-missing-call-to-load-controllers.js");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
31
|
+
const init_missing_api_root_js_1 = __importDefault(require("../error/psychic-application/init-missing-api-root.js"));
|
|
32
|
+
const init_missing_call_to_load_controllers_js_1 = __importDefault(require("../error/psychic-application/init-missing-call-to-load-controllers.js"));
|
|
33
|
+
const init_missing_package_manager_js_1 = __importDefault(require("../error/psychic-application/init-missing-package-manager.js"));
|
|
34
|
+
const init_missing_routes_callback_js_1 = __importDefault(require("../error/psychic-application/init-missing-routes-callback.js"));
|
|
35
|
+
const cookieMaxAgeFromCookieOpts_js_1 = __importDefault(require("../helpers/cookieMaxAgeFromCookieOpts.js"));
|
|
36
|
+
const EnvInternal_js_1 = __importDefault(require("../helpers/EnvInternal.js"));
|
|
37
|
+
const pascalizeFileName_js_1 = __importDefault(require("../helpers/pascalizeFileName.js"));
|
|
10
38
|
const cache_js_1 = require("./cache.js");
|
|
11
|
-
const importControllers_js_1 = require("./helpers/import/importControllers.js");
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const importServices_js_1 = require("./helpers/import/importServices.js");
|
|
15
|
-
const pascalizeFileName_js_1 = require("../helpers/pascalizeFileName.js");
|
|
39
|
+
const importControllers_js_1 = __importStar(require("./helpers/import/importControllers.js"));
|
|
40
|
+
const importServices_js_1 = __importStar(require("./helpers/import/importServices.js"));
|
|
41
|
+
const lookupClassByGlobalName_js_1 = __importDefault(require("./helpers/lookupClassByGlobalName.js"));
|
|
16
42
|
class PsychicApplication {
|
|
17
43
|
static async init(cb, dreamCb, opts = {}) {
|
|
18
44
|
let psychicApp;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.routePath = routePath;
|
|
4
7
|
exports.resourcePath = resourcePath;
|
|
@@ -10,10 +13,10 @@ exports.lookupControllerOrFail = lookupControllerOrFail;
|
|
|
10
13
|
exports.applyResourcesAction = applyResourcesAction;
|
|
11
14
|
exports.applyResourceAction = applyResourceAction;
|
|
12
15
|
const dream_1 = require("@rvoh/dream");
|
|
13
|
-
const cannot_find_inferred_controller_from_provided_namespace_js_1 = require("../error/router/cannot-find-inferred-controller-from-provided-namespace.js");
|
|
14
|
-
const cannot_infer_controller_from_top_level_route_js_1 = require("../error/router/cannot-infer-controller-from-top-level-route.js");
|
|
15
|
-
const pascalizeFileName_js_1 = require("../helpers/pascalizeFileName.js");
|
|
16
|
-
const index_js_1 = require("../psychic-application/index.js");
|
|
16
|
+
const cannot_find_inferred_controller_from_provided_namespace_js_1 = __importDefault(require("../error/router/cannot-find-inferred-controller-from-provided-namespace.js"));
|
|
17
|
+
const cannot_infer_controller_from_top_level_route_js_1 = __importDefault(require("../error/router/cannot-infer-controller-from-top-level-route.js"));
|
|
18
|
+
const pascalizeFileName_js_1 = __importDefault(require("../helpers/pascalizeFileName.js"));
|
|
19
|
+
const index_js_1 = __importDefault(require("../psychic-application/index.js"));
|
|
17
20
|
function routePath(routePath) {
|
|
18
21
|
return `/${routePath.replace(/^\//, '')}`;
|
|
19
22
|
}
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.PsychicNestedRouter = void 0;
|
|
4
7
|
const dream_1 = require("@rvoh/dream");
|
|
5
8
|
const express_1 = require("express");
|
|
6
|
-
const pluralize_esm_1 = require("pluralize-esm");
|
|
7
|
-
const EnvInternal_js_1 = require("../helpers/EnvInternal.js");
|
|
8
|
-
const errorIsRescuableHttpError_js_1 = require("../helpers/error/errorIsRescuableHttpError.js");
|
|
9
|
-
const index_js_1 = require("../psychic-application/index.js");
|
|
9
|
+
const pluralize_esm_1 = __importDefault(require("pluralize-esm"));
|
|
10
|
+
const EnvInternal_js_1 = __importDefault(require("../helpers/EnvInternal.js"));
|
|
11
|
+
const errorIsRescuableHttpError_js_1 = __importDefault(require("../helpers/error/errorIsRescuableHttpError.js"));
|
|
12
|
+
const index_js_1 = __importDefault(require("../psychic-application/index.js"));
|
|
10
13
|
const helpers_js_1 = require("../router/helpers.js");
|
|
11
14
|
const params_js_1 = require("../server/params.js");
|
|
12
|
-
const route_manager_js_1 = require("./route-manager.js");
|
|
15
|
+
const route_manager_js_1 = __importDefault(require("./route-manager.js"));
|
|
13
16
|
const types_js_1 = require("./types.js");
|
|
14
17
|
class PsychicRouter {
|
|
15
18
|
app;
|
|
@@ -1,13 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
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);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
2
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
29
|
exports.default = startPsychicServer;
|
|
4
30
|
exports.createPsychicHttpInstance = createPsychicHttpInstance;
|
|
5
31
|
const dream_1 = require("@rvoh/dream");
|
|
6
|
-
const fs = require("fs");
|
|
7
|
-
const http = require("http");
|
|
8
|
-
const https = require("https");
|
|
9
|
-
const EnvInternal_js_1 = require("../../helpers/EnvInternal.js");
|
|
10
|
-
const index_js_1 = require("../../server/index.js");
|
|
32
|
+
const fs = __importStar(require("node:fs"));
|
|
33
|
+
const http = __importStar(require("node:http"));
|
|
34
|
+
const https = __importStar(require("node:https"));
|
|
35
|
+
const EnvInternal_js_1 = __importDefault(require("../../helpers/EnvInternal.js"));
|
|
36
|
+
const index_js_1 = __importDefault(require("../../server/index.js"));
|
|
11
37
|
async function startPsychicServer({ app, port, sslCredentials, }) {
|
|
12
38
|
return await new Promise(accept => {
|
|
13
39
|
const httpOrHttps = createPsychicHttpInstance(app, sslCredentials);
|
|
@@ -1,16 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
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);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
2
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
29
|
const dream_1 = require("@rvoh/dream");
|
|
4
|
-
const cookieParser = require("cookie-parser");
|
|
5
|
-
const cors = require("cors");
|
|
6
|
-
const express = require("express");
|
|
7
|
-
const OpenApiValidator = require("express-openapi-validator");
|
|
8
|
-
const path = require("path");
|
|
9
|
-
const EnvInternal_js_1 = require("../helpers/EnvInternal.js");
|
|
10
|
-
const isOpenapiError_js_1 = require("../helpers/isOpenapiError.js");
|
|
11
|
-
const index_js_1 = require("../psychic-application/index.js");
|
|
12
|
-
const index_js_2 = require("../router/index.js");
|
|
13
|
-
const startPsychicServer_js_1 = require("./helpers/startPsychicServer.js");
|
|
30
|
+
const cookieParser = __importStar(require("cookie-parser"));
|
|
31
|
+
const cors = __importStar(require("cors"));
|
|
32
|
+
const express = __importStar(require("express"));
|
|
33
|
+
const OpenApiValidator = __importStar(require("express-openapi-validator"));
|
|
34
|
+
const path = __importStar(require("node:path"));
|
|
35
|
+
const EnvInternal_js_1 = __importDefault(require("../helpers/EnvInternal.js"));
|
|
36
|
+
const isOpenapiError_js_1 = __importDefault(require("../helpers/isOpenapiError.js"));
|
|
37
|
+
const index_js_1 = __importDefault(require("../psychic-application/index.js"));
|
|
38
|
+
const index_js_2 = __importDefault(require("../router/index.js"));
|
|
39
|
+
const startPsychicServer_js_1 = __importStar(require("./helpers/startPsychicServer.js"));
|
|
14
40
|
class PsychicServer {
|
|
15
41
|
static async startPsychicServer(opts) {
|
|
16
42
|
return await (0, startPsychicServer_js_1.default)(opts);
|
|
@@ -19,7 +45,7 @@ class PsychicServer {
|
|
|
19
45
|
return (0, startPsychicServer_js_1.createPsychicHttpInstance)(app, sslCredentials);
|
|
20
46
|
}
|
|
21
47
|
static asciiLogo() {
|
|
22
|
-
return dream_1.
|
|
48
|
+
return dream_1.DreamLogos.colorful();
|
|
23
49
|
}
|
|
24
50
|
expressApp;
|
|
25
51
|
httpServer;
|
|
@@ -133,7 +159,6 @@ class PsychicServer {
|
|
|
133
159
|
}
|
|
134
160
|
buildApp() {
|
|
135
161
|
this.expressApp = express.default();
|
|
136
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
137
162
|
this.expressApp.use(cookieParser.default());
|
|
138
163
|
}
|
|
139
164
|
initializeCors() {
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.ParamValidationError = void 0;
|
|
4
7
|
const dream_1 = require("@rvoh/dream");
|
|
5
|
-
const isUuid_js_1 = require("../helpers/isUuid.js");
|
|
8
|
+
const isUuid_js_1 = __importDefault(require("../helpers/isUuid.js"));
|
|
6
9
|
const typechecks_js_1 = require("../helpers/typechecks.js");
|
|
7
10
|
class Params {
|
|
8
11
|
/**
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const internal_encrypt_js_1 = require("../encrypt/internal-encrypt.js");
|
|
4
|
-
const cookieMaxAgeFromCookieOpts_js_1 = require("../helpers/cookieMaxAgeFromCookieOpts.js");
|
|
5
|
-
const EnvInternal_js_1 = require("../helpers/EnvInternal.js");
|
|
6
|
-
const index_js_1 = require("../psychic-application/index.js");
|
|
6
|
+
const internal_encrypt_js_1 = __importDefault(require("../encrypt/internal-encrypt.js"));
|
|
7
|
+
const cookieMaxAgeFromCookieOpts_js_1 = __importDefault(require("../helpers/cookieMaxAgeFromCookieOpts.js"));
|
|
8
|
+
const EnvInternal_js_1 = __importDefault(require("../helpers/EnvInternal.js"));
|
|
9
|
+
const index_js_1 = __importDefault(require("../psychic-application/index.js"));
|
|
7
10
|
class Session {
|
|
8
11
|
req;
|
|
9
12
|
res;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { uniq } from '@rvoh/dream';
|
|
2
|
-
import * as fs from 'fs/promises';
|
|
3
|
-
import * as path from 'path';
|
|
2
|
+
import * as fs from 'node:fs/promises';
|
|
3
|
+
import * as path from 'node:path';
|
|
4
4
|
import PsychicApplication from '../../psychic-application/index.js';
|
|
5
5
|
export default async function generateRouteTypes(routes) {
|
|
6
6
|
const fileStr = `\
|