@inversifyjs/apollo-express 0.4.0 → 0.5.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/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @inversifyjs/apollo-express
2
2
 
3
+ ## 0.5.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @inversifyjs/apollo-core@0.4.0
9
+
10
+ ## 0.5.0
11
+
12
+ ### Minor Changes
13
+
14
+ Removed `httpServerServiceIdentifier`
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies
19
+ - @inversifyjs/apollo-core@0.3.0
20
+
3
21
  ## 0.4.0
4
22
 
5
23
  ### Minor Changes
@@ -1 +1 @@
1
- {"version":3,"file":"ApolloExpressServerContainerModule.d.ts","sourceRoot":"","sources":["../../../../src/apollo/modules/ApolloExpressServerContainerModule.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,EACL,2BAA2B,EAI5B,MAAM,0BAA0B,CAAC;AAMlC,OAAO,EAAE,oCAAoC,EAAE,MAAM,6CAA6C,CAAC;AACnG,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AAGnF,MAAM,CAAC,OAAO,OAAO,kCAAmC,SAAQ,2BAA2B;WAC3E,UAAU,CAAC,QAAQ,SAAS,WAAW,EACnD,iBAAiB,EAAE,oCAAoC,CAAC,QAAQ,CAAC,EACjE,aAAa,EAAE,yBAAyB,CAAC,QAAQ,CAAC,GACjD,kCAAkC;CAqCtC"}
1
+ {"version":3,"file":"ApolloExpressServerContainerModule.d.ts","sourceRoot":"","sources":["../../../../src/apollo/modules/ApolloExpressServerContainerModule.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,EACL,2BAA2B,EAK5B,MAAM,0BAA0B,CAAC;AAMlC,OAAO,EAAE,oCAAoC,EAAE,MAAM,6CAA6C,CAAC;AACnG,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AAEnF,MAAM,CAAC,OAAO,OAAO,kCAAmC,SAAQ,2BAA2B;WAC3E,UAAU,CAAC,QAAQ,SAAS,WAAW,EACnD,iBAAiB,EAAE,oCAAoC,CAAC,QAAQ,CAAC,EACjE,aAAa,EAAE,yBAAyB,CAAC,QAAQ,CAAC,GACjD,kCAAkC;CAwCtC"}
@@ -1,24 +1,26 @@
1
1
  import http from 'node:http';
2
2
  import { ApolloServerPluginDrainHttpServer } from '@apollo/server/plugin/drainHttpServer';
3
- import { ApolloServerContainerModule, apolloServerPluginsServiceIdentifier, apolloServerResolversServiceIdentifier, apolloServerTypeDefsServiceIdentifier, } from '@inversifyjs/apollo-core';
3
+ import { ApolloServerContainerModule, apolloServerPluginsServiceIdentifier, apolloServerResolversServiceIdentifier, apolloServerTypeDefsServiceIdentifier, httpServerServiceIdentifier, } from '@inversifyjs/apollo-core';
4
4
  import { httpApplicationServiceIdentifier } from '@inversifyjs/http-core';
5
5
  import buildApolloServerExpressController from '../controllers/buildApolloServerExpressController.js';
6
- import { httpServerServiceIdentifier } from '../models/httpServerServiceIdentifier.js';
7
6
  export default class ApolloExpressServerContainerModule extends ApolloServerContainerModule {
8
7
  static forOptions(controllerOptions, serverOptions) {
9
8
  return new ApolloExpressServerContainerModule((options) => {
10
9
  options
11
10
  .bind(buildApolloServerExpressController(controllerOptions))
12
- .toSelf();
11
+ .toSelf()
12
+ .inSingletonScope();
13
13
  options
14
14
  .bind(httpServerServiceIdentifier)
15
- .toResolvedValue((application) => (serverOptions.http?.createServer ?? http.createServer)(application), [httpApplicationServiceIdentifier]);
15
+ .toResolvedValue((application) => (serverOptions.http?.createServer ?? http.createServer)(application), [httpApplicationServiceIdentifier])
16
+ .inSingletonScope();
16
17
  options
17
18
  .bind(apolloServerPluginsServiceIdentifier)
18
19
  .toResolvedValue((httpServer) => [
19
20
  ...(serverOptions.plugins ?? []),
20
21
  ApolloServerPluginDrainHttpServer({ httpServer }),
21
- ], [httpServerServiceIdentifier]);
22
+ ], [httpServerServiceIdentifier])
23
+ .inSingletonScope();
22
24
  options
23
25
  .bind(apolloServerResolversServiceIdentifier)
24
26
  .toService(serverOptions.resolverServiceIdentifier);
@@ -1 +1 @@
1
- {"version":3,"file":"ApolloExpressServerContainerModule.js","sourceRoot":"","sources":["../../../../src/apollo/modules/ApolloExpressServerContainerModule.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B,OAAO,EAAE,iCAAiC,EAAE,MAAM,uCAAuC,CAAC;AAC1F,OAAO,EACL,2BAA2B,EAC3B,oCAAoC,EACpC,sCAAsC,EACtC,qCAAqC,GACtC,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,gCAAgC,EAAE,MAAM,wBAAwB,CAAC;AAI1E,OAAO,kCAAkC,MAAM,sDAAsD,CAAC;AAGtG,OAAO,EAAE,2BAA2B,EAAE,MAAM,0CAA0C,CAAC;AAEvF,MAAM,CAAC,OAAO,OAAO,kCAAmC,SAAQ,2BAA2B;IAClF,MAAM,CAAC,UAAU,CACtB,iBAAiE,EACjE,aAAkD;QAElD,OAAO,IAAI,kCAAkC,CAC3C,CAAC,OAAmC,EAAQ,EAAE;YAC5C,OAAO;iBACJ,IAAI,CAAC,kCAAkC,CAAC,iBAAiB,CAAC,CAAC;iBAC3D,MAAM,EAAE,CAAC;YAEZ,OAAO;iBACJ,IAAI,CAAC,2BAA2B,CAAC;iBACjC,eAAe,CACd,CAAC,WAAgC,EAAE,EAAE,CACnC,CAAC,aAAa,CAAC,IAAI,EAAE,YAAY,IAAI,IAAI,CAAC,YAAY,CAAC,CACrD,WAAW,CACZ,EACH,CAAC,gCAAgC,CAAC,CACnC,CAAC;YAEJ,OAAO;iBACJ,IAAI,CAAC,oCAAoC,CAAC;iBAC1C,eAAe,CACd,CAAC,UAAuB,EAAE,EAAE,CAAC;gBAC3B,GAAG,CAAC,aAAa,CAAC,OAAO,IAAI,EAAE,CAAC;gBAChC,iCAAiC,CAAC,EAAE,UAAU,EAAE,CAAC;aAClD,EACD,CAAC,2BAA2B,CAAC,CAC9B,CAAC;YAEJ,OAAO;iBACJ,IAAI,CAAC,sCAAsC,CAAC;iBAC5C,SAAS,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;YAEtD,OAAO;iBACJ,IAAI,CAAC,qCAAqC,CAAC;iBAC3C,eAAe,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QAC7C,CAAC,CACF,CAAC;IACJ,CAAC;CACF"}
1
+ {"version":3,"file":"ApolloExpressServerContainerModule.js","sourceRoot":"","sources":["../../../../src/apollo/modules/ApolloExpressServerContainerModule.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B,OAAO,EAAE,iCAAiC,EAAE,MAAM,uCAAuC,CAAC;AAC1F,OAAO,EACL,2BAA2B,EAC3B,oCAAoC,EACpC,sCAAsC,EACtC,qCAAqC,EACrC,2BAA2B,GAC5B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,gCAAgC,EAAE,MAAM,wBAAwB,CAAC;AAI1E,OAAO,kCAAkC,MAAM,sDAAsD,CAAC;AAItG,MAAM,CAAC,OAAO,OAAO,kCAAmC,SAAQ,2BAA2B;IAClF,MAAM,CAAC,UAAU,CACtB,iBAAiE,EACjE,aAAkD;QAElD,OAAO,IAAI,kCAAkC,CAC3C,CAAC,OAAmC,EAAQ,EAAE;YAC5C,OAAO;iBACJ,IAAI,CAAC,kCAAkC,CAAC,iBAAiB,CAAC,CAAC;iBAC3D,MAAM,EAAE;iBACR,gBAAgB,EAAE,CAAC;YAEtB,OAAO;iBACJ,IAAI,CAAC,2BAA2B,CAAC;iBACjC,eAAe,CACd,CAAC,WAAgC,EAAE,EAAE,CACnC,CAAC,aAAa,CAAC,IAAI,EAAE,YAAY,IAAI,IAAI,CAAC,YAAY,CAAC,CACrD,WAAW,CACZ,EACH,CAAC,gCAAgC,CAAC,CACnC;iBACA,gBAAgB,EAAE,CAAC;YAEtB,OAAO;iBACJ,IAAI,CAAC,oCAAoC,CAAC;iBAC1C,eAAe,CACd,CAAC,UAAuB,EAAE,EAAE,CAAC;gBAC3B,GAAG,CAAC,aAAa,CAAC,OAAO,IAAI,EAAE,CAAC;gBAChC,iCAAiC,CAAC,EAAE,UAAU,EAAE,CAAC;aAClD,EACD,CAAC,2BAA2B,CAAC,CAC9B;iBACA,gBAAgB,EAAE,CAAC;YAEtB,OAAO;iBACJ,IAAI,CAAC,sCAAsC,CAAC;iBAC5C,SAAS,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;YAEtD,OAAO;iBACJ,IAAI,CAAC,qCAAqC,CAAC;iBAC3C,eAAe,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QAC7C,CAAC,CACF,CAAC;IACJ,CAAC;CACF"}
@@ -1,5 +1,4 @@
1
1
  export { type ApolloServerExpressControllerOptions } from './apollo/models/ApolloExpressControllerOptions.js';
2
2
  export { type ApolloServerInjectOptions } from './apollo/models/ApolloServerInjectOptions.js';
3
- export { httpServerServiceIdentifier } from './apollo/models/httpServerServiceIdentifier.js';
4
3
  export { default as ApolloExpressServerContainerModule } from './apollo/modules/ApolloExpressServerContainerModule.js';
5
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,oCAAoC,EAAE,MAAM,mDAAmD,CAAC;AAC9G,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;AAC9F,OAAO,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAC;AAC7F,OAAO,EAAE,OAAO,IAAI,kCAAkC,EAAE,MAAM,wDAAwD,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,oCAAoC,EAAE,MAAM,mDAAmD,CAAC;AAC9G,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;AAC9F,OAAO,EAAE,OAAO,IAAI,kCAAkC,EAAE,MAAM,wDAAwD,CAAC"}
package/lib/esm/index.js CHANGED
@@ -1,3 +1,2 @@
1
- export { httpServerServiceIdentifier } from './apollo/models/httpServerServiceIdentifier.js';
2
1
  export { default as ApolloExpressServerContainerModule } from './apollo/modules/ApolloExpressServerContainerModule.js';
3
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAC;AAC7F,OAAO,EAAE,OAAO,IAAI,kCAAkC,EAAE,MAAM,wDAAwD,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,kCAAkC,EAAE,MAAM,wDAAwD,CAAC"}
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "description": "InversifyJs GraphQL Apollo express package",
7
7
  "dependencies": {
8
8
  "@as-integrations/express5": "^1.1.2",
9
- "@inversifyjs/apollo-core": "0.2.0"
9
+ "@inversifyjs/apollo-core": "0.4.0"
10
10
  },
11
11
  "devDependencies": {
12
12
  "@inversifyjs/http-express": "4.9.1",
@@ -53,7 +53,7 @@
53
53
  "url": "git+https://github.com/inversify/graphql.git"
54
54
  },
55
55
  "type": "module",
56
- "version": "0.4.0",
56
+ "version": "0.5.1",
57
57
  "scripts": {
58
58
  "build": "tsc",
59
59
  "build:clean": "rimraf lib",
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=buildApolloServerExpressController.int.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"buildApolloServerExpressController.int.spec.d.ts","sourceRoot":"","sources":["../../../../src/apollo/controllers/buildApolloServerExpressController.int.spec.ts"],"names":[],"mappings":""}
@@ -1,4 +0,0 @@
1
- import type http from 'node:http';
2
- import { type ServiceIdentifier } from 'inversify';
3
- export declare const httpServerServiceIdentifier: ServiceIdentifier<http.Server>;
4
- //# sourceMappingURL=httpServerServiceIdentifier.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"httpServerServiceIdentifier.d.ts","sourceRoot":"","sources":["../../../../src/apollo/models/httpServerServiceIdentifier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEnD,eAAO,MAAM,2BAA2B,EAAE,iBAAiB,CAAC,IAAI,CAAC,MAAM,CACjB,CAAC"}
@@ -1,2 +0,0 @@
1
- export const httpServerServiceIdentifier = Symbol.for('@inversifyjs/apollo-express/HttpServer');
2
- //# sourceMappingURL=httpServerServiceIdentifier.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"httpServerServiceIdentifier.js","sourceRoot":"","sources":["../../../../src/apollo/models/httpServerServiceIdentifier.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,2BAA2B,GACtC,MAAM,CAAC,GAAG,CAAC,wCAAwC,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=ApolloExpressServerContainerModule.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ApolloExpressServerContainerModule.spec.d.ts","sourceRoot":"","sources":["../../../../src/apollo/modules/ApolloExpressServerContainerModule.spec.ts"],"names":[],"mappings":""}