diff --git a/calm/getting-started/README.md b/calm/getting-started/README.md index 90379c3ac..08ba6b00c 100644 --- a/calm/getting-started/README.md +++ b/calm/getting-started/README.md @@ -10,7 +10,7 @@ This demo showcases the **CALM** approach in action. Designed to help you get st - Visualise your architecture using CALM Hub - Docify Your Architecture -## 🚀 Prerequisites +## ⚙ Prerequisites * Java 21 or higher * Maven 3.8.6 or higher @@ -18,31 +18,31 @@ This demo showcases the **CALM** approach in action. Designed to help you get st * NPM * Have a clone of the [architecture-as-code repository](https://github.com/finos/architecture-as-code) -All commands in this guide are run from the `calm/getting-started` directory of the clone. +All commands in this guide are run from the `root` directory of the clone. To start lets build all the projects in the repository. ```shell -../../mvnw -f ../../pom.xml clean install +./mvnw clean install ``` Assuming all went well, you will see a message like this: ``` - ------------------------------------------------------------------------ +[INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] -[INFO] parent 1.0.0-SNAPSHOT .............................. SUCCESS [ 0.086 s] -[INFO] calm-hub 0.7.5 ..................................... SUCCESS [ 56.260 s] -[INFO] cli 1.0.0-SNAPSHOT ................................. SUCCESS [ 0.005 s] -[INFO] calm 1.0.0-SNAPSHOT ................................ SUCCESS [ 0.004 s] -[INFO] docs 1.0.0-SNAPSHOT ................................ SUCCESS [ 0.004 s] -[INFO] shared 1.0.0-SNAPSHOT .............................. SUCCESS [ 0.003 s] +[INFO] parent 1.0.0-SNAPSHOT .............................. SUCCESS [ 0.278 s] +[INFO] calm-hub 0.7.5 ..................................... SUCCESS [02:37 min] +[INFO] cli 1.0.0-SNAPSHOT ................................. SUCCESS [ 0.021 s] +[INFO] calm 1.0.0-SNAPSHOT ................................ SUCCESS [ 0.016 s] +[INFO] docs 1.0.0-SNAPSHOT ................................ SUCCESS [ 0.016 s] +[INFO] shared 1.0.0-SNAPSHOT .............................. SUCCESS [ 0.019 s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ -[INFO] Total time: 57.015 s -[INFO] Finished at: 2025-06-21T16:20:54+01:00 +[INFO] Total time: 02:40 min +[INFO] Finished at: 2025-08-21T13:24:41+01:00 [INFO] ------------------------------------------------------------------------ ``` @@ -51,20 +51,20 @@ Assuming all went well, you will see a message like this: To start CALM Hub locally in standalone mode, run the following: ```shell -../../mvnw -f ../../pom.xml -pl calm-hub quarkus:dev -Dcalm.database.mode=standalone +./mvnw -pl calm-hub quarkus:dev -Dcalm.database.mode=standalone ``` You should see output indicating that the application has started successfully, including a message like: ``` Listening for transport dt_socket at address: 5005 -__ ____ __ _____ ___ __ ____ ______ - --/ __ \/ / / / _ | / _ \/ //_/ / / / __/ - -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \ ---\___\_\____/_/ |_/_/|_/_/|_|\____/___/ -2025-06-21 16:26:09,029 INFO [io.quarkus] (Quarkus Main Thread) calm-hub 0.7.5 on JVM (powered by Quarkus 3.23.0) started in 1.690s. Listening on: http://localhost:8080 -2025-06-21 16:26:09,031 INFO [io.quarkus] (Quarkus Main Thread) Profile dev activated. Live Coding activated. -2025-06-21 16:26:09,032 INFO [io.quarkus] (Quarkus Main Thread) Installed features: [cdi, compose, hibernate-validator, mongodb-client, oidc, resteasy, resteasy-jsonb, security, smallrye-context-propagation, smallrye-openapi, swagger-ui, vertx] +__ ____ __ _____ ___ __ ____ ______ + --/ __ \/ / / / _ | / _ \/ //_/ / / / __/ + -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \ +--\___\_\____/_/ |_/_/|_/_/|_|\____/___/ +2025-08-21 14:19:52,408 INFO [io.quarkus] (Quarkus Main Thread) calm-hub 0.7.5 on JVM (powered by Quarkus 3.23.0) started in 1.690s. Listening on: http://localhost:8080 +2025-08-21 14:19:52,411 INFO [io.quarkus] (Quarkus Main Thread) Profile dev activated. Live Coding activated. +2025-08-21 14:19:52,411 INFO [io.quarkus] (Quarkus Main Thread) Installed features: [cdi, compose, hibernate-validator, mongodb-client, oidc, resteasy, resteasy-jsonb, security, smallrye-context-propagation, smallrye-openapi, swagger-ui, vertx] -- Tests paused @@ -86,49 +86,49 @@ npm install -g @finos/calm-cli ``` Verify the installation. + ```shell calm --version ``` -This getting started has been verified to work against 0.7.10 of the cli. + +This getting started has been verified to work against 1.0.0 of the cli. --- ## 🛠️ How to generate a concrete architecture instantiation from a pattern + Use the CALM CLI to generate an architecture instantiation from a predefined pattern: ```shell calm generate \ - --pattern ./conference-signup.pattern.json \ - --output ./conference-signup.arch.json + --pattern ./calm/getting-started/conference-signup.pattern.json \ + --output ./calm/getting-started/conference-signup.arch.json ``` This step expands the reusable pattern into a concrete architecture model. You should see output like this: + ``` -warn [_TemplateEngine]: Warning, no schema loading mechanism was defined. Only the bundled core schemas will be available; you may see empty definitions or errors. -info [_TemplateEngine]: Loading json from file: ./calm/getting-started/conference-signup.pattern.json -info [_TemplateEngine]: Generating a CALM architecture... -info [_TemplateEngine]: Successfully generated architecture to [./calm/getting-started/conference-signup.arch.json] +info [file-system-document-loader]: ./calm/getting-started/conference-signup.pattern.json exists, loading as file... +info [calm-generate]: Generating a CALM architecture... +info [calm-generate]: Successfully generated architecture to [./calm/getting-started/conference-signup.arch.json] --- ``` -You can ignore the warning about schema loading for now, as it is not important for this demo. - Now that we have an architecture, we can vaidate it against the pattern schema to ensure it is valid. Run the following command: ```shell calm validate \ - --pattern ./conference-signup.pattern.json \ - --architecture ./conference-signup.arch.json + --pattern ./calm/getting-started/conference-signup.pattern.json \ + --architecture ./calm/getting-started/conference-signup.arch.json ``` You should see output like this: ``` -info [_TemplateEngine]: Loading meta schema(s) from /opt/homebrew/lib/node_modules/@finos/calm-cli/dist/calm/release -info [_TemplateEngine]: Loading pattern from : ./calm/getting-started/conference-signup.pattern.json -info [_TemplateEngine]: Loading architecture from : ./calm/getting-started/conference-signup.arch.json -info [_TemplateEngine]: Formatting output as json +info [file-system-document-loader]: ./calm/getting-started/conference-signup.arch.json exists, loading as file... +info [file-system-document-loader]: ./calm/getting-started/conference-signup.pattern.json exists, loading as file... +info [calm-validate]: Formatting output as json { "jsonSchemaValidationOutputs": [], "spectralSchemaValidationOutputs": [ @@ -138,10 +138,10 @@ info [_TemplateEngine]: Formatting output as json "message": "String placeholder detected in architecture.", "path": "/nodes/0/interfaces/0/url", "schemaPath": "", - "line_start": 10, - "line_end": 10, - "character_start": 17, - "character_end": 28 + "line_start": 0, + "line_end": 0, + "character_start": 206, + "character_end": 217 }, { "code": "architecture-has-no-placeholder-properties-string", @@ -149,10 +149,10 @@ info [_TemplateEngine]: Formatting output as json "message": "String placeholder detected in architecture.", "path": "/nodes/1/interfaces/0/host", "schemaPath": "", - "line_start": 22, - "line_end": 22, - "character_start": 18, - "character_end": 30 + "line_start": 0, + "line_end": 0, + "character_start": 435, + "character_end": 447 }, { "code": "architecture-has-no-placeholder-properties-numerical", @@ -160,10 +160,10 @@ info [_TemplateEngine]: Formatting output as json "message": "Numerical placeholder (-1) detected in architecture.", "path": "/nodes/1/interfaces/0/port", "schemaPath": "", - "line_start": 23, - "line_end": 23, - "character_start": 18, - "character_end": 20 + "line_start": 0, + "line_end": 0, + "character_start": 455, + "character_end": 457 }, { "code": "architecture-has-no-placeholder-properties-string", @@ -171,10 +171,10 @@ info [_TemplateEngine]: Formatting output as json "message": "String placeholder detected in architecture.", "path": "/nodes/2/interfaces/0/image", "schemaPath": "", - "line_start": 35, - "line_end": 35, - "character_start": 19, - "character_end": 32 + "line_start": 0, + "line_end": 0, + "character_start": 668, + "character_end": 681 }, { "code": "architecture-has-no-placeholder-properties-numerical", @@ -182,10 +182,10 @@ info [_TemplateEngine]: Formatting output as json "message": "Numerical placeholder (-1) detected in architecture.", "path": "/nodes/2/interfaces/1/port", "schemaPath": "", - "line_start": 39, - "line_end": 39, - "character_start": 18, - "character_end": 20 + "line_start": 0, + "line_end": 0, + "character_start": 720, + "character_end": 722 }, { "code": "architecture-has-no-placeholder-properties-string", @@ -193,10 +193,10 @@ info [_TemplateEngine]: Formatting output as json "message": "String placeholder detected in architecture.", "path": "/nodes/3/interfaces/0/image", "schemaPath": "", - "line_start": 51, - "line_end": 51, - "character_start": 19, - "character_end": 32 + "line_start": 0, + "line_end": 0, + "character_start": 906, + "character_end": 919 }, { "code": "architecture-has-no-placeholder-properties-numerical", @@ -204,15 +204,15 @@ info [_TemplateEngine]: Formatting output as json "message": "Numerical placeholder (-1) detected in architecture.", "path": "/nodes/3/interfaces/1/port", "schemaPath": "", - "line_start": 55, - "line_end": 55, - "character_start": 18, - "character_end": 20 + "line_start": 0, + "line_end": 0, + "character_start": 957, + "character_end": 959 } ], "hasErrors": false, "hasWarnings": true -}% +} ``` In this case the warnings are related to placeholder values in the architecture, which is expected since we used a @@ -237,39 +237,31 @@ check out the [CALM Hub README](https://github.com/finos/architecture-as-code/tr CALM Hub is a great tool for visualising your architecture, but sometimes you want to generate documentation that you can share with others. For this, we can use the `docify` command from the CALM CLI. To generate documentation from your architecture, run the following command: + ```shell calm docify \ - --architecture ./conference-signup.arch.json \ - --output ./website + --architecture ./calm/getting-started/conference-signup.arch.json \ + --output ./calm/getting-started/website ``` You'll see output like this: + ``` -info [_TemplateEngine]: 📥 Loading index.json from /opt/homebrew/lib/node_modules/@finos/calm-cli/dist/template-bundles/docusaurus/index.json -info [_TemplateEngine]: ✅ Successfully loaded template bundle: docusaurus-docs -info [_TemplateEngine]: 📂 Loading template files from: /opt/homebrew/lib/node_modules/@finos/calm-cli/dist/template-bundles/docusaurus -info [_TemplateEngine]: 🎯 Total Templates Loaded: 21 -info [_TemplateEngine]: 🔍 Loading transformer as JavaScript: /opt/homebrew/lib/node_modules/@finos/calm-cli/dist/template-bundles/docusaurus/docusaurus-transformer.js -info [_TemplateEngine]: Fetching reference via HTTP: https://calm.finos.org/getting-started/controls/micro-segmentation.requirement.json -info [_TemplateEngine]: Fetching reference via HTTP: https://calm.finos.org/getting-started/controls/micro-segmentation.config.json -info [_TemplateEngine]: Fetching reference via HTTP: https://calm.finos.org/getting-started/controls/permitted-connection.requirement.json -info [_TemplateEngine]: Fetching reference via HTTP: https://calm.finos.org/getting-started/controls/permitted-connection-http.config.json -info [_TemplateEngine]: Fetching reference via HTTP: https://calm.finos.org/getting-started/controls/permitted-connection.requirement.json -info [_TemplateEngine]: Fetching reference via HTTP: https://calm.finos.org/getting-started/controls/permitted-connection-http.config.json -info [_TemplateEngine]: Fetching reference via HTTP: https://calm.finos.org/getting-started/controls/permitted-connection.requirement.json -info [_TemplateEngine]: Fetching reference via HTTP: https://calm.finos.org/getting-started/controls/permitted-connection-jdbc.config.json -info [_TemplateEngine]: Fetching reference via HTTP: https://calm.finos.org/getting-started/conference-signup.pattern.json -info [_TemplateEngine]: Will not attempt to dereference URL: https://calm.finos.org/getting-started/controls/micro-segmentation.requirement.json -info [_TemplateEngine]: Will not attempt to dereference URL: https://calm.finos.org/getting-started/controls/permitted-connection.requirement.json -info [_TemplateEngine]: Will not attempt to dereference URL: https://calm.finos.org/getting-started/controls/permitted-connection.requirement.json -info [_TemplateEngine]: Will not attempt to dereference URL: https://calm.finos.org/getting-started/controls/permitted-connection.requirement.json -info [_TemplateEngine]: Fetching reference via HTTP: https://calm.finos.org/getting-started/controls/micro-segmentation.config.json -info [_TemplateEngine]: Fetching reference via HTTP: https://calm.finos.org/getting-started/controls/permitted-connection-http.config.json -info [_TemplateEngine]: Fetching reference via HTTP: https://calm.finos.org/getting-started/controls/permitted-connection-jdbc.config.json -info [_TemplateEngine]: 📥 Loading index.json from /opt/homebrew/lib/node_modules/@finos/calm-cli/dist/template-bundles/docusaurus/index.json -info [_TemplateEngine]: ✅ Successfully loaded template bundle: docusaurus-docs -info [_TemplateEngine]: 📂 Loading template files from: /opt/homebrew/lib/node_modules/@finos/calm-cli/dist/template-bundles/docusaurus -info [_TemplateEngine]: 🎯 Total Templates Loaded: 21 +info [_TemplateProcessor]: Using TemplateBundleFileLoader for bundle +info [_TemplateBundleFileLoader]: 📥 Loading index.json from /home/mark/.nvm/versions/node/v22.17.0/lib/node_modules/@finos/calm-cli/dist/template-bundles/docusaurus/index.json +info [_TemplateBundleFileLoader]: ✅ Successfully loaded template bundle: docusaurus-docs +info [_TemplateBundleFileLoader]: 📂 Loading template files from: /home/mark/.nvm/versions/node/v22.17.0/lib/node_modules/@finos/calm-cli/dist/template-bundles/docusaurus +info [_TemplateBundleFileLoader]: 🎯 Total Templates Loaded: 21 +info [_TemplateProcessor]: 📂 Creating output directory: /home/mark/architecture-as-code/calm/getting-started/website +info [_TemplateProcessor]: 🔍 Loading transformer as JavaScript: /home/mark/.nvm/versions/node/v22.17.0/lib/node_modules/@finos/calm-cli/dist/template-bundles/docusaurus/docusaurus-transformer.js +info [_HttpReferenceResolver]: Fetching reference via HTTP: https://calm.finos.org/getting-started/controls/micro-segmentation.requirement.json +info [_HttpReferenceResolver]: Fetching reference via HTTP: https://calm.finos.org/getting-started/controls/micro-segmentation.config.json +info [_HttpReferenceResolver]: Fetching reference via HTTP: https://calm.finos.org/getting-started/controls/permitted-connection.requirement.json +info [_HttpReferenceResolver]: Fetching reference via HTTP: https://calm.finos.org/getting-started/controls/permitted-connection.requirement.json +info [_HttpReferenceResolver]: Fetching reference via HTTP: https://calm.finos.org/getting-started/controls/permitted-connection.requirement.json +info [_HttpReferenceResolver]: Fetching reference via HTTP: https://calm.finos.org/getting-started/controls/permitted-connection-http.config.json +info [_HttpReferenceResolver]: Fetching reference via HTTP: https://calm.finos.org/getting-started/controls/permitted-connection-http.config.json +info [_HttpReferenceResolver]: Fetching reference via HTTP: https://calm.finos.org/getting-started/controls/permitted-connection-jdbc.config.json info [_TemplateEngine]: ✅ Compiled 21 Templates info [_TemplateEngine]: 🔧 Registering Handlebars Helpers... info [_TemplateEngine]: ✅ Registered helper: eq @@ -282,6 +274,7 @@ info [_TemplateEngine]: ✅ Registered helper: isObject info [_TemplateEngine]: ✅ Registered helper: isArray info [_TemplateEngine]: ✅ Registered helper: notEmpty info [_TemplateEngine]: ✅ Registered helper: or +info [_TemplateEngine]: ✅ Registered helper: eachInMap info [_TemplateEngine]: 🔹 Starting Template Generation... info [_TemplateEngine]: ✅ Registering partial template: controls.hbs @@ -289,52 +282,54 @@ info [_TemplateEngine]: ✅ Registering partial template: relationships.hbs info [_TemplateEngine]: ✅ Registering partial template: table-template.html info [_TemplateEngine]: ✅ Registering partial template: row-template.html info [_TemplateEngine]: ✅ Registering partial template: metadata.hbs -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/docs/nodes/conference-website.md -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/docs/nodes/load-balancer.md -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/docs/nodes/attendees.md -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/docs/nodes/attendees-store.md -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/docs/nodes/k8s-cluster.md +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/docs/nodes/conference-website.md +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/docs/nodes/load-balancer.md +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/docs/nodes/attendees.md +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/docs/nodes/attendees-store.md +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/docs/nodes/k8s-cluster.md info [_TemplateEngine]: ✅ Registering partial template: controls.hbs info [_TemplateEngine]: ✅ Registering partial template: relationships.hbs info [_TemplateEngine]: ✅ Registering partial template: table-template.html info [_TemplateEngine]: ✅ Registering partial template: row-template.html info [_TemplateEngine]: ✅ Registering partial template: metadata.hbs -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/docs/relationships/conference-website-load-balancer.md -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/docs/relationships/load-balancer-attendees.md -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/docs/relationships/attendees-attendees-store.md -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/docs/relationships/deployed-in-k8s-cluster.md -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/sidebars.js -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/docusaurus.config.js -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/static/img/2025_CALM_Icon.svg -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/src/remark/remark-replace-links.js -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/static/css/custom.css +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/docs/relationships/conference-website-load-balancer.md +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/docs/relationships/load-balancer-attendees.md +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/docs/relationships/attendees-attendees-store.md +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/docs/relationships/deployed-in-k8s-cluster.md +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/sidebars.js +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/docusaurus.config.js +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/static/img/2025_CALM_Icon.svg +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/src/remark/remark-replace-links.js +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/static/css/custom.css info [_TemplateEngine]: ✅ Registering partial template: c4-container.hbs info [_TemplateEngine]: ✅ Registering partial template: table-template.html info [_TemplateEngine]: ✅ Registering partial template: metadata.hbs -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/docs/index.md -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/package.json -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/docs/controls/security-001.md -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/docs/controls/security-002.md -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/docs/controls/security-002.md -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/docs/controls/security-003.md -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/docs/control-requirements/micro-segmentation.requirement.json.md -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/docs/control-requirements/permitted-connection.requirement.json.md -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/docs/control-requirements/permitted-connection.requirement.json.md -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/docs/control-requirements/permitted-connection.requirement.json.md +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/docs/index.md +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/package.json +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/docs/controls/security-001.md +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/docs/controls/security-002.md +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/docs/controls/security-002.md +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/docs/controls/security-003.md +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/docs/control-requirements/micro-segmentation.requirement.json.md +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/docs/control-requirements/permitted-connection.requirement.json.md +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/docs/control-requirements/permitted-connection.requirement.json.md +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/docs/control-requirements/permitted-connection.requirement.json.md info [_TemplateEngine]: ✅ Registering partial template: controls.hbs info [_TemplateEngine]: ✅ Registering partial template: flow-sequence.hbs info [_TemplateEngine]: ✅ Registering partial template: table-template.html info [_TemplateEngine]: ✅ Registering partial template: row-template.html +warn [_TemplateEngine]: ⚠️ Expected array for repeated output, but found non-array for flow.mdx.hbs info [_TemplateEngine]: ✅ Template Generation Completed! -info [_TemplateEngine]: +info [_TemplateProcessor]: ✅ Template Generation Completed! ``` Now let's run up our documentation website. + ```shell -npm install ./website -npm start --prefix ./website +npm install --prefix ./calm/getting-started/website +npm start --prefix ./calm/getting-started/website ``` Give it a few seconds to start up, and then open your browser to http://localhost:3000. You should see the documentation @@ -399,8 +394,8 @@ Save the file and then run the `docify` command again to regenerate the document ```shell calm docify \ - --architecture ./conference-signup.arch.json \ - --output ./website + --architecture ./calm/getting-started/conference-signup.arch.json \ + --output ./calm/getting-started/website ``` ![CALM Docify Website with Flows](./img/docify-with-flow.png) @@ -415,4 +410,3 @@ Congratulations! You have now: ## 🎉 Get Involved! If you found this demo useful, please consider contributing to the CALM project. - diff --git a/cli/test_fixtures/getting-started/STEP-2/website/docusaurus.config.js b/cli/test_fixtures/getting-started/STEP-2/website/docusaurus.config.js index 325a73aaa..c8474b8e6 100644 --- a/cli/test_fixtures/getting-started/STEP-2/website/docusaurus.config.js +++ b/cli/test_fixtures/getting-started/STEP-2/website/docusaurus.config.js @@ -1,5 +1,5 @@ /* eslint-disable no-undef */ -import remarkReplaceLinks from './src/remark/remark-replace-links'; +import remarkReplaceLinks from './src/remark/remark-replace-links.mjs'; module.exports = { title: 'My Docusaurus Docs', diff --git a/cli/test_fixtures/getting-started/STEP-2/website/src/remark/remark-replace-links.js b/cli/test_fixtures/getting-started/STEP-2/website/src/remark/remark-replace-links.mjs similarity index 100% rename from cli/test_fixtures/getting-started/STEP-2/website/src/remark/remark-replace-links.js rename to cli/test_fixtures/getting-started/STEP-2/website/src/remark/remark-replace-links.mjs diff --git a/cli/test_fixtures/getting-started/STEP-3/website/docusaurus.config.js b/cli/test_fixtures/getting-started/STEP-3/website/docusaurus.config.js index 325a73aaa..c8474b8e6 100644 --- a/cli/test_fixtures/getting-started/STEP-3/website/docusaurus.config.js +++ b/cli/test_fixtures/getting-started/STEP-3/website/docusaurus.config.js @@ -1,5 +1,5 @@ /* eslint-disable no-undef */ -import remarkReplaceLinks from './src/remark/remark-replace-links'; +import remarkReplaceLinks from './src/remark/remark-replace-links.mjs'; module.exports = { title: 'My Docusaurus Docs', diff --git a/cli/test_fixtures/getting-started/STEP-3/website/src/remark/remark-replace-links.js b/cli/test_fixtures/getting-started/STEP-3/website/src/remark/remark-replace-links.mjs similarity index 100% rename from cli/test_fixtures/getting-started/STEP-3/website/src/remark/remark-replace-links.js rename to cli/test_fixtures/getting-started/STEP-3/website/src/remark/remark-replace-links.mjs diff --git a/docs/quick-start/index.md b/docs/quick-start/index.md index 80810c1c0..0a7f84d60 100644 --- a/docs/quick-start/index.md +++ b/docs/quick-start/index.md @@ -34,27 +34,27 @@ All commands in this guide are run from the `root` directory of the clone. To start lets build all the projects in the repository. -``` +```shell ./mvnw clean install ``` Assuming all went well, you will see a message like this: ``` - ------------------------------------------------------------------------ +[INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] -[INFO] parent 1.0.0-SNAPSHOT .............................. SUCCESS [ 0.086 s] -[INFO] calm-hub 0.7.5 ..................................... SUCCESS [ 56.260 s] -[INFO] cli 1.0.0-SNAPSHOT ................................. SUCCESS [ 0.005 s] -[INFO] calm 1.0.0-SNAPSHOT ................................ SUCCESS [ 0.004 s] -[INFO] docs 1.0.0-SNAPSHOT ................................ SUCCESS [ 0.004 s] -[INFO] shared 1.0.0-SNAPSHOT .............................. SUCCESS [ 0.003 s] +[INFO] parent 1.0.0-SNAPSHOT .............................. SUCCESS [ 0.278 s] +[INFO] calm-hub 0.7.5 ..................................... SUCCESS [02:37 min] +[INFO] cli 1.0.0-SNAPSHOT ................................. SUCCESS [ 0.021 s] +[INFO] calm 1.0.0-SNAPSHOT ................................ SUCCESS [ 0.016 s] +[INFO] docs 1.0.0-SNAPSHOT ................................ SUCCESS [ 0.016 s] +[INFO] shared 1.0.0-SNAPSHOT .............................. SUCCESS [ 0.019 s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ -[INFO] Total time: 57.015 s -[INFO] Finished at: 2025-06-21T16:20:54+01:00 +[INFO] Total time: 02:40 min +[INFO] Finished at: 2025-08-21T13:24:41+01:00 [INFO] ------------------------------------------------------------------------ ``` @@ -70,13 +70,13 @@ You should see output indicating that the application has started successfully, ``` Listening for transport dt_socket at address: 5005 -__ ____ __ _____ ___ __ ____ ______ - --/ __ \/ / / / _ | / _ \/ //_/ / / / __/ - -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \ ---\___\_\____/_/ |_/_/|_/_/|_|\____/___/ -2025-06-21 16:26:09,029 INFO [io.quarkus] (Quarkus Main Thread) calm-hub 0.7.5 on JVM (powered by Quarkus 3.23.0) started in 1.690s. Listening on: http://localhost:8080 -2025-06-21 16:26:09,031 INFO [io.quarkus] (Quarkus Main Thread) Profile dev activated. Live Coding activated. -2025-06-21 16:26:09,032 INFO [io.quarkus] (Quarkus Main Thread) Installed features: [cdi, compose, hibernate-validator, mongodb-client, oidc, resteasy, resteasy-jsonb, security, smallrye-context-propagation, smallrye-openapi, swagger-ui, vertx] +__ ____ __ _____ ___ __ ____ ______ + --/ __ \/ / / / _ | / _ \/ //_/ / / / __/ + -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \ +--\___\_\____/_/ |_/_/|_/_/|_|\____/___/ +2025-08-21 14:19:52,408 INFO [io.quarkus] (Quarkus Main Thread) calm-hub 0.7.5 on JVM (powered by Quarkus 3.23.0) started in 1.690s. Listening on: http://localhost:8080 +2025-08-21 14:19:52,411 INFO [io.quarkus] (Quarkus Main Thread) Profile dev activated. Live Coding activated. +2025-08-21 14:19:52,411 INFO [io.quarkus] (Quarkus Main Thread) Installed features: [cdi, compose, hibernate-validator, mongodb-client, oidc, resteasy, resteasy-jsonb, security, smallrye-context-propagation, smallrye-openapi, swagger-ui, vertx] -- Tests paused @@ -103,7 +103,7 @@ Verify the installation. calm --version ``` -This getting started has been verified to work against 0.7.10 of the cli. +This getting started has been verified to work against 1.0.0 of the cli. --- @@ -120,15 +120,12 @@ calm generate \ This step expands the reusable pattern into a concrete architecture model. You should see output like this: ``` -warn [_TemplateEngine]: Warning, no schema loading mechanism was defined. Only the bundled core schemas will be available; you may see empty definitions or errors. -info [_TemplateEngine]: Loading json from file: ./calm/getting-started/conference-signup.pattern.json -info [_TemplateEngine]: Generating a CALM architecture... -info [_TemplateEngine]: Successfully generated architecture to [./calm/getting-started/conference-signup.arch.json] +info [file-system-document-loader]: ./calm/getting-started/conference-signup.pattern.json exists, loading as file... +info [calm-generate]: Generating a CALM architecture... +info [calm-generate]: Successfully generated architecture to [./calm/getting-started/conference-signup.arch.json] --- ``` -You can ignore the warning about schema loading for now, as it is not important for this demo. - Now that we have an architecture, we can vaidate it against the pattern schema to ensure it is valid. Run the following command: @@ -141,10 +138,9 @@ calm validate \ You should see output like this: ``` -info [_TemplateEngine]: Loading meta schema(s) from /opt/homebrew/lib/node_modules/@finos/calm-cli/dist/calm/release -info [_TemplateEngine]: Loading pattern from : ./calm/getting-started/conference-signup.pattern.json -info [_TemplateEngine]: Loading architecture from : ./calm/getting-started/conference-signup.arch.json -info [_TemplateEngine]: Formatting output as json +info [file-system-document-loader]: ./calm/getting-started/conference-signup.arch.json exists, loading as file... +info [file-system-document-loader]: ./calm/getting-started/conference-signup.pattern.json exists, loading as file... +info [calm-validate]: Formatting output as json { "jsonSchemaValidationOutputs": [], "spectralSchemaValidationOutputs": [ @@ -154,10 +150,10 @@ info [_TemplateEngine]: Formatting output as json "message": "String placeholder detected in architecture.", "path": "/nodes/0/interfaces/0/url", "schemaPath": "", - "line_start": 10, - "line_end": 10, - "character_start": 17, - "character_end": 28 + "line_start": 0, + "line_end": 0, + "character_start": 206, + "character_end": 217 }, { "code": "architecture-has-no-placeholder-properties-string", @@ -165,10 +161,10 @@ info [_TemplateEngine]: Formatting output as json "message": "String placeholder detected in architecture.", "path": "/nodes/1/interfaces/0/host", "schemaPath": "", - "line_start": 22, - "line_end": 22, - "character_start": 18, - "character_end": 30 + "line_start": 0, + "line_end": 0, + "character_start": 435, + "character_end": 447 }, { "code": "architecture-has-no-placeholder-properties-numerical", @@ -176,10 +172,10 @@ info [_TemplateEngine]: Formatting output as json "message": "Numerical placeholder (-1) detected in architecture.", "path": "/nodes/1/interfaces/0/port", "schemaPath": "", - "line_start": 23, - "line_end": 23, - "character_start": 18, - "character_end": 20 + "line_start": 0, + "line_end": 0, + "character_start": 455, + "character_end": 457 }, { "code": "architecture-has-no-placeholder-properties-string", @@ -187,10 +183,10 @@ info [_TemplateEngine]: Formatting output as json "message": "String placeholder detected in architecture.", "path": "/nodes/2/interfaces/0/image", "schemaPath": "", - "line_start": 35, - "line_end": 35, - "character_start": 19, - "character_end": 32 + "line_start": 0, + "line_end": 0, + "character_start": 668, + "character_end": 681 }, { "code": "architecture-has-no-placeholder-properties-numerical", @@ -198,10 +194,10 @@ info [_TemplateEngine]: Formatting output as json "message": "Numerical placeholder (-1) detected in architecture.", "path": "/nodes/2/interfaces/1/port", "schemaPath": "", - "line_start": 39, - "line_end": 39, - "character_start": 18, - "character_end": 20 + "line_start": 0, + "line_end": 0, + "character_start": 720, + "character_end": 722 }, { "code": "architecture-has-no-placeholder-properties-string", @@ -209,10 +205,10 @@ info [_TemplateEngine]: Formatting output as json "message": "String placeholder detected in architecture.", "path": "/nodes/3/interfaces/0/image", "schemaPath": "", - "line_start": 51, - "line_end": 51, - "character_start": 19, - "character_end": 32 + "line_start": 0, + "line_end": 0, + "character_start": 906, + "character_end": 919 }, { "code": "architecture-has-no-placeholder-properties-numerical", @@ -220,15 +216,15 @@ info [_TemplateEngine]: Formatting output as json "message": "Numerical placeholder (-1) detected in architecture.", "path": "/nodes/3/interfaces/1/port", "schemaPath": "", - "line_start": 55, - "line_end": 55, - "character_start": 18, - "character_end": 20 + "line_start": 0, + "line_end": 0, + "character_start": 957, + "character_end": 959 } ], "hasErrors": false, "hasWarnings": true -}% +} ``` In this case the warnings are related to placeholder values in the architecture, which is expected since we used a @@ -263,31 +259,21 @@ calm docify \ You'll see output like this: ``` -info [_TemplateEngine]: 📥 Loading index.json from /opt/homebrew/lib/node_modules/@finos/calm-cli/dist/template-bundles/docusaurus/index.json -info [_TemplateEngine]: ✅ Successfully loaded template bundle: docusaurus-docs -info [_TemplateEngine]: 📂 Loading template files from: /opt/homebrew/lib/node_modules/@finos/calm-cli/dist/template-bundles/docusaurus -info [_TemplateEngine]: 🎯 Total Templates Loaded: 21 -info [_TemplateEngine]: 🔍 Loading transformer as JavaScript: /opt/homebrew/lib/node_modules/@finos/calm-cli/dist/template-bundles/docusaurus/docusaurus-transformer.js -info [_TemplateEngine]: Fetching reference via HTTP: https://calm.finos.org/getting-started/controls/micro-segmentation.requirement.json -info [_TemplateEngine]: Fetching reference via HTTP: https://calm.finos.org/getting-started/controls/micro-segmentation.config.json -info [_TemplateEngine]: Fetching reference via HTTP: https://calm.finos.org/getting-started/controls/permitted-connection.requirement.json -info [_TemplateEngine]: Fetching reference via HTTP: https://calm.finos.org/getting-started/controls/permitted-connection-http.config.json -info [_TemplateEngine]: Fetching reference via HTTP: https://calm.finos.org/getting-started/controls/permitted-connection.requirement.json -info [_TemplateEngine]: Fetching reference via HTTP: https://calm.finos.org/getting-started/controls/permitted-connection-http.config.json -info [_TemplateEngine]: Fetching reference via HTTP: https://calm.finos.org/getting-started/controls/permitted-connection.requirement.json -info [_TemplateEngine]: Fetching reference via HTTP: https://calm.finos.org/getting-started/controls/permitted-connection-jdbc.config.json -info [_TemplateEngine]: Fetching reference via HTTP: https://calm.finos.org/getting-started/conference-signup.pattern.json -info [_TemplateEngine]: Will not attempt to dereference URL: https://calm.finos.org/getting-started/controls/micro-segmentation.requirement.json -info [_TemplateEngine]: Will not attempt to dereference URL: https://calm.finos.org/getting-started/controls/permitted-connection.requirement.json -info [_TemplateEngine]: Will not attempt to dereference URL: https://calm.finos.org/getting-started/controls/permitted-connection.requirement.json -info [_TemplateEngine]: Will not attempt to dereference URL: https://calm.finos.org/getting-started/controls/permitted-connection.requirement.json -info [_TemplateEngine]: Fetching reference via HTTP: https://calm.finos.org/getting-started/controls/micro-segmentation.config.json -info [_TemplateEngine]: Fetching reference via HTTP: https://calm.finos.org/getting-started/controls/permitted-connection-http.config.json -info [_TemplateEngine]: Fetching reference via HTTP: https://calm.finos.org/getting-started/controls/permitted-connection-jdbc.config.json -info [_TemplateEngine]: 📥 Loading index.json from /opt/homebrew/lib/node_modules/@finos/calm-cli/dist/template-bundles/docusaurus/index.json -info [_TemplateEngine]: ✅ Successfully loaded template bundle: docusaurus-docs -info [_TemplateEngine]: 📂 Loading template files from: /opt/homebrew/lib/node_modules/@finos/calm-cli/dist/template-bundles/docusaurus -info [_TemplateEngine]: 🎯 Total Templates Loaded: 21 +info [_TemplateProcessor]: Using TemplateBundleFileLoader for bundle +info [_TemplateBundleFileLoader]: 📥 Loading index.json from /home/mark/.nvm/versions/node/v22.17.0/lib/node_modules/@finos/calm-cli/dist/template-bundles/docusaurus/index.json +info [_TemplateBundleFileLoader]: ✅ Successfully loaded template bundle: docusaurus-docs +info [_TemplateBundleFileLoader]: 📂 Loading template files from: /home/mark/.nvm/versions/node/v22.17.0/lib/node_modules/@finos/calm-cli/dist/template-bundles/docusaurus +info [_TemplateBundleFileLoader]: 🎯 Total Templates Loaded: 21 +info [_TemplateProcessor]: 📂 Creating output directory: /home/mark/architecture-as-code/calm/getting-started/website +info [_TemplateProcessor]: 🔍 Loading transformer as JavaScript: /home/mark/.nvm/versions/node/v22.17.0/lib/node_modules/@finos/calm-cli/dist/template-bundles/docusaurus/docusaurus-transformer.js +info [_HttpReferenceResolver]: Fetching reference via HTTP: https://calm.finos.org/getting-started/controls/micro-segmentation.requirement.json +info [_HttpReferenceResolver]: Fetching reference via HTTP: https://calm.finos.org/getting-started/controls/micro-segmentation.config.json +info [_HttpReferenceResolver]: Fetching reference via HTTP: https://calm.finos.org/getting-started/controls/permitted-connection.requirement.json +info [_HttpReferenceResolver]: Fetching reference via HTTP: https://calm.finos.org/getting-started/controls/permitted-connection.requirement.json +info [_HttpReferenceResolver]: Fetching reference via HTTP: https://calm.finos.org/getting-started/controls/permitted-connection.requirement.json +info [_HttpReferenceResolver]: Fetching reference via HTTP: https://calm.finos.org/getting-started/controls/permitted-connection-http.config.json +info [_HttpReferenceResolver]: Fetching reference via HTTP: https://calm.finos.org/getting-started/controls/permitted-connection-http.config.json +info [_HttpReferenceResolver]: Fetching reference via HTTP: https://calm.finos.org/getting-started/controls/permitted-connection-jdbc.config.json info [_TemplateEngine]: ✅ Compiled 21 Templates info [_TemplateEngine]: 🔧 Registering Handlebars Helpers... info [_TemplateEngine]: ✅ Registered helper: eq @@ -300,6 +286,7 @@ info [_TemplateEngine]: ✅ Registered helper: isObject info [_TemplateEngine]: ✅ Registered helper: isArray info [_TemplateEngine]: ✅ Registered helper: notEmpty info [_TemplateEngine]: ✅ Registered helper: or +info [_TemplateEngine]: ✅ Registered helper: eachInMap info [_TemplateEngine]: 🔹 Starting Template Generation... info [_TemplateEngine]: ✅ Registering partial template: controls.hbs @@ -307,52 +294,53 @@ info [_TemplateEngine]: ✅ Registering partial template: relationships.hbs info [_TemplateEngine]: ✅ Registering partial template: table-template.html info [_TemplateEngine]: ✅ Registering partial template: row-template.html info [_TemplateEngine]: ✅ Registering partial template: metadata.hbs -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/docs/nodes/conference-website.md -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/docs/nodes/load-balancer.md -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/docs/nodes/attendees.md -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/docs/nodes/attendees-store.md -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/docs/nodes/k8s-cluster.md +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/docs/nodes/conference-website.md +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/docs/nodes/load-balancer.md +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/docs/nodes/attendees.md +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/docs/nodes/attendees-store.md +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/docs/nodes/k8s-cluster.md info [_TemplateEngine]: ✅ Registering partial template: controls.hbs info [_TemplateEngine]: ✅ Registering partial template: relationships.hbs info [_TemplateEngine]: ✅ Registering partial template: table-template.html info [_TemplateEngine]: ✅ Registering partial template: row-template.html info [_TemplateEngine]: ✅ Registering partial template: metadata.hbs -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/docs/relationships/conference-website-load-balancer.md -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/docs/relationships/load-balancer-attendees.md -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/docs/relationships/attendees-attendees-store.md -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/docs/relationships/deployed-in-k8s-cluster.md -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/sidebars.js -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/docusaurus.config.js -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/static/img/2025_CALM_Icon.svg -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/src/remark/remark-replace-links.js -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/static/css/custom.css +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/docs/relationships/conference-website-load-balancer.md +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/docs/relationships/load-balancer-attendees.md +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/docs/relationships/attendees-attendees-store.md +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/docs/relationships/deployed-in-k8s-cluster.md +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/sidebars.js +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/docusaurus.config.js +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/static/img/2025_CALM_Icon.svg +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/src/remark/remark-replace-links.js +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/static/css/custom.css info [_TemplateEngine]: ✅ Registering partial template: c4-container.hbs info [_TemplateEngine]: ✅ Registering partial template: table-template.html info [_TemplateEngine]: ✅ Registering partial template: metadata.hbs -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/docs/index.md -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/package.json -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/docs/controls/security-001.md -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/docs/controls/security-002.md -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/docs/controls/security-002.md -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/docs/controls/security-003.md -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/docs/control-requirements/micro-segmentation.requirement.json.md -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/docs/control-requirements/permitted-connection.requirement.json.md -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/docs/control-requirements/permitted-connection.requirement.json.md -info [_TemplateEngine]: ✅ Generated: ~/github/architecture-as-code/calm/getting-started/website/docs/control-requirements/permitted-connection.requirement.json.md +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/docs/index.md +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/package.json +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/docs/controls/security-001.md +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/docs/controls/security-002.md +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/docs/controls/security-002.md +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/docs/controls/security-003.md +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/docs/control-requirements/micro-segmentation.requirement.json.md +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/docs/control-requirements/permitted-connection.requirement.json.md +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/docs/control-requirements/permitted-connection.requirement.json.md +info [_TemplateEngine]: ✅ Generated: /home/mark/architecture-as-code/calm/getting-started/website/docs/control-requirements/permitted-connection.requirement.json.md info [_TemplateEngine]: ✅ Registering partial template: controls.hbs info [_TemplateEngine]: ✅ Registering partial template: flow-sequence.hbs info [_TemplateEngine]: ✅ Registering partial template: table-template.html info [_TemplateEngine]: ✅ Registering partial template: row-template.html +warn [_TemplateEngine]: ⚠️ Expected array for repeated output, but found non-array for flow.mdx.hbs info [_TemplateEngine]: ✅ Template Generation Completed! -info [_TemplateEngine]: +info [_TemplateProcessor]: ✅ Template Generation Completed! ``` Now let's run up our documentation website. ```shell -npm install ./calm/getting-started/website +npm install --prefix ./calm/getting-started/website npm start --prefix ./calm/getting-started/website ``` @@ -433,4 +421,4 @@ Congratulations! You have now: - Generated documentation for your architecture including business flows ## 🎉 Get Involved! -If you found this demo useful, please consider contributing to the CALM project. \ No newline at end of file +If you found this demo useful, please consider contributing to the CALM project. diff --git a/shared/src/docify/template-bundles/docusaurus/docusaurus.config.js b/shared/src/docify/template-bundles/docusaurus/docusaurus.config.js index 325a73aaa..c8474b8e6 100644 --- a/shared/src/docify/template-bundles/docusaurus/docusaurus.config.js +++ b/shared/src/docify/template-bundles/docusaurus/docusaurus.config.js @@ -1,5 +1,5 @@ /* eslint-disable no-undef */ -import remarkReplaceLinks from './src/remark/remark-replace-links'; +import remarkReplaceLinks from './src/remark/remark-replace-links.mjs'; module.exports = { title: 'My Docusaurus Docs', diff --git a/shared/src/docify/template-bundles/docusaurus/index.json b/shared/src/docify/template-bundles/docusaurus/index.json index 444a18f16..769807847 100644 --- a/shared/src/docify/template-bundles/docusaurus/index.json +++ b/shared/src/docify/template-bundles/docusaurus/index.json @@ -47,9 +47,9 @@ "output-type": "single" }, { - "template": "remark-replace-links.js", + "template": "remark-replace-links.mjs", "from": "docs", - "output": "src/remark/remark-replace-links.js", + "output": "src/remark/remark-replace-links.mjs", "output-type": "single" }, { diff --git a/shared/src/docify/template-bundles/docusaurus/remark-replace-links.js b/shared/src/docify/template-bundles/docusaurus/remark-replace-links.mjs similarity index 100% rename from shared/src/docify/template-bundles/docusaurus/remark-replace-links.js rename to shared/src/docify/template-bundles/docusaurus/remark-replace-links.mjs diff --git a/shared/test_fixtures/docify/workshop/expected-output/non-secure/docusaurus.config.js b/shared/test_fixtures/docify/workshop/expected-output/non-secure/docusaurus.config.js index 325a73aaa..c8474b8e6 100644 --- a/shared/test_fixtures/docify/workshop/expected-output/non-secure/docusaurus.config.js +++ b/shared/test_fixtures/docify/workshop/expected-output/non-secure/docusaurus.config.js @@ -1,5 +1,5 @@ /* eslint-disable no-undef */ -import remarkReplaceLinks from './src/remark/remark-replace-links'; +import remarkReplaceLinks from './src/remark/remark-replace-links.mjs'; module.exports = { title: 'My Docusaurus Docs', diff --git a/shared/test_fixtures/docify/workshop/expected-output/non-secure/src/remark/remark-replace-links.js b/shared/test_fixtures/docify/workshop/expected-output/non-secure/src/remark/remark-replace-links.mjs similarity index 100% rename from shared/test_fixtures/docify/workshop/expected-output/non-secure/src/remark/remark-replace-links.js rename to shared/test_fixtures/docify/workshop/expected-output/non-secure/src/remark/remark-replace-links.mjs diff --git a/shared/test_fixtures/docify/workshop/expected-output/secure/docusaurus.config.js b/shared/test_fixtures/docify/workshop/expected-output/secure/docusaurus.config.js index 325a73aaa..c8474b8e6 100644 --- a/shared/test_fixtures/docify/workshop/expected-output/secure/docusaurus.config.js +++ b/shared/test_fixtures/docify/workshop/expected-output/secure/docusaurus.config.js @@ -1,5 +1,5 @@ /* eslint-disable no-undef */ -import remarkReplaceLinks from './src/remark/remark-replace-links'; +import remarkReplaceLinks from './src/remark/remark-replace-links.mjs'; module.exports = { title: 'My Docusaurus Docs', diff --git a/shared/test_fixtures/docify/workshop/expected-output/secure/src/remark/remark-replace-links.js b/shared/test_fixtures/docify/workshop/expected-output/secure/src/remark/remark-replace-links.mjs similarity index 100% rename from shared/test_fixtures/docify/workshop/expected-output/secure/src/remark/remark-replace-links.js rename to shared/test_fixtures/docify/workshop/expected-output/secure/src/remark/remark-replace-links.mjs