bazis 0.109.0 → 0.109.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.
|
@@ -199,6 +199,15 @@ export function validateModuleEncapsulation(
|
|
|
199
199
|
: `which module "${owner.name}" provides but does not export. Add it to the exports of "${owner.name}".`;
|
|
200
200
|
};
|
|
201
201
|
|
|
202
|
+
// Whether `record` imports `target`, directly or through other modules. Such a
|
|
203
|
+
// module cannot be the fix: importing it into `target` would be a cycle, and a
|
|
204
|
+
// root without exports (AppModule, the kernel root) passes on everything.
|
|
205
|
+
const importsModule = (record: ModuleGraphRecord, target: ModuleGraphRecord, path = new Set<ModuleGraphRecord>()): boolean => {
|
|
206
|
+
if (path.has(record)) return false;
|
|
207
|
+
path.add(record);
|
|
208
|
+
return record.imports.some((imported) => imported === target || importsModule(imported as ModuleGraphRecord, target, path));
|
|
209
|
+
};
|
|
210
|
+
|
|
202
211
|
// A closed token (`IRepository<Product>`) travels with its family export, so
|
|
203
212
|
// the fix is named in family terms and skips unnamed inner modules such as
|
|
204
213
|
// the one `ormBazis` creates.
|
|
@@ -208,7 +217,7 @@ export function validateModuleEncapsulation(
|
|
|
208
217
|
const exportFix = `${family} (or only ${closed})`;
|
|
209
218
|
const sees = (record: ModuleGraphRecord) => visibleFamilies(record).has(familyId) || visibleTokens(record).has(token);
|
|
210
219
|
const passes = (record: ModuleGraphRecord) => exportedFamilies(record).has(familyId) || exportedTokens(record).has(token);
|
|
211
|
-
const named = (record: ModuleGraphRecord) => !/^module#\d+$/.test(record.name);
|
|
220
|
+
const named = (record: ModuleGraphRecord) => !/^module#\d+$/.test(record.name) && !importsModule(record, consumer);
|
|
212
221
|
const blocking = consumer.imports.find((imported) => named(imported) && sees(imported) && !passes(imported));
|
|
213
222
|
if (blocking !== undefined) {
|
|
214
223
|
return `which its import "${blocking.name}" receives from its own imports but does not export. Add ${exportFix} to the exports of "${blocking.name}".`;
|
|
@@ -232,7 +232,7 @@ export class CodexAppServerClient implements CodexClient {
|
|
|
232
232
|
if (method === "account/updated") this.modelCache = undefined;
|
|
233
233
|
}, () => { this.clearLogin(); this.modelCache = undefined; });
|
|
234
234
|
const initialized = await client.request("initialize", {
|
|
235
|
-
clientInfo: { name: "bazis", title: "Bazis", version: "0.109.
|
|
235
|
+
clientInfo: { name: "bazis", title: "Bazis", version: "0.109.1" }, capabilities: { experimentalApi: true },
|
|
236
236
|
}, 15_000, signal);
|
|
237
237
|
if (resolve(text(initialized.codexHome, 4096)) !== this.paths.home) throw new CodexError("PROTOCOL_ERROR");
|
|
238
238
|
client.notify("initialized");
|
|
@@ -84,10 +84,25 @@ function redactValue(
|
|
|
84
84
|
if (depth >= options.maxDepth) {
|
|
85
85
|
return options.replacement;
|
|
86
86
|
}
|
|
87
|
+
// `seen` holds the objects on the current path only: an object reached
|
|
88
|
+
// again through another branch is a shared reference, not a cycle.
|
|
87
89
|
if (seen.has(value)) {
|
|
88
90
|
return CIRCULAR;
|
|
89
91
|
}
|
|
90
92
|
seen.add(value);
|
|
93
|
+
try {
|
|
94
|
+
return redactObject(value, options, seen, depth);
|
|
95
|
+
} finally {
|
|
96
|
+
seen.delete(value);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function redactObject(
|
|
101
|
+
value: object,
|
|
102
|
+
options: NormalizedRedactionOptions,
|
|
103
|
+
seen: WeakSet<object>,
|
|
104
|
+
depth: number,
|
|
105
|
+
): unknown {
|
|
91
106
|
if (value instanceof Error) {
|
|
92
107
|
return redactError(value, options, seen, depth);
|
|
93
108
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bazis",
|
|
3
|
-
"version": "0.109.
|
|
3
|
+
"version": "0.109.1",
|
|
4
4
|
"description": "Modular backend framework for Bun in TypeScript: DI wired by codegen, HTTP, a PostgreSQL ORM, JWT, WebSocket, agents and a CLI.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Alexander Alenin",
|