@graphql-hive/gateway 1.15.0-alpha-a2fe448e5ea2e6cf54b36f212b3eb5fee3167fb1 → 2.0.0-alpha-1e954fdf19120e1419dd5f0168215cd137bacb28

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/index.cjs CHANGED
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var cli = require('./cli-DeVzUuQb.cjs');
3
+ var cli = require('./cli-_WmSliwb.cjs');
4
+ var logger = require('@graphql-hive/logger');
4
5
  var gatewayRuntime = require('@graphql-hive/gateway-runtime');
5
- var utils = require('@graphql-mesh/utils');
6
6
  var pubsub = require('@graphql-hive/pubsub');
7
7
  var pluginJwtAuth = require('@graphql-mesh/plugin-jwt-auth');
8
8
  var pluginOpentelemetry = require('@graphql-mesh/plugin-opentelemetry');
@@ -24,7 +24,7 @@ require('node:module');
24
24
  require('node:os');
25
25
  require('node:path');
26
26
  require('@commander-js/extra-typings');
27
- require('@graphql-mesh/cross-helpers');
27
+ require('@graphql-mesh/utils');
28
28
  require('node:fs/promises');
29
29
  require('node:url');
30
30
  require('node:fs');
@@ -59,14 +59,6 @@ exports.getBuiltinPluginsFromConfig = cli.getBuiltinPluginsFromConfig;
59
59
  exports.getCacheInstanceFromConfig = cli.getCacheInstanceFromConfig;
60
60
  exports.handleNodeWarnings = cli.handleNodeWarnings;
61
61
  exports.run = cli.run;
62
- Object.defineProperty(exports, "DefaultLogger", {
63
- enumerable: true,
64
- get: function () { return utils.DefaultLogger; }
65
- });
66
- Object.defineProperty(exports, "LogLevel", {
67
- enumerable: true,
68
- get: function () { return utils.LogLevel; }
69
- });
70
62
  Object.defineProperty(exports, "PubSub", {
71
63
  enumerable: true,
72
64
  get: function () { return pubsub.PubSub; }
@@ -123,6 +115,12 @@ Object.defineProperty(exports, "HTTPTransport", {
123
115
  enumerable: true,
124
116
  get: function () { return transportHttp__default.default; }
125
117
  });
118
+ Object.keys(logger).forEach(function (k) {
119
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
120
+ enumerable: true,
121
+ get: function () { return logger[k]; }
122
+ });
123
+ });
126
124
  Object.keys(gatewayRuntime).forEach(function (k) {
127
125
  if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
128
126
  enumerable: true,
package/dist/index.d.cts CHANGED
@@ -1,6 +1,8 @@
1
1
  import { Command } from '@commander-js/extra-typings';
2
2
  import { GatewayConfigContext, GatewayConfigSupergraph, GatewayHiveReportingOptions, GatewayGraphOSReportingOptions, GatewayConfigSubgraph, GatewayConfigProxy, GatewayPlugin } from '@graphql-hive/gateway-runtime';
3
3
  export * from '@graphql-hive/gateway-runtime';
4
+ import { Logger } from '@graphql-hive/logger';
5
+ export * from '@graphql-hive/logger';
4
6
  import { AWSSignv4PluginOptions } from '@graphql-hive/plugin-aws-sigv4';
5
7
  import { HivePubSub } from '@graphql-hive/pubsub';
6
8
  export { PubSub } from '@graphql-hive/pubsub';
@@ -13,8 +15,7 @@ export * from '@graphql-mesh/plugin-opentelemetry';
13
15
  import { PrometheusPluginOptions } from '@graphql-mesh/plugin-prometheus';
14
16
  export * from '@graphql-mesh/plugin-prometheus';
15
17
  export { default as usePrometheus } from '@graphql-mesh/plugin-prometheus';
16
- import { YamlConfig, KeyValueCache, Logger } from '@graphql-mesh/types';
17
- export { DefaultLogger, LogLevel } from '@graphql-mesh/utils';
18
+ import { YamlConfig, KeyValueCache } from '@graphql-mesh/types';
18
19
  export { default as useRateLimit } from '@graphql-mesh/plugin-rate-limit';
19
20
  export { default as useHttpCache } from '@graphql-mesh/plugin-http-cache';
20
21
  export { useDeduplicateRequest } from '@graphql-hive/plugin-deduplicate-request';
@@ -133,7 +134,7 @@ interface GatewayCLIProxyConfig extends Omit<GatewayConfigProxy, 'proxy' | 'cach
133
134
  proxy?: GatewayConfigProxy['proxy'];
134
135
  }
135
136
  type KeyValueCacheFactoryFn = (ctx: {
136
- logger: Logger;
137
+ log: Logger;
137
138
  pubsub: HivePubSub;
138
139
  cwd: string;
139
140
  }) => KeyValueCache;
@@ -265,7 +266,7 @@ declare let cli: Command<[], {
265
266
  host?: string | undefined;
266
267
  port?: number | undefined;
267
268
  polling?: number | undefined;
268
- maskedErrors: string | boolean | [] | string[];
269
+ maskedErrors: string | boolean | string[] | [];
269
270
  hiveRegistryToken?: string | undefined;
270
271
  hiveUsageTarget?: string | undefined;
271
272
  hiveUsageAccessToken?: string | undefined;
@@ -284,7 +285,7 @@ declare function run(userCtx: Partial<CLIContext>): Promise<Command<[], {
284
285
  host?: string | undefined;
285
286
  port?: number | undefined;
286
287
  polling?: number | undefined;
287
- maskedErrors: string | boolean | [] | string[];
288
+ maskedErrors: string | boolean | string[] | [];
288
289
  hiveRegistryToken?: string | undefined;
289
290
  hiveUsageTarget?: string | undefined;
290
291
  hiveUsageAccessToken?: string | undefined;
@@ -306,7 +307,7 @@ declare function enableModuleCachingIfPossible(): void;
306
307
  */
307
308
  declare function getBuiltinPluginsFromConfig(config: GatewayCLIBuiltinPluginConfig, ctx: {
308
309
  cache: KeyValueCache;
309
- logger: Logger;
310
+ log: Logger;
310
311
  pubsub: HivePubSub;
311
312
  cwd: string;
312
313
  }): Promise<GatewayPlugin[]>;
@@ -315,7 +316,7 @@ declare function getBuiltinPluginsFromConfig(config: GatewayCLIBuiltinPluginConf
315
316
  * So use it with caution.
316
317
  */
317
318
  declare function getCacheInstanceFromConfig(config: GatewayCLIBuiltinPluginConfig, ctx: {
318
- logger: Logger;
319
+ log: Logger;
319
320
  pubsub: HivePubSub;
320
321
  cwd: string;
321
322
  }): Promise<KeyValueCache>;
package/dist/index.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  import { Command } from '@commander-js/extra-typings';
2
2
  import { GatewayConfigContext, GatewayConfigSupergraph, GatewayHiveReportingOptions, GatewayGraphOSReportingOptions, GatewayConfigSubgraph, GatewayConfigProxy, GatewayPlugin } from '@graphql-hive/gateway-runtime';
3
3
  export * from '@graphql-hive/gateway-runtime';
4
+ import { Logger } from '@graphql-hive/logger';
5
+ export * from '@graphql-hive/logger';
4
6
  import { AWSSignv4PluginOptions } from '@graphql-hive/plugin-aws-sigv4';
5
7
  import { HivePubSub } from '@graphql-hive/pubsub';
6
8
  export { PubSub } from '@graphql-hive/pubsub';
@@ -13,8 +15,7 @@ export * from '@graphql-mesh/plugin-opentelemetry';
13
15
  import { PrometheusPluginOptions } from '@graphql-mesh/plugin-prometheus';
14
16
  export * from '@graphql-mesh/plugin-prometheus';
15
17
  export { default as usePrometheus } from '@graphql-mesh/plugin-prometheus';
16
- import { YamlConfig, KeyValueCache, Logger } from '@graphql-mesh/types';
17
- export { DefaultLogger, LogLevel } from '@graphql-mesh/utils';
18
+ import { YamlConfig, KeyValueCache } from '@graphql-mesh/types';
18
19
  export { default as useRateLimit } from '@graphql-mesh/plugin-rate-limit';
19
20
  export { default as useHttpCache } from '@graphql-mesh/plugin-http-cache';
20
21
  export { useDeduplicateRequest } from '@graphql-hive/plugin-deduplicate-request';
@@ -133,7 +134,7 @@ interface GatewayCLIProxyConfig extends Omit<GatewayConfigProxy, 'proxy' | 'cach
133
134
  proxy?: GatewayConfigProxy['proxy'];
134
135
  }
135
136
  type KeyValueCacheFactoryFn = (ctx: {
136
- logger: Logger;
137
+ log: Logger;
137
138
  pubsub: HivePubSub;
138
139
  cwd: string;
139
140
  }) => KeyValueCache;
@@ -265,7 +266,7 @@ declare let cli: Command<[], {
265
266
  host?: string | undefined;
266
267
  port?: number | undefined;
267
268
  polling?: number | undefined;
268
- maskedErrors: string | boolean | [] | string[];
269
+ maskedErrors: string | boolean | string[] | [];
269
270
  hiveRegistryToken?: string | undefined;
270
271
  hiveUsageTarget?: string | undefined;
271
272
  hiveUsageAccessToken?: string | undefined;
@@ -284,7 +285,7 @@ declare function run(userCtx: Partial<CLIContext>): Promise<Command<[], {
284
285
  host?: string | undefined;
285
286
  port?: number | undefined;
286
287
  polling?: number | undefined;
287
- maskedErrors: string | boolean | [] | string[];
288
+ maskedErrors: string | boolean | string[] | [];
288
289
  hiveRegistryToken?: string | undefined;
289
290
  hiveUsageTarget?: string | undefined;
290
291
  hiveUsageAccessToken?: string | undefined;
@@ -306,7 +307,7 @@ declare function enableModuleCachingIfPossible(): void;
306
307
  */
307
308
  declare function getBuiltinPluginsFromConfig(config: GatewayCLIBuiltinPluginConfig, ctx: {
308
309
  cache: KeyValueCache;
309
- logger: Logger;
310
+ log: Logger;
310
311
  pubsub: HivePubSub;
311
312
  cwd: string;
312
313
  }): Promise<GatewayPlugin[]>;
@@ -315,7 +316,7 @@ declare function getBuiltinPluginsFromConfig(config: GatewayCLIBuiltinPluginConf
315
316
  * So use it with caution.
316
317
  */
317
318
  declare function getCacheInstanceFromConfig(config: GatewayCLIBuiltinPluginConfig, ctx: {
318
- logger: Logger;
319
+ log: Logger;
319
320
  pubsub: HivePubSub;
320
321
  cwd: string;
321
322
  }): Promise<KeyValueCache>;
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
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-Dts35ZPf.js';
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-BBlJHQNF.js';
2
+ export * from '@graphql-hive/logger';
2
3
  export * from '@graphql-hive/gateway-runtime';
3
- export { DefaultLogger, LogLevel } from '@graphql-mesh/utils';
4
4
  export { PubSub } from '@graphql-hive/pubsub';
5
5
  export * from '@graphql-mesh/plugin-jwt-auth';
6
6
  export * from '@graphql-mesh/plugin-opentelemetry';
@@ -23,7 +23,7 @@ import 'node:module';
23
23
  import 'node:os';
24
24
  import 'node:path';
25
25
  import '@commander-js/extra-typings';
26
- import '@graphql-mesh/cross-helpers';
26
+ import '@graphql-mesh/utils';
27
27
  import 'node:fs/promises';
28
28
  import 'node:url';
29
29
  import 'node:fs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-hive/gateway",
3
- "version": "1.15.0-alpha-a2fe448e5ea2e6cf54b36f212b3eb5fee3167fb1",
3
+ "version": "2.0.0-alpha-1e954fdf19120e1419dd5f0168215cd137bacb28",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -53,9 +53,10 @@
53
53
  "@escape.tech/graphql-armor-block-field-suggestions": "^3.0.0",
54
54
  "@escape.tech/graphql-armor-max-depth": "^2.4.0",
55
55
  "@escape.tech/graphql-armor-max-tokens": "^2.5.0",
56
- "@graphql-hive/gateway-runtime": "1.9.0-alpha-a2fe448e5ea2e6cf54b36f212b3eb5fee3167fb1",
56
+ "@graphql-hive/gateway-runtime": "2.0.0-alpha-1e954fdf19120e1419dd5f0168215cd137bacb28",
57
57
  "@graphql-hive/importer": "^1.1.0",
58
- "@graphql-hive/plugin-aws-sigv4": "1.0.11-alpha-a2fe448e5ea2e6cf54b36f212b3eb5fee3167fb1",
58
+ "@graphql-hive/logger": "1.0.0-alpha-1e954fdf19120e1419dd5f0168215cd137bacb28",
59
+ "@graphql-hive/plugin-aws-sigv4": "1.0.11-alpha-1e954fdf19120e1419dd5f0168215cd137bacb28",
59
60
  "@graphql-hive/plugin-deduplicate-request": "^1.0.0",
60
61
  "@graphql-hive/pubsub": "^1.0.0",
61
62
  "@graphql-mesh/cache-cfw-kv": "^0.105.0",
@@ -63,18 +64,18 @@
63
64
  "@graphql-mesh/cache-redis": "^0.104.0",
64
65
  "@graphql-mesh/cache-upstash-redis": "^0.1.0",
65
66
  "@graphql-mesh/cross-helpers": "^0.4.10",
66
- "@graphql-mesh/hmac-upstream-signature": "^1.2.27",
67
+ "@graphql-mesh/hmac-upstream-signature": "2.0.0-alpha-1e954fdf19120e1419dd5f0168215cd137bacb28",
67
68
  "@graphql-mesh/plugin-http-cache": "^0.105.2",
68
69
  "@graphql-mesh/plugin-jit": "^0.2.0",
69
- "@graphql-mesh/plugin-jwt-auth": "^1.5.4",
70
+ "@graphql-mesh/plugin-jwt-auth": "2.0.0-alpha-1e954fdf19120e1419dd5f0168215cd137bacb28",
70
71
  "@graphql-mesh/plugin-mock": "^0.105.0",
71
- "@graphql-mesh/plugin-opentelemetry": "1.3.58-alpha-a2fe448e5ea2e6cf54b36f212b3eb5fee3167fb1",
72
- "@graphql-mesh/plugin-prometheus": "1.3.46-alpha-a2fe448e5ea2e6cf54b36f212b3eb5fee3167fb1",
72
+ "@graphql-mesh/plugin-opentelemetry": "2.0.0-alpha-1e954fdf19120e1419dd5f0168215cd137bacb28",
73
+ "@graphql-mesh/plugin-prometheus": "2.0.0-alpha-1e954fdf19120e1419dd5f0168215cd137bacb28",
73
74
  "@graphql-mesh/plugin-rate-limit": "^0.104.0",
74
75
  "@graphql-mesh/plugin-snapshot": "^0.104.0",
75
- "@graphql-mesh/transport-http": "0.6.42-alpha-a2fe448e5ea2e6cf54b36f212b3eb5fee3167fb1",
76
- "@graphql-mesh/transport-http-callback": "0.6.1-alpha-a2fe448e5ea2e6cf54b36f212b3eb5fee3167fb1",
77
- "@graphql-mesh/transport-ws": "^1.0.9",
76
+ "@graphql-mesh/transport-http": "0.6.42-alpha-1e954fdf19120e1419dd5f0168215cd137bacb28",
77
+ "@graphql-mesh/transport-http-callback": "1.0.0-alpha-1e954fdf19120e1419dd5f0168215cd137bacb28",
78
+ "@graphql-mesh/transport-ws": "2.0.0-alpha-1e954fdf19120e1419dd5f0168215cd137bacb28",
78
79
  "@graphql-mesh/types": "^0.104.0",
79
80
  "@graphql-mesh/utils": "^0.104.2",
80
81
  "@graphql-tools/code-file-loader": "^8.1.15",
@@ -89,7 +90,7 @@
89
90
  "ws": "^8.18.0"
90
91
  },
91
92
  "devDependencies": {
92
- "@graphql-mesh/transport-common": "^0.7.34",
93
+ "@graphql-mesh/transport-common": "1.0.0-alpha-1e954fdf19120e1419dd5f0168215cd137bacb28",
93
94
  "@graphql-mesh/transport-soap": "^0.10.0",
94
95
  "@graphql-tools/executor": "^1.4.7",
95
96
  "@rollup/plugin-commonjs": "^28.0.0",
@@ -110,8 +111,7 @@
110
111
  "rimraf": "^6.0.1",
111
112
  "rollup": "^4.18.1",
112
113
  "rollup-plugin-tsconfig-paths": "^1.5.2",
113
- "tsx": "4.19.4",
114
- "uWebSockets.js": "uNetworking/uWebSockets.js#semver:^20"
114
+ "tsx": "4.19.4"
115
115
  },
116
116
  "sideEffects": false
117
117
  }
@@ -1,126 +0,0 @@
1
- function getDefaultExportFromCjs (x) {
2
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
3
- }
4
-
5
- function commonjsRequire(path) {
6
- throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
7
- }
8
-
9
- var uws$1 = {exports: {}};
10
-
11
- /*
12
- * Authored by Alex Hultman, 2018-2024.
13
- * Intellectual property of third-party.
14
-
15
- * Licensed under the Apache License, Version 2.0 (the "License");
16
- * you may not use this file except in compliance with the License.
17
- * You may obtain a copy of the License at
18
-
19
- * http://www.apache.org/licenses/LICENSE-2.0
20
-
21
- * Unless required by applicable law or agreed to in writing, software
22
- * distributed under the License is distributed on an "AS IS" BASIS,
23
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
24
- * See the License for the specific language governing permissions and
25
- * limitations under the License.
26
- */
27
-
28
- uws$1.exports = (() => {
29
- try {
30
- return commonjsRequire('./uws_' + process.platform + '_' + process.arch + '_' + process.versions.modules + '.node');
31
- } catch (e) {
32
- throw new Error('This version of uWS.js (v20.52.0) supports only Node.js versions 20, 22, 23 and 24 on (glibc) Linux, macOS and Windows, on Tier 1 platforms (https://github.com/nodejs/node/blob/master/BUILDING.md#platform-list).\n\n' + e.toString());
33
- }
34
- })();
35
-
36
- uws$1.exports.DeclarativeResponse = class DeclarativeResponse {
37
- constructor() {
38
- this.instructions = [];
39
- }
40
-
41
- // Utility method to encode text and append instruction
42
- _appendInstruction(opcode, ...text) {
43
- this.instructions.push(opcode);
44
- text.forEach(str => {
45
- const bytes = (typeof str === 'string') ? new TextEncoder().encode(str) : str;
46
- this.instructions.push(bytes.length, ...bytes);
47
- });
48
- }
49
-
50
- // Utility method to append 2-byte length text in little-endian format
51
- _appendInstructionWithLength(opcode, text) {
52
- this.instructions.push(opcode);
53
- const bytes = new TextEncoder().encode(text);
54
- const length = bytes.length;
55
- this.instructions.push(length & 0xff, (length >> 8) & 0xff, ...bytes);
56
- }
57
-
58
- writeHeader(key, value) { return this._appendInstruction(1, key, value), this; }
59
- writeBody() { return this.instructions.push(2), this; }
60
- writeQueryValue(key) { return this._appendInstruction(3, key), this; }
61
- writeHeaderValue(key) { return this._appendInstruction(4, key), this; }
62
- write(value) { return this._appendInstructionWithLength(5, value), this; }
63
- writeParameterValue(key) { return this._appendInstruction(6, key), this; }
64
-
65
- end(value) {
66
- const bytes = new TextEncoder().encode(value);
67
- const length = bytes.length;
68
- this.instructions.push(0, length & 0xff, (length >> 8) & 0xff, ...bytes);
69
- return new Uint8Array(this.instructions).buffer;
70
- }
71
- };
72
-
73
- var uwsExports = uws$1.exports;
74
- var uws = /*@__PURE__*/getDefaultExportFromCjs(uwsExports);
75
-
76
- // App
77
- const App = uws.App;
78
- const SSLApp = uws.SSLApp;
79
-
80
- // Listen options
81
- const LIBUS_LISTEN_EXCLUSIVE_PORT = uws.LIBUS_LISTEN_EXCLUSIVE_PORT;
82
-
83
- // µSockets functions
84
- const us_listen_socket_close = uws.us_listen_socket_close;
85
- const us_socket_local_port = uws.us_socket_local_port;
86
-
87
- // Compression enum
88
- const DISABLED = uws.DISABLED;
89
- const SHARED_COMPRESSOR = uws.SHARED_COMPRESSOR;
90
- const SHARED_DECOMPRESSOR = uws.SHARED_DECOMPRESSOR;
91
- const DEDICATED_DECOMPRESSOR = uws.DEDICATED_DECOMPRESSOR;
92
- const DEDICATED_COMPRESSOR = uws.DEDICATED_COMPRESSOR;
93
- const DEDICATED_COMPRESSOR_3KB = uws.DEDICATED_COMPRESSOR_3KB;
94
- const DEDICATED_COMPRESSOR_4KB = uws.DEDICATED_COMPRESSOR_4KB;
95
- const DEDICATED_COMPRESSOR_8KB = uws.DEDICATED_COMPRESSOR_8KB;
96
- const DEDICATED_COMPRESSOR_16KB = uws.DEDICATED_COMPRESSOR_16KB;
97
- const DEDICATED_COMPRESSOR_32KB = uws.DEDICATED_COMPRESSOR_32KB;
98
- const DEDICATED_COMPRESSOR_64KB = uws.DEDICATED_COMPRESSOR_64KB;
99
- const DEDICATED_COMPRESSOR_128KB = uws.DEDICATED_COMPRESSOR_128KB;
100
- const DEDICATED_COMPRESSOR_256KB = uws.DEDICATED_COMPRESSOR_256KB;
101
- const DEDICATED_DECOMPRESSOR_32KB = uws.DEDICATED_DECOMPRESSOR_32KB;
102
- const DEDICATED_DECOMPRESSOR_16KB = uws.DEDICATED_DECOMPRESSOR_16KB;
103
- const DEDICATED_DECOMPRESSOR_8KB = uws.DEDICATED_DECOMPRESSOR_8KB;
104
- const DEDICATED_DECOMPRESSOR_4KB = uws.DEDICATED_DECOMPRESSOR_4KB;
105
- const DEDICATED_DECOMPRESSOR_2KB = uws.DEDICATED_DECOMPRESSOR_2KB;
106
- const DEDICATED_DECOMPRESSOR_1KB = uws.DEDICATED_DECOMPRESSOR_1KB;
107
- const DEDICATED_DECOMPRESSOR_512B = uws.DEDICATED_DECOMPRESSOR_512B;
108
-
109
- // Temporary KV store
110
- const getString = uws.getString;
111
- const setString = uws.setString;
112
- const getInteger = uws.getInteger;
113
- const setInteger = uws.setInteger;
114
- const incInteger = uws.incInteger;
115
- const lock = uws.lock;
116
- const unlock = uws.unlock;
117
- const getIntegerKeys = uws.getIntegerKeys;
118
- const getStringKeys = uws.getStringKeys;
119
- const deleteString = uws.deleteString;
120
- const deleteInteger = uws.deleteInteger;
121
- const deleteStringCollection = uws.deleteStringCollection;
122
- const deleteIntegerCollection = uws.deleteIntegerCollection;
123
- const _cfg = uws._cfg;
124
- const getParts = uws.getParts;
125
-
126
- export { App, DEDICATED_COMPRESSOR, DEDICATED_COMPRESSOR_128KB, DEDICATED_COMPRESSOR_16KB, DEDICATED_COMPRESSOR_256KB, DEDICATED_COMPRESSOR_32KB, DEDICATED_COMPRESSOR_3KB, DEDICATED_COMPRESSOR_4KB, DEDICATED_COMPRESSOR_64KB, DEDICATED_COMPRESSOR_8KB, DEDICATED_DECOMPRESSOR, DEDICATED_DECOMPRESSOR_16KB, DEDICATED_DECOMPRESSOR_1KB, DEDICATED_DECOMPRESSOR_2KB, DEDICATED_DECOMPRESSOR_32KB, DEDICATED_DECOMPRESSOR_4KB, DEDICATED_DECOMPRESSOR_512B, DEDICATED_DECOMPRESSOR_8KB, DISABLED, LIBUS_LISTEN_EXCLUSIVE_PORT, SHARED_COMPRESSOR, SHARED_DECOMPRESSOR, SSLApp, _cfg, uws as default, deleteInteger, deleteIntegerCollection, deleteString, deleteStringCollection, getInteger, getIntegerKeys, getParts, getString, getStringKeys, incInteger, lock, setInteger, setString, unlock, us_listen_socket_close, us_socket_local_port };
@@ -1,168 +0,0 @@
1
- 'use strict';
2
-
3
- function getDefaultExportFromCjs (x) {
4
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
5
- }
6
-
7
- function commonjsRequire(path) {
8
- throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
9
- }
10
-
11
- var uws$1 = {exports: {}};
12
-
13
- /*
14
- * Authored by Alex Hultman, 2018-2024.
15
- * Intellectual property of third-party.
16
-
17
- * Licensed under the Apache License, Version 2.0 (the "License");
18
- * you may not use this file except in compliance with the License.
19
- * You may obtain a copy of the License at
20
-
21
- * http://www.apache.org/licenses/LICENSE-2.0
22
-
23
- * Unless required by applicable law or agreed to in writing, software
24
- * distributed under the License is distributed on an "AS IS" BASIS,
25
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
26
- * See the License for the specific language governing permissions and
27
- * limitations under the License.
28
- */
29
-
30
- uws$1.exports = (() => {
31
- try {
32
- return commonjsRequire('./uws_' + process.platform + '_' + process.arch + '_' + process.versions.modules + '.node');
33
- } catch (e) {
34
- throw new Error('This version of uWS.js (v20.52.0) supports only Node.js versions 20, 22, 23 and 24 on (glibc) Linux, macOS and Windows, on Tier 1 platforms (https://github.com/nodejs/node/blob/master/BUILDING.md#platform-list).\n\n' + e.toString());
35
- }
36
- })();
37
-
38
- uws$1.exports.DeclarativeResponse = class DeclarativeResponse {
39
- constructor() {
40
- this.instructions = [];
41
- }
42
-
43
- // Utility method to encode text and append instruction
44
- _appendInstruction(opcode, ...text) {
45
- this.instructions.push(opcode);
46
- text.forEach(str => {
47
- const bytes = (typeof str === 'string') ? new TextEncoder().encode(str) : str;
48
- this.instructions.push(bytes.length, ...bytes);
49
- });
50
- }
51
-
52
- // Utility method to append 2-byte length text in little-endian format
53
- _appendInstructionWithLength(opcode, text) {
54
- this.instructions.push(opcode);
55
- const bytes = new TextEncoder().encode(text);
56
- const length = bytes.length;
57
- this.instructions.push(length & 0xff, (length >> 8) & 0xff, ...bytes);
58
- }
59
-
60
- writeHeader(key, value) { return this._appendInstruction(1, key, value), this; }
61
- writeBody() { return this.instructions.push(2), this; }
62
- writeQueryValue(key) { return this._appendInstruction(3, key), this; }
63
- writeHeaderValue(key) { return this._appendInstruction(4, key), this; }
64
- write(value) { return this._appendInstructionWithLength(5, value), this; }
65
- writeParameterValue(key) { return this._appendInstruction(6, key), this; }
66
-
67
- end(value) {
68
- const bytes = new TextEncoder().encode(value);
69
- const length = bytes.length;
70
- this.instructions.push(0, length & 0xff, (length >> 8) & 0xff, ...bytes);
71
- return new Uint8Array(this.instructions).buffer;
72
- }
73
- };
74
-
75
- var uwsExports = uws$1.exports;
76
- var uws = /*@__PURE__*/getDefaultExportFromCjs(uwsExports);
77
-
78
- // App
79
- const App = uws.App;
80
- const SSLApp = uws.SSLApp;
81
-
82
- // Listen options
83
- const LIBUS_LISTEN_EXCLUSIVE_PORT = uws.LIBUS_LISTEN_EXCLUSIVE_PORT;
84
-
85
- // µSockets functions
86
- const us_listen_socket_close = uws.us_listen_socket_close;
87
- const us_socket_local_port = uws.us_socket_local_port;
88
-
89
- // Compression enum
90
- const DISABLED = uws.DISABLED;
91
- const SHARED_COMPRESSOR = uws.SHARED_COMPRESSOR;
92
- const SHARED_DECOMPRESSOR = uws.SHARED_DECOMPRESSOR;
93
- const DEDICATED_DECOMPRESSOR = uws.DEDICATED_DECOMPRESSOR;
94
- const DEDICATED_COMPRESSOR = uws.DEDICATED_COMPRESSOR;
95
- const DEDICATED_COMPRESSOR_3KB = uws.DEDICATED_COMPRESSOR_3KB;
96
- const DEDICATED_COMPRESSOR_4KB = uws.DEDICATED_COMPRESSOR_4KB;
97
- const DEDICATED_COMPRESSOR_8KB = uws.DEDICATED_COMPRESSOR_8KB;
98
- const DEDICATED_COMPRESSOR_16KB = uws.DEDICATED_COMPRESSOR_16KB;
99
- const DEDICATED_COMPRESSOR_32KB = uws.DEDICATED_COMPRESSOR_32KB;
100
- const DEDICATED_COMPRESSOR_64KB = uws.DEDICATED_COMPRESSOR_64KB;
101
- const DEDICATED_COMPRESSOR_128KB = uws.DEDICATED_COMPRESSOR_128KB;
102
- const DEDICATED_COMPRESSOR_256KB = uws.DEDICATED_COMPRESSOR_256KB;
103
- const DEDICATED_DECOMPRESSOR_32KB = uws.DEDICATED_DECOMPRESSOR_32KB;
104
- const DEDICATED_DECOMPRESSOR_16KB = uws.DEDICATED_DECOMPRESSOR_16KB;
105
- const DEDICATED_DECOMPRESSOR_8KB = uws.DEDICATED_DECOMPRESSOR_8KB;
106
- const DEDICATED_DECOMPRESSOR_4KB = uws.DEDICATED_DECOMPRESSOR_4KB;
107
- const DEDICATED_DECOMPRESSOR_2KB = uws.DEDICATED_DECOMPRESSOR_2KB;
108
- const DEDICATED_DECOMPRESSOR_1KB = uws.DEDICATED_DECOMPRESSOR_1KB;
109
- const DEDICATED_DECOMPRESSOR_512B = uws.DEDICATED_DECOMPRESSOR_512B;
110
-
111
- // Temporary KV store
112
- const getString = uws.getString;
113
- const setString = uws.setString;
114
- const getInteger = uws.getInteger;
115
- const setInteger = uws.setInteger;
116
- const incInteger = uws.incInteger;
117
- const lock = uws.lock;
118
- const unlock = uws.unlock;
119
- const getIntegerKeys = uws.getIntegerKeys;
120
- const getStringKeys = uws.getStringKeys;
121
- const deleteString = uws.deleteString;
122
- const deleteInteger = uws.deleteInteger;
123
- const deleteStringCollection = uws.deleteStringCollection;
124
- const deleteIntegerCollection = uws.deleteIntegerCollection;
125
- const _cfg = uws._cfg;
126
- const getParts = uws.getParts;
127
-
128
- exports.App = App;
129
- exports.DEDICATED_COMPRESSOR = DEDICATED_COMPRESSOR;
130
- exports.DEDICATED_COMPRESSOR_128KB = DEDICATED_COMPRESSOR_128KB;
131
- exports.DEDICATED_COMPRESSOR_16KB = DEDICATED_COMPRESSOR_16KB;
132
- exports.DEDICATED_COMPRESSOR_256KB = DEDICATED_COMPRESSOR_256KB;
133
- exports.DEDICATED_COMPRESSOR_32KB = DEDICATED_COMPRESSOR_32KB;
134
- exports.DEDICATED_COMPRESSOR_3KB = DEDICATED_COMPRESSOR_3KB;
135
- exports.DEDICATED_COMPRESSOR_4KB = DEDICATED_COMPRESSOR_4KB;
136
- exports.DEDICATED_COMPRESSOR_64KB = DEDICATED_COMPRESSOR_64KB;
137
- exports.DEDICATED_COMPRESSOR_8KB = DEDICATED_COMPRESSOR_8KB;
138
- exports.DEDICATED_DECOMPRESSOR = DEDICATED_DECOMPRESSOR;
139
- exports.DEDICATED_DECOMPRESSOR_16KB = DEDICATED_DECOMPRESSOR_16KB;
140
- exports.DEDICATED_DECOMPRESSOR_1KB = DEDICATED_DECOMPRESSOR_1KB;
141
- exports.DEDICATED_DECOMPRESSOR_2KB = DEDICATED_DECOMPRESSOR_2KB;
142
- exports.DEDICATED_DECOMPRESSOR_32KB = DEDICATED_DECOMPRESSOR_32KB;
143
- exports.DEDICATED_DECOMPRESSOR_4KB = DEDICATED_DECOMPRESSOR_4KB;
144
- exports.DEDICATED_DECOMPRESSOR_512B = DEDICATED_DECOMPRESSOR_512B;
145
- exports.DEDICATED_DECOMPRESSOR_8KB = DEDICATED_DECOMPRESSOR_8KB;
146
- exports.DISABLED = DISABLED;
147
- exports.LIBUS_LISTEN_EXCLUSIVE_PORT = LIBUS_LISTEN_EXCLUSIVE_PORT;
148
- exports.SHARED_COMPRESSOR = SHARED_COMPRESSOR;
149
- exports.SHARED_DECOMPRESSOR = SHARED_DECOMPRESSOR;
150
- exports.SSLApp = SSLApp;
151
- exports._cfg = _cfg;
152
- exports.default = uws;
153
- exports.deleteInteger = deleteInteger;
154
- exports.deleteIntegerCollection = deleteIntegerCollection;
155
- exports.deleteString = deleteString;
156
- exports.deleteStringCollection = deleteStringCollection;
157
- exports.getInteger = getInteger;
158
- exports.getIntegerKeys = getIntegerKeys;
159
- exports.getParts = getParts;
160
- exports.getString = getString;
161
- exports.getStringKeys = getStringKeys;
162
- exports.incInteger = incInteger;
163
- exports.lock = lock;
164
- exports.setInteger = setInteger;
165
- exports.setString = setString;
166
- exports.unlock = unlock;
167
- exports.us_listen_socket_close = us_listen_socket_close;
168
- exports.us_socket_local_port = us_socket_local_port;