@dotbep/core 0.2.7 → 0.2.9
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/dist/index.d.ts +7 -40
- package/dist/index.js +1142 -1179
- package/package.json +4 -1
- package/examples/01-participants.ts +0 -127
- package/examples/02-files.ts +0 -100
- package/examples/03-workflows.ts +0 -149
- package/examples/04-bim-uses.ts +0 -70
- package/examples/05-standards.ts +0 -60
- package/examples/06-schedule.ts +0 -124
- package/examples/07-loin.ts +0 -133
- package/examples/08-deliverables.ts +0 -126
- package/examples/09-notes.ts +0 -73
- package/examples/10-llm.ts +0 -109
- package/examples/11-resolved.ts +0 -133
- package/examples/12-history.ts +0 -166
- package/examples/13-engine.ts +0 -152
- package/examples/bep.d.ts +0 -38
- package/examples/example.bep +0 -0
- package/examples/run-all.ts +0 -38
- package/src/base/entity.ts +0 -148
- package/src/base/history.ts +0 -497
- package/src/base/index.ts +0 -5
- package/src/base/singleton.ts +0 -26
- package/src/entities/actions.ts +0 -25
- package/src/entities/adapters.ts +0 -16
- package/src/entities/annexes.ts +0 -17
- package/src/entities/assetTypes.ts +0 -30
- package/src/entities/automations.ts +0 -24
- package/src/entities/bimUses.ts +0 -50
- package/src/entities/deliverables.ts +0 -66
- package/src/entities/disciplines.ts +0 -21
- package/src/entities/effects.ts +0 -28
- package/src/entities/env.ts +0 -17
- package/src/entities/events.ts +0 -24
- package/src/entities/extensions.ts +0 -16
- package/src/entities/flags.ts +0 -17
- package/src/entities/guides.ts +0 -26
- package/src/entities/index.ts +0 -32
- package/src/entities/lbsNodes.ts +0 -193
- package/src/entities/lods.ts +0 -22
- package/src/entities/loin.ts +0 -127
- package/src/entities/lois.ts +0 -22
- package/src/entities/members.ts +0 -137
- package/src/entities/milestones.ts +0 -32
- package/src/entities/notes.ts +0 -27
- package/src/entities/objectives.ts +0 -17
- package/src/entities/phases.ts +0 -17
- package/src/entities/remoteData.ts +0 -17
- package/src/entities/resolvers.ts +0 -20
- package/src/entities/roles.ts +0 -29
- package/src/entities/softwares.ts +0 -26
- package/src/entities/standards.ts +0 -68
- package/src/entities/teams.ts +0 -42
- package/src/entities/workflows.ts +0 -256
- package/src/index.ts +0 -464
- package/src/runtime/Engine.ts +0 -352
- package/src/runtime/MemoryStorage.ts +0 -31
- package/src/runtime/Runtime.ts +0 -106
- package/src/runtime/index.ts +0 -4
- package/src/runtime/transitions.ts +0 -456
- package/src/runtime/types.ts +0 -279
- package/src/types/history.ts +0 -37
- package/src/types/index.ts +0 -24
- package/src/types/resolved.ts +0 -137
- package/src/types/schema.ts +0 -757
- package/src/utils/diff.ts +0 -109
- package/src/utils/index.ts +0 -9
- package/src/utils/integrity.ts +0 -108
- package/src/utils/lbs.ts +0 -116
- package/src/utils/mermaid.ts +0 -110
- package/src/utils/naming.ts +0 -62
- package/src/utils/nomenclature.ts +0 -107
- package/src/utils/normalize.ts +0 -35
- package/src/utils/raci.ts +0 -25
- package/src/utils/textFile.ts +0 -24
- package/tsconfig.json +0 -12
- package/vite.config.ts +0 -24
package/src/utils/raci.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { RaciMatrix, RaciRow } from '../types/resolved.js'
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Groups RACI rows by an arbitrary key extracted from each row.
|
|
5
|
-
* The keyFn can return a single string or an array of strings — useful for
|
|
6
|
-
* dimensions where a row can belong to multiple groups (e.g. grouping by member).
|
|
7
|
-
*/
|
|
8
|
-
export function groupRaciRows(
|
|
9
|
-
rows: RaciRow[],
|
|
10
|
-
keyFn: (row: RaciRow) => string | string[],
|
|
11
|
-
): { key: string; rows: RaciRow[] }[] {
|
|
12
|
-
const map = new Map<string, RaciRow[]>()
|
|
13
|
-
|
|
14
|
-
for (const row of rows) {
|
|
15
|
-
const keys = [keyFn(row)].flat()
|
|
16
|
-
for (const key of keys) {
|
|
17
|
-
if (!map.has(key)) map.set(key, [])
|
|
18
|
-
map.get(key)!.push(row)
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
return Array.from(map.entries()).map(([key, rows]) => ({ key, rows }))
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export type { RaciMatrix, RaciRow }
|
package/src/utils/textFile.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type JSZip from 'jszip'
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Thin wrapper over a plain text file stored in the .bep zip.
|
|
5
|
-
* Used for memory.md and skill.md — files that are not part of bep.json
|
|
6
|
-
* but live in the zip and need to be readable and writable from the core.
|
|
7
|
-
*/
|
|
8
|
-
export class TextFile {
|
|
9
|
-
constructor(
|
|
10
|
-
private path: string,
|
|
11
|
-
private getZip: () => JSZip,
|
|
12
|
-
) {}
|
|
13
|
-
|
|
14
|
-
/** Returns the file content, or an empty string if the file doesn't exist. */
|
|
15
|
-
async get(): Promise<string> {
|
|
16
|
-
const file = this.getZip().file(this.path)
|
|
17
|
-
return file ? file.async('string') : ''
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/** Writes content to the file, creating it if it doesn't exist. */
|
|
21
|
-
set(content: string): void {
|
|
22
|
-
this.getZip().file(this.path, content)
|
|
23
|
-
}
|
|
24
|
-
}
|
package/tsconfig.json
DELETED
package/vite.config.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from 'vite'
|
|
2
|
-
import dts from 'vite-plugin-dts'
|
|
3
|
-
|
|
4
|
-
export default defineConfig({
|
|
5
|
-
build: {
|
|
6
|
-
lib: {
|
|
7
|
-
entry: 'src/index.ts',
|
|
8
|
-
formats: ['es'],
|
|
9
|
-
fileName: 'index',
|
|
10
|
-
},
|
|
11
|
-
rollupOptions: {
|
|
12
|
-
external: [
|
|
13
|
-
'jszip',
|
|
14
|
-
'zod',
|
|
15
|
-
/^node:/,
|
|
16
|
-
/^fs/,
|
|
17
|
-
/^path/,
|
|
18
|
-
/^url/,
|
|
19
|
-
],
|
|
20
|
-
},
|
|
21
|
-
target: 'node18',
|
|
22
|
-
},
|
|
23
|
-
plugins: [dts({ rollupTypes: true })],
|
|
24
|
-
})
|