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 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 diff --git a/README.md b/README.md index f87a15e2..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: @@ -16,27 +22,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- . <= 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" - } -}