meadow-endpoints 4.0.14 → 4.0.16
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/dist/indoctrinate_content_staging/Indoctrinate-Catalog-AppData.json +1286 -1065
- package/dist/meadow-endpoints.js +253 -164
- package/dist/meadow-endpoints.js.map +1 -1
- package/dist/meadow-endpoints.min.js +7 -7
- package/dist/meadow-endpoints.min.js.map +1 -1
- package/docs/_version.json +7 -0
- package/docs/css/docuserve.css +277 -23
- package/docs/index.html +2 -2
- package/docs/retold-catalog.json +13 -1
- package/docs/retold-keyword-index.json +1 -1
- package/package.json +9 -8
- package/source/Meadow-Endpoints-Browser-Shim.js +4 -1
- package/source/Meadow-Endpoints.js +6 -6
- package/source/controller/Meadow-Endpoints-Controller-Base.js +6 -6
- package/source/controller/components/Meadow-Endpoints-Controller-BehaviorInjection.js +11 -11
- package/source/controller/components/Meadow-Endpoints-Controller-Error.js +23 -15
- package/source/controller/components/Meadow-Endpoints-Controller-Log.js +9 -9
- package/source/controller/utility/Meadow-Endpoints-Filter-Parser.js +16 -16
- package/source/controller/utility/Meadow-Endpoints-Session-Marshaler.js +42 -42
- package/source/controller/utility/Meadow-Endpoints-Stream-RecordArray.js +6 -6
- package/source/endpoints/create/Meadow-Operation-Create.js +1 -1
- package/source/endpoints/schema/Meadow-Endpoint-Validate.js +1 -1
- package/source/endpoints/update/Meadow-Endpoint-BulkUpdate.js +2 -0
- package/source/endpoints/update/Meadow-Operation-Update.js +2 -0
- package/source/endpoints/upsert/Meadow-Endpoint-BulkUpsert.js +3 -1
- package/source/endpoints/upsert/Meadow-Operation-Upsert.js +5 -3
- package/test/MeadowEndpoints_basic_tests.js +776 -0
package/docs/css/docuserve.css
CHANGED
|
@@ -1,73 +1,327 @@
|
|
|
1
1
|
/* ============================================================================
|
|
2
|
-
Pict Docuserve - Base Styles
|
|
2
|
+
Pict Docuserve - Base Styles & Theme Variables
|
|
3
3
|
============================================================================ */
|
|
4
4
|
|
|
5
|
-
/*
|
|
6
|
-
|
|
5
|
+
/* ----------------------------------------------------------------------------
|
|
6
|
+
Theme variables — light defaults on :root.
|
|
7
|
+
Dark mode applies when either:
|
|
8
|
+
(a) the user explicitly selected dark via <html data-theme="dark">
|
|
9
|
+
(b) the user hasn't chosen anything AND the system prefers dark
|
|
10
|
+
An explicit <html data-theme="light"> pins the light palette regardless.
|
|
11
|
+
---------------------------------------------------------------------------- */
|
|
12
|
+
|
|
13
|
+
:root
|
|
14
|
+
{
|
|
15
|
+
/* Surfaces */
|
|
16
|
+
--docuserve-bg: #FDFBF7;
|
|
17
|
+
--docuserve-bg-elevated: #FFFFFF;
|
|
18
|
+
--docuserve-border: #DDD6CA;
|
|
19
|
+
--docuserve-border-soft: #EAE3D8;
|
|
20
|
+
|
|
21
|
+
/* Text */
|
|
22
|
+
--docuserve-text: #2A241E;
|
|
23
|
+
--docuserve-text-strong: #3D3229;
|
|
24
|
+
--docuserve-text-muted: #5E5549;
|
|
25
|
+
--docuserve-text-dim: #8A7F72;
|
|
26
|
+
|
|
27
|
+
/* Accent / links */
|
|
28
|
+
--docuserve-accent: #2E7D74;
|
|
29
|
+
--docuserve-accent-hover: #236660;
|
|
30
|
+
|
|
31
|
+
/* Top bar */
|
|
32
|
+
--docuserve-topbar-bg: #3D3229;
|
|
33
|
+
--docuserve-topbar-text: #E8E0D4;
|
|
34
|
+
--docuserve-topbar-text-muted: #B5AA9A;
|
|
35
|
+
--docuserve-topbar-text-dim: #8A7F72;
|
|
36
|
+
--docuserve-topbar-hover-bg: #524438;
|
|
37
|
+
--docuserve-topbar-version-bg: rgba(255, 255, 255, 0.06);
|
|
38
|
+
--docuserve-topbar-version-border: rgba(255, 255, 255, 0.08);
|
|
39
|
+
--docuserve-topbar-version-text: #B5AA9A;
|
|
40
|
+
|
|
41
|
+
/* Sidebar */
|
|
42
|
+
--docuserve-sidebar-bg: #FAF7F1;
|
|
43
|
+
--docuserve-sidebar-border: #DDD6CA;
|
|
44
|
+
--docuserve-sidebar-border-soft: #E5DED1;
|
|
45
|
+
--docuserve-sidebar-text: #423D37;
|
|
46
|
+
--docuserve-sidebar-group-title: #3D3229;
|
|
47
|
+
--docuserve-sidebar-module-text: #5E5549;
|
|
48
|
+
--docuserve-sidebar-hover-bg: #EAE3D8;
|
|
49
|
+
--docuserve-sidebar-hover-text: #2E7D74;
|
|
50
|
+
--docuserve-sidebar-active-bg: #E5DED1;
|
|
51
|
+
--docuserve-sidebar-active-text: #2E7D74;
|
|
52
|
+
--docuserve-sidebar-search-bg: #FFFFFF;
|
|
53
|
+
--docuserve-sidebar-search-border: #DDD6CA;
|
|
54
|
+
|
|
55
|
+
/* Inline code */
|
|
56
|
+
--docuserve-inline-code-bg: #F0ECE4;
|
|
57
|
+
--docuserve-inline-code-text: #9E3A50;
|
|
58
|
+
|
|
59
|
+
/* Code block panel */
|
|
60
|
+
--docuserve-code-bg: #F6F3EE;
|
|
61
|
+
--docuserve-code-border: #E5DED1;
|
|
62
|
+
--docuserve-code-gutter-bg: #EFEAE0;
|
|
63
|
+
--docuserve-code-gutter-border: #DDD6CA;
|
|
64
|
+
--docuserve-code-gutter-text: #A59986;
|
|
65
|
+
--docuserve-code-text: #2A241E;
|
|
66
|
+
|
|
67
|
+
/* Syntax tokens — low-chroma dark-on-light palette */
|
|
68
|
+
--docuserve-tok-keyword: #A03472;
|
|
69
|
+
--docuserve-tok-string: #1A6640;
|
|
70
|
+
--docuserve-tok-number: #B25A00;
|
|
71
|
+
--docuserve-tok-comment: #8A7F72;
|
|
72
|
+
--docuserve-tok-operator: #2E7D74;
|
|
73
|
+
--docuserve-tok-punctuation: #2A241E;
|
|
74
|
+
--docuserve-tok-function: #2A5DB0;
|
|
75
|
+
--docuserve-tok-property: #9E3A50;
|
|
76
|
+
--docuserve-tok-tag: #9E3A50;
|
|
77
|
+
--docuserve-tok-attr-name: #B25A00;
|
|
78
|
+
--docuserve-tok-attr-value: #1A6640;
|
|
79
|
+
|
|
80
|
+
/* Tables, blockquotes, mermaid */
|
|
81
|
+
--docuserve-table-header-bg: #F5F0E8;
|
|
82
|
+
--docuserve-table-row-alt-bg: #F9F6F0;
|
|
83
|
+
--docuserve-blockquote-bg: #F7F5F0;
|
|
84
|
+
--docuserve-blockquote-border: #2E7D74;
|
|
85
|
+
--docuserve-blockquote-text: #5E5549;
|
|
86
|
+
--docuserve-mermaid-bg: #FFFFFF;
|
|
87
|
+
|
|
88
|
+
/* Scrollbars */
|
|
89
|
+
--docuserve-scrollbar-track: #F5F0E8;
|
|
90
|
+
--docuserve-scrollbar-thumb: #D4CCBE;
|
|
91
|
+
--docuserve-scrollbar-thumb-hover: #B5AA9A;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@media (prefers-color-scheme: dark)
|
|
95
|
+
{
|
|
96
|
+
:root:not([data-theme="light"])
|
|
97
|
+
{
|
|
98
|
+
--docuserve-bg: #15120F;
|
|
99
|
+
--docuserve-bg-elevated: #1B1814;
|
|
100
|
+
--docuserve-border: #2F2823;
|
|
101
|
+
--docuserve-border-soft: #26211C;
|
|
102
|
+
|
|
103
|
+
--docuserve-text: #E8E0D4;
|
|
104
|
+
--docuserve-text-strong: #F2ECE0;
|
|
105
|
+
--docuserve-text-muted: #B5AA9A;
|
|
106
|
+
--docuserve-text-dim: #7A6F62;
|
|
107
|
+
|
|
108
|
+
--docuserve-accent: #5DB8A8;
|
|
109
|
+
--docuserve-accent-hover: #7FCCB8;
|
|
110
|
+
|
|
111
|
+
--docuserve-topbar-bg: #1A1612;
|
|
112
|
+
--docuserve-topbar-text: #E8E0D4;
|
|
113
|
+
--docuserve-topbar-text-muted: #B5AA9A;
|
|
114
|
+
--docuserve-topbar-text-dim: #7A6F62;
|
|
115
|
+
--docuserve-topbar-hover-bg: #2A241E;
|
|
116
|
+
--docuserve-topbar-version-bg: rgba(255, 255, 255, 0.05);
|
|
117
|
+
--docuserve-topbar-version-border: rgba(255, 255, 255, 0.09);
|
|
118
|
+
--docuserve-topbar-version-text: #B5AA9A;
|
|
119
|
+
|
|
120
|
+
--docuserve-sidebar-bg: #1B1814;
|
|
121
|
+
--docuserve-sidebar-border: #2F2823;
|
|
122
|
+
--docuserve-sidebar-border-soft: #26211C;
|
|
123
|
+
--docuserve-sidebar-text: #C9C0B3;
|
|
124
|
+
--docuserve-sidebar-group-title: #F2ECE0;
|
|
125
|
+
--docuserve-sidebar-module-text: #B5AA9A;
|
|
126
|
+
--docuserve-sidebar-hover-bg: #2A241E;
|
|
127
|
+
--docuserve-sidebar-hover-text: #7FCCB8;
|
|
128
|
+
--docuserve-sidebar-active-bg: #2F2823;
|
|
129
|
+
--docuserve-sidebar-active-text: #7FCCB8;
|
|
130
|
+
--docuserve-sidebar-search-bg: #26211C;
|
|
131
|
+
--docuserve-sidebar-search-border: #2F2823;
|
|
132
|
+
|
|
133
|
+
--docuserve-inline-code-bg: #2A241E;
|
|
134
|
+
--docuserve-inline-code-text: #E8B07A;
|
|
135
|
+
|
|
136
|
+
--docuserve-code-bg: #1E1A17;
|
|
137
|
+
--docuserve-code-border: #2F2823;
|
|
138
|
+
--docuserve-code-gutter-bg: #17130F;
|
|
139
|
+
--docuserve-code-gutter-border: #2F2823;
|
|
140
|
+
--docuserve-code-gutter-text: #6A6052;
|
|
141
|
+
--docuserve-code-text: #E8E0D4;
|
|
142
|
+
|
|
143
|
+
--docuserve-tok-keyword: #C678DD;
|
|
144
|
+
--docuserve-tok-string: #98C379;
|
|
145
|
+
--docuserve-tok-number: #D19A66;
|
|
146
|
+
--docuserve-tok-comment: #7F848E;
|
|
147
|
+
--docuserve-tok-operator: #56B6C2;
|
|
148
|
+
--docuserve-tok-punctuation: #E8E0D4;
|
|
149
|
+
--docuserve-tok-function: #61AFEF;
|
|
150
|
+
--docuserve-tok-property: #E06C75;
|
|
151
|
+
--docuserve-tok-tag: #E06C75;
|
|
152
|
+
--docuserve-tok-attr-name: #D19A66;
|
|
153
|
+
--docuserve-tok-attr-value: #98C379;
|
|
154
|
+
|
|
155
|
+
--docuserve-table-header-bg: #26211C;
|
|
156
|
+
--docuserve-table-row-alt-bg: #1F1B17;
|
|
157
|
+
--docuserve-blockquote-bg: #1F1B17;
|
|
158
|
+
--docuserve-blockquote-border: #5DB8A8;
|
|
159
|
+
--docuserve-blockquote-text: #C9C0B3;
|
|
160
|
+
--docuserve-mermaid-bg: #E8E0D4;
|
|
161
|
+
|
|
162
|
+
--docuserve-scrollbar-track: #1B1814;
|
|
163
|
+
--docuserve-scrollbar-thumb: #3A322B;
|
|
164
|
+
--docuserve-scrollbar-thumb-hover: #524438;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
:root[data-theme="dark"]
|
|
169
|
+
{
|
|
170
|
+
--docuserve-bg: #15120F;
|
|
171
|
+
--docuserve-bg-elevated: #1B1814;
|
|
172
|
+
--docuserve-border: #2F2823;
|
|
173
|
+
--docuserve-border-soft: #26211C;
|
|
174
|
+
|
|
175
|
+
--docuserve-text: #E8E0D4;
|
|
176
|
+
--docuserve-text-strong: #F2ECE0;
|
|
177
|
+
--docuserve-text-muted: #B5AA9A;
|
|
178
|
+
--docuserve-text-dim: #7A6F62;
|
|
179
|
+
|
|
180
|
+
--docuserve-accent: #5DB8A8;
|
|
181
|
+
--docuserve-accent-hover: #7FCCB8;
|
|
182
|
+
|
|
183
|
+
--docuserve-topbar-bg: #1A1612;
|
|
184
|
+
--docuserve-topbar-text: #E8E0D4;
|
|
185
|
+
--docuserve-topbar-text-muted: #B5AA9A;
|
|
186
|
+
--docuserve-topbar-text-dim: #7A6F62;
|
|
187
|
+
--docuserve-topbar-hover-bg: #2A241E;
|
|
188
|
+
--docuserve-topbar-version-bg: rgba(255, 255, 255, 0.05);
|
|
189
|
+
--docuserve-topbar-version-border: rgba(255, 255, 255, 0.09);
|
|
190
|
+
--docuserve-topbar-version-text: #B5AA9A;
|
|
191
|
+
|
|
192
|
+
--docuserve-sidebar-bg: #1B1814;
|
|
193
|
+
--docuserve-sidebar-border: #2F2823;
|
|
194
|
+
--docuserve-sidebar-border-soft: #26211C;
|
|
195
|
+
--docuserve-sidebar-text: #C9C0B3;
|
|
196
|
+
--docuserve-sidebar-group-title: #F2ECE0;
|
|
197
|
+
--docuserve-sidebar-module-text: #B5AA9A;
|
|
198
|
+
--docuserve-sidebar-hover-bg: #2A241E;
|
|
199
|
+
--docuserve-sidebar-hover-text: #7FCCB8;
|
|
200
|
+
--docuserve-sidebar-active-bg: #2F2823;
|
|
201
|
+
--docuserve-sidebar-active-text: #7FCCB8;
|
|
202
|
+
--docuserve-sidebar-search-bg: #26211C;
|
|
203
|
+
--docuserve-sidebar-search-border: #2F2823;
|
|
204
|
+
|
|
205
|
+
--docuserve-inline-code-bg: #2A241E;
|
|
206
|
+
--docuserve-inline-code-text: #E8B07A;
|
|
207
|
+
|
|
208
|
+
--docuserve-code-bg: #1E1A17;
|
|
209
|
+
--docuserve-code-border: #2F2823;
|
|
210
|
+
--docuserve-code-gutter-bg: #17130F;
|
|
211
|
+
--docuserve-code-gutter-border: #2F2823;
|
|
212
|
+
--docuserve-code-gutter-text: #6A6052;
|
|
213
|
+
--docuserve-code-text: #E8E0D4;
|
|
214
|
+
|
|
215
|
+
--docuserve-tok-keyword: #C678DD;
|
|
216
|
+
--docuserve-tok-string: #98C379;
|
|
217
|
+
--docuserve-tok-number: #D19A66;
|
|
218
|
+
--docuserve-tok-comment: #7F848E;
|
|
219
|
+
--docuserve-tok-operator: #56B6C2;
|
|
220
|
+
--docuserve-tok-punctuation: #E8E0D4;
|
|
221
|
+
--docuserve-tok-function: #61AFEF;
|
|
222
|
+
--docuserve-tok-property: #E06C75;
|
|
223
|
+
--docuserve-tok-tag: #E06C75;
|
|
224
|
+
--docuserve-tok-attr-name: #D19A66;
|
|
225
|
+
--docuserve-tok-attr-value: #98C379;
|
|
226
|
+
|
|
227
|
+
--docuserve-table-header-bg: #26211C;
|
|
228
|
+
--docuserve-table-row-alt-bg: #1F1B17;
|
|
229
|
+
--docuserve-blockquote-bg: #1F1B17;
|
|
230
|
+
--docuserve-blockquote-border: #5DB8A8;
|
|
231
|
+
--docuserve-blockquote-text: #C9C0B3;
|
|
232
|
+
--docuserve-mermaid-bg: #E8E0D4;
|
|
233
|
+
|
|
234
|
+
--docuserve-scrollbar-track: #1B1814;
|
|
235
|
+
--docuserve-scrollbar-thumb: #3A322B;
|
|
236
|
+
--docuserve-scrollbar-thumb-hover: #524438;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/* ----------------------------------------------------------------------------
|
|
240
|
+
Reset and base
|
|
241
|
+
---------------------------------------------------------------------------- */
|
|
242
|
+
|
|
243
|
+
*, *::before, *::after
|
|
244
|
+
{
|
|
7
245
|
box-sizing: border-box;
|
|
8
246
|
}
|
|
9
247
|
|
|
10
|
-
html, body
|
|
248
|
+
html, body
|
|
249
|
+
{
|
|
11
250
|
margin: 0;
|
|
12
251
|
padding: 0;
|
|
13
252
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
14
253
|
font-size: 16px;
|
|
15
254
|
line-height: 1.5;
|
|
16
|
-
color:
|
|
17
|
-
background-color:
|
|
255
|
+
color: var(--docuserve-text);
|
|
256
|
+
background-color: var(--docuserve-bg);
|
|
18
257
|
-webkit-font-smoothing: antialiased;
|
|
19
258
|
-moz-osx-font-smoothing: grayscale;
|
|
259
|
+
transition: background-color 0.15s ease, color 0.15s ease;
|
|
20
260
|
}
|
|
21
261
|
|
|
22
262
|
/* Typography */
|
|
23
|
-
h1, h2, h3, h4, h5, h6
|
|
263
|
+
h1, h2, h3, h4, h5, h6
|
|
264
|
+
{
|
|
24
265
|
margin-top: 0;
|
|
25
266
|
line-height: 1.3;
|
|
267
|
+
color: var(--docuserve-text-strong);
|
|
26
268
|
}
|
|
27
269
|
|
|
28
|
-
a
|
|
29
|
-
|
|
270
|
+
a
|
|
271
|
+
{
|
|
272
|
+
color: var(--docuserve-accent);
|
|
30
273
|
text-decoration: none;
|
|
31
274
|
}
|
|
32
275
|
|
|
33
|
-
a:hover
|
|
34
|
-
|
|
276
|
+
a:hover
|
|
277
|
+
{
|
|
278
|
+
color: var(--docuserve-accent-hover);
|
|
35
279
|
}
|
|
36
280
|
|
|
37
281
|
/* Application container */
|
|
38
|
-
#Docuserve-Application-Container
|
|
282
|
+
#Docuserve-Application-Container
|
|
283
|
+
{
|
|
39
284
|
min-height: 100vh;
|
|
40
285
|
}
|
|
41
286
|
|
|
42
287
|
/* Utility: scrollbar styling */
|
|
43
|
-
::-webkit-scrollbar
|
|
288
|
+
::-webkit-scrollbar
|
|
289
|
+
{
|
|
44
290
|
width: 8px;
|
|
291
|
+
height: 8px;
|
|
45
292
|
}
|
|
46
293
|
|
|
47
|
-
::-webkit-scrollbar-track
|
|
48
|
-
|
|
294
|
+
::-webkit-scrollbar-track
|
|
295
|
+
{
|
|
296
|
+
background: var(--docuserve-scrollbar-track);
|
|
49
297
|
}
|
|
50
298
|
|
|
51
|
-
::-webkit-scrollbar-thumb
|
|
52
|
-
|
|
299
|
+
::-webkit-scrollbar-thumb
|
|
300
|
+
{
|
|
301
|
+
background: var(--docuserve-scrollbar-thumb);
|
|
53
302
|
border-radius: 4px;
|
|
54
303
|
}
|
|
55
304
|
|
|
56
|
-
::-webkit-scrollbar-thumb:hover
|
|
57
|
-
|
|
305
|
+
::-webkit-scrollbar-thumb:hover
|
|
306
|
+
{
|
|
307
|
+
background: var(--docuserve-scrollbar-thumb-hover);
|
|
58
308
|
}
|
|
59
309
|
|
|
60
310
|
/* Responsive adjustments */
|
|
61
|
-
@media (max-width: 768px)
|
|
62
|
-
|
|
311
|
+
@media (max-width: 768px)
|
|
312
|
+
{
|
|
313
|
+
html
|
|
314
|
+
{
|
|
63
315
|
font-size: 14px;
|
|
64
316
|
}
|
|
65
317
|
|
|
66
|
-
#Docuserve-Sidebar-Container
|
|
318
|
+
#Docuserve-Sidebar-Container
|
|
319
|
+
{
|
|
67
320
|
display: none;
|
|
68
321
|
}
|
|
69
322
|
|
|
70
|
-
.docuserve-body
|
|
323
|
+
.docuserve-body
|
|
324
|
+
{
|
|
71
325
|
flex-direction: column;
|
|
72
326
|
}
|
|
73
327
|
}
|
package/docs/index.html
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
<meta charset="utf-8">
|
|
5
5
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
7
|
-
<meta name="description" content="Documentation
|
|
7
|
+
<meta name="description" content="meadow-endpoints v4.0.15 Documentation — Automatic API endpoints for Meadow data.">
|
|
8
8
|
|
|
9
|
-
<title>Documentation</title>
|
|
9
|
+
<title>meadow-endpoints v4.0.15 Documentation</title>
|
|
10
10
|
|
|
11
11
|
<!-- Application Stylesheet -->
|
|
12
12
|
<link href="css/docuserve.css" rel="stylesheet">
|
package/docs/retold-catalog.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"Generated": "2026-
|
|
2
|
+
"Generated": "2026-04-10T17:21:31.481Z",
|
|
3
3
|
"GitHubOrg": "stevenvelozo",
|
|
4
4
|
"DefaultBranch": "master",
|
|
5
5
|
"Groups": [
|
|
@@ -106,6 +106,18 @@
|
|
|
106
106
|
"crud/schema.md",
|
|
107
107
|
"crud/update.md"
|
|
108
108
|
]
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"Name": "css",
|
|
112
|
+
"Repo": "css",
|
|
113
|
+
"Group": "docs",
|
|
114
|
+
"Branch": "master",
|
|
115
|
+
"HasDocs": true,
|
|
116
|
+
"HasCover": false,
|
|
117
|
+
"Sidebar": [],
|
|
118
|
+
"DocFiles": [
|
|
119
|
+
"css/docuserve.css"
|
|
120
|
+
]
|
|
109
121
|
}
|
|
110
122
|
]
|
|
111
123
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "meadow-endpoints",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.16",
|
|
4
4
|
"description": "Automatic API endpoints for Meadow data.",
|
|
5
5
|
"main": "source/Meadow-Endpoints.js",
|
|
6
6
|
"scripts": {
|
|
@@ -48,25 +48,26 @@
|
|
|
48
48
|
},
|
|
49
49
|
"homepage": "https://github.com/stevenvelozo/meadow-endpoints",
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"alasql": "^4.17.
|
|
52
|
-
"better-sqlite3": "^12.
|
|
51
|
+
"alasql": "^4.17.2",
|
|
52
|
+
"better-sqlite3": "^12.9.0",
|
|
53
53
|
"chance": "^1.1.13",
|
|
54
54
|
"gulp-util": "^3.0.8",
|
|
55
55
|
"meadow-connection-sqlite": "^1.0.18",
|
|
56
|
-
"mysql2": "^3.
|
|
57
|
-
"orator-serviceserver-restify": "^2.0.
|
|
56
|
+
"mysql2": "^3.22.1",
|
|
57
|
+
"orator-serviceserver-restify": "^2.0.10",
|
|
58
58
|
"papaparse": "^5.5.3",
|
|
59
|
-
"
|
|
59
|
+
"pict-docuserve": "^0.1.5",
|
|
60
|
+
"quackage": "^1.1.2",
|
|
60
61
|
"supertest": "^7.2.2",
|
|
61
62
|
"typescript": "^5.9.3",
|
|
62
63
|
"why-is-node-running": "^3.2.2"
|
|
63
64
|
},
|
|
64
65
|
"dependencies": {
|
|
65
66
|
"async": "3.2.6",
|
|
66
|
-
"fable": "^3.1.
|
|
67
|
+
"fable": "^3.1.71",
|
|
67
68
|
"fable-serviceproviderbase": "^3.0.19",
|
|
68
69
|
"JSONStream": "^1.3.5",
|
|
69
|
-
"meadow": "^2.0.
|
|
70
|
+
"meadow": "^2.0.37",
|
|
70
71
|
"meadow-filter": "^1.0.10",
|
|
71
72
|
"orator": "^6.0.4",
|
|
72
73
|
"underscore": "^1.13.8"
|
|
@@ -8,7 +8,10 @@ var libNPMModuleWrapper = require('./Meadow-Endpoints.js');
|
|
|
8
8
|
|
|
9
9
|
if ((typeof(window) === 'object') && !window.hasOwnProperty('MeadowEndpoints'))
|
|
10
10
|
{
|
|
11
|
-
window.
|
|
11
|
+
// Browser shim attaches the module to a named window global. The
|
|
12
|
+
// property doesn't exist on the built-in Window type; cast to a
|
|
13
|
+
// Window augmented with the optional property to satisfy checkJs.
|
|
14
|
+
/** @type {Window & { MeadowEndpoints?: unknown }} */ (window).MeadowEndpoints = libNPMModuleWrapper;
|
|
12
15
|
}
|
|
13
16
|
|
|
14
17
|
module.exports = libNPMModuleWrapper;
|
|
@@ -101,17 +101,17 @@ class MeadowEndpoints
|
|
|
101
101
|
});
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
104
|
+
/**
|
|
105
|
+
* @return {import('./controller/Meadow-Endpoints-Controller-Base.js')} The controller instance
|
|
106
|
+
*/
|
|
107
107
|
get controller()
|
|
108
108
|
{
|
|
109
109
|
return this._Controller;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
112
|
+
/**
|
|
113
|
+
* @param {import('./controller/Meadow-Endpoints-Controller-Base.js')} pController - The controller instance
|
|
114
|
+
*/
|
|
115
115
|
set controller(pController)
|
|
116
116
|
{
|
|
117
117
|
this._Controller = pController;
|
|
@@ -11,9 +11,9 @@ const libMeadowEndpointsStreamRecordArray = require('./utility/Meadow-Endpoints-
|
|
|
11
11
|
|
|
12
12
|
class MeadowEndpointControllerBase
|
|
13
13
|
{
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
/**
|
|
15
|
+
* @param {import('../Meadow-Endpoints.js')} pMeadowEndpoints
|
|
16
|
+
*/
|
|
17
17
|
constructor(pMeadowEndpoints)
|
|
18
18
|
{
|
|
19
19
|
this.DAL = pMeadowEndpoints.DAL;
|
|
@@ -44,9 +44,9 @@ class MeadowEndpointControllerBase
|
|
|
44
44
|
this._StreamRecordArray = new libMeadowEndpointsStreamRecordArray(this);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
/**
|
|
48
|
+
* @param {import('./Meadow-Endpoints-Controller-Base.js')} pController
|
|
49
|
+
*/
|
|
50
50
|
initializeDefaultUnsetControllers(pController)
|
|
51
51
|
{
|
|
52
52
|
// Application Services
|
|
@@ -4,14 +4,14 @@ const libUnderscore = require('underscore');
|
|
|
4
4
|
|
|
5
5
|
class MeadowEndpointsControllerBehaviorInjectionBase
|
|
6
6
|
{
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
/**
|
|
8
|
+
* @param {import('../Meadow-Endpoints-Controller-Base.js')} pController
|
|
9
|
+
*/
|
|
10
|
+
constructor(pController)
|
|
11
11
|
{
|
|
12
|
-
|
|
12
|
+
this._Controller = pController;
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
// The template compilation function
|
|
15
15
|
//this.template = this._Controller.DAL.fable.Utility.template;
|
|
16
16
|
this.template = libUnderscore.template;
|
|
17
17
|
|
|
@@ -21,7 +21,7 @@ class MeadowEndpointsControllerBehaviorInjectionBase
|
|
|
21
21
|
// A set of objects to hold the specific templates and their compiled functions
|
|
22
22
|
this._Templates = {};
|
|
23
23
|
this._TemplateFunctions = {};
|
|
24
|
-
|
|
24
|
+
}
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* Set a specific behavior.
|
|
@@ -30,10 +30,10 @@ class MeadowEndpointsControllerBehaviorInjectionBase
|
|
|
30
30
|
*
|
|
31
31
|
* var someBehavior = function(pRequest, fCallback)
|
|
32
32
|
* {
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
33
|
+
* // Do some stuff with pRequest...
|
|
34
|
+
* if (pRequest.UserSession.UserRoleIndex < 5)
|
|
35
|
+
* tmpRequestState.Query.addFilter('Customer', pRequest.UserSession.IDCustomer);
|
|
36
|
+
* return fCallback(false);
|
|
37
37
|
* }
|
|
38
38
|
*
|
|
39
39
|
* It is important to note that the fCallback function expects false if no error, or a string message if there is one.
|
|
@@ -1,28 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error object extended with the extra response-shape metadata
|
|
3
|
+
* meadow-endpoints attaches: an HTTP StatusCode and a flag telling
|
|
4
|
+
* the error handler whether to include a stack trace in the response.
|
|
5
|
+
*
|
|
6
|
+
* @typedef {Error & { StatusCode?: number, SuppressSoftwareTrace?: boolean, code?: string }} MeadowEndpointError
|
|
7
|
+
*/
|
|
8
|
+
|
|
1
9
|
class MeadowEndpointsControllerErrorBase
|
|
2
10
|
{
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
11
|
+
/**
|
|
12
|
+
* @param {import('../Meadow-Endpoints-Controller-Base.js')} pController
|
|
13
|
+
*/
|
|
14
|
+
constructor(pController)
|
|
7
15
|
{
|
|
8
|
-
|
|
9
|
-
|
|
16
|
+
this._Controller = pController;
|
|
17
|
+
}
|
|
10
18
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
19
|
+
// Get the error object
|
|
20
|
+
getError(pMessage, pStatusCode, pSuppressSoftwareTrace)
|
|
21
|
+
{
|
|
22
|
+
const tmpError = /** @type {MeadowEndpointError} */ (new Error(pMessage));
|
|
15
23
|
|
|
16
|
-
|
|
24
|
+
// Default the error status code to 400 if none is passed
|
|
17
25
|
tmpError.StatusCode = (typeof(pStatusCode) == 'number') ? pStatusCode : 400;
|
|
18
26
|
// This suppresses the stack trace from being sent back or logged.
|
|
19
27
|
// And by default it does not send a stack trace, as we expect errors created this way to be protocol, schema or data related.
|
|
20
28
|
tmpError.SuppressSoftwareTrace = (typeof(pSuppressSoftwareTrace) != 'undefined') ? pSuppressSoftwareTrace : true;
|
|
21
29
|
|
|
22
|
-
|
|
23
|
-
|
|
30
|
+
return tmpError;
|
|
31
|
+
}
|
|
24
32
|
|
|
25
|
-
|
|
33
|
+
// Handle an error if set -- some errors don't send the response back because they aren't fully errory errors.
|
|
26
34
|
handleErrorIfSet(pRequest, pRequestState, pResponse, pError, fCallback)
|
|
27
35
|
{
|
|
28
36
|
if (pError)
|
|
@@ -33,7 +41,7 @@ class MeadowEndpointsControllerErrorBase
|
|
|
33
41
|
return fCallback();
|
|
34
42
|
}
|
|
35
43
|
|
|
36
|
-
|
|
44
|
+
// Send an error object
|
|
37
45
|
sendError(pRequest, pRequestState, pResponse, pError, fCallback)
|
|
38
46
|
{
|
|
39
47
|
this._Controller.log.logRequestError(pRequest, pRequestState, pError);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
class MeadowEndpointsControllerLogBase
|
|
2
2
|
{
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
/**
|
|
4
|
+
* @param {import('../Meadow-Endpoints-Controller-Base.js')} pController
|
|
5
|
+
*/
|
|
6
|
+
constructor(pController)
|
|
7
7
|
{
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
this._Controller = pController;
|
|
9
|
+
}
|
|
10
10
|
|
|
11
11
|
// This is called for every successful request log line. Be careful what you add in overloads!
|
|
12
12
|
prepareLogData(pRequest, pRequestState, pLogData)
|
|
@@ -38,7 +38,7 @@ class MeadowEndpointsControllerLogBase
|
|
|
38
38
|
return pLogData;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
// This is called whenever an endpoint is completed successfully
|
|
42
42
|
requestCompletedSuccessfully(pRequest, pRequestState, pActionSummary)
|
|
43
43
|
{
|
|
44
44
|
let tmpLogData = (
|
|
@@ -54,7 +54,7 @@ class MeadowEndpointsControllerLogBase
|
|
|
54
54
|
this._Controller.log.info(pActionSummary, this.prepareLogData(pRequest, pRequestState, tmpLogData));
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
// This is called whenever an endpoint is completed successfully
|
|
58
58
|
logRequestError(pRequest, pRequestState, pError)
|
|
59
59
|
{
|
|
60
60
|
let tmpErrorLogData = (
|
|
@@ -72,7 +72,7 @@ class MeadowEndpointsControllerLogBase
|
|
|
72
72
|
this._Controller.log.error(pError.message, this.prepareLogData(pRequest, pRequestState, tmpErrorLogData));
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
trace(pLogText, pLogObject)
|
|
76
76
|
{
|
|
77
77
|
this._Controller.DAL.log.trace(pLogText, pLogObject);
|
|
78
78
|
}
|