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.
Files changed (84) hide show
  1. package/.github/workflows/publish-image.yml +2 -2
  2. package/BUILDING-AND-PUBLISHING.md +6 -6
  3. package/CONTRIBUTING.md +1 -1
  4. package/Dockerfile +1 -1
  5. package/README.md +12 -27
  6. package/build-all.js +66 -0
  7. package/diagrams/architecture.excalidraw +2966 -0
  8. package/diagrams/architecture.mmd +17 -0
  9. package/diagrams/architecture.svg +2 -0
  10. package/docs/README.md +12 -12
  11. package/docs/_brand.json +18 -0
  12. package/docs/_cover.md +1 -1
  13. package/docs/_topbar.md +1 -1
  14. package/docs/_version.json +3 -3
  15. package/docs/api/reference.md +8 -8
  16. package/docs/architecture.md +6 -84
  17. package/docs/diagrams/component-diagram.excalidraw +2807 -0
  18. package/docs/diagrams/component-diagram.mmd +14 -0
  19. package/docs/diagrams/component-diagram.svg +2 -0
  20. package/docs/diagrams/component-stack.excalidraw +1169 -0
  21. package/docs/diagrams/component-stack.mmd +6 -0
  22. package/docs/diagrams/component-stack.svg +2 -0
  23. package/docs/diagrams/hook-execution-order.excalidraw +3230 -0
  24. package/docs/diagrams/hook-execution-order.mmd +19 -0
  25. package/docs/diagrams/hook-execution-order.svg +2 -0
  26. package/docs/diagrams/initialization-flow.excalidraw +1800 -0
  27. package/docs/diagrams/initialization-flow.mmd +22 -0
  28. package/docs/diagrams/initialization-flow.svg +2 -0
  29. package/docs/index.html +6 -7
  30. package/docs/lifecycle-hooks.md +2 -21
  31. package/docs/retold-catalog.json +141 -141
  32. package/docs/retold-keyword-index.json +6818 -1608
  33. package/package.json +130 -96
  34. package/source/services/RetoldDataService-Brand.js +13 -0
  35. package/source/services/comprehension-loader/pict-app/Pict-Application-ComprehensionLoader.js +65 -15
  36. package/source/services/comprehension-loader/pict-app/views/PictView-ComprehensionLoader-Layout.js +28 -74
  37. package/source/services/comprehension-loader/pict-app/views/PictView-ComprehensionLoader-Load.js +17 -17
  38. package/source/services/comprehension-loader/pict-app/views/PictView-ComprehensionLoader-SettingsPanel.js +62 -0
  39. package/source/services/comprehension-loader/pict-app/views/PictView-ComprehensionLoader-Shell.js +142 -0
  40. package/source/services/comprehension-loader/pict-app/views/PictView-ComprehensionLoader-StatusBar.js +125 -0
  41. package/source/services/comprehension-loader/pict-app/views/PictView-ComprehensionLoader-StatusDetail.js +89 -0
  42. package/source/services/comprehension-loader/pict-app/views/PictView-ComprehensionLoader-TopBar-Nav.js +42 -0
  43. package/source/services/comprehension-loader/pict-app/views/PictView-ComprehensionLoader-TopBar-User.js +48 -0
  44. package/source/services/comprehension-loader/web/comprehension-loader.js +5517 -6183
  45. package/source/services/comprehension-loader/web/comprehension-loader.js.map +1 -1
  46. package/source/services/comprehension-loader/web/comprehension-loader.min.js +75 -1
  47. package/source/services/comprehension-loader/web/comprehension-loader.min.js.map +1 -1
  48. package/source/services/comprehension-loader/web/favicons/favicon-dark.svg +13 -0
  49. package/source/services/comprehension-loader/web/favicons/favicon-light.svg +13 -0
  50. package/source/services/comprehension-loader/web/favicons/favicon.svg +13 -0
  51. package/source/services/comprehension-loader/web/index.html +3 -0
  52. package/source/services/comprehension-loader/web/pict.min.js +12 -0
  53. package/source/services/data-cloner/DataCloner-Command-Headless.js +102 -4
  54. package/source/services/data-cloner/DataCloner-Command-Schema.js +105 -8
  55. package/source/services/data-cloner/DataCloner-Command-Sync.js +111 -75
  56. package/source/services/data-cloner/pict-app/Pict-Application-DataCloner.js +70 -47
  57. package/source/services/data-cloner/pict-app/views/PictView-DataCloner-Export.js +3 -3
  58. package/source/services/data-cloner/pict-app/views/PictView-DataCloner-Layout.js +40 -86
  59. package/source/services/data-cloner/pict-app/views/PictView-DataCloner-SettingsPanel.js +61 -0
  60. package/source/services/data-cloner/pict-app/views/PictView-DataCloner-Shell.js +136 -0
  61. package/source/services/data-cloner/pict-app/views/PictView-DataCloner-StatusBar.js +117 -0
  62. package/source/services/data-cloner/pict-app/views/PictView-DataCloner-StatusDetail.js +81 -0
  63. package/source/services/data-cloner/pict-app/views/PictView-DataCloner-Sync.js +18 -18
  64. package/source/services/data-cloner/pict-app/views/PictView-DataCloner-TopBar-Nav.js +42 -0
  65. package/source/services/data-cloner/pict-app/views/PictView-DataCloner-TopBar-User.js +48 -0
  66. package/source/services/data-cloner/pict-app/views/PictView-DataCloner-ViewData.js +2 -2
  67. package/source/services/data-cloner/web/data-cloner.js +5874 -7986
  68. package/source/services/data-cloner/web/data-cloner.js.map +1 -1
  69. package/source/services/data-cloner/web/data-cloner.min.js +75 -1
  70. package/source/services/data-cloner/web/data-cloner.min.js.map +1 -1
  71. package/source/services/data-cloner/web/favicons/favicon-dark.svg +13 -0
  72. package/source/services/data-cloner/web/favicons/favicon-light.svg +13 -0
  73. package/source/services/data-cloner/web/favicons/favicon.svg +13 -0
  74. package/source/services/data-cloner/web/favicons/favicons/favicon-dark.svg +13 -0
  75. package/source/services/data-cloner/web/favicons/favicons/favicon-light.svg +13 -0
  76. package/source/services/data-cloner/web/favicons/favicons/favicon.svg +13 -0
  77. package/source/services/data-cloner/web/index.html +3 -0
  78. package/source/services/data-cloner/web/pict.min.js +12 -0
  79. package/test/Bundles_smoke_tests.js +43 -0
  80. package/test/ComprehensionLoader_smoke_tests.js +95 -0
  81. package/test/DataCloner-RuntimeOverrides_tests.js +344 -0
  82. package/test/DataCloner_smoke_tests.js +87 -0
  83. package/tools/smoke-converge-endpoint.js +190 -0
  84. 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/stevenvelozo/retold-data-service:<version>
6
- # ghcr.io/stevenvelozo/retold-data-service:latest (only on stable tags)
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:stevenvelozo/retold-data-service.git` (or the
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/stevenvelozo/retold-data-service:<version>
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/stevenvelozo/retold-data-service/actions`
122
- 3. **Image**: `docker pull ghcr.io/stevenvelozo/retold-data-service:latest`
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/stevenvelozo/retold-data-service:latest
134
- docker run --rm ghcr.io/stevenvelozo/retold-data-service:latest
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/stevenvelozo/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.
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
@@ -1,4 +1,4 @@
1
- FROM node:20-bookworm AS base
1
+ FROM node:22-bookworm AS base
2
2
  MAINTAINER steven velozo <steven@velozo.com>
3
3
 
4
4
  RUN apt-get update && apt-get -y --force-yes install curl vim nano less \
package/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # Retold Data Service
2
2
 
3
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
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
- Fable (Core)
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
+ ![Architecture](diagrams/architecture.svg)
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/stevenvelozo/meadow) -- data access and ORM
230
- - [meadow-endpoints](https://github.com/stevenvelozo/meadow-endpoints) -- auto-generated REST endpoints
231
- - [foxhound](https://github.com/stevenvelozo/foxhound) -- query DSL for SQL generation
232
- - [stricture](https://github.com/stevenvelozo/stricture) -- schema definition DDL compiler
233
- - [orator](https://github.com/stevenvelozo/orator) -- API server abstraction
234
- - [fable](https://github.com/stevenvelozo/fable) -- application services framework
235
- - [retold-harness](https://github.com/stevenvelozo/retold-harness) -- application harness using this service
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);