@lightdash/common 0.1477.2 → 0.1477.4
Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.d.ts
CHANGED
package/dist/types/catalog.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { type CompiledExploreJoin, type
|
1
|
+
import { type CompiledExploreJoin, type InlineError } from './explore';
|
2
2
|
import { DimensionType, type CompiledDimension, type CompiledMetric, type Dimension, type Field, type FieldType } from './field';
|
3
3
|
import type { KnexPaginatedData } from './knex-paginate';
|
4
4
|
import { type ChartSummary } from './savedCharts';
|
@@ -135,7 +135,6 @@ export type CatalogItemWithTagUuids = CatalogItemSummary & {
|
|
135
135
|
export type CatalogItemsWithIcons = CatalogItemSummary & Pick<CatalogItem, 'icon'>;
|
136
136
|
export type SchedulerIndexCatalogJobPayload = {
|
137
137
|
projectUuid: string;
|
138
|
-
explores: (Explore | ExploreError)[];
|
139
138
|
userUuid: string;
|
140
139
|
prevCatalogItemsWithTags: CatalogItemWithTagUuids[];
|
141
140
|
prevCatalogItemsWithIcons: CatalogItemsWithIcons[];
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import { type LightdashProjectConfig } from '../types/lightdashProjectConfig';
|
2
|
-
export declare const loadLightdashProjectConfig: (yamlFileContents: string) => Promise<LightdashProjectConfig>;
|
2
|
+
export declare const loadLightdashProjectConfig: (yamlFileContents: string, onLoaded?: ((config: LightdashProjectConfig) => Promise<void>) | undefined) => Promise<LightdashProjectConfig>;
|
@@ -8,7 +8,7 @@ const yaml = tslib_1.__importStar(require("js-yaml"));
|
|
8
8
|
const lightdash_project_config_1_0_json_1 = tslib_1.__importDefault(require("../schemas/json/lightdash-project-config-1.0.json"));
|
9
9
|
const errors_1 = require("../types/errors");
|
10
10
|
const lightdashProjectConfig_1 = require("../types/lightdashProjectConfig");
|
11
|
-
const loadLightdashProjectConfig = async (yamlFileContents) => {
|
11
|
+
const loadLightdashProjectConfig = async (yamlFileContents, onLoaded) => {
|
12
12
|
if (yamlFileContents.trim() === '') {
|
13
13
|
return {
|
14
14
|
spotlight: lightdashProjectConfig_1.DEFAULT_SPOTLIGHT_CONFIG,
|
@@ -21,6 +21,9 @@ const loadLightdashProjectConfig = async (yamlFileContents) => {
|
|
21
21
|
const errors = (0, better_ajv_errors_1.default)(lightdash_project_config_1_0_json_1.default, configFile, validate.errors || [], { indent: 2 });
|
22
22
|
throw new errors_1.ParseError(`Invalid lightdash.config.yml with errors:\n${errors}`);
|
23
23
|
}
|
24
|
+
if (onLoaded) {
|
25
|
+
await onLoaded(configFile);
|
26
|
+
}
|
24
27
|
return configFile;
|
25
28
|
};
|
26
29
|
exports.loadLightdashProjectConfig = loadLightdashProjectConfig;
|