@mailwoman/core 10.4.0 → 10.5.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/lib/api/ckan.ts +1 -1
- package/lib/decoder/serialize/json.ts +1 -1
- package/lib/env/env-file.ts +71 -0
- package/lib/env.ts +15 -9
- package/lib/fs/readers/stat.ts +16 -1
- package/lib/fs/readers.ts +15 -0
- package/lib/license/docs-site.ts +1 -1
- package/lib/module/compiled-freshness.ts +5 -1
- package/lib/types/classifier.ts +1 -1
- package/out/api/ckan.d.ts +1 -1
- package/out/decoder/serialize/json.js +1 -1
- package/out/env/env-file.d.ts +26 -0
- package/out/env/env-file.d.ts.map +1 -0
- package/out/env/env-file.js +60 -0
- package/out/env/env-file.js.map +1 -0
- package/out/env.d.ts.map +1 -1
- package/out/env.js +15 -10
- package/out/env.js.map +1 -1
- package/out/fs/readers/stat.d.ts +9 -1
- package/out/fs/readers/stat.d.ts.map +1 -1
- package/out/fs/readers/stat.js +16 -0
- package/out/fs/readers/stat.js.map +1 -1
- package/out/fs/readers.d.ts +11 -0
- package/out/fs/readers.d.ts.map +1 -1
- package/out/fs/readers.js +14 -0
- package/out/fs/readers.js.map +1 -1
- package/out/license/docs-site.d.ts +1 -1
- package/out/license/docs-site.js +1 -1
- package/out/module/compiled-freshness.d.ts.map +1 -1
- package/out/module/compiled-freshness.js +5 -1
- package/out/module/compiled-freshness.js.map +1 -1
- package/out/tools/coarse-placer/paths.d.ts +2 -2
- package/out/tools/coarse-placer/paths.js +2 -2
- package/out/types/classifier.d.ts +1 -1
- package/package.json +7 -7
- package/tools/coarse-placer/paths.ts +2 -2
package/lib/api/ckan.ts
CHANGED
|
@@ -34,7 +34,7 @@ import { type UnknownSpan, unknownSpans } from "#decoder/unknown-spans"
|
|
|
34
34
|
*/
|
|
35
35
|
export const DroppedSpanSchema = z.object({
|
|
36
36
|
/**
|
|
37
|
-
* The tag
|
|
37
|
+
* The tag the span holds.
|
|
38
38
|
*
|
|
39
39
|
* It is always one already present in the output, because a drop happens only when the slot was taken.
|
|
40
40
|
*/
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Sister Software
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
* @author Teffen Ellis, et al.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { dirname, resolvePath } from "path-ts"
|
|
8
|
+
|
|
9
|
+
import { readLocalTextFileSync } from "#fs/readers"
|
|
10
|
+
import { isFileSync } from "#fs/readers/stat"
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The `.env` file a process started in `workingDirectory` reads, or `null` when there is none.
|
|
14
|
+
*
|
|
15
|
+
* `process.loadEnvFile` reads the working directory's own `.env`.
|
|
16
|
+
* A git worktree has none, because the file is untracked and sits in the main checkout,
|
|
17
|
+
* so repository code run from a worktree would read the platform-default data root
|
|
18
|
+
* while the operator's data root is one `.git` pointer away.
|
|
19
|
+
*
|
|
20
|
+
* This resolves the file the way git resolves its common directory.
|
|
21
|
+
* A `.git` file in the working tree holds the path of the worktree's git directory.
|
|
22
|
+
*
|
|
23
|
+
* That directory's `commondir` file holds the path of the shared git directory.
|
|
24
|
+
* The main checkout is the shared directory's parent.
|
|
25
|
+
*
|
|
26
|
+
* A `.env` beside the working directory wins over the main checkout's, so a worktree can carry its own.
|
|
27
|
+
*
|
|
28
|
+
* The reads are synchronous because the env module folds the file into `process.env`
|
|
29
|
+
* at import time, ahead of any `await`.
|
|
30
|
+
*/
|
|
31
|
+
export function resolveEnvFile(workingDirectory: string = process.cwd()): string | null {
|
|
32
|
+
const local = resolvePath(workingDirectory, ".env")
|
|
33
|
+
|
|
34
|
+
if (isFileSync(local)) return local
|
|
35
|
+
|
|
36
|
+
const mainCheckout = mainCheckoutOf(workingDirectory)
|
|
37
|
+
|
|
38
|
+
if (!mainCheckout) return null
|
|
39
|
+
|
|
40
|
+
const shared = resolvePath(mainCheckout, ".env")
|
|
41
|
+
|
|
42
|
+
return isFileSync(shared) ? shared : null
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* The line of a worktree's `.git` file that holds its git directory.
|
|
47
|
+
*/
|
|
48
|
+
const GIT_DIRECTORY_LINE = /^gitdir:[\t ]*(.+?)[\t ]*$/mu
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* The main checkout of the repository whose worktree is `workingDirectory`,
|
|
52
|
+
* or `null` when the directory is not a worktree's root.
|
|
53
|
+
*/
|
|
54
|
+
function mainCheckoutOf(workingDirectory: string): string | null {
|
|
55
|
+
const pointer = resolvePath(workingDirectory, ".git")
|
|
56
|
+
|
|
57
|
+
if (!isFileSync(pointer)) return null
|
|
58
|
+
|
|
59
|
+
const gitDirectoryLine = GIT_DIRECTORY_LINE.exec(readLocalTextFileSync(pointer))
|
|
60
|
+
|
|
61
|
+
if (!gitDirectoryLine) return null
|
|
62
|
+
|
|
63
|
+
const gitDirectory = resolvePath(workingDirectory, gitDirectoryLine[1]!)
|
|
64
|
+
const commonDirectoryPath = resolvePath(gitDirectory, "commondir")
|
|
65
|
+
|
|
66
|
+
if (!isFileSync(commonDirectoryPath)) return null
|
|
67
|
+
|
|
68
|
+
const commonDirectory = resolvePath(gitDirectory, readLocalTextFileSync(commonDirectoryPath).trim())
|
|
69
|
+
|
|
70
|
+
return dirname(commonDirectory)
|
|
71
|
+
}
|
package/lib/env.ts
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import type z from "zod"
|
|
8
8
|
|
|
9
|
+
import { resolveEnvFile } from "#env/env-file"
|
|
9
10
|
import { PrivateEnvSchema, PublicEnvSchema } from "#env/schema"
|
|
10
11
|
|
|
11
12
|
export { DefaultMailwomanPaths } from "#env/paths"
|
|
@@ -14,20 +15,25 @@ export { DefaultMailwomanPaths } from "#env/paths"
|
|
|
14
15
|
* The `.env` layer, folded into `process.env` when this module is evaluated — process-startup semantics.
|
|
15
16
|
*
|
|
16
17
|
* `process.loadEnvFile` is the runtime's own reader: synchronous, so the views below can expose
|
|
17
|
-
* synchronous getters without a top-level `await` (which the Docusaurus config loader cannot evaluate)
|
|
18
|
-
*
|
|
18
|
+
* synchronous getters without a top-level `await` (which the Docusaurus config loader cannot evaluate).
|
|
19
|
+
* `resolveEnvFile` picks the working directory's `.env`, or the main checkout's
|
|
20
|
+
* when the working directory is a git worktree, which carries no `.env` of its own.
|
|
21
|
+
*
|
|
19
22
|
* A variable already in `process.env` wins over the file.
|
|
20
23
|
* The views have always used this precedence.
|
|
21
24
|
*
|
|
22
25
|
* An absent `.env` is the common case and is not an error.
|
|
23
26
|
*/
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
const envFile = resolveEnvFile()
|
|
28
|
+
|
|
29
|
+
if (envFile) {
|
|
30
|
+
try {
|
|
31
|
+
// oxlint-disable-next-line sister-software/no-process-globals -- this module is the typed process.env boundary
|
|
32
|
+
process.loadEnvFile(envFile)
|
|
33
|
+
} catch {
|
|
34
|
+
// The file exists and the runtime could not read it.
|
|
35
|
+
// The process environment comes from `process.env` only.
|
|
36
|
+
}
|
|
31
37
|
}
|
|
32
38
|
|
|
33
39
|
/**
|
package/lib/fs/readers/stat.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import { AssertionError } from "node:assert"
|
|
8
|
-
import type
|
|
8
|
+
import { type Dirent, type Mode, type Stats, statSync } from "node:fs"
|
|
9
9
|
import {
|
|
10
10
|
open as openNative,
|
|
11
11
|
access,
|
|
@@ -201,6 +201,21 @@ export function isFile(path: PathBuilderLike | URL): Promise<boolean> {
|
|
|
201
201
|
return tryStat(path).then((stats) => stats?.isFile() ?? false)
|
|
202
202
|
}
|
|
203
203
|
|
|
204
|
+
/**
|
|
205
|
+
* Whether a path exists and is a file, read synchronously.
|
|
206
|
+
*
|
|
207
|
+
* The env module folds `.env` into `process.env` when it is imported,
|
|
208
|
+
* ahead of any `await`, so it cannot use {@linkcode isFile}.
|
|
209
|
+
* Every other caller can, and should.
|
|
210
|
+
*/
|
|
211
|
+
export function isFileSync(path: PathBuilderLike): boolean {
|
|
212
|
+
try {
|
|
213
|
+
return statSync(resolvePath(path)).isFile()
|
|
214
|
+
} catch {
|
|
215
|
+
return false
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
204
219
|
/**
|
|
205
220
|
* Whether a path exists and is a symbolic link.
|
|
206
221
|
*/
|
package/lib/fs/readers.ts
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* makes no blocking filesystem calls. The `debt` check in `lib/repo-health` counts any violations.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
+
import { readFileSync } from "node:fs"
|
|
11
12
|
import { readFile } from "node:fs/promises"
|
|
12
13
|
|
|
13
14
|
import { type PathBuilderLike, resolvePath } from "path-ts"
|
|
@@ -90,6 +91,20 @@ function readTarget(pathSegments: Array<PathBuilderLike | URL>): URL | string {
|
|
|
90
91
|
return resolvePath(...(pathSegments as PathBuilderLike[]))
|
|
91
92
|
}
|
|
92
93
|
|
|
94
|
+
/**
|
|
95
|
+
* Read a local text file synchronously.
|
|
96
|
+
*
|
|
97
|
+
* The env module folds `.env` into `process.env` when it is imported, ahead of any `await`,
|
|
98
|
+
* so it cannot use {@linkcode readLocalTextFile}.
|
|
99
|
+
* Every other caller can, and should.
|
|
100
|
+
*
|
|
101
|
+
* @category Files
|
|
102
|
+
* @runtime node
|
|
103
|
+
*/
|
|
104
|
+
export function readLocalTextFileSync(...pathSegments: PathBuilderLike[]): string {
|
|
105
|
+
return readFileSync(resolvePath(...pathSegments), "utf8")
|
|
106
|
+
}
|
|
107
|
+
|
|
93
108
|
/**
|
|
94
109
|
* Read a local text file.
|
|
95
110
|
*
|
package/lib/license/docs-site.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
6
|
* Where the docs site lives, for every URL the license posture points at: the well-known key register and the
|
|
7
|
-
* `/license` page. One derivation, so a configured `MAILWOMAN_DOCS_URL` moves
|
|
7
|
+
* `/license` page. One derivation serves both, so a configured `MAILWOMAN_DOCS_URL` moves them together.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { $public } from "#env"
|
|
@@ -124,6 +124,7 @@ export async function checkCompiledFreshness(
|
|
|
124
124
|
workspaces: readonly string[]
|
|
125
125
|
): Promise<CompiledFreshness> {
|
|
126
126
|
let newestSource: TimestampedFile | null = null
|
|
127
|
+
let newestSourceWorkspace: string | null = null
|
|
127
128
|
let newestCompiled: TimestampedFile | null = null
|
|
128
129
|
|
|
129
130
|
const root = PathBuilder.from(repoRoot)
|
|
@@ -142,6 +143,7 @@ export async function checkCompiledFreshness(
|
|
|
142
143
|
|
|
143
144
|
if (source && (!newestSource || source.mtimeMs > newestSource.mtimeMs)) {
|
|
144
145
|
newestSource = source
|
|
146
|
+
newestSourceWorkspace = workspace
|
|
145
147
|
}
|
|
146
148
|
|
|
147
149
|
if (compiled && (!newestCompiled || compiled.mtimeMs > newestCompiled.mtimeMs)) {
|
|
@@ -167,7 +169,9 @@ export async function checkCompiledFreshness(
|
|
|
167
169
|
newestCompiled,
|
|
168
170
|
reason:
|
|
169
171
|
`Compiled output is ${driftSeconds}s older than source: ${newestSource.path} was modified after ` +
|
|
170
|
-
`${newestCompiled.path}. Run \`yarn compile\` and re-run
|
|
172
|
+
`${newestCompiled.path}. Run \`yarn compile\` and re-run. When the source reverted to content ` +
|
|
173
|
+
`that is already compiled, \`tsc -b\` skips the emit and the output stays stale, so run ` +
|
|
174
|
+
`\`yarn tsc -b ${newestSourceWorkspace} --force\` instead.`,
|
|
171
175
|
}
|
|
172
176
|
}
|
|
173
177
|
|
package/lib/types/classifier.ts
CHANGED
|
@@ -36,7 +36,7 @@ export type Section = Span
|
|
|
36
36
|
export type ClassificationProposalSource = "neural" | "merged"
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
|
-
* A typed classification candidate
|
|
39
|
+
* A classifier produces this typed classification candidate.
|
|
40
40
|
*
|
|
41
41
|
* `source` and `source_id` identify the origin of each proposal without external state.
|
|
42
42
|
*/
|
package/out/api/ckan.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ import { unknownSpans } from "#decoder/unknown-spans";
|
|
|
30
30
|
*/
|
|
31
31
|
export const DroppedSpanSchema = z.object({
|
|
32
32
|
/**
|
|
33
|
-
* The tag
|
|
33
|
+
* The tag the span holds.
|
|
34
34
|
*
|
|
35
35
|
* It is always one already present in the output, because a drop happens only when the slot was taken.
|
|
36
36
|
*/
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Sister Software
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
* @author Teffen Ellis, et al.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* The `.env` file a process started in `workingDirectory` reads, or `null` when there is none.
|
|
8
|
+
*
|
|
9
|
+
* `process.loadEnvFile` reads the working directory's own `.env`.
|
|
10
|
+
* A git worktree has none, because the file is untracked and sits in the main checkout,
|
|
11
|
+
* so repository code run from a worktree would read the platform-default data root
|
|
12
|
+
* while the operator's data root is one `.git` pointer away.
|
|
13
|
+
*
|
|
14
|
+
* This resolves the file the way git resolves its common directory.
|
|
15
|
+
* A `.git` file in the working tree holds the path of the worktree's git directory.
|
|
16
|
+
*
|
|
17
|
+
* That directory's `commondir` file holds the path of the shared git directory.
|
|
18
|
+
* The main checkout is the shared directory's parent.
|
|
19
|
+
*
|
|
20
|
+
* A `.env` beside the working directory wins over the main checkout's, so a worktree can carry its own.
|
|
21
|
+
*
|
|
22
|
+
* The reads are synchronous because the env module folds the file into `process.env`
|
|
23
|
+
* at import time, ahead of any `await`.
|
|
24
|
+
*/
|
|
25
|
+
export declare function resolveEnvFile(workingDirectory?: string): string | null;
|
|
26
|
+
//# sourceMappingURL=env-file.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env-file.d.ts","sourceRoot":"","sources":["../../lib/env/env-file.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,cAAc,CAAC,gBAAgB,GAAE,MAAsB,GAAG,MAAM,GAAG,IAAI,CAYtF"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Sister Software
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
* @author Teffen Ellis, et al.
|
|
5
|
+
*/
|
|
6
|
+
import { dirname, resolvePath } from "path-ts";
|
|
7
|
+
import { readLocalTextFileSync } from "#fs/readers";
|
|
8
|
+
import { isFileSync } from "#fs/readers/stat";
|
|
9
|
+
/**
|
|
10
|
+
* The `.env` file a process started in `workingDirectory` reads, or `null` when there is none.
|
|
11
|
+
*
|
|
12
|
+
* `process.loadEnvFile` reads the working directory's own `.env`.
|
|
13
|
+
* A git worktree has none, because the file is untracked and sits in the main checkout,
|
|
14
|
+
* so repository code run from a worktree would read the platform-default data root
|
|
15
|
+
* while the operator's data root is one `.git` pointer away.
|
|
16
|
+
*
|
|
17
|
+
* This resolves the file the way git resolves its common directory.
|
|
18
|
+
* A `.git` file in the working tree holds the path of the worktree's git directory.
|
|
19
|
+
*
|
|
20
|
+
* That directory's `commondir` file holds the path of the shared git directory.
|
|
21
|
+
* The main checkout is the shared directory's parent.
|
|
22
|
+
*
|
|
23
|
+
* A `.env` beside the working directory wins over the main checkout's, so a worktree can carry its own.
|
|
24
|
+
*
|
|
25
|
+
* The reads are synchronous because the env module folds the file into `process.env`
|
|
26
|
+
* at import time, ahead of any `await`.
|
|
27
|
+
*/
|
|
28
|
+
export function resolveEnvFile(workingDirectory = process.cwd()) {
|
|
29
|
+
const local = resolvePath(workingDirectory, ".env");
|
|
30
|
+
if (isFileSync(local))
|
|
31
|
+
return local;
|
|
32
|
+
const mainCheckout = mainCheckoutOf(workingDirectory);
|
|
33
|
+
if (!mainCheckout)
|
|
34
|
+
return null;
|
|
35
|
+
const shared = resolvePath(mainCheckout, ".env");
|
|
36
|
+
return isFileSync(shared) ? shared : null;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The line of a worktree's `.git` file that holds its git directory.
|
|
40
|
+
*/
|
|
41
|
+
const GIT_DIRECTORY_LINE = /^gitdir:[\t ]*(.+?)[\t ]*$/mu;
|
|
42
|
+
/**
|
|
43
|
+
* The main checkout of the repository whose worktree is `workingDirectory`,
|
|
44
|
+
* or `null` when the directory is not a worktree's root.
|
|
45
|
+
*/
|
|
46
|
+
function mainCheckoutOf(workingDirectory) {
|
|
47
|
+
const pointer = resolvePath(workingDirectory, ".git");
|
|
48
|
+
if (!isFileSync(pointer))
|
|
49
|
+
return null;
|
|
50
|
+
const gitDirectoryLine = GIT_DIRECTORY_LINE.exec(readLocalTextFileSync(pointer));
|
|
51
|
+
if (!gitDirectoryLine)
|
|
52
|
+
return null;
|
|
53
|
+
const gitDirectory = resolvePath(workingDirectory, gitDirectoryLine[1]);
|
|
54
|
+
const commonDirectoryPath = resolvePath(gitDirectory, "commondir");
|
|
55
|
+
if (!isFileSync(commonDirectoryPath))
|
|
56
|
+
return null;
|
|
57
|
+
const commonDirectory = resolvePath(gitDirectory, readLocalTextFileSync(commonDirectoryPath).trim());
|
|
58
|
+
return dirname(commonDirectory);
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=env-file.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env-file.js","sourceRoot":"","sources":["../../lib/env/env-file.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;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AO,OAAO,CAAC,eAAe,CAAC,CAAA;AAChC,CAAC"}
|
package/out/env.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../lib/env.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../lib/env.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AAKxB,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AA2BlD;;;;;;;;;;;;GAYG;AACH,wBAAgB,OAAO,CAAC,KAAK,SAAS,CAAC,CAAC,WAAW,EAAE,IAAI,SAAS,MAAM,GAAG,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,EAC9F,MAAM,EAAE,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,EAC1B,IAAI,CAAC,EAAE,IAAI,GACT,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAgCpC;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,OAAO;;;;;;;;;CAA2B,CAAA;AAE/C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,QAAQ,8CAA4B,CAAA"}
|
package/out/env.js
CHANGED
|
@@ -3,27 +3,32 @@
|
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*/
|
|
6
|
+
import { resolveEnvFile } from "#env/env-file";
|
|
6
7
|
import { PrivateEnvSchema, PublicEnvSchema } from "#env/schema";
|
|
7
8
|
export { DefaultMailwomanPaths } from "#env/paths";
|
|
8
9
|
/**
|
|
9
10
|
* The `.env` layer, folded into `process.env` when this module is evaluated — process-startup semantics.
|
|
10
11
|
*
|
|
11
12
|
* `process.loadEnvFile` is the runtime's own reader: synchronous, so the views below can expose
|
|
12
|
-
* synchronous getters without a top-level `await` (which the Docusaurus config loader cannot evaluate)
|
|
13
|
-
*
|
|
13
|
+
* synchronous getters without a top-level `await` (which the Docusaurus config loader cannot evaluate).
|
|
14
|
+
* `resolveEnvFile` picks the working directory's `.env`, or the main checkout's
|
|
15
|
+
* when the working directory is a git worktree, which carries no `.env` of its own.
|
|
16
|
+
*
|
|
14
17
|
* A variable already in `process.env` wins over the file.
|
|
15
18
|
* The views have always used this precedence.
|
|
16
19
|
*
|
|
17
20
|
* An absent `.env` is the common case and is not an error.
|
|
18
21
|
*/
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
const envFile = resolveEnvFile();
|
|
23
|
+
if (envFile) {
|
|
24
|
+
try {
|
|
25
|
+
// oxlint-disable-next-line sister-software/no-process-globals -- this module is the typed process.env boundary
|
|
26
|
+
process.loadEnvFile(envFile);
|
|
27
|
+
}
|
|
28
|
+
catch {
|
|
29
|
+
// The file exists and the runtime could not read it.
|
|
30
|
+
// The process environment comes from `process.env` only.
|
|
31
|
+
}
|
|
27
32
|
}
|
|
28
33
|
/**
|
|
29
34
|
* Create a live environment view, optionally extending another view without evaluating its getters.
|
package/out/env.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.js","sourceRoot":"","sources":["../lib/env.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAE/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAElD
|
|
1
|
+
{"version":3,"file":"env.js","sourceRoot":"","sources":["../lib/env.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,gBAAgB,EAAE,eAAe,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AAC,KAAK,QAAQ,EAAE,CAAC;oBAC3C,MAAM,GAAG,WAAW,CAAC,SAAS,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,CAAA;oBAC9C,QAAQ,GAAG,GAAG,IAAI,IAAI,CAAA;gBACvB,CAAC;gBAED,IAAI,CAAC,MAAM,CAAC,OAAO;oBAAE,MAAM,MAAM,CAAC,KAAK,CAAA;gBAEvC,OAAO,MAAM,CAAC,IAAI,CAAC,GAA+B,CAAC,CAAA;YACpD,CAAC;SACD,CAAC,CAAA;IACH,CAAC;IAED,OAAO,IAAI,CAAA;AACZ,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC,eAAe,CAAC,CAAA;AAE/C;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAA"}
|
package/out/fs/readers/stat.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @file Filesystem metadata readers.
|
|
5
5
|
*/
|
|
6
|
-
import type
|
|
6
|
+
import { type Dirent, type Mode, type Stats } from "node:fs";
|
|
7
7
|
import { type FileHandle } from "node:fs/promises";
|
|
8
8
|
import { type PathBuilderLike } from "path-ts";
|
|
9
9
|
import { type ByteFormatterOptions } from "#fs/formatters";
|
|
@@ -69,6 +69,14 @@ export declare function assertIsFile(path: PathBuilderLike | URL, message?: stri
|
|
|
69
69
|
* Whether a path exists and is a file.
|
|
70
70
|
*/
|
|
71
71
|
export declare function isFile(path: PathBuilderLike | URL): Promise<boolean>;
|
|
72
|
+
/**
|
|
73
|
+
* Whether a path exists and is a file, read synchronously.
|
|
74
|
+
*
|
|
75
|
+
* The env module folds `.env` into `process.env` when it is imported,
|
|
76
|
+
* ahead of any `await`, so it cannot use {@linkcode isFile}.
|
|
77
|
+
* Every other caller can, and should.
|
|
78
|
+
*/
|
|
79
|
+
export declare function isFileSync(path: PathBuilderLike): boolean;
|
|
72
80
|
/**
|
|
73
81
|
* Whether a path exists and is a symbolic link.
|
|
74
82
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stat.d.ts","sourceRoot":"","sources":["../../../lib/fs/readers/stat.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"stat.d.ts","sourceRoot":"","sources":["../../../lib/fs/readers/stat.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,IAAI,EAAE,KAAK,KAAK,EAAY,MAAM,SAAS,CAAA;AACtE,OAAO,EAQN,KAAK,UAAU,EACf,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EAAE,KAAK,eAAe,EAAe,MAAM,SAAS,CAAA;AAE3D,OAAO,EAAiB,KAAK,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AAIzE;;;;;;;;;GASG;AACH,wBAAgB,OAAO,CAAC,eAAe,EAAE,eAAe,GAAG,GAAG,GAAG,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,CAQrF;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,eAAe,GAAG,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC,CAEpE;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,eAAe,GAAG,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC,CAEpE;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,eAAe,GAAG,GAAG,GAAG,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,CAM9E;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,eAAe,GAAG,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,CAExE;AAMD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAA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AAO,CAAC,MAAM,CAAC,CAEzE;AAED;;;;GAIG;AACH,wBAAsB,cAAc,CAAC,IAAI,EAAE,eAAe,GAAG,GAAG,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,MAAM,CAAC,CAEjH;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CAE/D;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAMzE;AAED,wBAAgB,IAAI,CAAC,IAAI,EAAE,eAAe,GAAG,GAAG,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG,OAAO,CAAC,UAAU,CAAC,CAE3G;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CAE/D;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,eAAe,GAAG,GAAG,GAAG,GAAG,GAAG,MAAM,CAElE"}
|
package/out/fs/readers/stat.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* @file Filesystem metadata readers.
|
|
5
5
|
*/
|
|
6
6
|
import { AssertionError } from "node:assert";
|
|
7
|
+
import { statSync } from "node:fs";
|
|
7
8
|
import { open as openNative, access, constants, lstat, readlink, realpath, stat, } from "node:fs/promises";
|
|
8
9
|
import { resolvePath } from "path-ts";
|
|
9
10
|
import { ByteFormatter } from "#fs/formatters";
|
|
@@ -159,6 +160,21 @@ export function assertIsFile(path, message, cachedStats) {
|
|
|
159
160
|
export function isFile(path) {
|
|
160
161
|
return tryStat(path).then((stats) => stats?.isFile() ?? false);
|
|
161
162
|
}
|
|
163
|
+
/**
|
|
164
|
+
* Whether a path exists and is a file, read synchronously.
|
|
165
|
+
*
|
|
166
|
+
* The env module folds `.env` into `process.env` when it is imported,
|
|
167
|
+
* ahead of any `await`, so it cannot use {@linkcode isFile}.
|
|
168
|
+
* Every other caller can, and should.
|
|
169
|
+
*/
|
|
170
|
+
export function isFileSync(path) {
|
|
171
|
+
try {
|
|
172
|
+
return statSync(resolvePath(path)).isFile();
|
|
173
|
+
}
|
|
174
|
+
catch {
|
|
175
|
+
return false;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
162
178
|
/**
|
|
163
179
|
* Whether a path exists and is a symbolic link.
|
|
164
180
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stat.js","sourceRoot":"","sources":["../../../lib/fs/readers/stat.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"stat.js","sourceRoot":"","sources":["../../../lib/fs/readers/stat.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,EAAsC,QAAQ,EAAE,MAAM,SAAS,CAAA;AACtE,OAAO,EACN,IAAI,IAAI,UAAU,EAClB,MAAM,EACN,SAAS,EACT,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,IAAI,GAEJ,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EAAwB,WAAW,EAAE,MAAM,SAAS,CAAA;AAE3D,OAAO,EAAE,aAAa,EAA6B,MAAM,gBAAgB,CAAA;AAEzE,qBAAqB;AAErB;;;;;;;;;GASG;AACH,MAAM,UAAU,OAAO,CAAC,eAAsC;IAC7D,MAAM,MAAM,GAAG,eAAe,YAAY,GAAG,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,eAAe,CAAC,QAAQ,EAAE,CAAA;IAE5F,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;QACnC,IAAI,KAAK,CAAC,I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AC,CAAA;AACjC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,QAAQ,CAAC,IAA2B;IACnD,OAAO,IAAI,YAAY,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAA;AACpD,CAAC;AAED,aAAa"}
|
package/out/fs/readers.d.ts
CHANGED
|
@@ -35,6 +35,17 @@ export declare function readFileHead(path: PathBuilderLike, byteSize: number): P
|
|
|
35
35
|
* @throws Enoent when the file does not exist.
|
|
36
36
|
*/
|
|
37
37
|
export declare function readFileRange(path: PathBuilderLike, offset: number, length: number): Promise<Buffer>;
|
|
38
|
+
/**
|
|
39
|
+
* Read a local text file synchronously.
|
|
40
|
+
*
|
|
41
|
+
* The env module folds `.env` into `process.env` when it is imported, ahead of any `await`,
|
|
42
|
+
* so it cannot use {@linkcode readLocalTextFile}.
|
|
43
|
+
* Every other caller can, and should.
|
|
44
|
+
*
|
|
45
|
+
* @category Files
|
|
46
|
+
* @runtime node
|
|
47
|
+
*/
|
|
48
|
+
export declare function readLocalTextFileSync(...pathSegments: PathBuilderLike[]): string;
|
|
38
49
|
/**
|
|
39
50
|
* Read a local text file.
|
|
40
51
|
*
|
package/out/fs/readers.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readers.d.ts","sourceRoot":"","sources":["../../lib/fs/readers.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"readers.d.ts","sourceRoot":"","sources":["../../lib/fs/readers.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,EAAE,KAAK,eAAe,EAAe,MAAM,SAAS,CAAA;AAK3D,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AACtD,YAAY,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAIlD;;;;;;;;;GASG;AACH,wBAAsB,YAAY,CAAC,IA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SAAS,KAAK,CAAC,eAAe,GAAG,GAAG,CAAC,EAAE,GAAG,YAAY,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAM3G;AAMD;;;;;;;;;;GAUG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,MAAM,CAAC,CAEzD;AAED;;;;GAIG;AACH,wBAAsB,qBAAqB,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAErF"}
|
package/out/fs/readers.js
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* Repository code accesses `node:fs` through this directory. Every reader returns a promise, so executable code
|
|
8
8
|
* makes no blocking filesystem calls. The `debt` check in `lib/repo-health` counts any violations.
|
|
9
9
|
*/
|
|
10
|
+
import { readFileSync } from "node:fs";
|
|
10
11
|
import { readFile } from "node:fs/promises";
|
|
11
12
|
import { resolvePath } from "path-ts";
|
|
12
13
|
import { open } from "#fs/readers/stat";
|
|
@@ -75,6 +76,19 @@ function readTarget(pathSegments) {
|
|
|
75
76
|
}
|
|
76
77
|
return resolvePath(...pathSegments);
|
|
77
78
|
}
|
|
79
|
+
/**
|
|
80
|
+
* Read a local text file synchronously.
|
|
81
|
+
*
|
|
82
|
+
* The env module folds `.env` into `process.env` when it is imported, ahead of any `await`,
|
|
83
|
+
* so it cannot use {@linkcode readLocalTextFile}.
|
|
84
|
+
* Every other caller can, and should.
|
|
85
|
+
*
|
|
86
|
+
* @category Files
|
|
87
|
+
* @runtime node
|
|
88
|
+
*/
|
|
89
|
+
export function readLocalTextFileSync(...pathSegments) {
|
|
90
|
+
return readFileSync(resolvePath(...pathSegments), "utf8");
|
|
91
|
+
}
|
|
78
92
|
/**
|
|
79
93
|
* Read a local text file.
|
|
80
94
|
*
|
package/out/fs/readers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readers.js","sourceRoot":"","sources":["../../lib/fs/readers.ts"],"names":[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AEb,yBAAyB;AAEzB;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB;IACtC,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;AAC5E,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB;IAC1C,OAAO,eAAe,CAAI,MAAM,iBAAiB,EAAE,CAAC,CAAA;AACrD,CAAC;AAED,aAAa"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
6
|
* Where the docs site lives, for every URL the license posture points at: the well-known key register and the
|
|
7
|
-
* `/license` page. One derivation, so a configured `MAILWOMAN_DOCS_URL` moves
|
|
7
|
+
* `/license` page. One derivation serves both, so a configured `MAILWOMAN_DOCS_URL` moves them together.
|
|
8
8
|
*/
|
|
9
9
|
/**
|
|
10
10
|
* The docs site when `MAILWOMAN_DOCS_URL` is unset.
|
package/out/license/docs-site.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
6
|
* Where the docs site lives, for every URL the license posture points at: the well-known key register and the
|
|
7
|
-
* `/license` page. One derivation, so a configured `MAILWOMAN_DOCS_URL` moves
|
|
7
|
+
* `/license` page. One derivation serves both, so a configured `MAILWOMAN_DOCS_URL` moves them together.
|
|
8
8
|
*/
|
|
9
9
|
import { $public } from "#env";
|
|
10
10
|
import { withoutTrailingSlashes } from "#strings/format";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compiled-freshness.d.ts","sourceRoot":"","sources":["../../lib/module/compiled-freshness.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAyB,KAAK,eAAe,EAAiB,MAAM,SAAS,CAAA;AAUpF;;GAEG;AACH,MAAM,WAAW,eAAe;IAC/B,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;CACZ;AAsED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IACjC,KAAK,EAAE,OAAO,CAAA;IACd,YAAY,EAAE,eAAe,GAAG,IAAI,CAAA;IACpC,cAAc,EAAE,eAAe,GAAG,IAAI,CAAA;IACtC;;OAEG;IACH,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;CACrB;AAED;;;;;;;GAOG;AACH,wBAAsB,sBAAsB,CAC3C,QAAQ,EAAE,eAAe,EACzB,UAAU,EAAE,SAAS,MAAM,EAAE,GAC3B,OAAO,CAAC,iBAAiB,CAAC,
|
|
1
|
+
{"version":3,"file":"compiled-freshness.d.ts","sourceRoot":"","sources":["../../lib/module/compiled-freshness.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAyB,KAAK,eAAe,EAAiB,MAAM,SAAS,CAAA;AAUpF;;GAEG;AACH,MAAM,WAAW,eAAe;IAC/B,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;CACZ;AAsED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IACjC,KAAK,EAAE,OAAO,CAAA;IACd,YAAY,EAAE,eAAe,GAAG,IAAI,CAAA;IACpC,cAAc,EAAE,eAAe,GAAG,IAAI,CAAA;IACtC;;OAEG;IACH,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;CACrB;AAED;;;;;;;GAOG;AACH,wBAAsB,sBAAsB,CAC3C,QAAQ,EAAE,eAAe,EACzB,UAAU,EAAE,SAAS,MAAM,EAAE,GAC3B,OAAO,CAAC,iBAAiB,CAAC,CAsD5B"}
|
|
@@ -80,6 +80,7 @@ async function newestMtime(root, matches, pathAllowed = () => true) {
|
|
|
80
80
|
*/
|
|
81
81
|
export async function checkCompiledFreshness(repoRoot, workspaces) {
|
|
82
82
|
let newestSource = null;
|
|
83
|
+
let newestSourceWorkspace = null;
|
|
83
84
|
let newestCompiled = null;
|
|
84
85
|
const root = PathBuilder.from(repoRoot);
|
|
85
86
|
for (const workspace of workspaces) {
|
|
@@ -90,6 +91,7 @@ export async function checkCompiledFreshness(repoRoot, workspaces) {
|
|
|
90
91
|
]);
|
|
91
92
|
if (source && (!newestSource || source.mtimeMs > newestSource.mtimeMs)) {
|
|
92
93
|
newestSource = source;
|
|
94
|
+
newestSourceWorkspace = workspace;
|
|
93
95
|
}
|
|
94
96
|
if (compiled && (!newestCompiled || compiled.mtimeMs > newestCompiled.mtimeMs)) {
|
|
95
97
|
newestCompiled = compiled;
|
|
@@ -110,7 +112,9 @@ export async function checkCompiledFreshness(repoRoot, workspaces) {
|
|
|
110
112
|
newestSource,
|
|
111
113
|
newestCompiled,
|
|
112
114
|
reason: `Compiled output is ${driftSeconds}s older than source: ${newestSource.path} was modified after ` +
|
|
113
|
-
`${newestCompiled.path}. Run \`yarn compile\` and re-run
|
|
115
|
+
`${newestCompiled.path}. Run \`yarn compile\` and re-run. When the source reverted to content ` +
|
|
116
|
+
`that is already compiled, \`tsc -b\` skips the emit and the output stays stale, so run ` +
|
|
117
|
+
`\`yarn tsc -b ${newestSourceWorkspace} --force\` instead.`,
|
|
114
118
|
};
|
|
115
119
|
}
|
|
116
120
|
return { fresh: true, newestSource, newestCompiled, reason: null };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compiled-freshness.js","sourceRoot":"","sources":["../../lib/module/compiled-freshness.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAwB,QAAQ,EAAE,GAAG,EAAE,MAAM,SAAS,CAAA;AACpF,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAEhD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAE3C;;GAEG;AACH,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC,CAAC,cAAc,EAAE,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I;YACpB,MAAM,EAAE,qDAAqD;SAC7D,CAAA;IACF,CAAC;IAED,IAAI,YAAY,IAAI,YAAY,CAAC,OAAO,GAAG,cAAc,CAAC,OAAO,EAAE,CAAC;QACnE,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,OAAO,GAAG,cAAc,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,CAAA;QAEvF,OAAO;YACN,KAAK,EAAE,KAAK;YACZ,YAAY;YACZ,cAAc;YACd,MAAM,EACL,sBAAsB,YAAY,wBAAwB,YAAY,CAAC,IAAI,sBAAsB;gBACjG,GAAG,cAAc,CAAC,IAAI,yEAAyE;gBAC/F,yFAAyF;gBACzF,iBAAiB,qBAAqB,qBAAqB;SAC5D,CAAA;IACF,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,EAAE,IAAI,EAAE,CAAA;AACnE,CAAC"}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
|
-
* The default artifact and dataset locations the coarse-placer tools share.
|
|
7
|
-
* a relocated artifact is a one-line change rather than a sweep of every tool's option default.
|
|
6
|
+
* The default artifact and dataset locations the coarse-placer tools share. Each location has one
|
|
7
|
+
* spelling, so a relocated artifact is a one-line change rather than a sweep of every tool's option default.
|
|
8
8
|
*/
|
|
9
9
|
import { type PathBuilder, type PathBuilderLike } from "path-ts";
|
|
10
10
|
/**
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
|
-
* The default artifact and dataset locations the coarse-placer tools share.
|
|
7
|
-
* a relocated artifact is a one-line change rather than a sweep of every tool's option default.
|
|
6
|
+
* The default artifact and dataset locations the coarse-placer tools share. Each location has one
|
|
7
|
+
* spelling, so a relocated artifact is a one-line change rather than a sweep of every tool's option default.
|
|
8
8
|
*/
|
|
9
9
|
import { resolvePath } from "path-ts";
|
|
10
10
|
import { JSONSpliterator } from "spliterator";
|
|
@@ -31,7 +31,7 @@ export type Section = Span;
|
|
|
31
31
|
*/
|
|
32
32
|
export type ClassificationProposalSource = "neural" | "merged";
|
|
33
33
|
/**
|
|
34
|
-
* A typed classification candidate
|
|
34
|
+
* A classifier produces this typed classification candidate.
|
|
35
35
|
*
|
|
36
36
|
* `source` and `source_id` identify the origin of each proposal without external state.
|
|
37
37
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mailwoman/core",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.5.0",
|
|
4
4
|
"description": "Mailwoman core: tokenization, decoder, formatter, resources, filters, utils.",
|
|
5
5
|
"license": "AGPL-3.0-only OR LicenseRef-Commercial",
|
|
6
6
|
"repository": {
|
|
@@ -1256,11 +1256,11 @@
|
|
|
1256
1256
|
}
|
|
1257
1257
|
},
|
|
1258
1258
|
"dependencies": {
|
|
1259
|
-
"@mailwoman/annotations": "10.
|
|
1260
|
-
"@mailwoman/codex": "10.
|
|
1261
|
-
"@mailwoman/evidence": "10.
|
|
1262
|
-
"@mailwoman/query-shape": "10.
|
|
1263
|
-
"@mailwoman/sqlite": "10.
|
|
1259
|
+
"@mailwoman/annotations": "10.5.0",
|
|
1260
|
+
"@mailwoman/codex": "10.5.0",
|
|
1261
|
+
"@mailwoman/evidence": "10.5.0",
|
|
1262
|
+
"@mailwoman/query-shape": "10.5.0",
|
|
1263
|
+
"@mailwoman/sqlite": "10.5.0",
|
|
1264
1264
|
"adm-zip": "^0.6.1",
|
|
1265
1265
|
"async-init": "^1.0.0",
|
|
1266
1266
|
"axios": "^1.20.0",
|
|
@@ -1289,7 +1289,7 @@
|
|
|
1289
1289
|
},
|
|
1290
1290
|
"devDependencies": {
|
|
1291
1291
|
"@duckdb/node-api": "1.5.6-r.1",
|
|
1292
|
-
"@mailwoman/spatial": "10.
|
|
1292
|
+
"@mailwoman/spatial": "10.5.0",
|
|
1293
1293
|
"@types/d3-color": "^3.1.3",
|
|
1294
1294
|
"@types/d3-scale-chromatic": "^3.1.0",
|
|
1295
1295
|
"@types/trusted-types": "^2.0.7",
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
|
-
* The default artifact and dataset locations the coarse-placer tools share.
|
|
7
|
-
* a relocated artifact is a one-line change rather than a sweep of every tool's option default.
|
|
6
|
+
* The default artifact and dataset locations the coarse-placer tools share. Each location has one
|
|
7
|
+
* spelling, so a relocated artifact is a one-line change rather than a sweep of every tool's option default.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { type PathBuilder, type PathBuilderLike, resolvePath } from "path-ts"
|