{ "module": "mesh-catalog", "slug": "catalog", "version": "1", "capabilities": [ "container-runtime" ], "claims": [ { "name": "mesh-catalog", "scope": "mesh" } ], "requires": [ "postgres-database" ], "contributes": { "postgres-database": { "name": "mesh_catalog" } }, "binds": { "postgres-database": "${dir:state}/database.json" }, "secrets": { "postgres-database": "${dir:state}/database.secret" }, "consumes": [ "mesh-build-machine.built", "mesh-controller.built-before" ], "emits": [ "registered", "upgraded", "rebuild-needed", "catching-up" ], "resources": [ { "id": "state", "type": "directory", "mode": "0700", "place": "." }, { "id": "database-url", "type": "file", "path": "${dir:state}/database.url", "mode": "0600", "content": "postgresql://${bound:postgres-database:as}:${secret:postgres-database}@${bound:postgres-database:at}:${bound:postgres-database:port}/${bound:postgres-database:as}\n" }, { "id": "prepare", "type": "process", "name": "mesh-catalog-prepare", "artifact": "code", "run": [ "node", "prepare/index.js" ], "run-once": true, "env": { "DATABASE_URL_FILE": "${dir:state}/database.url" }, "restart-on": [ "database-url" ] } ], "build": { "artifacts": [ { "name": "code", "kind": "bundle", "language": "typescript", "entrypoints": [ "index.js", "tools/index.js", "prepare/index.js" ], "loads": [ "index.js", "tools/index.js" ], "env": { "DATABASE_URL_FILE": "${dir:state}/database.url" } } ] } }