@datalabz_/dashboard-kit 6.0.1 → 6.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 (4) hide show
  1. package/package.json +1 -1
  2. package/v4.js +1 -1
  3. package/v5.js +1 -1
  4. package/v6.js +1 -32
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datalabz_/dashboard-kit",
3
- "version": "6.0.1",
3
+ "version": "6.0.2",
4
4
  "description": "DashboardKit runtime + styles, served from jsDelivr",
5
5
  "license": "UNLICENSED",
6
6
  "files": [
package/v4.js CHANGED
@@ -20,7 +20,7 @@
20
20
  let _activeTabId = '';
21
21
  let _sections = []; // { id, label, load, loaded, errors }
22
22
  let _title = '';
23
- let _gitVer = '83d917d'; // replaced at deploy: sed -i "s/83d917d/$(git rev-parse --short HEAD)/g" v4.js
23
+ let _gitVer = 'b3d1c2d'; // replaced at deploy: sed -i "s/b3d1c2d/$(git rev-parse --short HEAD)/g" v4.js
24
24
  let _calls = []; // System Info call log
25
25
  let _sectionErrors = {}; // sectionId → error count
26
26
  let _generation = 0;
package/v5.js CHANGED
@@ -20,7 +20,7 @@
20
20
  let _activeTabId = '';
21
21
  let _sections = []; // { id, label, load, loaded, errors }
22
22
  let _title = '';
23
- let _gitVer = '83d917d'; // replaced at deploy: sed -i "s/83d917d/$(git rev-parse --short HEAD)/g" v4.js
23
+ let _gitVer = 'b3d1c2d'; // replaced at deploy: sed -i "s/b3d1c2d/$(git rev-parse --short HEAD)/g" v4.js
24
24
  let _calls = []; // System Info call log
25
25
  let _sectionErrors = {}; // sectionId → error count
26
26
  let _generation = 0;
package/v6.js CHANGED
@@ -20,7 +20,7 @@
20
20
  let _activeTabId = '';
21
21
  let _sections = []; // { id, label, load, loaded, errors }
22
22
  let _title = '';
23
- let _gitVer = '83d917d'; // replaced at deploy: sed -i "s/83d917d/$(git rev-parse --short HEAD)/g" v6.js
23
+ let _gitVer = 'b3d1c2d'; // replaced at deploy: sed -i "s/b3d1c2d/$(git rev-parse --short HEAD)/g" v6.js
24
24
  let _calls = []; // System Info call log
25
25
  let _sectionErrors = {}; // sectionId → error count
26
26
  let _generation = 0;
@@ -1143,20 +1143,6 @@ details.dk-call summary::-webkit-details-marker {
1143
1143
  }
1144
1144
 
1145
1145
  // ── runQuery ──────────────────────────────────────────────────────────────────
1146
- // Text a `$n` can sit in without being a placeholder: 'USD $10', "col$1", comments,
1147
- // $tag$…$tag$ bodies. Blanked before counting, or a valid query is refused locally.
1148
- const NOT_SQL_CODE =
1149
- /'(?:[^']|'')*'|"(?:[^"]|"")*"|--[^\n]*|\/\*[\s\S]*?\*\/|\$([A-Za-z_]\w*)?\$[\s\S]*?\$\1\$/g;
1150
-
1151
- function _maxPlaceholder(sql) {
1152
- let m, max = 0;
1153
- // A `$n` glued to a word is an identifier ("price$1"), so it needs a non-word char before it.
1154
- const re = /(^|[^\w$])\$(\d+)/g;
1155
- const code = String(sql).replace(NOT_SQL_CODE, ' ');
1156
- while ((m = re.exec(code)) !== null) max = Math.max(max, +m[2]);
1157
- return max;
1158
- }
1159
-
1160
1146
  // One retry, only where _isRetryable says the same request may succeed.
1161
1147
  async function runQuery(sectionId, callLabel, sql, args, params) {
1162
1148
  const t0 = performance.now();
@@ -1172,23 +1158,6 @@ details.dk-call summary::-webkit-details-marker {
1172
1158
  };
1173
1159
  _calls.push(entry);
1174
1160
 
1175
- // Preflight: $n count vs args, after the log so it shows in System Info with its SQL.
1176
- // Never reaches the gateway, so no dkCall — it reports as kind 'script': the document
1177
- // is wrong. Never retried. `local` keeps it out of the CORS hint and the NET label.
1178
- const need = _maxPlaceholder(sql);
1179
- const got = (args || []).length;
1180
- if (need !== got) {
1181
- entry.state = 'error';
1182
- entry.local = true;
1183
- entry.clientMs = Math.round(performance.now() - t0);
1184
- entry.error =
1185
- 'SQL uses ' + (need ? '$1..$' + need : 'no placeholders') +
1186
- ' but received ' + got + ' arg' + (got === 1 ? '' : 's') +
1187
- ' — each query takes exactly the args its own placeholders use, never a shared array.';
1188
- _sectionErrors[sectionId] = (_sectionErrors[sectionId] || 0) + 1;
1189
- throw new Error(entry.error);
1190
- }
1191
-
1192
1161
  const body = { query: sql };
1193
1162
  if (args && args.length) body.args = args;
1194
1163
  if (params && params.hierarchy_id != null) body.hierarchy_id = params.hierarchy_id;