@materializeinc/sql-pretty 26.9.0-dev.0.20641 → 26.9.0-dev.0.20643
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/LICENSE +2 -2
- package/mz_sql_pretty_wasm.js +5 -1
- package/mz_sql_pretty_wasm_bg.js +70 -73
- package/mz_sql_pretty_wasm_bg.wasm +0 -0
- package/package.json +1 -1
package/LICENSE
CHANGED
|
@@ -13,7 +13,7 @@ Business Source License 1.1
|
|
|
13
13
|
|
|
14
14
|
Licensor: Materialize, Inc.
|
|
15
15
|
|
|
16
|
-
Licensed Work: Materialize Version
|
|
16
|
+
Licensed Work: Materialize Version 20260118
|
|
17
17
|
The Licensed Work is © 2026 Materialize, Inc.
|
|
18
18
|
|
|
19
19
|
Additional Use Grant: Within a single installation of the Licensed Work,
|
|
@@ -39,7 +39,7 @@ Additional Use Grant: Within a single installation of the Licensed Work,
|
|
|
39
39
|
whose definitions are controlled by such third
|
|
40
40
|
parties.
|
|
41
41
|
|
|
42
|
-
Change Date: January
|
|
42
|
+
Change Date: January 18, 2030
|
|
43
43
|
|
|
44
44
|
Change License: Apache License, Version 2.0
|
|
45
45
|
|
package/mz_sql_pretty_wasm.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
/* @ts-self-types="./mz_sql_pretty_wasm.d.ts" */
|
|
2
|
+
|
|
1
3
|
import * as wasm from "./mz_sql_pretty_wasm_bg.wasm";
|
|
2
|
-
export * from "./mz_sql_pretty_wasm_bg.js";
|
|
3
4
|
import { __wbg_set_wasm } from "./mz_sql_pretty_wasm_bg.js";
|
|
4
5
|
__wbg_set_wasm(wasm);
|
|
5
6
|
wasm.__wbindgen_start();
|
|
7
|
+
export {
|
|
8
|
+
prettyStr, prettyStrs
|
|
9
|
+
} from "./mz_sql_pretty_wasm_bg.js";
|
package/mz_sql_pretty_wasm_bg.js
CHANGED
|
@@ -1,8 +1,71 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Pretty prints one SQL query.
|
|
3
|
+
*
|
|
4
|
+
* Returns the pretty-printed query at the specified maximum target width. Returns an error if the
|
|
5
|
+
* SQL query is not parseable.
|
|
6
|
+
* @param {string} query
|
|
7
|
+
* @param {number} width
|
|
8
|
+
* @returns {string}
|
|
9
|
+
*/
|
|
10
|
+
export function prettyStr(query, width) {
|
|
11
|
+
let deferred3_0;
|
|
12
|
+
let deferred3_1;
|
|
13
|
+
try {
|
|
14
|
+
const ptr0 = passStringToWasm0(query, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
15
|
+
const len0 = WASM_VECTOR_LEN;
|
|
16
|
+
const ret = wasm.prettyStr(ptr0, len0, width);
|
|
17
|
+
var ptr2 = ret[0];
|
|
18
|
+
var len2 = ret[1];
|
|
19
|
+
if (ret[3]) {
|
|
20
|
+
ptr2 = 0; len2 = 0;
|
|
21
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
22
|
+
}
|
|
23
|
+
deferred3_0 = ptr2;
|
|
24
|
+
deferred3_1 = len2;
|
|
25
|
+
return getStringFromWasm0(ptr2, len2);
|
|
26
|
+
} finally {
|
|
27
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
28
|
+
}
|
|
4
29
|
}
|
|
5
30
|
|
|
31
|
+
/**
|
|
32
|
+
* Pretty prints many SQL queries.
|
|
33
|
+
*
|
|
34
|
+
* Returns the list of pretty-printed queries at the specified maximum target width. Returns an
|
|
35
|
+
* error if any SQL query is not parseable.
|
|
36
|
+
* @param {string} queries
|
|
37
|
+
* @param {number} width
|
|
38
|
+
* @returns {string[]}
|
|
39
|
+
*/
|
|
40
|
+
export function prettyStrs(queries, width) {
|
|
41
|
+
const ptr0 = passStringToWasm0(queries, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
42
|
+
const len0 = WASM_VECTOR_LEN;
|
|
43
|
+
const ret = wasm.prettyStrs(ptr0, len0, width);
|
|
44
|
+
if (ret[3]) {
|
|
45
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
46
|
+
}
|
|
47
|
+
var v2 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
48
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
49
|
+
return v2;
|
|
50
|
+
}
|
|
51
|
+
export function __wbg_Error_8c4e43fe74559d73(arg0, arg1) {
|
|
52
|
+
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
53
|
+
return ret;
|
|
54
|
+
}
|
|
55
|
+
export function __wbindgen_cast_0000000000000001(arg0, arg1) {
|
|
56
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
57
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
58
|
+
return ret;
|
|
59
|
+
}
|
|
60
|
+
export function __wbindgen_init_externref_table() {
|
|
61
|
+
const table = wasm.__wbindgen_externrefs;
|
|
62
|
+
const offset = table.grow(4);
|
|
63
|
+
table.set(0, undefined);
|
|
64
|
+
table.set(offset + 0, undefined);
|
|
65
|
+
table.set(offset + 1, null);
|
|
66
|
+
table.set(offset + 2, true);
|
|
67
|
+
table.set(offset + 3, false);
|
|
68
|
+
}
|
|
6
69
|
function getArrayJsValueFromWasm0(ptr, len) {
|
|
7
70
|
ptr = ptr >>> 0;
|
|
8
71
|
const mem = getDataViewMemory0();
|
|
@@ -102,79 +165,13 @@ if (!('encodeInto' in cachedTextEncoder)) {
|
|
|
102
165
|
read: arg.length,
|
|
103
166
|
written: buf.length
|
|
104
167
|
};
|
|
105
|
-
}
|
|
168
|
+
};
|
|
106
169
|
}
|
|
107
170
|
|
|
108
171
|
let WASM_VECTOR_LEN = 0;
|
|
109
172
|
|
|
110
|
-
/**
|
|
111
|
-
* Pretty prints one SQL query.
|
|
112
|
-
*
|
|
113
|
-
* Returns the pretty-printed query at the specified maximum target width. Returns an error if the
|
|
114
|
-
* SQL query is not parseable.
|
|
115
|
-
* @param {string} query
|
|
116
|
-
* @param {number} width
|
|
117
|
-
* @returns {string}
|
|
118
|
-
*/
|
|
119
|
-
export function prettyStr(query, width) {
|
|
120
|
-
let deferred3_0;
|
|
121
|
-
let deferred3_1;
|
|
122
|
-
try {
|
|
123
|
-
const ptr0 = passStringToWasm0(query, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
124
|
-
const len0 = WASM_VECTOR_LEN;
|
|
125
|
-
const ret = wasm.prettyStr(ptr0, len0, width);
|
|
126
|
-
var ptr2 = ret[0];
|
|
127
|
-
var len2 = ret[1];
|
|
128
|
-
if (ret[3]) {
|
|
129
|
-
ptr2 = 0; len2 = 0;
|
|
130
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
131
|
-
}
|
|
132
|
-
deferred3_0 = ptr2;
|
|
133
|
-
deferred3_1 = len2;
|
|
134
|
-
return getStringFromWasm0(ptr2, len2);
|
|
135
|
-
} finally {
|
|
136
|
-
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
173
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
* Returns the list of pretty-printed queries at the specified maximum target width. Returns an
|
|
144
|
-
* error if any SQL query is not parseable.
|
|
145
|
-
* @param {string} queries
|
|
146
|
-
* @param {number} width
|
|
147
|
-
* @returns {string[]}
|
|
148
|
-
*/
|
|
149
|
-
export function prettyStrs(queries, width) {
|
|
150
|
-
const ptr0 = passStringToWasm0(queries, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
151
|
-
const len0 = WASM_VECTOR_LEN;
|
|
152
|
-
const ret = wasm.prettyStrs(ptr0, len0, width);
|
|
153
|
-
if (ret[3]) {
|
|
154
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
155
|
-
}
|
|
156
|
-
var v2 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
157
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
158
|
-
return v2;
|
|
174
|
+
let wasm;
|
|
175
|
+
export function __wbg_set_wasm(val) {
|
|
176
|
+
wasm = val;
|
|
159
177
|
}
|
|
160
|
-
|
|
161
|
-
export function __wbg_Error_52673b7de5a0ca89(arg0, arg1) {
|
|
162
|
-
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
163
|
-
return ret;
|
|
164
|
-
};
|
|
165
|
-
|
|
166
|
-
export function __wbindgen_cast_2241b6af4c4b2941(arg0, arg1) {
|
|
167
|
-
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
168
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
169
|
-
return ret;
|
|
170
|
-
};
|
|
171
|
-
|
|
172
|
-
export function __wbindgen_init_externref_table() {
|
|
173
|
-
const table = wasm.__wbindgen_externrefs;
|
|
174
|
-
const offset = table.grow(4);
|
|
175
|
-
table.set(0, undefined);
|
|
176
|
-
table.set(offset + 0, undefined);
|
|
177
|
-
table.set(offset + 1, null);
|
|
178
|
-
table.set(offset + 2, true);
|
|
179
|
-
table.set(offset + 3, false);
|
|
180
|
-
};
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@materializeinc/sql-pretty",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"description": "The pretty printer for Materialize's SQL dialect, with wasm build targets.",
|
|
5
|
-
"version": "26.9.0-dev.0.
|
|
5
|
+
"version": "26.9.0-dev.0.20643",
|
|
6
6
|
"files": [
|
|
7
7
|
"mz_sql_pretty_wasm_bg.wasm",
|
|
8
8
|
"mz_sql_pretty_wasm.js",
|