retold 4.0.1 → 4.0.2

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 (75) hide show
  1. package/.claude/settings.local.json +27 -1
  2. package/docs/README.md +7 -6
  3. package/docs/_sidebar.md +34 -21
  4. package/docs/_topbar.md +2 -2
  5. package/docs/architecture/module-architecture.md +234 -0
  6. package/docs/{modules.md → architecture/modules.md} +25 -22
  7. package/docs/cover.md +2 -2
  8. package/docs/css/docuserve.css +6 -6
  9. package/docs/examples/examples.md +71 -0
  10. package/docs/examples/todolist/todo-list-cli-client.md +178 -0
  11. package/docs/examples/todolist/todo-list-console-client.md +152 -0
  12. package/docs/examples/todolist/todo-list-model.md +114 -0
  13. package/docs/examples/todolist/todo-list-server.md +128 -0
  14. package/docs/examples/todolist/todo-list-web-client.md +177 -0
  15. package/docs/examples/todolist/todo-list.md +162 -0
  16. package/docs/getting-started.md +8 -7
  17. package/docs/index.html +4 -4
  18. package/docs/{meadow.md → modules/meadow.md} +4 -6
  19. package/docs/{orator.md → modules/orator.md} +1 -0
  20. package/docs/{pict.md → modules/pict.md} +30 -8
  21. package/docs/{utility.md → modules/utility.md} +0 -9
  22. package/docs/retold-catalog.json +896 -2317
  23. package/docs/retold-keyword-index.json +162327 -120227
  24. package/examples/todo-list/Dockerfile +45 -0
  25. package/examples/todo-list/README.md +394 -0
  26. package/examples/todo-list/cli-client/package-lock.json +418 -0
  27. package/examples/todo-list/cli-client/package.json +19 -0
  28. package/examples/todo-list/cli-client/source/TodoCLI-CLIProgram.js +30 -0
  29. package/examples/todo-list/cli-client/source/TodoCLI-Run.js +3 -0
  30. package/examples/todo-list/cli-client/source/commands/add/TodoCLI-Command-Add.js +74 -0
  31. package/examples/todo-list/cli-client/source/commands/complete/TodoCLI-Command-Complete.js +84 -0
  32. package/examples/todo-list/cli-client/source/commands/list/TodoCLI-Command-List.js +110 -0
  33. package/examples/todo-list/cli-client/source/commands/remove/TodoCLI-Command-Remove.js +49 -0
  34. package/examples/todo-list/cli-client/source/services/TodoCLI-Service-API.js +92 -0
  35. package/examples/todo-list/console-client/console-client.cjs +913 -0
  36. package/examples/todo-list/console-client/package-lock.json +426 -0
  37. package/examples/todo-list/console-client/package.json +19 -0
  38. package/examples/todo-list/console-client/views/PictView-TUI-Header.cjs +43 -0
  39. package/examples/todo-list/console-client/views/PictView-TUI-Layout.cjs +58 -0
  40. package/examples/todo-list/console-client/views/PictView-TUI-StatusBar.cjs +41 -0
  41. package/examples/todo-list/console-client/views/PictView-TUI-TaskList.cjs +104 -0
  42. package/examples/todo-list/docker-motd.sh +36 -0
  43. package/examples/todo-list/docker-run.sh +2 -0
  44. package/examples/todo-list/docker-shell.sh +2 -0
  45. package/examples/todo-list/model/MeadowSchema-Task.json +152 -0
  46. package/examples/todo-list/model/Task-Compiled.json +25 -0
  47. package/examples/todo-list/model/Task.mddl +15 -0
  48. package/examples/todo-list/model/data/seeded_todo_events.csv +1001 -0
  49. package/examples/todo-list/server/database-initialization-service.cjs +273 -0
  50. package/examples/todo-list/server/package-lock.json +6113 -0
  51. package/examples/todo-list/server/package.json +19 -0
  52. package/examples/todo-list/server/server.cjs +138 -0
  53. package/examples/todo-list/web-client/css/todolist-theme.css +235 -0
  54. package/examples/todo-list/web-client/generate-build-config.cjs +18 -0
  55. package/examples/todo-list/web-client/html/index.html +18 -0
  56. package/examples/todo-list/web-client/package-lock.json +12030 -0
  57. package/examples/todo-list/web-client/package.json +43 -0
  58. package/examples/todo-list/web-client/source/TodoList-Application-Config.json +12 -0
  59. package/examples/todo-list/web-client/source/TodoList-Application.cjs +383 -0
  60. package/examples/todo-list/web-client/source/providers/Provider-TaskData.cjs +243 -0
  61. package/examples/todo-list/web-client/source/providers/Router-Config.json +32 -0
  62. package/examples/todo-list/web-client/source/views/View-Layout.cjs +75 -0
  63. package/examples/todo-list/web-client/source/views/View-TaskForm.cjs +87 -0
  64. package/examples/todo-list/web-client/source/views/View-TaskList.cjs +127 -0
  65. package/examples/todo-list/web-client/source/views/calendar/View-MonthView.cjs +293 -0
  66. package/examples/todo-list/web-client/source/views/calendar/View-WeekView.cjs +149 -0
  67. package/examples/todo-list/web-client/source/views/calendar/View-YearView.cjs +226 -0
  68. package/modules/Include-Retold-Module-List.sh +2 -2
  69. package/package.json +5 -5
  70. package/docs/js/pict.min.js +0 -12
  71. package/docs/js/pict.min.js.map +0 -1
  72. package/docs/pict-docuserve.min.js +0 -58
  73. package/docs/pict-docuserve.min.js.map +0 -1
  74. /package/docs/{architecture.md → architecture/architecture.md} +0 -0
  75. /package/docs/{fable.md → modules/fable.md} +0 -0
@@ -0,0 +1,418 @@
1
+ {
2
+ "name": "retold-example-todo-cli",
3
+ "version": "1.0.0",
4
+ "lockfileVersion": 3,
5
+ "requires": true,
6
+ "packages": {
7
+ "": {
8
+ "name": "retold-example-todo-cli",
9
+ "version": "1.0.0",
10
+ "dependencies": {
11
+ "pict-service-commandlineutility": "^1.0.18"
12
+ },
13
+ "bin": {
14
+ "todo": "source/TodoCLI-Run.js"
15
+ }
16
+ },
17
+ "node_modules/async.eachlimit": {
18
+ "version": "0.5.2",
19
+ "resolved": "https://registry.npmjs.org/async.eachlimit/-/async.eachlimit-0.5.2.tgz",
20
+ "integrity": "sha512-emWKSFjCbXnrCJfM2NBMyriJQrdem+LrchiMQtCavBQnJ80N2C7IBhUz8vXnjYYh+aAkY0zZSofNxVYJMTDMIw==",
21
+ "license": "MIT",
22
+ "dependencies": {
23
+ "async.util.eachoflimit": "0.5.2",
24
+ "async.util.withoutindex": "0.5.2"
25
+ }
26
+ },
27
+ "node_modules/async.iterator": {
28
+ "version": "0.5.2",
29
+ "resolved": "https://registry.npmjs.org/async.iterator/-/async.iterator-0.5.2.tgz",
30
+ "integrity": "sha512-Ryg+D9tPYvcHbI3HknGfd6cgQaevwv/9lBpa3KbFrNWDcpsvc4BbpQLGpvaLNCJXM0Uzty/GDKuI2XktiIe0Ng==",
31
+ "license": "MIT"
32
+ },
33
+ "node_modules/async.util.eachoflimit": {
34
+ "version": "0.5.2",
35
+ "resolved": "https://registry.npmjs.org/async.util.eachoflimit/-/async.util.eachoflimit-0.5.2.tgz",
36
+ "integrity": "sha512-oZksH0sBW0AEOJKgBCQ79io9DZruoRBLTAea/Ik36pejR7pDpByvtXeuJsoZdPwSVslsrQcsUfucbUaiXYBnAQ==",
37
+ "license": "MIT",
38
+ "dependencies": {
39
+ "async.util.keyiterator": "0.5.2",
40
+ "async.util.noop": "0.5.2",
41
+ "async.util.once": "0.5.2",
42
+ "async.util.onlyonce": "0.5.2"
43
+ }
44
+ },
45
+ "node_modules/async.util.ensureasync": {
46
+ "version": "0.5.2",
47
+ "resolved": "https://registry.npmjs.org/async.util.ensureasync/-/async.util.ensureasync-0.5.2.tgz",
48
+ "integrity": "sha512-sQufNz4JYLHO/7ZUklaTGJtiX36gCp28McNNcMZfVYPm/wqi1pKk4xRCPr2DOZDM6KfA54zjG36jQjBU2mLzXg==",
49
+ "license": "MIT",
50
+ "dependencies": {
51
+ "async.util.restparam": "0.5.2",
52
+ "async.util.setimmediate": "0.5.2"
53
+ }
54
+ },
55
+ "node_modules/async.util.isarray": {
56
+ "version": "0.5.2",
57
+ "resolved": "https://registry.npmjs.org/async.util.isarray/-/async.util.isarray-0.5.2.tgz",
58
+ "integrity": "sha512-wbUzlrwON8RUgi+v/rhF0U99Ce8Osjcn+JP/mFNg6ymvShcobAOvE6cvLajSY5dPqKCOE1xfdhefgBif11zZgw==",
59
+ "license": "MIT"
60
+ },
61
+ "node_modules/async.util.isarraylike": {
62
+ "version": "0.5.2",
63
+ "resolved": "https://registry.npmjs.org/async.util.isarraylike/-/async.util.isarraylike-0.5.2.tgz",
64
+ "integrity": "sha512-DbFpsz3ZFNkohAW8IpGTlm8gotU32zpqe3Y2XkEA/G3XNO6rmUTKPpo7XgXUruoI+AsGi8+0zWpJHe7t1sLiAg==",
65
+ "license": "MIT",
66
+ "dependencies": {
67
+ "async.util.isarray": "0.5.2"
68
+ }
69
+ },
70
+ "node_modules/async.util.keyiterator": {
71
+ "version": "0.5.2",
72
+ "resolved": "https://registry.npmjs.org/async.util.keyiterator/-/async.util.keyiterator-0.5.2.tgz",
73
+ "integrity": "sha512-cktrETawCwgu13y3KZs2uMGFnNHc+IjKPZsavtRaoCjLELkePb2co4zrr+ghPvEqLXZIJPTKqC2HFZgJTssMVw==",
74
+ "license": "MIT",
75
+ "dependencies": {
76
+ "async.util.isarraylike": "0.5.2",
77
+ "async.util.keys": "0.5.2"
78
+ }
79
+ },
80
+ "node_modules/async.util.keys": {
81
+ "version": "0.5.2",
82
+ "resolved": "https://registry.npmjs.org/async.util.keys/-/async.util.keys-0.5.2.tgz",
83
+ "integrity": "sha512-umCOCRCRYwIC2Ho3fbuhKwIIe7OhQsVoVKGoF5GoQiGJUmjP4TG0Bmmcdpm7yW/znoIGKpnjKzVQz0niH4tfqw==",
84
+ "license": "MIT"
85
+ },
86
+ "node_modules/async.util.noop": {
87
+ "version": "0.5.2",
88
+ "resolved": "https://registry.npmjs.org/async.util.noop/-/async.util.noop-0.5.2.tgz",
89
+ "integrity": "sha512-AdwShXwE0KoskgqVJAck8zcM32nIHj3AC8ZN62ZaR5srhrY235Nw18vOJZWxcOfhxdVM0hRVKM8kMx7lcl7cCQ==",
90
+ "license": "MIT"
91
+ },
92
+ "node_modules/async.util.once": {
93
+ "version": "0.5.2",
94
+ "resolved": "https://registry.npmjs.org/async.util.once/-/async.util.once-0.5.2.tgz",
95
+ "integrity": "sha512-YQ5WPzDTt2jlblUDkq2I5RV/KiAJErJ4/0cEFhYPaZzqIuF/xDzdGvnEKe7UeuoMszsVPeajzcpKgkbwdb9MUA==",
96
+ "license": "MIT"
97
+ },
98
+ "node_modules/async.util.onlyonce": {
99
+ "version": "0.5.2",
100
+ "resolved": "https://registry.npmjs.org/async.util.onlyonce/-/async.util.onlyonce-0.5.2.tgz",
101
+ "integrity": "sha512-UgQvkU9JZ+I0Cm1f56XyGXcII+J3d/5XWUuHpcevlItuA3WFSJcqZrsyAUck2FkRSD8BwYQX1zUTDp3SJMVESg==",
102
+ "license": "MIT"
103
+ },
104
+ "node_modules/async.util.restparam": {
105
+ "version": "0.5.2",
106
+ "resolved": "https://registry.npmjs.org/async.util.restparam/-/async.util.restparam-0.5.2.tgz",
107
+ "integrity": "sha512-Q9Z+zgmtMxFX5i7CnBvNOkgrL5hptztCqwarQluyNudUUk4iCmyjmsQl8MuQEjNh3gGqP5ayvDaextL1VXXgIg==",
108
+ "license": "MIT"
109
+ },
110
+ "node_modules/async.util.setimmediate": {
111
+ "version": "0.5.2",
112
+ "resolved": "https://registry.npmjs.org/async.util.setimmediate/-/async.util.setimmediate-0.5.2.tgz",
113
+ "integrity": "sha512-aCYF85ZFCQ9Xn0106GcOVx+LvFguIIzfbfRTOlQoie3G4KeSjURfA6f7CfpFAF09FNP2A1MtdjeFdvYeTGDebw==",
114
+ "license": "MIT"
115
+ },
116
+ "node_modules/async.util.withoutindex": {
117
+ "version": "0.5.2",
118
+ "resolved": "https://registry.npmjs.org/async.util.withoutindex/-/async.util.withoutindex-0.5.2.tgz",
119
+ "integrity": "sha512-CTHbQc+1kHkK6izoXIVIiYjePgmAzvXecETn/eVuzhwL9BDC3oFLNiIrr57fKwyarZyy8PedVIpQNrqgA9KzNA==",
120
+ "license": "MIT"
121
+ },
122
+ "node_modules/async.waterfall": {
123
+ "version": "0.5.2",
124
+ "resolved": "https://registry.npmjs.org/async.waterfall/-/async.waterfall-0.5.2.tgz",
125
+ "integrity": "sha512-3eC5jwgBF0/CNTAwBQYCMybqd6ResDwsdyl3+i5qf1L7fYekVR5gbMzpBca7VoZj1W0BFsHcvjW3UeJstEt2kQ==",
126
+ "license": "MIT",
127
+ "dependencies": {
128
+ "async.iterator": "0.5.2",
129
+ "async.util.ensureasync": "0.5.2",
130
+ "async.util.isarray": "0.5.2",
131
+ "async.util.noop": "0.5.2",
132
+ "async.util.once": "0.5.2",
133
+ "async.util.restparam": "0.5.2"
134
+ }
135
+ },
136
+ "node_modules/big.js": {
137
+ "version": "7.0.1",
138
+ "resolved": "https://registry.npmjs.org/big.js/-/big.js-7.0.1.tgz",
139
+ "integrity": "sha512-iFgV784tD8kq4ccF1xtNMZnXeZzVuXWWM+ERFzKQjv+A5G9HC8CY3DuV45vgzFFcW+u2tIvmF95+AzWgs6BjCg==",
140
+ "license": "MIT",
141
+ "engines": {
142
+ "node": "*"
143
+ },
144
+ "funding": {
145
+ "type": "opencollective",
146
+ "url": "https://opencollective.com/bigjs"
147
+ }
148
+ },
149
+ "node_modules/cachetrax": {
150
+ "version": "1.0.4",
151
+ "resolved": "https://registry.npmjs.org/cachetrax/-/cachetrax-1.0.4.tgz",
152
+ "integrity": "sha512-VoqtXp+tEdcbmiR0eJcdERsaBKhmdeVjpZ2jeVadDq25iM7hvZAFu+BCKMHitWzpkgb/Dw4RAouQBGnXbADPBg==",
153
+ "license": "MIT",
154
+ "dependencies": {
155
+ "fable-serviceproviderbase": "^3.0.7"
156
+ }
157
+ },
158
+ "node_modules/commander": {
159
+ "version": "14.0.3",
160
+ "resolved": "https://registry.npmjs.org/commander/-/commander-14.0.3.tgz",
161
+ "integrity": "sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw==",
162
+ "license": "MIT",
163
+ "engines": {
164
+ "node": ">=20"
165
+ }
166
+ },
167
+ "node_modules/cookie": {
168
+ "version": "1.1.1",
169
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.1.1.tgz",
170
+ "integrity": "sha512-ei8Aos7ja0weRpFzJnEA9UHJ/7XQmqglbRwnf2ATjcB9Wq874VKH9kfjjirM6UhU2/E5fFYadylyhFldcqSidQ==",
171
+ "license": "MIT",
172
+ "engines": {
173
+ "node": ">=18"
174
+ },
175
+ "funding": {
176
+ "type": "opencollective",
177
+ "url": "https://opencollective.com/express"
178
+ }
179
+ },
180
+ "node_modules/data-arithmatic": {
181
+ "version": "1.0.7",
182
+ "resolved": "https://registry.npmjs.org/data-arithmatic/-/data-arithmatic-1.0.7.tgz",
183
+ "integrity": "sha512-Z1SBuORrjrlCx9AAx2Cy4yBYrsqtKEz7BzdcLWLMT/t78q3N5/4qjA+63zeMYUAvp9EsIKfQ8X0++Ls9xwaLag==",
184
+ "license": "MIT",
185
+ "dependencies": {
186
+ "fable-serviceproviderbase": "^3.0.2"
187
+ }
188
+ },
189
+ "node_modules/dayjs": {
190
+ "version": "1.11.19",
191
+ "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.19.tgz",
192
+ "integrity": "sha512-t5EcLVS6QPBNqM2z8fakk/NKel+Xzshgt8FFKAn+qwlD1pzZWxh0nVCrvFK7ZDb6XucZeF9z8C7CBWTRIVApAw==",
193
+ "license": "MIT"
194
+ },
195
+ "node_modules/decompress-response": {
196
+ "version": "6.0.0",
197
+ "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz",
198
+ "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==",
199
+ "license": "MIT",
200
+ "dependencies": {
201
+ "mimic-response": "^3.1.0"
202
+ },
203
+ "engines": {
204
+ "node": ">=10"
205
+ },
206
+ "funding": {
207
+ "url": "https://github.com/sponsors/sindresorhus"
208
+ }
209
+ },
210
+ "node_modules/fable": {
211
+ "version": "3.1.53",
212
+ "resolved": "https://registry.npmjs.org/fable/-/fable-3.1.53.tgz",
213
+ "integrity": "sha512-2b7sWs1K3Bl9V8biZ5VSy36YvojanAAKvOZM7hGMg+opLLt/Pk/lIEvucz4m16Vz+C3UDLWf7WKJqdBoEj8A1w==",
214
+ "license": "MIT",
215
+ "dependencies": {
216
+ "async.eachlimit": "^0.5.2",
217
+ "async.waterfall": "^0.5.2",
218
+ "big.js": "^7.0.1",
219
+ "cachetrax": "^1.0.4",
220
+ "cookie": "^1.0.2",
221
+ "data-arithmatic": "^1.0.7",
222
+ "dayjs": "^1.11.19",
223
+ "fable-log": "^3.0.16",
224
+ "fable-serviceproviderbase": "^3.0.16",
225
+ "fable-settings": "^3.0.12",
226
+ "fable-uuid": "^3.0.11",
227
+ "manyfest": "^1.0.43",
228
+ "simple-get": "^4.0.1"
229
+ }
230
+ },
231
+ "node_modules/fable-log": {
232
+ "version": "3.0.16",
233
+ "resolved": "https://registry.npmjs.org/fable-log/-/fable-log-3.0.16.tgz",
234
+ "integrity": "sha512-o9/eIdak/iDy8Cc+Q8NeYUf7AwqYZvr3EaeeGmVd6X7+Ao/c1y5u9x5I54WZmwcYcySukmf2BEiQvS/itoliVw==",
235
+ "license": "MIT",
236
+ "dependencies": {
237
+ "fable-serviceproviderbase": "^3.0.15"
238
+ }
239
+ },
240
+ "node_modules/fable-serviceproviderbase": {
241
+ "version": "3.0.17",
242
+ "resolved": "https://registry.npmjs.org/fable-serviceproviderbase/-/fable-serviceproviderbase-3.0.17.tgz",
243
+ "integrity": "sha512-jT2OqeFQMbGFG3NLMoyBeGpIZ3M+wze3muqrXwndzuX11G4Ou/Mojlv3z06OZQG/VWp4tFjwqqRYbSLWE7KhUw==",
244
+ "license": "MIT"
245
+ },
246
+ "node_modules/fable-settings": {
247
+ "version": "3.0.14",
248
+ "resolved": "https://registry.npmjs.org/fable-settings/-/fable-settings-3.0.14.tgz",
249
+ "integrity": "sha512-hCdu7pkqko4h68MZbrau4/TljWfgJD1kstm3uyJT46vjzx/HRNSwJlggFDHld6pBCf00+wks26VdGolDEfdWvg==",
250
+ "license": "MIT",
251
+ "dependencies": {
252
+ "fable-serviceproviderbase": "^3.0.17",
253
+ "precedent": "^1.0.15"
254
+ }
255
+ },
256
+ "node_modules/fable-uuid": {
257
+ "version": "3.0.11",
258
+ "resolved": "https://registry.npmjs.org/fable-uuid/-/fable-uuid-3.0.11.tgz",
259
+ "integrity": "sha512-ZNFmcc2HI16J6rqiLfkShzzNgeHjbInM0Ur70tAgXlQm/jWqIpU3OFAyTesrz4dVQ5+wCxjp7PQadF7YJ0hNIw==",
260
+ "license": "MIT",
261
+ "dependencies": {
262
+ "fable-serviceproviderbase": "^3.0.15"
263
+ }
264
+ },
265
+ "node_modules/manyfest": {
266
+ "version": "1.0.44",
267
+ "resolved": "https://registry.npmjs.org/manyfest/-/manyfest-1.0.44.tgz",
268
+ "integrity": "sha512-8sI1zQ5lysMW879Lb5VtksmpOy4M2vZIl2IjIzMo5lOWu1MmLZGX/MQxdBu0Klnf4fJwscainclMYs9/P3JXUQ==",
269
+ "license": "MIT",
270
+ "dependencies": {
271
+ "fable-serviceproviderbase": "^3.0.15"
272
+ }
273
+ },
274
+ "node_modules/mimic-response": {
275
+ "version": "3.1.0",
276
+ "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz",
277
+ "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==",
278
+ "license": "MIT",
279
+ "engines": {
280
+ "node": ">=10"
281
+ },
282
+ "funding": {
283
+ "url": "https://github.com/sponsors/sindresorhus"
284
+ }
285
+ },
286
+ "node_modules/once": {
287
+ "version": "1.4.0",
288
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
289
+ "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
290
+ "license": "ISC",
291
+ "dependencies": {
292
+ "wrappy": "1"
293
+ }
294
+ },
295
+ "node_modules/pict": {
296
+ "version": "1.0.345",
297
+ "resolved": "https://registry.npmjs.org/pict/-/pict-1.0.345.tgz",
298
+ "integrity": "sha512-Z2LJ/upbsDRgDCXlGyLrhII4WAX1rrXqTwHwuj35mcOQPyh+PYled7ePlr1Mkg3uhGLvqDKbaIn/7vWONDNrQA==",
299
+ "license": "MIT",
300
+ "dependencies": {
301
+ "cachetrax": "^1.0.4",
302
+ "fable": "^3.1.53",
303
+ "pict-application": "^1.0.30",
304
+ "pict-provider": "^1.0.7",
305
+ "pict-template": "^1.0.13",
306
+ "pict-view": "^1.0.64"
307
+ }
308
+ },
309
+ "node_modules/pict-application": {
310
+ "version": "1.0.30",
311
+ "resolved": "https://registry.npmjs.org/pict-application/-/pict-application-1.0.30.tgz",
312
+ "integrity": "sha512-KkwiI4yB16n5QiZPEOJjdqPBEJ4ymXDFI4fCZMlH24mR0VuptUS2IY5F2/PnXSsyquaC7glEBUP+0pvuMyW/tw==",
313
+ "license": "MIT",
314
+ "dependencies": {
315
+ "fable-serviceproviderbase": "^3.0.15"
316
+ }
317
+ },
318
+ "node_modules/pict-provider": {
319
+ "version": "1.0.9",
320
+ "resolved": "https://registry.npmjs.org/pict-provider/-/pict-provider-1.0.9.tgz",
321
+ "integrity": "sha512-J/RLp4eDVUL/p7p3DmVubZlwUjoSM98N5a9Y+2jPcCaUm//MBLjFrRDrSSg5KRSRyshgW0TetS4dCIbzbRRPAw==",
322
+ "license": "MIT",
323
+ "dependencies": {
324
+ "fable-serviceproviderbase": "^3.0.16"
325
+ }
326
+ },
327
+ "node_modules/pict-service-commandlineutility": {
328
+ "version": "1.0.18",
329
+ "resolved": "https://registry.npmjs.org/pict-service-commandlineutility/-/pict-service-commandlineutility-1.0.18.tgz",
330
+ "integrity": "sha512-siCKr7PMwXmW2BWmxN5lpQH2cdeZAHo8Hv4DkndUzd6sdR6I4FvQEwv5pEmux0M9hzdIJPlEGmaYw9f+OFOBgg==",
331
+ "license": "MIT",
332
+ "dependencies": {
333
+ "commander": "^14.0.2",
334
+ "fable-serviceproviderbase": "^3.0.16",
335
+ "pict": "^1.0.345"
336
+ }
337
+ },
338
+ "node_modules/pict-template": {
339
+ "version": "1.0.13",
340
+ "resolved": "https://registry.npmjs.org/pict-template/-/pict-template-1.0.13.tgz",
341
+ "integrity": "sha512-mebJJac7QGniMhmMeaJpoO9n3KnCd6VLlG93LKpt00X4SMh+XjnzWAcBKsERwpJ6qkgz25gE8DJ7h76/qNrTKQ==",
342
+ "license": "MIT",
343
+ "dependencies": {
344
+ "fable-serviceproviderbase": "^3.0.15"
345
+ }
346
+ },
347
+ "node_modules/pict-view": {
348
+ "version": "1.0.64",
349
+ "resolved": "https://registry.npmjs.org/pict-view/-/pict-view-1.0.64.tgz",
350
+ "integrity": "sha512-Azhw1t1SAsQ/dbd0ZYeheeTIVWwp+bPJb5kg6+KNzYGL4WDu/HwhSvBpUJVAArdfzxuuk3wnuuIrWtF6pDC2xQ==",
351
+ "license": "MIT",
352
+ "dependencies": {
353
+ "fable": "^3.1.46",
354
+ "fable-serviceproviderbase": "^3.0.15"
355
+ }
356
+ },
357
+ "node_modules/precedent": {
358
+ "version": "1.0.15",
359
+ "resolved": "https://registry.npmjs.org/precedent/-/precedent-1.0.15.tgz",
360
+ "integrity": "sha512-tidXY4JvTudvJ/Jmb8OzHFpX6qUSPwmS7K/BChA7xDb7eqmfHjH3AAO+IhCz3k7k+bh31YNdblSIEkYnCIYelw==",
361
+ "license": "MIT",
362
+ "bin": {
363
+ "precedent": "bin/Precedent"
364
+ }
365
+ },
366
+ "node_modules/simple-concat": {
367
+ "version": "1.0.1",
368
+ "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz",
369
+ "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==",
370
+ "funding": [
371
+ {
372
+ "type": "github",
373
+ "url": "https://github.com/sponsors/feross"
374
+ },
375
+ {
376
+ "type": "patreon",
377
+ "url": "https://www.patreon.com/feross"
378
+ },
379
+ {
380
+ "type": "consulting",
381
+ "url": "https://feross.org/support"
382
+ }
383
+ ],
384
+ "license": "MIT"
385
+ },
386
+ "node_modules/simple-get": {
387
+ "version": "4.0.1",
388
+ "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz",
389
+ "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==",
390
+ "funding": [
391
+ {
392
+ "type": "github",
393
+ "url": "https://github.com/sponsors/feross"
394
+ },
395
+ {
396
+ "type": "patreon",
397
+ "url": "https://www.patreon.com/feross"
398
+ },
399
+ {
400
+ "type": "consulting",
401
+ "url": "https://feross.org/support"
402
+ }
403
+ ],
404
+ "license": "MIT",
405
+ "dependencies": {
406
+ "decompress-response": "^6.0.0",
407
+ "once": "^1.3.1",
408
+ "simple-concat": "^1.0.0"
409
+ }
410
+ },
411
+ "node_modules/wrappy": {
412
+ "version": "1.0.2",
413
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
414
+ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
415
+ "license": "ISC"
416
+ }
417
+ }
418
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "retold-example-todo-cli",
3
+ "version": "1.0.0",
4
+ "description": "Retold Example: Todo List CLI (pict-service-commandlineutility)",
5
+ "main": "source/TodoCLI-CLIProgram.js",
6
+ "scripts":
7
+ {
8
+ "start": "node source/TodoCLI-Run.js",
9
+ "test": "echo \"No tests yet.\""
10
+ },
11
+ "bin":
12
+ {
13
+ "todo": "./source/TodoCLI-Run.js"
14
+ },
15
+ "dependencies":
16
+ {
17
+ "pict-service-commandlineutility": "^1.0.18"
18
+ }
19
+ }
@@ -0,0 +1,30 @@
1
+ const libCLIProgram = require('pict-service-commandlineutility');
2
+
3
+ let _Pict = new libCLIProgram(
4
+ {
5
+ Product: 'TodoCLI',
6
+ Version: require('../package.json').version,
7
+
8
+ Command: 'todo',
9
+ Description: 'Manage tasks in the Retold Todo List from the command line.',
10
+
11
+ DefaultProgramConfiguration:
12
+ {
13
+ ApiBaseURL: 'http://localhost:8086'
14
+ },
15
+
16
+ ProgramConfigurationFileName: '.todo-cli.json',
17
+ AutoGatherProgramConfiguration: true,
18
+ AutoAddConfigurationExplanationCommand: true
19
+ },
20
+ [
21
+ require('./commands/list/TodoCLI-Command-List.js'),
22
+ require('./commands/add/TodoCLI-Command-Add.js'),
23
+ require('./commands/remove/TodoCLI-Command-Remove.js'),
24
+ require('./commands/complete/TodoCLI-Command-Complete.js')
25
+ ]);
26
+
27
+ // Register the shared HTTP service for API communication
28
+ _Pict.addAndInstantiateServiceType('TodoAPI', require('./services/TodoCLI-Service-API.js'));
29
+
30
+ module.exports = _Pict;
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ let libTodoCLI = require('./TodoCLI-CLIProgram.js');
3
+ libTodoCLI.run();
@@ -0,0 +1,74 @@
1
+ const libCommandLineCommand = require('pict-service-commandlineutility').ServiceCommandLineCommand;
2
+
3
+ class TodoCLICommandAdd extends libCommandLineCommand
4
+ {
5
+ constructor(pFable, pManifest, pServiceHash)
6
+ {
7
+ super(pFable, pManifest, pServiceHash);
8
+
9
+ this.options.CommandKeyword = 'add';
10
+ this.options.Description = 'Add a new task to the todo list';
11
+
12
+ this.options.Aliases.push('new');
13
+ this.options.Aliases.push('create');
14
+
15
+ this.options.CommandArguments.push({ Name: '<name>', Description: 'The task name' });
16
+
17
+ this.options.CommandOptions.push({ Name: '-D, --description [text]', Description: 'Task description', Default: '' });
18
+ this.options.CommandOptions.push({ Name: '-d, --due [date]', Description: 'Due date (YYYY-MM-DD)', Default: '' });
19
+ this.options.CommandOptions.push({ Name: '-h, --hours [hours]', Description: 'Estimated length in hours', Default: '0' });
20
+ this.options.CommandOptions.push({ Name: '-s, --status [status]', Description: 'Initial status (Pending, In Progress, Complete)', Default: 'Pending' });
21
+
22
+ this.addCommand();
23
+ }
24
+
25
+ onRunAsync(fCallback)
26
+ {
27
+ let tmpAPI = this.services.TodoAPI;
28
+ let tmpName = this.ArgumentString;
29
+
30
+ if (!tmpName)
31
+ {
32
+ this.log.error(`Task name is required. Usage: todo add "My new task"`);
33
+ return fCallback();
34
+ }
35
+
36
+ let tmpTaskData =
37
+ {
38
+ Name: tmpName,
39
+ Description: this.CommandOptions.description || '',
40
+ DueDate: this.CommandOptions.due || '',
41
+ LengthInHours: parseFloat(this.CommandOptions.hours) || 0,
42
+ Status: this.CommandOptions.status || 'Pending'
43
+ };
44
+
45
+ this.log.info(`Creating task: ${tmpName}`);
46
+
47
+ tmpAPI.request('POST', '/1.0/Task', tmpTaskData,
48
+ (pError, pResult) =>
49
+ {
50
+ if (pError)
51
+ {
52
+ this.log.error(`Failed to create task: ${pError.message}`);
53
+ return fCallback();
54
+ }
55
+
56
+ if (pResult && pResult.IDTask)
57
+ {
58
+ this.log.info(`Task created successfully (ID: ${pResult.IDTask})`);
59
+ }
60
+ else if (pResult && pResult.Error)
61
+ {
62
+ this.log.error(`Server error: ${pResult.Error}`);
63
+ }
64
+ else
65
+ {
66
+ this.log.info(`Task created.`);
67
+ }
68
+
69
+ return fCallback();
70
+ });
71
+ }
72
+ }
73
+
74
+ module.exports = TodoCLICommandAdd;
@@ -0,0 +1,84 @@
1
+ const libCommandLineCommand = require('pict-service-commandlineutility').ServiceCommandLineCommand;
2
+
3
+ class TodoCLICommandComplete extends libCommandLineCommand
4
+ {
5
+ constructor(pFable, pManifest, pServiceHash)
6
+ {
7
+ super(pFable, pManifest, pServiceHash);
8
+
9
+ this.options.CommandKeyword = 'complete';
10
+ this.options.Description = 'Mark a task as complete by ID';
11
+
12
+ this.options.Aliases.push('done');
13
+ this.options.Aliases.push('finish');
14
+
15
+ this.options.CommandArguments.push({ Name: '<id>', Description: 'The task ID to mark complete' });
16
+
17
+ this.addCommand();
18
+ }
19
+
20
+ onRunAsync(fCallback)
21
+ {
22
+ let tmpAPI = this.services.TodoAPI;
23
+ let tmpIDTask = parseInt(this.ArgumentString, 10);
24
+
25
+ if (!tmpIDTask || isNaN(tmpIDTask))
26
+ {
27
+ this.log.error(`A valid task ID is required. Usage: todo complete 42`);
28
+ return fCallback();
29
+ }
30
+
31
+ // First, fetch the task so we have its current data
32
+ this.log.info(`Fetching task ${tmpIDTask}...`);
33
+
34
+ tmpAPI.request('GET', '/1.0/Task/' + tmpIDTask, null,
35
+ (pError, pTask) =>
36
+ {
37
+ if (pError)
38
+ {
39
+ this.log.error(`Failed to fetch task: ${pError.message}`);
40
+ return fCallback();
41
+ }
42
+
43
+ if (!pTask || !pTask.IDTask)
44
+ {
45
+ this.log.error(`Task ${tmpIDTask} not found.`);
46
+ return fCallback();
47
+ }
48
+
49
+ if (pTask.Status === 'Complete')
50
+ {
51
+ this.log.info(`Task ${tmpIDTask} (${pTask.Name}) is already complete.`);
52
+ return fCallback();
53
+ }
54
+
55
+ // Update the status to Complete
56
+ let tmpUpdateData =
57
+ {
58
+ IDTask: pTask.IDTask,
59
+ Name: pTask.Name,
60
+ Description: pTask.Description,
61
+ DueDate: pTask.DueDate,
62
+ LengthInHours: pTask.LengthInHours,
63
+ Status: 'Complete'
64
+ };
65
+
66
+ this.log.info(`Marking task "${pTask.Name}" as complete...`);
67
+
68
+ tmpAPI.request('PUT', '/1.0/Task', tmpUpdateData,
69
+ (pUpdateError, pResult) =>
70
+ {
71
+ if (pUpdateError)
72
+ {
73
+ this.log.error(`Failed to update task: ${pUpdateError.message}`);
74
+ return fCallback();
75
+ }
76
+
77
+ this.log.info(`Task ${tmpIDTask} marked as complete.`);
78
+ return fCallback();
79
+ });
80
+ });
81
+ }
82
+ }
83
+
84
+ module.exports = TodoCLICommandComplete;