File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313 "dev" : " objectstack dev" ,
1414 "build" : " objectstack compile objectstack.config.ts dist/crm.json" ,
1515 "typecheck" : " tsc --noEmit" ,
16- "test" : " echo \" No test specified \" && exit 0 "
16+ "test" : " objectstack test:run "
1717 },
1818 "dependencies" : {
1919 "@objectstack/spec" : " workspace:*"
Original file line number Diff line number Diff line change 1+ import { defineStack } from '@objectstack/spec' ;
2+ import { AppPlugin } from '@objectstack/runtime' ;
3+ import CrmApp from '@example/app-crm/objectstack.config' ;
4+ import TodoApp from '@example/app-todo/objectstack.config' ;
5+ import BiPluginManifest from '@example/plugin-bi/objectstack.config' ;
6+
7+ // App Host Example
8+ // This project acts as a "Platform Server" that loads multiple apps and plugins.
9+ // It effectively replaces the manual composition in `src/index.ts`.
10+
11+ export default defineStack ( {
12+ manifest : {
13+ id : 'app-host' ,
14+ name : 'app_host' ,
15+ version : '1.0.0' ,
16+ description : 'Host application aggregating CRM, Todo and BI plugins' ,
17+ type : 'app' ,
18+ } ,
19+
20+ // Explicitly Load Plugins and Apps
21+ // The Runtime CLI will iterate this list and call kernel.use()
22+ plugins : [
23+ // Wrap Manifests/Stacks in AppPlugin adapter
24+ new AppPlugin ( CrmApp ) ,
25+ new AppPlugin ( TodoApp ) ,
26+ new AppPlugin ( BiPluginManifest )
27+ ]
28+ } ) ;
Original file line number Diff line number Diff line change 33 "version" : " 0.9.2" ,
44 "private" : true ,
55 "scripts" : {
6- "dev" : " tsx src/index.ts" ,
6+ "dev" : " objectstack serve --dev" ,
7+ "start" : " tsx src/index.ts" ,
78 "build" : " tsc --noEmit" ,
89 "typecheck" : " tsc --noEmit" ,
9- "test" : " echo \" No test specified \" && exit 0 " ,
10+ "test" : " objectstack test:run " ,
1011 "clean" : " rm -rf dist node_modules"
1112 },
1213 "dependencies" : {
2223 "devDependencies" : {
2324 "ts-node" : " ^10.9.1" ,
2425 "tsx" : " ^4.21.0" ,
25- "typescript" : " ^5.0.0"
26+ "typescript" : " ^5.0.0" ,
27+ "@objectstack/cli" : " workspace:*"
2628 }
2729}
Original file line number Diff line number Diff line change 99 "dev" : " pnpm msw:init && vite" ,
1010 "build" : " pnpm msw:init && tsc && vite build" ,
1111 "typecheck" : " tsc --noEmit" ,
12- "test" : " echo \" No test specified \" && exit 0 " ,
12+ "test" : " objectstack test:run " ,
1313 "preview" : " vite preview"
1414 },
1515 "dependencies" : {
Original file line number Diff line number Diff line change 1313 "dev" : " objectstack dev" ,
1414 "build" : " objectstack compile objectstack.config.ts dist/objectstack.json" ,
1515 "typecheck" : " tsc --noEmit" ,
16- "test" : " echo \" No test specified \" && exit 0 "
16+ "test" : " objectstack test:run "
1717 },
1818 "dependencies" : {
1919 "@objectstack/client" : " workspace:*" ,
Original file line number Diff line number Diff line change 66 "type" : " module" ,
77 "scripts" : {
88 "build" : " tsc --noEmit" ,
9- "typecheck" : " tsc --noEmit"
9+ "typecheck" : " tsc --noEmit" ,
10+ "test" : " objectstack test:run"
1011 },
1112 "dependencies" : {
1213 "@objectstack/spec" : " workspace:*" ,
You can’t perform that action at this time.
0 commit comments