@fedify/vocab 2.4.0-dev.1668 → 2.4.0-dev.1740
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/deno.json +1 -1
- package/dist/mod.cjs +4650 -1205
- package/dist/mod.d.cts +42 -0
- package/dist/mod.d.ts +42 -0
- package/dist/mod.js +4542 -1103
- package/dist-tests/{actor-DMHmbHBF.mjs → actor-Du_ra6Yk.mjs} +16 -9
- package/dist-tests/actor.test.mjs +15 -10
- package/dist-tests/lookup.test.mjs +4 -4
- package/dist-tests/type.test.mjs +2 -2
- package/dist-tests/{vocab-Bjwctrxn.mjs → vocab-CNiWKo57.mjs} +4542 -1103
- package/dist-tests/vocab.test.mjs +32 -2
- package/package.json +4 -4
- package/src/vocab.test.ts +36 -0
- /package/dist-tests/{type-_BlsfT3S.mjs → type-BMdjm4Eg.mjs} +0 -0
- /package/dist-tests/{utils-CQjrpUkt.mjs → utils-Df2odC27.mjs} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "temporal-polyfill";
|
|
2
2
|
globalThis.addEventListener = () => {};
|
|
3
|
-
import {
|
|
4
|
-
import { t as getTypeId } from "./type-
|
|
3
|
+
import { B as Service, J as __toESM, K as __commonJSMin, M as Person, a as Application, j as Organization, v as Group } from "./vocab-CNiWKo57.mjs";
|
|
4
|
+
import { t as getTypeId } from "./type-BMdjm4Eg.mjs";
|
|
5
5
|
import { lookupWebFinger } from "@fedify/webfinger";
|
|
6
6
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
7
7
|
import { domainToASCII, domainToUnicode } from "node:url";
|
|
@@ -110,27 +110,27 @@ function parse(input, loose) {
|
|
|
110
110
|
}
|
|
111
111
|
//#endregion
|
|
112
112
|
//#region ../../node_modules/.pnpm/fetch-mock@12.6.0/node_modules/fetch-mock/dist/esm/TypeDescriptor.js
|
|
113
|
-
const valueTypes = new Set([
|
|
113
|
+
const valueTypes = /* @__PURE__ */ new Set([
|
|
114
114
|
"boolean",
|
|
115
115
|
"number",
|
|
116
116
|
"null",
|
|
117
117
|
"string",
|
|
118
118
|
"undefined"
|
|
119
119
|
]);
|
|
120
|
-
const referenceTypes = new Set([
|
|
120
|
+
const referenceTypes = /* @__PURE__ */ new Set([
|
|
121
121
|
"array",
|
|
122
122
|
"function",
|
|
123
123
|
"object",
|
|
124
124
|
"symbol"
|
|
125
125
|
]);
|
|
126
|
-
const detectableTypes = new Set([
|
|
126
|
+
const detectableTypes = /* @__PURE__ */ new Set([
|
|
127
127
|
"boolean",
|
|
128
128
|
"function",
|
|
129
129
|
"number",
|
|
130
130
|
"string",
|
|
131
131
|
"symbol"
|
|
132
132
|
]);
|
|
133
|
-
const typeConstructors = new Set([
|
|
133
|
+
const typeConstructors = /* @__PURE__ */ new Set([
|
|
134
134
|
Boolean,
|
|
135
135
|
Number,
|
|
136
136
|
String
|
|
@@ -201,7 +201,7 @@ var TypeDescriptor = class TypeDescriptor {
|
|
|
201
201
|
};
|
|
202
202
|
//#endregion
|
|
203
203
|
//#region ../../node_modules/.pnpm/fetch-mock@12.6.0/node_modules/fetch-mock/dist/esm/IsSubsetOf.js
|
|
204
|
-
const allowedTypes = new Set([
|
|
204
|
+
const allowedTypes = /* @__PURE__ */ new Set([
|
|
205
205
|
"array",
|
|
206
206
|
"object",
|
|
207
207
|
"function",
|
|
@@ -693,7 +693,14 @@ var __classPrivateFieldGet = function(receiver, state, kind, f) {
|
|
|
693
693
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
694
694
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
695
695
|
};
|
|
696
|
-
var _Route_instances
|
|
696
|
+
var _Route_instances;
|
|
697
|
+
var _a;
|
|
698
|
+
var _Route_responseSubscriptions;
|
|
699
|
+
var _Route_validate;
|
|
700
|
+
var _Route_sanitize;
|
|
701
|
+
var _Route_generateMatcher;
|
|
702
|
+
var _Route_limit;
|
|
703
|
+
var _Route_delayResponse;
|
|
697
704
|
var RouteConfigWrapper = class {
|
|
698
705
|
constructor(config) {
|
|
699
706
|
Object.assign(this, config);
|
|
@@ -1206,7 +1213,7 @@ var esm_default = new class FetchMock {
|
|
|
1206
1213
|
//#endregion
|
|
1207
1214
|
//#region deno.json
|
|
1208
1215
|
var name = "@fedify/vocab";
|
|
1209
|
-
var version = "2.4.0-dev.
|
|
1216
|
+
var version = "2.4.0-dev.1740+32e9952c";
|
|
1210
1217
|
//#endregion
|
|
1211
1218
|
//#region src/actor.ts
|
|
1212
1219
|
const ACTOR_DISCOVERY_HISTOGRAM_BUCKETS = [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "temporal-polyfill";
|
|
2
2
|
globalThis.addEventListener = () => {};
|
|
3
|
-
import {
|
|
4
|
-
import { a as normalizeActorHandle, c as esm_default, i as isActor, n as getActorHandle, r as getActorTypeName, t as getActorClassByTypeName } from "./actor-
|
|
3
|
+
import { B as Service, M as Person, a as Application, j as Organization, q as __exportAll, v as Group } from "./vocab-CNiWKo57.mjs";
|
|
4
|
+
import { a as normalizeActorHandle, c as esm_default, i as isActor, n as getActorHandle, r as getActorTypeName, t as getActorClassByTypeName } from "./actor-Du_ra6Yk.mjs";
|
|
5
5
|
import { createTestMeterProvider, test } from "@fedify/fixture";
|
|
6
6
|
import { deepStrictEqual, ok, rejects, strictEqual, throws } from "node:assert/strict";
|
|
7
7
|
//#region ../../node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/precondition/PreconditionFailure.js
|
|
@@ -1816,7 +1816,10 @@ function stringifyInternal(value, previousValues, getAsyncContent) {
|
|
|
1816
1816
|
if (typeof safeBufferIsBuffer === "function" && safeBufferIsBuffer(value)) return `Buffer.from(${stringifyInternal(safeArrayFrom(value.values()), currentValues, getAsyncContent)})`;
|
|
1817
1817
|
const valuePrototype = safeObjectGetPrototypeOf$1(value);
|
|
1818
1818
|
const className = valuePrototype && valuePrototype.constructor && valuePrototype.constructor.name;
|
|
1819
|
-
if (typeof className === "string")
|
|
1819
|
+
if (typeof className === "string") {
|
|
1820
|
+
const valuesFromTypedArr = value.values();
|
|
1821
|
+
return `${className}.from(${stringifyInternal(safeArrayFrom(valuesFromTypedArr), currentValues, getAsyncContent)})`;
|
|
1822
|
+
}
|
|
1820
1823
|
break;
|
|
1821
1824
|
}
|
|
1822
1825
|
}
|
|
@@ -2812,7 +2815,8 @@ function maxGeneratedLengthFromSizeForArbitrary(size, minLength, maxLength, spec
|
|
|
2812
2815
|
const { baseSize: defaultSize = DefaultSize, defaultSizeToMaxWhenMaxSpecified } = readConfigureGlobal() || {};
|
|
2813
2816
|
const definedSize = size !== void 0 ? size : specifiedMaxLength && defaultSizeToMaxWhenMaxSpecified ? "max" : defaultSize;
|
|
2814
2817
|
if (definedSize === "max") return maxLength;
|
|
2815
|
-
|
|
2818
|
+
const finalSize = relativeSizeToSize(definedSize, defaultSize);
|
|
2819
|
+
return safeMathMin$3(maxLengthFromMinLength(minLength, finalSize), maxLength);
|
|
2816
2820
|
}
|
|
2817
2821
|
function depthBiasFromSizeForArbitrary(depthSizeOrSize, specifiedMaxDepth) {
|
|
2818
2822
|
if (typeof depthSizeOrSize === "number") return 1 / depthSizeOrSize;
|
|
@@ -3312,11 +3316,12 @@ var FrequencyArbitrary = class FrequencyArbitrary extends Arbitrary {
|
|
|
3312
3316
|
if (currentWeight < 0) throw new Error(`${label} expects weights to be superior or equal to 0`);
|
|
3313
3317
|
}
|
|
3314
3318
|
if (totalWeight <= 0) throw new Error(`${label} expects the sum of weights to be strictly superior to 0`);
|
|
3315
|
-
|
|
3319
|
+
const sanitizedConstraints = {
|
|
3316
3320
|
depthBias: depthBiasFromSizeForArbitrary(constraints.depthSize, constraints.maxDepth !== void 0),
|
|
3317
3321
|
maxDepth: constraints.maxDepth != void 0 ? constraints.maxDepth : safePositiveInfinity$7,
|
|
3318
3322
|
withCrossShrink: !!constraints.withCrossShrink
|
|
3319
|
-
}
|
|
3323
|
+
};
|
|
3324
|
+
return new FrequencyArbitrary(warbs, sanitizedConstraints, getDepthContextFor(constraints.depthIdentifier));
|
|
3320
3325
|
}
|
|
3321
3326
|
constructor(warbs, constraints, context) {
|
|
3322
3327
|
super();
|
|
@@ -4942,7 +4947,7 @@ const INDEX_NEGATIVE_INFINITY$1 = {
|
|
|
4942
4947
|
sign: -1,
|
|
4943
4948
|
data: [2146435072, 1]
|
|
4944
4949
|
};
|
|
4945
|
-
const f64 = new Float64Array(1);
|
|
4950
|
+
const f64 = /* @__PURE__ */ new Float64Array(1);
|
|
4946
4951
|
const u32$1 = new Uint32Array(f64.buffer, f64.byteOffset);
|
|
4947
4952
|
function bitCastDoubleToUInt64(f) {
|
|
4948
4953
|
f64[0] = f;
|
|
@@ -5047,7 +5052,7 @@ function doubleOnlyMapper(value) {
|
|
|
5047
5052
|
}
|
|
5048
5053
|
function doubleOnlyUnmapper(value) {
|
|
5049
5054
|
if (typeof value !== "number") throw new Error("Unsupported type");
|
|
5050
|
-
return value === safePositiveInfinity$4 ? onlyIntegersAfterThisValue$1 : value === safeNegativeInfinity$4 ? -
|
|
5055
|
+
return value === safePositiveInfinity$4 ? onlyIntegersAfterThisValue$1 : value === safeNegativeInfinity$4 ? -4503599627370496 : value;
|
|
5051
5056
|
}
|
|
5052
5057
|
//#endregion
|
|
5053
5058
|
//#region ../../node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/double.js
|
|
@@ -5099,7 +5104,7 @@ const safePositiveInfinity$2 = Number.POSITIVE_INFINITY;
|
|
|
5099
5104
|
const MAX_VALUE_32 = 2 ** 127 * (1 + (2 ** 23 - 1) / 2 ** 23);
|
|
5100
5105
|
const INDEX_POSITIVE_INFINITY = 2139095040;
|
|
5101
5106
|
const INDEX_NEGATIVE_INFINITY = -2139095041;
|
|
5102
|
-
const f32 = new Float32Array(1);
|
|
5107
|
+
const f32 = /* @__PURE__ */ new Float32Array(1);
|
|
5103
5108
|
const u32 = new Uint32Array(f32.buffer, f32.byteOffset);
|
|
5104
5109
|
function bitCastFloatToUInt32(f) {
|
|
5105
5110
|
f32[0] = f;
|
|
@@ -5155,7 +5160,7 @@ function floatOnlyMapper(value) {
|
|
|
5155
5160
|
}
|
|
5156
5161
|
function floatOnlyUnmapper(value) {
|
|
5157
5162
|
if (typeof value !== "number") throw new Error("Unsupported type");
|
|
5158
|
-
return value === safePositiveInfinity$1 ? onlyIntegersAfterThisValue : value === safeNegativeInfinity$1 ? -
|
|
5163
|
+
return value === safePositiveInfinity$1 ? onlyIntegersAfterThisValue : value === safeNegativeInfinity$1 ? -8388608 : value;
|
|
5159
5164
|
}
|
|
5160
5165
|
//#endregion
|
|
5161
5166
|
//#region ../../node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/float.js
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Temporal } from "temporal-polyfill";
|
|
2
2
|
globalThis.addEventListener = () => {};
|
|
3
|
-
import { D as Note, M as Person, O as Object$1, o as Collection } from "./vocab-
|
|
4
|
-
import { c as esm_default, i as isActor, o as name, s as version } from "./actor-
|
|
5
|
-
import { t as getTypeId } from "./type-
|
|
6
|
-
import { t as assertInstanceOf } from "./utils-
|
|
3
|
+
import { D as Note, M as Person, O as Object$1, o as Collection } from "./vocab-CNiWKo57.mjs";
|
|
4
|
+
import { c as esm_default, i as isActor, o as name, s as version } from "./actor-Du_ra6Yk.mjs";
|
|
5
|
+
import { t as getTypeId } from "./type-BMdjm4Eg.mjs";
|
|
6
|
+
import { t as assertInstanceOf } from "./utils-Df2odC27.mjs";
|
|
7
7
|
import { createTestMeterProvider, createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
8
8
|
import { deepStrictEqual, equal, ok, rejects } from "node:assert/strict";
|
|
9
9
|
import { lookupWebFinger } from "@fedify/webfinger";
|
package/dist-tests/type.test.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "temporal-polyfill";
|
|
2
2
|
globalThis.addEventListener = () => {};
|
|
3
|
-
import {
|
|
4
|
-
import { t as getTypeId } from "./type-
|
|
3
|
+
import { M as Person, U as getEntityTypeById, W as isEntityType, w as Link } from "./vocab-CNiWKo57.mjs";
|
|
4
|
+
import { t as getTypeId } from "./type-BMdjm4Eg.mjs";
|
|
5
5
|
import { test } from "@fedify/fixture";
|
|
6
6
|
import { deepStrictEqual } from "node:assert/strict";
|
|
7
7
|
//#region src/type.test.ts
|