@telorun/templating 0.17.0 → 0.18.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/dist/engines/sql.d.ts.map +1 -1
- package/dist/engines/sql.js +7 -0
- package/package.json +2 -2
- package/src/engines/sql.ts +7 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sql.d.ts","sourceRoot":"","sources":["../../src/engines/sql.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAsB,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAG7F,OAAO,KAAK,EAIV,gBAAgB,EACjB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,kBAAkB,EAAE,KAAK,gBAAgB,EAAE,CAAC;AAErD;;;;;kFAKkF;AAClF,eAAO,MAAM,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"sql.d.ts","sourceRoot":"","sources":["../../src/engines/sql.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAsB,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAG7F,OAAO,KAAK,EAIV,gBAAgB,EACjB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,kBAAkB,EAAE,KAAK,gBAAgB,EAAE,CAAC;AAErD;;;;;kFAKkF;AAClF,eAAO,MAAM,SAAS,EAAE,gBA4CvB,CAAC"}
|
package/dist/engines/sql.js
CHANGED
|
@@ -16,6 +16,13 @@ export const sqlEngine = {
|
|
|
16
16
|
return {
|
|
17
17
|
__compiled: true,
|
|
18
18
|
source,
|
|
19
|
+
// The AST-derived root identifiers of every interpolation, carried through
|
|
20
|
+
// rather than dropped. `compileString` has already computed them one line
|
|
21
|
+
// above, and a consumer that asks a compiled value what it READS —
|
|
22
|
+
// a template body deciding which nodes survive its `init()` — otherwise
|
|
23
|
+
// falls back to scanning the source text, which cannot tell an identifier
|
|
24
|
+
// from a word inside a SQL string literal.
|
|
25
|
+
refs: typeof inner === "string" ? [] : inner.refs,
|
|
19
26
|
call: (ctx) => {
|
|
20
27
|
const { fragments, values } = toParameterized(inner, ctx);
|
|
21
28
|
return { __teloParameterized: true, fragments, values };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telorun/templating",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"description": "Telo Templating - Engine registry and shared CEL core for Telo manifests.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"telo",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@types/node": "^20.0.0",
|
|
45
45
|
"typescript": "^5.0.0",
|
|
46
46
|
"vitest": "^2.1.8",
|
|
47
|
-
"@telorun/sdk": "0.
|
|
47
|
+
"@telorun/sdk": "0.83.0"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"@telorun/sdk": "*"
|
package/src/engines/sql.ts
CHANGED
|
@@ -25,6 +25,13 @@ export const sqlEngine: TemplatingEngine = {
|
|
|
25
25
|
return {
|
|
26
26
|
__compiled: true,
|
|
27
27
|
source,
|
|
28
|
+
// The AST-derived root identifiers of every interpolation, carried through
|
|
29
|
+
// rather than dropped. `compileString` has already computed them one line
|
|
30
|
+
// above, and a consumer that asks a compiled value what it READS —
|
|
31
|
+
// a template body deciding which nodes survive its `init()` — otherwise
|
|
32
|
+
// falls back to scanning the source text, which cannot tell an identifier
|
|
33
|
+
// from a word inside a SQL string literal.
|
|
34
|
+
refs: typeof inner === "string" ? [] : (inner as CompiledValue).refs,
|
|
28
35
|
call: (ctx: Record<string, unknown>): ParameterizedSql => {
|
|
29
36
|
const { fragments, values } = toParameterized(inner, ctx);
|
|
30
37
|
return { __teloParameterized: true, fragments, values };
|