@stacksjs/defaults 0.70.173 → 0.70.176
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.
|
@@ -294,11 +294,15 @@ export default class QueryController extends Controller {
|
|
|
294
294
|
let query = db
|
|
295
295
|
.selectFrom('query_logs')
|
|
296
296
|
.select([
|
|
297
|
-
|
|
297
|
+
// `interval` and `timeConstraint` are chosen from the fixed set a
|
|
298
|
+
// few lines above, never from the request, so interpolating them
|
|
299
|
+
// into the fragment is safe. `sql.literal` does not exist on this
|
|
300
|
+
// tag, which is what made this a type error.
|
|
301
|
+
sql`strftime('${interval}', executed_at)`.as('time_interval'),
|
|
298
302
|
db.fn.count('id').as('count'),
|
|
299
303
|
db.fn.avg('duration').as('avg_duration'),
|
|
300
304
|
])
|
|
301
|
-
.whereRaw(sql`executed_at >= datetime("now", ${
|
|
305
|
+
.whereRaw(sql`executed_at >= datetime("now", '${timeConstraint}')`)
|
|
302
306
|
.groupBy('time_interval')
|
|
303
307
|
.orderBy('time_interval')
|
|
304
308
|
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@stacksjs/defaults",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "0.70.
|
|
5
|
+
"version": "0.70.176",
|
|
6
6
|
"description": "Default Stacks scaffold resources (views, layouts, components, preloader) — shipped so apps consuming the framework from node_modules get the same fallback resources a vendored checkout provides. Source of truth: storage/framework/defaults.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
8
8
|
"license": "MIT",
|