@altimateai/altimate-code 0.6.1 → 0.7.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/dbt-tools/dist/index.js
CHANGED
|
@@ -5865,7 +5865,7 @@ var require_python_bridge = __commonJS((exports, module) => {
|
|
|
5865
5865
|
module.exports = pythonBridge.pythonBridge = pythonBridge;
|
|
5866
5866
|
});
|
|
5867
5867
|
|
|
5868
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
5868
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/identity.js
|
|
5869
5869
|
var require_identity = __commonJS((exports) => {
|
|
5870
5870
|
var ALIAS = Symbol.for("yaml.alias");
|
|
5871
5871
|
var DOC = Symbol.for("yaml.document");
|
|
@@ -5919,7 +5919,7 @@ var require_identity = __commonJS((exports) => {
|
|
|
5919
5919
|
exports.isSeq = isSeq;
|
|
5920
5920
|
});
|
|
5921
5921
|
|
|
5922
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
5922
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/visit.js
|
|
5923
5923
|
var require_visit = __commonJS((exports) => {
|
|
5924
5924
|
var identity = require_identity();
|
|
5925
5925
|
var BREAK = Symbol("break visit");
|
|
@@ -6074,7 +6074,7 @@ var require_visit = __commonJS((exports) => {
|
|
|
6074
6074
|
exports.visitAsync = visitAsync;
|
|
6075
6075
|
});
|
|
6076
6076
|
|
|
6077
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
6077
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/doc/directives.js
|
|
6078
6078
|
var require_directives = __commonJS((exports) => {
|
|
6079
6079
|
var identity = require_identity();
|
|
6080
6080
|
var visit = require_visit();
|
|
@@ -6226,7 +6226,7 @@ var require_directives = __commonJS((exports) => {
|
|
|
6226
6226
|
exports.Directives = Directives;
|
|
6227
6227
|
});
|
|
6228
6228
|
|
|
6229
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
6229
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/doc/anchors.js
|
|
6230
6230
|
var require_anchors = __commonJS((exports) => {
|
|
6231
6231
|
var identity = require_identity();
|
|
6232
6232
|
var visit = require_visit();
|
|
@@ -6288,7 +6288,7 @@ var require_anchors = __commonJS((exports) => {
|
|
|
6288
6288
|
exports.findNewAnchor = findNewAnchor;
|
|
6289
6289
|
});
|
|
6290
6290
|
|
|
6291
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
6291
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/doc/applyReviver.js
|
|
6292
6292
|
var require_applyReviver = __commonJS((exports) => {
|
|
6293
6293
|
function applyReviver(reviver, obj2, key, val) {
|
|
6294
6294
|
if (val && typeof val === "object") {
|
|
@@ -6335,7 +6335,7 @@ var require_applyReviver = __commonJS((exports) => {
|
|
|
6335
6335
|
exports.applyReviver = applyReviver;
|
|
6336
6336
|
});
|
|
6337
6337
|
|
|
6338
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
6338
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/toJS.js
|
|
6339
6339
|
var require_toJS = __commonJS((exports) => {
|
|
6340
6340
|
var identity = require_identity();
|
|
6341
6341
|
function toJS(value, arg, ctx) {
|
|
@@ -6362,7 +6362,7 @@ var require_toJS = __commonJS((exports) => {
|
|
|
6362
6362
|
exports.toJS = toJS;
|
|
6363
6363
|
});
|
|
6364
6364
|
|
|
6365
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
6365
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/Node.js
|
|
6366
6366
|
var require_Node = __commonJS((exports) => {
|
|
6367
6367
|
var applyReviver = require_applyReviver();
|
|
6368
6368
|
var identity = require_identity();
|
|
@@ -6399,7 +6399,7 @@ var require_Node = __commonJS((exports) => {
|
|
|
6399
6399
|
exports.NodeBase = NodeBase;
|
|
6400
6400
|
});
|
|
6401
6401
|
|
|
6402
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
6402
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/Alias.js
|
|
6403
6403
|
var require_Alias = __commonJS((exports) => {
|
|
6404
6404
|
var anchors = require_anchors();
|
|
6405
6405
|
var visit = require_visit();
|
|
@@ -6507,7 +6507,7 @@ var require_Alias = __commonJS((exports) => {
|
|
|
6507
6507
|
exports.Alias = Alias;
|
|
6508
6508
|
});
|
|
6509
6509
|
|
|
6510
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
6510
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/Scalar.js
|
|
6511
6511
|
var require_Scalar = __commonJS((exports) => {
|
|
6512
6512
|
var identity = require_identity();
|
|
6513
6513
|
var Node = require_Node();
|
|
@@ -6535,7 +6535,7 @@ var require_Scalar = __commonJS((exports) => {
|
|
|
6535
6535
|
exports.isScalarValue = isScalarValue;
|
|
6536
6536
|
});
|
|
6537
6537
|
|
|
6538
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
6538
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/doc/createNode.js
|
|
6539
6539
|
var require_createNode = __commonJS((exports) => {
|
|
6540
6540
|
var Alias = require_Alias();
|
|
6541
6541
|
var identity = require_identity();
|
|
@@ -6607,7 +6607,7 @@ var require_createNode = __commonJS((exports) => {
|
|
|
6607
6607
|
exports.createNode = createNode;
|
|
6608
6608
|
});
|
|
6609
6609
|
|
|
6610
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
6610
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/Collection.js
|
|
6611
6611
|
var require_Collection = __commonJS((exports) => {
|
|
6612
6612
|
var createNode = require_createNode();
|
|
6613
6613
|
var identity = require_identity();
|
|
@@ -6722,7 +6722,7 @@ var require_Collection = __commonJS((exports) => {
|
|
|
6722
6722
|
exports.isEmptyPath = isEmptyPath;
|
|
6723
6723
|
});
|
|
6724
6724
|
|
|
6725
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
6725
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyComment.js
|
|
6726
6726
|
var require_stringifyComment = __commonJS((exports) => {
|
|
6727
6727
|
var stringifyComment = (str) => str.replace(/^(?!$)(?: $)?/gm, "#");
|
|
6728
6728
|
function indentComment(comment, indent) {
|
|
@@ -6739,7 +6739,7 @@ var require_stringifyComment = __commonJS((exports) => {
|
|
|
6739
6739
|
exports.stringifyComment = stringifyComment;
|
|
6740
6740
|
});
|
|
6741
6741
|
|
|
6742
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
6742
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/foldFlowLines.js
|
|
6743
6743
|
var require_foldFlowLines = __commonJS((exports) => {
|
|
6744
6744
|
var FOLD_FLOW = "flow";
|
|
6745
6745
|
var FOLD_BLOCK = "block";
|
|
@@ -6876,7 +6876,7 @@ ${indent}${text.slice(fold + 1, end2)}`;
|
|
|
6876
6876
|
exports.foldFlowLines = foldFlowLines;
|
|
6877
6877
|
});
|
|
6878
6878
|
|
|
6879
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
6879
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyString.js
|
|
6880
6880
|
var require_stringifyString = __commonJS((exports) => {
|
|
6881
6881
|
var Scalar = require_Scalar();
|
|
6882
6882
|
var foldFlowLines = require_foldFlowLines();
|
|
@@ -7174,7 +7174,7 @@ ${indent}`);
|
|
|
7174
7174
|
exports.stringifyString = stringifyString;
|
|
7175
7175
|
});
|
|
7176
7176
|
|
|
7177
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
7177
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringify.js
|
|
7178
7178
|
var require_stringify = __commonJS((exports) => {
|
|
7179
7179
|
var anchors = require_anchors();
|
|
7180
7180
|
var identity = require_identity();
|
|
@@ -7197,6 +7197,7 @@ var require_stringify = __commonJS((exports) => {
|
|
|
7197
7197
|
nullStr: "null",
|
|
7198
7198
|
simpleKeys: false,
|
|
7199
7199
|
singleQuote: null,
|
|
7200
|
+
trailingComma: false,
|
|
7200
7201
|
trueStr: "true",
|
|
7201
7202
|
verifyAliasOrder: true
|
|
7202
7203
|
}, doc.schema.toStringOptions, options2);
|
|
@@ -7294,7 +7295,7 @@ ${ctx.indent}${str}`;
|
|
|
7294
7295
|
exports.stringify = stringify;
|
|
7295
7296
|
});
|
|
7296
7297
|
|
|
7297
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
7298
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyPair.js
|
|
7298
7299
|
var require_stringifyPair = __commonJS((exports) => {
|
|
7299
7300
|
var identity = require_identity();
|
|
7300
7301
|
var Scalar = require_Scalar();
|
|
@@ -7430,7 +7431,7 @@ ${ctx.indent}`;
|
|
|
7430
7431
|
exports.stringifyPair = stringifyPair;
|
|
7431
7432
|
});
|
|
7432
7433
|
|
|
7433
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
7434
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/log.js
|
|
7434
7435
|
var require_log = __commonJS((exports) => {
|
|
7435
7436
|
var node_process = __require("process");
|
|
7436
7437
|
function debug(logLevel, ...messages) {
|
|
@@ -7449,7 +7450,7 @@ var require_log = __commonJS((exports) => {
|
|
|
7449
7450
|
exports.warn = warn;
|
|
7450
7451
|
});
|
|
7451
7452
|
|
|
7452
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
7453
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/merge.js
|
|
7453
7454
|
var require_merge = __commonJS((exports) => {
|
|
7454
7455
|
var identity = require_identity();
|
|
7455
7456
|
var Scalar = require_Scalar();
|
|
@@ -7503,7 +7504,7 @@ var require_merge = __commonJS((exports) => {
|
|
|
7503
7504
|
exports.merge = merge;
|
|
7504
7505
|
});
|
|
7505
7506
|
|
|
7506
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
7507
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/addPairToJSMap.js
|
|
7507
7508
|
var require_addPairToJSMap = __commonJS((exports) => {
|
|
7508
7509
|
var log = require_log();
|
|
7509
7510
|
var merge = require_merge();
|
|
@@ -7564,7 +7565,7 @@ var require_addPairToJSMap = __commonJS((exports) => {
|
|
|
7564
7565
|
exports.addPairToJSMap = addPairToJSMap;
|
|
7565
7566
|
});
|
|
7566
7567
|
|
|
7567
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
7568
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/Pair.js
|
|
7568
7569
|
var require_Pair = __commonJS((exports) => {
|
|
7569
7570
|
var createNode = require_createNode();
|
|
7570
7571
|
var stringifyPair = require_stringifyPair();
|
|
@@ -7602,7 +7603,7 @@ var require_Pair = __commonJS((exports) => {
|
|
|
7602
7603
|
exports.createPair = createPair;
|
|
7603
7604
|
});
|
|
7604
7605
|
|
|
7605
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
7606
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyCollection.js
|
|
7606
7607
|
var require_stringifyCollection = __commonJS((exports) => {
|
|
7607
7608
|
var identity = require_identity();
|
|
7608
7609
|
var stringify = require_stringify();
|
|
@@ -7705,13 +7706,20 @@ ${indent}${line}` : `
|
|
|
7705
7706
|
if (comment)
|
|
7706
7707
|
reqNewline = true;
|
|
7707
7708
|
let str = stringify.stringify(item, itemCtx, () => comment = null);
|
|
7708
|
-
|
|
7709
|
+
reqNewline || (reqNewline = lines.length > linesAtValue || str.includes(`
|
|
7710
|
+
`));
|
|
7711
|
+
if (i < items.length - 1) {
|
|
7709
7712
|
str += ",";
|
|
7713
|
+
} else if (ctx.options.trailingComma) {
|
|
7714
|
+
if (ctx.options.lineWidth > 0) {
|
|
7715
|
+
reqNewline || (reqNewline = lines.reduce((sum, line) => sum + line.length + 2, 2) + (str.length + 2) > ctx.options.lineWidth);
|
|
7716
|
+
}
|
|
7717
|
+
if (reqNewline) {
|
|
7718
|
+
str += ",";
|
|
7719
|
+
}
|
|
7720
|
+
}
|
|
7710
7721
|
if (comment)
|
|
7711
7722
|
str += stringifyComment.lineComment(str, itemIndent, commentString(comment));
|
|
7712
|
-
if (!reqNewline && (lines.length > linesAtValue || str.includes(`
|
|
7713
|
-
`)))
|
|
7714
|
-
reqNewline = true;
|
|
7715
7723
|
lines.push(str);
|
|
7716
7724
|
linesAtValue = lines.length;
|
|
7717
7725
|
}
|
|
@@ -7747,7 +7755,7 @@ ${indent}${end}`;
|
|
|
7747
7755
|
exports.stringifyCollection = stringifyCollection;
|
|
7748
7756
|
});
|
|
7749
7757
|
|
|
7750
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
7758
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/YAMLMap.js
|
|
7751
7759
|
var require_YAMLMap = __commonJS((exports) => {
|
|
7752
7760
|
var stringifyCollection = require_stringifyCollection();
|
|
7753
7761
|
var addPairToJSMap = require_addPairToJSMap();
|
|
@@ -7874,7 +7882,7 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
|
7874
7882
|
exports.findPair = findPair;
|
|
7875
7883
|
});
|
|
7876
7884
|
|
|
7877
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
7885
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/common/map.js
|
|
7878
7886
|
var require_map2 = __commonJS((exports) => {
|
|
7879
7887
|
var identity = require_identity();
|
|
7880
7888
|
var YAMLMap = require_YAMLMap();
|
|
@@ -7893,7 +7901,7 @@ var require_map2 = __commonJS((exports) => {
|
|
|
7893
7901
|
exports.map = map;
|
|
7894
7902
|
});
|
|
7895
7903
|
|
|
7896
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
7904
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/YAMLSeq.js
|
|
7897
7905
|
var require_YAMLSeq = __commonJS((exports) => {
|
|
7898
7906
|
var createNode = require_createNode();
|
|
7899
7907
|
var stringifyCollection = require_stringifyCollection();
|
|
@@ -7986,7 +7994,7 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
|
7986
7994
|
exports.YAMLSeq = YAMLSeq;
|
|
7987
7995
|
});
|
|
7988
7996
|
|
|
7989
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
7997
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/common/seq.js
|
|
7990
7998
|
var require_seq = __commonJS((exports) => {
|
|
7991
7999
|
var identity = require_identity();
|
|
7992
8000
|
var YAMLSeq = require_YAMLSeq();
|
|
@@ -8005,7 +8013,7 @@ var require_seq = __commonJS((exports) => {
|
|
|
8005
8013
|
exports.seq = seq;
|
|
8006
8014
|
});
|
|
8007
8015
|
|
|
8008
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
8016
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/common/string.js
|
|
8009
8017
|
var require_string = __commonJS((exports) => {
|
|
8010
8018
|
var stringifyString = require_stringifyString();
|
|
8011
8019
|
var string = {
|
|
@@ -8021,7 +8029,7 @@ var require_string = __commonJS((exports) => {
|
|
|
8021
8029
|
exports.string = string;
|
|
8022
8030
|
});
|
|
8023
8031
|
|
|
8024
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
8032
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/common/null.js
|
|
8025
8033
|
var require_null = __commonJS((exports) => {
|
|
8026
8034
|
var Scalar = require_Scalar();
|
|
8027
8035
|
var nullTag = {
|
|
@@ -8036,7 +8044,7 @@ var require_null = __commonJS((exports) => {
|
|
|
8036
8044
|
exports.nullTag = nullTag;
|
|
8037
8045
|
});
|
|
8038
8046
|
|
|
8039
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
8047
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/core/bool.js
|
|
8040
8048
|
var require_bool = __commonJS((exports) => {
|
|
8041
8049
|
var Scalar = require_Scalar();
|
|
8042
8050
|
var boolTag = {
|
|
@@ -8057,7 +8065,7 @@ var require_bool = __commonJS((exports) => {
|
|
|
8057
8065
|
exports.boolTag = boolTag;
|
|
8058
8066
|
});
|
|
8059
8067
|
|
|
8060
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
8068
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyNumber.js
|
|
8061
8069
|
var require_stringifyNumber = __commonJS((exports) => {
|
|
8062
8070
|
function stringifyNumber({ format, minFractionDigits, tag, value }) {
|
|
8063
8071
|
if (typeof value === "bigint")
|
|
@@ -8081,7 +8089,7 @@ var require_stringifyNumber = __commonJS((exports) => {
|
|
|
8081
8089
|
exports.stringifyNumber = stringifyNumber;
|
|
8082
8090
|
});
|
|
8083
8091
|
|
|
8084
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
8092
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/core/float.js
|
|
8085
8093
|
var require_float = __commonJS((exports) => {
|
|
8086
8094
|
var Scalar = require_Scalar();
|
|
8087
8095
|
var stringifyNumber = require_stringifyNumber();
|
|
@@ -8124,7 +8132,7 @@ var require_float = __commonJS((exports) => {
|
|
|
8124
8132
|
exports.floatNaN = floatNaN;
|
|
8125
8133
|
});
|
|
8126
8134
|
|
|
8127
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
8135
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/core/int.js
|
|
8128
8136
|
var require_int = __commonJS((exports) => {
|
|
8129
8137
|
var stringifyNumber = require_stringifyNumber();
|
|
8130
8138
|
var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
|
|
@@ -8166,7 +8174,7 @@ var require_int = __commonJS((exports) => {
|
|
|
8166
8174
|
exports.intOct = intOct;
|
|
8167
8175
|
});
|
|
8168
8176
|
|
|
8169
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
8177
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/core/schema.js
|
|
8170
8178
|
var require_schema = __commonJS((exports) => {
|
|
8171
8179
|
var map = require_map2();
|
|
8172
8180
|
var _null = require_null();
|
|
@@ -8191,7 +8199,7 @@ var require_schema = __commonJS((exports) => {
|
|
|
8191
8199
|
exports.schema = schema;
|
|
8192
8200
|
});
|
|
8193
8201
|
|
|
8194
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
8202
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/json/schema.js
|
|
8195
8203
|
var require_schema2 = __commonJS((exports) => {
|
|
8196
8204
|
var Scalar = require_Scalar();
|
|
8197
8205
|
var map = require_map2();
|
|
@@ -8255,7 +8263,7 @@ var require_schema2 = __commonJS((exports) => {
|
|
|
8255
8263
|
exports.schema = schema;
|
|
8256
8264
|
});
|
|
8257
8265
|
|
|
8258
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
8266
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/binary.js
|
|
8259
8267
|
var require_binary = __commonJS((exports) => {
|
|
8260
8268
|
var node_buffer = __require("buffer");
|
|
8261
8269
|
var Scalar = require_Scalar();
|
|
@@ -8310,7 +8318,7 @@ var require_binary = __commonJS((exports) => {
|
|
|
8310
8318
|
exports.binary = binary;
|
|
8311
8319
|
});
|
|
8312
8320
|
|
|
8313
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
8321
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/pairs.js
|
|
8314
8322
|
var require_pairs = __commonJS((exports) => {
|
|
8315
8323
|
var identity = require_identity();
|
|
8316
8324
|
var Pair = require_Pair();
|
|
@@ -8385,7 +8393,7 @@ ${cn.comment}` : item.comment;
|
|
|
8385
8393
|
exports.resolvePairs = resolvePairs;
|
|
8386
8394
|
});
|
|
8387
8395
|
|
|
8388
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
8396
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/omap.js
|
|
8389
8397
|
var require_omap = __commonJS((exports) => {
|
|
8390
8398
|
var identity = require_identity();
|
|
8391
8399
|
var toJS = require_toJS();
|
|
@@ -8457,7 +8465,7 @@ var require_omap = __commonJS((exports) => {
|
|
|
8457
8465
|
exports.omap = omap;
|
|
8458
8466
|
});
|
|
8459
8467
|
|
|
8460
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
8468
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/bool.js
|
|
8461
8469
|
var require_bool2 = __commonJS((exports) => {
|
|
8462
8470
|
var Scalar = require_Scalar();
|
|
8463
8471
|
function boolStringify({ value, source }, ctx) {
|
|
@@ -8486,7 +8494,7 @@ var require_bool2 = __commonJS((exports) => {
|
|
|
8486
8494
|
exports.trueTag = trueTag;
|
|
8487
8495
|
});
|
|
8488
8496
|
|
|
8489
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
8497
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/float.js
|
|
8490
8498
|
var require_float2 = __commonJS((exports) => {
|
|
8491
8499
|
var Scalar = require_Scalar();
|
|
8492
8500
|
var stringifyNumber = require_stringifyNumber();
|
|
@@ -8532,7 +8540,7 @@ var require_float2 = __commonJS((exports) => {
|
|
|
8532
8540
|
exports.floatNaN = floatNaN;
|
|
8533
8541
|
});
|
|
8534
8542
|
|
|
8535
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
8543
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/int.js
|
|
8536
8544
|
var require_int2 = __commonJS((exports) => {
|
|
8537
8545
|
var stringifyNumber = require_stringifyNumber();
|
|
8538
8546
|
var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
|
|
@@ -8608,7 +8616,7 @@ var require_int2 = __commonJS((exports) => {
|
|
|
8608
8616
|
exports.intOct = intOct;
|
|
8609
8617
|
});
|
|
8610
8618
|
|
|
8611
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
8619
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/set.js
|
|
8612
8620
|
var require_set = __commonJS((exports) => {
|
|
8613
8621
|
var identity = require_identity();
|
|
8614
8622
|
var Pair = require_Pair();
|
|
@@ -8691,7 +8699,7 @@ var require_set = __commonJS((exports) => {
|
|
|
8691
8699
|
exports.set = set;
|
|
8692
8700
|
});
|
|
8693
8701
|
|
|
8694
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
8702
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js
|
|
8695
8703
|
var require_timestamp = __commonJS((exports) => {
|
|
8696
8704
|
var stringifyNumber = require_stringifyNumber();
|
|
8697
8705
|
function parseSexagesimal(str, asBigInt) {
|
|
@@ -8773,7 +8781,7 @@ var require_timestamp = __commonJS((exports) => {
|
|
|
8773
8781
|
exports.timestamp = timestamp;
|
|
8774
8782
|
});
|
|
8775
8783
|
|
|
8776
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
8784
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/schema.js
|
|
8777
8785
|
var require_schema3 = __commonJS((exports) => {
|
|
8778
8786
|
var map = require_map2();
|
|
8779
8787
|
var _null = require_null();
|
|
@@ -8814,7 +8822,7 @@ var require_schema3 = __commonJS((exports) => {
|
|
|
8814
8822
|
exports.schema = schema;
|
|
8815
8823
|
});
|
|
8816
8824
|
|
|
8817
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
8825
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/tags.js
|
|
8818
8826
|
var require_tags = __commonJS((exports) => {
|
|
8819
8827
|
var map = require_map2();
|
|
8820
8828
|
var _null = require_null();
|
|
@@ -8905,7 +8913,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
8905
8913
|
exports.getTags = getTags;
|
|
8906
8914
|
});
|
|
8907
8915
|
|
|
8908
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
8916
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/Schema.js
|
|
8909
8917
|
var require_Schema = __commonJS((exports) => {
|
|
8910
8918
|
var identity = require_identity();
|
|
8911
8919
|
var map = require_map2();
|
|
@@ -8935,7 +8943,7 @@ var require_Schema = __commonJS((exports) => {
|
|
|
8935
8943
|
exports.Schema = Schema;
|
|
8936
8944
|
});
|
|
8937
8945
|
|
|
8938
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
8946
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyDocument.js
|
|
8939
8947
|
var require_stringifyDocument = __commonJS((exports) => {
|
|
8940
8948
|
var identity = require_identity();
|
|
8941
8949
|
var stringify = require_stringify();
|
|
@@ -9015,7 +9023,7 @@ var require_stringifyDocument = __commonJS((exports) => {
|
|
|
9015
9023
|
exports.stringifyDocument = stringifyDocument;
|
|
9016
9024
|
});
|
|
9017
9025
|
|
|
9018
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
9026
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/doc/Document.js
|
|
9019
9027
|
var require_Document = __commonJS((exports) => {
|
|
9020
9028
|
var Alias = require_Alias();
|
|
9021
9029
|
var Collection = require_Collection();
|
|
@@ -9250,7 +9258,7 @@ var require_Document = __commonJS((exports) => {
|
|
|
9250
9258
|
exports.Document = Document;
|
|
9251
9259
|
});
|
|
9252
9260
|
|
|
9253
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
9261
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/errors.js
|
|
9254
9262
|
var require_errors2 = __commonJS((exports) => {
|
|
9255
9263
|
class YAMLError extends Error {
|
|
9256
9264
|
constructor(name, pos, code2, message) {
|
|
@@ -9315,7 +9323,7 @@ ${pointer}
|
|
|
9315
9323
|
exports.prettifyError = prettifyError;
|
|
9316
9324
|
});
|
|
9317
9325
|
|
|
9318
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
9326
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-props.js
|
|
9319
9327
|
var require_resolve_props = __commonJS((exports) => {
|
|
9320
9328
|
function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIndent, startOnNewline }) {
|
|
9321
9329
|
let spaceBefore = false;
|
|
@@ -9445,7 +9453,7 @@ var require_resolve_props = __commonJS((exports) => {
|
|
|
9445
9453
|
exports.resolveProps = resolveProps;
|
|
9446
9454
|
});
|
|
9447
9455
|
|
|
9448
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
9456
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/util-contains-newline.js
|
|
9449
9457
|
var require_util_contains_newline = __commonJS((exports) => {
|
|
9450
9458
|
function containsNewline(key) {
|
|
9451
9459
|
if (!key)
|
|
@@ -9485,7 +9493,7 @@ var require_util_contains_newline = __commonJS((exports) => {
|
|
|
9485
9493
|
exports.containsNewline = containsNewline;
|
|
9486
9494
|
});
|
|
9487
9495
|
|
|
9488
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
9496
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/util-flow-indent-check.js
|
|
9489
9497
|
var require_util_flow_indent_check = __commonJS((exports) => {
|
|
9490
9498
|
var utilContainsNewline = require_util_contains_newline();
|
|
9491
9499
|
function flowIndentCheck(indent, fc, onError) {
|
|
@@ -9500,7 +9508,7 @@ var require_util_flow_indent_check = __commonJS((exports) => {
|
|
|
9500
9508
|
exports.flowIndentCheck = flowIndentCheck;
|
|
9501
9509
|
});
|
|
9502
9510
|
|
|
9503
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
9511
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/util-map-includes.js
|
|
9504
9512
|
var require_util_map_includes = __commonJS((exports) => {
|
|
9505
9513
|
var identity = require_identity();
|
|
9506
9514
|
function mapIncludes(ctx, items, search) {
|
|
@@ -9513,7 +9521,7 @@ var require_util_map_includes = __commonJS((exports) => {
|
|
|
9513
9521
|
exports.mapIncludes = mapIncludes;
|
|
9514
9522
|
});
|
|
9515
9523
|
|
|
9516
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
9524
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-block-map.js
|
|
9517
9525
|
var require_resolve_block_map = __commonJS((exports) => {
|
|
9518
9526
|
var Pair = require_Pair();
|
|
9519
9527
|
var YAMLMap = require_YAMLMap();
|
|
@@ -9620,7 +9628,7 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
|
9620
9628
|
exports.resolveBlockMap = resolveBlockMap;
|
|
9621
9629
|
});
|
|
9622
9630
|
|
|
9623
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
9631
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-block-seq.js
|
|
9624
9632
|
var require_resolve_block_seq = __commonJS((exports) => {
|
|
9625
9633
|
var YAMLSeq = require_YAMLSeq();
|
|
9626
9634
|
var resolveProps = require_resolve_props();
|
|
@@ -9668,7 +9676,7 @@ var require_resolve_block_seq = __commonJS((exports) => {
|
|
|
9668
9676
|
exports.resolveBlockSeq = resolveBlockSeq;
|
|
9669
9677
|
});
|
|
9670
9678
|
|
|
9671
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
9679
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-end.js
|
|
9672
9680
|
var require_resolve_end = __commonJS((exports) => {
|
|
9673
9681
|
function resolveEnd(end, offset, reqSpace, onError) {
|
|
9674
9682
|
let comment = "";
|
|
@@ -9708,7 +9716,7 @@ var require_resolve_end = __commonJS((exports) => {
|
|
|
9708
9716
|
exports.resolveEnd = resolveEnd;
|
|
9709
9717
|
});
|
|
9710
9718
|
|
|
9711
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
9719
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-flow-collection.js
|
|
9712
9720
|
var require_resolve_flow_collection = __commonJS((exports) => {
|
|
9713
9721
|
var identity = require_identity();
|
|
9714
9722
|
var Pair = require_Pair();
|
|
@@ -9899,7 +9907,7 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
|
9899
9907
|
exports.resolveFlowCollection = resolveFlowCollection;
|
|
9900
9908
|
});
|
|
9901
9909
|
|
|
9902
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
9910
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/compose-collection.js
|
|
9903
9911
|
var require_compose_collection = __commonJS((exports) => {
|
|
9904
9912
|
var identity = require_identity();
|
|
9905
9913
|
var Scalar = require_Scalar();
|
|
@@ -9961,7 +9969,7 @@ var require_compose_collection = __commonJS((exports) => {
|
|
|
9961
9969
|
exports.composeCollection = composeCollection;
|
|
9962
9970
|
});
|
|
9963
9971
|
|
|
9964
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
9972
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-block-scalar.js
|
|
9965
9973
|
var require_resolve_block_scalar = __commonJS((exports) => {
|
|
9966
9974
|
var Scalar = require_Scalar();
|
|
9967
9975
|
function resolveBlockScalar(ctx, scalar, onError) {
|
|
@@ -10154,7 +10162,7 @@ var require_resolve_block_scalar = __commonJS((exports) => {
|
|
|
10154
10162
|
exports.resolveBlockScalar = resolveBlockScalar;
|
|
10155
10163
|
});
|
|
10156
10164
|
|
|
10157
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
10165
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-flow-scalar.js
|
|
10158
10166
|
var require_resolve_flow_scalar = __commonJS((exports) => {
|
|
10159
10167
|
var Scalar = require_Scalar();
|
|
10160
10168
|
var resolveEnd = require_resolve_end();
|
|
@@ -10370,7 +10378,7 @@ var require_resolve_flow_scalar = __commonJS((exports) => {
|
|
|
10370
10378
|
exports.resolveFlowScalar = resolveFlowScalar;
|
|
10371
10379
|
});
|
|
10372
10380
|
|
|
10373
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
10381
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/compose-scalar.js
|
|
10374
10382
|
var require_compose_scalar = __commonJS((exports) => {
|
|
10375
10383
|
var identity = require_identity();
|
|
10376
10384
|
var Scalar = require_Scalar();
|
|
@@ -10448,7 +10456,7 @@ var require_compose_scalar = __commonJS((exports) => {
|
|
|
10448
10456
|
exports.composeScalar = composeScalar;
|
|
10449
10457
|
});
|
|
10450
10458
|
|
|
10451
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
10459
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/util-empty-scalar-position.js
|
|
10452
10460
|
var require_util_empty_scalar_position = __commonJS((exports) => {
|
|
10453
10461
|
function emptyScalarPosition(offset, before, pos) {
|
|
10454
10462
|
if (before) {
|
|
@@ -10475,7 +10483,7 @@ var require_util_empty_scalar_position = __commonJS((exports) => {
|
|
|
10475
10483
|
exports.emptyScalarPosition = emptyScalarPosition;
|
|
10476
10484
|
});
|
|
10477
10485
|
|
|
10478
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
10486
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/compose-node.js
|
|
10479
10487
|
var require_compose_node = __commonJS((exports) => {
|
|
10480
10488
|
var Alias = require_Alias();
|
|
10481
10489
|
var identity = require_identity();
|
|
@@ -10506,17 +10514,22 @@ var require_compose_node = __commonJS((exports) => {
|
|
|
10506
10514
|
case "block-map":
|
|
10507
10515
|
case "block-seq":
|
|
10508
10516
|
case "flow-collection":
|
|
10509
|
-
|
|
10510
|
-
|
|
10511
|
-
|
|
10517
|
+
try {
|
|
10518
|
+
node = composeCollection.composeCollection(CN, ctx, token, props, onError);
|
|
10519
|
+
if (anchor)
|
|
10520
|
+
node.anchor = anchor.source.substring(1);
|
|
10521
|
+
} catch (error) {
|
|
10522
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
10523
|
+
onError(token, "RESOURCE_EXHAUSTION", message);
|
|
10524
|
+
}
|
|
10512
10525
|
break;
|
|
10513
10526
|
default: {
|
|
10514
10527
|
const message = token.type === "error" ? token.message : `Unsupported token (type: ${token.type})`;
|
|
10515
10528
|
onError(token, "UNEXPECTED_TOKEN", message);
|
|
10516
|
-
node = composeEmptyNode(ctx, token.offset, undefined, null, props, onError);
|
|
10517
10529
|
isSrcToken = false;
|
|
10518
10530
|
}
|
|
10519
10531
|
}
|
|
10532
|
+
node ?? (node = composeEmptyNode(ctx, token.offset, undefined, null, props, onError));
|
|
10520
10533
|
if (anchor && node.anchor === "")
|
|
10521
10534
|
onError(anchor, "BAD_ALIAS", "Anchor cannot be an empty string");
|
|
10522
10535
|
if (atKey && ctx.options.stringKeys && (!identity.isScalar(node) || typeof node.value !== "string" || node.tag && node.tag !== "tag:yaml.org,2002:str")) {
|
|
@@ -10573,7 +10586,7 @@ var require_compose_node = __commonJS((exports) => {
|
|
|
10573
10586
|
exports.composeNode = composeNode;
|
|
10574
10587
|
});
|
|
10575
10588
|
|
|
10576
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
10589
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/compose-doc.js
|
|
10577
10590
|
var require_compose_doc = __commonJS((exports) => {
|
|
10578
10591
|
var Document = require_Document();
|
|
10579
10592
|
var composeNode = require_compose_node();
|
|
@@ -10613,7 +10626,7 @@ var require_compose_doc = __commonJS((exports) => {
|
|
|
10613
10626
|
exports.composeDoc = composeDoc;
|
|
10614
10627
|
});
|
|
10615
10628
|
|
|
10616
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
10629
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/composer.js
|
|
10617
10630
|
var require_composer = __commonJS((exports) => {
|
|
10618
10631
|
var node_process = __require("process");
|
|
10619
10632
|
var directives = require_directives();
|
|
@@ -10802,7 +10815,7 @@ ${end.comment}` : end.comment;
|
|
|
10802
10815
|
exports.Composer = Composer;
|
|
10803
10816
|
});
|
|
10804
10817
|
|
|
10805
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
10818
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/cst-scalar.js
|
|
10806
10819
|
var require_cst_scalar = __commonJS((exports) => {
|
|
10807
10820
|
var resolveBlockScalar = require_resolve_block_scalar();
|
|
10808
10821
|
var resolveFlowScalar = require_resolve_flow_scalar();
|
|
@@ -10992,7 +11005,7 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
|
10992
11005
|
exports.setScalarValue = setScalarValue;
|
|
10993
11006
|
});
|
|
10994
11007
|
|
|
10995
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
11008
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/cst-stringify.js
|
|
10996
11009
|
var require_cst_stringify = __commonJS((exports) => {
|
|
10997
11010
|
var stringify = (cst) => ("type" in cst) ? stringifyToken(cst) : stringifyItem(cst);
|
|
10998
11011
|
function stringifyToken(token) {
|
|
@@ -11050,7 +11063,7 @@ var require_cst_stringify = __commonJS((exports) => {
|
|
|
11050
11063
|
exports.stringify = stringify;
|
|
11051
11064
|
});
|
|
11052
11065
|
|
|
11053
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
11066
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/cst-visit.js
|
|
11054
11067
|
var require_cst_visit = __commonJS((exports) => {
|
|
11055
11068
|
var BREAK = Symbol("break visit");
|
|
11056
11069
|
var SKIP = Symbol("skip children");
|
|
@@ -11109,7 +11122,7 @@ var require_cst_visit = __commonJS((exports) => {
|
|
|
11109
11122
|
exports.visit = visit;
|
|
11110
11123
|
});
|
|
11111
11124
|
|
|
11112
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
11125
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/cst.js
|
|
11113
11126
|
var require_cst = __commonJS((exports) => {
|
|
11114
11127
|
var cstScalar = require_cst_scalar();
|
|
11115
11128
|
var cstStringify = require_cst_stringify();
|
|
@@ -11210,7 +11223,7 @@ var require_cst = __commonJS((exports) => {
|
|
|
11210
11223
|
exports.tokenType = tokenType;
|
|
11211
11224
|
});
|
|
11212
11225
|
|
|
11213
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
11226
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/lexer.js
|
|
11214
11227
|
var require_lexer = __commonJS((exports) => {
|
|
11215
11228
|
var cst = require_cst();
|
|
11216
11229
|
function isEmpty(ch) {
|
|
@@ -11796,7 +11809,7 @@ var require_lexer = __commonJS((exports) => {
|
|
|
11796
11809
|
exports.Lexer = Lexer;
|
|
11797
11810
|
});
|
|
11798
11811
|
|
|
11799
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
11812
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/line-counter.js
|
|
11800
11813
|
var require_line_counter = __commonJS((exports) => {
|
|
11801
11814
|
class LineCounter {
|
|
11802
11815
|
constructor() {
|
|
@@ -11824,7 +11837,7 @@ var require_line_counter = __commonJS((exports) => {
|
|
|
11824
11837
|
exports.LineCounter = LineCounter;
|
|
11825
11838
|
});
|
|
11826
11839
|
|
|
11827
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
11840
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/parser.js
|
|
11828
11841
|
var require_parser = __commonJS((exports) => {
|
|
11829
11842
|
var node_process = __require("process");
|
|
11830
11843
|
var cst = require_cst();
|
|
@@ -12673,7 +12686,7 @@ var require_parser = __commonJS((exports) => {
|
|
|
12673
12686
|
exports.Parser = Parser;
|
|
12674
12687
|
});
|
|
12675
12688
|
|
|
12676
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
12689
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/public-api.js
|
|
12677
12690
|
var require_public_api = __commonJS((exports) => {
|
|
12678
12691
|
var composer = require_composer();
|
|
12679
12692
|
var Document = require_Document();
|
|
@@ -12767,7 +12780,7 @@ var require_public_api = __commonJS((exports) => {
|
|
|
12767
12780
|
exports.stringify = stringify;
|
|
12768
12781
|
});
|
|
12769
12782
|
|
|
12770
|
-
// ../../node_modules/.bun/yaml@2.8.
|
|
12783
|
+
// ../../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/index.js
|
|
12771
12784
|
var composer, Document, Schema, errors, Alias, identity, Pair, Scalar, YAMLMap, YAMLSeq, cst, lexer, lineCounter, parser, publicApi, visit, $Composer, $Document, $Schema, $YAMLError, $YAMLParseError, $YAMLWarning, $Alias, $isAlias, $isCollection, $isDocument, $isMap, $isNode, $isPair, $isScalar, $isSeq, $Pair, $Scalar, $YAMLMap, $YAMLSeq, $Lexer, $LineCounter, $Parser, $parse, $parseAllDocuments, $parseDocument, $stringify, $visit, $visitAsync;
|
|
12772
12785
|
var init_dist = __esm(() => {
|
|
12773
12786
|
composer = require_composer();
|
|
@@ -20347,7 +20360,7 @@ __export(exports_src, {
|
|
|
20347
20360
|
isRedirect: () => isRedirect,
|
|
20348
20361
|
fileFromSync: () => fileFromSync,
|
|
20349
20362
|
fileFrom: () => fileFrom,
|
|
20350
|
-
default: () =>
|
|
20363
|
+
default: () => fetch2,
|
|
20351
20364
|
blobFromSync: () => blobFromSync,
|
|
20352
20365
|
blobFrom: () => blobFrom,
|
|
20353
20366
|
Response: () => Response,
|
|
@@ -20364,7 +20377,7 @@ import https from "node:https";
|
|
|
20364
20377
|
import zlib from "node:zlib";
|
|
20365
20378
|
import Stream2, { PassThrough as PassThrough2, pipeline as pump } from "node:stream";
|
|
20366
20379
|
import { Buffer as Buffer3 } from "node:buffer";
|
|
20367
|
-
async function
|
|
20380
|
+
async function fetch2(url, options_) {
|
|
20368
20381
|
return new Promise((resolve4, reject2) => {
|
|
20369
20382
|
const request = new Request(url, options_);
|
|
20370
20383
|
const { parsedURL, options: options2 } = getNodeRequestOptions(request);
|
|
@@ -20496,7 +20509,7 @@ async function fetch(url, options_) {
|
|
|
20496
20509
|
if (responseReferrerPolicy) {
|
|
20497
20510
|
requestOptions.referrerPolicy = responseReferrerPolicy;
|
|
20498
20511
|
}
|
|
20499
|
-
resolve4(
|
|
20512
|
+
resolve4(fetch2(new Request(locationURL, requestOptions)));
|
|
20500
20513
|
finalize();
|
|
20501
20514
|
return;
|
|
20502
20515
|
}
|
|
@@ -20644,22 +20657,22 @@ var init_src = __esm(() => {
|
|
|
20644
20657
|
supportedSchemas = new Set(["data:", "http:", "https:"]);
|
|
20645
20658
|
});
|
|
20646
20659
|
|
|
20647
|
-
// ../../node_modules/.bun/@altimateai+dbt-integration@0.2.
|
|
20660
|
+
// ../../node_modules/.bun/@altimateai+dbt-integration@0.2.14+82898b7763204eab/node_modules/@altimateai/dbt-integration/dist/index.mjs
|
|
20648
20661
|
import * as w from "path";
|
|
20649
20662
|
import w__default, { join as join7, dirname as dirname2 } from "path";
|
|
20650
20663
|
import { fileURLToPath } from "url";
|
|
20651
|
-
import * as
|
|
20652
|
-
import * as
|
|
20653
|
-
import { existsSync as
|
|
20654
|
-
import * as
|
|
20655
|
-
import { homedir as
|
|
20664
|
+
import * as fe from "crypto";
|
|
20665
|
+
import * as mt from "fs";
|
|
20666
|
+
import { existsSync as existsSync6, statSync as statSync2, readFileSync as readFileSync4, createReadStream as createReadStream2, mkdirSync, createWriteStream, watch as watch2 } from "fs";
|
|
20667
|
+
import * as _e from "os";
|
|
20668
|
+
import { homedir as homedir3 } from "os";
|
|
20656
20669
|
import { spawn } from "child_process";
|
|
20657
20670
|
import { EventEmitter } from "events";
|
|
20658
|
-
function
|
|
20659
|
-
return
|
|
20671
|
+
function vt(d) {
|
|
20672
|
+
return d === F2 || d === z || d === dt || d === K;
|
|
20660
20673
|
}
|
|
20661
|
-
function
|
|
20662
|
-
let t2 =
|
|
20674
|
+
function Pe(...d2) {
|
|
20675
|
+
let t2 = d2.filter((n) => n !== undefined);
|
|
20663
20676
|
if (t2.length === 0)
|
|
20664
20677
|
return;
|
|
20665
20678
|
if (t2.length === 1)
|
|
@@ -20669,24 +20682,28 @@ function he(...l2) {
|
|
|
20669
20682
|
n.aborted ? e2.abort() : n.addEventListener("abort", () => e2.abort());
|
|
20670
20683
|
}), r2;
|
|
20671
20684
|
}
|
|
20672
|
-
function
|
|
20673
|
-
let t2 = w__default.join(
|
|
20685
|
+
function V(d2) {
|
|
20686
|
+
let t2 = w__default.join(d2, j), e2 = readFileSync4(t2, "utf8");
|
|
20674
20687
|
return $parse(e2, { strict: false, uniqueKeys: false, maxAliasCount: -1 });
|
|
20675
20688
|
}
|
|
20676
|
-
function
|
|
20677
|
-
return
|
|
20689
|
+
function At(d2) {
|
|
20690
|
+
return fe.createHash("md5").update(d2).digest("hex");
|
|
20678
20691
|
}
|
|
20679
|
-
function
|
|
20680
|
-
if (
|
|
20681
|
-
let r2 = ["dbt", "dbt.exe"].find((n) =>
|
|
20692
|
+
function ut(d3, t2) {
|
|
20693
|
+
if (d3.pythonPath) {
|
|
20694
|
+
let r2 = ["dbt", "dbt.exe"].find((n) => existsSync6(join7(dirname2(d3.pythonPath), n)));
|
|
20682
20695
|
if (r2) {
|
|
20683
|
-
let n = join7(dirname2(
|
|
20696
|
+
let n = join7(dirname2(d3.pythonPath), r2);
|
|
20684
20697
|
return t2.debug("Found dbt path in Python bin directory:", n), n;
|
|
20685
20698
|
}
|
|
20686
20699
|
}
|
|
20687
20700
|
return t2.debug("Using default dbt path:", "dbt"), "dbt";
|
|
20688
20701
|
}
|
|
20689
|
-
|
|
20702
|
+
function Se() {
|
|
20703
|
+
let d3 = process.platform === "win32" ? "dbt.exe" : "dbt";
|
|
20704
|
+
return [join7(homedir3(), ".local", "bin", d3), d3];
|
|
20705
|
+
}
|
|
20706
|
+
var import_python_bridge, $t, qe = () => fileURLToPath(import.meta.url), Qe = () => w__default.dirname(qe()), P, ge, j = "dbt_project.yml", O = "manifest.json", ct = "run_results.json", Et = "catalog.json", F2 = "model", dt = "analysis", k = "source", Mt = "exposure", z = "seed", K = "snapshot", U = "test", _t = "semantic_model", xt = "function", lt, L = class d {
|
|
20690
20707
|
constructor(t2, e2, r2, n, o) {
|
|
20691
20708
|
this.deferToProduction = t2;
|
|
20692
20709
|
this.favorState = e2;
|
|
@@ -20695,13 +20712,13 @@ var import_python_bridge, Ft, Ie = () => fileURLToPath(import.meta.url), Ne = ()
|
|
|
20695
20712
|
this.dbtCoreIntegrationId = o;
|
|
20696
20713
|
}
|
|
20697
20714
|
static createCoreDefaults() {
|
|
20698
|
-
return new
|
|
20715
|
+
return new d(false, false);
|
|
20699
20716
|
}
|
|
20700
20717
|
static createCloudDefaults() {
|
|
20701
|
-
return new
|
|
20718
|
+
return new d(true, false);
|
|
20702
20719
|
}
|
|
20703
20720
|
static createFusionDefaults() {
|
|
20704
|
-
return new
|
|
20721
|
+
return new d(false, false);
|
|
20705
20722
|
}
|
|
20706
20723
|
async getArtifactDirectory(t2, e2, r2) {
|
|
20707
20724
|
if (this.manifestPathType) {
|
|
@@ -20710,7 +20727,7 @@ var import_python_bridge, Ft, Ie = () => fileURLToPath(import.meta.url), Ne = ()
|
|
|
20710
20727
|
let o = new Error("manifestPathForDeferral config is not present, use the actions panel to set the Defer to production configuration.");
|
|
20711
20728
|
throw e2.error("manifestPathForDeferral", "manifestPathForDeferral is not present", o), o;
|
|
20712
20729
|
}
|
|
20713
|
-
if (!
|
|
20730
|
+
if (!existsSync6(this.manifestPathForDeferral))
|
|
20714
20731
|
throw new Error(`Manifest path for deferral does not exist: ${this.manifestPathForDeferral}`);
|
|
20715
20732
|
if (!statSync2(this.manifestPathForDeferral).isDirectory())
|
|
20716
20733
|
throw new Error(`Manifest path for deferral must be a directory: ${this.manifestPathForDeferral}`);
|
|
@@ -20740,9 +20757,9 @@ var import_python_bridge, Ft, Ie = () => fileURLToPath(import.meta.url), Ne = ()
|
|
|
20740
20757
|
async getManifestPath(t2, e2, r2) {
|
|
20741
20758
|
let n = await this.getArtifactDirectory(t2, e2, r2);
|
|
20742
20759
|
if (n)
|
|
20743
|
-
return w__default.join(n,
|
|
20760
|
+
return w__default.join(n, O);
|
|
20744
20761
|
}
|
|
20745
|
-
},
|
|
20762
|
+
}, he, Rt = class {
|
|
20746
20763
|
constructor(t2, e2, r2, n, o) {
|
|
20747
20764
|
this.commandProcessExecutionFactory = t2;
|
|
20748
20765
|
this.pythonEnvironment = e2;
|
|
@@ -20760,10 +20777,10 @@ var import_python_bridge, Ft, Ie = () => fileURLToPath(import.meta.url), Ne = ()
|
|
|
20760
20777
|
let { args: r2 } = t2;
|
|
20761
20778
|
if (!this.pythonEnvironment.pythonPath)
|
|
20762
20779
|
throw Error("Could not launch command as python environment is not available");
|
|
20763
|
-
let n =
|
|
20780
|
+
let n = Pe(e2, t2.signal);
|
|
20764
20781
|
return this.commandProcessExecutionFactory.createCommandProcessExecution({ command: this.dbtPath, args: r2, signal: n, cwd: this.cwd, envVars: this.pythonEnvironment.getEnvironmentVariables(this.cwd) });
|
|
20765
20782
|
}
|
|
20766
|
-
},
|
|
20783
|
+
}, St = class {
|
|
20767
20784
|
constructor(t2, e2, r2, n) {
|
|
20768
20785
|
this.commandProcessExecutionFactory = t2;
|
|
20769
20786
|
this.pythonEnvironment = e2;
|
|
@@ -20779,7 +20796,7 @@ var import_python_bridge, Ft, Ie = () => fileURLToPath(import.meta.url), Ne = ()
|
|
|
20779
20796
|
let { args: r2 } = t2;
|
|
20780
20797
|
if (!this.pythonEnvironment.pythonPath)
|
|
20781
20798
|
throw Error("Could not launch command as python environment is not available");
|
|
20782
|
-
let n =
|
|
20799
|
+
let n = Pe(e2, t2.signal);
|
|
20783
20800
|
return this.commandProcessExecutionFactory.createCommandProcessExecution({ command: this.pythonEnvironment.pythonPath, args: ["-c", this.dbtCommand(r2)], signal: n, envVars: this.pythonEnvironment.getEnvironmentVariables(this.configuration.getWorkingDirectory()) });
|
|
20784
20801
|
}
|
|
20785
20802
|
dbtCommand(t2) {
|
|
@@ -20823,7 +20840,7 @@ else:
|
|
|
20823
20840
|
setSignal(t2) {
|
|
20824
20841
|
this.signal = t2;
|
|
20825
20842
|
}
|
|
20826
|
-
},
|
|
20843
|
+
}, G, R = class {
|
|
20827
20844
|
constructor(t2, e2) {
|
|
20828
20845
|
this.cancelFunc = t2;
|
|
20829
20846
|
this.queryResult = e2;
|
|
@@ -20834,7 +20851,7 @@ else:
|
|
|
20834
20851
|
executeQuery() {
|
|
20835
20852
|
return this.queryResult();
|
|
20836
20853
|
}
|
|
20837
|
-
},
|
|
20854
|
+
}, Bt = class {
|
|
20838
20855
|
constructor(t2, e2) {
|
|
20839
20856
|
this.pythonEnvironment = t2;
|
|
20840
20857
|
this.terminal = e2;
|
|
@@ -20843,9 +20860,9 @@ else:
|
|
|
20843
20860
|
let r2 = this.pythonEnvironment.pythonPath, n = t2 ? this.pythonEnvironment.getEnvironmentVariables(t2) : process.env;
|
|
20844
20861
|
if (r2.endsWith("python.exe")) {
|
|
20845
20862
|
let o = r2.replace("python.exe", "pythonw.exe");
|
|
20846
|
-
|
|
20863
|
+
existsSync6(o) && (this.terminal.debug("DBTCommandExecutionInfrastructure", `Changing python path to ${o}`), r2 = o);
|
|
20847
20864
|
}
|
|
20848
|
-
return this.terminal.debug("DBTCommandExecutionInfrastructure", "Starting python bridge", { pythonPath: r2, cwd: t2, PYTHONPATH:
|
|
20865
|
+
return this.terminal.debug("DBTCommandExecutionInfrastructure", "Starting python bridge", { pythonPath: r2, cwd: t2, PYTHONPATH: he }), import_python_bridge.default.pythonBridge({ python: r2, cwd: t2, env: { ...n, ...e2, PYTHONPATH: he }, detached: true });
|
|
20849
20866
|
}
|
|
20850
20867
|
async closePythonBridge(t2) {
|
|
20851
20868
|
this.terminal.debug("dbtIntegration", "Closing python bridge");
|
|
@@ -20853,7 +20870,7 @@ else:
|
|
|
20853
20870
|
await t2.disconnect(), await t2.end();
|
|
20854
20871
|
} catch {}
|
|
20855
20872
|
}
|
|
20856
|
-
},
|
|
20873
|
+
}, It = class {
|
|
20857
20874
|
constructor(t2) {
|
|
20858
20875
|
this.configuration = t2;
|
|
20859
20876
|
}
|
|
@@ -20897,8 +20914,8 @@ else:
|
|
|
20897
20914
|
createDebugCommand(t2 = true) {
|
|
20898
20915
|
return new h2("Debugging...", ["debug"], t2, true, true);
|
|
20899
20916
|
}
|
|
20900
|
-
},
|
|
20901
|
-
constructor(t2, e2, r2, n, o, a, i2, s2, c,
|
|
20917
|
+
}, kt = "select * from ({query}) as query limit {limit}", et = class d2 {
|
|
20918
|
+
constructor(t2, e2, r2, n, o, a, i2, s2, c, l, u, m2) {
|
|
20902
20919
|
this.executionInfrastructure = t2;
|
|
20903
20920
|
this.pythonEnvironment = e2;
|
|
20904
20921
|
this.pythonEnvironmentProvider = r2;
|
|
@@ -20908,9 +20925,9 @@ else:
|
|
|
20908
20925
|
this.dbtConfiguration = i2;
|
|
20909
20926
|
this.dbtIntegrationClient = s2;
|
|
20910
20927
|
this.projectRoot = c;
|
|
20911
|
-
this.projectConfigDiagnostics =
|
|
20912
|
-
this.deferConfig =
|
|
20913
|
-
this.onDiagnosticsChanged =
|
|
20928
|
+
this.projectConfigDiagnostics = l;
|
|
20929
|
+
this.deferConfig = u;
|
|
20930
|
+
this.onDiagnosticsChanged = m2;
|
|
20914
20931
|
this.dbtTerminal.debug("DBTCoreProjectIntegration", `Registering dbt core project at ${this.projectRoot}`), this.python = this.createPythonBridge(), this.disposables.push({ dispose: this.pythonEnvironmentProvider.onEnvironmentChanged((g) => {
|
|
20915
20932
|
this.dbtTerminal.debug("DBTCoreProjectIntegration", "Python environment changed, recreating Python bridge");
|
|
20916
20933
|
try {
|
|
@@ -20927,7 +20944,7 @@ else:
|
|
|
20927
20944
|
adapterType;
|
|
20928
20945
|
targetName;
|
|
20929
20946
|
version;
|
|
20930
|
-
projectName = "unknown_" +
|
|
20947
|
+
projectName = "unknown_" + fe.randomUUID();
|
|
20931
20948
|
packagesInstallPath;
|
|
20932
20949
|
modelPaths;
|
|
20933
20950
|
seedPaths;
|
|
@@ -20938,7 +20955,7 @@ else:
|
|
|
20938
20955
|
rebuildManifestDiagnosticsData = [];
|
|
20939
20956
|
createPythonBridge() {
|
|
20940
20957
|
let t2 = {}, e2 = w.join(this.projectRoot, "dbt_loom.config.yml");
|
|
20941
|
-
return
|
|
20958
|
+
return existsSync6(e2) && (t2.DBT_LOOM_CONFIG_PATH = e2), this.executionInfrastructure.createPythonBridge(this.projectRoot, t2);
|
|
20942
20959
|
}
|
|
20943
20960
|
removeTrailingSlashes(t2) {
|
|
20944
20961
|
return t2?.replace(/\\+$/, "");
|
|
@@ -20946,6 +20963,32 @@ else:
|
|
|
20946
20963
|
getLimitQuery(t2, e2, r2) {
|
|
20947
20964
|
return t2.replace("{query}", () => e2).replace("{limit}", () => r2.toString());
|
|
20948
20965
|
}
|
|
20966
|
+
hasDoubleLimitClause(t2) {
|
|
20967
|
+
let e2 = 0, r2 = 0, n = /\bLIMIT\s+\d+/gi;
|
|
20968
|
+
for (let o = 0;o < t2.length; o++) {
|
|
20969
|
+
if (t2[o] === "-" && t2[o + 1] === "-") {
|
|
20970
|
+
let a = t2.indexOf(`
|
|
20971
|
+
`, o + 2);
|
|
20972
|
+
o = a === -1 ? t2.length - 1 : a;
|
|
20973
|
+
continue;
|
|
20974
|
+
}
|
|
20975
|
+
if (t2[o] === "/" && t2[o + 1] === "*") {
|
|
20976
|
+
let a = t2.indexOf("*/", o + 2);
|
|
20977
|
+
o = a === -1 ? t2.length - 1 : a + 1;
|
|
20978
|
+
continue;
|
|
20979
|
+
}
|
|
20980
|
+
if (t2[o] === "(")
|
|
20981
|
+
e2++;
|
|
20982
|
+
else if (t2[o] === ")")
|
|
20983
|
+
e2 = Math.max(0, e2 - 1);
|
|
20984
|
+
else if (e2 === 0) {
|
|
20985
|
+
n.lastIndex = o;
|
|
20986
|
+
let a = n.exec(t2);
|
|
20987
|
+
a && a.index === o && (r2++, o = n.lastIndex - 1);
|
|
20988
|
+
}
|
|
20989
|
+
}
|
|
20990
|
+
return r2 > 1;
|
|
20991
|
+
}
|
|
20949
20992
|
async getQuery(t2, e2) {
|
|
20950
20993
|
try {
|
|
20951
20994
|
let n = await this.version;
|
|
@@ -20957,12 +21000,12 @@ else:
|
|
|
20957
21000
|
this.dbtTerminal.error("executeMacroGetLimitSubquerySQLError", "Could not get Limit Subquery SQL", n, true, { adapter: this.adapterType || "unknown" });
|
|
20958
21001
|
}
|
|
20959
21002
|
let r2 = this.dbtConfiguration.getQueryTemplate();
|
|
20960
|
-
if (r2 && r2 !==
|
|
21003
|
+
if (r2 && r2 !== kt) {
|
|
20961
21004
|
console.log("Using user provided query template", r2);
|
|
20962
21005
|
let n = this.getLimitQuery(r2, t2, e2);
|
|
20963
21006
|
return { queryTemplate: r2, limitQuery: n };
|
|
20964
21007
|
}
|
|
20965
|
-
return { queryTemplate:
|
|
21008
|
+
return { queryTemplate: kt, limitQuery: this.getLimitQuery(kt, t2, e2) };
|
|
20966
21009
|
}
|
|
20967
21010
|
async refreshProjectConfig() {
|
|
20968
21011
|
await this.createPythonDbtProject(this.python), await this.python.ex`project.init_project()`, this.targetName = await this.findSelectedTarget(), this.targetPath = await this.findTargetPath(), this.modelPaths = await this.findModelPaths(), this.seedPaths = await this.findSeedPaths(), this.macroPaths = await this.findMacroPaths(), this.packagesInstallPath = await this.findPackagesInstallPath(), this.version = await this.findVersion(), this.projectName = await this.findProjectName(), this.adapterType = await this.findAdapterType();
|
|
@@ -20983,11 +21026,12 @@ else:
|
|
|
20983
21026
|
}, async () => {
|
|
20984
21027
|
await this.createPythonDbtProject(o), await o.ex`project.init_project()`;
|
|
20985
21028
|
let a, i2 = await this.unsafeCompileQuery(n, r2);
|
|
21029
|
+
this.hasDoubleLimitClause(i2) && (i2 = await this.unsafeCompileQuery(t2, r2));
|
|
20986
21030
|
try {
|
|
20987
21031
|
a = await o.lock((s2) => s2`to_dict(project.execute_sql(${i2}))`), this.deferConfig?.manifestPathType === "remote" && this.dbtIntegrationClient.sendDeferToProdEvent("remote");
|
|
20988
21032
|
} catch (s2) {
|
|
20989
21033
|
let c = `Error while executing sql: ${i2}`;
|
|
20990
|
-
throw this.dbtTerminal.error("dbtCore:executeSQL", c, s2), s2 instanceof import_python_bridge.default.PythonException ? new
|
|
21034
|
+
throw this.dbtTerminal.error("dbtCore:executeSQL", c, s2), s2 instanceof import_python_bridge.default.PythonException ? new G(s2.exception.message, i2) : new G(s2.message, i2);
|
|
20991
21035
|
} finally {
|
|
20992
21036
|
await this.cleanupConnections(), await o.end();
|
|
20993
21037
|
}
|
|
@@ -20997,14 +21041,14 @@ else:
|
|
|
20997
21041
|
async createPythonDbtProject(t2) {
|
|
20998
21042
|
await t2.ex`from dbt_core_integration import *`, await t2.ex`from dbt_utils import *`;
|
|
20999
21043
|
let e2 = this.removeTrailingSlashes(await t2.lock((a) => a`target_path(${this.projectRoot})`)), { deferToProduction: r2, favorState: n } = this.deferConfig, o = await this.deferConfig.getManifestPath(this.dbtIntegrationClient, this.dbtTerminal, this.projectRoot);
|
|
21000
|
-
await t2.ex`project = DbtProject(project_dir=${this.projectRoot}, profiles_dir=${this.profilesDir}, target_path=${e2}, defer_to_prod=${r2}, manifest_path=${o}, favor_state=${n}) if 'project' not in locals() else project`;
|
|
21044
|
+
await t2.ex`project = DbtProject(project_dir=${this.projectRoot}, profiles_dir=${this.profilesDir}, target_path=${e2}, defer_to_prod=${r2}, manifest_path=${o}, favor_state=${n}, target_name=${this.targetName}) if 'project' not in locals() else project`;
|
|
21001
21045
|
}
|
|
21002
21046
|
async initializeProject() {
|
|
21003
21047
|
try {
|
|
21004
21048
|
if (await this.python.ex`from dbt_core_integration import default_profiles_dir`, await this.python.ex`from dbt_utils import *`, this.profilesDir = this.removeTrailingSlashes(await this.python.lock((t2) => t2`default_profiles_dir(${this.projectRoot})`)), this.profilesDir) {
|
|
21005
|
-
let t2 = w.join(this.profilesDir,
|
|
21049
|
+
let t2 = w.join(this.profilesDir, d2.DBT_PROFILES_FILE);
|
|
21006
21050
|
try {
|
|
21007
|
-
let e2 =
|
|
21051
|
+
let e2 = mt.watch(t2, (r2) => {
|
|
21008
21052
|
r2 === "change" && this.rebuildManifest();
|
|
21009
21053
|
});
|
|
21010
21054
|
this.disposables.push({ dispose: () => e2.close() });
|
|
@@ -21019,7 +21063,7 @@ else:
|
|
|
21019
21063
|
return;
|
|
21020
21064
|
let e2 = "An error occured while initializing the dbt project: " + t2.exception.message;
|
|
21021
21065
|
t2.exception.type.module === "dbt.exceptions" && (e2 = "An error occured while initializing the dbt project, dbt found following issue: " + t2.exception.message);
|
|
21022
|
-
let r2 = { filePath: w.join(this.projectRoot,
|
|
21066
|
+
let r2 = { filePath: w.join(this.projectRoot, j), message: e2, severity: "error", range: { startLine: 0, startColumn: 0, endLine: 999, endColumn: 999 }, source: "dbt-core", category: "python-bridge" };
|
|
21023
21067
|
this.pythonBridgeDiagnosticsData = [r2], this.onDiagnosticsChanged();
|
|
21024
21068
|
}
|
|
21025
21069
|
if (this.dbtTerminal.error("pythonBridgeInitPythonError", "Could not initialize Python bridge", t2, true), !(t2 instanceof import_python_bridge.default.PythonException))
|
|
@@ -21070,13 +21114,13 @@ else:
|
|
|
21070
21114
|
return { pythonBridgeDiagnostics: this.pythonBridgeDiagnosticsData, rebuildManifestDiagnostics: this.rebuildManifestDiagnosticsData, projectConfigDiagnostics: this.projectConfigDiagnostics };
|
|
21071
21115
|
}
|
|
21072
21116
|
async rebuildManifest() {
|
|
21073
|
-
let t2 = w.join(this.projectRoot,
|
|
21117
|
+
let t2 = w.join(this.projectRoot, j);
|
|
21074
21118
|
if (!(this.projectConfigDiagnostics.filter((r2) => r2.filePath === t2).length > 0))
|
|
21075
21119
|
try {
|
|
21076
21120
|
await this.python.lock((r2) => r2`to_dict(project.safe_parse_project())`), this.rebuildManifestDiagnosticsData = [], this.onDiagnosticsChanged();
|
|
21077
21121
|
} catch (r2) {
|
|
21078
21122
|
if (r2 instanceof import_python_bridge.default.PythonException) {
|
|
21079
|
-
let n = "There is a problem in your dbt project. Compilation failed: " + r2.exception.message, o = { filePath: w.join(this.projectRoot,
|
|
21123
|
+
let n = "There is a problem in your dbt project. Compilation failed: " + r2.exception.message, o = { filePath: w.join(this.projectRoot, j), message: n, severity: "error", range: { startLine: 0, startColumn: 0, endLine: 999, endColumn: 999 }, source: "dbt-core", category: "manifest-rebuild" };
|
|
21080
21124
|
this.rebuildManifestDiagnosticsData = [o], this.onDiagnosticsChanged();
|
|
21081
21125
|
return;
|
|
21082
21126
|
}
|
|
@@ -21177,7 +21221,7 @@ else:
|
|
|
21177
21221
|
for (let n of t2) {
|
|
21178
21222
|
if (e2.aborted)
|
|
21179
21223
|
break;
|
|
21180
|
-
if (n.resource_type ===
|
|
21224
|
+
if (n.resource_type === k) {
|
|
21181
21225
|
let o = n;
|
|
21182
21226
|
r2[n.unique_id] = await this.getColumnsOfSource(o.name, o.table);
|
|
21183
21227
|
} else {
|
|
@@ -21222,9 +21266,9 @@ else:
|
|
|
21222
21266
|
if (!t2)
|
|
21223
21267
|
throw new Error("Invalid package name");
|
|
21224
21268
|
let e2 = w.join(this.packagesInstallPath, t2, "dbt_project.yml");
|
|
21225
|
-
if (!
|
|
21269
|
+
if (!existsSync6(e2))
|
|
21226
21270
|
throw new Error("Package not installed");
|
|
21227
|
-
let r2 =
|
|
21271
|
+
let r2 = readFileSync4(e2, { encoding: "utf-8" });
|
|
21228
21272
|
if (!r2)
|
|
21229
21273
|
throw new Error(`${t2} has empty dbt_project.yml`);
|
|
21230
21274
|
let n = $parse(r2, { strict: false, uniqueKeys: false, maxAliasCount: -1 });
|
|
@@ -21249,8 +21293,8 @@ else:
|
|
|
21249
21293
|
async applySelectedTarget() {
|
|
21250
21294
|
await this.refreshProjectConfig(), await this.rebuildManifest();
|
|
21251
21295
|
}
|
|
21252
|
-
},
|
|
21253
|
-
constructor(t2, e2, r2, n, o, a, i2, s2, c,
|
|
21296
|
+
}, q = class {
|
|
21297
|
+
constructor(t2, e2, r2, n, o, a, i2, s2, c, l, u) {
|
|
21254
21298
|
this.executionInfrastructure = t2;
|
|
21255
21299
|
this.dbtCommandFactory = e2;
|
|
21256
21300
|
this.cliDBTCommandExecutionStrategyFactory = r2;
|
|
@@ -21260,20 +21304,21 @@ else:
|
|
|
21260
21304
|
this.projectRoot = i2;
|
|
21261
21305
|
this.projectConfigDiagnostics = s2;
|
|
21262
21306
|
this.deferConfig = c;
|
|
21263
|
-
this.onDiagnosticsChanged =
|
|
21307
|
+
this.onDiagnosticsChanged = l;
|
|
21308
|
+
this.cloudVariantDetector = u;
|
|
21264
21309
|
this.terminal.debug("DBTCloudProjectIntegration", `Registering dbt cloud project at ${this.projectRoot}`), this.python = this.executionInfrastructure.createPythonBridge(this.projectRoot), this.disposables.push({ dispose: this.pythonEnvironmentProvider.onEnvironmentChanged((m2) => {
|
|
21265
21310
|
this.terminal.debug("DBTCloudProjectIntegration", "Python environment changed, recreating Python bridge");
|
|
21266
21311
|
try {
|
|
21267
21312
|
this.executionInfrastructure.closePythonBridge(this.python);
|
|
21268
|
-
} catch (
|
|
21269
|
-
this.terminal.debug("DBTCloudProjectIntegration", "Error closing existing Python bridge",
|
|
21313
|
+
} catch (g) {
|
|
21314
|
+
this.terminal.debug("DBTCloudProjectIntegration", "Error closing existing Python bridge", g);
|
|
21270
21315
|
}
|
|
21271
21316
|
this.pythonEnvironment = m2, this.python = this.executionInfrastructure.createPythonBridge(this.projectRoot), this.initializeProject();
|
|
21272
21317
|
}) });
|
|
21273
21318
|
}
|
|
21274
21319
|
targetPath;
|
|
21275
21320
|
version;
|
|
21276
|
-
projectName = "unknown_" +
|
|
21321
|
+
projectName = "unknown_" + fe.randomUUID();
|
|
21277
21322
|
adapterType = "unknown";
|
|
21278
21323
|
packagesInstallPath;
|
|
21279
21324
|
modelPaths;
|
|
@@ -21286,8 +21331,13 @@ else:
|
|
|
21286
21331
|
rebuildManifestDiagnosticsData = [];
|
|
21287
21332
|
rebuildManifestAbortController;
|
|
21288
21333
|
pathsInitialized = false;
|
|
21334
|
+
cloudVariantInfo = null;
|
|
21335
|
+
cloudVariantDetectionAttempted = false;
|
|
21289
21336
|
async refreshProjectConfig() {
|
|
21290
|
-
this.pathsInitialized ? this.initializePaths() : (await this.initializePaths(), this.pathsInitialized = true), this.version || await this.findVersion();
|
|
21337
|
+
this.pathsInitialized ? this.initializePaths() : (await this.initializePaths(), this.pathsInitialized = true), this.version || await this.findVersion(), this.cloudVariantDetectionAttempted || (this.cloudVariantDetectionAttempted = true, this.cloudVariantInfo = await this.cloudVariantDetector.detect());
|
|
21338
|
+
}
|
|
21339
|
+
getCloudVariantInfo() {
|
|
21340
|
+
return this.cloudVariantInfo;
|
|
21291
21341
|
}
|
|
21292
21342
|
async executeSQL(t2, e2, r2) {
|
|
21293
21343
|
let n = this.dbtCloudCommand(new h2("Running sql...", ["show", "--log-level", "debug", "--inline", t2, "--limit", e2.toString(), "--output", "json", "--log-format", "json"])), o = new AbortController;
|
|
@@ -21298,18 +21348,18 @@ else:
|
|
|
21298
21348
|
if (s2)
|
|
21299
21349
|
throw s2;
|
|
21300
21350
|
let c = a.trim().split(`
|
|
21301
|
-
`).map((p) => JSON.parse(p.trim())),
|
|
21302
|
-
if (
|
|
21351
|
+
`).map((p) => JSON.parse(p.trim())), l = c.filter((p) => p.hasOwnProperty("data") && p.data.hasOwnProperty("preview")), u = c.filter((p) => p.hasOwnProperty("data") && p.data.hasOwnProperty("sql"));
|
|
21352
|
+
if (l.length === 0)
|
|
21303
21353
|
throw new Error("Could not find previewLine in " + a);
|
|
21304
|
-
let
|
|
21305
|
-
if (
|
|
21354
|
+
let m2 = JSON.parse(l[0].data.preview);
|
|
21355
|
+
if (u.length === 0)
|
|
21306
21356
|
throw new Error("Could not find compiledSqlLine in " + a);
|
|
21307
|
-
let g =
|
|
21308
|
-
return { table: { column_names:
|
|
21357
|
+
let g = u[u.length - 1].data.sql;
|
|
21358
|
+
return { table: { column_names: m2.length > 0 ? Object.keys(m2[0]) : [], column_types: m2.length > 0 ? Object.keys(m2[0]).map(() => "string") : [], rows: m2.map((p) => Object.values(p)) }, compiled_sql: g, raw_sql: t2, modelName: r2 };
|
|
21309
21359
|
});
|
|
21310
21360
|
}
|
|
21311
21361
|
async initializeProject() {
|
|
21312
|
-
this.dbtPath =
|
|
21362
|
+
this.dbtPath = ut(this.pythonEnvironment, this.terminal), this.python && await this.python.ex`from dbt_utils import *`;
|
|
21313
21363
|
}
|
|
21314
21364
|
async setSelectedTarget(t2) {
|
|
21315
21365
|
throw new Error("Method not implemented.");
|
|
@@ -21359,11 +21409,11 @@ else:
|
|
|
21359
21409
|
let n = r2.trim().split(`
|
|
21360
21410
|
`).map((c) => c.trim()).filter((c) => !!c).map((c) => this.parseJSON("RebuildManifestErrorsAndWarningsJSONParsing", c, false)), o = n.filter((c) => c && c.hasOwnProperty("info") && c.info.hasOwnProperty("level") && c.info.hasOwnProperty("msg") && ["error", "fatal"].includes(c.info.level)).map((c) => c.info.msg), a = n.filter((c) => c && c.hasOwnProperty("info") && c.info.hasOwnProperty("level") && c.info.hasOwnProperty("msg") && c.info.level === "warn").map((c) => c.info.msg);
|
|
21361
21411
|
this.rebuildManifestDiagnosticsData = [], this.onDiagnosticsChanged();
|
|
21362
|
-
let i2 = w.join(this.projectRoot,
|
|
21412
|
+
let i2 = w.join(this.projectRoot, j), s2 = [...o.map((c) => ({ filePath: i2, message: c, severity: "error", range: { startLine: 0, startColumn: 0, endLine: 999, endColumn: 999 }, source: "dbt-cloud", category: "manifest-rebuild" })), ...a.map((c) => ({ filePath: i2, message: c, severity: "warning", range: { startLine: 0, startColumn: 0, endLine: 999, endColumn: 999 }, source: "dbt-cloud", category: "manifest-rebuild" }))];
|
|
21363
21413
|
this.rebuildManifestDiagnosticsData = s2, this.onDiagnosticsChanged();
|
|
21364
21414
|
} catch (e2) {
|
|
21365
21415
|
this.terminal.error("dbtCloudCannotParseProjectCommandExecuteError", "Could not parse project command execution error", e2, true, { adapter: this.getAdapterType() || "unknown", command: t2.getCommandAsString() });
|
|
21366
|
-
let r2 = "Unable to parse dbt cloud cli response. If the problem persists please reach out to us: " + e2, n = { filePath: w.join(this.projectRoot,
|
|
21416
|
+
let r2 = "Unable to parse dbt cloud cli response. If the problem persists please reach out to us: " + e2, n = { filePath: w.join(this.projectRoot, j), message: r2, severity: "error", range: { startLine: 0, startColumn: 0, endLine: 999, endColumn: 999 }, source: "dbt-cloud", category: "command-execution" };
|
|
21367
21417
|
this.rebuildManifestDiagnosticsData = [n], this.onDiagnosticsChanged();
|
|
21368
21418
|
}
|
|
21369
21419
|
}
|
|
@@ -21420,7 +21470,7 @@ else:
|
|
|
21420
21470
|
dbtCloudCommand(t2) {
|
|
21421
21471
|
t2.setExecutionStrategy(this.cliDBTCommandExecutionStrategyFactory(this.projectRoot, this.dbtPath)), t2.addArgument("--source"), t2.addArgument("dbt-power-user");
|
|
21422
21472
|
let e2 = this.getVersion().map((n) => new String(n)).join(".");
|
|
21423
|
-
return
|
|
21473
|
+
return $t.gte(e2, "0.37.20") && t2.downloadArtifacts && t2.addArgument("--download-artifacts"), t2;
|
|
21424
21474
|
}
|
|
21425
21475
|
async unsafeCompileNode(t2) {
|
|
21426
21476
|
let e2 = this.dbtCloudCommand(new h2("Compiling model...", ["compile", "--model", t2, "--output", "json", "--log-format", "json"])), { stdout: r2, stderr: n } = await e2.execute(), o = r2.trim().split(`
|
|
@@ -21459,7 +21509,7 @@ else:
|
|
|
21459
21509
|
}
|
|
21460
21510
|
async getBulkCompiledSQL(t2) {
|
|
21461
21511
|
let e2 = "0.37.20", r2 = this.getVersion().map((o) => new String(o)).join(".");
|
|
21462
|
-
if (
|
|
21512
|
+
if ($t.gte(r2, e2)) {
|
|
21463
21513
|
let o = this.dbtCloudCommand(new h2("Getting catalog...", ["compile", "--download-artifacts", "--model", `"${t2.map((s2) => s2.name).join(" ")}"`, "--output", "json", "--log-format", "json"])), { stderr: a } = await o.execute(), i2 = this.processJSONErrors(a);
|
|
21464
21514
|
if (i2)
|
|
21465
21515
|
throw i2;
|
|
@@ -21467,7 +21517,7 @@ else:
|
|
|
21467
21517
|
let n = {};
|
|
21468
21518
|
for (let o of t2) {
|
|
21469
21519
|
try {
|
|
21470
|
-
let a =
|
|
21520
|
+
let a = readFileSync4(o.compiled_path, "utf-8");
|
|
21471
21521
|
n[o.unique_id] = a;
|
|
21472
21522
|
continue;
|
|
21473
21523
|
} catch (a) {
|
|
@@ -21565,7 +21615,7 @@ else:
|
|
|
21565
21615
|
}, o = (a) => {
|
|
21566
21616
|
let i2 = `${a}\\s*\\[(.*)\\]`, c = new RegExp(i2, "gm").exec(e2);
|
|
21567
21617
|
if (c?.length === 2)
|
|
21568
|
-
return c[1].split(",").map((
|
|
21618
|
+
return c[1].split(",").map((l) => l.slice(1, -1));
|
|
21569
21619
|
throw new Error(`Could not find any entries for ${a}`);
|
|
21570
21620
|
};
|
|
21571
21621
|
this.targetPath = join7(this.projectRoot, "target"), this.modelPaths = o("Model paths").map((a) => join7(this.projectRoot, a)), this.seedPaths = o("Seed paths").map((a) => join7(this.projectRoot, a)), this.macroPaths = o("Macro paths").map((a) => join7(this.projectRoot, a)), this.packagesInstallPath = join7(this.projectRoot, "dbt_packages"), this.adapterType = n("Connection type");
|
|
@@ -21573,7 +21623,7 @@ else:
|
|
|
21573
21623
|
this.terminal.warn("DbtCloudIntegrationInitializePathsExceptionError", "dbt environment show not returning required info, ignoring", true, e2), this.targetPath = join7(this.projectRoot, "target"), this.modelPaths = [join7(this.projectRoot, "models")], this.seedPaths = [join7(this.projectRoot, "seeds")], this.macroPaths = [join7(this.projectRoot, "macros")], this.packagesInstallPath = join7(this.projectRoot, "dbt_packages");
|
|
21574
21624
|
}
|
|
21575
21625
|
try {
|
|
21576
|
-
let e2 =
|
|
21626
|
+
let e2 = V(this.projectRoot);
|
|
21577
21627
|
this.projectName = e2.name;
|
|
21578
21628
|
} catch (e2) {
|
|
21579
21629
|
this.terminal.warn("DbtCloudIntegrationProjectNameFromConfigExceptionError", "project name could not be read from dbt_project.yml, ignoring", true, e2);
|
|
@@ -21612,7 +21662,7 @@ else:
|
|
|
21612
21662
|
}
|
|
21613
21663
|
getYamlContent(t2) {
|
|
21614
21664
|
try {
|
|
21615
|
-
return
|
|
21665
|
+
return readFileSync4(t2, "utf-8");
|
|
21616
21666
|
} catch (e2) {
|
|
21617
21667
|
this.terminal.error("getYamlContent", "Error occured while reading file: " + t2, e2);
|
|
21618
21668
|
return;
|
|
@@ -21638,9 +21688,49 @@ else:
|
|
|
21638
21688
|
throw n;
|
|
21639
21689
|
}
|
|
21640
21690
|
}
|
|
21641
|
-
},
|
|
21642
|
-
|
|
21643
|
-
|
|
21691
|
+
}, Ut = class {
|
|
21692
|
+
constructor(t2, e2 = _e.homedir()) {
|
|
21693
|
+
this.terminal = t2;
|
|
21694
|
+
this.homeDir = e2;
|
|
21695
|
+
}
|
|
21696
|
+
async detect() {
|
|
21697
|
+
let t2 = this.readConfig();
|
|
21698
|
+
if (!t2)
|
|
21699
|
+
return this.terminal.warn("CloudVariantDetection", "~/.dbt/dbt_cloud.yml not found or unreadable; variant detection skipped"), null;
|
|
21700
|
+
try {
|
|
21701
|
+
let e2 = await this.fetchVariant(t2);
|
|
21702
|
+
return this.terminal.debug("CloudVariantDetection", "detected dbt Cloud variant", e2.variant, "rawDbtVersion=" + e2.rawDbtVersion), e2;
|
|
21703
|
+
} catch (e2) {
|
|
21704
|
+
return this.terminal.warn("CloudVariantDetection", "Admin API call failed; variant detection degraded: " + e2.message), null;
|
|
21705
|
+
}
|
|
21706
|
+
}
|
|
21707
|
+
readConfig() {
|
|
21708
|
+
let t2 = w.join(this.homeDir, ".dbt", "dbt_cloud.yml");
|
|
21709
|
+
if (!mt.existsSync(t2))
|
|
21710
|
+
return null;
|
|
21711
|
+
let e2;
|
|
21712
|
+
try {
|
|
21713
|
+
e2 = $parse(mt.readFileSync(t2, "utf8"));
|
|
21714
|
+
} catch {
|
|
21715
|
+
return null;
|
|
21716
|
+
}
|
|
21717
|
+
let r2 = e2.context?.["active-project"], n = e2.context?.["active-host"] ?? "cloud.getdbt.com", o = (e2.projects ?? []).find((a) => a["project-id"] === r2);
|
|
21718
|
+
return !o || !o["token-value"] || !o["account-id"] || !o["project-id"] ? null : { token: o["token-value"], accountId: o["account-id"], projectId: o["project-id"], host: o["account-host"] ?? n };
|
|
21719
|
+
}
|
|
21720
|
+
mapVersionToVariant(t2) {
|
|
21721
|
+
let e2 = (t2 ?? "").toLowerCase().trim();
|
|
21722
|
+
return e2 ? e2 === "versionless" || e2 === "latest" ? "latest" : e2 === "compatible" ? "compatible" : e2 === "extended" ? "extended" : e2 === "latest_fusion" || e2 === "latest-fusion" ? "latest-fusion" : "unknown" : "unknown";
|
|
21723
|
+
}
|
|
21724
|
+
async fetchVariant(t2) {
|
|
21725
|
+
let { token: e2, accountId: r2, projectId: n, host: o } = t2, a = `https://${o}/api/v3/accounts/${r2}/environments/?project_id=${n}`, i2 = await fetch(a, { method: "GET", headers: { Authorization: `Token ${e2}`, "Content-Type": "application/json", Accept: "application/json" } });
|
|
21726
|
+
if (!i2.ok)
|
|
21727
|
+
throw new Error(`dbt Cloud Admin API ${i2.status} ${i2.statusText}: ${await i2.text()}`);
|
|
21728
|
+
let c = (await i2.json()).data ?? [], u = (c.find((m2) => m2.type === "development") ?? c.find((m2) => !!m2.dbt_version) ?? c[0])?.dbt_version ?? null;
|
|
21729
|
+
return { variant: this.mapVersionToVariant(u), rawDbtVersion: u };
|
|
21730
|
+
}
|
|
21731
|
+
}, Wt, Yt, nr, rt, pt, gt, ht, ft, zt, ar = async (d5, t2) => {
|
|
21732
|
+
if (d5 instanceof ReadableStream) {
|
|
21733
|
+
let e2 = d5.getReader(), r2 = new TextDecoder, n = "";
|
|
21644
21734
|
try {
|
|
21645
21735
|
for (;; ) {
|
|
21646
21736
|
let { done: o, value: a } = await e2.read();
|
|
@@ -21656,12 +21746,12 @@ else:
|
|
|
21656
21746
|
} else
|
|
21657
21747
|
return new Promise((e2, r2) => {
|
|
21658
21748
|
let n = "";
|
|
21659
|
-
|
|
21749
|
+
d5.on("data", (o) => {
|
|
21660
21750
|
let a = o.toString();
|
|
21661
21751
|
n += a, t2(a);
|
|
21662
|
-
}),
|
|
21752
|
+
}), d5.on("end", () => e2(n)), d5.on("error", r2);
|
|
21663
21753
|
});
|
|
21664
|
-
},
|
|
21754
|
+
}, Kt = class {
|
|
21665
21755
|
constructor(t2, e2) {
|
|
21666
21756
|
this.dbtTerminal = t2;
|
|
21667
21757
|
this.dbtConfiguration = e2;
|
|
@@ -21692,11 +21782,11 @@ else:
|
|
|
21692
21782
|
n.abort();
|
|
21693
21783
|
}, r2), a = this.getConfig();
|
|
21694
21784
|
if (!a)
|
|
21695
|
-
throw new
|
|
21785
|
+
throw new rt("Missing API credentials");
|
|
21696
21786
|
let i2, s2;
|
|
21697
21787
|
try {
|
|
21698
|
-
let c = `${this.getAltimateUrl()}/${t2}`,
|
|
21699
|
-
return s2 =
|
|
21788
|
+
let c = `${this.getAltimateUrl()}/${t2}`, l = await this.internalFetch(c, { method: "GET", ...e2, signal: n.signal, headers: { "x-tenant": a.instance, Authorization: "Bearer " + a.key, "Content-Type": "application/json" } });
|
|
21789
|
+
return s2 = l.status, this.dbtTerminal.debug("network:response", t2, l.status), l.ok && s2 === 200 ? await l.json() : this.handleErrorResponse(l, t2);
|
|
21700
21790
|
} catch (c) {
|
|
21701
21791
|
throw this.dbtTerminal.error("apiCatchAllError", "fetch catchAllError", c, true, { errorType: c.name, statusCode: s2, textResponse: i2, endpoint: t2 }), c;
|
|
21702
21792
|
} finally {
|
|
@@ -21709,15 +21799,15 @@ else:
|
|
|
21709
21799
|
this.dbtTerminal.debug("fetchAsStream:request", o, e2);
|
|
21710
21800
|
let a = this.getConfig();
|
|
21711
21801
|
if (!a)
|
|
21712
|
-
throw new
|
|
21802
|
+
throw new rt("Missing API credentials");
|
|
21713
21803
|
let i2 = new AbortController, s2 = setTimeout(() => {
|
|
21714
21804
|
i2.abort();
|
|
21715
|
-
}, n), c,
|
|
21805
|
+
}, n), c, l;
|
|
21716
21806
|
try {
|
|
21717
|
-
let
|
|
21718
|
-
return
|
|
21719
|
-
} catch (
|
|
21720
|
-
throw this.dbtTerminal.error("apiCatchAllError", "fetchAsStream catchAllError",
|
|
21807
|
+
let u = await this.internalFetch(o, { method: "POST", body: JSON.stringify(e2), signal: i2.signal, headers: { "x-tenant": a.instance, Authorization: "Bearer " + a.key, "Content-Type": "application/json" } });
|
|
21808
|
+
return l = u.status, u.ok && l === 200 ? u?.body ? await ar(u.body, r2) : (this.dbtTerminal.debug("fetchAsStream", "empty response"), null) : this.handleErrorResponse(u, t2);
|
|
21809
|
+
} catch (u) {
|
|
21810
|
+
throw this.dbtTerminal.error("apiCatchAllError", "fetchAsStream catchAllError", u, true, { errorType: u.name, statusCode: l, textResponse: c, endpoint: t2 }), u;
|
|
21721
21811
|
} finally {
|
|
21722
21812
|
clearTimeout(s2);
|
|
21723
21813
|
}
|
|
@@ -21725,23 +21815,23 @@ else:
|
|
|
21725
21815
|
async handleErrorResponse(t2, e2) {
|
|
21726
21816
|
let r2 = t2.status;
|
|
21727
21817
|
if (r2 === 401 || r2 === 403)
|
|
21728
|
-
throw new
|
|
21818
|
+
throw new gt;
|
|
21729
21819
|
if (r2 === 404)
|
|
21730
|
-
throw new
|
|
21820
|
+
throw new pt("Resource Not found");
|
|
21731
21821
|
if (r2 === 402) {
|
|
21732
21822
|
let a = await t2.json();
|
|
21733
|
-
throw new
|
|
21823
|
+
throw new ft(a.detail);
|
|
21734
21824
|
}
|
|
21735
21825
|
let n = await t2.text();
|
|
21736
21826
|
if (this.dbtTerminal.debug("network:response", "error from backend", n), r2 === 429)
|
|
21737
|
-
throw new
|
|
21827
|
+
throw new ht(n, t2.headers.get("Retry-After") ? parseInt(t2.headers.get("Retry-After") || "") : 60000);
|
|
21738
21828
|
let o;
|
|
21739
21829
|
try {
|
|
21740
21830
|
o = JSON.parse(n);
|
|
21741
21831
|
} catch (a) {
|
|
21742
21832
|
this.dbtTerminal.debug("AltimateHttpClient", `Failed to parse error response as JSON: ${a instanceof Error ? a.message : String(a)}. Raw response: ${n.substring(0, 200)}${n.length > 200 ? "..." : ""}`);
|
|
21743
21833
|
}
|
|
21744
|
-
throw new
|
|
21834
|
+
throw new zt(`Could not process request, server responded with ${t2.status}: ${o?.detail || n}`);
|
|
21745
21835
|
}
|
|
21746
21836
|
async readStreamToBlob(t2) {
|
|
21747
21837
|
return new Promise((e2, r2) => {
|
|
@@ -21761,14 +21851,14 @@ else:
|
|
|
21761
21851
|
}
|
|
21762
21852
|
return o;
|
|
21763
21853
|
}
|
|
21764
|
-
},
|
|
21854
|
+
}, Xt = class {
|
|
21765
21855
|
constructor(t2) {
|
|
21766
21856
|
this.terminal = t2;
|
|
21767
21857
|
}
|
|
21768
21858
|
createCommandProcessExecution({ command: t2, args: e2, stdin: r2, cwd: n, signal: o, envVars: a }) {
|
|
21769
|
-
return new
|
|
21859
|
+
return new yt(this.terminal, t2, e2, r2, n, o, a);
|
|
21770
21860
|
}
|
|
21771
|
-
},
|
|
21861
|
+
}, yt = class {
|
|
21772
21862
|
constructor(t2, e2, r2, n, o, a, i2) {
|
|
21773
21863
|
this.terminal = t2;
|
|
21774
21864
|
this.command = e2;
|
|
@@ -21822,7 +21912,7 @@ else:
|
|
|
21822
21912
|
formatText(t2) {
|
|
21823
21913
|
return `${t2.split(/(\r?\n)+/g).join("\r")}`;
|
|
21824
21914
|
}
|
|
21825
|
-
},
|
|
21915
|
+
}, Zt = class {
|
|
21826
21916
|
constructor(t2, e2) {
|
|
21827
21917
|
this.altimateHttpClient = t2;
|
|
21828
21918
|
this.dbtTerminal = e2;
|
|
@@ -21838,7 +21928,7 @@ else:
|
|
|
21838
21928
|
return this.altimateHttpClient.fetch(`dbt/v1/fetch_artifact_url${r2}`);
|
|
21839
21929
|
}
|
|
21840
21930
|
async downloadFileLocally(t2, e2, r2 = "manifest.json") {
|
|
21841
|
-
let n =
|
|
21931
|
+
let n = At(e2), o = join7(_e.tmpdir(), n);
|
|
21842
21932
|
this.dbtTerminal.debug("DbtIntegrationClient", `creating temporary folder: ${o} for file: ${r2}`), mkdirSync(o, { recursive: true });
|
|
21843
21933
|
let a = join7(o, r2);
|
|
21844
21934
|
this.dbtTerminal.debug("DbtIntegrationClient", `fetching artifactUrl: ${t2}`);
|
|
@@ -21848,11 +21938,11 @@ else:
|
|
|
21848
21938
|
if (!i2.body)
|
|
21849
21939
|
throw new Error("Failed to download file: response body is null");
|
|
21850
21940
|
let s2 = createWriteStream(a);
|
|
21851
|
-
return await new Promise((c,
|
|
21852
|
-
i2.body.on("error", (
|
|
21853
|
-
s2.destroy(),
|
|
21854
|
-
}), s2.on("error", (
|
|
21855
|
-
|
|
21941
|
+
return await new Promise((c, l) => {
|
|
21942
|
+
i2.body.on("error", (u) => {
|
|
21943
|
+
s2.destroy(), l(new Error(`Response stream error: ${u.message}`));
|
|
21944
|
+
}), s2.on("error", (u) => {
|
|
21945
|
+
l(new Error(`File stream error: ${u.message}`));
|
|
21856
21946
|
}), s2.on("finish", c), i2.body.pipe(s2);
|
|
21857
21947
|
}), this.dbtTerminal.debug("File downloaded successfully!", r2), o;
|
|
21858
21948
|
}
|
|
@@ -21860,7 +21950,7 @@ else:
|
|
|
21860
21950
|
let e2 = Object.keys(t2).map((r2) => `${encodeURIComponent(r2)}=${encodeURIComponent(t2[r2])}`).join("&");
|
|
21861
21951
|
return e2 ? `?${e2}` : "";
|
|
21862
21952
|
}
|
|
21863
|
-
},
|
|
21953
|
+
}, Pt = class {
|
|
21864
21954
|
parse(t2, e2) {
|
|
21865
21955
|
let r2 = t2;
|
|
21866
21956
|
if (!r2.metadata?.invocation_id || !r2.metadata?.generated_at || !r2.args?.which)
|
|
@@ -21913,12 +22003,12 @@ else:
|
|
|
21913
22003
|
extractResourceName(t2) {
|
|
21914
22004
|
return t2.split(".").pop();
|
|
21915
22005
|
}
|
|
21916
|
-
},
|
|
22006
|
+
}, v, ee = (d5, t2) => {
|
|
21917
22007
|
let e2;
|
|
21918
22008
|
return () => {
|
|
21919
|
-
clearTimeout(e2), e2 = setTimeout(
|
|
22009
|
+
clearTimeout(e2), e2 = setTimeout(d5, t2);
|
|
21920
22010
|
};
|
|
21921
|
-
},
|
|
22011
|
+
}, re, ne = class {
|
|
21922
22012
|
createChildrenParentMetaMap(t2) {
|
|
21923
22013
|
let e2 = {}, r2 = {};
|
|
21924
22014
|
return Object.values(t2).forEach((n) => {
|
|
@@ -21930,23 +22020,23 @@ else:
|
|
|
21930
22020
|
});
|
|
21931
22021
|
}), Promise.resolve({ parentMetaMap: e2, childMetaMap: r2 });
|
|
21932
22022
|
}
|
|
21933
|
-
},
|
|
21934
|
-
let t2 = process.env.DBT_LOOM_CONFIG_PATH || w.join(
|
|
22023
|
+
}, bt = (d5) => {
|
|
22024
|
+
let t2 = process.env.DBT_LOOM_CONFIG_PATH || w.join(d5, "dbt_loom.config.yml");
|
|
21935
22025
|
try {
|
|
21936
|
-
let e2 =
|
|
22026
|
+
let e2 = readFileSync4(t2, "utf8");
|
|
21937
22027
|
if (e2)
|
|
21938
22028
|
return ($parse(e2, { strict: false, uniqueKeys: false, maxAliasCount: -1 }) || {}).manifests?.map((n) => n.name);
|
|
21939
22029
|
} catch (e2) {
|
|
21940
22030
|
console.debug("NodeParser", `Error reading dbt_loom.config.yml at ${t2}`, e2);
|
|
21941
22031
|
}
|
|
21942
22032
|
return null;
|
|
21943
|
-
},
|
|
21944
|
-
if (e2 !==
|
|
22033
|
+
}, H = (d5, t2, e2, r2, n) => {
|
|
22034
|
+
if (e2 !== d5) {
|
|
21945
22035
|
let o = w.join(r2, e2, n);
|
|
21946
|
-
return
|
|
22036
|
+
return existsSync6(o) ? o : undefined;
|
|
21947
22037
|
}
|
|
21948
22038
|
return w.join(t2, n);
|
|
21949
|
-
},
|
|
22039
|
+
}, oe = class {
|
|
21950
22040
|
constructor(t2) {
|
|
21951
22041
|
this.terminal = t2;
|
|
21952
22042
|
}
|
|
@@ -21960,21 +22050,21 @@ else:
|
|
|
21960
22050
|
return;
|
|
21961
22051
|
}
|
|
21962
22052
|
for (let i2 of Object.values(t2)) {
|
|
21963
|
-
let { package_name: s2, name: c, original_file_path:
|
|
21964
|
-
if (
|
|
22053
|
+
let { package_name: s2, name: c, original_file_path: l } = i2, u = s2, m2 = e2.getPackageInstallPath();
|
|
22054
|
+
if (m2 === undefined)
|
|
21965
22055
|
throw new Error("packagePath is not defined in " + n);
|
|
21966
|
-
let g =
|
|
22056
|
+
let g = u === o ? c : `${u}.${c}`, p = H(o, n, u, m2, l);
|
|
21967
22057
|
if (!p) {
|
|
21968
22058
|
r2(a);
|
|
21969
22059
|
return;
|
|
21970
22060
|
}
|
|
21971
22061
|
try {
|
|
21972
|
-
let y =
|
|
22062
|
+
let y = readFileSync4(p).toString("utf8").split(`
|
|
21973
22063
|
`);
|
|
21974
|
-
for (let
|
|
21975
|
-
let D = y[
|
|
22064
|
+
for (let b = 0;b < y.length; b++) {
|
|
22065
|
+
let D = y[b];
|
|
21976
22066
|
if (D.match(new RegExp(`docs\\s${c}`))) {
|
|
21977
|
-
a.set(g, { path: p, line:
|
|
22067
|
+
a.set(g, { path: p, line: b, character: D.indexOf(c) });
|
|
21978
22068
|
break;
|
|
21979
22069
|
}
|
|
21980
22070
|
}
|
|
@@ -21985,7 +22075,7 @@ else:
|
|
|
21985
22075
|
this.terminal.debug("DocParser", `Returning docs for "${o}" at ${n}`, a), r2(a);
|
|
21986
22076
|
});
|
|
21987
22077
|
}
|
|
21988
|
-
},
|
|
22078
|
+
}, ae = class {
|
|
21989
22079
|
constructor(t2) {
|
|
21990
22080
|
this.terminal = t2;
|
|
21991
22081
|
}
|
|
@@ -21994,13 +22084,13 @@ else:
|
|
|
21994
22084
|
let n = e2.getProjectRoot(), o = e2.getProjectName();
|
|
21995
22085
|
this.terminal.debug("ExposureParser", `Parsing exposures for "${o}" at ${n}`);
|
|
21996
22086
|
let a = new Map;
|
|
21997
|
-
t2 == null && r2(a), Object.values(t2).filter((i2) => i2.resource_type ===
|
|
22087
|
+
t2 == null && r2(a), Object.values(t2).filter((i2) => i2.resource_type === Mt).forEach((i2) => {
|
|
21998
22088
|
let s2 = w.join(n, i2.original_file_path);
|
|
21999
22089
|
a.set(i2.name, { ...i2, path: s2 });
|
|
22000
22090
|
}), this.terminal.debug("ExposureParser", `Returning exposures for "${o}" at ${n}`, a), r2(a);
|
|
22001
22091
|
});
|
|
22002
22092
|
}
|
|
22003
|
-
},
|
|
22093
|
+
}, ie = class {
|
|
22004
22094
|
constructor(t2) {
|
|
22005
22095
|
this.terminal = t2;
|
|
22006
22096
|
}
|
|
@@ -22013,32 +22103,32 @@ else:
|
|
|
22013
22103
|
r2(a);
|
|
22014
22104
|
return;
|
|
22015
22105
|
}
|
|
22016
|
-
Object.values(t2).filter((i2) => i2.resource_type ===
|
|
22106
|
+
Object.values(t2).filter((i2) => i2.resource_type === xt).forEach((i2) => {
|
|
22017
22107
|
let s2 = i2.original_file_path ? w.join(n, i2.original_file_path) : undefined;
|
|
22018
22108
|
a.set(i2.name, { ...i2, path: s2 });
|
|
22019
22109
|
}), this.terminal.debug("FunctionParser", `Returning functions for "${o}" at ${n}`, a), r2(a);
|
|
22020
22110
|
});
|
|
22021
22111
|
}
|
|
22022
|
-
},
|
|
22112
|
+
}, Dt = (d5) => d5 != null, se = class {
|
|
22023
22113
|
constructor(t2) {
|
|
22024
22114
|
this.terminal = t2;
|
|
22025
22115
|
}
|
|
22026
22116
|
createGraphMetaMap(t2, e2, r2, n, o, a, i2) {
|
|
22027
22117
|
let s2 = t2.getProjectRoot(), c = t2.getProjectName();
|
|
22028
22118
|
this.terminal.debug("GraphParser", `Parsing graph for "${c}" at ${s2}`);
|
|
22029
|
-
let
|
|
22030
|
-
let D =
|
|
22119
|
+
let l = Object.entries(e2).reduce((f3, [y, b]) => {
|
|
22120
|
+
let D = b.map(this.mapToNode(o, n, a, i2)).filter(Dt);
|
|
22031
22121
|
return f3.set(y, { nodes: D }), f3;
|
|
22032
|
-
}, new Map),
|
|
22033
|
-
let D =
|
|
22122
|
+
}, new Map), u = Object.entries(r2).reduce((f3, [y, b]) => {
|
|
22123
|
+
let D = b.map(this.mapToNode(o, n, a, i2)).filter((T) => T?.resourceType !== U).filter(Dt);
|
|
22034
22124
|
return f3.set(y, { nodes: D }), f3;
|
|
22035
|
-
}, new Map),
|
|
22036
|
-
let D =
|
|
22125
|
+
}, new Map), m2 = Object.entries(r2).reduce((f3, [y, b]) => {
|
|
22126
|
+
let D = b.map(this.mapToNode(o, n, a, i2)).filter((T) => T?.resourceType === U).filter(Dt);
|
|
22037
22127
|
return f3.set(y, { nodes: D }), f3;
|
|
22038
|
-
}, new Map), g = Object.entries(r2).reduce((f3, [y,
|
|
22039
|
-
let D =
|
|
22128
|
+
}, new Map), g = Object.entries(r2).reduce((f3, [y, b]) => {
|
|
22129
|
+
let D = b.map(this.mapToNode(o, n, a, i2)).filter((T) => T?.resourceType === _t).filter(Dt);
|
|
22040
22130
|
return f3.set(y, { nodes: D }), f3;
|
|
22041
|
-
}, new Map), p = { parents:
|
|
22131
|
+
}, new Map), p = { parents: l, children: u, tests: m2, metrics: g };
|
|
22042
22132
|
return this.terminal.debug("GraphParser", `Returning graph for "${c}" at ${s2}`, p), p;
|
|
22043
22133
|
}
|
|
22044
22134
|
mapToNode(t2, e2, r2, n) {
|
|
@@ -22046,44 +22136,44 @@ else:
|
|
|
22046
22136
|
let [a, i2, ...s2] = o.split("."), c = s2.join(".");
|
|
22047
22137
|
switch (a) {
|
|
22048
22138
|
case "source": {
|
|
22049
|
-
let [
|
|
22050
|
-
return { label: `${
|
|
22139
|
+
let [l, u] = c.split("."), m2 = t2.get(l)?.tables.find((g) => g.name === u)?.path;
|
|
22140
|
+
return { label: `${u} (${l})`, key: o, url: m2, resourceType: "source" };
|
|
22051
22141
|
}
|
|
22052
22142
|
case "model": {
|
|
22053
|
-
let
|
|
22054
|
-
if (!
|
|
22143
|
+
let l = e2.lookupByUniqueId(o);
|
|
22144
|
+
if (!l)
|
|
22055
22145
|
return;
|
|
22056
|
-
let
|
|
22057
|
-
return { label:
|
|
22146
|
+
let u = l?.path;
|
|
22147
|
+
return { label: l.alias, key: o, url: u, resourceType: "model" };
|
|
22058
22148
|
}
|
|
22059
22149
|
case "seed": {
|
|
22060
|
-
let
|
|
22061
|
-
if (!
|
|
22150
|
+
let l = e2.lookupByUniqueId(o);
|
|
22151
|
+
if (!l)
|
|
22062
22152
|
return;
|
|
22063
|
-
let
|
|
22064
|
-
return { label:
|
|
22153
|
+
let u = l?.path;
|
|
22154
|
+
return { label: l.alias, key: o, url: u, resourceType: "seed" };
|
|
22065
22155
|
}
|
|
22066
22156
|
case "test": {
|
|
22067
|
-
let
|
|
22068
|
-
return { label: c, key: o, url:
|
|
22157
|
+
let l = r2.get(c.split(".")[0])?.path;
|
|
22158
|
+
return { label: c, key: o, url: l, resourceType: "test" };
|
|
22069
22159
|
}
|
|
22070
22160
|
case "analysis": {
|
|
22071
|
-
let
|
|
22072
|
-
return { label: c, key: o, url:
|
|
22161
|
+
let l = e2.lookupByBaseName(c, "analysis")?.path;
|
|
22162
|
+
return { label: c, key: o, url: l, resourceType: "analysis" };
|
|
22073
22163
|
}
|
|
22074
22164
|
case "snapshot": {
|
|
22075
|
-
let
|
|
22076
|
-
return { label: c, key: o, url:
|
|
22165
|
+
let l = e2.lookupByBaseName(c, "snapshot")?.path;
|
|
22166
|
+
return { label: c, key: o, url: l, resourceType: "snapshot" };
|
|
22077
22167
|
}
|
|
22078
22168
|
case "exposure": {
|
|
22079
|
-
let
|
|
22080
|
-
return { label: c, key: o, url:
|
|
22169
|
+
let l = e2.lookupByBaseName(c)?.path;
|
|
22170
|
+
return { label: c, key: o, url: l, resourceType: "exposure" };
|
|
22081
22171
|
}
|
|
22082
22172
|
case "semantic_model":
|
|
22083
22173
|
return { label: c, key: o, resourceType: "semantic_model" };
|
|
22084
22174
|
case "function": {
|
|
22085
|
-
let
|
|
22086
|
-
return { label: c, key: o, url:
|
|
22175
|
+
let l = n.get(c)?.path;
|
|
22176
|
+
return { label: c, key: o, url: l, resourceType: "function" };
|
|
22087
22177
|
}
|
|
22088
22178
|
default:
|
|
22089
22179
|
console.log(`Node Type '${a}' not implemented!`);
|
|
@@ -22091,7 +22181,7 @@ else:
|
|
|
22091
22181
|
}
|
|
22092
22182
|
};
|
|
22093
22183
|
}
|
|
22094
|
-
},
|
|
22184
|
+
}, ce = class {
|
|
22095
22185
|
constructor(t2) {
|
|
22096
22186
|
this.terminal = t2;
|
|
22097
22187
|
}
|
|
@@ -22105,26 +22195,26 @@ else:
|
|
|
22105
22195
|
if (i2 === undefined)
|
|
22106
22196
|
throw new Error("packagePath is not defined in " + n);
|
|
22107
22197
|
for (let s2 in t2) {
|
|
22108
|
-
let c = t2[s2], { package_name:
|
|
22198
|
+
let c = t2[s2], { package_name: l, name: u, original_file_path: m2, depends_on: g } = c, p = l, f3 = p === o ? u : `${p}.${u}`, y = H(o, n, p, i2, m2);
|
|
22109
22199
|
if (y)
|
|
22110
22200
|
try {
|
|
22111
|
-
let D =
|
|
22201
|
+
let D = readFileSync4(y).toString("utf8").split(`
|
|
22112
22202
|
`);
|
|
22113
22203
|
for (let T = 0;T < D.length; T++) {
|
|
22114
|
-
let
|
|
22115
|
-
if (
|
|
22116
|
-
a.set(f3, { path: y, line: T, character:
|
|
22204
|
+
let E = D[T];
|
|
22205
|
+
if (E.match(new RegExp(`macro\\s${u}\\(`)) || E.match(new RegExp(`test\\s${u.replace("test_", "")}\\(`))) {
|
|
22206
|
+
a.set(f3, { path: y, line: T, character: E.indexOf(u), unique_id: s2, description: c.description, arguments: c.arguments, name: u, depends_on: g });
|
|
22117
22207
|
break;
|
|
22118
22208
|
}
|
|
22119
22209
|
}
|
|
22120
|
-
} catch (
|
|
22121
|
-
this.terminal.debug("MacroParser", `File not found at '${y}', probably compiled is outdated.`,
|
|
22210
|
+
} catch (b) {
|
|
22211
|
+
this.terminal.debug("MacroParser", `File not found at '${y}', probably compiled is outdated.`, b);
|
|
22122
22212
|
}
|
|
22123
22213
|
}
|
|
22124
22214
|
this.terminal.debug("MacroParser", `Returning macros for "${o}" at ${n}`, a), r2(a);
|
|
22125
22215
|
});
|
|
22126
22216
|
}
|
|
22127
|
-
},
|
|
22217
|
+
}, de = class {
|
|
22128
22218
|
constructor(t2) {
|
|
22129
22219
|
this.terminal = t2;
|
|
22130
22220
|
}
|
|
@@ -22141,7 +22231,7 @@ else:
|
|
|
22141
22231
|
this.terminal.debug("MetricParser", `Returning metrics for "${o}" at ${n}`, a), r2(a);
|
|
22142
22232
|
});
|
|
22143
22233
|
}
|
|
22144
|
-
},
|
|
22234
|
+
}, le = class {
|
|
22145
22235
|
constructor(t2, e2, r2) {
|
|
22146
22236
|
this.terminal = t2;
|
|
22147
22237
|
this.dbtIntegrationClient = e2;
|
|
@@ -22156,42 +22246,54 @@ else:
|
|
|
22156
22246
|
return this.terminal.debug("ModelDepthParser", "Skipping model depth calculation - Altimate API key not configured"), new Map;
|
|
22157
22247
|
}
|
|
22158
22248
|
let o = new Map, a = [];
|
|
22159
|
-
for (let [
|
|
22160
|
-
|
|
22249
|
+
for (let [l, u] of Object.entries(t2))
|
|
22250
|
+
u.resource_type === "model" && a.push({ name: u.name, id: l });
|
|
22161
22251
|
this.terminal.debug("ModelDepthParser", `Going to calculate depths for ${a.length} models`);
|
|
22162
22252
|
let i2 = new Map, s2 = new Map;
|
|
22163
|
-
for (let
|
|
22164
|
-
let
|
|
22165
|
-
i2.set(
|
|
22253
|
+
for (let l of a) {
|
|
22254
|
+
let m2 = (e2[l.id] || []).filter((g) => g.startsWith("model."));
|
|
22255
|
+
i2.set(l.id, m2.length === 0 ? 1 : 0), s2.set(l.id, m2.length);
|
|
22166
22256
|
}
|
|
22167
22257
|
let c = [];
|
|
22168
|
-
for (let
|
|
22169
|
-
s2.get(
|
|
22258
|
+
for (let l of a)
|
|
22259
|
+
s2.get(l.id) === 0 && c.push(l.id);
|
|
22170
22260
|
for (;c.length > 0; ) {
|
|
22171
|
-
let
|
|
22172
|
-
for (let g of
|
|
22173
|
-
let p = Math.max(i2.get(g),
|
|
22261
|
+
let l = c.shift(), u = i2.get(l), m2 = r2[l] || [];
|
|
22262
|
+
for (let g of m2) {
|
|
22263
|
+
let p = Math.max(i2.get(g), u + 1);
|
|
22174
22264
|
i2.set(g, p);
|
|
22175
22265
|
let f3 = s2.get(g) - 1;
|
|
22176
22266
|
s2.set(g, f3), f3 === 0 && c.push(g);
|
|
22177
22267
|
}
|
|
22178
22268
|
}
|
|
22179
|
-
for (let
|
|
22180
|
-
let
|
|
22181
|
-
o.set(
|
|
22269
|
+
for (let l of a) {
|
|
22270
|
+
let u = i2.get(l.id);
|
|
22271
|
+
o.set(l.name, u), o.set(l.id, u);
|
|
22182
22272
|
}
|
|
22183
22273
|
return this.terminal.debug("ModelDepthParser", `Model depths calculated for ${o.size} models`), o;
|
|
22184
22274
|
}
|
|
22185
|
-
},
|
|
22275
|
+
}, Pr, Tt = class {
|
|
22186
22276
|
constructor(t2 = new Map, e2 = new Map, r2 = new Map) {
|
|
22187
22277
|
this.latestVersionLookupMap = t2;
|
|
22188
|
-
this.
|
|
22278
|
+
this.nameLookupMapsByType = e2;
|
|
22189
22279
|
this.modelMetadataLookupMap = r2;
|
|
22190
22280
|
}
|
|
22191
|
-
lookupByBaseName(t2) {
|
|
22192
|
-
|
|
22193
|
-
|
|
22194
|
-
|
|
22281
|
+
lookupByBaseName(t2, e2) {
|
|
22282
|
+
if (e2 !== undefined)
|
|
22283
|
+
return this.lookupInType(t2, e2);
|
|
22284
|
+
for (let r2 of Pr) {
|
|
22285
|
+
let n = this.lookupInType(t2, r2);
|
|
22286
|
+
if (n)
|
|
22287
|
+
return n;
|
|
22288
|
+
}
|
|
22289
|
+
}
|
|
22290
|
+
lookupInType(t2, e2) {
|
|
22291
|
+
let r2 = this.nameLookupMapsByType.get(e2);
|
|
22292
|
+
if (!r2)
|
|
22293
|
+
return;
|
|
22294
|
+
let n = r2.get(t2);
|
|
22295
|
+
if (n)
|
|
22296
|
+
return this.lookupByUniqueId(n);
|
|
22195
22297
|
}
|
|
22196
22298
|
lookupByUniqueId(t2) {
|
|
22197
22299
|
let e2 = this.latestVersionLookupMap.get(t2);
|
|
@@ -22200,7 +22302,7 @@ else:
|
|
|
22200
22302
|
nodes() {
|
|
22201
22303
|
return this.modelMetadataLookupMap.values();
|
|
22202
22304
|
}
|
|
22203
|
-
},
|
|
22305
|
+
}, ue = class {
|
|
22204
22306
|
constructor(t2) {
|
|
22205
22307
|
this.terminal = t2;
|
|
22206
22308
|
}
|
|
@@ -22209,25 +22311,29 @@ else:
|
|
|
22209
22311
|
let n = e2.getProjectRoot(), o = e2.getProjectName();
|
|
22210
22312
|
this.terminal.debug("NodeParser", `Parsing nodes for "${o}" at ${n}`);
|
|
22211
22313
|
let a = new Map, i2 = new Map, s2 = new Map;
|
|
22212
|
-
t2 == null && r2(new
|
|
22213
|
-
let c = Object.values(t2).filter((g) =>
|
|
22214
|
-
if (
|
|
22314
|
+
t2 == null && r2(new Tt(new Map, new Map));
|
|
22315
|
+
let c = Object.values(t2).filter((g) => vt(g.resource_type)), l = e2.getPackageInstallPath();
|
|
22316
|
+
if (l === undefined)
|
|
22215
22317
|
throw new Error("packagePath is not defined " + n);
|
|
22216
|
-
let
|
|
22318
|
+
let u = bt(n);
|
|
22217
22319
|
for (let g of c) {
|
|
22218
|
-
let { name: p, original_file_path: f3, database: y, schema:
|
|
22219
|
-
if (
|
|
22220
|
-
let
|
|
22221
|
-
|
|
22320
|
+
let { name: p, original_file_path: f3, database: y, schema: b, alias: D, package_name: T, latest_version: E, version: M, unique_id: _, columns: B, description: N, patch_path: A2, config: nt, resource_type: ot, depends_on: jt, meta: at } = g, Y = H(o, n, T, l, f3), it = e2.getTargetPath();
|
|
22321
|
+
if (Y) {
|
|
22322
|
+
let S2 = ot, st = s2.get(S2);
|
|
22323
|
+
st || (st = new Map, s2.set(S2, st)), st.set(w.parse(Y).name, _);
|
|
22324
|
+
}
|
|
22325
|
+
if (M && E && M === E) {
|
|
22326
|
+
let S2 = _.split(".");
|
|
22327
|
+
S2.pop(), a.set(S2.join("."), _);
|
|
22222
22328
|
}
|
|
22223
|
-
i2.set(_, { path:
|
|
22329
|
+
i2.set(_, { path: Y, database: y, schema: b, alias: D, name: p, package_name: T, unique_id: _, columns: B, description: N, patch_path: A2, config: nt, resource_type: ot, depends_on: jt, is_external_project: !!u?.includes(T), compiled_path: it ? w.join(it, "compiled", T, f3) : "", meta: at });
|
|
22224
22330
|
}
|
|
22225
22331
|
this.terminal.debug("NodeParser", `Returning nodes for "${o}" at ${n}`, s2, i2);
|
|
22226
|
-
let
|
|
22227
|
-
r2(
|
|
22332
|
+
let m2 = new Tt(a, s2, i2);
|
|
22333
|
+
r2(m2);
|
|
22228
22334
|
});
|
|
22229
22335
|
}
|
|
22230
|
-
},
|
|
22336
|
+
}, me = class {
|
|
22231
22337
|
constructor(t2) {
|
|
22232
22338
|
this.terminal = t2;
|
|
22233
22339
|
}
|
|
@@ -22238,16 +22344,16 @@ else:
|
|
|
22238
22344
|
let a = new Map;
|
|
22239
22345
|
if (t2 == null && r2(a), e2.getPackageInstallPath() === undefined)
|
|
22240
22346
|
throw new Error("packagePath is not defined in " + n);
|
|
22241
|
-
let s2 =
|
|
22242
|
-
Object.values(t2).filter((c) => c.resource_type ===
|
|
22243
|
-
let
|
|
22244
|
-
|
|
22347
|
+
let s2 = bt(n);
|
|
22348
|
+
Object.values(t2).filter((c) => c.resource_type === k).reduce((c, { source_name: l, database: u, schema: m2, name: g, original_file_path: p, unique_id: f3, description: y, columns: b, identifier: D, package_name: T, meta: E }) => {
|
|
22349
|
+
let M = c.get(l);
|
|
22350
|
+
M || (M = { tables: [], unique_id: f3, name: l, database: u, schema: m2, package_name: T, is_external_project: !!s2?.includes(T), meta: E }, c.set(l, M));
|
|
22245
22351
|
let _ = w.join(n, p);
|
|
22246
|
-
return
|
|
22352
|
+
return M.tables.push({ name: g, identifier: D, path: _, description: y, columns: b }), c;
|
|
22247
22353
|
}, a), this.terminal.debug("SourceParser", `Returning sources for "${e2.getProjectName()}" at ${n}`, a), r2(a);
|
|
22248
22354
|
});
|
|
22249
22355
|
}
|
|
22250
|
-
},
|
|
22356
|
+
}, pe = class {
|
|
22251
22357
|
constructor(t2) {
|
|
22252
22358
|
this.terminal = t2;
|
|
22253
22359
|
}
|
|
@@ -22260,9 +22366,9 @@ else:
|
|
|
22260
22366
|
let n = e2.getProjectRoot(), o = e2.getProjectName();
|
|
22261
22367
|
this.terminal.debug("TestParser", `Parsing tests for "${o}" at ${n}`);
|
|
22262
22368
|
let a = new Map;
|
|
22263
|
-
t2 == null && r2(a), Object.values(t2).filter((i2) => i2.resource_type ===
|
|
22369
|
+
t2 == null && r2(a), Object.values(t2).filter((i2) => i2.resource_type === U).forEach(({ name: i2, raw_sql: s2, original_file_path: c, database: l, schema: u, alias: m2, column_name: g, test_metadata: p, attached_node: f3, depends_on: y, unique_id: b }) => {
|
|
22264
22370
|
let D = w.join(n, c);
|
|
22265
|
-
a.set(i2, { path: D, raw_sql: s2, database:
|
|
22371
|
+
a.set(i2, { path: D, raw_sql: s2, database: l, schema: u, alias: m2, column_name: this.getColumnNameWithoutQuotes(g), test_metadata: p, attached_node: f3, depends_on: y, unique_id: b });
|
|
22266
22372
|
}), this.terminal.debug("TestParser", `Returning tests for "${o}" at ${n}`, a), r2(a);
|
|
22267
22373
|
});
|
|
22268
22374
|
}
|
|
@@ -22270,21 +22376,21 @@ else:
|
|
|
22270
22376
|
var init_dist3 = __esm(() => {
|
|
22271
22377
|
init_dist();
|
|
22272
22378
|
import_python_bridge = __toESM(require_python_bridge(), 1);
|
|
22273
|
-
|
|
22274
|
-
P =
|
|
22275
|
-
|
|
22276
|
-
|
|
22277
|
-
|
|
22278
|
-
|
|
22379
|
+
$t = __toESM(require_semver2(), 1);
|
|
22380
|
+
P = Qe();
|
|
22381
|
+
ge = ((i2) => (i2[i2.RUN_PARENTS = 0] = "RUN_PARENTS", i2[i2.RUN_CHILDREN = 1] = "RUN_CHILDREN", i2[i2.BUILD_PARENTS = 2] = "BUILD_PARENTS", i2[i2.BUILD_CHILDREN = 3] = "BUILD_CHILDREN", i2[i2.BUILD_CHILDREN_PARENTS = 4] = "BUILD_CHILDREN_PARENTS", i2[i2.TEST = 5] = "TEST", i2[i2.SNAPSHOT = 6] = "SNAPSHOT", i2))(ge || {});
|
|
22382
|
+
lt = ((e2) => (e2.LOCAL = "local", e2.REMOTE = "remote", e2))(lt || {});
|
|
22383
|
+
he = w__default.join(P, "altimate_python_packages");
|
|
22384
|
+
G = class extends Error {
|
|
22279
22385
|
compiled_sql;
|
|
22280
22386
|
constructor(t2, e2) {
|
|
22281
22387
|
super(t2), this.compiled_sql = e2;
|
|
22282
22388
|
}
|
|
22283
22389
|
};
|
|
22284
|
-
|
|
22390
|
+
Wt = class extends et {
|
|
22285
22391
|
dbtPath = "dbt";
|
|
22286
22392
|
refreshProjectConfig() {
|
|
22287
|
-
return this.dbtPath =
|
|
22393
|
+
return this.dbtPath = ut(this.pythonEnvironment, this.dbtTerminal), super.refreshProjectConfig();
|
|
22288
22394
|
}
|
|
22289
22395
|
async executeSQL(t2, e2, r2) {
|
|
22290
22396
|
let n = this.dbtCoreCommand(new h2("Running sql...", ["show", "--log-level", "debug", "--inline", t2, "--limit", e2.toString(), "--output", "json", "--log-format", "json"])), o = new AbortController;
|
|
@@ -22299,8 +22405,8 @@ var init_dist3 = __esm(() => {
|
|
|
22299
22405
|
try {
|
|
22300
22406
|
return JSON.parse(p.trim());
|
|
22301
22407
|
} catch {}
|
|
22302
|
-
}),
|
|
22303
|
-
return { table: { column_names:
|
|
22408
|
+
}), l = c.filter((p) => p && p.hasOwnProperty("data") && p.data.hasOwnProperty("preview")), u = c.filter((p) => p && p.hasOwnProperty("data") && p.data.hasOwnProperty("sql")), m2 = JSON.parse(l[0].data.preview), g = u[u.length - 1].data.sql;
|
|
22409
|
+
return { table: { column_names: m2.length > 0 ? Object.keys(m2[0]) : [], column_types: m2.length > 0 ? Object.keys(m2[0]).map(() => "string") : [], rows: m2.map((p) => Object.values(p)) }, compiled_sql: g, raw_sql: t2, modelName: r2 };
|
|
22304
22410
|
});
|
|
22305
22411
|
}
|
|
22306
22412
|
dbtCoreCommand(t2) {
|
|
@@ -22454,10 +22560,24 @@ var init_dist3 = __esm(() => {
|
|
|
22454
22560
|
return JSON.parse(i2[0].data.compiled);
|
|
22455
22561
|
}
|
|
22456
22562
|
};
|
|
22457
|
-
|
|
22563
|
+
Yt = class extends q {
|
|
22458
22564
|
selectedTarget;
|
|
22459
22565
|
profilesDir;
|
|
22460
22566
|
availableTargets;
|
|
22567
|
+
async initializeProject() {
|
|
22568
|
+
let t2 = Se();
|
|
22569
|
+
for (let e2 of t2) {
|
|
22570
|
+
if (e2.includes(w__default.sep) && existsSync6(e2)) {
|
|
22571
|
+
this.dbtPath = e2, this.terminal.debug("DBTFusionInitialize", `Using Fusion binary at: ${e2}`);
|
|
22572
|
+
return;
|
|
22573
|
+
}
|
|
22574
|
+
if (!e2.includes(w__default.sep)) {
|
|
22575
|
+
this.dbtPath = e2, this.terminal.debug("DBTFusionInitialize", `Using Fusion binary from PATH: ${e2}`);
|
|
22576
|
+
return;
|
|
22577
|
+
}
|
|
22578
|
+
}
|
|
22579
|
+
this.terminal.warn("DBTFusionInitialize", "Could not find Fusion binary, falling back to 'dbt'", true), this.dbtPath = "dbt";
|
|
22580
|
+
}
|
|
22461
22581
|
dbtCloudCommand(t2) {
|
|
22462
22582
|
return t2.setExecutionStrategy(this.cliDBTCommandExecutionStrategyFactory(this.projectRoot, this.dbtPath)), t2;
|
|
22463
22583
|
}
|
|
@@ -22473,7 +22593,7 @@ var init_dist3 = __esm(() => {
|
|
|
22473
22593
|
async initializePaths() {
|
|
22474
22594
|
this.targetPath = join7(this.projectRoot, "target"), this.modelPaths = [join7(this.projectRoot, "models")], this.seedPaths = [join7(this.projectRoot, "seeds")], this.macroPaths = [join7(this.projectRoot, "macros")], this.packagesInstallPath = join7(this.projectRoot, "dbt_packages");
|
|
22475
22595
|
try {
|
|
22476
|
-
let t2 =
|
|
22596
|
+
let t2 = V(this.projectRoot);
|
|
22477
22597
|
this.projectName = t2.name;
|
|
22478
22598
|
} catch (t2) {
|
|
22479
22599
|
this.terminal.warn("DbtCloudIntegrationProjectNameFromConfigExceptionError", "project name could not be read from dbt_project.yml, ignoring", true, t2);
|
|
@@ -22496,7 +22616,7 @@ var init_dist3 = __esm(() => {
|
|
|
22496
22616
|
let e2 = t2.match(/Loading\s+([^\n]*profiles\.yml)/);
|
|
22497
22617
|
if (e2) {
|
|
22498
22618
|
let r2 = e2[1].trim();
|
|
22499
|
-
return r2.startsWith("~/") && (r2 = w__default.join(
|
|
22619
|
+
return r2.startsWith("~/") && (r2 = w__default.join(homedir3(), r2.slice(2))), r2 === "profiles.yml" ? this.projectRoot : w__default.dirname(r2);
|
|
22500
22620
|
}
|
|
22501
22621
|
}
|
|
22502
22622
|
extractAdapterTypeFromDebugOutput(t2) {
|
|
@@ -22508,9 +22628,9 @@ var init_dist3 = __esm(() => {
|
|
|
22508
22628
|
return [];
|
|
22509
22629
|
let t2 = w__default.join(this.profilesDir, "profiles.yml");
|
|
22510
22630
|
try {
|
|
22511
|
-
if (!
|
|
22631
|
+
if (!existsSync6(t2))
|
|
22512
22632
|
return [];
|
|
22513
|
-
let r2 =
|
|
22633
|
+
let r2 = V(this.projectRoot).profile || this.projectName, n = readFileSync4(t2, "utf8"), a = $parse(n)[r2];
|
|
22514
22634
|
return !a || !a.outputs ? [] : Object.keys(a.outputs);
|
|
22515
22635
|
} catch (e2) {
|
|
22516
22636
|
return this.terminal.warn("DBTFusionCommandReadProfilesError", "Could not read profiles.yml to get target names", true, e2), [];
|
|
@@ -22528,14 +22648,14 @@ var init_dist3 = __esm(() => {
|
|
|
22528
22648
|
this.rebuildManifestDiagnosticsData = [];
|
|
22529
22649
|
let i2 = [];
|
|
22530
22650
|
o.forEach((s2) => {
|
|
22531
|
-
i2.push({ filePath: w__default.join(this.projectRoot,
|
|
22651
|
+
i2.push({ filePath: w__default.join(this.projectRoot, j), message: s2, severity: "error", range: { startLine: 0, startColumn: 0, endLine: 999, endColumn: 999 }, source: "dbt-fusion", category: "manifest-rebuild" });
|
|
22532
22652
|
}), a.forEach((s2) => {
|
|
22533
|
-
i2.push({ filePath: w__default.join(this.projectRoot,
|
|
22653
|
+
i2.push({ filePath: w__default.join(this.projectRoot, j), message: s2, severity: "warning", range: { startLine: 0, startColumn: 0, endLine: 999, endColumn: 999 }, source: "dbt-fusion", category: "manifest-rebuild" });
|
|
22534
22654
|
}), this.rebuildManifestDiagnosticsData = i2;
|
|
22535
22655
|
} catch (e2) {
|
|
22536
22656
|
this.terminal.error("dbtCloudCannotParseProjectCommandExecuteError", "Could not parse project command execution error", e2, true, { adapter: this.getAdapterType() || "unknown", command: t2.getCommandAsString() });
|
|
22537
22657
|
let r2 = "Unable to parse dbt fusion cli response. If the problem persists please reach out to us: " + e2;
|
|
22538
|
-
this.rebuildManifestDiagnosticsData = [{ filePath: w__default.join(this.projectRoot,
|
|
22658
|
+
this.rebuildManifestDiagnosticsData = [{ filePath: w__default.join(this.projectRoot, j), message: r2, severity: "error", range: { startLine: 0, startColumn: 0, endLine: 999, endColumn: 999 }, source: "dbt-fusion", category: "command-execution" }];
|
|
22539
22659
|
}
|
|
22540
22660
|
}
|
|
22541
22661
|
async executeSQL(t2, e2, r2) {
|
|
@@ -22547,14 +22667,14 @@ var init_dist3 = __esm(() => {
|
|
|
22547
22667
|
if (s2)
|
|
22548
22668
|
throw s2;
|
|
22549
22669
|
let c = a.trim().split(`
|
|
22550
|
-
`).map((p) => JSON.parse(p.trim())),
|
|
22551
|
-
if (
|
|
22670
|
+
`).map((p) => JSON.parse(p.trim())), l = c.filter((p) => p.hasOwnProperty("data") && p.data.hasOwnProperty("preview"));
|
|
22671
|
+
if (l.length === 0)
|
|
22552
22672
|
throw new Error("Could not find previewLine in " + a);
|
|
22553
|
-
let
|
|
22554
|
-
if (
|
|
22673
|
+
let u = c.filter((p) => p.hasOwnProperty("data") && p.data.hasOwnProperty("sql"));
|
|
22674
|
+
if (l.length === 0)
|
|
22555
22675
|
throw new Error("Could not find previewLine in " + a);
|
|
22556
|
-
let
|
|
22557
|
-
return
|
|
22676
|
+
let m2 = JSON.parse(l[0].data.preview), g = "";
|
|
22677
|
+
return u.length !== 0 && (g = u[u.length - 1].data.sql), { table: { column_names: m2.length > 0 ? Object.keys(m2[0]) : [], column_types: m2.length > 0 ? Object.keys(m2[0]).map(() => "string") : [], rows: m2.map((p) => Object.values(p)) }, compiled_sql: g, raw_sql: t2, modelName: r2 };
|
|
22558
22678
|
});
|
|
22559
22679
|
}
|
|
22560
22680
|
async unsafeCompileNode(t2) {
|
|
@@ -22662,32 +22782,32 @@ var init_dist3 = __esm(() => {
|
|
|
22662
22782
|
return e2;
|
|
22663
22783
|
}
|
|
22664
22784
|
};
|
|
22665
|
-
|
|
22666
|
-
|
|
22785
|
+
nr = { dbtCustomRunnerImport: "from dbt.cli.main import dbtRunner", dbtIntegration: "core", runModelCommandAdditionalParams: [], buildModelCommandAdditionalParams: [], testModelCommandAdditionalParams: [], queryTemplate: "select * from ({query}) as query limit {limit}", queryLimit: 500, enableNotebooks: false, disableQueryHistory: false, installDepsOnProjectInitialization: true, disableDepthsCalculation: false, altimateUrl: "https://api.myaltimate.com", isLocalMode: false };
|
|
22786
|
+
rt = class extends Error {
|
|
22667
22787
|
};
|
|
22668
|
-
|
|
22788
|
+
pt = class extends Error {
|
|
22669
22789
|
};
|
|
22670
|
-
|
|
22790
|
+
gt = class extends Error {
|
|
22671
22791
|
constructor() {
|
|
22672
22792
|
super("Invalid credentials. Please check instance name and API Key.");
|
|
22673
22793
|
}
|
|
22674
22794
|
};
|
|
22675
|
-
|
|
22795
|
+
ht = class d3 extends Error {
|
|
22676
22796
|
retryAfter;
|
|
22677
22797
|
constructor(t2, e2) {
|
|
22678
|
-
super(t2), this.retryAfter = e2, Object.setPrototypeOf(this,
|
|
22798
|
+
super(t2), this.retryAfter = e2, Object.setPrototypeOf(this, d3.prototype);
|
|
22679
22799
|
}
|
|
22680
22800
|
};
|
|
22681
|
-
|
|
22801
|
+
ft = class d4 extends Error {
|
|
22682
22802
|
constructor(t2) {
|
|
22683
|
-
super(t2), Object.setPrototypeOf(this,
|
|
22803
|
+
super(t2), Object.setPrototypeOf(this, d4.prototype);
|
|
22684
22804
|
}
|
|
22685
22805
|
};
|
|
22686
|
-
|
|
22806
|
+
zt = class extends Error {
|
|
22687
22807
|
};
|
|
22688
|
-
|
|
22689
|
-
|
|
22690
|
-
constructor(e2, r2, n, o, a, i2, s2, c,
|
|
22808
|
+
v = { DIAGNOSTICS_CHANGED: "diagnosticsChanged", PROJECT_CONFIG_CHANGED: "projectConfigChanged", REBUILD_MANIFEST_STATUS_CHANGE: "rebuildManifestStatusChange", MANIFEST_PARSED: "manifestParsed", SOURCE_FILE_CHANGED: "sourceFileChanged", RUN_RESULTS_PARSED: "runResultsParsed" };
|
|
22809
|
+
re = class extends EventEmitter {
|
|
22810
|
+
constructor(e2, r2, n, o, a, i2, s2, c, l, u, m2, g, p, f3, y, b, D, T, E, M) {
|
|
22691
22811
|
super();
|
|
22692
22812
|
this.dbtConfiguration = e2;
|
|
22693
22813
|
this.dbtCommandFactory = r2;
|
|
@@ -22696,18 +22816,18 @@ var init_dist3 = __esm(() => {
|
|
|
22696
22816
|
this.dbtFusionIntegrationFactory = a;
|
|
22697
22817
|
this.dbtCoreCommandIntegrationFactory = i2;
|
|
22698
22818
|
this.projectRoot = s2;
|
|
22699
|
-
this.childrenParentParser =
|
|
22700
|
-
this.nodeParser =
|
|
22701
|
-
this.macroParser =
|
|
22819
|
+
this.childrenParentParser = l;
|
|
22820
|
+
this.nodeParser = u;
|
|
22821
|
+
this.macroParser = m2;
|
|
22702
22822
|
this.metricParser = g;
|
|
22703
22823
|
this.graphParser = p;
|
|
22704
22824
|
this.sourceParser = f3;
|
|
22705
22825
|
this.testParser = y;
|
|
22706
|
-
this.exposureParser =
|
|
22826
|
+
this.exposureParser = b;
|
|
22707
22827
|
this.functionParser = D;
|
|
22708
22828
|
this.docParser = T;
|
|
22709
|
-
this.terminal =
|
|
22710
|
-
this.modelDepthParser =
|
|
22829
|
+
this.terminal = E;
|
|
22830
|
+
this.modelDepthParser = M;
|
|
22711
22831
|
this.deferConfig = c ?? this.getDefaultDeferConfig(), this.currentIntegration = this.createIntegration();
|
|
22712
22832
|
}
|
|
22713
22833
|
currentIntegration;
|
|
@@ -22724,7 +22844,7 @@ var init_dist3 = __esm(() => {
|
|
|
22724
22844
|
lastParsedManifest;
|
|
22725
22845
|
deferConfig;
|
|
22726
22846
|
createIntegration() {
|
|
22727
|
-
let e2 = this.dbtConfiguration.getDbtIntegration(), r2 = () => this.emit(
|
|
22847
|
+
let e2 = this.dbtConfiguration.getDbtIntegration(), r2 = () => this.emit(v.DIAGNOSTICS_CHANGED);
|
|
22728
22848
|
switch (e2) {
|
|
22729
22849
|
case "cloud":
|
|
22730
22850
|
return this.dbtCloudIntegrationFactory(this.projectRoot, this.projectConfigDiagnostics, this.deferConfig, r2);
|
|
@@ -22751,19 +22871,19 @@ var init_dist3 = __esm(() => {
|
|
|
22751
22871
|
getDefaultDeferConfig() {
|
|
22752
22872
|
switch (this.dbtConfiguration.getDbtIntegration()) {
|
|
22753
22873
|
case "cloud":
|
|
22754
|
-
return
|
|
22874
|
+
return L.createCloudDefaults();
|
|
22755
22875
|
case "fusion":
|
|
22756
|
-
return
|
|
22876
|
+
return L.createFusionDefaults();
|
|
22757
22877
|
case "corecommand":
|
|
22758
22878
|
default:
|
|
22759
|
-
return
|
|
22879
|
+
return L.createCoreDefaults();
|
|
22760
22880
|
}
|
|
22761
22881
|
}
|
|
22762
22882
|
async setSelectedTarget(e2) {
|
|
22763
22883
|
await this.currentIntegration.setSelectedTarget(e2), await this.currentIntegration.applySelectedTarget();
|
|
22764
22884
|
}
|
|
22765
22885
|
getDBTProjectFilePath() {
|
|
22766
|
-
return w__default.join(this.projectRoot,
|
|
22886
|
+
return w__default.join(this.projectRoot, j);
|
|
22767
22887
|
}
|
|
22768
22888
|
getTargetPath() {
|
|
22769
22889
|
return this.currentIntegration.getTargetPath();
|
|
@@ -22782,11 +22902,11 @@ var init_dist3 = __esm(() => {
|
|
|
22782
22902
|
}
|
|
22783
22903
|
getManifestPath() {
|
|
22784
22904
|
let e2 = this.getTargetPath();
|
|
22785
|
-
return e2 ? w__default.join(e2,
|
|
22905
|
+
return e2 ? w__default.join(e2, O) : undefined;
|
|
22786
22906
|
}
|
|
22787
22907
|
getCatalogPath() {
|
|
22788
22908
|
let e2 = this.getTargetPath();
|
|
22789
|
-
return e2 ? w__default.join(e2,
|
|
22909
|
+
return e2 ? w__default.join(e2, Et) : undefined;
|
|
22790
22910
|
}
|
|
22791
22911
|
getPythonBridgeStatus() {
|
|
22792
22912
|
return this.currentIntegration.getPythonBridgeStatus();
|
|
@@ -22795,10 +22915,10 @@ var init_dist3 = __esm(() => {
|
|
|
22795
22915
|
this.currentIntegration.getDiagnostics();
|
|
22796
22916
|
}
|
|
22797
22917
|
addProjectConfigDiagnostic(e2) {
|
|
22798
|
-
this.projectConfigDiagnostics.push(e2), this.emit(
|
|
22918
|
+
this.projectConfigDiagnostics.push(e2), this.emit(v.DIAGNOSTICS_CHANGED);
|
|
22799
22919
|
}
|
|
22800
22920
|
clearProjectConfigDiagnostics() {
|
|
22801
|
-
this.projectConfigDiagnostics.length = 0, this.emit(
|
|
22921
|
+
this.projectConfigDiagnostics.length = 0, this.emit(v.DIAGNOSTICS_CHANGED);
|
|
22802
22922
|
}
|
|
22803
22923
|
getAdapterType() {
|
|
22804
22924
|
return this.currentIntegration.getAdapterType() || "unknown";
|
|
@@ -22806,8 +22926,11 @@ var init_dist3 = __esm(() => {
|
|
|
22806
22926
|
getDBTVersion() {
|
|
22807
22927
|
return this.currentIntegration.getVersion();
|
|
22808
22928
|
}
|
|
22929
|
+
getCloudVariantInfo() {
|
|
22930
|
+
return this.currentIntegration instanceof q ? this.currentIntegration.getCloudVariantInfo() : null;
|
|
22931
|
+
}
|
|
22809
22932
|
async initialize() {
|
|
22810
|
-
await this.currentIntegration.initializeProject(), await this.refreshProjectConfig(), this.emit(
|
|
22933
|
+
await this.currentIntegration.initializeProject(), await this.refreshProjectConfig(), this.emit(v.PROJECT_CONFIG_CHANGED), await this.rebuildManifest(), this.startProjectConfigWatcher(), this.startSourceFilesWatcher(), this.startTargetWatchers();
|
|
22811
22934
|
}
|
|
22812
22935
|
async refreshProjectConfig() {
|
|
22813
22936
|
this.terminal.debug("DBTProjectIntegrationAdapter", `Going to refresh the project "${this.getProjectName()}" at ${this.projectRoot} configuration`);
|
|
@@ -22823,7 +22946,7 @@ var init_dist3 = __esm(() => {
|
|
|
22823
22946
|
e2 && r2 && n ? this.terminal.debug("DBTProjectIntegrationAdapter", `Project config refreshed successfully for "${this.getProjectName()}" at ${this.projectRoot}`, "targetPaths", this.getTargetPath(), "modelPaths", this.getModelPaths(), "seedPaths", this.getSeedPaths(), "macroPaths", this.getMacroPaths(), "packagesInstallPath", this.getPackageInstallPath(), "version", this.getDBTVersion(), "adapterType", this.getAdapterType()) : this.terminal.warn("DBTProjectIntegrationAdapter", "Could not complete project config refresh because project is not initialized properly. dbt path settings cannot be determined");
|
|
22824
22947
|
}
|
|
22825
22948
|
async rebuildManifest() {
|
|
22826
|
-
this.terminal.debug("DBTProjectIntegrationAdapter", `Going to rebuild the manifest for project at ${this.projectRoot}`), this.emit(
|
|
22949
|
+
this.terminal.debug("DBTProjectIntegrationAdapter", `Going to rebuild the manifest for project at ${this.projectRoot}`), this.emit(v.REBUILD_MANIFEST_STATUS_CHANGE, { inProgress: true });
|
|
22827
22950
|
let e2 = this.dbtConfiguration.getInstallDepsOnProjectInitialization();
|
|
22828
22951
|
if (!this.depsInitialized && e2)
|
|
22829
22952
|
try {
|
|
@@ -22836,7 +22959,7 @@ var init_dist3 = __esm(() => {
|
|
|
22836
22959
|
} catch (r2) {
|
|
22837
22960
|
throw this.terminal.error("DBTProjectIntegrationAdapter", "Error rebuilding manifest", r2), r2;
|
|
22838
22961
|
} finally {
|
|
22839
|
-
this.emit(
|
|
22962
|
+
this.emit(v.REBUILD_MANIFEST_STATUS_CHANGE, { inProgress: false });
|
|
22840
22963
|
}
|
|
22841
22964
|
}
|
|
22842
22965
|
async parseManifest() {
|
|
@@ -22849,16 +22972,16 @@ var init_dist3 = __esm(() => {
|
|
|
22849
22972
|
let r2 = this.readAndParseManifestFile(e2);
|
|
22850
22973
|
if (r2 === undefined)
|
|
22851
22974
|
return;
|
|
22852
|
-
let { nodes: n, sources: o, macros: a, semantic_models: i2, docs: s2, exposures: c, functions:
|
|
22853
|
-
return this.lastParsedManifest =
|
|
22975
|
+
let { nodes: n, sources: o, macros: a, semantic_models: i2, docs: s2, exposures: c, functions: l = {} } = r2, u = this.childrenParentParser.createChildrenParentMetaMap({ ...n, ...c, ...l }), m2 = this.nodeParser.createNodeMetaMap(n, this), g = this.macroParser.createMacroMetaMap(a, this), p = this.metricParser.createMetricMetaMap(i2, this), f3 = this.sourceParser.createSourceMetaMap(o, this), y = this.testParser.createTestMetaMap(n, this), b = this.exposureParser.createExposureMetaMap(c, this), D = this.functionParser.createFunctionMetaMap(l, this), T = this.docParser.createDocMetaMap(s2, this), [{ parentMetaMap: E, childMetaMap: M }, _, B, N, A2, nt, ot, jt, at] = await Promise.all([u, m2, g, p, f3, y, T, b, D]), Y = this.modelDepthParser.createModelDepthsMap(n, E, M), it = this.graphParser.createGraphMetaMap(this, E, M, _, A2, nt, at), S2 = { nodeMetaMap: _, macroMetaMap: B, metricMetaMap: N, sourceMetaMap: A2, graphMetaMap: it, testMetaMap: nt, docMetaMap: ot, exposureMetaMap: jt, functionMetaMap: at, modelDepthMap: Y };
|
|
22976
|
+
return this.lastParsedManifest = S2, this.emit(v.MANIFEST_PARSED, S2), this.terminal.debug("manifestParsed", "manifest succesfully parsed", S2), S2;
|
|
22854
22977
|
}
|
|
22855
22978
|
readAndParseManifestFile(e2) {
|
|
22856
22979
|
let r2 = [e2];
|
|
22857
22980
|
w__default.isAbsolute(e2) || r2.unshift(this.projectRoot);
|
|
22858
|
-
let n = w__default.join(...r2,
|
|
22981
|
+
let n = w__default.join(...r2, O);
|
|
22859
22982
|
this.terminal.debug("DBTProjectIntegrationAdapter", `Reading manifest at ${n} for project at ${this.projectRoot}`);
|
|
22860
22983
|
try {
|
|
22861
|
-
let o =
|
|
22984
|
+
let o = readFileSync4(n, "utf8"), a = JSON.parse(o);
|
|
22862
22985
|
return this.consecutiveReadFailures = 0, a;
|
|
22863
22986
|
} catch (o) {
|
|
22864
22987
|
this.consecutiveReadFailures++, this.consecutiveReadFailures > 3 && this.terminal.error("DBTProjectIntegrationAdapter", `Could not read/parse manifest file at ${n} after ${this.consecutiveReadFailures} attempts`, o);
|
|
@@ -22890,8 +23013,8 @@ var init_dist3 = __esm(() => {
|
|
|
22890
23013
|
}
|
|
22891
23014
|
this.currentSourcePaths = [...r2, ...n, ...o];
|
|
22892
23015
|
}
|
|
22893
|
-
let e2 =
|
|
22894
|
-
this.terminal.debug("DBTProjectIntegrationAdapter", `SourceFileChanged event fired for "${this.getProjectName()}" at ${this.projectRoot}`), this.emit(
|
|
23016
|
+
let e2 = ee(async () => {
|
|
23017
|
+
this.terminal.debug("DBTProjectIntegrationAdapter", `SourceFileChanged event fired for "${this.getProjectName()}" at ${this.projectRoot}`), this.emit(v.SOURCE_FILE_CHANGED);
|
|
22895
23018
|
try {
|
|
22896
23019
|
await this.rebuildManifest();
|
|
22897
23020
|
} catch (r2) {
|
|
@@ -22933,10 +23056,10 @@ var init_dist3 = __esm(() => {
|
|
|
22933
23056
|
let e2 = this.getDBTProjectFilePath();
|
|
22934
23057
|
this.terminal.debug("DBTProjectIntegrationAdapter", `Starting Node.js project config watcher for ${e2}`);
|
|
22935
23058
|
try {
|
|
22936
|
-
let r2 =
|
|
23059
|
+
let r2 = ee(async () => {
|
|
22937
23060
|
this.terminal.debug("DBTProjectIntegrationAdapter", "dbt_project.yml changed, refreshing project config");
|
|
22938
23061
|
try {
|
|
22939
|
-
await this.refreshProjectConfig(), this.emit(
|
|
23062
|
+
await this.refreshProjectConfig(), this.emit(v.PROJECT_CONFIG_CHANGED), await this.rebuildManifest();
|
|
22940
23063
|
} catch (n) {
|
|
22941
23064
|
this.terminal.error("DBTProjectIntegrationAdapter", "Error refreshing project config after file change", n);
|
|
22942
23065
|
}
|
|
@@ -23021,7 +23144,7 @@ var init_dist3 = __esm(() => {
|
|
|
23021
23144
|
}
|
|
23022
23145
|
async executeSQLWithLimitWithReturnImmediatelyParam(e2, r2, n, o) {
|
|
23023
23146
|
e2 = e2.replace(/;\s*$/, "");
|
|
23024
|
-
let a = /\bLIMIT\s+(\d+)\s
|
|
23147
|
+
let a = /\bLIMIT\s+(\d+)\s*(?:;?\s*(?:--[^\n]*)?\s*)$/i, i2 = e2.match(a);
|
|
23025
23148
|
if (i2) {
|
|
23026
23149
|
let c = parseInt(i2[1], 10);
|
|
23027
23150
|
c > 0 && (n = c), e2 = e2.replace(a, "").trim();
|
|
@@ -23030,12 +23153,12 @@ var init_dist3 = __esm(() => {
|
|
|
23030
23153
|
throw new Error("Limit must be greater than 0");
|
|
23031
23154
|
let s2 = await this.currentIntegration.executeSQL(e2, n, r2);
|
|
23032
23155
|
if (o) {
|
|
23033
|
-
let c = await s2.executeQuery(),
|
|
23034
|
-
for (let
|
|
23035
|
-
c.table.rows[
|
|
23036
|
-
|
|
23156
|
+
let c = await s2.executeQuery(), l = [];
|
|
23157
|
+
for (let u = 0;u < c.table.rows.length; u++)
|
|
23158
|
+
c.table.rows[u].forEach((m2, g) => {
|
|
23159
|
+
l[u] = { ...l[u], [c.table.column_names[g]]: m2 };
|
|
23037
23160
|
});
|
|
23038
|
-
return { columnNames: c.table.column_names, columnTypes: c.table.column_types, data:
|
|
23161
|
+
return { columnNames: c.table.column_names, columnTypes: c.table.column_types, data: l, rawSql: e2, compiledSql: c.compiled_sql };
|
|
23039
23162
|
}
|
|
23040
23163
|
return s2;
|
|
23041
23164
|
}
|
|
@@ -23074,14 +23197,14 @@ var init_dist3 = __esm(() => {
|
|
|
23074
23197
|
if (!c || s2[c])
|
|
23075
23198
|
continue;
|
|
23076
23199
|
s2[c] = true;
|
|
23077
|
-
let
|
|
23078
|
-
if (
|
|
23079
|
-
for (let
|
|
23080
|
-
if (
|
|
23081
|
-
a.add(
|
|
23200
|
+
let l = o.get(c);
|
|
23201
|
+
if (l)
|
|
23202
|
+
for (let u of l.nodes) {
|
|
23203
|
+
if (u.key.split(".")[0] !== F2) {
|
|
23204
|
+
a.add(u.key);
|
|
23082
23205
|
continue;
|
|
23083
23206
|
}
|
|
23084
|
-
r2.lookupByUniqueId(
|
|
23207
|
+
r2.lookupByUniqueId(u.key)?.config.materialized === "ephemeral" ? i2.push(u.key) : a.add(u.key);
|
|
23085
23208
|
}
|
|
23086
23209
|
}
|
|
23087
23210
|
return Array.from(a);
|
|
@@ -23102,30 +23225,30 @@ var init_dist3 = __esm(() => {
|
|
|
23102
23225
|
if (!s2)
|
|
23103
23226
|
throw Error("graphMetaMap[" + e2 + "] has no entries for " + r2);
|
|
23104
23227
|
let c = new Map;
|
|
23105
|
-
return s2.nodes.forEach(({ url:
|
|
23106
|
-
let
|
|
23107
|
-
|
|
23108
|
-
}), Array.from(c.values()).sort((
|
|
23228
|
+
return s2.nodes.forEach(({ url: l, key: u }) => {
|
|
23229
|
+
let m2 = this.createTable(l, u);
|
|
23230
|
+
m2 && (c.has(m2.table) || c.set(m2.table, m2));
|
|
23231
|
+
}), Array.from(c.values()).sort((l, u) => l.table.localeCompare(u.table));
|
|
23109
23232
|
}
|
|
23110
23233
|
createTable(e2, r2) {
|
|
23111
23234
|
if (!this.lastParsedManifest)
|
|
23112
23235
|
throw new Error("The dbt manifest is not available");
|
|
23113
23236
|
let n = r2.split("."), o = n[0], { graphMetaMap: a, testMetaMap: i2 } = this.lastParsedManifest, s2 = this.getConnectedNodeCount(a.children, r2), c = this.getConnectedNodeCount(a.parents, r2);
|
|
23114
|
-
if (o ===
|
|
23115
|
-
let { sourceMetaMap:
|
|
23237
|
+
if (o === k) {
|
|
23238
|
+
let { sourceMetaMap: l } = this.lastParsedManifest, u = n[2], m2 = n[3], g = l.get(u);
|
|
23116
23239
|
if (!g)
|
|
23117
23240
|
return;
|
|
23118
|
-
let p = g.tables.find((f3) => f3.name ===
|
|
23119
|
-
return p ? { table: r2, label:
|
|
23241
|
+
let p = g.tables.find((f3) => f3.name === m2);
|
|
23242
|
+
return p ? { table: r2, label: m2, url: e2, upstreamCount: s2, downstreamCount: c, nodeType: o, isExternalProject: g.is_external_project, tests: (a.tests.get(r2)?.nodes || []).map((f3) => {
|
|
23120
23243
|
let y = f3.label.split(".")[0];
|
|
23121
23244
|
return { ...i2.get(y), key: y };
|
|
23122
23245
|
}), columns: p.columns, description: p?.description } : undefined;
|
|
23123
23246
|
} else {
|
|
23124
|
-
let { nodeMetaMap:
|
|
23125
|
-
return
|
|
23126
|
-
let g =
|
|
23247
|
+
let { nodeMetaMap: l } = this.lastParsedManifest, u = l.lookupByUniqueId(r2);
|
|
23248
|
+
return u ? { table: r2, label: u.name, url: e2, upstreamCount: s2, downstreamCount: c, nodeType: o, isExternalProject: u.package_name !== this.getProjectName(), tests: (a.tests.get(r2)?.nodes || []).map((m2) => {
|
|
23249
|
+
let g = m2.label.split(".")[0];
|
|
23127
23250
|
return { ...i2.get(g), key: g };
|
|
23128
|
-
}), columns:
|
|
23251
|
+
}), columns: u.columns, description: u?.description } : undefined;
|
|
23129
23252
|
}
|
|
23130
23253
|
}
|
|
23131
23254
|
getConnectedNodeCount(e2, r2) {
|
|
@@ -23193,13 +23316,13 @@ var init_dist3 = __esm(() => {
|
|
|
23193
23316
|
}
|
|
23194
23317
|
createTargetFolderWatcher(e2) {
|
|
23195
23318
|
try {
|
|
23196
|
-
let r2 =
|
|
23319
|
+
let r2 = ee(async () => {
|
|
23197
23320
|
try {
|
|
23198
23321
|
await this.parseManifest();
|
|
23199
23322
|
} catch (a) {
|
|
23200
23323
|
this.terminal.warn("DBTProjectIntegrationAdapter", `Failed to parse manifest after file change in ${e2}`, false, { error: a });
|
|
23201
23324
|
}
|
|
23202
|
-
}, 300), n = w__default.join(e2,
|
|
23325
|
+
}, 300), n = w__default.join(e2, ct), o = watch2(e2, { recursive: false }, (a, i2) => {
|
|
23203
23326
|
this.handleTargetFileChange(a, i2, e2, n, r2);
|
|
23204
23327
|
});
|
|
23205
23328
|
return this.terminal.debug("DBTProjectIntegrationAdapter", `Started Node.js target folder watcher for ${e2}`), o;
|
|
@@ -23209,9 +23332,9 @@ var init_dist3 = __esm(() => {
|
|
|
23209
23332
|
}
|
|
23210
23333
|
handleTargetFileChange(e2, r2, n, o, a) {
|
|
23211
23334
|
if (r2) {
|
|
23212
|
-
if (r2 ===
|
|
23335
|
+
if (r2 === O)
|
|
23213
23336
|
this.terminal.debug("DBTProjectIntegrationAdapter", `Target folder ${e2} detected: ${r2} in ${n}`), a();
|
|
23214
|
-
else if (r2 ===
|
|
23337
|
+
else if (r2 === ct) {
|
|
23215
23338
|
this.terminal.debug("DBTProjectIntegrationAdapter", `Target folder ${e2} detected: ${r2} in ${n}`);
|
|
23216
23339
|
try {
|
|
23217
23340
|
this.parseRunResultsFile(o);
|
|
@@ -23223,19 +23346,19 @@ var init_dist3 = __esm(() => {
|
|
|
23223
23346
|
}
|
|
23224
23347
|
parseRunResultsFile(e2) {
|
|
23225
23348
|
try {
|
|
23226
|
-
if (!
|
|
23349
|
+
if (!existsSync6(e2))
|
|
23227
23350
|
return this.terminal.trace(`Run results file does not exist at ${e2}`), null;
|
|
23228
|
-
let r2 =
|
|
23351
|
+
let r2 = readFileSync4(e2, "utf8").toString();
|
|
23229
23352
|
if (!r2)
|
|
23230
23353
|
return null;
|
|
23231
23354
|
let n = JSON.parse(r2), o = this.buildRunResultsEvent(n);
|
|
23232
|
-
return this.emit(
|
|
23355
|
+
return this.emit(v.RUN_RESULTS_PARSED, o), this.terminal.debug("runResultsParsed", "Run results successfully parsed", o), o;
|
|
23233
23356
|
} catch (r2) {
|
|
23234
23357
|
return this.terminal.error("DBTProjectIntegrationAdapter", `Unable to parse run_results.json: ${r2.message}`, r2), null;
|
|
23235
23358
|
}
|
|
23236
23359
|
}
|
|
23237
23360
|
buildRunResultsEvent(e2) {
|
|
23238
|
-
let r2 = new
|
|
23361
|
+
let r2 = new Pt, n = this.getProjectName();
|
|
23239
23362
|
return r2.parse(e2, n);
|
|
23240
23363
|
}
|
|
23241
23364
|
disposeTargetWatchers() {
|
|
@@ -23254,6 +23377,7 @@ var init_dist3 = __esm(() => {
|
|
|
23254
23377
|
return this.currentIntegration;
|
|
23255
23378
|
}
|
|
23256
23379
|
};
|
|
23380
|
+
Pr = [F2, z, dt, K];
|
|
23257
23381
|
});
|
|
23258
23382
|
|
|
23259
23383
|
// src/adapter.ts
|
|
@@ -23265,16 +23389,16 @@ __export(exports_adapter, {
|
|
|
23265
23389
|
});
|
|
23266
23390
|
function configuration(cfg) {
|
|
23267
23391
|
return {
|
|
23268
|
-
getDbtCustomRunnerImport: () =>
|
|
23269
|
-
getDbtIntegration: () => cfg.dbtIntegration ??
|
|
23270
|
-
getRunModelCommandAdditionalParams: () =>
|
|
23271
|
-
getBuildModelCommandAdditionalParams: () =>
|
|
23272
|
-
getTestModelCommandAdditionalParams: () =>
|
|
23273
|
-
getQueryTemplate: () =>
|
|
23274
|
-
getQueryLimit: () => cfg.queryLimit ??
|
|
23275
|
-
getEnableNotebooks: () =>
|
|
23276
|
-
getDisableQueryHistory: () =>
|
|
23277
|
-
getInstallDepsOnProjectInitialization: () =>
|
|
23392
|
+
getDbtCustomRunnerImport: () => nr.dbtCustomRunnerImport,
|
|
23393
|
+
getDbtIntegration: () => cfg.dbtIntegration ?? nr.dbtIntegration,
|
|
23394
|
+
getRunModelCommandAdditionalParams: () => nr.runModelCommandAdditionalParams,
|
|
23395
|
+
getBuildModelCommandAdditionalParams: () => nr.buildModelCommandAdditionalParams,
|
|
23396
|
+
getTestModelCommandAdditionalParams: () => nr.testModelCommandAdditionalParams,
|
|
23397
|
+
getQueryTemplate: () => nr.queryTemplate,
|
|
23398
|
+
getQueryLimit: () => cfg.queryLimit ?? nr.queryLimit,
|
|
23399
|
+
getEnableNotebooks: () => nr.enableNotebooks,
|
|
23400
|
+
getDisableQueryHistory: () => nr.disableQueryHistory,
|
|
23401
|
+
getInstallDepsOnProjectInitialization: () => nr.installDepsOnProjectInitialization,
|
|
23278
23402
|
getDisableDepthsCalculation: () => true,
|
|
23279
23403
|
getWorkingDirectory: () => cfg.projectRoot,
|
|
23280
23404
|
getAltimateUrl: () => "",
|
|
@@ -23312,23 +23436,24 @@ function env(cfg) {
|
|
|
23312
23436
|
async function create(cfg) {
|
|
23313
23437
|
const config = configuration(cfg);
|
|
23314
23438
|
const term = terminal();
|
|
23315
|
-
const factory = new
|
|
23316
|
-
const http3 = new
|
|
23317
|
-
const client = new
|
|
23439
|
+
const factory = new It(config);
|
|
23440
|
+
const http3 = new Kt(term, config);
|
|
23441
|
+
const client = new Zt(http3, term);
|
|
23318
23442
|
const runtime = env(cfg);
|
|
23319
23443
|
const provider = {
|
|
23320
23444
|
getCurrentEnvironment: () => runtime,
|
|
23321
23445
|
onEnvironmentChanged: () => () => {}
|
|
23322
23446
|
};
|
|
23323
|
-
const exec = new
|
|
23324
|
-
const infra = new
|
|
23325
|
-
const python3 = new
|
|
23326
|
-
const cli = (cwd, path) => new
|
|
23327
|
-
const core = (root, diag, defer, changed) => new
|
|
23328
|
-
const
|
|
23329
|
-
const
|
|
23330
|
-
const
|
|
23331
|
-
const
|
|
23447
|
+
const exec = new Xt(term);
|
|
23448
|
+
const infra = new Bt(runtime, term);
|
|
23449
|
+
const python3 = new St(exec, runtime, term, config);
|
|
23450
|
+
const cli = (cwd, path) => new Rt(exec, runtime, term, cwd, path);
|
|
23451
|
+
const core = (root, diag, defer, changed) => new et(infra, runtime, provider, python3, cli, term, config, client, root, diag, defer, changed);
|
|
23452
|
+
const cloudVariantDetector = new Ut(term);
|
|
23453
|
+
const cloud = (root, diag, defer, changed) => new q(infra, factory, cli, runtime, provider, term, root, diag, defer, changed, cloudVariantDetector);
|
|
23454
|
+
const command = (root, diag, defer, changed) => new Wt(infra, runtime, provider, python3, cli, term, config, client, root, diag, defer, changed);
|
|
23455
|
+
const fusion = (root, diag, defer, changed) => new Yt(infra, factory, cli, runtime, provider, term, root, diag, defer, changed, cloudVariantDetector);
|
|
23456
|
+
const adapter = new re(config, factory, core, cloud, fusion, command, cfg.projectRoot, undefined, new ne, new ue(term), new ce(term), new de(term), new se(term), new me(term), new pe(term), new ae(term), new ie(term), new oe(term), term, new le(term, client, config));
|
|
23332
23457
|
await adapter.initialize();
|
|
23333
23458
|
return adapter;
|
|
23334
23459
|
}
|
|
@@ -23598,7 +23723,7 @@ function flag6(args, name) {
|
|
|
23598
23723
|
|
|
23599
23724
|
// src/index.ts
|
|
23600
23725
|
import { join as join8, resolve as resolve4 } from "path";
|
|
23601
|
-
import { existsSync as
|
|
23726
|
+
import { existsSync as existsSync7 } from "fs";
|
|
23602
23727
|
|
|
23603
23728
|
// src/config.ts
|
|
23604
23729
|
import { homedir } from "os";
|
|
@@ -23826,7 +23951,7 @@ async function main() {
|
|
|
23826
23951
|
cfg.projectRoot = resolve4(dirFlag);
|
|
23827
23952
|
} else {
|
|
23828
23953
|
const cwdProject = join8(process.cwd(), "dbt_project.yml");
|
|
23829
|
-
if (
|
|
23954
|
+
if (existsSync7(cwdProject) && resolve4(process.cwd()) !== resolve4(cfg.projectRoot)) {
|
|
23830
23955
|
cfg.projectRoot = resolve4(process.cwd());
|
|
23831
23956
|
}
|
|
23832
23957
|
}
|