@jpmorganchase/mosaic-types 0.1.0-beta.10

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.
@@ -0,0 +1,40 @@
1
+ /// <reference types="node" resolution-mode="require"/>
2
+ import type { Options, Pattern, Entry } from 'fast-glob';
3
+ import type { DirectoryJSON, IRealpathOptions, IMkdirOptions, IReaddirOptions, IStatOptions, TData, TMode, TDataOut, Dirent, Stats, TStatNumber } from 'memfs';
4
+ import type { PathLike, symlink } from 'fs';
5
+ import type { Page } from './Page.js';
6
+ /**
7
+ * This is the core underlying filesystem, which directly interfaces with a memfs Volume to mutate the filesystem
8
+ */
9
+ export interface IFileAccess {
10
+ glob(pattern: Pattern, options?: Omit<Options, 'absolute' | 'fs'>): Promise<string[] | Entry[]>;
11
+ mkdir(dir: PathLike, options?: TMode | IMkdirOptions): Promise<void>;
12
+ readdir(dir: PathLike, options?: string | IReaddirOptions): Promise<TDataOut[] | Dirent[]>;
13
+ readFile(file: PathLike): Promise<TDataOut>;
14
+ realpath(target: string, options?: string | IRealpathOptions): Promise<TDataOut>;
15
+ stat(file: PathLike, options?: IStatOptions): Promise<Stats<TStatNumber>>;
16
+ unlink(target: PathLike): Promise<void>;
17
+ symlink(target: PathLike, alias: PathLike, type?: symlink.Type): Promise<void>;
18
+ writeFile(file: PathLike, data: TData): Promise<void>;
19
+ toJSON(): DirectoryJSON;
20
+ fromJSON(json: DirectoryJSON): void;
21
+ exists(file: PathLike): Promise<boolean>;
22
+ $$reset(): void;
23
+ $$freeze(): void;
24
+ readonly $$frozen: boolean;
25
+ $$unfreeze(): void;
26
+ $$clearCache(): void;
27
+ $$symlinksFromJSON(page: {
28
+ [key: string]: {
29
+ target: string;
30
+ type: string;
31
+ }[];
32
+ }): Promise<void>;
33
+ symlinksToJSON(): {
34
+ [key: string]: {
35
+ target: string;
36
+ type: string;
37
+ }[];
38
+ };
39
+ $$addReadFileHook(hook: (result: Page, filepath: PathLike) => Promise<Page>): void;
40
+ }
package/dist/Meta.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ export declare type Meta<AdditionalProps> = {
2
+ title?: string;
3
+ route: string;
4
+ lastModified: Date;
5
+ } & Record<string, unknown> & AdditionalProps;
package/dist/Mode.d.ts ADDED
@@ -0,0 +1 @@
1
+ export declare type MosaicMode = 'active' | 'static';
@@ -0,0 +1,74 @@
1
+ export interface Aliases {
2
+ [key: string]: Set<string>;
3
+ }
4
+ export interface FSRef {
5
+ $$path?: string | string[];
6
+ $$value?: string;
7
+ }
8
+ export interface GlobalRefs {
9
+ [key: string]: FSRef;
10
+ }
11
+ export interface ScopedRefs {
12
+ [key: string]: FSRef;
13
+ }
14
+ export interface BaseData {
15
+ refs?: ScopedRefs | [];
16
+ globalRefs?: GlobalRefs | [];
17
+ aliases?: Aliases | [];
18
+ }
19
+ export declare type MutableData<T = {}> = ImmutableData<T> & {
20
+ /**
21
+ * Set arbitrary data onto the config object. This value will persist across plugins and
22
+ * also be sent to the parent process when it executes plugins there as well.
23
+ * Values can be retrieved from `data`.
24
+ * This data is one-way, it can only be set/mutated in the child process lifecycle stages
25
+ * This will be reset everytime the relevant source receives new pages
26
+ * @param data Data to MERGE into the existing blob
27
+ */
28
+ setData(data: Partial<T>, overwrite?: boolean): void;
29
+ /**
30
+ * Helper function for declaring new aliases that will be applied by the AliasPlugin.
31
+ * Values can be retrieved from `data.aliases`
32
+ * This will be reset everytime the relevant source receives new pages
33
+ * @param fullPath The file/fullPath the alias will point to
34
+ * @param aliases Array of aliases to use when pointing to this page
35
+ */
36
+ setAliases(targetPath: string, aliases: string[]): void;
37
+ /**
38
+ * Helper function for declaring new tags (which are basically aliases to /.tags) that will be applied by the AliasPlugin.
39
+ * Values can be retrieved from `data.aliases`
40
+ * This will be reset everytime the relevant source receives new pages
41
+ * @param fullPath The file/fullPath the alias will point to
42
+ * @param tags Array of tag names to use when pointing to this page
43
+ */
44
+ setTags(targetPath: string, tags: string[]): void;
45
+ /**
46
+ * Helper function for declaring new refs that will be applied by the RefPlugin
47
+ * This will be reset everytime the relevant source receives new pages
48
+ * Values can be retrieved from `data.refs`
49
+ * @param targetPath The file/fullPath to write the ref to
50
+ * @param targetPropPath The path to the property where the ref will be applied
51
+ * @param refValue The value of the ref (can be a wildcard)
52
+ */
53
+ setRef(targetFilepath: string, targetPropPath: string | string[], refValue: string): void;
54
+ /**
55
+ * Same as `setRef`, but do not pre-resolve this ref - wait until the file is read and use the global filesystem for it
56
+ * @param targetPath The file/fullPath to write the ref to
57
+ * @param targetPropPath The path to the property where the ref will be applied
58
+ * @param refValue The value of the ref (can be a wildcard)
59
+ */
60
+ setGlobalRef(targetFilepath: string, targetPropPath: string | string[], refValue: string): void;
61
+ /**
62
+ * This object, but without the mutation methods like `setAliases`, `setData` etc
63
+ */
64
+ asReadOnly(): ImmutableData<T>;
65
+ };
66
+ export declare type ImmutableData<T = {}> = {
67
+ readonly data: Readonly<T & {
68
+ readonly refs: string[];
69
+ readonly aliases: Set<{
70
+ $$path: string[];
71
+ $$value: string;
72
+ }>;
73
+ }>;
74
+ };
package/dist/Page.d.ts ADDED
@@ -0,0 +1,20 @@
1
+ /**
2
+ * `Page` is a type, which at a minimum has a `fullPath`, but can also contain metadata and `content`
3
+ */
4
+ export declare type Page = {
5
+ fullPath: string;
6
+ title?: string;
7
+ /**
8
+ * Friendly fullPaths are the shortest possible paths that will point to a page.
9
+ * They are useful for creating more user-friendly links on pages, rather than using a full filesystem path.
10
+ * They originally start as the same as `fullPath`, but can be modified by plugins whenever they make a change to how a page resolves.
11
+ * e.g. The `PagesWithoutFileExtPlugin` modifies the friendly fullPath after it creates aliases for every page (to allow
12
+ * them to be referenced without a file extension). Another example would be a plugin that allows `/index` to be
13
+ * automatically added if a fullPath points to a directory -- the `route` could then be modified by that
14
+ * plugin to remove `/index`
15
+ */
16
+ route?: string;
17
+ lastModified?: Date;
18
+ type?: string;
19
+ content?: string;
20
+ };
@@ -0,0 +1,113 @@
1
+ import type { IUnionVolume, IVolumeImmutable, IVolumeMutable, IVolumePartiallyMutable } from './Volume.js';
2
+ import type { PluginModuleDefinition } from './index.js';
3
+ import type { Serialiser } from './Serialiser.js';
4
+ import type { Page } from './Page.js';
5
+ import type { MutableData, ImmutableData } from './MutableData.js';
6
+ export declare type LoadedPlugin = Partial<Plugin<Page>> & PluginModuleDefinition;
7
+ export declare type LifecycleMethod = keyof Plugin<Page>;
8
+ /**
9
+ * Plugins are lifecycle-based hooks that are called on every source at different stages.
10
+ * Consumers will never need to invoke a lifecycle method; but for technical clarity - when a lifecycle method is called,
11
+ * it will trigger `pluginRunner` which executes it on every source automatically.
12
+ */
13
+ export declare type Plugin<TPage extends Page = Page, TOptions = Record<string, unknown>, ConfigData = Record<string, unknown>, GlobalConfigData = ConfigData> = {
14
+ /**
15
+ * Plugin lifecycle method that triggers inside child processes.
16
+ * The first lifecycle hook to trigger after receiving pages from a source. The pages can safely be mutated and will be reflected in the final
17
+ * filesystem that gets generated.
18
+ * @param pages Array of pages from the source
19
+ * @param param.serialiser A matching `Serialiser` for serialising/deserialising pages when reading/writing to the filesystem
20
+ * @param param.config A mutable object for sharing data with other lifecycle phases of all plugins for this source (including in the main thread) in this plugin
21
+ * @param options The options passed in when declaring the plugin
22
+ * @returns {Promise<Page[]>} Must re-return an array of `Page` objects, modified or not
23
+ */
24
+ $afterSource?: (pages: TPage[], helpers: {
25
+ serialiser: Serialiser<TPage>;
26
+ config: MutableData<ConfigData>;
27
+ pageExtensions: string[];
28
+ ignorePages: string[];
29
+ }, options?: TOptions) => Promise<Array<TPage>>;
30
+ /**
31
+ * Plugin lifecycle method that triggers inside child processes.
32
+ * Calls after a filesystem has been built up from the source pages.
33
+ * @param mutableFilesystem Mutable virtual filesystem instance with all of this source's pages inside (and symlinks applied)
34
+ * @param param.serialiser A matching `Serialiser` for serialising/deserialising pages when reading/writing to the filesystem
35
+ * @param param.config A mutable object for sharing data with other lifecycle phases of all plugins for this source (including in the main thread) in this plugin
36
+ * @param options The options passed in when declaring the plugin
37
+ * @returns {void} No return expected
38
+ */
39
+ $beforeSend?: (mutableFilesystem: IVolumePartiallyMutable, helpers: {
40
+ serialiser: Serialiser<TPage>;
41
+ pageExtensions: string[];
42
+ ignorePages: string[];
43
+ config: MutableData<ConfigData>;
44
+ }, options?: TOptions) => Promise<void>;
45
+ /**
46
+ * Plugin lifecycle method that triggers inside the main process.
47
+ * Calls after the filesystem and symlinks have been reconstructed due to a change to the current source. This happens in the main thread.
48
+ * Pages will NOT be cached when read at this stage, to allow for reading content and writing a new copy of it without the cached version taking effect.
49
+ * This method is safe to use with lazy loading, as the filesystem should return the full page when read.
50
+ * NOTE: Plugin methods that trigger inside the parent process should be async and highly optimised to avoid holding up the main thread.
51
+ * You should also be mindful of race conditions when reading / writing to the global filesystem from this method - as other plugins may
52
+ * also have a read copy of the same file and it could end up out of sync.
53
+ * @param mutableFilesystem Mutable filesystem instance with all of this source's pages inside (and symlinks re-applied)
54
+ * @param param.serialiser A matching `Serialiser` for serialising/deserialising pages when reading/writing to the filesystem
55
+ * @param param.config An immutable object for reading data from other lifecycle phases of all plugins for this source in the child process for this plugin. Shared only with this source.
56
+ * @param param.globalConfig An immutable object for reading data from other lifecycle phases of all plugins. Shared across all sources.
57
+ * @param param.sharedFilesystem Mutable filesystem instance independent of any sources. Useful for global pages, like sitemaps
58
+ * @param param.globalFilesystem Immutable union filesystem instance with all source's pages (and symlinks applied)
59
+ * @param options The options passed in when declaring the plugin
60
+ * @returns {void} No return expected
61
+ */
62
+ afterUpdate?: (mutableFilesystem: IVolumePartiallyMutable, helpers: {
63
+ serialiser: Serialiser<TPage>;
64
+ config: ImmutableData<ConfigData>;
65
+ globalFilesystem: IUnionVolume;
66
+ sharedFilesystem: IVolumeMutable;
67
+ globalConfig: ImmutableData<GlobalConfigData>;
68
+ pageExtensions: string[];
69
+ ignorePages: string[];
70
+ }, options?: TOptions) => Promise<void>;
71
+ /**
72
+ * Plugin lifecycle method that triggers inside the main process everytime ANY source emits new pages.
73
+ * This method should return a boolean that will indicate if this source should clear page caches.
74
+ * This method calls whenever another source (not this one) has changed.
75
+ * Returning `undefined`, false or no value, will result in the cache to be retained
76
+ * @param updatedSourceFilesystem Immutable filesystem for the source that changed
77
+ * @param param.config An immutable object for reading data from other lifecycle phases of all plugins for this source in the child process for this plugin
78
+ * @param param.serialiser A matching `Serialiser` for serialising/deserialising pages when reading/writing to the filesystem
79
+ * @param param.globalFilesystem Immutable union filesystem instance with all source's pages (and symlinks applied)
80
+ * @param options The options passed in when declaring the plugin
81
+ * @returns {Promise<boolean>} A boolean indicating whether to clear the cache for this source
82
+ */
83
+ shouldClearCache?: (updatedSourceFilesystem: IVolumeImmutable, helpers: {
84
+ serialiser: Serialiser<TPage>;
85
+ config: ImmutableData<ConfigData>;
86
+ globalFilesystem: IUnionVolume;
87
+ pageExtensions: string[];
88
+ ignorePages: string[];
89
+ }, options?: TOptions) => Promise<boolean>;
90
+ /**
91
+ * Plugin lifecycle method that triggers inside the main process whenever a request to save content is made.
92
+ * This method should return the result of the save
93
+ * Returning `undefined`, false or no value, will result in the plugin runner discarding the result.
94
+ * @param path the route of the content being edited.
95
+ * @param data the data from the the request
96
+ * @param sourceOptions options used to create the source that is running the plugin
97
+ * @param mutableFilesystem Mutable filesystem instance with all of this source's pages inside (and symlinks re-applied)
98
+ * @param param.serialiser A matching `Serialiser` for serialising/deserialising pages when reading/writing to the filesystem
99
+ * @param param.config An immutable object for reading data from other lifecycle phases of all plugins for this source in the child process for this plugin. Shared only with this source.
100
+ * @param param.sharedFilesystem Mutable filesystem instance independent of any sources. Useful for global pages, like sitemaps
101
+ * @param param.namespace The namespace of the source running the plugin
102
+ * @param options The options passed in when declaring the plugin
103
+ * @returns {Promise<unknown>} The result of the save
104
+ */
105
+ saveContent?(path: string, data: unknown, sourceOptions: unknown, helpers: {
106
+ serialiser: Serialiser<TPage>;
107
+ config: ImmutableData<ConfigData>;
108
+ sharedFilesystem: IVolumeMutable;
109
+ pageExtensions: string[];
110
+ ignorePages: string[];
111
+ namespace: string;
112
+ }, options?: TOptions): Promise<unknown>;
113
+ };
@@ -0,0 +1,26 @@
1
+ import type { TDataOut } from 'memfs';
2
+ import type { SerialiserModuleDefinition } from './index.js';
3
+ import type { Page } from './Page.js';
4
+ /**
5
+ * Serialisers are a form of plugin that tells Mosaic how to turn a file from/to a storable form for the filesystem
6
+ * or a `Page` object.
7
+ * For technical clarity - when a parser method is called, it will trigger `parserRunner` which checks the `fullPath` against
8
+ * the `test` option that was passed in the Mosaic config file, to find a suitable parser.
9
+ */
10
+ export declare type Serialiser<TPage extends Page = Page> = {
11
+ /**
12
+ * Method to turn a raw page (e.g. an MDX file) into a `Page` object
13
+ * @param fullPath Route on virtual disk (should be full fullPath, not an alias)
14
+ * @param page Page in string or buffer form (i.e. an MDX page with frontmatter or a JSON file as a string)
15
+ * @returns Page object in the `Page` format
16
+ */
17
+ deserialise: (fullPath: string, page: TDataOut) => Promise<TPage>;
18
+ /**
19
+ * Method to load a raw page from disk (e.g. an MDX file) and return into a `Page` object
20
+ * @param fullPath Route on virtual disk (should be full fullPath, not an alias)
21
+ * @param page Page in `Page` form
22
+ * @returns Page content
23
+ */
24
+ serialise: (fullPath: string, page: TPage) => Promise<TDataOut>;
25
+ };
26
+ export declare type LoadedSerialiser = Serialiser & SerialiserModuleDefinition;
@@ -0,0 +1,39 @@
1
+ export declare type JWT = {
2
+ exp: number;
3
+ UserID?: string;
4
+ JPMCIdentifier?: string;
5
+ UID?: string;
6
+ EmployeeCorporateID?: string;
7
+ CostCenter?: string;
8
+ Country?: string;
9
+ CountryCode?: string;
10
+ Department?: string;
11
+ DisplayName?: string;
12
+ Email?: string;
13
+ EmployeeType?: string;
14
+ FirstName?: string;
15
+ LastName?: string;
16
+ LOB?: string;
17
+ LocationCode?: string;
18
+ };
19
+ export declare type Session = {
20
+ isLoggedIn: boolean;
21
+ accessToken?: string;
22
+ isCypressSession?: boolean;
23
+ expires?: number;
24
+ user?: {
25
+ avatarUrl: string;
26
+ sid: string;
27
+ country?: string;
28
+ countryCode?: string;
29
+ costCenter?: string;
30
+ department?: string;
31
+ displayName?: string;
32
+ email?: string;
33
+ employeeType?: string;
34
+ firstName?: string;
35
+ lastName?: string;
36
+ lob?: string;
37
+ locationCode?: string;
38
+ };
39
+ };
@@ -0,0 +1,9 @@
1
+ import type { Observable } from 'rxjs';
2
+ import type { Serialiser } from './Serialiser.js';
3
+ import type { Page } from './Page.js';
4
+ export declare type Source<Options = {}> = {
5
+ create(options: Options, { serialiser, pageExtensions }: {
6
+ pageExtensions: string[];
7
+ serialiser: Serialiser;
8
+ }): Observable<Page[]>;
9
+ };
@@ -0,0 +1,6 @@
1
+ export declare type SourceWorkflowAction<TSourceOptions, TOptions> = (sourceOptions: TSourceOptions, workflowOptions: TOptions, ...args: any[]) => Promise<unknown>;
2
+ export declare type SourceWorkflow<TSourceOptions = unknown, TOptions = unknown> = {
3
+ name: string;
4
+ options?: TOptions;
5
+ action: SourceWorkflowAction<TSourceOptions, TOptions>;
6
+ };
@@ -0,0 +1,125 @@
1
+ /// <reference types="node" resolution-mode="require"/>
2
+ import type { DirectoryJSON, IRealpathOptions, IMkdirOptions, IReaddirOptions, IStatOptions, TData, TMode, TDataOut, Dirent, Stats, TStatNumber } from 'memfs';
3
+ import type { PathLike, symlink } from 'fs';
4
+ import type { Options, Pattern, Entry } from 'fast-glob';
5
+ /**
6
+ * Volumes are lightweight decorators which wrap `FileAccess` and limit access to the underlying API for different use-cases
7
+ * Examples include disallowing mutation or allowing underlying functions like resetting
8
+ */
9
+ export interface IVolume {
10
+ namespace: string;
11
+ reset?(): void;
12
+ toJSON(): DirectoryJSON;
13
+ symlinksToJSON(): {
14
+ [key: string]: {
15
+ target: string;
16
+ type: string;
17
+ }[];
18
+ };
19
+ fromJSON?(json: DirectoryJSON): void;
20
+ promises: {
21
+ exists(file: PathLike): Promise<boolean>;
22
+ glob(pattern: Pattern, options?: Options): Promise<string[] | Entry[]>;
23
+ mkdir(dir: PathLike, options?: TMode | IMkdirOptions): Promise<void>;
24
+ readdir(dir: PathLike, options?: string | IReaddirOptions): Promise<TDataOut[] | Dirent[]>;
25
+ readFile(file: PathLike): Promise<TDataOut>;
26
+ realpath(target: string, options?: string | IRealpathOptions): Promise<TDataOut>;
27
+ stat(file: PathLike, options?: IStatOptions): Promise<Stats<TStatNumber>>;
28
+ symlink(target: PathLike, alias: PathLike, type?: symlink.Type): Promise<void>;
29
+ unlink(target: PathLike): Promise<void>;
30
+ writeFile(file: PathLike, data: TData): Promise<void>;
31
+ };
32
+ }
33
+ export interface IVolumePartiallyMutable extends Omit<IVolume, 'reset' | 'fromJSON'> {
34
+ /**
35
+ * Functions that will be called after a page is read from the filesystem for the first time (since last cache clear).
36
+ * The value returned from this hook will *replace* the contents of the read file.
37
+ * @param hook Any function that invokes an `afterRead` plugin
38
+ * @returns Promise<Page>
39
+ */
40
+ __internal_do_not_use_addReadFileHook(hook: (filepath: PathLike, fileData: TDataOut) => Promise<TDataOut>): void;
41
+ }
42
+ export interface IUnionVolume extends Omit<IVolumeImmutable, 'promises'> {
43
+ promises: Pick<IVolumeImmutable, 'promises'> & {
44
+ /**
45
+ * Reads a file
46
+ * @param file Path
47
+ * @returns Promise<TDataOut>
48
+ */
49
+ readFile(file: PathLike): Promise<TDataOut>;
50
+ readFile(file: PathLike, options?: {
51
+ includeConflicts?: false;
52
+ }): Promise<TDataOut>;
53
+ /**
54
+ * Reads 1 or more files (if multiple files exist at the same location within the union filesystem)
55
+ * @param file Path
56
+ * @param options.includeConflicts If multiple files exist at the same location in the filesystem, return them all as an array
57
+ * @returns Promise<TDataOut[]>
58
+ */
59
+ readFile(file: PathLike, options: {
60
+ includeConflicts: true;
61
+ }): Promise<TDataOut[]>;
62
+ };
63
+ /**
64
+ * Scopes a filesystem to specific namespaces
65
+ * @param {string[]} namespaces Array of namespaces to limit this filesystem to
66
+ * @returns A new immutable union filesystem
67
+ */
68
+ scope(namespaces: string[]): IUnionVolume;
69
+ }
70
+ export interface IVolumeMutable extends IVolume {
71
+ /**
72
+ * Functions that will be called after a page is read from the filesystem for the first time (since last cache clear).
73
+ * The value returned from this hook will *replace* the contents of the read file.
74
+ * @param hook Any function that invokes an `afterRead` plugin
75
+ * @returns Promise<Page>
76
+ */
77
+ __internal_do_not_use_addReadFileHook(hook: (filepath: PathLike, fileData: TDataOut) => Promise<TDataOut>): void;
78
+ /**
79
+ * Restricted filesystems can be written to, but cannot be frozen, updated or reset
80
+ */
81
+ asRestricted(): IVolumePartiallyMutable;
82
+ /**
83
+ * ReadOnly filesystems cannot be mutated in any way, including freezing, updating or reseting
84
+ */
85
+ asReadOnly(): IVolumeImmutable;
86
+ /**
87
+ * Clears the filesystem's internal page cache - used when the cache may be outdated due to a source emiting new data or a dependency changing.
88
+ */
89
+ clearCache(): void;
90
+ /**
91
+ * Re-enables mutations on the underlying `FileAccess`.
92
+ */
93
+ unfreeze(): void;
94
+ /**
95
+ * Freezes an object, preventing all mutations on the underlying `FileAccess` object
96
+ * Freezing a filesystem indicates that the mutation period has ended and the file system can no longer be modified.
97
+ * When a filesystem is unfrozen, it is considered to be in flux, so may change as more plugins are called.
98
+ * When a filesystem is frozen, it is considered to be stable and ready to begin serving finalised versions of files.
99
+ */
100
+ freeze(): void;
101
+ /**
102
+ * Is this filesystem frozen/mutable?
103
+ * @returns {boolean}
104
+ */
105
+ readonly frozen: boolean;
106
+ /**
107
+ * Appends content to the filesystem
108
+ * @param json A JSON blob in the form of {[fullPath]: "{fullPath: '', content: ''}"}
109
+ */
110
+ fromJSON(json: DirectoryJSON): void;
111
+ symlinksFromJSON(json: {
112
+ [key: string]: {
113
+ target: string;
114
+ type: string;
115
+ }[];
116
+ }): Promise<void>;
117
+ /**
118
+ * Completely resets the filesystem.
119
+ * This includes clearing page cache, erasing filesystem data, clearing symlinks etc
120
+ */
121
+ reset(): void;
122
+ }
123
+ export interface IVolumeImmutable extends Omit<IVolumePartiallyMutable, 'fromJSON' | 'reset' | 'promises' | '__internal_do_not_use_addReadFileHook'> {
124
+ promises: Omit<IVolume['promises'], 'writeFile' | 'symlink' | 'mkdir' | 'unlink' | 'rmdir' | 'rm' | 'rename'>;
125
+ }
@@ -0,0 +1,13 @@
1
+ import type { SerialiserModuleDefinition, PluginModuleDefinition, SourceModuleDefinition } from './index.js';
2
+ export declare type WorkerData<Options = {}> = {
3
+ options: Options & Pick<PluginModuleDefinition, 'options'> & Pick<SourceModuleDefinition, 'options'> & {
4
+ pageExtensions: string[];
5
+ };
6
+ name: string;
7
+ namespace: string;
8
+ pageExtensions: string[];
9
+ ignorePages: string[];
10
+ plugins: PluginModuleDefinition[];
11
+ serialisers: SerialiserModuleDefinition[];
12
+ modulePath: string;
13
+ };
@@ -0,0 +1,13 @@
1
+ import type { SerialiserModuleDefinition, MosaicConfig, PluginModuleDefinition, SourceModuleDefinition, SourceWorkflow } from '@jpmorganchase/mosaic-schemas';
2
+ export * from './IFileAccess.js';
3
+ export * from './Meta.js';
4
+ export * from './MutableData.js';
5
+ export * from './Page.js';
6
+ export * from './Plugin.js';
7
+ export * from './Serialiser.js';
8
+ export * from './Source.js';
9
+ export * from './Volume.js';
10
+ export * from './WorkerData.js';
11
+ export * from './Mode.js';
12
+ export * from './Session.js';
13
+ export { SerialiserModuleDefinition, MosaicConfig, PluginModuleDefinition, SourceModuleDefinition, SourceWorkflow };
package/package.json ADDED
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "@jpmorganchase/mosaic-types",
3
+ "version": "0.1.0-beta.10",
4
+ "description": "Mosaic BitBucket source for core file system",
5
+ "license": "Apache-2.0",
6
+ "author": "",
7
+ "type": "module",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts"
12
+ }
13
+ },
14
+ "engines": {
15
+ "node": ">= 16.0.0"
16
+ },
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git@github.com:jpmorganchase/mosaic.git"
20
+ },
21
+ "files": [
22
+ "dist"
23
+ ],
24
+ "scripts": {
25
+ "build": "tsc",
26
+ "clean": "rm -fr dist",
27
+ "lint": "eslint --ignore-pattern \"**/__tests__/**\""
28
+ },
29
+ "devDependencies": {
30
+ "@jpmorganchase/mosaic-schemas": "^0.1.0-beta.10",
31
+ "memfs": "^3.4.12",
32
+ "rxjs": "^7.5.5",
33
+ "zod": "^3.19.1"
34
+ }
35
+ }