
Security News
/Research
npm Phishing Email Targets Developers with Typosquatted Domain
A phishing attack targeted developers using a typosquatted npm domain (npnjs.com) to steal credentials via fake login pages - watch out for similar scams.
cartridge-resolver-plugin
Advanced tools
Webpack Plugin: Provide the cartridge inheritance behavior same as Demandware server side scripts.
Provide the cartridge inheritance behavior same as Demandware server side scripts with additional functionalities suports.
npm install --save-dev cartridge-resolver-plugin
Register plugin to your webpack.config.js
.
For more informations, please have a look inside class CartridgeResolverPlugin
const cwd = process.cwd();
const CartridgeResolverPlugin = require('cartridge-resolver-plugin');
module.exports = {
// your other webpack configs...
resolve: {
plugins: [new CartridgeResolverPlugin({
your_storefront: path.resolve(cwd, 'cartridges/your_storefront/cartridge/client'),
your_storefront_style_guide: path.resolve(cwd, 'cartridges/your_storefront_style_guide/cartridge/client'),
plugin_wishlists: path.resolve(cwd, 'vendors/plugin_wishlists/cartridge/client'),
app_storefront_style_guide: path.resolve(cwd, 'cartridges/app_storefront_style_guide/cartridge/client'),
app_storefront_core: path.resolve(cwd, 'cartridges/app_storefront_core/cartridge/client'),
app_storefront_base: path.resolve(cwd, 'cartridges/app_storefront_base/cartridge/client')
}, {
base: 'app_storefront_base',
core: 'app_storefront_core'
})]
}
}
+ ----------- + ----- + --------------------------- +
| Cartridge | Alias | Assets |
+ ----------- + ----- + --- - --- - --- - --- - --- +
| cartridge_a | a | 1 | | 3 | | 5 |
| cartridge_b | b | | 2 | 3 | 4 | |
| cartridge_c | | | | | 4 | 5 |
| cartridge_d | d | 1 | 2 | | | 5 |
+ ----------- + ----- + --------------------------- +
^
flag used to lookup super module asset, Example:
require('^')
- require same asset from lower priority cartridgesrequire('^/some/asset')
- require some/asset
from lower priority cartridgesrequire('^:some/asset')
- same as above, require some/asset
from lower priority cartridges*
flag used to lookup across registered cartridges
require('*/some/asset')
- require some/asset
from any cartridgesrequire('*:some/asset')
- same as above, require some/asset
from any cartridges~
flag used to lookup asset in current cartridge
require('~/some/asset')
- require some/asset
from current cartridgerequire('~:some/asset')
- same as above, require some/asset
from current cartridgesuperModule
are modules loaded from lower priority cartridges . For example: in cartridge_b:2.js
, require super module mean lookup for asset 2.js
in 2 other lower priority cartridge_c
and cartridge_d
. The result will be cartridge_d:2.js
{cartridge_name}:{asset_path}
or {alias_name}:{asset_path}
. Solving the asset_path
from exactly cartridge_name
or alias_name
. For example:
require('cartridge_d:1')
will return cartridge_d/1.js
require('c:5')
will return cartridge_c/5.js
*
behavior. For example:
cartridge_a/1.js
- require('d/2')
which looking for 2.js
using d
alias (difference path with origin 1.js
) will equal require('*/2')
and return cartridge_b/2.js
(since the cartridge_b
has higher priority than cartridge_d
)cartridge_b/2.js
- require('c/5')
which looking for 5.js
using c
alias (difference path with origin 2.js
) will equal require('*/5')
and return cartridge_a/5.js
(since the cartridge_a
has higher priority than cartridge_c
)^
behavior: For example:
cartridge_a/1.js
- require('a/1')
which looking for 1.js
using a
alias (same path with origin 1.js
) will equal require('^/1')
and return cartridge_d/1.js
cartridge_a:1.js
, require relative ./2
asset will return the first asset found from cartridge path. The result will be cartridge_b:2.js
cartridge_a:1.js
, all requirements require('^')
or require('^:1')
or require('^/1')
or require('.')
or require('./1')
will looking for 1.js
from lower priority cartridges . The result will be cartridge_d:1.js
FAQs
Webpack Plugin: Provide the cartridge inheritance behavior same as Demandware server side scripts.
We found that cartridge-resolver-plugin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
/Research
A phishing attack targeted developers using a typosquatted npm domain (npnjs.com) to steal credentials via fake login pages - watch out for similar scams.
Security News
Knip hits 500 releases with v5.62.0, refining TypeScript config detection and updating plugins as monthly npm downloads approach 12M.
Security News
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.