Repository navigation
Expand file tree
/
Copy pathobjectstack.config.ts
More file actions
53 lines (50 loc) · 2.89 KB
/
Copy pathobjectstack.config.ts
File metadata and controls
53 lines (50 loc) · 2.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
import { composeStacks } from '@objectstack/spec';
// The four package stacks, built — see `objectstack.composition.ts`, which also
// resolves the `HOTCRM_COMPOSITION` knob and records why that work cannot live
// in this file (⛔ this module may carry no named export: the build parses it
// against a `.strict` stack schema and fails on any key but the default).
import { packageStacks } from './objectstack.composition.js';
/**
* ONE release artifact, FOUR packages (ADR-0130 D4).
*
* - `app.objectstack.hotcrm` (`src/sales/index.ts`) — the `type: 'app'`
* package a customer installs: sales, the app and its navigation groups,
* the cross-domain dashboards, the permission sets, the locale packs.
* - `app.objectstack.hotcrm.service` (`src/service/index.ts`) — the support
* module: cases and knowledge.
* - `app.objectstack.hotcrm.revenue` (`src/revenue/index.ts`) — products,
* line items, quotes and contracts.
* - `app.objectstack.hotcrm.marketing` (`src/marketing/index.ts`) — campaigns
* and campaign members.
*
* Each module puts its navigation entries into the app's groups through its
* manifest's `navigationContributions`.
*
* `manifest: 'preserve'` is the only option that separates "one artifact
* carrying N packages" from the pick-one composition every other strategy
* performs. It emits `packages[]`, one entry per input stack carrying that
* package ASSEMBLED — its manifest plus the collections it owns. That list is
* what `ObjectQL.registerApp` registers package by package, and it is where
* per-package OWNERSHIP comes from. Each definition is carried ONCE, in the
* body of the package that owns it: a multi-package artifact has no flattened
* copy of its collections beside `packages[]` (ADR-0130 D4, 2026-09-22
* addendum), so a reader wanting "every object of the app" resolves the
* package bodies, as every platform reader does.
*
* The App package is LAST deliberately, and that is not the load-bearing half:
*
* - the singular `manifest` is still picked by the default `'last'` rule, so
* the artifact identifies as the App a consumer installs (ADR-0019 D1),
* `app.objectstack.hotcrm`, not as one of its modules;
* - REGISTRATION order is decided by `dependencies` — every module
* declares `app.objectstack.hotcrm`, and `packages[]` is sorted through the
* platform's one topological sorter (ADR-0130 D5, ADR-0116) — so the app
* registers first whatever slot it occupies here. An artifact that only
* worked because someone listed the packages in the right order is the
* failure ADR-0116 exists about, and it fails SILENTLY.
*
* `objectstack build` compiles this file into one `dist/objectstack.json`;
* `objectstack dev` boots the same shape straight from source.
*/
export default composeStacks(packageStacks, { manifest: 'preserve' });