@magda/arbitraries 2.3.3 → 3.0.0-alpha.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.
Files changed (3) hide show
  1. package/dist/index.d.ts +28 -26
  2. package/dist/index.js +53967 -221
  3. package/package.json +18 -10
package/dist/index.d.ts CHANGED
@@ -1,10 +1,12 @@
1
1
  /// <reference types="node" />
2
+
3
+ import { Arbitrary } from 'jsverify';
2
4
  import jsc from 'jsverify';
3
5
 
4
- export declare function arbFlatMap<T, U>(arb: jsc.Arbitrary<T>, arbForward: (t: T) => jsc.Arbitrary<U>, backwards: (u: U) => T, show?: (u: U) => string | undefined): MonadicArb<U>;
6
+ export declare function arbFlatMap<T, U>(arb: Arbitrary<T>, arbForward: (t: T) => Arbitrary<U>, backwards: (u: U) => T, show?: (u: U) => string | undefined): MonadicArb<U>;
5
7
 
6
8
  /** Generates an array that is guaranteed to be of the supplied size */
7
- export declare function arrayOfSizeArb<T>(size: number, arb: jsc.Arbitrary<T>): jsc.Arbitrary<T[]>;
9
+ export declare function arrayOfSizeArb<T>(size: number, arb: Arbitrary<T>): Arbitrary<T[]>;
8
10
 
9
11
  /**
10
12
  *
@@ -17,7 +19,7 @@ export declare const datasetFormatArb: ({ format }: DatasetFormatOverrideArbs) =
17
19
  * Can be passed into datasetFormatArb to override the default arbitaries.
18
20
  */
19
21
  export declare type DatasetFormatOverrideArbs = {
20
- format?: jsc.Arbitrary<string>;
22
+ format?: Arbitrary<string>;
21
23
  };
22
24
 
23
25
  export declare const dateStringArb: jsc.Arbitrary<string>;
@@ -36,9 +38,9 @@ export declare const distStringsArb: ({ url, license, format }: DistStringsOverr
36
38
  * Can be passed into distStringsArb to override the default arbitraries.
37
39
  */
38
40
  export declare type DistStringsOverrideArbs = {
39
- url?: jsc.Arbitrary<string>;
40
- license?: jsc.Arbitrary<string>;
41
- format?: jsc.Arbitrary<string>;
41
+ url?: Arbitrary<string>;
42
+ license?: Arbitrary<string>;
43
+ format?: Arbitrary<string>;
42
44
  };
43
45
 
44
46
  /** Generates a URL for a distribution - this could be ftp, http or https */
@@ -48,13 +50,13 @@ export declare const distUrlArb: ({ schemeArb, hostArb }?: UrlArbOptions) => jsc
48
50
  * Fuzzes a string, changing the case and putting random strings around it
49
51
  * and in spaces.
50
52
  */
51
- export declare function fuzzStringArb(string: string, fuzzArb?: jsc.Arbitrary<string>): jsc.Arbitrary<string>;
53
+ export declare function fuzzStringArb(string: string, fuzzArb?: Arbitrary<string>): Arbitrary<string>;
52
54
 
53
55
  /**
54
56
  * Gets the result of the passed string arbitrary and fuzzes it, changing
55
57
  * the case and putting random strings around it and in spaces.
56
58
  */
57
- export declare function fuzzStringArbResult(stringArb: jsc.Arbitrary<string>, fuzzArb?: jsc.Arbitrary<string>): MonadicArb<string>;
59
+ export declare function fuzzStringArbResult(stringArb: Arbitrary<string>, fuzzArb?: Arbitrary<string>): MonadicArb<string>;
58
60
 
59
61
  export declare const lcAlphaNumCharArb: jsc.Arbitrary<string>;
60
62
 
@@ -68,8 +70,8 @@ export declare const lcAlphaStringArbNe: jsc.Arbitrary<string>;
68
70
 
69
71
  export declare const lowerCaseAlphaCharArb: jsc.Arbitrary<string>;
70
72
 
71
- export declare type MonadicArb<T> = jsc.Arbitrary<T> & {
72
- flatMap<U>(arbForward: (t: T) => jsc.Arbitrary<U>, backwards: (u: U) => T): MonadicArb<U>;
73
+ export declare type MonadicArb<T> = Arbitrary<T> & {
74
+ flatMap<U>(arbForward: (t: T) => Arbitrary<U>, backwards: (u: U) => T): MonadicArb<U>;
73
75
  };
74
76
 
75
77
  export declare const numArb: jsc.Arbitrary<string>;
@@ -77,28 +79,28 @@ export declare const numArb: jsc.Arbitrary<string>;
77
79
  export declare const peopleNameArb: jsc.Arbitrary<string>;
78
80
 
79
81
  /**
80
- * A record in the registry, usually including data for one or more aspects, unique for a tenant.
81
- */
82
+ * A record in the registry, usually including data for one or more aspects, unique for a tenant.
83
+ */
82
84
  declare class Record_2 {
83
85
  /**
84
- * The identifier of the record
85
- */
86
+ * The identifier of the record
87
+ */
86
88
  'id': string;
87
89
  /**
88
- * The name of the record
89
- */
90
+ * The name of the record
91
+ */
90
92
  'name': string;
91
93
  /**
92
- * The aspects included in this record
93
- */
94
+ * The aspects included in this record
95
+ */
94
96
  'aspects': any;
95
97
  /**
96
- * A tag representing the action by the source of this record (e.g. an id for a individual crawl of a data portal).
97
- */
98
+ * A tag representing the action by the source of this record (e.g. an id for a individual crawl of a data portal).
99
+ */
98
100
  'sourceTag': string;
99
101
  /**
100
- * The identifier of a tenant
101
- */
102
+ * The identifier of a tenant
103
+ */
102
104
  'tenantId': number;
103
105
  }
104
106
  export { Record_2 as Record }
@@ -119,7 +121,7 @@ export declare const recordArbWithDists: (dists: object[]) => jsc.Arbitrary<Reco
119
121
  /**
120
122
  * Randomly returns a subset of the array, in-order.
121
123
  */
122
- export declare function someOf<T>(array: T[]): jsc.Arbitrary<T[]>;
124
+ export declare function someOf<T>(array: T[]): Arbitrary<T[]>;
123
125
 
124
126
  /**
125
127
  * Generates the content of source link status aspect
@@ -132,7 +134,7 @@ export declare const sourceLinkArb: ({ status }: SourceLinkOverrideArbs) => jsc.
132
134
  * Can be passed into sourceLinkArb to override the default arbitraries.
133
135
  */
134
136
  export declare type SourceLinkOverrideArbs = {
135
- status?: jsc.Arbitrary<string | undefined>;
137
+ status?: Arbitrary<string | undefined>;
136
138
  };
137
139
 
138
140
  export declare const specificRecordArb: (aspectArbs: {
@@ -146,8 +148,8 @@ export declare const specificRecordArb: (aspectArbs: {
146
148
  export declare const stringArb: jsc.Arbitrary<string>;
147
149
 
148
150
  declare type UrlArbOptions = {
149
- schemeArb?: jsc.Arbitrary<string>;
150
- hostArb?: jsc.Arbitrary<string>;
151
+ schemeArb?: Arbitrary<string>;
152
+ hostArb?: Arbitrary<string>;
151
153
  };
152
154
 
153
155
  export { }