@graphql-hive/gateway 2.0.0-alpha-64c5ede7844b6d9a5993c9245ce1ea6d364f1693 → 2.0.0-alpha-d2a81e2694ee686b407b72668562c34af8e8ca4d
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 +14 -14
- package/dist/bin.cjs +1 -1
- package/dist/bin.js +1 -1
- package/dist/{cli-WSa8cxE3.js → cli-CP9iY6tm.js} +16 -4
- package/dist/{cli-CaimqUC4.cjs → cli-CPxULGJb.cjs} +16 -4
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +15 -15
package/CHANGELOG.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# @graphql-hive/gateway
|
2
2
|
|
3
|
-
## 2.0.0-alpha-
|
3
|
+
## 2.0.0-alpha-d2a81e2694ee686b407b72668562c34af8e8ca4d
|
4
4
|
### Major Changes
|
5
5
|
|
6
6
|
|
@@ -100,19 +100,19 @@
|
|
100
100
|
- Added dependency [`@opentelemetry/sdk-trace-base@^2.0.1` ↗︎](https://www.npmjs.com/package/@opentelemetry/sdk-trace-base/v/2.0.1) (to `dependencies`)
|
101
101
|
- Removed dependency [`@graphql-mesh/plugin-mock@^0.105.8` ↗︎](https://www.npmjs.com/package/@graphql-mesh/plugin-mock/v/0.105.8) (from `dependencies`)
|
102
102
|
- Updated dependencies [[`7766e3c`](https://github.com/graphql-hive/gateway/commit/7766e3c52272c5a58cc9a25b9d1a0e2886be11e1), [`a2312e1`](https://github.com/graphql-hive/gateway/commit/a2312e13ae88269457c61c2ef16d01f43207a0d2), [`5aefad2`](https://github.com/graphql-hive/gateway/commit/5aefad2ac4abe40fd1cb141218bd2679b3e0047d), [`37113d1`](https://github.com/graphql-hive/gateway/commit/37113d1a446748fd83da9823e27a0f56872317df), [`a7b277d`](https://github.com/graphql-hive/gateway/commit/a7b277d0f4784f7e9be125b3ec7de202ba86caad), [`8db36e9`](https://github.com/graphql-hive/gateway/commit/8db36e9e19e0885d498dd44575ebdf4e25d5bd34), [`5aefad2`](https://github.com/graphql-hive/gateway/commit/5aefad2ac4abe40fd1cb141218bd2679b3e0047d), [`5aefad2`](https://github.com/graphql-hive/gateway/commit/5aefad2ac4abe40fd1cb141218bd2679b3e0047d), [`5aefad2`](https://github.com/graphql-hive/gateway/commit/5aefad2ac4abe40fd1cb141218bd2679b3e0047d), [`cfa763a`](https://github.com/graphql-hive/gateway/commit/cfa763ac9d75310b916064168f8a2c14fc9853ef), [`0a2d8ab`](https://github.com/graphql-hive/gateway/commit/0a2d8abfa4d8e9dacba156055b1230de8d389551), [`4c667df`](https://github.com/graphql-hive/gateway/commit/4c667dfc22371fd0b78f56d7f022c26e386facc9), [`a2312e1`](https://github.com/graphql-hive/gateway/commit/a2312e13ae88269457c61c2ef16d01f43207a0d2), [`5aefad2`](https://github.com/graphql-hive/gateway/commit/5aefad2ac4abe40fd1cb141218bd2679b3e0047d), [`42de363`](https://github.com/graphql-hive/gateway/commit/42de3635744b881032b098eb42a1b8e7103bb09f), [`b22e33c`](https://github.com/graphql-hive/gateway/commit/b22e33c09d82f27889a1d49f05c94c814d858fcc), [`33a89bd`](https://github.com/graphql-hive/gateway/commit/33a89bd92774d4b1331e726f15816b942a2d0892), [`7766e3c`](https://github.com/graphql-hive/gateway/commit/7766e3c52272c5a58cc9a25b9d1a0e2886be11e1), [`5aefad2`](https://github.com/graphql-hive/gateway/commit/5aefad2ac4abe40fd1cb141218bd2679b3e0047d), [`8db36e9`](https://github.com/graphql-hive/gateway/commit/8db36e9e19e0885d498dd44575ebdf4e25d5bd34), [`5aefad2`](https://github.com/graphql-hive/gateway/commit/5aefad2ac4abe40fd1cb141218bd2679b3e0047d), [`5aefad2`](https://github.com/graphql-hive/gateway/commit/5aefad2ac4abe40fd1cb141218bd2679b3e0047d), [`37113d1`](https://github.com/graphql-hive/gateway/commit/37113d1a446748fd83da9823e27a0f56872317df), [`5aefad2`](https://github.com/graphql-hive/gateway/commit/5aefad2ac4abe40fd1cb141218bd2679b3e0047d), [`e5eb881`](https://github.com/graphql-hive/gateway/commit/e5eb881e8a063accc55b750e613f4baefa21dda5), [`2cb44ee`](https://github.com/graphql-hive/gateway/commit/2cb44ee21ec00210a9e292b40f0e1964e03ec09f), [`7766e3c`](https://github.com/graphql-hive/gateway/commit/7766e3c52272c5a58cc9a25b9d1a0e2886be11e1), [`7019f12`](https://github.com/graphql-hive/gateway/commit/7019f12f0a571df4c9fd8908110c8b33436a3063), [`f25f27e`](https://github.com/graphql-hive/gateway/commit/f25f27e7c4fa9f38626c19d2f94e62d53dedc03e), [`e70fb84`](https://github.com/graphql-hive/gateway/commit/e70fb84f7acaa7756116f4c4f4dedf9a72c25b6b), [`7e79f17`](https://github.com/graphql-hive/gateway/commit/7e79f17973c5711ee1be87b80f653a5a293075a2), [`8e4e52f`](https://github.com/graphql-hive/gateway/commit/8e4e52f5204ae992704f4edc656c422271b341b7), [`7019f12`](https://github.com/graphql-hive/gateway/commit/7019f12f0a571df4c9fd8908110c8b33436a3063), [`e5eb881`](https://github.com/graphql-hive/gateway/commit/e5eb881e8a063accc55b750e613f4baefa21dda5), [`590b930`](https://github.com/graphql-hive/gateway/commit/590b93040edc6309728e4fda72168fc2d13681a9), [`33a89bd`](https://github.com/graphql-hive/gateway/commit/33a89bd92774d4b1331e726f15816b942a2d0892), [`7766e3c`](https://github.com/graphql-hive/gateway/commit/7766e3c52272c5a58cc9a25b9d1a0e2886be11e1), [`d031c51`](https://github.com/graphql-hive/gateway/commit/d031c51b8cdc244fbbc566fb7f32e48ad0f4283f)]:
|
103
|
-
- @graphql-hive/gateway-runtime@2.0.0-alpha-
|
104
|
-
- @graphql-hive/plugin-deduplicate-request@2.0.0-alpha-
|
105
|
-
- @graphql-mesh/hmac-upstream-signature@2.0.0-alpha-
|
106
|
-
- @graphql-mesh/plugin-jwt-auth@2.0.0-alpha-
|
107
|
-
- @graphql-mesh/plugin-opentelemetry@2.0.0-alpha-
|
108
|
-
- @graphql-mesh/plugin-prometheus@2.0.0-alpha-
|
109
|
-
- @graphql-mesh/transport-http@1.0.0-alpha-
|
110
|
-
- @graphql-mesh/transport-http-callback@1.0.0-alpha-
|
111
|
-
- @graphql-mesh/transport-ws@2.0.0-alpha-
|
112
|
-
- @graphql-hive/plugin-aws-sigv4@2.0.0-alpha-
|
113
|
-
- @graphql-hive/importer@2.0.0-alpha-
|
114
|
-
- @graphql-hive/pubsub@2.0.0-alpha-
|
115
|
-
- @graphql-hive/logger@1.0.1-alpha-
|
103
|
+
- @graphql-hive/gateway-runtime@2.0.0-alpha-d2a81e2694ee686b407b72668562c34af8e8ca4d
|
104
|
+
- @graphql-hive/plugin-deduplicate-request@2.0.0-alpha-d2a81e2694ee686b407b72668562c34af8e8ca4d
|
105
|
+
- @graphql-mesh/hmac-upstream-signature@2.0.0-alpha-d2a81e2694ee686b407b72668562c34af8e8ca4d
|
106
|
+
- @graphql-mesh/plugin-jwt-auth@2.0.0-alpha-d2a81e2694ee686b407b72668562c34af8e8ca4d
|
107
|
+
- @graphql-mesh/plugin-opentelemetry@2.0.0-alpha-d2a81e2694ee686b407b72668562c34af8e8ca4d
|
108
|
+
- @graphql-mesh/plugin-prometheus@2.0.0-alpha-d2a81e2694ee686b407b72668562c34af8e8ca4d
|
109
|
+
- @graphql-mesh/transport-http@1.0.0-alpha-d2a81e2694ee686b407b72668562c34af8e8ca4d
|
110
|
+
- @graphql-mesh/transport-http-callback@1.0.0-alpha-d2a81e2694ee686b407b72668562c34af8e8ca4d
|
111
|
+
- @graphql-mesh/transport-ws@2.0.0-alpha-d2a81e2694ee686b407b72668562c34af8e8ca4d
|
112
|
+
- @graphql-hive/plugin-aws-sigv4@2.0.0-alpha-d2a81e2694ee686b407b72668562c34af8e8ca4d
|
113
|
+
- @graphql-hive/importer@2.0.0-alpha-d2a81e2694ee686b407b72668562c34af8e8ca4d
|
114
|
+
- @graphql-hive/pubsub@2.0.0-alpha-d2a81e2694ee686b407b72668562c34af8e8ca4d
|
115
|
+
- @graphql-hive/logger@1.0.1-alpha-d2a81e2694ee686b407b72668562c34af8e8ca4d
|
116
116
|
|
117
117
|
## 1.16.3
|
118
118
|
|
package/dist/bin.cjs
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
require('dotenv/config');
|
4
4
|
var module$1 = require('node:module');
|
5
5
|
var logger = require('@graphql-hive/logger');
|
6
|
-
var cli = require('./cli-
|
6
|
+
var cli = require('./cli-CPxULGJb.cjs');
|
7
7
|
require('node:cluster');
|
8
8
|
require('node:os');
|
9
9
|
require('node:path');
|
package/dist/bin.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
import 'dotenv/config';
|
3
3
|
import module from 'node:module';
|
4
4
|
import { Logger } from '@graphql-hive/logger';
|
5
|
-
import { e as enableModuleCachingIfPossible, h as handleNodeWarnings, r as run } from './cli-
|
5
|
+
import { e as enableModuleCachingIfPossible, h as handleNodeWarnings, r as run } from './cli-CP9iY6tm.js';
|
6
6
|
import 'node:cluster';
|
7
7
|
import 'node:os';
|
8
8
|
import 'node:path';
|
@@ -46,6 +46,9 @@ function strToBool(str) {
|
|
46
46
|
function isDebug() {
|
47
47
|
return getEnvBool("DEBUG");
|
48
48
|
}
|
49
|
+
function isNode() {
|
50
|
+
return typeof process !== "undefined" && process.versions && process.versions.node && typeof Bun === "undefined";
|
51
|
+
}
|
49
52
|
|
50
53
|
const unit = Object.create(null);
|
51
54
|
const m = 60000, h = m * 60, d = h * 24, y = d * 365.25;
|
@@ -527,7 +530,7 @@ async function handleOpenTelemetryConfig(ctx, cliOpts) {
|
|
527
530
|
"Initializing OpenTelemetry SDK"
|
528
531
|
);
|
529
532
|
return fakePromise().then(async () => {
|
530
|
-
const { openTelemetrySetup, HiveTracingSpanProcessor
|
533
|
+
const { openTelemetrySetup, HiveTracingSpanProcessor } = await import('@graphql-mesh/plugin-opentelemetry/setup');
|
531
534
|
const processors = [];
|
532
535
|
const logAttributes = {
|
533
536
|
traceEndpoints: [],
|
@@ -535,7 +538,7 @@ async function handleOpenTelemetryConfig(ctx, cliOpts) {
|
|
535
538
|
};
|
536
539
|
let integrationName;
|
537
540
|
if (openTelemetry) {
|
538
|
-
const otelEndpoint = typeof openTelemetry === "string" ? openTelemetry :
|
541
|
+
const otelEndpoint = typeof openTelemetry === "string" ? openTelemetry : getEnvStr("OTEL_EXPORTER_OTLP_ENDPOINT");
|
539
542
|
log.debug({ exporterType, otelEndpoint }, "Setting up OTLP Exporter");
|
540
543
|
integrationName = "OpenTelemetry";
|
541
544
|
logAttributes.traceEndpoints.push({
|
@@ -577,7 +580,16 @@ async function handleOpenTelemetryConfig(ctx, cliOpts) {
|
|
577
580
|
}).catch(() => null);
|
578
581
|
openTelemetrySetup({
|
579
582
|
traces: { processors },
|
580
|
-
resource: await detectResource()
|
583
|
+
resource: await detectResource().catch((err) => {
|
584
|
+
if (err && typeof err === "object" && "code" in err && err.code === "ERR_MODULE_NOT_FOUND") {
|
585
|
+
ctx.log.warn(
|
586
|
+
err,
|
587
|
+
`NodeJS modules necessary for environment detection is missing, please install it to auto-detect the environment`
|
588
|
+
);
|
589
|
+
return void 0;
|
590
|
+
}
|
591
|
+
throw err;
|
592
|
+
}),
|
581
593
|
contextManager
|
582
594
|
});
|
583
595
|
log.info(logAttributes, `${integrationName} integration is enabled`);
|
@@ -587,7 +599,7 @@ async function handleOpenTelemetryConfig(ctx, cliOpts) {
|
|
587
599
|
return false;
|
588
600
|
}
|
589
601
|
async function detectResource() {
|
590
|
-
if (
|
602
|
+
if (isNode()) {
|
591
603
|
const { getResourceDetectors } = await import('./index-61dm03o3.js').then(function (n) { return n.i; });
|
592
604
|
const { detectResources } = await import('./index-Dw4Doxg2.js').then(function (n) { return n.e; });
|
593
605
|
return detectResources({ detectors: getResourceDetectors() });
|
@@ -53,6 +53,9 @@ function strToBool(str) {
|
|
53
53
|
function isDebug() {
|
54
54
|
return getEnvBool("DEBUG");
|
55
55
|
}
|
56
|
+
function isNode() {
|
57
|
+
return typeof process !== "undefined" && process.versions && process.versions.node && typeof Bun === "undefined";
|
58
|
+
}
|
56
59
|
|
57
60
|
const unit = Object.create(null);
|
58
61
|
const m = 60000, h = m * 60, d = h * 24, y = d * 365.25;
|
@@ -534,7 +537,7 @@ async function handleOpenTelemetryConfig(ctx, cliOpts) {
|
|
534
537
|
"Initializing OpenTelemetry SDK"
|
535
538
|
);
|
536
539
|
return utils$1.fakePromise().then(async () => {
|
537
|
-
const { openTelemetrySetup, HiveTracingSpanProcessor
|
540
|
+
const { openTelemetrySetup, HiveTracingSpanProcessor } = await import('@graphql-mesh/plugin-opentelemetry/setup');
|
538
541
|
const processors = [];
|
539
542
|
const logAttributes = {
|
540
543
|
traceEndpoints: [],
|
@@ -542,7 +545,7 @@ async function handleOpenTelemetryConfig(ctx, cliOpts) {
|
|
542
545
|
};
|
543
546
|
let integrationName;
|
544
547
|
if (openTelemetry) {
|
545
|
-
const otelEndpoint = typeof openTelemetry === "string" ? openTelemetry :
|
548
|
+
const otelEndpoint = typeof openTelemetry === "string" ? openTelemetry : getEnvStr("OTEL_EXPORTER_OTLP_ENDPOINT");
|
546
549
|
log.debug({ exporterType, otelEndpoint }, "Setting up OTLP Exporter");
|
547
550
|
integrationName = "OpenTelemetry";
|
548
551
|
logAttributes.traceEndpoints.push({
|
@@ -584,7 +587,16 @@ async function handleOpenTelemetryConfig(ctx, cliOpts) {
|
|
584
587
|
}).catch(() => null);
|
585
588
|
openTelemetrySetup({
|
586
589
|
traces: { processors },
|
587
|
-
resource: await detectResource()
|
590
|
+
resource: await detectResource().catch((err) => {
|
591
|
+
if (err && typeof err === "object" && "code" in err && err.code === "ERR_MODULE_NOT_FOUND") {
|
592
|
+
ctx.log.warn(
|
593
|
+
err,
|
594
|
+
`NodeJS modules necessary for environment detection is missing, please install it to auto-detect the environment`
|
595
|
+
);
|
596
|
+
return void 0;
|
597
|
+
}
|
598
|
+
throw err;
|
599
|
+
}),
|
588
600
|
contextManager
|
589
601
|
});
|
590
602
|
log.info(logAttributes, `${integrationName} integration is enabled`);
|
@@ -594,7 +606,7 @@ async function handleOpenTelemetryConfig(ctx, cliOpts) {
|
|
594
606
|
return false;
|
595
607
|
}
|
596
608
|
async function detectResource() {
|
597
|
-
if (
|
609
|
+
if (isNode()) {
|
598
610
|
const { getResourceDetectors } = await Promise.resolve().then(function () { return require('./index-DWaHa380.cjs'); }).then(function (n) { return n.index; });
|
599
611
|
const { detectResources } = await Promise.resolve().then(function () { return require('./index-B44NjpxU.cjs'); }).then(function (n) { return n.esm; });
|
600
612
|
return detectResources({ detectors: getResourceDetectors() });
|
package/dist/index.cjs
CHANGED
package/dist/index.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
export { b as defaultOptions, d as defineConfig, e as enableModuleCachingIfPossible, a as getBuiltinPluginsFromConfig, g as getCacheInstanceFromConfig, h as handleNodeWarnings, r as run } from './cli-
|
1
|
+
export { b as defaultOptions, d as defineConfig, e as enableModuleCachingIfPossible, a as getBuiltinPluginsFromConfig, g as getCacheInstanceFromConfig, h as handleNodeWarnings, r as run } from './cli-CP9iY6tm.js';
|
2
2
|
export * from '@graphql-hive/logger';
|
3
3
|
export * from '@graphql-hive/gateway-runtime';
|
4
4
|
export { PubSub } from '@graphql-hive/pubsub';
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@graphql-hive/gateway",
|
3
|
-
"version": "2.0.0-alpha-
|
3
|
+
"version": "2.0.0-alpha-d2a81e2694ee686b407b72668562c34af8e8ca4d",
|
4
4
|
"type": "module",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -83,28 +83,28 @@
|
|
83
83
|
"@escape.tech/graphql-armor-block-field-suggestions": "^3.0.0",
|
84
84
|
"@escape.tech/graphql-armor-max-depth": "^2.4.0",
|
85
85
|
"@escape.tech/graphql-armor-max-tokens": "^2.5.0",
|
86
|
-
"@graphql-hive/gateway-runtime": "2.0.0-alpha-
|
87
|
-
"@graphql-hive/importer": "2.0.0-alpha-
|
88
|
-
"@graphql-hive/logger": "1.0.1-alpha-
|
89
|
-
"@graphql-hive/plugin-aws-sigv4": "2.0.0-alpha-
|
90
|
-
"@graphql-hive/plugin-deduplicate-request": "2.0.0-alpha-
|
91
|
-
"@graphql-hive/pubsub": "2.0.0-alpha-
|
86
|
+
"@graphql-hive/gateway-runtime": "2.0.0-alpha-d2a81e2694ee686b407b72668562c34af8e8ca4d",
|
87
|
+
"@graphql-hive/importer": "2.0.0-alpha-d2a81e2694ee686b407b72668562c34af8e8ca4d",
|
88
|
+
"@graphql-hive/logger": "1.0.1-alpha-d2a81e2694ee686b407b72668562c34af8e8ca4d",
|
89
|
+
"@graphql-hive/plugin-aws-sigv4": "2.0.0-alpha-d2a81e2694ee686b407b72668562c34af8e8ca4d",
|
90
|
+
"@graphql-hive/plugin-deduplicate-request": "2.0.0-alpha-d2a81e2694ee686b407b72668562c34af8e8ca4d",
|
91
|
+
"@graphql-hive/pubsub": "2.0.0-alpha-d2a81e2694ee686b407b72668562c34af8e8ca4d",
|
92
92
|
"@graphql-mesh/cache-cfw-kv": "^0.105.8",
|
93
93
|
"@graphql-mesh/cache-localforage": "^0.105.9",
|
94
94
|
"@graphql-mesh/cache-redis": "^0.104.8",
|
95
95
|
"@graphql-mesh/cache-upstash-redis": "^0.1.8",
|
96
96
|
"@graphql-mesh/cross-helpers": "^0.4.10",
|
97
|
-
"@graphql-mesh/hmac-upstream-signature": "2.0.0-alpha-
|
97
|
+
"@graphql-mesh/hmac-upstream-signature": "2.0.0-alpha-d2a81e2694ee686b407b72668562c34af8e8ca4d",
|
98
98
|
"@graphql-mesh/plugin-http-cache": "^0.105.8",
|
99
99
|
"@graphql-mesh/plugin-jit": "^0.2.7",
|
100
|
-
"@graphql-mesh/plugin-jwt-auth": "2.0.0-alpha-
|
101
|
-
"@graphql-mesh/plugin-opentelemetry": "2.0.0-alpha-
|
102
|
-
"@graphql-mesh/plugin-prometheus": "2.0.0-alpha-
|
100
|
+
"@graphql-mesh/plugin-jwt-auth": "2.0.0-alpha-d2a81e2694ee686b407b72668562c34af8e8ca4d",
|
101
|
+
"@graphql-mesh/plugin-opentelemetry": "2.0.0-alpha-d2a81e2694ee686b407b72668562c34af8e8ca4d",
|
102
|
+
"@graphql-mesh/plugin-prometheus": "2.0.0-alpha-d2a81e2694ee686b407b72668562c34af8e8ca4d",
|
103
103
|
"@graphql-mesh/plugin-rate-limit": "^0.104.7",
|
104
104
|
"@graphql-mesh/plugin-snapshot": "^0.104.7",
|
105
|
-
"@graphql-mesh/transport-http": "1.0.0-alpha-
|
106
|
-
"@graphql-mesh/transport-http-callback": "1.0.0-alpha-
|
107
|
-
"@graphql-mesh/transport-ws": "2.0.0-alpha-
|
105
|
+
"@graphql-mesh/transport-http": "1.0.0-alpha-d2a81e2694ee686b407b72668562c34af8e8ca4d",
|
106
|
+
"@graphql-mesh/transport-http-callback": "1.0.0-alpha-d2a81e2694ee686b407b72668562c34af8e8ca4d",
|
107
|
+
"@graphql-mesh/transport-ws": "2.0.0-alpha-d2a81e2694ee686b407b72668562c34af8e8ca4d",
|
108
108
|
"@graphql-mesh/types": "^0.104.8",
|
109
109
|
"@graphql-mesh/utils": "^0.104.8",
|
110
110
|
"@graphql-tools/code-file-loader": "^8.1.22",
|
@@ -133,7 +133,7 @@
|
|
133
133
|
"ws": "^8.18.3"
|
134
134
|
},
|
135
135
|
"devDependencies": {
|
136
|
-
"@graphql-mesh/transport-common": "1.0.0-alpha-
|
136
|
+
"@graphql-mesh/transport-common": "1.0.0-alpha-d2a81e2694ee686b407b72668562c34af8e8ca4d",
|
137
137
|
"@graphql-mesh/transport-soap": "^0.10.8",
|
138
138
|
"@graphql-tools/executor": "^1.4.9",
|
139
139
|
"@rollup/plugin-commonjs": "^28.0.0",
|