@lightdash/common 0.1435.0 → 0.1436.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -149,7 +149,12 @@ export declare enum SupportedDbtVersions {
149
149
  V1_8 = "v1.8",
150
150
  V1_9 = "v1.9"
151
151
  }
152
- export declare const DefaultSupportedDbtVersion = SupportedDbtVersions.V1_4;
152
+ export declare enum DbtVersionOptionLatest {
153
+ LATEST = "latest"
154
+ }
155
+ export type DbtVersionOption = SupportedDbtVersions | DbtVersionOptionLatest;
156
+ export declare const getLatestSupportDbtVersion: () => SupportedDbtVersions;
157
+ export declare const DefaultSupportedDbtVersion = DbtVersionOptionLatest.LATEST;
153
158
  export interface DbtProjectCompilerBase extends DbtProjectConfigBase {
154
159
  target?: string;
155
160
  environment?: DbtProjectEnvironmentVariable[];
@@ -229,7 +234,7 @@ export type Project = {
229
234
  warehouseConnection?: WarehouseCredentials;
230
235
  pinnedListUuid?: string;
231
236
  upstreamProjectUuid?: string;
232
- dbtVersion: SupportedDbtVersions;
237
+ dbtVersion: DbtVersionOption;
233
238
  semanticLayerConnection?: SemanticLayerConnection;
234
239
  schedulerTimezone: string;
235
240
  createdByUserUuid: string | null;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DefaultSupportedDbtVersion = exports.SupportedDbtVersions = exports.sensitiveCredentialsFieldNames = exports.SemanticLayerType = exports.WarehouseTypes = exports.DbtProjectType = exports.ProjectType = void 0;
3
+ exports.DefaultSupportedDbtVersion = exports.getLatestSupportDbtVersion = exports.DbtVersionOptionLatest = exports.SupportedDbtVersions = exports.sensitiveCredentialsFieldNames = exports.SemanticLayerType = exports.WarehouseTypes = exports.DbtProjectType = exports.ProjectType = void 0;
4
4
  var ProjectType;
5
5
  (function (ProjectType) {
6
6
  ProjectType["DEFAULT"] = "DEFAULT";
@@ -48,4 +48,14 @@ var SupportedDbtVersions;
48
48
  SupportedDbtVersions["V1_8"] = "v1.8";
49
49
  SupportedDbtVersions["V1_9"] = "v1.9";
50
50
  })(SupportedDbtVersions = exports.SupportedDbtVersions || (exports.SupportedDbtVersions = {}));
51
- exports.DefaultSupportedDbtVersion = SupportedDbtVersions.V1_4;
51
+ // Make it an enum to avoid TSOA errors
52
+ var DbtVersionOptionLatest;
53
+ (function (DbtVersionOptionLatest) {
54
+ DbtVersionOptionLatest["LATEST"] = "latest";
55
+ })(DbtVersionOptionLatest = exports.DbtVersionOptionLatest || (exports.DbtVersionOptionLatest = {}));
56
+ const getLatestSupportDbtVersion = () => {
57
+ const versions = Object.values(SupportedDbtVersions);
58
+ return versions[versions.length - 1];
59
+ };
60
+ exports.getLatestSupportDbtVersion = getLatestSupportDbtVersion;
61
+ exports.DefaultSupportedDbtVersion = DbtVersionOptionLatest.LATEST;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightdash/common",
3
- "version": "0.1435.0",
3
+ "version": "0.1436.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [