candor-ts 0.5.8 → 0.5.10
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/package.json +1 -1
- package/scan-core.mjs +17 -2
package/package.json
CHANGED
package/scan-core.mjs
CHANGED
|
@@ -49,6 +49,13 @@ export const KAPPA_RULES = [
|
|
|
49
49
|
[/^(node:)?dns(\/promises)?$/,
|
|
50
50
|
/^(?!(new|getServers|setServers|getDefaultResultOrder|setDefaultResultOrder)$)/, "Net"],
|
|
51
51
|
[/^(node:)?child_process$/, null, "Exec"],
|
|
52
|
+
// node:worker_threads — `postMessage` crosses a thread boundary (the canonical Node worker IPC);
|
|
53
|
+
// `receiveMessageOnPort` reads it. Covers `worker.postMessage`, `parentPort.postMessage`, and a
|
|
54
|
+
// `MessagePort`'s `.postMessage` (all typed from this module). `new Worker(...)` spawns the thread but
|
|
55
|
+
// construction is inert here (like the net-cluster ctors) — the message verbs are the IPC boundary.
|
|
56
|
+
[/^(node:)?worker_threads$/, /^(postMessage|receiveMessageOnPort)$/, "Ipc"],
|
|
57
|
+
// node:cluster — `fork()` spawns a worker PROCESS and wires its IPC channel.
|
|
58
|
+
[/^(node:)?cluster$/, /^fork$/, "Ipc"],
|
|
52
59
|
[/^(node:)?sqlite$/, null, "Db"],
|
|
53
60
|
// the curated npm tier
|
|
54
61
|
[/^(axios|got|node-fetch|undici|ws|socket\.io(-client)?|nodemailer)$/, null, "Net"],
|
|
@@ -79,9 +86,17 @@ export const KAPPA_RULES = [
|
|
|
79
86
|
[/^mongoose$/,
|
|
80
87
|
/^(find|save|create|insertMany|updateOne|updateMany|replaceOne|deleteOne|deleteMany|aggregate|countDocuments|estimatedDocumentCount|distinct|exec|bulkWrite)/,
|
|
81
88
|
"Db"],
|
|
82
|
-
|
|
83
|
-
|
|
89
|
+
// Sequelize is EXECUTE-ON-CALL: `Model.findAll()/create()/update()/destroy()` issue the query and
|
|
90
|
+
// return a promise — so its verbs are the I/O boundary.
|
|
91
|
+
[/^sequelize$/,
|
|
92
|
+
/^(find|create|update|destroy|upsert|count|max|min|sum|increment|decrement|reload|save|query|transaction)/,
|
|
84
93
|
"Db"],
|
|
94
|
+
// Drizzle is a BUILDER: `db.select().from().where()` / `db.insert().values()` / `db.update().set()` /
|
|
95
|
+
// `db.delete().where()` issue NOTHING until a terminal `.execute()`/await/`.all()`/`.get()`/`.run()` (or
|
|
96
|
+
// the relational `db.query.x.findMany/findFirst`). Listing select/insert/update/delete as Db fabricated
|
|
97
|
+
// the effect onto a pure builder chain (the typeorm rule's `createQueryBuilder` discipline, violated).
|
|
98
|
+
// VERB-PRECISE: only the terminal execution verbs; the builder heads under-report (sound) until executed.
|
|
99
|
+
[/^drizzle-orm$/, /^(execute|transaction|findMany|findFirst|all|get|run)$/, "Db"],
|
|
85
100
|
// Nest's HttpService wraps axios — the request verbs are Net.
|
|
86
101
|
[/^@nestjs\/axios$/, /^(get|post|put|patch|delete|head|request)$/, "Net"],
|
|
87
102
|
];
|