mxrb 0.1.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.
- checksums.yaml +7 -0
- data/LICENSE +21 -0
- data/README.de-DE.md +108 -0
- data/README.md +172 -0
- data/README.pt-BR.md +109 -0
- data/bin/mxrb +1613 -0
- data/docs/README.md +10 -0
- data/docs/de-DE/README.md +24 -0
- data/docs/de-DE/architectural-patterns.md +26 -0
- data/docs/de-DE/architectural-standard.md +48 -0
- data/docs/de-DE/architecture.md +76 -0
- data/docs/de-DE/compiler.md +162 -0
- data/docs/de-DE/conventions.md +19 -0
- data/docs/de-DE/design-system.md +52 -0
- data/docs/de-DE/entity-dsl.md +53 -0
- data/docs/de-DE/native-runtime-quality-report.md +74 -0
- data/docs/de-DE/oql-sql.md +211 -0
- data/docs/de-DE/platform-api-integration.md +36 -0
- data/docs/de-DE/platform-operations.md +243 -0
- data/docs/de-DE/project-structure.md +32 -0
- data/docs/de-DE/ruby-first-roadmap.md +116 -0
- data/docs/de-DE/scaffolds.md +59 -0
- data/docs/de-DE/semantic-refactoring.md +56 -0
- data/docs/de-DE/team-server.md +33 -0
- data/docs/de-DE/validation-matrix.md +64 -0
- data/docs/de-DE/vetclinic-acceptance.md +24 -0
- data/docs/de-DE/writing.md +138 -0
- data/docs/en-US/README.md +24 -0
- data/docs/en-US/architectural-patterns.md +151 -0
- data/docs/en-US/architectural-standard.md +89 -0
- data/docs/en-US/architecture.md +170 -0
- data/docs/en-US/compiler.md +157 -0
- data/docs/en-US/conventions.md +82 -0
- data/docs/en-US/design-system.md +163 -0
- data/docs/en-US/entity-dsl.md +53 -0
- data/docs/en-US/native-runtime-quality-report.md +73 -0
- data/docs/en-US/oql-sql.md +201 -0
- data/docs/en-US/platform-api-integration.md +36 -0
- data/docs/en-US/platform-operations.md +244 -0
- data/docs/en-US/project-structure.md +49 -0
- data/docs/en-US/ruby-first-roadmap.md +186 -0
- data/docs/en-US/scaffolds.md +57 -0
- data/docs/en-US/semantic-refactoring.md +198 -0
- data/docs/en-US/team-server.md +32 -0
- data/docs/en-US/validation-matrix.md +257 -0
- data/docs/en-US/vetclinic-acceptance.md +23 -0
- data/docs/en-US/writing.md +655 -0
- data/docs/pt-BR/README.md +24 -0
- data/docs/pt-BR/architectural-patterns.md +25 -0
- data/docs/pt-BR/architectural-standard.md +533 -0
- data/docs/pt-BR/architecture.md +300 -0
- data/docs/pt-BR/compiler.md +162 -0
- data/docs/pt-BR/conventions.md +19 -0
- data/docs/pt-BR/design-system.md +65 -0
- data/docs/pt-BR/entity-dsl.md +116 -0
- data/docs/pt-BR/native-runtime-quality-report.md +73 -0
- data/docs/pt-BR/oql-sql.md +208 -0
- data/docs/pt-BR/platform-api-integration.md +36 -0
- data/docs/pt-BR/platform-operations.md +260 -0
- data/docs/pt-BR/project-structure.md +32 -0
- data/docs/pt-BR/ruby-first-roadmap.md +239 -0
- data/docs/pt-BR/scaffolds.md +104 -0
- data/docs/pt-BR/semantic-refactoring.md +55 -0
- data/docs/pt-BR/team-server.md +59 -0
- data/docs/pt-BR/validation-matrix.md +86 -0
- data/docs/pt-BR/vetclinic-acceptance.md +50 -0
- data/docs/pt-BR/writing.md +177 -0
- data/examples/sudoku_evaluation.rb +14 -0
- data/examples/sudoku_functional_test.rb +28 -0
- data/lib/mxrb/architecture/graph.rb +124 -0
- data/lib/mxrb/architecture/validator.rb +98 -0
- data/lib/mxrb/benchmark.rb +33 -0
- data/lib/mxrb/compare.rb +390 -0
- data/lib/mxrb/compiler/adapter.rb +96 -0
- data/lib/mxrb/compiler/artifact_document_compiler.rb +102 -0
- data/lib/mxrb/compiler/artifact_materializer.rb +53 -0
- data/lib/mxrb/compiler/client_model_materializer.rb +42 -0
- data/lib/mxrb/compiler/code_action_document_compiler.rb +64 -0
- data/lib/mxrb/compiler/code_action_materializer.rb +35 -0
- data/lib/mxrb/compiler/code_action_type_compiler.rb +32 -0
- data/lib/mxrb/compiler/combo_box_bundle_compiler.rb +314 -0
- data/lib/mxrb/compiler/compatibility_analyzer.rb +169 -0
- data/lib/mxrb/compiler/constants_materializer.rb +111 -0
- data/lib/mxrb/compiler/data_grid_bundle_compiler.rb +290 -0
- data/lib/mxrb/compiler/database_connector_action_compiler.rb +280 -0
- data/lib/mxrb/compiler/deployment_asset_copier.rb +60 -0
- data/lib/mxrb/compiler/deployment_bootstrapper.rb +208 -0
- data/lib/mxrb/compiler/deployment_materializer.rb +43 -0
- data/lib/mxrb/compiler/deployment_metadata.rb +64 -0
- data/lib/mxrb/compiler/domain_document_compiler.rb +153 -0
- data/lib/mxrb/compiler/domain_model_materializer.rb +35 -0
- data/lib/mxrb/compiler/domain_security_compiler.rb +82 -0
- data/lib/mxrb/compiler/gallery_bundle_compiler.rb +190 -0
- data/lib/mxrb/compiler/generic_widget_bundle_compiler.rb +281 -0
- data/lib/mxrb/compiler/image_bundle_compiler.rb +216 -0
- data/lib/mxrb/compiler/java_proxy_generator.rb +509 -0
- data/lib/mxrb/compiler/legacy_data_grid_compiler.rb +267 -0
- data/lib/mxrb/compiler/legacy_page_builder.rb +287 -0
- data/lib/mxrb/compiler/mda.rb +99 -0
- data/lib/mxrb/compiler/microflow_document_compiler.rb +85 -0
- data/lib/mxrb/compiler/microflow_materializer.rb +48 -0
- data/lib/mxrb/compiler/microflow_node_compiler.rb +250 -0
- data/lib/mxrb/compiler/model_package.rb +116 -0
- data/lib/mxrb/compiler/model_values.rb +67 -0
- data/lib/mxrb/compiler/nanoflow_program_compiler.rb +483 -0
- data/lib/mxrb/compiler/navigation_document_compiler.rb +93 -0
- data/lib/mxrb/compiler/packager.rb +100 -0
- data/lib/mxrb/compiler/page_bundle_builder.rb +56 -0
- data/lib/mxrb/compiler/page_bundle_compiler.rb +2004 -0
- data/lib/mxrb/compiler/page_document_compiler.rb +77 -0
- data/lib/mxrb/compiler/portable_packager.rb +356 -0
- data/lib/mxrb/compiler/project_jar_archive.rb +84 -0
- data/lib/mxrb/compiler/project_jar_builder.rb +121 -0
- data/lib/mxrb/compiler/project_materializer.rb +139 -0
- data/lib/mxrb/compiler/project_model_orderer.rb +52 -0
- data/lib/mxrb/compiler/runtime_data_types.rb +31 -0
- data/lib/mxrb/compiler/runtime_model_schema.rb +90 -0
- data/lib/mxrb/compiler/schemas/runtime-10.24.0.73019.json +1052 -0
- data/lib/mxrb/compiler/schemas/runtime-11.json +1215 -0
- data/lib/mxrb/compiler/schemas/runtime-6.10.8.json +1148 -0
- data/lib/mxrb/compiler/schemas/runtime-7.17.0.json +1144 -0
- data/lib/mxrb/compiler/schemas/runtime-7.5.0.json +1215 -0
- data/lib/mxrb/compiler/schemas/runtime-9.6.1.29396.json +868 -0
- data/lib/mxrb/compiler/schemas/system-model-10.24.0.73019.b64 +1135 -0
- data/lib/mxrb/compiler/schemas/system-model-11.12.1.b64 +815 -0
- data/lib/mxrb/compiler/schemas/system-model-6.10.8.b64 +497 -0
- data/lib/mxrb/compiler/schemas/system-model-7.17.0.b64 +519 -0
- data/lib/mxrb/compiler/schemas/system-model-7.5.0.b64 +504 -0
- data/lib/mxrb/compiler/schemas/system-model-9.6.1.29396.b64 +816 -0
- data/lib/mxrb/compiler/security_materializer.rb +104 -0
- data/lib/mxrb/compiler/settings_document_compiler.rb +45 -0
- data/lib/mxrb/compiler/settings_materializer.rb +25 -0
- data/lib/mxrb/compiler/source_model.rb +128 -0
- data/lib/mxrb/compiler/system_model_seed.rb +88 -0
- data/lib/mxrb/compiler/system_queue_materializer.rb +54 -0
- data/lib/mxrb/compiler/system_text_materializer.rb +49 -0
- data/lib/mxrb/compiler/translation_materializer.rb +95 -0
- data/lib/mxrb/compiler/web_bundle_builder.rb +155 -0
- data/lib/mxrb/compiler/web_list_data_source.rb +139 -0
- data/lib/mxrb/compiler/web_operation_compiler.rb +614 -0
- data/lib/mxrb/compiler/web_shell_materializer.rb +194 -0
- data/lib/mxrb/compiler/widget_package_extractor.rb +63 -0
- data/lib/mxrb/doctor.rb +116 -0
- data/lib/mxrb/dsl/builder.rb +1636 -0
- data/lib/mxrb/errors.rb +18 -0
- data/lib/mxrb/evaluation.rb +131 -0
- data/lib/mxrb/exporter.rb +1716 -0
- data/lib/mxrb/frontend/migrator.rb +775 -0
- data/lib/mxrb/functional.rb +307 -0
- data/lib/mxrb/github/annotator.rb +161 -0
- data/lib/mxrb/initializer.rb +257 -0
- data/lib/mxrb/integrity/validator.rb +136 -0
- data/lib/mxrb/io/bson_codec.rb +145 -0
- data/lib/mxrb/io/mpr_file.rb +558 -0
- data/lib/mxrb/io/mxunit_codec.rb +42 -0
- data/lib/mxrb/marketplace.rb +380 -0
- data/lib/mxrb/model/association.rb +98 -0
- data/lib/mxrb/model/attribute.rb +100 -0
- data/lib/mxrb/model/connector.rb +17 -0
- data/lib/mxrb/model/design_materializer.rb +133 -0
- data/lib/mxrb/model/design_migration.rb +126 -0
- data/lib/mxrb/model/design_system.rb +111 -0
- data/lib/mxrb/model/domain_model.rb +51 -0
- data/lib/mxrb/model/entity.rb +180 -0
- data/lib/mxrb/model/menu.rb +38 -0
- data/lib/mxrb/model/microflow.rb +100 -0
- data/lib/mxrb/model/module.rb +142 -0
- data/lib/mxrb/model/navigation.rb +127 -0
- data/lib/mxrb/model/page.rb +410 -0
- data/lib/mxrb/model/project.rb +187 -0
- data/lib/mxrb/model/unit.rb +48 -0
- data/lib/mxrb/module_initializer.rb +75 -0
- data/lib/mxrb/official_marketplace/content_api.rb +292 -0
- data/lib/mxrb/official_marketplace/dependency_resolver.rb +329 -0
- data/lib/mxrb/official_marketplace/lifecycle.rb +367 -0
- data/lib/mxrb/official_marketplace/module_package_importer.rb +318 -0
- data/lib/mxrb/official_marketplace/widget_package_installer.rb +414 -0
- data/lib/mxrb/official_marketplace.rb +720 -0
- data/lib/mxrb/oql/analyzer.rb +155 -0
- data/lib/mxrb/oql/index_advisor.rb +85 -0
- data/lib/mxrb/oql/plan_analyzer.rb +185 -0
- data/lib/mxrb/oql/server.rb +132 -0
- data/lib/mxrb/oql/sql_server_plan_analyzer.rb +190 -0
- data/lib/mxrb/oql/sql_server_workload_analyzer.rb +80 -0
- data/lib/mxrb/oql/workload_analyzer.rb +175 -0
- data/lib/mxrb/oql/workload_baseline.rb +60 -0
- data/lib/mxrb/oql.rb +424 -0
- data/lib/mxrb/project_lifecycle.rb +76 -0
- data/lib/mxrb/protocols/plan.rb +86 -0
- data/lib/mxrb/protocols.rb +123 -0
- data/lib/mxrb/runtime/database_workspace.rb +677 -0
- data/lib/mxrb/runtime/docker_executor.rb +41 -0
- data/lib/mxrb/runtime/docker_workspace.rb +29 -0
- data/lib/mxrb/runtime/executor.rb +169 -0
- data/lib/mxrb/runtime/java_locator.rb +26 -0
- data/lib/mxrb/runtime/native.rb +474 -0
- data/lib/mxrb/runtime/sql_server_database.rb +146 -0
- data/lib/mxrb/runtime/toolchain.rb +82 -0
- data/lib/mxrb/scaffold/cli.rb +113 -0
- data/lib/mxrb/scaffold/generator.rb +246 -0
- data/lib/mxrb/scaffold/help.rb +80 -0
- data/lib/mxrb/scaffold/page_templates.rb +54 -0
- data/lib/mxrb/scaffold/recipes.rb +198 -0
- data/lib/mxrb/scaffold/registry.rb +82 -0
- data/lib/mxrb/scaffold/templates.rb +723 -0
- data/lib/mxrb/scaffold/transaction.rb +84 -0
- data/lib/mxrb/schema/tables.rb +55 -0
- data/lib/mxrb/semantic/analyzer.rb +473 -0
- data/lib/mxrb/semantic/batch_plan.rb +68 -0
- data/lib/mxrb/semantic/domain_mutator.rb +419 -0
- data/lib/mxrb/semantic/embedder.rb +51 -0
- data/lib/mxrb/semantic/extractor.rb +290 -0
- data/lib/mxrb/semantic/index.rb +623 -0
- data/lib/mxrb/semantic/inliner.rb +216 -0
- data/lib/mxrb/semantic/mover.rb +153 -0
- data/lib/mxrb/semantic/onnx_embedder.rb +34 -0
- data/lib/mxrb/semantic/remover.rb +70 -0
- data/lib/mxrb/semantic/renamer.rb +211 -0
- data/lib/mxrb/semantic/tfidf_embedder.rb +46 -0
- data/lib/mxrb/semantic/vec_store.rb +75 -0
- data/lib/mxrb/team_server.rb +390 -0
- data/lib/mxrb/templates/project/10.24.0.73019.json +32 -0
- data/lib/mxrb/templates/project/11.12.1.json +32 -0
- data/lib/mxrb/templates/project/6.10.8.json +50 -0
- data/lib/mxrb/templates/project/7.17.0.json +50 -0
- data/lib/mxrb/templates/project/7.5.0.json +50 -0
- data/lib/mxrb/templates/project/9.6.1.29396.json +50 -0
- data/lib/mxrb/version.rb +5 -0
- data/lib/mxrb/widget_package.rb +338 -0
- data/lib/mxrb/widget_synchronizer.rb +31 -0
- data/lib/mxrb/writer.rb +3775 -0
- data/lib/mxrb.rb +188 -0
- data/marketplace/catalog.json +10 -0
- data/marketplace/modules/shared-kernel/domain/README.md +4 -0
- data/marketplace/modules/shared-kernel/module.rb +5 -0
- data/marketplace/modules/shared-kernel/mxrb-module.json +9 -0
- metadata +447 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Native build and Runtime quality report
|
|
2
|
+
|
|
3
|
+
Date: August 5, 2026.
|
|
4
|
+
|
|
5
|
+
## Confirmed result
|
|
6
|
+
|
|
7
|
+
- no functional stage invokes `mx`, `mxbuild`, `mxcli`, Studio Pro, or Model SDK;
|
|
8
|
+
- clean 12-stage build and web generation passed on 6.10.8 (39 pages), 7.5.0 (45), 7.17.0 (66), 9.6.1.29396 (90), 10.24.0.73019 (optimized client), and 11.12.1;
|
|
9
|
+
- format round-trip matrix passed on six real fixtures from 5.21.4 through 11.12.1: 1,506 units, 1,734 artifacts, and 3,388 references;
|
|
10
|
+
- audited compiler schemas/seeds cover families 6.x, 7.x, 9.x, 10.x, and 11.x. Families 5.x and 8.x fail closed for native compilation; Runtime requires the exact patch;
|
|
11
|
+
- Data Grid 1 covers database/XPath/microflow sources, search, sorting, paging, selection, and audited buttons. Data Grid 2 covers XPath, attribute columns, and create action;
|
|
12
|
+
- web profiles are Dojo on 6/7, hybrid Dojo/React on 9, project-selected classic/optimized on 10, and React on 11;
|
|
13
|
+
- Projects API inventoried 130 accessible apps. Three real Git projects (`MyFirstModule`, `LearnNow Trainning Management`, and `SLATaskApp`) passed validate → export → generate → validate → compare;
|
|
14
|
+
- `MyFirstModule` was regenerated as exact 11.12.1 without proprietary builders. Runtime synchronized 655 database operations, created the active `mx` administrator, served the React shell and styled login publicly on `127.0.0.1:18080`, and exposed the expected domain tables;
|
|
15
|
+
- a from-scratch optimized-client 10.24.0.73019 application passed official `mx check` and `mxbuild`, native model/Java/Rollup/portable packaging, 460 database synchronization operations, readiness probe and HTTP 200;
|
|
16
|
+
- authenticated Chromium QA passed repeatedly across Home and Orders with
|
|
17
|
+
deterministic DOM/layout/style/ARIA snapshots and screenshots, zero console
|
|
18
|
+
errors, and an explicit SHA-256 baseline;
|
|
19
|
+
- `mxrb page new|generate|g Module.Page --chain ...` materializes valid MPRs
|
|
20
|
+
for `page:microflow`, `page:nanoflow`, and `page:nanoflow:microflow`; without
|
|
21
|
+
the option, the minimal page scaffold remains unchanged;
|
|
22
|
+
- `mxrb page templates` exposes the starter/blank/dashboard/form-vertical tree;
|
|
23
|
+
`--template` composes those templates with chains, and dashboard/form-vertical
|
|
24
|
+
passed in a real Runtime with compiled theme CSS and zero console errors;
|
|
25
|
+
- final QA: 1,039 examples, zero failures, 100.00% lines (17,224/17,224), 100.00% branches (6,811/6,811), and clean RuboCop across 244 files.
|
|
26
|
+
|
|
27
|
+
## Corrections from the improvement report
|
|
28
|
+
|
|
29
|
+
- selective Java proxy generation for entities, inheritance, enumerations, and constants referenced by custom Java;
|
|
30
|
+
- official Database Connector build-extension lowering to External Database Connector Java actions, including safe query-builder `SELECT` generation;
|
|
31
|
+
- OQL view source compilation, generalized entity persistence flags, demo-user role arrays, system texts, and exact association storage/access rights;
|
|
32
|
+
- stable PostgreSQL readiness, public loopback Runtime port (`--runtime-port`), environment-backed admin password, and active admin creation;
|
|
33
|
+
- self-contained login resources, rendered template placeholders, cache busting, and styled/i18n login shell;
|
|
34
|
+
- Atlas CSS, manifest, and public-asset hydration; the real Team Server
|
|
35
|
+
homepage now renders actionable React grids, headings, and buttons;
|
|
36
|
+
- React developer-mode page imports carry the session cache token; the patched
|
|
37
|
+
client chunk is content-hashed and Rspack's self-import shares the entrypoint
|
|
38
|
+
token, eliminating stale blank-homepage reloads without disabling cache;
|
|
39
|
+
- the generated shell supplies a bounded `openForm` compatibility adapter over
|
|
40
|
+
`openForm2`, so cached legacy click handlers navigate instead of failing
|
|
41
|
+
silently without issuing a Runtime request;
|
|
42
|
+
- the official React Gallery now renders XPath and microflow data, item
|
|
43
|
+
templates, selection, and formatted string/numeric values. Authenticated
|
|
44
|
+
browser QA rendered the persisted course title, description, `90 day(s)`,
|
|
45
|
+
and `49.95`, while an empty Teacher Gallery remained structurally present;
|
|
46
|
+
- nanoflow list/object sources and button actions now compile to the real
|
|
47
|
+
Mendix client property contracts and function-backed instruction programs.
|
|
48
|
+
The audited graph subset includes decisions, error paths, nested nanoflows,
|
|
49
|
+
JavaScript actions and server microflow calls; unsupported client nodes fail
|
|
50
|
+
closed instead of being mislabeled as microflows;
|
|
51
|
+
- the PostgreSQL workspace injects a coherent JDBC URL and the Runtime SSL
|
|
52
|
+
option; `CheckNothing` navigation roles, scroll modes, SidebarToggle, and
|
|
53
|
+
microflow data-source return constants follow the real 11.12.1 client
|
|
54
|
+
contracts observed during authenticated testing;
|
|
55
|
+
- real browser clicks verified Home → Courses → Add → Save. Parameter-backed
|
|
56
|
+
DataView/TextBox forms render and persist values; create passes GUIDs through
|
|
57
|
+
`openForm2`, while commit/rollback authorization is derived from page module
|
|
58
|
+
roles. PostgreSQL confirmed the four saved QA values;
|
|
59
|
+
- template/image/ZIP traversal and unsafe identifier protection, plus symlink rejection for native inputs;
|
|
60
|
+
- comparison normalizes absent Runtime boolean defaults, restoring exact legacy round trips.
|
|
61
|
+
|
|
62
|
+
## Explicit boundaries
|
|
63
|
+
|
|
64
|
+
1. Dojo widgets other than Data Grid 1 remain listed in `web/mxrb-legacy-pages.json`; they are not silently reported as rendered.
|
|
65
|
+
2. Data Grid 2 coverage is the audited XPath/attribute/create subset. Gallery
|
|
66
|
+
covers XPath/microflow and the audited nanoflow graph subset. Unsupported
|
|
67
|
+
graph shapes, missing action/flow references, unsafe parameter mappings and
|
|
68
|
+
untranslated client instructions still fail closed.
|
|
69
|
+
3. Installed 6/7/9 distributions contain exact Runtime bundles but no compatible launcher. The available 11 launcher requires Java 21 and cannot safely start 9 on Java 11. Legacy `db up` therefore fails closed; exact boot is claimed for 10.24.0.73019 and 11.12.1 only.
|
|
70
|
+
4. Runtime uses a local trial/developer license, which emits the expected time-limit warning.
|
|
71
|
+
5. Cloud Build/Deploy/Pipelines/Backups are optional external verification adapters, never dependencies of native generation or Runtime startup.
|
|
72
|
+
|
|
73
|
+
There is no hidden `mx`/`mxbuild` fallback.
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
# OQL, SQL views, and the local database
|
|
2
|
+
|
|
3
|
+
MXRB exposes OQL only when the native model contains it. It discovers OQL
|
|
4
|
+
dataset sources and view-entity queries; an app without OQL returns an empty
|
|
5
|
+
collection and does not gain synthetic query documents.
|
|
6
|
+
|
|
7
|
+
## Static inspection
|
|
8
|
+
|
|
9
|
+
```ruby
|
|
10
|
+
Mxrb.open("Shop.mpr") do |project|
|
|
11
|
+
next unless project.oql?
|
|
12
|
+
|
|
13
|
+
project.oql_queries.each do |query|
|
|
14
|
+
puts query.qualified_name
|
|
15
|
+
puts query.oql
|
|
16
|
+
puts query.parameters
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
project.oql_sql_views(dialect: :postgresql).each do |view|
|
|
20
|
+
puts view.sql if view.supported?
|
|
21
|
+
warn view.warnings.join("\n")
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
The CLI provides the same typed result:
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
bundle exec mxrb oql Shop.mpr
|
|
30
|
+
bundle exec mxrb oql Shop.mpr --dialect ansi
|
|
31
|
+
bundle exec mxrb oql Shop.mpr --dialect sql_server --json
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
The SQL view is deliberately read-only. Parameters such as `$Customer` become
|
|
35
|
+
named binds such as `:Customer`; values are never interpolated. String literals
|
|
36
|
+
and comments remain opaque. Multiple statements and OQL bulk writes are
|
|
37
|
+
rejected.
|
|
38
|
+
|
|
39
|
+
Generated SQL has `logical` confidence. PostgreSQL and SQL Server views use the
|
|
40
|
+
conventional `module$entity` table shape, while ANSI keeps `Module.Entity`.
|
|
41
|
+
Always verify physical table and column names against the database created by
|
|
42
|
+
the exact Mendix Runtime. Association-path joins are reported as unsupported
|
|
43
|
+
until Runtime storage metadata can prove the correct join.
|
|
44
|
+
|
|
45
|
+
## Dialect-aware analysis
|
|
46
|
+
|
|
47
|
+
`Oql::Analyzer` detects cost and portability patterns in the original source,
|
|
48
|
+
preserves the triggering fragment for highlighting, and returns actionable
|
|
49
|
+
alternatives for PostgreSQL, SQL Server, and ANSI:
|
|
50
|
+
|
|
51
|
+
```ruby
|
|
52
|
+
report = Mxrb::Oql::Analyzer.new(dialect: :postgresql)
|
|
53
|
+
.analyze_source("SELECT * FROM Sales.Order")
|
|
54
|
+
report.findings.each { puts "#{_1.rule}: #{_1.suggestions[:postgresql]}" }
|
|
55
|
+
|
|
56
|
+
reports = Mxrb.open("Shop.mpr") { _1.oql_analysis(dialect: :postgresql) }
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Rules cover leading and both-sided wildcards, prefix searches,
|
|
60
|
+
`LOWER`/`UPPER`/`CAST` in `WHERE`, Cartesian products, and `SELECT *`.
|
|
61
|
+
Findings are `hint`, `warning`, or `error`; `clean?` means no errors.
|
|
62
|
+
|
|
63
|
+
The CLI handles native OQL plus both OQL and SQL ad-hoc sources:
|
|
64
|
+
|
|
65
|
+
```sh
|
|
66
|
+
bundle exec mxrb analyze Shop.mpr --dialect postgresql
|
|
67
|
+
bundle exec mxrb analyze --oql "SELECT * FROM Sales.Order"
|
|
68
|
+
bundle exec mxrb analyze --sql "SELECT * FROM sales$order" --json
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Real plans and database performance
|
|
72
|
+
|
|
73
|
+
Static analysis cannot prove which path the optimizer will choose. In the
|
|
74
|
+
materialized PostgreSQL workspace, MXRB also requests the real planner JSON and
|
|
75
|
+
correlates plan relations with `pg_indexes`:
|
|
76
|
+
|
|
77
|
+
```sh
|
|
78
|
+
bundle exec mxrb db explain Shop.mpr \
|
|
79
|
+
"SELECT * FROM \"sales$order\" WHERE status = 'Open'"
|
|
80
|
+
bundle exec mxrb db explain Shop.mpr \
|
|
81
|
+
"SELECT * FROM \"sales$order\" WHERE status = 'Open'" --analyze --json
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
The default mode uses `EXPLAIN` and does not execute the query. `--analyze` is
|
|
85
|
+
explicit because it uses `EXPLAIN ANALYZE`; the query runs through the
|
|
86
|
+
read-only role and includes timings and buffers. The report distinguishes
|
|
87
|
+
small sequential scans, which may be optimal, from large scans. It also flags
|
|
88
|
+
heavy filter discard, cardinality misestimates, high-volume nested loops, and
|
|
89
|
+
sorts that spill to disk. Existing indexes are included as evidence, but MXRB
|
|
90
|
+
does not invent `CREATE INDEX` statements without workload and selectivity
|
|
91
|
+
evidence.
|
|
92
|
+
|
|
93
|
+
The cumulative PostgreSQL workload can also be inspected:
|
|
94
|
+
|
|
95
|
+
```sh
|
|
96
|
+
bundle exec mxrb db workload Shop.mpr --limit 50
|
|
97
|
+
bundle exec mxrb db workload Shop.mpr --limit 50 --json
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
The workspace enables `pg_stat_statements` and `track_io_timing`. The report
|
|
101
|
+
ranks query fingerprints by cumulative cost and analyzes mean latency, cache
|
|
102
|
+
hits, I/O, temporary blocks, and rows per call. Table statistics expose
|
|
103
|
+
sequential-scan pressure; large non-unique indexes with no observed scans are
|
|
104
|
+
also flagged. Because these metrics are cumulative since the statistics reset,
|
|
105
|
+
index removal is never suggested without confirming the real window and
|
|
106
|
+
workload.
|
|
107
|
+
|
|
108
|
+
For a SQL Server deployment, the connection is explicit and uses `sqlcmd`:
|
|
109
|
+
|
|
110
|
+
```sh
|
|
111
|
+
export MXRB_SQLSERVER_PASSWORD='secret'
|
|
112
|
+
bundle exec mxrb db explain Shop.mpr \
|
|
113
|
+
"SELECT * FROM dbo.[Order] WHERE Status = 'Open'" \
|
|
114
|
+
--engine sql_server --server db.example:1433 \
|
|
115
|
+
--database Shop --user mxrb_analyst --json
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Estimated mode uses `SHOWPLAN_XML`; `--analyze` uses `STATISTICS XML` and
|
|
119
|
+
executes only one `SELECT`/`WITH`. The parser detects large table/clustered
|
|
120
|
+
scans, high-volume nested loops, tempdb spills, cardinality divergence, and
|
|
121
|
+
missing-index hints. Those hints remain optimizer hypotheses, not automatic
|
|
122
|
+
DDL. The password travels in `SQLCMDPASSWORD`, never argv. The engine is not
|
|
123
|
+
inferred from the MPR because it belongs to deployment configuration.
|
|
124
|
+
|
|
125
|
+
## Materialized local PostgreSQL
|
|
126
|
+
|
|
127
|
+
An MPR contains the application model, not an application-data snapshot. The
|
|
128
|
+
Mendix Runtime owns the database schema and synchronizes it from the model.
|
|
129
|
+
MXRB can build the exact portable Runtime, start an isolated PostgreSQL, let
|
|
130
|
+
the Runtime perform that synchronization, and expose SQL access:
|
|
131
|
+
|
|
132
|
+
```sh
|
|
133
|
+
bundle exec mxrb db up Shop.mpr
|
|
134
|
+
bundle exec mxrb db status Shop.mpr
|
|
135
|
+
bundle exec mxrb db sql Shop.mpr \
|
|
136
|
+
'SELECT * FROM "sales$order" LIMIT 20'
|
|
137
|
+
bundle exec mxrb db shell Shop.mpr
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
After changing the MPR, rebuild and synchronize while retaining the data:
|
|
141
|
+
|
|
142
|
+
```sh
|
|
143
|
+
bundle exec mxrb db sync Shop.mpr
|
|
144
|
+
bundle exec mxrb db down Shop.mpr
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
`db down` stops the containers but preserves the PostgreSQL volume. A later
|
|
148
|
+
`db up` reuses both the package cache and the data. The host port defaults to
|
|
149
|
+
`127.0.0.1:55432` and can be changed with `--port`.
|
|
150
|
+
|
|
151
|
+
Local tools can access the same workspace through a JSON HTTP endpoint:
|
|
152
|
+
|
|
153
|
+
```sh
|
|
154
|
+
bundle exec mxrb serve Shop.mpr --port 4567
|
|
155
|
+
curl -X POST http://127.0.0.1:4567/query \
|
|
156
|
+
-H 'Content-Type: application/json' \
|
|
157
|
+
-d '{"sql":"SELECT * FROM \"sales$order\" LIMIT 20"}'
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
The body accepts exactly one `sql` or `oql` field. Ad-hoc OQL passes through
|
|
161
|
+
the safe PostgreSQL translator; parameterized queries and anything other than
|
|
162
|
+
one `SELECT`/`WITH` statement are rejected. Responses include `rows`,
|
|
163
|
+
`row_count`, `elapsed_ms`, warnings, or a structured error. The server binds
|
|
164
|
+
only to loopback, uses `mxrb_reader`, and prepares the workspace by default;
|
|
165
|
+
`--no-up` reuses an already-running workspace.
|
|
166
|
+
|
|
167
|
+
Permanent cleanup is intentionally explicit:
|
|
168
|
+
|
|
169
|
+
```sh
|
|
170
|
+
bundle exec mxrb db destroy Shop.mpr --yes
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
It removes only resources carrying the matching MXRB ownership label.
|
|
174
|
+
|
|
175
|
+
## Security boundary
|
|
176
|
+
|
|
177
|
+
- PostgreSQL is bound only to loopback.
|
|
178
|
+
- Each absolute MPR path receives separate containers, network, volume, and
|
|
179
|
+
state.
|
|
180
|
+
- Random credentials live under the user's XDG state directory with mode
|
|
181
|
+
`0600`, outside the project repository.
|
|
182
|
+
- `db sql`, `db shell`, and `db url` use `mxrb_reader`, whose transactions and
|
|
183
|
+
role default are read-only.
|
|
184
|
+
- `mxrb_reader` receives `pg_read_all_stats` inside the isolated workspace so
|
|
185
|
+
Runtime fingerprints can be correlated; this grants no application-data writes.
|
|
186
|
+
- `--write` explicitly selects the Runtime owner role. Direct writes can break
|
|
187
|
+
Mendix invariants and should be exceptional.
|
|
188
|
+
- The PostgreSQL workspace never targets an existing remote database. SQL
|
|
189
|
+
Server plan analysis is a separate, explicit deployment connection; use a
|
|
190
|
+
read-only login with SHOWPLAN permission. Its password stays in an environment
|
|
191
|
+
variable and mutating keywords are rejected, including writable CTEs.
|
|
192
|
+
|
|
193
|
+
The exact Mendix toolchain and Docker daemon must be available. SQL Server
|
|
194
|
+
plans additionally require `sqlcmd`. Schema
|
|
195
|
+
synchronization can change or reject existing data when the model changes, so
|
|
196
|
+
back up any valuable local volume before risky model migrations.
|
|
197
|
+
|
|
198
|
+
See the official Mendix documentation for
|
|
199
|
+
[OQL](https://docs.mendix.com/refguide/oql/),
|
|
200
|
+
[data storage](https://docs.mendix.com/refguide/data-storage/), and
|
|
201
|
+
[Runtime database settings](https://docs.mendix.com/refguide/custom-settings/).
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Mendix API integration assessment
|
|
2
|
+
|
|
3
|
+
Date: August 1, 2026. Source: the official [Mendix APIs and SDK index](https://docs.mendix.com/apidocs-mxsdk/).
|
|
4
|
+
|
|
5
|
+
## Decision matrix
|
|
6
|
+
|
|
7
|
+
| API or SDK | MXRB use | Decision |
|
|
8
|
+
| --- | --- | --- |
|
|
9
|
+
| Projects API | list accessible apps and project metadata | integrated as `team-server projects`; read-only by default |
|
|
10
|
+
| App Repository API | repository info, branches, and commits | integrated in Team Server discovery and clone flow |
|
|
11
|
+
| Marketplace Content API | discover and download modules/widgets | integrated in Marketplace operations |
|
|
12
|
+
| Build API | compare a native MXRB artifact with an official cloud build | optional external verification adapter; never a native-build dependency |
|
|
13
|
+
| Deploy API v4 | inventory apps/environments before release verification | proposed read-only adapter; mutations require explicit confirmation |
|
|
14
|
+
| Pipelines API | trigger and observe an existing CI/CD pipeline | proposed opt-in adapter with idempotency and status polling |
|
|
15
|
+
| Backups API v2 | list/create/download snapshots before deployment work | proposed safety adapter; restore/delete remain explicit destructive actions |
|
|
16
|
+
| Runtime API 11 | compile custom Java and verify Runtime contracts | used as a contract for proxy generation; it is a Java API, not a remote REST replacement |
|
|
17
|
+
| Client and Pluggable Widget APIs | define Dojo/React/Data Grid bundle contracts | reference contract for generated web artifacts, not an HTTP client |
|
|
18
|
+
| Catalog APIs | register or query governed external data sources | future plugin; outside native build/runtime |
|
|
19
|
+
| Model/Platform SDKs and Studio Pro extensibility | remotely model apps or extend Studio Pro | deliberately not required; MXRB remains Ruby/SQLite/BSON and standalone |
|
|
20
|
+
|
|
21
|
+
## Integration rules
|
|
22
|
+
|
|
23
|
+
- Remote calls are explicit; `generate`, `compile`, `validate`, and `db up` never contact Mendix Cloud.
|
|
24
|
+
- PATs/API keys come from a protected file or environment and are never written to reports, logs, generated projects, or Git.
|
|
25
|
+
- Read-only endpoints are the default. Build, deploy, pipeline, backup restore, project membership, and deletion operations require a dedicated command and confirmation appropriate to their impact.
|
|
26
|
+
- The Build API is limited to Mendix Cloud apps and uses account API-key authentication, so it cannot replace MXRB's local native compiler.
|
|
27
|
+
- Versioned Runtime and frontend APIs are compatibility evidence. MXRB keeps exact audited schemas/seeds and fails closed when a version contract or launcher is unavailable.
|
|
28
|
+
|
|
29
|
+
## Recommended order
|
|
30
|
+
|
|
31
|
+
1. App Repository branch/commit listing in `team-server`, completing the already integrated repository discovery.
|
|
32
|
+
2. A read-only Deploy inventory command and optional Build comparison gate.
|
|
33
|
+
3. Pipeline status/trigger with idempotency keys and bounded polling.
|
|
34
|
+
4. Backup list/create/download safeguards before any cloud mutation.
|
|
35
|
+
|
|
36
|
+
Catalog and Studio Pro extensibility remain separate adapters because they do not reduce native build/runtime dependency risk.
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
# Operations, lifecycle, and Marketplace
|
|
2
|
+
|
|
3
|
+
## Diagnostics, benchmarks, and evolution
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
mxrb doctor .
|
|
7
|
+
mxrb benchmark App.mpr --iterations 5 --json
|
|
8
|
+
mxrb project inspect . --json
|
|
9
|
+
mxrb upgrade --mendix 11.12.1 --target .
|
|
10
|
+
mxrb upgrade --mendix 11.12.1 --target . --apply
|
|
11
|
+
mxrb migrate plan .
|
|
12
|
+
mxrb migrate check .
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
`doctor` checks the Ruby project, aggregators, MPR, and local toolchain.
|
|
16
|
+
`benchmark` measures opening, semantic indexing, and validation. Upgrades are
|
|
17
|
+
previews unless `--apply` is passed. Migration generates into a temporary area
|
|
18
|
+
and compares that result with the current MPR; `check` fails on model drift.
|
|
19
|
+
|
|
20
|
+
## Frontend migration and acceptance
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
mxrb frontend migrate App.mpr --json
|
|
24
|
+
mxrb frontend migrate App.mpr --apply --json
|
|
25
|
+
script/frontend_acceptance App.mpr -o frontend-round-trip.json
|
|
26
|
+
script/frontend_acceptance App.mpr --mxbuild /path/to/mxbuild -o frontend.json
|
|
27
|
+
script/frontend_acceptance App.mpr --mx /path/to/mx -o frontend-diagnostics.json
|
|
28
|
+
script/frontend_lifecycle_acceptance --version 11.12.1 --mx /path/to/mx \
|
|
29
|
+
--mxbuild /path/to/mxbuild --strict-warnings -o frontend-lifecycle.json
|
|
30
|
+
script/frontend_browser_acceptance --scenario examples/frontend-browser-scenario.json \
|
|
31
|
+
--url http://127.0.0.1:18080 --password-file /path/to/credentials.json \
|
|
32
|
+
--baseline examples/frontend-browser-baseline-11.12.1.json
|
|
33
|
+
script/frontend_browser_acceptance --scenario examples/page-chain-browser-scenario.json \
|
|
34
|
+
--url http://127.0.0.1:18080 --password-file /path/to/credentials.json
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
`mxrb frontend migrate` is an immutable, fail-closed preview by default. For
|
|
38
|
+
Mendix 10 and 11 it plans installed pluggable-widget schema updates, legacy
|
|
39
|
+
layout-row weights, and design-property normalization from the package XML.
|
|
40
|
+
`--apply` writes only a safe plan in one MPR transaction; unknown configured
|
|
41
|
+
properties, an unsupported generation, or a unit changed after preview block
|
|
42
|
+
the write. Neither preview nor apply invokes Mendix tooling.
|
|
43
|
+
|
|
44
|
+
`script/frontend_acceptance` is the reproducible 10/11 gate. It validates the
|
|
45
|
+
source and rebuilt MPRs, requires a compatible native preflight on both,
|
|
46
|
+
exports to Ruby and rebuilds, compares model structure, and verifies complete
|
|
47
|
+
asset inventories, bytes, SHA-256 checksums, and Marketplace provenance. The
|
|
48
|
+
provenance boundary includes `.mxrb/marketplace.lock.json`, the package cache,
|
|
49
|
+
and `.mxrb/marketplace-originals`; missing, changed, or unexpected files fail
|
|
50
|
+
the gate. The accepted renderer matrix now covers Forms tables,
|
|
51
|
+
`ListViewXPathSource`, listen-target object properties, structured page-variable
|
|
52
|
+
mappings, and Combo-box enumerations. Its preflight baseline fell from 28 to 0
|
|
53
|
+
findings on 10.24 and from 20 to 0 on 11.12.
|
|
54
|
+
|
|
55
|
+
Without `--mxbuild`, the report scope is `round_trip` and `frontend_ready`
|
|
56
|
+
remains unset. With `--mxbuild`, MxBuild is a read-only external oracle and the
|
|
57
|
+
scope becomes `frontend`; it never generates, mutates, or repairs the project.
|
|
58
|
+
The live oracle accepts success only when MxBuild exits zero and produces a
|
|
59
|
+
non-empty MDA; a nonzero toolchain exit without reported model errors fails
|
|
60
|
+
closed instead of being certified as a clean model.
|
|
61
|
+
On August 4, 2026, the safe migration completed the accepted 10.24.0.73019 and
|
|
62
|
+
11.12.1 matrix: source and rebuilt projects returned zero MxBuild errors and
|
|
63
|
+
both reports set `frontend_ready` to `true`.
|
|
64
|
+
|
|
65
|
+
`script/frontend_lifecycle_acceptance` creates an app exclusively through the
|
|
66
|
+
CLI, generates its MPR, exports it to Ruby, changes Home and navigation, adds
|
|
67
|
+
an entity, form, microflow, nanoflow, and asset, regenerates, exports again,
|
|
68
|
+
and requires a structurally identical rebuild. On the official 10.24.0.73019
|
|
69
|
+
and 11.12.1 matrix, source and rebuilt projects completed with zero errors,
|
|
70
|
+
warnings, deprecations, or recommendations in `mx check`, plus zero MxBuild
|
|
71
|
+
errors.
|
|
72
|
+
|
|
73
|
+
`script/frontend_browser_acceptance` drives Chromium over local CDP,
|
|
74
|
+
authenticates without placing the password on the command line, traverses
|
|
75
|
+
pages, and compares deterministic structure, geometry, style, and ARIA-state
|
|
76
|
+
snapshots. Browser exceptions, broken widgets, and the generic Runtime error
|
|
77
|
+
dialog fail the gate. Baseline replacement requires explicit
|
|
78
|
+
`--update-baseline`; normal runs are read-only comparisons. The gate signs out
|
|
79
|
+
through `mx.logout()` so it remains repeatable under a trial license.
|
|
80
|
+
|
|
81
|
+
`page-chain-browser-scenario.json` uses a `PageChainQa` app with `DirectOrder`,
|
|
82
|
+
`ClientOrder`, and `HybridOrder`, created by the three `page --chain` values.
|
|
83
|
+
It clicks `Refresh` on each page and also requires computed CSS — document
|
|
84
|
+
margin, header gradient, and card background — so functional but unthemed HTML
|
|
85
|
+
fails the gate.
|
|
86
|
+
|
|
87
|
+
`--mx` runs the official read-only checker with warnings, deprecations, and
|
|
88
|
+
best-practice recommendations enabled. It validates the checker's exit bitmask
|
|
89
|
+
and compares normalized source/rebuilt signatures. The accepted 10.24 fixture
|
|
90
|
+
has 0 errors, 173 package-owned warnings, 0 deprecations, and 2 Kafka
|
|
91
|
+
recommendations; 11.12 has 0 errors, 10 package-owned warnings, 0 deprecations,
|
|
92
|
+
and the same 2 recommendations. Source and rebuilt JSON are byte-identical in
|
|
93
|
+
both generations, so these observable package diagnostics do not represent
|
|
94
|
+
MXRB round-trip drift.
|
|
95
|
+
|
|
96
|
+
## Official and community Mendix Marketplace
|
|
97
|
+
|
|
98
|
+
MXRB uses the documented Mendix Marketplace Content API. Create a PAT with the
|
|
99
|
+
`mx:marketplace-content:read` scope, then authenticate once:
|
|
100
|
+
|
|
101
|
+
```sh
|
|
102
|
+
cp .env.example .env
|
|
103
|
+
# Set MXRB_MENDIX_PAT in .env; never commit the file.
|
|
104
|
+
mxrb marketplace login --pat-file .env
|
|
105
|
+
mxrb marketplace search "Community Commons"
|
|
106
|
+
mxrb marketplace show 170
|
|
107
|
+
mxrb marketplace versions 170 --mendix-version 11.12.1
|
|
108
|
+
mxrb marketplace pull 170 --mpr MyApp.mpr
|
|
109
|
+
mxrb marketplace pull 170@3.4.0 --mpr MyApp.mpr
|
|
110
|
+
mxrb marketplace dependencies CommunityCommons --mpr MyApp.mpr
|
|
111
|
+
mxrb marketplace dependencies CommunityCommons --mpr MyApp.mpr --apply
|
|
112
|
+
mxrb marketplace dependencies CommunityCommons --mpr MyApp.mpr --apply-resolved
|
|
113
|
+
mxrb marketplace update 170@3.5.0 --mpr MyApp.mpr
|
|
114
|
+
mxrb marketplace update 170@3.5.0 --mpr MyApp.mpr --apply
|
|
115
|
+
mxrb marketplace remove CommunityCommons --mpr MyApp.mpr
|
|
116
|
+
mxrb marketplace remove CommunityCommons --mpr MyApp.mpr --apply
|
|
117
|
+
mxrb marketplace pull github:mendix/CommunityCommons
|
|
118
|
+
mxrb marketplace import ./CommunityCommons.mpk --mpr MyApp.mpr
|
|
119
|
+
mxrb marketplace audit --target . --mendix-version 11.12.1
|
|
120
|
+
mxrb marketplace list
|
|
121
|
+
mxrb marketplace verify
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
The recommended login mode stores only the absolute `.env` path in
|
|
125
|
+
`~/.config/mxrb/credentials` (or `$XDG_CONFIG_HOME/mxrb/credentials`). MXRB
|
|
126
|
+
does not copy, move, chmod, or rewrite the referenced file; it reads it when an
|
|
127
|
+
official Marketplace operation needs authentication. New scaffolds ignore
|
|
128
|
+
`.env` and provide a secret-free `.env.example`.
|
|
129
|
+
|
|
130
|
+
`mxrb marketplace login --store-pat` is an explicit managed-storage opt-in;
|
|
131
|
+
the command displays its JSON destination and `0600` mode before prompting.
|
|
132
|
+
`MXRB_MENDIX_PAT_FILE=/path/.env` works without persisting a reference. Run
|
|
133
|
+
`mxrb marketplace login --help` for accepted formats and precedence.
|
|
134
|
+
|
|
135
|
+
Official search includes public content and company-private content visible to
|
|
136
|
+
the PAT owner. Filters include `--private`, `--public`, `--approved`, and
|
|
137
|
+
`--published-since YYYY-MM-DD`. `show` exposes publisher, component type,
|
|
138
|
+
support category, license, privacy, company approval, and latest release.
|
|
139
|
+
`versions` exposes compatibility, release notes, and regular, vulnerable, or
|
|
140
|
+
security-fix status including CVE/CWE identifiers.
|
|
141
|
+
|
|
142
|
+
With `--mpr`, MXRB reads the package's `package.xml` and embedded
|
|
143
|
+
`project.mpr`, then imports the complete module unit tree directly through
|
|
144
|
+
Ruby/SQLite/BSON. It does not invoke `mx`, `mxcli`, Studio Pro, or the Model
|
|
145
|
+
SDK. IDs are preserved, declared assets are installed transactionally, and
|
|
146
|
+
the package cache plus module identity are recorded in the marketplace
|
|
147
|
+
lockfile. Compatible official packages may be imported forward into the
|
|
148
|
+
project's newer model version; local and GitHub imports still require an exact
|
|
149
|
+
model-version match. Installing Atlas Core also connects its legacy Sass
|
|
150
|
+
variables without replacing project customizations.
|
|
151
|
+
|
|
152
|
+
Official `pull` is the default. It asks the API for the newest release compatible
|
|
153
|
+
with the target MPR, follows the download URL returned by the API, and refuses a release marked
|
|
154
|
+
vulnerable unless `--allow-vulnerable` is explicit. The lock records Content ID,
|
|
155
|
+
Version ID, visibility, approval and security state; `audit` checks it for known
|
|
156
|
+
vulnerabilities and updates. `github:` remains the public fallback, and `import`
|
|
157
|
+
accepts a local MPK/ZIP. `login` validates the PAT before storing it outside the
|
|
158
|
+
project with mode `0600`.
|
|
159
|
+
|
|
160
|
+
The PAT is sent only to the exact official hosts `marketplace-api.mendix.com`
|
|
161
|
+
and `marketplace.mendix.com`; redirects to any other host do not receive it.
|
|
162
|
+
See the [Mendix Marketplace Content API](https://docs.mendix.com/apidocs-mxsdk/apidocs/content-api/).
|
|
163
|
+
|
|
164
|
+
`marketplace dependencies` discovers unresolved qualified module references in
|
|
165
|
+
the embedded package MPR, resolves them recursively through the official API,
|
|
166
|
+
downloads each candidate, and accepts it only when the MPK itself proves the
|
|
167
|
+
requested module identity. Host-owned project modules satisfy references
|
|
168
|
+
without being mislabeled as Marketplace packages. The command previews by
|
|
169
|
+
default; `--apply` requires a complete safe graph and installs leaf-first with
|
|
170
|
+
rollback, while `--apply-resolved` is the explicit opt-in for a verified partial
|
|
171
|
+
graph and still returns a blocked status for unresolved identities.
|
|
172
|
+
|
|
173
|
+
Authenticated acceptance on August 4, 2026 imported Kafka 2.12.0 (Content ID
|
|
174
|
+
105878) and resolved its official dependency graph on both 10.24.0.73019 and
|
|
175
|
+
11.12.1. Both graphs imported DataWidgets 3.11.3 with Content ID 116540 and
|
|
176
|
+
Version ID `e7b6d703-8e47-42f4-bb92-934e3601e71b`. The final authenticated
|
|
177
|
+
Combo box is the independent official Widget/clientModule component 219304,
|
|
178
|
+
version 2.9.0, Version ID `dce845f4-d051-4161-847c-016c01703caa`. Its install
|
|
179
|
+
backs up and replaces the older 2.6.x Combo asset brought by Atlas Core
|
|
180
|
+
(Content ID 117187); Atlas is the prior asset owner, not the Combo component.
|
|
181
|
+
The 11.12 graph also includes Library Logging 1.13.0, Encryption 11.1.1,
|
|
182
|
+
Mx Model Reflection 9.1.0, and Mendix Feedback Module 5.0.0 (Content ID
|
|
183
|
+
205506). The API name index does not expose `FeedbackModule`, so MXRB uses the
|
|
184
|
+
official component ID only as a discovery hint and still verifies the
|
|
185
|
+
downloaded MPK name before accepting it.
|
|
186
|
+
|
|
187
|
+
Both generations now pass the complete frontend acceptance gate with zero
|
|
188
|
+
source and rebuilt preflight findings, structural equivalence, exact asset and
|
|
189
|
+
Marketplace provenance, and zero MxBuild errors. The Ruby export/rebuild
|
|
190
|
+
preserves the Marketplace lock, cached MPKs, originals, declared assets, and
|
|
191
|
+
their checksums, so the rebuilt project retains package provenance instead of
|
|
192
|
+
merely retaining widget bytes. MxBuild remains external validation only, never
|
|
193
|
+
an MXRB implementation dependency.
|
|
194
|
+
|
|
195
|
+
Official `update` and `remove` are safe previews unless `--apply` is explicit.
|
|
196
|
+
Before mutation, MXRB checks the locked module and unit count against the cached
|
|
197
|
+
package, scans every unit outside the module for references to IDs that would
|
|
198
|
+
disappear, and refuses changed or missing package assets. An update must retain
|
|
199
|
+
the module ID and any externally referenced unit IDs. Apply snapshots the MPR,
|
|
200
|
+
v2 `mprcontents`, lock, caches, declared assets, and Atlas variables file; any
|
|
201
|
+
failure restores that complete boundary. Shared assets are never removed while
|
|
202
|
+
another locked package claims them.
|
|
203
|
+
|
|
204
|
+
## Protocol connector audit
|
|
205
|
+
|
|
206
|
+
`mxrb protocols` is a read-only audit of the IoT, industrial, and messaging
|
|
207
|
+
connectors a project imported from the Marketplace. It never runs a protocol
|
|
208
|
+
and never installs anything; it reports the public metadata the model exposes.
|
|
209
|
+
|
|
210
|
+
```sh
|
|
211
|
+
mxrb protocols App.mpr
|
|
212
|
+
mxrb protocols App.mpr --json
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
Recognized connectors are listed with their module name, protocol, and
|
|
216
|
+
Marketplace component id; unrecognized marketplace modules are listed
|
|
217
|
+
separately. Recognition is by verified `AppStoreGuid`, so a module whose GUID
|
|
218
|
+
is not confirmed from a real fixture or official metadata is reported as
|
|
219
|
+
unrecognized rather than guessed.
|
|
220
|
+
|
|
221
|
+
This protocol registry is a third catalog, distinct from the reusable Ruby
|
|
222
|
+
modules of `mxrb module` and the official packages of `mxrb marketplace`.
|
|
223
|
+
|
|
224
|
+
Verified public component ids currently cover MQTT, OPC-UA, Kafka, AMQP and
|
|
225
|
+
WebSocket. Authenticated Content API queries and the official catalog search
|
|
226
|
+
still provide no Modbus component, so it remains unregistered until an official
|
|
227
|
+
component or real MPR fixture proves its identity. Public ids support planning;
|
|
228
|
+
recognition inside an MPR still requires a verified `AppStoreGuid`.
|
|
229
|
+
|
|
230
|
+
The Ruby builder can declare an installation request without writing an empty
|
|
231
|
+
module or invented GUID:
|
|
232
|
+
|
|
233
|
+
```ruby
|
|
234
|
+
builder.connector :kafka, version: "2.12.0"
|
|
235
|
+
plans = builder.connector_plans(adapter: Mxrb::Protocols.adapter(installer:, api:))
|
|
236
|
+
plans.each { puts _1.changes }
|
|
237
|
+
plans.each(&:apply!) # explicit authenticated Marketplace operation
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
`connector_plans` is preview-only without the adapter. A regular `build!` also
|
|
241
|
+
fails closed while connector declarations are pending; connector content must
|
|
242
|
+
be installed into a real MPR through the official Marketplace adapter first.
|
|
243
|
+
Marketplace `Module` and `Service` entries may be resolved, while the downloaded
|
|
244
|
+
MPK independently has to pass the module-package boundary checks.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Exported project structure
|
|
2
|
+
|
|
3
|
+
[Português](../pt-BR/project-structure.md) · **English** · [Deutsch](../de-DE/project-structure.md)
|
|
4
|
+
|
|
5
|
+
The Ruby tree produced by `mxrb export` separates app-wide policy, module
|
|
6
|
+
behavior, preserved native units and filesystem assets:
|
|
7
|
+
|
|
8
|
+
```text
|
|
9
|
+
project.rb
|
|
10
|
+
.mxrb/
|
|
11
|
+
native_units.json
|
|
12
|
+
native_units.rb
|
|
13
|
+
assets.json
|
|
14
|
+
app/
|
|
15
|
+
security/security.rb
|
|
16
|
+
navigation/navigation.rb
|
|
17
|
+
design_system/design_system.rb
|
|
18
|
+
modules/
|
|
19
|
+
ModuleName/
|
|
20
|
+
domain/
|
|
21
|
+
application/
|
|
22
|
+
presentation/
|
|
23
|
+
infrastructure/
|
|
24
|
+
security/
|
|
25
|
+
theme/
|
|
26
|
+
themesource/
|
|
27
|
+
resources/
|
|
28
|
+
widgets/
|
|
29
|
+
javasource/
|
|
30
|
+
javascriptsource/
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
`project.rb` is orchestration. Module files own model behavior. The native
|
|
34
|
+
manifest preserves structures without a concise typed DSL. The asset manifest
|
|
35
|
+
records relative paths, sizes and SHA-256 digests for every copied project
|
|
36
|
+
asset.
|
|
37
|
+
|
|
38
|
+
Reconstruction validates every asset path and digest, then writes only the
|
|
39
|
+
manifest entries. Absolute paths, parent traversal, missing sources and
|
|
40
|
+
checksum mismatches fail closed.
|
|
41
|
+
|
|
42
|
+
The same tree supports all four normal workflows:
|
|
43
|
+
|
|
44
|
+
- Ruby definition to a new Mendix project;
|
|
45
|
+
- Ruby changes over an exported Mendix baseline;
|
|
46
|
+
- Mendix project to editable Ruby;
|
|
47
|
+
- Mendix export to Ruby and back to a structurally equivalent Mendix project.
|
|
48
|
+
|
|
49
|
+
[Back to the documentation index](README.md)
|