Scan your whole stack
From OX Research Newsroom
Are you using @atscript/db-memory?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.1.186
@atscript/db-memory was last scanned on 23 Nov 2026 at version 0.1.186. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.1.186 LATEST | 23 Nov 2026 | No rules fired |
| 0.1.185 | 23 Nov 2026 | No rules fired |
| 0.1.184 | 22 Nov 2026 | No rules fired |
| 0.1.182 | 21 Nov 2026 | Not shown |
| 0.1.181 | 20 Nov 2026 | Not shown |
Findings for v0.1.186. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.1.186; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
In-memory adapter for @atscript/db. MemoryAdapter is a full BaseDbAdapter with no engine, no I/O, and no persistence — rows live in ordinary in-process JS structures. It runs in two modes:
() => Row[] | Promise<Row[]> invoked at query time. This lets a runtime-owned surface with no database — a "scheduled jobs" list zipped from Redis + a job registry, a job-runs snapshot, any computed set — be observed as a real atscript table (rendered in atscript-ui, carrying @DbAction row actions and @InputForms) without acquiring a datastore. Writes throw.Map, giving a fast in-memory DbSpace for tests and trivial in-app tables. Full CRUD.Filter, sort, project, paginate, optimistic-concurrency (OCC) versioning, and primary-key + unique-index enforcement are all supported. Leaf-comparison semantics (regex, null, ordering) are JS-native and documented — deliberately not claimed identical to the SQL engines (see Accepted limitations).
pnpm add @atscript/db-memory
@atscript/db is a peer dependency.
Observe a runtime-owned entity as a read-only table. The provider closure is re-invoked on every read (a fresh snapshot each time), and is late-bound after syncSchema so it can close over dependencies that don't exist at factory time:
import { createAdapter, setMemoryProvider } from "@atscript/db-memory";
import { syncSchema } from "@atscript/db/sync";
import { Job } from "./models/job.as";
// A DbSpace backed by the in-memory adapter — no engine, no I/O.
const space = createAdapter();
await syncSchema(space, [Job]);
// Make `Job` a READ-ONLY table whose rows come from a runtime closure
// (e.g. Redis keys zipped with an in-code job registry). Set AFTER syncSchema.
setMemoryProvider(space, Job, async () => await loadScheduledJobs());
// Observe it like any other atscript table.
const jobs = space.getTable(Job);
await jobs.findMany({
filter: { scheduled: { $eq: true } },
controls: { $sort: { nextRun: 1 }, $limit: 20 },
});
// Any write (insert/update/delete) throws: the table is provider-backed.
Because the readable is built uniformly, @DbAction discovery, ?$actions=true gating, disabled predicates, @InputForm, and the atscript-ui table / /meta surface all work against this table with no adapter-side action code.
A drop-in in-memory DbSpace with full CRUD — the role an in-memory SQLite serves, minus the native module and the SQL round-trip:
import { createAdapter } from "@atscript/db-memory";
import { syncSchema } from "@atscript/db/sync";
import { User } from "./models/user.as";
const space = createAdapter();
await syncSchema(space, [User]);
const users = space.getTable(User);
await users.insertOne({ id: "u1", name: "Ada" });
await users.findMany({
filter: { name: { $regex: "^A" } },
controls: { $sort: { name: 1 } },
});
| Export | Purpose |
|---|---|
createAdapter() |
Builds a DbSpace backed by a fresh MemoryAdapter per table. |
setMemoryProvider(space, Type, fn) |
Late-binds a provider closure onto Type's adapter, making that table read-only (provider mode). |
MemoryAdapter |
The adapter class, for constructing a DbSpace by hand (new DbSpace(() => new MemoryAdapter())). |
MemoryProviderFn |
The provider closure type: () => Row[] \| Promise<Row[]>. |
buildMemoryPredicate(filter) |
Compiles a FilterExpr into a JS-native (row) => boolean predicate (the engine's filter core). |
Deliberate — matching a real engine here is hard or impossible and unnecessary for the small computed surfaces this adapter targets. All are documented, none silent:
RegExp, /pat/flags honored; $ne/$exists are Mongo-like). Not byte-identical to any SQL engine.@db.column.collate is not honored; filters and sorts are code-point / JS-native, so case-insensitive $eq/sort differ from SQLite/Mongo.$elemMatch matching is not provided.insertMany/updateMany/replaceMany/deleteMany apply sequentially with no rollback; a mid-batch conflict leaves earlier items written. Single writes are safe. (Provider tables are read-only, so this never applies to the primary mode.)$groupBy / aggregates / calendar buckets / $having / $count run in JS over one snapshot with SQL semantics (null and missing group together; sum/avg over no value are null). Fine for the small sets this adapter targets; there is no index-backed grouping.$with — resolved by core's app-level batch loading, not natively.$search — unsupported.MIT
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.