Product
Socket Now Supports uv.lock Files
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
mojito-dimensions-base
Advanced tools
A-B (a.k.a. bucket) testing infrastructure for mojito applications.
The Super Bundle RS Addon is a mojito resource store addon to discover, load and auto-configure resources from experiments super-bundle
packages.
Experiments super-bundle
packages are special types of mojito bundles
, which contain multiple versions of mojits that can be chosen at runtime through the dimension values using mojito selectors
infrastructure.
At runtime, dimensions and values to select resources must be set in the AC context.
The dimension name must be in the format: experiment_<name>
Consider the base application my-mojito-app
which contains Mojit1
.
We create an experiment super-bundle package mojito-dimensions-experiment_foo
,
which contains multiple versions of Mojit1
based on the value of the dimension the package represents.
Consider for the pupose of the example a layer named foo
, whose values can be EXP001, EXP002, EXP003
.
By convention, the name of the package must include the name of the dimension it uses, with the following format: mojito-dimensions-<dimension>
where dimension is like experiment_<layer>
.
We create an experiment package named mojito-dimensions-experiment_foo
, that will be an npm dependency of the base application.
This package must be of type super-bundle
, and must declare mojito-dimensions-base
as a dependency:
{
"name": "mojito-dimensions-experiment_foo",
"version": "0.0.1",
"yahoo": {
"mojito": {
"type": "super-bundle"
}
},
"dependencies": {
"mojito-dimensions-base": "0.0.x"
},
}
Super bundles are composed of a set of subdirectories, one per experiment dimension value, which contain partial mojito applications, meaning, one or more mojits and/or mojito resources, such as assets, binders, controllers, etc.
Each dimension subdirectory must contain an application.yaml
file to configure the selector that will be used to chose the right resources at runtime.
my-mojito-app
|-- ...
|-- mojits
| |-- ...
| `-- Mojit1/
|-- node_modules
| |-- ...
| `-- mojito-dimensions-experiment_foo
| |-- EXP001
| | |-- mojits/
| | | `-- Mojit1/
| | | `-- controller.server.js
| | |-- ...
| | |-- application.yaml
| | `-- [package.json]
| |
| |-- EXP002
| | |-- mojits/
| | | `-- Mojit1/
| | | `-- assets/
| | | `-- index.css
| | |-- ...
| | `-- application.yaml
| |
| |-- EXP003
| | |-- mojits/
| | | `-- Mojit1/
| | | `-- binders/
| | | `-- index.client.js
| | |-- ...
| | `-- application.yaml
| |
| |
| |-- node_modules
| | `-- mojito-dimensions-base
| | |-- addons
| | | `-- rs
| | | `-- super-bundle.server.js
| `-- package.json
|-- ...
|-- application.yaml
`-- package.json
Each experiment must configure the value of their dimension in the application.yaml
file.
[
{
"settings": [
"experiment_foo:EXP002"
],
"selector": "EXP002"
},
{
"settings": [
"experiment_foo:EXP002",
"device:iphone"
],
"selector": "EXP002_iphone"
}
]
In the example above, whenever the request context contains the dimension/value pair experiment_foo: "EXP001"
,
it will result in mojito loading resources included in the EXP001
experiment dir, using the selector with the same name.
Note that context dimensions combinations are also possible, like the device:iphone
config above.
Similarly, any application config can be overriden for the specific experiment settings:
[{
"settings": ["experiment_example:CONFIG"],
"selector": "CONFIG",
"specs": {
"someMojit": {
"config": {
"someConfig": {
"pagination": {
"config": {
"Pages": 5
}
}
}
}
}
}
},{
"settings": [ "experiment_example:CONFIG", "device:phone" ],
"selector": "CONFIG_phone",
"specs": {
"someMojit": {
"config": {
"someConfig": {
"pagination": {
"config": {
"Pages": 3
}
}
}
}
}
}
}]
There is no need to previously declare or hardcode all the possible experiment dimension names and values in dimensions.json
.
The super bundle addon automatically adds the dimensions names and values to the configuration at startup time while it discovers and loads super-bundle
type packages.
See: mojito-cli-dimension
FAQs
Mojito bucket testing infrastructure Super Bundle Addon
The npm package mojito-dimensions-base receives a total of 12 weekly downloads. As such, mojito-dimensions-base popularity was classified as not popular.
We found that mojito-dimensions-base demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers 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.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.