@fedify/vocab-runtime 2.3.0-dev.994 → 2.3.0-pr.809.36
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 +4 -3
- package/dist/{chunk-CKQMccvm.cjs → chunk-M78iaK0I.cjs} +1 -0
- package/dist/jsonld.cjs +3 -2
- package/dist/jsonld.d.cts +1 -0
- package/dist/jsonld.d.ts +1 -0
- package/dist/jsonld.js +1 -0
- package/dist/mod.cjs +4456 -4373
- package/dist/mod.d.cts +36 -1
- package/dist/mod.d.ts +36 -1
- package/dist/mod.js +4453 -4370
- package/dist/temporal.cjs +60 -0
- package/dist/temporal.d.cts +54 -0
- package/dist/temporal.d.ts +54 -0
- package/dist/temporal.js +58 -0
- package/dist/tests/{chunk-Do9eywBl.cjs → chunk-C2EiDwsr.cjs} +1 -1
- package/dist/tests/decimal.test.cjs +5 -4
- package/dist/tests/decimal.test.mjs +4 -3
- package/dist/tests/docloader-5FLgqUWX.cjs +4543 -0
- package/dist/tests/docloader-sUZ8fBQ-.mjs +4531 -0
- package/dist/tests/docloader.test.cjs +4 -4
- package/dist/tests/docloader.test.mjs +4 -4
- package/dist/tests/internal/multicodec.test.cjs +1 -1
- package/dist/tests/{key-BeTHFQJK.mjs → key-CrrK9mYh.mjs} +1 -1
- package/dist/tests/{key-DTTIntwb.cjs → key-pMmqUKuo.cjs} +2 -2
- package/dist/tests/key.test.cjs +3 -3
- package/dist/tests/key.test.mjs +2 -2
- package/dist/tests/langstr.test.cjs +2 -2
- package/dist/tests/link.test.cjs +1 -1
- package/dist/tests/multibase/multibase.test.cjs +2 -2
- package/dist/tests/multibase/multibase.test.mjs +1 -1
- package/dist/tests/{multibase-BgU9XRf7.mjs → multibase-B4bvakyA.mjs} +3 -0
- package/dist/tests/{multibase-F7LtMMsK.cjs → multibase-Bz_UUDtL.cjs} +5 -2
- package/dist/tests/{request-JMzY0HsO.mjs → request-DLMAbwhV.mjs} +1 -1
- package/dist/tests/{request-OgmNfphs.cjs → request-KpJUwFOb.cjs} +3 -3
- package/dist/tests/request.test.cjs +3 -3
- package/dist/tests/request.test.mjs +1 -1
- package/dist/tests/temporal.test.cjs +134 -0
- package/dist/tests/temporal.test.d.cts +1 -0
- package/dist/tests/temporal.test.d.mts +1 -0
- package/dist/tests/temporal.test.mjs +134 -0
- package/dist/tests/url-C20FhC7p.cjs +206 -0
- package/dist/tests/url-m9Qzxy-Y.mjs +176 -0
- package/dist/tests/url.test.cjs +56 -2
- package/dist/tests/url.test.mjs +55 -1
- package/package.json +17 -6
- package/src/mod.ts +5 -0
- package/src/preprocessor.ts +43 -0
- package/src/temporal.test.ts +121 -0
- package/src/temporal.ts +74 -0
- package/src/url.test.ts +82 -0
- package/src/url.ts +199 -24
- package/tsdown.config.ts +6 -3
- package/dist/tests/docloader-CQYpRois.cjs +0 -4581
- package/dist/tests/docloader-xNl5RAkG.mjs +0 -4569
- package/dist/tests/url-BQ_kgmCk.mjs +0 -59
- package/dist/tests/url-pFuSds44.cjs +0 -89
package/dist/mod.d.cts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
/// <reference lib="esnext.temporal" />
|
|
1
2
|
import { Logger } from "@logtape/logtape";
|
|
3
|
+
import { TracerProvider } from "@opentelemetry/api";
|
|
2
4
|
|
|
3
5
|
//#region src/contexts.d.ts
|
|
4
6
|
declare const preloadedContexts: Record<string, unknown>;
|
|
@@ -421,6 +423,39 @@ declare function decodeMultibase(data: Uint8Array | string): Uint8Array;
|
|
|
421
423
|
*/
|
|
422
424
|
declare function encodingFromBaseData(data: string | Uint8Array): Base;
|
|
423
425
|
//#endregion
|
|
426
|
+
//#region src/preprocessor.d.ts
|
|
427
|
+
/**
|
|
428
|
+
* JSON value shape passed to property preprocessors.
|
|
429
|
+
* @since 2.3.0
|
|
430
|
+
*/
|
|
431
|
+
type Json = string | number | boolean | null | readonly Json[] | {
|
|
432
|
+
readonly [key: string]: Json;
|
|
433
|
+
};
|
|
434
|
+
/**
|
|
435
|
+
* Runtime context provided to property preprocessors.
|
|
436
|
+
* @since 2.3.0
|
|
437
|
+
*/
|
|
438
|
+
interface PropertyPreprocessorContext {
|
|
439
|
+
/** Loader for remote JSON-LD documents. */
|
|
440
|
+
documentLoader?: DocumentLoader;
|
|
441
|
+
/** Loader for remote JSON-LD contexts. */
|
|
442
|
+
contextLoader?: DocumentLoader;
|
|
443
|
+
/** OpenTelemetry tracer provider for instrumentation. */
|
|
444
|
+
tracerProvider?: TracerProvider;
|
|
445
|
+
/** Base URL for resolving relative references. */
|
|
446
|
+
baseUrl?: URL;
|
|
447
|
+
}
|
|
448
|
+
/**
|
|
449
|
+
* Function signature for schema-configured property preprocessors.
|
|
450
|
+
*
|
|
451
|
+
* Receives an expanded JSON-LD property value and returns a vocabulary
|
|
452
|
+
* object when the value is handled, `undefined` when the value should
|
|
453
|
+
* fall through to the normal range decoder, or an `Error` when the value
|
|
454
|
+
* is recognized but cannot be converted.
|
|
455
|
+
* @since 2.3.0
|
|
456
|
+
*/
|
|
457
|
+
type PropertyPreprocessor<T = unknown> = (value: Json, context: PropertyPreprocessorContext) => T | undefined | Error | Promise<T | undefined | Error>;
|
|
458
|
+
//#endregion
|
|
424
459
|
//#region src/url.d.ts
|
|
425
460
|
declare class UrlError extends Error {
|
|
426
461
|
constructor(message: string);
|
|
@@ -433,4 +468,4 @@ declare function isValidPublicIPv4Address(address: string): boolean;
|
|
|
433
468
|
declare function isValidPublicIPv6Address(address: string): boolean;
|
|
434
469
|
declare function expandIPv6Address(address: string): string;
|
|
435
470
|
//#endregion
|
|
436
|
-
export { type AuthenticatedDocumentLoaderFactory, type CreateRequestOptions, type Decimal, type DocumentLoader, type DocumentLoaderFactory, type DocumentLoaderFactoryOptions, type DocumentLoaderOptions, FetchError, type GetDocumentLoaderOptions, type GetUserAgentOptions, LanguageString, type RemoteDocument, UrlError, canParseDecimal, createActivityPubRequest, decodeMultibase, encodeMultibase, encodingFromBaseData, expandIPv6Address, exportMultibaseKey, exportSpki, getDocumentLoader, getRemoteDocument, getUserAgent, importMultibaseKey, importPem, importPkcs1, importSpki, isDecimal, isValidPublicIPv4Address, isValidPublicIPv6Address, logRequest, parseDecimal, preloadedContexts, validatePublicUrl };
|
|
471
|
+
export { type AuthenticatedDocumentLoaderFactory, type CreateRequestOptions, type Decimal, type DocumentLoader, type DocumentLoaderFactory, type DocumentLoaderFactoryOptions, type DocumentLoaderOptions, FetchError, type GetDocumentLoaderOptions, type GetUserAgentOptions, type Json, LanguageString, type PropertyPreprocessor, type PropertyPreprocessorContext, type RemoteDocument, UrlError, canParseDecimal, createActivityPubRequest, decodeMultibase, encodeMultibase, encodingFromBaseData, expandIPv6Address, exportMultibaseKey, exportSpki, getDocumentLoader, getRemoteDocument, getUserAgent, importMultibaseKey, importPem, importPkcs1, importSpki, isDecimal, isValidPublicIPv4Address, isValidPublicIPv6Address, logRequest, parseDecimal, preloadedContexts, validatePublicUrl };
|
package/dist/mod.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
/// <reference lib="esnext.temporal" />
|
|
1
2
|
import { Logger } from "@logtape/logtape";
|
|
3
|
+
import { TracerProvider } from "@opentelemetry/api";
|
|
2
4
|
|
|
3
5
|
//#region src/contexts.d.ts
|
|
4
6
|
declare const preloadedContexts: Record<string, unknown>;
|
|
@@ -421,6 +423,39 @@ declare function decodeMultibase(data: Uint8Array | string): Uint8Array;
|
|
|
421
423
|
*/
|
|
422
424
|
declare function encodingFromBaseData(data: string | Uint8Array): Base;
|
|
423
425
|
//#endregion
|
|
426
|
+
//#region src/preprocessor.d.ts
|
|
427
|
+
/**
|
|
428
|
+
* JSON value shape passed to property preprocessors.
|
|
429
|
+
* @since 2.3.0
|
|
430
|
+
*/
|
|
431
|
+
type Json = string | number | boolean | null | readonly Json[] | {
|
|
432
|
+
readonly [key: string]: Json;
|
|
433
|
+
};
|
|
434
|
+
/**
|
|
435
|
+
* Runtime context provided to property preprocessors.
|
|
436
|
+
* @since 2.3.0
|
|
437
|
+
*/
|
|
438
|
+
interface PropertyPreprocessorContext {
|
|
439
|
+
/** Loader for remote JSON-LD documents. */
|
|
440
|
+
documentLoader?: DocumentLoader;
|
|
441
|
+
/** Loader for remote JSON-LD contexts. */
|
|
442
|
+
contextLoader?: DocumentLoader;
|
|
443
|
+
/** OpenTelemetry tracer provider for instrumentation. */
|
|
444
|
+
tracerProvider?: TracerProvider;
|
|
445
|
+
/** Base URL for resolving relative references. */
|
|
446
|
+
baseUrl?: URL;
|
|
447
|
+
}
|
|
448
|
+
/**
|
|
449
|
+
* Function signature for schema-configured property preprocessors.
|
|
450
|
+
*
|
|
451
|
+
* Receives an expanded JSON-LD property value and returns a vocabulary
|
|
452
|
+
* object when the value is handled, `undefined` when the value should
|
|
453
|
+
* fall through to the normal range decoder, or an `Error` when the value
|
|
454
|
+
* is recognized but cannot be converted.
|
|
455
|
+
* @since 2.3.0
|
|
456
|
+
*/
|
|
457
|
+
type PropertyPreprocessor<T = unknown> = (value: Json, context: PropertyPreprocessorContext) => T | undefined | Error | Promise<T | undefined | Error>;
|
|
458
|
+
//#endregion
|
|
424
459
|
//#region src/url.d.ts
|
|
425
460
|
declare class UrlError extends Error {
|
|
426
461
|
constructor(message: string);
|
|
@@ -433,4 +468,4 @@ declare function isValidPublicIPv4Address(address: string): boolean;
|
|
|
433
468
|
declare function isValidPublicIPv6Address(address: string): boolean;
|
|
434
469
|
declare function expandIPv6Address(address: string): string;
|
|
435
470
|
//#endregion
|
|
436
|
-
export { type AuthenticatedDocumentLoaderFactory, type CreateRequestOptions, type Decimal, type DocumentLoader, type DocumentLoaderFactory, type DocumentLoaderFactoryOptions, type DocumentLoaderOptions, FetchError, type GetDocumentLoaderOptions, type GetUserAgentOptions, LanguageString, type RemoteDocument, UrlError, canParseDecimal, createActivityPubRequest, decodeMultibase, encodeMultibase, encodingFromBaseData, expandIPv6Address, exportMultibaseKey, exportSpki, getDocumentLoader, getRemoteDocument, getUserAgent, importMultibaseKey, importPem, importPkcs1, importSpki, isDecimal, isValidPublicIPv4Address, isValidPublicIPv6Address, logRequest, parseDecimal, preloadedContexts, validatePublicUrl };
|
|
471
|
+
export { type AuthenticatedDocumentLoaderFactory, type CreateRequestOptions, type Decimal, type DocumentLoader, type DocumentLoaderFactory, type DocumentLoaderFactoryOptions, type DocumentLoaderOptions, FetchError, type GetDocumentLoaderOptions, type GetUserAgentOptions, type Json, LanguageString, type PropertyPreprocessor, type PropertyPreprocessorContext, type RemoteDocument, UrlError, canParseDecimal, createActivityPubRequest, decodeMultibase, encodeMultibase, encodingFromBaseData, expandIPv6Address, exportMultibaseKey, exportSpki, getDocumentLoader, getRemoteDocument, getUserAgent, importMultibaseKey, importPem, importPkcs1, importSpki, isDecimal, isValidPublicIPv4Address, isValidPublicIPv6Address, logRequest, parseDecimal, preloadedContexts, validatePublicUrl };
|