@common-stack/server-stack 6.0.1-alpha.9 → 6.0.2-alpha.2

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.
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import * as http from 'http';
3
2
  import { Feature as ServerFeature } from '@common-stack/server-core';
4
3
  /**
@@ -1,2 +1,2 @@
1
- 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var rootSchemaDef = "scalar AnyObject\nscalar Date\nscalar Time\nscalar DateTime\nscalar Timestamp\nscalar URI\nscalar URIInput\nscalar Observable\nscalar JSON\nscalar JSONObject\n\ndirective @cacheControl(maxAge: Int, scope: CacheControlScope) on FIELD_DEFINITION | OBJECT | INTERFACE\nenum CacheControlScope {\n PUBLIC\n PRIVATE\n}\n\n\n\"\"\"\n An object with an ID.\n\"\"\"\ninterface Node {\n \"\"\"\n The ID of the node.\n \"\"\"\n id: ID!\n}\n\n# Pagination information. See https://facebook.github.io/relay/graphql/connections.htm#sec-undefined.PageInfo.\ntype PageInfo {\n # Whether there is a next page of nodes in the connection.\n hasNextPage: Boolean!\n}\n\n\"\"\"\n Represents a null return value.\n\"\"\"\ntype EmptyResponse {\n # A dummy null value.\n alwaysNil: String\n}\n\ntype FieldError {\n field: String!\n message: String!\n}\n\ninput Sort{\n key: String!,\n value: SortEnum!,\n}\n\nenum SortEnum{\n ASC\n DESC\n}\n\ntype Query {\n \"\"\"\n Looks up a node by ID.\n \"\"\"\n node(id: ID!): Node\n\n}\n\ntype Mutation {\n dummy: Int\n}\n\ntype Subscription {\n dummy: Int\n}\n\n\ntype AdminIdeSettings {\n dummy: Int\n}\n\n\"\"\" All Moleculer Topic names are extended from this.\"\"\"\nenum MoleculerServiceName {\n dummy\n}\n\ninterface IResourceUtilizationSettings {\n subTopic: String\n adminApiNamespace: String\n}\n\n\"\"\"\nTo calculate geometry over an Eath-like sphere.\nList the `longitude` first and then `latitude`\n - Validate longitude values are between `-180` and `180`\n - Validate latitude values are between `-90` and `90`\n\"\"\"\ntype GeoLocation {\n coordinates: [Float]\n}\n\n\"\"\"\nInput geometry of the location.\nList the `longitude` first and then `latitude`\n - Validate longitude values are between `-180` and `180`\n - Validate latitude values are between `-90` and `90`\n\"\"\"\ninput GeoLocationInput {\n type: String = \"Point\"\n coordinates: [Float]\n}\n\nenum MailTemplateId {\n dummy\n}\n\nenum MoleculerCronServiceName {\n dummy\n}\n\nschema {\n query: Query\n mutation: Mutation\n subscription: Subscription\n}\n\n";
1
+ 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var rootSchemaDef = "scalar AnyObject\nscalar Date\nscalar Time\nscalar DateTime\nscalar Timestamp\nscalar URI\nscalar URIInput\nscalar Observable\nscalar JSON\nscalar JSONObject\n\ndirective @cacheControl(maxAge: Int, scope: CacheControlScope) on FIELD_DEFINITION | OBJECT | INTERFACE\nenum CacheControlScope {\n PUBLIC\n PRIVATE\n}\n\n\n\"\"\"\n An object with an ID.\n\"\"\"\ninterface Node {\n \"\"\"\n The ID of the node.\n \"\"\"\n id: ID!\n}\n\n# Pagination information. See https://facebook.github.io/relay/graphql/connections.htm#sec-undefined.PageInfo.\ntype PageInfo {\n # Whether there is a next page of nodes in the connection.\n hasNextPage: Boolean!\n}\n\n\"\"\"\n Represents a null return value.\n\"\"\"\ntype EmptyResponse {\n # A dummy null value.\n alwaysNil: String\n}\n\ntype FieldError {\n field: String!\n message: String!\n}\n\ninput Sort{\n key: String!,\n value: SortEnum!,\n}\n\nenum SortEnum{\n ASC\n DESC\n}\n\ntype Query {\n \"\"\"\n Looks up a node by ID.\n \"\"\"\n node(id: ID!): Node\n\n}\n\ntype Mutation {\n dummy: Int\n}\n\ntype Subscription {\n dummy: Int\n}\n\n\ntype AdminIdeSettings {\n dummy: Int\n}\n\n\"\"\" All Moleculer Topic names are extended from this.\"\"\"\nenum MoleculerServiceName {\n dummy\n}\n\ninterface IResourceUtilizationSettings {\n subTopic: String\n adminApiNamespace: String\n}\n\n\"\"\"\nTo calculate geometry over an Eath-like sphere.\nList the `longitude` first and then `latitude`\n - Validate longitude values are between `-180` and `180`\n - Validate latitude values are between `-90` and `90`\n\"\"\"\ntype GeoLocation {\n coordinates: [Float]\n}\n\"\"\"\nInput geometry of the location.\nList the `longitude` first and then `latitude`\n - Validate longitude values are between `-180` and `180`\n - Validate latitude values are between `-90` and `90`\n\"\"\"\ninput GeoLocationInput {\n type: String = \"Point\"\n coordinates: [Float]\n}\n\n\"\"\"\nInput geometry of the location.\nList the `longitude` first and then `latitude`\n - Validate longitude values are between `-180` and `180`\n - Validate latitude values are between `-90` and `90`\n\"\"\"\ninput GeoLocationInput {\n type: String = \"Point\"\n coordinates: [Float]\n}\n\nenum MailTemplateId {\n dummy\n}\n\nenum MoleculerCronServiceName {\n dummy\n}\n\nschema {\n query: Query\n mutation: Mutation\n subscription: Subscription\n}\n\n";
2
2
  exports.default=rootSchemaDef;//# sourceMappingURL=root-schema.graphqls.cjs.map
@@ -1,2 +1,2 @@
1
- var rootSchemaDef = "scalar AnyObject\nscalar Date\nscalar Time\nscalar DateTime\nscalar Timestamp\nscalar URI\nscalar URIInput\nscalar Observable\nscalar JSON\nscalar JSONObject\n\ndirective @cacheControl(maxAge: Int, scope: CacheControlScope) on FIELD_DEFINITION | OBJECT | INTERFACE\nenum CacheControlScope {\n PUBLIC\n PRIVATE\n}\n\n\n\"\"\"\n An object with an ID.\n\"\"\"\ninterface Node {\n \"\"\"\n The ID of the node.\n \"\"\"\n id: ID!\n}\n\n# Pagination information. See https://facebook.github.io/relay/graphql/connections.htm#sec-undefined.PageInfo.\ntype PageInfo {\n # Whether there is a next page of nodes in the connection.\n hasNextPage: Boolean!\n}\n\n\"\"\"\n Represents a null return value.\n\"\"\"\ntype EmptyResponse {\n # A dummy null value.\n alwaysNil: String\n}\n\ntype FieldError {\n field: String!\n message: String!\n}\n\ninput Sort{\n key: String!,\n value: SortEnum!,\n}\n\nenum SortEnum{\n ASC\n DESC\n}\n\ntype Query {\n \"\"\"\n Looks up a node by ID.\n \"\"\"\n node(id: ID!): Node\n\n}\n\ntype Mutation {\n dummy: Int\n}\n\ntype Subscription {\n dummy: Int\n}\n\n\ntype AdminIdeSettings {\n dummy: Int\n}\n\n\"\"\" All Moleculer Topic names are extended from this.\"\"\"\nenum MoleculerServiceName {\n dummy\n}\n\ninterface IResourceUtilizationSettings {\n subTopic: String\n adminApiNamespace: String\n}\n\n\"\"\"\nTo calculate geometry over an Eath-like sphere.\nList the `longitude` first and then `latitude`\n - Validate longitude values are between `-180` and `180`\n - Validate latitude values are between `-90` and `90`\n\"\"\"\ntype GeoLocation {\n coordinates: [Float]\n}\n\n\"\"\"\nInput geometry of the location.\nList the `longitude` first and then `latitude`\n - Validate longitude values are between `-180` and `180`\n - Validate latitude values are between `-90` and `90`\n\"\"\"\ninput GeoLocationInput {\n type: String = \"Point\"\n coordinates: [Float]\n}\n\nenum MailTemplateId {\n dummy\n}\n\nenum MoleculerCronServiceName {\n dummy\n}\n\nschema {\n query: Query\n mutation: Mutation\n subscription: Subscription\n}\n\n";
1
+ var rootSchemaDef = "scalar AnyObject\nscalar Date\nscalar Time\nscalar DateTime\nscalar Timestamp\nscalar URI\nscalar URIInput\nscalar Observable\nscalar JSON\nscalar JSONObject\n\ndirective @cacheControl(maxAge: Int, scope: CacheControlScope) on FIELD_DEFINITION | OBJECT | INTERFACE\nenum CacheControlScope {\n PUBLIC\n PRIVATE\n}\n\n\n\"\"\"\n An object with an ID.\n\"\"\"\ninterface Node {\n \"\"\"\n The ID of the node.\n \"\"\"\n id: ID!\n}\n\n# Pagination information. See https://facebook.github.io/relay/graphql/connections.htm#sec-undefined.PageInfo.\ntype PageInfo {\n # Whether there is a next page of nodes in the connection.\n hasNextPage: Boolean!\n}\n\n\"\"\"\n Represents a null return value.\n\"\"\"\ntype EmptyResponse {\n # A dummy null value.\n alwaysNil: String\n}\n\ntype FieldError {\n field: String!\n message: String!\n}\n\ninput Sort{\n key: String!,\n value: SortEnum!,\n}\n\nenum SortEnum{\n ASC\n DESC\n}\n\ntype Query {\n \"\"\"\n Looks up a node by ID.\n \"\"\"\n node(id: ID!): Node\n\n}\n\ntype Mutation {\n dummy: Int\n}\n\ntype Subscription {\n dummy: Int\n}\n\n\ntype AdminIdeSettings {\n dummy: Int\n}\n\n\"\"\" All Moleculer Topic names are extended from this.\"\"\"\nenum MoleculerServiceName {\n dummy\n}\n\ninterface IResourceUtilizationSettings {\n subTopic: String\n adminApiNamespace: String\n}\n\n\"\"\"\nTo calculate geometry over an Eath-like sphere.\nList the `longitude` first and then `latitude`\n - Validate longitude values are between `-180` and `180`\n - Validate latitude values are between `-90` and `90`\n\"\"\"\ntype GeoLocation {\n coordinates: [Float]\n}\n\"\"\"\nInput geometry of the location.\nList the `longitude` first and then `latitude`\n - Validate longitude values are between `-180` and `180`\n - Validate latitude values are between `-90` and `90`\n\"\"\"\ninput GeoLocationInput {\n type: String = \"Point\"\n coordinates: [Float]\n}\n\n\"\"\"\nInput geometry of the location.\nList the `longitude` first and then `latitude`\n - Validate longitude values are between `-180` and `180`\n - Validate latitude values are between `-90` and `90`\n\"\"\"\ninput GeoLocationInput {\n type: String = \"Point\"\n coordinates: [Float]\n}\n\nenum MailTemplateId {\n dummy\n}\n\nenum MoleculerCronServiceName {\n dummy\n}\n\nschema {\n query: Query\n mutation: Mutation\n subscription: Subscription\n}\n\n";
2
2
  export{rootSchemaDef as default};//# sourceMappingURL=root-schema.graphqls.mjs.map
@@ -16,6 +16,4 @@ export declare const config: Readonly<{
16
16
  CONNECTION_ID: string;
17
17
  NAMESPACE: string;
18
18
  LOG_LEVEL: string;
19
- }> & envalid.CleanEnv & {
20
- readonly [varName: string]: string;
21
- };
19
+ } & envalid.CleanedEnvAccessors>;
@@ -1,28 +1,3 @@
1
- /// <reference types="mongoose/types/aggregate" />
2
- /// <reference types="mongoose/types/callback" />
3
- /// <reference types="mongoose/types/collection" />
4
- /// <reference types="mongoose/types/connection" />
5
- /// <reference types="mongoose/types/cursor" />
6
- /// <reference types="mongoose/types/document" />
7
- /// <reference types="mongoose/types/error" />
8
- /// <reference types="mongoose/types/expressions" />
9
- /// <reference types="mongoose/types/helpers" />
10
- /// <reference types="mongoose/types/middlewares" />
11
- /// <reference types="mongoose/types/indexes" />
12
- /// <reference types="mongoose/types/models" />
13
- /// <reference types="mongoose/types/mongooseoptions" />
14
- /// <reference types="mongoose/types/pipelinestage" />
15
- /// <reference types="mongoose/types/populate" />
16
- /// <reference types="mongoose/types/query" />
17
- /// <reference types="mongoose/types/schemaoptions" />
18
- /// <reference types="mongoose/types/schematypes" />
19
- /// <reference types="mongoose/types/session" />
20
- /// <reference types="mongoose/types/types" />
21
- /// <reference types="mongoose/types/utility" />
22
- /// <reference types="mongoose/types/validation" />
23
- /// <reference types="mongoose/types/virtuals" />
24
- /// <reference types="mongoose" />
25
- /// <reference types="mongoose/types/inferschematype" />
26
1
  import { CdmLogger } from '@cdm-logger/core';
27
2
  import { TransporterType } from '../interfaces/moleculer';
28
3
  type ILogger = CdmLogger.ILogger;
@@ -1,27 +1,3 @@
1
- /// <reference types="mongoose/types/aggregate" />
2
- /// <reference types="mongoose/types/callback" />
3
- /// <reference types="mongoose/types/collection" />
4
- /// <reference types="mongoose/types/connection" />
5
- /// <reference types="mongoose/types/cursor" />
6
- /// <reference types="mongoose/types/document" />
7
- /// <reference types="mongoose/types/error" />
8
- /// <reference types="mongoose/types/expressions" />
9
- /// <reference types="mongoose/types/helpers" />
10
- /// <reference types="mongoose/types/middlewares" />
11
- /// <reference types="mongoose/types/indexes" />
12
- /// <reference types="mongoose/types/models" />
13
- /// <reference types="mongoose/types/mongooseoptions" />
14
- /// <reference types="mongoose/types/pipelinestage" />
15
- /// <reference types="mongoose/types/populate" />
16
- /// <reference types="mongoose/types/query" />
17
- /// <reference types="mongoose/types/schemaoptions" />
18
- /// <reference types="mongoose/types/schematypes" />
19
- /// <reference types="mongoose/types/session" />
20
- /// <reference types="mongoose/types/types" />
21
- /// <reference types="mongoose/types/utility" />
22
- /// <reference types="mongoose/types/validation" />
23
- /// <reference types="mongoose/types/virtuals" />
24
- /// <reference types="mongoose/types/inferschematype" />
25
1
  import { Connection, ConnectOptions } from 'mongoose';
26
2
  export declare class MongoConnector {
27
3
  private client;
@@ -1,6 +1,6 @@
1
1
  import cors from 'cors';
2
2
  export declare const corsMiddleware: (req: cors.CorsRequest, res: {
3
- statusCode?: number;
3
+ statusCode?: number | undefined;
4
4
  setHeader(key: string, value: string): any;
5
5
  end(): any;
6
6
  }, next: (err?: any) => any) => void;
@@ -1,4 +1,3 @@
1
- /// <reference types="typings" />
2
1
  /**
3
2
  * Middleware function that takes 4 arguments is classified as "error handling middleware"
4
3
  * and will only get called if an error occurs.
@@ -1,3 +1,2 @@
1
- /// <reference types="node" />
2
- export declare const sentryMiddleware: (req: import("http").IncomingMessage, res: import("http").ServerResponse<import("http").IncomingMessage>, next: (error?: any) => void) => void;
1
+ export declare const sentryMiddleware: (req: import("http").IncomingMessage, res: import("http").ServerResponse, next: (error?: any) => void) => void;
3
2
  export declare const sentryErrorHandlerMiddleware: any;
@@ -1,4 +1,5 @@
1
+ import { ApolloServerOptions } from '@apollo/server';
1
2
  import type { BaseContext } from '@apollo/server/dist/cjs/externalTypes/context';
2
3
  export declare const invalidateCachePlugin: ({ cache }: {
3
- cache;
4
- }) => import("@apollo/server").ApolloServerPlugin<BaseContext>;
4
+ cache: any;
5
+ }) => ApolloServerOptions<BaseContext>["plugins"][0];
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import * as IORedis from 'ioredis';
3
2
  import 'isomorphic-fetch';
4
3
  import { Express } from 'express';
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { WebSocketServer } from 'ws';
3
2
  import { Server } from 'http';
4
3
  import * as IORedis from 'ioredis';
@@ -1,27 +1,3 @@
1
- /// <reference types="mongoose/types/aggregate" />
2
- /// <reference types="mongoose/types/callback" />
3
- /// <reference types="mongoose/types/collection" />
4
- /// <reference types="mongoose/types/connection" />
5
- /// <reference types="mongoose/types/cursor" />
6
- /// <reference types="mongoose/types/document" />
7
- /// <reference types="mongoose/types/error" />
8
- /// <reference types="mongoose/types/expressions" />
9
- /// <reference types="mongoose/types/helpers" />
10
- /// <reference types="mongoose/types/middlewares" />
11
- /// <reference types="mongoose/types/indexes" />
12
- /// <reference types="mongoose/types/models" />
13
- /// <reference types="mongoose/types/mongooseoptions" />
14
- /// <reference types="mongoose/types/pipelinestage" />
15
- /// <reference types="mongoose/types/populate" />
16
- /// <reference types="mongoose/types/query" />
17
- /// <reference types="mongoose/types/schemaoptions" />
18
- /// <reference types="mongoose/types/schematypes" />
19
- /// <reference types="mongoose/types/session" />
20
- /// <reference types="mongoose/types/types" />
21
- /// <reference types="mongoose/types/utility" />
22
- /// <reference types="mongoose/types/validation" />
23
- /// <reference types="mongoose/types/virtuals" />
24
- /// <reference types="mongoose/types/inferschematype" />
25
1
  import { IModuleService } from '../interfaces';
26
2
  import { Schema, Connection as DBConnection } from 'mongoose';
27
3
  export declare const MigrationSchema: Schema<any, import("mongoose").Model<any, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, {
@@ -1,27 +1,3 @@
1
- /// <reference types="mongoose/types/aggregate" />
2
- /// <reference types="mongoose/types/callback" />
3
- /// <reference types="mongoose/types/collection" />
4
- /// <reference types="mongoose/types/connection" />
5
- /// <reference types="mongoose/types/cursor" />
6
- /// <reference types="mongoose/types/document" />
7
- /// <reference types="mongoose/types/error" />
8
- /// <reference types="mongoose/types/expressions" />
9
- /// <reference types="mongoose/types/helpers" />
10
- /// <reference types="mongoose/types/middlewares" />
11
- /// <reference types="mongoose/types/indexes" />
12
- /// <reference types="mongoose/types/models" />
13
- /// <reference types="mongoose/types/mongooseoptions" />
14
- /// <reference types="mongoose/types/pipelinestage" />
15
- /// <reference types="mongoose/types/populate" />
16
- /// <reference types="mongoose/types/query" />
17
- /// <reference types="mongoose/types/schemaoptions" />
18
- /// <reference types="mongoose/types/schematypes" />
19
- /// <reference types="mongoose/types/session" />
20
- /// <reference types="mongoose/types/types" />
21
- /// <reference types="mongoose/types/utility" />
22
- /// <reference types="mongoose/types/validation" />
23
- /// <reference types="mongoose/types/virtuals" />
24
- /// <reference types="mongoose/types/inferschematype" />
25
1
  import { Schema, Connection } from 'mongoose';
26
2
  import { Container } from 'inversify';
27
3
  import { CdmLogger } from '@cdm-logger/core';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@common-stack/server-stack",
3
- "version": "6.0.1-alpha.9",
3
+ "version": "6.0.2-alpha.2",
4
4
  "description": "common core for higher packages to depend on",
5
5
  "license": "ISC",
6
6
  "author": "CDMBase LLC",
@@ -26,18 +26,31 @@
26
26
  "@apollo/datasource-rest": "^6.3.0",
27
27
  "@apollo/server": "^4.10.4",
28
28
  "@apollo/server-plugin-response-cache": "^4.1.3",
29
- "@apollo/utils.keyvadapter": "~3.1.0",
29
+ "@apollo/utils.keyvadapter": "^3.1.0",
30
+ "@casl/ability": "^4.1.5",
31
+ "@cdm-logger/client": "^9.0.3",
32
+ "@cdm-logger/server": "^9.0.3",
30
33
  "@cdmbase/graphql-type-uri": "^3.0.0",
31
- "@common-stack/server-core": "6.0.1-alpha.6",
34
+ "@common-stack/cache-api-server": "6.0.2-alpha.2",
35
+ "@common-stack/client-core": "6.0.2-alpha.2",
36
+ "@common-stack/core": "6.0.2-alpha.2",
37
+ "@common-stack/server-core": "6.0.2-alpha.2",
38
+ "@common-stack/store-mongo": "6.0.2-alpha.2",
32
39
  "@graphql-tools/links": "~9.0.1",
33
40
  "@graphql-tools/schema": "~10.0.6",
34
41
  "@graphql-tools/stitch": "~9.2.10",
35
42
  "@graphql-tools/utils": "~10.5.4",
36
43
  "@graphql-tools/wrap": "~10.0.5",
37
- "@keyv/redis": "~2.8.4",
44
+ "@keyv/redis": "2.8.4",
38
45
  "@sentry/node": "~7.24.2",
39
46
  "@sentry/profiling-node": "^8.25.0",
47
+ "apollo-errors": "^1.9.0",
48
+ "body-parser": "^1.19.0",
40
49
  "cors": "^2.8.5",
50
+ "dataloader": "^2.0.0",
51
+ "dotenv": "^8.2.0",
52
+ "dotenv-esm": "^16.0.3-4",
53
+ "envalid": "~7.2.2",
41
54
  "express": "^4.17.1",
42
55
  "graphql": "^16.0.0",
43
56
  "graphql-bigint": "^1.0.0",
@@ -50,10 +63,15 @@
50
63
  "graphql-tools": "~9.0.0",
51
64
  "graphql-type-json": "^0.3.1",
52
65
  "graphql-ws": "^5.11.2",
66
+ "inversify": "^6.0.2",
67
+ "ioredis": "^5.4.1",
53
68
  "isomorphic-fetch": "^2.2.1",
54
- "mongoose-execution-time": "^1.1.1",
69
+ "moleculer": "^0.14.2",
70
+ "mongoose": "^6.3.3",
71
+ "mongoose-execution-time": "^1.1.0",
55
72
  "morgan": "^1.9.1",
56
73
  "nats": "^1.3.2",
74
+ "reflect-metadata": "^0.1.13",
57
75
  "subscriptions-transport-ws": "^0.11.0",
58
76
  "universal-cookie-express": "^4.0.1",
59
77
  "ws": "^8.11.0"
@@ -69,5 +87,5 @@
69
87
  "typescript": {
70
88
  "definition": "lib/index.d.ts"
71
89
  },
72
- "gitHead": "ed9a8cbcdaf408f7c7ab8c12d8b87e000df5d3c6"
90
+ "gitHead": "3d13ba346c1d248c87c53ef1c95037ca83f0b5d1"
73
91
  }