@knockdata/objectexplorer 0.4.2 → 0.4.4
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/app/assets/WorkerParser.js +110 -110
- package/app/assets/browser-4.js +1 -1
- package/app/assets/browser.js +2 -2
- package/app/assets/duckdb.js +1 -1
- package/app/assets/duckdbWasm.js +1 -1
- package/app/assets/index.css +1 -1
- package/app/assets/index.js +118 -101
- package/app/assets/is.js +1 -0
- package/app/assets/node.js +1 -1
- package/app/assets/parquet-table-2.js +1 -0
- package/app/assets/parquet-table.js +1 -0
- package/app/assets/parquet-writer.js +1 -0
- package/app/assets/preload-helper.js +1 -0
- package/app/assets/search-worker.js +2 -2
- package/app/assets/wasm-worker.js +1 -1
- package/app/index.html +3 -0
- package/cli.js +3 -32
- package/package.json +2 -2
- package/server/WebServer.mjs +475 -323
- package/server/logging.proto +62 -0
- package/app/assets/entries.js +0 -8
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// Only what the tail needs, written by hand rather than vendoring Google's proto tree.
|
|
2
|
+
// TailLogEntries is bidi-streaming, which HTTP transcoding will not carry — the REST
|
|
3
|
+
// endpoint holds ~14s and returns an empty array — so this is the only way to tail.
|
|
4
|
+
//
|
|
5
|
+
// Field numbers are wire format: they must match googleapis exactly, names need not.
|
|
6
|
+
// Fields we never read are simply absent; protobufjs skips unknown fields on decode.
|
|
7
|
+
// google/protobuf/* comes from protobufjs's bundled common types, nothing to vendor.
|
|
8
|
+
|
|
9
|
+
syntax = "proto3";
|
|
10
|
+
|
|
11
|
+
package google.logging.v2;
|
|
12
|
+
|
|
13
|
+
import "google/protobuf/duration.proto";
|
|
14
|
+
import "google/protobuf/struct.proto";
|
|
15
|
+
import "google/protobuf/timestamp.proto";
|
|
16
|
+
|
|
17
|
+
service LoggingServiceV2 {
|
|
18
|
+
rpc TailLogEntries (stream TailLogEntriesRequest) returns (stream TailLogEntriesResponse);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
message TailLogEntriesRequest {
|
|
22
|
+
repeated string resource_names = 1;
|
|
23
|
+
string filter = 2;
|
|
24
|
+
google.protobuf.Duration buffer_window = 3;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
message TailLogEntriesResponse {
|
|
28
|
+
repeated LogEntry entries = 1;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// google.api.MonitoredResource
|
|
32
|
+
message MonitoredResource {
|
|
33
|
+
string type = 1;
|
|
34
|
+
map<string, string> labels = 2;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// google.logging.type.LogSeverity
|
|
38
|
+
enum LogSeverity {
|
|
39
|
+
DEFAULT = 0;
|
|
40
|
+
DEBUG = 100;
|
|
41
|
+
INFO = 200;
|
|
42
|
+
NOTICE = 300;
|
|
43
|
+
WARNING = 400;
|
|
44
|
+
ERROR = 500;
|
|
45
|
+
CRITICAL = 600;
|
|
46
|
+
ALERT = 700;
|
|
47
|
+
EMERGENCY = 800;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
message LogEntry {
|
|
51
|
+
string text_payload = 3;
|
|
52
|
+
string insert_id = 4;
|
|
53
|
+
google.protobuf.Struct json_payload = 6;
|
|
54
|
+
MonitoredResource resource = 8;
|
|
55
|
+
google.protobuf.Timestamp timestamp = 9;
|
|
56
|
+
LogSeverity severity = 10;
|
|
57
|
+
map<string, string> labels = 11;
|
|
58
|
+
string log_name = 12;
|
|
59
|
+
string trace = 22;
|
|
60
|
+
google.protobuf.Timestamp receive_timestamp = 24;
|
|
61
|
+
string span_id = 27;
|
|
62
|
+
}
|
package/app/assets/entries.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
function e(e){return`"${String(e).replaceAll(`"`,`""`)}"`}function t(e){return`'${String(e).replaceAll(`'`,`''`)}'`}function n(e){let t=String(e||``).split(`/`).filter(Boolean);return t.length>1?{schema:t[0],table:t[1]}:{schema:`main`,table:t[0]}}function r(e){let t={};for(let n of Object.keys(e)){let r=e[n];t[n]=typeof r==`bigint`?Number(r):r}return t}function i(i){return{getEntries:a,getEntry:c};async function a(e,t=``){let n=String(t||``).split(`/`).filter(Boolean);return n.length===0?await o(e):n.length===1?await s(e,n[0]):[]}async function o(e){return(await i(`SELECT schema_name FROM duckdb_schemas() WHERE database_name = current_database() ORDER BY schema_name`)).map(t=>({name:t.schema_name,label:t.schema_name,type:`schema`,objectKind:`folder`,path:`${e}/${t.schema_name}`}))}async function s(e,n){return(await i(`SELECT table_name AS name,
|
|
2
|
-
CASE WHEN table_type = 'VIEW' THEN 'view' ELSE 'table' END AS type
|
|
3
|
-
FROM information_schema.tables
|
|
4
|
-
WHERE table_catalog = current_database() AND table_schema = ${t(n)}
|
|
5
|
-
ORDER BY type, name`)).map(t=>({name:t.name,label:t.name,type:t.type,objectKind:`table`,path:`${e}/${n}/${t.name}`}))}async function c(a,o=0,s=1e3){let{schema:c,table:l}=n(a),u=`${e(c)}.${e(l)}`,d=(await i(`SELECT column_name FROM information_schema.columns
|
|
6
|
-
WHERE table_catalog = current_database()
|
|
7
|
-
AND table_schema = ${t(c)} AND table_name = ${t(l)}
|
|
8
|
-
ORDER BY ordinal_position`)).map(e=>e.column_name),f=Number((await i(`SELECT COUNT(*) AS total FROM ${u}`))[0].total);return{rows:(await i(`SELECT * FROM ${u} LIMIT ${s} OFFSET ${o}`)).map(r),columns:d,total:f,offset:o,limit:s}}}export{i as t};
|