@514labs/moose-lib 0.6.459 → 0.6.460
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/browserCompatible.d.mts +5 -4
- package/dist/browserCompatible.d.ts +5 -4
- package/dist/browserCompatible.js +8 -5
- package/dist/browserCompatible.js.map +1 -1
- package/dist/browserCompatible.mjs +4 -1
- package/dist/browserCompatible.mjs.map +1 -1
- package/dist/dmv2/index.d.mts +3 -2
- package/dist/dmv2/index.d.ts +3 -2
- package/dist/dmv2/index.js +7 -4
- package/dist/dmv2/index.js.map +1 -1
- package/dist/dmv2/index.mjs +4 -1
- package/dist/dmv2/index.mjs.map +1 -1
- package/dist/index-Cs6mRtl7.d.ts +1305 -0
- package/dist/index-DBs6nRQN.d.mts +1305 -0
- package/dist/index.d.mts +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.js +28 -23
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +28 -23
- package/dist/index.mjs.map +1 -1
- package/dist/moose-runner.js +67 -56
- package/dist/moose-runner.js.map +1 -1
- package/dist/moose-runner.mjs +70 -59
- package/dist/moose-runner.mjs.map +1 -1
- package/dist/testing/index.d.mts +99 -0
- package/dist/testing/index.d.ts +99 -0
- package/dist/testing/index.js +328 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/testing/index.mjs +295 -0
- package/dist/testing/index.mjs.map +1 -0
- package/dist/view-CNYx8kUh.d.mts +1327 -0
- package/dist/view-CNYx8kUh.d.ts +1327 -0
- package/package.json +7 -2
- package/dist/index-BkvEUvtm.d.mts +0 -2627
- package/dist/index-BkvEUvtm.d.ts +0 -2627
package/dist/index.d.mts
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
export { JWT, Key } from './browserCompatible.mjs';
|
|
2
2
|
import * as _clickhouse_client from '@clickhouse/client';
|
|
3
3
|
import { KafkaJS } from '@514labs/kafka-javascript';
|
|
4
|
-
import {
|
|
5
|
-
export { A as Aggregated,
|
|
4
|
+
import { V as MooseUtils, X as MooseClient, M as MaterializedView } from './index-DBs6nRQN.mjs';
|
|
5
|
+
export { A as Aggregated, f as Api, g as ApiConfig, a3 as ApiHelpers, R as ApiUtil, C as ConsumptionApi, a4 as ConsumptionHelpers, U as ConsumptionUtil, c as DeadLetter, D as DeadLetterModel, d as DeadLetterQueue, l as ETLPipeline, m as ETLPipelineConfig, E as EgressConfig, F as FrameworkApp, I as IngestApi, e as IngestConfig, h as IngestPipeline, Y as MOOSE_RLS_ROLE, _ as MOOSE_RLS_SETTING_PREFIX, Z as MOOSE_RLS_USER, $ as RowPoliciesConfig, j as SelectRowPolicy, k as SelectRowPolicyConfig, S as SimpleAggregated, i as SqlResource, a as Stream, b as StreamConfig, T as Task, n as WebApp, o as WebAppConfig, p as WebAppHandler, W as Workflow, a1 as WorkflowClient, a0 as buildRowPolicyOptionsFromClaims, x as getApi, w as getApis, v as getIngestApi, u as getIngestApis, N as getMaterializedView, O as getMaterializedViews, P as getSelectRowPolicies, Q as getSelectRowPolicy, z as getSqlResource, y as getSqlResources, t as getStream, s as getStreams, r as getTable, q as getTables, a2 as getTemporalClient, K as getView, L as getViews, J as getWebApp, H as getWebApps, G as getWorkflow, B as getWorkflows, a5 as joinQueries } from './index-DBs6nRQN.mjs';
|
|
6
6
|
import http from 'http';
|
|
7
|
+
import { M as Sql, O as OlapTable, a0 as Column, _ as QueryClient, a3 as DataType } from './view-CNYx8kUh.mjs';
|
|
8
|
+
export { n as ClickHouseAlias, d as ClickHouseByteSize, o as ClickHouseCodec, c as ClickHouseDecimal, k as ClickHouseDefault, C as ClickHouseEngines, e as ClickHouseFixedStringSize, f as ClickHouseFloat, g as ClickHouseInt, h as ClickHouseJson, a6 as ClickHouseLineString, m as ClickHouseMaterialized, a7 as ClickHouseMultiLineString, a9 as ClickHouseMultiPolygon, j as ClickHouseNamedTuple, a4 as ClickHousePoint, a8 as ClickHousePolygon, b as ClickHousePrecision, a5 as ClickHouseRing, l as ClickHouseTTL, D as DateTime, p as DateTime64, r as DateTime64String, q as DateTimeString, A as Decimal, F as FixedString, s as Float32, t as Float64, G as IdentifierBrandedString, B as Insertable, u as Int16, v as Int32, w as Int64, I as Int8, L as LifeCycle, i as LowCardinality, N as NonIdentifierBrandedString, a as OlapConfig, R as RawValue, a1 as RowPolicyOptions, S as S3QueueTableSettings, J as SqlTemplateTag, x as UInt16, y as UInt32, z as UInt64, U as UInt8, H as Value, V as View, W as WithDefault, Y as createClickhouseParameter, X as getValueFromParameter, Z as mapToClickHouseType, E as quoteIdentifier, K as sql, Q as toQuery, T as toQueryPreview, P as toStaticQuery } from './view-CNYx8kUh.mjs';
|
|
7
9
|
import { IsTuple } from 'typia/lib/typings/IsTuple';
|
|
8
10
|
import { Readable } from 'node:stream';
|
|
9
11
|
import { z } from 'zod';
|
|
10
12
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
11
13
|
import { IValidation } from 'typia';
|
|
12
|
-
import 'typia/lib/tags';
|
|
13
14
|
import '@temporalio/client';
|
|
14
15
|
import 'jose';
|
|
16
|
+
import 'typia/lib/tags';
|
|
15
17
|
|
|
16
18
|
declare const Kafka: typeof KafkaJS.Kafka;
|
|
17
19
|
type Kafka = KafkaJS.Kafka;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
export { JWT, Key } from './browserCompatible.js';
|
|
2
2
|
import * as _clickhouse_client from '@clickhouse/client';
|
|
3
3
|
import { KafkaJS } from '@514labs/kafka-javascript';
|
|
4
|
-
import {
|
|
5
|
-
export { A as Aggregated,
|
|
4
|
+
import { V as MooseUtils, X as MooseClient, M as MaterializedView } from './index-Cs6mRtl7.js';
|
|
5
|
+
export { A as Aggregated, f as Api, g as ApiConfig, a3 as ApiHelpers, R as ApiUtil, C as ConsumptionApi, a4 as ConsumptionHelpers, U as ConsumptionUtil, c as DeadLetter, D as DeadLetterModel, d as DeadLetterQueue, l as ETLPipeline, m as ETLPipelineConfig, E as EgressConfig, F as FrameworkApp, I as IngestApi, e as IngestConfig, h as IngestPipeline, Y as MOOSE_RLS_ROLE, _ as MOOSE_RLS_SETTING_PREFIX, Z as MOOSE_RLS_USER, $ as RowPoliciesConfig, j as SelectRowPolicy, k as SelectRowPolicyConfig, S as SimpleAggregated, i as SqlResource, a as Stream, b as StreamConfig, T as Task, n as WebApp, o as WebAppConfig, p as WebAppHandler, W as Workflow, a1 as WorkflowClient, a0 as buildRowPolicyOptionsFromClaims, x as getApi, w as getApis, v as getIngestApi, u as getIngestApis, N as getMaterializedView, O as getMaterializedViews, P as getSelectRowPolicies, Q as getSelectRowPolicy, z as getSqlResource, y as getSqlResources, t as getStream, s as getStreams, r as getTable, q as getTables, a2 as getTemporalClient, K as getView, L as getViews, J as getWebApp, H as getWebApps, G as getWorkflow, B as getWorkflows, a5 as joinQueries } from './index-Cs6mRtl7.js';
|
|
6
6
|
import http from 'http';
|
|
7
|
+
import { M as Sql, O as OlapTable, a0 as Column, _ as QueryClient, a3 as DataType } from './view-CNYx8kUh.js';
|
|
8
|
+
export { n as ClickHouseAlias, d as ClickHouseByteSize, o as ClickHouseCodec, c as ClickHouseDecimal, k as ClickHouseDefault, C as ClickHouseEngines, e as ClickHouseFixedStringSize, f as ClickHouseFloat, g as ClickHouseInt, h as ClickHouseJson, a6 as ClickHouseLineString, m as ClickHouseMaterialized, a7 as ClickHouseMultiLineString, a9 as ClickHouseMultiPolygon, j as ClickHouseNamedTuple, a4 as ClickHousePoint, a8 as ClickHousePolygon, b as ClickHousePrecision, a5 as ClickHouseRing, l as ClickHouseTTL, D as DateTime, p as DateTime64, r as DateTime64String, q as DateTimeString, A as Decimal, F as FixedString, s as Float32, t as Float64, G as IdentifierBrandedString, B as Insertable, u as Int16, v as Int32, w as Int64, I as Int8, L as LifeCycle, i as LowCardinality, N as NonIdentifierBrandedString, a as OlapConfig, R as RawValue, a1 as RowPolicyOptions, S as S3QueueTableSettings, J as SqlTemplateTag, x as UInt16, y as UInt32, z as UInt64, U as UInt8, H as Value, V as View, W as WithDefault, Y as createClickhouseParameter, X as getValueFromParameter, Z as mapToClickHouseType, E as quoteIdentifier, K as sql, Q as toQuery, T as toQueryPreview, P as toStaticQuery } from './view-CNYx8kUh.js';
|
|
7
9
|
import { IsTuple } from 'typia/lib/typings/IsTuple';
|
|
8
10
|
import { Readable } from 'node:stream';
|
|
9
11
|
import { z } from 'zod';
|
|
10
12
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
11
13
|
import { IValidation } from 'typia';
|
|
12
|
-
import 'typia/lib/tags';
|
|
13
14
|
import '@temporalio/client';
|
|
14
15
|
import 'jose';
|
|
16
|
+
import 'typia/lib/tags';
|
|
15
17
|
|
|
16
18
|
declare const Kafka: typeof KafkaJS.Kafka;
|
|
17
19
|
type Kafka = KafkaJS.Kafka;
|
package/dist/index.js
CHANGED
|
@@ -3441,9 +3441,12 @@ var mooseEnvSecrets = mooseRuntimeEnv;
|
|
|
3441
3441
|
|
|
3442
3442
|
// src/consumption-apis/helpers.ts
|
|
3443
3443
|
var import_client2 = require("@temporalio/client");
|
|
3444
|
+
var import_node_crypto4 = require("crypto");
|
|
3445
|
+
var fs3 = __toESM(require("fs"));
|
|
3446
|
+
|
|
3447
|
+
// src/consumption-apis/query-client.ts
|
|
3444
3448
|
var import_node_crypto3 = require("crypto");
|
|
3445
3449
|
var import_perf_hooks = require("perf_hooks");
|
|
3446
|
-
var fs3 = __toESM(require("fs"));
|
|
3447
3450
|
function formatElapsedTime(ms) {
|
|
3448
3451
|
if (ms < 1e3) {
|
|
3449
3452
|
return `${Math.round(ms)} ms`;
|
|
@@ -3456,27 +3459,6 @@ function formatElapsedTime(ms) {
|
|
|
3456
3459
|
const remainingSeconds = seconds % 60;
|
|
3457
3460
|
return `${minutes} minutes and ${remainingSeconds.toFixed(2)} seconds`;
|
|
3458
3461
|
}
|
|
3459
|
-
var MooseClient = class {
|
|
3460
|
-
query;
|
|
3461
|
-
workflow;
|
|
3462
|
-
constructor(queryClient, temporalClient) {
|
|
3463
|
-
this.query = queryClient;
|
|
3464
|
-
this.workflow = new WorkflowClient(temporalClient);
|
|
3465
|
-
}
|
|
3466
|
-
};
|
|
3467
|
-
var MOOSE_RLS_ROLE = "moose_rls_role";
|
|
3468
|
-
var MOOSE_RLS_USER = "moose_rls_user";
|
|
3469
|
-
var MOOSE_RLS_SETTING_PREFIX = "SQL_moose_rls_";
|
|
3470
|
-
function buildRowPolicyOptionsFromClaims(config, claims) {
|
|
3471
|
-
const clickhouse_settings = /* @__PURE__ */ Object.create(null);
|
|
3472
|
-
for (const [settingName, claimName] of Object.entries(config)) {
|
|
3473
|
-
const value = claims[claimName];
|
|
3474
|
-
if (value !== void 0 && value !== null) {
|
|
3475
|
-
clickhouse_settings[settingName] = String(value);
|
|
3476
|
-
}
|
|
3477
|
-
}
|
|
3478
|
-
return { role: MOOSE_RLS_ROLE, clickhouse_settings };
|
|
3479
|
-
}
|
|
3480
3462
|
var QueryClient = class {
|
|
3481
3463
|
client;
|
|
3482
3464
|
query_id_prefix;
|
|
@@ -3528,6 +3510,29 @@ var QueryClient = class {
|
|
|
3528
3510
|
return result;
|
|
3529
3511
|
}
|
|
3530
3512
|
};
|
|
3513
|
+
|
|
3514
|
+
// src/consumption-apis/helpers.ts
|
|
3515
|
+
var MooseClient = class {
|
|
3516
|
+
query;
|
|
3517
|
+
workflow;
|
|
3518
|
+
constructor(queryClient, temporalClient) {
|
|
3519
|
+
this.query = queryClient;
|
|
3520
|
+
this.workflow = new WorkflowClient(temporalClient);
|
|
3521
|
+
}
|
|
3522
|
+
};
|
|
3523
|
+
var MOOSE_RLS_ROLE = "moose_rls_role";
|
|
3524
|
+
var MOOSE_RLS_USER = "moose_rls_user";
|
|
3525
|
+
var MOOSE_RLS_SETTING_PREFIX = "SQL_moose_rls_";
|
|
3526
|
+
function buildRowPolicyOptionsFromClaims(config, claims) {
|
|
3527
|
+
const clickhouse_settings = /* @__PURE__ */ Object.create(null);
|
|
3528
|
+
for (const [settingName, claimName] of Object.entries(config)) {
|
|
3529
|
+
const value = claims[claimName];
|
|
3530
|
+
if (value !== void 0 && value !== null) {
|
|
3531
|
+
clickhouse_settings[settingName] = String(value);
|
|
3532
|
+
}
|
|
3533
|
+
}
|
|
3534
|
+
return { role: MOOSE_RLS_ROLE, clickhouse_settings };
|
|
3535
|
+
}
|
|
3531
3536
|
var WorkflowClient = class {
|
|
3532
3537
|
client;
|
|
3533
3538
|
constructor(temporalClient) {
|
|
@@ -3610,7 +3615,7 @@ var WorkflowClient = class {
|
|
|
3610
3615
|
processInputData(name, input_data) {
|
|
3611
3616
|
let workflowId = name;
|
|
3612
3617
|
if (input_data) {
|
|
3613
|
-
const hash = (0,
|
|
3618
|
+
const hash = (0, import_node_crypto4.createHash)("sha256").update(JSON.stringify(input_data)).digest("hex").slice(0, 16);
|
|
3614
3619
|
workflowId = `${name}-${hash}`;
|
|
3615
3620
|
}
|
|
3616
3621
|
return [input_data, workflowId];
|