@dataform/core 3.0.53 → 3.0.55

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.d.ts CHANGED
@@ -52,6 +52,9 @@ namespace dataform {
52
52
 
53
53
  /** WorkflowSettings extension */
54
54
  extension?: (dataform.IExtension|null);
55
+
56
+ /** WorkflowSettings includeTestsInCompiledGraph */
57
+ includeTestsInCompiledGraph?: (boolean|null);
55
58
  }
56
59
 
57
60
  /** Represents a WorkflowSettings. */
@@ -108,6 +111,9 @@ namespace dataform {
108
111
  /** WorkflowSettings extension. */
109
112
  public extension?: (dataform.IExtension|null);
110
113
 
114
+ /** WorkflowSettings includeTestsInCompiledGraph. */
115
+ public includeTestsInCompiledGraph: boolean;
116
+
111
117
  /**
112
118
  * Creates a new WorkflowSettings instance using the specified properties.
113
119
  * @param [properties] Properties to set
@@ -3131,6 +3137,122 @@ namespace dataform {
3131
3137
  public static getTypeUrl(typeUrlPrefix?: string): string;
3132
3138
  }
3133
3139
 
3140
+ /** ExtensionCompilationMode enum. */
3141
+ enum ExtensionCompilationMode {
3142
+ COMPILATION_MODE_UNSPECIFIED = 0,
3143
+ PROLOGUE = 1,
3144
+ APPLICATION_CODE = 2
3145
+ }
3146
+
3147
+ /** Properties of an Extension. */
3148
+ interface IExtension {
3149
+
3150
+ /** Extension name */
3151
+ name?: (string|null);
3152
+
3153
+ /** Extension compilationMode */
3154
+ compilationMode?: (dataform.ExtensionCompilationMode|null);
3155
+
3156
+ /** Extension options */
3157
+ options?: ({ [k: string]: string }|null);
3158
+ }
3159
+
3160
+ /** Represents an Extension. */
3161
+ class Extension implements IExtension {
3162
+
3163
+ /**
3164
+ * Constructs a new Extension.
3165
+ * @param [properties] Properties to set
3166
+ */
3167
+ constructor(properties?: dataform.IExtension);
3168
+
3169
+ /** Extension name. */
3170
+ public name: string;
3171
+
3172
+ /** Extension compilationMode. */
3173
+ public compilationMode: dataform.ExtensionCompilationMode;
3174
+
3175
+ /** Extension options. */
3176
+ public options: { [k: string]: string };
3177
+
3178
+ /**
3179
+ * Creates a new Extension instance using the specified properties.
3180
+ * @param [properties] Properties to set
3181
+ * @returns Extension instance
3182
+ */
3183
+ public static create(properties?: dataform.IExtension): dataform.Extension;
3184
+
3185
+ /**
3186
+ * Encodes the specified Extension message. Does not implicitly {@link dataform.Extension.verify|verify} messages.
3187
+ * @param message Extension message or plain object to encode
3188
+ * @param [writer] Writer to encode to
3189
+ * @returns Writer
3190
+ */
3191
+ public static encode(message: dataform.IExtension, writer?: $protobuf.Writer): $protobuf.Writer;
3192
+
3193
+ /**
3194
+ * Encodes the specified Extension message, length delimited. Does not implicitly {@link dataform.Extension.verify|verify} messages.
3195
+ * @param message Extension message or plain object to encode
3196
+ * @param [writer] Writer to encode to
3197
+ * @returns Writer
3198
+ */
3199
+ public static encodeDelimited(message: dataform.IExtension, writer?: $protobuf.Writer): $protobuf.Writer;
3200
+
3201
+ /**
3202
+ * Decodes an Extension message from the specified reader or buffer.
3203
+ * @param reader Reader or buffer to decode from
3204
+ * @param [length] Message length if known beforehand
3205
+ * @returns Extension
3206
+ * @throws {Error} If the payload is not a reader or valid buffer
3207
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
3208
+ */
3209
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): dataform.Extension;
3210
+
3211
+ /**
3212
+ * Decodes an Extension message from the specified reader or buffer, length delimited.
3213
+ * @param reader Reader or buffer to decode from
3214
+ * @returns Extension
3215
+ * @throws {Error} If the payload is not a reader or valid buffer
3216
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
3217
+ */
3218
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): dataform.Extension;
3219
+
3220
+ /**
3221
+ * Verifies an Extension message.
3222
+ * @param message Plain object to verify
3223
+ * @returns `null` if valid, otherwise the reason why it is not
3224
+ */
3225
+ public static verify(message: { [k: string]: any }): (string|null);
3226
+
3227
+ /**
3228
+ * Creates an Extension message from a plain object. Also converts values to their respective internal types.
3229
+ * @param object Plain object
3230
+ * @returns Extension
3231
+ */
3232
+ public static fromObject(object: { [k: string]: any }): dataform.Extension;
3233
+
3234
+ /**
3235
+ * Creates a plain object from an Extension message. Also converts values to other types if specified.
3236
+ * @param message Extension
3237
+ * @param [options] Conversion options
3238
+ * @returns Plain object
3239
+ */
3240
+ public static toObject(message: dataform.Extension, options?: $protobuf.IConversionOptions): { [k: string]: any };
3241
+
3242
+ /**
3243
+ * Converts this Extension to JSON.
3244
+ * @returns JSON object
3245
+ */
3246
+ public toJSON(): { [k: string]: any };
3247
+
3248
+ /**
3249
+ * Gets the default type url for Extension
3250
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
3251
+ * @returns The default type url
3252
+ */
3253
+ public static getTypeUrl(typeUrlPrefix?: string): string;
3254
+ }
3255
+
3134
3256
  /** Properties of a ProjectConfig. */
3135
3257
  interface IProjectConfig {
3136
3258
 
@@ -3175,6 +3297,9 @@ namespace dataform {
3175
3297
 
3176
3298
  /** ProjectConfig defaultReservation */
3177
3299
  defaultReservation?: (string|null);
3300
+
3301
+ /** ProjectConfig includeTestsInCompiledGraph */
3302
+ includeTestsInCompiledGraph?: (boolean|null);
3178
3303
  }
3179
3304
 
3180
3305
  /** Represents a ProjectConfig. */
@@ -3228,6 +3353,9 @@ namespace dataform {
3228
3353
  /** ProjectConfig defaultReservation. */
3229
3354
  public defaultReservation: string;
3230
3355
 
3356
+ /** ProjectConfig includeTestsInCompiledGraph. */
3357
+ public includeTestsInCompiledGraph: boolean;
3358
+
3231
3359
  /**
3232
3360
  * Creates a new ProjectConfig instance using the specified properties.
3233
3361
  * @param [properties] Properties to set
@@ -10498,122 +10626,6 @@ namespace dataform {
10498
10626
  */
10499
10627
  public static getTypeUrl(typeUrlPrefix?: string): string;
10500
10628
  }
10501
-
10502
- /** ExtensionCompilationMode enum. */
10503
- enum ExtensionCompilationMode {
10504
- COMPILATION_MODE_UNSPECIFIED = 0,
10505
- PROLOGUE = 1,
10506
- APPLICATION_CODE = 2
10507
- }
10508
-
10509
- /** Properties of an Extension. */
10510
- interface IExtension {
10511
-
10512
- /** Extension name */
10513
- name?: (string|null);
10514
-
10515
- /** Extension compilationMode */
10516
- compilationMode?: (dataform.ExtensionCompilationMode|null);
10517
-
10518
- /** Extension options */
10519
- options?: ({ [k: string]: string }|null);
10520
- }
10521
-
10522
- /** Represents an Extension. */
10523
- class Extension implements IExtension {
10524
-
10525
- /**
10526
- * Constructs a new Extension.
10527
- * @param [properties] Properties to set
10528
- */
10529
- constructor(properties?: dataform.IExtension);
10530
-
10531
- /** Extension name. */
10532
- public name: string;
10533
-
10534
- /** Extension compilationMode. */
10535
- public compilationMode: dataform.ExtensionCompilationMode;
10536
-
10537
- /** Extension options. */
10538
- public options: { [k: string]: string };
10539
-
10540
- /**
10541
- * Creates a new Extension instance using the specified properties.
10542
- * @param [properties] Properties to set
10543
- * @returns Extension instance
10544
- */
10545
- public static create(properties?: dataform.IExtension): dataform.Extension;
10546
-
10547
- /**
10548
- * Encodes the specified Extension message. Does not implicitly {@link dataform.Extension.verify|verify} messages.
10549
- * @param message Extension message or plain object to encode
10550
- * @param [writer] Writer to encode to
10551
- * @returns Writer
10552
- */
10553
- public static encode(message: dataform.IExtension, writer?: $protobuf.Writer): $protobuf.Writer;
10554
-
10555
- /**
10556
- * Encodes the specified Extension message, length delimited. Does not implicitly {@link dataform.Extension.verify|verify} messages.
10557
- * @param message Extension message or plain object to encode
10558
- * @param [writer] Writer to encode to
10559
- * @returns Writer
10560
- */
10561
- public static encodeDelimited(message: dataform.IExtension, writer?: $protobuf.Writer): $protobuf.Writer;
10562
-
10563
- /**
10564
- * Decodes an Extension message from the specified reader or buffer.
10565
- * @param reader Reader or buffer to decode from
10566
- * @param [length] Message length if known beforehand
10567
- * @returns Extension
10568
- * @throws {Error} If the payload is not a reader or valid buffer
10569
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
10570
- */
10571
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): dataform.Extension;
10572
-
10573
- /**
10574
- * Decodes an Extension message from the specified reader or buffer, length delimited.
10575
- * @param reader Reader or buffer to decode from
10576
- * @returns Extension
10577
- * @throws {Error} If the payload is not a reader or valid buffer
10578
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
10579
- */
10580
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): dataform.Extension;
10581
-
10582
- /**
10583
- * Verifies an Extension message.
10584
- * @param message Plain object to verify
10585
- * @returns `null` if valid, otherwise the reason why it is not
10586
- */
10587
- public static verify(message: { [k: string]: any }): (string|null);
10588
-
10589
- /**
10590
- * Creates an Extension message from a plain object. Also converts values to their respective internal types.
10591
- * @param object Plain object
10592
- * @returns Extension
10593
- */
10594
- public static fromObject(object: { [k: string]: any }): dataform.Extension;
10595
-
10596
- /**
10597
- * Creates a plain object from an Extension message. Also converts values to other types if specified.
10598
- * @param message Extension
10599
- * @param [options] Conversion options
10600
- * @returns Plain object
10601
- */
10602
- public static toObject(message: dataform.Extension, options?: $protobuf.IConversionOptions): { [k: string]: any };
10603
-
10604
- /**
10605
- * Converts this Extension to JSON.
10606
- * @returns JSON object
10607
- */
10608
- public toJSON(): { [k: string]: any };
10609
-
10610
- /**
10611
- * Gets the default type url for Extension
10612
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
10613
- * @returns The default type url
10614
- */
10615
- public static getTypeUrl(typeUrlPrefix?: string): string;
10616
- }
10617
10629
  }
10618
10630
 
10619
10631
  /** Namespace google. */
@@ -11423,6 +11435,30 @@ declare class OperationContext implements IActionContext {
11423
11435
  apply<T>(value: Contextable<IActionContext, T>): T;
11424
11436
  }
11425
11437
 
11438
+ interface ITestConfig extends INamedConfig {
11439
+ dataset?: Resolvable;
11440
+ name?: string;
11441
+ filename?: string;
11442
+ tags?: string[];
11443
+ }
11444
+ declare class Test extends ActionBuilder<dataform.Test> {
11445
+ session: Session;
11446
+ contextableInputs: Map<string, Contextable<IActionContext, string>>;
11447
+ private contextableQuery;
11448
+ private testTarget;
11449
+ private proto;
11450
+ constructor(session?: Session, config?: ITestConfig);
11451
+ config(config: ITestConfig): this;
11452
+ dataset(ref: Resolvable): this;
11453
+ input(refName: string | string[], contextableQuery: Contextable<IActionContext, string>): this;
11454
+ expect(contextableQuery: Contextable<IActionContext, string>): this;
11455
+ getFileName(): string;
11456
+ getTarget(): dataform.Target;
11457
+ getTestTarget(): dataform.Target;
11458
+ setFilename(filename: string): void;
11459
+ compile(): dataform.Test;
11460
+ }
11461
+
11426
11462
  declare type JitViewResult = string | dataform.IJitTableResult;
11427
11463
  declare class View extends ActionBuilder<dataform.Table> {
11428
11464
  session: Session;
@@ -11476,7 +11512,7 @@ interface IRecordDescriptor {
11476
11512
  bigqueryPolicyTags?: string | string[];
11477
11513
  }
11478
11514
 
11479
- declare type Action = Table | View | IncrementalTable | Operation | Assertion | Declaration | Notebook | DataPreparation;
11515
+ declare type Action = Table | View | IncrementalTable | Operation | Assertion | Declaration | Notebook | DataPreparation | Test;
11480
11516
  declare abstract class ActionBuilder<T> {
11481
11517
  session: Session;
11482
11518
  includeAssertionsForDependency: Map<string, boolean>;
@@ -11555,28 +11591,6 @@ interface ILegacyTableAssertions {
11555
11591
  rowConditions?: string[];
11556
11592
  }
11557
11593
 
11558
- interface ITestConfig extends INamedConfig {
11559
- dataset?: Resolvable;
11560
- name?: string;
11561
- filename?: string;
11562
- }
11563
- declare class Test extends ActionBuilder<dataform.Test> {
11564
- session: Session;
11565
- contextableInputs: Map<string, Contextable<IActionContext, string>>;
11566
- private contextableQuery;
11567
- private datasetToTest;
11568
- private proto;
11569
- constructor(session?: Session, config?: ITestConfig);
11570
- config(config: ITestConfig): this;
11571
- dataset(ref: Resolvable): this;
11572
- input(refName: string | string[], contextableQuery: Contextable<IActionContext, string>): this;
11573
- expect(contextableQuery: Contextable<IActionContext, string>): this;
11574
- getFileName(): string;
11575
- getTarget(): undefined;
11576
- setFilename(filename: string): void;
11577
- compile(): dataform.Test;
11578
- }
11579
-
11580
11594
  declare class CompilationSql {
11581
11595
  private readonly project;
11582
11596
  private readonly dataformCoreVersion;
@@ -11608,16 +11622,13 @@ declare class Session {
11608
11622
  canonicalProjectConfig: dataform.ProjectConfig;
11609
11623
  actions: Action[];
11610
11624
  indexedActions: ResolvableMap<Action>;
11611
- tests: {
11612
- [name: string]: Test;
11613
- };
11625
+ tests: Action[];
11614
11626
  actionAssertionMap: ResolvableMap<Action>;
11615
11627
  graphErrors: dataform.IGraphErrors;
11616
11628
  jitContextData: google.protobuf.Struct | undefined;
11617
11629
  constructor(rootDir?: string, projectConfig?: dataform.ProjectConfig, originalProjectConfig?: dataform.ProjectConfig);
11618
11630
  init(rootDir: string, projectConfig?: dataform.ProjectConfig, originalProjectConfig?: dataform.ProjectConfig): void;
11619
11631
  compilationSql(): CompilationSql;
11620
- getContents(filePath: string): string;
11621
11632
  sqlxAction(actionOptions: {
11622
11633
  sqlxConfig: any;
11623
11634
  sqlStatementCount: number;
@@ -11652,6 +11663,7 @@ declare class Session {
11652
11663
  private alterActionName;
11653
11664
  private checkTestNameUniqueness;
11654
11665
  private checkCircularity;
11666
+ private addTestsToCompiledGraph;
11655
11667
  private removeNonUniqueActionsFromCompiledGraph;
11656
11668
  }
11657
11669
 
@@ -11667,7 +11679,7 @@ declare function jitCompiler(rpcCallback: RpcCallback): IJitCompiler;
11667
11679
 
11668
11680
  declare function main(coreExecutionRequest: Uint8Array | string): Uint8Array | string;
11669
11681
 
11670
- declare const version = "3.0.53";
11682
+ declare const version = "3.0.55";
11671
11683
 
11672
11684
  declare const session: Session;
11673
11685
  declare const supportedFeatures: dataform.SupportedFeatures[];