@sockethub/schemas 3.0.0-alpha.15 → 3.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.
- package/dist/index.d.ts +2 -2
- package/dist/index.js +91 -7
- package/dist/index.js.map +5 -4
- package/dist/maps/context-map.json +2 -2
- package/dist/schema-id.d.ts +11 -0
- package/dist/schemas/json/activity-stream.json +243 -0
- package/dist/schemas/json/platform.json +52 -0
- package/dist/schemas/json/sockethub-config.json +349 -0
- package/dist/schemas/sockethub-config.d.ts +16 -0
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { AS2_BASE_CONTEXT_URL, buildCanonicalContext, ERROR_PLATFORM_CONTEXT_URL
|
|
|
2
2
|
import { InternalObjectTypesList, ObjectTypesList, ObjectTypesSchema } from "./helpers/objects.js";
|
|
3
3
|
import { ActivityStreamSchema } from "./schemas/activity-stream.js";
|
|
4
4
|
import { PlatformSchema } from "./schemas/platform.js";
|
|
5
|
-
import { SockethubConfigSchema } from "./schemas/sockethub-config.js";
|
|
5
|
+
import { SockethubConfigSchema, SockethubConfigSchemaId } from "./schemas/sockethub-config.js";
|
|
6
6
|
import { addPlatformContext, addPlatformSchema, getPlatformSchema, registerSystemPlatformContexts, resolvePlatformId, setValidationErrorOptions, validateActivityStream, validateActivityStreamResponse, validateCredentials, validatePlatformSchema, validateSockethubConfig } from "./validator.js";
|
|
7
7
|
export { normalizeActivityStream } from "./activity-stream-helper.js";
|
|
8
|
-
export { AS2_BASE_CONTEXT_URL, SOCKETHUB_BASE_CONTEXT_URL, PLATFORM_CONTEXT_PREFIX, ERROR_PLATFORM_ID, ERROR_PLATFORM_CONTEXT_URL, INTERNAL_PLATFORM_ID, INTERNAL_PLATFORM_CONTEXT_URL, buildCanonicalContext, platformIdFromContext, addPlatformContext, addPlatformSchema, getPlatformSchema, resolvePlatformId, registerSystemPlatformContexts, validatePlatformSchema, validateCredentials, validateActivityStream, validateActivityStreamResponse, validateSockethubConfig, setValidationErrorOptions, PlatformSchema, ActivityStreamSchema, SockethubConfigSchema, ObjectTypesList, ObjectTypesSchema, InternalObjectTypesList, };
|
|
8
|
+
export { AS2_BASE_CONTEXT_URL, SOCKETHUB_BASE_CONTEXT_URL, PLATFORM_CONTEXT_PREFIX, ERROR_PLATFORM_ID, ERROR_PLATFORM_CONTEXT_URL, INTERNAL_PLATFORM_ID, INTERNAL_PLATFORM_CONTEXT_URL, buildCanonicalContext, platformIdFromContext, addPlatformContext, addPlatformSchema, getPlatformSchema, resolvePlatformId, registerSystemPlatformContexts, validatePlatformSchema, validateCredentials, validateActivityStream, validateActivityStreamResponse, validateSockethubConfig, setValidationErrorOptions, PlatformSchema, ActivityStreamSchema, SockethubConfigSchema, SockethubConfigSchemaId, ObjectTypesList, ObjectTypesSchema, InternalObjectTypesList, };
|
|
9
9
|
export * from "./types.js";
|
package/dist/index.js
CHANGED
|
@@ -16069,6 +16069,79 @@ var PlatformSchema = {
|
|
|
16069
16069
|
}
|
|
16070
16070
|
}
|
|
16071
16071
|
};
|
|
16072
|
+
// package.json
|
|
16073
|
+
var package_default = {
|
|
16074
|
+
name: "@sockethub/schemas",
|
|
16075
|
+
description: "JSON schema files for validating Sockethub Activity Streams",
|
|
16076
|
+
version: "3.0.0-alpha.16",
|
|
16077
|
+
type: "module",
|
|
16078
|
+
private: false,
|
|
16079
|
+
author: "Nick Jennings <nick@silverbucket.net>",
|
|
16080
|
+
license: "MIT",
|
|
16081
|
+
publishConfig: {
|
|
16082
|
+
access: "public"
|
|
16083
|
+
},
|
|
16084
|
+
main: "dist/index.js",
|
|
16085
|
+
exports: {
|
|
16086
|
+
".": {
|
|
16087
|
+
types: "./dist/index.d.ts",
|
|
16088
|
+
import: "./dist/index.js",
|
|
16089
|
+
default: "./dist/index.js"
|
|
16090
|
+
},
|
|
16091
|
+
"./context": {
|
|
16092
|
+
types: "./dist/context.d.ts",
|
|
16093
|
+
import: "./dist/context.js",
|
|
16094
|
+
default: "./dist/context.js"
|
|
16095
|
+
},
|
|
16096
|
+
"./object-types": {
|
|
16097
|
+
types: "./dist/object-types.d.ts",
|
|
16098
|
+
import: "./dist/object-types.js",
|
|
16099
|
+
default: "./dist/object-types.js"
|
|
16100
|
+
},
|
|
16101
|
+
"./schemas/json/sockethub-config.json": {
|
|
16102
|
+
default: "./dist/schemas/json/sockethub-config.json"
|
|
16103
|
+
}
|
|
16104
|
+
},
|
|
16105
|
+
files: [
|
|
16106
|
+
"dist/"
|
|
16107
|
+
],
|
|
16108
|
+
engines: {
|
|
16109
|
+
node: ">=20"
|
|
16110
|
+
},
|
|
16111
|
+
keywords: [
|
|
16112
|
+
"sockethub",
|
|
16113
|
+
"sockethub schema",
|
|
16114
|
+
"activity streams",
|
|
16115
|
+
"activity objects",
|
|
16116
|
+
"sockethub platforms"
|
|
16117
|
+
],
|
|
16118
|
+
repository: {
|
|
16119
|
+
type: "git",
|
|
16120
|
+
url: "git+https://github.com/sockethub/sockethub.git",
|
|
16121
|
+
directory: "packages/schemas"
|
|
16122
|
+
},
|
|
16123
|
+
homepage: "https://github.com/sockethub/sockethub/tree/master/packages/schemas",
|
|
16124
|
+
devDependencies: {
|
|
16125
|
+
"@types/bun": "latest"
|
|
16126
|
+
},
|
|
16127
|
+
scripts: {
|
|
16128
|
+
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",
|
|
16129
|
+
clean: "rm -rf dist",
|
|
16130
|
+
"clean:deps": "rm -rf node_modules"
|
|
16131
|
+
},
|
|
16132
|
+
dependencies: {
|
|
16133
|
+
ajv: "^8.17.1",
|
|
16134
|
+
"ajv-formats": "^2.1.1",
|
|
16135
|
+
"ajv-formats-draft2019": "^1.6.1"
|
|
16136
|
+
},
|
|
16137
|
+
gitHead: "1a1a01ffe7b9d356aacfc4ae583d553e5df6f97d",
|
|
16138
|
+
types: "./dist/index.d.ts"
|
|
16139
|
+
};
|
|
16140
|
+
|
|
16141
|
+
// src/schema-id.ts
|
|
16142
|
+
function versionedSchemaId(id, version) {
|
|
16143
|
+
return id.replace("/v/", `/${version}/`);
|
|
16144
|
+
}
|
|
16072
16145
|
|
|
16073
16146
|
// src/schemas/sockethub-config.ts
|
|
16074
16147
|
var SockethubConfigSchema = {
|
|
@@ -16083,11 +16156,13 @@ var SockethubConfigSchema = {
|
|
|
16083
16156
|
},
|
|
16084
16157
|
examples: {
|
|
16085
16158
|
type: "boolean",
|
|
16086
|
-
default: true
|
|
16159
|
+
default: true,
|
|
16160
|
+
description: "Enable the examples pages served at [host]:[port]/examples"
|
|
16087
16161
|
},
|
|
16088
16162
|
info: {
|
|
16089
16163
|
type: "boolean",
|
|
16090
|
-
default: false
|
|
16164
|
+
default: false,
|
|
16165
|
+
description: "Display Sockethub runtime information"
|
|
16091
16166
|
},
|
|
16092
16167
|
logging: {
|
|
16093
16168
|
type: "object",
|
|
@@ -16114,6 +16189,7 @@ var SockethubConfigSchema = {
|
|
|
16114
16189
|
items: {
|
|
16115
16190
|
type: "string"
|
|
16116
16191
|
},
|
|
16192
|
+
description: "Platform packages to load",
|
|
16117
16193
|
default: [
|
|
16118
16194
|
"@sockethub/platform-dummy",
|
|
16119
16195
|
"@sockethub/platform-feeds",
|
|
@@ -16124,6 +16200,8 @@ var SockethubConfigSchema = {
|
|
|
16124
16200
|
},
|
|
16125
16201
|
packageConfig: {
|
|
16126
16202
|
type: "object",
|
|
16203
|
+
default: {},
|
|
16204
|
+
description: "Per-platform config keyed by package name, validated against " + "each platform's config schema and forwarded to its child process",
|
|
16127
16205
|
properties: {
|
|
16128
16206
|
"@sockethub/platform-dummy": {
|
|
16129
16207
|
type: "object",
|
|
@@ -16233,7 +16311,8 @@ var SockethubConfigSchema = {
|
|
|
16233
16311
|
maxConnectionsPerIp: {
|
|
16234
16312
|
type: "number",
|
|
16235
16313
|
minimum: 0,
|
|
16236
|
-
default: 0
|
|
16314
|
+
default: 0,
|
|
16315
|
+
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."
|
|
16237
16316
|
}
|
|
16238
16317
|
}
|
|
16239
16318
|
},
|
|
@@ -16244,7 +16323,8 @@ var SockethubConfigSchema = {
|
|
|
16244
16323
|
maxPlatformInstances: {
|
|
16245
16324
|
type: "number",
|
|
16246
16325
|
minimum: 0,
|
|
16247
|
-
default: 0
|
|
16326
|
+
default: 0,
|
|
16327
|
+
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."
|
|
16248
16328
|
}
|
|
16249
16329
|
}
|
|
16250
16330
|
},
|
|
@@ -16309,7 +16389,8 @@ var SockethubConfigSchema = {
|
|
|
16309
16389
|
properties: {
|
|
16310
16390
|
origin: {
|
|
16311
16391
|
type: "string",
|
|
16312
|
-
default: "*"
|
|
16392
|
+
default: "*",
|
|
16393
|
+
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."
|
|
16313
16394
|
}
|
|
16314
16395
|
}
|
|
16315
16396
|
}
|
|
@@ -16321,7 +16402,8 @@ var SockethubConfigSchema = {
|
|
|
16321
16402
|
properties: {
|
|
16322
16403
|
enabled: {
|
|
16323
16404
|
type: "boolean",
|
|
16324
|
-
default: false
|
|
16405
|
+
default: false,
|
|
16406
|
+
description: "Enable the HTTP actions endpoint"
|
|
16325
16407
|
},
|
|
16326
16408
|
path: {
|
|
16327
16409
|
type: "string",
|
|
@@ -16374,6 +16456,7 @@ var SockethubConfigSchema = {
|
|
|
16374
16456
|
}
|
|
16375
16457
|
}
|
|
16376
16458
|
};
|
|
16459
|
+
var SockethubConfigSchemaId = versionedSchemaId(SockethubConfigSchema.$id, package_default.version);
|
|
16377
16460
|
|
|
16378
16461
|
// src/validator.ts
|
|
16379
16462
|
var import_ajv = __toESM(require_ajv(), 1);
|
|
@@ -16678,6 +16761,7 @@ export {
|
|
|
16678
16761
|
buildCanonicalContext,
|
|
16679
16762
|
addPlatformSchema,
|
|
16680
16763
|
addPlatformContext,
|
|
16764
|
+
SockethubConfigSchemaId,
|
|
16681
16765
|
SockethubConfigSchema,
|
|
16682
16766
|
SOCKETHUB_BASE_CONTEXT_URL,
|
|
16683
16767
|
PlatformSchema,
|
|
@@ -16693,4 +16777,4 @@ export {
|
|
|
16693
16777
|
AS2_BASE_CONTEXT_URL
|
|
16694
16778
|
};
|
|
16695
16779
|
|
|
16696
|
-
//# debugId=
|
|
16780
|
+
//# debugId=C131DD6FE281379664756E2164756E21
|