Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"dependencies": {
"aligent/magento2-pci-4-compatibility": "https://github.com/aligent/magento2-pci-4-compatibility.git",
"creatuity/magento2-interceptors": "https://github.com/creatuity/magento2-interceptors.git",
"mage-os/inventory-metapackage": "https://github.com/mage-os/mageos-inventory.git",
"mage-os/security-package": "https://github.com/mage-os/mageos-security-package.git",
"mage-os/theme-adminhtml-m137": "https://github.com/mage-os/theme-adminhtml-m137.git",
"swissup/module-search-mysql-legacy": "https://github.com/swissup/module-search-mysql-legacy.git"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Notes

## dependencies-template.json

This file contains the core bundled extension dependencies of the latest upstream `mage-os/product-minimal` release.
It is used for the dependencies of the release `mage-os/product-minimal` build.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"dependencies": {
"mage-os/composer-root-update-plugin": "^2.0.4",
"mage-os/composer-dependency-version-audit-plugin": "~0.1"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Notes

This directory mostly contains the dependencies for the project packages.

## dependencies-template.json

This file lists the `mage-os/project-minimal` dependencies for the latest upstream release.
It is used for the dependencies for the project package of nightly builds.
24 changes: 24 additions & 0 deletions src/build-config/mageos-release-build-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ const {
transformMageOSCommunityEditionProject,
transformMageOSCommunityEditionProduct
} = require('../build-metapackage/mage-os-community-edition');
const {
transformMageOSMinimalProduct
} = require('../build-metapackage/mage-os-minimal');

const packagesConfig = require('./packages-config');
const {mergeBuildConfigs} = require('../utils');
Expand Down Expand Up @@ -41,6 +44,27 @@ const releaseBuildConfig = {
transformMagentoCommunityEditionProduct,
transformMageOSCommunityEditionProduct,
]
},
{
name: 'project-minimal',
type: 'project',
fromTag: '2.1.0',
description: 'Mage-OS Minimal Edition Project',
transform: [
transformMagentoCommunityEditionProject,
transformMageOSCommunityEditionProject,
]
},
{
name: 'product-minimal',
type: 'metapackage',
fromTag: '2.1.0',
description: 'Mage-OS Minimal Edition',
transform: [
transformMagentoCommunityEditionProduct,
transformMageOSCommunityEditionProduct,
transformMageOSMinimalProduct
]
}
]
},
Expand Down
240 changes: 240 additions & 0 deletions src/build-metapackage/mage-os-minimal.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,240 @@
const buildState = require('../type/build-state');
const metapackageDefinition = require('../type/metapackage-definition');
const repositoryBuildDefinition = require('../type/repository-build-definition');
const {compareVersions} = require('../utils');
const {
updateComposerConfigFromMagentoToMageOs
} = require('../release-build-tools');

/**
* @param {{}} composerConfig
* @param {repositoryBuildDefinition} instruction
* @param {metapackageDefinition} metapackage
* @param {buildState} release
*/
async function transformMageOSMinimalProduct(composerConfig, instruction, metapackage, release) {
// Do not reprocess historical releases
if (composerConfig.version !== release.version) {
return composerConfig;
}

const preservePackages = new Set([
'php',
'ext-bcmath',
'ext-ctype',
'ext-curl',
'ext-dom',
'ext-ftp',
'ext-gd',
'ext-hash',
'ext-iconv',
'ext-intl',
'ext-mbstring',
'ext-openssl',
'ext-pdo_mysql',
'ext-simplexml',
'ext-soap',
'ext-sodium',
'ext-xsl',
'ext-zip',
'lib-libxml',
'aligent/magento2-pci-4-compatibility',
'colinmollenhour/cache-backend-file',
'colinmollenhour/cache-backend-redis',
'colinmollenhour/credis',
'colinmollenhour/php-redis-session-abstract',
'creatuity/magento2-interceptors',
'guzzlehttp/guzzle',
'laminas/laminas-captcha',
'laminas/laminas-code',
'laminas/laminas-di',
'laminas/laminas-escaper',
'laminas/laminas-eventmanager',
'laminas/laminas-feed',
'laminas/laminas-filter',
'laminas/laminas-http',
'laminas/laminas-i18n',
'laminas/laminas-modulemanager',
'laminas/laminas-mvc',
'laminas/laminas-permissions-acl',
'laminas/laminas-servicemanager',
'laminas/laminas-soap',
'laminas/laminas-stdlib',
'laminas/laminas-uri',
'laminas/laminas-validator',
'monolog/monolog',
'pelago/emogrifier',
'phpseclib/mcrypt_compat',
'phpseclib/phpseclib',
'psr/log',
'ramsey/uuid',
'swissup/module-search-mysql-legacy',
'symfony/console',
'symfony/intl',
'symfony/mailer',
'symfony/mime',
'symfony/process',
'symfony/string',
'tedivm/jshrink',
'tubalmartin/cssmin',
'wikimedia/less.php',
`${instruction.vendor}/composer`,
`${instruction.vendor}/composer-dependency-version-audit-plugin`,
`${instruction.vendor}/framework`,
`${instruction.vendor}/framework-amqp`,
`${instruction.vendor}/framework-bulk`,
`${instruction.vendor}/framework-message-queue`,
`${instruction.vendor}/magento-composer-installer`,
`${instruction.vendor}/magento-zf-db`,
`${instruction.vendor}/magento2-base`,
`${instruction.vendor}/module-admin-notification`,
`${instruction.vendor}/module-advanced-search`,
`${instruction.vendor}/module-async-config`,
`${instruction.vendor}/module-asynchronous-operations`,
`${instruction.vendor}/module-authorization`,
`${instruction.vendor}/module-backend`,
`${instruction.vendor}/module-bundle`,
`${instruction.vendor}/module-cache-invalidate`,
`${instruction.vendor}/module-captcha`,
`${instruction.vendor}/module-catalog`,
`${instruction.vendor}/module-catalog-import-export`,
`${instruction.vendor}/module-catalog-rule`,
`${instruction.vendor}/module-catalog-rule-configurable`,
`${instruction.vendor}/module-catalog-search`,
`${instruction.vendor}/module-catalog-url-rewrite`,
`${instruction.vendor}/module-catalog-widget`,
`${instruction.vendor}/module-checkout`,
`${instruction.vendor}/module-checkout-agreements`,
`${instruction.vendor}/module-cms`,
`${instruction.vendor}/module-cms-url-rewrite`,
`${instruction.vendor}/module-config`,
`${instruction.vendor}/module-configurable-import-export`,
`${instruction.vendor}/module-configurable-product`,
`${instruction.vendor}/module-configurable-product-sales`,
`${instruction.vendor}/module-contact`,
`${instruction.vendor}/module-cookie`,
`${instruction.vendor}/module-cron`,
`${instruction.vendor}/module-currency-symbol`,
`${instruction.vendor}/module-customer`,
`${instruction.vendor}/module-deploy`,
`${instruction.vendor}/module-developer`,
`${instruction.vendor}/module-directory`,
`${instruction.vendor}/module-downloadable`,
`${instruction.vendor}/module-eav`,
`${instruction.vendor}/module-email`,
`${instruction.vendor}/module-encryption-key`,
`${instruction.vendor}/module-gift-message`,
`${instruction.vendor}/module-google-analytics`,
`${instruction.vendor}/module-google-gtag`,
`${instruction.vendor}/module-grouped-product`,
`${instruction.vendor}/module-import-export`,
`${instruction.vendor}/module-indexer`,
`${instruction.vendor}/module-integration`,
`${instruction.vendor}/module-jwt-framework-adapter`,
`${instruction.vendor}/module-jwt-user-token`,
`${instruction.vendor}/module-layered-navigation`,
`${instruction.vendor}/module-login-as-customer`,
`${instruction.vendor}/module-login-as-customer-admin-ui`,
`${instruction.vendor}/module-login-as-customer-api`,
`${instruction.vendor}/module-login-as-customer-frontend-ui`,
`${instruction.vendor}/module-login-as-customer-log`,
`${instruction.vendor}/module-login-as-customer-page-cache`,
`${instruction.vendor}/module-login-as-customer-quote`,
`${instruction.vendor}/module-login-as-customer-sales`,
`${instruction.vendor}/module-media-content`,
`${instruction.vendor}/module-media-content-api`,
`${instruction.vendor}/module-media-content-catalog`,
`${instruction.vendor}/module-media-content-cms`,
`${instruction.vendor}/module-media-content-synchronization`,
`${instruction.vendor}/module-media-content-synchronization-api`,
`${instruction.vendor}/module-media-content-synchronization-catalog`,
`${instruction.vendor}/module-media-content-synchronization-cms`,
`${instruction.vendor}/module-media-gallery`,
`${instruction.vendor}/module-media-gallery-api`,
`${instruction.vendor}/module-media-gallery-catalog`,
`${instruction.vendor}/module-media-gallery-catalog-integration`,
`${instruction.vendor}/module-media-gallery-catalog-ui`,
`${instruction.vendor}/module-media-gallery-cms-ui`,
`${instruction.vendor}/module-media-gallery-integration`,
`${instruction.vendor}/module-media-gallery-metadata`,
`${instruction.vendor}/module-media-gallery-metadata-api`,
`${instruction.vendor}/module-media-gallery-renditions`,
`${instruction.vendor}/module-media-gallery-renditions-api`,
`${instruction.vendor}/module-media-gallery-synchronization`,
`${instruction.vendor}/module-media-gallery-synchronization-api`,
`${instruction.vendor}/module-media-gallery-synchronization-metadata`,
`${instruction.vendor}/module-media-gallery-ui`,
`${instruction.vendor}/module-media-gallery-ui-api`,
`${instruction.vendor}/module-media-storage`,
`${instruction.vendor}/module-message-queue`,
`${instruction.vendor}/module-mysql-mq`,
`${instruction.vendor}/module-newsletter`,
`${instruction.vendor}/module-offline-payments`,
`${instruction.vendor}/module-offline-shipping`,
`${instruction.vendor}/module-order-cancellation`,
`${instruction.vendor}/module-order-cancellation-ui`,
`${instruction.vendor}/module-page-cache`,
`${instruction.vendor}/module-payment`,
`${instruction.vendor}/module-paypal`,
`${instruction.vendor}/module-paypal-captcha`,
`${instruction.vendor}/module-persistent`,
`${instruction.vendor}/module-product-alert`,
`${instruction.vendor}/module-product-video`,
`${instruction.vendor}/module-quote`,
`${instruction.vendor}/module-quote-bundle-options`,
`${instruction.vendor}/module-quote-configurable-options`,
`${instruction.vendor}/module-quote-downloadable-links`,
`${instruction.vendor}/module-release-notification`,
`${instruction.vendor}/module-remote-storage`,
`${instruction.vendor}/module-reports`,
`${instruction.vendor}/module-require-js`,
`${instruction.vendor}/module-review`,
`${instruction.vendor}/module-robots`,
`${instruction.vendor}/module-rule`,
`${instruction.vendor}/module-sales`,
`${instruction.vendor}/module-sales-rule`,
`${instruction.vendor}/module-sales-sequence`,
`${instruction.vendor}/module-search`,
`${instruction.vendor}/module-security`,
`${instruction.vendor}/module-shipping`,
`${instruction.vendor}/module-sitemap`,
`${instruction.vendor}/module-store`,
`${instruction.vendor}/module-swatches`,
`${instruction.vendor}/module-swatches-layered-navigation`,
`${instruction.vendor}/module-tax`,
`${instruction.vendor}/module-theme`,
`${instruction.vendor}/module-translation`,
`${instruction.vendor}/module-ui`,
`${instruction.vendor}/module-url-rewrite`,
`${instruction.vendor}/module-user`,
`${instruction.vendor}/module-variable`,
`${instruction.vendor}/module-vault`,
`${instruction.vendor}/module-webapi`,
`${instruction.vendor}/module-webapi-async`,
`${instruction.vendor}/module-webapi-security`,
`${instruction.vendor}/module-weee`,
`${instruction.vendor}/module-widget`,
`${instruction.vendor}/module-wishlist`,
`${instruction.vendor}/theme-adminhtml-backend`,
`${instruction.vendor}/theme-adminhtml-m137`,
`${instruction.vendor}/theme-frontend-blank`,
`${instruction.vendor}/theme-frontend-luma`,
`${instruction.vendor}/zend-cache`,
`${instruction.vendor}/zend-db`,
`${instruction.vendor}/zend-pdf`,
]);

// Keep only preserved requirements for this minimal distro
composerConfig.require = Object.fromEntries(
Object.entries(composerConfig.require || {})
.filter(
([pkg]) => preservePackages.has(pkg)
)
);

return composerConfig
}

module.exports = {
transformMageOSMinimalProduct,
};