mock-repository-provider 8.1.0 → 8.1.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mock-repository-provider",
3
- "version": "8.1.0",
3
+ "version": "8.1.1",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
@@ -25,6 +25,7 @@
25
25
  ],
26
26
  "license": "BSD-2-Clause",
27
27
  "scripts": {
28
+ "prepare": "tsc --allowJs --declaration --emitDeclarationOnly --declarationDir types -t esnext -m esnext --module nodenext --moduleResolution nodenext ./src**/*.mjs",
28
29
  "test": "npm run test:ava",
29
30
  "test:ava": "ava --timeout 4m tests/*-ava.mjs tests/*-ava-node.mjs",
30
31
  "cover": "c8 -x 'tests/**/*' --temp-directory build/tmp ava --timeout 4m tests/*-ava.mjs tests/*-ava-node.mjs && c8 report -r lcov -o build/coverage --temp-directory build/tmp",
@@ -39,7 +40,7 @@
39
40
  "globby": "^14.0.1",
40
41
  "micromatch": "^4.0.2",
41
42
  "one-time-execution-method": "^3.1.1",
42
- "repository-provider": "^35.2.7",
43
+ "repository-provider": "^35.2.8",
43
44
  "repository-provider-test-support": "^3.0.5"
44
45
  },
45
46
  "devDependencies": {
@@ -0,0 +1,83 @@
1
+ export class MockBranch extends Branch {
2
+ maybeEntry(name: any): Promise<any>;
3
+ entry(name: any): Promise<any>;
4
+ entries(patterns?: string): AsyncGenerator<any, void, unknown>;
5
+ get files(): any;
6
+ }
7
+ export class MockRepository extends Repository {
8
+ get files(): any;
9
+ initializeBranches(): Promise<void>;
10
+ }
11
+ export class MockFileSystemBranch extends Branch {
12
+ entry(name: any): Promise<any>;
13
+ entry(name: any): Promise<any>;
14
+ maybeEntry(name: any): Promise<any>;
15
+ entries(matchingPatterns?: string[]): AsyncGenerator<any, void, unknown>;
16
+ get files(): any;
17
+ }
18
+ export class MockFileSystemRepository extends Repository {
19
+ initializeBranches(): Promise<Branch>;
20
+ }
21
+ /**
22
+ * @param {Object} files
23
+ */
24
+ export class MockProvider extends MultiGroupProvider {
25
+ static get attributes(): {
26
+ repositoryName: {
27
+ default: string;
28
+ };
29
+ delay: {
30
+ type: string;
31
+ default: number;
32
+ };
33
+ repositoryBases: {
34
+ default: string[];
35
+ };
36
+ name: {
37
+ env: string;
38
+ type: string;
39
+ isKey: boolean;
40
+ writable: boolean;
41
+ mandatory: boolean;
42
+ private?: boolean;
43
+ depends?: string;
44
+ additionalAttributes: string[];
45
+ description?: string;
46
+ default?: any;
47
+ set?: Function;
48
+ get?: Function;
49
+ };
50
+ url: import("pacc").AttributeDefinition;
51
+ description: import("pacc").AttributeDefinition;
52
+ priority: import("pacc").AttributeDefinition;
53
+ messageDestination: {
54
+ type: string;
55
+ default: Console;
56
+ writable: boolean;
57
+ private: boolean;
58
+ isKey: boolean;
59
+ mandatory: boolean;
60
+ depends?: string;
61
+ additionalAttributes: string[];
62
+ description?: string;
63
+ set?: Function;
64
+ get?: Function;
65
+ env?: string | string[];
66
+ };
67
+ };
68
+ constructor(files: any, options: any);
69
+ waitDelay(delay?: any): Promise<any>;
70
+ /**
71
+ * @return {string} 'http://mock-provider.com'
72
+ */
73
+ get url(): string;
74
+ get branchClass(): typeof MockBranch | typeof MockFileSystemBranch;
75
+ get repositoryClass(): typeof MockRepository | typeof MockFileSystemRepository;
76
+ initializeRepositories(): Promise<void>;
77
+ repository(name: any): Promise<Repository>;
78
+ branch(name: any): Promise<Branch>;
79
+ }
80
+ export default MockProvider;
81
+ import { Branch } from "repository-provider";
82
+ import { Repository } from "repository-provider";
83
+ import { MultiGroupProvider } from "repository-provider";