@uasyraf/helm 0.1.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/.claude-plugin/plugin.json +9 -0
- package/.mcp.json +8 -0
- package/LICENSE +21 -0
- package/README.md +114 -0
- package/dashboard/build/client/_app/immutable/assets/0.DPthOi2j.css +1 -0
- package/dashboard/build/client/_app/immutable/assets/0.DPthOi2j.css.br +0 -0
- package/dashboard/build/client/_app/immutable/assets/0.DPthOi2j.css.gz +0 -0
- package/dashboard/build/client/_app/immutable/chunks/B3NJzl7g.js +1 -0
- package/dashboard/build/client/_app/immutable/chunks/B3NJzl7g.js.br +0 -0
- package/dashboard/build/client/_app/immutable/chunks/B3NJzl7g.js.gz +0 -0
- package/dashboard/build/client/_app/immutable/chunks/Bvgn0Gys.js +1 -0
- package/dashboard/build/client/_app/immutable/chunks/Bvgn0Gys.js.br +0 -0
- package/dashboard/build/client/_app/immutable/chunks/Bvgn0Gys.js.gz +0 -0
- package/dashboard/build/client/_app/immutable/chunks/C72aErMY.js +3 -0
- package/dashboard/build/client/_app/immutable/chunks/C72aErMY.js.br +0 -0
- package/dashboard/build/client/_app/immutable/chunks/C72aErMY.js.gz +0 -0
- package/dashboard/build/client/_app/immutable/chunks/CjpPs8iz.js +1 -0
- package/dashboard/build/client/_app/immutable/chunks/CjpPs8iz.js.br +0 -0
- package/dashboard/build/client/_app/immutable/chunks/CjpPs8iz.js.gz +0 -0
- package/dashboard/build/client/_app/immutable/chunks/DNLp8810.js +1 -0
- package/dashboard/build/client/_app/immutable/chunks/DNLp8810.js.br +0 -0
- package/dashboard/build/client/_app/immutable/chunks/DNLp8810.js.gz +0 -0
- package/dashboard/build/client/_app/immutable/chunks/DYkFpqG7.js +1 -0
- package/dashboard/build/client/_app/immutable/chunks/DYkFpqG7.js.br +0 -0
- package/dashboard/build/client/_app/immutable/chunks/DYkFpqG7.js.gz +0 -0
- package/dashboard/build/client/_app/immutable/chunks/DsiL0ppy.js +2 -0
- package/dashboard/build/client/_app/immutable/chunks/DsiL0ppy.js.br +0 -0
- package/dashboard/build/client/_app/immutable/chunks/DsiL0ppy.js.gz +0 -0
- package/dashboard/build/client/_app/immutable/chunks/bJX5vhEj.js +1 -0
- package/dashboard/build/client/_app/immutable/chunks/bJX5vhEj.js.br +0 -0
- package/dashboard/build/client/_app/immutable/chunks/bJX5vhEj.js.gz +0 -0
- package/dashboard/build/client/_app/immutable/chunks/gQDp4_Ul.js +1 -0
- package/dashboard/build/client/_app/immutable/chunks/gQDp4_Ul.js.br +0 -0
- package/dashboard/build/client/_app/immutable/chunks/gQDp4_Ul.js.gz +0 -0
- package/dashboard/build/client/_app/immutable/entry/app.D4j9hUjJ.js +2 -0
- package/dashboard/build/client/_app/immutable/entry/app.D4j9hUjJ.js.br +0 -0
- package/dashboard/build/client/_app/immutable/entry/app.D4j9hUjJ.js.gz +0 -0
- package/dashboard/build/client/_app/immutable/entry/start.D59wIHuS.js +1 -0
- package/dashboard/build/client/_app/immutable/entry/start.D59wIHuS.js.br +2 -0
- package/dashboard/build/client/_app/immutable/entry/start.D59wIHuS.js.gz +0 -0
- package/dashboard/build/client/_app/immutable/nodes/0.HocD0HAQ.js +1 -0
- package/dashboard/build/client/_app/immutable/nodes/0.HocD0HAQ.js.br +0 -0
- package/dashboard/build/client/_app/immutable/nodes/0.HocD0HAQ.js.gz +0 -0
- package/dashboard/build/client/_app/immutable/nodes/1.xo_a-jPh.js +1 -0
- package/dashboard/build/client/_app/immutable/nodes/1.xo_a-jPh.js.br +0 -0
- package/dashboard/build/client/_app/immutable/nodes/1.xo_a-jPh.js.gz +0 -0
- package/dashboard/build/client/_app/immutable/nodes/2.BwywD4n3.js +1 -0
- package/dashboard/build/client/_app/immutable/nodes/2.BwywD4n3.js.br +0 -0
- package/dashboard/build/client/_app/immutable/nodes/2.BwywD4n3.js.gz +0 -0
- package/dashboard/build/client/_app/immutable/nodes/3.BGY0bNfC.js +1 -0
- package/dashboard/build/client/_app/immutable/nodes/3.BGY0bNfC.js.br +0 -0
- package/dashboard/build/client/_app/immutable/nodes/3.BGY0bNfC.js.gz +0 -0
- package/dashboard/build/client/_app/immutable/nodes/4.C7uIivCS.js +1 -0
- package/dashboard/build/client/_app/immutable/nodes/4.C7uIivCS.js.br +0 -0
- package/dashboard/build/client/_app/immutable/nodes/4.C7uIivCS.js.gz +0 -0
- package/dashboard/build/client/_app/immutable/nodes/5.YszfczJW.js +1 -0
- package/dashboard/build/client/_app/immutable/nodes/5.YszfczJW.js.br +0 -0
- package/dashboard/build/client/_app/immutable/nodes/5.YszfczJW.js.gz +0 -0
- package/dashboard/build/client/_app/immutable/nodes/6.7fhKcbBK.js +1 -0
- package/dashboard/build/client/_app/immutable/nodes/6.7fhKcbBK.js.br +0 -0
- package/dashboard/build/client/_app/immutable/nodes/6.7fhKcbBK.js.gz +0 -0
- package/dashboard/build/client/_app/version.json +1 -0
- package/dashboard/build/client/_app/version.json.br +0 -0
- package/dashboard/build/client/_app/version.json.gz +0 -0
- package/dashboard/build/env.js +94 -0
- package/dashboard/build/handler.js +1494 -0
- package/dashboard/build/index.js +345 -0
- package/dashboard/build/server/chunks/0-DUUsxI66.js +40 -0
- package/dashboard/build/server/chunks/0-DUUsxI66.js.map +1 -0
- package/dashboard/build/server/chunks/1-BDkdOGL6.js +9 -0
- package/dashboard/build/server/chunks/1-BDkdOGL6.js.map +1 -0
- package/dashboard/build/server/chunks/2-BLt1vNET.js +51 -0
- package/dashboard/build/server/chunks/2-BLt1vNET.js.map +1 -0
- package/dashboard/build/server/chunks/3-B-4sxMk4.js +41 -0
- package/dashboard/build/server/chunks/3-B-4sxMk4.js.map +1 -0
- package/dashboard/build/server/chunks/4-CRZIwHJO.js +39 -0
- package/dashboard/build/server/chunks/4-CRZIwHJO.js.map +1 -0
- package/dashboard/build/server/chunks/5-CwiVOtz6.js +30 -0
- package/dashboard/build/server/chunks/5-CwiVOtz6.js.map +1 -0
- package/dashboard/build/server/chunks/6-mID2_gX2.js +53 -0
- package/dashboard/build/server/chunks/6-mID2_gX2.js.map +1 -0
- package/dashboard/build/server/chunks/_layout.svelte-DeOKequ-.js +31 -0
- package/dashboard/build/server/chunks/_layout.svelte-DeOKequ-.js.map +1 -0
- package/dashboard/build/server/chunks/_page.svelte-BGS-bwra.js +65 -0
- package/dashboard/build/server/chunks/_page.svelte-BGS-bwra.js.map +1 -0
- package/dashboard/build/server/chunks/_page.svelte-BiRjdIbl.js +35 -0
- package/dashboard/build/server/chunks/_page.svelte-BiRjdIbl.js.map +1 -0
- package/dashboard/build/server/chunks/_page.svelte-C_NO0kPy.js +49 -0
- package/dashboard/build/server/chunks/_page.svelte-C_NO0kPy.js.map +1 -0
- package/dashboard/build/server/chunks/_page.svelte-DvSQBjcA.js +80 -0
- package/dashboard/build/server/chunks/_page.svelte-DvSQBjcA.js.map +1 -0
- package/dashboard/build/server/chunks/_page.svelte-ZUq8J-ew.js +33 -0
- package/dashboard/build/server/chunks/_page.svelte-ZUq8J-ew.js.map +1 -0
- package/dashboard/build/server/chunks/error.svelte-DJ3O9Tia.js +12 -0
- package/dashboard/build/server/chunks/error.svelte-DJ3O9Tia.js.map +1 -0
- package/dashboard/build/server/chunks/exports-BnaAAAnL.js +3262 -0
- package/dashboard/build/server/chunks/exports-BnaAAAnL.js.map +1 -0
- package/dashboard/build/server/chunks/index-DwR_KaNY.js +44 -0
- package/dashboard/build/server/chunks/index-DwR_KaNY.js.map +1 -0
- package/dashboard/build/server/chunks/index-lhTMmBNn.js +207 -0
- package/dashboard/build/server/chunks/index-lhTMmBNn.js.map +1 -0
- package/dashboard/build/server/chunks/queries-DGWi-KlP.js +198 -0
- package/dashboard/build/server/chunks/queries-DGWi-KlP.js.map +1 -0
- package/dashboard/build/server/chunks/renderer-DdMvhZZr.js +1930 -0
- package/dashboard/build/server/chunks/renderer-DdMvhZZr.js.map +1 -0
- package/dashboard/build/server/index.js +5911 -0
- package/dashboard/build/server/index.js.map +1 -0
- package/dashboard/build/server/manifest.js +78 -0
- package/dashboard/build/server/manifest.js.map +1 -0
- package/dashboard/build/shims.js +32 -0
- package/dashboard/package.json +29 -0
- package/dashboard/svelte.config.js +15 -0
- package/dist/bin/helm.d.ts +2 -0
- package/dist/bin/helm.js +167 -0
- package/dist/bin/helm.js.map +1 -0
- package/dist/server/src/banner.d.ts +1 -0
- package/dist/server/src/banner.js +34 -0
- package/dist/server/src/banner.js.map +1 -0
- package/dist/server/src/config/load.d.ts +14 -0
- package/dist/server/src/config/load.js +43 -0
- package/dist/server/src/config/load.js.map +1 -0
- package/dist/server/src/dashboard.d.ts +5 -0
- package/dist/server/src/dashboard.js +79 -0
- package/dist/server/src/dashboard.js.map +1 -0
- package/dist/server/src/db/bootstrap.d.ts +2 -0
- package/dist/server/src/db/bootstrap.js +106 -0
- package/dist/server/src/db/bootstrap.js.map +1 -0
- package/dist/server/src/db/client.d.ts +14 -0
- package/dist/server/src/db/client.js +32 -0
- package/dist/server/src/db/client.js.map +1 -0
- package/dist/server/src/db/open-project.d.ts +17 -0
- package/dist/server/src/db/open-project.js +27 -0
- package/dist/server/src/db/open-project.js.map +1 -0
- package/dist/server/src/db/open-repo.d.ts +8 -0
- package/dist/server/src/db/open-repo.js +45 -0
- package/dist/server/src/db/open-repo.js.map +1 -0
- package/dist/server/src/db/pg-bootstrap.d.ts +4 -0
- package/dist/server/src/db/pg-bootstrap.js +106 -0
- package/dist/server/src/db/pg-bootstrap.js.map +1 -0
- package/dist/server/src/db/pg-client.d.ts +10 -0
- package/dist/server/src/db/pg-client.js +42 -0
- package/dist/server/src/db/pg-client.js.map +1 -0
- package/dist/server/src/db/repo-pg.d.ts +3 -0
- package/dist/server/src/db/repo-pg.js +245 -0
- package/dist/server/src/db/repo-pg.js.map +1 -0
- package/dist/server/src/db/repo-sqlite.d.ts +3 -0
- package/dist/server/src/db/repo-sqlite.js +224 -0
- package/dist/server/src/db/repo-sqlite.js.map +1 -0
- package/dist/server/src/db/repo.d.ts +54 -0
- package/dist/server/src/db/repo.js +2 -0
- package/dist/server/src/db/repo.js.map +1 -0
- package/dist/server/src/db/schema-pg.d.ts +2712 -0
- package/dist/server/src/db/schema-pg.js +107 -0
- package/dist/server/src/db/schema-pg.js.map +1 -0
- package/dist/server/src/db/schema.d.ts +2721 -0
- package/dist/server/src/db/schema.js +107 -0
- package/dist/server/src/db/schema.js.map +1 -0
- package/dist/server/src/events/emit.d.ts +21 -0
- package/dist/server/src/events/emit.js +17 -0
- package/dist/server/src/events/emit.js.map +1 -0
- package/dist/server/src/http/server.d.ts +10 -0
- package/dist/server/src/http/server.js +119 -0
- package/dist/server/src/http/server.js.map +1 -0
- package/dist/server/src/index.d.ts +2 -0
- package/dist/server/src/index.js +13 -0
- package/dist/server/src/index.js.map +1 -0
- package/dist/server/src/init.d.ts +12 -0
- package/dist/server/src/init.js +59 -0
- package/dist/server/src/init.js.map +1 -0
- package/dist/server/src/install.d.ts +8 -0
- package/dist/server/src/install.js +100 -0
- package/dist/server/src/install.js.map +1 -0
- package/dist/server/src/project/bootstrap.d.ts +9 -0
- package/dist/server/src/project/bootstrap.js +83 -0
- package/dist/server/src/project/bootstrap.js.map +1 -0
- package/dist/server/src/project/detect.d.ts +10 -0
- package/dist/server/src/project/detect.js +82 -0
- package/dist/server/src/project/detect.js.map +1 -0
- package/dist/server/src/project/identity.d.ts +8 -0
- package/dist/server/src/project/identity.js +42 -0
- package/dist/server/src/project/identity.js.map +1 -0
- package/dist/server/src/server.d.ts +8 -0
- package/dist/server/src/server.js +22 -0
- package/dist/server/src/server.js.map +1 -0
- package/dist/server/src/tools/debt.d.ts +2 -0
- package/dist/server/src/tools/debt.js +88 -0
- package/dist/server/src/tools/debt.js.map +1 -0
- package/dist/server/src/tools/decision.d.ts +2 -0
- package/dist/server/src/tools/decision.js +39 -0
- package/dist/server/src/tools/decision.js.map +1 -0
- package/dist/server/src/tools/epic.d.ts +2 -0
- package/dist/server/src/tools/epic.js +95 -0
- package/dist/server/src/tools/epic.js.map +1 -0
- package/dist/server/src/tools/index.d.ts +3 -0
- package/dist/server/src/tools/index.js +21 -0
- package/dist/server/src/tools/index.js.map +1 -0
- package/dist/server/src/tools/nelson.d.ts +2 -0
- package/dist/server/src/tools/nelson.js +28 -0
- package/dist/server/src/tools/nelson.js.map +1 -0
- package/dist/server/src/tools/progress.d.ts +2 -0
- package/dist/server/src/tools/progress.js +45 -0
- package/dist/server/src/tools/progress.js.map +1 -0
- package/dist/server/src/tools/sprint.d.ts +2 -0
- package/dist/server/src/tools/sprint.js +98 -0
- package/dist/server/src/tools/sprint.js.map +1 -0
- package/dist/server/src/tools/status.d.ts +2 -0
- package/dist/server/src/tools/status.js +31 -0
- package/dist/server/src/tools/status.js.map +1 -0
- package/dist/server/src/tools/story.d.ts +2 -0
- package/dist/server/src/tools/story.js +155 -0
- package/dist/server/src/tools/story.js.map +1 -0
- package/dist/server/src/tools/task.d.ts +2 -0
- package/dist/server/src/tools/task.js +90 -0
- package/dist/server/src/tools/task.js.map +1 -0
- package/dist/server/src/tools/types.d.ts +15 -0
- package/dist/server/src/tools/types.js +11 -0
- package/dist/server/src/tools/types.js.map +1 -0
- package/dist/server/src/util/git.d.ts +8 -0
- package/dist/server/src/util/git.js +51 -0
- package/dist/server/src/util/git.js.map +1 -0
- package/dist/server/src/util/ids.d.ts +2 -0
- package/dist/server/src/util/ids.js +8 -0
- package/dist/server/src/util/ids.js.map +1 -0
- package/dist/server/src/util/paths.d.ts +2 -0
- package/dist/server/src/util/paths.js +9 -0
- package/dist/server/src/util/paths.js.map +1 -0
- package/dist/server/src/worker/client.d.ts +12 -0
- package/dist/server/src/worker/client.js +89 -0
- package/dist/server/src/worker/client.js.map +1 -0
- package/dist/server/src/worker/hook.d.ts +1 -0
- package/dist/server/src/worker/hook.js +36 -0
- package/dist/server/src/worker/hook.js.map +1 -0
- package/dist/server/src/worker/ingest.d.ts +14 -0
- package/dist/server/src/worker/ingest.js +86 -0
- package/dist/server/src/worker/ingest.js.map +1 -0
- package/dist/server/src/worker/markers/any-type.d.ts +6 -0
- package/dist/server/src/worker/markers/any-type.js +19 -0
- package/dist/server/src/worker/markers/any-type.js.map +1 -0
- package/dist/server/src/worker/markers/debt.d.ts +11 -0
- package/dist/server/src/worker/markers/debt.js +53 -0
- package/dist/server/src/worker/markers/debt.js.map +1 -0
- package/dist/server/src/worker/markers/file-size.d.ts +5 -0
- package/dist/server/src/worker/markers/file-size.js +32 -0
- package/dist/server/src/worker/markers/file-size.js.map +1 -0
- package/dist/server/src/worker/scanner.d.ts +23 -0
- package/dist/server/src/worker/scanner.js +23 -0
- package/dist/server/src/worker/scanner.js.map +1 -0
- package/dist/server/src/worker/server.d.ts +1 -0
- package/dist/server/src/worker/server.js +137 -0
- package/dist/server/src/worker/server.js.map +1 -0
- package/dist/server/src/worker/socket.d.ts +3 -0
- package/dist/server/src/worker/socket.js +12 -0
- package/dist/server/src/worker/socket.js.map +1 -0
- package/hooks/hooks.json +33 -0
- package/package.json +56 -0
- package/skills/backlog/SKILL.md +18 -0
- package/skills/debt/SKILL.md +39 -0
- package/skills/epic/SKILL.md +22 -0
- package/skills/nelson-integration/SKILL.md +44 -0
- package/skills/project-tracker/SKILL.md +60 -0
- package/skills/review/SKILL.md +27 -0
- package/skills/sprint/SKILL.md +23 -0
- package/skills/story/SKILL.md +29 -0
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
/** @import { StandardSchemaV1 } from '@standard-schema/spec' */
|
|
2
|
+
|
|
3
|
+
class HttpError {
|
|
4
|
+
/**
|
|
5
|
+
* @param {number} status
|
|
6
|
+
* @param {{message: string} extends App.Error ? (App.Error | string | undefined) : App.Error} body
|
|
7
|
+
*/
|
|
8
|
+
constructor(status, body) {
|
|
9
|
+
this.status = status;
|
|
10
|
+
if (typeof body === 'string') {
|
|
11
|
+
this.body = { message: body };
|
|
12
|
+
} else if (body) {
|
|
13
|
+
this.body = body;
|
|
14
|
+
} else {
|
|
15
|
+
this.body = { message: `Error: ${status}` };
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
toString() {
|
|
20
|
+
return JSON.stringify(this.body);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
class Redirect {
|
|
25
|
+
/**
|
|
26
|
+
* @param {300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308} status
|
|
27
|
+
* @param {string} location
|
|
28
|
+
*/
|
|
29
|
+
constructor(status, location) {
|
|
30
|
+
try {
|
|
31
|
+
new Headers({ location });
|
|
32
|
+
} catch {
|
|
33
|
+
throw new Error(
|
|
34
|
+
`Invalid redirect location ${JSON.stringify(location)}: ` +
|
|
35
|
+
'this string contains characters that cannot be used in HTTP headers'
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
this.status = status;
|
|
40
|
+
this.location = location;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* An error that was thrown from within the SvelteKit runtime that is not fatal and doesn't result in a 500, such as a 404.
|
|
46
|
+
* `SvelteKitError` goes through `handleError`.
|
|
47
|
+
* @extends Error
|
|
48
|
+
*/
|
|
49
|
+
class SvelteKitError extends Error {
|
|
50
|
+
/**
|
|
51
|
+
* @param {number} status
|
|
52
|
+
* @param {string} text
|
|
53
|
+
* @param {string} message
|
|
54
|
+
*/
|
|
55
|
+
constructor(status, text, message) {
|
|
56
|
+
super(message);
|
|
57
|
+
this.status = status;
|
|
58
|
+
this.text = text;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* @template [T=undefined]
|
|
64
|
+
*/
|
|
65
|
+
class ActionFailure {
|
|
66
|
+
/**
|
|
67
|
+
* @param {number} status
|
|
68
|
+
* @param {T} data
|
|
69
|
+
*/
|
|
70
|
+
constructor(status, data) {
|
|
71
|
+
this.status = status;
|
|
72
|
+
this.data = data;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const text_encoder = new TextEncoder();
|
|
77
|
+
|
|
78
|
+
/** @import { StandardSchemaV1 } from '@standard-schema/spec' */
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
// TODO 3.0: remove these types as they are not used anymore (we can't remove them yet because that would be a breaking change)
|
|
82
|
+
/**
|
|
83
|
+
* @template {number} TNumber
|
|
84
|
+
* @template {any[]} [TArray=[]]
|
|
85
|
+
* @typedef {TNumber extends TArray['length'] ? TArray[number] : LessThan<TNumber, [...TArray, TArray['length']]>} LessThan
|
|
86
|
+
*/
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* @template {number} TStart
|
|
90
|
+
* @template {number} TEnd
|
|
91
|
+
* @typedef {Exclude<TEnd | LessThan<TEnd>, LessThan<TStart>>} NumericRange
|
|
92
|
+
*/
|
|
93
|
+
|
|
94
|
+
// Keep the status codes as `number` because restricting to certain numbers makes it unnecessarily hard to use compared to the benefits
|
|
95
|
+
// (we have runtime errors already to check for invalid codes). Also see https://github.com/sveltejs/kit/issues/11780
|
|
96
|
+
|
|
97
|
+
// we have to repeat the JSDoc because the display for function overloads is broken
|
|
98
|
+
// see https://github.com/microsoft/TypeScript/issues/55056
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Throws an error with a HTTP status code and an optional message.
|
|
102
|
+
* When called during request handling, this will cause SvelteKit to
|
|
103
|
+
* return an error response without invoking `handleError`.
|
|
104
|
+
* Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it.
|
|
105
|
+
* @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.
|
|
106
|
+
* @param {App.Error} body An object that conforms to the App.Error type. If a string is passed, it will be used as the message property.
|
|
107
|
+
* @overload
|
|
108
|
+
* @param {number} status
|
|
109
|
+
* @param {App.Error} body
|
|
110
|
+
* @return {never}
|
|
111
|
+
* @throws {HttpError} This error instructs SvelteKit to initiate HTTP error handling.
|
|
112
|
+
* @throws {Error} If the provided status is invalid (not between 400 and 599).
|
|
113
|
+
*/
|
|
114
|
+
/**
|
|
115
|
+
* Throws an error with a HTTP status code and an optional message.
|
|
116
|
+
* When called during request handling, this will cause SvelteKit to
|
|
117
|
+
* return an error response without invoking `handleError`.
|
|
118
|
+
* Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it.
|
|
119
|
+
* @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.
|
|
120
|
+
* @param {{ message: string } extends App.Error ? App.Error | string | undefined : never} [body] An object that conforms to the App.Error type. If a string is passed, it will be used as the message property.
|
|
121
|
+
* @overload
|
|
122
|
+
* @param {number} status
|
|
123
|
+
* @param {{ message: string } extends App.Error ? App.Error | string | undefined : never} [body]
|
|
124
|
+
* @return {never}
|
|
125
|
+
* @throws {HttpError} This error instructs SvelteKit to initiate HTTP error handling.
|
|
126
|
+
* @throws {Error} If the provided status is invalid (not between 400 and 599).
|
|
127
|
+
*/
|
|
128
|
+
/**
|
|
129
|
+
* Throws an error with a HTTP status code and an optional message.
|
|
130
|
+
* When called during request handling, this will cause SvelteKit to
|
|
131
|
+
* return an error response without invoking `handleError`.
|
|
132
|
+
* Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it.
|
|
133
|
+
* @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.
|
|
134
|
+
* @param {{ message: string } extends App.Error ? App.Error | string | undefined : never} body An object that conforms to the App.Error type. If a string is passed, it will be used as the message property.
|
|
135
|
+
* @return {never}
|
|
136
|
+
* @throws {HttpError} This error instructs SvelteKit to initiate HTTP error handling.
|
|
137
|
+
* @throws {Error} If the provided status is invalid (not between 400 and 599).
|
|
138
|
+
*/
|
|
139
|
+
function error(status, body) {
|
|
140
|
+
if ((isNaN(status) || status < 400 || status > 599)) {
|
|
141
|
+
throw new Error(`HTTP error status codes must be between 400 and 599 — ${status} is invalid`);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
throw new HttpError(status, body);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Checks whether this is a redirect thrown by {@link redirect}.
|
|
149
|
+
* @param {unknown} e The object to check.
|
|
150
|
+
* @return {e is Redirect}
|
|
151
|
+
*/
|
|
152
|
+
function isRedirect(e) {
|
|
153
|
+
return e instanceof Redirect;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Create a JSON `Response` object from the supplied data.
|
|
158
|
+
* @param {any} data The value that will be serialized as JSON.
|
|
159
|
+
* @param {ResponseInit} [init] Options such as `status` and `headers` that will be added to the response. `Content-Type: application/json` and `Content-Length` headers will be added automatically.
|
|
160
|
+
*/
|
|
161
|
+
function json(data, init) {
|
|
162
|
+
// TODO deprecate this in favour of `Response.json` when it's
|
|
163
|
+
// more widely supported
|
|
164
|
+
const body = JSON.stringify(data);
|
|
165
|
+
|
|
166
|
+
// we can't just do `text(JSON.stringify(data), init)` because
|
|
167
|
+
// it will set a default `content-type` header. duplicated code
|
|
168
|
+
// means less duplicated work
|
|
169
|
+
const headers = new Headers(init?.headers);
|
|
170
|
+
if (!headers.has('content-length')) {
|
|
171
|
+
headers.set('content-length', text_encoder.encode(body).byteLength.toString());
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
if (!headers.has('content-type')) {
|
|
175
|
+
headers.set('content-type', 'application/json');
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
return new Response(body, {
|
|
179
|
+
...init,
|
|
180
|
+
headers
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Create a `Response` object from the supplied body.
|
|
186
|
+
* @param {string} body The value that will be used as-is.
|
|
187
|
+
* @param {ResponseInit} [init] Options such as `status` and `headers` that will be added to the response. A `Content-Length` header will be added automatically.
|
|
188
|
+
*/
|
|
189
|
+
function text(body, init) {
|
|
190
|
+
const headers = new Headers(init?.headers);
|
|
191
|
+
if (!headers.has('content-length')) {
|
|
192
|
+
const encoded = text_encoder.encode(body);
|
|
193
|
+
headers.set('content-length', encoded.byteLength.toString());
|
|
194
|
+
return new Response(encoded, {
|
|
195
|
+
...init,
|
|
196
|
+
headers
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
return new Response(body, {
|
|
201
|
+
...init,
|
|
202
|
+
headers
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export { ActionFailure as A, HttpError as H, Redirect as R, SvelteKitError as S, error as e, isRedirect as i, json as j, text as t };
|
|
207
|
+
//# sourceMappingURL=index-lhTMmBNn.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-lhTMmBNn.js","sources":["../../../node_modules/@sveltejs/kit/src/exports/internal/index.js","../../../node_modules/@sveltejs/kit/src/runtime/utils.js","../../../node_modules/@sveltejs/kit/src/exports/index.js"],"sourcesContent":["/** @import { StandardSchemaV1 } from '@standard-schema/spec' */\n\nexport class HttpError {\n\t/**\n\t * @param {number} status\n\t * @param {{message: string} extends App.Error ? (App.Error | string | undefined) : App.Error} body\n\t */\n\tconstructor(status, body) {\n\t\tthis.status = status;\n\t\tif (typeof body === 'string') {\n\t\t\tthis.body = { message: body };\n\t\t} else if (body) {\n\t\t\tthis.body = body;\n\t\t} else {\n\t\t\tthis.body = { message: `Error: ${status}` };\n\t\t}\n\t}\n\n\ttoString() {\n\t\treturn JSON.stringify(this.body);\n\t}\n}\n\nexport class Redirect {\n\t/**\n\t * @param {300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308} status\n\t * @param {string} location\n\t */\n\tconstructor(status, location) {\n\t\ttry {\n\t\t\tnew Headers({ location });\n\t\t} catch {\n\t\t\tthrow new Error(\n\t\t\t\t`Invalid redirect location ${JSON.stringify(location)}: ` +\n\t\t\t\t\t'this string contains characters that cannot be used in HTTP headers'\n\t\t\t);\n\t\t}\n\n\t\tthis.status = status;\n\t\tthis.location = location;\n\t}\n}\n\n/**\n * An error that was thrown from within the SvelteKit runtime that is not fatal and doesn't result in a 500, such as a 404.\n * `SvelteKitError` goes through `handleError`.\n * @extends Error\n */\nexport class SvelteKitError extends Error {\n\t/**\n\t * @param {number} status\n\t * @param {string} text\n\t * @param {string} message\n\t */\n\tconstructor(status, text, message) {\n\t\tsuper(message);\n\t\tthis.status = status;\n\t\tthis.text = text;\n\t}\n}\n\n/**\n * @template [T=undefined]\n */\nexport class ActionFailure {\n\t/**\n\t * @param {number} status\n\t * @param {T} data\n\t */\n\tconstructor(status, data) {\n\t\tthis.status = status;\n\t\tthis.data = data;\n\t}\n}\n\n/**\n * Error thrown when form validation fails imperatively\n */\nexport class ValidationError extends Error {\n\t/**\n\t * @param {StandardSchemaV1.Issue[]} issues\n\t */\n\tconstructor(issues) {\n\t\tsuper('Validation failed');\n\t\tthis.name = 'ValidationError';\n\t\tthis.issues = issues;\n\t}\n}\n\nexport { init_remote_functions } from './remote-functions.js';\n","import { BROWSER } from 'esm-env';\n\nexport const text_encoder = new TextEncoder();\n\n/**\n * Like node's path.relative, but without using node\n * @param {string} from\n * @param {string} to\n */\nexport function get_relative_path(from, to) {\n\tconst from_parts = from.split(/[/\\\\]/);\n\tconst to_parts = to.split(/[/\\\\]/);\n\tfrom_parts.pop(); // get dirname\n\n\twhile (from_parts[0] === to_parts[0]) {\n\t\tfrom_parts.shift();\n\t\tto_parts.shift();\n\t}\n\n\tlet i = from_parts.length;\n\twhile (i--) from_parts[i] = '..';\n\n\treturn from_parts.concat(to_parts).join('/');\n}\n\n/**\n * @param {Uint8Array} bytes\n * @returns {string}\n */\nexport function base64_encode(bytes) {\n\t// Using `Buffer` is faster than iterating\n\tif (!BROWSER && globalThis.Buffer) {\n\t\treturn globalThis.Buffer.from(bytes).toString('base64');\n\t}\n\n\tlet binary = '';\n\n\tfor (let i = 0; i < bytes.length; i++) {\n\t\tbinary += String.fromCharCode(bytes[i]);\n\t}\n\n\treturn btoa(binary);\n}\n\n/**\n * @param {string} encoded\n * @returns {Uint8Array}\n */\nexport function base64_decode(encoded) {\n\t// Using `Buffer` is faster than iterating\n\tif (!BROWSER && globalThis.Buffer) {\n\t\tconst buffer = globalThis.Buffer.from(encoded, 'base64');\n\t\treturn new Uint8Array(buffer);\n\t}\n\n\tconst binary = atob(encoded);\n\tconst bytes = new Uint8Array(binary.length);\n\n\tfor (let i = 0; i < binary.length; i++) {\n\t\tbytes[i] = binary.charCodeAt(i);\n\t}\n\n\treturn bytes;\n}\n","/** @import { StandardSchemaV1 } from '@standard-schema/spec' */\n\nimport { HttpError, Redirect, ActionFailure, ValidationError } from './internal/index.js';\nimport { BROWSER, DEV } from 'esm-env';\nimport {\n\tadd_data_suffix,\n\tadd_resolution_suffix,\n\thas_data_suffix,\n\thas_resolution_suffix,\n\tstrip_data_suffix,\n\tstrip_resolution_suffix\n} from '../runtime/pathname.js';\nimport { text_encoder } from '../runtime/utils.js';\n\nexport { VERSION } from '../version.js';\n\n// TODO 3.0: remove these types as they are not used anymore (we can't remove them yet because that would be a breaking change)\n/**\n * @template {number} TNumber\n * @template {any[]} [TArray=[]]\n * @typedef {TNumber extends TArray['length'] ? TArray[number] : LessThan<TNumber, [...TArray, TArray['length']]>} LessThan\n */\n\n/**\n * @template {number} TStart\n * @template {number} TEnd\n * @typedef {Exclude<TEnd | LessThan<TEnd>, LessThan<TStart>>} NumericRange\n */\n\n// Keep the status codes as `number` because restricting to certain numbers makes it unnecessarily hard to use compared to the benefits\n// (we have runtime errors already to check for invalid codes). Also see https://github.com/sveltejs/kit/issues/11780\n\n// we have to repeat the JSDoc because the display for function overloads is broken\n// see https://github.com/microsoft/TypeScript/issues/55056\n\n/**\n * Throws an error with a HTTP status code and an optional message.\n * When called during request handling, this will cause SvelteKit to\n * return an error response without invoking `handleError`.\n * Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it.\n * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.\n * @param {App.Error} body An object that conforms to the App.Error type. If a string is passed, it will be used as the message property.\n * @overload\n * @param {number} status\n * @param {App.Error} body\n * @return {never}\n * @throws {HttpError} This error instructs SvelteKit to initiate HTTP error handling.\n * @throws {Error} If the provided status is invalid (not between 400 and 599).\n */\n/**\n * Throws an error with a HTTP status code and an optional message.\n * When called during request handling, this will cause SvelteKit to\n * return an error response without invoking `handleError`.\n * Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it.\n * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.\n * @param {{ message: string } extends App.Error ? App.Error | string | undefined : never} [body] An object that conforms to the App.Error type. If a string is passed, it will be used as the message property.\n * @overload\n * @param {number} status\n * @param {{ message: string } extends App.Error ? App.Error | string | undefined : never} [body]\n * @return {never}\n * @throws {HttpError} This error instructs SvelteKit to initiate HTTP error handling.\n * @throws {Error} If the provided status is invalid (not between 400 and 599).\n */\n/**\n * Throws an error with a HTTP status code and an optional message.\n * When called during request handling, this will cause SvelteKit to\n * return an error response without invoking `handleError`.\n * Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it.\n * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.\n * @param {{ message: string } extends App.Error ? App.Error | string | undefined : never} body An object that conforms to the App.Error type. If a string is passed, it will be used as the message property.\n * @return {never}\n * @throws {HttpError} This error instructs SvelteKit to initiate HTTP error handling.\n * @throws {Error} If the provided status is invalid (not between 400 and 599).\n */\nexport function error(status, body) {\n\tif ((!BROWSER || DEV) && (isNaN(status) || status < 400 || status > 599)) {\n\t\tthrow new Error(`HTTP error status codes must be between 400 and 599 — ${status} is invalid`);\n\t}\n\n\tthrow new HttpError(status, body);\n}\n\n/**\n * Checks whether this is an error thrown by {@link error}.\n * @template {number} T\n * @param {unknown} e\n * @param {T} [status] The status to filter for.\n * @return {e is (HttpError & { status: T extends undefined ? never : T })}\n */\nexport function isHttpError(e, status) {\n\tif (!(e instanceof HttpError)) return false;\n\treturn !status || e.status === status;\n}\n\n/**\n * Redirect a request. When called during request handling, SvelteKit will return a redirect response.\n * Make sure you're not catching the thrown redirect, which would prevent SvelteKit from handling it.\n *\n * Most common status codes:\n * * `303 See Other`: redirect as a GET request (often used after a form POST request)\n * * `307 Temporary Redirect`: redirect will keep the request method\n * * `308 Permanent Redirect`: redirect will keep the request method, SEO will be transferred to the new page\n *\n * [See all redirect status codes](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#redirection_messages)\n *\n * @param {300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | ({} & number)} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#redirection_messages). Must be in the range 300-308.\n * @param {string | URL} location The location to redirect to.\n * @throws {Redirect} This error instructs SvelteKit to redirect to the specified location.\n * @throws {Error} If the provided status is invalid or the location cannot be used as a header value.\n * @return {never}\n */\nexport function redirect(status, location) {\n\tif ((!BROWSER || DEV) && (isNaN(status) || status < 300 || status > 308)) {\n\t\tthrow new Error('Invalid status code');\n\t}\n\n\tthrow new Redirect(\n\t\t// @ts-ignore\n\t\tstatus,\n\t\tlocation.toString()\n\t);\n}\n\n/**\n * Checks whether this is a redirect thrown by {@link redirect}.\n * @param {unknown} e The object to check.\n * @return {e is Redirect}\n */\nexport function isRedirect(e) {\n\treturn e instanceof Redirect;\n}\n\n/**\n * Create a JSON `Response` object from the supplied data.\n * @param {any} data The value that will be serialized as JSON.\n * @param {ResponseInit} [init] Options such as `status` and `headers` that will be added to the response. `Content-Type: application/json` and `Content-Length` headers will be added automatically.\n */\nexport function json(data, init) {\n\t// TODO deprecate this in favour of `Response.json` when it's\n\t// more widely supported\n\tconst body = JSON.stringify(data);\n\n\t// we can't just do `text(JSON.stringify(data), init)` because\n\t// it will set a default `content-type` header. duplicated code\n\t// means less duplicated work\n\tconst headers = new Headers(init?.headers);\n\tif (!headers.has('content-length')) {\n\t\theaders.set('content-length', text_encoder.encode(body).byteLength.toString());\n\t}\n\n\tif (!headers.has('content-type')) {\n\t\theaders.set('content-type', 'application/json');\n\t}\n\n\treturn new Response(body, {\n\t\t...init,\n\t\theaders\n\t});\n}\n\n/**\n * Create a `Response` object from the supplied body.\n * @param {string} body The value that will be used as-is.\n * @param {ResponseInit} [init] Options such as `status` and `headers` that will be added to the response. A `Content-Length` header will be added automatically.\n */\nexport function text(body, init) {\n\tconst headers = new Headers(init?.headers);\n\tif (!headers.has('content-length')) {\n\t\tconst encoded = text_encoder.encode(body);\n\t\theaders.set('content-length', encoded.byteLength.toString());\n\t\treturn new Response(encoded, {\n\t\t\t...init,\n\t\t\theaders\n\t\t});\n\t}\n\n\treturn new Response(body, {\n\t\t...init,\n\t\theaders\n\t});\n}\n\n/**\n * Create an `ActionFailure` object. Call when form submission fails.\n * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.\n * @overload\n * @param {number} status\n * @returns {import('./public.js').ActionFailure<undefined>}\n */\n/**\n * Create an `ActionFailure` object. Call when form submission fails.\n * @template [T=undefined]\n * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.\n * @param {T} data Data associated with the failure (e.g. validation errors)\n * @overload\n * @param {number} status\n * @param {T} data\n * @returns {import('./public.js').ActionFailure<T>}\n */\n/**\n * Create an `ActionFailure` object. Call when form submission fails.\n * @param {number} status\n * @param {any} [data]\n * @returns {import('./public.js').ActionFailure<any>}\n */\nexport function fail(status, data) {\n\t// @ts-expect-error unique symbol missing\n\treturn new ActionFailure(status, data);\n}\n\n/**\n * Checks whether this is an action failure thrown by {@link fail}.\n * @param {unknown} e The object to check.\n * @return {e is import('./public.js').ActionFailure}\n */\nexport function isActionFailure(e) {\n\treturn e instanceof ActionFailure;\n}\n\n/**\n * Use this to throw a validation error to imperatively fail form validation.\n * Can be used in combination with `issue` passed to form actions to create field-specific issues.\n *\n * @example\n * ```ts\n * import { invalid } from '@sveltejs/kit';\n * import { form } from '$app/server';\n * import { tryLogin } from '$lib/server/auth';\n * import * as v from 'valibot';\n *\n * export const login = form(\n * v.object({ name: v.string(), _password: v.string() }),\n * async ({ name, _password }) => {\n * const success = tryLogin(name, _password);\n * if (!success) {\n * invalid('Incorrect username or password');\n * }\n *\n * // ...\n * }\n * );\n * ```\n * @param {...(StandardSchemaV1.Issue | string)} issues\n * @returns {never}\n * @since 2.47.3\n */\nexport function invalid(...issues) {\n\tthrow new ValidationError(\n\t\tissues.map((issue) => (typeof issue === 'string' ? { message: issue } : issue))\n\t);\n}\n\n/**\n * Checks whether this is an validation error thrown by {@link invalid}.\n * @param {unknown} e The object to check.\n * @return {e is import('./public.js').ActionFailure}\n * @since 2.47.3\n */\nexport function isValidationError(e) {\n\treturn e instanceof ValidationError;\n}\n\n/**\n * Strips possible SvelteKit-internal suffixes and trailing slashes from the URL pathname.\n * Returns the normalized URL as well as a method for adding the potential suffix back\n * based on a new pathname (possibly including search) or URL.\n * ```js\n * import { normalizeUrl } from '@sveltejs/kit';\n *\n * const { url, denormalize } = normalizeUrl('/blog/post/__data.json');\n * console.log(url.pathname); // /blog/post\n * console.log(denormalize('/blog/post/a')); // /blog/post/a/__data.json\n * ```\n * @param {URL | string} url\n * @returns {{ url: URL, wasNormalized: boolean, denormalize: (url?: string | URL) => URL }}\n * @since 2.18.0\n */\nexport function normalizeUrl(url) {\n\turl = new URL(url, 'a://a');\n\n\tconst is_route_resolution = has_resolution_suffix(url.pathname);\n\tconst is_data_request = has_data_suffix(url.pathname);\n\tconst has_trailing_slash = url.pathname !== '/' && url.pathname.endsWith('/');\n\n\tif (is_route_resolution) {\n\t\turl.pathname = strip_resolution_suffix(url.pathname);\n\t} else if (is_data_request) {\n\t\turl.pathname = strip_data_suffix(url.pathname);\n\t} else if (has_trailing_slash) {\n\t\turl.pathname = url.pathname.slice(0, -1);\n\t}\n\n\treturn {\n\t\turl,\n\t\twasNormalized: is_data_request || is_route_resolution || has_trailing_slash,\n\t\tdenormalize: (new_url = url) => {\n\t\t\tnew_url = new URL(new_url, url);\n\t\t\tif (is_route_resolution) {\n\t\t\t\tnew_url.pathname = add_resolution_suffix(new_url.pathname);\n\t\t\t} else if (is_data_request) {\n\t\t\t\tnew_url.pathname = add_data_suffix(new_url.pathname);\n\t\t\t} else if (has_trailing_slash && !new_url.pathname.endsWith('/')) {\n\t\t\t\tnew_url.pathname += '/';\n\t\t\t}\n\t\t\treturn new_url;\n\t\t}\n\t};\n}\n"],"names":[],"mappings":"AAAA;;AAEO,MAAM,SAAS,CAAC;AACvB;AACA;AACA;AACA;AACA,CAAC,WAAW,CAAC,MAAM,EAAE,IAAI,EAAE;AAC3B,EAAE,IAAI,CAAC,MAAM,GAAG,MAAM;AACtB,EAAE,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;AAChC,GAAG,IAAI,CAAC,IAAI,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE;AAChC,EAAE,CAAC,MAAM,IAAI,IAAI,EAAE;AACnB,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI;AACnB,EAAE,CAAC,MAAM;AACT,GAAG,IAAI,CAAC,IAAI,GAAG,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,EAAE;AAC9C,EAAE;AACF,CAAC;;AAED,CAAC,QAAQ,GAAG;AACZ,EAAE,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC;AAClC,CAAC;AACD;;AAEO,MAAM,QAAQ,CAAC;AACtB;AACA;AACA;AACA;AACA,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,EAAE;AAC/B,EAAE,IAAI;AACN,GAAG,IAAI,OAAO,CAAC,EAAE,QAAQ,EAAE,CAAC;AAC5B,EAAE,CAAC,CAAC,MAAM;AACV,GAAG,MAAM,IAAI,KAAK;AAClB,IAAI,CAAC,0BAA0B,EAAE,IAAI,CAA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,OAAO,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;AAC9D,EAAE,OAAO,IAAI,QAAQ,CAAC,OAAO,EAAE;AAC/B,GAAG,GAAG,IAAI;AACV,GAAG;AACH,GAAG,CAAC;AACJ,CAAC;;AAED,CAAC,OAAO,IAAI,QAAQ,CAAC,IAAI,EAAE;AAC3B,EAAE,GAAG,IAAI;AACT,EAAE;AACF,EAAE,CAAC;AACH;;;;","x_google_ignoreList":[0,1,2]}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { createClient } from '@libsql/client';
|
|
2
|
+
import { drizzle } from 'drizzle-orm/libsql';
|
|
3
|
+
import { join } from 'node:path';
|
|
4
|
+
import { homedir } from 'node:os';
|
|
5
|
+
import { eq, and, sql, isNull, desc } from 'drizzle-orm';
|
|
6
|
+
import { sqliteTable, text, integer } from 'drizzle-orm/sqlite-core';
|
|
7
|
+
|
|
8
|
+
const project = sqliteTable("project", {
|
|
9
|
+
id: text("id").primaryKey(),
|
|
10
|
+
slug: text("slug").notNull().unique(),
|
|
11
|
+
name: text("name").notNull(),
|
|
12
|
+
gitRemote: text("git_remote"),
|
|
13
|
+
dod: text("dod"),
|
|
14
|
+
sprintLengthDays: integer("sprint_length_days").notNull().default(14),
|
|
15
|
+
wipEnabled: integer("wip_enabled", { mode: "boolean" }).notNull().default(false),
|
|
16
|
+
estimationEnabled: integer("estimation_enabled", { mode: "boolean" }).notNull().default(true),
|
|
17
|
+
createdAt: text("created_at").notNull()
|
|
18
|
+
});
|
|
19
|
+
const developer = sqliteTable("developer", {
|
|
20
|
+
id: text("id").primaryKey(),
|
|
21
|
+
projectId: text("project_id").notNull().references(() => project.id),
|
|
22
|
+
handle: text("handle").notNull(),
|
|
23
|
+
email: text("email"),
|
|
24
|
+
lastSeenAt: text("last_seen_at").notNull()
|
|
25
|
+
});
|
|
26
|
+
const sprint = sqliteTable("sprint", {
|
|
27
|
+
id: text("id").primaryKey(),
|
|
28
|
+
projectId: text("project_id").notNull().references(() => project.id),
|
|
29
|
+
name: text("name").notNull(),
|
|
30
|
+
goal: text("goal"),
|
|
31
|
+
startedAt: text("started_at").notNull(),
|
|
32
|
+
endedAt: text("ended_at"),
|
|
33
|
+
status: text("status").notNull(),
|
|
34
|
+
wipLimit: integer("wip_limit")
|
|
35
|
+
});
|
|
36
|
+
const epic = sqliteTable("epic", {
|
|
37
|
+
id: text("id").primaryKey(),
|
|
38
|
+
projectId: text("project_id").notNull().references(() => project.id),
|
|
39
|
+
title: text("title").notNull(),
|
|
40
|
+
description: text("description"),
|
|
41
|
+
status: text("status").notNull().default("open"),
|
|
42
|
+
priority: integer("priority").notNull().default(3),
|
|
43
|
+
targetSprintId: text("target_sprint_id").references(() => sprint.id),
|
|
44
|
+
createdAt: text("created_at").notNull()
|
|
45
|
+
});
|
|
46
|
+
const story = sqliteTable("story", {
|
|
47
|
+
id: text("id").primaryKey(),
|
|
48
|
+
epicId: text("epic_id").references(() => epic.id),
|
|
49
|
+
sprintId: text("sprint_id").references(() => sprint.id),
|
|
50
|
+
title: text("title").notNull(),
|
|
51
|
+
description: text("description"),
|
|
52
|
+
acceptance: text("acceptance"),
|
|
53
|
+
status: text("status").notNull().default("backlog"),
|
|
54
|
+
size: text("size"),
|
|
55
|
+
assigneeId: text("assignee_id").references(() => developer.id),
|
|
56
|
+
priority: integer("priority").notNull().default(3),
|
|
57
|
+
startedAt: text("started_at"),
|
|
58
|
+
completedAt: text("completed_at"),
|
|
59
|
+
createdAt: text("created_at").notNull()
|
|
60
|
+
});
|
|
61
|
+
const task = sqliteTable("task", {
|
|
62
|
+
id: text("id").primaryKey(),
|
|
63
|
+
storyId: text("story_id").notNull().references(() => story.id),
|
|
64
|
+
assigneeId: text("assignee_id").references(() => developer.id),
|
|
65
|
+
title: text("title").notNull(),
|
|
66
|
+
status: text("status").notNull().default("todo"),
|
|
67
|
+
blockedBy: text("blocked_by"),
|
|
68
|
+
createdAt: text("created_at").notNull()
|
|
69
|
+
});
|
|
70
|
+
const techDebt = sqliteTable("tech_debt", {
|
|
71
|
+
id: text("id").primaryKey(),
|
|
72
|
+
projectId: text("project_id").notNull().references(() => project.id),
|
|
73
|
+
title: text("title").notNull(),
|
|
74
|
+
description: text("description"),
|
|
75
|
+
severity: text("severity").notNull().default("med"),
|
|
76
|
+
location: text("location"),
|
|
77
|
+
ownerId: text("owner_id").references(() => developer.id),
|
|
78
|
+
expiresAt: text("expires_at"),
|
|
79
|
+
openedAt: text("opened_at").notNull(),
|
|
80
|
+
closedAt: text("closed_at"),
|
|
81
|
+
linkedStoryId: text("linked_story_id").references(() => story.id)
|
|
82
|
+
});
|
|
83
|
+
const decision = sqliteTable("decision", {
|
|
84
|
+
id: text("id").primaryKey(),
|
|
85
|
+
projectId: text("project_id").notNull().references(() => project.id),
|
|
86
|
+
title: text("title").notNull(),
|
|
87
|
+
context: text("context"),
|
|
88
|
+
decision: text("decision").notNull(),
|
|
89
|
+
status: text("status").notNull().default("accepted"),
|
|
90
|
+
decidedAt: text("decided_at").notNull()
|
|
91
|
+
});
|
|
92
|
+
const progressEvent = sqliteTable("progress_event", {
|
|
93
|
+
id: text("id").primaryKey(),
|
|
94
|
+
projectId: text("project_id").notNull().references(() => project.id),
|
|
95
|
+
developerId: text("developer_id").references(() => developer.id),
|
|
96
|
+
sprintId: text("sprint_id").references(() => sprint.id),
|
|
97
|
+
kind: text("kind").notNull(),
|
|
98
|
+
refId: text("ref_id"),
|
|
99
|
+
summary: text("summary").notNull(),
|
|
100
|
+
ts: text("ts").notNull()
|
|
101
|
+
});
|
|
102
|
+
const schema = {
|
|
103
|
+
project,
|
|
104
|
+
developer,
|
|
105
|
+
sprint,
|
|
106
|
+
epic,
|
|
107
|
+
story,
|
|
108
|
+
task,
|
|
109
|
+
techDebt,
|
|
110
|
+
decision,
|
|
111
|
+
progressEvent
|
|
112
|
+
};
|
|
113
|
+
let cached = null;
|
|
114
|
+
function helmHome() {
|
|
115
|
+
return process.env.HELM_HOME ?? join(homedir(), ".helm");
|
|
116
|
+
}
|
|
117
|
+
function activeSlug() {
|
|
118
|
+
const slug = process.env.HELM_PROJECT_SLUG;
|
|
119
|
+
if (!slug) {
|
|
120
|
+
throw new Error("HELM_PROJECT_SLUG not set — start the dashboard via `helm dashboard`.");
|
|
121
|
+
}
|
|
122
|
+
return slug;
|
|
123
|
+
}
|
|
124
|
+
function db() {
|
|
125
|
+
if (cached) return cached;
|
|
126
|
+
const slug = activeSlug();
|
|
127
|
+
const path = join(helmHome(), `${slug}.db`);
|
|
128
|
+
const syncUrl = process.env.HELM_SYNC_URL;
|
|
129
|
+
const syncToken = process.env.HELM_SYNC_TOKEN;
|
|
130
|
+
const syncIntervalSec = Number(process.env.HELM_SYNC_INTERVAL_MS ?? "5000") / 1e3;
|
|
131
|
+
const client = syncUrl ? createClient({ url: `file:${path}`, syncUrl, authToken: syncToken, syncInterval: syncIntervalSec }) : createClient({ url: `file:${path}` });
|
|
132
|
+
cached = drizzle(client, { schema });
|
|
133
|
+
return cached;
|
|
134
|
+
}
|
|
135
|
+
async function loadProject(db2, slug) {
|
|
136
|
+
const rows = await db2.select().from(project).where(eq(project.slug, slug)).limit(1);
|
|
137
|
+
return rows[0] ?? null;
|
|
138
|
+
}
|
|
139
|
+
async function loadActiveSprint(db2, projectId) {
|
|
140
|
+
const rows = await db2.select().from(sprint).where(and(eq(sprint.projectId, projectId), eq(sprint.status, "active"))).limit(1);
|
|
141
|
+
return rows[0] ?? null;
|
|
142
|
+
}
|
|
143
|
+
async function loadAllSprints(db2, projectId) {
|
|
144
|
+
return db2.select().from(sprint).where(eq(sprint.projectId, projectId)).orderBy(desc(sprint.startedAt));
|
|
145
|
+
}
|
|
146
|
+
async function loadSprintById(db2, sprintId) {
|
|
147
|
+
const rows = await db2.select().from(sprint).where(eq(sprint.id, sprintId)).limit(1);
|
|
148
|
+
return rows[0] ?? null;
|
|
149
|
+
}
|
|
150
|
+
async function loadStoriesInSprint(db2, sprintId) {
|
|
151
|
+
return db2.select().from(story).where(eq(story.sprintId, sprintId)).orderBy(story.priority);
|
|
152
|
+
}
|
|
153
|
+
async function loadOpenDebt(db2, projectId, limit = 100) {
|
|
154
|
+
return db2.select().from(techDebt).where(and(eq(techDebt.projectId, projectId), isNull(techDebt.closedAt))).orderBy(sql`severity desc, opened_at desc`).limit(limit);
|
|
155
|
+
}
|
|
156
|
+
async function loadAllDebt(db2, projectId, limit = 500) {
|
|
157
|
+
return db2.select().from(techDebt).where(eq(techDebt.projectId, projectId)).orderBy(sql`closed_at is null desc, severity desc, opened_at desc`).limit(limit);
|
|
158
|
+
}
|
|
159
|
+
async function loadRecentEvents(db2, projectId, limit = 30) {
|
|
160
|
+
return db2.select().from(progressEvent).where(eq(progressEvent.projectId, projectId)).orderBy(desc(progressEvent.ts)).limit(limit);
|
|
161
|
+
}
|
|
162
|
+
async function loadSprintMetrics(db2, projectId) {
|
|
163
|
+
const sprints = await loadAllSprints(db2, projectId);
|
|
164
|
+
const out = [];
|
|
165
|
+
for (const s of sprints) {
|
|
166
|
+
out.push(await computeSprintMetric(db2, s));
|
|
167
|
+
}
|
|
168
|
+
return out;
|
|
169
|
+
}
|
|
170
|
+
async function computeSprintMetric(db2, s) {
|
|
171
|
+
const total = await db2.select({ c: sql`count(*)` }).from(story).where(eq(story.sprintId, s.id));
|
|
172
|
+
const done = await db2.select({ c: sql`count(*)` }).from(story).where(and(eq(story.sprintId, s.id), eq(story.status, "done")));
|
|
173
|
+
const opened = await db2.select({ c: sql`count(*)` }).from(progressEvent).where(and(eq(progressEvent.sprintId, s.id), eq(progressEvent.kind, "debt.opened")));
|
|
174
|
+
const closed = await db2.select({ c: sql`count(*)` }).from(progressEvent).where(and(eq(progressEvent.sprintId, s.id), eq(progressEvent.kind, "debt.closed")));
|
|
175
|
+
const o = opened[0]?.c ?? 0;
|
|
176
|
+
const c = closed[0]?.c ?? 0;
|
|
177
|
+
return {
|
|
178
|
+
sprintId: s.id,
|
|
179
|
+
name: s.name,
|
|
180
|
+
status: s.status,
|
|
181
|
+
startedAt: s.startedAt,
|
|
182
|
+
endedAt: s.endedAt,
|
|
183
|
+
storiesTotal: total[0]?.c ?? 0,
|
|
184
|
+
storiesDone: done[0]?.c ?? 0,
|
|
185
|
+
debtOpened: o,
|
|
186
|
+
debtClosed: c,
|
|
187
|
+
debtDelta: o - c
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
async function loadEventsForSprint(db2, sprintId, limit = 100) {
|
|
191
|
+
return db2.select().from(progressEvent).where(eq(progressEvent.sprintId, sprintId)).orderBy(desc(progressEvent.ts)).limit(limit);
|
|
192
|
+
}
|
|
193
|
+
async function loadDecisions(db2, projectId, limit = 50) {
|
|
194
|
+
return db2.select().from(decision).where(eq(decision.projectId, projectId)).orderBy(desc(decision.decidedAt)).limit(limit);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export { activeSlug as a, loadAllDebt as b, computeSprintMetric as c, db as d, loadDecisions as e, loadEventsForSprint as f, loadOpenDebt as g, loadProject as h, loadRecentEvents as i, loadSprintById as j, loadSprintMetrics as k, loadActiveSprint as l, loadStoriesInSprint as m };
|
|
198
|
+
//# sourceMappingURL=queries-DGWi-KlP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queries-DGWi-KlP.js","sources":["../../../.svelte-kit/adapter-node/chunks/queries.js"],"sourcesContent":["import { createClient } from \"@libsql/client\";\nimport { drizzle } from \"drizzle-orm/libsql\";\nimport { join } from \"node:path\";\nimport { homedir } from \"node:os\";\nimport { eq, and, sql, isNull, desc } from \"drizzle-orm\";\nimport { sqliteTable, text, integer } from \"drizzle-orm/sqlite-core\";\nconst project = sqliteTable(\"project\", {\n id: text(\"id\").primaryKey(),\n slug: text(\"slug\").notNull().unique(),\n name: text(\"name\").notNull(),\n gitRemote: text(\"git_remote\"),\n dod: text(\"dod\"),\n sprintLengthDays: integer(\"sprint_length_days\").notNull().default(14),\n wipEnabled: integer(\"wip_enabled\", { mode: \"boolean\" }).notNull().default(false),\n estimationEnabled: integer(\"estimation_enabled\", { mode: \"boolean\" }).notNull().default(true),\n createdAt: text(\"created_at\").notNull()\n});\nconst developer = sqliteTable(\"developer\", {\n id: text(\"id\").primaryKey(),\n projectId: text(\"project_id\").notNull().references(() => project.id),\n handle: text(\"handle\").notNull(),\n email: text(\"email\"),\n lastSeenAt: text(\"last_seen_at\").notNull()\n});\nconst sprint = sqliteTable(\"sprint\", {\n id: text(\"id\").primaryKey(),\n projectId: text(\"project_id\").notNull().references(() => project.id),\n name: text(\"name\").notNull(),\n goal: text(\"goal\"),\n startedAt: text(\"started_at\").notNull(),\n endedAt: text(\"ended_at\"),\n status: text(\"status\").notNull(),\n wipLimit: integer(\"wip_limit\")\n});\nconst epic = sqliteTable(\"epic\", {\n id: text(\"id\").primaryKey(),\n projectId: text(\"project_id\").notNull().references(() => project.id),\n title: text(\"title\").notNull(),\n description: text(\"description\"),\n status: text(\"status\").notNull().default(\"open\"),\n priority: integer(\"priority\").notNull().default(3),\n targetSprintId: text(\"target_sprint_id\").references(() => sprint.id),\n createdAt: text(\"created_at\").notNull()\n});\nconst story = sqliteTable(\"story\", {\n id: text(\"id\").primaryKey(),\n epicId: text(\"epic_id\").references(() => epic.id),\n sprintId: text(\"sprint_id\").references(() => sprint.id),\n title: text(\"title\").notNull(),\n description: text(\"description\"),\n acceptance: text(\"acceptance\"),\n status: text(\"status\").notNull().default(\"backlog\"),\n size: text(\"size\"),\n assigneeId: text(\"assignee_id\").references(() => developer.id),\n priority: integer(\"priority\").notNull().default(3),\n startedAt: text(\"started_at\"),\n completedAt: text(\"completed_at\"),\n createdAt: text(\"created_at\").notNull()\n});\nconst task = sqliteTable(\"task\", {\n id: text(\"id\").primaryKey(),\n storyId: text(\"story_id\").notNull().references(() => story.id),\n assigneeId: text(\"assignee_id\").references(() => developer.id),\n title: text(\"title\").notNull(),\n status: text(\"status\").notNull().default(\"todo\"),\n blockedBy: text(\"blocked_by\"),\n createdAt: text(\"created_at\").notNull()\n});\nconst techDebt = sqliteTable(\"tech_debt\", {\n id: text(\"id\").primaryKey(),\n projectId: text(\"project_id\").notNull().references(() => project.id),\n title: text(\"title\").notNull(),\n description: text(\"description\"),\n severity: text(\"severity\").notNull().default(\"med\"),\n location: text(\"location\"),\n ownerId: text(\"owner_id\").references(() => developer.id),\n expiresAt: text(\"expires_at\"),\n openedAt: text(\"opened_at\").notNull(),\n closedAt: text(\"closed_at\"),\n linkedStoryId: text(\"linked_story_id\").references(() => story.id)\n});\nconst decision = sqliteTable(\"decision\", {\n id: text(\"id\").primaryKey(),\n projectId: text(\"project_id\").notNull().references(() => project.id),\n title: text(\"title\").notNull(),\n context: text(\"context\"),\n decision: text(\"decision\").notNull(),\n status: text(\"status\").notNull().default(\"accepted\"),\n decidedAt: text(\"decided_at\").notNull()\n});\nconst progressEvent = sqliteTable(\"progress_event\", {\n id: text(\"id\").primaryKey(),\n projectId: text(\"project_id\").notNull().references(() => project.id),\n developerId: text(\"developer_id\").references(() => developer.id),\n sprintId: text(\"sprint_id\").references(() => sprint.id),\n kind: text(\"kind\").notNull(),\n refId: text(\"ref_id\"),\n summary: text(\"summary\").notNull(),\n ts: text(\"ts\").notNull()\n});\nconst schema = {\n project,\n developer,\n sprint,\n epic,\n story,\n task,\n techDebt,\n decision,\n progressEvent\n};\nlet cached = null;\nfunction helmHome() {\n return process.env.HELM_HOME ?? join(homedir(), \".helm\");\n}\nfunction activeSlug() {\n const slug = process.env.HELM_PROJECT_SLUG;\n if (!slug) {\n throw new Error(\"HELM_PROJECT_SLUG not set — start the dashboard via `helm dashboard`.\");\n }\n return slug;\n}\nfunction db() {\n if (cached) return cached;\n const slug = activeSlug();\n const path = join(helmHome(), `${slug}.db`);\n const syncUrl = process.env.HELM_SYNC_URL;\n const syncToken = process.env.HELM_SYNC_TOKEN;\n const syncIntervalSec = Number(process.env.HELM_SYNC_INTERVAL_MS ?? \"5000\") / 1e3;\n const client = syncUrl ? createClient({ url: `file:${path}`, syncUrl, authToken: syncToken, syncInterval: syncIntervalSec }) : createClient({ url: `file:${path}` });\n cached = drizzle(client, { schema });\n return cached;\n}\nasync function loadProject(db2, slug) {\n const rows = await db2.select().from(project).where(eq(project.slug, slug)).limit(1);\n return rows[0] ?? null;\n}\nasync function loadActiveSprint(db2, projectId) {\n const rows = await db2.select().from(sprint).where(and(eq(sprint.projectId, projectId), eq(sprint.status, \"active\"))).limit(1);\n return rows[0] ?? null;\n}\nasync function loadAllSprints(db2, projectId) {\n return db2.select().from(sprint).where(eq(sprint.projectId, projectId)).orderBy(desc(sprint.startedAt));\n}\nasync function loadSprintById(db2, sprintId) {\n const rows = await db2.select().from(sprint).where(eq(sprint.id, sprintId)).limit(1);\n return rows[0] ?? null;\n}\nasync function loadStoriesInSprint(db2, sprintId) {\n return db2.select().from(story).where(eq(story.sprintId, sprintId)).orderBy(story.priority);\n}\nasync function loadOpenDebt(db2, projectId, limit = 100) {\n return db2.select().from(techDebt).where(and(eq(techDebt.projectId, projectId), isNull(techDebt.closedAt))).orderBy(sql`severity desc, opened_at desc`).limit(limit);\n}\nasync function loadAllDebt(db2, projectId, limit = 500) {\n return db2.select().from(techDebt).where(eq(techDebt.projectId, projectId)).orderBy(sql`closed_at is null desc, severity desc, opened_at desc`).limit(limit);\n}\nasync function loadRecentEvents(db2, projectId, limit = 30) {\n return db2.select().from(progressEvent).where(eq(progressEvent.projectId, projectId)).orderBy(desc(progressEvent.ts)).limit(limit);\n}\nasync function loadSprintMetrics(db2, projectId) {\n const sprints = await loadAllSprints(db2, projectId);\n const out = [];\n for (const s of sprints) {\n out.push(await computeSprintMetric(db2, s));\n }\n return out;\n}\nasync function computeSprintMetric(db2, s) {\n const total = await db2.select({ c: sql`count(*)` }).from(story).where(eq(story.sprintId, s.id));\n const done = await db2.select({ c: sql`count(*)` }).from(story).where(and(eq(story.sprintId, s.id), eq(story.status, \"done\")));\n const opened = await db2.select({ c: sql`count(*)` }).from(progressEvent).where(and(eq(progressEvent.sprintId, s.id), eq(progressEvent.kind, \"debt.opened\")));\n const closed = await db2.select({ c: sql`count(*)` }).from(progressEvent).where(and(eq(progressEvent.sprintId, s.id), eq(progressEvent.kind, \"debt.closed\")));\n const o = opened[0]?.c ?? 0;\n const c = closed[0]?.c ?? 0;\n return {\n sprintId: s.id,\n name: s.name,\n status: s.status,\n startedAt: s.startedAt,\n endedAt: s.endedAt,\n storiesTotal: total[0]?.c ?? 0,\n storiesDone: done[0]?.c ?? 0,\n debtOpened: o,\n debtClosed: c,\n debtDelta: o - c\n };\n}\nasync function loadEventsForSprint(db2, sprintId, limit = 100) {\n return db2.select().from(progressEvent).where(eq(progressEvent.sprintId, sprintId)).orderBy(desc(progressEvent.ts)).limit(limit);\n}\nasync function loadDecisions(db2, projectId, limit = 50) {\n return db2.select().from(decision).where(eq(decision.projectId, projectId)).orderBy(desc(decision.decidedAt)).limit(limit);\n}\nexport {\n activeSlug as a,\n loadAllDebt as b,\n computeSprintMetric as c,\n db as d,\n loadDecisions as e,\n loadEventsForSprint as f,\n loadOpenDebt as g,\n loadProject as h,\n loadRecentEvents as i,\n loadSprintById as j,\n loadSprintMetrics as k,\n loadActiveSprint as l,\n loadStoriesInSprint as m\n};\n"],"names":[],"mappings":";;;;;;;AAMA,MAAM,OAAO,GAAG,WAAW,CAAC,SAAS,EAAE;AACvC,EAAE,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE;AAC7B,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE;AACvC,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE;AAC9B,EAAE,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC;AAC/B,EAAE,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC;AAClB,EAAE,gBAAgB,EAAE,OAAO,CAAC,oBAAoB,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;AACvE,EAAE,UAAU,EAAE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