@sockethub/platform-caldav 1.0.0-beta.0 → 1.0.0-beta.1
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/README.md +7 -3
- package/dist/index.js +70 -24
- package/dist/index.js.map +7 -7
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -8,9 +8,13 @@ subscription links, without a CalDAV account.
|
|
|
8
8
|
Requests accept only public HTTPS services by default. Administrators can opt
|
|
9
9
|
in to HTTP with `packageConfig.allowInsecureHttp` and private-network targets
|
|
10
10
|
with `packageConfig.allowPrivateAddresses`; these are server settings and
|
|
11
|
-
cannot be enabled by a connected client.
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
cannot be enabled by a connected client. Address checks use the shared
|
|
12
|
+
outbound URL guard, including IPv6 embeddings of private ranges and the
|
|
13
|
+
local-use NAT64 prefix `64:ff9b:1::/48`. See
|
|
14
|
+
[Outbound URL guard](../../docs/configuration.md#outbound-url-guard).
|
|
15
|
+
Credentials and OAuth tokens are sent only to the configured origin. Every
|
|
16
|
+
calendar and item target is checked against the authenticated account before
|
|
17
|
+
it is used.
|
|
14
18
|
|
|
15
19
|
## Authentication
|
|
16
20
|
|
package/dist/index.js
CHANGED
|
@@ -39408,7 +39408,7 @@ var ActivityStreamSchema = {
|
|
|
39408
39408
|
var package_default = {
|
|
39409
39409
|
name: "@sockethub/schemas",
|
|
39410
39410
|
description: "JSON schema files for validating Sockethub Activity Streams",
|
|
39411
|
-
version: "3.0.0-beta.
|
|
39411
|
+
version: "3.0.0-beta.1",
|
|
39412
39412
|
type: "module",
|
|
39413
39413
|
private: false,
|
|
39414
39414
|
author: "Nick Jennings <nick@silverbucket.net>",
|
|
@@ -39478,7 +39478,7 @@ var package_default = {
|
|
|
39478
39478
|
"ajv-formats": "^2.1.1",
|
|
39479
39479
|
"ajv-formats-draft2019": "^1.6.1"
|
|
39480
39480
|
},
|
|
39481
|
-
gitHead: "
|
|
39481
|
+
gitHead: "06c9062f1cb5f0c0599fd979e6e91da79f08eda0",
|
|
39482
39482
|
types: "./dist/index.d.ts"
|
|
39483
39483
|
};
|
|
39484
39484
|
|
|
@@ -39640,7 +39640,8 @@ var SockethubConfigSchema = {
|
|
|
39640
39640
|
type: "object",
|
|
39641
39641
|
additionalProperties: false,
|
|
39642
39642
|
properties: {
|
|
39643
|
-
connectTimeoutMs: { type: "number" }
|
|
39643
|
+
connectTimeoutMs: { type: "number" },
|
|
39644
|
+
allowPrivateAddresses: { type: "boolean" }
|
|
39644
39645
|
}
|
|
39645
39646
|
},
|
|
39646
39647
|
"@sockethub/platform-metadata": {
|
|
@@ -39730,11 +39731,23 @@ var SockethubConfigSchema = {
|
|
|
39730
39731
|
type: "object",
|
|
39731
39732
|
additionalProperties: false,
|
|
39732
39733
|
properties: {
|
|
39734
|
+
maxInstancesPerSession: {
|
|
39735
|
+
type: "integer",
|
|
39736
|
+
minimum: 0,
|
|
39737
|
+
default: 10,
|
|
39738
|
+
description: "Maximum persistent instances per socket session. 0 disables the cap."
|
|
39739
|
+
},
|
|
39740
|
+
maxInstancesPerIp: {
|
|
39741
|
+
type: "integer",
|
|
39742
|
+
minimum: 0,
|
|
39743
|
+
default: 20,
|
|
39744
|
+
description: "Maximum persistent instances per client IP, including HTTP actions. 0 disables the cap."
|
|
39745
|
+
},
|
|
39733
39746
|
maxPlatformInstances: {
|
|
39734
39747
|
type: "number",
|
|
39735
39748
|
minimum: 0,
|
|
39736
39749
|
default: 100,
|
|
39737
|
-
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."
|
|
39750
|
+
description: "Upper bound on concurrently running persistent 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."
|
|
39738
39751
|
}
|
|
39739
39752
|
}
|
|
39740
39753
|
},
|
|
@@ -39915,33 +39928,66 @@ var SockethubConfigSchema = {
|
|
|
39915
39928
|
};
|
|
39916
39929
|
var SockethubConfigSchemaId = versionedSchemaId(SockethubConfigSchema.$id, package_default.version);
|
|
39917
39930
|
|
|
39918
|
-
// ../schemas/src/
|
|
39919
|
-
var
|
|
39920
|
-
var
|
|
39931
|
+
// ../schemas/src/helpers/codegen.ts
|
|
39932
|
+
var available;
|
|
39933
|
+
var warned = false;
|
|
39934
|
+
function isCodegenAvailable() {
|
|
39935
|
+
if (available === undefined) {
|
|
39936
|
+
try {
|
|
39937
|
+
new Function("return true");
|
|
39938
|
+
available = true;
|
|
39939
|
+
} catch {
|
|
39940
|
+
available = false;
|
|
39941
|
+
}
|
|
39942
|
+
}
|
|
39943
|
+
return available;
|
|
39944
|
+
}
|
|
39945
|
+
function warnCodegenUnavailable() {
|
|
39946
|
+
if (warned) {
|
|
39947
|
+
return;
|
|
39948
|
+
}
|
|
39949
|
+
warned = true;
|
|
39950
|
+
console.warn("[@sockethub/schemas] Schema validation is disabled: this environment's Content Security Policy blocks `new Function`, which Ajv needs to compile schemas. The Sockethub server still validates every message.");
|
|
39951
|
+
}
|
|
39921
39952
|
|
|
39922
39953
|
// ../schemas/src/validator.ts
|
|
39923
|
-
var
|
|
39954
|
+
var import_ajv = __toESM(require_ajv(), 1);
|
|
39924
39955
|
var import_ajv_formats = __toESM(require_dist(), 1);
|
|
39925
39956
|
var import_ajv_formats_draft2019 = __toESM(require_ajv_formats_draft2019(), 1);
|
|
39926
|
-
var ajv2 = new import_ajv2.default({ strictTypes: false, allErrors: true });
|
|
39927
|
-
import_ajv_formats.default(ajv2);
|
|
39928
|
-
import_ajv_formats_draft2019.default(ajv2);
|
|
39929
39957
|
var schemaURL = "https://sockethub.org/schemas/v0";
|
|
39930
39958
|
var schemas = {};
|
|
39931
39959
|
var systemContextsRegistered = false;
|
|
39932
39960
|
schemas[`${schemaURL}/activity-stream`] = ActivityStreamSchema;
|
|
39933
|
-
|
|
39934
|
-
|
|
39961
|
+
var ajv;
|
|
39962
|
+
function getAjv() {
|
|
39963
|
+
if (!isCodegenAvailable()) {
|
|
39964
|
+
warnCodegenUnavailable();
|
|
39965
|
+
return;
|
|
39966
|
+
}
|
|
39967
|
+
if (!ajv) {
|
|
39968
|
+
const instance = new import_ajv.default({ strictTypes: false, allErrors: true });
|
|
39969
|
+
import_ajv_formats.default(instance);
|
|
39970
|
+
import_ajv_formats_draft2019.default(instance);
|
|
39971
|
+
for (const uri in schemas) {
|
|
39972
|
+
instance.addSchema(schemas[uri], uri);
|
|
39973
|
+
}
|
|
39974
|
+
ajv = instance;
|
|
39975
|
+
}
|
|
39976
|
+
return ajv;
|
|
39935
39977
|
}
|
|
39936
39978
|
function registerSystemContext(platformId, contextUrl) {
|
|
39937
39979
|
registerPlatformContext(platformId, contextUrl, `${schemaURL}/context/${platformId}/messages`, `${schemaURL}/context/${platformId}/credentials`);
|
|
39980
|
+
const instance = getAjv();
|
|
39981
|
+
if (!instance) {
|
|
39982
|
+
return;
|
|
39983
|
+
}
|
|
39938
39984
|
const messageSchemaRef = `${schemaURL}/context/${platformId}/messages`;
|
|
39939
|
-
if (!
|
|
39940
|
-
|
|
39985
|
+
if (!instance.getSchema(messageSchemaRef)) {
|
|
39986
|
+
instance.addSchema({}, messageSchemaRef);
|
|
39941
39987
|
}
|
|
39942
39988
|
const credentialsSchemaRef = `${schemaURL}/context/${platformId}/credentials`;
|
|
39943
|
-
if (!
|
|
39944
|
-
|
|
39989
|
+
if (!instance.getSchema(credentialsSchemaRef)) {
|
|
39990
|
+
instance.addSchema({}, credentialsSchemaRef);
|
|
39945
39991
|
}
|
|
39946
39992
|
}
|
|
39947
39993
|
function registerSystemPlatformContexts() {
|
|
@@ -68338,7 +68384,7 @@ END:VCALENDAR\r
|
|
|
68338
68384
|
var package_default2 = {
|
|
68339
68385
|
name: "@sockethub/platform-caldav",
|
|
68340
68386
|
description: "A Sockethub platform for synchronizing CalDAV calendars, events, and tasks",
|
|
68341
|
-
version: "1.0.0-beta.
|
|
68387
|
+
version: "1.0.0-beta.1",
|
|
68342
68388
|
type: "module",
|
|
68343
68389
|
private: false,
|
|
68344
68390
|
license: "LGPL-3.0+",
|
|
@@ -68372,16 +68418,16 @@ var package_default2 = {
|
|
|
68372
68418
|
test: "bun test src/"
|
|
68373
68419
|
},
|
|
68374
68420
|
dependencies: {
|
|
68375
|
-
"@sockethub/dav": "^1.0.0-beta.
|
|
68376
|
-
"@sockethub/schemas": "^3.0.0-beta.
|
|
68377
|
-
"@sockethub/util": "^1.0.0-beta.
|
|
68421
|
+
"@sockethub/dav": "^1.0.0-beta.1",
|
|
68422
|
+
"@sockethub/schemas": "^3.0.0-beta.1",
|
|
68423
|
+
"@sockethub/util": "^1.0.0-beta.1",
|
|
68378
68424
|
undici: "^7.30.0"
|
|
68379
68425
|
},
|
|
68380
68426
|
devDependencies: {
|
|
68381
68427
|
"@types/bun": "latest"
|
|
68382
68428
|
},
|
|
68383
68429
|
peerDependencies: {
|
|
68384
|
-
"@sockethub/server": "^5.0.0-beta.
|
|
68430
|
+
"@sockethub/server": "^5.0.0-beta.1"
|
|
68385
68431
|
},
|
|
68386
68432
|
peerDependenciesMeta: {
|
|
68387
68433
|
"@sockethub/server": {
|
|
@@ -68389,7 +68435,7 @@ var package_default2 = {
|
|
|
68389
68435
|
}
|
|
68390
68436
|
},
|
|
68391
68437
|
types: "./dist/index.d.ts",
|
|
68392
|
-
gitHead: "
|
|
68438
|
+
gitHead: "06c9062f1cb5f0c0599fd979e6e91da79f08eda0"
|
|
68393
68439
|
};
|
|
68394
68440
|
|
|
68395
68441
|
// src/schema.ts
|
|
@@ -69068,4 +69114,4 @@ export {
|
|
|
69068
69114
|
foldLine
|
|
69069
69115
|
};
|
|
69070
69116
|
|
|
69071
|
-
//# debugId=
|
|
69117
|
+
//# debugId=0A21E97D9B80118364756E2164756E21
|