@sockethub/server 5.0.0-alpha.14 → 5.0.0-alpha.16

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.
@@ -47,6 +47,7 @@ export default class PlatformInstance {
47
47
  private heartbeatListener?;
48
48
  private heartbeatFailureHandled;
49
49
  private replaced;
50
+ private shutdownResult?;
50
51
  private readonly actor?;
51
52
  constructor(params: PlatformInstanceParams);
52
53
  createQueue(): void;
@@ -66,9 +67,17 @@ export default class PlatformInstance {
66
67
  */
67
68
  markReplaced(): void;
68
69
  /**
69
- * Destroys all references to this platform instance, internal listeners and controlled processes
70
+ * Destroys all references to this platform instance, internal listeners and controlled processes.
71
+ *
72
+ * Single-flight: every caller shares one teardown run. A crash-close
73
+ * teardown pauses and obliterates the Redis queue asynchronously, so a
74
+ * caller about to create a replacement (ProcessManager.ensureProcess)
75
+ * must be able to await the teardown *already in flight* — a second,
76
+ * independent run would resolve while the first is still obliterating
77
+ * the queue name the replacement is about to reuse.
70
78
  */
71
79
  shutdown(): Promise<void>;
80
+ private teardown;
72
81
  /**
73
82
  * When jobs are completed or failed, we prepare the results and send them to the client socket
74
83
  */
package/dist/platform.js CHANGED
@@ -19800,9 +19800,87 @@ var init_activity_stream = __esm(() => {
19800
19800
  // ../schemas/src/schemas/platform.ts
19801
19801
  var init_platform = () => {};
19802
19802
 
19803
+ // ../schemas/package.json
19804
+ var package_default;
19805
+ var init_package = __esm(() => {
19806
+ package_default = {
19807
+ name: "@sockethub/schemas",
19808
+ description: "JSON schema files for validating Sockethub Activity Streams",
19809
+ version: "3.0.0-alpha.16",
19810
+ type: "module",
19811
+ private: false,
19812
+ author: "Nick Jennings <nick@silverbucket.net>",
19813
+ license: "MIT",
19814
+ publishConfig: {
19815
+ access: "public"
19816
+ },
19817
+ main: "dist/index.js",
19818
+ exports: {
19819
+ ".": {
19820
+ types: "./dist/index.d.ts",
19821
+ import: "./dist/index.js",
19822
+ default: "./dist/index.js"
19823
+ },
19824
+ "./context": {
19825
+ types: "./dist/context.d.ts",
19826
+ import: "./dist/context.js",
19827
+ default: "./dist/context.js"
19828
+ },
19829
+ "./object-types": {
19830
+ types: "./dist/object-types.d.ts",
19831
+ import: "./dist/object-types.js",
19832
+ default: "./dist/object-types.js"
19833
+ },
19834
+ "./schemas/json/sockethub-config.json": {
19835
+ default: "./dist/schemas/json/sockethub-config.json"
19836
+ }
19837
+ },
19838
+ files: [
19839
+ "dist/"
19840
+ ],
19841
+ engines: {
19842
+ node: ">=20"
19843
+ },
19844
+ keywords: [
19845
+ "sockethub",
19846
+ "sockethub schema",
19847
+ "activity streams",
19848
+ "activity objects",
19849
+ "sockethub platforms"
19850
+ ],
19851
+ repository: {
19852
+ type: "git",
19853
+ url: "git+https://github.com/sockethub/sockethub.git",
19854
+ directory: "packages/schemas"
19855
+ },
19856
+ homepage: "https://github.com/sockethub/sockethub/tree/master/packages/schemas",
19857
+ devDependencies: {
19858
+ "@types/bun": "latest"
19859
+ },
19860
+ scripts: {
19861
+ build: "bun ./scripts/export-json-schema.ts && bun ./scripts/export-canonical-assets.ts && bun build src/index.ts src/object-types.ts --outdir dist --target node --format esm --sourcemap=external && bun build src/context.ts src/activity-stream-helper.ts --outdir dist --target browser --format esm --sourcemap=external",
19862
+ clean: "rm -rf dist",
19863
+ "clean:deps": "rm -rf node_modules"
19864
+ },
19865
+ dependencies: {
19866
+ ajv: "^8.17.1",
19867
+ "ajv-formats": "^2.1.1",
19868
+ "ajv-formats-draft2019": "^1.6.1"
19869
+ },
19870
+ gitHead: "1a1a01ffe7b9d356aacfc4ae583d553e5df6f97d",
19871
+ types: "./dist/index.d.ts"
19872
+ };
19873
+ });
19874
+
19875
+ // ../schemas/src/schema-id.ts
19876
+ function versionedSchemaId(id, version) {
19877
+ return id.replace("/v/", `/${version}/`);
19878
+ }
19879
+
19803
19880
  // ../schemas/src/schemas/sockethub-config.ts
19804
- var SockethubConfigSchema;
19881
+ var SockethubConfigSchema, SockethubConfigSchemaId;
19805
19882
  var init_sockethub_config = __esm(() => {
19883
+ init_package();
19806
19884
  SockethubConfigSchema = {
19807
19885
  $id: "https://sockethub.org/schemas/v/sockethub-config.json",
19808
19886
  description: "Sockethub Config Schema",
@@ -19815,11 +19893,13 @@ var init_sockethub_config = __esm(() => {
19815
19893
  },
19816
19894
  examples: {
19817
19895
  type: "boolean",
19818
- default: true
19896
+ default: true,
19897
+ description: "Enable the examples pages served at [host]:[port]/examples"
19819
19898
  },
19820
19899
  info: {
19821
19900
  type: "boolean",
19822
- default: false
19901
+ default: false,
19902
+ description: "Display Sockethub runtime information"
19823
19903
  },
19824
19904
  logging: {
19825
19905
  type: "object",
@@ -19846,6 +19926,7 @@ var init_sockethub_config = __esm(() => {
19846
19926
  items: {
19847
19927
  type: "string"
19848
19928
  },
19929
+ description: "Platform packages to load",
19849
19930
  default: [
19850
19931
  "@sockethub/platform-dummy",
19851
19932
  "@sockethub/platform-feeds",
@@ -19856,6 +19937,8 @@ var init_sockethub_config = __esm(() => {
19856
19937
  },
19857
19938
  packageConfig: {
19858
19939
  type: "object",
19940
+ default: {},
19941
+ description: "Per-platform config keyed by package name, validated against " + "each platform's config schema and forwarded to its child process",
19859
19942
  properties: {
19860
19943
  "@sockethub/platform-dummy": {
19861
19944
  type: "object",
@@ -19965,7 +20048,8 @@ var init_sockethub_config = __esm(() => {
19965
20048
  maxConnectionsPerIp: {
19966
20049
  type: "number",
19967
20050
  minimum: 0,
19968
- default: 0
20051
+ default: 0,
20052
+ description: "Maximum concurrent socket connections per client IP. " + "The per-event rate limiter is keyed by socket id, so " + "without a connection cap a client can bypass it by " + "opening more sockets. 0 disables the cap."
19969
20053
  }
19970
20054
  }
19971
20055
  },
@@ -19976,7 +20060,8 @@ var init_sockethub_config = __esm(() => {
19976
20060
  maxPlatformInstances: {
19977
20061
  type: "number",
19978
20062
  minimum: 0,
19979
- default: 0
20063
+ default: 0,
20064
+ description: "Upper bound on concurrently running platform instances " + "(child processes). Each persistent-platform actor forks " + "its own process, so an unbounded count is a resource " + "exhaustion risk on public instances. 0 disables the cap."
19980
20065
  }
19981
20066
  }
19982
20067
  },
@@ -20041,7 +20126,8 @@ var init_sockethub_config = __esm(() => {
20041
20126
  properties: {
20042
20127
  origin: {
20043
20128
  type: "string",
20044
- default: "*"
20129
+ default: "*",
20130
+ description: "Allowed CORS origin(s) for socket.io connections " + "and the HTTP actions endpoint. '*' allows any " + "website to connect visitors' browsers to this " + "instance; public deployments should set an " + "explicit origin or comma-separated list of " + "origins."
20045
20131
  }
20046
20132
  }
20047
20133
  }
@@ -20053,7 +20139,8 @@ var init_sockethub_config = __esm(() => {
20053
20139
  properties: {
20054
20140
  enabled: {
20055
20141
  type: "boolean",
20056
- default: false
20142
+ default: false,
20143
+ description: "Enable the HTTP actions endpoint"
20057
20144
  },
20058
20145
  path: {
20059
20146
  type: "string",
@@ -20106,6 +20193,7 @@ var init_sockethub_config = __esm(() => {
20106
20193
  }
20107
20194
  }
20108
20195
  };
20196
+ SockethubConfigSchemaId = versionedSchemaId(SockethubConfigSchema.$id, package_default.version);
20109
20197
  });
20110
20198
 
20111
20199
  // ../../node_modules/ajv/dist/compile/codegen/code.js
@@ -69637,6 +69725,184 @@ var require_main = __commonJS((exports, module) => {
69637
69725
  module.exports = convict;
69638
69726
  });
69639
69727
 
69728
+ // src/config-schema.ts
69729
+ function isLeaf(node, overlay) {
69730
+ if (overlay?.leaf) {
69731
+ return true;
69732
+ }
69733
+ return !(node.type === "object" && node.properties);
69734
+ }
69735
+ function hasDefault(node, overlay) {
69736
+ return Object.hasOwn(node, "default") || overlay !== undefined && Object.hasOwn(overlay, "default");
69737
+ }
69738
+ function defaultOf(node, overlay) {
69739
+ const value = Object.hasOwn(node, "default") ? node.default : overlay?.default;
69740
+ return value !== null && typeof value === "object" ? structuredClone(value) : value;
69741
+ }
69742
+ function convictFormat(node, path, overlay) {
69743
+ if (overlay?.format !== undefined) {
69744
+ return overlay.format;
69745
+ }
69746
+ if (Array.isArray(node.enum)) {
69747
+ return [...node.enum];
69748
+ }
69749
+ if (Array.isArray(node.type)) {
69750
+ return "*";
69751
+ }
69752
+ switch (node.type) {
69753
+ case "boolean":
69754
+ return Boolean;
69755
+ case "string":
69756
+ return String;
69757
+ case "number":
69758
+ case "integer":
69759
+ return Number;
69760
+ case "array":
69761
+ return Array;
69762
+ case "object":
69763
+ return Object;
69764
+ default:
69765
+ throw new Error(`config schema: unsupported type "${node.type}" at "${path}"`);
69766
+ }
69767
+ }
69768
+ function buildDefinition(node, overlays, consumed, prefix = "") {
69769
+ const definition = {};
69770
+ for (const [key, child] of Object.entries(node.properties ?? {})) {
69771
+ const path = prefix ? `${prefix}.${key}` : key;
69772
+ const overlay = overlays[path];
69773
+ if (overlay) {
69774
+ consumed.add(path);
69775
+ }
69776
+ if (!isLeaf(child, overlay)) {
69777
+ definition[key] = buildDefinition(child, overlays, consumed, path);
69778
+ continue;
69779
+ }
69780
+ if (!hasDefault(child, overlay)) {
69781
+ throw new Error(`config schema: no default declared for "${path}" in the ` + "JSON schema or its overlay entry");
69782
+ }
69783
+ const leaf = {
69784
+ format: convictFormat(child, path, overlay),
69785
+ default: defaultOf(child, overlay)
69786
+ };
69787
+ if (child.description) {
69788
+ leaf.doc = child.description;
69789
+ }
69790
+ if (overlay?.env) {
69791
+ leaf.env = overlay.env;
69792
+ }
69793
+ if (overlay?.arg) {
69794
+ leaf.arg = overlay.arg;
69795
+ }
69796
+ definition[key] = leaf;
69797
+ }
69798
+ return definition;
69799
+ }
69800
+ function buildConvictDefinition(jsonSchema, overlays) {
69801
+ const consumed = new Set;
69802
+ const definition = buildDefinition(jsonSchema, overlays, consumed);
69803
+ const unknown = Object.keys(overlays).filter((path) => !consumed.has(path));
69804
+ if (unknown.length > 0) {
69805
+ throw new Error("config schema: overlay entries reference paths missing from " + `the JSON schema: ${unknown.join(", ")}`);
69806
+ }
69807
+ return definition;
69808
+ }
69809
+ function buildSchema() {
69810
+ return import_convict.default(buildConvictDefinition(SockethubConfigSchema, OVERLAY));
69811
+ }
69812
+ var import_convict, OVERLAY, EMPTY_ENV_IS_UNSET_VARS;
69813
+ var init_config_schema = __esm(() => {
69814
+ init_src2();
69815
+ import_convict = __toESM(require_main(), 1);
69816
+ OVERLAY = {
69817
+ $schema: { default: "" },
69818
+ examples: { arg: "examples" },
69819
+ info: { arg: "info" },
69820
+ "logging.level": { env: "LOG_LEVEL", emptyEnvIsUnset: true },
69821
+ "logging.fileLevel": { env: "LOG_FILE_LEVEL", emptyEnvIsUnset: true },
69822
+ "logging.file": { env: "LOG_FILE", emptyEnvIsUnset: true },
69823
+ packageConfig: { leaf: true, format: Object },
69824
+ "public.port": { format: "port" },
69825
+ "rateLimiter.windowMs": { format: "nat" },
69826
+ "rateLimiter.maxRequests": { format: "nat" },
69827
+ "rateLimiter.blockDurationMs": { format: "nat" },
69828
+ "rateLimiter.maxConnectionsPerIp": { format: "nat" },
69829
+ "limits.maxPlatformInstances": { format: "nat" },
69830
+ "credentials.ttlMs": {
69831
+ format: "nat",
69832
+ env: "SOCKETHUB_CREDENTIALS_TTL_MS",
69833
+ emptyEnvIsUnset: true
69834
+ },
69835
+ "redis.url": {
69836
+ env: "REDIS_URL",
69837
+ emptyEnvIsUnset: true,
69838
+ arg: "redis.url"
69839
+ },
69840
+ "redis.connectTimeout": { format: "nat" },
69841
+ "redis.disconnectTimeout": { format: "nat" },
69842
+ "redis.maxRetriesPerRequest": { format: "*" },
69843
+ "sentry.dsn": { arg: "sentry.dsn" },
69844
+ "sockethub.port": {
69845
+ format: "port",
69846
+ env: "PORT",
69847
+ emptyEnvIsUnset: true,
69848
+ arg: "port"
69849
+ },
69850
+ "sockethub.host": { env: "HOST", emptyEnvIsUnset: true, arg: "host" },
69851
+ "sockethub.cors.origin": {
69852
+ env: "SOCKETHUB_CORS_ORIGIN",
69853
+ arg: "cors.origin"
69854
+ },
69855
+ "httpActions.enabled": {
69856
+ env: "SOCKETHUB_HTTP_ACTIONS_ENABLED",
69857
+ emptyEnvIsUnset: true
69858
+ },
69859
+ "httpActions.path": {
69860
+ env: "SOCKETHUB_HTTP_ACTIONS_PATH",
69861
+ emptyEnvIsUnset: true
69862
+ },
69863
+ "httpActions.requireRequestId": {
69864
+ env: "SOCKETHUB_HTTP_ACTIONS_REQUIRE_REQUEST_ID",
69865
+ emptyEnvIsUnset: true
69866
+ },
69867
+ "httpActions.maxMessagesPerRequest": {
69868
+ format: "nat",
69869
+ env: "SOCKETHUB_HTTP_ACTIONS_MAX_MESSAGES_PER_REQUEST",
69870
+ emptyEnvIsUnset: true
69871
+ },
69872
+ "httpActions.maxPayloadBytes": {
69873
+ format: "nat",
69874
+ env: "SOCKETHUB_HTTP_ACTIONS_MAX_PAYLOAD_BYTES",
69875
+ emptyEnvIsUnset: true
69876
+ },
69877
+ "httpActions.idempotencyTtlMs": {
69878
+ format: "nat",
69879
+ env: "SOCKETHUB_HTTP_ACTIONS_IDEMPOTENCY_TTL_MS",
69880
+ emptyEnvIsUnset: true
69881
+ },
69882
+ "httpActions.requestTimeoutMs": {
69883
+ format: "nat",
69884
+ env: "SOCKETHUB_HTTP_ACTIONS_REQUEST_TIMEOUT_MS",
69885
+ emptyEnvIsUnset: true
69886
+ },
69887
+ "httpActions.idleTimeoutMs": {
69888
+ format: "nat",
69889
+ env: "SOCKETHUB_HTTP_ACTIONS_IDLE_TIMEOUT_MS",
69890
+ emptyEnvIsUnset: true
69891
+ },
69892
+ "platformHeartbeat.intervalMs": {
69893
+ format: "nat",
69894
+ env: "SOCKETHUB_PLATFORM_HEARTBEAT_INTERVAL_MS",
69895
+ emptyEnvIsUnset: true
69896
+ },
69897
+ "platformHeartbeat.timeoutMs": {
69898
+ format: "nat",
69899
+ env: "SOCKETHUB_PLATFORM_HEARTBEAT_TIMEOUT_MS",
69900
+ emptyEnvIsUnset: true
69901
+ }
69902
+ };
69903
+ EMPTY_ENV_IS_UNSET_VARS = Object.values(OVERLAY).filter((entry) => entry.emptyEnvIsUnset && entry.env).map((entry) => entry.env);
69904
+ });
69905
+
69640
69906
  // src/logger-core.ts
69641
69907
  function createWinstonLogger(namespace, options = {}) {
69642
69908
  const cfg = {
@@ -69681,197 +69947,6 @@ var init_logger_core = __esm(() => {
69681
69947
  // src/config.ts
69682
69948
  import fs from "node:fs";
69683
69949
  import path from "node:path";
69684
- function buildSchema() {
69685
- return import_convict.default({
69686
- $schema: { format: String, default: "" },
69687
- examples: {
69688
- doc: "Enable the examples pages served at [host]:[port]/examples",
69689
- format: Boolean,
69690
- default: true,
69691
- arg: "examples"
69692
- },
69693
- info: {
69694
- doc: "Display Sockethub runtime information",
69695
- format: Boolean,
69696
- default: false,
69697
- arg: "info"
69698
- },
69699
- logging: {
69700
- level: {
69701
- format: LOG_LEVELS,
69702
- default: "info",
69703
- env: "LOG_LEVEL"
69704
- },
69705
- fileLevel: {
69706
- format: LOG_LEVELS,
69707
- default: "debug",
69708
- env: "LOG_FILE_LEVEL"
69709
- },
69710
- file: {
69711
- format: String,
69712
- default: "sockethub.log",
69713
- env: "LOG_FILE"
69714
- }
69715
- },
69716
- platforms: {
69717
- doc: "Platform packages to load",
69718
- format: Array,
69719
- default: [
69720
- "@sockethub/platform-dummy",
69721
- "@sockethub/platform-feeds",
69722
- "@sockethub/platform-irc",
69723
- "@sockethub/platform-metadata",
69724
- "@sockethub/platform-xmpp"
69725
- ]
69726
- },
69727
- packageConfig: {
69728
- doc: "Per-platform config keyed by package name, validated against " + "each platform's config schema and forwarded to its child process",
69729
- format: Object,
69730
- default: {}
69731
- },
69732
- public: {
69733
- protocol: { format: String, default: "http" },
69734
- host: { format: String, default: "localhost" },
69735
- port: { format: "port", default: 10550 },
69736
- path: { format: String, default: "/" }
69737
- },
69738
- rateLimiter: {
69739
- windowMs: { format: "nat", default: 1000 },
69740
- maxRequests: { format: "nat", default: 100 },
69741
- blockDurationMs: { format: "nat", default: 5000 },
69742
- maxConnectionsPerIp: {
69743
- doc: "Maximum concurrent socket connections per client IP. " + "The per-event rate limiter is keyed by socket id, so " + "without a connection cap a client can bypass it by " + "opening more sockets. 0 disables the cap.",
69744
- format: "nat",
69745
- default: 0
69746
- }
69747
- },
69748
- limits: {
69749
- maxPlatformInstances: {
69750
- doc: "Upper bound on concurrently running platform instances " + "(child processes). Each persistent-platform actor forks " + "its own process, so an unbounded count is a resource " + "exhaustion risk on public instances. 0 disables the cap.",
69751
- format: "nat",
69752
- default: 0
69753
- }
69754
- },
69755
- credentials: {
69756
- ttlMs: {
69757
- doc: "Sliding TTL in milliseconds for per-session encrypted " + "credential keys in Redis, refreshed on every save and " + "read. A backstop against keys orphaned by crashes; " + "sessions normally delete their key on disconnect. " + "Size generously — idle sessions do not refresh it. " + "0 disables expiry.",
69758
- format: "nat",
69759
- default: 604800000,
69760
- env: "SOCKETHUB_CREDENTIALS_TTL_MS"
69761
- }
69762
- },
69763
- credentialCheck: {
69764
- reconnectIpSource: {
69765
- format: ["socket", "proxy"],
69766
- default: "socket"
69767
- },
69768
- proxyHeader: { format: String, default: "x-forwarded-for" }
69769
- },
69770
- redis: {
69771
- url: {
69772
- format: String,
69773
- default: "redis://127.0.0.1:6379",
69774
- env: "REDIS_URL",
69775
- arg: "redis.url"
69776
- },
69777
- connectTimeout: {
69778
- format: "nat",
69779
- default: 1e4,
69780
- doc: "Connection timeout in milliseconds"
69781
- },
69782
- disconnectTimeout: {
69783
- format: "nat",
69784
- default: 5000,
69785
- doc: "Disconnect timeout in milliseconds"
69786
- },
69787
- maxRetriesPerRequest: {
69788
- format: "*",
69789
- default: null
69790
- }
69791
- },
69792
- sentry: {
69793
- dsn: { format: String, default: "", arg: "sentry.dsn" },
69794
- traceSampleRate: { format: Number, default: 1 }
69795
- },
69796
- sockethub: {
69797
- port: {
69798
- format: "port",
69799
- default: 10550,
69800
- env: "PORT",
69801
- arg: "port"
69802
- },
69803
- host: {
69804
- format: String,
69805
- default: "localhost",
69806
- env: "HOST",
69807
- arg: "host"
69808
- },
69809
- path: { format: String, default: "/sockethub" },
69810
- cors: {
69811
- origin: {
69812
- doc: "Allowed CORS origin(s) for socket.io connections. " + "'*' allows any website to connect visitors' " + "browsers to this instance; public deployments " + "should set an explicit origin or comma-separated " + "list of origins.",
69813
- format: String,
69814
- default: "*"
69815
- }
69816
- }
69817
- },
69818
- httpActions: {
69819
- enabled: {
69820
- doc: "Enable the HTTP actions endpoint",
69821
- format: Boolean,
69822
- default: false,
69823
- env: "SOCKETHUB_HTTP_ACTIONS_ENABLED"
69824
- },
69825
- path: {
69826
- format: String,
69827
- default: "/sockethub-http",
69828
- env: "SOCKETHUB_HTTP_ACTIONS_PATH"
69829
- },
69830
- requireRequestId: {
69831
- format: Boolean,
69832
- default: true,
69833
- env: "SOCKETHUB_HTTP_ACTIONS_REQUIRE_REQUEST_ID"
69834
- },
69835
- maxMessagesPerRequest: {
69836
- format: "nat",
69837
- default: 20,
69838
- env: "SOCKETHUB_HTTP_ACTIONS_MAX_MESSAGES_PER_REQUEST"
69839
- },
69840
- maxPayloadBytes: {
69841
- format: "nat",
69842
- default: 262144,
69843
- env: "SOCKETHUB_HTTP_ACTIONS_MAX_PAYLOAD_BYTES"
69844
- },
69845
- idempotencyTtlMs: {
69846
- format: "nat",
69847
- default: 300000,
69848
- env: "SOCKETHUB_HTTP_ACTIONS_IDEMPOTENCY_TTL_MS"
69849
- },
69850
- requestTimeoutMs: {
69851
- format: "nat",
69852
- default: 30000,
69853
- env: "SOCKETHUB_HTTP_ACTIONS_REQUEST_TIMEOUT_MS"
69854
- },
69855
- idleTimeoutMs: {
69856
- format: "nat",
69857
- default: 15000,
69858
- env: "SOCKETHUB_HTTP_ACTIONS_IDLE_TIMEOUT_MS"
69859
- }
69860
- },
69861
- platformHeartbeat: {
69862
- intervalMs: {
69863
- format: "nat",
69864
- default: 5000,
69865
- env: "SOCKETHUB_PLATFORM_HEARTBEAT_INTERVAL_MS"
69866
- },
69867
- timeoutMs: {
69868
- format: "nat",
69869
- default: 15000,
69870
- env: "SOCKETHUB_PLATFORM_HEARTBEAT_TIMEOUT_MS"
69871
- }
69872
- }
69873
- });
69874
- }
69875
69950
  function resolveConfigFile() {
69876
69951
  const argv = process.argv.slice(2);
69877
69952
  for (let i = 0;i < argv.length; i++) {
@@ -69905,7 +69980,7 @@ class Config {
69905
69980
  level: "info"
69906
69981
  });
69907
69982
  this.log.debug("initializing config");
69908
- for (const name of MAPPED_ENV_VARS) {
69983
+ for (const name of EMPTY_ENV_IS_UNSET_VARS) {
69909
69984
  if (process.env[name] === "") {
69910
69985
  delete process.env[name];
69911
69986
  }
@@ -69934,31 +70009,11 @@ class Config {
69934
70009
  return this.conf.get(path2);
69935
70010
  };
69936
70011
  }
69937
- var import_convict, defaultConfig = "sockethub.config.json", MAPPED_ENV_VARS, LOG_LEVELS, config, config_default;
70012
+ var defaultConfig = "sockethub.config.json", config, config_default;
69938
70013
  var init_config = __esm(() => {
69939
70014
  init_src2();
70015
+ init_config_schema();
69940
70016
  init_logger_core();
69941
- import_convict = __toESM(require_main(), 1);
69942
- MAPPED_ENV_VARS = [
69943
- "HOST",
69944
- "PORT",
69945
- "REDIS_URL",
69946
- "LOG_LEVEL",
69947
- "LOG_FILE_LEVEL",
69948
- "LOG_FILE",
69949
- "SOCKETHUB_PLATFORM_HEARTBEAT_INTERVAL_MS",
69950
- "SOCKETHUB_PLATFORM_HEARTBEAT_TIMEOUT_MS",
69951
- "SOCKETHUB_HTTP_ACTIONS_ENABLED",
69952
- "SOCKETHUB_HTTP_ACTIONS_PATH",
69953
- "SOCKETHUB_HTTP_ACTIONS_REQUIRE_REQUEST_ID",
69954
- "SOCKETHUB_HTTP_ACTIONS_MAX_MESSAGES_PER_REQUEST",
69955
- "SOCKETHUB_HTTP_ACTIONS_MAX_PAYLOAD_BYTES",
69956
- "SOCKETHUB_HTTP_ACTIONS_IDEMPOTENCY_TTL_MS",
69957
- "SOCKETHUB_HTTP_ACTIONS_REQUEST_TIMEOUT_MS",
69958
- "SOCKETHUB_HTTP_ACTIONS_IDLE_TIMEOUT_MS",
69959
- "SOCKETHUB_CREDENTIALS_TTL_MS"
69960
- ];
69961
- LOG_LEVELS = ["error", "warn", "info", "debug"];
69962
70017
  config = new Config;
69963
70018
  config_default = config;
69964
70019
  });
@@ -103001,7 +103056,7 @@ function isPromiseLike(value) {
103001
103056
  function shouldIgnoreSpan2(spanName, ignoreSpanTypes) {
103002
103057
  return ignoreSpanTypes.some((pattern) => typeof pattern === "string" ? pattern === spanName : pattern.test(spanName));
103003
103058
  }
103004
- var import_api17, import_instrumentation9, import_api18, package_default, majorVersion, GLOBAL_INSTRUMENTATION_KEY = "PRISMA_INSTRUMENTATION", GLOBAL_VERSIONED_INSTRUMENTATION_KEY, globalThisWithPrismaInstrumentation, showAllTraces, nonSampledTraceParent = `00-10-10-00`, ActiveTracingHelper = class {
103059
+ var import_api17, import_instrumentation9, import_api18, package_default2, majorVersion, GLOBAL_INSTRUMENTATION_KEY = "PRISMA_INSTRUMENTATION", GLOBAL_VERSIONED_INSTRUMENTATION_KEY, globalThisWithPrismaInstrumentation, showAllTraces, nonSampledTraceParent = `00-10-10-00`, ActiveTracingHelper = class {
103005
103060
  tracerProvider;
103006
103061
  ignoreSpanTypes;
103007
103062
  constructor({ tracerProvider, ignoreSpanTypes }) {
@@ -103048,12 +103103,12 @@ var import_api17, import_instrumentation9, import_api18, package_default, majorV
103048
103103
  }
103049
103104
  return tracer.startActiveSpan(name, options, (span) => endSpan2(span, callback(span, context10)));
103050
103105
  }
103051
- }, package_default2, VERSION, NAME, MODULE_NAME = "@prisma/client", PrismaInstrumentation;
103106
+ }, package_default22, VERSION, NAME, MODULE_NAME = "@prisma/client", PrismaInstrumentation;
103052
103107
  var init_dist = __esm(() => {
103053
103108
  import_api17 = __toESM(require_src4(), 1);
103054
103109
  import_instrumentation9 = __toESM(require_src28(), 1);
103055
103110
  import_api18 = __toESM(require_src4(), 1);
103056
- package_default = {
103111
+ package_default2 = {
103057
103112
  name: "@prisma/instrumentation-contract",
103058
103113
  version: "7.2.0",
103059
103114
  description: "Shared types and utilities for Prisma instrumentation",
@@ -103097,11 +103152,11 @@ var init_dist = __esm(() => {
103097
103152
  "@opentelemetry/api": "^1.8"
103098
103153
  }
103099
103154
  };
103100
- majorVersion = package_default.version.split(".")[0];
103155
+ majorVersion = package_default2.version.split(".")[0];
103101
103156
  GLOBAL_VERSIONED_INSTRUMENTATION_KEY = `V${majorVersion}_PRISMA_INSTRUMENTATION`;
103102
103157
  globalThisWithPrismaInstrumentation = globalThis;
103103
103158
  showAllTraces = process.env.PRISMA_SHOW_ALL_TRACES === "true";
103104
- package_default2 = {
103159
+ package_default22 = {
103105
103160
  name: "@prisma/instrumentation",
103106
103161
  version: "7.2.0",
103107
103162
  description: "OpenTelemetry compliant instrumentation for Prisma Client",
@@ -103157,8 +103212,8 @@ var init_dist = __esm(() => {
103157
103212
  },
103158
103213
  sideEffects: false
103159
103214
  };
103160
- VERSION = package_default2.version;
103161
- NAME = package_default2.name;
103215
+ VERSION = package_default22.version;
103216
+ NAME = package_default22.name;
103162
103217
  PrismaInstrumentation = class extends import_instrumentation9.InstrumentationBase {
103163
103218
  tracerProvider;
103164
103219
  constructor(config2 = {}) {
@@ -128439,4 +128494,4 @@ export {
128439
128494
  derivePlatformCredentialsSecret
128440
128495
  };
128441
128496
 
128442
- //# debugId=D04C26E0AE9C534764756E2164756E21
128497
+ //# debugId=D2C58EBF7939E3F364756E2164756E21