@akohn/dashql 0.0.19-dev.299.g3adbd8a4b → 0.0.19-dev.368.g7091b292b
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/README.md +1 -2
- package/dist/core/api.d.ts +25 -18
- package/dist/core/api.js +45 -46
- package/dist/core/connection.d.ts +1 -1
- package/dist/core/index.d.ts +0 -4
- package/dist/core/index.js +1 -4
- package/dist/core/runtime.d.ts +1 -1
- package/dist/core/workbook.d.ts +1 -1
- package/dist/platform/compute/arrow_formatter.d.ts +3 -1
- package/dist/platform/compute/arrow_formatter.js +23 -20
- package/dist/platform/compute/computation_types.d.ts +7 -12
- package/dist/platform/compute/computation_types.js +6 -3
- package/dist/platform/compute/query_result_search_sql.d.ts +0 -7
- package/dist/platform/compute/query_result_search_sql.js +1 -19
- package/dist/platform/connections/connection_params.d.ts +5 -6
- package/dist/platform/connections/connection_params.js +14 -25
- package/dist/platform/connections/connection_state.d.ts +1 -1
- package/dist/platform/connections/connector_configs.d.ts +2 -3
- package/dist/platform/connections/connector_info.d.ts +4 -14
- package/dist/platform/connections/connector_info.js +1 -25
- package/dist/platform/connections/embedded_database_channel.d.ts +3 -3
- package/dist/platform/connections/embedded_database_channel.js +12 -6
- package/dist/platform/connections/hyper/hyper_error_info.d.ts +0 -15
- package/dist/platform/connections/hyper/hyper_error_info.js +1 -18
- package/dist/platform/connections/query_execution.js +9 -7
- package/dist/platform/connections/query_execution_args.d.ts +2 -2
- package/dist/platform/http_client.d.ts +1 -1
- package/dist/platform/logger/logger.d.ts +3 -3
- package/dist/platform/query/query_execution_state.d.ts +11 -38
- package/dist/platform/query/query_execution_state.js +6 -1
- package/dist/platform/query/query_progress.d.ts +0 -14
- package/dist/platform/query/query_result_cache.d.ts +2 -2
- package/dist/platform/storage/composite_storage_backend.d.ts +64 -0
- package/dist/platform/storage/composite_storage_backend.js +321 -0
- package/dist/platform/storage/native_storage_backend.d.ts +1 -1
- package/dist/platform/storage/native_storage_backend.js +1 -1
- package/dist/platform/storage/opfs_query_result_cache.d.ts +0 -2
- package/dist/platform/storage/opfs_query_result_cache.js +3 -5
- package/dist/platform/storage/opfs_storage_backend.d.ts +67 -0
- package/dist/platform/storage/opfs_storage_backend.js +494 -0
- package/dist/platform/storage/workbook_locator.d.ts +7 -0
- package/dist/platform/storage/workbook_locator.js +14 -0
- package/dist/platform/storage/workbook_tables.d.ts +1 -4
- package/dist/platform/storage/workbook_tables.js +3 -17
- package/dist/platform/storage/workbook_transfer.d.ts +9 -0
- package/dist/platform/storage/workbook_transfer.js +84 -0
- package/dist/platform/storage/workbook_tree.d.ts +30 -9
- package/dist/platform/storage/workbook_tree.js +17 -96
- package/dist/platform/utils/base64.js +4 -4
- package/dist/platform/web_http_client.d.ts +1 -4
- package/dist/platform/web_http_client.js +0 -5
- package/dist/platform/workbook/attachment_mounts.d.ts +12 -4
- package/dist/platform/workbook/attachment_mounts.js +69 -60
- package/dist/platform/workbook/run_events.js +1 -1
- package/dist/platform/workbook/script_compilation.d.ts +0 -1
- package/dist/platform/workbook/script_compilation.js +1 -14
- package/dist/platform/workbook/script_reference_check.js +7 -6
- package/dist/platform/workbook/script_types.d.ts +1 -1
- package/dist/platform/workbook/script_types.js +1 -10
- package/dist/platform/workbook/workbook_execution.d.ts +0 -2
- package/dist/platform/workbook/workbook_execution.js +1 -4
- package/dist/platform/workbook/workbook_inputs.d.ts +7 -7
- package/dist/platform/workbook/workbook_inputs.js +4 -4
- package/dist/platform/workbook/workbook_scripts.d.ts +2 -2
- package/dist/runtime/compute_platform.js +2 -2
- package/dist/runtime/node/node_platform.js +1 -1
- package/dist/runtime/platform_requests.js +1 -1
- package/dist/runtime/query/query_channels.d.ts +0 -2
- package/dist/runtime/query/query_channels.js +36 -55
- package/dist/runtime/run_mounts.d.ts +2 -1
- package/dist/runtime/run_mounts.js +4 -5
- package/dist/runtime/runtime.d.ts +3 -0
- package/dist/runtime/runtime.js +10 -6
- package/dist/runtime/runtime_storage.d.ts +2 -5
- package/dist/runtime/runtime_storage.js +4 -13
- package/dist/runtime/workbook_projection.js +2 -2
- package/dist/runtime/workbook_run_report.d.ts +3 -6
- package/dist/runtime/workbook_run_report.js +33 -47
- package/dist/wasm/dashql_core.d.ts +2206 -1922
- package/dist/wasm/dashql_core.js +428 -223
- package/dist/wasm/dashql_core.wasm +0 -0
- package/dist/wasm/dashql_dataflow.wasm +0 -0
- package/package.json +1 -1
- package/dist/core/format.d.ts +0 -4
- package/dist/core/format.js +0 -23
- package/dist/core/lookup.d.ts +0 -10
- package/dist/core/lookup.js +0 -129
- package/dist/core/tokens.d.ts +0 -9
- package/dist/core/tokens.js +0 -78
- package/dist/core/variant.d.ts +0 -4
- package/dist/core/variant.js +0 -0
- package/dist/platform/connections/hyper/local_cloud.d.ts +0 -15
- package/dist/platform/connections/hyper/local_cloud.js +0 -14
- package/dist/platform/connections/query_channel.d.ts +0 -3
- package/dist/platform/connections/query_channel.js +0 -11
- package/dist/platform/hyper_link_target.d.ts +0 -8
- package/dist/platform/hyper_link_target.js +0 -35
- package/dist/platform/sql/sql_format.d.ts +0 -9
- package/dist/platform/sql/sql_format.js +0 -40
- package/dist/platform/sql/sql_lint.d.ts +0 -27
- package/dist/platform/sql/sql_lint.js +0 -69
- package/dist/platform/sql/sql_report.d.ts +0 -18
- package/dist/platform/sql/sql_report.js +0 -80
- package/dist/platform/storage/storage_versions.d.ts +0 -3
- package/dist/platform/storage/storage_versions.js +0 -13
- package/dist/platform/utils/async_consumer.d.ts +0 -14
- package/dist/platform/utils/async_consumer.js +0 -24
- package/dist/platform/workbook/attachment_mirror.d.ts +0 -2
- package/dist/platform/workbook/attachment_mirror.js +0 -25
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akohn/dashql",
|
|
3
|
-
"version": "0.0.19-dev.
|
|
3
|
+
"version": "0.0.19-dev.368.g7091b292b",
|
|
4
4
|
"description": "DashQL in TypeScript: the WebAssembly bindings of its SQL core, its runtime and the platforms of the runtime",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MPL-2.0",
|
package/dist/core/format.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import * as buffers from './buffers.js';
|
|
2
|
-
export declare function formatQualifiedTableName(q: buffers.analyzer.QualifiedTableName): string;
|
|
3
|
-
export declare function formatQualifiedColumnName(q: buffers.analyzer.QualifiedColumnName): string;
|
|
4
|
-
export declare function formatQualifiedFunctionName(q: buffers.analyzer.QualifiedFunctionName): string;
|
package/dist/core/format.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
// dist/.stage/src/core/format.ts
|
|
2
|
-
function formatQualifiedTableName(q) {
|
|
3
|
-
const schema = q.schemaName();
|
|
4
|
-
const table = q.tableName();
|
|
5
|
-
if (!table) return "";
|
|
6
|
-
if (schema) return `${schema}.${table}`;
|
|
7
|
-
return table;
|
|
8
|
-
}
|
|
9
|
-
function formatQualifiedColumnName(q) {
|
|
10
|
-
const alias = q.tableAlias();
|
|
11
|
-
const col = q.columnName();
|
|
12
|
-
if (!col) return "";
|
|
13
|
-
if (alias) return `${alias}.${col}`;
|
|
14
|
-
return col;
|
|
15
|
-
}
|
|
16
|
-
function formatQualifiedFunctionName(q) {
|
|
17
|
-
const schema = q.schemaName();
|
|
18
|
-
const fn = q.functionName();
|
|
19
|
-
if (!fn) return "";
|
|
20
|
-
if (schema) return `${schema}.${fn}`;
|
|
21
|
-
return fn;
|
|
22
|
-
}
|
|
23
|
-
export { formatQualifiedColumnName, formatQualifiedFunctionName, formatQualifiedTableName };
|
package/dist/core/lookup.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as buffers from './buffers.js';
|
|
2
|
-
export declare function findScriptTableRefsLowerBound(script: buffers.analyzer.AnalyzedScript, tmp: buffers.analyzer.IndexedTableReference, begin: number, end: number, targetDb: number, targetSchema: number, targetTable: bigint): number;
|
|
3
|
-
export declare function findScriptTableRefsUpperBound(script: buffers.analyzer.AnalyzedScript, tmp: buffers.analyzer.IndexedTableReference, begin: number, end: number, targetDb: number, targetSchema: number, targetTable: bigint): number;
|
|
4
|
-
export declare function findScriptTableRefsEqualRange(script: buffers.analyzer.AnalyzedScript, targetDb: number, targetSchema?: number | null, targetTable?: bigint | null, tmp?: buffers.analyzer.IndexedTableReference): [number, number];
|
|
5
|
-
export declare function findScriptColumnRefsLowerBound(script: buffers.analyzer.AnalyzedScript, tmp: buffers.analyzer.IndexedColumnReference, begin: number, end: number, targetDb: number, targetSchema: number, targetTable: bigint, columnId: number): number;
|
|
6
|
-
export declare function findScriptColumnRefsUpperBound(script: buffers.analyzer.AnalyzedScript, tmp: buffers.analyzer.IndexedColumnReference, begin: number, end: number, targetDb: number, targetSchema: number, targetTable: bigint, columnId: number): number;
|
|
7
|
-
export declare function findScriptColumnRefsEqualRange(script: buffers.analyzer.AnalyzedScript, targetDb: number, targetSchema?: number | null, targetTable?: bigint | null, columnId?: number | null, tmp?: buffers.analyzer.IndexedColumnReference): [number, number];
|
|
8
|
-
export declare function findCatalogDatabaseById(catalog: buffers.catalog.FlatCatalog, databaseId: number, tmp?: buffers.catalog.IndexedFlatDatabaseEntry): number | null;
|
|
9
|
-
export declare function findCatalogSchemaById(catalog: buffers.catalog.FlatCatalog, schemaId: number, tmp?: buffers.catalog.IndexedFlatSchemaEntry): number | null;
|
|
10
|
-
export declare function findCatalogTableById(catalog: buffers.catalog.FlatCatalog, tableId: bigint, tmp?: buffers.catalog.IndexedFlatTableEntry): number | null;
|
package/dist/core/lookup.js
DELETED
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
import { IndexedColumnReference } from "../gen/flatbuffers/dashql/buffers/analyzer/indexed-column-reference.js";
|
|
2
|
-
import { IndexedTableReference } from "../gen/flatbuffers/dashql/buffers/analyzer/indexed-table-reference.js";
|
|
3
|
-
import { IndexedFlatDatabaseEntry } from "../gen/flatbuffers/dashql/buffers/catalog/indexed-flat-database-entry.js";
|
|
4
|
-
import { IndexedFlatSchemaEntry } from "../gen/flatbuffers/dashql/buffers/catalog/indexed-flat-schema-entry.js";
|
|
5
|
-
import { IndexedFlatTableEntry } from "../gen/flatbuffers/dashql/buffers/catalog/indexed-flat-table-entry.js";
|
|
6
|
-
import "./buffers.js";
|
|
7
|
-
// dist/.stage/src/core/lookup.ts
|
|
8
|
-
function findScriptTableRefsLowerBound(script, tmp, begin, end, targetDb, targetSchema, targetTable) {
|
|
9
|
-
while (begin < end) {
|
|
10
|
-
const m = begin + (end - begin >> 1);
|
|
11
|
-
const midRef = script.resolvedTableReferencesById(m, tmp);
|
|
12
|
-
if (midRef == null) return end;
|
|
13
|
-
if (midRef.catalogDatabaseId() == targetDb) {
|
|
14
|
-
if (midRef.catalogSchemaId() == targetSchema) {
|
|
15
|
-
if (midRef.catalogTableId() < targetTable) begin = m + 1;
|
|
16
|
-
else end = m;
|
|
17
|
-
} else if (midRef.catalogSchemaId() < targetSchema) begin = m + 1;
|
|
18
|
-
else end = m;
|
|
19
|
-
} else if (midRef.catalogDatabaseId() < targetDb) begin = m + 1;
|
|
20
|
-
else end = m;
|
|
21
|
-
}
|
|
22
|
-
return end;
|
|
23
|
-
}
|
|
24
|
-
function findScriptTableRefsUpperBound(script, tmp, begin, end, targetDb, targetSchema, targetTable) {
|
|
25
|
-
while (begin < end) {
|
|
26
|
-
const m = begin + (end - begin >> 1);
|
|
27
|
-
const midRef = script.resolvedTableReferencesById(m, tmp);
|
|
28
|
-
if (midRef == null) return end;
|
|
29
|
-
if (midRef.catalogDatabaseId() == targetDb) {
|
|
30
|
-
if (midRef.catalogSchemaId() == targetSchema) {
|
|
31
|
-
if (midRef.catalogTableId() <= targetTable) begin = m + 1;
|
|
32
|
-
else end = m;
|
|
33
|
-
} else if (midRef.catalogSchemaId() < targetSchema) begin = m + 1;
|
|
34
|
-
else end = m;
|
|
35
|
-
} else if (midRef.catalogDatabaseId() < targetDb) begin = m + 1;
|
|
36
|
-
else end = m;
|
|
37
|
-
}
|
|
38
|
-
return end;
|
|
39
|
-
}
|
|
40
|
-
function findScriptTableRefsEqualRange(script, targetDb, targetSchema = null, targetTable = null, tmp = new IndexedTableReference()) {
|
|
41
|
-
const begin = 0;
|
|
42
|
-
const end = script.resolvedTableReferencesByIdLength();
|
|
43
|
-
const lb = findScriptTableRefsLowerBound(script, tmp, begin, end, targetDb, targetSchema ?? 0, targetTable ?? 0n);
|
|
44
|
-
return [lb, findScriptTableRefsUpperBound(script, tmp, lb, end, targetDb, targetSchema ?? Number.MAX_SAFE_INTEGER, targetTable ?? 18446744073709551615n)];
|
|
45
|
-
}
|
|
46
|
-
function findScriptColumnRefsLowerBound(script, tmp, begin, end, targetDb, targetSchema, targetTable, columnId) {
|
|
47
|
-
while (begin < end) {
|
|
48
|
-
const m = begin + (end - begin >> 1);
|
|
49
|
-
const midRef = script.resolvedColumnReferencesById(m, tmp);
|
|
50
|
-
if (midRef == null) return end;
|
|
51
|
-
if (midRef.catalogDatabaseId() == targetDb) {
|
|
52
|
-
if (midRef.catalogSchemaId() == targetSchema) {
|
|
53
|
-
if (midRef.catalogTableId() == targetTable) {
|
|
54
|
-
if (midRef.tableColumnId() < columnId) begin = m + 1;
|
|
55
|
-
else end = m;
|
|
56
|
-
} else if (midRef.catalogTableId() < targetTable) begin = m + 1;
|
|
57
|
-
else end = m;
|
|
58
|
-
} else if (midRef.catalogSchemaId() < targetSchema) begin = m + 1;
|
|
59
|
-
else end = m;
|
|
60
|
-
} else if (midRef.catalogDatabaseId() < targetDb) begin = m + 1;
|
|
61
|
-
else end = m;
|
|
62
|
-
}
|
|
63
|
-
return end;
|
|
64
|
-
}
|
|
65
|
-
function findScriptColumnRefsUpperBound(script, tmp, begin, end, targetDb, targetSchema, targetTable, columnId) {
|
|
66
|
-
while (begin < end) {
|
|
67
|
-
const m = begin + (end - begin >> 1);
|
|
68
|
-
const midRef = script.resolvedColumnReferencesById(m, tmp);
|
|
69
|
-
if (midRef == null) return end;
|
|
70
|
-
if (midRef.catalogDatabaseId() == targetDb) {
|
|
71
|
-
if (midRef.catalogSchemaId() == targetSchema) {
|
|
72
|
-
if (midRef.catalogTableId() == targetTable) {
|
|
73
|
-
if (midRef.tableColumnId() <= columnId) begin = m + 1;
|
|
74
|
-
else end = m;
|
|
75
|
-
} else if (midRef.catalogTableId() < targetTable) begin = m + 1;
|
|
76
|
-
else end = m;
|
|
77
|
-
} else if (midRef.catalogSchemaId() < targetSchema) begin = m + 1;
|
|
78
|
-
else end = m;
|
|
79
|
-
} else if (midRef.catalogDatabaseId() < targetDb) begin = m + 1;
|
|
80
|
-
else end = m;
|
|
81
|
-
}
|
|
82
|
-
return end;
|
|
83
|
-
}
|
|
84
|
-
function findScriptColumnRefsEqualRange(script, targetDb, targetSchema = null, targetTable = null, columnId = null, tmp = new IndexedColumnReference()) {
|
|
85
|
-
const begin = 0;
|
|
86
|
-
const end = script.resolvedColumnReferencesByIdLength();
|
|
87
|
-
const lb = findScriptColumnRefsLowerBound(script, tmp, begin, end, targetDb, targetSchema ?? 0, targetTable ?? 0n, columnId ?? 0);
|
|
88
|
-
return [lb, findScriptColumnRefsUpperBound(script, tmp, lb, end, targetDb, targetSchema ?? Number.MAX_SAFE_INTEGER, targetTable ?? 18446744073709551615n, columnId ?? Number.MAX_SAFE_INTEGER)];
|
|
89
|
-
}
|
|
90
|
-
function findCatalogDatabaseById(catalog, databaseId, tmp = new IndexedFlatDatabaseEntry()) {
|
|
91
|
-
let begin = 0;
|
|
92
|
-
let end = catalog.databasesByIdLength();
|
|
93
|
-
while (begin < end) {
|
|
94
|
-
const m = begin + (end - begin >> 1);
|
|
95
|
-
const midRef = catalog.databasesById(m, tmp);
|
|
96
|
-
if (midRef == null) return null;
|
|
97
|
-
if (midRef.databaseId() == databaseId) return midRef.flatEntryIdx();
|
|
98
|
-
else if (midRef.databaseId() < databaseId) begin = m + 1;
|
|
99
|
-
else end = m;
|
|
100
|
-
}
|
|
101
|
-
return null;
|
|
102
|
-
}
|
|
103
|
-
function findCatalogSchemaById(catalog, schemaId, tmp = new IndexedFlatSchemaEntry()) {
|
|
104
|
-
let begin = 0;
|
|
105
|
-
let end = catalog.schemasByIdLength();
|
|
106
|
-
while (begin < end) {
|
|
107
|
-
const m = begin + (end - begin >> 1);
|
|
108
|
-
const midRef = catalog.schemasById(m, tmp);
|
|
109
|
-
if (midRef == null) return null;
|
|
110
|
-
if (midRef.schemaId() == schemaId) return midRef.flatEntryIdx();
|
|
111
|
-
else if (midRef.schemaId() < schemaId) begin = m + 1;
|
|
112
|
-
else end = m;
|
|
113
|
-
}
|
|
114
|
-
return null;
|
|
115
|
-
}
|
|
116
|
-
function findCatalogTableById(catalog, tableId, tmp = new IndexedFlatTableEntry()) {
|
|
117
|
-
let begin = 0;
|
|
118
|
-
let end = catalog.tablesByIdLength();
|
|
119
|
-
while (begin < end) {
|
|
120
|
-
const m = begin + (end - begin >> 1);
|
|
121
|
-
const midRef = catalog.tablesById(m, tmp);
|
|
122
|
-
if (midRef == null) return null;
|
|
123
|
-
if (midRef.tableId() == tableId) return midRef.flatEntryIdx();
|
|
124
|
-
else if (midRef.tableId() < tableId) begin = m + 1;
|
|
125
|
-
else end = m;
|
|
126
|
-
}
|
|
127
|
-
return null;
|
|
128
|
-
}
|
|
129
|
-
export { findCatalogDatabaseById, findCatalogSchemaById, findCatalogTableById, findScriptColumnRefsEqualRange, findScriptColumnRefsLowerBound, findScriptColumnRefsUpperBound, findScriptTableRefsEqualRange, findScriptTableRefsLowerBound, findScriptTableRefsUpperBound };
|
package/dist/core/tokens.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as buffers from './buffers.js';
|
|
2
|
-
export declare function findClosestToken(hl: buffers.parser.ScannerTokens, pos: number): number | null;
|
|
3
|
-
export declare function findTokensInRange(hl: buffers.parser.ScannerTokens, begin: number, end: number): [number, number];
|
|
4
|
-
export declare function resolveSymbolSpan(tokens: buffers.parser.ScannerTokens, span: buffers.parser.SymbolSpan): {
|
|
5
|
-
offset: number;
|
|
6
|
-
length: number;
|
|
7
|
-
};
|
|
8
|
-
export declare function findTokensAtTextSpan(hl: buffers.parser.ScannerTokens, offset: number, length: number): [number, number];
|
|
9
|
-
export declare function getScannerTokenTypeName(token: buffers.parser.ScannerTokenType): "none" | "keyword" | "literal(binary)" | "literal(boolean)" | "literal(float)" | "literal(hex)" | "literal(integer)" | "literal(string)" | "operator" | "identifier" | "comment" | "dot" | "dot(trailing)" | "?";
|
package/dist/core/tokens.js
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { ScannerTokenType } from "../gen/flatbuffers/dashql/buffers/parser/scanner-token-type.js";
|
|
2
|
-
import "./buffers.js";
|
|
3
|
-
// dist/.stage/src/core/tokens.ts
|
|
4
|
-
function lowerBound(values, target, begin, end) {
|
|
5
|
-
let count = end - begin;
|
|
6
|
-
while (count > 0) {
|
|
7
|
-
const step = count >>> 1;
|
|
8
|
-
const it = begin + step;
|
|
9
|
-
if (values[it] < target) {
|
|
10
|
-
begin = it + 1;
|
|
11
|
-
count -= step + 1;
|
|
12
|
-
} else count = step;
|
|
13
|
-
}
|
|
14
|
-
return begin;
|
|
15
|
-
}
|
|
16
|
-
function findClosestToken(hl, pos) {
|
|
17
|
-
const offsets = hl.tokenOffsetsArray();
|
|
18
|
-
if ((offsets?.length ?? 0) === 0) return null;
|
|
19
|
-
else {
|
|
20
|
-
let rightIdx = lowerBound(offsets, pos, 0, offsets.length);
|
|
21
|
-
let leftIdx = rightIdx > 0 ? rightIdx - 1 : rightIdx;
|
|
22
|
-
const right = offsets[rightIdx];
|
|
23
|
-
const left = offsets[leftIdx];
|
|
24
|
-
if (Math.abs(right - pos) < Math.abs(left - pos)) return rightIdx;
|
|
25
|
-
else return leftIdx;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
function findTokensInRange(hl, begin, end) {
|
|
29
|
-
const offsets = hl.tokenOffsetsArray();
|
|
30
|
-
if ((offsets?.length ?? 0) === 0) return [0, 0];
|
|
31
|
-
let lb = lowerBound(offsets, begin, 0, offsets.length);
|
|
32
|
-
lb = offsets[lb] > begin && lb > 0 ? lb - 1 : lb;
|
|
33
|
-
const ub = lowerBound(offsets, end, lb, offsets.length);
|
|
34
|
-
return [lb, ub];
|
|
35
|
-
}
|
|
36
|
-
function resolveSymbolSpan(tokens, span) {
|
|
37
|
-
if (span.length() === 0) {
|
|
38
|
-
if (span.offset() >= tokens.tokenOffsetsLength()) return {
|
|
39
|
-
offset: 0,
|
|
40
|
-
length: 0
|
|
41
|
-
};
|
|
42
|
-
return {
|
|
43
|
-
offset: tokens.tokenOffsets(span.offset()) ?? 0,
|
|
44
|
-
length: 0
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
const first = span.offset();
|
|
48
|
-
const last = first + span.length() - 1;
|
|
49
|
-
const begin = tokens.tokenOffsets(first) ?? 0;
|
|
50
|
-
return {
|
|
51
|
-
offset: begin,
|
|
52
|
-
length: (tokens.tokenOffsets(last) ?? 0) + (tokens.tokenLengths(last) ?? 0) - begin
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
function findTokensAtTextSpan(hl, offset, length) {
|
|
56
|
-
if (!hl || hl.tokenOffsetsLength() === 0) return [0, 0];
|
|
57
|
-
const [lb, ub] = findTokensInRange(hl, offset, offset + length);
|
|
58
|
-
return [lb, ub];
|
|
59
|
-
}
|
|
60
|
-
function getScannerTokenTypeName(token) {
|
|
61
|
-
switch (token) {
|
|
62
|
-
case ScannerTokenType.NONE: return "none";
|
|
63
|
-
case ScannerTokenType.KEYWORD: return "keyword";
|
|
64
|
-
case ScannerTokenType.LITERAL_BINARY: return "literal(binary)";
|
|
65
|
-
case ScannerTokenType.LITERAL_BOOLEAN: return "literal(boolean)";
|
|
66
|
-
case ScannerTokenType.LITERAL_FLOAT: return "literal(float)";
|
|
67
|
-
case ScannerTokenType.LITERAL_HEX: return "literal(hex)";
|
|
68
|
-
case ScannerTokenType.LITERAL_INTEGER: return "literal(integer)";
|
|
69
|
-
case ScannerTokenType.LITERAL_STRING: return "literal(string)";
|
|
70
|
-
case ScannerTokenType.OPERATOR: return "operator";
|
|
71
|
-
case ScannerTokenType.IDENTIFIER: return "identifier";
|
|
72
|
-
case ScannerTokenType.COMMENT: return "comment";
|
|
73
|
-
case ScannerTokenType.DOT: return "dot";
|
|
74
|
-
case ScannerTokenType.DOT_TRAILING: return "dot(trailing)";
|
|
75
|
-
default: return "?";
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
export { findClosestToken, findTokensAtTextSpan, findTokensInRange, getScannerTokenTypeName, resolveSymbolSpan };
|
package/dist/core/variant.d.ts
DELETED
package/dist/core/variant.js
DELETED
|
File without changes
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare const LOCAL_CLOUD_DATABASE: {
|
|
2
|
-
path: string;
|
|
3
|
-
alias: string;
|
|
4
|
-
};
|
|
5
|
-
export interface HyperParamsLike {
|
|
6
|
-
protocol?: string;
|
|
7
|
-
attachedDatabases?: readonly {
|
|
8
|
-
path?: string;
|
|
9
|
-
alias?: string;
|
|
10
|
-
}[];
|
|
11
|
-
}
|
|
12
|
-
export declare function embeddedCloudDatabases(hyper: HyperParamsLike | null | undefined): {
|
|
13
|
-
path: string;
|
|
14
|
-
alias: string;
|
|
15
|
-
}[];
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { HYPER_CLOUDS_DIRECTORY } from "../../hyperdb/hyperdb_opfs_instance.js";
|
|
2
|
-
// dist/.stage/src/platform/connections/hyper/local_cloud.ts
|
|
3
|
-
var LOCAL_CLOUD_DATABASE = {
|
|
4
|
-
path: `${HYPER_CLOUDS_DIRECTORY}/local.hyper`,
|
|
5
|
-
alias: "dashql"
|
|
6
|
-
};
|
|
7
|
-
function embeddedCloudDatabases(hyper) {
|
|
8
|
-
if (hyper == null || (hyper.protocol ?? "WASM") !== "WASM") return [];
|
|
9
|
-
return (hyper.attachedDatabases ?? []).filter((database) => database.path?.startsWith(`clouds/`) && database.alias).map((database) => ({
|
|
10
|
-
path: database.path,
|
|
11
|
-
alias: database.alias
|
|
12
|
-
}));
|
|
13
|
-
}
|
|
14
|
-
export { LOCAL_CLOUD_DATABASE, embeddedCloudDatabases };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { salesforce_hyperdb_grpc_v1 } from "../proto.js";
|
|
2
|
-
import * as buf from "@bufbuild/protobuf";
|
|
3
|
-
// dist/.stage/src/platform/connections/query_channel.ts
|
|
4
|
-
function requireChannel(channel, connector) {
|
|
5
|
-
if (channel == null) throw new Error(`${connector} channel is not set up`);
|
|
6
|
-
return channel;
|
|
7
|
-
}
|
|
8
|
-
function queryParam(text) {
|
|
9
|
-
return buf.create(salesforce_hyperdb_grpc_v1.pb.QueryParamSchema, { query: text });
|
|
10
|
-
}
|
|
11
|
-
export { queryParam, requireChannel };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type * as connection from '../gen/jsonschema/connection.js';
|
|
2
|
-
export interface HyperLinkTarget {
|
|
3
|
-
endpoint: string;
|
|
4
|
-
token: string;
|
|
5
|
-
}
|
|
6
|
-
export declare function parseHyperLinkTarget(endpoint: string | null, token: string | null): HyperLinkTarget | null;
|
|
7
|
-
export declare function isLoopbackHyperLink(target: HyperLinkTarget): boolean;
|
|
8
|
-
export declare function hyperLinkChannelParams(params: connection.HyperConnectionParams, token: string): connection.HyperConnectionParams;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
// dist/.stage/src/platform/hyper_link_target.ts
|
|
2
|
-
var LOOPBACK_HOSTS = /* @__PURE__ */ new Set([
|
|
3
|
-
"127.0.0.1",
|
|
4
|
-
"localhost",
|
|
5
|
-
"[::1]"
|
|
6
|
-
]);
|
|
7
|
-
function parseHyperLinkTarget(endpoint, token) {
|
|
8
|
-
if (endpoint == null || token == null || token.length === 0) return null;
|
|
9
|
-
let url;
|
|
10
|
-
try {
|
|
11
|
-
url = new URL(endpoint);
|
|
12
|
-
} catch {
|
|
13
|
-
return null;
|
|
14
|
-
}
|
|
15
|
-
if (url.protocol !== "https:" && !(url.protocol === "http:" && LOOPBACK_HOSTS.has(url.hostname))) return null;
|
|
16
|
-
return {
|
|
17
|
-
endpoint: url.origin,
|
|
18
|
-
token
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
function isLoopbackHyperLink(target) {
|
|
22
|
-
return LOOPBACK_HOSTS.has(new URL(target.endpoint).hostname);
|
|
23
|
-
}
|
|
24
|
-
function hyperLinkChannelParams(params, token) {
|
|
25
|
-
return {
|
|
26
|
-
...params,
|
|
27
|
-
protocol: "V3_HTTP",
|
|
28
|
-
metadata: {
|
|
29
|
-
"x-hyperdb-workload": "dashql",
|
|
30
|
-
...params.metadata,
|
|
31
|
-
authorization: `Bearer ${token}`
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
export { hyperLinkChannelParams, isLoopbackHyperLink, parseHyperLinkTarget };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as core from '../../core/index.js';
|
|
2
|
-
export declare const SQL_FORMAT_MAX_WIDTH = 120;
|
|
3
|
-
export declare const SQL_FORMAT_INDENTATION = 4;
|
|
4
|
-
export type SqlFormatResult = {
|
|
5
|
-
formatted: string;
|
|
6
|
-
} | {
|
|
7
|
-
error: string;
|
|
8
|
-
};
|
|
9
|
-
export declare function formatSqlScript(dql: core.DashQL, text: string, dialect: core.buffers.formatting.FormattingDialect): SqlFormatResult;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { FormattingMode } from "../../gen/flatbuffers/dashql/buffers/formatting/formatting-mode.js";
|
|
2
|
-
import { KeywordCase } from "../../gen/flatbuffers/dashql/buffers/formatting/keyword-case.js";
|
|
3
|
-
import { FormattingConfigT } from "../../gen/flatbuffers/dashql/buffers/formatting/formatting-config.js";
|
|
4
|
-
import "../../core/index.js";
|
|
5
|
-
// dist/.stage/src/platform/sql/sql_format.ts
|
|
6
|
-
var SQL_FORMAT_MAX_WIDTH = 120;
|
|
7
|
-
var SQL_FORMAT_INDENTATION = 4;
|
|
8
|
-
function syntaxError(dql, text) {
|
|
9
|
-
const [result] = dql.processBatch({ scripts: [{
|
|
10
|
-
id: "format",
|
|
11
|
-
text,
|
|
12
|
-
outputs: ["parsed"]
|
|
13
|
-
}] }).scripts;
|
|
14
|
-
if (result.failure != null) return result.failure;
|
|
15
|
-
return result.diagnostics.find((diagnostic) => diagnostic.severity === "error" && diagnostic.stage !== "analyze")?.message ?? null;
|
|
16
|
-
}
|
|
17
|
-
function formatSqlScript(dql, text, dialect) {
|
|
18
|
-
const error = syntaxError(dql, text);
|
|
19
|
-
if (error != null) return { error };
|
|
20
|
-
const config = new FormattingConfigT(dialect, FormattingMode.PRETTY, 120, 4, false, KeywordCase.LOWER);
|
|
21
|
-
const catalog = dql.createCatalog();
|
|
22
|
-
const script = dql.createScript(catalog);
|
|
23
|
-
try {
|
|
24
|
-
script.replaceText(text);
|
|
25
|
-
if (!script.isFullyFormattable(config)) return { error: "the formatter doesn't know all of the script" };
|
|
26
|
-
const formatted = script.format(config);
|
|
27
|
-
let output;
|
|
28
|
-
try {
|
|
29
|
-
output = formatted.toString();
|
|
30
|
-
} finally {
|
|
31
|
-
formatted.destroy();
|
|
32
|
-
}
|
|
33
|
-
if (syntaxError(dql, output) != null) return { error: "the formatted script doesn't parse" };
|
|
34
|
-
return { formatted: `${output.trimEnd()}\n` };
|
|
35
|
-
} finally {
|
|
36
|
-
script.destroy();
|
|
37
|
-
catalog.destroy();
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
export { SQL_FORMAT_INDENTATION, SQL_FORMAT_MAX_WIDTH, formatSqlScript };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type * as core from '../../core/index.js';
|
|
2
|
-
export interface SqlInput {
|
|
3
|
-
id: string;
|
|
4
|
-
text: string;
|
|
5
|
-
}
|
|
6
|
-
export type SqlDiagnosticStage = 'scan' | 'parse' | 'analyze' | 'failure';
|
|
7
|
-
export type SqlDiagnosticSeverity = 'error' | 'warning';
|
|
8
|
-
export interface SqlLocation {
|
|
9
|
-
line: number;
|
|
10
|
-
column: number;
|
|
11
|
-
offset: number;
|
|
12
|
-
length: number;
|
|
13
|
-
}
|
|
14
|
-
export interface SqlDiagnostic {
|
|
15
|
-
stage: SqlDiagnosticStage;
|
|
16
|
-
severity: SqlDiagnosticSeverity;
|
|
17
|
-
message: string;
|
|
18
|
-
location: SqlLocation | null;
|
|
19
|
-
}
|
|
20
|
-
export declare function lineColumn(text: string, offset: number): [number, number];
|
|
21
|
-
export declare class SqlLinter {
|
|
22
|
-
protected readonly core: core.DashQL;
|
|
23
|
-
protected readonly schemas: Uint8Array[];
|
|
24
|
-
constructor(core: core.DashQL);
|
|
25
|
-
addSchema(input: SqlInput): SqlDiagnostic[];
|
|
26
|
-
lint(input: SqlInput): SqlDiagnostic[];
|
|
27
|
-
}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
// dist/.stage/src/platform/sql/sql_lint.ts
|
|
2
|
-
function lineColumn(text, offset) {
|
|
3
|
-
const bytes = new TextEncoder().encode(text);
|
|
4
|
-
let line = 1;
|
|
5
|
-
let column = 1;
|
|
6
|
-
for (let i = 0; i < Math.min(offset, bytes.length); ++i) {
|
|
7
|
-
const byte = bytes[i];
|
|
8
|
-
if (byte === 10) {
|
|
9
|
-
line += 1;
|
|
10
|
-
column = 1;
|
|
11
|
-
} else if ((byte & 192) !== 128) column += 1;
|
|
12
|
-
}
|
|
13
|
-
return [line, column];
|
|
14
|
-
}
|
|
15
|
-
function diagnosticsOf(text, result) {
|
|
16
|
-
const out = result.diagnostics.map((diagnostic) => {
|
|
17
|
-
const [line, column] = lineColumn(text, diagnostic.offset);
|
|
18
|
-
return {
|
|
19
|
-
stage: diagnostic.stage,
|
|
20
|
-
severity: diagnostic.severity,
|
|
21
|
-
message: diagnostic.message,
|
|
22
|
-
location: {
|
|
23
|
-
line,
|
|
24
|
-
column,
|
|
25
|
-
offset: diagnostic.offset,
|
|
26
|
-
length: diagnostic.length
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
});
|
|
30
|
-
if (result.failure != null) out.push({
|
|
31
|
-
stage: "failure",
|
|
32
|
-
severity: "error",
|
|
33
|
-
message: result.failure,
|
|
34
|
-
location: null
|
|
35
|
-
});
|
|
36
|
-
return out;
|
|
37
|
-
}
|
|
38
|
-
var SqlLinter = class {
|
|
39
|
-
core;
|
|
40
|
-
schemas = [];
|
|
41
|
-
constructor(core) {
|
|
42
|
-
this.core = core;
|
|
43
|
-
}
|
|
44
|
-
addSchema(input) {
|
|
45
|
-
const [result] = this.core.processBatch({
|
|
46
|
-
scripts: [{
|
|
47
|
-
id: input.id,
|
|
48
|
-
text: input.text,
|
|
49
|
-
outputs: ["catalogDescriptor"]
|
|
50
|
-
}],
|
|
51
|
-
catalogDescriptors: this.schemas
|
|
52
|
-
}).scripts;
|
|
53
|
-
const diagnostics = diagnosticsOf(input.text, result);
|
|
54
|
-
if (!diagnostics.some((diagnostic) => diagnostic.severity === "error") && result.catalogDescriptor != null) this.schemas.push(result.catalogDescriptor);
|
|
55
|
-
return diagnostics;
|
|
56
|
-
}
|
|
57
|
-
lint(input) {
|
|
58
|
-
const [result] = this.core.processBatch({
|
|
59
|
-
scripts: [{
|
|
60
|
-
id: input.id,
|
|
61
|
-
text: input.text,
|
|
62
|
-
outputs: ["analyzed"]
|
|
63
|
-
}],
|
|
64
|
-
catalogDescriptors: this.schemas
|
|
65
|
-
}).scripts;
|
|
66
|
-
return diagnosticsOf(input.text, result);
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
export { SqlLinter, lineColumn };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { type SqlDiagnostic } from './sql_lint.js';
|
|
2
|
-
export declare enum ReportColor {
|
|
3
|
-
Bold = 0,
|
|
4
|
-
Dim = 1,
|
|
5
|
-
Red = 2,
|
|
6
|
-
Yellow = 3,
|
|
7
|
-
Green = 4,
|
|
8
|
-
Cyan = 5
|
|
9
|
-
}
|
|
10
|
-
export declare class ReportStyle {
|
|
11
|
-
readonly colors: boolean;
|
|
12
|
-
constructor(colors: boolean);
|
|
13
|
-
apply(color: ReportColor, text: string): string;
|
|
14
|
-
}
|
|
15
|
-
export declare function formatDuration(ms: number): string;
|
|
16
|
-
export declare function formatReportFile(file: string, text: string, diagnostics: SqlDiagnostic[], style: ReportStyle): string;
|
|
17
|
-
export declare function formatReportSummary(files: number, errors: number, warnings: number, style: ReportStyle): string;
|
|
18
|
-
export declare function formatReportTimings(lintMs: number, style: ReportStyle): string;
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { lineColumn } from "./sql_lint.js";
|
|
2
|
-
// dist/.stage/src/platform/sql/sql_report.ts
|
|
3
|
-
var ReportColor = /* @__PURE__ */ function(ReportColor) {
|
|
4
|
-
ReportColor[ReportColor["Bold"] = 0] = "Bold";
|
|
5
|
-
ReportColor[ReportColor["Dim"] = 1] = "Dim";
|
|
6
|
-
ReportColor[ReportColor["Red"] = 2] = "Red";
|
|
7
|
-
ReportColor[ReportColor["Yellow"] = 3] = "Yellow";
|
|
8
|
-
ReportColor[ReportColor["Green"] = 4] = "Green";
|
|
9
|
-
ReportColor[ReportColor["Cyan"] = 5] = "Cyan";
|
|
10
|
-
return ReportColor;
|
|
11
|
-
}({});
|
|
12
|
-
var ANSI = {
|
|
13
|
-
[ReportColor.Bold]: [1, 22],
|
|
14
|
-
[ReportColor.Dim]: [2, 22],
|
|
15
|
-
[ReportColor.Red]: [31, 39],
|
|
16
|
-
[ReportColor.Green]: [32, 39],
|
|
17
|
-
[ReportColor.Yellow]: [33, 39],
|
|
18
|
-
[ReportColor.Cyan]: [36, 39]
|
|
19
|
-
};
|
|
20
|
-
var ReportStyle = class {
|
|
21
|
-
colors;
|
|
22
|
-
constructor(colors) {
|
|
23
|
-
this.colors = colors;
|
|
24
|
-
}
|
|
25
|
-
apply(color, text) {
|
|
26
|
-
if (!this.colors) return text;
|
|
27
|
-
const [on, off] = ANSI[color];
|
|
28
|
-
return `\x1b[${on}m${text}\x1b[${off}m`;
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
var LABEL_WIDTH = 7;
|
|
32
|
-
var STAGE_WIDTH = 7;
|
|
33
|
-
function plural(n, word) {
|
|
34
|
-
return `${n} ${word}${n === 1 ? "" : "s"}`;
|
|
35
|
-
}
|
|
36
|
-
function formatDuration(ms) {
|
|
37
|
-
return ms < 1e3 ? `${Math.round(ms)} ms` : `${(ms / 1e3).toFixed(1)} s`;
|
|
38
|
-
}
|
|
39
|
-
function severityColor(severity) {
|
|
40
|
-
return severity === "error" ? ReportColor.Red : ReportColor.Yellow;
|
|
41
|
-
}
|
|
42
|
-
function codeFrame(text, diagnostic) {
|
|
43
|
-
const location = diagnostic.location;
|
|
44
|
-
if (location == null) return null;
|
|
45
|
-
let line = text.split("\n")[location.line - 1] ?? "";
|
|
46
|
-
if (line.endsWith("\r")) line = line.slice(0, -1);
|
|
47
|
-
line = line.replaceAll(" ", " ");
|
|
48
|
-
const [endLine, endColumnOnLine] = lineColumn(text, location.offset + location.length);
|
|
49
|
-
const endColumn = endLine === location.line ? endColumnOnLine : [...line].length + 1;
|
|
50
|
-
const width = Math.max(endColumn - location.column, 1);
|
|
51
|
-
return [line, `${" ".repeat(location.column - 1)}${"^".repeat(width)}`];
|
|
52
|
-
}
|
|
53
|
-
function formatReportFile(file, text, diagnostics, style) {
|
|
54
|
-
const locations = diagnostics.map((d) => d.location != null ? `${d.location.line}:${d.location.column}` : "");
|
|
55
|
-
const locationWidth = Math.max(0, ...locations.map((location) => location.length));
|
|
56
|
-
const indent = " ".repeat(2 + locationWidth + 2);
|
|
57
|
-
const continuation = " ".repeat(indent.length + LABEL_WIDTH + 2 + STAGE_WIDTH + 2);
|
|
58
|
-
const out = [style.apply(ReportColor.Bold, file)];
|
|
59
|
-
diagnostics.forEach((diagnostic, i) => {
|
|
60
|
-
const color = severityColor(diagnostic.severity);
|
|
61
|
-
const [first, ...rest] = diagnostic.message.split("\n");
|
|
62
|
-
out.push(` ${style.apply(ReportColor.Cyan, locations[i].padEnd(locationWidth))} ${style.apply(color, diagnostic.severity.padEnd(LABEL_WIDTH))} ${style.apply(ReportColor.Dim, diagnostic.stage.padEnd(STAGE_WIDTH))} ${first}`);
|
|
63
|
-
for (const line of rest) out.push(`${continuation}${line}`);
|
|
64
|
-
const frame = codeFrame(text, diagnostic);
|
|
65
|
-
if (frame != null) {
|
|
66
|
-
const bar = style.apply(ReportColor.Dim, "│");
|
|
67
|
-
out.push(`${indent}${bar} ${frame[0]}`);
|
|
68
|
-
out.push(`${indent}${bar} ${style.apply(color, frame[1])}`);
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
return out.join("\n");
|
|
72
|
-
}
|
|
73
|
-
function formatReportSummary(files, errors, warnings, style) {
|
|
74
|
-
const count = (n, word, color) => style.apply(n > 0 ? color : ReportColor.Green, plural(n, word));
|
|
75
|
-
return `${plural(files, "file")}, ${count(errors, "error", ReportColor.Red)}, ${count(warnings, "warning", ReportColor.Yellow)}`;
|
|
76
|
-
}
|
|
77
|
-
function formatReportTimings(lintMs, style) {
|
|
78
|
-
return `${style.apply(ReportColor.Dim, "dashql-core")} scan, parse and analyze ${formatDuration(lintMs)}`;
|
|
79
|
-
}
|
|
80
|
-
export { ReportColor, ReportStyle, formatDuration, formatReportFile, formatReportSummary, formatReportTimings };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { DashQL } from "../../core/api.js";
|
|
2
|
-
import "../../core/index.js";
|
|
3
|
-
// dist/.stage/src/platform/storage/storage_versions.ts
|
|
4
|
-
var versions = null;
|
|
5
|
-
function provideStorageVersions(instance) {
|
|
6
|
-
versions ??= instance.storageVersions();
|
|
7
|
-
}
|
|
8
|
-
function storageVersions() {
|
|
9
|
-
versions ??= DashQL.instantiated()?.storageVersions() ?? null;
|
|
10
|
-
if (versions == null) throw new Error("The versions of the storage need the core, which is not instantiated yet");
|
|
11
|
-
return versions;
|
|
12
|
-
}
|
|
13
|
-
export { provideStorageVersions, storageVersions };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
type Resolve<Context, Value> = (ctx: Context, value: Value) => void;
|
|
2
|
-
type Reject<Context, Err> = (ctx: Context, err: Err) => void;
|
|
3
|
-
export interface AsyncConsumer<Context, Value> {
|
|
4
|
-
resolve(ctx: Context, value: Value): void;
|
|
5
|
-
reject(ctx: Context, err: Error): void;
|
|
6
|
-
}
|
|
7
|
-
export declare class AsyncConsumerLambdas<Context, Value> implements AsyncConsumer<Context, Value> {
|
|
8
|
-
protected resolveFn: Resolve<Context, Value>;
|
|
9
|
-
protected rejectFn: Reject<Context, Error>;
|
|
10
|
-
constructor(resolveFn?: Resolve<Context, Value>, rejectFn?: Reject<Context, Error>);
|
|
11
|
-
resolve(ctx: Context, value: Value): void;
|
|
12
|
-
reject(ctx: Context, err: Error): void;
|
|
13
|
-
}
|
|
14
|
-
export {};
|