@memberjunction/server 2.133.0 → 3.0.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/apolloServer/TransactionPlugin.d.ts +4 -0
- package/dist/apolloServer/TransactionPlugin.d.ts.map +1 -0
- package/dist/apolloServer/TransactionPlugin.js +46 -0
- package/dist/apolloServer/TransactionPlugin.js.map +1 -0
- package/dist/config.d.ts +1 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +125 -4
- package/dist/config.js.map +1 -1
- package/dist/generated/generated.d.ts +29 -0
- package/dist/generated/generated.d.ts.map +1 -1
- package/dist/generated/generated.js +166 -0
- package/dist/generated/generated.js.map +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +44 -43
- package/src/config.ts +167 -4
- package/src/generated/generated.ts +108 -0
- package/src/index.ts +4 -4
package/src/index.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { extendConnectionPoolWithQuery } from './util.js';
|
|
|
10
10
|
import { default as BodyParser } from 'body-parser';
|
|
11
11
|
import compression from 'compression'; // Add compression middleware
|
|
12
12
|
import cors from 'cors';
|
|
13
|
-
import express from 'express';
|
|
13
|
+
import express, { Application } from 'express';
|
|
14
14
|
import { default as fg } from 'fast-glob';
|
|
15
15
|
import { useServer } from 'graphql-ws/lib/use/ws';
|
|
16
16
|
import { createServer } from 'node:http';
|
|
@@ -77,7 +77,7 @@ const cacheRefreshInterval = configInfo.databaseSettings.metadataCacheRefreshInt
|
|
|
77
77
|
export { MaxLength } from 'class-validator';
|
|
78
78
|
export * from 'type-graphql';
|
|
79
79
|
export { NewUserBase } from './auth/newUsers.js';
|
|
80
|
-
export { configInfo } from './config.js';
|
|
80
|
+
export { configInfo, DEFAULT_SERVER_CONFIG } from './config.js';
|
|
81
81
|
export * from './directives/index.js';
|
|
82
82
|
export * from './entitySubclasses/entityPermissions.server.js';
|
|
83
83
|
export * from './types.js';
|
|
@@ -131,9 +131,9 @@ const localPath = (p: string) => {
|
|
|
131
131
|
return resolvedPath;
|
|
132
132
|
};
|
|
133
133
|
|
|
134
|
-
export const createApp = () => express();
|
|
134
|
+
export const createApp = (): Application => express();
|
|
135
135
|
|
|
136
|
-
export const serve = async (resolverPaths: Array<string>, app = createApp(), options?: MJServerOptions) => {
|
|
136
|
+
export const serve = async (resolverPaths: Array<string>, app: Application = createApp(), options?: MJServerOptions): Promise<void> => {
|
|
137
137
|
const localResolverPaths = ['resolvers/**/*Resolver.{js,ts}', 'generic/*Resolver.{js,ts}', 'generated/generated.{js,ts}'].map(localPath);
|
|
138
138
|
|
|
139
139
|
const combinedResolverPaths = [...resolverPaths, ...localResolverPaths];
|