@rvoh/psychic 1.11.0 → 1.11.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/cjs/src/cli/helpers/PsychicLogos.js +1 -1
- package/dist/cjs/src/index.js +6 -2
- package/dist/cjs/src/server/helpers/startPsychicServer.js +2 -2
- package/dist/cjs/src/server/index.js +1 -1
- package/dist/esm/src/cli/helpers/PsychicLogos.js +1 -1
- package/dist/esm/src/index.js +2 -0
- package/dist/esm/src/server/helpers/startPsychicServer.js +2 -2
- package/dist/esm/src/server/index.js +1 -1
- package/dist/types/src/cli/helpers/PsychicLogos.d.ts +1 -1
- package/dist/types/src/index.d.ts +2 -0
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const colorize_js_1 = __importDefault(require("./colorize.js"));
|
|
7
7
|
class PsychicLogos {
|
|
8
|
-
static
|
|
8
|
+
static asciiLogo() {
|
|
9
9
|
const g = (str) => (0, colorize_js_1.default)(str, { color: 'green' });
|
|
10
10
|
return `
|
|
11
11
|
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
|
package/dist/cjs/src/index.js
CHANGED
|
@@ -3,8 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
7
|
-
exports.PsychicSession = exports.Params = exports.PsychicServer = exports.getPsychicHttpInstance = void 0;
|
|
6
|
+
exports.PsychicImporter = exports.MissingControllerActionPairingInRoutes = exports.ParamValidationErrors = exports.ParamValidationError = exports.PsychicLogos = exports.colorize = exports.sanitizeString = 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.PsychicDevtools = exports.PsychicController = exports.OpenAPI = exports.BeforeAction = exports.PsychicCLI = exports.PsychicBin = exports.pluralize = void 0;
|
|
7
|
+
exports.PsychicSession = exports.Params = exports.PsychicServer = exports.getPsychicHttpInstance = exports.PsychicRouter = exports.PsychicApp = void 0;
|
|
8
8
|
const pluralize_esm_1 = __importDefault(require("pluralize-esm"));
|
|
9
9
|
exports.pluralize = pluralize_esm_1.default;
|
|
10
10
|
var index_js_1 = require("./bin/index.js");
|
|
@@ -92,6 +92,10 @@ var pathifyNestedObject_js_1 = require("./helpers/pathifyNestedObject.js");
|
|
|
92
92
|
Object.defineProperty(exports, "pathifyNestedObject", { enumerable: true, get: function () { return __importDefault(pathifyNestedObject_js_1).default; } });
|
|
93
93
|
var sanitizeString_js_1 = require("./helpers/sanitizeString.js");
|
|
94
94
|
Object.defineProperty(exports, "sanitizeString", { enumerable: true, get: function () { return __importDefault(sanitizeString_js_1).default; } });
|
|
95
|
+
var colorize_js_1 = require("./cli/helpers/colorize.js");
|
|
96
|
+
Object.defineProperty(exports, "colorize", { enumerable: true, get: function () { return __importDefault(colorize_js_1).default; } });
|
|
97
|
+
var PsychicLogos_js_1 = require("./cli/helpers/PsychicLogos.js");
|
|
98
|
+
Object.defineProperty(exports, "PsychicLogos", { enumerable: true, get: function () { return __importDefault(PsychicLogos_js_1).default; } });
|
|
95
99
|
var ParamValidationError_js_1 = require("./error/controller/ParamValidationError.js");
|
|
96
100
|
Object.defineProperty(exports, "ParamValidationError", { enumerable: true, get: function () { return __importDefault(ParamValidationError_js_1).default; } });
|
|
97
101
|
var ParamValidationErrors_js_1 = require("./error/controller/ParamValidationErrors.js");
|
|
@@ -33,9 +33,9 @@ const fs = __importStar(require("node:fs"));
|
|
|
33
33
|
const http = __importStar(require("node:http"));
|
|
34
34
|
const https = __importStar(require("node:https"));
|
|
35
35
|
const colorize_js_1 = __importDefault(require("../../cli/helpers/colorize.js"));
|
|
36
|
+
const PsychicLogos_js_1 = __importDefault(require("../../cli/helpers/PsychicLogos.js"));
|
|
36
37
|
const EnvInternal_js_1 = __importDefault(require("../../helpers/EnvInternal.js"));
|
|
37
38
|
const index_js_1 = __importDefault(require("../../psychic-app/index.js"));
|
|
38
|
-
const PsychicLogos_js_1 = __importDefault(require("../../cli/helpers/PsychicLogos.js"));
|
|
39
39
|
async function startPsychicServer({ app, port, sslCredentials, }) {
|
|
40
40
|
return await new Promise(accept => {
|
|
41
41
|
const httpOrHttps = createPsychicHttpInstance(app, sslCredentials);
|
|
@@ -58,7 +58,7 @@ function createPsychicHttpInstance(app, sslCredentials) {
|
|
|
58
58
|
}
|
|
59
59
|
function welcomeMessage({ port }) {
|
|
60
60
|
if (EnvInternal_js_1.default.isDevelopment) {
|
|
61
|
-
dream_1.DreamCLI.logger.log((0, colorize_js_1.default)(PsychicLogos_js_1.default.
|
|
61
|
+
dream_1.DreamCLI.logger.log((0, colorize_js_1.default)(PsychicLogos_js_1.default.asciiLogo(), { color: 'greenBright' }), {
|
|
62
62
|
logPrefix: '',
|
|
63
63
|
});
|
|
64
64
|
dream_1.DreamCLI.logger.log('', { logPrefix: '' });
|
|
@@ -30,11 +30,11 @@ const dream_1 = require("@rvoh/dream");
|
|
|
30
30
|
const cookieParser = __importStar(require("cookie-parser"));
|
|
31
31
|
const cors = __importStar(require("cors"));
|
|
32
32
|
const express = __importStar(require("express"));
|
|
33
|
+
const logIfDevelopment_js_1 = __importDefault(require("../controller/helpers/logIfDevelopment.js"));
|
|
33
34
|
const EnvInternal_js_1 = __importDefault(require("../helpers/EnvInternal.js"));
|
|
34
35
|
const index_js_1 = __importDefault(require("../psychic-app/index.js"));
|
|
35
36
|
const index_js_2 = __importDefault(require("../router/index.js"));
|
|
36
37
|
const startPsychicServer_js_1 = __importStar(require("./helpers/startPsychicServer.js"));
|
|
37
|
-
const logIfDevelopment_js_1 = __importDefault(require("../controller/helpers/logIfDevelopment.js"));
|
|
38
38
|
// const debugEnabled = debuglog('psychic').enabled
|
|
39
39
|
class PsychicServer {
|
|
40
40
|
static async startPsychicServer(opts) {
|
package/dist/esm/src/index.js
CHANGED
|
@@ -42,6 +42,8 @@ export { default as generateResource } from './generate/resource.js';
|
|
|
42
42
|
export { default as cookieMaxAgeFromCookieOpts } from './helpers/cookieMaxAgeFromCookieOpts.js';
|
|
43
43
|
export { default as pathifyNestedObject } from './helpers/pathifyNestedObject.js';
|
|
44
44
|
export { default as sanitizeString } from './helpers/sanitizeString.js';
|
|
45
|
+
export { default as colorize } from './cli/helpers/colorize.js';
|
|
46
|
+
export { default as PsychicLogos } from './cli/helpers/PsychicLogos.js';
|
|
45
47
|
export { default as ParamValidationError } from './error/controller/ParamValidationError.js';
|
|
46
48
|
export { default as ParamValidationErrors } from './error/controller/ParamValidationErrors.js';
|
|
47
49
|
export { MissingControllerActionPairingInRoutes, } from './openapi-renderer/endpoint.js';
|
|
@@ -3,9 +3,9 @@ import * as fs from 'node:fs';
|
|
|
3
3
|
import * as http from 'node:http';
|
|
4
4
|
import * as https from 'node:https';
|
|
5
5
|
import colorize from '../../cli/helpers/colorize.js';
|
|
6
|
+
import PsychicLogos from '../../cli/helpers/PsychicLogos.js';
|
|
6
7
|
import EnvInternal from '../../helpers/EnvInternal.js';
|
|
7
8
|
import PsychicApp from '../../psychic-app/index.js';
|
|
8
|
-
import PsychicLogos from '../../cli/helpers/PsychicLogos.js';
|
|
9
9
|
export default async function startPsychicServer({ app, port, sslCredentials, }) {
|
|
10
10
|
return await new Promise(accept => {
|
|
11
11
|
const httpOrHttps = createPsychicHttpInstance(app, sslCredentials);
|
|
@@ -28,7 +28,7 @@ export function createPsychicHttpInstance(app, sslCredentials) {
|
|
|
28
28
|
}
|
|
29
29
|
function welcomeMessage({ port }) {
|
|
30
30
|
if (EnvInternal.isDevelopment) {
|
|
31
|
-
DreamCLI.logger.log(colorize(PsychicLogos.
|
|
31
|
+
DreamCLI.logger.log(colorize(PsychicLogos.asciiLogo(), { color: 'greenBright' }), {
|
|
32
32
|
logPrefix: '',
|
|
33
33
|
});
|
|
34
34
|
DreamCLI.logger.log('', { logPrefix: '' });
|
|
@@ -2,11 +2,11 @@ import { closeAllDbConnections } from '@rvoh/dream';
|
|
|
2
2
|
import * as cookieParser from 'cookie-parser';
|
|
3
3
|
import * as cors from 'cors';
|
|
4
4
|
import * as express from 'express';
|
|
5
|
+
import logIfDevelopment from '../controller/helpers/logIfDevelopment.js';
|
|
5
6
|
import EnvInternal from '../helpers/EnvInternal.js';
|
|
6
7
|
import PsychicApp from '../psychic-app/index.js';
|
|
7
8
|
import PsychicRouter from '../router/index.js';
|
|
8
9
|
import startPsychicServer, { createPsychicHttpInstance, } from './helpers/startPsychicServer.js';
|
|
9
|
-
import logIfDevelopment from '../controller/helpers/logIfDevelopment.js';
|
|
10
10
|
// const debugEnabled = debuglog('psychic').enabled
|
|
11
11
|
export default class PsychicServer {
|
|
12
12
|
static async startPsychicServer(opts) {
|
|
@@ -51,6 +51,8 @@ export { default as generateResource } from './generate/resource.js';
|
|
|
51
51
|
export { default as cookieMaxAgeFromCookieOpts } from './helpers/cookieMaxAgeFromCookieOpts.js';
|
|
52
52
|
export { default as pathifyNestedObject } from './helpers/pathifyNestedObject.js';
|
|
53
53
|
export { default as sanitizeString } from './helpers/sanitizeString.js';
|
|
54
|
+
export { default as colorize } from './cli/helpers/colorize.js';
|
|
55
|
+
export { default as PsychicLogos } from './cli/helpers/PsychicLogos.js';
|
|
54
56
|
export { default as ParamValidationError } from './error/controller/ParamValidationError.js';
|
|
55
57
|
export { default as ParamValidationErrors } from './error/controller/ParamValidationErrors.js';
|
|
56
58
|
export { MissingControllerActionPairingInRoutes, type OpenapiContent, type OpenapiEndpointRendererOpts, type OpenapiEndpointResponse, type OpenapiHeaderOption, type OpenapiHeaders, type OpenapiHeaderType, type OpenapiMethodBody, type OpenapiParameterResponse, type OpenapiPathParams, type OpenapiQueryOption, type OpenapiResponses, type OpenapiSchema, type OpenapiPathParamOption as OpenapiUriOption, } from './openapi-renderer/endpoint.js';
|