@topogram/starter-hello-db 0.1.7
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/README.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Topogram Starter: Hello DB
|
|
2
|
+
|
|
3
|
+
Package-backed SQLite database lifecycle starter for `topogram new`.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
topogram new ./hello-db --template @topogram/starter-hello-db
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Contract
|
|
10
|
+
|
|
11
|
+
- Catalog id: `hello-db`
|
|
12
|
+
- Surfaces: `database`
|
|
13
|
+
- Generator: `@topogram/generator-sqlite-db`
|
|
14
|
+
- Runtime stack: SQLite
|
|
15
|
+
- Executable implementation: no
|
|
16
|
+
- Purpose: database lifecycle starter for schema/migration output without web or API code.
|
|
17
|
+
|
|
18
|
+
## First Run
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
topogram new ./hello-db --template hello-db
|
|
22
|
+
cd ./hello-db
|
|
23
|
+
npm install
|
|
24
|
+
npm run doctor
|
|
25
|
+
npm run check
|
|
26
|
+
npm run generate
|
|
27
|
+
```
|
package/package.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@topogram/starter-hello-db",
|
|
3
|
+
"version": "0.1.7",
|
|
4
|
+
"description": "SQLite database lifecycle Topogram starter.",
|
|
5
|
+
"license": "UNLICENSED",
|
|
6
|
+
"private": false,
|
|
7
|
+
"type": "module",
|
|
8
|
+
"files": [
|
|
9
|
+
"topogram-template.json",
|
|
10
|
+
"topogram",
|
|
11
|
+
"topogram.project.json",
|
|
12
|
+
"README.md"
|
|
13
|
+
],
|
|
14
|
+
"devDependencies": {
|
|
15
|
+
"@topogram/generator-sqlite-db": "0.1.2"
|
|
16
|
+
},
|
|
17
|
+
"publishConfig": {
|
|
18
|
+
"registry": "https://registry.npmjs.org",
|
|
19
|
+
"access": "public"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
entity entity_greeting {
|
|
2
|
+
name "Greeting"
|
|
3
|
+
description "A minimal persisted resource for the SQLite starter"
|
|
4
|
+
|
|
5
|
+
fields {
|
|
6
|
+
id uuid required
|
|
7
|
+
message text required
|
|
8
|
+
created_at datetime required
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
keys {
|
|
12
|
+
primary [id]
|
|
13
|
+
index [created_at]
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
status active
|
|
17
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
projection proj_db_sqlite {
|
|
2
|
+
name "Hello SQLite DB"
|
|
3
|
+
description "SQLite persistence realization for the hello DB starter"
|
|
4
|
+
platform db_sqlite
|
|
5
|
+
|
|
6
|
+
realizes [entity_greeting]
|
|
7
|
+
outputs [db_contract, sql_schema]
|
|
8
|
+
|
|
9
|
+
db_tables {
|
|
10
|
+
entity_greeting table greetings
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
db_keys {
|
|
14
|
+
entity_greeting primary [id]
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
db_indexes {
|
|
18
|
+
entity_greeting index [created_at]
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
db_lifecycle {
|
|
22
|
+
entity_greeting timestamps created_at created_at updated_at created_at
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
generator_defaults {
|
|
26
|
+
profile sqlite_sql
|
|
27
|
+
language sql
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
status active
|
|
31
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.1",
|
|
3
|
+
"outputs": {
|
|
4
|
+
"app": {
|
|
5
|
+
"path": "./app",
|
|
6
|
+
"ownership": "generated"
|
|
7
|
+
}
|
|
8
|
+
},
|
|
9
|
+
"topology": {
|
|
10
|
+
"components": [
|
|
11
|
+
{
|
|
12
|
+
"id": "app_sqlite",
|
|
13
|
+
"type": "database",
|
|
14
|
+
"projection": "proj_db_sqlite",
|
|
15
|
+
"generator": {
|
|
16
|
+
"id": "@topogram/generator-sqlite-db",
|
|
17
|
+
"version": "1",
|
|
18
|
+
"package": "@topogram/generator-sqlite-db"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
}
|