From 4578c29a12a283148cbed88c6144e2d0efd9e4de Mon Sep 17 00:00:00 2001 From: Dominic Reber Date: Wed, 28 Jan 2026 11:19:31 +0100 Subject: [PATCH 1/5] chore(schemas): build with bun --- schemas/README.md | 38 +++++++++++++++ schemas/bun.lock | 28 +++++++++++ {utils => schemas}/bundleHelper.js | 0 schemas/package.json | 11 +++++ utils/.gitignore | 2 - utils/package-lock.json | 74 ------------------------------ utils/package.json | 7 --- 7 files changed, 77 insertions(+), 83 deletions(-) create mode 100644 schemas/bun.lock rename {utils => schemas}/bundleHelper.js (100%) create mode 100644 schemas/package.json delete mode 100644 utils/.gitignore delete mode 100644 utils/package-lock.json delete mode 100644 utils/package.json diff --git a/schemas/README.md b/schemas/README.md index c243c6c1..6870a93d 100644 --- a/schemas/README.md +++ b/schemas/README.md @@ -16,11 +16,48 @@ of AICA component classes. The [controller-descriptions](./controller-descriptions) directory defines the JSON syntax for describing the properties of AICA controller plugins. +## Extensions + +The [extensions](./extensions) unifies the previous description schemas for components and controllers. + ## Interfaces The [interfaces](./interfaces) directory defines a schema with common interface definitions used by both the component and controller descriptions. +## Bundling the schemas + +In order to bundle the schemas for debugging and testing, do the following (replace `SCHEMA_NAME` and `SCHEMA_PATH` +with the appropriate values for other schemas): + +```bash +SCHEMA_NAME="interfaces" +SCHEMA_PATH="interfaces/schema" +bun install +bun run bundleHelper.js "${SCHEMA_PATH}"/"${SCHEMA_NAME}".schema.json "${SCHEMA_NAME}" +``` + +or, with Docker: + +```bash +SCHEMA_NAME="interfaces" +SCHEMA_PATH="interfaces/schema" +docker build -t aica-technology/api-schema -f- . <= 16" - }, - "funding": { - "url": "https://github.com/sponsors/philsturgeon" - } - }, - "node_modules/@jsdevtools/ono": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz", - "integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==" - }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==" - }, - "node_modules/@types/lodash": { - "version": "4.14.201", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.201.tgz", - "integrity": "sha512-y9euML0cim1JrykNxADLfaG0FgD1g/yTHwUs/Jg9ZIU7WKj2/4IW9Lbb1WZbvck78W/lfGXFfe+u2EGfIJXdLQ==" - }, - "node_modules/@types/lodash.clonedeep": { - "version": "4.5.9", - "resolved": "https://registry.npmjs.org/@types/lodash.clonedeep/-/lodash.clonedeep-4.5.9.tgz", - "integrity": "sha512-19429mWC+FyaAhOLzsS8kZUsI+/GmBAQ0HFiCPsKGU+7pBXOQWhyrY6xNNDwUSX8SMZMJvuFVMF9O5dQOlQK9Q==", - "dependencies": { - "@types/lodash": "*" - } - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" - }, - "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==" - } - } -} diff --git a/utils/package.json b/utils/package.json deleted file mode 100644 index 6cab316b..00000000 --- a/utils/package.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "private": true, - "type": "module", - "dependencies": { - "@apidevtools/json-schema-ref-parser": "^11.1.0" - } -} From 3f463fe28392d9ad2acfc5e31f081412f63e2d89 Mon Sep 17 00:00:00 2001 From: Dominic Reber Date: Wed, 28 Jan 2026 11:20:46 +0100 Subject: [PATCH 2/5] fix: gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 2997dcab..69bcb91e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.idea .DS_Store +*/node_modules \ No newline at end of file From 06d67d1455b04b7b4831c5ce3bd466614ec8bb6f Mon Sep 17 00:00:00 2001 From: Dominic Reber Date: Wed, 28 Jan 2026 11:22:00 +0100 Subject: [PATCH 3/5] readme --- README.md | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/README.md b/README.md index f87a15e2..23d49bf3 100644 --- a/README.md +++ b/README.md @@ -16,27 +16,3 @@ See the [python](./python) subdirectory for more information and source code. JSON schemas defining the expected syntax for AICA application files or component descriptions are available in the [schemas](./schemas) subdirectory. - -### Bundling the schemas locally - -In order to bundle the schemas locally for debugging and testing, do the following (replace `SCHEMA_NAME` and -`SCHEMA_PATH` with the appropriate values for other schemas): - -```bash -SCHEMA_NAME="interfaces" -SCHEMA_PATH="schemas/interfaces/schema" -docker build -t aica-technology/api-schema -f- . < Date: Wed, 28 Jan 2026 11:24:03 +0100 Subject: [PATCH 4/5] readme --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 23d49bf3..ff2854b8 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,12 @@ This repository contains tools and resources for interacting with the AICA API, applications and components. +## Documentation + +The documentation is available at https://docs.aica.tech/. + +The source and contribution guidelines are available in the [docs](./docs) subdirectory. + ## Python client The Python client is available at https://pypi.org/project/aica-api/ and can be installed as follows: From 6b400548efc337c0ba6c99a5734a7d63fe557f95 Mon Sep 17 00:00:00 2001 From: Dominic Reber Date: Wed, 28 Jan 2026 12:21:54 +0100 Subject: [PATCH 5/5] fix: update ci --- .github/actions/bundle-schema/action.yml | 19 ++++++++++--------- .github/workflows/bundle-schema.yml | 10 +++++----- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/.github/actions/bundle-schema/action.yml b/.github/actions/bundle-schema/action.yml index bec185f1..8826ad36 100644 --- a/.github/actions/bundle-schema/action.yml +++ b/.github/actions/bundle-schema/action.yml @@ -35,23 +35,24 @@ runs: echo "prev_schema_id=${PREV_SCHEMA_ID}" >> $GITHUB_OUTPUT shell: bash - uses: actions/checkout@v3 - # Bundle JSON schema - - uses: actions/setup-node@v3 + - uses: actions/cache@v4 with: - node-version: "18" - cache: "npm" - cache-dependency-path: "utils/package-lock.json" + path: ~/.bun/install/cache + key: ${{ runner.os }}-bun-${{ hashFiles('schemas/bun.lock') }} + restore-keys: | + ${{ runner.os }}-bun- + - uses: oven-sh/setup-bun@v2 + with: + bun-version: "1.3" - name: Install dependencies shell: bash run: | - cd utils - npm ci - pip3 install javascript + bun ci --cwd schemas - name: Bundle & Push schemas if: ${{ steps.versions.outputs.new_schema_id != steps.versions.outputs.prev_schema_id }} shell: bash run: | - node utils/bundleHelper.js ${{ inputs.schema-path }} ${{ inputs.schema }} + bun run --cwd schemas bundle ${{ inputs.schema-path }} ${{ inputs.schema }} EXPORT_DIR="docs/static/schemas/${{ steps.versions.outputs.new_schema_version }}" echo "Ensuring directory branch name: ${EXPORT_DIR}" mkdir -p "${EXPORT_DIR}" diff --git a/.github/workflows/bundle-schema.yml b/.github/workflows/bundle-schema.yml index 9b0808b9..0c09c17b 100644 --- a/.github/workflows/bundle-schema.yml +++ b/.github/workflows/bundle-schema.yml @@ -35,15 +35,15 @@ jobs: matrix: include: - schema: application - schema-path: ./schemas/applications/schema + schema-path: ./applications/schema - schema: component - schema-path: ./schemas/component-descriptions/schema + schema-path: ./component-descriptions/schema - schema: controller - schema-path: ./schemas/controller-descriptions/schema + schema-path: ./controller-descriptions/schema - schema: extension - schema-path: ./schemas/extensions/schema + schema-path: ./extensions/schema - schema: interfaces - schema-path: ./schemas/interfaces/schema + schema-path: ./interfaces/schema name: Bundle the ${{ matrix.schema }} schema steps: - name: Check out repository code