@dataform/core 2.6.0 → 2.6.2

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.
Files changed (2) hide show
  1. package/bundle.js +182 -20
  2. package/package.json +3 -3
package/bundle.js CHANGED
@@ -4002,6 +4002,12 @@ const dataform = $root.dataform = (() => {
4002
4002
  if (object.displayName != null)
4003
4003
  message.displayName = String(object.displayName);
4004
4004
  switch (object.dimensionType) {
4005
+ default:
4006
+ if (typeof object.dimensionType === "number") {
4007
+ message.dimensionType = object.dimensionType;
4008
+ break;
4009
+ }
4010
+ break;
4005
4011
  case "UNKNOWN_DIMENSION":
4006
4012
  case 0:
4007
4013
  message.dimensionType = 0;
@@ -4020,6 +4026,12 @@ const dataform = $root.dataform = (() => {
4020
4026
  break;
4021
4027
  }
4022
4028
  switch (object.aggregation) {
4029
+ default:
4030
+ if (typeof object.aggregation === "number") {
4031
+ message.aggregation = object.aggregation;
4032
+ break;
4033
+ }
4034
+ break;
4023
4035
  case "UNKNOWN_AGGREGATION":
4024
4036
  case 0:
4025
4037
  message.aggregation = 0;
@@ -4091,9 +4103,9 @@ const dataform = $root.dataform = (() => {
4091
4103
  if (message.displayName != null && message.hasOwnProperty("displayName"))
4092
4104
  object.displayName = message.displayName;
4093
4105
  if (message.dimensionType != null && message.hasOwnProperty("dimensionType"))
4094
- object.dimensionType = options.enums === String ? $root.dataform.ColumnDescriptor.DimensionType[message.dimensionType] : message.dimensionType;
4106
+ object.dimensionType = options.enums === String ? $root.dataform.ColumnDescriptor.DimensionType[message.dimensionType] === undefined ? message.dimensionType : $root.dataform.ColumnDescriptor.DimensionType[message.dimensionType] : message.dimensionType;
4095
4107
  if (message.aggregation != null && message.hasOwnProperty("aggregation"))
4096
- object.aggregation = options.enums === String ? $root.dataform.ColumnDescriptor.Aggregation[message.aggregation] : message.aggregation;
4108
+ object.aggregation = options.enums === String ? $root.dataform.ColumnDescriptor.Aggregation[message.aggregation] === undefined ? message.aggregation : $root.dataform.ColumnDescriptor.Aggregation[message.aggregation] : message.aggregation;
4097
4109
  if (message.expression != null && message.hasOwnProperty("expression"))
4098
4110
  object.expression = message.expression;
4099
4111
  if (message.tags && message.tags.length) {
@@ -4884,6 +4896,12 @@ const dataform = $root.dataform = (() => {
4884
4896
  }
4885
4897
  }
4886
4898
  switch (object.hermeticity) {
4899
+ default:
4900
+ if (typeof object.hermeticity === "number") {
4901
+ message.hermeticity = object.hermeticity;
4902
+ break;
4903
+ }
4904
+ break;
4887
4905
  case "UNKNOWN":
4888
4906
  case 0:
4889
4907
  message.hermeticity = 0;
@@ -4908,6 +4926,12 @@ const dataform = $root.dataform = (() => {
4908
4926
  if (object.materialized != null)
4909
4927
  message.materialized = Boolean(object.materialized);
4910
4928
  switch (object.enumType) {
4929
+ default:
4930
+ if (typeof object.enumType === "number") {
4931
+ message.enumType = object.enumType;
4932
+ break;
4933
+ }
4934
+ break;
4911
4935
  case "UNKNOWN_TYPE":
4912
4936
  case 0:
4913
4937
  message.enumType = 0;
@@ -5112,7 +5136,7 @@ const dataform = $root.dataform = (() => {
5112
5136
  object.uniqueKey[j] = message.uniqueKey[j];
5113
5137
  }
5114
5138
  if (message.hermeticity != null && message.hasOwnProperty("hermeticity"))
5115
- object.hermeticity = options.enums === String ? $root.dataform.ActionHermeticity[message.hermeticity] : message.hermeticity;
5139
+ object.hermeticity = options.enums === String ? $root.dataform.ActionHermeticity[message.hermeticity] === undefined ? message.hermeticity : $root.dataform.ActionHermeticity[message.hermeticity] : message.hermeticity;
5116
5140
  if (message.canonicalTarget != null && message.hasOwnProperty("canonicalTarget"))
5117
5141
  object.canonicalTarget = $root.dataform.Target.toObject(message.canonicalTarget, options);
5118
5142
  if (message.snowflake != null && message.hasOwnProperty("snowflake"))
@@ -5122,7 +5146,7 @@ const dataform = $root.dataform = (() => {
5122
5146
  if (message.materialized != null && message.hasOwnProperty("materialized"))
5123
5147
  object.materialized = message.materialized;
5124
5148
  if (message.enumType != null && message.hasOwnProperty("enumType"))
5125
- object.enumType = options.enums === String ? $root.dataform.TableType[message.enumType] : message.enumType;
5149
+ object.enumType = options.enums === String ? $root.dataform.TableType[message.enumType] === undefined ? message.enumType : $root.dataform.TableType[message.enumType] : message.enumType;
5126
5150
  return object;
5127
5151
  };
5128
5152
 
@@ -5525,6 +5549,12 @@ const dataform = $root.dataform = (() => {
5525
5549
  }
5526
5550
  }
5527
5551
  switch (object.hermeticity) {
5552
+ default:
5553
+ if (typeof object.hermeticity === "number") {
5554
+ message.hermeticity = object.hermeticity;
5555
+ break;
5556
+ }
5557
+ break;
5528
5558
  case "UNKNOWN":
5529
5559
  case 0:
5530
5560
  message.hermeticity = 0;
@@ -5617,7 +5647,7 @@ const dataform = $root.dataform = (() => {
5617
5647
  object.dependencyTargets[j] = $root.dataform.Target.toObject(message.dependencyTargets[j], options);
5618
5648
  }
5619
5649
  if (message.hermeticity != null && message.hasOwnProperty("hermeticity"))
5620
- object.hermeticity = options.enums === String ? $root.dataform.ActionHermeticity[message.hermeticity] : message.hermeticity;
5650
+ object.hermeticity = options.enums === String ? $root.dataform.ActionHermeticity[message.hermeticity] === undefined ? message.hermeticity : $root.dataform.ActionHermeticity[message.hermeticity] : message.hermeticity;
5621
5651
  if (message.canonicalTarget != null && message.hasOwnProperty("canonicalTarget"))
5622
5652
  object.canonicalTarget = $root.dataform.Target.toObject(message.canonicalTarget, options);
5623
5653
  if (message.disabled != null && message.hasOwnProperty("disabled"))
@@ -6018,6 +6048,12 @@ const dataform = $root.dataform = (() => {
6018
6048
  }
6019
6049
  }
6020
6050
  switch (object.hermeticity) {
6051
+ default:
6052
+ if (typeof object.hermeticity === "number") {
6053
+ message.hermeticity = object.hermeticity;
6054
+ break;
6055
+ }
6056
+ break;
6021
6057
  case "UNKNOWN":
6022
6058
  case 0:
6023
6059
  message.hermeticity = 0;
@@ -6103,7 +6139,7 @@ const dataform = $root.dataform = (() => {
6103
6139
  object.dependencyTargets[j] = $root.dataform.Target.toObject(message.dependencyTargets[j], options);
6104
6140
  }
6105
6141
  if (message.hermeticity != null && message.hasOwnProperty("hermeticity"))
6106
- object.hermeticity = options.enums === String ? $root.dataform.ActionHermeticity[message.hermeticity] : message.hermeticity;
6142
+ object.hermeticity = options.enums === String ? $root.dataform.ActionHermeticity[message.hermeticity] === undefined ? message.hermeticity : $root.dataform.ActionHermeticity[message.hermeticity] : message.hermeticity;
6107
6143
  if (message.canonicalTarget != null && message.hasOwnProperty("canonicalTarget"))
6108
6144
  object.canonicalTarget = $root.dataform.Target.toObject(message.canonicalTarget, options);
6109
6145
  if (message.disabled != null && message.hasOwnProperty("disabled"))
@@ -8781,6 +8817,12 @@ const dataform = $root.dataform = (() => {
8781
8817
  return object;
8782
8818
  let message = new $root.dataform.QueryEvaluation();
8783
8819
  switch (object.status) {
8820
+ default:
8821
+ if (typeof object.status === "number") {
8822
+ message.status = object.status;
8823
+ break;
8824
+ }
8825
+ break;
8784
8826
  case "SUCCESS":
8785
8827
  case 0:
8786
8828
  message.status = 0;
@@ -8822,7 +8864,7 @@ const dataform = $root.dataform = (() => {
8822
8864
  object.query = "";
8823
8865
  }
8824
8866
  if (message.status != null && message.hasOwnProperty("status"))
8825
- object.status = options.enums === String ? $root.dataform.QueryEvaluation.QueryEvaluationStatus[message.status] : message.status;
8867
+ object.status = options.enums === String ? $root.dataform.QueryEvaluation.QueryEvaluationStatus[message.status] === undefined ? message.status : $root.dataform.QueryEvaluation.QueryEvaluationStatus[message.status] : message.status;
8826
8868
  if (message.error != null && message.hasOwnProperty("error"))
8827
8869
  object.error = $root.dataform.QueryEvaluationError.toObject(message.error, options);
8828
8870
  if (message.incremental != null && message.hasOwnProperty("incremental"))
@@ -9828,6 +9870,12 @@ const dataform = $root.dataform = (() => {
9828
9870
  }
9829
9871
  }
9830
9872
  switch (object.hermeticity) {
9873
+ default:
9874
+ if (typeof object.hermeticity === "number") {
9875
+ message.hermeticity = object.hermeticity;
9876
+ break;
9877
+ }
9878
+ break;
9831
9879
  case "UNKNOWN":
9832
9880
  case 0:
9833
9881
  message.hermeticity = 0;
@@ -9900,7 +9948,7 @@ const dataform = $root.dataform = (() => {
9900
9948
  if (message.actionDescriptor != null && message.hasOwnProperty("actionDescriptor"))
9901
9949
  object.actionDescriptor = $root.dataform.ActionDescriptor.toObject(message.actionDescriptor, options);
9902
9950
  if (message.hermeticity != null && message.hasOwnProperty("hermeticity"))
9903
- object.hermeticity = options.enums === String ? $root.dataform.ActionHermeticity[message.hermeticity] : message.hermeticity;
9951
+ object.hermeticity = options.enums === String ? $root.dataform.ActionHermeticity[message.hermeticity] === undefined ? message.hermeticity : $root.dataform.ActionHermeticity[message.hermeticity] : message.hermeticity;
9904
9952
  if (message.dependencyTargets && message.dependencyTargets.length) {
9905
9953
  object.dependencyTargets = [];
9906
9954
  for (let j = 0; j < message.dependencyTargets.length; ++j)
@@ -10971,6 +11019,12 @@ const dataform = $root.dataform = (() => {
10971
11019
  return object;
10972
11020
  let message = new $root.dataform.RunResult();
10973
11021
  switch (object.status) {
11022
+ default:
11023
+ if (typeof object.status === "number") {
11024
+ message.status = object.status;
11025
+ break;
11026
+ }
11027
+ break;
10974
11028
  case "UNKNOWN":
10975
11029
  case 0:
10976
11030
  message.status = 0;
@@ -11034,7 +11088,7 @@ const dataform = $root.dataform = (() => {
11034
11088
  object.timing = null;
11035
11089
  }
11036
11090
  if (message.status != null && message.hasOwnProperty("status"))
11037
- object.status = options.enums === String ? $root.dataform.RunResult.ExecutionStatus[message.status] : message.status;
11091
+ object.status = options.enums === String ? $root.dataform.RunResult.ExecutionStatus[message.status] === undefined ? message.status : $root.dataform.RunResult.ExecutionStatus[message.status] : message.status;
11038
11092
  if (message.actions && message.actions.length) {
11039
11093
  object.actions = [];
11040
11094
  for (let j = 0; j < message.actions.length; ++j)
@@ -11329,6 +11383,12 @@ const dataform = $root.dataform = (() => {
11329
11383
  message.target = $root.dataform.Target.fromObject(object.target);
11330
11384
  }
11331
11385
  switch (object.status) {
11386
+ default:
11387
+ if (typeof object.status === "number") {
11388
+ message.status = object.status;
11389
+ break;
11390
+ }
11391
+ break;
11332
11392
  case "UNKNOWN":
11333
11393
  case 0:
11334
11394
  message.status = 0;
@@ -11397,7 +11457,7 @@ const dataform = $root.dataform = (() => {
11397
11457
  object.target = null;
11398
11458
  }
11399
11459
  if (message.status != null && message.hasOwnProperty("status"))
11400
- object.status = options.enums === String ? $root.dataform.ActionResult.ExecutionStatus[message.status] : message.status;
11460
+ object.status = options.enums === String ? $root.dataform.ActionResult.ExecutionStatus[message.status] === undefined ? message.status : $root.dataform.ActionResult.ExecutionStatus[message.status] : message.status;
11401
11461
  if (message.tasks && message.tasks.length) {
11402
11462
  object.tasks = [];
11403
11463
  for (let j = 0; j < message.tasks.length; ++j)
@@ -12158,6 +12218,12 @@ const dataform = $root.dataform = (() => {
12158
12218
  return object;
12159
12219
  let message = new $root.dataform.TaskResult();
12160
12220
  switch (object.status) {
12221
+ default:
12222
+ if (typeof object.status === "number") {
12223
+ message.status = object.status;
12224
+ break;
12225
+ }
12226
+ break;
12161
12227
  case "UNKNOWN":
12162
12228
  case 0:
12163
12229
  message.status = 0;
@@ -12218,7 +12284,7 @@ const dataform = $root.dataform = (() => {
12218
12284
  object.metadata = null;
12219
12285
  }
12220
12286
  if (message.status != null && message.hasOwnProperty("status"))
12221
- object.status = options.enums === String ? $root.dataform.TaskResult.ExecutionStatus[message.status] : message.status;
12287
+ object.status = options.enums === String ? $root.dataform.TaskResult.ExecutionStatus[message.status] === undefined ? message.status : $root.dataform.TaskResult.ExecutionStatus[message.status] : message.status;
12222
12288
  if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
12223
12289
  object.errorMessage = message.errorMessage;
12224
12290
  if (message.timing != null && message.hasOwnProperty("timing"))
@@ -12837,6 +12903,10 @@ const dataform = $root.dataform = (() => {
12837
12903
  for (let i = 0; i < object.flags.length; ++i)
12838
12904
  switch (object.flags[i]) {
12839
12905
  default:
12906
+ if (typeof object.flags[i] === "number") {
12907
+ message.flags[i] = object.flags[i];
12908
+ break;
12909
+ }
12840
12910
  case "UNKNOWN_FLAG":
12841
12911
  case 0:
12842
12912
  message.flags[i] = 0;
@@ -12848,6 +12918,12 @@ const dataform = $root.dataform = (() => {
12848
12918
  }
12849
12919
  }
12850
12920
  switch (object.primitive) {
12921
+ default:
12922
+ if (typeof object.primitive === "number") {
12923
+ message.primitive = object.primitive;
12924
+ break;
12925
+ }
12926
+ break;
12851
12927
  case "UNKNOWN":
12852
12928
  case 0:
12853
12929
  message.primitive = 0;
@@ -12942,10 +13018,10 @@ const dataform = $root.dataform = (() => {
12942
13018
  if (message.flags && message.flags.length) {
12943
13019
  object.flags = [];
12944
13020
  for (let j = 0; j < message.flags.length; ++j)
12945
- object.flags[j] = options.enums === String ? $root.dataform.Field.Flag[message.flags[j]] : message.flags[j];
13021
+ object.flags[j] = options.enums === String ? $root.dataform.Field.Flag[message.flags[j]] === undefined ? message.flags[j] : $root.dataform.Field.Flag[message.flags[j]] : message.flags[j];
12946
13022
  }
12947
13023
  if (message.primitive != null && message.hasOwnProperty("primitive")) {
12948
- object.primitive = options.enums === String ? $root.dataform.Field.Primitive[message.primitive] : message.primitive;
13024
+ object.primitive = options.enums === String ? $root.dataform.Field.Primitive[message.primitive] === undefined ? message.primitive : $root.dataform.Field.Primitive[message.primitive] : message.primitive;
12949
13025
  if (options.oneofs)
12950
13026
  object.type = "primitive";
12951
13027
  }
@@ -13564,6 +13640,12 @@ const dataform = $root.dataform = (() => {
13564
13640
  message.target = $root.dataform.Target.fromObject(object.target);
13565
13641
  }
13566
13642
  switch (object.type) {
13643
+ default:
13644
+ if (typeof object.type === "number") {
13645
+ message.type = object.type;
13646
+ break;
13647
+ }
13648
+ break;
13567
13649
  case "UNKNOWN":
13568
13650
  case 0:
13569
13651
  message.type = 0;
@@ -13652,7 +13734,7 @@ const dataform = $root.dataform = (() => {
13652
13734
  if (message.description != null && message.hasOwnProperty("description"))
13653
13735
  object.description = message.description;
13654
13736
  if (message.type != null && message.hasOwnProperty("type"))
13655
- object.type = options.enums === String ? $root.dataform.TableMetadata.Type[message.type] : message.type;
13737
+ object.type = options.enums === String ? $root.dataform.TableMetadata.Type[message.type] === undefined ? message.type : $root.dataform.TableMetadata.Type[message.type] : message.type;
13656
13738
  let keys2;
13657
13739
  if (message.labels && (keys2 = Object.keys(message.labels)).length) {
13658
13740
  object.labels = {};
@@ -18109,7 +18191,9 @@ const LEXER_STATE_NAMES = {
18109
18191
  JS_TEMPLATE_STRING: "jsTemplateString",
18110
18192
  INNER_SQL_BLOCK: "innerSqlBlock",
18111
18193
  SQL_SINGLE_QUOTE_STRING: "innerSingleQuote",
18112
- SQL_DOUBLE_QUOTE_STRING: "innerDoubleQuote"
18194
+ SQL_DOUBLE_QUOTE_STRING: "innerDoubleQuote",
18195
+ SQL_TRIPLE_SINGLE_QUOTE_STRING: "innerTripleSingleQuote",
18196
+ SQL_TRIPLE_DOUBLE_QUOTE_STRING: "innerTripleDoubleQuote"
18113
18197
  };
18114
18198
  const SQL_LEXER_TOKEN_NAMES = {
18115
18199
  START_CONFIG: LEXER_STATE_NAMES.SQL + "_startConfig",
@@ -18123,8 +18207,10 @@ const SQL_LEXER_TOKEN_NAMES = {
18123
18207
  MULTI_LINE_COMMENT: LEXER_STATE_NAMES.SQL + "_multiLineComment",
18124
18208
  START_JS_PLACEHOLDER: LEXER_STATE_NAMES.SQL + "_startJsPlaceholder",
18125
18209
  BACKTICK: LEXER_STATE_NAMES.SQL + "_backtick",
18126
- START_QUOTE_SINGLE: LEXER_STATE_NAMES.INNER_SQL_BLOCK + "_startQuoteSingle",
18127
- START_QUOTE_DOUBLE: LEXER_STATE_NAMES.INNER_SQL_BLOCK + "_startQuoteDouble",
18210
+ START_QUOTE_SINGLE: LEXER_STATE_NAMES.SQL + "_startQuoteSingle",
18211
+ START_QUOTE_DOUBLE: LEXER_STATE_NAMES.SQL + "_startQuoteDouble",
18212
+ START_TRIPLE_QUOTE_SINGLE: LEXER_STATE_NAMES.SQL + "_startTripleQuoteSingle",
18213
+ START_TRIPLE_QUOTE_DOUBLE: LEXER_STATE_NAMES.SQL + "_startTripleQuoteDouble",
18128
18214
  CAPTURE_EVERYTHING_ELSE: LEXER_STATE_NAMES.SQL + "_captureEverythingElse"
18129
18215
  };
18130
18216
  const JS_BLOCK_LEXER_TOKEN_NAMES = {
@@ -18153,6 +18239,8 @@ const INNER_SQL_BLOCK_LEXER_TOKEN_NAMES = {
18153
18239
  BACKTICK: LEXER_STATE_NAMES.INNER_SQL_BLOCK + "_backtick",
18154
18240
  START_QUOTE_SINGLE: LEXER_STATE_NAMES.INNER_SQL_BLOCK + "_startQuoteSingle",
18155
18241
  START_QUOTE_DOUBLE: LEXER_STATE_NAMES.INNER_SQL_BLOCK + "_startQuoteDouble",
18242
+ START_TRIPLE_QUOTE_SINGLE: LEXER_STATE_NAMES.INNER_SQL_BLOCK + "_startTripleQuoteSingle",
18243
+ START_TRIPLE_QUOTE_DOUBLE: LEXER_STATE_NAMES.INNER_SQL_BLOCK + "_startTripleQuoteDouble",
18156
18244
  CAPTURE_EVERYTHING_ELSE: LEXER_STATE_NAMES.INNER_SQL_BLOCK + "_captureEverythingElse"
18157
18245
  };
18158
18246
  const SQL_SINGLE_QUOTE_STRING_LEXER_TOKEN_NAMES = {
@@ -18169,6 +18257,18 @@ const SQL_DOUBLE_QUOTE_STRING_LEXER_TOKEN_NAMES = {
18169
18257
  CLOSE_QUOTE: LEXER_STATE_NAMES.SQL_DOUBLE_QUOTE_STRING + "_closeQuoteDouble",
18170
18258
  CAPTURE_EVERYTHING_ELSE: LEXER_STATE_NAMES.SQL_DOUBLE_QUOTE_STRING + "_captureEverythingElse"
18171
18259
  };
18260
+ const SQL_TRIPLE_SINGLE_QUOTE_STRING_LEXER_TOKEN_NAMES = {
18261
+ ESCAPED_BACKSLASH: LEXER_STATE_NAMES.SQL_TRIPLE_SINGLE_QUOTE_STRING + "_escapedBackslash",
18262
+ START_JS_PLACEHOLDER: LEXER_STATE_NAMES.SQL_TRIPLE_SINGLE_QUOTE_STRING + "_startJsPlaceholder",
18263
+ CLOSE_QUOTE: LEXER_STATE_NAMES.SQL_TRIPLE_SINGLE_QUOTE_STRING + "_closeTripleQuoteSingle",
18264
+ CAPTURE_EVERYTHING_ELSE: LEXER_STATE_NAMES.SQL_TRIPLE_SINGLE_QUOTE_STRING + "_captureEverythingElse"
18265
+ };
18266
+ const SQL_TRIPLE_DOUBLE_QUOTE_STRING_LEXER_TOKEN_NAMES = {
18267
+ ESCAPED_BACKSLASH: LEXER_STATE_NAMES.SQL_TRIPLE_DOUBLE_QUOTE_STRING + "_escapedBackslash",
18268
+ START_JS_PLACEHOLDER: LEXER_STATE_NAMES.SQL_TRIPLE_DOUBLE_QUOTE_STRING + "_startJsPlaceholder",
18269
+ CLOSE_QUOTE: LEXER_STATE_NAMES.SQL_TRIPLE_DOUBLE_QUOTE_STRING + "_closeTripleQuoteDouble",
18270
+ CAPTURE_EVERYTHING_ELSE: LEXER_STATE_NAMES.SQL_TRIPLE_DOUBLE_QUOTE_STRING + "_captureEverythingElse"
18271
+ };
18172
18272
  const lexer = moo.states(buildSqlxLexer());
18173
18273
  var SyntaxTreeNodeType;
18174
18274
  (function (SyntaxTreeNodeType) {
@@ -18177,7 +18277,8 @@ var SyntaxTreeNodeType;
18177
18277
  SyntaxTreeNodeType[SyntaxTreeNodeType["SQL"] = 2] = "SQL";
18178
18278
  SyntaxTreeNodeType[SyntaxTreeNodeType["SQL_COMMENT"] = 3] = "SQL_COMMENT";
18179
18279
  SyntaxTreeNodeType[SyntaxTreeNodeType["SQL_LITERAL_STRING"] = 4] = "SQL_LITERAL_STRING";
18180
- SyntaxTreeNodeType[SyntaxTreeNodeType["SQL_STATEMENT_SEPARATOR"] = 5] = "SQL_STATEMENT_SEPARATOR";
18280
+ SyntaxTreeNodeType[SyntaxTreeNodeType["SQL_LITERAL_MULTILINE_STRING"] = 5] = "SQL_LITERAL_MULTILINE_STRING";
18281
+ SyntaxTreeNodeType[SyntaxTreeNodeType["SQL_STATEMENT_SEPARATOR"] = 6] = "SQL_STATEMENT_SEPARATOR";
18181
18282
  })(SyntaxTreeNodeType || (SyntaxTreeNodeType = {}));
18182
18283
  const START_TOKEN_NODE_MAPPINGS = new Map([
18183
18284
  [SQL_LEXER_TOKEN_NAMES.START_CONFIG, SyntaxTreeNodeType.JAVASCRIPT],
@@ -18192,6 +18293,8 @@ const START_TOKEN_NODE_MAPPINGS = new Map([
18192
18293
  [SQL_LEXER_TOKEN_NAMES.START_PRE_OPERATIONS, SyntaxTreeNodeType.SQL],
18193
18294
  [SQL_LEXER_TOKEN_NAMES.START_QUOTE_SINGLE, SyntaxTreeNodeType.SQL_LITERAL_STRING],
18194
18295
  [SQL_LEXER_TOKEN_NAMES.START_QUOTE_DOUBLE, SyntaxTreeNodeType.SQL_LITERAL_STRING],
18296
+ [SQL_LEXER_TOKEN_NAMES.START_TRIPLE_QUOTE_SINGLE, SyntaxTreeNodeType.SQL_LITERAL_MULTILINE_STRING],
18297
+ [SQL_LEXER_TOKEN_NAMES.START_TRIPLE_QUOTE_DOUBLE, SyntaxTreeNodeType.SQL_LITERAL_MULTILINE_STRING],
18195
18298
  [JS_BLOCK_LEXER_TOKEN_NAMES.START_JS_BLOCK, SyntaxTreeNodeType.JAVASCRIPT],
18196
18299
  [JS_TEMPLATE_STRING_LEXER_TOKEN_NAMES.START_JS_BLOCK, SyntaxTreeNodeType.JAVASCRIPT],
18197
18300
  [
@@ -18200,6 +18303,8 @@ const START_TOKEN_NODE_MAPPINGS = new Map([
18200
18303
  ],
18201
18304
  [INNER_SQL_BLOCK_LEXER_TOKEN_NAMES.START_QUOTE_SINGLE, SyntaxTreeNodeType.SQL_LITERAL_STRING],
18202
18305
  [INNER_SQL_BLOCK_LEXER_TOKEN_NAMES.START_QUOTE_DOUBLE, SyntaxTreeNodeType.SQL_LITERAL_STRING],
18306
+ [INNER_SQL_BLOCK_LEXER_TOKEN_NAMES.START_TRIPLE_QUOTE_SINGLE, SyntaxTreeNodeType.SQL_LITERAL_MULTILINE_STRING],
18307
+ [INNER_SQL_BLOCK_LEXER_TOKEN_NAMES.START_TRIPLE_QUOTE_DOUBLE, SyntaxTreeNodeType.SQL_LITERAL_MULTILINE_STRING],
18203
18308
  [
18204
18309
  SQL_SINGLE_QUOTE_STRING_LEXER_TOKEN_NAMES.START_JS_PLACEHOLDER,
18205
18310
  SyntaxTreeNodeType.JAVASCRIPT_TEMPLATE_STRING_PLACEHOLDER
@@ -18207,13 +18312,23 @@ const START_TOKEN_NODE_MAPPINGS = new Map([
18207
18312
  [
18208
18313
  SQL_DOUBLE_QUOTE_STRING_LEXER_TOKEN_NAMES.START_JS_PLACEHOLDER,
18209
18314
  SyntaxTreeNodeType.JAVASCRIPT_TEMPLATE_STRING_PLACEHOLDER
18315
+ ],
18316
+ [
18317
+ SQL_TRIPLE_SINGLE_QUOTE_STRING_LEXER_TOKEN_NAMES.START_JS_PLACEHOLDER,
18318
+ SyntaxTreeNodeType.JAVASCRIPT_TEMPLATE_STRING_PLACEHOLDER
18319
+ ],
18320
+ [
18321
+ SQL_TRIPLE_DOUBLE_QUOTE_STRING_LEXER_TOKEN_NAMES.START_JS_PLACEHOLDER,
18322
+ SyntaxTreeNodeType.JAVASCRIPT_TEMPLATE_STRING_PLACEHOLDER
18210
18323
  ]
18211
18324
  ]);
18212
18325
  const CLOSE_TOKEN_TYPES = new Set([
18213
18326
  JS_BLOCK_LEXER_TOKEN_NAMES.CLOSE_BLOCK,
18214
18327
  INNER_SQL_BLOCK_LEXER_TOKEN_NAMES.CLOSE_BLOCK,
18215
18328
  SQL_SINGLE_QUOTE_STRING_LEXER_TOKEN_NAMES.CLOSE_QUOTE,
18216
- SQL_DOUBLE_QUOTE_STRING_LEXER_TOKEN_NAMES.CLOSE_QUOTE
18329
+ SQL_DOUBLE_QUOTE_STRING_LEXER_TOKEN_NAMES.CLOSE_QUOTE,
18330
+ SQL_TRIPLE_SINGLE_QUOTE_STRING_LEXER_TOKEN_NAMES.CLOSE_QUOTE,
18331
+ SQL_TRIPLE_DOUBLE_QUOTE_STRING_LEXER_TOKEN_NAMES.CLOSE_QUOTE
18217
18332
  ]);
18218
18333
  const WHOLE_TOKEN_NODE_MAPPINGS = new Map([
18219
18334
  [SQL_LEXER_TOKEN_NAMES.MULTI_LINE_COMMENT, SyntaxTreeNodeType.SQL_COMMENT],
@@ -18345,6 +18460,14 @@ function buildSqlxLexer() {
18345
18460
  push: LEXER_STATE_NAMES.JS_BLOCK
18346
18461
  };
18347
18462
  sqlLexer[SQL_LEXER_TOKEN_NAMES.BACKTICK] = "`";
18463
+ sqlLexer[SQL_LEXER_TOKEN_NAMES.START_TRIPLE_QUOTE_SINGLE] = {
18464
+ match: "'''",
18465
+ push: LEXER_STATE_NAMES.SQL_TRIPLE_SINGLE_QUOTE_STRING,
18466
+ };
18467
+ sqlLexer[SQL_LEXER_TOKEN_NAMES.START_TRIPLE_QUOTE_DOUBLE] = {
18468
+ match: '"""',
18469
+ push: LEXER_STATE_NAMES.SQL_TRIPLE_DOUBLE_QUOTE_STRING,
18470
+ };
18348
18471
  sqlLexer[SQL_LEXER_TOKEN_NAMES.START_QUOTE_SINGLE] = {
18349
18472
  match: "'",
18350
18473
  push: LEXER_STATE_NAMES.SQL_SINGLE_QUOTE_STRING
@@ -18400,6 +18523,14 @@ function buildSqlxLexer() {
18400
18523
  pop: 1
18401
18524
  };
18402
18525
  innerSqlBlockLexer[INNER_SQL_BLOCK_LEXER_TOKEN_NAMES.BACKTICK] = "`";
18526
+ innerSqlBlockLexer[INNER_SQL_BLOCK_LEXER_TOKEN_NAMES.START_TRIPLE_QUOTE_SINGLE] = {
18527
+ match: "'''",
18528
+ push: LEXER_STATE_NAMES.SQL_TRIPLE_SINGLE_QUOTE_STRING
18529
+ };
18530
+ innerSqlBlockLexer[INNER_SQL_BLOCK_LEXER_TOKEN_NAMES.START_TRIPLE_QUOTE_DOUBLE] = {
18531
+ match: '"""',
18532
+ push: LEXER_STATE_NAMES.SQL_TRIPLE_DOUBLE_QUOTE_STRING
18533
+ };
18403
18534
  innerSqlBlockLexer[INNER_SQL_BLOCK_LEXER_TOKEN_NAMES.START_QUOTE_SINGLE] = {
18404
18535
  match: "'",
18405
18536
  push: LEXER_STATE_NAMES.SQL_SINGLE_QUOTE_STRING
@@ -18444,6 +18575,34 @@ function buildSqlxLexer() {
18444
18575
  match: /[\s\S]+?/,
18445
18576
  lineBreaks: true
18446
18577
  };
18578
+ const innerTripleSingleQuoteLexer = {};
18579
+ innerTripleSingleQuoteLexer[SQL_TRIPLE_SINGLE_QUOTE_STRING_LEXER_TOKEN_NAMES.ESCAPED_BACKSLASH] = "\\\\";
18580
+ innerTripleSingleQuoteLexer[SQL_TRIPLE_SINGLE_QUOTE_STRING_LEXER_TOKEN_NAMES.START_JS_PLACEHOLDER] = {
18581
+ match: "${",
18582
+ push: LEXER_STATE_NAMES.JS_BLOCK
18583
+ };
18584
+ innerTripleSingleQuoteLexer[SQL_TRIPLE_SINGLE_QUOTE_STRING_LEXER_TOKEN_NAMES.CLOSE_QUOTE] = {
18585
+ match: "'''",
18586
+ pop: 1
18587
+ };
18588
+ innerTripleSingleQuoteLexer[SQL_TRIPLE_SINGLE_QUOTE_STRING_LEXER_TOKEN_NAMES.CAPTURE_EVERYTHING_ELSE] = {
18589
+ match: /[\s\S]+?/,
18590
+ lineBreaks: true
18591
+ };
18592
+ const innerTripleDoubleQuoteLexer = {};
18593
+ innerTripleDoubleQuoteLexer[SQL_TRIPLE_DOUBLE_QUOTE_STRING_LEXER_TOKEN_NAMES.ESCAPED_BACKSLASH] = "\\\\";
18594
+ innerTripleDoubleQuoteLexer[SQL_TRIPLE_DOUBLE_QUOTE_STRING_LEXER_TOKEN_NAMES.START_JS_PLACEHOLDER] = {
18595
+ match: "${",
18596
+ push: LEXER_STATE_NAMES.JS_BLOCK
18597
+ };
18598
+ innerTripleDoubleQuoteLexer[SQL_TRIPLE_DOUBLE_QUOTE_STRING_LEXER_TOKEN_NAMES.CLOSE_QUOTE] = {
18599
+ match: '"""',
18600
+ pop: 1
18601
+ };
18602
+ innerTripleDoubleQuoteLexer[SQL_TRIPLE_DOUBLE_QUOTE_STRING_LEXER_TOKEN_NAMES.CAPTURE_EVERYTHING_ELSE] = {
18603
+ match: /[\s\S]+?/,
18604
+ lineBreaks: true
18605
+ };
18447
18606
  const lexerStates = {};
18448
18607
  lexerStates[LEXER_STATE_NAMES.SQL] = sqlLexer;
18449
18608
  lexerStates[LEXER_STATE_NAMES.JS_BLOCK] = jsBlockLexer;
@@ -18451,6 +18610,8 @@ function buildSqlxLexer() {
18451
18610
  lexerStates[LEXER_STATE_NAMES.INNER_SQL_BLOCK] = innerSqlBlockLexer;
18452
18611
  lexerStates[LEXER_STATE_NAMES.SQL_SINGLE_QUOTE_STRING] = innerSingleQuoteLexer;
18453
18612
  lexerStates[LEXER_STATE_NAMES.SQL_DOUBLE_QUOTE_STRING] = innerDoubleQuoteLexer;
18613
+ lexerStates[LEXER_STATE_NAMES.SQL_TRIPLE_SINGLE_QUOTE_STRING] = innerTripleSingleQuoteLexer;
18614
+ lexerStates[LEXER_STATE_NAMES.SQL_TRIPLE_DOUBLE_QUOTE_STRING] = innerTripleDoubleQuoteLexer;
18454
18615
  return lexerStates;
18455
18616
  }
18456
18617
 
@@ -18621,6 +18782,7 @@ function extractSqlxParts(rootNode) {
18621
18782
  SyntaxTreeNodeType.JAVASCRIPT_TEMPLATE_STRING_PLACEHOLDER,
18622
18783
  SyntaxTreeNodeType.SQL_COMMENT,
18623
18784
  SyntaxTreeNodeType.SQL_LITERAL_STRING,
18785
+ SyntaxTreeNodeType.SQL_LITERAL_MULTILINE_STRING,
18624
18786
  SyntaxTreeNodeType.SQL_STATEMENT_SEPARATOR
18625
18787
  ].includes(node.type)));
18626
18788
  let incremental = "";
@@ -19156,7 +19318,7 @@ class RefReplacingContext {
19156
19318
  }
19157
19319
  }
19158
19320
 
19159
- const version = "2.6.0";
19321
+ const version = "2.6.2";
19160
19322
 
19161
19323
  const SQL_DATA_WAREHOUSE_DIST_HASH_REGEXP = new RegExp("HASH\\s*\\(\\s*\\w*\\s*\\)\\s*");
19162
19324
  const DEFAULT_CONFIG = {
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "dependencies": {
3
- "protobufjs": "^7.0.0",
3
+ "protobufjs": "^7.2.4",
4
4
  "tarjan-graph": "^2.0.0",
5
- "semver": "^7.3.8",
5
+ "semver": "^7.5.2",
6
6
  "moo": "^0.5.0",
7
7
  "long": "^4.0.0"
8
8
  },
@@ -49,7 +49,7 @@
49
49
  "publishConfig": {
50
50
  "access": "public"
51
51
  },
52
- "version": "2.6.0",
52
+ "version": "2.6.2",
53
53
  "name": "@dataform/core",
54
54
  "description": "Dataform core API.",
55
55
  "main": "bundle.js",