@vite-hub/source 0.1.0 → 0.3.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 (48) hide show
  1. package/README.md +83 -49
  2. package/dist/client.d.ts +1 -1
  3. package/dist/client.js +30 -4
  4. package/dist/{collection-B_4w_J8h.d.ts → collection-B8sgxw5-.d.ts} +52 -19
  5. package/dist/collection-C0Rvrx3p.js +297 -0
  6. package/dist/drizzle.d.ts +11 -4
  7. package/dist/drizzle.js +6 -8
  8. package/dist/error-diagnostics-ClQKdi7c.js +194 -0
  9. package/dist/github-D5S0dEZe.js +1312 -0
  10. package/dist/{glob-BmFqTvJY.js → glob-DmdMVqjx.js} +1 -2
  11. package/dist/index.d.ts +186 -55
  12. package/dist/index.js +152 -207
  13. package/dist/invariant-DolT9EEx.js +22 -0
  14. package/dist/mcp.d.ts +1 -1
  15. package/dist/mcp.js +25 -140
  16. package/dist/object-CtSHeGQO.js +17 -0
  17. package/dist/{path-BS8rYm0n.js → path-DFlSryRA.js} +32 -2
  18. package/dist/root-DJNmqCEW.js +11 -0
  19. package/dist/server.d.ts +7 -244
  20. package/dist/server.js +38 -45
  21. package/dist/{types-BigOktIj.d.ts → types-Ln-FxVFn.d.ts} +6 -1
  22. package/dist/vite.d.ts +77 -10
  23. package/dist/vite.js +619 -713
  24. package/package.json +25 -47
  25. package/dist/auth-B-tX_rp0.js +0 -1426
  26. package/dist/client-BwstxtdY.js +0 -8280
  27. package/dist/collection-cursor-WzV1Jd6v.js +0 -124
  28. package/dist/error-diagnostics-X0kuFjBT.js +0 -51
  29. package/dist/file-BX0FSvgE.js +0 -60
  30. package/dist/file-DadN9dbN.d.ts +0 -19
  31. package/dist/file.d.ts +0 -2
  32. package/dist/file.js +0 -2
  33. package/dist/files.d.ts +0 -15
  34. package/dist/files.js +0 -38
  35. package/dist/github.d.ts +0 -20
  36. package/dist/github.js +0 -1332
  37. package/dist/glob.d.ts +0 -23
  38. package/dist/glob.js +0 -2
  39. package/dist/markdown.d.ts +0 -5
  40. package/dist/markdown.js +0 -10
  41. package/dist/mrmime-40h5OOIp.js +0 -448
  42. package/dist/path-DOBpV8ol.js +0 -32
  43. package/dist/sse-D9gqqNPj.js +0 -448
  44. package/dist/streamableHttp-BL-E7pl5.js +0 -509
  45. package/dist/types-CoWcW8oz.js +0 -7590
  46. package/tsconfig.vite.json +0 -6
  47. package/types/source/fallback.d.ts +0 -1
  48. package/types/source/index.d.ts +0 -1
@@ -1,5 +1,4 @@
1
- import { a as __toESM, r as require_picomatch, t as createPathMatcher } from "./path-BS8rYm0n.js";
2
- import { i as sourceError, n as normalizeSafeSourcePath, r as normalizeSourcePath } from "./path-DOBpV8ol.js";
1
+ import { a as normalizeSafeSourcePath, o as normalizeSourcePath, r as require_picomatch, s as sourceError, t as createPathMatcher, u as __toESM } from "./path-DFlSryRA.js";
3
2
  import * as nativeFs from "fs";
4
3
  import { readdir, readdirSync, realpath, realpathSync, stat, statSync } from "fs";
5
4
  import { basename, dirname, isAbsolute, normalize, posix, relative, resolve, sep } from "path";
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as ProviderCollectionPage, D as CollectionCursorError, E as defineCollection, O as CollectionCursorErrorOptions, S as ProviderCollectionOptions, T as SourceCollectionOptions, _ as CollectionReadOptions, a as CollectionCursorValue, b as CursorCollectionSource, c as CollectionItem, d as CollectionOptions, f as CollectionPage, g as CollectionQueryInput, h as CollectionQueryBuilder, i as CollectionClientItem, k as CollectionCursorErrorReason, l as CollectionLoadOptions, m as CollectionQuery, n as AnyCollectionSource, o as CollectionFacetValue, p as CollectionPageOptions, r as Collection, s as CollectionFacets, t as AnyCollection, u as CollectionLoader, v as CollectionRequestQuery, w as ProviderCollectionSource, x as ProviderCollectionLoader, y as CollectionSource } from "./collection-B_4w_J8h.js";
2
- import { _ as SourceName, a as Source, c as SourceContext, d as SourceFile, f as SourceItem, g as SourceMetadata, h as SourceMap, i as RegisteredSource, l as SourceData, m as SourceListEntry, n as ReadSourceOptions, o as SourceCacheOptions, p as SourceKey, r as ReadSourceResult, s as SourceContent, t as FileSource, u as SourceEntry, v as SourceReader, y as SourceRevision } from "./types-BigOktIj.js";
1
+ import { A as CollectionCursorErrorReason, C as ProviderCollectionOptions, D as defineCollection, E as SourceCollectionOptions, O as CollectionCursorError, S as ProviderCollectionLoader, T as ProviderCollectionSource, _ as CollectionQueryInput, a as CollectionClientItem, b as CollectionSource, c as CollectionFacets, d as CollectionLoader, f as CollectionOptions, g as CollectionQueryBuilder, h as CollectionQuery, i as CollectionAccess, k as CollectionCursorErrorOptions, l as CollectionItem, m as CollectionPageOptions, n as AnyCollectionSource, o as CollectionCursorValue, p as CollectionPage, r as Collection, s as CollectionFacetValue, t as AnyCollection, u as CollectionLoadOptions, v as CollectionReadOptions, w as ProviderCollectionPage, x as CursorCollectionSource, y as CollectionRequestQuery } from "./collection-B8sgxw5-.js";
2
+ import { _ as SourceMetadata, a as SingleFileSource, b as SourceRevision, c as SourceContent, d as SourceEntry, f as SourceFile, g as SourceMap, h as SourceListEntry, i as RegisteredSource, l as SourceContext, m as SourceKey, n as ReadSourceOptions, o as Source, p as SourceItem, r as ReadSourceResult, s as SourceCacheOptions, t as FileSource, u as SourceData, v as SourceName, y as SourceReader } from "./types-Ln-FxVFn.js";
3
3
  import { ViteHubError } from "@vite-hub/runtime";
4
4
  import { StandardSchemaV1 } from "@standard-schema/spec";
5
5
  //#region src/core/array-collection.d.ts
@@ -66,56 +66,6 @@ export declare function array<TItem, const TFilter extends string = never>(load:
66
66
  schema?: undefined;
67
67
  }): ProviderCollectionSource<TItem, ArrayCollectionQuery<TFilter>, ArrayCollectionQueryInput<TFilter>>;
68
68
  //#endregion
69
- //#region src/core/combine-sources.d.ts
70
- interface CombinedSourceReader {
71
- get(key: never): Promise<unknown>;
72
- items?(): Promise<Array<{
73
- key: string;
74
- }>>;
75
- }
76
- type CombinedSources = Record<string, CombinedSourceReader>;
77
- type CombinedSourceKeyFunction<TReader> = TReader extends {
78
- get(key: infer TKey): Promise<unknown>;
79
- } ? (key: TKey) => void : never;
80
- type CombinedSourceKey<TReader> = CombinedSourceKeyFunction<TReader> extends ((key: infer TKey) => void) ? Extract<TKey, string> : never;
81
- type CombinedSourceValue<TReader> = TReader extends {
82
- get(key: never): Promise<infer TValue>;
83
- } ? TValue : never;
84
- type CombinedSourceItem<TReader> = TReader extends {
85
- items(): Promise<Array<infer TItem extends {
86
- key: string;
87
- }>>;
88
- } ? TItem : never;
89
- type Equal<TLeft, TRight> = (<T>(_value?: T) => T extends TLeft ? 1 : 2) extends (<T>(_value?: T) => T extends TRight ? 1 : 2) ? (<T>(_value?: T) => T extends TRight ? 1 : 2) extends (<T>(_value?: T) => T extends TLeft ? 1 : 2) ? true : false : false;
90
- type ValidCombinedGet<TReader> = TReader extends unknown ? TReader extends {
91
- get: infer TGet;
92
- } ? Equal<TGet, (key: CombinedSourceKey<TReader>) => Promise<CombinedSourceValue<TReader>>> extends true ? TReader : never : never : never;
93
- type ValidCombinedSource<TReader> = [CombinedSourceItem<TReader>] extends [never] ? ValidCombinedGet<TReader> : Exclude<CombinedSourceItem<TReader>["key"], CombinedSourceKey<TReader>> extends never ? ValidCombinedGet<TReader> : never;
94
- type ValidCombinedSources<TSources extends CombinedSources> = { [TSource in keyof TSources]: ValidCombinedSource<TSources[TSource]>; };
95
- type TaggedCombinedItemVariant<TSource extends string, TItem> = TItem extends {
96
- key: string;
97
- } ? Omit<TItem, "identity" | "source"> & {
98
- identity: readonly [TSource, TItem["key"]];
99
- source: TSource;
100
- } : never;
101
- type TaggedCombinedItem<TSource extends string, TReader> = TaggedCombinedItemVariant<TSource, CombinedSourceItem<TReader>>;
102
- type CombinedItem<TSources extends CombinedSources> = { [TSource in Extract<keyof TSources, string>]: TaggedCombinedItem<TSource, TSources[TSource]>; }[Extract<keyof TSources, string>];
103
- type CombinedIdentity<TSources extends CombinedSources> = { [TSource in Extract<keyof TSources, string>]: readonly [source: TSource, key: CombinedSourceKey<TSources[TSource]>]; }[Extract<keyof TSources, string>];
104
- type CombinedIdentityValue<TSources extends CombinedSources, TIdentity> = TIdentity extends readonly [infer TSource extends Extract<keyof TSources, string>, string] ? CombinedSourceValue<TSources[TSource]> : never;
105
- interface CombinedSourcesDefinition<TSources extends CombinedSources> {
106
- readonly sources: TSources & ValidCombinedSources<TSources> & Record<Exclude<keyof TSources, string>, never>;
107
- }
108
- type CombinedSourcesReader<TSources extends CombinedSources> = {
109
- get<const TIdentity extends CombinedIdentity<TSources>>(identity: TIdentity): Promise<CombinedIdentityValue<TSources, TIdentity>>;
110
- } & (TSources[keyof TSources] extends {
111
- items(): Promise<Array<{
112
- key: string;
113
- }>>;
114
- } ? {
115
- items(): Promise<Array<CombinedItem<TSources>>>;
116
- } : {});
117
- export declare function combineSources<const TSources extends CombinedSources>(definition: CombinedSourcesDefinition<TSources>): CombinedSourcesReader<TSources>;
118
- //#endregion
119
69
  //#region src/core/split-source.d.ts
120
70
  /** One part of a parent item. Its key is unique inside the parent and has no `#`. */
121
71
  type SplitSourcePart = SourceItem<string, unknown, object>;
@@ -146,7 +96,6 @@ export declare function splitSource<const TSource extends Source, TPart extends
146
96
  //#region src/core/define.d.ts
147
97
  /** Define a loader. Open it with createSource() to bind its runtime context. */
148
98
  export declare function defineSource<const TSource extends Source>(source: TSource): TSource;
149
- export declare function defineSources<const TSources extends Record<string, Source>>(sources: TSources): TSources;
150
99
  //#endregion
151
100
  //#region src/core/reader.d.ts
152
101
  export declare function createSource<const TSource extends Source>(source: TSource, context?: Partial<SourceContext>): SourceReader<TSource>;
@@ -154,7 +103,6 @@ export declare function createSource<const TSource extends Source>(source: TSour
154
103
  //#region src/core/registry.d.ts
155
104
  export declare function registerSource<const TName extends string, const TSource extends Source>(name: TName, source: TSource): TSource;
156
105
  export declare function registerSources<const TSources extends Record<string, Source>>(sources: TSources): TSources;
157
- export declare function getRegisteredSource<TName extends SourceName>(name: TName): RegisteredSource<TName>;
158
106
  export declare function clearSources(): void;
159
107
  /** Open a registered definition with the same lifecycle as direct Source readers. */
160
108
  export declare function useSource<TName extends SourceName>(name: TName, context?: Partial<SourceContext>): SourceReader<RegisteredSource<TName>>;
@@ -172,4 +120,187 @@ export declare const sourceIgnores: Readonly<{
172
120
  system: readonly string[];
173
121
  }>;
174
122
  //#endregion
175
- export { type AnyCollection, type AnyCollectionSource, type ArrayCollectionLoader, type ArrayCollectionOptions, type ArrayCollectionQuery, type ArrayCollectionQueryInput, type ArrayCollectionSnapshot, type ArrayCollectionSort, type Collection, type CollectionClientItem, CollectionCursorError, type CollectionCursorErrorOptions, type CollectionCursorErrorReason, type CollectionCursorValue, type CollectionFacetValue, type CollectionFacets, type CollectionItem, type CollectionLoadOptions, type CollectionLoader, type CollectionOptions, type CollectionPage, type CollectionPageOptions, type CollectionQuery, type CollectionQueryBuilder, type CollectionQueryInput, type CollectionReadOptions, type CollectionRequestQuery, type CollectionSource, type CursorCollectionSource, type FileSource, type ProviderCollectionLoader, type ProviderCollectionOptions, type ProviderCollectionPage, type ProviderCollectionSource, type ReadSourceOptions, type ReadSourceResult, type RegisteredSource, type Source, type SourceCacheOptions, type SourceCollectionOptions, type SourceContent, type SourceContext, type SourceData, type SourceEntry, type SourceErrorCode, type SourceFile, type SourceItem, type SourceKey, type SourceListEntry, type SourceMap, type SourceMetadata, type SourceName, type SourceReader, type SourceRevision, type SplitSource, type SplitSourceItem, type SplitSourceKey, type SplitSourceOptions, type SplitSourcePart, defineCollection };
123
+ //#region src/sources/file.d.ts
124
+ interface FileSourcePathOptions<TKey extends string = string> {
125
+ path: string;
126
+ workspacePath?: TKey;
127
+ content?: never;
128
+ mediaType?: string;
129
+ }
130
+ interface FileSourceInlineOptions<TKey extends string = string> {
131
+ workspacePath: TKey;
132
+ content: SourceContent;
133
+ mediaType?: string;
134
+ path?: never;
135
+ }
136
+ type FileSourceOptions<TKey extends string = string> = FileSourcePathOptions<TKey> | FileSourceInlineOptions<TKey>;
137
+ type FileSourceInput<TKey extends string = string> = FileSourceOptions<TKey> | TKey;
138
+ export declare function file<const TKey extends string = string>(input: FileSourceInput<TKey>): SingleFileSource<TKey>;
139
+ //#endregion
140
+ //#region src/sources/files.d.ts
141
+ interface FilesSourceOptions {
142
+ /** Removed from the start of every path, such as the folder that an `import.meta.glob()` pattern starts with. */
143
+ base?: string;
144
+ /** Put before every item's path, like glob()'s `prefix`. Keys stay without it. */
145
+ prefix?: string;
146
+ }
147
+ /** A file's content, or a function that loads it on the first read, such as an `import.meta.glob()` loader. */
148
+ type FilesSourceEntry = SourceContent | (() => SourceContent | Promise<SourceContent>);
149
+ /**
150
+ * A Source of files that the server already holds, keyed by path. A ViteHub build turns `glob()` into this, with the
151
+ * matched files in the server bundle. Call it yourself for files you hold another way.
152
+ */
153
+ export declare function files(entries: Record<string, FilesSourceEntry>, options?: FilesSourceOptions): FileSource<string>;
154
+ //#endregion
155
+ //#region src/sources/github/types.d.ts
156
+ interface GitHubSourceOptions {
157
+ repo: string;
158
+ ref?: string;
159
+ root?: string;
160
+ /**
161
+ * GitHub token, or a trusted callback that returns one. Omitted: Server Env `VITEHUB_GITHUB_TOKEN`, then `FORGES_GITHUB_TOKEN`.
162
+ * `false`: anonymous reads only.
163
+ */
164
+ auth?: false | string | (() => Promise<string | undefined> | string | undefined);
165
+ include?: string | string[];
166
+ ignore?: string | readonly string[];
167
+ cache?: false | SourceCacheOptions;
168
+ }
169
+ /** One commit that changed a file, as `GitHubSource.history()` returns it. */
170
+ interface GitHubFileCommit {
171
+ sha: string;
172
+ /** The author date, as an ISO date. */
173
+ date: string;
174
+ /** The author's GitHub login, else the Git author name, else null. */
175
+ author: string | null;
176
+ /** The first line of the commit message. */
177
+ message: string;
178
+ /** The commit page on GitHub. */
179
+ url: string;
180
+ }
181
+ interface GitHubHistoryOptions {
182
+ /** The full commit SHA to read back from. */
183
+ sha: string;
184
+ /** The page, from 1. */
185
+ page: number;
186
+ /** Commits per page, from 1 to 100. */
187
+ perPage: number;
188
+ }
189
+ /** A ref of the repository: a full commit SHA, a branch name, or a pull request number. */
190
+ type GitHubRef = {
191
+ sha: string;
192
+ } | {
193
+ branch: string;
194
+ } | {
195
+ pull: number;
196
+ };
197
+ /** A pull request, as `resolveRef({ pull })` returns it. */
198
+ interface GitHubPullRequest {
199
+ number: number;
200
+ state: "open" | "closed";
201
+ merged: boolean;
202
+ /** The head branch, such as `feat/x`. */
203
+ head: string;
204
+ /** The repository of the head branch, such as `acme/docs`. Null when the fork was deleted. */
205
+ headRepo: string | null;
206
+ /** The base branch, such as `main`. */
207
+ base: string;
208
+ /** True when the head branch lives in another repository. */
209
+ fork: boolean;
210
+ /** The label names, such as `preview:enabled`. */
211
+ labels: string[];
212
+ }
213
+ /** The commit that a ref points to. `pull` is set for a pull request ref. */
214
+ interface GitHubRefTarget {
215
+ sha: string;
216
+ pull?: GitHubPullRequest;
217
+ }
218
+ /** What github() returns: a File Source with every optional method. */
219
+ type GitHubSource = FileSource<string> & Required<Pick<FileSource<string>, "getItems" | "getMeta" | "resolveRevision">> & {
220
+ /** Whether reads send a token: `auth`, or the Server Env token when `auth` is omitted. */
221
+ authenticated(): Promise<boolean>;
222
+ /**
223
+ * The commits that changed one file, newest first, from `sha` back. It reads `GET /repos/{owner}/{repo}/commits`
224
+ * with `path`, so it does not follow renames. `more` is true when GitHub has another page.
225
+ */
226
+ history(key: string, options: GitHubHistoryOptions): Promise<{
227
+ commits: GitHubFileCommit[];
228
+ more: boolean;
229
+ }>;
230
+ /**
231
+ * The latest commit that changed each file, from the full commit SHA `sha` back. A key without commits has no entry.
232
+ * It asks GitHub GraphQL for 150 files per request, so 2,600 files cost 18 requests. Like `history()`, it does not
233
+ * follow renames.
234
+ */
235
+ latest(keys: readonly string[], options: {
236
+ sha: string;
237
+ }): Promise<Map<string, GitHubFileCommit>>;
238
+ /**
239
+ * The keys of the Source that a commit from `base` to `head` changed, with the old key of a renamed file. A file that
240
+ * one commit edits and a later one reverts is in the list. One compare request, plus one commit request per commit
241
+ * when there is more than one. Undefined when `head` does not descend from `base`, when more than 20 commits lie
242
+ * between them, or when more files changed than GitHub lists.
243
+ */
244
+ changes(base: string, head: string): Promise<string[] | undefined>;
245
+ /**
246
+ * The keys of the Source that a pull request adds or changes, from `GET /repos/{owner}/{repo}/pulls/{number}/files`.
247
+ * A renamed file gives its new key, and removed files are not listed. Undefined when the repository has no such pull
248
+ * request. GitHub lists at most 3,000 files of a pull request.
249
+ */
250
+ pullChanges(number: number): Promise<string[] | undefined>;
251
+ /**
252
+ * The commit that a ref of the repository points to now. A branch must match its full name, and a SHA must be a full
253
+ * commit SHA. Undefined when the repository has no such commit, branch, or pull request.
254
+ */
255
+ resolveRef(ref: GitHubRef, options?: {
256
+ signal?: AbortSignal;
257
+ }): Promise<GitHubRefTarget | undefined>;
258
+ /**
259
+ * Whether the history of the Source ref (the `ref` option, or the default branch) contains a commit: GitHub compares
260
+ * the ref with the commit and answers `behind` or `identical`. False for a commit that shares no history with it.
261
+ */
262
+ contains(sha: string, options?: {
263
+ signal?: AbortSignal;
264
+ }): Promise<boolean>;
265
+ /**
266
+ * The pull requests whose head commit is this commit, open or closed, from this repository or a fork. GitHub does not
267
+ * list a fork pull request for its commits, so a fork pull request counts only while it is one of the 100 most recently
268
+ * updated open pull requests.
269
+ */
270
+ pullsAt(sha: string, options?: {
271
+ signal?: AbortSignal;
272
+ }): Promise<GitHubPullRequest[]>;
273
+ };
274
+ //#endregion
275
+ //#region src/sources/github/lazy.d.ts
276
+ /**
277
+ * github() as the Source root exports it. The loader imports Node built-ins, ocache, and the forge client, so it loads
278
+ * on the first read. A bundle that imports the root and never calls github() keeps none of them.
279
+ */
280
+ export declare function github(options: GitHubSourceOptions): GitHubSource;
281
+ //#endregion
282
+ //#region src/sources/glob.d.ts
283
+ interface GlobSourceOptions {
284
+ cwd?: string;
285
+ dot?: boolean;
286
+ followSymlinks?: boolean;
287
+ /** Portable glob patterns: backslashes are separators, never escapes. Use [*], [?], [[] for literals. */
288
+ include: string | string[];
289
+ /** Uses the same portable separator and literal syntax as include. */
290
+ ignore?: string | readonly string[];
291
+ keyCache?: boolean;
292
+ prefix?: string;
293
+ }
294
+ /** A pattern such as `content/docs/**\/*.md`, or the options. */
295
+ type GlobInput = string | GlobSourceOptions;
296
+ /**
297
+ * Project files that match a pattern, such as `glob("content/docs/**\/*.md")`. Under `vite dev` they are read from
298
+ * disk, so new files show up at once. A ViteHub build bundles a call with literal options into the server, so hosts
299
+ * without a file system, such as Cloudflare Workers, serve the same files.
300
+ */
301
+ export declare function glob(input: GlobInput): FileSource<string>;
302
+ //#endregion
303
+ //#region src/sources/markdown.d.ts
304
+ export declare function markdown<const TKey extends string = string>(options: FileSourceOptions<TKey>): SingleFileSource<TKey>;
305
+ //#endregion
306
+ export { type AnyCollection, type AnyCollectionSource, type ArrayCollectionLoader, type ArrayCollectionOptions, type ArrayCollectionQuery, type ArrayCollectionQueryInput, type ArrayCollectionSnapshot, type ArrayCollectionSort, type Collection, type CollectionAccess, type CollectionClientItem, CollectionCursorError, type CollectionCursorErrorOptions, type CollectionCursorErrorReason, type CollectionCursorValue, type CollectionFacetValue, type CollectionFacets, type CollectionItem, type CollectionLoadOptions, type CollectionLoader, type CollectionOptions, type CollectionPage, type CollectionPageOptions, type CollectionQuery, type CollectionQueryBuilder, type CollectionQueryInput, type CollectionReadOptions, type CollectionRequestQuery, type CollectionSource, type CursorCollectionSource, type FileSource, type FileSourceInlineOptions, type FileSourceOptions, type FileSourcePathOptions, type FilesSourceEntry, type FilesSourceOptions, type GitHubFileCommit, type GitHubHistoryOptions, type GitHubPullRequest, type GitHubRef, type GitHubRefTarget, type GitHubSource, type GitHubSourceOptions, type GlobInput, type GlobSourceOptions, type ProviderCollectionLoader, type ProviderCollectionOptions, type ProviderCollectionPage, type ProviderCollectionSource, type ReadSourceOptions, type ReadSourceResult, type RegisteredSource, type SingleFileSource, type Source, type SourceCacheOptions, type SourceCollectionOptions, type SourceContent, type SourceContext, type SourceData, type SourceEntry, type SourceErrorCode, type SourceFile, type SourceItem, type SourceKey, type SourceListEntry, type SourceMap, type SourceMetadata, type SourceName, type SourceReader, type SourceRevision, type SplitSource, type SplitSourceItem, type SplitSourceKey, type SplitSourceOptions, type SplitSourcePart, defineCollection };