@gapi/core 1.8.169 → 1.8.171

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,6 +1,6 @@
1
1
  import { EnumTypeDefinitionNode, EnumTypeExtensionNode, GraphQLEnumType } from 'graphql';
2
- import Maybe from 'graphql/tsutils/Maybe';
3
- interface GraphqlEnumTypeConfig<T = {}> {
2
+ import { Maybe } from 'graphql/jsutils/Maybe';
3
+ interface GraphqlEnumTypeConfig<T = object> {
4
4
  name: string;
5
5
  description?: Maybe<string>;
6
6
  values: T;
@@ -2,15 +2,16 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GraphqlEnumType = exports.enumToGraphqlEnum = void 0;
4
4
  const graphql_1 = require("graphql");
5
- exports.enumToGraphqlEnum = (values) => Object.keys(values)
5
+ const enumToGraphqlEnum = (values) => Object.keys(values)
6
6
  .filter((value) => isNaN(Number(value)) === false)
7
7
  .reduce((acc, value) => {
8
8
  acc[values[value]] = { value: Number(value) };
9
9
  return acc;
10
10
  }, {});
11
+ exports.enumToGraphqlEnum = enumToGraphqlEnum;
11
12
  class GraphqlEnumType extends graphql_1.GraphQLEnumType {
12
13
  constructor(config) {
13
- config.values = exports.enumToGraphqlEnum(config.values);
14
+ config.values = (0, exports.enumToGraphqlEnum)(config.values);
14
15
  super(config);
15
16
  }
16
17
  }
@@ -25,8 +25,10 @@ let FederationController = class FederationController {
25
25
  try {
26
26
  replacer = core_1.Container.get(tokens_1.GRAPHQL_FEDERATION_REPLACER);
27
27
  }
28
- catch (e) { }
29
- const sdl = graphql_2.printSchema(schema)
28
+ catch (e) {
29
+ console.error(e);
30
+ }
31
+ const sdl = (0, graphql_2.printSchema)(schema)
30
32
  .replace('_service: GraphqlFederation', '')
31
33
  .replace('status: StatusQueryType', '');
32
34
  return {
@@ -34,17 +36,17 @@ let FederationController = class FederationController {
34
36
  };
35
37
  }
36
38
  };
39
+ exports.FederationController = FederationController;
37
40
  __decorate([
38
- graphql_1.Type(new graphql_2.GraphQLObjectType({
41
+ (0, graphql_1.Type)(new graphql_2.GraphQLObjectType({
39
42
  name: 'GraphqlFederation',
40
43
  fields: () => ({ sdl: { type: graphql_2.GraphQLString } }),
41
44
  })),
42
- graphql_1.Query(),
45
+ (0, graphql_1.Query)(),
43
46
  __metadata("design:type", Function),
44
47
  __metadata("design:paramtypes", []),
45
48
  __metadata("design:returntype", void 0)
46
49
  ], FederationController.prototype, "_service", null);
47
- FederationController = __decorate([
48
- core_1.Controller()
50
+ exports.FederationController = FederationController = __decorate([
51
+ (0, core_1.Controller)()
49
52
  ], FederationController);
50
- exports.FederationController = FederationController;
package/dist/index.d.ts CHANGED
@@ -12,12 +12,14 @@ export interface CoreModuleConfig {
12
12
  export declare class CoreModule {
13
13
  static forRoot(config?: CoreModuleConfig): ModuleWithServices;
14
14
  }
15
- export * from 'graphql';
16
- export * from 'graphql-tools';
17
- export * from 'graphql-geojson';
18
- export * from '@rxdi/graphql-pubsub';
15
+ export * from './enum-to-gql';
16
+ export * from '@rxdi/core';
19
17
  export * from '@rxdi/graphql';
18
+ export * from '@rxdi/graphql-pubsub';
19
+ export { withFilter } from '@rxdi/graphql-rabbitmq-subscriptions';
20
20
  export * from '@rxdi/hapi';
21
- export * from '@rxdi/core';
22
- export { withFilter, PubSubOptions, FilterFn, PubSubEngine, ResolverFn, } from 'graphql-subscriptions';
23
- export * from './enum-to-gql';
21
+ export * from 'graphql';
22
+ export { buildSchema, ExecutionResult, extendSchema, isSpecifiedScalarType, } from 'graphql';
23
+ export * from 'graphql-geojson';
24
+ export { FilterFn, PubSubEngine, PubSubOptions, ResolverFn, } from 'graphql-subscriptions';
25
+ export * from 'graphql-tools';
package/dist/index.js CHANGED
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[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);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -13,11 +17,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
13
17
  return c > 3 && r && Object.defineProperty(target, key, r), r;
14
18
  };
15
19
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
- for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
20
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
17
21
  };
18
22
  var CoreModule_1;
19
23
  Object.defineProperty(exports, "__esModule", { value: true });
20
- exports.CoreModule = void 0;
24
+ exports.PubSubEngine = exports.isSpecifiedScalarType = exports.extendSchema = exports.buildSchema = exports.withFilter = exports.CoreModule = void 0;
21
25
  const daemon_1 = require("@gapi/daemon");
22
26
  const core_1 = require("@rxdi/core");
23
27
  const graphql_1 = require("@rxdi/graphql");
@@ -71,18 +75,23 @@ let CoreModule = CoreModule_1 = class CoreModule {
71
75
  };
72
76
  }
73
77
  };
74
- CoreModule = CoreModule_1 = __decorate([
75
- core_1.Module()
76
- ], CoreModule);
77
78
  exports.CoreModule = CoreModule;
78
- __exportStar(require("graphql"), exports);
79
- __exportStar(require("graphql-tools"), exports);
80
- __exportStar(require("graphql-geojson"), exports);
81
- __exportStar(require("@rxdi/graphql-pubsub"), exports);
79
+ exports.CoreModule = CoreModule = CoreModule_1 = __decorate([
80
+ (0, core_1.Module)()
81
+ ], CoreModule);
82
+ __exportStar(require("./enum-to-gql"), exports);
83
+ __exportStar(require("@rxdi/core"), exports);
82
84
  __exportStar(require("@rxdi/graphql"), exports);
85
+ __exportStar(require("@rxdi/graphql-pubsub"), exports);
86
+ var graphql_rabbitmq_subscriptions_1 = require("@rxdi/graphql-rabbitmq-subscriptions");
87
+ Object.defineProperty(exports, "withFilter", { enumerable: true, get: function () { return graphql_rabbitmq_subscriptions_1.withFilter; } });
83
88
  __exportStar(require("@rxdi/hapi"), exports);
84
- __exportStar(require("@rxdi/core"), exports);
89
+ __exportStar(require("graphql"), exports);
90
+ var graphql_2 = require("graphql");
91
+ Object.defineProperty(exports, "buildSchema", { enumerable: true, get: function () { return graphql_2.buildSchema; } });
92
+ Object.defineProperty(exports, "extendSchema", { enumerable: true, get: function () { return graphql_2.extendSchema; } });
93
+ Object.defineProperty(exports, "isSpecifiedScalarType", { enumerable: true, get: function () { return graphql_2.isSpecifiedScalarType; } });
94
+ __exportStar(require("graphql-geojson"), exports);
85
95
  var graphql_subscriptions_1 = require("graphql-subscriptions");
86
- Object.defineProperty(exports, "withFilter", { enumerable: true, get: function () { return graphql_subscriptions_1.withFilter; } });
87
96
  Object.defineProperty(exports, "PubSubEngine", { enumerable: true, get: function () { return graphql_subscriptions_1.PubSubEngine; } });
88
- __exportStar(require("./enum-to-gql"), exports);
97
+ __exportStar(require("graphql-tools"), exports);
package/dist/tokens.js CHANGED
@@ -2,5 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GRAPHQL_FEDERATION_REPLACER = exports.FedarationReplacer = void 0;
4
4
  const core_1 = require("@rxdi/core");
5
- exports.FedarationReplacer = (v) => v;
5
+ const FedarationReplacer = (v) => v;
6
+ exports.FedarationReplacer = FedarationReplacer;
6
7
  exports.GRAPHQL_FEDERATION_REPLACER = new core_1.InjectionToken('GRAPHQL_FEDERATION_REPLACER');
@@ -0,0 +1,38 @@
1
+ import { defineConfig, globalIgnores } from 'eslint/config';
2
+ import tsParser from '@typescript-eslint/parser';
3
+ import tsPlugin from '@typescript-eslint/eslint-plugin';
4
+ import prettierPlugin from 'eslint-plugin-prettier';
5
+ import simpleImportSort from 'eslint-plugin-simple-import-sort';
6
+ import prettierConfig from 'eslint-config-prettier';
7
+
8
+ export default defineConfig([
9
+ globalIgnores(["dist/*"]),
10
+ {
11
+ files: ['./src/**/*.ts', './src/**/*.tsx'],
12
+ languageOptions: {
13
+ parser: tsParser,
14
+ ecmaVersion: 2018,
15
+ sourceType: 'module',
16
+ },
17
+ plugins: {
18
+ '@typescript-eslint': tsPlugin,
19
+ prettier: prettierPlugin,
20
+ 'simple-import-sort': simpleImportSort, // ✅ MUST MATCH RULE PREFIX
21
+ },
22
+ rules: {
23
+ ...tsPlugin.configs.recommended.rules,
24
+ ...prettierConfig.rules,
25
+
26
+ '@typescript-eslint/explicit-function-return-type': 'off',
27
+ '@typescript-eslint/camelcase': 'off',
28
+ '@typescript-eslint/interface-name-prefix': 'off',
29
+
30
+ 'simple-import-sort/imports': 'error',
31
+ 'simple-import-sort/exports': 'error',
32
+ 'sort-imports': 'off',
33
+ 'import/order': 'off',
34
+
35
+ 'prettier/prettier': 'error',
36
+ },
37
+ },
38
+ ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gapi/core",
3
- "version": "1.8.169",
3
+ "version": "1.8.171",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/Stradivario/gapi.git"
@@ -25,12 +25,12 @@
25
25
  "url": "https://github.com/Stradivario/gapi/issues"
26
26
  },
27
27
  "dependencies": {
28
- "@gapi/daemon": "^1.8.168",
29
- "@rxdi/core": "^0.7.193",
30
- "@rxdi/graphql": "^0.7.193",
31
- "@rxdi/graphql-pubsub": "^0.7.193",
32
- "@rxdi/hapi": "^0.7.193",
33
- "graphql": "^14.6.0",
28
+ "@gapi/daemon": "^1.8.170",
29
+ "@rxdi/core": "^0.7.194",
30
+ "@rxdi/graphql": "^0.7.194",
31
+ "@rxdi/graphql-pubsub": "^0.7.194",
32
+ "@rxdi/hapi": "^0.7.194",
33
+ "graphql": "^16.12.0",
34
34
  "graphql-geojson": "^1.0.0",
35
35
  "graphql-tools": "^5.0.0"
36
36
  },
@@ -65,6 +65,6 @@
65
65
  "description": "![Build Status](https://github.com/Stradivario/gapi/issues)",
66
66
  "devDependencies": {
67
67
  "@types/hapi": "^18.0.2",
68
- "typescript": "^3.8.3"
68
+ "typescript": "^5.9.3"
69
69
  }
70
70
  }
@@ -3,9 +3,9 @@ import {
3
3
  EnumTypeExtensionNode,
4
4
  GraphQLEnumType,
5
5
  } from 'graphql';
6
- import Maybe from 'graphql/tsutils/Maybe';
6
+ import { Maybe } from 'graphql/jsutils/Maybe';
7
7
 
8
- interface GraphqlEnumTypeConfig<T = {}> {
8
+ interface GraphqlEnumTypeConfig<T = object> {
9
9
  name: string;
10
10
  description?: Maybe<string>;
11
11
  values: T;
@@ -15,12 +15,12 @@ export class FederationController {
15
15
  new GraphQLObjectType({
16
16
  name: 'GraphqlFederation',
17
17
  fields: () => ({ sdl: { type: GraphQLString } }),
18
- })
18
+ }),
19
19
  )
20
20
  @Query()
21
21
  _service() {
22
22
  const appSchema = Container.get(
23
- GRAPHQL_PLUGIN_CONFIG
23
+ GRAPHQL_PLUGIN_CONFIG,
24
24
  ) as GRAPHQL_PLUGIN_CONFIG;
25
25
 
26
26
  const schema = new GraphQLSchema({
@@ -30,7 +30,9 @@ export class FederationController {
30
30
  let replacer = FedarationReplacer;
31
31
  try {
32
32
  replacer = Container.get(GRAPHQL_FEDERATION_REPLACER);
33
- } catch (e) {}
33
+ } catch (e) {
34
+ console.error(e);
35
+ }
34
36
  const sdl = printSchema(schema)
35
37
  .replace('_service: GraphqlFederation', '')
36
38
  .replace('status: StatusQueryType', '');
package/src/index.ts CHANGED
@@ -70,19 +70,24 @@ export class CoreModule {
70
70
  }
71
71
  }
72
72
 
73
- export * from 'graphql';
74
- export * from 'graphql-tools';
75
- export * from 'graphql-geojson';
76
- export * from '@rxdi/graphql-pubsub';
73
+ export * from './enum-to-gql';
74
+ export * from '@rxdi/core';
77
75
  export * from '@rxdi/graphql';
76
+ export * from '@rxdi/graphql-pubsub';
77
+ export { withFilter } from '@rxdi/graphql-rabbitmq-subscriptions';
78
78
  export * from '@rxdi/hapi';
79
- export * from '@rxdi/core';
79
+ export * from 'graphql';
80
+ export {
81
+ buildSchema,
82
+ ExecutionResult,
83
+ extendSchema,
84
+ isSpecifiedScalarType,
85
+ } from 'graphql';
86
+ export * from 'graphql-geojson';
80
87
  export {
81
- withFilter,
82
- PubSubOptions,
83
88
  FilterFn,
84
89
  PubSubEngine,
90
+ PubSubOptions,
85
91
  ResolverFn,
86
92
  } from 'graphql-subscriptions';
87
-
88
- export * from './enum-to-gql';
93
+ export * from 'graphql-tools';