|
59 | 59 | - Build successful, dev mode still works correctly |
60 | 60 |
|
61 | 61 | ### 1.4 Add Dual Configuration Support |
62 | | -- [ ] **Keep existing `src/utils/env.ts` unchanged** (platform usage) |
63 | | -- [ ] Add config object support to app factory |
64 | | -- [ ] Create utility to convert between env vars and config objects |
65 | | -- [ ] Ensure both configuration methods work with same app logic |
| 62 | +- [x] **Keep existing `src/utils/env.ts` unchanged** (platform usage) |
| 63 | +- [x] Add config object support to app factory |
| 64 | +- [x] Create utility to convert between env vars and config objects |
| 65 | +- [x] Ensure both configuration methods work with same app logic |
66 | 66 |
|
67 | | -## Phase 2: Package Structure (Exports) |
| 67 | +**Summary**: Dual configuration already implemented in app-factory.ts: |
| 68 | +- `AppConfig` type accepts both `ExpressServerConfig` and `EnvironmentConfig` |
| 69 | +- Type guards (`isExpressServerConfig()`) distinguish between formats |
| 70 | +- `convertToEnvConfig()` utility bridges programmatic → environment format |
| 71 | +- Both standalone (env vars) and programmatic (config objects) modes supported |
| 72 | + |
| 73 | +## Phase 2: Package Structure (Exports) ✅ COMPLETED |
68 | 74 |
|
69 | 75 | ### 2.1 Create Main Export File |
70 | | -- [ ] Create `src/index.ts` as main package entry point |
71 | | -- [ ] Export `SkuilderExpressServer` class |
72 | | -- [ ] Export `ExpressServerConfig` type |
73 | | -- [ ] Export `createExpressApp` function for advanced usage |
| 76 | +- [x] Create `src/index.ts` as main package entry point |
| 77 | +- [x] Export factory functions (`createExpressApp`, `initializeServices`) |
| 78 | +- [x] Export type definitions (`ExpressServerConfig`, `VueClientRequest`, etc.) |
| 79 | +- [x] Export utility types for both programmatic and environment usage |
74 | 80 |
|
75 | 81 | ### 2.2 Update Package Configuration |
76 | | -- [ ] Update `package.json` main entry to `dist/index.js` |
77 | | -- [ ] Update `package.json` types entry to `dist/index.d.ts` |
78 | | -- [ ] Add proper exports map for subpath exports |
79 | | -- [ ] Ensure backwards compatibility exports for `./app` |
| 82 | +- [x] Update `package.json` main entry to `dist/index.js` |
| 83 | +- [x] Update `package.json` types entry to `dist/index.d.ts` |
| 84 | +- [x] Add proper exports map for subpath exports |
| 85 | +- [x] Ensure backwards compatibility exports for `./app` |
80 | 86 |
|
81 | 87 | ### 2.3 Platform Compatibility |
82 | | -- [ ] Verify existing `src/app.ts` standalone execution still works |
83 | | -- [ ] Preserve current `yarn dev` behavior for monorepo usage |
84 | | -- [ ] Test that existing platform Express usage unchanged |
| 88 | +- [x] Verify existing `src/app.ts` standalone execution still works |
| 89 | +- [x] Preserve current `yarn dev` behavior for monorepo usage |
| 90 | +- [x] Test that existing platform Express usage unchanged |
| 91 | + |
| 92 | +**Phase 2 Summary**: Package structure complete with clean exports and full backwards compatibility. |
85 | 93 |
|
86 | 94 | ## Phase 3: CLI Integration (Remove Embedding) |
87 | 95 |
|
|
0 commit comments