@shoper/cli 0.7.1-1 → 0.8.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.
- package/README.md +11 -1
- package/build/cli/class/errors/http/http_errors_factory.js +1 -1
- package/build/cli/core/cli_setup.js +6 -6
- package/build/cli/index.js +0 -1
- package/build/cli/utilities/features/logger/logs/app_logs_constants.js +1 -2
- package/build/index.js +2 -2
- package/build/theme/class/archive/theme_archive.js +47 -1
- package/build/theme/{features/theme/utils/archive/theme_archive_utils_errors_factory.js → class/archive/theme_archive_errors_factory.js} +1 -1
- package/build/theme/class/checksums/theme_checksums.js +11 -51
- package/build/theme/commands/pull/theme_pull_command.js +3 -4
- package/build/theme/commands/push/theme_push_command.js +8 -17
- package/build/theme/commands/theme_commands_constants.js +1 -2
- package/build/theme/commands/theme_verify_command.js +3 -3
- package/build/theme/commands/ui/theme_error.js +6 -6
- package/build/theme/features/theme/actions/theme_actions_constants.js +1 -2
- package/build/theme/features/theme/actions/theme_actions_utils.js +9 -60
- package/build/theme/features/theme/fetch/service/theme_fetch_service.js +4 -2
- package/build/theme/features/theme/init/service/theme_init_service.js +4 -2
- package/build/theme/features/theme/merge/service/theme_merge_service.js +2 -2
- package/build/theme/features/theme/push/api/theme_push_api.js +2 -2
- package/build/theme/features/theme/push/service/theme_push_service.js +33 -93
- package/build/theme/features/theme/push/theme_push_utils.js +9 -6
- package/build/theme/features/theme/utils/files_structure/theme_file_structure_errors_factory.js +9 -1
- package/build/theme/features/theme/utils/{files/theme_files_utils.js → files_structure/theme_files_structure_utils.js} +28 -36
- package/build/theme/features/theme/utils/meta_data/theme_meta_data_utils.js +28 -0
- package/build/theme/features/theme/verify/verify/theme_verify_service.js +12 -19
- package/build/theme/index.js +2 -6
- package/build/theme/utils/directory_validator/directory_validator_utils.js +11 -4
- package/build/theme/utils/shoperignore/shoperignore_utils.js +36 -0
- package/build/ui/ui_dump/ui_dump.js +4 -9
- package/build/utils/array_utils.js +0 -3
- package/build/utils/fs/fs_utils.js +1 -1
- package/package.json +6 -10
- package/build/theme/class/browser/browser.js +0 -108
- package/build/theme/commands/watch/theme_watch_command.js +0 -88
- package/build/theme/commands/watch/theme_watch_constants.js +0 -21
- package/build/theme/commands/watch/theme_watch_utils.js +0 -32
- package/build/theme/commands/watch/theme_watching_info.js +0 -14
- package/build/theme/commands/watch/watch.js +0 -55
- package/build/theme/features/theme/push/service/theme_push_service_types.js +0 -1
- package/build/theme/features/theme/utils/archive/theme_archive_utils.js +0 -26
- package/build/theme/features/theme/utils/files/them_files_constants.js +0 -1
- package/build/theme/features/theme/watch/api/theme_watch_api.js +0 -19
- package/build/theme/features/theme/watch/service/theme_watch_service.js +0 -167
- package/build/theme/features/theme/watch/theme_watch_constants.js +0 -4
- package/build/theme/features/theme/watch/theme_watch_initializer.js +0 -22
- package/build/ui/command_input/command_input.js +0 -25
- package/build/ui/logs/log_entry.js +0 -12
- package/build/ui/logs/logs_constants.js +0 -20
- package/build/ui/logs/logs_list.js +0 -18
- package/build/ui/logs/use_logs.js +0 -23
- package/build/utils/fs/fs_constants.js +0 -6
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { CSS_TEXT_COLORS } from '../color_constants.js';
|
|
2
|
-
export const LOG_TYPES = {
|
|
3
|
-
info: 'info',
|
|
4
|
-
success: 'success',
|
|
5
|
-
error: 'error',
|
|
6
|
-
warning: 'warning',
|
|
7
|
-
custom: 'custom'
|
|
8
|
-
};
|
|
9
|
-
export const MAP_LOG_TYPE_TO_TEXT_COLOR = {
|
|
10
|
-
[LOG_TYPES.info]: CSS_TEXT_COLORS.info,
|
|
11
|
-
[LOG_TYPES.success]: CSS_TEXT_COLORS.success,
|
|
12
|
-
[LOG_TYPES.error]: CSS_TEXT_COLORS.danger,
|
|
13
|
-
[LOG_TYPES.warning]: CSS_TEXT_COLORS.warning
|
|
14
|
-
};
|
|
15
|
-
export const MAP_LOG_TYPE_TO_LABEL = {
|
|
16
|
-
[LOG_TYPES.info]: 'INFO',
|
|
17
|
-
[LOG_TYPES.success]: 'SUCCESS',
|
|
18
|
-
[LOG_TYPES.error]: 'ERROR',
|
|
19
|
-
[LOG_TYPES.warning]: 'WARNING'
|
|
20
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Box } from '../box.js';
|
|
2
|
-
import { Text } from '../text.js';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { LOG_TYPES, MAP_LOG_TYPE_TO_LABEL, MAP_LOG_TYPE_TO_TEXT_COLOR } from './logs_constants.js';
|
|
5
|
-
export const LogsList = ({ logs }) => {
|
|
6
|
-
return (React.createElement(Box, { flexDirection: "column", marginBottom: 1, width: "100%" }, logs.map((log) => {
|
|
7
|
-
if (log.type === LOG_TYPES.custom)
|
|
8
|
-
return React.createElement(Box, { key: log.id }, log.content);
|
|
9
|
-
const logLabel = MAP_LOG_TYPE_TO_LABEL[log.type];
|
|
10
|
-
const logColor = MAP_LOG_TYPE_TO_TEXT_COLOR[log.type];
|
|
11
|
-
return typeof log.content === 'string' ? (React.createElement(Text, { key: log.id },
|
|
12
|
-
React.createElement(Text, { color: logColor },
|
|
13
|
-
"[",
|
|
14
|
-
logLabel,
|
|
15
|
-
"] "),
|
|
16
|
-
log.content)) : (log.content);
|
|
17
|
-
})));
|
|
18
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { useState } from 'react';
|
|
2
|
-
import { LOG_TYPES } from './logs_constants.js';
|
|
3
|
-
import { LogEntry } from './log_entry.js';
|
|
4
|
-
import { v4 as uuid } from 'uuid';
|
|
5
|
-
export const useLogs = (maxLogs) => {
|
|
6
|
-
const [logs, setLogs] = useState([]);
|
|
7
|
-
const addLog = (content, type = LOG_TYPES.info) => {
|
|
8
|
-
setLogs((prev) => {
|
|
9
|
-
const newLogs = [
|
|
10
|
-
...prev,
|
|
11
|
-
new LogEntry({
|
|
12
|
-
id: uuid(),
|
|
13
|
-
type,
|
|
14
|
-
content,
|
|
15
|
-
timestamp: Date.now()
|
|
16
|
-
})
|
|
17
|
-
];
|
|
18
|
-
return newLogs.slice(-maxLogs);
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
const clearLogs = () => setLogs([]);
|
|
22
|
-
return { logs, addLog, clearLogs };
|
|
23
|
-
};
|