@shoper/cli 0.2.1-6 → 0.4.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.
|
@@ -8,6 +8,5 @@ export const CLI_COMMANDS_NAMES = {
|
|
|
8
8
|
authRemoveToken: `${CLI_AUTH_TOPIC_NAME}:remove-token`,
|
|
9
9
|
authSwitchToken: `${CLI_AUTH_TOPIC_NAME}:switch-token`,
|
|
10
10
|
authLogout: `${CLI_AUTH_TOPIC_NAME}:logout`,
|
|
11
|
-
uiDump: 'ui-dump'
|
|
12
|
-
cleanCache: 'clean-cache'
|
|
11
|
+
uiDump: 'ui-dump'
|
|
13
12
|
};
|
|
@@ -46,10 +46,19 @@ const isCommandsTopic = (arg) => {
|
|
|
46
46
|
const getCommandWithTopicBaseInitializers = () => {
|
|
47
47
|
const topic = process.argv[2];
|
|
48
48
|
const command = process.argv[3];
|
|
49
|
+
console.log('topic', topic, 'command', command);
|
|
49
50
|
switch (topic) {
|
|
50
51
|
case THEME_TOPIC_NAME: {
|
|
51
52
|
return getThemeInitializersForCommand(command);
|
|
52
53
|
}
|
|
54
|
+
case CLI_AUTH_TOPIC_NAME: {
|
|
55
|
+
switch (`${CLI_AUTH_TOPIC_NAME}:${command}`) {
|
|
56
|
+
case CLI_COMMANDS_NAMES.authLogout: {
|
|
57
|
+
return [ThemesListInitializer, ThemeActionsInitializer];
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
break;
|
|
61
|
+
}
|
|
53
62
|
}
|
|
54
63
|
return [];
|
|
55
64
|
};
|
|
@@ -60,9 +69,6 @@ const getCommandWithoutTopicBaseInitializers = () => {
|
|
|
60
69
|
case CLI_COMMANDS_NAMES.update: {
|
|
61
70
|
return [CliVersionInitializer];
|
|
62
71
|
}
|
|
63
|
-
case CLI_COMMANDS_NAMES.cleanCache: {
|
|
64
|
-
return [ThemesListInitializer, ThemeActionsInitializer];
|
|
65
|
-
}
|
|
66
72
|
}
|
|
67
73
|
return [];
|
|
68
74
|
};
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@shoper/cli",
|
|
3
3
|
"packageManager": "yarn@3.2.0",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.4.0",
|
|
6
6
|
"description": "CLI tool for Shoper",
|
|
7
7
|
"author": "Joanna Firek",
|
|
8
8
|
"license": "MIT",
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"watch": "rimraf ./build/ && tsc --watch --project tsconfig.json",
|
|
27
27
|
"test": "jest --config config/jest/jest.config.mjs",
|
|
28
28
|
"test:watch": "jest --config config/jest/jest.config.mjs --no-cache --watch",
|
|
29
|
-
"deploy:latest:major": "npm run build && npm version
|
|
30
|
-
"deploy:latest:minor": "npm run build && npm version
|
|
31
|
-
"deploy:latest:patch": "npm run build && npm version
|
|
29
|
+
"deploy:latest:major": "npm run build && npm version major --no-git-tag-version && npm publish --tag latest --access public",
|
|
30
|
+
"deploy:latest:minor": "npm run build && npm version minor --no-git-tag-version && npm publish --tag latest --access public",
|
|
31
|
+
"deploy:latest:patch": "npm run build && npm version patch --no-git-tag-version && npm publish --tag latest --access public",
|
|
32
32
|
"deploy:beta": "npm run build && npm version prerelease --no-git-tag-version && npm publish --tag beta --access public"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|