@ordinatio/entities 1.3.0 → 1.5.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/README.md +8 -0
- package/dist/chunk-3VGJ4NFX.mjs +29 -0
- package/dist/chunk-ZWID3JLL.mjs +123 -0
- package/dist/companies/index.d.mts +60 -0
- package/dist/companies/index.mjs +24 -0
- package/dist/companies/prisma/index.d.mts +58 -0
- package/dist/companies/prisma/index.mjs +276 -0
- package/dist/companies/server/index.d.mts +167 -0
- package/dist/companies/server/index.mjs +1826 -0
- package/dist/constants-BwInbMWC.d.mts +11 -0
- package/dist/constants-DV-gn6u8.d.mts +22 -0
- package/dist/entity-notes/index.d.mts +19 -0
- package/dist/entity-notes/index.mjs +10 -0
- package/dist/entity-notes/prisma/index.d.mts +52 -0
- package/dist/entity-notes/prisma/index.mjs +279 -0
- package/dist/entity-notes/server/index.d.mts +153 -0
- package/dist/entity-notes/server/index.mjs +998 -0
- package/dist/types-B4DY5xj3.d.mts +123 -0
- package/dist/types-CbfseUAS.d.mts +169 -0
- package/package.json +32 -2
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/** The thing a note is about. `kind` is opaque to this package. */
|
|
2
|
+
interface NoteParent {
|
|
3
|
+
kind: string;
|
|
4
|
+
id: string;
|
|
5
|
+
}
|
|
6
|
+
/** The fields the rules need. An adapter may return a wider row: the store is generic over it. */
|
|
7
|
+
interface NoteRecord {
|
|
8
|
+
id: string;
|
|
9
|
+
parentKind: string;
|
|
10
|
+
parentId: string;
|
|
11
|
+
/** The cleaned body, stored exactly as given. */
|
|
12
|
+
body: string;
|
|
13
|
+
/** Starts at 1; +1 on every successful edit. Deleting and restoring do NOT change it. */
|
|
14
|
+
revision: number;
|
|
15
|
+
/** Who wrote it: opaque to this package (a user id, a name ...). */
|
|
16
|
+
authorId: string;
|
|
17
|
+
/** Stored and returned at MILLISECOND precision (what a JavaScript Date holds): list order and cursors compare it with `id`, so a store that keeps more precision must round it. */
|
|
18
|
+
createdAt: Date;
|
|
19
|
+
/** Set to the edit time on an edit only (not on delete or restore); within the same millisecond as the create it can equal `createdAt`. */
|
|
20
|
+
updatedAt: Date;
|
|
21
|
+
/** Null while the note is live. */
|
|
22
|
+
deletedAt: Date | null;
|
|
23
|
+
deletedBy: string | null;
|
|
24
|
+
}
|
|
25
|
+
type NoteStatus = 'live' | 'deleted';
|
|
26
|
+
/** `parentGone`: the parent does not exist in this workspace (unknown, another workspace's, or deleted a moment ago); nothing is stored. */
|
|
27
|
+
type NoteCreateResult<T extends NoteRecord> = {
|
|
28
|
+
kind: 'created';
|
|
29
|
+
note: T;
|
|
30
|
+
} | {
|
|
31
|
+
kind: 'parentGone';
|
|
32
|
+
};
|
|
33
|
+
/** Precedence: `notFound`, then `deleted` (a deleted note cannot be edited: restore it first), then `conflict`. `conflict` carries the CURRENT note. */
|
|
34
|
+
type NoteUpdateResult<T extends NoteRecord> = {
|
|
35
|
+
kind: 'updated';
|
|
36
|
+
before: T;
|
|
37
|
+
after: T;
|
|
38
|
+
} | {
|
|
39
|
+
kind: 'notFound';
|
|
40
|
+
} | {
|
|
41
|
+
kind: 'deleted';
|
|
42
|
+
} | {
|
|
43
|
+
kind: 'conflict';
|
|
44
|
+
current: T;
|
|
45
|
+
};
|
|
46
|
+
type NoteDeleteResult<T extends NoteRecord> = {
|
|
47
|
+
kind: 'deleted';
|
|
48
|
+
before: T;
|
|
49
|
+
after: T;
|
|
50
|
+
} | {
|
|
51
|
+
kind: 'notFound';
|
|
52
|
+
} | {
|
|
53
|
+
kind: 'alreadyDeleted';
|
|
54
|
+
};
|
|
55
|
+
type NoteRestoreResult<T extends NoteRecord> = {
|
|
56
|
+
kind: 'restored';
|
|
57
|
+
before: T;
|
|
58
|
+
after: T;
|
|
59
|
+
} | {
|
|
60
|
+
kind: 'notFound';
|
|
61
|
+
} | {
|
|
62
|
+
kind: 'notDeleted';
|
|
63
|
+
};
|
|
64
|
+
interface NoteListQuery {
|
|
65
|
+
parent: NoteParent;
|
|
66
|
+
status: NoteStatus;
|
|
67
|
+
/** At least 1 (the service clamps it). */
|
|
68
|
+
limit: number;
|
|
69
|
+
/** An opaque cursor from an earlier page of the SAME query, or null for the first page. */
|
|
70
|
+
cursor: string | null;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* `badCursor`: the cursor is not one this store produced (a store never throws for it). A cursor is only a POSITION in the newest-first order (a time and an id): it is not bound to a
|
|
74
|
+
* parent, a status or a workspace, so a valid cursor used with another query simply starts after that position in the new listing; it never exposes another workspace's rows.
|
|
75
|
+
*/
|
|
76
|
+
type NoteListResult<T extends NoteRecord> = {
|
|
77
|
+
kind: 'page';
|
|
78
|
+
notes: T[];
|
|
79
|
+
nextCursor: string | null;
|
|
80
|
+
} | {
|
|
81
|
+
kind: 'badCursor';
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* WHAT THE SERVICE GUARANTEES A STORE (so an adapter never needs to defend against these, and a contract test may rely on them): every id, kind, `authorId` and `actorId` it receives is
|
|
85
|
+
* a text of 1 to 255 characters without a NUL character or a lone UTF-16 surrogate; `body` is already cleaned, non-empty, within the length limit and without NUL; `expectedRevision` is a whole number from 1 to
|
|
86
|
+
* 2,147,483,647; `limit` is a whole number from 1 to the maximum page size; `status` is `live` or `deleted`; `cursor` is null or a string of at most 512 characters without NUL or a lone surrogate (it may still
|
|
87
|
+
* be one the store did not produce: answer `badCursor`, also for a well-formed cursor whose parts are out of range, such as a time no Date can hold, or one outside the store's own column range); `countByParent` gets a NON-EMPTY list
|
|
88
|
+
* of distinct valid ids (the service answers an empty list itself). It does NOT limit how many ids `countByParent` gets: the caller bounds that. A store used WITHOUT the service must
|
|
89
|
+
* apply the same rules.
|
|
90
|
+
*/
|
|
91
|
+
interface NoteStore<T extends NoteRecord = NoteRecord> {
|
|
92
|
+
/**
|
|
93
|
+
* `body` is already cleaned (the service sends nothing else; an adapter may rely on it) and is stored EXACTLY. ATOMIC with the parent's existence: the parent must be share-locked
|
|
94
|
+
* while the note is inserted, so that deleting the parent waits or fails cleanly instead of leaving an orphan. `revision` is 1, `deletedAt` and `deletedBy` are null.
|
|
95
|
+
*/
|
|
96
|
+
create(parent: NoteParent, body: string, authorId: string): Promise<NoteCreateResult<T>>;
|
|
97
|
+
/** The note, DELETED ONES INCLUDED; an id of another workspace or an unknown id is null (an adapter with uuid or integer id columns must answer such an id as null, not fail the cast). */
|
|
98
|
+
get(id: string): Promise<T | null>;
|
|
99
|
+
/**
|
|
100
|
+
* COMPARE-AND-SET on `revision`: the write happens only if the stored revision equals `expectedRevision`; then `revision` goes up by one and `updatedAt` moves. `before` is read in the
|
|
101
|
+
* same transaction as the write. Ten simultaneous edits from the same revision give exactly one `updated` and nine `conflict`. The precedence holds UNDER CONCURRENCY too: a note soft-deleted between a
|
|
102
|
+
* caller's read and its write is `deleted`, never `conflict` (do the read and the write under one row lock, or in one statement that distinguishes the cases).
|
|
103
|
+
*/
|
|
104
|
+
update(id: string, body: string, expectedRevision: number): Promise<NoteUpdateResult<T>>;
|
|
105
|
+
/** Sets `deletedAt` and `deletedBy`; revision and `updatedAt` are untouched. Ten simultaneous deletes of one note give exactly one `deleted`. */
|
|
106
|
+
softDelete(id: string, actorId: string): Promise<NoteDeleteResult<T>>;
|
|
107
|
+
/** Clears `deletedAt` and `deletedBy`; the note returns to its original place by `createdAt`. */
|
|
108
|
+
restore(id: string): Promise<NoteRestoreResult<T>>;
|
|
109
|
+
/**
|
|
110
|
+
* One page of ONE parent's notes with the given status, NEWEST FIRST by `createdAt` (ties by `id`, descending, using ONE definition of the order: the SAME key `(createdAt, id)` and the same comparison for
|
|
111
|
+
* the ordering and for the cursor, so rows in the same millisecond are never repeated or skipped at a page boundary; a database whose collation orders ids differently from the cursor's comparison must compare in the database). Keyset pagination: a note added or
|
|
112
|
+
* deleted between two page fetches never makes an older note repeat or disappear. The page has at most `limit` notes and `nextCursor` is non-null only when more follow.
|
|
113
|
+
* A parent that does not exist (or is another workspace's) simply has no notes.
|
|
114
|
+
*/
|
|
115
|
+
list(query: NoteListQuery): Promise<NoteListResult<T>>;
|
|
116
|
+
/**
|
|
117
|
+
* The number of notes with `status` per parent, for many parents of one kind in ONE round trip. EVERY asked id appears (0 when it has none or is not a parent of this
|
|
118
|
+
* workspace; the service fills in a missing id with 0, but a store must still do it); an EMPTY list asks for nothing and returns an empty map; a repeated id is one entry. Must work at tens of thousands of ids (in Postgres use `= ANY($1)`).
|
|
119
|
+
*/
|
|
120
|
+
countByParent(kind: string, parentIds: string[], status: NoteStatus): Promise<Map<string, number>>;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export type { NoteStore as N, NoteRecord as a, NoteStatus as b, NoteParent as c, NoteCreateResult as d, NoteDeleteResult as e, NoteListQuery as f, NoteListResult as g, NoteRestoreResult as h, NoteUpdateResult as i };
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
/** The fields the rules need. An adapter may return a wider row (createdAt ...): the store is generic over it. */
|
|
2
|
+
interface CompanyRecord {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
/** The case-insensitive identity of the name (unique per workspace): see `companyNameKey` in `@ordinatio/entities/companies`. */
|
|
6
|
+
nameKey: string;
|
|
7
|
+
/** The normalised website, or null. Derived by `checkCompanyWebsite`: the store never builds it. */
|
|
8
|
+
website: string | null;
|
|
9
|
+
/** The domain derived from the website (null exactly when the website is null). */
|
|
10
|
+
domain: string | null;
|
|
11
|
+
}
|
|
12
|
+
/** A website and its domain travel TOGETHER so they cannot disagree: both set, or both null (no website). */
|
|
13
|
+
type CompanyWebsite = {
|
|
14
|
+
website: string;
|
|
15
|
+
domain: string;
|
|
16
|
+
} | {
|
|
17
|
+
website: null;
|
|
18
|
+
domain: null;
|
|
19
|
+
};
|
|
20
|
+
/** Named object types so a future limit is an additive field, not a signature change. */
|
|
21
|
+
interface CompanyCreateLimits {
|
|
22
|
+
maxCompanies: number;
|
|
23
|
+
}
|
|
24
|
+
type CompanyCreateResult<T extends CompanyRecord> = {
|
|
25
|
+
kind: 'created';
|
|
26
|
+
company: T;
|
|
27
|
+
} | {
|
|
28
|
+
kind: 'duplicate';
|
|
29
|
+
} | {
|
|
30
|
+
kind: 'limit';
|
|
31
|
+
};
|
|
32
|
+
interface CompanyUpdatePatch {
|
|
33
|
+
/** Name and key travel TOGETHER so they cannot disagree. */
|
|
34
|
+
rename?: {
|
|
35
|
+
name: string;
|
|
36
|
+
nameKey: string;
|
|
37
|
+
};
|
|
38
|
+
/** Sets the website and its domain together; `{ website: null, domain: null }` clears both. */
|
|
39
|
+
website?: CompanyWebsite;
|
|
40
|
+
}
|
|
41
|
+
type CompanyUpdateResult<T extends CompanyRecord> = {
|
|
42
|
+
kind: 'updated';
|
|
43
|
+
before: T;
|
|
44
|
+
after: T;
|
|
45
|
+
} | {
|
|
46
|
+
kind: 'notFound';
|
|
47
|
+
} | {
|
|
48
|
+
kind: 'duplicate';
|
|
49
|
+
};
|
|
50
|
+
/** `memberCount` is how many people were detached with it, counted in the same transaction as the delete (an app's Activity entry quotes it). */
|
|
51
|
+
type CompanyRemoveResult<T extends CompanyRecord> = {
|
|
52
|
+
kind: 'removed';
|
|
53
|
+
company: T;
|
|
54
|
+
memberCount: number;
|
|
55
|
+
} | {
|
|
56
|
+
kind: 'notFound';
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* One person's membership of one company. `personId` is opaque to this package (a contact, a user ...); `role` is optional text ("Partner").
|
|
60
|
+
* A store hands back EXACTLY these three fields (map your row to them: the contract compares whole records), unlike companies, whose records
|
|
61
|
+
* an app may extend.
|
|
62
|
+
*/
|
|
63
|
+
interface CompanyMemberRecord {
|
|
64
|
+
companyId: string;
|
|
65
|
+
personId: string;
|
|
66
|
+
role: string | null;
|
|
67
|
+
}
|
|
68
|
+
/** A company with the role one person has in it (what a chip next to a person shows). */
|
|
69
|
+
interface PersonCompany<T extends CompanyRecord> {
|
|
70
|
+
company: T;
|
|
71
|
+
role: string | null;
|
|
72
|
+
}
|
|
73
|
+
interface CompanyMemberLimits {
|
|
74
|
+
maxMembers: number;
|
|
75
|
+
}
|
|
76
|
+
type CompanyAddMemberResult = {
|
|
77
|
+
kind: 'added';
|
|
78
|
+
member: CompanyMemberRecord;
|
|
79
|
+
} | {
|
|
80
|
+
kind: 'already';
|
|
81
|
+
member: CompanyMemberRecord;
|
|
82
|
+
} | {
|
|
83
|
+
kind: 'companyGone';
|
|
84
|
+
} | {
|
|
85
|
+
kind: 'personGone';
|
|
86
|
+
} | {
|
|
87
|
+
kind: 'memberLimit';
|
|
88
|
+
};
|
|
89
|
+
type CompanySetRoleResult = {
|
|
90
|
+
kind: 'updated';
|
|
91
|
+
before: CompanyMemberRecord;
|
|
92
|
+
after: CompanyMemberRecord;
|
|
93
|
+
} | {
|
|
94
|
+
kind: 'companyGone';
|
|
95
|
+
} | {
|
|
96
|
+
kind: 'notMember';
|
|
97
|
+
};
|
|
98
|
+
type CompanyRemoveMemberResult = {
|
|
99
|
+
kind: 'removed';
|
|
100
|
+
member: CompanyMemberRecord;
|
|
101
|
+
} | {
|
|
102
|
+
kind: 'companyGone';
|
|
103
|
+
} | {
|
|
104
|
+
kind: 'notMember';
|
|
105
|
+
};
|
|
106
|
+
interface CompanyStore<T extends CompanyRecord = CompanyRecord> {
|
|
107
|
+
/** Every company of the workspace. ORDER IS UNSPECIFIED: the service sorts. */
|
|
108
|
+
list(): Promise<T[]>;
|
|
109
|
+
/** The companies of THIS workspace among `ids`; foreign or deleted ids are simply absent. */
|
|
110
|
+
getMany(ids: string[]): Promise<T[]>;
|
|
111
|
+
findByKey(nameKey: string): Promise<T | null>;
|
|
112
|
+
get(id: string): Promise<T | null>;
|
|
113
|
+
/**
|
|
114
|
+
* Keys are OPAQUE and compared EXACTLY: two keys that differ only by case are two keys (the service lower-cases before it calls the store). Name,
|
|
115
|
+
* key, website and domain are stored exactly as given. A new company never gets the id of a removed one, and nothing of a removed company
|
|
116
|
+
* comes back when its key is taken again. Every id list (`getMany`, `memberCounts`) must work at tens of thousands of ids (in Postgres use
|
|
117
|
+
* `= ANY($1)` with one array parameter, not one bind parameter per id).
|
|
118
|
+
* ATOMIC: the limit is enforced together with the insert, so simultaneous creates can never overshoot it. Precedence: `limit` wins over
|
|
119
|
+
* `duplicate` (a duplicate name when the workspace is full is `limit`).
|
|
120
|
+
*/
|
|
121
|
+
create(input: {
|
|
122
|
+
name: string;
|
|
123
|
+
nameKey: string;
|
|
124
|
+
} & CompanyWebsite, limits: CompanyCreateLimits): Promise<CompanyCreateResult<T>>;
|
|
125
|
+
/**
|
|
126
|
+
* ATOMIC. Precedence: `notFound`, then `duplicate`. Renaming a company to the same key it already has (a case change) is not a duplicate.
|
|
127
|
+
* An empty patch is a no-op that returns `updated` with `before` equal to `after`. `before` is read in the same transaction as the write,
|
|
128
|
+
* so `before`/`after` are consistent under concurrent edits.
|
|
129
|
+
*/
|
|
130
|
+
update(id: string, patch: CompanyUpdatePatch): Promise<CompanyUpdateResult<T>>;
|
|
131
|
+
/** Its memberships go with it. Ten parallel removes of one company give exactly one `removed`. */
|
|
132
|
+
remove(id: string): Promise<CompanyRemoveResult<T>>;
|
|
133
|
+
/**
|
|
134
|
+
* Companies whose stored `domain` is EXACTLY `domain` (the caller has already normalised it), for the suggestion lookup. ORDER UNSPECIFIED.
|
|
135
|
+
* A company without a domain never matches. ADAPTER NOTE: an index on (workspace, domain) keeps this one cheap query.
|
|
136
|
+
*/
|
|
137
|
+
findByDomain(domain: string): Promise<T[]>;
|
|
138
|
+
/**
|
|
139
|
+
* Members per company in ONE round trip, for EVERY company of the workspace (or only `ids`): a company with no members appears with 0, an id
|
|
140
|
+
* that is not a company of this workspace is absent. An EMPTY `ids` asks for nothing: it returns an empty map.
|
|
141
|
+
*/
|
|
142
|
+
memberCounts(ids?: string[]): Promise<Map<string, number>>;
|
|
143
|
+
/** Is this a person of THIS workspace? (A person of another workspace, or a deleted one, is not.) */
|
|
144
|
+
personExists(personId: string): Promise<boolean>;
|
|
145
|
+
/**
|
|
146
|
+
* `role` is already cleaned: null or non-empty trimmed text (the service sends nothing else; an adapter may rely on it).
|
|
147
|
+
* ADAPTER NOTE: the member count and the insert must be atomic (a lock per company; a shared row lock on the company is NOT enough, because two
|
|
148
|
+
* shared locks coexist), and the person row must be share-locked while the membership is inserted, so that deleting the person waits or fails
|
|
149
|
+
* cleanly instead of leaving a dangling membership.
|
|
150
|
+
* ATOMIC: the member limit is enforced together with the insert. Precedence: `companyGone`, then `personGone`, then `already`, then
|
|
151
|
+
* `memberLimit`: a person who is ALREADY a member is reported as `already` (with the membership as it is, role untouched) and never counts
|
|
152
|
+
* against the limit. A company or person deleted between the check and the write is `companyGone` / `personGone` and nothing is written.
|
|
153
|
+
* `actorId` is stored with a new membership (who added it); it is opaque to this package.
|
|
154
|
+
*/
|
|
155
|
+
addMember(companyId: string, personId: string, role: string | null, actorId: string, limits: CompanyMemberLimits): Promise<CompanyAddMemberResult>;
|
|
156
|
+
/** `role` is null or cleaned non-empty text, as for `addMember`. ATOMIC; `before` is read in the same transaction as the write. Precedence: `companyGone`, then `notMember`. Setting the role it already has is `updated` with `before` equal to `after`. */
|
|
157
|
+
setRole(companyId: string, personId: string, role: string | null): Promise<CompanySetRoleResult>;
|
|
158
|
+
/** Precedence: `companyGone`, then `notMember`. Ten parallel removes of one membership give exactly one `removed`. */
|
|
159
|
+
removeMember(companyId: string, personId: string): Promise<CompanyRemoveMemberResult>;
|
|
160
|
+
/** The memberships of one company. ORDER IS UNSPECIFIED (the app sorts by the people's names). An unknown company has none. */
|
|
161
|
+
members(companyId: string): Promise<CompanyMemberRecord[]>;
|
|
162
|
+
/**
|
|
163
|
+
* The companies of many people in ONE round trip, each with the person's role. Only people with at least one company appear in the map;
|
|
164
|
+
* a company of another workspace never appears. ORDER of each list is unspecified: the service sorts.
|
|
165
|
+
*/
|
|
166
|
+
companiesForPeople(personIds: string[]): Promise<Map<string, Array<PersonCompany<T>>>>;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export type { CompanyRecord as C, PersonCompany as P, CompanyStore as a, CompanyMemberRecord as b, CompanyAddMemberResult as c, CompanyCreateLimits as d, CompanyCreateResult as e, CompanyMemberLimits as f, CompanyRemoveMemberResult as g, CompanyRemoveResult as h, CompanySetRoleResult as i, CompanyUpdatePatch as j, CompanyUpdateResult as k, CompanyWebsite as l };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ordinatio/entities",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Entity knowledge, agent intelligence, notes, and contacts",
|
|
@@ -15,6 +15,36 @@
|
|
|
15
15
|
"import": "./dist/index.mjs",
|
|
16
16
|
"default": "./dist/index.mjs"
|
|
17
17
|
},
|
|
18
|
+
"./companies": {
|
|
19
|
+
"types": "./dist/companies/index.d.mts",
|
|
20
|
+
"import": "./dist/companies/index.mjs",
|
|
21
|
+
"default": "./dist/companies/index.mjs"
|
|
22
|
+
},
|
|
23
|
+
"./companies/server": {
|
|
24
|
+
"types": "./dist/companies/server/index.d.mts",
|
|
25
|
+
"import": "./dist/companies/server/index.mjs",
|
|
26
|
+
"default": "./dist/companies/server/index.mjs"
|
|
27
|
+
},
|
|
28
|
+
"./companies/prisma": {
|
|
29
|
+
"types": "./dist/companies/prisma/index.d.mts",
|
|
30
|
+
"import": "./dist/companies/prisma/index.mjs",
|
|
31
|
+
"default": "./dist/companies/prisma/index.mjs"
|
|
32
|
+
},
|
|
33
|
+
"./notes": {
|
|
34
|
+
"types": "./dist/entity-notes/index.d.mts",
|
|
35
|
+
"import": "./dist/entity-notes/index.mjs",
|
|
36
|
+
"default": "./dist/entity-notes/index.mjs"
|
|
37
|
+
},
|
|
38
|
+
"./notes/server": {
|
|
39
|
+
"types": "./dist/entity-notes/server/index.d.mts",
|
|
40
|
+
"import": "./dist/entity-notes/server/index.mjs",
|
|
41
|
+
"default": "./dist/entity-notes/server/index.mjs"
|
|
42
|
+
},
|
|
43
|
+
"./notes/prisma": {
|
|
44
|
+
"types": "./dist/entity-notes/prisma/index.d.mts",
|
|
45
|
+
"import": "./dist/entity-notes/prisma/index.mjs",
|
|
46
|
+
"default": "./dist/entity-notes/prisma/index.mjs"
|
|
47
|
+
},
|
|
18
48
|
"./tags": {
|
|
19
49
|
"types": "./dist/tags/index.d.mts",
|
|
20
50
|
"import": "./dist/tags/index.mjs",
|
|
@@ -59,7 +89,7 @@
|
|
|
59
89
|
}
|
|
60
90
|
},
|
|
61
91
|
"scripts": {
|
|
62
|
-
"build": "tsup src/index.ts src/tags/index.ts src/tags/server/index.ts src/tags/prisma/index.ts --format esm --dts --clean",
|
|
92
|
+
"build": "tsup src/index.ts src/companies/index.ts src/companies/server/index.ts src/companies/prisma/index.ts src/entity-notes/index.ts src/entity-notes/server/index.ts src/entity-notes/prisma/index.ts src/tags/index.ts src/tags/server/index.ts src/tags/prisma/index.ts --format esm --dts --clean",
|
|
63
93
|
"test": "vitest",
|
|
64
94
|
"test:run": "vitest run"
|
|
65
95
|
}
|