From 1830517eaa95662f9e60b5ddd25e9305ebe1f54d Mon Sep 17 00:00:00 2001 From: leorossi Date: Thu, 23 Jan 2025 08:28:43 +0000 Subject: [PATCH] [automated commit] Bump docs to versions 2.39.0, 1.53.4 --- docs/cli.md | 1 + docs/guides/use-watt-multiple-repository.md | 200 +++++++++++++++++ docs/guides/using-watt-with-node-config.md | 209 ++++++++++++++++++ docs/packages/astro/configuration.md | 2 +- docs/packages/astro/overview.md | 17 ++ docs/packages/node/overview.md | 28 ++- docs/packages/remix/overview.md | 15 ++ docs/packages/vite/overview.md | 16 ++ docs/runtime/_shared-configuration.md | 38 ++++ sidebars.json | 4 +- .../FAQs.md | 0 .../Overview.md | 0 .../{version-2.35.0 => version-2.39.0}/cli.md | 1 + .../client/frontend.md | 0 .../client/overview.md | 0 .../client/programmatic.md | 0 .../composer/api-modification.md | 0 .../composer/configuration.md | 0 .../composer/overview.md | 0 .../composer/plugin.md | 0 .../composer/programmatic.md | 0 .../contributing/contributing.md | 0 .../contributing/documentation-style-guide.md | 0 .../db/authorization/images/http.png | Bin .../db/authorization/images/jwt.png | Bin .../images/sources/http.excalidraw | 0 .../images/sources/jwt.excalidraw | 0 .../images/sources/webhook.excalidraw | 0 .../db/authorization/images/webhook.png | Bin .../db/authorization/overview.md | 0 .../db/authorization/rules.md | 0 .../db/authorization/strategies.md | 0 .../db/authorization/user-roles-metadata.md | 0 .../db/configuration.md | 0 .../db/logging.md | 0 .../db/migrations.md | 0 .../db/overview.md | 0 .../db/plugin.md | 0 .../db/programmatic.md | 0 .../db/schema-support.md | 0 .../file-formats.md | 0 .../getting-started/images/inspector.png | Bin .../images/movie_quote_app.png | Bin .../getting-started/images/vs-code-debug.png | Bin .../getting-started/issues.md | 0 .../new-api-project-instructions.md | 0 .../platformatic-architecture.png | Bin .../platformatic-composer-architecture.png | Bin .../platformatic-db-architecture.png | Bin .../platformatic-runtime-architecture.png | Bin .../platformatic-stackables-architecture.png | Bin ...tformatid-composer-architecture.excalidraw | 0 .../platformatid-db-architecture.excalidraw | 0 ...atformatid-runtime-architecture.excalidraw | 0 ...ormatid-stackables-architecture.excalidraw | 0 .../getting-started/quick-start-guide.md | 0 .../getting-started/quick-start-watt.md | 0 .../getting-started/setup-watt.md | 0 .../extend-graphql.md | 0 .../add-custom-functionality/extend-rest.md | 0 .../add-custom-functionality/overview.md | 0 .../add-custom-functionality/prerequisites.md | 0 .../add-custom-functionality/raw-sql.md | 0 .../architecture-diagram.excalidraw | 0 .../architecture-diagram.png | Bin .../create-a-static-app-workspace-01.png | Bin .../create-a-static-app-workspace-02.png | Bin .../create-an-app-on-platformati-cloud-01.png | Bin ...omposed-media-service-api-read-only-01.png | Bin .../start-the-runtime-app-01.png | Bin .../test-the-books-service-api-01.png | Bin ...test-the-composed-media-service-api-01.png | Bin .../test-the-movies-service-api-01.png | Bin .../test-the-people-service-01.png | Bin .../guides/build-modular-monolith.md | 0 .../guides/cache-with-platformatic-watt.md | 0 .../compiling-typescript-for-deployment.md | 0 .../guides/debug-platformatic-db.md | 0 .../deployment/advanced-fly-io-deployment.md | 0 .../deploy-to-fly-io-with-sqlite.md | 0 .../guides/deployment/deploying-on-lambda.md | 0 .../guides/deployment/dockerize-a-watt-app.md | 0 .../guides/deployment/overview.md | 0 .../guides/environment-variables.md | 0 ...d-code-to-consume-platformatic-rest-api.md | 0 .../guides/http-cache.md | 0 .../guides/images/cache-others.png | Bin .../guides/images/composer.png | Bin .../guides/images/image.png | Bin .../guides/images/kibana-1.png | Bin .../guides/images/kibana-2.png | Bin .../guides/images/kibana-3.png | Bin .../guides/images/kibana-4.png | Bin .../guides/images/movie-app.png | Bin .../guides/jwt-auth0.md | 0 .../guides/jwt-keycloak.md | 0 .../assign_service_account_roles.png | Bin .../keycloak-images/client_credentials.png | Bin .../guides/keycloak-images/create_client.png | Bin .../keycloak-images/create_client_2.png | Bin .../keycloak-images/create_client_3.png | Bin .../keycloak-images/create_client_4.png | Bin .../keycloak-images/create_platformatic.png | Bin .../guides/keycloak-images/create_realm.png | Bin .../guides/keycloak-images/create_realm_2.png | Bin .../keycloak-images/create_realm_role.png | Bin .../guides/keycloak-images/plt_auth.png | Bin .../guides/keycloak-images/plt_start.png | Bin .../guides/keycloak-images/plt_unauth.png | Bin .../guides/logging-to-elasticsearch.md | 0 ...ing-express-app-to-platformatic-service.md | 0 ...ing-fastify-app-to-platformatic-service.md | 0 .../guides/monitoring.md | 0 .../guides/movie-quotes-app-tutorial.md | 0 .../guides/prisma.md | 0 .../guides/runtime-cli-managing.md | 0 .../guides/securing-platformatic-db.md | 0 .../guides/seed-a-database.md | 0 .../telemetry-images/compose-openapi.png | Bin .../guides/telemetry-images/jaeger-1.png | Bin .../guides/telemetry-images/jaeger-2.png | Bin .../guides/telemetry-images/jaeger-3.png | Bin .../guides/telemetry.md | 0 .../guides/use-env-with-platformatic.md | 0 .../guides/use-watt-multiple-repository.md | 200 +++++++++++++++++ .../guides/using-watt-with-node-config.md | 209 ++++++++++++++++++ .../images/ENV_Var_Platforamtic.png | Bin ...formatic_Composer_Diagram_(Light_Mode).png | Bin .../Platformatic_DB_Diagram_(Light_Mode).png | Bin ...tformatic_Runtime_Diagram_(Light_Mode).png | Bin ...tformatic_Service_Diagram_(Light_Mode).png | Bin ...rmatic_Stackables_Diagram_(Light_Mode).png | Bin ...tformatic_Composer_Diagram_(Dark_Mode).png | Bin .../Platformatic_DB_Diagram_(Dark_Mode).png | Bin ...atformatic_Runtime_Diagram_(Dark_Mode).png | Bin ...atformatic_Service_Diagram_(Dark_Mode).png | Bin ...ormatic_Stackables_Diagram_(Dark_Mode).png | Bin .../learn/beginner/crud-application.md | 0 .../learn/glossary.md | 0 .../learn/images/plt-endpoints.png | Bin .../learn/images/plt-localhost.png | Bin .../learn/images/test-endpoint.png | Bin .../learn/overview.md | 0 .../packages/astro/caching.md | 0 .../packages/astro/configuration.md | 2 +- .../packages/astro/overview.md | 17 ++ .../packages/errors.md | 0 .../packages/next/configuration.md | 0 .../packages/next/overview.md | 0 .../packages/node/configuration.md | 0 .../packages/node/overview.md | 28 ++- .../packages/remix/caching.md | 0 .../packages/remix/configuration.md | 0 .../packages/remix/overview.md | 15 ++ .../packages/sql-events/fastify-plugin.md | 0 .../packages/sql-events/overview.md | 0 .../sql-graphql/examples/deleteEntity.js | 0 .../sql-graphql/examples/insertEntity.js | 0 .../packages/sql-graphql/examples/query.js | 0 .../sql-graphql/examples/saveEntity.js | 0 .../packages/sql-graphql/ignore.md | 0 .../packages/sql-graphql/many-to-many.md | 0 .../packages/sql-graphql/mutations.md | 0 .../packages/sql-graphql/overview.md | 0 .../packages/sql-graphql/queries.md | 0 .../packages/sql-graphql/subscriptions.md | 0 .../packages/sql-mapper/entities/api.md | 0 .../packages/sql-mapper/entities/example.md | 0 .../packages/sql-mapper/entities/fields.md | 0 .../packages/sql-mapper/entities/hooks.md | 0 .../packages/sql-mapper/entities/overview.md | 0 .../packages/sql-mapper/entities/relations.md | 0 .../sql-mapper/entities/timestamps.md | 0 .../sql-mapper/entities/transactions.md | 0 .../packages/sql-mapper/examples/count.js | 0 .../packages/sql-mapper/examples/delete.js | 0 .../sql-mapper/examples/fastify-plugin.js | 0 .../packages/sql-mapper/examples/fields.js | 0 .../packages/sql-mapper/examples/find.js | 0 .../packages/sql-mapper/examples/hooks.js | 0 .../packages/sql-mapper/examples/insert.js | 0 .../packages/sql-mapper/examples/relations.js | 0 .../packages/sql-mapper/examples/save.js | 0 .../packages/sql-mapper/fastify-plugin.md | 0 .../sql-mapper/images/plt-db-hooks.svg | 0 .../packages/sql-mapper/overview.md | 0 .../packages/sql-openapi/api.md | 0 .../packages/sql-openapi/explicit-include.md | 0 .../packages/sql-openapi/ignore.md | 0 .../packages/sql-openapi/overview.md | 0 .../packages/vite/configuration.md | 0 .../packages/vite/overview.md | 16 ++ .../runtime/_shared-configuration.md | 38 ++++ .../runtime/configuration.md | 0 .../runtime/overview.md | 0 .../runtime/programmatic.md | 0 .../service/configuration.md | 0 .../service/overview.md | 0 .../service/plugin.md | 0 .../service/programmatic.md | 0 .../watt/configuration.md | 0 .../watt/overview.md | 0 .../watt/reference.md | 0 ...bars.json => version-2.39.0-sidebars.json} | 4 +- versions.json | 2 +- 205 files changed, 1043 insertions(+), 19 deletions(-) create mode 100644 docs/guides/use-watt-multiple-repository.md create mode 100644 docs/guides/using-watt-with-node-config.md rename versioned_docs/{version-2.35.0 => version-2.39.0}/FAQs.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/Overview.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/cli.md (99%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/client/frontend.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/client/overview.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/client/programmatic.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/composer/api-modification.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/composer/configuration.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/composer/overview.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/composer/plugin.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/composer/programmatic.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/contributing/contributing.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/contributing/documentation-style-guide.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/db/authorization/images/http.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/db/authorization/images/jwt.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/db/authorization/images/sources/http.excalidraw (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/db/authorization/images/sources/jwt.excalidraw (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/db/authorization/images/sources/webhook.excalidraw (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/db/authorization/images/webhook.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/db/authorization/overview.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/db/authorization/rules.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/db/authorization/strategies.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/db/authorization/user-roles-metadata.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/db/configuration.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/db/logging.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/db/migrations.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/db/overview.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/db/plugin.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/db/programmatic.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/db/schema-support.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/file-formats.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/getting-started/images/inspector.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/getting-started/images/movie_quote_app.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/getting-started/images/vs-code-debug.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/getting-started/issues.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/getting-started/new-api-project-instructions.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/getting-started/platformatic-architecture.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/getting-started/platformatic-composer-architecture.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/getting-started/platformatic-db-architecture.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/getting-started/platformatic-runtime-architecture.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/getting-started/platformatic-stackables-architecture.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/getting-started/platformatid-composer-architecture.excalidraw (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/getting-started/platformatid-db-architecture.excalidraw (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/getting-started/platformatid-runtime-architecture.excalidraw (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/getting-started/platformatid-stackables-architecture.excalidraw (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/getting-started/quick-start-guide.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/getting-started/quick-start-watt.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/getting-started/setup-watt.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/add-custom-functionality/extend-graphql.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/add-custom-functionality/extend-rest.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/add-custom-functionality/overview.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/add-custom-functionality/prerequisites.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/add-custom-functionality/raw-sql.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/build-modular-monolith-images/architecture-diagram.excalidraw (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/build-modular-monolith-images/architecture-diagram.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/build-modular-monolith-images/create-a-static-app-workspace-01.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/build-modular-monolith-images/create-a-static-app-workspace-02.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/build-modular-monolith-images/create-an-app-on-platformati-cloud-01.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/build-modular-monolith-images/make-the-composed-media-service-api-read-only-01.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/build-modular-monolith-images/start-the-runtime-app-01.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/build-modular-monolith-images/test-the-books-service-api-01.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/build-modular-monolith-images/test-the-composed-media-service-api-01.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/build-modular-monolith-images/test-the-movies-service-api-01.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/build-modular-monolith-images/test-the-people-service-01.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/build-modular-monolith.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/cache-with-platformatic-watt.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/compiling-typescript-for-deployment.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/debug-platformatic-db.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/deployment/advanced-fly-io-deployment.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/deployment/deploy-to-fly-io-with-sqlite.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/deployment/deploying-on-lambda.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/deployment/dockerize-a-watt-app.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/deployment/overview.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/environment-variables.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/generate-frontend-code-to-consume-platformatic-rest-api.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/http-cache.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/images/cache-others.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/images/composer.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/images/image.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/images/kibana-1.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/images/kibana-2.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/images/kibana-3.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/images/kibana-4.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/images/movie-app.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/jwt-auth0.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/jwt-keycloak.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/keycloak-images/assign_service_account_roles.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/keycloak-images/client_credentials.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/keycloak-images/create_client.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/keycloak-images/create_client_2.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/keycloak-images/create_client_3.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/keycloak-images/create_client_4.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/keycloak-images/create_platformatic.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/keycloak-images/create_realm.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/keycloak-images/create_realm_2.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/keycloak-images/create_realm_role.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/keycloak-images/plt_auth.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/keycloak-images/plt_start.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/keycloak-images/plt_unauth.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/logging-to-elasticsearch.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/migrating-express-app-to-platformatic-service.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/migrating-fastify-app-to-platformatic-service.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/monitoring.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/movie-quotes-app-tutorial.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/prisma.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/runtime-cli-managing.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/securing-platformatic-db.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/seed-a-database.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/telemetry-images/compose-openapi.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/telemetry-images/jaeger-1.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/telemetry-images/jaeger-2.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/telemetry-images/jaeger-3.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/telemetry.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/guides/use-env-with-platformatic.md (100%) create mode 100644 versioned_docs/version-2.39.0/guides/use-watt-multiple-repository.md create mode 100644 versioned_docs/version-2.39.0/guides/using-watt-with-node-config.md rename versioned_docs/{version-2.35.0 => version-2.39.0}/images/ENV_Var_Platforamtic.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/images/Platformatic_Composer_Diagram_(Light_Mode).png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/images/Platformatic_DB_Diagram_(Light_Mode).png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/images/Platformatic_Runtime_Diagram_(Light_Mode).png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/images/Platformatic_Service_Diagram_(Light_Mode).png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/images/Platformatic_Stackables_Diagram_(Light_Mode).png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/images/img-dark/Platformatic_Composer_Diagram_(Dark_Mode).png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/images/img-dark/Platformatic_DB_Diagram_(Dark_Mode).png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/images/img-dark/Platformatic_Runtime_Diagram_(Dark_Mode).png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/images/img-dark/Platformatic_Service_Diagram_(Dark_Mode).png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/images/img-dark/Platformatic_Stackables_Diagram_(Dark_Mode).png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/learn/beginner/crud-application.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/learn/glossary.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/learn/images/plt-endpoints.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/learn/images/plt-localhost.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/learn/images/test-endpoint.png (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/learn/overview.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/astro/caching.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/astro/configuration.md (91%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/astro/overview.md (86%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/errors.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/next/configuration.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/next/overview.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/node/configuration.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/node/overview.md (78%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/remix/caching.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/remix/configuration.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/remix/overview.md (87%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/sql-events/fastify-plugin.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/sql-events/overview.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/sql-graphql/examples/deleteEntity.js (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/sql-graphql/examples/insertEntity.js (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/sql-graphql/examples/query.js (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/sql-graphql/examples/saveEntity.js (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/sql-graphql/ignore.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/sql-graphql/many-to-many.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/sql-graphql/mutations.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/sql-graphql/overview.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/sql-graphql/queries.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/sql-graphql/subscriptions.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/sql-mapper/entities/api.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/sql-mapper/entities/example.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/sql-mapper/entities/fields.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/sql-mapper/entities/hooks.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/sql-mapper/entities/overview.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/sql-mapper/entities/relations.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/sql-mapper/entities/timestamps.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/sql-mapper/entities/transactions.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/sql-mapper/examples/count.js (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/sql-mapper/examples/delete.js (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/sql-mapper/examples/fastify-plugin.js (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/sql-mapper/examples/fields.js (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/sql-mapper/examples/find.js (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/sql-mapper/examples/hooks.js (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/sql-mapper/examples/insert.js (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/sql-mapper/examples/relations.js (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/sql-mapper/examples/save.js (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/sql-mapper/fastify-plugin.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/sql-mapper/images/plt-db-hooks.svg (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/sql-mapper/overview.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/sql-openapi/api.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/sql-openapi/explicit-include.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/sql-openapi/ignore.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/sql-openapi/overview.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/vite/configuration.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/packages/vite/overview.md (86%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/runtime/_shared-configuration.md (93%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/runtime/configuration.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/runtime/overview.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/runtime/programmatic.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/service/configuration.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/service/overview.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/service/plugin.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/service/programmatic.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/watt/configuration.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/watt/overview.md (100%) rename versioned_docs/{version-2.35.0 => version-2.39.0}/watt/reference.md (100%) rename versioned_sidebars/{version-2.35.0-sidebars.json => version-2.39.0-sidebars.json} (98%) diff --git a/docs/cli.md b/docs/cli.md index 9ce49f17ae..970e408a66 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -400,6 +400,7 @@ Options: * `--types-only` - Generate only the type file. * `--types-comment` - Add a comment at the beginning of the auto generated `.d.ts` type definition. * `--with-credentials` - Adds "credentials: 'include'" to all fetch requests (only for frontend clients). +* `--skip-config-update` - If `true`, it will not update the `platformatic|watt` config found in your repo. ### composer diff --git a/docs/guides/use-watt-multiple-repository.md b/docs/guides/use-watt-multiple-repository.md new file mode 100644 index 0000000000..fe19f90576 --- /dev/null +++ b/docs/guides/use-watt-multiple-repository.md @@ -0,0 +1,200 @@ +# Using Watt for Multi-Repository Service + +This guide explains how to use [Watt](https://platformatic.dev/watt) to resolve and manage services from different `git` repositories, build and start your application. You'll learn how to set up, configure, and run a Watt application with multi-repository service resolution. + +## Prerequisites + +Before beginning, ensure you have installed: + +- [Node.js](https://nodejs.org/en) (v20.16.0+ or v22.3.0+) +- [npm](https://www.npmjs.com/package/npm) (v10 or higher) +- A code editor (e.g., [Visual Studio Code](https://code.visualstudio.com)) + +## Project Setup + +### Creating Your Watt Application + +To create a new Watt application, please refer to our [Watt setup guide](https://www.notion.so/Using-Watt-for-Multi-Repository-Service-Resolution-17b60f428d7e800cbcc3efd396732732?pvs=21). + +### Adding Service Resolution + +By default, the `wattpm resolve` command isn't included in your Watt application's package.json. You have two options to use it: + +1. Run directly via CLI: + +```sh +npx wattpm resolve {repository name and directory path} +``` + +2. Add it to your `package.json`: + +```json +{ + "name": "with-resolve", + "private": true, + "scripts": { + "dev": "wattpm dev", + "resolve": "wattpm resolve", + "build": "wattpm build", + "start": "wattpm start" + }, + "dependencies": { + "@platformatic/runtime": "2.21.0", + "@platformatic/next": "2.21.0", + "@platformatic/node": "2.21.0", + "wattpm": "2.21.0" + }, + "devDependencies": { + "platformatic": "2.21.0" + }, + "workspaces": [ + "web/*", + "external/*" + ] +} +``` + +## Multi-Repository Structure Setup + +### Repository Organization +When working with multiple repositories in Watt, you'll typically have: +1. A main application repository containing your Watt configuration +2. One or more service repositories containing individual services + +### Setting Up the Main Repository + +1. Create your main application repository: + +```sh +mkdir my-watt-app +cd my-watt-app +git init +``` + +2. Initialize your Watt application: + +```sh +npx wattpm@latest init +``` + + +3. Create the directory structure for external services: + +```sh +mkdir -p web/ +mkdir -p external/ +``` +### Adding Service Repositories + +1. Update your root `watt.json` file to define your service repositories: + +```sh + "web": [ + { + "id": "composer", + "path": "web/composer" + }, + { + "id": "app", + "path": "web/app" + }, + { + "id": "node", + "path": "{PLT_NODE_PATH}", + "url": "YOUR_SERVICE_GITHUB_URL" + }, + { + "id": "next", + "path": "{PLT_NEXT_PATH}", + "url": "YOUR_SERVICE_GITHUB_URL" + } + ], +``` + +### Version Control Configuration + +1. Update your main repository's `.gitignore`: + +```sh +# Ignore resolved services +web/* +external/* +!web/.gitkeep +!external/.gitkeep + +# Node modules +node_modules/ + +# Environment variables +.env +``` + +2. Update your `package.json` + +In your root `package.json` file and update your workspace to include service workspaces: + +```sh +{ + "workspaces": [ + "web/services/*", + "external/services/*" + ] +} +``` + +## Working with Services + +### Resolving Services + +To resolve services located in the web folder of your Watt application, run the below command: + +```sh +npm run resolve +``` + +This command fetches and unifies all required services. + +### Building the Application + +```sh +npm run build +``` + +This command builds the application with all resolved services. + +### Starting the Application + +Run the command below to start your application in development mode: + +```sh +npm run dev +``` + +To run your application in production mode, run the command below: + +```sh +npm start +``` + +## Local Development Configuration + +Watt provides flexible options for service resolution during local development. You can configure services to resolve from local directories instead of Git repositories. + +### Environment Variables + +Configure local development using these environment variables: + +- `PLT_NODE_PATH`: Specifies local Node.js service directories +- `PLT_NEXT_PATH`: Specifies local Next.js service directories + +Example configuration: + +```sh +export PLT_NODE_PATH=/path/to/local/service +export PLT_NEXT_PATH=/path/to/local/nextjs/service +``` + +## Additional Resources + +- [wattpm-resolve sample application](https://github.com/platformatic/wattpm-resolve) +- [Watt Setup Guide](https://docs.platformatic.dev/docs/getting-started/quick-start-watt) \ No newline at end of file diff --git a/docs/guides/using-watt-with-node-config.md b/docs/guides/using-watt-with-node-config.md new file mode 100644 index 0000000000..cc343a1f49 --- /dev/null +++ b/docs/guides/using-watt-with-node-config.md @@ -0,0 +1,209 @@ +# Using Watt With Node Config + +[Node-config](https://www.npmjs.com/package/config) is a popular configuration management package that helps organize settings across different deployment environments in your application. It creates a unified configuration system that works seamlessly with both [Watt](https://platformatic.dev/docs/watt/overview) and other `npm` modules. +When building a Watt application with multiple services, each service can maintain its own independent configuration using `node-config`. This allows different services to use different environment configurations as needed. + + + +## Installation and Setup + +First, install `node-config` in the root of your Watt application: + +```sh +npm install config +``` + +Create a `config` directory in your `service` folder and set up your default configuration for each service: + +```sh +mkdir config +touch config/default.json +``` + +In `{service}/config/default.json`, add your base configuration: + +```sh +{ + "foo": "bar" +} +``` + +## Environment-specific configuration + +For development-specific settings, create a separate configuration file: + +```sh +touch config/dev.json +``` + +In `{service}/config/dev.json`, override any default values: + +```sh +{ + "foo": "baz" +} +``` + +## Configuration structure + +Instead of using simple key-value pairs, consider organizing your configurations more systematically, below is an example: + +```sh +{ + "server": { + "port": 3000, + "host": "localhost" + }, + "api": { + "endpoint": "http://api.example.com", + "timeout": 5000 + }, + "database": { + "url": "mongodb://localhost:27017", + "name": "myapp" + } +} +``` + +:::important +It's important to note that for a secure configuration, use your environment variables for your application secrets and validate your configuration values when you run your application. +::: + +## Service-Specific Configuration + +You can configure each [service](https://platformatic.dev/docs/service/overview) environment variables in your Watt configuration file: + +```json +{ + "services": [ + { + "id": "service-a", + "path": "./services/service-a", + "env": { + "NODE_CONFIG_DIR": "./services/service-a/config", + "NODE_ENV": "development" + } + }, + { + "id": "service-b", + "path": "./services/service-b", + "env": { + "NODE_CONFIG_DIR": "./services/service-b/config", + "NODE_ENV": "production" + } + } + ] +} +``` + +Platformatic allows you to use `.env` files for managing environment variables, and you can remap one variable to another using its interpolation feature. For example, to remap `SERVICE_A_NODE_ENV` to `NODE_ENV`, create a `.env` file in the `service-a` directory: + +1. Set your service-specific environment variable: + +```sh +SERVICE_A_NODE_ENV=development +``` + +2. Use interpolation syntax `${VARIABLE_NAME}` in your Watt configuration to reference it: + +```json +{ + "services": [ + { + "id": "service-a", + "path": "./services/service-a", + "env": { + "NODE_CONFIG_DIR": "./services/service-a/config", + "NODE_ENV": `${YOUR_SERVICE_NODE_ENV}` + } + } + ] +} +``` + +You can alsp use this pattern with `env` file: + +```env +SERVICE_A_NODE_ENV=development +``` + +You can also specify environment files per Platformatic service: + +``` +{ + "services": [ + { + "id": "service-a", + "path": "./services/service-a", + "envfile": "./services/service-a/.env" + } + ] +} +``` + +## Using Configuration Values in Watt Application + +Here's how to access your configuration values in a Watt application: + +```sh +import { createServer } from 'http'; +import config from 'config'; + +// Access configuration values using config.get() +const configValue = config.get('foo'); + +const server = createServer((req, res) => { + res.writeHead(200, { 'Content-Type': 'text/plain' }); +// Use configuration values in your application logic + res.end(config.get('foo')); +}); + +server.listen(3000); +``` + +## Running Your Watt Application + +When you start your application, `node-config` automatically loads the appropriate configuration based on your `NODE_ENV` environment variable. The values from `default.json` are merged with any environment-specific configurations. + +For production mode: + +```sh +npm start +``` + +For development mode: + +```sh +NODE_ENV=development npm start +``` + +## **Advanced Usage Tips** +`node-config` follows this loading order: + +1. `default.json` (base configuration) +2. `{environment}.json` (environment-specific settings) +3. `local.json` (local overrides, should be git-ignored) +4. Environment variables +5. Command line arguments + +### **Error Handling** + +Always handle configuration access safely: + +```sh +try { + const value = config.get('foo'); +} catch (error) { + console.error('Missing required configuration:', error.message); + process.exit(1); +} +``` + +### **Configuration Validation** + +We recommend using schema validation libraries like [TypeBox](https://github.com/sinclairzx81/typebox), [Ajv](https://ajv.js.org/), or [Zod](https://zod.dev/) to validate Watt node configurations, ensuring both runtime validation and type safety for your configuration parameters. + +## Additional Resources + +- For more details on setting up a Watt application, see our [Watt setup guide](https://docs.platformatic.dev/docs/getting-started/quick-start-watt) +- Learn more about configuration patterns in the [node-config documentation](https://www.npmjs.com/package/config) \ No newline at end of file diff --git a/docs/packages/astro/configuration.md b/docs/packages/astro/configuration.md index eacd4c78d6..c3994459d3 100644 --- a/docs/packages/astro/configuration.md +++ b/docs/packages/astro/configuration.md @@ -16,7 +16,7 @@ Supported object properties: - **`install`**: The command to execute to install the service dependencies. The default is `npm ci --omit-dev`. - **`build`**: The command to execute to build the application. - **`development`**: The command to execute to start the application in development mode. - - **`production`**: The command to execute to start the application in production mode. + - **`production`**: The command to execute to start the application in production mode. This currently does not work due to due to [`CVE-2025-24010`](https://github.com/vitejs/vite/security/advisories/GHSA-vg6x-rcgg-rjx6). ## `logger` diff --git a/docs/packages/astro/overview.md b/docs/packages/astro/overview.md index 325eb11d88..1feaea9905 100644 --- a/docs/packages/astro/overview.md +++ b/docs/packages/astro/overview.md @@ -34,6 +34,23 @@ When running in production mode, a custom Fastify server will serve the static o In both modes if the service uses the `commands` property then it's responsible to start a HTTP server. The Platformatic runtime will modify the server port replacing it with a random port and then it will integrate the external service in the runtime. +### Using custom commands + +Due to [`CVE-2025-24010`](https://github.com/vitejs/vite/security/advisories/GHSA-vg6x-rcgg-rjx6), you need to set: + +```js +{ + ... + "vite": { + "server": { + "allowedHosts": [".plt.local"] + } + } +} +``` + +This will allow other services inside the platformatic mesh network to contact your Vite server. + ## Configuration See the [configuration](./configuration.md) page. diff --git a/docs/packages/node/overview.md b/docs/packages/node/overview.md index 82faa4309d..85c6eafe3f 100644 --- a/docs/packages/node/overview.md +++ b/docs/packages/node/overview.md @@ -162,12 +162,26 @@ See the [configuration](./configuration.md) page. ## API -- **`platformatic.setBasePath(path)`**: This function can be use to override the base path for the service. If not properly configure in the composer, this can make your application unaccessible. -- **`platformatic.serviceId`**: The id of the service. -- **`platformatic.workerId`**: The id of the service worker. -- **`platformatic.root`**: The root directory of the service. -- **`platformatic.basePath`**: The base path of the service in the composer. -- **`platformatic.logLevel`**: The log level configured for the service. -- **`platformatic.events.on('close')`**: This event is emitted when the process is being closed. A listener should be installed to perform a graceful close, which must finish in 10 seconds. If there is no listener, the process will be terminated by invoking `process.exit(0)`. +During service execution some APIs are made available in the `globalThis.platformatic` object. + +- **`globalThis.platformatic.setBasePath(path)`**: This function can be use to override the base path for the service. If not properly configure in the composer, this can make your application unaccessible. +- **`globalThis.platformatic.serviceId`**: The id of the service. +- **`globalThis.platformatic.workerId`**: The id of the service worker. +- **`globalThis.platformatic.root`**: The root directory of the service. +- **`globalThis.platformatic.basePath`**: The base path of the service in the composer. +- **`globalThis.platformatic.logLevel`**: The log level configured for the service. +- **`globalThis.platformatic.events.on('close')`**: This event is emitted when the process is being closed. A listener should be installed to perform a graceful close, which must finish in 10 seconds. If there is no listener, the process will be terminated by invoking `process.exit(0)`. + +### Typings for the API + +In order to get full Typescript support for the API above, you can install the `@platformatic/globals` package and get an alternative, typed, access to the `globalThis.platformatic` object. + +The usage of the package is straight-forward: + +```js +import { getGlobal } from '@platformatic/globals` + +const pltApi = getGlobal() +``` diff --git a/docs/packages/remix/overview.md b/docs/packages/remix/overview.md index c1d2fc5027..abd431143d 100644 --- a/docs/packages/remix/overview.md +++ b/docs/packages/remix/overview.md @@ -34,6 +34,21 @@ When running in production mode, a custom Express server instrumented with [@rem In both modes if the service uses the `commands` property then it's responsible to start a HTTP server. The Platformatic runtime will modify the server port replacing it with a random port and then it will integrate the external service in the runtime. +### Using custom commands + +Due to [`CVE-2025-24010`](https://github.com/vitejs/vite/security/advisories/GHSA-vg6x-rcgg-rjx6), you need to set: + +```js +{ + ... + "server": { + "allowedHosts": [".plt.local"] + } +} +``` + +This will allow other services inside the platformatic mesh network to contact your Vite server. + ## Configuration See the [configuration](./configuration.md) page. diff --git a/docs/packages/vite/overview.md b/docs/packages/vite/overview.md index dbea802fc5..ef87e2e25a 100644 --- a/docs/packages/vite/overview.md +++ b/docs/packages/vite/overview.md @@ -26,6 +26,7 @@ You are all set, you can now start your runtime as usual via `wattpm dev` or `pl } ``` + ## Architecture When running in development mode, the Vite development server is run a in worker thread in the same process of the Platformatic runtime. The server port is chosen randomly and it will override any user setting. @@ -36,6 +37,21 @@ In both modes if the service uses the `commands` property then it's responsible If the application is a SSR application, it is only supported if using [`@fastify/vite`](https://fastify-vite.dev/). +### Using custom commands and @fastify/vite + +Due to [`CVE-2025-24010`](https://github.com/vitejs/vite/security/advisories/GHSA-vg6x-rcgg-rjx6), you need to set: + +```js +{ + ... + "server": { + "allowedHosts": [".plt.local"] + } +} +``` + +This will allow other services inside the platformatic mesh network to contact your Vite server. + ## Configuration See the [configuration](./configuration.md) page. diff --git a/docs/runtime/_shared-configuration.md b/docs/runtime/_shared-configuration.md index 94e1917013..05d5c509e4 100644 --- a/docs/runtime/_shared-configuration.md +++ b/docs/runtime/_shared-configuration.md @@ -40,6 +40,7 @@ The `autoload` configuration is intended to be used with monorepo applications. - **`workers`** (`number`) - The number of workers to start for this service. If the service is the entrypoint or if the runtime is running in development mode this value is ignored and hardcoded to `1`. - **`health`** (object): Configures the health check for each worker of the service. It supports all the properties also supported in the runtime [health](#health) property. The values specified here overrides the values specified in the runtime. - **`preload`** (`string` or `array` of `string`s): A file or a list of files to load before the service code. + - **`arguments`** (`array` of `string`s) - The arguments to pass to the service. They will be available in `process.argv`. - **`nodeOptions`** (`string`): The `NODE_OPTIONS` to apply to the service. These options are appended to any existing option. ### `preload` @@ -70,6 +71,7 @@ runtime. Each service object supports the following settings: on `127.0.0.1`, and exposed to the other services via that port, on default it is set to `false`. Set it to `true` if you are using [@fastify/express](https://github.com/fastify/fastify-express). - **`workers`** (`number`) - The number of workers to start for this service. If the service is the entrypoint or if the runtime is running in development mode this value is ignored and hardcoded to `1`. - **`health`** (object): Configures the health check for each worker of the service. It supports all the properties also supported in the runtime [health](#health) property. The values specified here overrides the values specified in the runtime. +- **`arguments`** (`array` of `string`s) - The arguments to pass to the service. They will be available in `process.argv`. - **`envfile`** (`string`) - The path to an `.env` file to load for the service. - **`env`** (`object`) - An object containing environment variables to set for the service. Values set here takes precedence over values set in the `envfile`. - **`sourceMaps`** (`boolean`) - If `true`, source maps are enabled for the service. Default: `false`. @@ -81,6 +83,39 @@ If this property is present, then the services will not be reordered according t `getBootstrapDependencies` function and they will be started in the order they are defined in the configuration file. +- **`telemetry`** (`object`): containing an `instrumentations` array to optionally configure additional open telemetry + intrumentations per service, e.g.: + +```json +"services": [ + { + "id": "api", + "path": "./services/api", + "telemetry": { + "instrumentations": ["@opentelemetry/instrumentation-express"] + } + } + ] +``` + +It's possible to specify the name of the export of the instrumentation and/or the options: + +```json +"services": [ + { + "id": "api", + "path": "./services/api", + "telemetry": { + "instrumentations": [{ + "package": "@opentelemetry/instrumentation-express", + "exportName": "ExpressInstrumentation", + "options": {} + }] + } + } + ] +``` + ### `web` An alias for `services`. If both are present, their content will be merged. @@ -207,6 +242,9 @@ It can be a boolean or an object with the following settings: - **`store`** (`string`) - The store to use for the cache. Set an npm package name to use a custom store or path to a file to use a custom store from a file. By default, the `memory` store is used. - **`methods`** (`array`) - The HTTP methods to cache. By default, GET and HEAD methods are cached. - **`cacheTagsHeader`** (`string`) - The header to use for cache tags. +- **`maxCount`** (`integer`) - The maximum number of entries in the cache. +- **`maxSize`** (`integer`) - The maximum size of the cache in bytes. +- **`maxEntrySize`** (`integer`) - The maximum size of a single entry in the cache in bytes. ### `server` diff --git a/sidebars.json b/sidebars.json index 9c3b606aa0..603087950f 100644 --- a/sidebars.json +++ b/sidebars.json @@ -246,7 +246,9 @@ "guides/build-modular-monolith", "guides/logging-to-elasticsearch", "guides/jwt-keycloak", - "guides/use-env-with-platformatic" + "guides/use-env-with-platformatic", + "guides/using-watt-with-node-config", + "guides/use-watt-multiple-repository" ] }, "learn/glossary", diff --git a/versioned_docs/version-2.35.0/FAQs.md b/versioned_docs/version-2.39.0/FAQs.md similarity index 100% rename from versioned_docs/version-2.35.0/FAQs.md rename to versioned_docs/version-2.39.0/FAQs.md diff --git a/versioned_docs/version-2.35.0/Overview.md b/versioned_docs/version-2.39.0/Overview.md similarity index 100% rename from versioned_docs/version-2.35.0/Overview.md rename to versioned_docs/version-2.39.0/Overview.md diff --git a/versioned_docs/version-2.35.0/cli.md b/versioned_docs/version-2.39.0/cli.md similarity index 99% rename from versioned_docs/version-2.35.0/cli.md rename to versioned_docs/version-2.39.0/cli.md index 9ce49f17ae..970e408a66 100644 --- a/versioned_docs/version-2.35.0/cli.md +++ b/versioned_docs/version-2.39.0/cli.md @@ -400,6 +400,7 @@ Options: * `--types-only` - Generate only the type file. * `--types-comment` - Add a comment at the beginning of the auto generated `.d.ts` type definition. * `--with-credentials` - Adds "credentials: 'include'" to all fetch requests (only for frontend clients). +* `--skip-config-update` - If `true`, it will not update the `platformatic|watt` config found in your repo. ### composer diff --git a/versioned_docs/version-2.35.0/client/frontend.md b/versioned_docs/version-2.39.0/client/frontend.md similarity index 100% rename from versioned_docs/version-2.35.0/client/frontend.md rename to versioned_docs/version-2.39.0/client/frontend.md diff --git a/versioned_docs/version-2.35.0/client/overview.md b/versioned_docs/version-2.39.0/client/overview.md similarity index 100% rename from versioned_docs/version-2.35.0/client/overview.md rename to versioned_docs/version-2.39.0/client/overview.md diff --git a/versioned_docs/version-2.35.0/client/programmatic.md b/versioned_docs/version-2.39.0/client/programmatic.md similarity index 100% rename from versioned_docs/version-2.35.0/client/programmatic.md rename to versioned_docs/version-2.39.0/client/programmatic.md diff --git a/versioned_docs/version-2.35.0/composer/api-modification.md b/versioned_docs/version-2.39.0/composer/api-modification.md similarity index 100% rename from versioned_docs/version-2.35.0/composer/api-modification.md rename to versioned_docs/version-2.39.0/composer/api-modification.md diff --git a/versioned_docs/version-2.35.0/composer/configuration.md b/versioned_docs/version-2.39.0/composer/configuration.md similarity index 100% rename from versioned_docs/version-2.35.0/composer/configuration.md rename to versioned_docs/version-2.39.0/composer/configuration.md diff --git a/versioned_docs/version-2.35.0/composer/overview.md b/versioned_docs/version-2.39.0/composer/overview.md similarity index 100% rename from versioned_docs/version-2.35.0/composer/overview.md rename to versioned_docs/version-2.39.0/composer/overview.md diff --git a/versioned_docs/version-2.35.0/composer/plugin.md b/versioned_docs/version-2.39.0/composer/plugin.md similarity index 100% rename from versioned_docs/version-2.35.0/composer/plugin.md rename to versioned_docs/version-2.39.0/composer/plugin.md diff --git a/versioned_docs/version-2.35.0/composer/programmatic.md b/versioned_docs/version-2.39.0/composer/programmatic.md similarity index 100% rename from versioned_docs/version-2.35.0/composer/programmatic.md rename to versioned_docs/version-2.39.0/composer/programmatic.md diff --git a/versioned_docs/version-2.35.0/contributing/contributing.md b/versioned_docs/version-2.39.0/contributing/contributing.md similarity index 100% rename from versioned_docs/version-2.35.0/contributing/contributing.md rename to versioned_docs/version-2.39.0/contributing/contributing.md diff --git a/versioned_docs/version-2.35.0/contributing/documentation-style-guide.md b/versioned_docs/version-2.39.0/contributing/documentation-style-guide.md similarity index 100% rename from versioned_docs/version-2.35.0/contributing/documentation-style-guide.md rename to versioned_docs/version-2.39.0/contributing/documentation-style-guide.md diff --git a/versioned_docs/version-2.35.0/db/authorization/images/http.png b/versioned_docs/version-2.39.0/db/authorization/images/http.png similarity index 100% rename from versioned_docs/version-2.35.0/db/authorization/images/http.png rename to versioned_docs/version-2.39.0/db/authorization/images/http.png diff --git a/versioned_docs/version-2.35.0/db/authorization/images/jwt.png b/versioned_docs/version-2.39.0/db/authorization/images/jwt.png similarity index 100% rename from versioned_docs/version-2.35.0/db/authorization/images/jwt.png rename to versioned_docs/version-2.39.0/db/authorization/images/jwt.png diff --git a/versioned_docs/version-2.35.0/db/authorization/images/sources/http.excalidraw b/versioned_docs/version-2.39.0/db/authorization/images/sources/http.excalidraw similarity index 100% rename from versioned_docs/version-2.35.0/db/authorization/images/sources/http.excalidraw rename to versioned_docs/version-2.39.0/db/authorization/images/sources/http.excalidraw diff --git a/versioned_docs/version-2.35.0/db/authorization/images/sources/jwt.excalidraw b/versioned_docs/version-2.39.0/db/authorization/images/sources/jwt.excalidraw similarity index 100% rename from versioned_docs/version-2.35.0/db/authorization/images/sources/jwt.excalidraw rename to versioned_docs/version-2.39.0/db/authorization/images/sources/jwt.excalidraw diff --git a/versioned_docs/version-2.35.0/db/authorization/images/sources/webhook.excalidraw b/versioned_docs/version-2.39.0/db/authorization/images/sources/webhook.excalidraw similarity index 100% rename from versioned_docs/version-2.35.0/db/authorization/images/sources/webhook.excalidraw rename to versioned_docs/version-2.39.0/db/authorization/images/sources/webhook.excalidraw diff --git a/versioned_docs/version-2.35.0/db/authorization/images/webhook.png b/versioned_docs/version-2.39.0/db/authorization/images/webhook.png similarity index 100% rename from versioned_docs/version-2.35.0/db/authorization/images/webhook.png rename to versioned_docs/version-2.39.0/db/authorization/images/webhook.png diff --git a/versioned_docs/version-2.35.0/db/authorization/overview.md b/versioned_docs/version-2.39.0/db/authorization/overview.md similarity index 100% rename from versioned_docs/version-2.35.0/db/authorization/overview.md rename to versioned_docs/version-2.39.0/db/authorization/overview.md diff --git a/versioned_docs/version-2.35.0/db/authorization/rules.md b/versioned_docs/version-2.39.0/db/authorization/rules.md similarity index 100% rename from versioned_docs/version-2.35.0/db/authorization/rules.md rename to versioned_docs/version-2.39.0/db/authorization/rules.md diff --git a/versioned_docs/version-2.35.0/db/authorization/strategies.md b/versioned_docs/version-2.39.0/db/authorization/strategies.md similarity index 100% rename from versioned_docs/version-2.35.0/db/authorization/strategies.md rename to versioned_docs/version-2.39.0/db/authorization/strategies.md diff --git a/versioned_docs/version-2.35.0/db/authorization/user-roles-metadata.md b/versioned_docs/version-2.39.0/db/authorization/user-roles-metadata.md similarity index 100% rename from versioned_docs/version-2.35.0/db/authorization/user-roles-metadata.md rename to versioned_docs/version-2.39.0/db/authorization/user-roles-metadata.md diff --git a/versioned_docs/version-2.35.0/db/configuration.md b/versioned_docs/version-2.39.0/db/configuration.md similarity index 100% rename from versioned_docs/version-2.35.0/db/configuration.md rename to versioned_docs/version-2.39.0/db/configuration.md diff --git a/versioned_docs/version-2.35.0/db/logging.md b/versioned_docs/version-2.39.0/db/logging.md similarity index 100% rename from versioned_docs/version-2.35.0/db/logging.md rename to versioned_docs/version-2.39.0/db/logging.md diff --git a/versioned_docs/version-2.35.0/db/migrations.md b/versioned_docs/version-2.39.0/db/migrations.md similarity index 100% rename from versioned_docs/version-2.35.0/db/migrations.md rename to versioned_docs/version-2.39.0/db/migrations.md diff --git a/versioned_docs/version-2.35.0/db/overview.md b/versioned_docs/version-2.39.0/db/overview.md similarity index 100% rename from versioned_docs/version-2.35.0/db/overview.md rename to versioned_docs/version-2.39.0/db/overview.md diff --git a/versioned_docs/version-2.35.0/db/plugin.md b/versioned_docs/version-2.39.0/db/plugin.md similarity index 100% rename from versioned_docs/version-2.35.0/db/plugin.md rename to versioned_docs/version-2.39.0/db/plugin.md diff --git a/versioned_docs/version-2.35.0/db/programmatic.md b/versioned_docs/version-2.39.0/db/programmatic.md similarity index 100% rename from versioned_docs/version-2.35.0/db/programmatic.md rename to versioned_docs/version-2.39.0/db/programmatic.md diff --git a/versioned_docs/version-2.35.0/db/schema-support.md b/versioned_docs/version-2.39.0/db/schema-support.md similarity index 100% rename from versioned_docs/version-2.35.0/db/schema-support.md rename to versioned_docs/version-2.39.0/db/schema-support.md diff --git a/versioned_docs/version-2.35.0/file-formats.md b/versioned_docs/version-2.39.0/file-formats.md similarity index 100% rename from versioned_docs/version-2.35.0/file-formats.md rename to versioned_docs/version-2.39.0/file-formats.md diff --git a/versioned_docs/version-2.35.0/getting-started/images/inspector.png b/versioned_docs/version-2.39.0/getting-started/images/inspector.png similarity index 100% rename from versioned_docs/version-2.35.0/getting-started/images/inspector.png rename to versioned_docs/version-2.39.0/getting-started/images/inspector.png diff --git a/versioned_docs/version-2.35.0/getting-started/images/movie_quote_app.png b/versioned_docs/version-2.39.0/getting-started/images/movie_quote_app.png similarity index 100% rename from versioned_docs/version-2.35.0/getting-started/images/movie_quote_app.png rename to versioned_docs/version-2.39.0/getting-started/images/movie_quote_app.png diff --git a/versioned_docs/version-2.35.0/getting-started/images/vs-code-debug.png b/versioned_docs/version-2.39.0/getting-started/images/vs-code-debug.png similarity index 100% rename from versioned_docs/version-2.35.0/getting-started/images/vs-code-debug.png rename to versioned_docs/version-2.39.0/getting-started/images/vs-code-debug.png diff --git a/versioned_docs/version-2.35.0/getting-started/issues.md b/versioned_docs/version-2.39.0/getting-started/issues.md similarity index 100% rename from versioned_docs/version-2.35.0/getting-started/issues.md rename to versioned_docs/version-2.39.0/getting-started/issues.md diff --git a/versioned_docs/version-2.35.0/getting-started/new-api-project-instructions.md b/versioned_docs/version-2.39.0/getting-started/new-api-project-instructions.md similarity index 100% rename from versioned_docs/version-2.35.0/getting-started/new-api-project-instructions.md rename to versioned_docs/version-2.39.0/getting-started/new-api-project-instructions.md diff --git a/versioned_docs/version-2.35.0/getting-started/platformatic-architecture.png b/versioned_docs/version-2.39.0/getting-started/platformatic-architecture.png similarity index 100% rename from versioned_docs/version-2.35.0/getting-started/platformatic-architecture.png rename to versioned_docs/version-2.39.0/getting-started/platformatic-architecture.png diff --git a/versioned_docs/version-2.35.0/getting-started/platformatic-composer-architecture.png b/versioned_docs/version-2.39.0/getting-started/platformatic-composer-architecture.png similarity index 100% rename from versioned_docs/version-2.35.0/getting-started/platformatic-composer-architecture.png rename to versioned_docs/version-2.39.0/getting-started/platformatic-composer-architecture.png diff --git a/versioned_docs/version-2.35.0/getting-started/platformatic-db-architecture.png b/versioned_docs/version-2.39.0/getting-started/platformatic-db-architecture.png similarity index 100% rename from versioned_docs/version-2.35.0/getting-started/platformatic-db-architecture.png rename to versioned_docs/version-2.39.0/getting-started/platformatic-db-architecture.png diff --git a/versioned_docs/version-2.35.0/getting-started/platformatic-runtime-architecture.png b/versioned_docs/version-2.39.0/getting-started/platformatic-runtime-architecture.png similarity index 100% rename from versioned_docs/version-2.35.0/getting-started/platformatic-runtime-architecture.png rename to versioned_docs/version-2.39.0/getting-started/platformatic-runtime-architecture.png diff --git a/versioned_docs/version-2.35.0/getting-started/platformatic-stackables-architecture.png b/versioned_docs/version-2.39.0/getting-started/platformatic-stackables-architecture.png similarity index 100% rename from versioned_docs/version-2.35.0/getting-started/platformatic-stackables-architecture.png rename to versioned_docs/version-2.39.0/getting-started/platformatic-stackables-architecture.png diff --git a/versioned_docs/version-2.35.0/getting-started/platformatid-composer-architecture.excalidraw b/versioned_docs/version-2.39.0/getting-started/platformatid-composer-architecture.excalidraw similarity index 100% rename from versioned_docs/version-2.35.0/getting-started/platformatid-composer-architecture.excalidraw rename to versioned_docs/version-2.39.0/getting-started/platformatid-composer-architecture.excalidraw diff --git a/versioned_docs/version-2.35.0/getting-started/platformatid-db-architecture.excalidraw b/versioned_docs/version-2.39.0/getting-started/platformatid-db-architecture.excalidraw similarity index 100% rename from versioned_docs/version-2.35.0/getting-started/platformatid-db-architecture.excalidraw rename to versioned_docs/version-2.39.0/getting-started/platformatid-db-architecture.excalidraw diff --git a/versioned_docs/version-2.35.0/getting-started/platformatid-runtime-architecture.excalidraw b/versioned_docs/version-2.39.0/getting-started/platformatid-runtime-architecture.excalidraw similarity index 100% rename from versioned_docs/version-2.35.0/getting-started/platformatid-runtime-architecture.excalidraw rename to versioned_docs/version-2.39.0/getting-started/platformatid-runtime-architecture.excalidraw diff --git a/versioned_docs/version-2.35.0/getting-started/platformatid-stackables-architecture.excalidraw b/versioned_docs/version-2.39.0/getting-started/platformatid-stackables-architecture.excalidraw similarity index 100% rename from versioned_docs/version-2.35.0/getting-started/platformatid-stackables-architecture.excalidraw rename to versioned_docs/version-2.39.0/getting-started/platformatid-stackables-architecture.excalidraw diff --git a/versioned_docs/version-2.35.0/getting-started/quick-start-guide.md b/versioned_docs/version-2.39.0/getting-started/quick-start-guide.md similarity index 100% rename from versioned_docs/version-2.35.0/getting-started/quick-start-guide.md rename to versioned_docs/version-2.39.0/getting-started/quick-start-guide.md diff --git a/versioned_docs/version-2.35.0/getting-started/quick-start-watt.md b/versioned_docs/version-2.39.0/getting-started/quick-start-watt.md similarity index 100% rename from versioned_docs/version-2.35.0/getting-started/quick-start-watt.md rename to versioned_docs/version-2.39.0/getting-started/quick-start-watt.md diff --git a/versioned_docs/version-2.35.0/getting-started/setup-watt.md b/versioned_docs/version-2.39.0/getting-started/setup-watt.md similarity index 100% rename from versioned_docs/version-2.35.0/getting-started/setup-watt.md rename to versioned_docs/version-2.39.0/getting-started/setup-watt.md diff --git a/versioned_docs/version-2.35.0/guides/add-custom-functionality/extend-graphql.md b/versioned_docs/version-2.39.0/guides/add-custom-functionality/extend-graphql.md similarity index 100% rename from versioned_docs/version-2.35.0/guides/add-custom-functionality/extend-graphql.md rename to versioned_docs/version-2.39.0/guides/add-custom-functionality/extend-graphql.md diff --git a/versioned_docs/version-2.35.0/guides/add-custom-functionality/extend-rest.md b/versioned_docs/version-2.39.0/guides/add-custom-functionality/extend-rest.md similarity index 100% rename from versioned_docs/version-2.35.0/guides/add-custom-functionality/extend-rest.md rename to versioned_docs/version-2.39.0/guides/add-custom-functionality/extend-rest.md diff --git a/versioned_docs/version-2.35.0/guides/add-custom-functionality/overview.md b/versioned_docs/version-2.39.0/guides/add-custom-functionality/overview.md similarity index 100% rename from versioned_docs/version-2.35.0/guides/add-custom-functionality/overview.md rename to versioned_docs/version-2.39.0/guides/add-custom-functionality/overview.md diff --git a/versioned_docs/version-2.35.0/guides/add-custom-functionality/prerequisites.md b/versioned_docs/version-2.39.0/guides/add-custom-functionality/prerequisites.md similarity index 100% rename from versioned_docs/version-2.35.0/guides/add-custom-functionality/prerequisites.md rename to versioned_docs/version-2.39.0/guides/add-custom-functionality/prerequisites.md diff --git a/versioned_docs/version-2.35.0/guides/add-custom-functionality/raw-sql.md b/versioned_docs/version-2.39.0/guides/add-custom-functionality/raw-sql.md similarity index 100% rename from versioned_docs/version-2.35.0/guides/add-custom-functionality/raw-sql.md rename to versioned_docs/version-2.39.0/guides/add-custom-functionality/raw-sql.md diff --git a/versioned_docs/version-2.35.0/guides/build-modular-monolith-images/architecture-diagram.excalidraw b/versioned_docs/version-2.39.0/guides/build-modular-monolith-images/architecture-diagram.excalidraw similarity index 100% rename from versioned_docs/version-2.35.0/guides/build-modular-monolith-images/architecture-diagram.excalidraw rename to versioned_docs/version-2.39.0/guides/build-modular-monolith-images/architecture-diagram.excalidraw diff --git a/versioned_docs/version-2.35.0/guides/build-modular-monolith-images/architecture-diagram.png b/versioned_docs/version-2.39.0/guides/build-modular-monolith-images/architecture-diagram.png similarity index 100% rename from versioned_docs/version-2.35.0/guides/build-modular-monolith-images/architecture-diagram.png rename to versioned_docs/version-2.39.0/guides/build-modular-monolith-images/architecture-diagram.png diff --git a/versioned_docs/version-2.35.0/guides/build-modular-monolith-images/create-a-static-app-workspace-01.png b/versioned_docs/version-2.39.0/guides/build-modular-monolith-images/create-a-static-app-workspace-01.png similarity index 100% rename from versioned_docs/version-2.35.0/guides/build-modular-monolith-images/create-a-static-app-workspace-01.png rename to versioned_docs/version-2.39.0/guides/build-modular-monolith-images/create-a-static-app-workspace-01.png diff --git a/versioned_docs/version-2.35.0/guides/build-modular-monolith-images/create-a-static-app-workspace-02.png b/versioned_docs/version-2.39.0/guides/build-modular-monolith-images/create-a-static-app-workspace-02.png similarity index 100% rename from versioned_docs/version-2.35.0/guides/build-modular-monolith-images/create-a-static-app-workspace-02.png rename to versioned_docs/version-2.39.0/guides/build-modular-monolith-images/create-a-static-app-workspace-02.png diff --git a/versioned_docs/version-2.35.0/guides/build-modular-monolith-images/create-an-app-on-platformati-cloud-01.png b/versioned_docs/version-2.39.0/guides/build-modular-monolith-images/create-an-app-on-platformati-cloud-01.png similarity index 100% rename from versioned_docs/version-2.35.0/guides/build-modular-monolith-images/create-an-app-on-platformati-cloud-01.png rename to versioned_docs/version-2.39.0/guides/build-modular-monolith-images/create-an-app-on-platformati-cloud-01.png diff --git a/versioned_docs/version-2.35.0/guides/build-modular-monolith-images/make-the-composed-media-service-api-read-only-01.png b/versioned_docs/version-2.39.0/guides/build-modular-monolith-images/make-the-composed-media-service-api-read-only-01.png similarity index 100% rename from versioned_docs/version-2.35.0/guides/build-modular-monolith-images/make-the-composed-media-service-api-read-only-01.png rename to versioned_docs/version-2.39.0/guides/build-modular-monolith-images/make-the-composed-media-service-api-read-only-01.png diff --git a/versioned_docs/version-2.35.0/guides/build-modular-monolith-images/start-the-runtime-app-01.png b/versioned_docs/version-2.39.0/guides/build-modular-monolith-images/start-the-runtime-app-01.png similarity index 100% rename from versioned_docs/version-2.35.0/guides/build-modular-monolith-images/start-the-runtime-app-01.png rename to versioned_docs/version-2.39.0/guides/build-modular-monolith-images/start-the-runtime-app-01.png diff --git a/versioned_docs/version-2.35.0/guides/build-modular-monolith-images/test-the-books-service-api-01.png b/versioned_docs/version-2.39.0/guides/build-modular-monolith-images/test-the-books-service-api-01.png similarity index 100% rename from versioned_docs/version-2.35.0/guides/build-modular-monolith-images/test-the-books-service-api-01.png rename to versioned_docs/version-2.39.0/guides/build-modular-monolith-images/test-the-books-service-api-01.png diff --git a/versioned_docs/version-2.35.0/guides/build-modular-monolith-images/test-the-composed-media-service-api-01.png b/versioned_docs/version-2.39.0/guides/build-modular-monolith-images/test-the-composed-media-service-api-01.png similarity index 100% rename from versioned_docs/version-2.35.0/guides/build-modular-monolith-images/test-the-composed-media-service-api-01.png rename to versioned_docs/version-2.39.0/guides/build-modular-monolith-images/test-the-composed-media-service-api-01.png diff --git a/versioned_docs/version-2.35.0/guides/build-modular-monolith-images/test-the-movies-service-api-01.png b/versioned_docs/version-2.39.0/guides/build-modular-monolith-images/test-the-movies-service-api-01.png similarity index 100% rename from versioned_docs/version-2.35.0/guides/build-modular-monolith-images/test-the-movies-service-api-01.png rename to versioned_docs/version-2.39.0/guides/build-modular-monolith-images/test-the-movies-service-api-01.png diff --git a/versioned_docs/version-2.35.0/guides/build-modular-monolith-images/test-the-people-service-01.png b/versioned_docs/version-2.39.0/guides/build-modular-monolith-images/test-the-people-service-01.png similarity index 100% rename from versioned_docs/version-2.35.0/guides/build-modular-monolith-images/test-the-people-service-01.png rename to versioned_docs/version-2.39.0/guides/build-modular-monolith-images/test-the-people-service-01.png diff --git a/versioned_docs/version-2.35.0/guides/build-modular-monolith.md b/versioned_docs/version-2.39.0/guides/build-modular-monolith.md similarity index 100% rename from versioned_docs/version-2.35.0/guides/build-modular-monolith.md rename to versioned_docs/version-2.39.0/guides/build-modular-monolith.md diff --git a/versioned_docs/version-2.35.0/guides/cache-with-platformatic-watt.md b/versioned_docs/version-2.39.0/guides/cache-with-platformatic-watt.md similarity index 100% rename from versioned_docs/version-2.35.0/guides/cache-with-platformatic-watt.md rename to versioned_docs/version-2.39.0/guides/cache-with-platformatic-watt.md diff --git a/versioned_docs/version-2.35.0/guides/compiling-typescript-for-deployment.md b/versioned_docs/version-2.39.0/guides/compiling-typescript-for-deployment.md similarity index 100% rename from versioned_docs/version-2.35.0/guides/compiling-typescript-for-deployment.md rename to versioned_docs/version-2.39.0/guides/compiling-typescript-for-deployment.md diff --git a/versioned_docs/version-2.35.0/guides/debug-platformatic-db.md b/versioned_docs/version-2.39.0/guides/debug-platformatic-db.md similarity index 100% rename from versioned_docs/version-2.35.0/guides/debug-platformatic-db.md rename to versioned_docs/version-2.39.0/guides/debug-platformatic-db.md diff --git a/versioned_docs/version-2.35.0/guides/deployment/advanced-fly-io-deployment.md b/versioned_docs/version-2.39.0/guides/deployment/advanced-fly-io-deployment.md similarity index 100% rename from versioned_docs/version-2.35.0/guides/deployment/advanced-fly-io-deployment.md rename to versioned_docs/version-2.39.0/guides/deployment/advanced-fly-io-deployment.md diff --git a/versioned_docs/version-2.35.0/guides/deployment/deploy-to-fly-io-with-sqlite.md b/versioned_docs/version-2.39.0/guides/deployment/deploy-to-fly-io-with-sqlite.md similarity index 100% rename from versioned_docs/version-2.35.0/guides/deployment/deploy-to-fly-io-with-sqlite.md rename to versioned_docs/version-2.39.0/guides/deployment/deploy-to-fly-io-with-sqlite.md diff --git a/versioned_docs/version-2.35.0/guides/deployment/deploying-on-lambda.md b/versioned_docs/version-2.39.0/guides/deployment/deploying-on-lambda.md similarity index 100% rename from versioned_docs/version-2.35.0/guides/deployment/deploying-on-lambda.md rename to versioned_docs/version-2.39.0/guides/deployment/deploying-on-lambda.md diff --git a/versioned_docs/version-2.35.0/guides/deployment/dockerize-a-watt-app.md b/versioned_docs/version-2.39.0/guides/deployment/dockerize-a-watt-app.md similarity index 100% rename from versioned_docs/version-2.35.0/guides/deployment/dockerize-a-watt-app.md rename to versioned_docs/version-2.39.0/guides/deployment/dockerize-a-watt-app.md diff --git a/versioned_docs/version-2.35.0/guides/deployment/overview.md b/versioned_docs/version-2.39.0/guides/deployment/overview.md similarity index 100% rename from versioned_docs/version-2.35.0/guides/deployment/overview.md rename to versioned_docs/version-2.39.0/guides/deployment/overview.md diff --git a/versioned_docs/version-2.35.0/guides/environment-variables.md b/versioned_docs/version-2.39.0/guides/environment-variables.md similarity index 100% rename from versioned_docs/version-2.35.0/guides/environment-variables.md rename to versioned_docs/version-2.39.0/guides/environment-variables.md diff --git a/versioned_docs/version-2.35.0/guides/generate-frontend-code-to-consume-platformatic-rest-api.md b/versioned_docs/version-2.39.0/guides/generate-frontend-code-to-consume-platformatic-rest-api.md similarity index 100% rename from versioned_docs/version-2.35.0/guides/generate-frontend-code-to-consume-platformatic-rest-api.md rename to versioned_docs/version-2.39.0/guides/generate-frontend-code-to-consume-platformatic-rest-api.md diff --git a/versioned_docs/version-2.35.0/guides/http-cache.md b/versioned_docs/version-2.39.0/guides/http-cache.md similarity index 100% rename from versioned_docs/version-2.35.0/guides/http-cache.md rename to versioned_docs/version-2.39.0/guides/http-cache.md diff --git a/versioned_docs/version-2.35.0/guides/images/cache-others.png b/versioned_docs/version-2.39.0/guides/images/cache-others.png similarity index 100% rename from versioned_docs/version-2.35.0/guides/images/cache-others.png rename to versioned_docs/version-2.39.0/guides/images/cache-others.png diff --git a/versioned_docs/version-2.35.0/guides/images/composer.png b/versioned_docs/version-2.39.0/guides/images/composer.png similarity index 100% rename from versioned_docs/version-2.35.0/guides/images/composer.png rename to versioned_docs/version-2.39.0/guides/images/composer.png diff --git a/versioned_docs/version-2.35.0/guides/images/image.png b/versioned_docs/version-2.39.0/guides/images/image.png similarity index 100% rename from versioned_docs/version-2.35.0/guides/images/image.png rename to versioned_docs/version-2.39.0/guides/images/image.png diff --git a/versioned_docs/version-2.35.0/guides/images/kibana-1.png b/versioned_docs/version-2.39.0/guides/images/kibana-1.png similarity index 100% rename from versioned_docs/version-2.35.0/guides/images/kibana-1.png rename to versioned_docs/version-2.39.0/guides/images/kibana-1.png diff --git a/versioned_docs/version-2.35.0/guides/images/kibana-2.png b/versioned_docs/version-2.39.0/guides/images/kibana-2.png similarity index 100% rename from versioned_docs/version-2.35.0/guides/images/kibana-2.png rename to versioned_docs/version-2.39.0/guides/images/kibana-2.png diff --git a/versioned_docs/version-2.35.0/guides/images/kibana-3.png b/versioned_docs/version-2.39.0/guides/images/kibana-3.png similarity index 100% rename from versioned_docs/version-2.35.0/guides/images/kibana-3.png rename to versioned_docs/version-2.39.0/guides/images/kibana-3.png diff --git a/versioned_docs/version-2.35.0/guides/images/kibana-4.png b/versioned_docs/version-2.39.0/guides/images/kibana-4.png similarity index 100% rename from versioned_docs/version-2.35.0/guides/images/kibana-4.png rename to versioned_docs/version-2.39.0/guides/images/kibana-4.png diff --git a/versioned_docs/version-2.35.0/guides/images/movie-app.png b/versioned_docs/version-2.39.0/guides/images/movie-app.png similarity index 100% rename from versioned_docs/version-2.35.0/guides/images/movie-app.png rename to versioned_docs/version-2.39.0/guides/images/movie-app.png diff --git a/versioned_docs/version-2.35.0/guides/jwt-auth0.md b/versioned_docs/version-2.39.0/guides/jwt-auth0.md similarity index 100% rename from versioned_docs/version-2.35.0/guides/jwt-auth0.md rename to versioned_docs/version-2.39.0/guides/jwt-auth0.md diff --git a/versioned_docs/version-2.35.0/guides/jwt-keycloak.md b/versioned_docs/version-2.39.0/guides/jwt-keycloak.md similarity index 100% rename from versioned_docs/version-2.35.0/guides/jwt-keycloak.md rename to versioned_docs/version-2.39.0/guides/jwt-keycloak.md diff --git a/versioned_docs/version-2.35.0/guides/keycloak-images/assign_service_account_roles.png b/versioned_docs/version-2.39.0/guides/keycloak-images/assign_service_account_roles.png similarity index 100% rename from versioned_docs/version-2.35.0/guides/keycloak-images/assign_service_account_roles.png rename to versioned_docs/version-2.39.0/guides/keycloak-images/assign_service_account_roles.png diff --git a/versioned_docs/version-2.35.0/guides/keycloak-images/client_credentials.png b/versioned_docs/version-2.39.0/guides/keycloak-images/client_credentials.png similarity index 100% rename from versioned_docs/version-2.35.0/guides/keycloak-images/client_credentials.png rename to versioned_docs/version-2.39.0/guides/keycloak-images/client_credentials.png diff --git a/versioned_docs/version-2.35.0/guides/keycloak-images/create_client.png b/versioned_docs/version-2.39.0/guides/keycloak-images/create_client.png similarity index 100% rename from versioned_docs/version-2.35.0/guides/keycloak-images/create_client.png rename to versioned_docs/version-2.39.0/guides/keycloak-images/create_client.png diff --git a/versioned_docs/version-2.35.0/guides/keycloak-images/create_client_2.png b/versioned_docs/version-2.39.0/guides/keycloak-images/create_client_2.png similarity index 100% rename from versioned_docs/version-2.35.0/guides/keycloak-images/create_client_2.png rename to versioned_docs/version-2.39.0/guides/keycloak-images/create_client_2.png diff --git a/versioned_docs/version-2.35.0/guides/keycloak-images/create_client_3.png b/versioned_docs/version-2.39.0/guides/keycloak-images/create_client_3.png similarity index 100% rename from versioned_docs/version-2.35.0/guides/keycloak-images/create_client_3.png rename to versioned_docs/version-2.39.0/guides/keycloak-images/create_client_3.png diff --git a/versioned_docs/version-2.35.0/guides/keycloak-images/create_client_4.png b/versioned_docs/version-2.39.0/guides/keycloak-images/create_client_4.png similarity index 100% rename from versioned_docs/version-2.35.0/guides/keycloak-images/create_client_4.png rename to versioned_docs/version-2.39.0/guides/keycloak-images/create_client_4.png diff --git a/versioned_docs/version-2.35.0/guides/keycloak-images/create_platformatic.png b/versioned_docs/version-2.39.0/guides/keycloak-images/create_platformatic.png similarity index 100% rename from versioned_docs/version-2.35.0/guides/keycloak-images/create_platformatic.png rename to versioned_docs/version-2.39.0/guides/keycloak-images/create_platformatic.png diff --git a/versioned_docs/version-2.35.0/guides/keycloak-images/create_realm.png b/versioned_docs/version-2.39.0/guides/keycloak-images/create_realm.png similarity index 100% rename from versioned_docs/version-2.35.0/guides/keycloak-images/create_realm.png rename to versioned_docs/version-2.39.0/guides/keycloak-images/create_realm.png diff --git a/versioned_docs/version-2.35.0/guides/keycloak-images/create_realm_2.png b/versioned_docs/version-2.39.0/guides/keycloak-images/create_realm_2.png similarity index 100% rename from versioned_docs/version-2.35.0/guides/keycloak-images/create_realm_2.png rename to versioned_docs/version-2.39.0/guides/keycloak-images/create_realm_2.png diff --git a/versioned_docs/version-2.35.0/guides/keycloak-images/create_realm_role.png b/versioned_docs/version-2.39.0/guides/keycloak-images/create_realm_role.png similarity index 100% rename from versioned_docs/version-2.35.0/guides/keycloak-images/create_realm_role.png rename to versioned_docs/version-2.39.0/guides/keycloak-images/create_realm_role.png diff --git a/versioned_docs/version-2.35.0/guides/keycloak-images/plt_auth.png b/versioned_docs/version-2.39.0/guides/keycloak-images/plt_auth.png similarity index 100% rename from versioned_docs/version-2.35.0/guides/keycloak-images/plt_auth.png rename to versioned_docs/version-2.39.0/guides/keycloak-images/plt_auth.png diff --git a/versioned_docs/version-2.35.0/guides/keycloak-images/plt_start.png b/versioned_docs/version-2.39.0/guides/keycloak-images/plt_start.png similarity index 100% rename from versioned_docs/version-2.35.0/guides/keycloak-images/plt_start.png rename to versioned_docs/version-2.39.0/guides/keycloak-images/plt_start.png diff --git a/versioned_docs/version-2.35.0/guides/keycloak-images/plt_unauth.png b/versioned_docs/version-2.39.0/guides/keycloak-images/plt_unauth.png similarity index 100% rename from versioned_docs/version-2.35.0/guides/keycloak-images/plt_unauth.png rename to versioned_docs/version-2.39.0/guides/keycloak-images/plt_unauth.png diff --git a/versioned_docs/version-2.35.0/guides/logging-to-elasticsearch.md b/versioned_docs/version-2.39.0/guides/logging-to-elasticsearch.md similarity index 100% rename from versioned_docs/version-2.35.0/guides/logging-to-elasticsearch.md rename to versioned_docs/version-2.39.0/guides/logging-to-elasticsearch.md diff --git a/versioned_docs/version-2.35.0/guides/migrating-express-app-to-platformatic-service.md b/versioned_docs/version-2.39.0/guides/migrating-express-app-to-platformatic-service.md similarity index 100% rename from versioned_docs/version-2.35.0/guides/migrating-express-app-to-platformatic-service.md rename to versioned_docs/version-2.39.0/guides/migrating-express-app-to-platformatic-service.md diff --git a/versioned_docs/version-2.35.0/guides/migrating-fastify-app-to-platformatic-service.md b/versioned_docs/version-2.39.0/guides/migrating-fastify-app-to-platformatic-service.md similarity index 100% rename from versioned_docs/version-2.35.0/guides/migrating-fastify-app-to-platformatic-service.md rename to versioned_docs/version-2.39.0/guides/migrating-fastify-app-to-platformatic-service.md diff --git a/versioned_docs/version-2.35.0/guides/monitoring.md b/versioned_docs/version-2.39.0/guides/monitoring.md similarity index 100% rename from versioned_docs/version-2.35.0/guides/monitoring.md rename to versioned_docs/version-2.39.0/guides/monitoring.md diff --git a/versioned_docs/version-2.35.0/guides/movie-quotes-app-tutorial.md b/versioned_docs/version-2.39.0/guides/movie-quotes-app-tutorial.md similarity index 100% rename from versioned_docs/version-2.35.0/guides/movie-quotes-app-tutorial.md rename to versioned_docs/version-2.39.0/guides/movie-quotes-app-tutorial.md diff --git a/versioned_docs/version-2.35.0/guides/prisma.md b/versioned_docs/version-2.39.0/guides/prisma.md similarity index 100% rename from versioned_docs/version-2.35.0/guides/prisma.md rename to versioned_docs/version-2.39.0/guides/prisma.md diff --git a/versioned_docs/version-2.35.0/guides/runtime-cli-managing.md b/versioned_docs/version-2.39.0/guides/runtime-cli-managing.md similarity index 100% rename from versioned_docs/version-2.35.0/guides/runtime-cli-managing.md rename to versioned_docs/version-2.39.0/guides/runtime-cli-managing.md diff --git a/versioned_docs/version-2.35.0/guides/securing-platformatic-db.md b/versioned_docs/version-2.39.0/guides/securing-platformatic-db.md similarity index 100% rename from versioned_docs/version-2.35.0/guides/securing-platformatic-db.md rename to versioned_docs/version-2.39.0/guides/securing-platformatic-db.md diff --git a/versioned_docs/version-2.35.0/guides/seed-a-database.md b/versioned_docs/version-2.39.0/guides/seed-a-database.md similarity index 100% rename from versioned_docs/version-2.35.0/guides/seed-a-database.md rename to versioned_docs/version-2.39.0/guides/seed-a-database.md diff --git a/versioned_docs/version-2.35.0/guides/telemetry-images/compose-openapi.png b/versioned_docs/version-2.39.0/guides/telemetry-images/compose-openapi.png similarity index 100% rename from versioned_docs/version-2.35.0/guides/telemetry-images/compose-openapi.png rename to versioned_docs/version-2.39.0/guides/telemetry-images/compose-openapi.png diff --git a/versioned_docs/version-2.35.0/guides/telemetry-images/jaeger-1.png b/versioned_docs/version-2.39.0/guides/telemetry-images/jaeger-1.png similarity index 100% rename from versioned_docs/version-2.35.0/guides/telemetry-images/jaeger-1.png rename to versioned_docs/version-2.39.0/guides/telemetry-images/jaeger-1.png diff --git a/versioned_docs/version-2.35.0/guides/telemetry-images/jaeger-2.png b/versioned_docs/version-2.39.0/guides/telemetry-images/jaeger-2.png similarity index 100% rename from versioned_docs/version-2.35.0/guides/telemetry-images/jaeger-2.png rename to versioned_docs/version-2.39.0/guides/telemetry-images/jaeger-2.png diff --git a/versioned_docs/version-2.35.0/guides/telemetry-images/jaeger-3.png b/versioned_docs/version-2.39.0/guides/telemetry-images/jaeger-3.png similarity index 100% rename from versioned_docs/version-2.35.0/guides/telemetry-images/jaeger-3.png rename to versioned_docs/version-2.39.0/guides/telemetry-images/jaeger-3.png diff --git a/versioned_docs/version-2.35.0/guides/telemetry.md b/versioned_docs/version-2.39.0/guides/telemetry.md similarity index 100% rename from versioned_docs/version-2.35.0/guides/telemetry.md rename to versioned_docs/version-2.39.0/guides/telemetry.md diff --git a/versioned_docs/version-2.35.0/guides/use-env-with-platformatic.md b/versioned_docs/version-2.39.0/guides/use-env-with-platformatic.md similarity index 100% rename from versioned_docs/version-2.35.0/guides/use-env-with-platformatic.md rename to versioned_docs/version-2.39.0/guides/use-env-with-platformatic.md diff --git a/versioned_docs/version-2.39.0/guides/use-watt-multiple-repository.md b/versioned_docs/version-2.39.0/guides/use-watt-multiple-repository.md new file mode 100644 index 0000000000..fe19f90576 --- /dev/null +++ b/versioned_docs/version-2.39.0/guides/use-watt-multiple-repository.md @@ -0,0 +1,200 @@ +# Using Watt for Multi-Repository Service + +This guide explains how to use [Watt](https://platformatic.dev/watt) to resolve and manage services from different `git` repositories, build and start your application. You'll learn how to set up, configure, and run a Watt application with multi-repository service resolution. + +## Prerequisites + +Before beginning, ensure you have installed: + +- [Node.js](https://nodejs.org/en) (v20.16.0+ or v22.3.0+) +- [npm](https://www.npmjs.com/package/npm) (v10 or higher) +- A code editor (e.g., [Visual Studio Code](https://code.visualstudio.com)) + +## Project Setup + +### Creating Your Watt Application + +To create a new Watt application, please refer to our [Watt setup guide](https://www.notion.so/Using-Watt-for-Multi-Repository-Service-Resolution-17b60f428d7e800cbcc3efd396732732?pvs=21). + +### Adding Service Resolution + +By default, the `wattpm resolve` command isn't included in your Watt application's package.json. You have two options to use it: + +1. Run directly via CLI: + +```sh +npx wattpm resolve {repository name and directory path} +``` + +2. Add it to your `package.json`: + +```json +{ + "name": "with-resolve", + "private": true, + "scripts": { + "dev": "wattpm dev", + "resolve": "wattpm resolve", + "build": "wattpm build", + "start": "wattpm start" + }, + "dependencies": { + "@platformatic/runtime": "2.21.0", + "@platformatic/next": "2.21.0", + "@platformatic/node": "2.21.0", + "wattpm": "2.21.0" + }, + "devDependencies": { + "platformatic": "2.21.0" + }, + "workspaces": [ + "web/*", + "external/*" + ] +} +``` + +## Multi-Repository Structure Setup + +### Repository Organization +When working with multiple repositories in Watt, you'll typically have: +1. A main application repository containing your Watt configuration +2. One or more service repositories containing individual services + +### Setting Up the Main Repository + +1. Create your main application repository: + +```sh +mkdir my-watt-app +cd my-watt-app +git init +``` + +2. Initialize your Watt application: + +```sh +npx wattpm@latest init +``` + + +3. Create the directory structure for external services: + +```sh +mkdir -p web/ +mkdir -p external/ +``` +### Adding Service Repositories + +1. Update your root `watt.json` file to define your service repositories: + +```sh + "web": [ + { + "id": "composer", + "path": "web/composer" + }, + { + "id": "app", + "path": "web/app" + }, + { + "id": "node", + "path": "{PLT_NODE_PATH}", + "url": "YOUR_SERVICE_GITHUB_URL" + }, + { + "id": "next", + "path": "{PLT_NEXT_PATH}", + "url": "YOUR_SERVICE_GITHUB_URL" + } + ], +``` + +### Version Control Configuration + +1. Update your main repository's `.gitignore`: + +```sh +# Ignore resolved services +web/* +external/* +!web/.gitkeep +!external/.gitkeep + +# Node modules +node_modules/ + +# Environment variables +.env +``` + +2. Update your `package.json` + +In your root `package.json` file and update your workspace to include service workspaces: + +```sh +{ + "workspaces": [ + "web/services/*", + "external/services/*" + ] +} +``` + +## Working with Services + +### Resolving Services + +To resolve services located in the web folder of your Watt application, run the below command: + +```sh +npm run resolve +``` + +This command fetches and unifies all required services. + +### Building the Application + +```sh +npm run build +``` + +This command builds the application with all resolved services. + +### Starting the Application + +Run the command below to start your application in development mode: + +```sh +npm run dev +``` + +To run your application in production mode, run the command below: + +```sh +npm start +``` + +## Local Development Configuration + +Watt provides flexible options for service resolution during local development. You can configure services to resolve from local directories instead of Git repositories. + +### Environment Variables + +Configure local development using these environment variables: + +- `PLT_NODE_PATH`: Specifies local Node.js service directories +- `PLT_NEXT_PATH`: Specifies local Next.js service directories + +Example configuration: + +```sh +export PLT_NODE_PATH=/path/to/local/service +export PLT_NEXT_PATH=/path/to/local/nextjs/service +``` + +## Additional Resources + +- [wattpm-resolve sample application](https://github.com/platformatic/wattpm-resolve) +- [Watt Setup Guide](https://docs.platformatic.dev/docs/getting-started/quick-start-watt) \ No newline at end of file diff --git a/versioned_docs/version-2.39.0/guides/using-watt-with-node-config.md b/versioned_docs/version-2.39.0/guides/using-watt-with-node-config.md new file mode 100644 index 0000000000..cc343a1f49 --- /dev/null +++ b/versioned_docs/version-2.39.0/guides/using-watt-with-node-config.md @@ -0,0 +1,209 @@ +# Using Watt With Node Config + +[Node-config](https://www.npmjs.com/package/config) is a popular configuration management package that helps organize settings across different deployment environments in your application. It creates a unified configuration system that works seamlessly with both [Watt](https://platformatic.dev/docs/watt/overview) and other `npm` modules. +When building a Watt application with multiple services, each service can maintain its own independent configuration using `node-config`. This allows different services to use different environment configurations as needed. + + + +## Installation and Setup + +First, install `node-config` in the root of your Watt application: + +```sh +npm install config +``` + +Create a `config` directory in your `service` folder and set up your default configuration for each service: + +```sh +mkdir config +touch config/default.json +``` + +In `{service}/config/default.json`, add your base configuration: + +```sh +{ + "foo": "bar" +} +``` + +## Environment-specific configuration + +For development-specific settings, create a separate configuration file: + +```sh +touch config/dev.json +``` + +In `{service}/config/dev.json`, override any default values: + +```sh +{ + "foo": "baz" +} +``` + +## Configuration structure + +Instead of using simple key-value pairs, consider organizing your configurations more systematically, below is an example: + +```sh +{ + "server": { + "port": 3000, + "host": "localhost" + }, + "api": { + "endpoint": "http://api.example.com", + "timeout": 5000 + }, + "database": { + "url": "mongodb://localhost:27017", + "name": "myapp" + } +} +``` + +:::important +It's important to note that for a secure configuration, use your environment variables for your application secrets and validate your configuration values when you run your application. +::: + +## Service-Specific Configuration + +You can configure each [service](https://platformatic.dev/docs/service/overview) environment variables in your Watt configuration file: + +```json +{ + "services": [ + { + "id": "service-a", + "path": "./services/service-a", + "env": { + "NODE_CONFIG_DIR": "./services/service-a/config", + "NODE_ENV": "development" + } + }, + { + "id": "service-b", + "path": "./services/service-b", + "env": { + "NODE_CONFIG_DIR": "./services/service-b/config", + "NODE_ENV": "production" + } + } + ] +} +``` + +Platformatic allows you to use `.env` files for managing environment variables, and you can remap one variable to another using its interpolation feature. For example, to remap `SERVICE_A_NODE_ENV` to `NODE_ENV`, create a `.env` file in the `service-a` directory: + +1. Set your service-specific environment variable: + +```sh +SERVICE_A_NODE_ENV=development +``` + +2. Use interpolation syntax `${VARIABLE_NAME}` in your Watt configuration to reference it: + +```json +{ + "services": [ + { + "id": "service-a", + "path": "./services/service-a", + "env": { + "NODE_CONFIG_DIR": "./services/service-a/config", + "NODE_ENV": `${YOUR_SERVICE_NODE_ENV}` + } + } + ] +} +``` + +You can alsp use this pattern with `env` file: + +```env +SERVICE_A_NODE_ENV=development +``` + +You can also specify environment files per Platformatic service: + +``` +{ + "services": [ + { + "id": "service-a", + "path": "./services/service-a", + "envfile": "./services/service-a/.env" + } + ] +} +``` + +## Using Configuration Values in Watt Application + +Here's how to access your configuration values in a Watt application: + +```sh +import { createServer } from 'http'; +import config from 'config'; + +// Access configuration values using config.get() +const configValue = config.get('foo'); + +const server = createServer((req, res) => { + res.writeHead(200, { 'Content-Type': 'text/plain' }); +// Use configuration values in your application logic + res.end(config.get('foo')); +}); + +server.listen(3000); +``` + +## Running Your Watt Application + +When you start your application, `node-config` automatically loads the appropriate configuration based on your `NODE_ENV` environment variable. The values from `default.json` are merged with any environment-specific configurations. + +For production mode: + +```sh +npm start +``` + +For development mode: + +```sh +NODE_ENV=development npm start +``` + +## **Advanced Usage Tips** +`node-config` follows this loading order: + +1. `default.json` (base configuration) +2. `{environment}.json` (environment-specific settings) +3. `local.json` (local overrides, should be git-ignored) +4. Environment variables +5. Command line arguments + +### **Error Handling** + +Always handle configuration access safely: + +```sh +try { + const value = config.get('foo'); +} catch (error) { + console.error('Missing required configuration:', error.message); + process.exit(1); +} +``` + +### **Configuration Validation** + +We recommend using schema validation libraries like [TypeBox](https://github.com/sinclairzx81/typebox), [Ajv](https://ajv.js.org/), or [Zod](https://zod.dev/) to validate Watt node configurations, ensuring both runtime validation and type safety for your configuration parameters. + +## Additional Resources + +- For more details on setting up a Watt application, see our [Watt setup guide](https://docs.platformatic.dev/docs/getting-started/quick-start-watt) +- Learn more about configuration patterns in the [node-config documentation](https://www.npmjs.com/package/config) \ No newline at end of file diff --git a/versioned_docs/version-2.35.0/images/ENV_Var_Platforamtic.png b/versioned_docs/version-2.39.0/images/ENV_Var_Platforamtic.png similarity index 100% rename from versioned_docs/version-2.35.0/images/ENV_Var_Platforamtic.png rename to versioned_docs/version-2.39.0/images/ENV_Var_Platforamtic.png diff --git a/versioned_docs/version-2.35.0/images/Platformatic_Composer_Diagram_(Light_Mode).png b/versioned_docs/version-2.39.0/images/Platformatic_Composer_Diagram_(Light_Mode).png similarity index 100% rename from versioned_docs/version-2.35.0/images/Platformatic_Composer_Diagram_(Light_Mode).png rename to versioned_docs/version-2.39.0/images/Platformatic_Composer_Diagram_(Light_Mode).png diff --git a/versioned_docs/version-2.35.0/images/Platformatic_DB_Diagram_(Light_Mode).png b/versioned_docs/version-2.39.0/images/Platformatic_DB_Diagram_(Light_Mode).png similarity index 100% rename from versioned_docs/version-2.35.0/images/Platformatic_DB_Diagram_(Light_Mode).png rename to versioned_docs/version-2.39.0/images/Platformatic_DB_Diagram_(Light_Mode).png diff --git a/versioned_docs/version-2.35.0/images/Platformatic_Runtime_Diagram_(Light_Mode).png b/versioned_docs/version-2.39.0/images/Platformatic_Runtime_Diagram_(Light_Mode).png similarity index 100% rename from versioned_docs/version-2.35.0/images/Platformatic_Runtime_Diagram_(Light_Mode).png rename to versioned_docs/version-2.39.0/images/Platformatic_Runtime_Diagram_(Light_Mode).png diff --git a/versioned_docs/version-2.35.0/images/Platformatic_Service_Diagram_(Light_Mode).png b/versioned_docs/version-2.39.0/images/Platformatic_Service_Diagram_(Light_Mode).png similarity index 100% rename from versioned_docs/version-2.35.0/images/Platformatic_Service_Diagram_(Light_Mode).png rename to versioned_docs/version-2.39.0/images/Platformatic_Service_Diagram_(Light_Mode).png diff --git a/versioned_docs/version-2.35.0/images/Platformatic_Stackables_Diagram_(Light_Mode).png b/versioned_docs/version-2.39.0/images/Platformatic_Stackables_Diagram_(Light_Mode).png similarity index 100% rename from versioned_docs/version-2.35.0/images/Platformatic_Stackables_Diagram_(Light_Mode).png rename to versioned_docs/version-2.39.0/images/Platformatic_Stackables_Diagram_(Light_Mode).png diff --git a/versioned_docs/version-2.35.0/images/img-dark/Platformatic_Composer_Diagram_(Dark_Mode).png b/versioned_docs/version-2.39.0/images/img-dark/Platformatic_Composer_Diagram_(Dark_Mode).png similarity index 100% rename from versioned_docs/version-2.35.0/images/img-dark/Platformatic_Composer_Diagram_(Dark_Mode).png rename to versioned_docs/version-2.39.0/images/img-dark/Platformatic_Composer_Diagram_(Dark_Mode).png diff --git a/versioned_docs/version-2.35.0/images/img-dark/Platformatic_DB_Diagram_(Dark_Mode).png b/versioned_docs/version-2.39.0/images/img-dark/Platformatic_DB_Diagram_(Dark_Mode).png similarity index 100% rename from versioned_docs/version-2.35.0/images/img-dark/Platformatic_DB_Diagram_(Dark_Mode).png rename to versioned_docs/version-2.39.0/images/img-dark/Platformatic_DB_Diagram_(Dark_Mode).png diff --git a/versioned_docs/version-2.35.0/images/img-dark/Platformatic_Runtime_Diagram_(Dark_Mode).png b/versioned_docs/version-2.39.0/images/img-dark/Platformatic_Runtime_Diagram_(Dark_Mode).png similarity index 100% rename from versioned_docs/version-2.35.0/images/img-dark/Platformatic_Runtime_Diagram_(Dark_Mode).png rename to versioned_docs/version-2.39.0/images/img-dark/Platformatic_Runtime_Diagram_(Dark_Mode).png diff --git a/versioned_docs/version-2.35.0/images/img-dark/Platformatic_Service_Diagram_(Dark_Mode).png b/versioned_docs/version-2.39.0/images/img-dark/Platformatic_Service_Diagram_(Dark_Mode).png similarity index 100% rename from versioned_docs/version-2.35.0/images/img-dark/Platformatic_Service_Diagram_(Dark_Mode).png rename to versioned_docs/version-2.39.0/images/img-dark/Platformatic_Service_Diagram_(Dark_Mode).png diff --git a/versioned_docs/version-2.35.0/images/img-dark/Platformatic_Stackables_Diagram_(Dark_Mode).png b/versioned_docs/version-2.39.0/images/img-dark/Platformatic_Stackables_Diagram_(Dark_Mode).png similarity index 100% rename from versioned_docs/version-2.35.0/images/img-dark/Platformatic_Stackables_Diagram_(Dark_Mode).png rename to versioned_docs/version-2.39.0/images/img-dark/Platformatic_Stackables_Diagram_(Dark_Mode).png diff --git a/versioned_docs/version-2.35.0/learn/beginner/crud-application.md b/versioned_docs/version-2.39.0/learn/beginner/crud-application.md similarity index 100% rename from versioned_docs/version-2.35.0/learn/beginner/crud-application.md rename to versioned_docs/version-2.39.0/learn/beginner/crud-application.md diff --git a/versioned_docs/version-2.35.0/learn/glossary.md b/versioned_docs/version-2.39.0/learn/glossary.md similarity index 100% rename from versioned_docs/version-2.35.0/learn/glossary.md rename to versioned_docs/version-2.39.0/learn/glossary.md diff --git a/versioned_docs/version-2.35.0/learn/images/plt-endpoints.png b/versioned_docs/version-2.39.0/learn/images/plt-endpoints.png similarity index 100% rename from versioned_docs/version-2.35.0/learn/images/plt-endpoints.png rename to versioned_docs/version-2.39.0/learn/images/plt-endpoints.png diff --git a/versioned_docs/version-2.35.0/learn/images/plt-localhost.png b/versioned_docs/version-2.39.0/learn/images/plt-localhost.png similarity index 100% rename from versioned_docs/version-2.35.0/learn/images/plt-localhost.png rename to versioned_docs/version-2.39.0/learn/images/plt-localhost.png diff --git a/versioned_docs/version-2.35.0/learn/images/test-endpoint.png b/versioned_docs/version-2.39.0/learn/images/test-endpoint.png similarity index 100% rename from versioned_docs/version-2.35.0/learn/images/test-endpoint.png rename to versioned_docs/version-2.39.0/learn/images/test-endpoint.png diff --git a/versioned_docs/version-2.35.0/learn/overview.md b/versioned_docs/version-2.39.0/learn/overview.md similarity index 100% rename from versioned_docs/version-2.35.0/learn/overview.md rename to versioned_docs/version-2.39.0/learn/overview.md diff --git a/versioned_docs/version-2.35.0/packages/astro/caching.md b/versioned_docs/version-2.39.0/packages/astro/caching.md similarity index 100% rename from versioned_docs/version-2.35.0/packages/astro/caching.md rename to versioned_docs/version-2.39.0/packages/astro/caching.md diff --git a/versioned_docs/version-2.35.0/packages/astro/configuration.md b/versioned_docs/version-2.39.0/packages/astro/configuration.md similarity index 91% rename from versioned_docs/version-2.35.0/packages/astro/configuration.md rename to versioned_docs/version-2.39.0/packages/astro/configuration.md index eacd4c78d6..c3994459d3 100644 --- a/versioned_docs/version-2.35.0/packages/astro/configuration.md +++ b/versioned_docs/version-2.39.0/packages/astro/configuration.md @@ -16,7 +16,7 @@ Supported object properties: - **`install`**: The command to execute to install the service dependencies. The default is `npm ci --omit-dev`. - **`build`**: The command to execute to build the application. - **`development`**: The command to execute to start the application in development mode. - - **`production`**: The command to execute to start the application in production mode. + - **`production`**: The command to execute to start the application in production mode. This currently does not work due to due to [`CVE-2025-24010`](https://github.com/vitejs/vite/security/advisories/GHSA-vg6x-rcgg-rjx6). ## `logger` diff --git a/versioned_docs/version-2.35.0/packages/astro/overview.md b/versioned_docs/version-2.39.0/packages/astro/overview.md similarity index 86% rename from versioned_docs/version-2.35.0/packages/astro/overview.md rename to versioned_docs/version-2.39.0/packages/astro/overview.md index 325eb11d88..1feaea9905 100644 --- a/versioned_docs/version-2.35.0/packages/astro/overview.md +++ b/versioned_docs/version-2.39.0/packages/astro/overview.md @@ -34,6 +34,23 @@ When running in production mode, a custom Fastify server will serve the static o In both modes if the service uses the `commands` property then it's responsible to start a HTTP server. The Platformatic runtime will modify the server port replacing it with a random port and then it will integrate the external service in the runtime. +### Using custom commands + +Due to [`CVE-2025-24010`](https://github.com/vitejs/vite/security/advisories/GHSA-vg6x-rcgg-rjx6), you need to set: + +```js +{ + ... + "vite": { + "server": { + "allowedHosts": [".plt.local"] + } + } +} +``` + +This will allow other services inside the platformatic mesh network to contact your Vite server. + ## Configuration See the [configuration](./configuration.md) page. diff --git a/versioned_docs/version-2.35.0/packages/errors.md b/versioned_docs/version-2.39.0/packages/errors.md similarity index 100% rename from versioned_docs/version-2.35.0/packages/errors.md rename to versioned_docs/version-2.39.0/packages/errors.md diff --git a/versioned_docs/version-2.35.0/packages/next/configuration.md b/versioned_docs/version-2.39.0/packages/next/configuration.md similarity index 100% rename from versioned_docs/version-2.35.0/packages/next/configuration.md rename to versioned_docs/version-2.39.0/packages/next/configuration.md diff --git a/versioned_docs/version-2.35.0/packages/next/overview.md b/versioned_docs/version-2.39.0/packages/next/overview.md similarity index 100% rename from versioned_docs/version-2.35.0/packages/next/overview.md rename to versioned_docs/version-2.39.0/packages/next/overview.md diff --git a/versioned_docs/version-2.35.0/packages/node/configuration.md b/versioned_docs/version-2.39.0/packages/node/configuration.md similarity index 100% rename from versioned_docs/version-2.35.0/packages/node/configuration.md rename to versioned_docs/version-2.39.0/packages/node/configuration.md diff --git a/versioned_docs/version-2.35.0/packages/node/overview.md b/versioned_docs/version-2.39.0/packages/node/overview.md similarity index 78% rename from versioned_docs/version-2.35.0/packages/node/overview.md rename to versioned_docs/version-2.39.0/packages/node/overview.md index 82faa4309d..85c6eafe3f 100644 --- a/versioned_docs/version-2.35.0/packages/node/overview.md +++ b/versioned_docs/version-2.39.0/packages/node/overview.md @@ -162,12 +162,26 @@ See the [configuration](./configuration.md) page. ## API -- **`platformatic.setBasePath(path)`**: This function can be use to override the base path for the service. If not properly configure in the composer, this can make your application unaccessible. -- **`platformatic.serviceId`**: The id of the service. -- **`platformatic.workerId`**: The id of the service worker. -- **`platformatic.root`**: The root directory of the service. -- **`platformatic.basePath`**: The base path of the service in the composer. -- **`platformatic.logLevel`**: The log level configured for the service. -- **`platformatic.events.on('close')`**: This event is emitted when the process is being closed. A listener should be installed to perform a graceful close, which must finish in 10 seconds. If there is no listener, the process will be terminated by invoking `process.exit(0)`. +During service execution some APIs are made available in the `globalThis.platformatic` object. + +- **`globalThis.platformatic.setBasePath(path)`**: This function can be use to override the base path for the service. If not properly configure in the composer, this can make your application unaccessible. +- **`globalThis.platformatic.serviceId`**: The id of the service. +- **`globalThis.platformatic.workerId`**: The id of the service worker. +- **`globalThis.platformatic.root`**: The root directory of the service. +- **`globalThis.platformatic.basePath`**: The base path of the service in the composer. +- **`globalThis.platformatic.logLevel`**: The log level configured for the service. +- **`globalThis.platformatic.events.on('close')`**: This event is emitted when the process is being closed. A listener should be installed to perform a graceful close, which must finish in 10 seconds. If there is no listener, the process will be terminated by invoking `process.exit(0)`. + +### Typings for the API + +In order to get full Typescript support for the API above, you can install the `@platformatic/globals` package and get an alternative, typed, access to the `globalThis.platformatic` object. + +The usage of the package is straight-forward: + +```js +import { getGlobal } from '@platformatic/globals` + +const pltApi = getGlobal() +``` diff --git a/versioned_docs/version-2.35.0/packages/remix/caching.md b/versioned_docs/version-2.39.0/packages/remix/caching.md similarity index 100% rename from versioned_docs/version-2.35.0/packages/remix/caching.md rename to versioned_docs/version-2.39.0/packages/remix/caching.md diff --git a/versioned_docs/version-2.35.0/packages/remix/configuration.md b/versioned_docs/version-2.39.0/packages/remix/configuration.md similarity index 100% rename from versioned_docs/version-2.35.0/packages/remix/configuration.md rename to versioned_docs/version-2.39.0/packages/remix/configuration.md diff --git a/versioned_docs/version-2.35.0/packages/remix/overview.md b/versioned_docs/version-2.39.0/packages/remix/overview.md similarity index 87% rename from versioned_docs/version-2.35.0/packages/remix/overview.md rename to versioned_docs/version-2.39.0/packages/remix/overview.md index c1d2fc5027..abd431143d 100644 --- a/versioned_docs/version-2.35.0/packages/remix/overview.md +++ b/versioned_docs/version-2.39.0/packages/remix/overview.md @@ -34,6 +34,21 @@ When running in production mode, a custom Express server instrumented with [@rem In both modes if the service uses the `commands` property then it's responsible to start a HTTP server. The Platformatic runtime will modify the server port replacing it with a random port and then it will integrate the external service in the runtime. +### Using custom commands + +Due to [`CVE-2025-24010`](https://github.com/vitejs/vite/security/advisories/GHSA-vg6x-rcgg-rjx6), you need to set: + +```js +{ + ... + "server": { + "allowedHosts": [".plt.local"] + } +} +``` + +This will allow other services inside the platformatic mesh network to contact your Vite server. + ## Configuration See the [configuration](./configuration.md) page. diff --git a/versioned_docs/version-2.35.0/packages/sql-events/fastify-plugin.md b/versioned_docs/version-2.39.0/packages/sql-events/fastify-plugin.md similarity index 100% rename from versioned_docs/version-2.35.0/packages/sql-events/fastify-plugin.md rename to versioned_docs/version-2.39.0/packages/sql-events/fastify-plugin.md diff --git a/versioned_docs/version-2.35.0/packages/sql-events/overview.md b/versioned_docs/version-2.39.0/packages/sql-events/overview.md similarity index 100% rename from versioned_docs/version-2.35.0/packages/sql-events/overview.md rename to versioned_docs/version-2.39.0/packages/sql-events/overview.md diff --git a/versioned_docs/version-2.35.0/packages/sql-graphql/examples/deleteEntity.js b/versioned_docs/version-2.39.0/packages/sql-graphql/examples/deleteEntity.js similarity index 100% rename from versioned_docs/version-2.35.0/packages/sql-graphql/examples/deleteEntity.js rename to versioned_docs/version-2.39.0/packages/sql-graphql/examples/deleteEntity.js diff --git a/versioned_docs/version-2.35.0/packages/sql-graphql/examples/insertEntity.js b/versioned_docs/version-2.39.0/packages/sql-graphql/examples/insertEntity.js similarity index 100% rename from versioned_docs/version-2.35.0/packages/sql-graphql/examples/insertEntity.js rename to versioned_docs/version-2.39.0/packages/sql-graphql/examples/insertEntity.js diff --git a/versioned_docs/version-2.35.0/packages/sql-graphql/examples/query.js b/versioned_docs/version-2.39.0/packages/sql-graphql/examples/query.js similarity index 100% rename from versioned_docs/version-2.35.0/packages/sql-graphql/examples/query.js rename to versioned_docs/version-2.39.0/packages/sql-graphql/examples/query.js diff --git a/versioned_docs/version-2.35.0/packages/sql-graphql/examples/saveEntity.js b/versioned_docs/version-2.39.0/packages/sql-graphql/examples/saveEntity.js similarity index 100% rename from versioned_docs/version-2.35.0/packages/sql-graphql/examples/saveEntity.js rename to versioned_docs/version-2.39.0/packages/sql-graphql/examples/saveEntity.js diff --git a/versioned_docs/version-2.35.0/packages/sql-graphql/ignore.md b/versioned_docs/version-2.39.0/packages/sql-graphql/ignore.md similarity index 100% rename from versioned_docs/version-2.35.0/packages/sql-graphql/ignore.md rename to versioned_docs/version-2.39.0/packages/sql-graphql/ignore.md diff --git a/versioned_docs/version-2.35.0/packages/sql-graphql/many-to-many.md b/versioned_docs/version-2.39.0/packages/sql-graphql/many-to-many.md similarity index 100% rename from versioned_docs/version-2.35.0/packages/sql-graphql/many-to-many.md rename to versioned_docs/version-2.39.0/packages/sql-graphql/many-to-many.md diff --git a/versioned_docs/version-2.35.0/packages/sql-graphql/mutations.md b/versioned_docs/version-2.39.0/packages/sql-graphql/mutations.md similarity index 100% rename from versioned_docs/version-2.35.0/packages/sql-graphql/mutations.md rename to versioned_docs/version-2.39.0/packages/sql-graphql/mutations.md diff --git a/versioned_docs/version-2.35.0/packages/sql-graphql/overview.md b/versioned_docs/version-2.39.0/packages/sql-graphql/overview.md similarity index 100% rename from versioned_docs/version-2.35.0/packages/sql-graphql/overview.md rename to versioned_docs/version-2.39.0/packages/sql-graphql/overview.md diff --git a/versioned_docs/version-2.35.0/packages/sql-graphql/queries.md b/versioned_docs/version-2.39.0/packages/sql-graphql/queries.md similarity index 100% rename from versioned_docs/version-2.35.0/packages/sql-graphql/queries.md rename to versioned_docs/version-2.39.0/packages/sql-graphql/queries.md diff --git a/versioned_docs/version-2.35.0/packages/sql-graphql/subscriptions.md b/versioned_docs/version-2.39.0/packages/sql-graphql/subscriptions.md similarity index 100% rename from versioned_docs/version-2.35.0/packages/sql-graphql/subscriptions.md rename to versioned_docs/version-2.39.0/packages/sql-graphql/subscriptions.md diff --git a/versioned_docs/version-2.35.0/packages/sql-mapper/entities/api.md b/versioned_docs/version-2.39.0/packages/sql-mapper/entities/api.md similarity index 100% rename from versioned_docs/version-2.35.0/packages/sql-mapper/entities/api.md rename to versioned_docs/version-2.39.0/packages/sql-mapper/entities/api.md diff --git a/versioned_docs/version-2.35.0/packages/sql-mapper/entities/example.md b/versioned_docs/version-2.39.0/packages/sql-mapper/entities/example.md similarity index 100% rename from versioned_docs/version-2.35.0/packages/sql-mapper/entities/example.md rename to versioned_docs/version-2.39.0/packages/sql-mapper/entities/example.md diff --git a/versioned_docs/version-2.35.0/packages/sql-mapper/entities/fields.md b/versioned_docs/version-2.39.0/packages/sql-mapper/entities/fields.md similarity index 100% rename from versioned_docs/version-2.35.0/packages/sql-mapper/entities/fields.md rename to versioned_docs/version-2.39.0/packages/sql-mapper/entities/fields.md diff --git a/versioned_docs/version-2.35.0/packages/sql-mapper/entities/hooks.md b/versioned_docs/version-2.39.0/packages/sql-mapper/entities/hooks.md similarity index 100% rename from versioned_docs/version-2.35.0/packages/sql-mapper/entities/hooks.md rename to versioned_docs/version-2.39.0/packages/sql-mapper/entities/hooks.md diff --git a/versioned_docs/version-2.35.0/packages/sql-mapper/entities/overview.md b/versioned_docs/version-2.39.0/packages/sql-mapper/entities/overview.md similarity index 100% rename from versioned_docs/version-2.35.0/packages/sql-mapper/entities/overview.md rename to versioned_docs/version-2.39.0/packages/sql-mapper/entities/overview.md diff --git a/versioned_docs/version-2.35.0/packages/sql-mapper/entities/relations.md b/versioned_docs/version-2.39.0/packages/sql-mapper/entities/relations.md similarity index 100% rename from versioned_docs/version-2.35.0/packages/sql-mapper/entities/relations.md rename to versioned_docs/version-2.39.0/packages/sql-mapper/entities/relations.md diff --git a/versioned_docs/version-2.35.0/packages/sql-mapper/entities/timestamps.md b/versioned_docs/version-2.39.0/packages/sql-mapper/entities/timestamps.md similarity index 100% rename from versioned_docs/version-2.35.0/packages/sql-mapper/entities/timestamps.md rename to versioned_docs/version-2.39.0/packages/sql-mapper/entities/timestamps.md diff --git a/versioned_docs/version-2.35.0/packages/sql-mapper/entities/transactions.md b/versioned_docs/version-2.39.0/packages/sql-mapper/entities/transactions.md similarity index 100% rename from versioned_docs/version-2.35.0/packages/sql-mapper/entities/transactions.md rename to versioned_docs/version-2.39.0/packages/sql-mapper/entities/transactions.md diff --git a/versioned_docs/version-2.35.0/packages/sql-mapper/examples/count.js b/versioned_docs/version-2.39.0/packages/sql-mapper/examples/count.js similarity index 100% rename from versioned_docs/version-2.35.0/packages/sql-mapper/examples/count.js rename to versioned_docs/version-2.39.0/packages/sql-mapper/examples/count.js diff --git a/versioned_docs/version-2.35.0/packages/sql-mapper/examples/delete.js b/versioned_docs/version-2.39.0/packages/sql-mapper/examples/delete.js similarity index 100% rename from versioned_docs/version-2.35.0/packages/sql-mapper/examples/delete.js rename to versioned_docs/version-2.39.0/packages/sql-mapper/examples/delete.js diff --git a/versioned_docs/version-2.35.0/packages/sql-mapper/examples/fastify-plugin.js b/versioned_docs/version-2.39.0/packages/sql-mapper/examples/fastify-plugin.js similarity index 100% rename from versioned_docs/version-2.35.0/packages/sql-mapper/examples/fastify-plugin.js rename to versioned_docs/version-2.39.0/packages/sql-mapper/examples/fastify-plugin.js diff --git a/versioned_docs/version-2.35.0/packages/sql-mapper/examples/fields.js b/versioned_docs/version-2.39.0/packages/sql-mapper/examples/fields.js similarity index 100% rename from versioned_docs/version-2.35.0/packages/sql-mapper/examples/fields.js rename to versioned_docs/version-2.39.0/packages/sql-mapper/examples/fields.js diff --git a/versioned_docs/version-2.35.0/packages/sql-mapper/examples/find.js b/versioned_docs/version-2.39.0/packages/sql-mapper/examples/find.js similarity index 100% rename from versioned_docs/version-2.35.0/packages/sql-mapper/examples/find.js rename to versioned_docs/version-2.39.0/packages/sql-mapper/examples/find.js diff --git a/versioned_docs/version-2.35.0/packages/sql-mapper/examples/hooks.js b/versioned_docs/version-2.39.0/packages/sql-mapper/examples/hooks.js similarity index 100% rename from versioned_docs/version-2.35.0/packages/sql-mapper/examples/hooks.js rename to versioned_docs/version-2.39.0/packages/sql-mapper/examples/hooks.js diff --git a/versioned_docs/version-2.35.0/packages/sql-mapper/examples/insert.js b/versioned_docs/version-2.39.0/packages/sql-mapper/examples/insert.js similarity index 100% rename from versioned_docs/version-2.35.0/packages/sql-mapper/examples/insert.js rename to versioned_docs/version-2.39.0/packages/sql-mapper/examples/insert.js diff --git a/versioned_docs/version-2.35.0/packages/sql-mapper/examples/relations.js b/versioned_docs/version-2.39.0/packages/sql-mapper/examples/relations.js similarity index 100% rename from versioned_docs/version-2.35.0/packages/sql-mapper/examples/relations.js rename to versioned_docs/version-2.39.0/packages/sql-mapper/examples/relations.js diff --git a/versioned_docs/version-2.35.0/packages/sql-mapper/examples/save.js b/versioned_docs/version-2.39.0/packages/sql-mapper/examples/save.js similarity index 100% rename from versioned_docs/version-2.35.0/packages/sql-mapper/examples/save.js rename to versioned_docs/version-2.39.0/packages/sql-mapper/examples/save.js diff --git a/versioned_docs/version-2.35.0/packages/sql-mapper/fastify-plugin.md b/versioned_docs/version-2.39.0/packages/sql-mapper/fastify-plugin.md similarity index 100% rename from versioned_docs/version-2.35.0/packages/sql-mapper/fastify-plugin.md rename to versioned_docs/version-2.39.0/packages/sql-mapper/fastify-plugin.md diff --git a/versioned_docs/version-2.35.0/packages/sql-mapper/images/plt-db-hooks.svg b/versioned_docs/version-2.39.0/packages/sql-mapper/images/plt-db-hooks.svg similarity index 100% rename from versioned_docs/version-2.35.0/packages/sql-mapper/images/plt-db-hooks.svg rename to versioned_docs/version-2.39.0/packages/sql-mapper/images/plt-db-hooks.svg diff --git a/versioned_docs/version-2.35.0/packages/sql-mapper/overview.md b/versioned_docs/version-2.39.0/packages/sql-mapper/overview.md similarity index 100% rename from versioned_docs/version-2.35.0/packages/sql-mapper/overview.md rename to versioned_docs/version-2.39.0/packages/sql-mapper/overview.md diff --git a/versioned_docs/version-2.35.0/packages/sql-openapi/api.md b/versioned_docs/version-2.39.0/packages/sql-openapi/api.md similarity index 100% rename from versioned_docs/version-2.35.0/packages/sql-openapi/api.md rename to versioned_docs/version-2.39.0/packages/sql-openapi/api.md diff --git a/versioned_docs/version-2.35.0/packages/sql-openapi/explicit-include.md b/versioned_docs/version-2.39.0/packages/sql-openapi/explicit-include.md similarity index 100% rename from versioned_docs/version-2.35.0/packages/sql-openapi/explicit-include.md rename to versioned_docs/version-2.39.0/packages/sql-openapi/explicit-include.md diff --git a/versioned_docs/version-2.35.0/packages/sql-openapi/ignore.md b/versioned_docs/version-2.39.0/packages/sql-openapi/ignore.md similarity index 100% rename from versioned_docs/version-2.35.0/packages/sql-openapi/ignore.md rename to versioned_docs/version-2.39.0/packages/sql-openapi/ignore.md diff --git a/versioned_docs/version-2.35.0/packages/sql-openapi/overview.md b/versioned_docs/version-2.39.0/packages/sql-openapi/overview.md similarity index 100% rename from versioned_docs/version-2.35.0/packages/sql-openapi/overview.md rename to versioned_docs/version-2.39.0/packages/sql-openapi/overview.md diff --git a/versioned_docs/version-2.35.0/packages/vite/configuration.md b/versioned_docs/version-2.39.0/packages/vite/configuration.md similarity index 100% rename from versioned_docs/version-2.35.0/packages/vite/configuration.md rename to versioned_docs/version-2.39.0/packages/vite/configuration.md diff --git a/versioned_docs/version-2.35.0/packages/vite/overview.md b/versioned_docs/version-2.39.0/packages/vite/overview.md similarity index 86% rename from versioned_docs/version-2.35.0/packages/vite/overview.md rename to versioned_docs/version-2.39.0/packages/vite/overview.md index dbea802fc5..ef87e2e25a 100644 --- a/versioned_docs/version-2.35.0/packages/vite/overview.md +++ b/versioned_docs/version-2.39.0/packages/vite/overview.md @@ -26,6 +26,7 @@ You are all set, you can now start your runtime as usual via `wattpm dev` or `pl } ``` + ## Architecture When running in development mode, the Vite development server is run a in worker thread in the same process of the Platformatic runtime. The server port is chosen randomly and it will override any user setting. @@ -36,6 +37,21 @@ In both modes if the service uses the `commands` property then it's responsible If the application is a SSR application, it is only supported if using [`@fastify/vite`](https://fastify-vite.dev/). +### Using custom commands and @fastify/vite + +Due to [`CVE-2025-24010`](https://github.com/vitejs/vite/security/advisories/GHSA-vg6x-rcgg-rjx6), you need to set: + +```js +{ + ... + "server": { + "allowedHosts": [".plt.local"] + } +} +``` + +This will allow other services inside the platformatic mesh network to contact your Vite server. + ## Configuration See the [configuration](./configuration.md) page. diff --git a/versioned_docs/version-2.35.0/runtime/_shared-configuration.md b/versioned_docs/version-2.39.0/runtime/_shared-configuration.md similarity index 93% rename from versioned_docs/version-2.35.0/runtime/_shared-configuration.md rename to versioned_docs/version-2.39.0/runtime/_shared-configuration.md index 94e1917013..05d5c509e4 100644 --- a/versioned_docs/version-2.35.0/runtime/_shared-configuration.md +++ b/versioned_docs/version-2.39.0/runtime/_shared-configuration.md @@ -40,6 +40,7 @@ The `autoload` configuration is intended to be used with monorepo applications. - **`workers`** (`number`) - The number of workers to start for this service. If the service is the entrypoint or if the runtime is running in development mode this value is ignored and hardcoded to `1`. - **`health`** (object): Configures the health check for each worker of the service. It supports all the properties also supported in the runtime [health](#health) property. The values specified here overrides the values specified in the runtime. - **`preload`** (`string` or `array` of `string`s): A file or a list of files to load before the service code. + - **`arguments`** (`array` of `string`s) - The arguments to pass to the service. They will be available in `process.argv`. - **`nodeOptions`** (`string`): The `NODE_OPTIONS` to apply to the service. These options are appended to any existing option. ### `preload` @@ -70,6 +71,7 @@ runtime. Each service object supports the following settings: on `127.0.0.1`, and exposed to the other services via that port, on default it is set to `false`. Set it to `true` if you are using [@fastify/express](https://github.com/fastify/fastify-express). - **`workers`** (`number`) - The number of workers to start for this service. If the service is the entrypoint or if the runtime is running in development mode this value is ignored and hardcoded to `1`. - **`health`** (object): Configures the health check for each worker of the service. It supports all the properties also supported in the runtime [health](#health) property. The values specified here overrides the values specified in the runtime. +- **`arguments`** (`array` of `string`s) - The arguments to pass to the service. They will be available in `process.argv`. - **`envfile`** (`string`) - The path to an `.env` file to load for the service. - **`env`** (`object`) - An object containing environment variables to set for the service. Values set here takes precedence over values set in the `envfile`. - **`sourceMaps`** (`boolean`) - If `true`, source maps are enabled for the service. Default: `false`. @@ -81,6 +83,39 @@ If this property is present, then the services will not be reordered according t `getBootstrapDependencies` function and they will be started in the order they are defined in the configuration file. +- **`telemetry`** (`object`): containing an `instrumentations` array to optionally configure additional open telemetry + intrumentations per service, e.g.: + +```json +"services": [ + { + "id": "api", + "path": "./services/api", + "telemetry": { + "instrumentations": ["@opentelemetry/instrumentation-express"] + } + } + ] +``` + +It's possible to specify the name of the export of the instrumentation and/or the options: + +```json +"services": [ + { + "id": "api", + "path": "./services/api", + "telemetry": { + "instrumentations": [{ + "package": "@opentelemetry/instrumentation-express", + "exportName": "ExpressInstrumentation", + "options": {} + }] + } + } + ] +``` + ### `web` An alias for `services`. If both are present, their content will be merged. @@ -207,6 +242,9 @@ It can be a boolean or an object with the following settings: - **`store`** (`string`) - The store to use for the cache. Set an npm package name to use a custom store or path to a file to use a custom store from a file. By default, the `memory` store is used. - **`methods`** (`array`) - The HTTP methods to cache. By default, GET and HEAD methods are cached. - **`cacheTagsHeader`** (`string`) - The header to use for cache tags. +- **`maxCount`** (`integer`) - The maximum number of entries in the cache. +- **`maxSize`** (`integer`) - The maximum size of the cache in bytes. +- **`maxEntrySize`** (`integer`) - The maximum size of a single entry in the cache in bytes. ### `server` diff --git a/versioned_docs/version-2.35.0/runtime/configuration.md b/versioned_docs/version-2.39.0/runtime/configuration.md similarity index 100% rename from versioned_docs/version-2.35.0/runtime/configuration.md rename to versioned_docs/version-2.39.0/runtime/configuration.md diff --git a/versioned_docs/version-2.35.0/runtime/overview.md b/versioned_docs/version-2.39.0/runtime/overview.md similarity index 100% rename from versioned_docs/version-2.35.0/runtime/overview.md rename to versioned_docs/version-2.39.0/runtime/overview.md diff --git a/versioned_docs/version-2.35.0/runtime/programmatic.md b/versioned_docs/version-2.39.0/runtime/programmatic.md similarity index 100% rename from versioned_docs/version-2.35.0/runtime/programmatic.md rename to versioned_docs/version-2.39.0/runtime/programmatic.md diff --git a/versioned_docs/version-2.35.0/service/configuration.md b/versioned_docs/version-2.39.0/service/configuration.md similarity index 100% rename from versioned_docs/version-2.35.0/service/configuration.md rename to versioned_docs/version-2.39.0/service/configuration.md diff --git a/versioned_docs/version-2.35.0/service/overview.md b/versioned_docs/version-2.39.0/service/overview.md similarity index 100% rename from versioned_docs/version-2.35.0/service/overview.md rename to versioned_docs/version-2.39.0/service/overview.md diff --git a/versioned_docs/version-2.35.0/service/plugin.md b/versioned_docs/version-2.39.0/service/plugin.md similarity index 100% rename from versioned_docs/version-2.35.0/service/plugin.md rename to versioned_docs/version-2.39.0/service/plugin.md diff --git a/versioned_docs/version-2.35.0/service/programmatic.md b/versioned_docs/version-2.39.0/service/programmatic.md similarity index 100% rename from versioned_docs/version-2.35.0/service/programmatic.md rename to versioned_docs/version-2.39.0/service/programmatic.md diff --git a/versioned_docs/version-2.35.0/watt/configuration.md b/versioned_docs/version-2.39.0/watt/configuration.md similarity index 100% rename from versioned_docs/version-2.35.0/watt/configuration.md rename to versioned_docs/version-2.39.0/watt/configuration.md diff --git a/versioned_docs/version-2.35.0/watt/overview.md b/versioned_docs/version-2.39.0/watt/overview.md similarity index 100% rename from versioned_docs/version-2.35.0/watt/overview.md rename to versioned_docs/version-2.39.0/watt/overview.md diff --git a/versioned_docs/version-2.35.0/watt/reference.md b/versioned_docs/version-2.39.0/watt/reference.md similarity index 100% rename from versioned_docs/version-2.35.0/watt/reference.md rename to versioned_docs/version-2.39.0/watt/reference.md diff --git a/versioned_sidebars/version-2.35.0-sidebars.json b/versioned_sidebars/version-2.39.0-sidebars.json similarity index 98% rename from versioned_sidebars/version-2.35.0-sidebars.json rename to versioned_sidebars/version-2.39.0-sidebars.json index 9c3b606aa0..603087950f 100644 --- a/versioned_sidebars/version-2.35.0-sidebars.json +++ b/versioned_sidebars/version-2.39.0-sidebars.json @@ -246,7 +246,9 @@ "guides/build-modular-monolith", "guides/logging-to-elasticsearch", "guides/jwt-keycloak", - "guides/use-env-with-platformatic" + "guides/use-env-with-platformatic", + "guides/using-watt-with-node-config", + "guides/use-watt-multiple-repository" ] }, "learn/glossary", diff --git a/versions.json b/versions.json index f0470c3fef..bc59a274d1 100644 --- a/versions.json +++ b/versions.json @@ -1,4 +1,4 @@ [ - "2.35.0", + "2.39.0", "1.53.4" ] \ No newline at end of file