@scandipwa/magento-scripts 1.14.1-alpha.1 → 1.14.1-alpha.4
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/index.js +13 -0
- package/lib/commands/cli.js +28 -1
- package/lib/commands/execute.js +2 -1
- package/lib/config/docker.js +45 -9
- package/lib/config/get-port-config.js +2 -1
- package/lib/config/port-config.js +1 -0
- package/lib/config/templates/magentorc.template +3 -5
- package/lib/config/templates/php.template.ini +6 -4
- package/lib/config/templates/varnish.template.vcl +241 -0
- package/lib/config/versions/magento-2.3.0.js +9 -0
- package/lib/config/versions/magento-2.3.1.js +9 -0
- package/lib/config/versions/magento-2.3.2-p2.js +9 -0
- package/lib/config/versions/magento-2.3.2.js +9 -0
- package/lib/config/versions/magento-2.3.3-p1.js +9 -0
- package/lib/config/versions/magento-2.3.3.js +9 -0
- package/lib/config/versions/magento-2.3.4-p2.js +9 -0
- package/lib/config/versions/magento-2.3.4.js +9 -0
- package/lib/config/versions/magento-2.3.5-p1.js +9 -0
- package/lib/config/versions/magento-2.3.5-p2.js +9 -0
- package/lib/config/versions/magento-2.3.5.js +9 -0
- package/lib/config/versions/magento-2.3.6-p1.js +9 -0
- package/lib/config/versions/magento-2.3.6.js +9 -0
- package/lib/config/versions/magento-2.3.7-p1.js +9 -0
- package/lib/config/versions/magento-2.3.7-p2.js +9 -0
- package/lib/config/versions/magento-2.3.7-p3.js +9 -0
- package/lib/config/versions/magento-2.3.7.js +9 -0
- package/lib/config/versions/magento-2.4.0-p1.js +9 -0
- package/lib/config/versions/magento-2.4.0.js +9 -0
- package/lib/config/versions/magento-2.4.1-p1.js +9 -0
- package/lib/config/versions/magento-2.4.1.js +9 -0
- package/lib/config/versions/magento-2.4.2-p1.js +9 -0
- package/lib/config/versions/magento-2.4.2-p2.js +9 -0
- package/lib/config/versions/magento-2.4.2.js +9 -0
- package/lib/config/versions/magento-2.4.3-p1.js +9 -0
- package/lib/config/versions/magento-2.4.3-p2.js +9 -0
- package/lib/config/versions/magento-2.4.3.js +9 -0
- package/lib/config/versions/magento-2.4.4.js +9 -0
- package/lib/tasks/cli/create-bashrc-config.js +5 -2
- package/lib/tasks/docker/containers.js +10 -8
- package/lib/tasks/docker/volumes.js +4 -4
- package/lib/tasks/file-system/create-nginx-config.js +5 -0
- package/lib/tasks/file-system/create-php-storm-config.js +82 -0
- package/lib/tasks/file-system/create-varnish-config.js +51 -0
- package/lib/tasks/file-system/index.js +4 -2
- package/lib/tasks/magento/setup-magento/configure-elasticsearch.js +1 -1
- package/lib/tasks/magento/setup-magento/disable-2fa.js +4 -12
- package/lib/tasks/magento/setup-magento/disable-full-page-cache.js +20 -0
- package/lib/tasks/magento/setup-magento/increase-admin-session-lifetime.js +14 -16
- package/lib/tasks/magento/setup-magento/migrate-database.js +21 -6
- package/lib/tasks/magento/setup-magento/varnish-config.js +63 -0
- package/lib/tasks/mysql/fix-db.js +2 -2
- package/lib/tasks/php/index.js +1 -1
- package/lib/tasks/php/update-env-php.js +16 -1
- package/lib/tasks/php/update-env.php +54 -12
- package/lib/tasks/requirements/docker/index.js +2 -0
- package/lib/tasks/requirements/docker/install.js +11 -11
- package/lib/tasks/requirements/docker/running-status.js +137 -0
- package/lib/tasks/requirements/docker/version.js +2 -0
- package/lib/tasks/requirements/index.js +5 -5
- package/lib/tasks/requirements/php-version.js +3 -1
- package/lib/tasks/start.js +2 -6
- package/lib/tasks/status/index.js +1 -1
- package/lib/tasks/theme/link-theme.js +2 -2
- package/lib/tasks/theme/setup-persisted-query.js +3 -3
- package/lib/tasks/theme/setup-themes.js +2 -2
- package/lib/util/config-file-validator.js +11 -1
- package/lib/util/config-php-json.js +19 -0
- package/lib/util/instance-metadata.js +1 -7
- package/lib/util/is-running-root.js +3 -0
- package/lib/util/php-task.js +6 -2
- package/lib/util/run-php.js +7 -1
- package/lib/util/systemctl.js +46 -0
- package/package.json +2 -3
- package/typings/context.d.ts +1 -2
- package/typings/index.d.ts +19 -0
- package/lib/config/xml-parser.js +0 -61
- package/lib/tasks/file-system/create-phpstorm-config/database-config.js +0 -248
- package/lib/tasks/file-system/create-phpstorm-config/eslint-config.js +0 -83
- package/lib/tasks/file-system/create-phpstorm-config/exclude-folder-config.js +0 -154
- package/lib/tasks/file-system/create-phpstorm-config/index.js +0 -27
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/coding-standard-config.js +0 -29
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/config.js +0 -54
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/custom-ruleset-path-config.js +0 -31
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/default-properties-config.js +0 -42
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/eslint-inspection-config.js +0 -37
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/index.js +0 -80
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/magento-coding-standard-config.js +0 -29
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/mess-detector-validation-inspection-config.js +0 -145
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/paths.js +0 -20
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/php-cs-fixer-validation-inspection-config.js +0 -60
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/php-cs-validation-inspection-config.js +0 -119
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/stylelint-inspection-config.js +0 -37
- package/lib/tasks/file-system/create-phpstorm-config/keys.js +0 -14
- package/lib/tasks/file-system/create-phpstorm-config/php-config/index.js +0 -67
- package/lib/tasks/file-system/create-phpstorm-config/php-config/mess-detector-config.js +0 -57
- package/lib/tasks/file-system/create-phpstorm-config/php-config/php-code-sniffer-config.js +0 -76
- package/lib/tasks/file-system/create-phpstorm-config/php-config/php-cs-fixer-config.js +0 -63
- package/lib/tasks/file-system/create-phpstorm-config/php-config/php-project-shared-configuration-config.js +0 -69
- package/lib/tasks/file-system/create-phpstorm-config/stylelint-config.js +0 -77
- package/lib/tasks/file-system/create-phpstorm-config/workspace-config/composer-settings-config.js +0 -98
- package/lib/tasks/file-system/create-phpstorm-config/workspace-config/format-setting-config.js +0 -57
- package/lib/tasks/file-system/create-phpstorm-config/workspace-config/index.js +0 -66
- package/lib/tasks/file-system/create-phpstorm-config/workspace-config/php-debug-general-config.js +0 -64
- package/lib/tasks/file-system/create-phpstorm-config/workspace-config/php-server-config.js +0 -60
- package/lib/tasks/file-system/create-phpstorm-config/workspace-config/properties-component-config.js +0 -51
- package/lib/tasks/file-system/create-phpstorm-config/workspace-config/run-manager-config.js +0 -74
- package/lib/tasks/file-system/create-phpstorm-config/xml-utils.js +0 -5
- package/lib/tasks/magento/setup-magento/adjust-magento-configuration.js +0 -27
- package/lib/tasks/magento/setup-magento/disable-page-cache.js +0 -11
- package/typings/phpstorm.d.ts +0 -33
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
const { nameKey } = require('../keys');
|
|
2
|
-
|
|
3
|
-
const RUN_MANAGER_COMPONENT_NAME = 'RunManager';
|
|
4
|
-
|
|
5
|
-
const PHP_REMOTE_DEBUG_RUN_CONFIGURATION_TYPE = 'PhpRemoteDebugRunConfigurationType';
|
|
6
|
-
|
|
7
|
-
const serverNameKey = '@_server_name';
|
|
8
|
-
const sessionIdKey = '@_session_id';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* @param {Array} workspaceConfigs
|
|
12
|
-
* @param {import('../../../../../typings/phpstorm').PHPStormConfig} phpStormConfiguration
|
|
13
|
-
* @returns {Promise<Boolean>}
|
|
14
|
-
*/
|
|
15
|
-
const setupRunManager = async (workspaceConfigs, phpStormConfiguration) => {
|
|
16
|
-
const { xdebug } = phpStormConfiguration;
|
|
17
|
-
let hasChanges = false;
|
|
18
|
-
const runManagerComponent = workspaceConfigs.find(
|
|
19
|
-
(workspaceConfig) => workspaceConfig[nameKey] === RUN_MANAGER_COMPONENT_NAME
|
|
20
|
-
);
|
|
21
|
-
|
|
22
|
-
const defaultRunManagerConfiguration = {
|
|
23
|
-
[nameKey]: xdebug.runManagerName,
|
|
24
|
-
'@_type': PHP_REMOTE_DEBUG_RUN_CONFIGURATION_TYPE,
|
|
25
|
-
'@_factoryName': 'PHP Remote Debug',
|
|
26
|
-
'@_filter_connections': 'FILTER',
|
|
27
|
-
[serverNameKey]: xdebug.serverName,
|
|
28
|
-
[sessionIdKey]: xdebug.sessionId,
|
|
29
|
-
method: {
|
|
30
|
-
'@_v': '2'
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
if (runManagerComponent) {
|
|
35
|
-
if (runManagerComponent.configuration && !Array.isArray(runManagerComponent.configuration)) {
|
|
36
|
-
hasChanges = true;
|
|
37
|
-
runManagerComponent.configuration = [runManagerComponent.configuration];
|
|
38
|
-
} else if (!runManagerComponent.configuration) {
|
|
39
|
-
hasChanges = true;
|
|
40
|
-
runManagerComponent.configuration = [];
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
const phpRemoteDebugRunConfiguration = runManagerComponent.configuration.find(
|
|
44
|
-
(configuration) => configuration['@_type'] === PHP_REMOTE_DEBUG_RUN_CONFIGURATION_TYPE && configuration[nameKey] === xdebug.runManagerName
|
|
45
|
-
);
|
|
46
|
-
|
|
47
|
-
if (phpRemoteDebugRunConfiguration) {
|
|
48
|
-
if (phpRemoteDebugRunConfiguration[serverNameKey] !== xdebug.serverName) {
|
|
49
|
-
hasChanges = true;
|
|
50
|
-
phpRemoteDebugRunConfiguration[serverNameKey] = xdebug.serverName;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
if (phpRemoteDebugRunConfiguration[sessionIdKey] !== xdebug.sessionId) {
|
|
54
|
-
hasChanges = true;
|
|
55
|
-
phpRemoteDebugRunConfiguration[sessionIdKey] = xdebug.sessionId;
|
|
56
|
-
}
|
|
57
|
-
} else {
|
|
58
|
-
hasChanges = true;
|
|
59
|
-
runManagerComponent.configuration.push(defaultRunManagerConfiguration);
|
|
60
|
-
}
|
|
61
|
-
} else {
|
|
62
|
-
hasChanges = true;
|
|
63
|
-
workspaceConfigs.push({
|
|
64
|
-
[nameKey]: RUN_MANAGER_COMPONENT_NAME,
|
|
65
|
-
configuration: [
|
|
66
|
-
defaultRunManagerConfiguration
|
|
67
|
-
]
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
return hasChanges;
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
module.exports = setupRunManager;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
const { isTableExists } = require('../../../util/database');
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @type {() => import('listr2').ListrTask<import('../../../../typings/context').ListrContext>}
|
|
5
|
-
*/
|
|
6
|
-
const adjustMagentoConfiguration = () => ({
|
|
7
|
-
title: 'Adjusting Magento Database Configuration',
|
|
8
|
-
skip: async (ctx) => !(await isTableExists('magento', 'core_config_data', ctx)),
|
|
9
|
-
task: async (ctx) => {
|
|
10
|
-
const { mysqlConnection } = ctx;
|
|
11
|
-
|
|
12
|
-
// delete varnish configuration if exists
|
|
13
|
-
await mysqlConnection.query(`
|
|
14
|
-
DELETE FROM core_config_data WHERE path LIKE '%varnish%';
|
|
15
|
-
`);
|
|
16
|
-
|
|
17
|
-
// update cache policy to not use varnish
|
|
18
|
-
// 0 - magento cache, 2 - varnish cache
|
|
19
|
-
await mysqlConnection.query(`
|
|
20
|
-
UPDATE core_config_data
|
|
21
|
-
SET value = ?
|
|
22
|
-
WHERE path = ?;
|
|
23
|
-
`, ['0', 'system/full_page_cache/caching_application']);
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
module.exports = adjustMagentoConfiguration;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
const magentoTask = require('../../../util/magento-task');
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @type {() => import('listr2').ListrTask<import('../../../../typings/context').ListrContext>}
|
|
5
|
-
*/
|
|
6
|
-
const disablePageCache = () => ({
|
|
7
|
-
title: 'Disabling full_page cache in Magento',
|
|
8
|
-
task: (ctx, task) => task.newListr(magentoTask('cache:disable full_page'))
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
module.exports = disablePageCache;
|
package/typings/phpstorm.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
export interface PHPStormConfig {
|
|
2
|
-
xdebug: {
|
|
3
|
-
v2Port: string;
|
|
4
|
-
v3Port: string;
|
|
5
|
-
debugServerAddress: string;
|
|
6
|
-
serverName: string;
|
|
7
|
-
runManagerName: string;
|
|
8
|
-
sessionId: string;
|
|
9
|
-
path: string;
|
|
10
|
-
templatePath: string;
|
|
11
|
-
}
|
|
12
|
-
php: {
|
|
13
|
-
phpLanguageLevel: string;
|
|
14
|
-
path: string;
|
|
15
|
-
templatePath: string;
|
|
16
|
-
}
|
|
17
|
-
database: {
|
|
18
|
-
driver: string;
|
|
19
|
-
dataSourceManagerName: string;
|
|
20
|
-
dataSourcesLocal: {
|
|
21
|
-
path: string;
|
|
22
|
-
templatePath: string;
|
|
23
|
-
}
|
|
24
|
-
dataSources: {
|
|
25
|
-
path: string;
|
|
26
|
-
templatePath: string;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
inspectionTools: {
|
|
30
|
-
path: string;
|
|
31
|
-
templatePath: string;
|
|
32
|
-
}
|
|
33
|
-
}
|