retold-data-service 2.1.2 → 2.1.5

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 (80) hide show
  1. package/BUILDING-AND-PUBLISHING.md +2 -2
  2. package/Dockerfile +1 -1
  3. package/README.md +12 -27
  4. package/build-all.js +66 -0
  5. package/diagrams/architecture.excalidraw +2966 -0
  6. package/diagrams/architecture.mmd +17 -0
  7. package/diagrams/architecture.svg +2 -0
  8. package/docs/README.md +12 -12
  9. package/docs/_brand.json +18 -0
  10. package/docs/_cover.md +1 -1
  11. package/docs/_topbar.md +1 -1
  12. package/docs/_version.json +3 -3
  13. package/docs/api/reference.md +8 -8
  14. package/docs/architecture.md +6 -84
  15. package/docs/diagrams/component-diagram.excalidraw +2807 -0
  16. package/docs/diagrams/component-diagram.mmd +14 -0
  17. package/docs/diagrams/component-diagram.svg +2 -0
  18. package/docs/diagrams/component-stack.excalidraw +1169 -0
  19. package/docs/diagrams/component-stack.mmd +6 -0
  20. package/docs/diagrams/component-stack.svg +2 -0
  21. package/docs/diagrams/hook-execution-order.excalidraw +3230 -0
  22. package/docs/diagrams/hook-execution-order.mmd +19 -0
  23. package/docs/diagrams/hook-execution-order.svg +2 -0
  24. package/docs/diagrams/initialization-flow.excalidraw +1800 -0
  25. package/docs/diagrams/initialization-flow.mmd +22 -0
  26. package/docs/diagrams/initialization-flow.svg +2 -0
  27. package/docs/index.html +6 -7
  28. package/docs/lifecycle-hooks.md +2 -21
  29. package/docs/retold-catalog.json +141 -141
  30. package/docs/retold-keyword-index.json +6818 -1608
  31. package/package.json +130 -96
  32. package/source/services/RetoldDataService-Brand.js +13 -0
  33. package/source/services/comprehension-loader/pict-app/Pict-Application-ComprehensionLoader.js +65 -15
  34. package/source/services/comprehension-loader/pict-app/views/PictView-ComprehensionLoader-Layout.js +28 -74
  35. package/source/services/comprehension-loader/pict-app/views/PictView-ComprehensionLoader-Load.js +17 -17
  36. package/source/services/comprehension-loader/pict-app/views/PictView-ComprehensionLoader-SettingsPanel.js +62 -0
  37. package/source/services/comprehension-loader/pict-app/views/PictView-ComprehensionLoader-Shell.js +142 -0
  38. package/source/services/comprehension-loader/pict-app/views/PictView-ComprehensionLoader-StatusBar.js +125 -0
  39. package/source/services/comprehension-loader/pict-app/views/PictView-ComprehensionLoader-StatusDetail.js +89 -0
  40. package/source/services/comprehension-loader/pict-app/views/PictView-ComprehensionLoader-TopBar-Nav.js +42 -0
  41. package/source/services/comprehension-loader/pict-app/views/PictView-ComprehensionLoader-TopBar-User.js +48 -0
  42. package/source/services/comprehension-loader/web/comprehension-loader.js +5415 -6183
  43. package/source/services/comprehension-loader/web/comprehension-loader.js.map +1 -1
  44. package/source/services/comprehension-loader/web/comprehension-loader.min.js +75 -1
  45. package/source/services/comprehension-loader/web/comprehension-loader.min.js.map +1 -1
  46. package/source/services/comprehension-loader/web/favicons/favicon-dark.svg +13 -0
  47. package/source/services/comprehension-loader/web/favicons/favicon-light.svg +13 -0
  48. package/source/services/comprehension-loader/web/favicons/favicon.svg +13 -0
  49. package/source/services/comprehension-loader/web/index.html +3 -0
  50. package/source/services/comprehension-loader/web/pict.min.js +12 -0
  51. package/source/services/data-cloner/DataCloner-Command-Headless.js +2 -1
  52. package/source/services/data-cloner/DataCloner-Command-Sync.js +110 -75
  53. package/source/services/data-cloner/pict-app/Pict-Application-DataCloner.js +70 -47
  54. package/source/services/data-cloner/pict-app/views/PictView-DataCloner-Export.js +3 -3
  55. package/source/services/data-cloner/pict-app/views/PictView-DataCloner-Layout.js +40 -86
  56. package/source/services/data-cloner/pict-app/views/PictView-DataCloner-SettingsPanel.js +61 -0
  57. package/source/services/data-cloner/pict-app/views/PictView-DataCloner-Shell.js +136 -0
  58. package/source/services/data-cloner/pict-app/views/PictView-DataCloner-StatusBar.js +117 -0
  59. package/source/services/data-cloner/pict-app/views/PictView-DataCloner-StatusDetail.js +81 -0
  60. package/source/services/data-cloner/pict-app/views/PictView-DataCloner-Sync.js +18 -18
  61. package/source/services/data-cloner/pict-app/views/PictView-DataCloner-TopBar-Nav.js +42 -0
  62. package/source/services/data-cloner/pict-app/views/PictView-DataCloner-TopBar-User.js +48 -0
  63. package/source/services/data-cloner/pict-app/views/PictView-DataCloner-ViewData.js +2 -2
  64. package/source/services/data-cloner/web/data-cloner.js +5772 -7986
  65. package/source/services/data-cloner/web/data-cloner.js.map +1 -1
  66. package/source/services/data-cloner/web/data-cloner.min.js +75 -1
  67. package/source/services/data-cloner/web/data-cloner.min.js.map +1 -1
  68. package/source/services/data-cloner/web/favicons/favicon-dark.svg +13 -0
  69. package/source/services/data-cloner/web/favicons/favicon-light.svg +13 -0
  70. package/source/services/data-cloner/web/favicons/favicon.svg +13 -0
  71. package/source/services/data-cloner/web/favicons/favicons/favicon-dark.svg +13 -0
  72. package/source/services/data-cloner/web/favicons/favicons/favicon-light.svg +13 -0
  73. package/source/services/data-cloner/web/favicons/favicons/favicon.svg +13 -0
  74. package/source/services/data-cloner/web/index.html +3 -0
  75. package/source/services/data-cloner/web/pict.min.js +12 -0
  76. package/test/Bundles_smoke_tests.js +43 -0
  77. package/test/ComprehensionLoader_smoke_tests.js +95 -0
  78. package/test/DataCloner-RuntimeOverrides_tests.js +344 -0
  79. package/test/DataCloner_smoke_tests.js +87 -0
  80. package/docs/css/docuserve.css +0 -327
@@ -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.
@@ -118,7 +118,7 @@ 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`
121
+ 2. **Workflow**: `https://github.com/fable-retold/retold-data-service/actions`
122
122
  3. **Image**: `docker pull ghcr.io/stevenvelozo/retold-data-service:latest`
123
123
 
124
124
  If the first `docker pull` returns `denied`, the package is private by
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);