retold-facto 0.0.4

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 (92) hide show
  1. package/.claude/launch.json +11 -0
  2. package/.dockerignore +8 -0
  3. package/.quackage.json +19 -0
  4. package/Dockerfile +26 -0
  5. package/bin/retold-facto.js +909 -0
  6. package/examples/facto-government-data.sqlite +0 -0
  7. package/examples/government-data-catalog.json +137 -0
  8. package/examples/government-data-loader.js +1432 -0
  9. package/package.json +91 -0
  10. package/scripts/facto-download.js +425 -0
  11. package/source/Retold-Facto.js +1042 -0
  12. package/source/services/Retold-Facto-BeaconProvider.js +511 -0
  13. package/source/services/Retold-Facto-CatalogManager.js +1252 -0
  14. package/source/services/Retold-Facto-DataLakeService.js +1642 -0
  15. package/source/services/Retold-Facto-DatasetManager.js +417 -0
  16. package/source/services/Retold-Facto-IngestEngine.js +1315 -0
  17. package/source/services/Retold-Facto-ProjectionEngine.js +3960 -0
  18. package/source/services/Retold-Facto-RecordManager.js +360 -0
  19. package/source/services/Retold-Facto-SchemaManager.js +1110 -0
  20. package/source/services/Retold-Facto-SourceFolderScanner.js +2243 -0
  21. package/source/services/Retold-Facto-SourceManager.js +730 -0
  22. package/source/services/Retold-Facto-StoreConnectionManager.js +441 -0
  23. package/source/services/Retold-Facto-ThroughputMonitor.js +478 -0
  24. package/source/services/web-app/codemirror-entry.js +7 -0
  25. package/source/services/web-app/pict-app/Pict-Application-Facto-Configuration.json +9 -0
  26. package/source/services/web-app/pict-app/Pict-Application-Facto.js +70 -0
  27. package/source/services/web-app/pict-app/Pict-Facto-Bundle.js +11 -0
  28. package/source/services/web-app/pict-app/providers/Pict-Provider-Facto-UI.js +66 -0
  29. package/source/services/web-app/pict-app/providers/Pict-Provider-Facto.js +69 -0
  30. package/source/services/web-app/pict-app/providers/facto-api/Facto-API-Catalog.js +93 -0
  31. package/source/services/web-app/pict-app/providers/facto-api/Facto-API-Connections.js +42 -0
  32. package/source/services/web-app/pict-app/providers/facto-api/Facto-API-Datasets.js +605 -0
  33. package/source/services/web-app/pict-app/providers/facto-api/Facto-API-Projections.js +188 -0
  34. package/source/services/web-app/pict-app/providers/facto-api/Facto-API-Scanner.js +80 -0
  35. package/source/services/web-app/pict-app/providers/facto-api/Facto-API-Schema.js +116 -0
  36. package/source/services/web-app/pict-app/providers/facto-api/Facto-API-Sources.js +104 -0
  37. package/source/services/web-app/pict-app/views/PictView-Facto-Catalog.js +526 -0
  38. package/source/services/web-app/pict-app/views/PictView-Facto-Datasets.js +173 -0
  39. package/source/services/web-app/pict-app/views/PictView-Facto-Ingest.js +259 -0
  40. package/source/services/web-app/pict-app/views/PictView-Facto-Layout.js +191 -0
  41. package/source/services/web-app/pict-app/views/PictView-Facto-Projections.js +231 -0
  42. package/source/services/web-app/pict-app/views/PictView-Facto-Records.js +326 -0
  43. package/source/services/web-app/pict-app/views/PictView-Facto-Scanner.js +624 -0
  44. package/source/services/web-app/pict-app/views/PictView-Facto-Sources.js +201 -0
  45. package/source/services/web-app/pict-app/views/PictView-Facto-Throughput.js +456 -0
  46. package/source/services/web-app/pict-app-full/Pict-Application-Facto-Full-Configuration.json +14 -0
  47. package/source/services/web-app/pict-app-full/Pict-Application-Facto-Full.js +391 -0
  48. package/source/services/web-app/pict-app-full/providers/PictRouter-Facto-Configuration.json +56 -0
  49. package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-BottomBar.js +68 -0
  50. package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-Connections.js +340 -0
  51. package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-Dashboard.js +149 -0
  52. package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-Dashboards.js +819 -0
  53. package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-Datasets.js +178 -0
  54. package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-IngestJobs.js +99 -0
  55. package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-Layout.js +62 -0
  56. package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-MappingEditor.js +158 -0
  57. package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-ProjectionDetail.js +1120 -0
  58. package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-Projections.js +172 -0
  59. package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-QueryPanel.js +119 -0
  60. package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-RecordViewer.js +663 -0
  61. package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-Records.js +648 -0
  62. package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-Scanner.js +1017 -0
  63. package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-SchemaDetail.js +1404 -0
  64. package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-SchemaDocEditor.js +1036 -0
  65. package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-SchemaEditor.js +636 -0
  66. package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-SchemaResearch.js +357 -0
  67. package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-SourceDetail.js +822 -0
  68. package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-SourceEditor.js +1036 -0
  69. package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-SourceResearch.js +487 -0
  70. package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-Sources.js +165 -0
  71. package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-Throughput.js +439 -0
  72. package/source/services/web-app/pict-app-full/views/PictView-Facto-Full-TopBar.js +335 -0
  73. package/source/services/web-app/pict-app-full/views/projections/Facto-Projections-Constants.js +71 -0
  74. package/source/services/web-app/web/chart.min.js +20 -0
  75. package/source/services/web-app/web/codemirror-bundle.js +30099 -0
  76. package/source/services/web-app/web/css/facto-themes.css +467 -0
  77. package/source/services/web-app/web/css/facto.css +502 -0
  78. package/source/services/web-app/web/index.html +28 -0
  79. package/source/services/web-app/web/retold-facto.js +12138 -0
  80. package/source/services/web-app/web/retold-facto.js.map +1 -0
  81. package/source/services/web-app/web/retold-facto.min.js +2 -0
  82. package/source/services/web-app/web/retold-facto.min.js.map +1 -0
  83. package/source/services/web-app/web/simple/index.html +17 -0
  84. package/test/Facto_Browser_Integration_tests.js +798 -0
  85. package/test/RetoldFacto_tests.js +4117 -0
  86. package/test/fixtures/weather-readings.csv +17 -0
  87. package/test/fixtures/weather-stations.csv +9 -0
  88. package/test/model/MeadowModel-Extended.json +8497 -0
  89. package/test/model/MeadowModel-PICT.json +1 -0
  90. package/test/model/MeadowModel.json +1355 -0
  91. package/test/model/ddl/Facto.ddl +225 -0
  92. package/test/model/fable-configuration.json +14 -0
@@ -0,0 +1,335 @@
1
+ const libPictView = require('pict-view');
2
+
3
+ const _ViewConfiguration =
4
+ {
5
+ ViewIdentifier: "Facto-Full-TopBar",
6
+
7
+ DefaultRenderable: "Facto-Full-TopBar-Content",
8
+ DefaultDestinationAddress: "#Facto-Full-TopBar-Container",
9
+
10
+ AutoRender: false,
11
+
12
+ CSS: /*css*/`
13
+ .facto-topbar {
14
+ display: flex;
15
+ align-items: center;
16
+ height: 48px;
17
+ background: var(--facto-topbar-bg);
18
+ padding: 0 1.25em;
19
+ border-bottom: 1px solid var(--facto-border-subtle);
20
+ position: sticky;
21
+ top: 0;
22
+ z-index: 100;
23
+ }
24
+
25
+ .facto-topbar-brand {
26
+ font-size: 1.05em;
27
+ font-weight: 700;
28
+ color: var(--facto-topbar-hover);
29
+ cursor: pointer;
30
+ margin-right: 2em;
31
+ white-space: nowrap;
32
+ text-decoration: none;
33
+ }
34
+
35
+ .facto-topbar-brand:hover {
36
+ color: var(--facto-topbar-active);
37
+ }
38
+
39
+ .facto-topbar-nav {
40
+ display: flex;
41
+ align-items: center;
42
+ gap: 0.15em;
43
+ flex: 1;
44
+ overflow-x: auto;
45
+ }
46
+
47
+ .facto-topbar-nav a {
48
+ padding: 0.35em 0.7em;
49
+ font-size: 0.85em;
50
+ font-weight: 500;
51
+ color: var(--facto-topbar-text);
52
+ text-decoration: none;
53
+ border-radius: 5px;
54
+ white-space: nowrap;
55
+ cursor: pointer;
56
+ transition: color 0.12s, background 0.12s;
57
+ }
58
+
59
+ .facto-topbar-nav a:hover {
60
+ color: var(--facto-topbar-hover);
61
+ background: rgba(255,255,255,0.06);
62
+ }
63
+
64
+ .facto-topbar-nav a.active {
65
+ color: var(--facto-topbar-active);
66
+ background: rgba(255,255,255,0.08);
67
+ }
68
+
69
+ .facto-topbar-right {
70
+ display: flex;
71
+ align-items: center;
72
+ gap: 0.75em;
73
+ margin-left: auto;
74
+ }
75
+
76
+ .facto-topbar-simple-link {
77
+ font-size: 0.75em;
78
+ color: var(--facto-topbar-text);
79
+ text-decoration: none;
80
+ opacity: 0.6;
81
+ }
82
+
83
+ .facto-topbar-simple-link:hover {
84
+ opacity: 1;
85
+ }
86
+
87
+ /* Settings gear */
88
+ .facto-settings-wrap {
89
+ position: relative;
90
+ }
91
+
92
+ .facto-settings-gear {
93
+ background: none;
94
+ border: none;
95
+ padding: 0.3em;
96
+ cursor: pointer;
97
+ color: var(--facto-topbar-text);
98
+ display: flex;
99
+ align-items: center;
100
+ border-radius: 4px;
101
+ transition: color 0.12s;
102
+ }
103
+
104
+ .facto-settings-gear:hover {
105
+ color: var(--facto-topbar-hover);
106
+ }
107
+
108
+ .facto-settings-gear svg {
109
+ width: 20px;
110
+ height: 20px;
111
+ fill: currentColor;
112
+ }
113
+
114
+ /* Settings panel */
115
+ .facto-settings-panel {
116
+ position: absolute;
117
+ top: 100%;
118
+ right: 0;
119
+ margin-top: 0.5em;
120
+ background: var(--facto-bg-surface);
121
+ border: 1px solid var(--facto-border);
122
+ border-radius: 8px;
123
+ padding: 1em;
124
+ min-width: 220px;
125
+ box-shadow: var(--facto-shadow-heavy);
126
+ z-index: 200;
127
+ }
128
+
129
+ .facto-settings-panel-title {
130
+ font-size: 0.8em;
131
+ font-weight: 600;
132
+ color: var(--facto-text-secondary);
133
+ text-transform: uppercase;
134
+ letter-spacing: 0.05em;
135
+ margin-bottom: 0.75em;
136
+ }
137
+
138
+ .facto-theme-grid {
139
+ display: flex;
140
+ flex-direction: column;
141
+ gap: 0.4em;
142
+ }
143
+
144
+ .facto-theme-swatch {
145
+ display: flex;
146
+ align-items: center;
147
+ gap: 0.6em;
148
+ padding: 0.4em 0.5em;
149
+ border-radius: 5px;
150
+ cursor: pointer;
151
+ transition: background 0.12s;
152
+ }
153
+
154
+ .facto-theme-swatch:hover {
155
+ background: var(--facto-bg-elevated);
156
+ }
157
+
158
+ .facto-theme-swatch.active {
159
+ background: var(--facto-bg-elevated);
160
+ outline: 2px solid var(--facto-brand);
161
+ outline-offset: -2px;
162
+ }
163
+
164
+ .facto-theme-swatch-colors {
165
+ display: flex;
166
+ gap: 3px;
167
+ }
168
+
169
+ .facto-theme-swatch-dot {
170
+ width: 14px;
171
+ height: 14px;
172
+ border-radius: 50%;
173
+ border: 1px solid rgba(255,255,255,0.1);
174
+ }
175
+
176
+ .facto-theme-swatch-label {
177
+ font-size: 0.82em;
178
+ color: var(--facto-text);
179
+ }
180
+
181
+ @media (max-width: 900px) {
182
+ .facto-topbar-nav {
183
+ display: none;
184
+ }
185
+ }
186
+ `,
187
+
188
+ Templates:
189
+ [
190
+ {
191
+ Hash: "Facto-Full-TopBar-Template",
192
+ Template: /*html*/`
193
+ <div class="facto-topbar">
194
+ <a class="facto-topbar-brand" onclick="{~P~}.PictApplication.navigateTo('/Home')">Retold Facto</a>
195
+
196
+ <div class="facto-topbar-nav" id="Facto-Full-TopBar-Nav">
197
+ <a data-route="Scanner" onclick="{~P~}.PictApplication.navigateTo('/Scanner')">Scanner</a>
198
+ <a data-route="SourceResearch" onclick="{~P~}.PictApplication.navigateTo('/SourceResearch')">Source Research</a>
199
+ <a data-route="SchemaResearch" onclick="{~P~}.PictApplication.navigateTo('/SchemaResearch')">Schema</a>
200
+ <a data-route="IngestJobs" onclick="{~P~}.PictApplication.navigateTo('/IngestJobs')">Ingestion Jobs</a>
201
+ <a data-route="Sources" onclick="{~P~}.PictApplication.navigateTo('/Sources')">Sources</a>
202
+ <a data-route="Datasets" onclick="{~P~}.PictApplication.navigateTo('/Datasets')">Data Sets</a>
203
+ <a data-route="Records" onclick="{~P~}.PictApplication.navigateTo('/Records')">Records</a>
204
+ <a data-route="Projections" onclick="{~P~}.PictApplication.navigateTo('/Projections')">Projections</a>
205
+ <a data-route="Connections" onclick="{~P~}.PictApplication.navigateTo('/Connections')">Connections</a>
206
+ <a data-route="Dashboards" onclick="{~P~}.PictApplication.navigateTo('/Dashboards')">Dashboards</a>
207
+ <a data-route="Throughput" onclick="{~P~}.PictApplication.navigateTo('/Throughput')">Throughput</a>
208
+ </div>
209
+
210
+ <div class="facto-topbar-right">
211
+ <a class="facto-topbar-simple-link" href="/simple/">Simple View</a>
212
+
213
+ <div class="facto-settings-wrap">
214
+ <button class="facto-settings-gear" onclick="{~P~}.views['Facto-Full-TopBar'].toggleThemePanel()">
215
+ <svg viewBox="0 0 24 24"><path d="M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58a.49.49 0 00.12-.61l-1.92-3.32a.49.49 0 00-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54a.48.48 0 00-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96a.49.49 0 00-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.07.62-.07.94s.02.64.07.94l-2.03 1.58a.49.49 0 00-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6A3.6 3.6 0 1112 8.4a3.6 3.6 0 010 7.2z"/></svg>
216
+ </button>
217
+
218
+ <div class="facto-settings-panel" id="Facto-Full-Settings-Panel" style="display:none;">
219
+ <div class="facto-settings-panel-title">Theme</div>
220
+ <div class="facto-theme-grid" id="Facto-Full-Settings-ThemeGrid"></div>
221
+ </div>
222
+ </div>
223
+ </div>
224
+ </div>
225
+ `
226
+ }
227
+ ],
228
+
229
+ Renderables:
230
+ [
231
+ {
232
+ RenderableHash: "Facto-Full-TopBar-Content",
233
+ TemplateHash: "Facto-Full-TopBar-Template",
234
+ DestinationAddress: "#Facto-Full-TopBar-Container",
235
+ RenderMethod: "replace"
236
+ }
237
+ ]
238
+ };
239
+
240
+ class FactoFullTopBarView extends libPictView
241
+ {
242
+ constructor(pFable, pOptions, pServiceHash)
243
+ {
244
+ super(pFable, pOptions, pServiceHash);
245
+ this._themePanelOpen = false;
246
+ }
247
+
248
+ onAfterRender(pRenderable, pRenderDestinationAddress, pRecord, pContent)
249
+ {
250
+ this._renderThemeGrid();
251
+
252
+ // Close theme panel on outside click
253
+ document.addEventListener('click',
254
+ (pEvent) =>
255
+ {
256
+ if (!this._themePanelOpen) return;
257
+ let tmpWrap = pEvent.target.closest('.facto-settings-wrap');
258
+ if (!tmpWrap)
259
+ {
260
+ this._themePanelOpen = false;
261
+ let tmpPanel = document.getElementById('Facto-Full-Settings-Panel');
262
+ if (tmpPanel) tmpPanel.style.display = 'none';
263
+ }
264
+ });
265
+
266
+ return super.onAfterRender(pRenderable, pRenderDestinationAddress, pRecord, pContent);
267
+ }
268
+
269
+ toggleThemePanel()
270
+ {
271
+ let tmpPanel = document.getElementById('Facto-Full-Settings-Panel');
272
+ if (!tmpPanel) return;
273
+
274
+ this._themePanelOpen = !this._themePanelOpen;
275
+ tmpPanel.style.display = this._themePanelOpen ? 'block' : 'none';
276
+ }
277
+
278
+ selectTheme(pThemeKey)
279
+ {
280
+ this.pict.PictApplication.applyTheme(pThemeKey);
281
+ this._renderThemeGrid();
282
+ this._themePanelOpen = false;
283
+ let tmpPanel = document.getElementById('Facto-Full-Settings-Panel');
284
+ if (tmpPanel) tmpPanel.style.display = 'none';
285
+ }
286
+
287
+ highlightRoute(pRoute)
288
+ {
289
+ let tmpNav = document.getElementById('Facto-Full-TopBar-Nav');
290
+ if (!tmpNav) return;
291
+
292
+ let tmpLinks = tmpNav.querySelectorAll('a[data-route]');
293
+ for (let i = 0; i < tmpLinks.length; i++)
294
+ {
295
+ if (tmpLinks[i].getAttribute('data-route') === pRoute)
296
+ {
297
+ tmpLinks[i].classList.add('active');
298
+ }
299
+ else
300
+ {
301
+ tmpLinks[i].classList.remove('active');
302
+ }
303
+ }
304
+ }
305
+
306
+ _renderThemeGrid()
307
+ {
308
+ let tmpGrid = document.getElementById('Facto-Full-Settings-ThemeGrid');
309
+ if (!tmpGrid) return;
310
+
311
+ let tmpThemes = this.pict.PictApplication.getThemeList();
312
+ let tmpCurrentTheme = this.pict.AppData.Facto.CurrentTheme || 'facto-dark';
313
+
314
+ let tmpHtml = '';
315
+ for (let i = 0; i < tmpThemes.length; i++)
316
+ {
317
+ let tmpTheme = tmpThemes[i];
318
+ let tmpActiveClass = (tmpTheme.Key === tmpCurrentTheme) ? ' active' : '';
319
+ tmpHtml += '<div class="facto-theme-swatch' + tmpActiveClass + '" onclick="pict.views[\'Facto-Full-TopBar\'].selectTheme(\'' + tmpTheme.Key + '\')">';
320
+ tmpHtml += '<div class="facto-theme-swatch-colors">';
321
+ for (let c = 0; c < tmpTheme.Colors.length; c++)
322
+ {
323
+ tmpHtml += '<div class="facto-theme-swatch-dot" style="background:' + tmpTheme.Colors[c] + ';"></div>';
324
+ }
325
+ tmpHtml += '</div>';
326
+ tmpHtml += '<div class="facto-theme-swatch-label">' + tmpTheme.Label + '</div>';
327
+ tmpHtml += '</div>';
328
+ }
329
+ tmpGrid.innerHTML = tmpHtml;
330
+ }
331
+ }
332
+
333
+ module.exports = FactoFullTopBarView;
334
+
335
+ module.exports.default_configuration = _ViewConfiguration;
@@ -0,0 +1,71 @@
1
+ const MICRODDL_TYPE_MAP =
2
+ {
3
+ '@': { DataType: 'AutoIdentity', Label: 'Auto ID', HasSize: false },
4
+ '%': { DataType: 'GUID', Label: 'GUID', HasSize: false },
5
+ '$': { DataType: 'String', Label: 'String', HasSize: true },
6
+ '*': { DataType: 'Text', Label: 'Text', HasSize: false },
7
+ '#': { DataType: 'Numeric', Label: 'Numeric', HasSize: false },
8
+ '.': { DataType: 'Decimal', Label: 'Decimal', HasSize: true },
9
+ '&': { DataType: 'DateTime', Label: 'Date/Time', HasSize: false },
10
+ '^': { DataType: 'Boolean', Label: 'Boolean', HasSize: false }
11
+ };
12
+
13
+ const DATATYPE_TO_SYMBOL = {};
14
+ for (let tmpSymbol in MICRODDL_TYPE_MAP)
15
+ {
16
+ DATATYPE_TO_SYMBOL[MICRODDL_TYPE_MAP[tmpSymbol].DataType] = tmpSymbol;
17
+ }
18
+
19
+ function columnsToMicroDDL(pColumns, pTableName)
20
+ {
21
+ let tmpTableName = (pTableName || 'Untitled').replace(/[^a-zA-Z0-9_]/g, '');
22
+ let tmpLines = ['!' + tmpTableName];
23
+
24
+ for (let i = 0; i < pColumns.length; i++)
25
+ {
26
+ let tmpCol = pColumns[i];
27
+ let tmpSymbol = DATATYPE_TO_SYMBOL[tmpCol.DataType] || '$';
28
+ let tmpLine = tmpSymbol + (tmpCol.Name || 'Column' + i);
29
+
30
+ if (MICRODDL_TYPE_MAP[tmpSymbol].HasSize && tmpCol.Size)
31
+ {
32
+ tmpLine += ' ' + tmpCol.Size;
33
+ }
34
+
35
+ tmpLines.push(tmpLine);
36
+ }
37
+
38
+ return tmpLines.join('\n');
39
+ }
40
+
41
+ function microDDLToColumns(pDDL)
42
+ {
43
+ let tmpLines = pDDL.split('\n');
44
+ let tmpColumns = [];
45
+
46
+ for (let i = 0; i < tmpLines.length; i++)
47
+ {
48
+ let tmpLine = tmpLines[i].trim();
49
+ if (!tmpLine || tmpLine.startsWith('!') || tmpLine.startsWith('//') || tmpLine.startsWith('--') || tmpLine.startsWith('->'))
50
+ {
51
+ continue;
52
+ }
53
+
54
+ let tmpSymbol = tmpLine.charAt(0);
55
+ if (MICRODDL_TYPE_MAP.hasOwnProperty(tmpSymbol))
56
+ {
57
+ let tmpRest = tmpLine.substring(1).trim();
58
+ let tmpParts = tmpRest.split(/\s+/);
59
+ tmpColumns.push(
60
+ {
61
+ Name: tmpParts[0] || '',
62
+ DataType: MICRODDL_TYPE_MAP[tmpSymbol].DataType,
63
+ Size: tmpParts[1] || ''
64
+ });
65
+ }
66
+ }
67
+
68
+ return tmpColumns;
69
+ }
70
+
71
+ module.exports = { MICRODDL_TYPE_MAP, DATATYPE_TO_SYMBOL, columnsToMicroDDL, microDDLToColumns };