@jpmorganchase/mosaic-types 0.1.0-beta.48 → 0.1.0-beta.49

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 (2) hide show
  1. package/dist/Plugin.d.ts +20 -0
  2. package/package.json +2 -2
package/dist/Plugin.d.ts CHANGED
@@ -119,4 +119,24 @@ export declare type Plugin<TPage extends Page = Page, TOptions = Record<string,
119
119
  ignorePages: string[];
120
120
  namespace: string;
121
121
  }, options?: TOptions) => Promise<boolean>;
122
+ /**
123
+ * Plugin lifecycle method that triggers inside the main process everytime ANY source emits new pages.
124
+ * This method should return a boolean that will indicate if this source should force other namespace sources to re-run afterUpdate.
125
+ * Returning `undefined`, false or no value, will result in no update being triggered for namespace sources
126
+ * @param updatedSourceFilesystem Immutable filesystem for the source that changed
127
+ * @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
128
+ * @param param.serialiser A matching `Serialiser` for serialising/deserialising pages when reading/writing to the filesystem
129
+ * @param param.globalFilesystem Immutable union filesystem instance with all source's pages (and symlinks applied)
130
+ * @param param.namespace The namespace of the source running the plugin
131
+ * @param options The options passed in when declaring the plugin
132
+ * @returns {Promise<boolean>} A boolean indicating whether to clear the cache for this source
133
+ */
134
+ shouldUpdateNamespaceSources?: (updatedSourceFilesystem: IVolumeImmutable, helpers: {
135
+ serialiser: Serialiser<TPage>;
136
+ config: ImmutableData<ConfigData>;
137
+ globalFilesystem: IUnionVolume;
138
+ pageExtensions: string[];
139
+ ignorePages: string[];
140
+ namespace: string;
141
+ }, options?: TOptions) => Promise<boolean>;
122
142
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jpmorganchase/mosaic-types",
3
- "version": "0.1.0-beta.48",
3
+ "version": "0.1.0-beta.49",
4
4
  "description": "Mosaic BitBucket source for core file system",
5
5
  "license": "Apache-2.0",
6
6
  "author": "",
@@ -28,7 +28,7 @@
28
28
  "lint": "eslint --ignore-pattern \"**/__tests__/**\""
29
29
  },
30
30
  "devDependencies": {
31
- "@jpmorganchase/mosaic-schemas": "^0.1.0-beta.48",
31
+ "@jpmorganchase/mosaic-schemas": "^0.1.0-beta.49",
32
32
  "memfs": "^3.4.12",
33
33
  "rxjs": "^7.5.5",
34
34
  "zod": "^3.19.1"