@scandipwa/magento-scripts 1.14.1-alpha.9 → 1.15.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/lib/commands/cli.js +9 -4
- package/lib/commands/logs.js +1 -0
- package/lib/commands/start.js +18 -5
- package/lib/config/cma-config.js +16 -0
- package/lib/config/dependencies-for-platforms.js +15 -3
- package/lib/config/docker.js +4 -3
- package/lib/config/get-port-config.js +2 -1
- package/lib/config/index.js +2 -1
- package/lib/config/php/extensions/libsodium.js +2 -1
- package/lib/config/scandipwa-versions.js +2 -1
- package/lib/config/system-config.js +34 -5
- package/lib/config/templates/magentorc.template +2 -0
- package/lib/config/templates/varnish.template.vcl +9 -4
- package/lib/config/xml-parser.js +63 -0
- package/lib/errors/known-error.js +15 -0
- package/lib/errors/unknown-error.js +15 -0
- package/lib/tasks/cli/create-bashrc-config.js +2 -1
- package/lib/tasks/composer/index.js +5 -3
- package/lib/tasks/composer/local-auth-json.js +8 -4
- package/lib/tasks/docker/network.js +2 -1
- package/lib/tasks/execute/index.js +2 -3
- package/lib/tasks/file-system/create-nginx-config.js +2 -1
- package/lib/tasks/file-system/create-php-config.js +2 -1
- package/lib/tasks/file-system/create-php-fpm-config.js +2 -1
- package/lib/tasks/file-system/create-phpstorm-config/database-config.js +249 -0
- package/lib/tasks/file-system/create-phpstorm-config/eslint-config.js +85 -0
- package/lib/tasks/file-system/create-phpstorm-config/exclude-folder-config.js +154 -0
- package/lib/tasks/file-system/create-phpstorm-config/index.js +27 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/coding-standard-config.js +26 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/config.js +54 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/custom-ruleset-path-config.js +28 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/default-properties-config.js +42 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/eslint-inspection-config.js +37 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/index.js +80 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/magento-coding-standard-config.js +26 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/mess-detector-validation-inspection-config.js +142 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/paths.js +20 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/php-cs-fixer-validation-inspection-config.js +60 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/php-cs-validation-inspection-config.js +116 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/stylelint-inspection-config.js +37 -0
- package/lib/tasks/file-system/create-phpstorm-config/keys.js +14 -0
- package/lib/tasks/file-system/create-phpstorm-config/php-config/index.js +67 -0
- package/lib/tasks/file-system/create-phpstorm-config/php-config/mess-detector-config.js +54 -0
- package/lib/tasks/file-system/create-phpstorm-config/php-config/php-code-sniffer-config.js +66 -0
- package/lib/tasks/file-system/create-phpstorm-config/php-config/php-cs-fixer-config.js +58 -0
- package/lib/tasks/file-system/create-phpstorm-config/php-config/php-project-shared-configuration-config.js +59 -0
- package/lib/tasks/file-system/create-phpstorm-config/stylelint-config.js +77 -0
- package/lib/tasks/file-system/create-phpstorm-config/workspace-config/composer-settings-config.js +97 -0
- package/lib/tasks/file-system/create-phpstorm-config/workspace-config/format-setting-config.js +57 -0
- package/lib/tasks/file-system/create-phpstorm-config/workspace-config/index.js +66 -0
- package/lib/tasks/file-system/create-phpstorm-config/workspace-config/php-debug-general-config.js +64 -0
- package/lib/tasks/file-system/create-phpstorm-config/workspace-config/php-server-config.js +57 -0
- package/lib/tasks/file-system/create-phpstorm-config/workspace-config/properties-component-config.js +49 -0
- package/lib/tasks/file-system/create-phpstorm-config/workspace-config/run-manager-config.js +64 -0
- package/lib/tasks/file-system/create-phpstorm-config/xml-utils.js +5 -0
- package/lib/tasks/file-system/create-ssl-terminator-config.js +5 -3
- package/lib/tasks/file-system/create-varnish-config.js +2 -23
- package/lib/tasks/file-system/create-vscode-config.js +3 -2
- package/lib/tasks/file-system/index.js +1 -1
- package/lib/tasks/magento/enable-magento-composer-plugins.js +3 -2
- package/lib/tasks/magento/install-magento.js +7 -5
- package/lib/tasks/magento/setup-magento/adjust-full-page-cache.js +26 -0
- package/lib/tasks/magento/setup-magento/delete-admin-users.js +1 -1
- package/lib/tasks/magento/setup-magento/delete-customers.js +7 -4
- package/lib/tasks/magento/setup-magento/delete-orders.js +6 -4
- package/lib/tasks/magento/setup-magento/flush-redis-config.js +2 -1
- package/lib/tasks/magento/setup-magento/index.js +3 -1
- package/lib/tasks/magento/setup-magento/install-magento.js +2 -1
- package/lib/tasks/magento/setup-magento/set-base-url.js +7 -2
- package/lib/tasks/magento/setup-magento/upgrade-magento.js +11 -1
- package/lib/tasks/magento/setup-magento/waiting-for-varnish.js +41 -0
- package/lib/tasks/mysql/connect-to-mysql.js +2 -1
- package/lib/tasks/mysql/import-dump-to-mysql.js +13 -2
- package/lib/tasks/mysql/import-remote-db/index.js +2 -1
- package/lib/tasks/mysql/import-remote-db/ssh/index.js +2 -1
- package/lib/tasks/mysql/import-remote-db/ssh/regular-server.js +2 -1
- package/lib/tasks/php/bundled-extensions.js +28 -0
- package/lib/tasks/php/compile-options.js +27 -54
- package/lib/tasks/php/compile.js +6 -4
- package/lib/tasks/php/configure.js +7 -66
- package/lib/tasks/php/extensions/disable.js +2 -1
- package/lib/tasks/php/extensions/enable.js +2 -1
- package/lib/tasks/php/extensions/index.js +74 -0
- package/lib/tasks/php/extensions/install.js +3 -3
- package/lib/tasks/php/index.js +7 -6
- package/lib/tasks/php/install-sodium.js +93 -0
- package/lib/tasks/php/update-phpbrew.js +7 -3
- package/lib/tasks/php/validate-php.js +67 -0
- package/lib/tasks/php-fpm/start-php-fpm.js +4 -2
- package/lib/tasks/requirements/composer.js +59 -5
- package/lib/tasks/requirements/dependency/arch.js +2 -1
- package/lib/tasks/requirements/dependency/centos.js +2 -1
- package/lib/tasks/requirements/dependency/fedora.js +2 -1
- package/lib/tasks/requirements/dependency/mac.js +18 -3
- package/lib/tasks/requirements/docker/index.js +94 -40
- package/lib/tasks/requirements/docker/install-on-mac.js +29 -0
- package/lib/tasks/requirements/docker/install.js +2 -1
- package/lib/tasks/requirements/docker/running-status.js +32 -31
- package/lib/tasks/requirements/docker/version.js +2 -1
- package/lib/tasks/requirements/index.js +3 -0
- package/lib/tasks/requirements/node-version.js +2 -1
- package/lib/tasks/requirements/php-version.js +26 -24
- package/lib/tasks/requirements/phpbrew/index.js +2 -1
- package/lib/tasks/requirements/phpbrew/install.js +14 -2
- package/lib/tasks/requirements/phpbrew/version.js +2 -1
- package/lib/tasks/requirements/platform.js +5 -3
- package/lib/tasks/requirements/rosetta.js +32 -0
- package/lib/tasks/start.js +10 -2
- package/lib/tasks/theme/build-theme.js +2 -1
- package/lib/tasks/theme/install-theme.js +2 -1
- package/lib/tasks/theme/link-theme.js +2 -2
- package/lib/tasks/theme/retrieve-theme-data.js +2 -1
- package/lib/tasks/theme/setup-persisted-query.js +2 -1
- package/lib/tasks/theme/setup-themes.js +10 -3
- package/lib/tasks/theme/symlink-theme.js +8 -1
- package/lib/util/CSA-theme.js +4 -0
- package/lib/util/analytics.js +317 -0
- package/lib/util/arch.js +1 -1
- package/lib/util/config-file-validator.js +2 -1
- package/lib/util/config-php-json.js +3 -2
- package/lib/util/env-php-json.js +3 -2
- package/lib/util/exec-async-command.d.ts +2 -0
- package/lib/util/exec-async-command.js +31 -15
- package/lib/util/exec-async.js +9 -0
- package/lib/util/get-brew-bin-path.js +64 -0
- package/lib/util/get-installed-magento-version.js +3 -2
- package/lib/util/get-jsonfile-data.js +2 -1
- package/lib/util/install-dependencies-task.js +15 -5
- package/lib/util/instance-metadata.js +9 -2
- package/lib/util/ip.js +47 -1
- package/lib/util/magento-task.js +20 -9
- package/lib/util/php-task.js +7 -7
- package/lib/util/request.js +0 -0
- package/lib/util/resolve-configuration-with-overrides.js +2 -1
- package/lib/util/run-composer.js +5 -3
- package/lib/util/run-magento.js +3 -2
- package/lib/util/run-php.js +7 -2
- package/lib/util/wait-for-it.js +3 -2
- package/package.json +5 -3
- package/typings/context.d.ts +4 -0
- package/typings/phpstorm.d.ts +33 -0
- package/lib/tasks/file-system/create-php-storm-config.js +0 -82
- package/lib/tasks/magento/setup-magento/disable-full-page-cache.js +0 -20
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
const setConfigFile = require('../../util/set-config');
|
|
2
|
-
const pathExists = require('../../util/path-exists');
|
|
3
|
-
const path = require('path');
|
|
4
|
-
const fs = require('fs');
|
|
5
|
-
|
|
6
|
-
const createPhpStormConfig = () => ({
|
|
7
|
-
title: 'Setting PHPStorm config',
|
|
8
|
-
task: async ({ config: { phpStorm }, ports }) => {
|
|
9
|
-
const { phpLanguageLevel } = phpStorm.php;
|
|
10
|
-
const jdbcUrl = `jdbc:mysql://localhost:${ports.mysql}/magento`;
|
|
11
|
-
|
|
12
|
-
try {
|
|
13
|
-
await setConfigFile({
|
|
14
|
-
configPathname: phpStorm.xdebug.path,
|
|
15
|
-
template: phpStorm.xdebug.templatePath,
|
|
16
|
-
overwrite: true,
|
|
17
|
-
templateArgs: {
|
|
18
|
-
phpStorm
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
} catch (e) {
|
|
22
|
-
throw new Error(`Unexpected error accrued during workspace.xml config creation\n\n${e}`);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
try {
|
|
26
|
-
await setConfigFile({
|
|
27
|
-
configPathname: phpStorm.php.path,
|
|
28
|
-
template: phpStorm.php.templatePath,
|
|
29
|
-
overwrite: true,
|
|
30
|
-
templateArgs: {
|
|
31
|
-
phpLanguageLevel
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
} catch (e) {
|
|
35
|
-
throw new Error(`Unexpected error accrued during php.xml config creation\n\n${e}`);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
try {
|
|
39
|
-
await setConfigFile({
|
|
40
|
-
configPathname: phpStorm.database.dataSourcesLocal.path,
|
|
41
|
-
template: phpStorm.database.dataSourcesLocal.templatePath,
|
|
42
|
-
overwrite: true,
|
|
43
|
-
templateArgs: {
|
|
44
|
-
phpStorm
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
} catch (e) {
|
|
48
|
-
throw new Error(`Unexpected error accrued during dataSources.local.xml config creation\n\n${e}`);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
try {
|
|
52
|
-
await setConfigFile({
|
|
53
|
-
configPathname: phpStorm.database.dataSources.path,
|
|
54
|
-
template: phpStorm.database.dataSources.templatePath,
|
|
55
|
-
overwrite: true,
|
|
56
|
-
templateArgs: {
|
|
57
|
-
phpStorm,
|
|
58
|
-
jdbcUrl
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
} catch (e) {
|
|
62
|
-
throw new Error(`Unexpected error accrued during dataSources.xml config creation\n\n${e}`);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
if (!await pathExists(path.resolve('./.idea/dataSources'))) {
|
|
66
|
-
await fs.promises.mkdir(path.resolve('./.idea/dataSources'));
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
try {
|
|
70
|
-
await setConfigFile({
|
|
71
|
-
configPathname: phpStorm.inspectionTools.path,
|
|
72
|
-
template: phpStorm.inspectionTools.templatePath,
|
|
73
|
-
overwrite: true,
|
|
74
|
-
templateArgs: {}
|
|
75
|
-
});
|
|
76
|
-
} catch (e) {
|
|
77
|
-
throw new Error(`Unexpected error accrued during Project_Default.xml config creation\n\n${e}`);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
module.exports = createPhpStormConfig;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
const envPhpToJson = require('../../../util/env-php-json');
|
|
2
|
-
const magentoTask = require('../../../util/magento-task');
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* @type {() => import('listr2').ListrTask<import('../../../../typings/context').ListrContext>}
|
|
6
|
-
*/
|
|
7
|
-
const disableFullPageCache = () => ({
|
|
8
|
-
title: 'Disabling full_page cache in Magento',
|
|
9
|
-
task: async ({ magentoVersion }, task) => {
|
|
10
|
-
const { cache_types } = await envPhpToJson(process.cwd(), { magentoVersion });
|
|
11
|
-
|
|
12
|
-
if (cache_types.full_page !== 0) {
|
|
13
|
-
return task.newListr(magentoTask('cache:disable full_page'));
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
task.skip();
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
module.exports = disableFullPageCache;
|