@sprig-and-prose/sprig-universe 0.1.0
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/PHILOSOPHY.md +201 -0
- package/README.md +168 -0
- package/REFERENCE.md +355 -0
- package/biome.json +24 -0
- package/package.json +30 -0
- package/repositories/sprig-repository-github/index.js +29 -0
- package/src/ast.js +257 -0
- package/src/cli.js +1510 -0
- package/src/graph.js +950 -0
- package/src/index.js +46 -0
- package/src/ir.js +121 -0
- package/src/parser.js +1656 -0
- package/src/scanner.js +255 -0
- package/src/scene-manifest.js +856 -0
- package/src/util/span.js +46 -0
- package/src/util/text.js +126 -0
- package/src/validator.js +862 -0
- package/src/validators/mysql/connection.js +154 -0
- package/src/validators/mysql/schema.js +209 -0
- package/src/validators/mysql/type-compat.js +219 -0
- package/src/validators/mysql/validator.js +332 -0
- package/test/fixtures/amaranthine-mini.prose +53 -0
- package/test/fixtures/conflicting-universes-a.prose +8 -0
- package/test/fixtures/conflicting-universes-b.prose +8 -0
- package/test/fixtures/duplicate-names.prose +20 -0
- package/test/fixtures/first-line-aware.prose +32 -0
- package/test/fixtures/indented-describe.prose +18 -0
- package/test/fixtures/multi-file-universe-a.prose +15 -0
- package/test/fixtures/multi-file-universe-b.prose +15 -0
- package/test/fixtures/multi-file-universe-conflict-desc.prose +12 -0
- package/test/fixtures/multi-file-universe-conflict-title.prose +4 -0
- package/test/fixtures/multi-file-universe-with-title.prose +10 -0
- package/test/fixtures/named-document.prose +17 -0
- package/test/fixtures/named-duplicate.prose +22 -0
- package/test/fixtures/named-reference.prose +17 -0
- package/test/fixtures/relates-errors.prose +38 -0
- package/test/fixtures/relates-tier1.prose +14 -0
- package/test/fixtures/relates-tier2.prose +16 -0
- package/test/fixtures/relates-tier3.prose +21 -0
- package/test/fixtures/sprig-meta-mini.prose +62 -0
- package/test/fixtures/unresolved-relates.prose +15 -0
- package/test/fixtures/using-in-references.prose +35 -0
- package/test/fixtures/using-unknown.prose +8 -0
- package/test/universe-basic.test.js +804 -0
- package/tsconfig.json +15 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
universe Sprig {
|
|
2
|
+
describe {
|
|
3
|
+
Sprig is a declarative language and tool for describing systems in a way
|
|
4
|
+
that supports gradual clarification.
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
series Language {
|
|
8
|
+
describe {
|
|
9
|
+
The Language series describes the structure and vocabulary of sprig
|
|
10
|
+
itself.
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
series Structure {
|
|
15
|
+
describe {
|
|
16
|
+
Structure defines the primary organizational constructs of sprig.
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
book Universe in Structure {
|
|
20
|
+
describe {
|
|
21
|
+
A Universe is the top-level container for describing a system.
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
book Series in Structure {
|
|
26
|
+
describe {
|
|
27
|
+
A Series represents a broad conceptual grouping within a universe.
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
book Book in Structure {
|
|
32
|
+
describe {
|
|
33
|
+
A Book represents a focused concept within a series.
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
book Chapter in Structure {
|
|
38
|
+
describe {
|
|
39
|
+
A Chapter represents a sub-concept within a book.
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
relates Universe and Series {
|
|
45
|
+
describe {
|
|
46
|
+
A universe is composed of one or more series.
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
relates Series and Book {
|
|
51
|
+
describe {
|
|
52
|
+
Series group related books under a shared theme.
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
relates Book and Chapter {
|
|
57
|
+
describe {
|
|
58
|
+
Chapters refine or subdivide books.
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
universe Test {
|
|
2
|
+
reference ItemRouter {
|
|
3
|
+
repository { 'amaranthine-backend' }
|
|
4
|
+
paths { '/src/routers/items.ts' }
|
|
5
|
+
describe { Routes that implement item endpoints. }
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
reference PlayerRouter {
|
|
9
|
+
repository { 'amaranthine-backend' }
|
|
10
|
+
paths { '/src/routers/players.ts' }
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
series Items {
|
|
14
|
+
references {
|
|
15
|
+
using { ItemRouter }
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
series Players {
|
|
20
|
+
references {
|
|
21
|
+
reference {
|
|
22
|
+
repository { 'amaranthine-backend' }
|
|
23
|
+
paths { '/src/players/helpers.ts' }
|
|
24
|
+
}
|
|
25
|
+
using { PlayerRouter }
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
series Mixed {
|
|
30
|
+
references {
|
|
31
|
+
using { ItemRouter, PlayerRouter }
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|