@sqlanvil/cli 1.32.5 → 1.32.7
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/bundle.js +70 -14
- package/package.json +2 -2
- package/worker_bundle.js +55 -0
package/bundle.js
CHANGED
|
@@ -6974,6 +6974,7 @@ const sqlanvil = $root.sqlanvil = (() => {
|
|
|
6974
6974
|
* @property {sqlanvil.IMysqlOptions|null} [mysql] IncrementalTableConfig mysql
|
|
6975
6975
|
* @property {sqlanvil.ActionConfig.IncrementalStrategy|null} [incrementalStrategy] IncrementalTableConfig incrementalStrategy
|
|
6976
6976
|
* @property {Array.<string>|null} [incrementalPredicates] IncrementalTableConfig incrementalPredicates
|
|
6977
|
+
* @property {boolean|null} [preserveGovernanceControls] IncrementalTableConfig preserveGovernanceControls
|
|
6977
6978
|
*/
|
|
6978
6979
|
|
|
6979
6980
|
/**
|
|
@@ -7257,6 +7258,23 @@ const sqlanvil = $root.sqlanvil = (() => {
|
|
|
7257
7258
|
*/
|
|
7258
7259
|
IncrementalTableConfig.prototype.incrementalPredicates = $util.emptyArray;
|
|
7259
7260
|
|
|
7261
|
+
/**
|
|
7262
|
+
* IncrementalTableConfig preserveGovernanceControls.
|
|
7263
|
+
* @member {boolean|null|undefined} preserveGovernanceControls
|
|
7264
|
+
* @memberof sqlanvil.ActionConfig.IncrementalTableConfig
|
|
7265
|
+
* @instance
|
|
7266
|
+
*/
|
|
7267
|
+
IncrementalTableConfig.prototype.preserveGovernanceControls = null;
|
|
7268
|
+
|
|
7269
|
+
// OneOf field names bound to virtual getters and setters
|
|
7270
|
+
let $oneOfFields;
|
|
7271
|
+
|
|
7272
|
+
// Virtual OneOf for proto3 optional field
|
|
7273
|
+
Object.defineProperty(IncrementalTableConfig.prototype, "_preserveGovernanceControls", {
|
|
7274
|
+
get: $util.oneOfGetter($oneOfFields = ["preserveGovernanceControls"]),
|
|
7275
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
7276
|
+
});
|
|
7277
|
+
|
|
7260
7278
|
/**
|
|
7261
7279
|
* Creates a new IncrementalTableConfig instance using the specified properties.
|
|
7262
7280
|
* @function create
|
|
@@ -7359,6 +7377,8 @@ const sqlanvil = $root.sqlanvil = (() => {
|
|
|
7359
7377
|
if (message.incrementalPredicates != null && message.incrementalPredicates.length)
|
|
7360
7378
|
for (let i = 0; i < message.incrementalPredicates.length; ++i)
|
|
7361
7379
|
writer.uint32(/* id 32, wireType 2 =*/258).string(message.incrementalPredicates[i]);
|
|
7380
|
+
if (message.preserveGovernanceControls != null && Object.hasOwnProperty.call(message, "preserveGovernanceControls"))
|
|
7381
|
+
writer.uint32(/* id 33, wireType 0 =*/264).bool(message.preserveGovernanceControls);
|
|
7362
7382
|
return writer;
|
|
7363
7383
|
};
|
|
7364
7384
|
|
|
@@ -7585,6 +7605,10 @@ const sqlanvil = $root.sqlanvil = (() => {
|
|
|
7585
7605
|
message.incrementalPredicates.push(reader.string());
|
|
7586
7606
|
break;
|
|
7587
7607
|
}
|
|
7608
|
+
case 33: {
|
|
7609
|
+
message.preserveGovernanceControls = reader.bool();
|
|
7610
|
+
break;
|
|
7611
|
+
}
|
|
7588
7612
|
default:
|
|
7589
7613
|
reader.skipType(tag & 7, long);
|
|
7590
7614
|
break;
|
|
@@ -7791,6 +7815,10 @@ const sqlanvil = $root.sqlanvil = (() => {
|
|
|
7791
7815
|
if (!$util.isString(message.incrementalPredicates[i]))
|
|
7792
7816
|
return "incrementalPredicates: string[] expected";
|
|
7793
7817
|
}
|
|
7818
|
+
if (message.preserveGovernanceControls != null && Object.hasOwnProperty.call(message, "preserveGovernanceControls")) {
|
|
7819
|
+
if (typeof message.preserveGovernanceControls !== "boolean")
|
|
7820
|
+
return "preserveGovernanceControls: boolean expected";
|
|
7821
|
+
}
|
|
7794
7822
|
return null;
|
|
7795
7823
|
};
|
|
7796
7824
|
|
|
@@ -7996,6 +8024,8 @@ const sqlanvil = $root.sqlanvil = (() => {
|
|
|
7996
8024
|
for (let i = 0; i < object.incrementalPredicates.length; ++i)
|
|
7997
8025
|
message.incrementalPredicates[i] = String(object.incrementalPredicates[i]);
|
|
7998
8026
|
}
|
|
8027
|
+
if (object.preserveGovernanceControls != null)
|
|
8028
|
+
message.preserveGovernanceControls = Boolean(object.preserveGovernanceControls);
|
|
7999
8029
|
return message;
|
|
8000
8030
|
};
|
|
8001
8031
|
|
|
@@ -8155,6 +8185,11 @@ const sqlanvil = $root.sqlanvil = (() => {
|
|
|
8155
8185
|
for (let j = 0; j < message.incrementalPredicates.length; ++j)
|
|
8156
8186
|
object.incrementalPredicates[j] = message.incrementalPredicates[j];
|
|
8157
8187
|
}
|
|
8188
|
+
if (message.preserveGovernanceControls != null && Object.hasOwnProperty.call(message, "preserveGovernanceControls")) {
|
|
8189
|
+
object.preserveGovernanceControls = message.preserveGovernanceControls;
|
|
8190
|
+
if (options.oneofs)
|
|
8191
|
+
object._preserveGovernanceControls = "preserveGovernanceControls";
|
|
8192
|
+
}
|
|
8158
8193
|
return object;
|
|
8159
8194
|
};
|
|
8160
8195
|
|
|
@@ -49551,6 +49586,26 @@ const google = $root.google = (() => {
|
|
|
49551
49586
|
|
|
49552
49587
|
const CONFIGS_PROTO_DOCUMENTATION_URL = "https://github.com/sqlanvil/docs/blob/main/reference/configs.md";
|
|
49553
49588
|
const REPORT_ISSUE_URL = "https://github.com/sqlanvil/sqlanvil/issues";
|
|
49589
|
+
function isForeignBuffer(candidate) {
|
|
49590
|
+
try {
|
|
49591
|
+
if (!(candidate === null || candidate === void 0 ? void 0 : candidate.prototype)) {
|
|
49592
|
+
return false;
|
|
49593
|
+
}
|
|
49594
|
+
return !(candidate.prototype instanceof Uint8Array);
|
|
49595
|
+
}
|
|
49596
|
+
catch (e) {
|
|
49597
|
+
return true;
|
|
49598
|
+
}
|
|
49599
|
+
}
|
|
49600
|
+
function avoidForeignBufferEncoding(bufferClass) {
|
|
49601
|
+
if (!isForeignBuffer(bufferClass)) {
|
|
49602
|
+
return false;
|
|
49603
|
+
}
|
|
49604
|
+
protobufjs.util.Buffer = null;
|
|
49605
|
+
protobufjs.configure();
|
|
49606
|
+
return true;
|
|
49607
|
+
}
|
|
49608
|
+
avoidForeignBufferEncoding(typeof global === "undefined" ? undefined : global.Buffer);
|
|
49554
49609
|
var VerifyProtoErrorBehaviour;
|
|
49555
49610
|
(function (VerifyProtoErrorBehaviour) {
|
|
49556
49611
|
VerifyProtoErrorBehaviour[VerifyProtoErrorBehaviour["DEFAULT"] = 0] = "DEFAULT";
|
|
@@ -51096,8 +51151,8 @@ function collectEvaluationQueries(queryOrAction, concatenate, queryModifier = (q
|
|
|
51096
51151
|
.filter(validationQuery => !!validationQuery.query);
|
|
51097
51152
|
}
|
|
51098
51153
|
|
|
51099
|
-
const version = "1.32.
|
|
51100
|
-
const dataformVersion = "3.0.
|
|
51154
|
+
const version = "1.32.7";
|
|
51155
|
+
const dataformVersion = "3.0.70";
|
|
51101
51156
|
|
|
51102
51157
|
async function build(compiledGraph, runConfig, dbadapter) {
|
|
51103
51158
|
const prunedGraph = prune(compiledGraph, runConfig);
|
|
@@ -55178,7 +55233,7 @@ function formatStackTraceForQuietCompilation(compileError) {
|
|
|
55178
55233
|
}
|
|
55179
55234
|
return "";
|
|
55180
55235
|
}
|
|
55181
|
-
function printCompiledGraphErrors(graphErrors, quietCompilation) {
|
|
55236
|
+
function printCompiledGraphErrors(graphErrors, quietCompilation = false) {
|
|
55182
55237
|
if (graphErrors.compilationErrors && graphErrors.compilationErrors.length > 0) {
|
|
55183
55238
|
printError("Compilation errors:", 1);
|
|
55184
55239
|
graphErrors.compilationErrors.forEach(compileError => {
|
|
@@ -55595,10 +55650,11 @@ const timeoutOption = option("timeout", {
|
|
|
55595
55650
|
default: null,
|
|
55596
55651
|
coerce: (rawTimeoutString) => rawTimeoutString ? parseDuration__default["default"](rawTimeoutString) : null
|
|
55597
55652
|
});
|
|
55598
|
-
const
|
|
55599
|
-
describe: "
|
|
55600
|
-
"
|
|
55601
|
-
type: "boolean"
|
|
55653
|
+
const artifactsOption = option("artifacts", {
|
|
55654
|
+
describe: "Write the queryable Parquet artifacts under target/ (catalog on compile; run history on " +
|
|
55655
|
+
"run). Pass --no-artifacts to skip them.",
|
|
55656
|
+
type: "boolean",
|
|
55657
|
+
default: true
|
|
55602
55658
|
});
|
|
55603
55659
|
const quietCompileOption = option("quiet", {
|
|
55604
55660
|
describe: "Less verbose compilation output. Example usage: 'sqlanvil compile --quiet'",
|
|
@@ -55658,7 +55714,7 @@ const compileCommand = {
|
|
|
55658
55714
|
compileTagsOption,
|
|
55659
55715
|
compileIncludeDepsOption,
|
|
55660
55716
|
compileIncludeDependentsOption,
|
|
55661
|
-
|
|
55717
|
+
artifactsOption,
|
|
55662
55718
|
option(verboseOptionName, {
|
|
55663
55719
|
describe: "Enable verbose compilation output. Example usage: 'sqlanvil compile --verbose'",
|
|
55664
55720
|
type: "boolean",
|
|
@@ -55705,7 +55761,7 @@ const compileCommand = {
|
|
|
55705
55761
|
printCompiledGraphErrors(compiledGraph.graphErrors, argv[quietCompileOption.name]);
|
|
55706
55762
|
return true;
|
|
55707
55763
|
}
|
|
55708
|
-
if (
|
|
55764
|
+
if (argv[artifactsOption.name] !== false) {
|
|
55709
55765
|
await safeWriteArtifacts(compiledGraph, projectDir, { warn: print });
|
|
55710
55766
|
}
|
|
55711
55767
|
return false;
|
|
@@ -60170,7 +60226,7 @@ async function runValidate(argv) {
|
|
|
60170
60226
|
timeoutMillis: argv[timeoutOption.name] || undefined
|
|
60171
60227
|
});
|
|
60172
60228
|
if (compiledGraphHasErrors(compiledGraph)) {
|
|
60173
|
-
printCompiledGraphErrors(compiledGraph.graphErrors
|
|
60229
|
+
printCompiledGraphErrors(compiledGraph.graphErrors);
|
|
60174
60230
|
return 1;
|
|
60175
60231
|
}
|
|
60176
60232
|
if (!argv[jsonOutputOption.name]) {
|
|
@@ -60317,7 +60373,7 @@ const runCommand = {
|
|
|
60317
60373
|
executionTimeoutOption,
|
|
60318
60374
|
tagsOption,
|
|
60319
60375
|
bigqueryJobLabelsOption,
|
|
60320
|
-
|
|
60376
|
+
artifactsOption,
|
|
60321
60377
|
...ProjectConfigOptions.allYargsOptions
|
|
60322
60378
|
],
|
|
60323
60379
|
processFn: async (argv) => {
|
|
@@ -60370,7 +60426,7 @@ const runCommand = {
|
|
|
60370
60426
|
}
|
|
60371
60427
|
}
|
|
60372
60428
|
if (compiledGraphHasErrors(compiledGraph)) {
|
|
60373
|
-
printCompiledGraphErrors(compiledGraph.graphErrors
|
|
60429
|
+
printCompiledGraphErrors(compiledGraph.graphErrors);
|
|
60374
60430
|
return 1;
|
|
60375
60431
|
}
|
|
60376
60432
|
const warehouse = compiledGraph.projectConfig.warehouse || "bigquery";
|
|
@@ -60483,7 +60539,7 @@ const runCommand = {
|
|
|
60483
60539
|
printError("Run cancelled.");
|
|
60484
60540
|
}
|
|
60485
60541
|
}
|
|
60486
|
-
if (
|
|
60542
|
+
if (argv[artifactsOption.name] !== false) {
|
|
60487
60543
|
await safeWriteArtifacts(compiledGraph, argv[projectDirOption.name], {
|
|
60488
60544
|
runResult,
|
|
60489
60545
|
runId: Date.now(),
|
|
@@ -60514,7 +60570,7 @@ const testCommand = {
|
|
|
60514
60570
|
timeoutMillis: argv[timeoutOption.name] || undefined
|
|
60515
60571
|
});
|
|
60516
60572
|
if (compiledGraphHasErrors(compiledGraph)) {
|
|
60517
|
-
printCompiledGraphErrors(compiledGraph.graphErrors
|
|
60573
|
+
printCompiledGraphErrors(compiledGraph.graphErrors);
|
|
60518
60574
|
return 1;
|
|
60519
60575
|
}
|
|
60520
60576
|
if (!argv[jsonOutputOption.name]) {
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"google-auth-library": "^9.15.1",
|
|
10
10
|
"google-sql-syntax-ts": "^1.0.3",
|
|
11
11
|
"js-beautify": "^1.10.2",
|
|
12
|
-
"js-yaml": "^4.2
|
|
12
|
+
"js-yaml": "^4.3.2",
|
|
13
13
|
"moo": "^0.5.0",
|
|
14
14
|
"mysql2": "^3.11.0",
|
|
15
15
|
"object-sizeof": "^1.6.1",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"bin": {
|
|
74
74
|
"sqlanvil": "bundle.js"
|
|
75
75
|
},
|
|
76
|
-
"version": "1.32.
|
|
76
|
+
"version": "1.32.7",
|
|
77
77
|
"name": "@sqlanvil/cli",
|
|
78
78
|
"description": "sqlanvil command line interface.",
|
|
79
79
|
"main": "bundle.js"
|
package/worker_bundle.js
CHANGED
|
@@ -6912,6 +6912,7 @@ const sqlanvil = $root.sqlanvil = (() => {
|
|
|
6912
6912
|
* @property {sqlanvil.IMysqlOptions|null} [mysql] IncrementalTableConfig mysql
|
|
6913
6913
|
* @property {sqlanvil.ActionConfig.IncrementalStrategy|null} [incrementalStrategy] IncrementalTableConfig incrementalStrategy
|
|
6914
6914
|
* @property {Array.<string>|null} [incrementalPredicates] IncrementalTableConfig incrementalPredicates
|
|
6915
|
+
* @property {boolean|null} [preserveGovernanceControls] IncrementalTableConfig preserveGovernanceControls
|
|
6915
6916
|
*/
|
|
6916
6917
|
|
|
6917
6918
|
/**
|
|
@@ -7195,6 +7196,23 @@ const sqlanvil = $root.sqlanvil = (() => {
|
|
|
7195
7196
|
*/
|
|
7196
7197
|
IncrementalTableConfig.prototype.incrementalPredicates = $util.emptyArray;
|
|
7197
7198
|
|
|
7199
|
+
/**
|
|
7200
|
+
* IncrementalTableConfig preserveGovernanceControls.
|
|
7201
|
+
* @member {boolean|null|undefined} preserveGovernanceControls
|
|
7202
|
+
* @memberof sqlanvil.ActionConfig.IncrementalTableConfig
|
|
7203
|
+
* @instance
|
|
7204
|
+
*/
|
|
7205
|
+
IncrementalTableConfig.prototype.preserveGovernanceControls = null;
|
|
7206
|
+
|
|
7207
|
+
// OneOf field names bound to virtual getters and setters
|
|
7208
|
+
let $oneOfFields;
|
|
7209
|
+
|
|
7210
|
+
// Virtual OneOf for proto3 optional field
|
|
7211
|
+
Object.defineProperty(IncrementalTableConfig.prototype, "_preserveGovernanceControls", {
|
|
7212
|
+
get: $util.oneOfGetter($oneOfFields = ["preserveGovernanceControls"]),
|
|
7213
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
7214
|
+
});
|
|
7215
|
+
|
|
7198
7216
|
/**
|
|
7199
7217
|
* Creates a new IncrementalTableConfig instance using the specified properties.
|
|
7200
7218
|
* @function create
|
|
@@ -7297,6 +7315,8 @@ const sqlanvil = $root.sqlanvil = (() => {
|
|
|
7297
7315
|
if (message.incrementalPredicates != null && message.incrementalPredicates.length)
|
|
7298
7316
|
for (let i = 0; i < message.incrementalPredicates.length; ++i)
|
|
7299
7317
|
writer.uint32(/* id 32, wireType 2 =*/258).string(message.incrementalPredicates[i]);
|
|
7318
|
+
if (message.preserveGovernanceControls != null && Object.hasOwnProperty.call(message, "preserveGovernanceControls"))
|
|
7319
|
+
writer.uint32(/* id 33, wireType 0 =*/264).bool(message.preserveGovernanceControls);
|
|
7300
7320
|
return writer;
|
|
7301
7321
|
};
|
|
7302
7322
|
|
|
@@ -7523,6 +7543,10 @@ const sqlanvil = $root.sqlanvil = (() => {
|
|
|
7523
7543
|
message.incrementalPredicates.push(reader.string());
|
|
7524
7544
|
break;
|
|
7525
7545
|
}
|
|
7546
|
+
case 33: {
|
|
7547
|
+
message.preserveGovernanceControls = reader.bool();
|
|
7548
|
+
break;
|
|
7549
|
+
}
|
|
7526
7550
|
default:
|
|
7527
7551
|
reader.skipType(tag & 7, long);
|
|
7528
7552
|
break;
|
|
@@ -7729,6 +7753,10 @@ const sqlanvil = $root.sqlanvil = (() => {
|
|
|
7729
7753
|
if (!$util.isString(message.incrementalPredicates[i]))
|
|
7730
7754
|
return "incrementalPredicates: string[] expected";
|
|
7731
7755
|
}
|
|
7756
|
+
if (message.preserveGovernanceControls != null && Object.hasOwnProperty.call(message, "preserveGovernanceControls")) {
|
|
7757
|
+
if (typeof message.preserveGovernanceControls !== "boolean")
|
|
7758
|
+
return "preserveGovernanceControls: boolean expected";
|
|
7759
|
+
}
|
|
7732
7760
|
return null;
|
|
7733
7761
|
};
|
|
7734
7762
|
|
|
@@ -7934,6 +7962,8 @@ const sqlanvil = $root.sqlanvil = (() => {
|
|
|
7934
7962
|
for (let i = 0; i < object.incrementalPredicates.length; ++i)
|
|
7935
7963
|
message.incrementalPredicates[i] = String(object.incrementalPredicates[i]);
|
|
7936
7964
|
}
|
|
7965
|
+
if (object.preserveGovernanceControls != null)
|
|
7966
|
+
message.preserveGovernanceControls = Boolean(object.preserveGovernanceControls);
|
|
7937
7967
|
return message;
|
|
7938
7968
|
};
|
|
7939
7969
|
|
|
@@ -8093,6 +8123,11 @@ const sqlanvil = $root.sqlanvil = (() => {
|
|
|
8093
8123
|
for (let j = 0; j < message.incrementalPredicates.length; ++j)
|
|
8094
8124
|
object.incrementalPredicates[j] = message.incrementalPredicates[j];
|
|
8095
8125
|
}
|
|
8126
|
+
if (message.preserveGovernanceControls != null && Object.hasOwnProperty.call(message, "preserveGovernanceControls")) {
|
|
8127
|
+
object.preserveGovernanceControls = message.preserveGovernanceControls;
|
|
8128
|
+
if (options.oneofs)
|
|
8129
|
+
object._preserveGovernanceControls = "preserveGovernanceControls";
|
|
8130
|
+
}
|
|
8096
8131
|
return object;
|
|
8097
8132
|
};
|
|
8098
8133
|
|
|
@@ -49487,6 +49522,26 @@ const google = $root.google = (() => {
|
|
|
49487
49522
|
return google;
|
|
49488
49523
|
})();
|
|
49489
49524
|
|
|
49525
|
+
function isForeignBuffer(candidate) {
|
|
49526
|
+
try {
|
|
49527
|
+
if (!(candidate === null || candidate === void 0 ? void 0 : candidate.prototype)) {
|
|
49528
|
+
return false;
|
|
49529
|
+
}
|
|
49530
|
+
return !(candidate.prototype instanceof Uint8Array);
|
|
49531
|
+
}
|
|
49532
|
+
catch (e) {
|
|
49533
|
+
return true;
|
|
49534
|
+
}
|
|
49535
|
+
}
|
|
49536
|
+
function avoidForeignBufferEncoding(bufferClass) {
|
|
49537
|
+
if (!isForeignBuffer(bufferClass)) {
|
|
49538
|
+
return false;
|
|
49539
|
+
}
|
|
49540
|
+
protobufjs.util.Buffer = null;
|
|
49541
|
+
protobufjs.configure();
|
|
49542
|
+
return true;
|
|
49543
|
+
}
|
|
49544
|
+
avoidForeignBufferEncoding(typeof global === "undefined" ? undefined : global.Buffer);
|
|
49490
49545
|
var VerifyProtoErrorBehaviour;
|
|
49491
49546
|
(function (VerifyProtoErrorBehaviour) {
|
|
49492
49547
|
VerifyProtoErrorBehaviour[VerifyProtoErrorBehaviour["DEFAULT"] = 0] = "DEFAULT";
|