@baeta/generator-sdk 2.0.0-next.2 → 2.0.0-next.4
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/CHANGELOG.md +16 -0
- package/README.md +43 -18
- package/dist/index.d.ts +205 -192
- package/dist/index.js +353 -404
- package/dist/index.js.map +1 -1
- package/package.json +16 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @baeta/generator-sdk
|
|
2
2
|
|
|
3
|
+
## 2.0.0-next.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`831cfa2`](https://github.com/andreisergiu98/baeta/commit/831cfa2a11445aaf7f2d1a1d7ddf073db9bb8008) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - Fix generator overwriting types.ts file
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`831cfa2`](https://github.com/andreisergiu98/baeta/commit/831cfa2a11445aaf7f2d1a1d7ddf073db9bb8008), [`831cfa2`](https://github.com/andreisergiu98/baeta/commit/831cfa2a11445aaf7f2d1a1d7ddf073db9bb8008)]:
|
|
10
|
+
- @baeta/plugin@2.0.0-next.3
|
|
11
|
+
- @baeta/util-path@2.0.0-next.3
|
|
12
|
+
|
|
13
|
+
## 2.0.0-next.3
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [#214](https://github.com/andreisergiu98/baeta/pull/214) [`6de5d15`](https://github.com/andreisergiu98/baeta/commit/6de5d15484d341a1717a1b2f3f45272912e6a886) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - Fix generated import paths with custom config
|
|
18
|
+
|
|
3
19
|
## 2.0.0-next.2
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<div align="center">
|
|
6
6
|
<h1>Baeta</h1>
|
|
7
7
|
<a href="https://www.npmjs.com/package/@baeta/cli"><img src="https://img.shields.io/npm/v/@baeta/cli.svg?style=flat" /></a>
|
|
8
|
-
<a href="https://github.com/andreisergiu98/baeta/actions/workflows/
|
|
8
|
+
<a href="https://github.com/andreisergiu98/baeta/actions/workflows/checks.yml"><img src="https://img.shields.io/github/actions/workflow/status/andreisergiu98/baeta/checks.yml" /></a>
|
|
9
9
|
<a href="https://github.com/andreisergiu98/baeta/pulls"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" /></a>
|
|
10
10
|
<a href="https://github.com/andreisergiu98/baeta/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" /></a>
|
|
11
11
|
<br />
|
|
@@ -77,43 +77,68 @@ type Query {
|
|
|
77
77
|
#### 2. Implement your resolvers
|
|
78
78
|
|
|
79
79
|
```typescript
|
|
80
|
-
import {
|
|
80
|
+
import { UserModule } from "./typedef.ts";
|
|
81
81
|
|
|
82
|
-
const { Query } =
|
|
82
|
+
const { Query } = UserModule;
|
|
83
83
|
|
|
84
|
-
Query.user(({ args }) => {
|
|
84
|
+
const userQuery = Query.user.resolve(({ args }) => {
|
|
85
85
|
return dataSource.user.find(args.where);
|
|
86
86
|
});
|
|
87
87
|
|
|
88
|
-
Query.users(() => {
|
|
88
|
+
const usersQuery = Query.users.resolve(() => {
|
|
89
89
|
return dataSource.user.findMany();
|
|
90
90
|
});
|
|
91
|
+
|
|
92
|
+
Query.$fields({
|
|
93
|
+
user: userQuery,
|
|
94
|
+
users: usersQuery,
|
|
95
|
+
});
|
|
91
96
|
```
|
|
92
97
|
|
|
93
98
|
#### 3. Add authorization
|
|
94
99
|
|
|
95
100
|
```typescript
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
Query
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
101
|
+
import { UserModule } from "./typedef.ts";
|
|
102
|
+
|
|
103
|
+
const { Query } = UserModule;
|
|
104
|
+
|
|
105
|
+
const userQuery = Query.user
|
|
106
|
+
.$auth({
|
|
107
|
+
$or: {
|
|
108
|
+
isPublic: true,
|
|
109
|
+
isLoggedIn: true,
|
|
110
|
+
},
|
|
111
|
+
})
|
|
112
|
+
.resolve(async ({ args }) => {
|
|
113
|
+
// ...
|
|
114
|
+
});
|
|
104
115
|
```
|
|
105
116
|
|
|
106
117
|
#### 4. Add caching
|
|
107
118
|
|
|
108
119
|
```typescript
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
const { User, Query } = getUserModule();
|
|
120
|
+
const { Query, Mutation, User } = UserModule;
|
|
112
121
|
|
|
113
122
|
export const userCache = User.$createCache();
|
|
114
123
|
|
|
115
|
-
Query.user
|
|
116
|
-
|
|
124
|
+
const userQuery = Query.user
|
|
125
|
+
.$auth({
|
|
126
|
+
// ...
|
|
127
|
+
})
|
|
128
|
+
.$useCache(userCache)
|
|
129
|
+
.resolve(async ({ args }) => {
|
|
130
|
+
// ...
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
const updateUserMutation = Mutation.updateUser
|
|
134
|
+
.$use(async (next) => {
|
|
135
|
+
const user = await next();
|
|
136
|
+
await userCache.save(user);
|
|
137
|
+
return user;
|
|
138
|
+
})
|
|
139
|
+
.resolve(async ({ args }) => {
|
|
140
|
+
// ...
|
|
141
|
+
});
|
|
117
142
|
```
|
|
118
143
|
|
|
119
144
|
## Compatibility
|
package/dist/index.d.ts
CHANGED
|
@@ -1,244 +1,257 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
import * as
|
|
5
|
-
import { PluginType } from '@baeta/plugin';
|
|
1
|
+
import { PluginType } from "@baeta/plugin";
|
|
2
|
+
import { Event, EventType, Options } from "@parcel/watcher";
|
|
3
|
+
import micromatch from "micromatch";
|
|
4
|
+
import * as fs_promises0 from "fs/promises";
|
|
6
5
|
|
|
6
|
+
//#region lib/file.d.ts
|
|
7
7
|
/**
|
|
8
8
|
* Options for generated files.
|
|
9
9
|
*/
|
|
10
10
|
interface FileOptions {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Disable generation notice at the beginning of the file.
|
|
13
|
+
* @defaultValue false
|
|
14
|
+
*/
|
|
15
|
+
disableGenerationNoticeHeader?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Disable eslint-disable comment at the beginning of the file.
|
|
18
|
+
* @defaultValue false
|
|
19
|
+
*/
|
|
20
|
+
disableEslintHeader?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Disable biome v1 comment at the beginning of the file.
|
|
23
|
+
* @defaultValue false
|
|
24
|
+
*/
|
|
25
|
+
disableBiomeV1Header?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Disable biome v2 comment at the beginning of the file.
|
|
28
|
+
* @defaultValue false
|
|
29
|
+
*/
|
|
30
|
+
disableBiomeV2Header?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Dissallow overwriting the file.
|
|
33
|
+
* @defaultValue false
|
|
34
|
+
*/
|
|
35
|
+
disableOverwrite?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Add custom header at the beginning of the file.
|
|
38
|
+
*/
|
|
39
|
+
addHeader?: (name: string, content: string, tag: string) => string;
|
|
40
|
+
/**
|
|
41
|
+
* Edit the content of the file before writing it.
|
|
42
|
+
*/
|
|
43
|
+
transformContent?: (name: string, content: string, tag: string) => string | Promise<string>;
|
|
39
44
|
}
|
|
40
45
|
declare class File {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
46
|
+
persisted: boolean;
|
|
47
|
+
readonly filename: string;
|
|
48
|
+
readonly content: string;
|
|
49
|
+
readonly tag: string;
|
|
50
|
+
readonly options?: FileOptions;
|
|
51
|
+
constructor(filename: string, content: string, tag: string, options?: FileOptions);
|
|
52
|
+
write: () => Promise<void>;
|
|
53
|
+
unlink: () => Promise<void>;
|
|
54
|
+
protected buildContent(): Promise<string>;
|
|
55
|
+
protected buildHeader(): string;
|
|
56
|
+
protected createComment(comment: string): string;
|
|
52
57
|
}
|
|
53
|
-
|
|
58
|
+
//#endregion
|
|
59
|
+
//#region lib/config.d.ts
|
|
54
60
|
/**
|
|
55
61
|
* Interface for custom schema loaders.
|
|
56
62
|
*/
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
loadSync?(pointer: string, options?: TOptions): GraphQlLoaderAny[] | null | never;
|
|
63
|
+
interface Loader<TOptions = any> {
|
|
64
|
+
load(pointer: string, options?: TOptions): Promise<any[] | null>;
|
|
65
|
+
loadSync?(pointer: string, options?: TOptions): any[] | null;
|
|
61
66
|
}
|
|
62
67
|
/**
|
|
63
68
|
* Options for the Baeta Generator.
|
|
64
69
|
*/
|
|
65
70
|
interface GeneratorOptions {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
71
|
+
/**
|
|
72
|
+
* Current working directory for resolving relative paths.
|
|
73
|
+
* @defaultValue process.cwd()
|
|
74
|
+
*/
|
|
75
|
+
cwd?: string;
|
|
76
|
+
/**
|
|
77
|
+
* Glob pattern(s) to locate GraphQL schema files.
|
|
78
|
+
* @defaultValue ```ts
|
|
79
|
+
* ['src/∗∗/∗.gql', 'src/∗∗/∗.graphql']
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
82
|
+
schemas: string[];
|
|
83
|
+
/**
|
|
84
|
+
* Root directory where GraphQL modules are defined.
|
|
85
|
+
* @defaultValue 'src/modules'
|
|
86
|
+
*/
|
|
87
|
+
modulesDir?: string;
|
|
88
|
+
/**
|
|
89
|
+
* Filename for the generated module definition file.
|
|
90
|
+
* Contains type definitions and the GraphQL AST.
|
|
91
|
+
* @defaultValue 'typedef.ts'
|
|
92
|
+
*/
|
|
93
|
+
moduleDefinitionName?: string;
|
|
94
|
+
/**
|
|
95
|
+
* Output path for the generated type files.
|
|
96
|
+
* @defaultValue ```ts
|
|
97
|
+
* `${modulesDir}/../__generated__/types.ts`
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
typesDir?: string;
|
|
101
|
+
/**
|
|
102
|
+
* Configuration options for generated files.
|
|
103
|
+
*/
|
|
104
|
+
fileOptions?: FileOptions;
|
|
105
|
+
/**
|
|
106
|
+
* Custom schema loaders for processing schema files.
|
|
107
|
+
*/
|
|
108
|
+
loaders?: Loader[];
|
|
109
|
+
/**
|
|
110
|
+
* File extension to use in generated import statements.
|
|
111
|
+
* Set to false to omit extensions.
|
|
112
|
+
* @defaultValue '.ts'
|
|
113
|
+
*/
|
|
114
|
+
importExtension?: '.js' | '.ts' | false;
|
|
110
115
|
}
|
|
111
116
|
interface NormalizedGeneratorOptions {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
117
|
+
cwd: string;
|
|
118
|
+
schemas: string[];
|
|
119
|
+
modulesDir: string;
|
|
120
|
+
moduleDefinitionName: string;
|
|
121
|
+
typesDir: string;
|
|
122
|
+
fileOptions?: FileOptions;
|
|
123
|
+
loaders?: Loader[];
|
|
124
|
+
importExtension: '.js' | '.ts' | '';
|
|
120
125
|
}
|
|
121
126
|
declare function loadOptions(options: GeneratorOptions): NormalizedGeneratorOptions;
|
|
122
|
-
|
|
127
|
+
//#endregion
|
|
128
|
+
//#region lib/file-manager.d.ts
|
|
123
129
|
declare class FileManager {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
130
|
+
files: File[];
|
|
131
|
+
fileOptions?: FileOptions;
|
|
132
|
+
constructor(fileOptions?: FileOptions);
|
|
133
|
+
createAndAdd(filename: string, content: string, tag: string, options?: FileOptions): File;
|
|
134
|
+
add(...file: File[]): void;
|
|
135
|
+
get(filename: string): File | undefined;
|
|
136
|
+
getAll(): File[];
|
|
137
|
+
getByTag(tag: string): File[];
|
|
138
|
+
remove(filename: string): void;
|
|
139
|
+
removeAll(): void;
|
|
140
|
+
removeByTag(tag: string): void;
|
|
141
|
+
writeAll(): Promise<void[]>;
|
|
142
|
+
writeByTag(tag: string): Promise<void[]>;
|
|
143
|
+
unlinkAll(): Promise<void>;
|
|
144
|
+
getPersistedFiles(): File[];
|
|
139
145
|
}
|
|
140
|
-
|
|
146
|
+
//#endregion
|
|
147
|
+
//#region lib/watcher-ignore.d.ts
|
|
141
148
|
type MatchFn = (testString: string) => boolean;
|
|
142
149
|
type MatchPattern = string | RegExp | MatchFn;
|
|
143
150
|
declare class WatcherIgnore {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
151
|
+
private readonly cwd;
|
|
152
|
+
private files;
|
|
153
|
+
private regexps;
|
|
154
|
+
private functions;
|
|
155
|
+
private globs;
|
|
156
|
+
private readonly globsMap;
|
|
157
|
+
constructor(cwd: string);
|
|
158
|
+
ignore(pattern: MatchPattern): void;
|
|
159
|
+
isMicromatch(pattern: string): boolean;
|
|
160
|
+
resolveFile(file: string): string;
|
|
161
|
+
unignore(pattern: MatchPattern): void;
|
|
162
|
+
isIgnored(path: string): boolean;
|
|
156
163
|
}
|
|
157
|
-
|
|
164
|
+
//#endregion
|
|
165
|
+
//#region lib/watcher.d.ts
|
|
158
166
|
declare const isMatch: (string: string, pattern: string | readonly string[], options?: micromatch.Options) => boolean;
|
|
159
167
|
type WatcherListener = (path: WatcherFile) => void;
|
|
160
168
|
interface WatcherFile {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
169
|
+
type: EventType;
|
|
170
|
+
path: string;
|
|
171
|
+
relativePath: string;
|
|
164
172
|
}
|
|
165
173
|
declare class Watcher {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
174
|
+
private readonly cwd;
|
|
175
|
+
private readonly options?;
|
|
176
|
+
private readonly subscription;
|
|
177
|
+
private readonly listeners;
|
|
178
|
+
private readonly watcherIgnore;
|
|
179
|
+
constructor(cwd: string, options?: Options);
|
|
180
|
+
onEvents: (err: Error | null, events: Event[]) => void;
|
|
181
|
+
on(event: EventType, listener: WatcherListener): void;
|
|
182
|
+
off(event: EventType, listener: WatcherListener): void;
|
|
183
|
+
ignore(pattern: MatchPattern): void;
|
|
184
|
+
unignore(pattern: MatchPattern): void;
|
|
185
|
+
createSubscription(): {
|
|
186
|
+
unsubscribe: () => Promise<void>;
|
|
187
|
+
};
|
|
188
|
+
close(): Promise<void>;
|
|
181
189
|
}
|
|
182
|
-
|
|
190
|
+
//#endregion
|
|
191
|
+
//#region lib/ctx.d.ts
|
|
183
192
|
type Ctx<T = unknown> = {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
193
|
+
fileManager: FileManager;
|
|
194
|
+
didSetup: string[];
|
|
195
|
+
didGenerate: string[];
|
|
196
|
+
didEnd: string[];
|
|
197
|
+
pluginNames: string[];
|
|
198
|
+
generatorOptions: NormalizedGeneratorOptions;
|
|
199
|
+
watching: boolean;
|
|
200
|
+
changedFile?: WatcherFile;
|
|
192
201
|
} & T;
|
|
193
|
-
|
|
202
|
+
//#endregion
|
|
203
|
+
//#region lib/file-block.d.ts
|
|
194
204
|
declare class FileBlock extends File {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
205
|
+
filename: string;
|
|
206
|
+
content: string;
|
|
207
|
+
start: string;
|
|
208
|
+
end: string;
|
|
209
|
+
tag: string;
|
|
210
|
+
constructor(filename: string, content: string, start: string, end: string, tag: string, options?: FileOptions);
|
|
211
|
+
write: () => Promise<void>;
|
|
212
|
+
unlink: () => Promise<void>;
|
|
213
|
+
protected getExistingContent(): Promise<readonly [string, fs_promises0.FileHandle] | readonly ["", null]>;
|
|
214
|
+
protected getSlices(existingContent: string): readonly [string, "", false] | readonly [string, string, true];
|
|
215
|
+
protected addBlockToContent(existingContent: string): string;
|
|
216
|
+
protected buildPadding(existingContent: string): "" | "\n" | "\n\n";
|
|
207
217
|
}
|
|
208
|
-
|
|
218
|
+
//#endregion
|
|
219
|
+
//#region lib/module.d.ts
|
|
209
220
|
declare function getModuleExportName(name: string): string;
|
|
210
|
-
|
|
221
|
+
//#endregion
|
|
222
|
+
//#region lib/plugin.d.ts
|
|
211
223
|
declare const GeneratorPluginVersion: {
|
|
212
|
-
|
|
224
|
+
readonly V1: "v1";
|
|
213
225
|
};
|
|
214
226
|
type GeneratorPluginVersion = (typeof GeneratorPluginVersion)[keyof typeof GeneratorPluginVersion];
|
|
215
227
|
type GeneratorPluginV1Fn<Store = unknown> = (ctx: Ctx<Store>, next: () => Promise<void>) => Promise<void>;
|
|
216
228
|
type GeneratorPluginV1ReloadFn = (file: WatcherFile) => void;
|
|
217
229
|
type GeneratorPluginV1WatchOptions = (options: NormalizedGeneratorOptions, watcher: Watcher, reload: GeneratorPluginV1ReloadFn) => void;
|
|
218
230
|
type GeneratorPluginV1Factory<Store = unknown> = {
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
231
|
+
name: string;
|
|
232
|
+
actionName: string;
|
|
233
|
+
setup?: GeneratorPluginV1Fn<Store>;
|
|
234
|
+
generate?: GeneratorPluginV1Fn<Store>;
|
|
235
|
+
end?: GeneratorPluginV1Fn<Store>;
|
|
236
|
+
watch?: GeneratorPluginV1WatchOptions;
|
|
225
237
|
};
|
|
226
238
|
interface GeneratorPluginV1<Store = unknown> {
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
239
|
+
name: string;
|
|
240
|
+
actionName: string;
|
|
241
|
+
version: typeof GeneratorPluginVersion.V1;
|
|
242
|
+
type: typeof PluginType.Generator;
|
|
243
|
+
setup: GeneratorPluginV1Fn<Store>;
|
|
244
|
+
generate: GeneratorPluginV1Fn<Store>;
|
|
245
|
+
end: GeneratorPluginV1Fn<Store>;
|
|
246
|
+
watch: GeneratorPluginV1WatchOptions;
|
|
235
247
|
}
|
|
236
248
|
declare function createPluginV1<Store = unknown>(options: GeneratorPluginV1Factory<Store>): GeneratorPluginV1<Store>;
|
|
237
249
|
declare function isGeneratorPlugin(plugin: {
|
|
238
|
-
|
|
250
|
+
type: PluginType;
|
|
239
251
|
}): plugin is GeneratorPluginV1<unknown>;
|
|
240
252
|
declare function getGeneratorPlugins(plugins?: Array<{
|
|
241
|
-
|
|
253
|
+
type: PluginType;
|
|
242
254
|
}>): GeneratorPluginV1<unknown>[];
|
|
243
|
-
|
|
244
|
-
export {
|
|
255
|
+
//#endregion
|
|
256
|
+
export { Ctx, File, FileBlock, FileManager, FileOptions, GeneratorOptions, GeneratorPluginV1, GeneratorPluginV1Factory, GeneratorPluginV1Fn, GeneratorPluginV1ReloadFn, GeneratorPluginV1WatchOptions, GeneratorPluginVersion, Loader, MatchFn, MatchPattern, NormalizedGeneratorOptions, Watcher, WatcherFile, WatcherIgnore, WatcherListener, createPluginV1, getGeneratorPlugins, getModuleExportName, isGeneratorPlugin, isMatch, loadOptions, micromatch };
|
|
257
|
+
//# sourceMappingURL=index.d.ts.map
|