@mc1global/opencode-jarvis 0.1.1 → 0.3.1
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/dist/application/agent-registry/dtos.d.ts +66 -0
- package/dist/application/agent-registry/dtos.d.ts.map +1 -0
- package/dist/application/agent-registry/dtos.js +11 -0
- package/dist/application/agent-registry/dtos.js.map +1 -0
- package/dist/application/agent-registry/use-cases.d.ts +39 -0
- package/dist/application/agent-registry/use-cases.d.ts.map +1 -0
- package/dist/application/agent-registry/use-cases.js +222 -0
- package/dist/application/agent-registry/use-cases.js.map +1 -0
- package/dist/application/azure-sync/dtos.d.ts +210 -0
- package/dist/application/azure-sync/dtos.d.ts.map +1 -0
- package/dist/application/azure-sync/dtos.js +11 -0
- package/dist/application/azure-sync/dtos.js.map +1 -0
- package/dist/application/azure-sync/field-builders.d.ts +54 -0
- package/dist/application/azure-sync/field-builders.d.ts.map +1 -0
- package/dist/application/azure-sync/field-builders.js +166 -0
- package/dist/application/azure-sync/field-builders.js.map +1 -0
- package/dist/application/azure-sync/index.d.ts +16 -0
- package/dist/application/azure-sync/index.d.ts.map +1 -0
- package/dist/application/azure-sync/index.js +10 -0
- package/dist/application/azure-sync/index.js.map +1 -0
- package/dist/application/azure-sync/pr-use-cases.d.ts +39 -0
- package/dist/application/azure-sync/pr-use-cases.d.ts.map +1 -0
- package/dist/application/azure-sync/pr-use-cases.js +192 -0
- package/dist/application/azure-sync/pr-use-cases.js.map +1 -0
- package/dist/application/azure-sync/pull-use-cases.d.ts +43 -0
- package/dist/application/azure-sync/pull-use-cases.d.ts.map +1 -0
- package/dist/application/azure-sync/pull-use-cases.js +322 -0
- package/dist/application/azure-sync/pull-use-cases.js.map +1 -0
- package/dist/application/azure-sync/push-use-cases.d.ts +53 -0
- package/dist/application/azure-sync/push-use-cases.d.ts.map +1 -0
- package/dist/application/azure-sync/push-use-cases.js +341 -0
- package/dist/application/azure-sync/push-use-cases.js.map +1 -0
- package/dist/application/azure-sync/reverse-field-builder.d.ts +52 -0
- package/dist/application/azure-sync/reverse-field-builder.d.ts.map +1 -0
- package/dist/application/azure-sync/reverse-field-builder.js +130 -0
- package/dist/application/azure-sync/reverse-field-builder.js.map +1 -0
- package/dist/application/azure-sync/task-push-use-cases.d.ts +68 -0
- package/dist/application/azure-sync/task-push-use-cases.d.ts.map +1 -0
- package/dist/application/azure-sync/task-push-use-cases.js +162 -0
- package/dist/application/azure-sync/task-push-use-cases.js.map +1 -0
- package/dist/application/config/config-service.d.ts +64 -0
- package/dist/application/config/config-service.d.ts.map +1 -0
- package/dist/application/config/config-service.js +110 -0
- package/dist/application/config/config-service.js.map +1 -0
- package/dist/application/config/index.d.ts +5 -0
- package/dist/application/config/index.d.ts.map +1 -0
- package/dist/application/config/index.js +5 -0
- package/dist/application/config/index.js.map +1 -0
- package/dist/application/kanban/board-use-cases.d.ts.map +1 -1
- package/dist/application/kanban/board-use-cases.js +14 -0
- package/dist/application/kanban/board-use-cases.js.map +1 -1
- package/dist/application/kanban/card-use-cases.d.ts +21 -2
- package/dist/application/kanban/card-use-cases.d.ts.map +1 -1
- package/dist/application/kanban/card-use-cases.js +180 -1
- package/dist/application/kanban/card-use-cases.js.map +1 -1
- package/dist/application/kanban/dtos.d.ts +59 -0
- package/dist/application/kanban/dtos.d.ts.map +1 -1
- package/dist/application/mcp/index.d.ts +10 -0
- package/dist/application/mcp/index.d.ts.map +1 -0
- package/dist/application/mcp/index.js +8 -0
- package/dist/application/mcp/index.js.map +1 -0
- package/dist/application/mcp/middleware.d.ts +91 -0
- package/dist/application/mcp/middleware.d.ts.map +1 -0
- package/dist/application/mcp/middleware.js +84 -0
- package/dist/application/mcp/middleware.js.map +1 -0
- package/dist/application/mcp/tool-adapter.d.ts +72 -0
- package/dist/application/mcp/tool-adapter.d.ts.map +1 -0
- package/dist/application/mcp/tool-adapter.js +132 -0
- package/dist/application/mcp/tool-adapter.js.map +1 -0
- package/dist/application/pipeline/dtos.d.ts +135 -0
- package/dist/application/pipeline/dtos.d.ts.map +1 -0
- package/dist/application/pipeline/dtos.js +11 -0
- package/dist/application/pipeline/dtos.js.map +1 -0
- package/dist/application/pipeline/index.d.ts +8 -0
- package/dist/application/pipeline/index.d.ts.map +1 -0
- package/dist/application/pipeline/index.js +7 -0
- package/dist/application/pipeline/index.js.map +1 -0
- package/dist/application/pipeline/use-cases.d.ts +67 -0
- package/dist/application/pipeline/use-cases.d.ts.map +1 -0
- package/dist/application/pipeline/use-cases.js +413 -0
- package/dist/application/pipeline/use-cases.js.map +1 -0
- package/dist/application/rag/use-cases.d.ts +3 -0
- package/dist/application/rag/use-cases.d.ts.map +1 -1
- package/dist/application/rag/use-cases.js +112 -34
- package/dist/application/rag/use-cases.js.map +1 -1
- package/dist/domain/agent-registry/entities.d.ts +68 -0
- package/dist/domain/agent-registry/entities.d.ts.map +1 -0
- package/dist/domain/agent-registry/entities.js +177 -0
- package/dist/domain/agent-registry/entities.js.map +1 -0
- package/dist/domain/agent-registry/repositories.d.ts +56 -0
- package/dist/domain/agent-registry/repositories.d.ts.map +1 -0
- package/dist/domain/agent-registry/repositories.js +12 -0
- package/dist/domain/agent-registry/repositories.js.map +1 -0
- package/dist/domain/agent-registry/services.d.ts +87 -0
- package/dist/domain/agent-registry/services.d.ts.map +1 -0
- package/dist/domain/agent-registry/services.js +188 -0
- package/dist/domain/agent-registry/services.js.map +1 -0
- package/dist/domain/agent-registry/value-objects.d.ts +145 -0
- package/dist/domain/agent-registry/value-objects.d.ts.map +1 -0
- package/dist/domain/agent-registry/value-objects.js +339 -0
- package/dist/domain/agent-registry/value-objects.js.map +1 -0
- package/dist/domain/azure-sync/entities.d.ts +165 -0
- package/dist/domain/azure-sync/entities.d.ts.map +1 -0
- package/dist/domain/azure-sync/entities.js +203 -0
- package/dist/domain/azure-sync/entities.js.map +1 -0
- package/dist/domain/azure-sync/index.d.ts +16 -0
- package/dist/domain/azure-sync/index.d.ts.map +1 -0
- package/dist/domain/azure-sync/index.js +14 -0
- package/dist/domain/azure-sync/index.js.map +1 -0
- package/dist/domain/azure-sync/ports.d.ts +117 -0
- package/dist/domain/azure-sync/ports.d.ts.map +1 -0
- package/dist/domain/azure-sync/ports.js +13 -0
- package/dist/domain/azure-sync/ports.js.map +1 -0
- package/dist/domain/azure-sync/repositories.d.ts +53 -0
- package/dist/domain/azure-sync/repositories.d.ts.map +1 -0
- package/dist/domain/azure-sync/repositories.js +11 -0
- package/dist/domain/azure-sync/repositories.js.map +1 -0
- package/dist/domain/azure-sync/services.d.ts +107 -0
- package/dist/domain/azure-sync/services.d.ts.map +1 -0
- package/dist/domain/azure-sync/services.js +316 -0
- package/dist/domain/azure-sync/services.js.map +1 -0
- package/dist/domain/azure-sync/value-objects.d.ts +129 -0
- package/dist/domain/azure-sync/value-objects.d.ts.map +1 -0
- package/dist/domain/azure-sync/value-objects.js +343 -0
- package/dist/domain/azure-sync/value-objects.js.map +1 -0
- package/dist/domain/config/index.d.ts +9 -0
- package/dist/domain/config/index.d.ts.map +1 -0
- package/dist/domain/config/index.js +7 -0
- package/dist/domain/config/index.js.map +1 -0
- package/dist/domain/config/repositories.d.ts +36 -0
- package/dist/domain/config/repositories.d.ts.map +1 -0
- package/dist/domain/config/repositories.js +12 -0
- package/dist/domain/config/repositories.js.map +1 -0
- package/dist/domain/config/value-objects.d.ts +112 -0
- package/dist/domain/config/value-objects.d.ts.map +1 -0
- package/dist/domain/config/value-objects.js +93 -0
- package/dist/domain/config/value-objects.js.map +1 -0
- package/dist/domain/governance/policies.d.ts.map +1 -1
- package/dist/domain/governance/policies.js +70 -0
- package/dist/domain/governance/policies.js.map +1 -1
- package/dist/domain/kanban/entities.d.ts +67 -15
- package/dist/domain/kanban/entities.d.ts.map +1 -1
- package/dist/domain/kanban/entities.js +177 -14
- package/dist/domain/kanban/entities.js.map +1 -1
- package/dist/domain/kanban/grooming.d.ts +27 -7
- package/dist/domain/kanban/grooming.d.ts.map +1 -1
- package/dist/domain/kanban/grooming.js +50 -12
- package/dist/domain/kanban/grooming.js.map +1 -1
- package/dist/domain/kanban/services.d.ts +16 -2
- package/dist/domain/kanban/services.d.ts.map +1 -1
- package/dist/domain/kanban/services.js +29 -2
- package/dist/domain/kanban/services.js.map +1 -1
- package/dist/domain/kanban/value-objects.d.ts +48 -0
- package/dist/domain/kanban/value-objects.d.ts.map +1 -1
- package/dist/domain/kanban/value-objects.js +53 -0
- package/dist/domain/kanban/value-objects.js.map +1 -1
- package/dist/domain/pipeline/gate.d.ts +75 -0
- package/dist/domain/pipeline/gate.d.ts.map +1 -0
- package/dist/domain/pipeline/gate.js +158 -0
- package/dist/domain/pipeline/gate.js.map +1 -0
- package/dist/domain/pipeline/index.d.ts +13 -0
- package/dist/domain/pipeline/index.d.ts.map +1 -0
- package/dist/domain/pipeline/index.js +14 -0
- package/dist/domain/pipeline/index.js.map +1 -0
- package/dist/domain/pipeline/pipeline.d.ts +99 -0
- package/dist/domain/pipeline/pipeline.d.ts.map +1 -0
- package/dist/domain/pipeline/pipeline.js +257 -0
- package/dist/domain/pipeline/pipeline.js.map +1 -0
- package/dist/domain/pipeline/ports.d.ts +120 -0
- package/dist/domain/pipeline/ports.d.ts.map +1 -0
- package/dist/domain/pipeline/ports.js +12 -0
- package/dist/domain/pipeline/ports.js.map +1 -0
- package/dist/domain/pipeline/repositories.d.ts +66 -0
- package/dist/domain/pipeline/repositories.d.ts.map +1 -0
- package/dist/domain/pipeline/repositories.js +11 -0
- package/dist/domain/pipeline/repositories.js.map +1 -0
- package/dist/domain/pipeline/services.d.ts +77 -0
- package/dist/domain/pipeline/services.d.ts.map +1 -0
- package/dist/domain/pipeline/services.js +156 -0
- package/dist/domain/pipeline/services.js.map +1 -0
- package/dist/domain/pipeline/value-objects.d.ts +117 -0
- package/dist/domain/pipeline/value-objects.d.ts.map +1 -0
- package/dist/domain/pipeline/value-objects.js +313 -0
- package/dist/domain/pipeline/value-objects.js.map +1 -0
- package/dist/domain/rag/value-objects.d.ts +9 -2
- package/dist/domain/rag/value-objects.d.ts.map +1 -1
- package/dist/domain/rag/value-objects.js +8 -2
- package/dist/domain/rag/value-objects.js.map +1 -1
- package/dist/hooks/event-handlers.d.ts +3 -0
- package/dist/hooks/event-handlers.d.ts.map +1 -1
- package/dist/hooks/event-handlers.js +4 -2
- package/dist/hooks/event-handlers.js.map +1 -1
- package/dist/hooks/logger.d.ts +46 -0
- package/dist/hooks/logger.d.ts.map +1 -0
- package/dist/hooks/logger.js +79 -0
- package/dist/hooks/logger.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +152 -108
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/agent-registry/agent-profile-repository.d.ts +29 -0
- package/dist/infrastructure/agent-registry/agent-profile-repository.d.ts.map +1 -0
- package/dist/infrastructure/agent-registry/agent-profile-repository.js +109 -0
- package/dist/infrastructure/agent-registry/agent-profile-repository.js.map +1 -0
- package/dist/infrastructure/agent-registry/agent-session-adapter.d.ts +28 -0
- package/dist/infrastructure/agent-registry/agent-session-adapter.d.ts.map +1 -0
- package/dist/infrastructure/agent-registry/agent-session-adapter.js +61 -0
- package/dist/infrastructure/agent-registry/agent-session-adapter.js.map +1 -0
- package/dist/infrastructure/agent-registry/built-in-profiles.d.ts +19 -0
- package/dist/infrastructure/agent-registry/built-in-profiles.d.ts.map +1 -0
- package/dist/infrastructure/agent-registry/built-in-profiles.js +210 -0
- package/dist/infrastructure/agent-registry/built-in-profiles.js.map +1 -0
- package/dist/infrastructure/azure-sync/azure-auth.d.ts +40 -0
- package/dist/infrastructure/azure-sync/azure-auth.d.ts.map +1 -0
- package/dist/infrastructure/azure-sync/azure-auth.js +94 -0
- package/dist/infrastructure/azure-sync/azure-auth.js.map +1 -0
- package/dist/infrastructure/azure-sync/azure-devops-client.d.ts +43 -0
- package/dist/infrastructure/azure-sync/azure-devops-client.d.ts.map +1 -0
- package/dist/infrastructure/azure-sync/azure-devops-client.js +296 -0
- package/dist/infrastructure/azure-sync/azure-devops-client.js.map +1 -0
- package/dist/infrastructure/azure-sync/index.d.ts +9 -0
- package/dist/infrastructure/azure-sync/index.d.ts.map +1 -0
- package/dist/infrastructure/azure-sync/index.js +12 -0
- package/dist/infrastructure/azure-sync/index.js.map +1 -0
- package/dist/infrastructure/azure-sync/sqlite-sync-repository.d.ts +39 -0
- package/dist/infrastructure/azure-sync/sqlite-sync-repository.d.ts.map +1 -0
- package/dist/infrastructure/azure-sync/sqlite-sync-repository.js +202 -0
- package/dist/infrastructure/azure-sync/sqlite-sync-repository.js.map +1 -0
- package/dist/infrastructure/config/index.d.ts +5 -0
- package/dist/infrastructure/config/index.d.ts.map +1 -0
- package/dist/infrastructure/config/index.js +5 -0
- package/dist/infrastructure/config/index.js.map +1 -0
- package/dist/infrastructure/config/yaml-config-repository.d.ts +22 -0
- package/dist/infrastructure/config/yaml-config-repository.d.ts.map +1 -0
- package/dist/infrastructure/config/yaml-config-repository.js +68 -0
- package/dist/infrastructure/config/yaml-config-repository.js.map +1 -0
- package/dist/infrastructure/domain-map/llm-prompt-factory.d.ts +21 -0
- package/dist/infrastructure/domain-map/llm-prompt-factory.d.ts.map +1 -0
- package/dist/infrastructure/domain-map/llm-prompt-factory.js +49 -0
- package/dist/infrastructure/domain-map/llm-prompt-factory.js.map +1 -0
- package/dist/infrastructure/kanban/card-repository.d.ts +6 -0
- package/dist/infrastructure/kanban/card-repository.d.ts.map +1 -1
- package/dist/infrastructure/kanban/card-repository.js +79 -7
- package/dist/infrastructure/kanban/card-repository.js.map +1 -1
- package/dist/infrastructure/pipeline/dagger-adapter.d.ts +50 -0
- package/dist/infrastructure/pipeline/dagger-adapter.d.ts.map +1 -0
- package/dist/infrastructure/pipeline/dagger-adapter.js +153 -0
- package/dist/infrastructure/pipeline/dagger-adapter.js.map +1 -0
- package/dist/infrastructure/pipeline/dagger-scaffold-generator.d.ts +35 -0
- package/dist/infrastructure/pipeline/dagger-scaffold-generator.d.ts.map +1 -0
- package/dist/infrastructure/pipeline/dagger-scaffold-generator.js +132 -0
- package/dist/infrastructure/pipeline/dagger-scaffold-generator.js.map +1 -0
- package/dist/infrastructure/pipeline/index.d.ts +20 -0
- package/dist/infrastructure/pipeline/index.d.ts.map +1 -0
- package/dist/infrastructure/pipeline/index.js +19 -0
- package/dist/infrastructure/pipeline/index.js.map +1 -0
- package/dist/infrastructure/pipeline/pipeline-template-registry.d.ts +23 -0
- package/dist/infrastructure/pipeline/pipeline-template-registry.d.ts.map +1 -0
- package/dist/infrastructure/pipeline/pipeline-template-registry.js +63 -0
- package/dist/infrastructure/pipeline/pipeline-template-registry.js.map +1 -0
- package/dist/infrastructure/pipeline/scaffold-templates-extra.d.ts +17 -0
- package/dist/infrastructure/pipeline/scaffold-templates-extra.d.ts.map +1 -0
- package/dist/infrastructure/pipeline/scaffold-templates-extra.js +467 -0
- package/dist/infrastructure/pipeline/scaffold-templates-extra.js.map +1 -0
- package/dist/infrastructure/pipeline/scaffold-templates.d.ts +23 -0
- package/dist/infrastructure/pipeline/scaffold-templates.d.ts.map +1 -0
- package/dist/infrastructure/pipeline/scaffold-templates.js +476 -0
- package/dist/infrastructure/pipeline/scaffold-templates.js.map +1 -0
- package/dist/infrastructure/pipeline/sqlite-pipeline-repository.d.ts +32 -0
- package/dist/infrastructure/pipeline/sqlite-pipeline-repository.d.ts.map +1 -0
- package/dist/infrastructure/pipeline/sqlite-pipeline-repository.js +197 -0
- package/dist/infrastructure/pipeline/sqlite-pipeline-repository.js.map +1 -0
- package/dist/mcp-server.d.ts +3 -0
- package/dist/mcp-server.d.ts.map +1 -0
- package/dist/mcp-server.js +300 -0
- package/dist/mcp-server.js.map +1 -0
- package/dist/tools/agent-registry-tools.d.ts +11 -0
- package/dist/tools/agent-registry-tools.d.ts.map +1 -0
- package/dist/tools/agent-registry-tools.js +208 -0
- package/dist/tools/agent-registry-tools.js.map +1 -0
- package/dist/tools/azure-sync-tools.d.ts +15 -0
- package/dist/tools/azure-sync-tools.d.ts.map +1 -0
- package/dist/tools/azure-sync-tools.js +332 -0
- package/dist/tools/azure-sync-tools.js.map +1 -0
- package/dist/tools/kanban-card-tools.d.ts.map +1 -1
- package/dist/tools/kanban-card-tools.js +41 -16
- package/dist/tools/kanban-card-tools.js.map +1 -1
- package/dist/tools/kanban-gate-tools.d.ts +7 -0
- package/dist/tools/kanban-gate-tools.d.ts.map +1 -0
- package/dist/tools/kanban-gate-tools.js +106 -0
- package/dist/tools/kanban-gate-tools.js.map +1 -0
- package/dist/tools/kanban-grooming-tools.d.ts +7 -0
- package/dist/tools/kanban-grooming-tools.d.ts.map +1 -0
- package/dist/tools/kanban-grooming-tools.js +180 -0
- package/dist/tools/kanban-grooming-tools.js.map +1 -0
- package/dist/tools/pipeline-tools.d.ts +15 -0
- package/dist/tools/pipeline-tools.d.ts.map +1 -0
- package/dist/tools/pipeline-tools.js +424 -0
- package/dist/tools/pipeline-tools.js.map +1 -0
- package/package.json +7 -2
|
@@ -0,0 +1,476 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dagger Module Scaffold Templates — Source File Content
|
|
3
|
+
*
|
|
4
|
+
* TS stacks: @dagger.io/dagger SDK with @object/@func decorators
|
|
5
|
+
* Python stacks: dagger SDK with @object_type/@function decorators
|
|
6
|
+
*
|
|
7
|
+
* SOLID: SRP — template content only (no generation logic)
|
|
8
|
+
*/
|
|
9
|
+
/** Convert kebab-case to PascalCase. */
|
|
10
|
+
export function pascalCase(kebab) {
|
|
11
|
+
return kebab
|
|
12
|
+
.split("-")
|
|
13
|
+
.map((part) => part.charAt(0).toUpperCase() + part.slice(1))
|
|
14
|
+
.join("");
|
|
15
|
+
}
|
|
16
|
+
/** Convert kebab-case to camelCase. */
|
|
17
|
+
export function camelCase(kebab) {
|
|
18
|
+
const pascal = pascalCase(kebab);
|
|
19
|
+
return pascal.charAt(0).toLowerCase() + pascal.slice(1);
|
|
20
|
+
}
|
|
21
|
+
/** Convert kebab-case to snake_case. */
|
|
22
|
+
export function snakeCase(kebab) {
|
|
23
|
+
return kebab.replace(/-/g, "_");
|
|
24
|
+
}
|
|
25
|
+
/** TypeScript Dagger module for a library stack (tsc, biome, jest, npm publish). */
|
|
26
|
+
export function typescriptLibSource(prefix) {
|
|
27
|
+
return `import { dag, object, func, Directory } from "@dagger.io/dagger";
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* CI/CD pipeline module for TypeScript library projects.
|
|
31
|
+
*
|
|
32
|
+
* Each function corresponds to a pipeline gate and runs in
|
|
33
|
+
* an isolated Node.js container with the project source mounted.
|
|
34
|
+
*/
|
|
35
|
+
@object()
|
|
36
|
+
class ${pascalCase(prefix)} {
|
|
37
|
+
/**
|
|
38
|
+
* Static analysis: run TypeScript compiler in check mode.
|
|
39
|
+
*/
|
|
40
|
+
@func()
|
|
41
|
+
async ${camelCase(prefix)}Analyze(source: Directory): Promise<string> {
|
|
42
|
+
return dag
|
|
43
|
+
.container()
|
|
44
|
+
.from("node:22-slim")
|
|
45
|
+
.withMountedDirectory("/app", source)
|
|
46
|
+
.withWorkdir("/app")
|
|
47
|
+
.withExec(["npm", "ci"])
|
|
48
|
+
.withExec(["npx", "tsc", "--noEmit"])
|
|
49
|
+
.stdout();
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Lint: run Biome for formatting and lint checks.
|
|
54
|
+
*/
|
|
55
|
+
@func()
|
|
56
|
+
async ${camelCase(prefix)}Lint(source: Directory): Promise<string> {
|
|
57
|
+
return dag
|
|
58
|
+
.container()
|
|
59
|
+
.from("node:22-slim")
|
|
60
|
+
.withMountedDirectory("/app", source)
|
|
61
|
+
.withWorkdir("/app")
|
|
62
|
+
.withExec(["npm", "ci"])
|
|
63
|
+
.withExec(["npx", "biome", "check", "."])
|
|
64
|
+
.stdout();
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Test: run Jest test suite.
|
|
69
|
+
*/
|
|
70
|
+
@func()
|
|
71
|
+
async ${camelCase(prefix)}Test(source: Directory): Promise<string> {
|
|
72
|
+
return dag
|
|
73
|
+
.container()
|
|
74
|
+
.from("node:22-slim")
|
|
75
|
+
.withMountedDirectory("/app", source)
|
|
76
|
+
.withWorkdir("/app")
|
|
77
|
+
.withExec(["npm", "ci"])
|
|
78
|
+
.withExec(["npx", "jest", "--ci", "--coverage"])
|
|
79
|
+
.stdout();
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Build: compile TypeScript to JavaScript.
|
|
84
|
+
*/
|
|
85
|
+
@func()
|
|
86
|
+
async ${camelCase(prefix)}Build(source: Directory): Promise<string> {
|
|
87
|
+
return dag
|
|
88
|
+
.container()
|
|
89
|
+
.from("node:22-slim")
|
|
90
|
+
.withMountedDirectory("/app", source)
|
|
91
|
+
.withWorkdir("/app")
|
|
92
|
+
.withExec(["npm", "ci"])
|
|
93
|
+
.withExec(["npx", "tsc"])
|
|
94
|
+
.stdout();
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Tag: create a git tag for the release version.
|
|
99
|
+
*/
|
|
100
|
+
@func()
|
|
101
|
+
async ${camelCase(prefix)}Tag(source: Directory, version: string): Promise<string> {
|
|
102
|
+
return dag
|
|
103
|
+
.container()
|
|
104
|
+
.from("node:22-slim")
|
|
105
|
+
.withMountedDirectory("/app", source)
|
|
106
|
+
.withWorkdir("/app")
|
|
107
|
+
.withExec(["git", "tag", \`v\${version}\`])
|
|
108
|
+
.stdout();
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Publish: publish package to npm registry.
|
|
113
|
+
*/
|
|
114
|
+
@func()
|
|
115
|
+
async ${camelCase(prefix)}Publish(source: Directory): Promise<string> {
|
|
116
|
+
return dag
|
|
117
|
+
.container()
|
|
118
|
+
.from("node:22-slim")
|
|
119
|
+
.withMountedDirectory("/app", source)
|
|
120
|
+
.withWorkdir("/app")
|
|
121
|
+
.withExec(["npm", "ci"])
|
|
122
|
+
.withExec(["npm", "publish", "--access", "public"])
|
|
123
|
+
.stdout();
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Deploy: placeholder for library deployment (e.g., docs site).
|
|
128
|
+
*/
|
|
129
|
+
@func()
|
|
130
|
+
async ${camelCase(prefix)}Deploy(source: Directory): Promise<string> {
|
|
131
|
+
return dag
|
|
132
|
+
.container()
|
|
133
|
+
.from("node:22-slim")
|
|
134
|
+
.withMountedDirectory("/app", source)
|
|
135
|
+
.withWorkdir("/app")
|
|
136
|
+
.withExec(["echo", "Deploy step: configure for your deployment target"])
|
|
137
|
+
.stdout();
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
`;
|
|
141
|
+
}
|
|
142
|
+
/** TypeScript Dagger module for an application stack (tsc, biome, vitest, docker). */
|
|
143
|
+
export function typescriptAppSource(prefix) {
|
|
144
|
+
return `import { dag, object, func, Directory } from "@dagger.io/dagger";
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* CI/CD pipeline module for TypeScript application projects.
|
|
148
|
+
*
|
|
149
|
+
* Each function corresponds to a pipeline gate and runs in
|
|
150
|
+
* an isolated Node.js container with the project source mounted.
|
|
151
|
+
*/
|
|
152
|
+
@object()
|
|
153
|
+
class ${pascalCase(prefix)} {
|
|
154
|
+
/**
|
|
155
|
+
* Static analysis: run TypeScript compiler in check mode.
|
|
156
|
+
*/
|
|
157
|
+
@func()
|
|
158
|
+
async ${camelCase(prefix)}Analyze(source: Directory): Promise<string> {
|
|
159
|
+
return dag
|
|
160
|
+
.container()
|
|
161
|
+
.from("node:22-slim")
|
|
162
|
+
.withMountedDirectory("/app", source)
|
|
163
|
+
.withWorkdir("/app")
|
|
164
|
+
.withExec(["npm", "ci"])
|
|
165
|
+
.withExec(["npx", "tsc", "--noEmit"])
|
|
166
|
+
.stdout();
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Lint: run Biome for formatting and lint checks.
|
|
171
|
+
*/
|
|
172
|
+
@func()
|
|
173
|
+
async ${camelCase(prefix)}Lint(source: Directory): Promise<string> {
|
|
174
|
+
return dag
|
|
175
|
+
.container()
|
|
176
|
+
.from("node:22-slim")
|
|
177
|
+
.withMountedDirectory("/app", source)
|
|
178
|
+
.withWorkdir("/app")
|
|
179
|
+
.withExec(["npm", "ci"])
|
|
180
|
+
.withExec(["npx", "biome", "check", "."])
|
|
181
|
+
.stdout();
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Test: run Vitest test suite.
|
|
186
|
+
*/
|
|
187
|
+
@func()
|
|
188
|
+
async ${camelCase(prefix)}Test(source: Directory): Promise<string> {
|
|
189
|
+
return dag
|
|
190
|
+
.container()
|
|
191
|
+
.from("node:22-slim")
|
|
192
|
+
.withMountedDirectory("/app", source)
|
|
193
|
+
.withWorkdir("/app")
|
|
194
|
+
.withExec(["npm", "ci"])
|
|
195
|
+
.withExec(["npx", "vitest", "run", "--coverage"])
|
|
196
|
+
.stdout();
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Build: run the project build script.
|
|
201
|
+
*/
|
|
202
|
+
@func()
|
|
203
|
+
async ${camelCase(prefix)}Build(source: Directory): Promise<string> {
|
|
204
|
+
return dag
|
|
205
|
+
.container()
|
|
206
|
+
.from("node:22-slim")
|
|
207
|
+
.withMountedDirectory("/app", source)
|
|
208
|
+
.withWorkdir("/app")
|
|
209
|
+
.withExec(["npm", "ci"])
|
|
210
|
+
.withExec(["npm", "run", "build"])
|
|
211
|
+
.stdout();
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Tag: create a git tag for the release version.
|
|
216
|
+
*/
|
|
217
|
+
@func()
|
|
218
|
+
async ${camelCase(prefix)}Tag(source: Directory, version: string): Promise<string> {
|
|
219
|
+
return dag
|
|
220
|
+
.container()
|
|
221
|
+
.from("node:22-slim")
|
|
222
|
+
.withMountedDirectory("/app", source)
|
|
223
|
+
.withWorkdir("/app")
|
|
224
|
+
.withExec(["git", "tag", \`v\${version}\`])
|
|
225
|
+
.stdout();
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Publish: build and push a Docker image.
|
|
230
|
+
*/
|
|
231
|
+
@func()
|
|
232
|
+
async ${camelCase(prefix)}Publish(source: Directory, tag: string = "latest"): Promise<string> {
|
|
233
|
+
const image = dag
|
|
234
|
+
.container()
|
|
235
|
+
.from("node:22-slim")
|
|
236
|
+
.withMountedDirectory("/app", source)
|
|
237
|
+
.withWorkdir("/app")
|
|
238
|
+
.withExec(["npm", "ci", "--production"])
|
|
239
|
+
.withExec(["npm", "run", "build"])
|
|
240
|
+
.withEntrypoint(["node", "dist/index.js"]);
|
|
241
|
+
return image.publish(\`ttl.sh/\${tag}\`);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* Deploy: placeholder for application deployment.
|
|
246
|
+
*/
|
|
247
|
+
@func()
|
|
248
|
+
async ${camelCase(prefix)}Deploy(source: Directory): Promise<string> {
|
|
249
|
+
return dag
|
|
250
|
+
.container()
|
|
251
|
+
.from("node:22-slim")
|
|
252
|
+
.withMountedDirectory("/app", source)
|
|
253
|
+
.withWorkdir("/app")
|
|
254
|
+
.withExec(["echo", "Deploy step: configure for your deployment target"])
|
|
255
|
+
.stdout();
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
`;
|
|
259
|
+
}
|
|
260
|
+
/** Python Dagger module for a library stack (ruff, pytest, uv build/publish). */
|
|
261
|
+
export function pythonLibSource(prefix) {
|
|
262
|
+
return `"""CI/CD pipeline module for Python library projects.
|
|
263
|
+
|
|
264
|
+
Each function corresponds to a pipeline gate and runs in
|
|
265
|
+
an isolated Python container with the project source mounted.
|
|
266
|
+
"""
|
|
267
|
+
|
|
268
|
+
import dagger
|
|
269
|
+
from dagger import dag, function, object_type, Directory
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
@object_type
|
|
273
|
+
class ${pascalCase(prefix)}:
|
|
274
|
+
@function
|
|
275
|
+
async def ${snakeCase(prefix)}_analyze(self, source: dagger.Directory) -> str:
|
|
276
|
+
"""Static analysis: run Ruff linter in check mode."""
|
|
277
|
+
return await (
|
|
278
|
+
dag.container()
|
|
279
|
+
.from_("python:3.13-slim")
|
|
280
|
+
.with_mounted_directory("/app", source)
|
|
281
|
+
.with_workdir("/app")
|
|
282
|
+
.with_exec(["pip", "install", "uv"])
|
|
283
|
+
.with_exec(["uv", "sync"])
|
|
284
|
+
.with_exec(["uv", "run", "ruff", "check", "."])
|
|
285
|
+
.stdout()
|
|
286
|
+
)
|
|
287
|
+
|
|
288
|
+
@function
|
|
289
|
+
async def ${snakeCase(prefix)}_lint(self, source: dagger.Directory) -> str:
|
|
290
|
+
"""Lint: run Ruff formatter in check mode."""
|
|
291
|
+
return await (
|
|
292
|
+
dag.container()
|
|
293
|
+
.from_("python:3.13-slim")
|
|
294
|
+
.with_mounted_directory("/app", source)
|
|
295
|
+
.with_workdir("/app")
|
|
296
|
+
.with_exec(["pip", "install", "uv"])
|
|
297
|
+
.with_exec(["uv", "sync"])
|
|
298
|
+
.with_exec(["uv", "run", "ruff", "format", "--check", "."])
|
|
299
|
+
.stdout()
|
|
300
|
+
)
|
|
301
|
+
|
|
302
|
+
@function
|
|
303
|
+
async def ${snakeCase(prefix)}_test(self, source: dagger.Directory) -> str:
|
|
304
|
+
"""Test: run pytest test suite."""
|
|
305
|
+
return await (
|
|
306
|
+
dag.container()
|
|
307
|
+
.from_("python:3.13-slim")
|
|
308
|
+
.with_mounted_directory("/app", source)
|
|
309
|
+
.with_workdir("/app")
|
|
310
|
+
.with_exec(["pip", "install", "uv"])
|
|
311
|
+
.with_exec(["uv", "sync"])
|
|
312
|
+
.with_exec(["uv", "run", "pytest", "--tb=short", "-q"])
|
|
313
|
+
.stdout()
|
|
314
|
+
)
|
|
315
|
+
|
|
316
|
+
@function
|
|
317
|
+
async def ${snakeCase(prefix)}_build(self, source: dagger.Directory) -> str:
|
|
318
|
+
"""Build: build the package with uv."""
|
|
319
|
+
return await (
|
|
320
|
+
dag.container()
|
|
321
|
+
.from_("python:3.13-slim")
|
|
322
|
+
.with_mounted_directory("/app", source)
|
|
323
|
+
.with_workdir("/app")
|
|
324
|
+
.with_exec(["pip", "install", "uv"])
|
|
325
|
+
.with_exec(["uv", "build"])
|
|
326
|
+
.stdout()
|
|
327
|
+
)
|
|
328
|
+
|
|
329
|
+
@function
|
|
330
|
+
async def ${snakeCase(prefix)}_tag(self, source: dagger.Directory, version: str) -> str:
|
|
331
|
+
"""Tag: create a git tag for the release version."""
|
|
332
|
+
return await (
|
|
333
|
+
dag.container()
|
|
334
|
+
.from_("python:3.13-slim")
|
|
335
|
+
.with_mounted_directory("/app", source)
|
|
336
|
+
.with_workdir("/app")
|
|
337
|
+
.with_exec(["git", "tag", f"v{version}"])
|
|
338
|
+
.stdout()
|
|
339
|
+
)
|
|
340
|
+
|
|
341
|
+
@function
|
|
342
|
+
async def ${snakeCase(prefix)}_publish(self, source: dagger.Directory) -> str:
|
|
343
|
+
"""Publish: publish package to PyPI via uv."""
|
|
344
|
+
return await (
|
|
345
|
+
dag.container()
|
|
346
|
+
.from_("python:3.13-slim")
|
|
347
|
+
.with_mounted_directory("/app", source)
|
|
348
|
+
.with_workdir("/app")
|
|
349
|
+
.with_exec(["pip", "install", "uv"])
|
|
350
|
+
.with_exec(["uv", "publish"])
|
|
351
|
+
.stdout()
|
|
352
|
+
)
|
|
353
|
+
|
|
354
|
+
@function
|
|
355
|
+
async def ${snakeCase(prefix)}_deploy(self, source: dagger.Directory) -> str:
|
|
356
|
+
"""Deploy: placeholder for library deployment (e.g., docs site)."""
|
|
357
|
+
return await (
|
|
358
|
+
dag.container()
|
|
359
|
+
.from_("python:3.13-slim")
|
|
360
|
+
.with_mounted_directory("/app", source)
|
|
361
|
+
.with_workdir("/app")
|
|
362
|
+
.with_exec(["echo", "Deploy step: configure for your deployment target"])
|
|
363
|
+
.stdout()
|
|
364
|
+
)
|
|
365
|
+
`;
|
|
366
|
+
}
|
|
367
|
+
/** Python Dagger module for an application stack (ruff, pytest, docker). */
|
|
368
|
+
export function pythonAppSource(prefix) {
|
|
369
|
+
return `"""CI/CD pipeline module for Python application projects.
|
|
370
|
+
|
|
371
|
+
Each function corresponds to a pipeline gate and runs in
|
|
372
|
+
an isolated Python container with the project source mounted.
|
|
373
|
+
"""
|
|
374
|
+
|
|
375
|
+
import dagger
|
|
376
|
+
from dagger import dag, function, object_type, Directory
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
@object_type
|
|
380
|
+
class ${pascalCase(prefix)}:
|
|
381
|
+
@function
|
|
382
|
+
async def ${snakeCase(prefix)}_analyze(self, source: dagger.Directory) -> str:
|
|
383
|
+
"""Static analysis: run Ruff linter in check mode."""
|
|
384
|
+
return await (
|
|
385
|
+
dag.container()
|
|
386
|
+
.from_("python:3.13-slim")
|
|
387
|
+
.with_mounted_directory("/app", source)
|
|
388
|
+
.with_workdir("/app")
|
|
389
|
+
.with_exec(["pip", "install", "uv"])
|
|
390
|
+
.with_exec(["uv", "sync"])
|
|
391
|
+
.with_exec(["uv", "run", "ruff", "check", "."])
|
|
392
|
+
.stdout()
|
|
393
|
+
)
|
|
394
|
+
|
|
395
|
+
@function
|
|
396
|
+
async def ${snakeCase(prefix)}_lint(self, source: dagger.Directory) -> str:
|
|
397
|
+
"""Lint: run Ruff formatter in check mode."""
|
|
398
|
+
return await (
|
|
399
|
+
dag.container()
|
|
400
|
+
.from_("python:3.13-slim")
|
|
401
|
+
.with_mounted_directory("/app", source)
|
|
402
|
+
.with_workdir("/app")
|
|
403
|
+
.with_exec(["pip", "install", "uv"])
|
|
404
|
+
.with_exec(["uv", "sync"])
|
|
405
|
+
.with_exec(["uv", "run", "ruff", "format", "--check", "."])
|
|
406
|
+
.stdout()
|
|
407
|
+
)
|
|
408
|
+
|
|
409
|
+
@function
|
|
410
|
+
async def ${snakeCase(prefix)}_test(self, source: dagger.Directory) -> str:
|
|
411
|
+
"""Test: run pytest test suite."""
|
|
412
|
+
return await (
|
|
413
|
+
dag.container()
|
|
414
|
+
.from_("python:3.13-slim")
|
|
415
|
+
.with_mounted_directory("/app", source)
|
|
416
|
+
.with_workdir("/app")
|
|
417
|
+
.with_exec(["pip", "install", "uv"])
|
|
418
|
+
.with_exec(["uv", "sync"])
|
|
419
|
+
.with_exec(["uv", "run", "pytest", "--tb=short", "-q"])
|
|
420
|
+
.stdout()
|
|
421
|
+
)
|
|
422
|
+
|
|
423
|
+
@function
|
|
424
|
+
async def ${snakeCase(prefix)}_build(self, source: dagger.Directory) -> str:
|
|
425
|
+
"""Build: build application container image."""
|
|
426
|
+
return await (
|
|
427
|
+
dag.container()
|
|
428
|
+
.from_("python:3.13-slim")
|
|
429
|
+
.with_mounted_directory("/app", source)
|
|
430
|
+
.with_workdir("/app")
|
|
431
|
+
.with_exec(["pip", "install", "uv"])
|
|
432
|
+
.with_exec(["uv", "sync", "--no-dev"])
|
|
433
|
+
.with_exec(["uv", "run", "python", "-m", "compileall", "."])
|
|
434
|
+
.stdout()
|
|
435
|
+
)
|
|
436
|
+
|
|
437
|
+
@function
|
|
438
|
+
async def ${snakeCase(prefix)}_tag(self, source: dagger.Directory, version: str) -> str:
|
|
439
|
+
"""Tag: create a git tag for the release version."""
|
|
440
|
+
return await (
|
|
441
|
+
dag.container()
|
|
442
|
+
.from_("python:3.13-slim")
|
|
443
|
+
.with_mounted_directory("/app", source)
|
|
444
|
+
.with_workdir("/app")
|
|
445
|
+
.with_exec(["git", "tag", f"v{version}"])
|
|
446
|
+
.stdout()
|
|
447
|
+
)
|
|
448
|
+
|
|
449
|
+
@function
|
|
450
|
+
async def ${snakeCase(prefix)}_publish(self, source: dagger.Directory, tag: str = "latest") -> str:
|
|
451
|
+
"""Publish: build and push a container image."""
|
|
452
|
+
image = (
|
|
453
|
+
dag.container()
|
|
454
|
+
.from_("python:3.13-slim")
|
|
455
|
+
.with_mounted_directory("/app", source)
|
|
456
|
+
.with_workdir("/app")
|
|
457
|
+
.with_exec(["pip", "install", "uv"])
|
|
458
|
+
.with_exec(["uv", "sync", "--no-dev"])
|
|
459
|
+
.with_entrypoint(["python", "-m", "app"])
|
|
460
|
+
)
|
|
461
|
+
return await image.publish(f"ttl.sh/{tag}")
|
|
462
|
+
|
|
463
|
+
@function
|
|
464
|
+
async def ${snakeCase(prefix)}_deploy(self, source: dagger.Directory) -> str:
|
|
465
|
+
"""Deploy: placeholder for application deployment."""
|
|
466
|
+
return await (
|
|
467
|
+
dag.container()
|
|
468
|
+
.from_("python:3.13-slim")
|
|
469
|
+
.with_mounted_directory("/app", source)
|
|
470
|
+
.with_workdir("/app")
|
|
471
|
+
.with_exec(["echo", "Deploy step: configure for your deployment target"])
|
|
472
|
+
.stdout()
|
|
473
|
+
)
|
|
474
|
+
`;
|
|
475
|
+
}
|
|
476
|
+
//# sourceMappingURL=scaffold-templates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scaffold-templates.js","sourceRoot":"","sources":["../../../src/infrastructure/pipeline/scaffold-templates.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SQLite Pipeline Repository
|
|
3
|
+
*
|
|
4
|
+
* Implements PipelineRepository interface from domain layer.
|
|
5
|
+
* Persists Pipeline aggregate roots and their Gate child entities
|
|
6
|
+
* in two related SQLite tables with transactional saves.
|
|
7
|
+
*
|
|
8
|
+
* SOLID: SRP — persistence for Pipeline aggregate only
|
|
9
|
+
* SOLID: DIP — implements domain interface
|
|
10
|
+
* SOLID: LSP — fully substitutable for PipelineRepository
|
|
11
|
+
*/
|
|
12
|
+
import type { SqliteAdapter } from "../database/sqlite-adapter.js";
|
|
13
|
+
import type { PipelineRepository } from "../../domain/pipeline/repositories.js";
|
|
14
|
+
import { Pipeline } from "../../domain/pipeline/pipeline.js";
|
|
15
|
+
import { PipelineId } from "../../domain/pipeline/value-objects.js";
|
|
16
|
+
import type { PipelineStatus, PipelineScope } from "../../domain/pipeline/value-objects.js";
|
|
17
|
+
import { WorkspaceId } from "../../domain/shared/value-objects.js";
|
|
18
|
+
export declare class SqlitePipelineRepository implements PipelineRepository {
|
|
19
|
+
private readonly db;
|
|
20
|
+
constructor(db: SqliteAdapter);
|
|
21
|
+
save(pipeline: Pipeline): Promise<void>;
|
|
22
|
+
findById(id: PipelineId): Promise<Pipeline | undefined>;
|
|
23
|
+
findByWorkspace(workspaceId: WorkspaceId): Promise<readonly Pipeline[]>;
|
|
24
|
+
findByStatus(workspaceId: WorkspaceId, status: PipelineStatus): Promise<readonly Pipeline[]>;
|
|
25
|
+
findByScope(workspaceId: WorkspaceId, scope: PipelineScope): Promise<readonly Pipeline[]>;
|
|
26
|
+
findActive(workspaceId: WorkspaceId): Promise<Pipeline | undefined>;
|
|
27
|
+
delete(id: PipelineId): Promise<boolean>;
|
|
28
|
+
nextSequence(workspaceId: WorkspaceId): Promise<number>;
|
|
29
|
+
private toDomain;
|
|
30
|
+
private gateToProps;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=sqlite-pipeline-repository.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sqlite-pipeline-repository.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/pipeline/sqlite-pipeline-repository.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAC7D,OAAO,EACL,UAAU,EAKX,MAAM,wCAAwC,CAAC;AAChD,OAAO,KAAK,EAGV,cAAc,EACd,aAAa,EAGd,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,WAAW,EAAa,MAAM,sCAAsC,CAAC;AAkF9E,qBAAa,wBAAyB,YAAW,kBAAkB;IACrD,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAAF,EAAE,EAAE,aAAa;IAIxC,IAAI,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAyEvC,QAAQ,CAAC,EAAE,EAAE,UAAU,GAAG,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC;IASvD,eAAe,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,SAAS,QAAQ,EAAE,CAAC;IAQvE,YAAY,CAChB,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,cAAc,GACrB,OAAO,CAAC,SAAS,QAAQ,EAAE,CAAC;IAQzB,WAAW,CACf,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,aAAa,GACnB,OAAO,CAAC,SAAS,QAAQ,EAAE,CAAC;IAQzB,UAAU,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC;IASnE,MAAM,CAAC,EAAE,EAAE,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC;IASxC,YAAY,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC;IAY7D,OAAO,CAAC,QAAQ;IAyBhB,OAAO,CAAC,WAAW;CAsBpB"}
|