@lvce-editor/extension-management-worker 4.89.0 → 4.90.0

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.
@@ -2848,7 +2848,7 @@ const byId = new Map();
2848
2848
  const keyFor = (extensionId, clientId, application) => JSON.stringify([application?.applicationGeneration ?? null, extensionId, clientId]);
2849
2849
  const create = async (extensionId, clientId, options, application) => {
2850
2850
  if (application) assertCurrentApplication(application);
2851
- if (!Number.isSafeInteger(clientId) || clientId < 1 || !Array.isArray(options?.roots) || options.roots.length === 0 || options.recursive !== undefined && typeof options.recursive !== 'boolean' || options.roots.some(uri => typeof uri !== 'string' || !uri.startsWith('file://')) || options.exclude !== undefined && (!Array.isArray(options.exclude) || options.exclude.some(name => typeof name !== 'string'))) {
2851
+ if (!Number.isSafeInteger(clientId) || clientId < 1 || !Array.isArray(options?.roots) || options.roots.length === 0 || options.childNames !== undefined && (options.recursive !== false || !Array.isArray(options.childNames) || options.childNames.some(name => typeof name !== 'string' || !name || /[\\/]/.test(name))) || options.recursive !== undefined && typeof options.recursive !== 'boolean' || options.roots.some(uri => typeof uri !== 'string' || !uri.startsWith('file://')) || options.exclude !== undefined && (!Array.isArray(options.exclude) || options.exclude.some(name => typeof name !== 'string'))) {
2852
2852
  throw new Error('File watchers require disk roots and a valid registration id');
2853
2853
  }
2854
2854
  // Application hosts can expose virtual disk paths through browser callbacks;
@@ -2867,6 +2867,9 @@ const create = async (extensionId, clientId, options, application) => {
2867
2867
  byId.set(registration.id, registration);
2868
2868
  try {
2869
2869
  await invoke$2('FileWatcher.watchExtension', registration.id, {
2870
+ ...(options.childNames !== undefined && {
2871
+ childNames: options.childNames
2872
+ }),
2870
2873
  ...(options.recursive === false && {
2871
2874
  depth: 0
2872
2875
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/extension-management-worker",
3
- "version": "4.89.0",
3
+ "version": "4.90.0",
4
4
  "description": "Webworker for the Extension Management functionality in Lvce Editor.",
5
5
  "keywords": [
6
6
  "web-worker"