create-dql-app 1.0.2 → 1.2.0
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/bin/create-dql-app.mjs
CHANGED
|
@@ -15,8 +15,8 @@ import { existsSync, mkdirSync, readdirSync, readFileSync, statSync, writeFileSy
|
|
|
15
15
|
import { dirname, join, resolve, basename, relative } from 'node:path';
|
|
16
16
|
import { fileURLToPath } from 'node:url';
|
|
17
17
|
|
|
18
|
-
const VERSION = '1.0.1';
|
|
19
18
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
19
|
+
const VERSION = JSON.parse(readFileSync(resolve(__dirname, '..', 'package.json'), 'utf-8')).version;
|
|
20
20
|
const TEMPLATES_DIR = resolve(__dirname, '..', 'templates');
|
|
21
21
|
|
|
22
22
|
// Tiny ANSI helpers — no dep on chalk/kleur so the bin runs before
|
package/package.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
+
"dqlnbVersion": 1,
|
|
2
3
|
"version": 1,
|
|
3
4
|
"metadata": {
|
|
4
5
|
"title": "{{PROJECT_NAME}} — Welcome",
|
|
@@ -11,9 +12,9 @@
|
|
|
11
12
|
"source": "# {{PROJECT_NAME}}\n\nWelcome to DQL. Connect a warehouse in `dql.config.json`, then edit the cell below."
|
|
12
13
|
},
|
|
13
14
|
{
|
|
15
|
+
"title": "First query",
|
|
14
16
|
"id": "first_query",
|
|
15
17
|
"type": "sql",
|
|
16
|
-
"title": "First query",
|
|
17
18
|
"source": "select 1 as hello"
|
|
18
19
|
}
|
|
19
20
|
]
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
+
"dqlnbVersion": 1,
|
|
2
3
|
"version": 1,
|
|
3
4
|
"metadata": {
|
|
4
5
|
"title": "{{PROJECT_NAME}} — Welcome",
|
|
@@ -11,21 +12,21 @@
|
|
|
11
12
|
"source": "# Welcome to {{PROJECT_NAME}}\n\nThis notebook runs against a DuckDB-backed Jaffle Shop dataset — the same demo data dbt ships.\n\n- Run each cell with `Cmd/Ctrl + Enter`.\n- Charts render inline from SQL results.\n- The certified block in cell 4 lives in `blocks/revenue_by_segment.dql` and can be reused across notebooks and dashboards."
|
|
12
13
|
},
|
|
13
14
|
{
|
|
15
|
+
"title": "Orders overview",
|
|
14
16
|
"id": "orders_overview",
|
|
15
17
|
"type": "sql",
|
|
16
|
-
"title": "Orders overview",
|
|
17
18
|
"source": "select\n count(*) as total_orders,\n count(distinct customer_id) as unique_customers,\n sum(amount) as lifetime_revenue\nfrom orders"
|
|
18
19
|
},
|
|
19
20
|
{
|
|
21
|
+
"title": "Daily revenue",
|
|
20
22
|
"id": "daily_revenue",
|
|
21
23
|
"type": "sql",
|
|
22
|
-
"title": "Daily revenue",
|
|
23
24
|
"source": "select\n order_date,\n sum(amount) as revenue\nfrom orders\ngroup by 1\norder by 1"
|
|
24
25
|
},
|
|
25
26
|
{
|
|
27
|
+
"title": "Revenue by segment (certified block)",
|
|
26
28
|
"id": "revenue_by_segment",
|
|
27
29
|
"type": "dql",
|
|
28
|
-
"title": "Revenue by segment (certified block)",
|
|
29
30
|
"source": "@block(\"Revenue by segment\")"
|
|
30
31
|
}
|
|
31
32
|
]
|