@mj-biz-apps/contracts-core-entities-server 0.8.0 → 0.9.1
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.
|
@@ -13,6 +13,21 @@
|
|
|
13
13
|
* TWO CLASSES IN ONE FILE, matching `ContractTypeEntity.ts` on the shared side: they are the same rule
|
|
14
14
|
* on the two lookup tables, and splitting them would put four lines in each of two files.
|
|
15
15
|
*
|
|
16
|
+
* BOTH EXTEND THE SHARED CLASS, NOT THE GENERATED ONE, and that is load-bearing rather than tidy.
|
|
17
|
+
* `@RegisterClass` resolves last-registered-wins. The shared `ContractTypeEntity` registers for the
|
|
18
|
+
* same key, so if both extended the generated class they would be SIBLINGS: the winner would not
|
|
19
|
+
* inherit the loser, it would replace it, and `ContractTypeEntity.Validate` -- the whole reason that
|
|
20
|
+
* class exists, running `ValidateValueLists` for a CHECK constraint `BaseEntity` cannot see
|
|
21
|
+
* (MJ#3969) -- would simply not run on the server, and for a while it did not. MJAPI printed the
|
|
22
|
+
* collision at every boot until the chain was corrected.
|
|
23
|
+
*
|
|
24
|
+
* Nothing failed loudly, which is why it lasted: the database still refuses a bad `Status`, at the
|
|
25
|
+
* very end, as a constraint violation naming no field -- exactly the round trip the shared subclass
|
|
26
|
+
* was written to prevent. The chain itself is already correct on `next`, and
|
|
27
|
+
* `server-class-registration.test.ts` already asserts it; what `server-extends-shared.test.ts` adds
|
|
28
|
+
* is that the `Validate` override survives on the resolved class, that the pair list stays complete
|
|
29
|
+
* as registrations are added, and that the shared side is pinned as well.
|
|
30
|
+
*
|
|
16
31
|
* @module @mj-biz-apps/contracts-core-entities-server
|
|
17
32
|
*/
|
|
18
33
|
import { type EntityDeleteOptions } from '@memberjunction/core';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContractTypeEntityServers.d.ts","sourceRoot":"","sources":["../src/ContractTypeEntityServers.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"ContractTypeEntityServers.d.ts","sourceRoot":"","sources":["../src/ContractTypeEntityServers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,EAAc,KAAK,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE5E,OAAO,EACH,0BAA0B,EAC1B,kBAAkB,EACrB,MAAM,iCAAiC,CAAC;AAMzC,qBACa,wBAAyB,SAAQ,kBAAkB;IACtC,MAAM,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC;CAehF;AAED,qBACa,gCAAiC,SAAQ,0BAA0B;IACtD,MAAM,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC;CAehF;AAED,yDAAyD;AACzD,wBAAgB,6BAA6B,IAAI,IAAI,CAGpD"}
|
|
@@ -19,6 +19,21 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
19
19
|
* TWO CLASSES IN ONE FILE, matching `ContractTypeEntity.ts` on the shared side: they are the same rule
|
|
20
20
|
* on the two lookup tables, and splitting them would put four lines in each of two files.
|
|
21
21
|
*
|
|
22
|
+
* BOTH EXTEND THE SHARED CLASS, NOT THE GENERATED ONE, and that is load-bearing rather than tidy.
|
|
23
|
+
* `@RegisterClass` resolves last-registered-wins. The shared `ContractTypeEntity` registers for the
|
|
24
|
+
* same key, so if both extended the generated class they would be SIBLINGS: the winner would not
|
|
25
|
+
* inherit the loser, it would replace it, and `ContractTypeEntity.Validate` -- the whole reason that
|
|
26
|
+
* class exists, running `ValidateValueLists` for a CHECK constraint `BaseEntity` cannot see
|
|
27
|
+
* (MJ#3969) -- would simply not run on the server, and for a while it did not. MJAPI printed the
|
|
28
|
+
* collision at every boot until the chain was corrected.
|
|
29
|
+
*
|
|
30
|
+
* Nothing failed loudly, which is why it lasted: the database still refuses a bad `Status`, at the
|
|
31
|
+
* very end, as a constraint violation naming no field -- exactly the round trip the shared subclass
|
|
32
|
+
* was written to prevent. The chain itself is already correct on `next`, and
|
|
33
|
+
* `server-class-registration.test.ts` already asserts it; what `server-extends-shared.test.ts` adds
|
|
34
|
+
* is that the `Validate` override survives on the resolved class, that the pair list stays complete
|
|
35
|
+
* as registrations are added, and that the shared side is pinned as well.
|
|
36
|
+
*
|
|
22
37
|
* @module @mj-biz-apps/contracts-core-entities-server
|
|
23
38
|
*/
|
|
24
39
|
import { BaseEntity } from '@memberjunction/core';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContractTypeEntityServers.js","sourceRoot":"","sources":["../src/ContractTypeEntityServers.ts"],"names":[],"mappings":";;;;;;AAAA
|
|
1
|
+
{"version":3,"file":"ContractTypeEntityServers.js","sourceRoot":"","sources":["../src/ContractTypeEntityServers.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,EAAE,UAAU,EAA4B,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EACH,0BAA0B,EAC1B,kBAAkB,GACrB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE1D,0FAA0F;AAC1F,MAAM,cAAc,GAAG,uIAAuI,CAAC;AAGxJ,IAAM,wBAAwB,GAA9B,MAAM,wBAAyB,SAAQ,kBAAkB;IAC5C,KAAK,CAAC,MAAM,CAAC,OAA6B;QACtD,OAAO,aAAa,CAChB,IAAI,EACJ,OAAO,EACP,kBAAkB,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,EAAE,sBAAsB,EAC5D;YACI;gBACI,UAAU,EAAE,iCAAiC;gBAC7C,MAAM,EAAE,qBAAqB,IAAI,CAAC,EAAE,GAAG;gBACvC,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC,EAAE,UA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any dev-linked open-app dependencies (e.g. \"@mj-biz-apps/*\"), and the Angular \"overrides\" pin set. Do not hand-edit those; the tool wires and reverts them. They are left visible in git status, but the git-tree guard blocks committing them. See .mjdev-docs/MANAGED-FILES.md; revert with `mjdev git:stage-clean <slug> package.json`.",
|
|
3
3
|
"name": "@mj-biz-apps/contracts-core-entities-server",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.9.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Server-side entity subclass overrides (validation, computed fields, save hooks). TODO(template): rename.",
|
|
7
7
|
"main": "dist/index.js",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
},
|
|
13
13
|
"license": "BUSL-1.1",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@mj-biz-apps/contracts-entities": "^0.
|
|
15
|
+
"@mj-biz-apps/contracts-entities": "^0.9.1"
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
18
18
|
"@memberjunction/core": "^6.1.6",
|