@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.
- package/LICENSE +21 -0
- package/bin/index.js +1 -1
- package/dist/cli/commands/apps/create.js +65 -0
- package/dist/cli/commands/apps/install.d.ts +2 -0
- package/dist/cli/commands/apps/install.js +28 -0
- package/dist/cli/commands/auth/login.d.ts +2 -0
- package/dist/cli/commands/auth/login.js +3 -4
- package/dist/cli/commands/auth/logout.d.ts +2 -0
- package/dist/cli/commands/auth/logout.js +2 -1
- package/dist/cli/commands/auth/types.d.ts +6 -0
- package/dist/cli/commands/index.d.ts +12 -0
- package/dist/cli/commands/index.js +2 -0
- package/dist/cli/commands/store/info.d.ts +2 -0
- package/dist/cli/commands/store/info.js +2 -1
- package/dist/cli/commands/store/switch.d.ts +2 -0
- package/dist/cli/commands/store/switch.js +6 -3
- package/dist/cli/commands/store/types.d.ts +4 -0
- package/dist/cli/commands/theme/delete.d.ts +2 -0
- package/dist/cli/commands/theme/delete.js +6 -3
- package/dist/cli/commands/theme/dev.d.ts +2 -0
- package/dist/cli/commands/theme/dev.js +24 -16
- package/dist/cli/commands/theme/init.d.ts +2 -0
- package/dist/cli/commands/theme/init.js +7 -6
- package/dist/cli/commands/theme/list.d.ts +2 -0
- package/dist/cli/commands/theme/list.js +4 -2
- package/dist/cli/commands/theme/pack.d.ts +2 -0
- package/dist/cli/commands/theme/pack.js +5 -3
- package/dist/cli/commands/theme/pull.d.ts +2 -0
- package/dist/cli/commands/theme/pull.js +5 -3
- package/dist/cli/commands/theme/types.d.ts +17 -0
- package/dist/cli/commands/types.d.ts +22 -0
- package/dist/cli/index.d.ts +12 -0
- package/dist/cli/index.js +10 -8
- package/dist/config/index.d.ts +21 -0
- package/dist/config/index.js +3 -3
- package/dist/config/messages.d.ts +36 -0
- package/dist/core/client/client.d.ts +23 -0
- package/dist/core/client/client.js +10 -3
- package/dist/core/client/types.d.ts +80 -0
- package/dist/core/themes/preview.d.ts +1 -0
- package/dist/core/themes/preview.js +3 -2
- package/dist/index.d.ts +1 -0
- package/dist/lib/cli/commands/apps/create.d.ts +2 -0
- package/dist/lib/cli/commands/apps/install.d.ts +2 -0
- package/dist/lib/cli/commands/index.d.ts +2 -0
- package/dist/lib/cli/index.d.ts +1 -1
- package/dist/lib/core/client/client.d.ts +3 -1
- package/dist/lib/core/client/types.d.ts +9 -0
- package/dist/utils/common.d.ts +22 -0
- package/dist/utils/common.js +8 -5
- package/dist/utils/git/cloneRepository.d.ts +6 -0
- package/dist/utils/git/cloneRepository.js +1 -1
- package/dist/utils/helpers.d.ts +3 -0
- package/dist/utils/helpers.js +6 -3
- package/dist/utils/http.d.ts +11 -0
- package/dist/utils/http.js +3 -2
- package/dist/utils/network.d.ts +2 -0
- package/dist/utils/network.js +12 -7
- package/dist/utils/system/deleteFile.d.ts +5 -0
- package/dist/utils/system/deleteFile.js +3 -2
- package/dist/utils/system/ls.d.ts +1 -0
- package/dist/utils/system/ls.js +1 -1
- package/dist/utils/system/openLink.d.ts +1 -0
- package/dist/utils/system/saveFile.d.ts +1 -0
- package/dist/utils/system/saveFile.js +2 -2
- package/dist/utils/system/stdout.d.ts +17 -0
- package/dist/utils/system/stdout.js +30 -11
- package/dist/utils/system/writeToFile.d.ts +1 -0
- package/dist/utils/system/writeToFile.js +1 -6
- package/dist/utils/system/zipFolder.d.ts +5 -0
- package/dist/utils/system/zipFolder.js +3 -3
- package/dist/utils/system.d.ts +1 -0
- package/dist/utils/system.js +2 -1
- package/package.json +19 -26
- package/README.md +0 -18
- package/dist/utils/system/openLink.js +0 -15
- /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.
|
|
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.
|
|
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.
|
|
29
|
+
"formdata-node": "^5.0.1",
|
|
30
30
|
"kleur": "^4.1.5",
|
|
31
|
-
"node-fetch": "^3.2
|
|
31
|
+
"node-fetch": "^3.3.2",
|
|
32
32
|
"prompts": "^2.4.2",
|
|
33
|
-
"puppeteer": "^19.
|
|
33
|
+
"puppeteer": "^19.11.1",
|
|
34
34
|
"ramda": "^0.28.0",
|
|
35
|
-
"socket.io": "^4.
|
|
36
|
-
"socket.io-client": "^4.
|
|
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.
|
|
41
|
+
"@types/archiver": "^5.3.3",
|
|
42
42
|
"@types/file-saver": "^2.0.5",
|
|
43
|
-
"@types/node": "^18.
|
|
44
|
-
"@types/prompts": "^2.4.
|
|
45
|
-
"@types/ramda": "^0.28.
|
|
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.
|
|
48
|
+
"pnpm": "^7.33.6",
|
|
53
49
|
"rimraf": "^3.0.2",
|
|
54
|
-
"rollup": "^3.
|
|
55
|
-
"rollup-plugin-dts": "^5.
|
|
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.
|
|
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
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
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 };
|
|
File without changes
|