@mj-biz-apps/tasks-entities-server 0.0.1 → 1.0.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.
@@ -0,0 +1,30 @@
1
+ import { EntitySaveOptions } from '@memberjunction/core';
2
+ import { TaskEntity } from '@mj-biz-apps/tasks-entities';
3
+ /**
4
+ * Server-side subclass of {@link TaskEntity}.
5
+ *
6
+ * Holds the SERVER-ONLY task side-effects that must run exactly once and
7
+ * authoritatively, and must NOT also run in the browser:
8
+ * - Activity logging (writes MJ_BizApps_Tasks: Task Activities audit rows)
9
+ * - Sub-task progress rollup (cascading read-modify-write up the parent chain)
10
+ *
11
+ * The client-shared {@link TaskEntity} keeps only validation + in-record field
12
+ * side-effects. Registered at priority 2 to win over the priority-1 TaskEntity.
13
+ *
14
+ * Pattern mirrors SaaS's entities-server subclasses: override Save() to snapshot
15
+ * pre-save state and write the audit log, and register a per-instance event
16
+ * handler (once) for the cascading rollup so it fires after finalizeSave().
17
+ */
18
+ export declare class TaskEntityServer extends TaskEntity {
19
+ private _rollupHandlerRegistered;
20
+ Save(options?: EntitySaveOptions): Promise<boolean>;
21
+ private logActivities;
22
+ private logActivity;
23
+ /**
24
+ * Registers a per-instance save handler that rolls up this task's parent
25
+ * progress (server-only, idempotent, fire-and-forget). Fires after the save
26
+ * is finalized so the ID/dirty state is settled.
27
+ */
28
+ private ensureRollupHandler;
29
+ }
30
+ //# sourceMappingURL=TaskEntityServer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TaskEntityServer.d.ts","sourceRoot":"","sources":["../src/TaskEntityServer.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,iBAAiB,EAAsB,MAAM,sBAAsB,CAAC;AAE1G,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAGzD;;;;;;;;;;;;;;GAcG;AACH,qBACa,gBAAiB,SAAQ,UAAU;IAC5C,OAAO,CAAC,wBAAwB,CAAS;IAEnB,IAAI,CAAC,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC;YA8B3D,aAAa;YAmCb,WAAW;IAczB;;;;OAIG;IACH,OAAO,CAAC,mBAAmB;CA2B9B"}
@@ -0,0 +1,124 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { BaseEntity, LogError, Metadata } from '@memberjunction/core';
8
+ import { RegisterClass } from '@memberjunction/global';
9
+ import { TaskEntity } from '@mj-biz-apps/tasks-entities';
10
+ import { TaskService } from '@mj-biz-apps/tasks-core';
11
+ /**
12
+ * Server-side subclass of {@link TaskEntity}.
13
+ *
14
+ * Holds the SERVER-ONLY task side-effects that must run exactly once and
15
+ * authoritatively, and must NOT also run in the browser:
16
+ * - Activity logging (writes MJ_BizApps_Tasks: Task Activities audit rows)
17
+ * - Sub-task progress rollup (cascading read-modify-write up the parent chain)
18
+ *
19
+ * The client-shared {@link TaskEntity} keeps only validation + in-record field
20
+ * side-effects. Registered at priority 2 to win over the priority-1 TaskEntity.
21
+ *
22
+ * Pattern mirrors SaaS's entities-server subclasses: override Save() to snapshot
23
+ * pre-save state and write the audit log, and register a per-instance event
24
+ * handler (once) for the cascading rollup so it fires after finalizeSave().
25
+ */
26
+ let TaskEntityServer = class TaskEntityServer extends TaskEntity {
27
+ constructor() {
28
+ super(...arguments);
29
+ this._rollupHandlerRegistered = false;
30
+ }
31
+ async Save(options) {
32
+ this.ensureRollupHandler();
33
+ // Snapshot changed fields BEFORE save (super.Save resets dirty flags).
34
+ const isNew = !this.IsSaved;
35
+ const statusChanged = this.Fields.find(f => f.CodeName === 'Status')?.Dirty ?? false;
36
+ const pctChanged = this.Fields.find(f => f.CodeName === 'PercentComplete')?.Dirty ?? false;
37
+ const priorityChanged = this.Fields.find(f => f.CodeName === 'Priority')?.Dirty ?? false;
38
+ const dueChanged = this.Fields.find(f => f.CodeName === 'DueAt')?.Dirty ?? false;
39
+ const oldStatus = this.Fields.find(f => f.CodeName === 'Status')?.OldValue;
40
+ const oldPct = this.Fields.find(f => f.CodeName === 'PercentComplete')?.OldValue;
41
+ const oldPriority = this.Fields.find(f => f.CodeName === 'Priority')?.OldValue;
42
+ const oldDue = this.Fields.find(f => f.CodeName === 'DueAt')?.OldValue;
43
+ const result = await super.Save(options);
44
+ if (!result)
45
+ return false;
46
+ // Activity logging — server-only audit trail. Must not fail the save, but
47
+ // must not be silently swallowed either.
48
+ try {
49
+ await this.logActivities(isNew, statusChanged, pctChanged, priorityChanged, dueChanged, oldStatus, oldPct, oldPriority, oldDue);
50
+ }
51
+ catch (e) {
52
+ const msg = e instanceof Error ? e.message : String(e);
53
+ LogError(`TaskEntityServer: activity logging failed for task ${this.Get('ID')}: ${msg}`);
54
+ }
55
+ return true;
56
+ }
57
+ async logActivities(isNew, statusChanged, pctChanged, priorityChanged, dueChanged, oldStatus, oldPct, oldPriority, oldDue) {
58
+ const taskID = this.Get('ID');
59
+ if (isNew) {
60
+ await this.logActivity(taskID, 'Created', `Task created: ${this.Get('Name')}`);
61
+ }
62
+ if (statusChanged && !isNew) {
63
+ await this.logActivity(taskID, 'StatusChange', `Status changed from ${oldStatus} to ${this.Get('Status')}`, oldStatus ?? undefined, this.Get('Status'));
64
+ }
65
+ if (pctChanged && !isNew) {
66
+ await this.logActivity(taskID, 'PercentCompleteChanged', `Progress updated to ${this.Get('PercentComplete')}%`, String(oldPct ?? 0), String(this.Get('PercentComplete')));
67
+ }
68
+ if (priorityChanged && !isNew) {
69
+ await this.logActivity(taskID, 'PriorityChanged', `Priority changed from ${oldPriority} to ${this.Get('Priority')}`, oldPriority ?? undefined, this.Get('Priority'));
70
+ }
71
+ if (dueChanged && !isNew) {
72
+ await this.logActivity(taskID, 'DueDateChanged', `Due date changed`, String(oldDue ?? ''), String(this.Get('DueAt') ?? ''));
73
+ }
74
+ if (statusChanged && this.Get('Status') === 'Completed') {
75
+ await this.logActivity(taskID, 'Completed', `Task completed: ${this.Get('Name')}`);
76
+ }
77
+ }
78
+ async logActivity(taskID, activityType, description, previousValue, newValue) {
79
+ const activity = await new Metadata().GetEntityObject('MJ_BizApps_Tasks: Task Activities', this.ContextCurrentUser);
80
+ activity.NewRecord();
81
+ activity.Set('TaskID', taskID);
82
+ activity.Set('ActivityType', activityType);
83
+ activity.Set('Description', description);
84
+ if (previousValue)
85
+ activity.Set('PreviousValue', previousValue);
86
+ if (newValue)
87
+ activity.Set('NewValue', newValue);
88
+ await activity.Save();
89
+ }
90
+ /**
91
+ * Registers a per-instance save handler that rolls up this task's parent
92
+ * progress (server-only, idempotent, fire-and-forget). Fires after the save
93
+ * is finalized so the ID/dirty state is settled.
94
+ */
95
+ ensureRollupHandler() {
96
+ if (this._rollupHandlerRegistered) {
97
+ return;
98
+ }
99
+ this._rollupHandlerRegistered = true;
100
+ this.RegisterEventHandler((event) => {
101
+ if (event.type !== 'save') {
102
+ return;
103
+ }
104
+ const parentID = this.Get('ParentID');
105
+ if (!parentID) {
106
+ return;
107
+ }
108
+ // Idempotent reconcile: recomputes parent's weighted progress (and
109
+ // auto-completes it when all children are done); no-ops when nothing
110
+ // changed, which prevents the save it raises from looping back here.
111
+ new TaskService()
112
+ .rollupParentProgress(parentID, this.ContextCurrentUser)
113
+ .catch((err) => {
114
+ const msg = err instanceof Error ? err.message : String(err);
115
+ LogError(`TaskEntityServer: parent-progress rollup failed for parent ${parentID}: ${msg}`);
116
+ });
117
+ });
118
+ }
119
+ };
120
+ TaskEntityServer = __decorate([
121
+ RegisterClass(BaseEntity, 'MJ_BizApps_Tasks: Tasks', 2)
122
+ ], TaskEntityServer);
123
+ export { TaskEntityServer };
124
+ //# sourceMappingURL=TaskEntityServer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TaskEntityServer.js","sourceRoot":"","sources":["../src/TaskEntityServer.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAsC,QAAQ,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC1G,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD;;;;;;;;;;;;;;GAcG;AAEI,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,UAAU;IAAzC;;QACK,6BAAwB,GAAG,KAAK,CAAC;IAiH7C,CAAC;IA/GmB,KAAK,CAAC,IAAI,CAAC,OAA2B;QAClD,IAAI,CAAC,mBAAmB,EAAE,CAAC;QAE3B,uEAAuE;QACvE,MAAM,KAAK,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;QAC5B,MAAM,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,QAAQ,CAAC,EAAE,KAAK,IAAI,KAAK,CAAC;QACrF,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,iBAAiB,CAAC,EAAE,KAAK,IAAI,KAAK,CAAC;QAC3F,MAAM,eAAe,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,UAAU,CAAC,EAAE,KAAK,IAAI,KAAK,CAAC;QACzF,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC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AAO;QACX,CAAC;QACD,IAAI,CAAC,wBAAwB,GAAG,IAAI,CAAC;QAErC,IAAI,CAAC,oBAAoB,CAAC,CAAC,KAAsB,EAAE,EAAE;YACjD,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;gBACxB,OAAO;YACX,CAAC;YAED,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU,CAAkB,CAAC;YACvD,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACZ,OAAO;YACX,CAAC;YAED,mEAAmE;YACnE,qEAAqE;YACrE,qEAAqE;YACrE,IAAI,WAAW,EAAE;iBACZ,oBAAoB,CAAC,QAAQ,EAAE,IAAI,CAAC,kBAAkB,CAAC;iBACvD,KAAK,CAAC,CAAC,GAAY,EAAE,EAAE;gBACpB,MAAM,GAAG,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;gBAC7D,QAAQ,CAAC,8DAA8D,QAAQ,KAAK,GAAG,EAAE,CAAC,CAAC;YAC/F,CAAC,CAAC,CAAC;QACX,CAAC,CAAC,CAAC;IACP,CAAC;CACJ,CAAA;AAlHY,gBAAgB;IAD5B,aAAa,CAAC,UAAU,EAAE,yBAAyB,EAAE,CAAC,CAAC;GAC3C,gBAAgB,CAkH5B"}
@@ -0,0 +1,8 @@
1
+ export { TaskEntityServer } from './TaskEntityServer.js';
2
+ /**
3
+ * Bootstrap / anti-tree-shaking anchor. Call once from MJAPI bootstrap.
4
+ * Referencing the class here guarantees the decorator-registered server
5
+ * subclass is included in the bundle and registered.
6
+ */
7
+ export declare function LoadBizAppsTasksEntitiesServer(): void;
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD;;;;GAIG;AACH,wBAAgB,8BAA8B,IAAI,IAAI,CAMrD"}
package/dist/index.js ADDED
@@ -0,0 +1,23 @@
1
+ /**
2
+ * BizApps Tasks — server-side entity subclasses.
3
+ *
4
+ * These subclasses add side-effects that must run server-only (e.g. sub-task
5
+ * progress rollup). Import this package and call LoadBizAppsTasksEntitiesServer()
6
+ * from the API bootstrap so the @RegisterClass decorators fire and the
7
+ * server-side subclasses win over the client-safe ones.
8
+ */
9
+ import { TaskEntityServer } from './TaskEntityServer.js';
10
+ export { TaskEntityServer } from './TaskEntityServer.js';
11
+ /**
12
+ * Bootstrap / anti-tree-shaking anchor. Call once from MJAPI bootstrap.
13
+ * Referencing the class here guarantees the decorator-registered server
14
+ * subclass is included in the bundle and registered.
15
+ */
16
+ export function LoadBizAppsTasksEntitiesServer() {
17
+ // Reference the class so bundlers cannot tree-shake the registration away.
18
+ const anchor = [TaskEntityServer];
19
+ if (!anchor.length) {
20
+ throw new Error('TaskEntityServer anchor missing');
21
+ }
22
+ }
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD;;;;GAIG;AACH,MAAM,UAAU,8BAA8B;IAC1C,2EAA2E;IAC3E,MAAM,MAAM,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAClC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;IACvD,CAAC;AACL,CAAC"}
package/package.json CHANGED
@@ -1,10 +1,35 @@
1
1
  {
2
2
  "name": "@mj-biz-apps/tasks-entities-server",
3
- "version": "0.0.1",
4
- "description": "OIDC trusted publishing setup package for @mj-biz-apps/tasks-entities-server",
5
- "keywords": [
6
- "oidc",
7
- "trusted-publishing",
8
- "setup"
9
- ]
3
+ "type": "module",
4
+ "version": "1.0.1",
5
+ "description": "BizApps Tasks server-side entity subclasses - lifecycle hooks (sub-task progress rollup) that must run server-only",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "publishConfig": {
9
+ "access": "public"
10
+ },
11
+ "files": [
12
+ "/dist"
13
+ ],
14
+ "scripts": {
15
+ "build": "tsc && tsc-alias -f",
16
+ "test": "vitest run"
17
+ },
18
+ "author": "MemberJunction.com",
19
+ "license": "ISC",
20
+ "devDependencies": {
21
+ "typescript": "^5.9.3"
22
+ },
23
+ "dependencies": {
24
+ "@mj-biz-apps/tasks-entities": "1.0.1",
25
+ "@mj-biz-apps/tasks-core": "1.0.1"
26
+ },
27
+ "peerDependencies": {
28
+ "@memberjunction/core": "^5.38.0",
29
+ "@memberjunction/global": "^5.38.0"
30
+ },
31
+ "repository": {
32
+ "type": "git",
33
+ "url": "https://github.com/MemberJunction/bizapps-tasks"
34
+ }
10
35
  }
package/README.md DELETED
@@ -1,45 +0,0 @@
1
- # @mj-biz-apps/tasks-entities-server
2
-
3
- ## ⚠️ IMPORTANT NOTICE ⚠️
4
-
5
- **This package is created solely for the purpose of setting up OIDC (OpenID Connect) trusted publishing with npm.**
6
-
7
- This is **NOT** a functional package and contains **NO** code or functionality beyond the OIDC setup configuration.
8
-
9
- ## Purpose
10
-
11
- This package exists to:
12
- 1. Configure OIDC trusted publishing for the package name `@mj-biz-apps/tasks-entities-server`
13
- 2. Enable secure, token-less publishing from CI/CD workflows
14
- 3. Establish provenance for packages published under this name
15
-
16
- ## What is OIDC Trusted Publishing?
17
-
18
- OIDC trusted publishing allows package maintainers to publish packages directly from their CI/CD workflows without needing to manage npm access tokens. Instead, it uses OpenID Connect to establish trust between the CI/CD provider (like GitHub Actions) and npm.
19
-
20
- ## Setup Instructions
21
-
22
- To properly configure OIDC trusted publishing for this package:
23
-
24
- 1. Go to [npmjs.com](https://www.npmjs.com/) and navigate to your package settings
25
- 2. Configure the trusted publisher (e.g., GitHub Actions)
26
- 3. Specify the repository and workflow that should be allowed to publish
27
- 4. Use the configured workflow to publish your actual package
28
-
29
- ## DO NOT USE THIS PACKAGE
30
-
31
- This package is a placeholder for OIDC configuration only. It:
32
- - Contains no executable code
33
- - Provides no functionality
34
- - Should not be installed as a dependency
35
- - Exists only for administrative purposes
36
-
37
- ## More Information
38
-
39
- For more details about npm's trusted publishing feature, see:
40
- - [npm Trusted Publishing Documentation](https://docs.npmjs.com/generating-provenance-statements)
41
- - [GitHub Actions OIDC Documentation](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect)
42
-
43
- ---
44
-
45
- **Maintained for OIDC setup purposes only**