@outbuild-company/schedule-core 1.9.0 → 1.9.2

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 CHANGED
@@ -1,85 +1,32 @@
1
- # @outbuild/schedule-core
1
+ # @outbuild-company/schedule-core
2
2
 
3
- UI-agnostic schedule engine. Owns activities, links, calendars, autoscheduler and critical path. Designed to back DHTMLX (or any other UI) without leaking visual concerns.
3
+ UI-agnostic schedule engine for activities, links, calendars, autoscheduling
4
+ and critical-path calculation.
4
5
 
5
- **Status**: alpha — consumed in production by Outbuild's `react_client` behind the `SCHEDULE_CORE` feature flag, via the public entry (`core.dispatch(...)` and friends). The API surface is `src/index.ts` and nothing else.
6
-
7
- Extracted from the `pp2_node` monorepo (`packages/schedule-core`) on 2026-06-05 as a clean snapshot (no history carried over).
8
-
9
- ## Consuming from react_client (yarn link)
10
-
11
- The app consumes this repo's `src/` directly — no build step in the dev loop. Vite transpiles the TypeScript on the fly and watches the linked sources (cross-repo HMR works).
6
+ ## Install
12
7
 
13
8
  ```bash
14
- # once per machine
15
- cd ~/Developer/schedule-core && yarn link
16
- cd <pp2_node>/react_client && yarn link "@outbuild/schedule-core"
9
+ npm install @outbuild-company/schedule-core
17
10
  ```
18
11
 
19
- The link is wiped by `yarn install --force` or deleting `node_modules` — `react_client`'s pre-dev/start/build guard (`scripts/check-schedule-core-link.mjs`) fails fast with these instructions when that happens.
20
-
21
- ### Coordinated changes (core + bridge)
22
-
23
- A change that touches both this repo and the react_client bridge is two commits:
24
-
25
- 1. Commit (and push) here first.
26
- 2. Commit the bridge side in `pp2_node` referencing the core commit.
12
+ The package exposes a single public entry point:
27
13
 
28
- Locally nothing else is needed — the link always reflects your working tree.
29
-
30
- ### Persistence boundary
31
-
32
- This package owns the schedule domain, derived calculations and the persisted
33
- checkpoint used by `hasUnsavedChanges()` / `getModifiedActivities()`. It does
34
- not issue HTTP requests or build ProPlanner's private save DTO.
35
-
36
- The consuming bridge in `pp2_node-schedule-core` owns the reverse translation:
37
-
38
- ```text
39
- ScheduleCore
40
- → scheduleActions.getActivities() / getLinks()
41
- → convertCoreActivityToActivity / convertCoreLinkToActivityRelation
42
- → POST activitys/updateAllScheduleData
14
+ ```ts
15
+ import { ScheduleCore } from '@outbuild-company/schedule-core';
43
16
  ```
44
17
 
45
- The save reads all live activities and links from ScheduleCore, not from
46
- DHTMLX. DHTMLX contributes only transient visual progress flags. The bridge
47
- also injects `sectorId` and `ganttId`; authenticated company ownership,
48
- timestamps and related entities remain server concerns.
49
-
50
- `PersistableActivity` is therefore a dirty-check snapshot, not a network DTO.
51
- End-to-end save/reload compatibility must be certified in the consuming bridge
52
- and server repository.
53
-
54
- _added: 2026-07-31T20:27:29Z_
18
+ Schedule Core owns domain state and mutations. Consumers send commands through
19
+ `ScheduleCore.dispatch()` and translate the returned changes at their own UI
20
+ and persistence boundaries.
55
21
 
56
- ## Build
22
+ ## Development
57
23
 
58
- ```
24
+ ```bash
25
+ npm ci
26
+ npm run typecheck
27
+ npm test
59
28
  npm run build
60
29
  ```
61
30
 
62
- Outputs:
63
- - `dist/index.js` — ESM
64
- - `dist/index.cjs` — CJS
65
- - `dist/index.d.ts` / `dist/index.d.cts` — types
66
- - `dist/cdn/schedule-core.global.js` — IIFE for `<script>` tag (global `ScheduleCore`)
67
-
68
- `dist/` is the future published contract (registry or git dependency, pending when the `SCHEDULE_CORE` flag nears 100%); today no consumer reads it.
69
-
70
- Known debt: the DTS build (and `npm run typecheck`) is red from the in-flight `ActivitySnapshot` snake_case→camelCase refactor. ESM/CJS/IIFE build green.
71
-
72
- ## Test
73
-
74
- ```
75
- npm run test
76
- ```
77
-
78
- Self-contained vitest suite (fixtures live under `src/testing/projects/`). 6 known failing parity/date-math tests at import time, pre-existing from the monorepo branch.
79
-
80
- ## Docs
81
-
82
- - `API.md` — public API reference: every export of `src/index.ts` with signatures and usage examples.
83
- - `CLAUDE.md` — agent guide: identity, invariants, engineering rules.
84
- - `CURSOR.md` — operational guide: where each doc goes, `core.dispatch` flow, timestamp convention.
85
- - `SMELLS.md` / `TODO.md` — living logs (see CURSOR.md for their contracts).
31
+ The build produces ESM, CommonJS, type declarations and a browser IIFE under
32
+ `dist/`.