@mailwoman/core 7.2.0 → 7.3.0
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/api/APIClient.ts +175 -0
- package/api/headless.ts +23 -0
- package/api/index.ts +11 -0
- package/api/responses.ts +135 -0
- package/coarse-placer/coarse-placer.ts +300 -0
- package/coarse-placer/featurize.ts +171 -0
- package/coarse-placer/tools/build-dataset.ts +223 -0
- package/coarse-placer/tools/build-outlier-exposure.ts +172 -0
- package/coarse-placer/tools/build-outlier-latin.ts +200 -0
- package/coarse-placer/tools/build-outlier-oa.ts +231 -0
- package/coarse-placer/tools/eval-latin-offmap.ts +140 -0
- package/coarse-placer/tools/eval-openset.ts +519 -0
- package/coarse-placer/tools/eval-quant-compare.ts +151 -0
- package/coarse-placer/tools/eval.ts +187 -0
- package/coarse-placer/tools/fnv-hash.ts +24 -0
- package/coarse-placer/tools/index.ts +23 -0
- package/coarse-placer/tools/probe-frontier.ts +216 -0
- package/coarse-placer/tools/quantize.ts +116 -0
- package/coarse-placer/tools/train.ts +244 -0
- package/collections.ts +134 -0
- package/db/schema.ts +21 -0
- package/decoder/build-tree.ts +228 -0
- package/decoder/calibration.ts +101 -0
- package/decoder/containment.ts +87 -0
- package/decoder/index.ts +17 -0
- package/decoder/proposals-to-tree.ts +83 -0
- package/decoder/resolve-proposal-overlaps.ts +79 -0
- package/decoder/serialize-json.ts +70 -0
- package/decoder/serialize-tuples.ts +61 -0
- package/decoder/serialize-xml.ts +209 -0
- package/decoder/types.ts +159 -0
- package/decoder/unknown-spans.ts +103 -0
- package/decoder/validate-tree.ts +100 -0
- package/env/index.ts +42 -0
- package/env/load.ts +14 -0
- package/env/paths.ts +40 -0
- package/env/schema.ts +125 -0
- package/errors/index.ts +9 -0
- package/errors/schema.ts +155 -0
- package/fs/node.ts +38 -0
- package/identifiers.ts +58 -0
- package/index.ts +13 -0
- package/kysley/adapter.ts +29 -0
- package/kysley/client.ts +30 -0
- package/kysley/dialect-config.ts +30 -0
- package/kysley/dialect.ts +67 -0
- package/kysley/driver.ts +175 -0
- package/layers/index.ts +12 -0
- package/layers/manifest.ts +154 -0
- package/layers/schema.ts +105 -0
- package/locale/index.ts +9 -0
- package/locale/locale.ts +49 -0
- package/locale/profiles/en-us.ts +69 -0
- package/locale/profiles/fr-fr.ts +75 -0
- package/locale/profiles/index.ts +9 -0
- package/locale/profiles/ja-jp.ts +33 -0
- package/locale/registry.ts +68 -0
- package/logging/index.ts +8 -0
- package/logging/shared.ts +145 -0
- package/logging/utils.ts +46 -0
- package/objects.ts +211 -0
- package/out/api/APIClient.d.ts.map +1 -1
- package/out/api/APIClient.js +2 -2
- package/out/api/APIClient.js.map +1 -1
- package/out/pipeline/types.d.ts +13 -0
- package/out/pipeline/types.d.ts.map +1 -1
- package/out/pipeline/types.js.map +1 -1
- package/out/scripting/utils/index.d.ts.map +1 -1
- package/out/scripting/utils/index.js +3 -5
- package/out/scripting/utils/index.js.map +1 -1
- package/package.json +190 -107
- package/pipeline/index.ts +46 -0
- package/pipeline/reconcile-lookups.ts +108 -0
- package/pipeline/reconcile.ts +542 -0
- package/pipeline/runtime-pipeline.ts +732 -0
- package/pipeline/span-logit-aggregation.ts +151 -0
- package/pipeline/span-proposer.ts +587 -0
- package/pipeline/types.ts +357 -0
- package/policy/defaults.ts +35 -0
- package/policy/index.ts +10 -0
- package/policy/policy.ts +60 -0
- package/policy/proposal-collection.ts +64 -0
- package/policy/registry.ts +149 -0
- package/resolver/index.ts +29 -0
- package/resolver/types.ts +584 -0
- package/resources/LocaleIndex.ts +124 -0
- package/resources/ResourceMapCache.ts +126 -0
- package/resources/collections.ts +93 -0
- package/resources/debugging.ts +19 -0
- package/resources/git.ts +54 -0
- package/resources/index.ts +17 -0
- package/resources/languages/index.ts +49 -0
- package/resources/languages/types.gen.ts +1368 -0
- package/resources/libaddressinput.ts +105 -0
- package/resources/libpostal.ts +182 -0
- package/resources/locale.ts +23 -0
- package/resources/set.ts +179 -0
- package/resources/whosonfirst/DataSourceCache.ts +72 -0
- package/resources/whosonfirst/PlacetypeDataSource.ts +199 -0
- package/resources/whosonfirst/index.ts +10 -0
- package/resources/whosonfirst/loader.ts +157 -0
- package/resources/whosonfirst/placetypes/Placetype.ts +438 -0
- package/resources/whosonfirst/placetypes/admin.ts +173 -0
- package/resources/whosonfirst/placetypes/definition.ts +135 -0
- package/resources/whosonfirst/placetypes/graph.ts +0 -0
- package/resources/whosonfirst/placetypes/index.ts +12 -0
- package/resources/whosonfirst/placetypes/mermaid.ts +168 -0
- package/resources/whosonfirst/placetypes/tree.ts +46 -0
- package/routing/index.ts +208 -0
- package/scripting/index.ts +40 -0
- package/scripting/utils/index.ts +103 -0
- package/tokenization/Graph.ts +50 -0
- package/tokenization/Span.ts +297 -0
- package/tokenization/index.ts +9 -0
- package/tokenization/normalizer.ts +123 -0
- package/tools/download-libpostal-resources.ts +98 -0
- package/tools/download-ssl-address.ts +99 -0
- package/tools/generate-language-types.ts +194 -0
- package/tools/index.ts +13 -0
- package/types/Classification.ts +211 -0
- package/types/classifier.ts +133 -0
- package/types/component.ts +75 -0
- package/types/index.ts +10 -0
- package/types/mapping.ts +81 -0
- package/utils/data-root.ts +56 -0
- package/utils/hash.ts +27 -0
- package/utils/index.ts +14 -0
- package/utils/jsonl.ts +43 -0
- package/utils/python-json.ts +105 -0
- package/utils/python-random.ts +90 -0
- package/utils/repo.ts +118 -0
- package/utils/sealed-db.ts +85 -0
- package/utils/stats.ts +32 -0
- package/vitest.config.ts +53 -0
- package/out/lifecycle/ServiceSymbol.d.ts +0 -57
- package/out/lifecycle/ServiceSymbol.d.ts.map +0 -1
- package/out/lifecycle/ServiceSymbol.js +0 -60
- package/out/lifecycle/ServiceSymbol.js.map +0 -1
- package/out/lifecycle/index.d.ts +0 -11
- package/out/lifecycle/index.d.ts.map +0 -1
- package/out/lifecycle/index.js +0 -11
- package/out/lifecycle/index.js.map +0 -1
- package/out/lifecycle/lru-cache.d.ts +0 -22
- package/out/lifecycle/lru-cache.d.ts.map +0 -1
- package/out/lifecycle/lru-cache.js +0 -31
- package/out/lifecycle/lru-cache.js.map +0 -1
- package/out/lifecycle/services.d.ts +0 -144
- package/out/lifecycle/services.d.ts.map +0 -1
- package/out/lifecycle/services.js +0 -191
- package/out/lifecycle/services.js.map +0 -1
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Sister Software
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
* @author Teffen Ellis, et al.
|
|
5
|
+
*
|
|
6
|
+
* The sealed-artifact invariant: every SQLite DB a build produces is a READ-ONLY asset. `sealDatabase`
|
|
7
|
+
* is the last step of every builder — checkpoint, freeze the journal, chmod 0444. `openBuiltDatabase`
|
|
8
|
+
* is how anything opens a data artifact; a write-mode open of a sealed file throws a NAMED error
|
|
9
|
+
* pointing at the rebuild command instead of a cryptic SQLITE_READONLY. Unsealing is deliberate and
|
|
10
|
+
* manual (`chmod u+w`), never programmatic — rebuild, don't mutate.
|
|
11
|
+
*/
|
|
12
|
+
import { chmodSync, existsSync, statSync, unlinkSync } from "node:fs"
|
|
13
|
+
import { basename } from "node:path"
|
|
14
|
+
import type { DatabaseSync } from "node:sqlite"
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* `node:sqlite` via {@link process.getBuiltinModule} — invisible to bundlers. A static import here would ride the
|
|
18
|
+
* `@mailwoman/core/utils` barrel into every consumer, and the docs' plugin loader (which transpiles `docusaurus.config`
|
|
19
|
+
* imports) can't resolve `node:sqlite` (CI: "Cannot find module 'sqlite'"). The builtin accessor keeps the functions
|
|
20
|
+
* synchronous with zero resolve surface.
|
|
21
|
+
*/
|
|
22
|
+
function sqlite(): typeof import("node:sqlite") {
|
|
23
|
+
return process.getBuiltinModule("node:sqlite")
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** A write-mode open was attempted on a sealed (0444) data artifact. */
|
|
27
|
+
export class SealedArtifactError extends Error {
|
|
28
|
+
constructor(path: string) {
|
|
29
|
+
super(
|
|
30
|
+
`${basename(path)} is a sealed read-only artifact — rebuild it via \`mailwoman gazetteer build …\`, ` +
|
|
31
|
+
`don't mutate it. (Deliberate unseal: chmod u+w — but prefer a rebuild.)`
|
|
32
|
+
)
|
|
33
|
+
this.name = "SealedArtifactError"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** True when the artifact exists and carries no write bits (the sealed state {@link sealDatabase} leaves). */
|
|
38
|
+
export function isSealed(path: string): boolean {
|
|
39
|
+
return existsSync(path) && (statSync(path).mode & 0o222) === 0
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Finalize a built DB: WAL-checkpoint → `journal_mode = DELETE` → remove `-wal`/`-shm` sidecars → `chmod 0o444`.
|
|
44
|
+
* Idempotent. Throws if the checkpoint cannot complete (another writer holds the DB).
|
|
45
|
+
*/
|
|
46
|
+
export function sealDatabase(path: string): void {
|
|
47
|
+
// A previously sealed artifact needs the write bit back for the journal-mode switch.
|
|
48
|
+
if (isSealed(path)) {
|
|
49
|
+
chmodSync(path, 0o644)
|
|
50
|
+
}
|
|
51
|
+
const db = new (sqlite().DatabaseSync)(path)
|
|
52
|
+
const checkpoint = db.prepare("PRAGMA wal_checkpoint(TRUNCATE)").get() as { busy: number }
|
|
53
|
+
|
|
54
|
+
if (checkpoint.busy !== 0) {
|
|
55
|
+
db.close()
|
|
56
|
+
throw new Error(`sealDatabase: WAL checkpoint busy on ${path} — close all writers first`)
|
|
57
|
+
}
|
|
58
|
+
const mode = db.prepare("PRAGMA journal_mode = DELETE").get() as { journal_mode: string }
|
|
59
|
+
db.close()
|
|
60
|
+
|
|
61
|
+
if (mode.journal_mode !== "delete") {
|
|
62
|
+
throw new Error(`sealDatabase: journal_mode switch failed on ${path} (still ${mode.journal_mode})`)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
for (const sidecar of [`${path}-wal`, `${path}-shm`]) {
|
|
66
|
+
if (existsSync(sidecar)) {
|
|
67
|
+
unlinkSync(sidecar)
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
chmodSync(path, 0o444)
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Open a data artifact. Read-only by default. `write: true` is for builders working on UNsealed staging — against a
|
|
75
|
+
* sealed artifact it throws {@link SealedArtifactError}.
|
|
76
|
+
*/
|
|
77
|
+
export function openBuiltDatabase(path: string, opts: { write?: boolean } = {}): DatabaseSync {
|
|
78
|
+
if (opts.write) {
|
|
79
|
+
if (isSealed(path)) throw new SealedArtifactError(path)
|
|
80
|
+
|
|
81
|
+
return new (sqlite().DatabaseSync)(path)
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return new (sqlite().DatabaseSync)(path, { readOnly: true })
|
|
85
|
+
}
|
package/utils/stats.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Sister Software
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
* @author Teffen Ellis, et al.
|
|
5
|
+
*
|
|
6
|
+
* Small stats helpers — the canonical home for the `percentile`/`median` copies (~15) and the
|
|
7
|
+
* `pct` percentage-format lambdas (~40) the 2026-07-09 dedupe survey found across eval scripts.
|
|
8
|
+
*
|
|
9
|
+
* `percentile` is byte-for-byte the gate scripts' nearest-rank implementation
|
|
10
|
+
* (oa-resolver-eval.ts / resolver-eval.ts) — gate parity depends on this exact semantics; do not
|
|
11
|
+
* "upgrade" it to linear interpolation.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/** Nearest-rank percentile over an unsorted sample; `null` on an empty sample. `p` in [0, 100]. */
|
|
15
|
+
export function percentile(xs: readonly number[], p: number): number | null {
|
|
16
|
+
if (xs.length === 0) return null
|
|
17
|
+
const s = [...xs].sort((a, b) => a - b)
|
|
18
|
+
|
|
19
|
+
return s[Math.min(s.length - 1, Math.floor((p / 100) * s.length))]!
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/** `percentile(xs, 50)`. */
|
|
23
|
+
export function median(xs: readonly number[]): number | null {
|
|
24
|
+
return percentile(xs, 50)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** Format `numerator / denominator` as a fixed-digit percentage (`"12.5%"`); `"—"` when `denominator` is 0. */
|
|
28
|
+
export function formatPercent(numerator: number, denominator: number, digits = 1): string {
|
|
29
|
+
if (denominator === 0) return "—"
|
|
30
|
+
|
|
31
|
+
return ((100 * numerator) / denominator).toFixed(digits) + "%"
|
|
32
|
+
}
|
package/vitest.config.ts
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Sister Software
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
* @author Teffen Ellis, et al.
|
|
5
|
+
*
|
|
6
|
+
* Per-package vitest config that resolves @mailwoman/core subpath imports to source. The
|
|
7
|
+
* package.json `exports` field points at `./out/.../index.js` — those files don't exist until tsc
|
|
8
|
+
* has run. With these aliases vitest can run from a clean checkout.
|
|
9
|
+
*
|
|
10
|
+
* A few subpaths are single files, not directories with an `index.ts` — `fs` is the node build
|
|
11
|
+
* (`fs/node.ts`), `objects` is a bare file (`objects.ts`), `coarse-placer`/`kysley/*` are single
|
|
12
|
+
* files. Those get explicit entries BEFORE the generic `<subpath> → <subpath>/index.ts` rule,
|
|
13
|
+
* which would otherwise resolve them to a non-existent `index.ts` (mirrors the root config).
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import { resolve } from "node:path"
|
|
17
|
+
|
|
18
|
+
// `defineConfig` from "vitest/config" (not "vite"): vitest's overload carries the `test` field.
|
|
19
|
+
// vite 8 (pulled in by docs/ Storybook) no longer applies the `vitest/config` type augmentation to
|
|
20
|
+
// vite's own `defineConfig`, so importing from "vite" makes `test` a type error under vite 8.
|
|
21
|
+
import { defineConfig } from "vitest/config"
|
|
22
|
+
|
|
23
|
+
const here = import.meta.dirname
|
|
24
|
+
|
|
25
|
+
export default defineConfig({
|
|
26
|
+
resolve: {
|
|
27
|
+
alias: [
|
|
28
|
+
// Order matters — more specific entries first. Single-file subpaths (no directory index)
|
|
29
|
+
// must beat the generic `<subpath>/index.ts` rule below.
|
|
30
|
+
{ find: /^@mailwoman\/core\/kysley\/(.+)$/, replacement: resolve(here, "kysley/$1.ts") },
|
|
31
|
+
{ find: /^@mailwoman\/core\/coarse-placer$/, replacement: resolve(here, "coarse-placer/coarse-placer.ts") },
|
|
32
|
+
{ find: /^@mailwoman\/core\/objects$/, replacement: resolve(here, "objects.ts") },
|
|
33
|
+
{ find: /^@mailwoman\/core\/fs$/, replacement: resolve(here, "fs/node.ts") },
|
|
34
|
+
// Every other @mailwoman/core/<subpath> resolves to the index.ts of the matching subdir.
|
|
35
|
+
{ find: /^@mailwoman\/core\/(.+)$/, replacement: resolve(here, "$1/index.ts") },
|
|
36
|
+
{ find: /^@mailwoman\/core$/, replacement: resolve(here, "index.ts") },
|
|
37
|
+
// Sibling workspaces.
|
|
38
|
+
{ find: /^@mailwoman\/corpus\/(.+)$/, replacement: resolve(here, "../corpus/src/$1.ts") },
|
|
39
|
+
{ find: /^@mailwoman\/corpus$/, replacement: resolve(here, "../corpus/src/index.ts") },
|
|
40
|
+
// The root `mailwoman` package — test-kit imports it (transitively re-exports core +
|
|
41
|
+
// classifiers). Tests across workspaces also import `mailwoman/test-kit` directly.
|
|
42
|
+
{ find: "mailwoman/test-kit", replacement: resolve(here, "../mailwoman/test-kit/index.ts") },
|
|
43
|
+
{ find: /^mailwoman$/, replacement: resolve(here, "../mailwoman/index.ts") },
|
|
44
|
+
],
|
|
45
|
+
},
|
|
46
|
+
test: {
|
|
47
|
+
// isolate: true (default) — required because @mailwoman/core/resources/libpostal has a
|
|
48
|
+
// top-level await that Vite's loader treats as a cycle under shared module graphs,
|
|
49
|
+
// breaking downstream `class extends ...` evaluations.
|
|
50
|
+
isolate: true,
|
|
51
|
+
exclude: ["**/node_modules/**", "**/out/**", "**/dist/**"],
|
|
52
|
+
},
|
|
53
|
+
})
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Supplemental interface for objects which can be further initialized asynchronously.
|
|
8
|
-
*/
|
|
9
|
-
export interface AsyncInitializable extends AsyncDisposable {
|
|
10
|
-
/**
|
|
11
|
-
* A method which can be called to asynchronously construct the object.
|
|
12
|
-
*/
|
|
13
|
-
[ServiceSymbol.asyncInit](...args: any[]): Promise<this>;
|
|
14
|
-
/**
|
|
15
|
-
* Alias for the `AsyncInitSymbol` method.
|
|
16
|
-
*/
|
|
17
|
-
ready?(...args: any[]): Promise<this>;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Type definition for a class which implements the AsyncInitializable interface.
|
|
21
|
-
*/
|
|
22
|
-
export type AsyncInitializableConstructor<T> = T extends new (...args: any[]) => AsyncInitializable ? new (...args: ConstructorParameters<T>) => T : never;
|
|
23
|
-
/**
|
|
24
|
-
* Symbol extensions associated with a service lifecycle.
|
|
25
|
-
*
|
|
26
|
-
* @singleton
|
|
27
|
-
* @static
|
|
28
|
-
*/
|
|
29
|
-
export declare class ServiceSymbol {
|
|
30
|
-
private constructor();
|
|
31
|
-
/**
|
|
32
|
-
* Global symbol for the AsyncConstructable interface.
|
|
33
|
-
*/
|
|
34
|
-
static readonly asyncInit: unique symbol;
|
|
35
|
-
/**
|
|
36
|
-
* Global symbol to mark an object as disposed.
|
|
37
|
-
*/
|
|
38
|
-
static readonly asyncDisposed: unique symbol;
|
|
39
|
-
/**
|
|
40
|
-
* Mark an object as disposed.
|
|
41
|
-
*/
|
|
42
|
-
static markAsDisposed(disposable: AsyncDisposable): boolean;
|
|
43
|
-
/**
|
|
44
|
-
* Type-predicate to determine if an object has been disposed.
|
|
45
|
-
*/
|
|
46
|
-
static isDisposed(disposable: AsyncDisposable): boolean;
|
|
47
|
-
/**
|
|
48
|
-
* Type-predicate to determine if a given input is an object which implements the `AsyncInitializable` interface.
|
|
49
|
-
*/
|
|
50
|
-
static isAsyncInitializable(input: AsyncDisposable): input is AsyncInitializable;
|
|
51
|
-
/**
|
|
52
|
-
* Type-predicate to determine if a given input is an object which implements the `AsyncDisposable` interface.
|
|
53
|
-
*/
|
|
54
|
-
static isAsyncDisposable<T>(input: T): input is T & AsyncDisposable;
|
|
55
|
-
static toString(): string;
|
|
56
|
-
}
|
|
57
|
-
//# sourceMappingURL=ServiceSymbol.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ServiceSymbol.d.ts","sourceRoot":"","sources":["../../lifecycle/ServiceSymbol.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,eAAe;IAC1D;;OAEG;IACH,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAExD;;OAEG;IACH,KAAK,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACrC;AAED;;GAEG;AACH,MAAM,MAAM,6BAA6B,CAAC,CAAC,IAAI,CAAC,SAAS,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,kBAAkB,GAChG,KAAK,GAAG,IAAI,EAAE,qBAAqB,CAAC,CAAC,CAAC,KAAK,CAAC,GAC5C,KAAK,CAAA;AAER;;;;;GAKG;AACH,qBAAa,aAAa;IACzB,OAAO;IAIP;;OAEG;IACH,gBAAuB,SAAS,EAAE,OAAO,MAAM,CAA0B;IAEzE;;OAEG;IACH,gBAAuB,aAAa,EAAE,OAAO,MAAM,CAA8B;IAEjF;;OAEG;WACW,cAAc,CAAC,UAAU,EAAE,eAAe,GAAG,OAAO;IAYlE;;OAEG;WACW,UAAU,CAAC,UAAU,EAAE,eAAe,GAAG,OAAO;IAI9D;;OAEG;WACW,oBAAoB,CAAC,KAAK,EAAE,eAAe,GAAG,KAAK,IAAI,kBAAkB;IAIvF;;OAEG;WACW,iBAAiB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,IAAI,CAAC,GAAG,eAAe;WAM5D,QAAQ;CAGtB"}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*/
|
|
6
|
-
import { ConsoleLogger } from "../logging/index.js";
|
|
7
|
-
/**
|
|
8
|
-
* Symbol extensions associated with a service lifecycle.
|
|
9
|
-
*
|
|
10
|
-
* @singleton
|
|
11
|
-
* @static
|
|
12
|
-
*/
|
|
13
|
-
export class ServiceSymbol {
|
|
14
|
-
constructor() {
|
|
15
|
-
throw new TypeError("Cannot instantiate static class `ServiceSymbol`.");
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Global symbol for the AsyncConstructable interface.
|
|
19
|
-
*/
|
|
20
|
-
static asyncInit = Symbol.for("asyncInit");
|
|
21
|
-
/**
|
|
22
|
-
* Global symbol to mark an object as disposed.
|
|
23
|
-
*/
|
|
24
|
-
static asyncDisposed = Symbol.for("asyncDisposed");
|
|
25
|
-
/**
|
|
26
|
-
* Mark an object as disposed.
|
|
27
|
-
*/
|
|
28
|
-
static markAsDisposed(disposable) {
|
|
29
|
-
if (ServiceSymbol.asyncDisposed in disposable) {
|
|
30
|
-
ConsoleLogger.warn(`[${disposable}] Already disposed!`);
|
|
31
|
-
return false;
|
|
32
|
-
}
|
|
33
|
-
Object.assign(disposable, { AsyncDisposedSymbol: true });
|
|
34
|
-
return true;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Type-predicate to determine if an object has been disposed.
|
|
38
|
-
*/
|
|
39
|
-
static isDisposed(disposable) {
|
|
40
|
-
return ServiceSymbol.asyncDisposed in disposable;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Type-predicate to determine if a given input is an object which implements the `AsyncInitializable` interface.
|
|
44
|
-
*/
|
|
45
|
-
static isAsyncInitializable(input) {
|
|
46
|
-
return ServiceSymbol.asyncInit in input && typeof input[ServiceSymbol.asyncInit] === "function";
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Type-predicate to determine if a given input is an object which implements the `AsyncDisposable` interface.
|
|
50
|
-
*/
|
|
51
|
-
static isAsyncDisposable(input) {
|
|
52
|
-
if (!input || typeof input !== "object")
|
|
53
|
-
return false;
|
|
54
|
-
return Object.hasOwn(input, Symbol.asyncDispose);
|
|
55
|
-
}
|
|
56
|
-
static toString() {
|
|
57
|
-
return "ServiceSymbol";
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
//# sourceMappingURL=ServiceSymbol.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ServiceSymbol.js","sourceRoot":"","sources":["../../lifecycle/ServiceSymbol.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AA0BnD;;;;;GAKG;AACH,MAAM,OAAO,aAAa;IACzB;QACC,MAAM,IAAI,SAAS,CAAC,kDAAkD,CAAC,CAAA;IACxE,CAAC;IAED;;OAEG;IACI,MAAM,CAAU,SAAS,GAAkB,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,CAAA;IAEzE;;OAEG;IACI,MAAM,CAAU,aAAa,GAAkB,MAAM,CAAC,GAAG,CAAC,eAAe,CAAC,CAAA;IAEjF;;OAEG;IACI,MAAM,CAAC,cAAc,CAAC,UAA2B;QACvD,IAAI,aAAa,CAAC,aAAa,IAAI,UAAU,EAAE,CAAC;YAC/C,aAAa,CAAC,IAAI,CAAC,IAAI,UAAU,qBAAqB,CAAC,CAAA;YAEvD,OAAO,KAAK,CAAA;QACb,CAAC;QAED,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE,mBAAmB,EAAE,IAAI,EAAE,CAAC,CAAA;QAExD,OAAO,IAAI,CAAA;IACZ,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,UAAU,CAAC,UAA2B;QACnD,OAAO,aAAa,CAAC,aAAa,IAAI,UAAU,CAAA;IACjD,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,oBAAoB,CAAC,KAAsB;QACxD,OAAO,aAAa,CAAC,SAAS,IAAI,KAAK,IAAI,OAAO,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,KAAK,UAAU,CAAA;IAChG,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,iBAAiB,CAAI,KAAQ;QAC1C,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;YAAE,OAAO,KAAK,CAAA;QAErD,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,YAAY,CAAC,CAAA;IACjD,CAAC;IAEM,MAAM,CAAC,QAAQ;QACrB,OAAO,eAAe,CAAA;IACvB,CAAC"}
|
package/out/lifecycle/index.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
|
-
* Lifecycle utilities.
|
|
7
|
-
*/
|
|
8
|
-
export * from "./lru-cache.ts";
|
|
9
|
-
export * from "./services.ts";
|
|
10
|
-
export * from "./ServiceSymbol.ts";
|
|
11
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lifecycle/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA"}
|
package/out/lifecycle/index.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
|
-
* Lifecycle utilities.
|
|
7
|
-
*/
|
|
8
|
-
export * from "./lru-cache.js";
|
|
9
|
-
export * from "./services.js";
|
|
10
|
-
export * from "./ServiceSymbol.js";
|
|
11
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lifecycle/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
|
-
* LRU cache utilities.
|
|
7
|
-
*/
|
|
8
|
-
import { LRUCache } from "lru-cache";
|
|
9
|
-
export interface AsyncDisposableLRUCacheOptions {
|
|
10
|
-
max: number;
|
|
11
|
-
displayName?: string;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* An LRU cache that automatically disposes of its values when they are evicted.
|
|
15
|
-
*/
|
|
16
|
-
export declare class AsyncDisposableLRUCache<K extends object, V extends AsyncDisposable> extends LRUCache<K, V> implements AsyncDisposable {
|
|
17
|
-
readonly displayName: string;
|
|
18
|
-
constructor({ max, displayName }: AsyncDisposableLRUCacheOptions);
|
|
19
|
-
[Symbol.asyncDispose](): Promise<void>;
|
|
20
|
-
toString(): string;
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=lru-cache.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lru-cache.d.ts","sourceRoot":"","sources":["../../lifecycle/lru-cache.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAEpC,MAAM,WAAW,8BAA8B;IAC9C,GAAG,EAAE,MAAM,CAAA;IACX,WAAW,CAAC,EAAE,MAAM,CAAA;CACpB;AAED;;GAEG;AACH,qBAAa,uBAAuB,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,eAAe,CAC/E,SAAQ,QAAQ,CAAC,CAAC,EAAE,CAAC,CACrB,YAAW,eAAe;IAE1B,SAAgB,WAAW,EAAE,MAAM,CAAA;gBAEvB,EAAE,GAAG,EAAE,WAAW,EAAE,EAAE,8BAA8B;IASnD,CAAC,MAAM,CAAC,YAAY,CAAC;IAOlB,QAAQ;CAGxB"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
|
-
* LRU cache utilities.
|
|
7
|
-
*/
|
|
8
|
-
import { LRUCache } from "lru-cache";
|
|
9
|
-
/**
|
|
10
|
-
* An LRU cache that automatically disposes of its values when they are evicted.
|
|
11
|
-
*/
|
|
12
|
-
export class AsyncDisposableLRUCache extends LRUCache {
|
|
13
|
-
displayName;
|
|
14
|
-
constructor({ max, displayName }) {
|
|
15
|
-
super({
|
|
16
|
-
max,
|
|
17
|
-
dispose: (value) => value[Symbol.asyncDispose](),
|
|
18
|
-
});
|
|
19
|
-
this.displayName = displayName ?? "cache";
|
|
20
|
-
}
|
|
21
|
-
async [Symbol.asyncDispose]() {
|
|
22
|
-
for (const [key, value] of this.entries()) {
|
|
23
|
-
await value[Symbol.asyncDispose]();
|
|
24
|
-
this.delete(key);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
toString() {
|
|
28
|
-
return `Async LRU ${this.displayName}`;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=lru-cache.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lru-cache.js","sourceRoot":"","sources":["../../lifecycle/lru-cache.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAOpC;;GAEG;AACH,MAAM,OAAO,uBACZ,SAAQ,QAAc;IAGN,WAAW,CAAQ;IAEnC,YAAY,EAAE,GAAG,EAAE,WAAW,EAAkC;QAC/D,KAAK,CAAC;YACL,GAAG;YACH,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE;SAChD,CAAC,CAAA;QAEF,IAAI,CAAC,WAAW,GAAG,WAAW,IAAI,OAAO,CAAA;IAC1C,CAAC;IAEM,KAAK,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC;QACjC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,IAAI,CAAC,OAAO,EAAE,EAAE,CAAC;YAC3C,MAAM,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,CAAA;YAClC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;QACjB,CAAC;IACF,CAAC;IAEe,QAAQ;QACvB,OAAO,aAAa,IAAI,CAAC,WAAW,EAAE,CAAA;IACvC,CAAC;CACD"}
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
|
-
* Utilities for creating branded nominal types.
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* Type definition for a class which implements the AsyncDisposable interface.
|
|
10
|
-
*
|
|
11
|
-
* @category Utilities
|
|
12
|
-
* @internal
|
|
13
|
-
*/
|
|
14
|
-
export type ServiceConstructor<T> = new (...args: any[]) => T & AsyncDisposable;
|
|
15
|
-
/**
|
|
16
|
-
* Type-predicate to determine if a given input is a ServiceConstructor, i.e. a function which is a constructor for a
|
|
17
|
-
* class which implements the AsyncDisposable interface.
|
|
18
|
-
*/
|
|
19
|
-
export declare function isServiceConstructor<T>(input: unknown): input is ServiceConstructor<T>;
|
|
20
|
-
/**
|
|
21
|
-
* Stateful context for a service registry.
|
|
22
|
-
*
|
|
23
|
-
* This is used to provide a context for services during resolution.
|
|
24
|
-
*/
|
|
25
|
-
export interface ServiceRegistryContext {
|
|
26
|
-
abortController: AbortController;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Type definition for a function which returns an instance which implements the AsyncDisposable interface.
|
|
30
|
-
*
|
|
31
|
-
* @category Utilities
|
|
32
|
-
* @internal
|
|
33
|
-
*/
|
|
34
|
-
export type ServiceCallback<T extends AsyncDisposable> = {
|
|
35
|
-
(context: ServiceRegistryContext): Promise<T> | T;
|
|
36
|
-
};
|
|
37
|
-
export type ServiceResolver<T extends AsyncDisposable = AsyncDisposable> = T | ServiceCallback<T> | ServiceConstructor<T>;
|
|
38
|
-
declare const kInstance: unique symbol;
|
|
39
|
-
declare const kResolver: unique symbol;
|
|
40
|
-
declare const kRegistryMap: unique symbol;
|
|
41
|
-
/**
|
|
42
|
-
* Given a service which may not yet be resolved, intercept any method calls and resolve the service before invoking the
|
|
43
|
-
* method.
|
|
44
|
-
*
|
|
45
|
-
* @category Services
|
|
46
|
-
*/
|
|
47
|
-
export type ServiceMethodResolver<T> = {
|
|
48
|
-
[K in keyof T]: T[K] extends (...args: infer A) => infer R ? (...args: A) => Promise<Awaited<R>> : T[K];
|
|
49
|
-
};
|
|
50
|
-
/**
|
|
51
|
-
* Promise-like wrapper for asynchronous services.
|
|
52
|
-
*
|
|
53
|
-
* @see {@linkcode ServiceRepository} for usage.
|
|
54
|
-
*/
|
|
55
|
-
export declare class Service<T extends AsyncDisposable = AsyncDisposable> implements PromiseLike<T>, AsyncDisposable {
|
|
56
|
-
/**
|
|
57
|
-
* Instance of the service.
|
|
58
|
-
*
|
|
59
|
-
* @internal
|
|
60
|
-
*/
|
|
61
|
-
[kInstance]: T | null;
|
|
62
|
-
/**
|
|
63
|
-
* Resolver for the service.
|
|
64
|
-
*
|
|
65
|
-
* @internal
|
|
66
|
-
*/
|
|
67
|
-
[kResolver]?: ServiceResolver<T>;
|
|
68
|
-
/**
|
|
69
|
-
* Context for the parent service registry.
|
|
70
|
-
*/
|
|
71
|
-
readonly context: ServiceRegistryContext;
|
|
72
|
-
protected constructor(resolver: ServiceResolver<T>);
|
|
73
|
-
/**
|
|
74
|
-
* Given an instance of a service, attach it to the resolver.
|
|
75
|
-
*
|
|
76
|
-
* This can be used to attach a service that was created outside of the resolver, such as when a resolver is defined
|
|
77
|
-
* from a TypeScript interface.
|
|
78
|
-
*
|
|
79
|
-
* @internal
|
|
80
|
-
*/
|
|
81
|
-
attach(service: T): void;
|
|
82
|
-
/**
|
|
83
|
-
* Resolve the service instance.
|
|
84
|
-
*
|
|
85
|
-
* This method is called implicitly when the service is awaited.
|
|
86
|
-
*/
|
|
87
|
-
protected resolve(): Promise<T>;
|
|
88
|
-
/**
|
|
89
|
-
* Resolve the service instance. Called implicitly when the service is awaited.
|
|
90
|
-
*/
|
|
91
|
-
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined): Promise<TResult1 | TResult2>;
|
|
92
|
-
[Symbol.asyncDispose](): Promise<void>;
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* Service repository for managing asynchronous services.
|
|
96
|
-
*
|
|
97
|
-
* @singleton
|
|
98
|
-
*/
|
|
99
|
-
export declare class ServiceRepository extends Service<AsyncDisposable> {
|
|
100
|
-
static readonly [kRegistryMap]: Map<any, Service<any>>;
|
|
101
|
-
/**
|
|
102
|
-
* Abort controller for the service repository.
|
|
103
|
-
*/
|
|
104
|
-
static readonly abortController: AbortController;
|
|
105
|
-
/**
|
|
106
|
-
* Inspect the current state of the service registry.
|
|
107
|
-
*/
|
|
108
|
-
static inspect(): Service<any>[];
|
|
109
|
-
/**
|
|
110
|
-
* Dispose of all services in the registry.
|
|
111
|
-
*/
|
|
112
|
-
static [Symbol.asyncDispose](): Promise<void>;
|
|
113
|
-
/**
|
|
114
|
-
* Dispose of all services in the registry.
|
|
115
|
-
*/
|
|
116
|
-
static dispose(): Promise<void>;
|
|
117
|
-
/**
|
|
118
|
-
* Register a pre-initialized service with the service repository.
|
|
119
|
-
*
|
|
120
|
-
* @param service - An instance of a service.
|
|
121
|
-
*/
|
|
122
|
-
static register<T extends AsyncDisposable>(service: T): Service<T> & ServiceMethodResolver<T>;
|
|
123
|
-
/**
|
|
124
|
-
* Register a service resolver with the service repository.
|
|
125
|
-
*
|
|
126
|
-
* @param serviceCallback - A callback which returns a service instance.
|
|
127
|
-
*/
|
|
128
|
-
static register<T extends AsyncDisposable>(serviceCallback: ServiceCallback<T>): Service<T> & ServiceMethodResolver<T>;
|
|
129
|
-
/**
|
|
130
|
-
* Register a service constructor with the service repository.
|
|
131
|
-
*
|
|
132
|
-
* @param ServiceConstructor - A constructor which returns a service instance.
|
|
133
|
-
*/
|
|
134
|
-
static register<T extends AsyncDisposable>(ServiceConstructor: ServiceConstructor<T>): Service<T> & ServiceMethodResolver<T>;
|
|
135
|
-
/**
|
|
136
|
-
* Register a service with the service repository.
|
|
137
|
-
*
|
|
138
|
-
* @param resolver - A service resolver, instance, or constructor.
|
|
139
|
-
*/
|
|
140
|
-
static register<T extends AsyncDisposable>(resolver: ServiceResolver<T>): Service<T> & ServiceMethodResolver<T>;
|
|
141
|
-
constructor();
|
|
142
|
-
}
|
|
143
|
-
export {};
|
|
144
|
-
//# sourceMappingURL=services.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
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