@malloy-publisher/server 0.0.382-dev → 0.2.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/README.docker.md +145 -20
- package/README.md +65 -12
- package/dist/app/api-doc.html +5 -0
- package/dist/app/api-doc.yaml +3903 -583
- package/dist/app/assets/EnvironmentPage-DiUgLuCH.js +1 -0
- package/dist/app/assets/HomePage-MhhjhnFj.js +1 -0
- package/dist/app/assets/LightMode-BEyvNUzT.js +1 -0
- package/dist/app/assets/MainPage-D4Cfee9o.js +2 -0
- package/dist/app/assets/MaterializationsPage-nGgGqwSN.js +1 -0
- package/dist/app/assets/ModelPage-DLAcEw-F.js +1 -0
- package/dist/app/assets/PackagePage-Df0ikH7w.js +1 -0
- package/dist/app/assets/RouteError-BFQwtroH.js +1 -0
- package/dist/app/assets/ThemeEditorPage-OoskoQYN.js +1 -0
- package/dist/app/assets/WorkbookPage-CpFgvUDC.js +1 -0
- package/dist/app/assets/{core-CjeTkq8O.es-BqRc6yhC.js → core-lb28vQkR.es-BoVSOc75.js} +1 -1
- package/dist/app/assets/github-dark-DenFmJkN.es-DHJKELXO.js +1 -0
- package/dist/app/assets/index-5eLCcNmP.css +1 -0
- package/dist/app/assets/index-6ypuFH6g.js +1774 -0
- package/dist/app/assets/index-B8pnU_V_.js +615 -0
- package/dist/app/assets/index-BImcHmVP.js +1 -0
- package/dist/app/assets/index-DSoCUF-f.js +2725 -0
- package/dist/app/assets/index-DfqzSItA.js +2 -0
- package/dist/app/assets/index-w_0OQJgZ.js +23 -0
- package/dist/app/index.html +8 -4
- package/dist/cpufeatures-1yrn0vtw.node +0 -0
- package/dist/default-publisher.config.json +23 -0
- package/dist/{instrumentation.js → instrumentation.mjs} +10631 -10573
- package/dist/package_load_worker.mjs +15219 -0
- package/dist/runtime/publisher.js +331 -0
- package/dist/{server.js → server.mjs} +115548 -49590
- package/dist/sshcrypto-vd2k5hq9.node +0 -0
- package/package.json +41 -28
- package/publisher.config.example.bigquery.json +33 -0
- package/publisher.config.example.duckdb.json +23 -0
- package/.eslintrc.json +0 -44
- package/.prettierignore +0 -1
- package/.prettierrc +0 -4
- package/build.ts +0 -38
- package/dist/app/assets/HomePage-Dn3E4CuB.js +0 -1
- package/dist/app/assets/MainPage-BzB3yoqi.js +0 -2
- package/dist/app/assets/ModelPage-C9O_sAXT.js +0 -1
- package/dist/app/assets/PackagePage-DcxKEjBX.js +0 -1
- package/dist/app/assets/ProjectPage-BDj307rF.js +0 -1
- package/dist/app/assets/RouteError-DAShbVCG.js +0 -1
- package/dist/app/assets/WorkbookPage-Cs_XYEaB.js +0 -1
- package/dist/app/assets/index-15BOvhp0.js +0 -456
- package/dist/app/assets/index-Bb2jqquW.js +0 -676
- package/dist/app/assets/index-CMlGQMcl.css +0 -1
- package/dist/app/assets/index-D68X76-7.js +0 -1276
- package/dist/app/assets/index.umd-DGBekgSu.js +0 -1145
- package/dxt/malloy_bridge.py +0 -354
- package/dxt/manifest.json +0 -22
- package/eslint.config.mjs +0 -76
- package/k6-tests/README.md +0 -144
- package/k6-tests/bun.lock +0 -797
- package/k6-tests/load-test/load-test-crud-connections.ts +0 -263
- package/k6-tests/load-test/load-test-crud-packages.ts +0 -461
- package/k6-tests/load-test/load-test-crud-projects.ts +0 -160
- package/k6-tests/load-test/load-test-crud.ts +0 -142
- package/k6-tests/load-test/load-test.ts +0 -784
- package/k6-tests/package.json +0 -27
- package/k6-tests/scripts/run-with-otel.sh +0 -50
- package/k6-tests/smoke-test/smoke-test.ts +0 -158
- package/k6-tests/tsconfig.json +0 -29
- package/k6-tests/utils/client_factory.ts +0 -128
- package/k6-tests/utils/common.ts +0 -489
- package/k6-tests/utils/logger.ts +0 -62
- package/k6-tests/utils/types.d.ts +0 -35
- package/malloy_mcp.dxt +0 -0
- package/publisher.config.json +0 -33
- package/src/config.spec.ts +0 -850
- package/src/config.ts +0 -305
- package/src/constants.ts +0 -10
- package/src/controller/compile.controller.ts +0 -35
- package/src/controller/connection.controller.ts +0 -515
- package/src/controller/database.controller.ts +0 -21
- package/src/controller/manifest.controller.ts +0 -29
- package/src/controller/materialization.controller.ts +0 -125
- package/src/controller/model.controller.ts +0 -107
- package/src/controller/package.controller.ts +0 -182
- package/src/controller/query.controller.ts +0 -60
- package/src/controller/watch-mode.controller.ts +0 -98
- package/src/data_styles.ts +0 -71
- package/src/dto/connection.dto.spec.ts +0 -131
- package/src/dto/connection.dto.ts +0 -174
- package/src/dto/index.ts +0 -2
- package/src/dto/package.dto.spec.ts +0 -42
- package/src/dto/package.dto.ts +0 -12
- package/src/dto/validate.spec.ts +0 -76
- package/src/dto/validate.ts +0 -31
- package/src/errors.ts +0 -116
- package/src/health.ts +0 -189
- package/src/instrumentation.ts +0 -148
- package/src/logger.ts +0 -154
- package/src/mcp/error_messages.ts +0 -199
- package/src/mcp/handler_utils.ts +0 -239
- package/src/mcp/mcp_constants.ts +0 -22
- package/src/mcp/prompts/handlers.ts +0 -84
- package/src/mcp/prompts/index.ts +0 -11
- package/src/mcp/prompts/prompt_definitions.ts +0 -160
- package/src/mcp/prompts/prompt_service.ts +0 -67
- package/src/mcp/prompts/utils.ts +0 -62
- package/src/mcp/resource_metadata.ts +0 -47
- package/src/mcp/resources/model_resource.ts +0 -153
- package/src/mcp/resources/notebook_resource.ts +0 -137
- package/src/mcp/resources/package_resource.ts +0 -370
- package/src/mcp/resources/project_resource.ts +0 -184
- package/src/mcp/resources/query_resource.ts +0 -117
- package/src/mcp/resources/source_resource.ts +0 -141
- package/src/mcp/resources/view_resource.ts +0 -136
- package/src/mcp/server.ts +0 -62
- package/src/mcp/tools/discovery_tools.ts +0 -258
- package/src/mcp/tools/execute_query_tool.ts +0 -265
- package/src/server.ts +0 -1195
- package/src/service/connection.spec.ts +0 -1331
- package/src/service/connection.ts +0 -1511
- package/src/service/connection_service.spec.ts +0 -641
- package/src/service/connection_service.ts +0 -181
- package/src/service/db_utils.spec.ts +0 -714
- package/src/service/db_utils.ts +0 -1227
- package/src/service/filter.spec.ts +0 -447
- package/src/service/filter.ts +0 -337
- package/src/service/filter_integration.spec.ts +0 -825
- package/src/service/gcs_s3_utils.ts +0 -427
- package/src/service/manifest_service.spec.ts +0 -201
- package/src/service/manifest_service.ts +0 -106
- package/src/service/materialization_service.spec.ts +0 -648
- package/src/service/materialization_service.ts +0 -929
- package/src/service/materialized_table_gc.spec.ts +0 -383
- package/src/service/materialized_table_gc.ts +0 -279
- package/src/service/model.spec.ts +0 -257
- package/src/service/model.ts +0 -1069
- package/src/service/package.spec.ts +0 -236
- package/src/service/package.ts +0 -463
- package/src/service/project.ts +0 -681
- package/src/service/project_compile.spec.ts +0 -197
- package/src/service/project_store.spec.ts +0 -859
- package/src/service/project_store.ts +0 -1531
- package/src/service/quoting.ts +0 -41
- package/src/service/resolve_project.ts +0 -13
- package/src/storage/BaseRepository.ts +0 -31
- package/src/storage/DatabaseInterface.ts +0 -180
- package/src/storage/StorageManager.mock.ts +0 -59
- package/src/storage/StorageManager.ts +0 -210
- package/src/storage/duckdb/ConnectionRepository.ts +0 -141
- package/src/storage/duckdb/DuckDBConnection.ts +0 -177
- package/src/storage/duckdb/DuckDBManifestStore.ts +0 -70
- package/src/storage/duckdb/DuckDBRepository.ts +0 -224
- package/src/storage/duckdb/ManifestRepository.ts +0 -119
- package/src/storage/duckdb/MaterializationRepository.ts +0 -249
- package/src/storage/duckdb/PackageRepository.ts +0 -135
- package/src/storage/duckdb/ProjectRepository.ts +0 -148
- package/src/storage/duckdb/manifest_store.spec.ts +0 -133
- package/src/storage/duckdb/schema.ts +0 -147
- package/src/storage/ducklake/DuckLakeManifestStore.ts +0 -146
- package/src/utils.ts +0 -13
- package/tests/fixtures/persist-test/data/orders.csv +0 -5
- package/tests/fixtures/persist-test/persist_test.malloy +0 -11
- package/tests/fixtures/persist-test/publisher.json +0 -5
- package/tests/fixtures/publisher.config.json +0 -15
- package/tests/harness/e2e.ts +0 -96
- package/tests/harness/mcp_test_setup.ts +0 -344
- package/tests/harness/mocks.ts +0 -37
- package/tests/harness/rest_e2e.ts +0 -68
- package/tests/harness/uris.ts +0 -31
- package/tests/integration/materialization/materialization_lifecycle.integration.spec.ts +0 -470
- package/tests/integration/mcp/mcp_execute_query_tool.integration.spec.ts +0 -434
- package/tests/integration/mcp/mcp_resource.integration.spec.ts +0 -663
- package/tests/integration/mcp/mcp_transport.integration.spec.ts +0 -122
- package/tests/integration/mcp/setup.spec.ts +0 -5
- package/tests/unit/duckdb/attached_databases.test.ts +0 -1132
- package/tests/unit/ducklake/ducklake.test.ts +0 -950
- package/tests/unit/mcp/prompt_definitions.test.ts +0 -102
- package/tests/unit/mcp/prompt_happy.test.ts +0 -51
- package/tsconfig.json +0 -32
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { logger } from "../logger";
|
|
2
|
-
import {
|
|
3
|
-
BuildManifest,
|
|
4
|
-
ManifestEntry,
|
|
5
|
-
ManifestStore,
|
|
6
|
-
} from "../storage/DatabaseInterface";
|
|
7
|
-
import { ProjectStore } from "./project_store";
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Manages build manifests that map source names to materialized table names.
|
|
11
|
-
*
|
|
12
|
-
* A build manifest is produced during materialization: each entry records which
|
|
13
|
-
* DuckDB table backs a given Malloy source.
|
|
14
|
-
*
|
|
15
|
-
* Two-phase lifecycle:
|
|
16
|
-
* 1. **Persist** – `writeEntry` stores individual entries to the DB as they
|
|
17
|
-
* are produced during a build.
|
|
18
|
-
* 2. **Reload** – `reloadManifest` reads the manifest from the DB and
|
|
19
|
-
* recompiles all models in the package so the Malloy Runtime resolves
|
|
20
|
-
* persist references to the materialized tables.
|
|
21
|
-
*
|
|
22
|
-
* All manifest operations delegate to the active {@link ManifestStore}, which
|
|
23
|
-
* is either the local DuckDB store (standalone) or DuckLake (orchestrated).
|
|
24
|
-
*/
|
|
25
|
-
export class ManifestService {
|
|
26
|
-
constructor(private projectStore: ProjectStore) {}
|
|
27
|
-
|
|
28
|
-
private manifestStoreFor(projectId: string): ManifestStore {
|
|
29
|
-
return this.projectStore.storageManager.getManifestStore(projectId);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
async getManifest(
|
|
33
|
-
projectId: string,
|
|
34
|
-
packageName: string,
|
|
35
|
-
): Promise<BuildManifest> {
|
|
36
|
-
return this.manifestStoreFor(projectId).getManifest(
|
|
37
|
-
projectId,
|
|
38
|
-
packageName,
|
|
39
|
-
);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
async writeEntry(
|
|
43
|
-
projectId: string,
|
|
44
|
-
packageName: string,
|
|
45
|
-
buildId: string,
|
|
46
|
-
tableName: string,
|
|
47
|
-
sourceName: string,
|
|
48
|
-
connectionName: string,
|
|
49
|
-
): Promise<void> {
|
|
50
|
-
await this.manifestStoreFor(projectId).writeEntry(
|
|
51
|
-
projectId,
|
|
52
|
-
packageName,
|
|
53
|
-
buildId,
|
|
54
|
-
tableName,
|
|
55
|
-
sourceName,
|
|
56
|
-
connectionName,
|
|
57
|
-
);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
async deleteEntry(projectId: string, entryId: string): Promise<void> {
|
|
61
|
-
await this.manifestStoreFor(projectId).deleteEntry(entryId);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Read the manifest from storage and reload it onto this worker's
|
|
66
|
-
* package so subsequent queries resolve persist references to
|
|
67
|
-
* materialized tables. This is what `POST .../manifest?action=reload` calls
|
|
68
|
-
* (used by orchestrated workers that need to pick up manifest state
|
|
69
|
-
* produced elsewhere). Despite the name, nothing is loaded *into*
|
|
70
|
-
* storage — the worker pulls the manifest down and recompiles.
|
|
71
|
-
*/
|
|
72
|
-
async reloadManifest(
|
|
73
|
-
projectId: string,
|
|
74
|
-
packageName: string,
|
|
75
|
-
projectName: string,
|
|
76
|
-
): Promise<BuildManifest> {
|
|
77
|
-
const manifest = await this.getManifest(projectId, packageName);
|
|
78
|
-
|
|
79
|
-
const project = await this.projectStore.getProject(projectName, false);
|
|
80
|
-
const pkg = await project.getPackage(packageName, false);
|
|
81
|
-
await pkg.reloadAllModels(manifest.entries);
|
|
82
|
-
|
|
83
|
-
logger.info("Reloaded manifest and recompiled models", {
|
|
84
|
-
projectId,
|
|
85
|
-
packageName,
|
|
86
|
-
entryCount: Object.keys(manifest.entries).length,
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
return manifest;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* Get the manifest entries from the active store for inspection.
|
|
94
|
-
* Routes through ManifestStore so DuckLake mode reads the shared
|
|
95
|
-
* catalog instead of the local DuckDB table.
|
|
96
|
-
*/
|
|
97
|
-
async listEntries(
|
|
98
|
-
projectId: string,
|
|
99
|
-
packageName: string,
|
|
100
|
-
): Promise<ManifestEntry[]> {
|
|
101
|
-
return this.manifestStoreFor(projectId).listEntries(
|
|
102
|
-
projectId,
|
|
103
|
-
packageName,
|
|
104
|
-
);
|
|
105
|
-
}
|
|
106
|
-
}
|