@youcan/theme 2.1.1 → 2.1.3

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.
@@ -37,11 +37,16 @@ class Dev extends ThemeCommand {
37
37
  descriptors.sort((a, b) => order.indexOf(a.file_name) - order.indexOf(b.file_name));
38
38
  }
39
39
  for (const file of present.filter(f => !descriptors.find(d => d.file_name === f))) {
40
+ const path = Path.resolve(directory, file);
41
+ const isDir = await Filesystem.isDirectory(path);
42
+ if (isDir) {
43
+ continue;
44
+ }
40
45
  await execute(theme, 'save', type, file);
41
46
  }
42
47
  for (const descriptor of descriptors) {
43
48
  const path = Path.resolve(directory, descriptor.file_name);
44
- if (!(await Filesystem.exists(path))) {
49
+ if ((await Filesystem.isDirectory(path)) || !(await Filesystem.exists(path))) {
45
50
  return await execute(theme, 'delete', type, descriptor.file_name);
46
51
  }
47
52
  const buffer = await Filesystem.readFile(path);
@@ -43,6 +43,7 @@ class ThemeWorker extends Worker.Abstract {
43
43
  awaitWriteFinish: { stabilityThreshold: 50 },
44
44
  ignoreInitial: true,
45
45
  persistent: true,
46
+ depth: 0,
46
47
  });
47
48
  this.command.controller.signal.addEventListener('abort', () => {
48
49
  watcher.close();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@youcan/theme",
3
3
  "type": "module",
4
- "version": "2.1.1",
4
+ "version": "2.1.3",
5
5
  "description": "OCLIF plugin for building themes",
6
6
  "author": "YouCan <contact@youcan.shop> (https://youcan.shop)",
7
7
  "license": "MIT",
@@ -18,7 +18,7 @@
18
18
  "@oclif/core": "^2.15.0",
19
19
  "debounce": "^2.0.0",
20
20
  "socket.io": "^4.7.2",
21
- "@youcan/cli-kit": "2.1.1"
21
+ "@youcan/cli-kit": "2.1.3"
22
22
  },
23
23
  "devDependencies": {
24
24
  "@oclif/plugin-legacy": "^1.3.0",