@jpmorganchase/mosaic-types 0.1.0-beta.4 → 0.1.0-beta.41
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/dist/Content.d.ts +11 -0
- package/dist/IFileAccess.d.ts +6 -11
- package/dist/Meta.d.ts +1 -2
- package/dist/Mode.d.ts +16 -0
- package/dist/MutableData.d.ts +19 -2
- package/dist/Page.d.ts +2 -3
- package/dist/Plugin.d.ts +43 -22
- package/dist/Serialiser.d.ts +8 -9
- package/dist/Session.d.ts +22 -0
- package/dist/Source.d.ts +6 -5
- package/dist/SourceWorkflow.d.ts +6 -0
- package/dist/Volume.d.ts +4 -10
- package/dist/WorkerData.d.ts +3 -5
- package/dist/index.d.ts +14 -0
- package/package.json +19 -8
- package/CHANGELOG.md +0 -31
- package/dist/PluginModuleDefinition.d.ts +0 -19
- package/dist/PullDocsConfig.d.ts +0 -10
- package/dist/SerialiserModuleDefinition.d.ts +0 -5
- package/dist/SourceModuleDefinition.d.ts +0 -6
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* [[`ContentProps`]] specifies the page source/content
|
|
3
|
+
*/
|
|
4
|
+
export interface ContentProps {
|
|
5
|
+
/** Page source, which will be page type specific */
|
|
6
|
+
source?: Record<string, unknown>;
|
|
7
|
+
/** Page type */
|
|
8
|
+
type?: string;
|
|
9
|
+
/** Raw page content, includes markdown and frontmatter */
|
|
10
|
+
raw?: string;
|
|
11
|
+
}
|
package/dist/IFileAccess.d.ts
CHANGED
|
@@ -1,17 +1,12 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import type { DirectoryJSON, IRealpathOptions, IMkdirOptions, IReaddirOptions, TData, TMode } from 'memfs/lib/volume';
|
|
3
|
-
import type { TDataOut } from 'memfs/lib/encoding';
|
|
4
|
-
import type Dirent from 'memfs/lib/Dirent';
|
|
5
|
-
import type Stats from 'memfs/lib/Stats';
|
|
6
|
-
import type { TStatNumber } from 'memfs/lib/Stats';
|
|
7
|
-
import type { IStatOptions } from 'memfs/lib/volume';
|
|
8
|
-
import type { PathLike, symlink } from 'fs';
|
|
9
|
-
import type Page from './Page';
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
10
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';
|
|
11
6
|
/**
|
|
12
7
|
* This is the core underlying filesystem, which directly interfaces with a memfs Volume to mutate the filesystem
|
|
13
8
|
*/
|
|
14
|
-
export
|
|
9
|
+
export interface IFileAccess {
|
|
15
10
|
glob(pattern: Pattern, options?: Omit<Options, 'absolute' | 'fs'>): Promise<string[] | Entry[]>;
|
|
16
11
|
mkdir(dir: PathLike, options?: TMode | IMkdirOptions): Promise<void>;
|
|
17
12
|
readdir(dir: PathLike, options?: string | IReaddirOptions): Promise<TDataOut[] | Dirent[]>;
|
|
@@ -26,7 +21,7 @@ export default interface IFileAccess {
|
|
|
26
21
|
exists(file: PathLike): Promise<boolean>;
|
|
27
22
|
$$reset(): void;
|
|
28
23
|
$$freeze(): void;
|
|
29
|
-
|
|
24
|
+
readonly $$frozen: boolean;
|
|
30
25
|
$$unfreeze(): void;
|
|
31
26
|
$$clearCache(): void;
|
|
32
27
|
$$symlinksFromJSON(page: {
|
package/dist/Meta.d.ts
CHANGED
package/dist/Mode.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mosaic mode dictates how content is loaded
|
|
3
|
+
*
|
|
4
|
+
* `active`
|
|
5
|
+
* In this mode, content is pulled from configured data sources and updates in real-time.
|
|
6
|
+
* After content is updated, Mosaic plugins create an enhanced, in-memory file object, representing the content
|
|
7
|
+
*
|
|
8
|
+
* `snapshot-file`
|
|
9
|
+
* In this mode, previously created snapshot files are loaded from a local directory.
|
|
10
|
+
*
|
|
11
|
+
* `snapshot-s3`
|
|
12
|
+
* In this mode, previously created snapshot files are loaded from an S3 bucket.
|
|
13
|
+
*
|
|
14
|
+
* (A snapshot is an immutable/persisted copy of `active` content, created separately)
|
|
15
|
+
*/
|
|
16
|
+
export declare type MosaicMode = 'active' | 'snapshot-file' | 'snapshot-s3';
|
package/dist/MutableData.d.ts
CHANGED
|
@@ -1,4 +1,22 @@
|
|
|
1
|
-
|
|
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> & {
|
|
2
20
|
/**
|
|
3
21
|
* Set arbitrary data onto the config object. This value will persist across plugins and
|
|
4
22
|
* also be sent to the parent process when it executes plugins there as well.
|
|
@@ -54,4 +72,3 @@ export declare type ImmutableData<T = {}> = {
|
|
|
54
72
|
}>;
|
|
55
73
|
}>;
|
|
56
74
|
};
|
|
57
|
-
export default MutableData;
|
package/dist/Page.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `Page` is a type, which at a minimum has a `fullPath`, but can also contain metadata and `content`
|
|
3
3
|
*/
|
|
4
|
-
declare type Page
|
|
4
|
+
export declare type Page = {
|
|
5
5
|
fullPath: string;
|
|
6
6
|
title?: string;
|
|
7
7
|
/**
|
|
@@ -17,5 +17,4 @@ declare type Page<AdditionalProps = {}> = {
|
|
|
17
17
|
lastModified?: Date;
|
|
18
18
|
type?: string;
|
|
19
19
|
content?: string;
|
|
20
|
-
}
|
|
21
|
-
export default Page;
|
|
20
|
+
};
|
package/dist/Plugin.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type
|
|
3
|
-
import type
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
6
|
-
|
|
7
|
-
export declare type
|
|
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
8
|
/**
|
|
9
9
|
* Plugins are lifecycle-based hooks that are called on every source at different stages.
|
|
10
10
|
* Consumers will never need to invoke a lifecycle method; but for technical clarity - when a lifecycle method is called,
|
|
11
11
|
* it will trigger `pluginRunner` which executes it on every source automatically.
|
|
12
12
|
*/
|
|
13
|
-
declare type Plugin<
|
|
13
|
+
export declare type Plugin<TPage extends Page = Page, TOptions = Record<string, unknown>, ConfigData = Record<string, unknown>, GlobalConfigData = ConfigData> = {
|
|
14
14
|
/**
|
|
15
15
|
* Plugin lifecycle method that triggers inside child processes.
|
|
16
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
|
|
@@ -21,12 +21,12 @@ declare type Plugin<ConfigData = {}, PluginOptions = {}, GlobalConfigData = Conf
|
|
|
21
21
|
* @param options The options passed in when declaring the plugin
|
|
22
22
|
* @returns {Promise<Page[]>} Must re-return an array of `Page` objects, modified or not
|
|
23
23
|
*/
|
|
24
|
-
$afterSource
|
|
25
|
-
serialiser: Serialiser
|
|
24
|
+
$afterSource?: (pages: TPage[], helpers: {
|
|
25
|
+
serialiser: Serialiser<TPage>;
|
|
26
26
|
config: MutableData<ConfigData>;
|
|
27
27
|
pageExtensions: string[];
|
|
28
28
|
ignorePages: string[];
|
|
29
|
-
}, options?:
|
|
29
|
+
}, options?: TOptions) => Promise<Array<TPage>>;
|
|
30
30
|
/**
|
|
31
31
|
* Plugin lifecycle method that triggers inside child processes.
|
|
32
32
|
* Calls after a filesystem has been built up from the source pages.
|
|
@@ -36,12 +36,12 @@ declare type Plugin<ConfigData = {}, PluginOptions = {}, GlobalConfigData = Conf
|
|
|
36
36
|
* @param options The options passed in when declaring the plugin
|
|
37
37
|
* @returns {void} No return expected
|
|
38
38
|
*/
|
|
39
|
-
$beforeSend
|
|
40
|
-
serialiser: Serialiser
|
|
39
|
+
$beforeSend?: (mutableFilesystem: IVolumePartiallyMutable, helpers: {
|
|
40
|
+
serialiser: Serialiser<TPage>;
|
|
41
41
|
pageExtensions: string[];
|
|
42
42
|
ignorePages: string[];
|
|
43
43
|
config: MutableData<ConfigData>;
|
|
44
|
-
}, options?:
|
|
44
|
+
}, options?: TOptions) => Promise<void>;
|
|
45
45
|
/**
|
|
46
46
|
* Plugin lifecycle method that triggers inside the main process.
|
|
47
47
|
* Calls after the filesystem and symlinks have been reconstructed due to a change to the current source. This happens in the main thread.
|
|
@@ -59,15 +59,15 @@ declare type Plugin<ConfigData = {}, PluginOptions = {}, GlobalConfigData = Conf
|
|
|
59
59
|
* @param options The options passed in when declaring the plugin
|
|
60
60
|
* @returns {void} No return expected
|
|
61
61
|
*/
|
|
62
|
-
afterUpdate
|
|
63
|
-
serialiser: Serialiser
|
|
62
|
+
afterUpdate?: (mutableFilesystem: IVolumePartiallyMutable, helpers: {
|
|
63
|
+
serialiser: Serialiser<TPage>;
|
|
64
64
|
config: ImmutableData<ConfigData>;
|
|
65
65
|
globalFilesystem: IUnionVolume;
|
|
66
66
|
sharedFilesystem: IVolumeMutable;
|
|
67
67
|
globalConfig: ImmutableData<GlobalConfigData>;
|
|
68
68
|
pageExtensions: string[];
|
|
69
69
|
ignorePages: string[];
|
|
70
|
-
}, options?:
|
|
70
|
+
}, options?: TOptions) => Promise<void>;
|
|
71
71
|
/**
|
|
72
72
|
* Plugin lifecycle method that triggers inside the main process everytime ANY source emits new pages.
|
|
73
73
|
* This method should return a boolean that will indicate if this source should clear page caches.
|
|
@@ -80,13 +80,34 @@ declare type Plugin<ConfigData = {}, PluginOptions = {}, GlobalConfigData = Conf
|
|
|
80
80
|
* @param options The options passed in when declaring the plugin
|
|
81
81
|
* @returns {Promise<boolean>} A boolean indicating whether to clear the cache for this source
|
|
82
82
|
*/
|
|
83
|
-
shouldClearCache
|
|
84
|
-
serialiser: Serialiser
|
|
83
|
+
shouldClearCache?: (updatedSourceFilesystem: IVolumeImmutable, helpers: {
|
|
84
|
+
serialiser: Serialiser<TPage>;
|
|
85
85
|
config: ImmutableData<ConfigData>;
|
|
86
86
|
globalFilesystem: IUnionVolume;
|
|
87
87
|
pageExtensions: string[];
|
|
88
88
|
ignorePages: string[];
|
|
89
|
-
}, options?:
|
|
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>;
|
|
90
113
|
};
|
|
91
|
-
export declare type LifecycleMethod = keyof Plugin;
|
|
92
|
-
export default Plugin;
|
package/dist/Serialiser.d.ts
CHANGED
|
@@ -1,27 +1,26 @@
|
|
|
1
|
-
import type { TDataOut } from 'memfs
|
|
2
|
-
import type
|
|
3
|
-
import type
|
|
1
|
+
import type { TDataOut } from 'memfs';
|
|
2
|
+
import type { SerialiserModuleDefinition } from './index.js';
|
|
3
|
+
import type { Page } from './Page.js';
|
|
4
4
|
/**
|
|
5
|
-
* Serialisers are a form of plugin that tells
|
|
5
|
+
* Serialisers are a form of plugin that tells Mosaic how to turn a file from/to a storable form for the filesystem
|
|
6
6
|
* or a `Page` object.
|
|
7
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
|
|
8
|
+
* the `test` option that was passed in the Mosaic config file, to find a suitable parser.
|
|
9
9
|
*/
|
|
10
|
-
export declare type Serialiser = {
|
|
10
|
+
export declare type Serialiser<TPage extends Page = Page> = {
|
|
11
11
|
/**
|
|
12
12
|
* Method to turn a raw page (e.g. an MDX file) into a `Page` object
|
|
13
13
|
* @param fullPath Route on virtual disk (should be full fullPath, not an alias)
|
|
14
14
|
* @param page Page in string or buffer form (i.e. an MDX page with frontmatter or a JSON file as a string)
|
|
15
15
|
* @returns Page object in the `Page` format
|
|
16
16
|
*/
|
|
17
|
-
deserialise: (fullPath: string, page: TDataOut) => Promise<
|
|
17
|
+
deserialise: (fullPath: string, page: TDataOut) => Promise<TPage>;
|
|
18
18
|
/**
|
|
19
19
|
* Method to load a raw page from disk (e.g. an MDX file) and return into a `Page` object
|
|
20
20
|
* @param fullPath Route on virtual disk (should be full fullPath, not an alias)
|
|
21
21
|
* @param page Page in `Page` form
|
|
22
22
|
* @returns Page content
|
|
23
23
|
*/
|
|
24
|
-
serialise: (fullPath: string, page:
|
|
24
|
+
serialise: (fullPath: string, page: TPage) => Promise<TDataOut>;
|
|
25
25
|
};
|
|
26
26
|
export declare type LoadedSerialiser = Serialiser & SerialiserModuleDefinition;
|
|
27
|
-
export default Serialiser;
|
|
@@ -0,0 +1,22 @@
|
|
|
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<TUserProfile> = {
|
|
20
|
+
isLoggedIn: boolean;
|
|
21
|
+
user?: TUserProfile;
|
|
22
|
+
};
|
package/dist/Source.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { Observable } from 'rxjs';
|
|
2
|
-
import type Serialiser from './Serialiser';
|
|
3
|
-
import type Page from './Page';
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import type { Serialiser } from './Serialiser.js';
|
|
3
|
+
import type { Page } from './Page.js';
|
|
4
|
+
import { SourceSchedule } from './index.js';
|
|
5
|
+
export declare type Source<Options = {}> = {
|
|
6
|
+
create(options: Options, { serialiser, pageExtensions, schedule }: {
|
|
6
7
|
pageExtensions: string[];
|
|
7
8
|
serialiser: Serialiser;
|
|
9
|
+
schedule: SourceSchedule;
|
|
8
10
|
}): Observable<Page[]>;
|
|
9
11
|
};
|
|
10
|
-
export default Source;
|
|
@@ -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
|
+
};
|
package/dist/Volume.d.ts
CHANGED
|
@@ -1,17 +1,12 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import type { DirectoryJSON, IRealpathOptions, IMkdirOptions, IReaddirOptions, TData, TMode } from 'memfs
|
|
3
|
-
import type { TDataOut } from 'memfs/lib/encoding';
|
|
4
|
-
import type Dirent from 'memfs/lib/Dirent';
|
|
5
|
-
import type Stats from 'memfs/lib/Stats';
|
|
6
|
-
import type { TStatNumber } from 'memfs/lib/Stats';
|
|
7
|
-
import type { IStatOptions } from 'memfs/lib/volume';
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
+
import type { DirectoryJSON, IRealpathOptions, IMkdirOptions, IReaddirOptions, IStatOptions, TData, TMode, TDataOut, Dirent, Stats, TStatNumber } from 'memfs';
|
|
8
3
|
import type { PathLike, symlink } from 'fs';
|
|
9
4
|
import type { Options, Pattern, Entry } from 'fast-glob';
|
|
10
5
|
/**
|
|
11
6
|
* Volumes are lightweight decorators which wrap `FileAccess` and limit access to the underlying API for different use-cases
|
|
12
7
|
* Examples include disallowing mutation or allowing underlying functions like resetting
|
|
13
8
|
*/
|
|
14
|
-
interface IVolume {
|
|
9
|
+
export interface IVolume {
|
|
15
10
|
namespace: string;
|
|
16
11
|
reset?(): void;
|
|
17
12
|
toJSON(): DirectoryJSON;
|
|
@@ -107,7 +102,7 @@ export interface IVolumeMutable extends IVolume {
|
|
|
107
102
|
* Is this filesystem frozen/mutable?
|
|
108
103
|
* @returns {boolean}
|
|
109
104
|
*/
|
|
110
|
-
|
|
105
|
+
readonly frozen: boolean;
|
|
111
106
|
/**
|
|
112
107
|
* Appends content to the filesystem
|
|
113
108
|
* @param json A JSON blob in the form of {[fullPath]: "{fullPath: '', content: ''}"}
|
|
@@ -128,4 +123,3 @@ export interface IVolumeMutable extends IVolume {
|
|
|
128
123
|
export interface IVolumeImmutable extends Omit<IVolumePartiallyMutable, 'fromJSON' | 'reset' | 'promises' | '__internal_do_not_use_addReadFileHook'> {
|
|
129
124
|
promises: Omit<IVolume['promises'], 'writeFile' | 'symlink' | 'mkdir' | 'unlink' | 'rmdir' | 'rm' | 'rename'>;
|
|
130
125
|
}
|
|
131
|
-
export {};
|
package/dist/WorkerData.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import type SerialiserModuleDefinition from './
|
|
2
|
-
|
|
3
|
-
import type SourceModuleDefinition from './SourceModuleDefinition';
|
|
4
|
-
declare type WorkerData<Options = {}> = {
|
|
1
|
+
import type { SerialiserModuleDefinition, PluginModuleDefinition, SourceModuleDefinition, SourceSchedule } from './index.js';
|
|
2
|
+
export declare type WorkerData<Options = {}> = {
|
|
5
3
|
options: Options & Pick<PluginModuleDefinition, 'options'> & Pick<SourceModuleDefinition, 'options'> & {
|
|
6
4
|
pageExtensions: string[];
|
|
7
5
|
};
|
|
@@ -12,5 +10,5 @@ declare type WorkerData<Options = {}> = {
|
|
|
12
10
|
plugins: PluginModuleDefinition[];
|
|
13
11
|
serialisers: SerialiserModuleDefinition[];
|
|
14
12
|
modulePath: string;
|
|
13
|
+
schedule: SourceSchedule;
|
|
15
14
|
};
|
|
16
|
-
export default WorkerData;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { SerialiserModuleDefinition, MosaicConfig, PluginModuleDefinition, SourceModuleDefinition, SourceWorkflow, SourceSchedule } from '@jpmorganchase/mosaic-schemas';
|
|
2
|
+
export * from './Content.js';
|
|
3
|
+
export * from './IFileAccess.js';
|
|
4
|
+
export * from './Meta.js';
|
|
5
|
+
export * from './MutableData.js';
|
|
6
|
+
export * from './Page.js';
|
|
7
|
+
export * from './Plugin.js';
|
|
8
|
+
export * from './Serialiser.js';
|
|
9
|
+
export * from './Source.js';
|
|
10
|
+
export * from './Volume.js';
|
|
11
|
+
export * from './WorkerData.js';
|
|
12
|
+
export * from './Mode.js';
|
|
13
|
+
export * from './Session.js';
|
|
14
|
+
export { SerialiserModuleDefinition, MosaicConfig, PluginModuleDefinition, SourceModuleDefinition, SourceWorkflow, SourceSchedule };
|
package/package.json
CHANGED
|
@@ -1,25 +1,36 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jpmorganchase/mosaic-types",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
4
|
-
"author": "",
|
|
3
|
+
"version": "0.1.0-beta.41",
|
|
5
4
|
"description": "Mosaic BitBucket source for core file system",
|
|
6
5
|
"license": "Apache-2.0",
|
|
7
|
-
"
|
|
6
|
+
"author": "",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
8
14
|
"engines": {
|
|
9
|
-
"node": ">=
|
|
15
|
+
"node": ">=16.10.0 || >=18.0.0"
|
|
10
16
|
},
|
|
11
17
|
"repository": {
|
|
12
18
|
"type": "git",
|
|
13
|
-
"url": "git@github.com:jpmorganchase/mosaic.git"
|
|
19
|
+
"url": "git@github.com:jpmorganchase/mosaic.git",
|
|
20
|
+
"directory": "packages/types"
|
|
14
21
|
},
|
|
15
22
|
"files": [
|
|
16
23
|
"dist"
|
|
17
24
|
],
|
|
18
25
|
"scripts": {
|
|
19
26
|
"build": "tsc",
|
|
20
|
-
"clean": "rm -fr dist"
|
|
27
|
+
"clean": "rm -fr dist",
|
|
28
|
+
"lint": "eslint --ignore-pattern \"**/__tests__/**\""
|
|
21
29
|
},
|
|
22
30
|
"devDependencies": {
|
|
23
|
-
"
|
|
31
|
+
"@jpmorganchase/mosaic-schemas": "^0.1.0-beta.41",
|
|
32
|
+
"memfs": "^3.4.12",
|
|
33
|
+
"rxjs": "^7.5.5",
|
|
34
|
+
"zod": "^3.19.1"
|
|
24
35
|
}
|
|
25
|
-
}
|
|
36
|
+
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# @jpmorganchase/mosaic-types
|
|
2
|
-
|
|
3
|
-
## 0.1.0-beta.4
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
- bd285df: added dist to package.json
|
|
8
|
-
|
|
9
|
-
## 0.1.0-beta.3
|
|
10
|
-
|
|
11
|
-
### Patch Changes
|
|
12
|
-
|
|
13
|
-
- 457df5e: switch to public package
|
|
14
|
-
|
|
15
|
-
## 0.1.0-beta.2
|
|
16
|
-
|
|
17
|
-
### Patch Changes
|
|
18
|
-
|
|
19
|
-
- e1bbbe7: Initial release of Mosaic Core file-system.
|
|
20
|
-
|
|
21
|
-
Mosaic is a content aggregating service which pulls content from heterogeneous data sources.
|
|
22
|
-
|
|
23
|
-
- 4b2bc51: pipped to 0.1.0-beta.1 for publishing to NPM
|
|
24
|
-
|
|
25
|
-
## 0.1.0
|
|
26
|
-
|
|
27
|
-
### Patch Changes
|
|
28
|
-
|
|
29
|
-
- e1bbbe7: Initial release of Mosaic Core file-system.
|
|
30
|
-
|
|
31
|
-
Mosaic is a content aggregating service which pulls content from heterogeneous data sources.
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export default interface PluginModuleDefinition {
|
|
2
|
-
/**
|
|
3
|
-
* Options to pass to the plugin lifecycle methods.
|
|
4
|
-
*/
|
|
5
|
-
options: Record<string, unknown>;
|
|
6
|
-
/**
|
|
7
|
-
* The importance of this plugin. This highest number plugin will be run first
|
|
8
|
-
*/
|
|
9
|
-
priority?: number;
|
|
10
|
-
/**
|
|
11
|
-
* Exclude this plugin when running `mosaic build`
|
|
12
|
-
*/
|
|
13
|
-
runTimeOnly?: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* Path to the JS file for this plugin (can either export a `default` module with lifecycle methods,
|
|
16
|
-
* or export the methods individually)
|
|
17
|
-
*/
|
|
18
|
-
modulePath: string;
|
|
19
|
-
}
|
package/dist/PullDocsConfig.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import PluginModuleDefinition from './PluginModuleDefinition';
|
|
2
|
-
import SerialiserModuleDefinition from './SerialiserModuleDefinition';
|
|
3
|
-
import SourceModuleDefinition from './SourceModuleDefinition';
|
|
4
|
-
export interface PullDocsConfig {
|
|
5
|
-
pageExtensions: Array<string>;
|
|
6
|
-
ignorePages?: Array<string>;
|
|
7
|
-
serialisers: Array<SerialiserModuleDefinition>;
|
|
8
|
-
plugins: Array<PluginModuleDefinition>;
|
|
9
|
-
sources: Array<SourceModuleDefinition>;
|
|
10
|
-
}
|