@youcan/cli 1.0.7 → 1.0.8

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 (77) hide show
  1. package/LICENSE +21 -0
  2. package/bin/index.js +1 -1
  3. package/dist/cli/commands/apps/create.js +65 -0
  4. package/dist/cli/commands/apps/install.d.ts +2 -0
  5. package/dist/cli/commands/apps/install.js +28 -0
  6. package/dist/cli/commands/auth/login.d.ts +2 -0
  7. package/dist/cli/commands/auth/login.js +3 -4
  8. package/dist/cli/commands/auth/logout.d.ts +2 -0
  9. package/dist/cli/commands/auth/logout.js +2 -1
  10. package/dist/cli/commands/auth/types.d.ts +6 -0
  11. package/dist/cli/commands/index.d.ts +12 -0
  12. package/dist/cli/commands/index.js +2 -0
  13. package/dist/cli/commands/store/info.d.ts +2 -0
  14. package/dist/cli/commands/store/info.js +2 -1
  15. package/dist/cli/commands/store/switch.d.ts +2 -0
  16. package/dist/cli/commands/store/switch.js +6 -3
  17. package/dist/cli/commands/store/types.d.ts +4 -0
  18. package/dist/cli/commands/theme/delete.d.ts +2 -0
  19. package/dist/cli/commands/theme/delete.js +6 -3
  20. package/dist/cli/commands/theme/dev.d.ts +2 -0
  21. package/dist/cli/commands/theme/dev.js +24 -16
  22. package/dist/cli/commands/theme/init.d.ts +2 -0
  23. package/dist/cli/commands/theme/init.js +7 -6
  24. package/dist/cli/commands/theme/list.d.ts +2 -0
  25. package/dist/cli/commands/theme/list.js +4 -2
  26. package/dist/cli/commands/theme/pack.d.ts +2 -0
  27. package/dist/cli/commands/theme/pack.js +5 -3
  28. package/dist/cli/commands/theme/pull.d.ts +2 -0
  29. package/dist/cli/commands/theme/pull.js +5 -3
  30. package/dist/cli/commands/theme/types.d.ts +17 -0
  31. package/dist/cli/commands/types.d.ts +22 -0
  32. package/dist/cli/index.d.ts +12 -0
  33. package/dist/cli/index.js +10 -8
  34. package/dist/config/index.d.ts +21 -0
  35. package/dist/config/index.js +3 -3
  36. package/dist/config/messages.d.ts +36 -0
  37. package/dist/core/client/client.d.ts +23 -0
  38. package/dist/core/client/client.js +10 -3
  39. package/dist/core/client/types.d.ts +80 -0
  40. package/dist/core/themes/preview.d.ts +1 -0
  41. package/dist/core/themes/preview.js +3 -2
  42. package/dist/index.d.ts +1 -0
  43. package/dist/lib/cli/commands/apps/create.d.ts +2 -0
  44. package/dist/lib/cli/commands/apps/install.d.ts +2 -0
  45. package/dist/lib/cli/commands/index.d.ts +2 -0
  46. package/dist/lib/cli/index.d.ts +1 -1
  47. package/dist/lib/core/client/client.d.ts +3 -1
  48. package/dist/lib/core/client/types.d.ts +9 -0
  49. package/dist/utils/common.d.ts +22 -0
  50. package/dist/utils/common.js +8 -5
  51. package/dist/utils/git/cloneRepository.d.ts +6 -0
  52. package/dist/utils/git/cloneRepository.js +1 -1
  53. package/dist/utils/helpers.d.ts +3 -0
  54. package/dist/utils/helpers.js +6 -3
  55. package/dist/utils/http.d.ts +11 -0
  56. package/dist/utils/http.js +3 -2
  57. package/dist/utils/network.d.ts +2 -0
  58. package/dist/utils/network.js +12 -7
  59. package/dist/utils/system/deleteFile.d.ts +5 -0
  60. package/dist/utils/system/deleteFile.js +3 -2
  61. package/dist/utils/system/ls.d.ts +1 -0
  62. package/dist/utils/system/ls.js +1 -1
  63. package/dist/utils/system/openLink.d.ts +1 -0
  64. package/dist/utils/system/saveFile.d.ts +1 -0
  65. package/dist/utils/system/saveFile.js +2 -2
  66. package/dist/utils/system/stdout.d.ts +17 -0
  67. package/dist/utils/system/stdout.js +30 -11
  68. package/dist/utils/system/writeToFile.d.ts +1 -0
  69. package/dist/utils/system/writeToFile.js +1 -6
  70. package/dist/utils/system/zipFolder.d.ts +5 -0
  71. package/dist/utils/system/zipFolder.js +3 -3
  72. package/dist/utils/system.d.ts +1 -0
  73. package/dist/utils/system.js +2 -1
  74. package/package.json +19 -26
  75. package/README.md +0 -18
  76. package/dist/utils/system/openLink.js +0 -15
  77. /package/dist/{lib/cli/commands/theme/switch-store.d.ts → cli/commands/apps/create.d.ts} +0 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@youcan/cli",
3
3
  "type": "module",
4
- "version": "1.0.7",
4
+ "version": "1.0.8",
5
5
  "description": "YouCan CLI for developers.",
6
6
  "author": "YouCan <contact@youcan.shop> (https://youcan.shop)",
7
7
  "keywords": [],
@@ -21,50 +21,43 @@
21
21
  "dist"
22
22
  ],
23
23
  "dependencies": {
24
- "archiver": "^5.3.1",
24
+ "archiver": "^5.3.2",
25
25
  "cac": "^6.7.14",
26
26
  "chokidar": "^3.5.3",
27
27
  "decompress": "^4.2.1",
28
28
  "execa": "^6.1.0",
29
- "formdata-node": "^5.0.0",
29
+ "formdata-node": "^5.0.1",
30
30
  "kleur": "^4.1.5",
31
- "node-fetch": "^3.2.10",
31
+ "node-fetch": "^3.3.2",
32
32
  "prompts": "^2.4.2",
33
- "puppeteer": "^19.2.2",
33
+ "puppeteer": "^19.11.1",
34
34
  "ramda": "^0.28.0",
35
- "socket.io": "^4.5.3",
36
- "socket.io-client": "^4.5.3"
35
+ "socket.io": "^4.7.2",
36
+ "socket.io-client": "^4.7.2"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@azuradara/eslint-config-base": "^0.1.3",
40
40
  "@azuradara/eslint-config-ts": "^0.1.3",
41
- "@types/archiver": "^5.3.1",
41
+ "@types/archiver": "^5.3.3",
42
42
  "@types/file-saver": "^2.0.5",
43
- "@types/node": "^18.11.9",
44
- "@types/prompts": "^2.4.1",
45
- "@types/ramda": "^0.28.19",
43
+ "@types/node": "^18.18.0",
44
+ "@types/prompts": "^2.4.5",
45
+ "@types/ramda": "^0.28.25",
46
46
  "@types/rimraf": "^3.0.2",
47
- "@vitest/coverage-c8": "^0.25.2",
48
- "@vitest/ui": "^0.25.2",
49
- "bumpp": "^8.2.1",
50
- "eslint": "^8.27.0",
51
47
  "esno": "^0.16.3",
52
- "pnpm": "^7.14.2",
48
+ "pnpm": "^7.33.6",
53
49
  "rimraf": "^3.0.2",
54
- "rollup": "^3.2.5",
55
- "rollup-plugin-dts": "^5.0.0",
50
+ "rollup": "^3.29.3",
51
+ "rollup-plugin-dts": "^5.3.1",
52
+ "rollup-plugin-node-externals": "^6.1.1",
56
53
  "rollup-plugin-typescript2": "^0.34.1",
57
- "typescript": "^4.8.4",
58
- "vite": "^3.2.4",
59
- "vitest": "^0.24.5"
54
+ "typescript": "^4.9.5"
60
55
  },
61
56
  "scripts": {
62
57
  "build": "tsc --noEmit && rollup --config rollup.config.js",
63
58
  "dev": "rollup --config rollup.config.js --watch",
64
- "lint": "eslint .",
65
- "release": "bumpp && pnpm publish",
66
- "typecheck": "tsc --noEmit",
67
- "test": "vitest",
68
- "check": "pnpm typecheck && pnpm lint && pnpm run test"
59
+ "release": "pnpm publish --access public",
60
+ "type-check": "tsc --noEmit",
61
+ "relink": "pnpm link --global"
69
62
  }
70
63
  }
package/README.md DELETED
@@ -1,18 +0,0 @@
1
- # youcan-cli
2
-
3
- YouCan CLI is a command line utility for building custom YouCan themes. It can be installed and run on Mac, Linux, and Windows systems. Using the CLI requires you to have pre-requisite knowledge of the YouCan themes system documented [here](https://developer.youcan.shop/).
4
-
5
- ## Requirements
6
-
7
- The YouCan CLI requires that you install the latest version of [Node.js](https://nodejs.org/en/download/) and [npm](https://docs.npmjs.com/getting-started), or whichever node package manger you prefer.
8
-
9
- ## Installation
10
-
11
- ```shell
12
- npm install -g @youcan/cli
13
- ```
14
-
15
- ## Help
16
-
17
- - [Open a GitHub issue](https://github.com/youcan-shop/youcan-cli/issues) - For bug reports and feature requests, you can open an issue in the YouCan CLI repository.
18
- - [CLI documentation - Theme development](https://developer.youcan.shop/themes/cli/introduction.html) - Visit our documentation for guides on getting started with YouCan Theme development.
@@ -1,15 +0,0 @@
1
- import { execSync } from 'child_process';
2
-
3
- const { platform } = process;
4
- const PLATFORM_OPEN_CMD_MAP = {
5
- win32: 'cmd /c start',
6
- linux: 'xdg-open',
7
- darwin: 'open',
8
- };
9
- function openLink(url) {
10
- if (!(platform in PLATFORM_OPEN_CMD_MAP))
11
- throw new Error('Platform not supported');
12
- execSync(`${PLATFORM_OPEN_CMD_MAP[platform]} '${url}'`);
13
- }
14
-
15
- export { openLink as default };