@sockethub/schemas 3.0.0-alpha.15 → 3.0.0-alpha.17
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/contexts/platform/caldav/v1.jsonld +8 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +102 -7
- package/dist/index.js.map +5 -4
- package/dist/maps/context-map.json +5 -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 +370 -0
- package/dist/schemas/platform/caldav/v1/credentials.schema.json +71 -0
- package/dist/schemas/platform/caldav/v1/messages.schema.json +743 -0
- package/dist/schemas/sockethub-config.d.ts +36 -0
- package/dist/types.d.ts +2 -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.17",
|
|
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: "578a6432b9f09a8484832a7ff3e157c1d3898a7e",
|
|
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,7 +16189,9 @@ var SockethubConfigSchema = {
|
|
|
16114
16189
|
items: {
|
|
16115
16190
|
type: "string"
|
|
16116
16191
|
},
|
|
16192
|
+
description: "Platform packages to load",
|
|
16117
16193
|
default: [
|
|
16194
|
+
"@sockethub/platform-caldav",
|
|
16118
16195
|
"@sockethub/platform-dummy",
|
|
16119
16196
|
"@sockethub/platform-feeds",
|
|
16120
16197
|
"@sockethub/platform-irc",
|
|
@@ -16124,7 +16201,19 @@ var SockethubConfigSchema = {
|
|
|
16124
16201
|
},
|
|
16125
16202
|
packageConfig: {
|
|
16126
16203
|
type: "object",
|
|
16204
|
+
default: {},
|
|
16205
|
+
description: "Per-platform config keyed by package name, validated against " + "each platform's config schema and forwarded to its child process",
|
|
16127
16206
|
properties: {
|
|
16207
|
+
"@sockethub/platform-caldav": {
|
|
16208
|
+
type: "object",
|
|
16209
|
+
additionalProperties: false,
|
|
16210
|
+
properties: {
|
|
16211
|
+
connectTimeoutMs: { type: "integer", minimum: 1 },
|
|
16212
|
+
allowPrivateAddresses: { type: "boolean" },
|
|
16213
|
+
allowInsecureHttp: { type: "boolean" },
|
|
16214
|
+
concurrency: { type: "integer", minimum: 1 }
|
|
16215
|
+
}
|
|
16216
|
+
},
|
|
16128
16217
|
"@sockethub/platform-dummy": {
|
|
16129
16218
|
type: "object",
|
|
16130
16219
|
additionalProperties: false,
|
|
@@ -16233,7 +16322,8 @@ var SockethubConfigSchema = {
|
|
|
16233
16322
|
maxConnectionsPerIp: {
|
|
16234
16323
|
type: "number",
|
|
16235
16324
|
minimum: 0,
|
|
16236
|
-
default: 0
|
|
16325
|
+
default: 0,
|
|
16326
|
+
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
16327
|
}
|
|
16238
16328
|
}
|
|
16239
16329
|
},
|
|
@@ -16244,7 +16334,8 @@ var SockethubConfigSchema = {
|
|
|
16244
16334
|
maxPlatformInstances: {
|
|
16245
16335
|
type: "number",
|
|
16246
16336
|
minimum: 0,
|
|
16247
|
-
default: 0
|
|
16337
|
+
default: 0,
|
|
16338
|
+
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
16339
|
}
|
|
16249
16340
|
}
|
|
16250
16341
|
},
|
|
@@ -16309,7 +16400,8 @@ var SockethubConfigSchema = {
|
|
|
16309
16400
|
properties: {
|
|
16310
16401
|
origin: {
|
|
16311
16402
|
type: "string",
|
|
16312
|
-
default: "*"
|
|
16403
|
+
default: "*",
|
|
16404
|
+
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
16405
|
}
|
|
16314
16406
|
}
|
|
16315
16407
|
}
|
|
@@ -16321,7 +16413,8 @@ var SockethubConfigSchema = {
|
|
|
16321
16413
|
properties: {
|
|
16322
16414
|
enabled: {
|
|
16323
16415
|
type: "boolean",
|
|
16324
|
-
default: false
|
|
16416
|
+
default: false,
|
|
16417
|
+
description: "Enable the HTTP actions endpoint"
|
|
16325
16418
|
},
|
|
16326
16419
|
path: {
|
|
16327
16420
|
type: "string",
|
|
@@ -16374,6 +16467,7 @@ var SockethubConfigSchema = {
|
|
|
16374
16467
|
}
|
|
16375
16468
|
}
|
|
16376
16469
|
};
|
|
16470
|
+
var SockethubConfigSchemaId = versionedSchemaId(SockethubConfigSchema.$id, package_default.version);
|
|
16377
16471
|
|
|
16378
16472
|
// src/validator.ts
|
|
16379
16473
|
var import_ajv = __toESM(require_ajv(), 1);
|
|
@@ -16678,6 +16772,7 @@ export {
|
|
|
16678
16772
|
buildCanonicalContext,
|
|
16679
16773
|
addPlatformSchema,
|
|
16680
16774
|
addPlatformContext,
|
|
16775
|
+
SockethubConfigSchemaId,
|
|
16681
16776
|
SockethubConfigSchema,
|
|
16682
16777
|
SOCKETHUB_BASE_CONTEXT_URL,
|
|
16683
16778
|
PlatformSchema,
|
|
@@ -16693,4 +16788,4 @@ export {
|
|
|
16693
16788
|
AS2_BASE_CONTEXT_URL
|
|
16694
16789
|
};
|
|
16695
16790
|
|
|
16696
|
-
//# debugId=
|
|
16791
|
+
//# debugId=9DC1324BF99209E864756E2164756E21
|