Skip to content

Commit cacb04d

Browse files
author
DylanBulmer
committed
slim deps/transistion to bson only; update readme; fix tests
1 parent caef334 commit cacb04d

16 files changed

Lines changed: 45 additions & 19 deletions

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ import { User } from "jsr:@codr/models@^1";
5252
git clone git@github.com:CodrJS/models.git
5353

5454
# Cache deno dependencies
55-
deno cache
55+
deno cache ./mod.ts
5656

5757
# Format, lint, and test the code
5858
deno fmt

deno.lock

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/models/Annotation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { ObjectId } from "npm:mongodb";
1+
import type { ObjectId } from "npm:bson";
22
import { Base, type IBase } from "./Base.ts";
33
import type { AtLeast } from "../types/mod.ts";
44

src/models/Audit.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { ObjectId } from "npm:mongodb";
1+
import type { ObjectId } from "npm:bson";
22
import type { IBase } from "./Base.ts";
33
import type { ActionCode, ResourceCode } from "../types/mod.ts";
44

src/models/Authorization.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { ObjectId } from "npm:mongodb";
1+
import type { ObjectId } from "npm:bson";
22
import { Base, type IBase } from "./Base.ts";
33
import type { ActionCode, AtLeast, ResourceCode } from "../types/mod.ts";
44

src/models/Base.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ObjectId } from "npm:mongodb";
1+
import { ObjectId } from "npm:bson";
22
import type { AtLeast } from "../types/mod.ts";
33

44
export interface IBase<Kind extends string> {

src/models/Dataset.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { ObjectId } from "npm:mongodb";
1+
import type { ObjectId } from "npm:bson";
22
import type { AtLeast, Flags } from "../types/mod.ts";
33
import { Base, type IBase } from "./Base.ts";
44

src/models/Group.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { ObjectId } from "npm:mongodb";
1+
import type { ObjectId } from "npm:bson";
22
import { Base, type IBase } from "./Base.ts";
33
import type { AtLeast, Flags } from "../types/mod.ts";
44

src/models/Message.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { ObjectId } from "npm:mongodb";
1+
import type { ObjectId } from "npm:bson";
22
import type { AtLeast, MessageType } from "../types/mod.ts";
33
import { Base, type IBase } from "./Base.ts";
44

src/models/Organization.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import type { AtLeast } from "../types/mod.ts";
12
import { Base, type IBase } from "./Base.ts";
23

34
interface OrganizationFlags {
@@ -34,7 +35,7 @@ export class Organization extends Base<"Organization"> {
3435
name,
3536
slug,
3637
domains,
37-
}: IOrganization) {
38+
}: AtLeast<IOrganization, "createdBy" | "domains" | "name" | "slug">) {
3839
super({
3940
_id,
4041
__v,

0 commit comments

Comments
 (0)