@zero-server/orm 0.9.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Tony Wiedman
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,37 @@
1
+ # @zero-server/orm
2
+
3
+ > Database, Model, Query, migrations, seeds, search, geo, tenancy, audit.
4
+
5
+ Full-featured ORM with seven adapters (memory, JSON file, SQLite, MySQL, PostgreSQL, MongoDB, Redis) plus migrations, seeders, query caching, read replicas, full-text search, geo queries, multi-tenancy, audit logging, schema snapshots, query profiling, views, stored procedures/functions/triggers, and a plugin manager.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install @zero-server/orm
11
+ ```
12
+
13
+ Or pull in the entire SDK at once:
14
+
15
+ ```bash
16
+ npm install @zero-server/sdk
17
+ ```
18
+
19
+ ## Usage
20
+
21
+ ```js
22
+ const { Database, Model, TYPES } = require('@zero-server/orm')
23
+ ```
24
+
25
+ ## Public surface
26
+
27
+ This package narrows `@zero-server/sdk` to **34** exports. See the [scope page](https://github.com/tonywied17/zero-server/blob/main/docs/scopes/orm.md#public-surface) for the full list.
28
+
29
+ ## Documentation
30
+
31
+ - [Scope page](https://github.com/tonywied17/zero-server/blob/main/docs/scopes/orm.md)
32
+ - [Full API reference](https://github.com/tonywied17/zero-server/blob/main/API.md)
33
+ - [Live docs](https://z-server.com)
34
+
35
+ ## License
36
+
37
+ MIT © Anthony Wiedman
package/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ // AUTO-GENERATED by .tools/generate-package-stubs.js — edit .tools/scope-manifest.js and re-run `npm run packages:generate`.
2
+ export { Database, Model, TYPES, Query, validateFKAction, validateCheck, Migrator, defineMigration, QueryCache, Seeder, SeederRunner, Factory, Fake, QueryProfiler, ReplicaManager, DatabaseView, FullTextSearch, GeoQuery, EARTH_RADIUS_KM, EARTH_RADIUS_MI, TenantManager, AuditLog, PluginManager, StoredProcedure, StoredFunction, TriggerManager, buildSnapshot, loadSnapshot, saveSnapshot, diffSnapshots, hasNoChanges, generateMigrationCode, discoverModels, SNAPSHOT_FILE } from "@zero-server/sdk";
package/index.js ADDED
@@ -0,0 +1,40 @@
1
+ // AUTO-GENERATED by .tools/generate-package-stubs.js — edit .tools/scope-manifest.js and re-run `npm run packages:generate`.
2
+ 'use strict';
3
+ const sdk = require("@zero-server/sdk");
4
+
5
+ module.exports = {
6
+ Database: sdk.Database,
7
+ Model: sdk.Model,
8
+ TYPES: sdk.TYPES,
9
+ Query: sdk.Query,
10
+ validateFKAction: sdk.validateFKAction,
11
+ validateCheck: sdk.validateCheck,
12
+ Migrator: sdk.Migrator,
13
+ defineMigration: sdk.defineMigration,
14
+ QueryCache: sdk.QueryCache,
15
+ Seeder: sdk.Seeder,
16
+ SeederRunner: sdk.SeederRunner,
17
+ Factory: sdk.Factory,
18
+ Fake: sdk.Fake,
19
+ QueryProfiler: sdk.QueryProfiler,
20
+ ReplicaManager: sdk.ReplicaManager,
21
+ DatabaseView: sdk.DatabaseView,
22
+ FullTextSearch: sdk.FullTextSearch,
23
+ GeoQuery: sdk.GeoQuery,
24
+ EARTH_RADIUS_KM: sdk.EARTH_RADIUS_KM,
25
+ EARTH_RADIUS_MI: sdk.EARTH_RADIUS_MI,
26
+ TenantManager: sdk.TenantManager,
27
+ AuditLog: sdk.AuditLog,
28
+ PluginManager: sdk.PluginManager,
29
+ StoredProcedure: sdk.StoredProcedure,
30
+ StoredFunction: sdk.StoredFunction,
31
+ TriggerManager: sdk.TriggerManager,
32
+ buildSnapshot: sdk.buildSnapshot,
33
+ loadSnapshot: sdk.loadSnapshot,
34
+ saveSnapshot: sdk.saveSnapshot,
35
+ diffSnapshots: sdk.diffSnapshots,
36
+ hasNoChanges: sdk.hasNoChanges,
37
+ generateMigrationCode: sdk.generateMigrationCode,
38
+ discoverModels: sdk.discoverModels,
39
+ SNAPSHOT_FILE: sdk.SNAPSHOT_FILE,
40
+ };
package/package.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "@zero-server/orm",
3
+ "version": "0.9.0",
4
+ "description": "Database, Model, Query, migrations, seeds, search, geo, tenancy, audit.",
5
+ "keywords": [
6
+ "zero-server",
7
+ "zero-http",
8
+ "orm"
9
+ ],
10
+ "author": "Anthony Wiedman",
11
+ "license": "MIT",
12
+ "main": "./index.js",
13
+ "types": "./index.d.ts",
14
+ "exports": {
15
+ ".": {
16
+ "types": "./index.d.ts",
17
+ "require": "./index.js",
18
+ "default": "./index.js"
19
+ },
20
+ "./package.json": "./package.json"
21
+ },
22
+ "files": [
23
+ "index.js",
24
+ "index.d.ts",
25
+ "README.md",
26
+ "LICENSE"
27
+ ],
28
+ "repository": {
29
+ "type": "git",
30
+ "url": "git+https://github.com/tonywied17/zero-server.git",
31
+ "directory": "packages/orm"
32
+ },
33
+ "bugs": {
34
+ "url": "https://github.com/tonywied17/zero-server/issues"
35
+ },
36
+ "homepage": "https://github.com/tonywied17/zero-server/tree/main/packages/orm#readme",
37
+ "engines": {
38
+ "node": ">=18.0.0"
39
+ },
40
+ "publishConfig": {
41
+ "registry": "https://registry.npmjs.org/",
42
+ "access": "public"
43
+ },
44
+ "sideEffects": false,
45
+ "dependencies": {
46
+ "@zero-server/sdk": "0.9.0"
47
+ }
48
+ }