@magda/arbitraries 2.3.3 → 3.0.0-alpha.1

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