retold-data-service 2.1.2 → 2.1.6
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/.github/workflows/publish-image.yml +2 -2
- package/BUILDING-AND-PUBLISHING.md +6 -6
- package/CONTRIBUTING.md +1 -1
- package/Dockerfile +1 -1
- package/README.md +12 -27
- package/build-all.js +66 -0
- package/diagrams/architecture.excalidraw +2966 -0
- package/diagrams/architecture.mmd +17 -0
- package/diagrams/architecture.svg +2 -0
- package/docs/README.md +12 -12
- package/docs/_brand.json +18 -0
- package/docs/_cover.md +1 -1
- package/docs/_topbar.md +1 -1
- package/docs/_version.json +3 -3
- package/docs/api/reference.md +8 -8
- package/docs/architecture.md +6 -84
- package/docs/diagrams/component-diagram.excalidraw +2807 -0
- package/docs/diagrams/component-diagram.mmd +14 -0
- package/docs/diagrams/component-diagram.svg +2 -0
- package/docs/diagrams/component-stack.excalidraw +1169 -0
- package/docs/diagrams/component-stack.mmd +6 -0
- package/docs/diagrams/component-stack.svg +2 -0
- package/docs/diagrams/hook-execution-order.excalidraw +3230 -0
- package/docs/diagrams/hook-execution-order.mmd +19 -0
- package/docs/diagrams/hook-execution-order.svg +2 -0
- package/docs/diagrams/initialization-flow.excalidraw +1800 -0
- package/docs/diagrams/initialization-flow.mmd +22 -0
- package/docs/diagrams/initialization-flow.svg +2 -0
- package/docs/index.html +6 -7
- package/docs/lifecycle-hooks.md +2 -21
- package/docs/retold-catalog.json +141 -141
- package/docs/retold-keyword-index.json +6818 -1608
- package/package.json +130 -96
- package/source/services/RetoldDataService-Brand.js +13 -0
- package/source/services/comprehension-loader/pict-app/Pict-Application-ComprehensionLoader.js +65 -15
- package/source/services/comprehension-loader/pict-app/views/PictView-ComprehensionLoader-Layout.js +28 -74
- package/source/services/comprehension-loader/pict-app/views/PictView-ComprehensionLoader-Load.js +17 -17
- package/source/services/comprehension-loader/pict-app/views/PictView-ComprehensionLoader-SettingsPanel.js +62 -0
- package/source/services/comprehension-loader/pict-app/views/PictView-ComprehensionLoader-Shell.js +142 -0
- package/source/services/comprehension-loader/pict-app/views/PictView-ComprehensionLoader-StatusBar.js +125 -0
- package/source/services/comprehension-loader/pict-app/views/PictView-ComprehensionLoader-StatusDetail.js +89 -0
- package/source/services/comprehension-loader/pict-app/views/PictView-ComprehensionLoader-TopBar-Nav.js +42 -0
- package/source/services/comprehension-loader/pict-app/views/PictView-ComprehensionLoader-TopBar-User.js +48 -0
- package/source/services/comprehension-loader/web/comprehension-loader.js +5517 -6183
- package/source/services/comprehension-loader/web/comprehension-loader.js.map +1 -1
- package/source/services/comprehension-loader/web/comprehension-loader.min.js +75 -1
- package/source/services/comprehension-loader/web/comprehension-loader.min.js.map +1 -1
- package/source/services/comprehension-loader/web/favicons/favicon-dark.svg +13 -0
- package/source/services/comprehension-loader/web/favicons/favicon-light.svg +13 -0
- package/source/services/comprehension-loader/web/favicons/favicon.svg +13 -0
- package/source/services/comprehension-loader/web/index.html +3 -0
- package/source/services/comprehension-loader/web/pict.min.js +12 -0
- package/source/services/data-cloner/DataCloner-Command-Headless.js +102 -4
- package/source/services/data-cloner/DataCloner-Command-Schema.js +105 -8
- package/source/services/data-cloner/DataCloner-Command-Sync.js +111 -75
- package/source/services/data-cloner/pict-app/Pict-Application-DataCloner.js +70 -47
- package/source/services/data-cloner/pict-app/views/PictView-DataCloner-Export.js +3 -3
- package/source/services/data-cloner/pict-app/views/PictView-DataCloner-Layout.js +40 -86
- package/source/services/data-cloner/pict-app/views/PictView-DataCloner-SettingsPanel.js +61 -0
- package/source/services/data-cloner/pict-app/views/PictView-DataCloner-Shell.js +136 -0
- package/source/services/data-cloner/pict-app/views/PictView-DataCloner-StatusBar.js +117 -0
- package/source/services/data-cloner/pict-app/views/PictView-DataCloner-StatusDetail.js +81 -0
- package/source/services/data-cloner/pict-app/views/PictView-DataCloner-Sync.js +18 -18
- package/source/services/data-cloner/pict-app/views/PictView-DataCloner-TopBar-Nav.js +42 -0
- package/source/services/data-cloner/pict-app/views/PictView-DataCloner-TopBar-User.js +48 -0
- package/source/services/data-cloner/pict-app/views/PictView-DataCloner-ViewData.js +2 -2
- package/source/services/data-cloner/web/data-cloner.js +5874 -7986
- package/source/services/data-cloner/web/data-cloner.js.map +1 -1
- package/source/services/data-cloner/web/data-cloner.min.js +75 -1
- package/source/services/data-cloner/web/data-cloner.min.js.map +1 -1
- package/source/services/data-cloner/web/favicons/favicon-dark.svg +13 -0
- package/source/services/data-cloner/web/favicons/favicon-light.svg +13 -0
- package/source/services/data-cloner/web/favicons/favicon.svg +13 -0
- package/source/services/data-cloner/web/favicons/favicons/favicon-dark.svg +13 -0
- package/source/services/data-cloner/web/favicons/favicons/favicon-light.svg +13 -0
- package/source/services/data-cloner/web/favicons/favicons/favicon.svg +13 -0
- package/source/services/data-cloner/web/index.html +3 -0
- package/source/services/data-cloner/web/pict.min.js +12 -0
- package/test/Bundles_smoke_tests.js +43 -0
- package/test/ComprehensionLoader_smoke_tests.js +95 -0
- package/test/DataCloner-RuntimeOverrides_tests.js +344 -0
- package/test/DataCloner_smoke_tests.js +87 -0
- package/tools/smoke-converge-endpoint.js +190 -0
- package/docs/css/docuserve.css +0 -327
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
# version tag push (e.g. `v1.2.3`). Generated by `quack docker-init`.
|
|
3
3
|
#
|
|
4
4
|
# Image lands at:
|
|
5
|
-
# ghcr.io/
|
|
6
|
-
# ghcr.io/
|
|
5
|
+
# ghcr.io/fable-retold/retold-data-service:<version>
|
|
6
|
+
# ghcr.io/fable-retold/retold-data-service:latest (only on stable tags)
|
|
7
7
|
|
|
8
8
|
name: Publish container image
|
|
9
9
|
|
|
@@ -29,7 +29,7 @@ dependencies, env-var contract, or the Dockerfile changed.
|
|
|
29
29
|
|
|
30
30
|
- **npm login** — `npm whoami` should print your username.
|
|
31
31
|
- **Git remote configured** — `git remote get-url origin` should print
|
|
32
|
-
`git@github.com:
|
|
32
|
+
`git@github.com:fable-retold/retold-data-service.git` (or the
|
|
33
33
|
HTTPS equivalent).
|
|
34
34
|
- **Push access to the repo** — required so `postversion` /
|
|
35
35
|
`postpublish` hooks can push commits and tags.
|
|
@@ -110,7 +110,7 @@ BUILD_DOCKER=1 npm publish (or: npm run publish:docker)
|
|
|
110
110
|
→ postpublish: BUILD_DOCKER=1 → tag + push ← image trigger
|
|
111
111
|
→ .github/workflows/publish-image.yml fires
|
|
112
112
|
→ docker buildx build linux/amd64,linux/arm64
|
|
113
|
-
→ docker push ghcr.io/
|
|
113
|
+
→ docker push ghcr.io/fable-retold/retold-data-service:<version>
|
|
114
114
|
```
|
|
115
115
|
|
|
116
116
|
---
|
|
@@ -118,8 +118,8 @@ BUILD_DOCKER=1 npm publish (or: npm run publish:docker)
|
|
|
118
118
|
## Verifying a release
|
|
119
119
|
|
|
120
120
|
1. **npm**: `npm view retold-data-service version`
|
|
121
|
-
2. **Workflow**: `https://github.com/
|
|
122
|
-
3. **Image**: `docker pull ghcr.io/
|
|
121
|
+
2. **Workflow**: `https://github.com/fable-retold/retold-data-service/actions`
|
|
122
|
+
3. **Image**: `docker pull ghcr.io/fable-retold/retold-data-service:latest`
|
|
123
123
|
|
|
124
124
|
If the first `docker pull` returns `denied`, the package is private by
|
|
125
125
|
default — flip visibility to public via Package Settings → Danger Zone
|
|
@@ -130,8 +130,8 @@ on the package page.
|
|
|
130
130
|
## Image consumption
|
|
131
131
|
|
|
132
132
|
```bash
|
|
133
|
-
docker pull ghcr.io/
|
|
134
|
-
docker run --rm ghcr.io/
|
|
133
|
+
docker pull ghcr.io/fable-retold/retold-data-service:latest
|
|
134
|
+
docker run --rm ghcr.io/fable-retold/retold-data-service:latest
|
|
135
135
|
```
|
|
136
136
|
|
|
137
137
|
Configuration via env vars: see this module's README for the supported
|
package/CONTRIBUTING.md
CHANGED
|
@@ -47,4 +47,4 @@ When in doubt, match what the surrounding code does.
|
|
|
47
47
|
|
|
48
48
|
## Repository Structure
|
|
49
49
|
|
|
50
|
-
Each module is its own git repository. The [retold](https://github.com/
|
|
50
|
+
Each module is its own git repository. The [retold](https://github.com/fable-retold/retold) repository tracks module organization but does not contain module source code. Direct your pull request to the specific module repository where your change belongs.
|
package/Dockerfile
CHANGED
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# Retold Data Service
|
|
2
2
|
|
|
3
|
-
[
|
|
3
|
+
> **[Read the Retold-Data-Service Documentation](https://fable-retold.github.io/retold-data-service/)** - interactive docs with the full API reference.
|
|
4
|
+
|
|
5
|
+
[MIT License](LICENSE)
|
|
4
6
|
|
|
5
7
|
> An all-in-one Fable service that turns a compiled Stricture schema into a complete REST API
|
|
6
8
|
|
|
@@ -70,25 +72,8 @@ _Fable.RetoldDataService.initializeService(
|
|
|
70
72
|
|
|
71
73
|
Retold Data Service orchestrates the full Meadow stack into a single initialization sequence:
|
|
72
74
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
└── Retold Data Service
|
|
76
|
-
├── Orator (API Server)
|
|
77
|
-
│ └── Restify (HTTP Engine)
|
|
78
|
-
├── Meadow (Data Access Layer)
|
|
79
|
-
│ ├── Schema (from compiled Stricture model)
|
|
80
|
-
│ ├── FoxHound (Query DSL)
|
|
81
|
-
│ └── Provider (MySQL / MSSQL / PostgreSQL / SQLite / MongoDB / etc.)
|
|
82
|
-
└── Meadow Endpoints (REST Routes)
|
|
83
|
-
├── Create POST /1.0/Entity
|
|
84
|
-
├── Read GET /1.0/Entity/:ID
|
|
85
|
-
├── Reads GET /1.0/Entities/:Begin/:Cap
|
|
86
|
-
├── Update PUT /1.0/Entity
|
|
87
|
-
├── Delete DELETE /1.0/Entity/:ID
|
|
88
|
-
├── Count GET /1.0/Entities/Count
|
|
89
|
-
├── Schema GET /1.0/Entity/Schema
|
|
90
|
-
└── New GET /1.0/Entity/Schema/New
|
|
91
|
-
```
|
|
75
|
+
<!-- bespoke diagram: edit diagrams/architecture.mmd or .hints.json, then: npx pict-renderer-graph build modules/meadow/retold-data-service -->
|
|
76
|
+

|
|
92
77
|
|
|
93
78
|
## Options
|
|
94
79
|
|
|
@@ -226,13 +211,13 @@ npx docsify-cli serve docs
|
|
|
226
211
|
|
|
227
212
|
## Related Packages
|
|
228
213
|
|
|
229
|
-
- [meadow](https://github.com/
|
|
230
|
-
- [meadow-endpoints](https://github.com/
|
|
231
|
-
- [foxhound](https://github.com/
|
|
232
|
-
- [stricture](https://github.com/
|
|
233
|
-
- [orator](https://github.com/
|
|
234
|
-
- [fable](https://github.com/
|
|
235
|
-
- [retold-harness](https://github.com/
|
|
214
|
+
- [meadow](https://github.com/fable-retold/meadow) -- data access and ORM
|
|
215
|
+
- [meadow-endpoints](https://github.com/fable-retold/meadow-endpoints) -- auto-generated REST endpoints
|
|
216
|
+
- [foxhound](https://github.com/fable-retold/foxhound) -- query DSL for SQL generation
|
|
217
|
+
- [stricture](https://github.com/fable-retold/stricture) -- schema definition DDL compiler
|
|
218
|
+
- [orator](https://github.com/fable-retold/orator) -- API server abstraction
|
|
219
|
+
- [fable](https://github.com/fable-retold/fable) -- application services framework
|
|
220
|
+
- [retold-harness](https://github.com/fable-retold/retold-harness) -- application harness using this service
|
|
236
221
|
|
|
237
222
|
## License
|
|
238
223
|
|
package/build-all.js
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Build every web app in this package.
|
|
4
|
+
*
|
|
5
|
+
* Quackage reads `.quackage.json` from CWD with no `--config` flag, so to
|
|
6
|
+
* build the two apps we swap that file between runs. The original
|
|
7
|
+
* `.quackage.json` is restored even if a build fails.
|
|
8
|
+
*
|
|
9
|
+
* Apps are listed in `_Apps` — add a row for each new web app:
|
|
10
|
+
* { Name: <label>, Config: <relative-path-to-its-quackage-config-file> }
|
|
11
|
+
*
|
|
12
|
+
* The primary config (`.quackage.json`) acts as the default state — the
|
|
13
|
+
* runner restores it from a backup taken at start.
|
|
14
|
+
*/
|
|
15
|
+
'use strict';
|
|
16
|
+
|
|
17
|
+
const libFS = require('fs');
|
|
18
|
+
const libChild = require('child_process');
|
|
19
|
+
|
|
20
|
+
const _PrimaryConfig = '.quackage.json';
|
|
21
|
+
const _Apps =
|
|
22
|
+
[
|
|
23
|
+
{ Name: 'data-cloner', Config: '.quackage.json' },
|
|
24
|
+
{ Name: 'comprehension-loader', Config: '.quackage-comprehension-loader.json' }
|
|
25
|
+
];
|
|
26
|
+
|
|
27
|
+
let tmpBackup = null;
|
|
28
|
+
let tmpExitCode = 0;
|
|
29
|
+
|
|
30
|
+
try
|
|
31
|
+
{
|
|
32
|
+
tmpBackup = libFS.readFileSync(_PrimaryConfig, 'utf8');
|
|
33
|
+
|
|
34
|
+
for (let i = 0; i < _Apps.length; i++)
|
|
35
|
+
{
|
|
36
|
+
let tmpApp = _Apps[i];
|
|
37
|
+
if (tmpApp.Config !== _PrimaryConfig)
|
|
38
|
+
{
|
|
39
|
+
libFS.writeFileSync(_PrimaryConfig, libFS.readFileSync(tmpApp.Config, 'utf8'));
|
|
40
|
+
}
|
|
41
|
+
else
|
|
42
|
+
{
|
|
43
|
+
libFS.writeFileSync(_PrimaryConfig, tmpBackup);
|
|
44
|
+
}
|
|
45
|
+
console.log('\n=== Building ' + tmpApp.Name + ' (config: ' + tmpApp.Config + ') ===\n');
|
|
46
|
+
libChild.execSync('npx quack build', { stdio: 'inherit' });
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
catch (pError)
|
|
50
|
+
{
|
|
51
|
+
console.error('\nbuild-all: build failed — ' + pError.message);
|
|
52
|
+
tmpExitCode = 1;
|
|
53
|
+
}
|
|
54
|
+
finally
|
|
55
|
+
{
|
|
56
|
+
if (tmpBackup !== null)
|
|
57
|
+
{
|
|
58
|
+
libFS.writeFileSync(_PrimaryConfig, tmpBackup);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (tmpExitCode === 0)
|
|
63
|
+
{
|
|
64
|
+
console.log('\nAll bundles built.');
|
|
65
|
+
}
|
|
66
|
+
process.exit(tmpExitCode);
|