@youcan/theme 1.2.0-beta.9 → 2.0.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.
@@ -1,4 +1,5 @@
1
1
  import { ThemeCommand } from '@/util/theme-command';
2
2
  export default class Delete extends ThemeCommand {
3
+ static description: string;
3
4
  run(): Promise<void>;
4
5
  }
@@ -2,6 +2,7 @@ import { Session, Http, Env, Tasks } from '@youcan/cli-kit';
2
2
  import { ThemeCommand } from '../../../util/theme-command.js';
3
3
 
4
4
  class Delete extends ThemeCommand {
5
+ static description = 'Select remote development themes to delete';
5
6
  async run() {
6
7
  await Session.authenticate(this);
7
8
  const { dev: themes } = await Http.get(`${Env.apiHostname()}/themes`);
@@ -1,4 +1,5 @@
1
1
  import { ThemeCommand } from '@/util/theme-command';
2
2
  export default class Dev extends ThemeCommand {
3
+ static description: string;
3
4
  run(): Promise<void>;
4
5
  }
@@ -4,6 +4,7 @@ import { load } from '../../../util/theme-loader.js';
4
4
  import ThemeWorker from '../../services/dev/worker.js';
5
5
 
6
6
  class Dev extends ThemeCommand {
7
+ static description = 'Start a theme development server and preview your changes';
7
8
  async run() {
8
9
  const theme = await load();
9
10
  await Session.authenticate(this);
@@ -5,7 +5,7 @@ import { THEME_FLAGS } from '../../../flags.js';
5
5
  import { THEME_CONFIG_FILENAME } from '../../../constants.js';
6
6
 
7
7
  class Init extends ThemeCommand {
8
- static description = 'Clones a theme template Git repo.';
8
+ static description = 'Clones a theme template git repo';
9
9
  static args = {
10
10
  name: Args.string({
11
11
  name: 'name',
@@ -20,7 +20,7 @@ class Init extends ThemeCommand {
20
20
  char: 'u',
21
21
  env: 'YC_FLAG_CLONE_URL',
22
22
  description: 'The Git URL to clone from',
23
- default: 'https://github.com/youcan-shop/light-theme',
23
+ default: 'https://github.com/youcan-shop/dusk',
24
24
  }),
25
25
  };
26
26
  async run() {
@@ -1,4 +1,5 @@
1
1
  import { ThemeCommand } from '@/util/theme-command';
2
2
  export default class List extends ThemeCommand {
3
+ static description: string;
3
4
  run(): Promise<void>;
4
5
  }
@@ -8,6 +8,7 @@ const formatter = Intl.NumberFormat('en', {
8
8
  unitDisplay: 'narrow',
9
9
  });
10
10
  class List extends ThemeCommand {
11
+ static description = 'List remote development themes';
11
12
  async run() {
12
13
  await Session.authenticate(this);
13
14
  const { dev: themes } = await Http.get(`${Env.apiHostname()}/themes`);
@@ -1,5 +1,6 @@
1
1
  import { ThemeCommand } from '@/util/theme-command';
2
2
  export declare function date(): string;
3
3
  export default class Pack extends ThemeCommand {
4
+ static description: string;
4
5
  run(): Promise<void>;
5
6
  }
@@ -25,6 +25,7 @@ function date() {
25
25
  return `${day}-${month}-${year}`;
26
26
  }
27
27
  class Pack extends ThemeCommand {
28
+ static description = 'Pack your theme into an archive to upload or share';
28
29
  async run() {
29
30
  await Session.authenticate(this);
30
31
  const theme = await load();
@@ -129,7 +129,9 @@ class ThemeWorker extends Worker.Abstract {
129
129
  }, 100)();
130
130
  }
131
131
  catch (err) {
132
- this.logger.write(`[error] - ${Path.join(type, name)}`);
132
+ if (err instanceof Error) {
133
+ this.logger.write(`[error] - ${Path.join(type, name)}\n${err.message}`);
134
+ }
133
135
  }
134
136
  });
135
137
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@youcan/theme",
3
3
  "type": "module",
4
- "version": "1.2.0-beta.9",
4
+ "version": "2.0.0",
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": "1.2.0-beta.9"
21
+ "@youcan/cli-kit": "2.0.0"
22
22
  },
23
23
  "devDependencies": {
24
24
  "@oclif/plugin-legacy": "^1.3.0",