@sqg/sqg 0.16.0 → 0.17.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.
- package/dist/index.mjs +62 -5
- package/dist/sqg.mjs +67 -10
- package/dist/{ide-BieFvmwk.mjs → start-ui-DuHxwbjr.mjs} +8 -8
- package/dist/templates/java-jdbc.hbs +33 -2
- package/dist/ui-public/assets/index-Bt3dXI_J.js +45 -0
- package/dist/{ide-public → ui-public}/index.html +1 -1
- package/dist/{ide-server.mjs → ui-server.mjs} +52 -51
- package/package.json +43 -45
- package/dist/ide-public/assets/index-DPVATxCE.js +0 -45
- /package/dist/{ide-public → ui-public}/assets/index-DHD4h34g.css +0 -0
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
8
8
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
9
9
|
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&display=swap" rel="stylesheet" />
|
|
10
|
-
<script type="module" crossorigin src="/assets/index-
|
|
10
|
+
<script type="module" crossorigin src="/assets/index-Bt3dXI_J.js"></script>
|
|
11
11
|
<link rel="stylesheet" crossorigin href="/assets/index-DHD4h34g.css">
|
|
12
12
|
</head>
|
|
13
13
|
<body class="bg-gray-900 text-gray-100">
|
|
@@ -30270,8 +30270,8 @@ var require_vary = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
30270
30270
|
module.exports.parse = parse;
|
|
30271
30271
|
}));
|
|
30272
30272
|
//#endregion
|
|
30273
|
-
//#region ../../node_modules/.pnpm/@
|
|
30274
|
-
var
|
|
30273
|
+
//#region ../../node_modules/.pnpm/@fastify+cors@11.2.0/node_modules/@fastify/cors/index.js
|
|
30274
|
+
var require_cors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
30275
30275
|
const fp = require_plugin();
|
|
30276
30276
|
const { addAccessControlRequestHeadersToVaryHeader, addOriginToVaryHeader } = require_vary();
|
|
30277
30277
|
const defaultOptions = {
|
|
@@ -30456,8 +30456,11 @@ var import_cors = /* @__PURE__ */ __toESM$1((/* @__PURE__ */ __commonJSMin(((exp
|
|
|
30456
30456
|
module.exports = _fastifyCors;
|
|
30457
30457
|
module.exports.fastifyCors = _fastifyCors;
|
|
30458
30458
|
module.exports.default = _fastifyCors;
|
|
30459
|
-
}))
|
|
30459
|
+
}));
|
|
30460
|
+
//#endregion
|
|
30461
|
+
//#region ../../node_modules/.pnpm/@trpc+server@11.14.1_typescript@6.0.2/node_modules/@trpc/server/dist/codes-DagpWZLc.mjs
|
|
30460
30462
|
var import_fastify = /* @__PURE__ */ __toESM$1(require_fastify(), 1);
|
|
30463
|
+
var import_cors = /* @__PURE__ */ __toESM$1(require_cors(), 1);
|
|
30461
30464
|
/**
|
|
30462
30465
|
* Ensures there are no duplicate keys when building a procedure.
|
|
30463
30466
|
* @internal
|
|
@@ -30568,7 +30571,7 @@ const TRPC_ERROR_CODES_BY_NUMBER = {
|
|
|
30568
30571
|
};
|
|
30569
30572
|
TRPC_ERROR_CODES_BY_KEY.BAD_GATEWAY, TRPC_ERROR_CODES_BY_KEY.SERVICE_UNAVAILABLE, TRPC_ERROR_CODES_BY_KEY.GATEWAY_TIMEOUT, TRPC_ERROR_CODES_BY_KEY.INTERNAL_SERVER_ERROR;
|
|
30570
30573
|
//#endregion
|
|
30571
|
-
//#region ../../node_modules/.pnpm/@trpc+server@11.14.1_typescript@
|
|
30574
|
+
//#region ../../node_modules/.pnpm/@trpc+server@11.14.1_typescript@6.0.2/node_modules/@trpc/server/dist/getErrorShape-vC8mUXJD.mjs
|
|
30572
30575
|
var __create = Object.create;
|
|
30573
30576
|
var __defProp = Object.defineProperty;
|
|
30574
30577
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -30765,7 +30768,7 @@ function getErrorShape(opts) {
|
|
|
30765
30768
|
return config.errorFormatter((0, import_objectSpread2$6.default)((0, import_objectSpread2$6.default)({}, opts), {}, { shape }));
|
|
30766
30769
|
}
|
|
30767
30770
|
//#endregion
|
|
30768
|
-
//#region ../../node_modules/.pnpm/@trpc+server@11.14.1_typescript@
|
|
30771
|
+
//#region ../../node_modules/.pnpm/@trpc+server@11.14.1_typescript@6.0.2/node_modules/@trpc/server/dist/tracked-Bjtgv3wJ.mjs
|
|
30769
30772
|
const defaultFormatter = ({ shape }) => {
|
|
30770
30773
|
return shape;
|
|
30771
30774
|
};
|
|
@@ -31047,7 +31050,7 @@ function isTrackedEnvelope(value) {
|
|
|
31047
31050
|
return Array.isArray(value) && value[2] === trackedSymbol;
|
|
31048
31051
|
}
|
|
31049
31052
|
//#endregion
|
|
31050
|
-
//#region ../../node_modules/.pnpm/@trpc+server@11.14.1_typescript@
|
|
31053
|
+
//#region ../../node_modules/.pnpm/@trpc+server@11.14.1_typescript@6.0.2/node_modules/@trpc/server/dist/parseTRPCMessage-CTow-umk.mjs
|
|
31051
31054
|
const procedureTypes = [
|
|
31052
31055
|
"query",
|
|
31053
31056
|
"mutation",
|
|
@@ -31101,7 +31104,7 @@ function parseTRPCMessage(obj, transformer) {
|
|
|
31101
31104
|
};
|
|
31102
31105
|
}
|
|
31103
31106
|
//#endregion
|
|
31104
|
-
//#region ../../node_modules/.pnpm/@trpc+server@11.14.1_typescript@
|
|
31107
|
+
//#region ../../node_modules/.pnpm/@trpc+server@11.14.1_typescript@6.0.2/node_modules/@trpc/server/dist/observable-UMO3vUa_.mjs
|
|
31105
31108
|
/** @public */
|
|
31106
31109
|
function isObservable(x) {
|
|
31107
31110
|
return typeof x === "object" && x !== null && "subscribe" in x;
|
|
@@ -31174,7 +31177,7 @@ function observableToAsyncIterable(observable$1, signal) {
|
|
|
31174
31177
|
} };
|
|
31175
31178
|
}
|
|
31176
31179
|
//#endregion
|
|
31177
|
-
//#region ../../node_modules/.pnpm/@trpc+server@11.14.1_typescript@
|
|
31180
|
+
//#region ../../node_modules/.pnpm/@trpc+server@11.14.1_typescript@6.0.2/node_modules/@trpc/server/dist/resolveResponse-DbcCY-yX.mjs
|
|
31178
31181
|
function parseConnectionParamsFromUnknown(parsed) {
|
|
31179
31182
|
try {
|
|
31180
31183
|
if (parsed === null) return null;
|
|
@@ -32936,7 +32939,7 @@ async function resolveResponse(opts) {
|
|
|
32936
32939
|
}
|
|
32937
32940
|
}
|
|
32938
32941
|
//#endregion
|
|
32939
|
-
//#region ../../node_modules/.pnpm/@trpc+server@11.14.1_typescript@
|
|
32942
|
+
//#region ../../node_modules/.pnpm/@trpc+server@11.14.1_typescript@6.0.2/node_modules/@trpc/server/dist/initTRPC-RoZMIBeA.mjs
|
|
32940
32943
|
var import_objectSpread2$2$2 = __toESM(require_objectSpread2(), 1);
|
|
32941
32944
|
/** @internal */
|
|
32942
32945
|
const middlewareMarker = "middlewareMarker";
|
|
@@ -33250,7 +33253,7 @@ const initTRPC = new class TRPCBuilder {
|
|
|
33250
33253
|
}
|
|
33251
33254
|
}();
|
|
33252
33255
|
//#endregion
|
|
33253
|
-
//#region ../../node_modules/.pnpm/@trpc+server@11.14.1_typescript@
|
|
33256
|
+
//#region ../../node_modules/.pnpm/@trpc+server@11.14.1_typescript@6.0.2/node_modules/@trpc/server/dist/node-http-DZiUEwuh.mjs
|
|
33254
33257
|
function createBody(req, opts) {
|
|
33255
33258
|
if ("body" in req) {
|
|
33256
33259
|
if (req.body === void 0) return void 0;
|
|
@@ -33338,7 +33341,7 @@ function incomingMessageToRequest(req, res, opts) {
|
|
|
33338
33341
|
}
|
|
33339
33342
|
__toESM(require_objectSpread2(), 1);
|
|
33340
33343
|
//#endregion
|
|
33341
|
-
//#region ../../node_modules/.pnpm/@trpc+server@11.14.1_typescript@
|
|
33344
|
+
//#region ../../node_modules/.pnpm/@trpc+server@11.14.1_typescript@6.0.2/node_modules/@trpc/server/dist/ws-Dmi9HHSk.mjs
|
|
33342
33345
|
/**
|
|
33343
33346
|
* Default JSON encoder - used when no encoder is specified.
|
|
33344
33347
|
* This maintains backwards compatibility with existing behavior.
|
|
@@ -33763,7 +33766,7 @@ function handleKeepAlive(client, pingMs = 3e4, pongWaitMs = 5e3) {
|
|
|
33763
33766
|
schedulePing();
|
|
33764
33767
|
}
|
|
33765
33768
|
//#endregion
|
|
33766
|
-
//#region ../../node_modules/.pnpm/@trpc+server@11.14.1_typescript@
|
|
33769
|
+
//#region ../../node_modules/.pnpm/@trpc+server@11.14.1_typescript@6.0.2/node_modules/@trpc/server/dist/adapters/fastify/index.mjs
|
|
33767
33770
|
var import_objectSpread2$1 = __toESM(require_objectSpread2(), 1);
|
|
33768
33771
|
async function fastifyRequestHandler(opts) {
|
|
33769
33772
|
const createContext = async (innerOpts) => {
|
|
@@ -40047,7 +40050,7 @@ function getSpecializer(spec) {
|
|
|
40047
40050
|
return spec.get;
|
|
40048
40051
|
}
|
|
40049
40052
|
//#endregion
|
|
40050
|
-
//#region
|
|
40053
|
+
//#region ../shared/src/parser/cte-parser.ts
|
|
40051
40054
|
const parser = LRParser.deserialize({
|
|
40052
40055
|
version: 14,
|
|
40053
40056
|
states: "&fQVQPOOOkQPO'#ClO!SQPO'#C^OOQO'#Co'#CoOOQO'#Cw'#CwOOQO'#Cp'#CpQVQPOOO!_QPO,59WOOQO'#Cy'#CyOOQO'#Cr'#CrO!xQPO'#CjOOQO'#Cq'#CqO!VQPO,58xOOQO'#Cc'#CcO#PQPO'#CbO#UQPO,58xO!VQPO,58xOOQO-E6n-E6nOOQO1G.r1G.rOOQO-E6p-E6pOOQO-E6o-E6oO#pQPO1G.dO$[QPO,58|O!VQPO'#CsO#pQPO1G.dO!VQPO1G.dO$gQPO7+$OO%RQPO'#CfOOQO'#Cf'#CfOkQPO'#CiOOQO1G.h1G.hO$bQPO1G.hO!VQPO,59_OOQO,59_,59_OOQO-E6q-E6qO$gQPO7+$OOOQO,59Q,59QO%WQPO,59TOOQO7+$S7+$SOOQO1G.y1G.yO%]QPO<<GjOOQO1G.o1G.o",
|
|
@@ -40063,7 +40066,7 @@ const parser = LRParser.deserialize({
|
|
|
40063
40066
|
tokenPrec: 223
|
|
40064
40067
|
});
|
|
40065
40068
|
//#endregion
|
|
40066
|
-
//#region
|
|
40069
|
+
//#region ../shared/src/parser/cte-extractor.ts
|
|
40067
40070
|
/**
|
|
40068
40071
|
* CTE Extractor using Lezer parser
|
|
40069
40072
|
* Extracts Common Table Expression definitions from SQL queries
|
|
@@ -40152,6 +40155,13 @@ function extractCTEs(sql) {
|
|
|
40152
40155
|
//#endregion
|
|
40153
40156
|
//#region src/db/cte-helpers.ts
|
|
40154
40157
|
/**
|
|
40158
|
+
* Strip SQG annotations from SQL before execution.
|
|
40159
|
+
* Removes comment headers (-- QUERY, -- EXEC, etc.) and @set variable lines.
|
|
40160
|
+
*/
|
|
40161
|
+
function stripAnnotations(sql) {
|
|
40162
|
+
return sql.replace(/^\s*--\s*(QUERY|EXEC|MIGRATE|TESTDATA|TABLE)\s+.*/gm, "").replace(/@set\s+\w+\s*=\s*.+/g, "").trim();
|
|
40163
|
+
}
|
|
40164
|
+
/**
|
|
40155
40165
|
* Execute a specific CTE by reconstructing the query up to that CTE.
|
|
40156
40166
|
* Shared across all database adapters.
|
|
40157
40167
|
*/
|
|
@@ -40273,7 +40283,7 @@ function createDuckDBAdapter() {
|
|
|
40273
40283
|
return previewAllCTEsHelper(adapter, fullSql);
|
|
40274
40284
|
},
|
|
40275
40285
|
async executeSQLReadOnly(sql, applyLimit = true) {
|
|
40276
|
-
const cleanSql = sql
|
|
40286
|
+
const cleanSql = stripAnnotations(sql);
|
|
40277
40287
|
const conn = await getConnection();
|
|
40278
40288
|
await conn.run("BEGIN TRANSACTION");
|
|
40279
40289
|
try {
|
|
@@ -40286,12 +40296,12 @@ function createDuckDBAdapter() {
|
|
|
40286
40296
|
let migrationsRun = 0;
|
|
40287
40297
|
let testdataRun = 0;
|
|
40288
40298
|
for (const sql of migrations) {
|
|
40289
|
-
const cleanSql = sql
|
|
40299
|
+
const cleanSql = stripAnnotations(sql);
|
|
40290
40300
|
if (cleanSql) await adapter.executeSQL(cleanSql, false);
|
|
40291
40301
|
migrationsRun++;
|
|
40292
40302
|
}
|
|
40293
40303
|
for (const sql of testdata) {
|
|
40294
|
-
const cleanSql = sql
|
|
40304
|
+
const cleanSql = stripAnnotations(sql);
|
|
40295
40305
|
if (cleanSql) await adapter.executeSQL(cleanSql, false);
|
|
40296
40306
|
testdataRun++;
|
|
40297
40307
|
}
|
|
@@ -40378,10 +40388,11 @@ function createSQLiteAdapter() {
|
|
|
40378
40388
|
return previewAllCTEsHelper(adapter, fullSql);
|
|
40379
40389
|
},
|
|
40380
40390
|
async executeSQLReadOnly(sql, applyLimit = true) {
|
|
40391
|
+
const cleanSql = stripAnnotations(sql);
|
|
40381
40392
|
const database = getDb();
|
|
40382
40393
|
database.exec("SAVEPOINT sqg_readonly");
|
|
40383
40394
|
try {
|
|
40384
|
-
return await adapter.executeSQL(
|
|
40395
|
+
return await adapter.executeSQL(cleanSql, applyLimit);
|
|
40385
40396
|
} finally {
|
|
40386
40397
|
database.exec("ROLLBACK TO SAVEPOINT sqg_readonly");
|
|
40387
40398
|
database.exec("RELEASE SAVEPOINT sqg_readonly");
|
|
@@ -40392,12 +40403,12 @@ function createSQLiteAdapter() {
|
|
|
40392
40403
|
let testdataRun = 0;
|
|
40393
40404
|
const database = getDb();
|
|
40394
40405
|
for (const sql of migrations) {
|
|
40395
|
-
const cleanSql = sql
|
|
40406
|
+
const cleanSql = stripAnnotations(sql);
|
|
40396
40407
|
if (cleanSql) database.exec(cleanSql);
|
|
40397
40408
|
migrationsRun++;
|
|
40398
40409
|
}
|
|
40399
40410
|
for (const sql of testdata) {
|
|
40400
|
-
const cleanSql = sql
|
|
40411
|
+
const cleanSql = stripAnnotations(sql);
|
|
40401
40412
|
if (cleanSql) database.exec(cleanSql);
|
|
40402
40413
|
testdataRun++;
|
|
40403
40414
|
}
|
|
@@ -40478,10 +40489,11 @@ function createPostgresAdapter(connectionString) {
|
|
|
40478
40489
|
return previewAllCTEsHelper(adapter, fullSql);
|
|
40479
40490
|
},
|
|
40480
40491
|
async executeSQLReadOnly(sql, applyLimit = true) {
|
|
40492
|
+
const cleanSql = stripAnnotations(sql);
|
|
40481
40493
|
const p = getPool();
|
|
40482
40494
|
await p.query("SAVEPOINT sqg_readonly");
|
|
40483
40495
|
try {
|
|
40484
|
-
return await adapter.executeSQL(
|
|
40496
|
+
return await adapter.executeSQL(cleanSql, applyLimit);
|
|
40485
40497
|
} finally {
|
|
40486
40498
|
await p.query("ROLLBACK TO SAVEPOINT sqg_readonly");
|
|
40487
40499
|
await p.query("RELEASE SAVEPOINT sqg_readonly");
|
|
@@ -40492,12 +40504,12 @@ function createPostgresAdapter(connectionString) {
|
|
|
40492
40504
|
let testdataRun = 0;
|
|
40493
40505
|
const p = getPool();
|
|
40494
40506
|
for (const sql of migrations) {
|
|
40495
|
-
const cleanSql = sql
|
|
40507
|
+
const cleanSql = stripAnnotations(sql);
|
|
40496
40508
|
if (cleanSql) await p.query(cleanSql);
|
|
40497
40509
|
migrationsRun++;
|
|
40498
40510
|
}
|
|
40499
40511
|
for (const sql of testdata) {
|
|
40500
|
-
const cleanSql = sql
|
|
40512
|
+
const cleanSql = stripAnnotations(sql);
|
|
40501
40513
|
if (cleanSql) await p.query(cleanSql);
|
|
40502
40514
|
testdataRun++;
|
|
40503
40515
|
}
|
|
@@ -40635,7 +40647,8 @@ function parseProject(configPath) {
|
|
|
40635
40647
|
id: q.id,
|
|
40636
40648
|
order: parseInt(q.id.split("_")[1] || "0", 10) || 0,
|
|
40637
40649
|
sql: q.rawQuery,
|
|
40638
|
-
file
|
|
40650
|
+
file,
|
|
40651
|
+
line: q.line
|
|
40639
40652
|
});
|
|
40640
40653
|
else if (q.isTestdata) testdata.push(q.rawQuery);
|
|
40641
40654
|
else {
|
|
@@ -40653,14 +40666,16 @@ function parseProject(configPath) {
|
|
|
40653
40666
|
pluck: q.isPluck
|
|
40654
40667
|
},
|
|
40655
40668
|
variables: vars,
|
|
40656
|
-
file
|
|
40669
|
+
file,
|
|
40670
|
+
line: q.line
|
|
40657
40671
|
});
|
|
40658
40672
|
}
|
|
40659
40673
|
for (const t of parsed.tables) tables.push({
|
|
40660
40674
|
id: t.id,
|
|
40661
40675
|
tableName: t.tableName,
|
|
40662
40676
|
hasAppender: t.hasAppender,
|
|
40663
|
-
file
|
|
40677
|
+
file,
|
|
40678
|
+
line: t.line
|
|
40664
40679
|
});
|
|
40665
40680
|
}
|
|
40666
40681
|
migrations.sort((a, b) => a.order - b.order);
|
|
@@ -40796,39 +40811,25 @@ const appRouter = t.router({
|
|
|
40796
40811
|
const result = parseSQLQueries(tmpPath, []);
|
|
40797
40812
|
const lines = input.content.split("\n");
|
|
40798
40813
|
for (const q of result.queries) {
|
|
40799
|
-
const pattern = new RegExp(`^--\\s+${q.type}\\s+${q.id.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}\\b`);
|
|
40800
|
-
let line = 1;
|
|
40801
|
-
for (let i = 0; i < lines.length; i++) if (pattern.test(lines[i])) {
|
|
40802
|
-
line = i + 1;
|
|
40803
|
-
break;
|
|
40804
|
-
}
|
|
40805
40814
|
const vars = Object.fromEntries(q.variables);
|
|
40806
40815
|
const resolvedSql = q.rawQuery.replace(/\$\{(\w+)\}/g, (_, v) => vars[v] ?? `\${${v}}`);
|
|
40807
40816
|
annotations.push({
|
|
40808
40817
|
id: q.id,
|
|
40809
40818
|
type: q.type,
|
|
40810
|
-
line,
|
|
40819
|
+
line: q.line,
|
|
40811
40820
|
one: q.isOne,
|
|
40812
40821
|
pluck: q.isPluck,
|
|
40813
40822
|
sql: resolvedSql
|
|
40814
40823
|
});
|
|
40815
40824
|
}
|
|
40816
|
-
for (const t of result.tables) {
|
|
40817
|
-
|
|
40818
|
-
|
|
40819
|
-
|
|
40820
|
-
|
|
40821
|
-
|
|
40822
|
-
|
|
40823
|
-
|
|
40824
|
-
id: t.id,
|
|
40825
|
-
type: "TABLE",
|
|
40826
|
-
line,
|
|
40827
|
-
one: false,
|
|
40828
|
-
pluck: false,
|
|
40829
|
-
sql: ""
|
|
40830
|
-
});
|
|
40831
|
-
}
|
|
40825
|
+
for (const t of result.tables) annotations.push({
|
|
40826
|
+
id: t.id,
|
|
40827
|
+
type: "TABLE",
|
|
40828
|
+
line: t.line,
|
|
40829
|
+
one: false,
|
|
40830
|
+
pluck: false,
|
|
40831
|
+
sql: ""
|
|
40832
|
+
});
|
|
40832
40833
|
const validModifiers = [
|
|
40833
40834
|
":one",
|
|
40834
40835
|
":pluck",
|
|
@@ -41069,8 +41070,8 @@ if (projectPathRaw) {
|
|
|
41069
41070
|
const server = (0, import_fastify.default)({ logger: false });
|
|
41070
41071
|
const __dirname$1 = dirname(fileURLToPath(import.meta.url));
|
|
41071
41072
|
const staticDir = [
|
|
41072
|
-
join(__dirname$1, "
|
|
41073
|
-
join(__dirname$1, "../
|
|
41073
|
+
join(__dirname$1, "ui-public"),
|
|
41074
|
+
join(__dirname$1, "../ui-public"),
|
|
41074
41075
|
join(__dirname$1, "../../frontend/dist")
|
|
41075
41076
|
].find((d) => existsSync(join(d, "index.html")));
|
|
41076
41077
|
const MIME_TYPES = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sqg/sqg",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.2",
|
|
4
4
|
"description": "SQG - SQL Query Generator - Type-safe code generation from SQL (https://sqg.dev)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.mjs",
|
|
@@ -24,20 +24,6 @@
|
|
|
24
24
|
"bugs": {
|
|
25
25
|
"url": "https://github.com/sqg-dev/sqg/issues"
|
|
26
26
|
},
|
|
27
|
-
"scripts": {
|
|
28
|
-
"prepublishOnly": "pnpm run build",
|
|
29
|
-
"build": "tsc --noEmit && tsdown && cp -r src/templates dist && pnpm run build:ide",
|
|
30
|
-
"build:ide": "cd ../sql-ide/frontend && pnpx vite build && cd ../server && pnpx tsdown && cd ../../sqg && cp ../sql-ide/server/dist/index.mjs dist/ide-server.mjs && cp -r ../sql-ide/frontend/dist dist/ide-public",
|
|
31
|
-
"lezer-gen": "lezer-generator src/parser/sql.grammar -o src/parser/sql-parser.ts",
|
|
32
|
-
"test-grammar": "tsx src/test-grammar.ts",
|
|
33
|
-
"check": "biome check --write src/",
|
|
34
|
-
"check:errors": "pnpm biome check --write --diagnostic-level=error src/",
|
|
35
|
-
"test": "vitest",
|
|
36
|
-
"coverage": "vitest run --coverage",
|
|
37
|
-
"test:ui": "vitest --ui",
|
|
38
|
-
"test:run": "vitest run",
|
|
39
|
-
"sqg": "tsx src/sqg.ts"
|
|
40
|
-
},
|
|
41
27
|
"keywords": [
|
|
42
28
|
"sql",
|
|
43
29
|
"codegen",
|
|
@@ -55,45 +41,57 @@
|
|
|
55
41
|
],
|
|
56
42
|
"author": "Uwe Maurer",
|
|
57
43
|
"license": "Apache-2.0",
|
|
58
|
-
"packageManager": "pnpm@10.26.0",
|
|
59
44
|
"dependencies": {
|
|
60
|
-
"@biomejs/biome": "catalog:",
|
|
61
45
|
"@clack/prompts": "^1.1.0",
|
|
62
|
-
"@duckdb/node-api": "
|
|
63
|
-
"@
|
|
64
|
-
"@lezer
|
|
65
|
-
"@
|
|
66
|
-
"@lezer/generator": "catalog:",
|
|
67
|
-
"@lezer/lr": "catalog:",
|
|
68
|
-
"@modelcontextprotocol/sdk": "catalog:",
|
|
46
|
+
"@duckdb/node-api": "1.5.1-r.1",
|
|
47
|
+
"@lezer/common": "^1.5.1",
|
|
48
|
+
"@lezer/lr": "^1.4.8",
|
|
49
|
+
"@modelcontextprotocol/sdk": "^1.28.0",
|
|
69
50
|
"@testcontainers/postgresql": "^11.13.0",
|
|
70
|
-
"better-sqlite3": "
|
|
71
|
-
"commander": "
|
|
72
|
-
"consola": "
|
|
73
|
-
"dotenv": "
|
|
74
|
-
"es-toolkit": "
|
|
75
|
-
"handlebars": "
|
|
76
|
-
"pg": "
|
|
77
|
-
"pg-types": "
|
|
51
|
+
"better-sqlite3": "^12.8.0",
|
|
52
|
+
"commander": "^14.0.3",
|
|
53
|
+
"consola": "^3.4.2",
|
|
54
|
+
"dotenv": "^17.3.1",
|
|
55
|
+
"es-toolkit": "^1.45.1",
|
|
56
|
+
"handlebars": "^4.7.8",
|
|
57
|
+
"pg": "^8.20.0",
|
|
58
|
+
"pg-types": "^4.1.0",
|
|
78
59
|
"picocolors": "^1.1.1",
|
|
79
|
-
"prettier": "
|
|
80
|
-
"prettier-plugin-java": "
|
|
60
|
+
"prettier": "^3.8.1",
|
|
61
|
+
"prettier-plugin-java": "^2.8.1",
|
|
81
62
|
"update-notifier": "^7.3.1",
|
|
82
|
-
"yaml": "
|
|
63
|
+
"yaml": "^2.8.3",
|
|
83
64
|
"yocto-spinner": "^1.1.0",
|
|
84
|
-
"zod": "
|
|
65
|
+
"zod": "^4.3.6"
|
|
85
66
|
},
|
|
86
67
|
"devDependencies": {
|
|
68
|
+
"@biomejs/biome": "2.4.9",
|
|
69
|
+
"@duckdb/node-bindings-linux-x64": "1.5.1-r.1",
|
|
70
|
+
"@lezer-unofficial/printer": "^1.0.1",
|
|
71
|
+
"@lezer/generator": "^1.8.0",
|
|
87
72
|
"@libsql/client": "^0.17.2",
|
|
88
73
|
"@tursodatabase/database": "^0.5.1",
|
|
89
|
-
"@types/better-sqlite3": "
|
|
90
|
-
"@types/node": "
|
|
91
|
-
"@types/pg": "
|
|
74
|
+
"@types/better-sqlite3": "^7.6.13",
|
|
75
|
+
"@types/node": "^25.5.0",
|
|
76
|
+
"@types/pg": "^8.20.0",
|
|
92
77
|
"@types/update-notifier": "^6.0.8",
|
|
93
|
-
"@vitest/ui": "
|
|
94
|
-
"tsdown": "
|
|
95
|
-
"tsx": "
|
|
96
|
-
"typescript": "
|
|
97
|
-
"vitest": "
|
|
78
|
+
"@vitest/ui": "^4.1.1",
|
|
79
|
+
"tsdown": "0.21.5",
|
|
80
|
+
"tsx": "^4.21.0",
|
|
81
|
+
"typescript": "^6.0.2",
|
|
82
|
+
"vitest": "^4.1.2"
|
|
83
|
+
},
|
|
84
|
+
"scripts": {
|
|
85
|
+
"build": "tsc --noEmit && tsdown && cp -r src/templates dist && pnpm run build:ui",
|
|
86
|
+
"build:ui": "cd ../sqg-ui/frontend && pnpx vite build && cd ../server && pnpx tsdown && cd ../../sqg && cp ../sqg-ui/server/dist/index.mjs dist/ui-server.mjs && cp -r ../sqg-ui/frontend/dist dist/ui-public",
|
|
87
|
+
"lezer-gen": "lezer-generator src/parser/sql.grammar -o src/parser/sql-parser.ts",
|
|
88
|
+
"test-grammar": "tsx src/test-grammar.ts",
|
|
89
|
+
"check": "biome check --write src/",
|
|
90
|
+
"check:errors": "pnpm biome check --write --diagnostic-level=error src/",
|
|
91
|
+
"test": "vitest",
|
|
92
|
+
"coverage": "vitest run --coverage",
|
|
93
|
+
"test:ui": "vitest --ui",
|
|
94
|
+
"test:run": "vitest run",
|
|
95
|
+
"sqg": "tsx src/sqg.ts"
|
|
98
96
|
}
|
|
99
|
-
}
|
|
97
|
+
}
|