@pattern-stack/codegen 0.9.1 → 0.10.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/README.md +5 -0
- package/consumer-skills/bridge/SKILL.md +265 -0
- package/consumer-skills/codegen/SKILL.md +115 -0
- package/consumer-skills/entities/SKILL.md +111 -0
- package/consumer-skills/entities/families-and-queries.md +82 -0
- package/consumer-skills/entities/yaml-reference.md +118 -0
- package/consumer-skills/events/SKILL.md +71 -0
- package/consumer-skills/events/authoring-events.md +164 -0
- package/consumer-skills/events/typed-bus-and-outbox.md +163 -0
- package/consumer-skills/jobs/SKILL.md +66 -0
- package/consumer-skills/jobs/handler-authoring.md +236 -0
- package/consumer-skills/jobs/pools-and-ordering.md +161 -0
- package/consumer-skills/subsystems/SKILL.md +105 -0
- package/consumer-skills/subsystems/wiring-and-order.md +120 -0
- package/consumer-skills/sync/SKILL.md +134 -0
- package/consumer-skills/sync/audit-and-detection.md +302 -0
- package/consumer-skills/sync/change-sources-and-sinks.md +442 -0
- package/dist/runtime/subsystems/bridge/bridge.module.js +3 -0
- package/dist/runtime/subsystems/bridge/bridge.module.js.map +1 -1
- package/dist/runtime/subsystems/bridge/index.js +3 -0
- package/dist/runtime/subsystems/bridge/index.js.map +1 -1
- package/dist/runtime/subsystems/index.js +3 -0
- package/dist/runtime/subsystems/index.js.map +1 -1
- package/dist/runtime/subsystems/jobs/index.js +3 -0
- package/dist/runtime/subsystems/jobs/index.js.map +1 -1
- package/dist/runtime/subsystems/jobs/job-run-keyset-cursor.js +3 -0
- package/dist/runtime/subsystems/jobs/job-run-keyset-cursor.js.map +1 -1
- package/dist/runtime/subsystems/jobs/job-run-service.drizzle-backend.js +3 -0
- package/dist/runtime/subsystems/jobs/job-run-service.drizzle-backend.js.map +1 -1
- package/dist/runtime/subsystems/jobs/job-run-service.memory-backend.js +3 -0
- package/dist/runtime/subsystems/jobs/job-run-service.memory-backend.js.map +1 -1
- package/dist/runtime/subsystems/jobs/job-run-service.protocol.d.ts +9 -1
- package/dist/runtime/subsystems/jobs/job-worker.module.js +3 -0
- package/dist/runtime/subsystems/jobs/job-worker.module.js.map +1 -1
- package/dist/runtime/subsystems/jobs/jobs-domain.module.js +3 -0
- package/dist/runtime/subsystems/jobs/jobs-domain.module.js.map +1 -1
- package/dist/src/cli/index.js +913 -405
- package/dist/src/cli/index.js.map +1 -1
- package/dist/src/index.js +26 -4
- package/dist/src/index.js.map +1 -1
- package/package.json +2 -1
- package/runtime/subsystems/jobs/job-run-keyset-cursor.ts +3 -0
- package/runtime/subsystems/jobs/job-run-service.protocol.ts +9 -1
package/dist/src/index.js
CHANGED
|
@@ -11,8 +11,30 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
11
11
|
var __decorateParam = (index2, decorator) => (target, key) => decorator(target, key, index2);
|
|
12
12
|
|
|
13
13
|
// src/parser/load-entities.ts
|
|
14
|
+
import { resolve as resolve2 } from "path";
|
|
15
|
+
|
|
16
|
+
// src/utils/find-yaml-files.ts
|
|
14
17
|
import { readdirSync } from "fs";
|
|
15
18
|
import { join, resolve } from "path";
|
|
19
|
+
function isYaml(name) {
|
|
20
|
+
return name.endsWith(".yaml") || name.endsWith(".yml");
|
|
21
|
+
}
|
|
22
|
+
function findYamlFiles(dir) {
|
|
23
|
+
const root = resolve(dir);
|
|
24
|
+
const out = [];
|
|
25
|
+
const walk = (current) => {
|
|
26
|
+
for (const entry of readdirSync(current, { withFileTypes: true })) {
|
|
27
|
+
if (entry.isDirectory()) {
|
|
28
|
+
if (entry.name.startsWith(".")) continue;
|
|
29
|
+
walk(join(current, entry.name));
|
|
30
|
+
} else if (isYaml(entry.name)) {
|
|
31
|
+
out.push(join(current, entry.name));
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
walk(root);
|
|
36
|
+
return out.sort();
|
|
37
|
+
}
|
|
16
38
|
|
|
17
39
|
// src/utils/yaml-loader.ts
|
|
18
40
|
import { readFileSync, existsSync } from "fs";
|
|
@@ -2136,10 +2158,10 @@ function loadErrorToIssue(error) {
|
|
|
2136
2158
|
function loadEntities(entitiesDir) {
|
|
2137
2159
|
const entities = [];
|
|
2138
2160
|
const issues = [];
|
|
2139
|
-
const resolvedDir =
|
|
2161
|
+
const resolvedDir = resolve2(entitiesDir);
|
|
2140
2162
|
let files;
|
|
2141
2163
|
try {
|
|
2142
|
-
files =
|
|
2164
|
+
files = findYamlFiles(resolvedDir);
|
|
2143
2165
|
} catch (err) {
|
|
2144
2166
|
issues.push({
|
|
2145
2167
|
severity: "error",
|
|
@@ -2309,10 +2331,10 @@ function resolveTypeDirections(types) {
|
|
|
2309
2331
|
function loadRelationships(relationshipsDir) {
|
|
2310
2332
|
const relationships = [];
|
|
2311
2333
|
const issues = [];
|
|
2312
|
-
const resolvedDir =
|
|
2334
|
+
const resolvedDir = resolve2(relationshipsDir);
|
|
2313
2335
|
let files;
|
|
2314
2336
|
try {
|
|
2315
|
-
files =
|
|
2337
|
+
files = findYamlFiles(resolvedDir);
|
|
2316
2338
|
} catch {
|
|
2317
2339
|
return { relationships, issues };
|
|
2318
2340
|
}
|