diff --git a/versioned_docs/version-1.9.0/contributing/contributing.md b/versioned_docs/version-1.13.0/contributing/contributing.md
similarity index 100%
rename from versioned_docs/version-1.9.0/contributing/contributing.md
rename to versioned_docs/version-1.13.0/contributing/contributing.md
diff --git a/versioned_docs/version-1.9.0/contributing/documentation-style-guide.md b/versioned_docs/version-1.13.0/contributing/documentation-style-guide.md
similarity index 100%
rename from versioned_docs/version-1.9.0/contributing/documentation-style-guide.md
rename to versioned_docs/version-1.13.0/contributing/documentation-style-guide.md
diff --git a/versioned_docs/version-1.9.0/getting-started/architecture.md b/versioned_docs/version-1.13.0/getting-started/architecture.md
similarity index 98%
rename from versioned_docs/version-1.9.0/getting-started/architecture.md
rename to versioned_docs/version-1.13.0/getting-started/architecture.md
index d6c5ee1d2e..fd70ea337e 100644
--- a/versioned_docs/version-1.9.0/getting-started/architecture.md
+++ b/versioned_docs/version-1.13.0/getting-started/architecture.md
@@ -16,7 +16,7 @@ And finally, all Platformatic components can be deployed on [Platformatic Cloud]
A Platformatic Service is an HTTP server based on [Fastify](https://www.fastify.io/) that allows developers to build robust APIs with Node.js.
With Platformatic Service you can:
-- Add custom functionality in a [Fastify plugin](https://www.fastify.io/docs/latest/Plugins/)
+- Add custom functionality in a [Fastify plugin](https://fastify.dev/docs/latest/Reference/Plugins)
- Write plugins in JavaScript or [TypeScript](https://www.typescriptlang.org/)
- Optionally user TypeScript to write your application code
diff --git a/versioned_docs/version-1.9.0/getting-started/movie-quotes-app-tutorial.md b/versioned_docs/version-1.13.0/getting-started/movie-quotes-app-tutorial.md
similarity index 100%
rename from versioned_docs/version-1.9.0/getting-started/movie-quotes-app-tutorial.md
rename to versioned_docs/version-1.13.0/getting-started/movie-quotes-app-tutorial.md
diff --git a/versioned_docs/version-1.9.0/getting-started/new-api-project-instructions.md b/versioned_docs/version-1.13.0/getting-started/new-api-project-instructions.md
similarity index 100%
rename from versioned_docs/version-1.9.0/getting-started/new-api-project-instructions.md
rename to versioned_docs/version-1.13.0/getting-started/new-api-project-instructions.md
diff --git a/versioned_docs/version-1.9.0/getting-started/platformatic-architecture.png b/versioned_docs/version-1.13.0/getting-started/platformatic-architecture.png
similarity index 100%
rename from versioned_docs/version-1.9.0/getting-started/platformatic-architecture.png
rename to versioned_docs/version-1.13.0/getting-started/platformatic-architecture.png
diff --git a/versioned_docs/version-1.9.0/getting-started/platformatic-composer-architecture.png b/versioned_docs/version-1.13.0/getting-started/platformatic-composer-architecture.png
similarity index 100%
rename from versioned_docs/version-1.9.0/getting-started/platformatic-composer-architecture.png
rename to versioned_docs/version-1.13.0/getting-started/platformatic-composer-architecture.png
diff --git a/versioned_docs/version-1.9.0/getting-started/platformatic-db-architecture.png b/versioned_docs/version-1.13.0/getting-started/platformatic-db-architecture.png
similarity index 100%
rename from versioned_docs/version-1.9.0/getting-started/platformatic-db-architecture.png
rename to versioned_docs/version-1.13.0/getting-started/platformatic-db-architecture.png
diff --git a/versioned_docs/version-1.9.0/getting-started/platformatic-runtime-architecture.png b/versioned_docs/version-1.13.0/getting-started/platformatic-runtime-architecture.png
similarity index 100%
rename from versioned_docs/version-1.9.0/getting-started/platformatic-runtime-architecture.png
rename to versioned_docs/version-1.13.0/getting-started/platformatic-runtime-architecture.png
diff --git a/versioned_docs/version-1.9.0/getting-started/platformatic-stackables-architecture.png b/versioned_docs/version-1.13.0/getting-started/platformatic-stackables-architecture.png
similarity index 100%
rename from versioned_docs/version-1.9.0/getting-started/platformatic-stackables-architecture.png
rename to versioned_docs/version-1.13.0/getting-started/platformatic-stackables-architecture.png
diff --git a/versioned_docs/version-1.9.0/getting-started/platformatid-composer-architecture.excalidraw b/versioned_docs/version-1.13.0/getting-started/platformatid-composer-architecture.excalidraw
similarity index 100%
rename from versioned_docs/version-1.9.0/getting-started/platformatid-composer-architecture.excalidraw
rename to versioned_docs/version-1.13.0/getting-started/platformatid-composer-architecture.excalidraw
diff --git a/versioned_docs/version-1.9.0/getting-started/platformatid-db-architecture.excalidraw b/versioned_docs/version-1.13.0/getting-started/platformatid-db-architecture.excalidraw
similarity index 100%
rename from versioned_docs/version-1.9.0/getting-started/platformatid-db-architecture.excalidraw
rename to versioned_docs/version-1.13.0/getting-started/platformatid-db-architecture.excalidraw
diff --git a/versioned_docs/version-1.9.0/getting-started/platformatid-runtime-architecture.excalidraw b/versioned_docs/version-1.13.0/getting-started/platformatid-runtime-architecture.excalidraw
similarity index 100%
rename from versioned_docs/version-1.9.0/getting-started/platformatid-runtime-architecture.excalidraw
rename to versioned_docs/version-1.13.0/getting-started/platformatid-runtime-architecture.excalidraw
diff --git a/versioned_docs/version-1.9.0/getting-started/platformatid-stackables-architecture.excalidraw b/versioned_docs/version-1.13.0/getting-started/platformatid-stackables-architecture.excalidraw
similarity index 100%
rename from versioned_docs/version-1.9.0/getting-started/platformatid-stackables-architecture.excalidraw
rename to versioned_docs/version-1.13.0/getting-started/platformatid-stackables-architecture.excalidraw
diff --git a/versioned_docs/version-1.9.0/getting-started/quick-start-guide.md b/versioned_docs/version-1.13.0/getting-started/quick-start-guide.md
similarity index 100%
rename from versioned_docs/version-1.9.0/getting-started/quick-start-guide.md
rename to versioned_docs/version-1.13.0/getting-started/quick-start-guide.md
diff --git a/versioned_docs/version-1.9.0/guides/add-custom-functionality/extend-graphql.md b/versioned_docs/version-1.13.0/guides/add-custom-functionality/extend-graphql.md
similarity index 100%
rename from versioned_docs/version-1.9.0/guides/add-custom-functionality/extend-graphql.md
rename to versioned_docs/version-1.13.0/guides/add-custom-functionality/extend-graphql.md
diff --git a/versioned_docs/version-1.9.0/guides/add-custom-functionality/extend-rest.md b/versioned_docs/version-1.13.0/guides/add-custom-functionality/extend-rest.md
similarity index 100%
rename from versioned_docs/version-1.9.0/guides/add-custom-functionality/extend-rest.md
rename to versioned_docs/version-1.13.0/guides/add-custom-functionality/extend-rest.md
diff --git a/versioned_docs/version-1.9.0/guides/add-custom-functionality/introduction.md b/versioned_docs/version-1.13.0/guides/add-custom-functionality/introduction.md
similarity index 100%
rename from versioned_docs/version-1.9.0/guides/add-custom-functionality/introduction.md
rename to versioned_docs/version-1.13.0/guides/add-custom-functionality/introduction.md
diff --git a/versioned_docs/version-1.9.0/guides/add-custom-functionality/prerequisites.md b/versioned_docs/version-1.13.0/guides/add-custom-functionality/prerequisites.md
similarity index 100%
rename from versioned_docs/version-1.9.0/guides/add-custom-functionality/prerequisites.md
rename to versioned_docs/version-1.13.0/guides/add-custom-functionality/prerequisites.md
diff --git a/versioned_docs/version-1.9.0/guides/add-custom-functionality/raw-sql.md b/versioned_docs/version-1.13.0/guides/add-custom-functionality/raw-sql.md
similarity index 100%
rename from versioned_docs/version-1.9.0/guides/add-custom-functionality/raw-sql.md
rename to versioned_docs/version-1.13.0/guides/add-custom-functionality/raw-sql.md
diff --git a/versioned_docs/version-1.9.0/guides/applications-with-stackables.md b/versioned_docs/version-1.13.0/guides/applications-with-stackables.md
similarity index 96%
rename from versioned_docs/version-1.9.0/guides/applications-with-stackables.md
rename to versioned_docs/version-1.13.0/guides/applications-with-stackables.md
index 6544efb312..4b4abaa06e 100644
--- a/versioned_docs/version-1.9.0/guides/applications-with-stackables.md
+++ b/versioned_docs/version-1.13.0/guides/applications-with-stackables.md
@@ -24,7 +24,11 @@ async function foo (app, opts) {
return text
})
- await platformaticService(app, opts)
+ await app.register(platformaticService, opts)
+
+ app.get('/', async (request, reply) => {
+ return 'Your new root endpoint'
+ })
}
foo.configType = 'foo'
@@ -133,5 +137,3 @@ await start(base, process.argv.splice(2)).catch(printAndExitLoadConfigError)
```
This is the same as running with platformatic CLI, the `platformatic.json` file will be loaded from the current directory.
-
-
diff --git a/versioned_docs/version-1.9.0/guides/build-modular-monolith-images/architecture-diagram.excalidraw b/versioned_docs/version-1.13.0/guides/build-modular-monolith-images/architecture-diagram.excalidraw
similarity index 100%
rename from versioned_docs/version-1.9.0/guides/build-modular-monolith-images/architecture-diagram.excalidraw
rename to versioned_docs/version-1.13.0/guides/build-modular-monolith-images/architecture-diagram.excalidraw
diff --git a/versioned_docs/version-1.9.0/guides/build-modular-monolith-images/architecture-diagram.png b/versioned_docs/version-1.13.0/guides/build-modular-monolith-images/architecture-diagram.png
similarity index 100%
rename from versioned_docs/version-1.9.0/guides/build-modular-monolith-images/architecture-diagram.png
rename to versioned_docs/version-1.13.0/guides/build-modular-monolith-images/architecture-diagram.png
diff --git a/versioned_docs/version-1.9.0/guides/build-modular-monolith-images/create-a-static-app-workspace-01.png b/versioned_docs/version-1.13.0/guides/build-modular-monolith-images/create-a-static-app-workspace-01.png
similarity index 100%
rename from versioned_docs/version-1.9.0/guides/build-modular-monolith-images/create-a-static-app-workspace-01.png
rename to versioned_docs/version-1.13.0/guides/build-modular-monolith-images/create-a-static-app-workspace-01.png
diff --git a/versioned_docs/version-1.9.0/guides/build-modular-monolith-images/create-a-static-app-workspace-02.png b/versioned_docs/version-1.13.0/guides/build-modular-monolith-images/create-a-static-app-workspace-02.png
similarity index 100%
rename from versioned_docs/version-1.9.0/guides/build-modular-monolith-images/create-a-static-app-workspace-02.png
rename to versioned_docs/version-1.13.0/guides/build-modular-monolith-images/create-a-static-app-workspace-02.png
diff --git a/versioned_docs/version-1.9.0/guides/build-modular-monolith-images/create-an-app-on-platformati-cloud-01.png b/versioned_docs/version-1.13.0/guides/build-modular-monolith-images/create-an-app-on-platformati-cloud-01.png
similarity index 100%
rename from versioned_docs/version-1.9.0/guides/build-modular-monolith-images/create-an-app-on-platformati-cloud-01.png
rename to versioned_docs/version-1.13.0/guides/build-modular-monolith-images/create-an-app-on-platformati-cloud-01.png
diff --git a/versioned_docs/version-1.9.0/guides/build-modular-monolith-images/make-the-composed-media-service-api-read-only-01.png b/versioned_docs/version-1.13.0/guides/build-modular-monolith-images/make-the-composed-media-service-api-read-only-01.png
similarity index 100%
rename from versioned_docs/version-1.9.0/guides/build-modular-monolith-images/make-the-composed-media-service-api-read-only-01.png
rename to versioned_docs/version-1.13.0/guides/build-modular-monolith-images/make-the-composed-media-service-api-read-only-01.png
diff --git a/versioned_docs/version-1.9.0/guides/build-modular-monolith-images/start-the-runtime-app-01.png b/versioned_docs/version-1.13.0/guides/build-modular-monolith-images/start-the-runtime-app-01.png
similarity index 100%
rename from versioned_docs/version-1.9.0/guides/build-modular-monolith-images/start-the-runtime-app-01.png
rename to versioned_docs/version-1.13.0/guides/build-modular-monolith-images/start-the-runtime-app-01.png
diff --git a/versioned_docs/version-1.9.0/guides/build-modular-monolith-images/test-the-books-service-api-01.png b/versioned_docs/version-1.13.0/guides/build-modular-monolith-images/test-the-books-service-api-01.png
similarity index 100%
rename from versioned_docs/version-1.9.0/guides/build-modular-monolith-images/test-the-books-service-api-01.png
rename to versioned_docs/version-1.13.0/guides/build-modular-monolith-images/test-the-books-service-api-01.png
diff --git a/versioned_docs/version-1.9.0/guides/build-modular-monolith-images/test-the-composed-media-service-api-01.png b/versioned_docs/version-1.13.0/guides/build-modular-monolith-images/test-the-composed-media-service-api-01.png
similarity index 100%
rename from versioned_docs/version-1.9.0/guides/build-modular-monolith-images/test-the-composed-media-service-api-01.png
rename to versioned_docs/version-1.13.0/guides/build-modular-monolith-images/test-the-composed-media-service-api-01.png
diff --git a/versioned_docs/version-1.9.0/guides/build-modular-monolith-images/test-the-movies-service-api-01.png b/versioned_docs/version-1.13.0/guides/build-modular-monolith-images/test-the-movies-service-api-01.png
similarity index 100%
rename from versioned_docs/version-1.9.0/guides/build-modular-monolith-images/test-the-movies-service-api-01.png
rename to versioned_docs/version-1.13.0/guides/build-modular-monolith-images/test-the-movies-service-api-01.png
diff --git a/versioned_docs/version-1.9.0/guides/build-modular-monolith-images/test-the-people-service-01.png b/versioned_docs/version-1.13.0/guides/build-modular-monolith-images/test-the-people-service-01.png
similarity index 100%
rename from versioned_docs/version-1.9.0/guides/build-modular-monolith-images/test-the-people-service-01.png
rename to versioned_docs/version-1.13.0/guides/build-modular-monolith-images/test-the-people-service-01.png
diff --git a/versioned_docs/version-1.9.0/guides/build-modular-monolith.md b/versioned_docs/version-1.13.0/guides/build-modular-monolith.md
similarity index 100%
rename from versioned_docs/version-1.9.0/guides/build-modular-monolith.md
rename to versioned_docs/version-1.13.0/guides/build-modular-monolith.md
diff --git a/versioned_docs/version-1.9.0/guides/compiling-typescript-for-deployment.md b/versioned_docs/version-1.13.0/guides/compiling-typescript-for-deployment.md
similarity index 100%
rename from versioned_docs/version-1.9.0/guides/compiling-typescript-for-deployment.md
rename to versioned_docs/version-1.13.0/guides/compiling-typescript-for-deployment.md
diff --git a/versioned_docs/version-1.9.0/guides/debug-platformatic-db.md b/versioned_docs/version-1.13.0/guides/debug-platformatic-db.md
similarity index 100%
rename from versioned_docs/version-1.9.0/guides/debug-platformatic-db.md
rename to versioned_docs/version-1.13.0/guides/debug-platformatic-db.md
diff --git a/versioned_docs/version-1.9.0/guides/deploying-on-lambda.md b/versioned_docs/version-1.13.0/guides/deploying-on-lambda.md
similarity index 100%
rename from versioned_docs/version-1.9.0/guides/deploying-on-lambda.md
rename to versioned_docs/version-1.13.0/guides/deploying-on-lambda.md
diff --git a/versioned_docs/version-1.9.0/guides/deployment/advanced-fly-io-deployment.md b/versioned_docs/version-1.13.0/guides/deployment/advanced-fly-io-deployment.md
similarity index 100%
rename from versioned_docs/version-1.9.0/guides/deployment/advanced-fly-io-deployment.md
rename to versioned_docs/version-1.13.0/guides/deployment/advanced-fly-io-deployment.md
diff --git a/versioned_docs/version-1.9.0/guides/deployment/deploy-to-fly-io-with-sqlite.md b/versioned_docs/version-1.13.0/guides/deployment/deploy-to-fly-io-with-sqlite.md
similarity index 100%
rename from versioned_docs/version-1.9.0/guides/deployment/deploy-to-fly-io-with-sqlite.md
rename to versioned_docs/version-1.13.0/guides/deployment/deploy-to-fly-io-with-sqlite.md
diff --git a/versioned_docs/version-1.9.0/guides/deployment/deployment.md b/versioned_docs/version-1.13.0/guides/deployment/deployment.md
similarity index 100%
rename from versioned_docs/version-1.9.0/guides/deployment/deployment.md
rename to versioned_docs/version-1.13.0/guides/deployment/deployment.md
diff --git a/versioned_docs/version-1.9.0/guides/dockerize-platformatic-app.md b/versioned_docs/version-1.13.0/guides/dockerize-platformatic-app.md
similarity index 100%
rename from versioned_docs/version-1.9.0/guides/dockerize-platformatic-app.md
rename to versioned_docs/version-1.13.0/guides/dockerize-platformatic-app.md
diff --git a/versioned_docs/version-1.13.0/guides/environment-variables.md b/versioned_docs/version-1.13.0/guides/environment-variables.md
new file mode 100644
index 0000000000..d2f8f8718f
--- /dev/null
+++ b/versioned_docs/version-1.13.0/guides/environment-variables.md
@@ -0,0 +1,183 @@
+import NewApiProjectInstructions from '../getting-started/new-api-project-instructions.md';
+
+# Using Environment Variables with Platformatic
+
+Applications built with Platformatic loosely follows [the twelve factor app methodology](https://12factor.net/).
+This guide will show how to make your application [configurable](https://12factor.net/config), while
+keeping your deployment environments as close as possible.
+
+## Environment Variables replacement
+
+In any Platformatic configuration file, you can always interpolate an environment variable inside a value:
+
+```json
+{
+ ...
+ "db": {
+ "connectionString": "{DATABASE_URL}"
+ }
+ ...
+}
+```
+
+The replacement is done via [`pupa`](http://npm.im/pupa), before the JSON file is parsed.
+
+All Platformatic configuration files support Environment Variables replacement, i.e.
+env variables are supported in Platformatic Service, Platformatic DB, Platformatic Composer, Platformatic Runtime.
+
+### dotenv support
+
+[`dotenv`](http://npm.im/dotenv) is built in inside Platformatic, allowing you to create an envfile with
+all your environment variables, that is loaded automatically by Platformatic at startup.
+If a `.env` file exists it will automatically be loaded by Platformatic using
+[`dotenv`](https://github.com/motdotla/dotenv). For example:
+
+```plaintext title=".env"
+DATABASE_URL=sqlite://./db.sqlite
+```
+
+The `.env` file must be located in the same folder as the Platformatic configuration
+file or in the current working directory.
+
+Environment variables can also be set directly on the command line, for example:
+
+```bash
+PLT_SERVER_LOGGER_LEVEL=debug npx platformatic start
+```
+
+### Allowed Environment Variables
+
+All placeholders in a configuration must be available as an environment variable
+and must meet the allowed placeholder name rules.
+
+### Allowed placeholder names
+
+Only placeholder names prefixed with `PLT_`, or that are in this allow list, will be
+dynamically replaced in the configuration file:
+
+- `PORT`
+- `DATABASE_URL`
+
+This restriction is to avoid accidentally exposing system environment variables.
+An error will be raised by Platformatic if it finds a configuration placeholder
+that isn't allowed.
+
+The default allow list can be extended by passing a `--allow-env` CLI option with a
+comma separated list of strings, for example:
+
+```bash
+npx platformatic start --allow-env=HOST,SERVER_LOGGER_LEVEL
+```
+
+If `--allow-env` is passed as an option to the CLI, it will be merged with the
+default allow list.
+
+### Placeholder wildcard
+
+You're also able to define a placeholder wildcard, with your own prefix, for example:
+
+```bash
+npx platformatic service start --allow-env=MY_NS_*
+# OR
+npx platformatic start --allow-env=MY_NS_*
+```
+
+This will allow you to use placeholders like `{MY_NS_MY_VAR}`.
+
+## Adding a custom environment variable to a project
+
+### Create a Platformatic DB App
+
+
+
+This same tutorial applies to all other Platformatic tools.
+
+### Modify `platformatic.db.json`
+
+Add a `greeting` option inside your `plugins` configuration:
+
+```json
+{
+ ...
+ "plugins": {
+ "paths": [
+ {
+ "path": "./plugins",
+ "encapsulate": false,
+ "options": {
+ "greeting": "{PLT_GREETING}"
+ }
+ },
+ {
+ "path": "./routes"
+ }
+ ]
+ },
+ ...
+}
+```
+
+This new options will be available inside all the options passed to
+all plugins in the `plugins/` folder.
+
+### Decorate the Fastify instance
+
+Create a new `plugins/greeting.js` file, calling [fastify.decorate()](https://fastify.dev/docs/latest/Reference/Decorators/#decorators)
+to expose some functionality to other plugins:
+
+```js
+///
+'use strict'
+/** @param {import('fastify').FastifyInstance} fastify */
+module.exports = async function (fastify, opts) {
+ fastify.decorate('sayHello', sayHello)
+
+ function sayHello (name) {
+ return `${opts.greeting} ${name}`
+ }
+}
+```
+
+### Use it inside a route
+
+Create a new `routes/hello.js` file that uses the newly added functionality, like so:
+
+```js
+///
+'use strict'
+/** @param {import('fastify').FastifyInstance} fastify */
+module.exports = async function (fastify, opts) {
+ fastify.get('/hello', {
+ schema: {
+ querystring: {
+ type: 'object',
+ properties: {
+ name: { type: 'string' }
+ }
+ },
+ required: ['name']
+ }
+ }, async (request, reply) => {
+ return fastify.sayHello(request.query.name)
+ })
+}
+```
+
+### Add an environemnt variable
+
+Edit your `.env` file and add:
+
+```
+PLT_GREETING=Hello
+```
+
+Don't forget to add a default value to your `.env.sample`, as
+the `.env` file is not committed to the repository.
+
+### Run your application and test the new route
+
+Run your application with `npm start`, and then test the new route with:
+
+```bash
+curl 'http://localhost:3042/hello?name=matteo'
+```
diff --git a/versioned_docs/version-1.9.0/guides/generate-frontend-code-to-consume-platformatic-rest-api.md b/versioned_docs/version-1.13.0/guides/generate-frontend-code-to-consume-platformatic-rest-api.md
similarity index 100%
rename from versioned_docs/version-1.9.0/guides/generate-frontend-code-to-consume-platformatic-rest-api.md
rename to versioned_docs/version-1.13.0/guides/generate-frontend-code-to-consume-platformatic-rest-api.md
diff --git a/versioned_docs/version-1.9.0/guides/images/frontend-screenshot-1.jpg b/versioned_docs/version-1.13.0/guides/images/frontend-screenshot-1.jpg
similarity index 100%
rename from versioned_docs/version-1.9.0/guides/images/frontend-screenshot-1.jpg
rename to versioned_docs/version-1.13.0/guides/images/frontend-screenshot-1.jpg
diff --git a/versioned_docs/version-1.9.0/guides/images/frontend-screenshot-2.jpg b/versioned_docs/version-1.13.0/guides/images/frontend-screenshot-2.jpg
similarity index 100%
rename from versioned_docs/version-1.9.0/guides/images/frontend-screenshot-2.jpg
rename to versioned_docs/version-1.13.0/guides/images/frontend-screenshot-2.jpg
diff --git a/versioned_docs/version-1.9.0/guides/images/frontend-screenshot-3.jpg b/versioned_docs/version-1.13.0/guides/images/frontend-screenshot-3.jpg
similarity index 100%
rename from versioned_docs/version-1.9.0/guides/images/frontend-screenshot-3.jpg
rename to versioned_docs/version-1.13.0/guides/images/frontend-screenshot-3.jpg
diff --git a/versioned_docs/version-1.9.0/guides/images/frontend-screenshot-4.jpg b/versioned_docs/version-1.13.0/guides/images/frontend-screenshot-4.jpg
similarity index 100%
rename from versioned_docs/version-1.9.0/guides/images/frontend-screenshot-4.jpg
rename to versioned_docs/version-1.13.0/guides/images/frontend-screenshot-4.jpg
diff --git a/versioned_docs/version-1.9.0/guides/images/kibana-1.png b/versioned_docs/version-1.13.0/guides/images/kibana-1.png
similarity index 100%
rename from versioned_docs/version-1.9.0/guides/images/kibana-1.png
rename to versioned_docs/version-1.13.0/guides/images/kibana-1.png
diff --git a/versioned_docs/version-1.9.0/guides/images/kibana-2.png b/versioned_docs/version-1.13.0/guides/images/kibana-2.png
similarity index 100%
rename from versioned_docs/version-1.9.0/guides/images/kibana-2.png
rename to versioned_docs/version-1.13.0/guides/images/kibana-2.png
diff --git a/versioned_docs/version-1.9.0/guides/images/kibana-3.png b/versioned_docs/version-1.13.0/guides/images/kibana-3.png
similarity index 100%
rename from versioned_docs/version-1.9.0/guides/images/kibana-3.png
rename to versioned_docs/version-1.13.0/guides/images/kibana-3.png
diff --git a/versioned_docs/version-1.9.0/guides/images/kibana-4.png b/versioned_docs/version-1.13.0/guides/images/kibana-4.png
similarity index 100%
rename from versioned_docs/version-1.9.0/guides/images/kibana-4.png
rename to versioned_docs/version-1.13.0/guides/images/kibana-4.png
diff --git a/versioned_docs/version-1.9.0/guides/jwt-auth0.md b/versioned_docs/version-1.13.0/guides/jwt-auth0.md
similarity index 100%
rename from versioned_docs/version-1.9.0/guides/jwt-auth0.md
rename to versioned_docs/version-1.13.0/guides/jwt-auth0.md
diff --git a/versioned_docs/version-1.9.0/guides/logging-to-elasticsearch.md b/versioned_docs/version-1.13.0/guides/logging-to-elasticsearch.md
similarity index 100%
rename from versioned_docs/version-1.9.0/guides/logging-to-elasticsearch.md
rename to versioned_docs/version-1.13.0/guides/logging-to-elasticsearch.md
diff --git a/versioned_docs/version-1.9.0/guides/migrating-express-app-to-platformatic-service.md b/versioned_docs/version-1.13.0/guides/migrating-express-app-to-platformatic-service.md
similarity index 100%
rename from versioned_docs/version-1.9.0/guides/migrating-express-app-to-platformatic-service.md
rename to versioned_docs/version-1.13.0/guides/migrating-express-app-to-platformatic-service.md
diff --git a/versioned_docs/version-1.9.0/guides/migrating-fastify-app-to-platformatic-service.md b/versioned_docs/version-1.13.0/guides/migrating-fastify-app-to-platformatic-service.md
similarity index 100%
rename from versioned_docs/version-1.9.0/guides/migrating-fastify-app-to-platformatic-service.md
rename to versioned_docs/version-1.13.0/guides/migrating-fastify-app-to-platformatic-service.md
diff --git a/versioned_docs/version-1.9.0/guides/monitoring.md b/versioned_docs/version-1.13.0/guides/monitoring.md
similarity index 100%
rename from versioned_docs/version-1.9.0/guides/monitoring.md
rename to versioned_docs/version-1.13.0/guides/monitoring.md
diff --git a/versioned_docs/version-1.9.0/guides/prisma.md b/versioned_docs/version-1.13.0/guides/prisma.md
similarity index 100%
rename from versioned_docs/version-1.9.0/guides/prisma.md
rename to versioned_docs/version-1.13.0/guides/prisma.md
diff --git a/versioned_docs/version-1.9.0/guides/securing-platformatic-db.md b/versioned_docs/version-1.13.0/guides/securing-platformatic-db.md
similarity index 100%
rename from versioned_docs/version-1.9.0/guides/securing-platformatic-db.md
rename to versioned_docs/version-1.13.0/guides/securing-platformatic-db.md
diff --git a/versioned_docs/version-1.9.0/guides/seed-a-database.md b/versioned_docs/version-1.13.0/guides/seed-a-database.md
similarity index 54%
rename from versioned_docs/version-1.9.0/guides/seed-a-database.md
rename to versioned_docs/version-1.13.0/guides/seed-a-database.md
index 831e9e32c0..8e0ae3d7fb 100644
--- a/versioned_docs/version-1.9.0/guides/seed-a-database.md
+++ b/versioned_docs/version-1.13.0/guides/seed-a-database.md
@@ -15,7 +15,7 @@ an instance of [`@platformatic/sql-mapper`](/reference/sql-mapper/introduction.m
```javascript title="seed.js"
'use strict'
-module.exports = async function ({ entities, db, sql }) {
+module.exports = async function seed ({ entities, db, sql }) {
await entities.graph.save({ input: { name: 'Hello' } })
await db.query(sql`
INSERT INTO graphs (name) VALUES ('Hello 2');
@@ -23,6 +23,30 @@ module.exports = async function ({ entities, db, sql }) {
}
```
+For Typescript use the following stub
+
+```typescript title="seed.ts"
+///
+import { Entities } from '@platformatic/sql-mapper'
+
+const movies: object[] = [
+ { title: 'Harry Potter' },
+ { title: 'The Matrix' }
+]
+
+export async function seed (opts: { entities: Entities }) {
+ for (const movie of movies) {
+ await opts.entities.movie.save({ input: movie })
+ }
+}
+```
+
+:::info
+Platformatic code will look for a `default` or `seed` function name when importing the file. Take a look at the `execute` function [here](https://github.com/platformatic/platformatic/blob/main/packages/db/lib/seed.mjs)
+:::
+
+
+
We can then run the seed script with the Platformatic CLI:
```bash
diff --git a/versioned_docs/version-1.9.0/guides/telemetry-images/compose-openapi.png b/versioned_docs/version-1.13.0/guides/telemetry-images/compose-openapi.png
similarity index 100%
rename from versioned_docs/version-1.9.0/guides/telemetry-images/compose-openapi.png
rename to versioned_docs/version-1.13.0/guides/telemetry-images/compose-openapi.png
diff --git a/versioned_docs/version-1.9.0/guides/telemetry-images/jaeger-1.png b/versioned_docs/version-1.13.0/guides/telemetry-images/jaeger-1.png
similarity index 100%
rename from versioned_docs/version-1.9.0/guides/telemetry-images/jaeger-1.png
rename to versioned_docs/version-1.13.0/guides/telemetry-images/jaeger-1.png
diff --git a/versioned_docs/version-1.9.0/guides/telemetry-images/jaeger-2.png b/versioned_docs/version-1.13.0/guides/telemetry-images/jaeger-2.png
similarity index 100%
rename from versioned_docs/version-1.9.0/guides/telemetry-images/jaeger-2.png
rename to versioned_docs/version-1.13.0/guides/telemetry-images/jaeger-2.png
diff --git a/versioned_docs/version-1.9.0/guides/telemetry-images/jaeger-3.png b/versioned_docs/version-1.13.0/guides/telemetry-images/jaeger-3.png
similarity index 100%
rename from versioned_docs/version-1.9.0/guides/telemetry-images/jaeger-3.png
rename to versioned_docs/version-1.13.0/guides/telemetry-images/jaeger-3.png
diff --git a/versioned_docs/version-1.9.0/guides/telemetry.md b/versioned_docs/version-1.13.0/guides/telemetry.md
similarity index 100%
rename from versioned_docs/version-1.9.0/guides/telemetry.md
rename to versioned_docs/version-1.13.0/guides/telemetry.md
diff --git a/versioned_docs/version-1.9.0/platformatic-cloud/deploy-database-neon.md b/versioned_docs/version-1.13.0/platformatic-cloud/deploy-database-neon.md
similarity index 100%
rename from versioned_docs/version-1.9.0/platformatic-cloud/deploy-database-neon.md
rename to versioned_docs/version-1.13.0/platformatic-cloud/deploy-database-neon.md
diff --git a/versioned_docs/version-1.9.0/platformatic-cloud/images/quick-start-guide/app-workspace-static-deployed.png b/versioned_docs/version-1.13.0/platformatic-cloud/images/quick-start-guide/app-workspace-static-deployed.png
similarity index 100%
rename from versioned_docs/version-1.9.0/platformatic-cloud/images/quick-start-guide/app-workspace-static-deployed.png
rename to versioned_docs/version-1.13.0/platformatic-cloud/images/quick-start-guide/app-workspace-static-deployed.png
diff --git a/versioned_docs/version-1.9.0/platformatic-cloud/images/quick-start-guide/button-continue-with-github.png b/versioned_docs/version-1.13.0/platformatic-cloud/images/quick-start-guide/button-continue-with-github.png
similarity index 100%
rename from versioned_docs/version-1.9.0/platformatic-cloud/images/quick-start-guide/button-continue-with-github.png
rename to versioned_docs/version-1.13.0/platformatic-cloud/images/quick-start-guide/button-continue-with-github.png
diff --git a/versioned_docs/version-1.9.0/platformatic-cloud/images/quick-start-guide/cloud-apps-empty.png b/versioned_docs/version-1.13.0/platformatic-cloud/images/quick-start-guide/cloud-apps-empty.png
similarity index 100%
rename from versioned_docs/version-1.9.0/platformatic-cloud/images/quick-start-guide/cloud-apps-empty.png
rename to versioned_docs/version-1.13.0/platformatic-cloud/images/quick-start-guide/cloud-apps-empty.png
diff --git a/versioned_docs/version-1.9.0/platformatic-cloud/images/quick-start-guide/github-pr-deploy-comment.png b/versioned_docs/version-1.13.0/platformatic-cloud/images/quick-start-guide/github-pr-deploy-comment.png
similarity index 100%
rename from versioned_docs/version-1.9.0/platformatic-cloud/images/quick-start-guide/github-pr-deploy-comment.png
rename to versioned_docs/version-1.13.0/platformatic-cloud/images/quick-start-guide/github-pr-deploy-comment.png
diff --git a/versioned_docs/version-1.9.0/platformatic-cloud/images/quick-start-guide/github-pr-deploy-in-progress.png b/versioned_docs/version-1.13.0/platformatic-cloud/images/quick-start-guide/github-pr-deploy-in-progress.png
similarity index 100%
rename from versioned_docs/version-1.9.0/platformatic-cloud/images/quick-start-guide/github-pr-deploy-in-progress.png
rename to versioned_docs/version-1.13.0/platformatic-cloud/images/quick-start-guide/github-pr-deploy-in-progress.png
diff --git a/versioned_docs/version-1.9.0/platformatic-cloud/images/quick-start-guide/github-pr-risk-calculation-comment.png b/versioned_docs/version-1.13.0/platformatic-cloud/images/quick-start-guide/github-pr-risk-calculation-comment.png
similarity index 100%
rename from versioned_docs/version-1.9.0/platformatic-cloud/images/quick-start-guide/github-pr-risk-calculation-comment.png
rename to versioned_docs/version-1.13.0/platformatic-cloud/images/quick-start-guide/github-pr-risk-calculation-comment.png
diff --git a/versioned_docs/version-1.9.0/platformatic-cloud/images/quick-start-guide/hello-json-response.png b/versioned_docs/version-1.13.0/platformatic-cloud/images/quick-start-guide/hello-json-response.png
similarity index 100%
rename from versioned_docs/version-1.9.0/platformatic-cloud/images/quick-start-guide/hello-json-response.png
rename to versioned_docs/version-1.13.0/platformatic-cloud/images/quick-start-guide/hello-json-response.png
diff --git a/versioned_docs/version-1.9.0/platformatic-cloud/images/quick-start-guide/platformatic-db-swagger-ui.png b/versioned_docs/version-1.13.0/platformatic-cloud/images/quick-start-guide/platformatic-db-swagger-ui.png
similarity index 100%
rename from versioned_docs/version-1.9.0/platformatic-cloud/images/quick-start-guide/platformatic-db-swagger-ui.png
rename to versioned_docs/version-1.13.0/platformatic-cloud/images/quick-start-guide/platformatic-db-swagger-ui.png
diff --git a/versioned_docs/version-1.9.0/platformatic-cloud/images/quick-start-guide/workspace-create-dynamic.png b/versioned_docs/version-1.13.0/platformatic-cloud/images/quick-start-guide/workspace-create-dynamic.png
similarity index 100%
rename from versioned_docs/version-1.9.0/platformatic-cloud/images/quick-start-guide/workspace-create-dynamic.png
rename to versioned_docs/version-1.13.0/platformatic-cloud/images/quick-start-guide/workspace-create-dynamic.png
diff --git a/versioned_docs/version-1.13.0/platformatic-cloud/images/risk-engine/github-pr-graphql-queries-diff.png b/versioned_docs/version-1.13.0/platformatic-cloud/images/risk-engine/github-pr-graphql-queries-diff.png
new file mode 100644
index 0000000000..92a2db502a
Binary files /dev/null and b/versioned_docs/version-1.13.0/platformatic-cloud/images/risk-engine/github-pr-graphql-queries-diff.png differ
diff --git a/versioned_docs/version-1.13.0/platformatic-cloud/images/risk-engine/github-pr-graphql-schema-diff.png b/versioned_docs/version-1.13.0/platformatic-cloud/images/risk-engine/github-pr-graphql-schema-diff.png
new file mode 100644
index 0000000000..81e4dbf6a8
Binary files /dev/null and b/versioned_docs/version-1.13.0/platformatic-cloud/images/risk-engine/github-pr-graphql-schema-diff.png differ
diff --git a/versioned_docs/version-1.13.0/platformatic-cloud/images/risk-engine/github-pr-risk-calculation-comment.png b/versioned_docs/version-1.13.0/platformatic-cloud/images/risk-engine/github-pr-risk-calculation-comment.png
new file mode 100644
index 0000000000..2cea58f527
Binary files /dev/null and b/versioned_docs/version-1.13.0/platformatic-cloud/images/risk-engine/github-pr-risk-calculation-comment.png differ
diff --git a/versioned_docs/version-1.13.0/platformatic-cloud/images/risk-engine/risk-engine.excalidraw b/versioned_docs/version-1.13.0/platformatic-cloud/images/risk-engine/risk-engine.excalidraw
new file mode 100644
index 0000000000..b9d45e5912
--- /dev/null
+++ b/versioned_docs/version-1.13.0/platformatic-cloud/images/risk-engine/risk-engine.excalidraw
@@ -0,0 +1,504 @@
+{
+ "type": "excalidraw",
+ "version": 2,
+ "source": "https://excalidraw.com",
+ "elements": [
+ {
+ "id": "LSLMOj5_dmrL7dIpBsrLj",
+ "type": "rectangle",
+ "x": 182.7194906534446,
+ "y": 397.67884869941304,
+ "width": 676.0000000000001,
+ "height": 333,
+ "angle": 0,
+ "strokeColor": "#1e1e1e",
+ "backgroundColor": "#eaddd7",
+ "fillStyle": "hachure",
+ "strokeWidth": 1,
+ "strokeStyle": "solid",
+ "roughness": 0,
+ "opacity": 100,
+ "groupIds": [],
+ "frameId": null,
+ "roundness": {
+ "type": 3
+ },
+ "seed": 814989401,
+ "version": 701,
+ "versionNonce": 1616057495,
+ "isDeleted": false,
+ "boundElements": null,
+ "updated": 1698940973540,
+ "link": null,
+ "locked": false
+ },
+ {
+ "id": "hgmFyK2cF_0RdFx55BZ2l",
+ "type": "text",
+ "x": 412.2393347086204,
+ "y": 412.67884869941304,
+ "width": 148.96031188964844,
+ "height": 20,
+ "angle": 0,
+ "strokeColor": "#1e1e1e",
+ "backgroundColor": "#eaddd7",
+ "fillStyle": "hachure",
+ "strokeWidth": 1,
+ "strokeStyle": "solid",
+ "roughness": 0,
+ "opacity": 100,
+ "groupIds": [],
+ "frameId": null,
+ "roundness": null,
+ "seed": 204394937,
+ "version": 182,
+ "versionNonce": 308584407,
+ "isDeleted": false,
+ "boundElements": null,
+ "updated": 1698940805397,
+ "link": null,
+ "locked": false,
+ "text": "Platformatic Cloud",
+ "fontSize": 16,
+ "fontFamily": 1,
+ "textAlign": "center",
+ "verticalAlign": "top",
+ "baseline": 14,
+ "containerId": null,
+ "originalText": "Platformatic Cloud",
+ "lineHeight": 1.25
+ },
+ {
+ "id": "CGsI-XCs_Fv94bUoDwrBo",
+ "type": "rectangle",
+ "x": 231.7194906534446,
+ "y": 490.67884869941304,
+ "width": 197.00000000000003,
+ "height": 129,
+ "angle": 0,
+ "strokeColor": "#1971c2",
+ "backgroundColor": "#eaddd7",
+ "fillStyle": "hachure",
+ "strokeWidth": 1,
+ "strokeStyle": "solid",
+ "roughness": 0,
+ "opacity": 100,
+ "groupIds": [],
+ "frameId": null,
+ "roundness": {
+ "type": 3
+ },
+ "seed": 392622937,
+ "version": 375,
+ "versionNonce": 945278583,
+ "isDeleted": false,
+ "boundElements": [
+ {
+ "type": "text",
+ "id": "QVtJ9gBJ5JQTtz0oy5590"
+ },
+ {
+ "id": "3FnD5caWrAKvnAgJujdD7",
+ "type": "arrow"
+ },
+ {
+ "id": "b0woDsvJHzgWsOkBSEnmP",
+ "type": "arrow"
+ },
+ {
+ "id": "Eh1KdTX7HvT5lopUqwVjp",
+ "type": "arrow"
+ }
+ ],
+ "updated": 1698940957514,
+ "link": null,
+ "locked": false
+ },
+ {
+ "id": "QVtJ9gBJ5JQTtz0oy5590",
+ "type": "text",
+ "x": 263.38734496252664,
+ "y": 545.178848699413,
+ "width": 133.66429138183594,
+ "height": 20,
+ "angle": 0,
+ "strokeColor": "#1971c2",
+ "backgroundColor": "#eaddd7",
+ "fillStyle": "hachure",
+ "strokeWidth": 1,
+ "strokeStyle": "solid",
+ "roughness": 0,
+ "opacity": 100,
+ "groupIds": [],
+ "frameId": null,
+ "roundness": null,
+ "seed": 1395449817,
+ "version": 324,
+ "versionNonce": 115666391,
+ "isDeleted": false,
+ "boundElements": null,
+ "updated": 1698940880495,
+ "link": null,
+ "locked": false,
+ "text": "Platformatic App",
+ "fontSize": 16,
+ "fontFamily": 1,
+ "textAlign": "center",
+ "verticalAlign": "middle",
+ "baseline": 14,
+ "containerId": "CGsI-XCs_Fv94bUoDwrBo",
+ "originalText": "Platformatic App",
+ "lineHeight": 1.25
+ },
+ {
+ "id": "q4c5YSyxyAcUij33OJHia",
+ "type": "rectangle",
+ "x": 667.7194906534446,
+ "y": 487.67884869941304,
+ "width": 108,
+ "height": 133,
+ "angle": 0,
+ "strokeColor": "#e03131",
+ "backgroundColor": "#eaddd7",
+ "fillStyle": "hachure",
+ "strokeWidth": 1,
+ "strokeStyle": "solid",
+ "roughness": 0,
+ "opacity": 100,
+ "groupIds": [],
+ "frameId": null,
+ "roundness": {
+ "type": 3
+ },
+ "seed": 1957099063,
+ "version": 215,
+ "versionNonce": 1547262457,
+ "isDeleted": false,
+ "boundElements": [
+ {
+ "type": "text",
+ "id": "A85vzlKGjZ5OS12Z6aDkL"
+ },
+ {
+ "id": "Eh1KdTX7HvT5lopUqwVjp",
+ "type": "arrow"
+ }
+ ],
+ "updated": 1698940968874,
+ "link": null,
+ "locked": false
+ },
+ {
+ "id": "A85vzlKGjZ5OS12Z6aDkL",
+ "type": "text",
+ "x": 679.3033911051048,
+ "y": 544.178848699413,
+ "width": 84.83219909667969,
+ "height": 20,
+ "angle": 0,
+ "strokeColor": "#e03131",
+ "backgroundColor": "#eaddd7",
+ "fillStyle": "hachure",
+ "strokeWidth": 1,
+ "strokeStyle": "solid",
+ "roughness": 0,
+ "opacity": 100,
+ "groupIds": [],
+ "frameId": null,
+ "roundness": null,
+ "seed": 2112145881,
+ "version": 58,
+ "versionNonce": 869118681,
+ "isDeleted": false,
+ "boundElements": null,
+ "updated": 1698940968874,
+ "link": null,
+ "locked": false,
+ "text": "Risk Engine",
+ "fontSize": 16,
+ "fontFamily": 1,
+ "textAlign": "center",
+ "verticalAlign": "middle",
+ "baseline": 14,
+ "containerId": "q4c5YSyxyAcUij33OJHia",
+ "originalText": "Risk Engine",
+ "lineHeight": 1.25
+ },
+ {
+ "id": "3FnD5caWrAKvnAgJujdD7",
+ "type": "arrow",
+ "x": 20.71949065344461,
+ "y": 528.678848699413,
+ "width": 206,
+ "height": 0,
+ "angle": 0,
+ "strokeColor": "#1e1e1e",
+ "backgroundColor": "#eaddd7",
+ "fillStyle": "hachure",
+ "strokeWidth": 1,
+ "strokeStyle": "solid",
+ "roughness": 0,
+ "opacity": 100,
+ "groupIds": [],
+ "frameId": null,
+ "roundness": {
+ "type": 2
+ },
+ "seed": 741679641,
+ "version": 35,
+ "versionNonce": 887713303,
+ "isDeleted": false,
+ "boundElements": [
+ {
+ "type": "text",
+ "id": "u1SQeUK06rLnqFHBGfHyF"
+ }
+ ],
+ "updated": 1698940914838,
+ "link": null,
+ "locked": false,
+ "points": [
+ [
+ 0,
+ 0
+ ],
+ [
+ 206,
+ 0
+ ]
+ ],
+ "lastCommittedPoint": null,
+ "startBinding": null,
+ "endBinding": {
+ "elementId": "CGsI-XCs_Fv94bUoDwrBo",
+ "focus": 0.4108527131782946,
+ "gap": 5
+ },
+ "startArrowhead": null,
+ "endArrowhead": "arrow"
+ },
+ {
+ "id": "u1SQeUK06rLnqFHBGfHyF",
+ "type": "text",
+ "x": 101.15943968908914,
+ "y": 518.678848699413,
+ "width": 45.12010192871094,
+ "height": 20,
+ "angle": 0,
+ "strokeColor": "#1e1e1e",
+ "backgroundColor": "#eaddd7",
+ "fillStyle": "hachure",
+ "strokeWidth": 1,
+ "strokeStyle": "solid",
+ "roughness": 0,
+ "opacity": 100,
+ "groupIds": [],
+ "frameId": null,
+ "roundness": null,
+ "seed": 605583927,
+ "version": 5,
+ "versionNonce": 141497625,
+ "isDeleted": false,
+ "boundElements": null,
+ "updated": 1698940912801,
+ "link": null,
+ "locked": false,
+ "text": "HTTP",
+ "fontSize": 16,
+ "fontFamily": 1,
+ "textAlign": "center",
+ "verticalAlign": "middle",
+ "baseline": 14,
+ "containerId": "3FnD5caWrAKvnAgJujdD7",
+ "originalText": "HTTP",
+ "lineHeight": 1.25
+ },
+ {
+ "type": "arrow",
+ "version": 268,
+ "versionNonce": 1972204153,
+ "isDeleted": false,
+ "id": "b0woDsvJHzgWsOkBSEnmP",
+ "fillStyle": "hachure",
+ "strokeWidth": 1,
+ "strokeStyle": "solid",
+ "roughness": 0,
+ "opacity": 100,
+ "angle": 0,
+ "x": 220.7194906534446,
+ "y": 571.678848699413,
+ "strokeColor": "#1e1e1e",
+ "backgroundColor": "#eaddd7",
+ "width": 199,
+ "height": 1,
+ "seed": 1552008569,
+ "groupIds": [],
+ "frameId": null,
+ "roundness": {
+ "type": 2
+ },
+ "boundElements": [
+ {
+ "type": "text",
+ "id": "cYO2kIA9jIKZjfxg1Mcgp"
+ }
+ ],
+ "updated": 1698940980802,
+ "link": null,
+ "locked": false,
+ "startBinding": {
+ "elementId": "CGsI-XCs_Fv94bUoDwrBo",
+ "focus": -0.2623318385650224,
+ "gap": 11
+ },
+ "endBinding": null,
+ "lastCommittedPoint": null,
+ "startArrowhead": null,
+ "endArrowhead": "arrow",
+ "points": [
+ [
+ 0,
+ 0
+ ],
+ [
+ -199,
+ -1
+ ]
+ ]
+ },
+ {
+ "type": "text",
+ "version": 7,
+ "versionNonce": 120504247,
+ "isDeleted": false,
+ "id": "cYO2kIA9jIKZjfxg1Mcgp",
+ "fillStyle": "hachure",
+ "strokeWidth": 1,
+ "strokeStyle": "solid",
+ "roughness": 0,
+ "opacity": 100,
+ "angle": 0,
+ "x": 187.15943968908914,
+ "y": 515.678848699413,
+ "strokeColor": "#1e1e1e",
+ "backgroundColor": "#eaddd7",
+ "width": 45.12010192871094,
+ "height": 20,
+ "seed": 1996271193,
+ "groupIds": [],
+ "frameId": null,
+ "roundness": null,
+ "boundElements": [],
+ "updated": 1698940919636,
+ "link": null,
+ "locked": false,
+ "fontSize": 16,
+ "fontFamily": 1,
+ "text": "HTTP",
+ "textAlign": "center",
+ "verticalAlign": "middle",
+ "containerId": "b0woDsvJHzgWsOkBSEnmP",
+ "originalText": "HTTP",
+ "lineHeight": 1.25,
+ "baseline": 14
+ },
+ {
+ "id": "Eh1KdTX7HvT5lopUqwVjp",
+ "type": "arrow",
+ "x": 431.7194906534446,
+ "y": 538.6693329751213,
+ "width": 213,
+ "height": 2.001340674629887,
+ "angle": 0,
+ "strokeColor": "#1e1e1e",
+ "backgroundColor": "#eaddd7",
+ "fillStyle": "hachure",
+ "strokeWidth": 1,
+ "strokeStyle": "dashed",
+ "roughness": 0,
+ "opacity": 100,
+ "groupIds": [],
+ "frameId": null,
+ "roundness": {
+ "type": 2
+ },
+ "seed": 719063449,
+ "version": 86,
+ "versionNonce": 1583321241,
+ "isDeleted": false,
+ "boundElements": [
+ {
+ "type": "text",
+ "id": "RIkgdsigWPg8_Frqpa8hk"
+ }
+ ],
+ "updated": 1698940968874,
+ "link": null,
+ "locked": false,
+ "points": [
+ [
+ 0,
+ 0
+ ],
+ [
+ 213,
+ 2.001340674629887
+ ]
+ ],
+ "lastCommittedPoint": null,
+ "startBinding": {
+ "elementId": "CGsI-XCs_Fv94bUoDwrBo",
+ "focus": -0.2666642966333677,
+ "gap": 3
+ },
+ "endBinding": {
+ "elementId": "q4c5YSyxyAcUij33OJHia",
+ "focus": 0.1907951823956128,
+ "gap": 23
+ },
+ "startArrowhead": null,
+ "endArrowhead": "arrow"
+ },
+ {
+ "id": "RIkgdsigWPg8_Frqpa8hk",
+ "type": "text",
+ "x": 500.7554022135032,
+ "y": 529.678848699413,
+ "width": 76.92817687988281,
+ "height": 20,
+ "angle": 0,
+ "strokeColor": "#1e1e1e",
+ "backgroundColor": "#eaddd7",
+ "fillStyle": "hachure",
+ "strokeWidth": 1,
+ "strokeStyle": "dashed",
+ "roughness": 0,
+ "opacity": 100,
+ "groupIds": [],
+ "frameId": null,
+ "roundness": null,
+ "seed": 1779260151,
+ "version": 17,
+ "versionNonce": 1768618713,
+ "isDeleted": false,
+ "boundElements": null,
+ "updated": 1698940966193,
+ "link": null,
+ "locked": false,
+ "text": "OT Spans",
+ "fontSize": 16,
+ "fontFamily": 1,
+ "textAlign": "center",
+ "verticalAlign": "middle",
+ "baseline": 14,
+ "containerId": "Eh1KdTX7HvT5lopUqwVjp",
+ "originalText": "OT Spans",
+ "lineHeight": 1.25
+ }
+ ],
+ "appState": {
+ "gridSize": null,
+ "viewBackgroundColor": "#ffffff"
+ },
+ "files": {}
+}
\ No newline at end of file
diff --git a/versioned_docs/version-1.13.0/platformatic-cloud/images/risk-engine/service-risk-engine.png b/versioned_docs/version-1.13.0/platformatic-cloud/images/risk-engine/service-risk-engine.png
new file mode 100644
index 0000000000..f728c795f0
Binary files /dev/null and b/versioned_docs/version-1.13.0/platformatic-cloud/images/risk-engine/service-risk-engine.png differ
diff --git a/versioned_docs/version-1.9.0/platformatic-cloud/pricing.md b/versioned_docs/version-1.13.0/platformatic-cloud/pricing.md
similarity index 100%
rename from versioned_docs/version-1.9.0/platformatic-cloud/pricing.md
rename to versioned_docs/version-1.13.0/platformatic-cloud/pricing.md
diff --git a/versioned_docs/version-1.9.0/platformatic-cloud/quick-start-guide.md b/versioned_docs/version-1.13.0/platformatic-cloud/quick-start-guide.md
similarity index 100%
rename from versioned_docs/version-1.9.0/platformatic-cloud/quick-start-guide.md
rename to versioned_docs/version-1.13.0/platformatic-cloud/quick-start-guide.md
diff --git a/versioned_docs/version-1.13.0/platformatic-cloud/risk-engine.md b/versioned_docs/version-1.13.0/platformatic-cloud/risk-engine.md
new file mode 100644
index 0000000000..fb006ac2df
--- /dev/null
+++ b/versioned_docs/version-1.13.0/platformatic-cloud/risk-engine.md
@@ -0,0 +1,79 @@
+# Platformatic Risk Engine
+
+Platformatic Cloud leverages opentelemetry for collecting and sending telemetry data to the Platformatic Risk Engine automatically.
+This allows Platformatic Cloud to calculate the risk of a pull request being merged into your production environment based on the potential breaking changes in the application API.
+
+For example, if a pull request adds a new endpoint, it will not be considered a breaking change and will not increase the risk score. However, if a pull request changes the open API specification for an existing endpoint, it will be considered a breaking change and will increase the risk score.
+
+Note that Platformatic does not uses "static" structural graphs for the risk calculation. Static data does not reflect the actual (and real) flow of calls, and therefore does not reflect the actual risk in front of changes. That means that if try to calculate a risk on a system where the telemetry data hasn't been collected, the risk is `0` (the system is unused, so no actual risk in changing services). To obtain significative risk evaluations, a good amount of real-usage data of the system must have been collected.
+
+For more information about the theory behind the risk calculation, please read the [Evaluating the Risk of Changes in a Microservices
+Architecture](https://arxiv.org/pdf/2309.06238.pdf) paper.
+
+To fully understand what the risk engine does, we need to give some definitions:
+
+- A **Service** is a set of Operations that are exposed by a single API. A Service is identified by a unique name.
+- An **Operation** is what it's actually exposed by a service and called.
+
+In the OpenAPI case, an operation is a combination of the `path` and the `method` of the API.
+In the GraphQL case, an operation is the type of the graphQL request (e.g. `query` or `mutation`) and the name of the query.
+
+Examples of operations exposed by OpenAPI and GraphQL services are:
+- `GET /users`
+- `POST /users`
+- `QUERY movies`
+- `MUTATION deleteMovies`
+
+From the Risk Engine point-of-view, a call to a microservice architecture is a sequence of operations of different services ("paths").
+The Risk Engine collects dynamically all the actually travelled "paths" of operations.
+When a change is created (usually in the form of a PR), it the Risk Engine can calculate the risk of the change using the data collected so far.
+
+Consider these two peculiar cases:
+
+#### A new operation is added
+In this case, the risk engine will calculate the risk of the change as `0`, because the new operation is not actually used by any other service, so it's impossible to break the system.
+
+#### An existing operation is changed, but this operation is not used by any other service
+In this case, the risk engine will calculate the risk of the change again as `0`, because the changed operation is not actually used by any other service.
+
+#### An existing operation is changed, and this operation is used by other services
+In this case the risk is calculated based on the actual usage of the changed operation. The more the operation is used, the higher the risk will be.
+
+:::info
+Running a risk evaluation on a system where there is no actual usage, the risk will be zero.
+Also, having **few** usage data might result in a misleadging risk evaluation.
+This tool has been designed to calculate the risk of changes of a live system where there is a good amount of usage data to obtain accurate risk forecast.
+:::
+
+## Risk engine in Platformatic Cloud
+When an application is deployed on the cloud, it uses [opentelemetry](https://opentelemetry.io/) library to collect services' usage data. This is done automatically by Platformatic, you don't have to configure anything on your app.
+
+![Platformatic App and Risk engine](./images/risk-engine/service-risk-engine.png)
+
+The risk engine collects automatically data about the service calls (meaning that no actual data exchanged by services are collected, just the service name, i.e. the `path` and the `method` of the calls) in the form of open telemtry `traces` of `spans`. See [Opentelemetry documentation](https://opentelemetry.io/docs/concepts/signals/traces) about the details on how the informations are sent form the services to the Risk Engine (or any other Open Telemetry backend).
+
+As said, this happens automatically and transparently in Platformatic Cloud for both OpenAPI and GraphQL services.
+
+:::info
+In the GraphQL we have only one HTTP endpoint (which is by default `POST/graphql`). In this case we assume that an operation is actually the type of the graphQL request (e.g. `query` or `mutation`) and the name of the query.
+:::
+
+When a PR is created, the risk engine is triggered and it calculates the risk of the change. This is done automatically by the Platformatic Github Action if they has been created as explaine in the [Cloud Quick Start Guide](./quick-start-guide), that:
+- Calculates the operations changed by the PR
+- Ask to the risk engine the risk of that change
+
+As result, the risk engine returns the risk of the change and the list of the operations that are affected by the change in a PR comment created automatically. This is an example of a PR comment created by the risk engine for a PR that changes an OpenAPI service inside a Platformatic Runtime:
+
+![Risk engine comment for OpenAPI changes](./images/risk-engine/github-pr-risk-calculation-comment.png)
+
+A comment for GraphQL changes is similar, but it shows the schema changes (collapsed by default):
+
+![Risk engine comment with GraphQL schema changes](./images/risk-engine/github-pr-graphql-schema-diff.png)
+
+...and the list of the affected queries/mutations:
+
+![Risk engine comment with GraphQL queries/mutations changes](./images/risk-engine/github-pr-graphql-queries-diff.png)
+
+:::info
+Note that a PR for an application exposing both OpenAPI and GraphQL and impacting both (for instance a Platformatic DB with a new migration) will have listed the changes in both OpenAPI and GraphQL schemas, but the actual risk will be common (being the risk of the whole change).
+:::
diff --git a/versioned_docs/version-1.9.0/reference/cli.md b/versioned_docs/version-1.13.0/reference/cli.md
similarity index 97%
rename from versioned_docs/version-1.9.0/reference/cli.md
rename to versioned_docs/version-1.13.0/reference/cli.md
index 75ca40bdea..fcaea88e15 100644
--- a/versioned_docs/version-1.9.0/reference/cli.md
+++ b/versioned_docs/version-1.13.0/reference/cli.md
@@ -94,6 +94,7 @@ Welcome to Platformatic. Available commands are:
* `runtime` - start Platformatic Runtime; type `platformatic runtime help` to know more.
* `start` - start a Platformatic application.
* `login` - generate a Platformatic login api key.
+* `client` - generate a Platformatic client.
#### compile
@@ -535,9 +536,11 @@ It will generate do and undo sql files in the migrations folder. The name of the
files will be the next migration number.
``` bash
- $ platformatic db migrations create --name "create_users_table"
+ $ platformatic db migrations create
```
+The migration files are named `001..sql`, `002..sql` etc...
+
Options:
* `-c, --config ` - Path to the configuration file.
@@ -742,6 +745,8 @@ Compile typescript plugins.
As a result of executing this command, Platformatic Service will compile typescript
plugins in the `outDir` directory.
+Using the `--clean` flag, the outDir directory will be removed before the new compilation process starts.
+
If not specified, the configuration will be loaded from any of the following, in the current directory.
* `platformatic.service.json`, or
@@ -876,10 +881,26 @@ Available commands:
Start the Platformatic Runtime with the following command:
-``` bash
+```bash
$ platformatic runtime start
```
+You can also specify a custom routes file, for example:
+
+```bash
+ $ platformatic runtime start routes.js
+```
+
+Where `routes.js` is:
+
+```javascript
+module.exports = async function (app) {
+ app.get('/hello', async () => {
+ return { hello: 'hello123' }
+ })
+}
+```
+
### start
diff --git a/versioned_docs/version-1.9.0/reference/client/frontend.md b/versioned_docs/version-1.13.0/reference/client/frontend.md
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/client/frontend.md
rename to versioned_docs/version-1.13.0/reference/client/frontend.md
diff --git a/versioned_docs/version-1.9.0/reference/client/introduction.md b/versioned_docs/version-1.13.0/reference/client/introduction.md
similarity index 97%
rename from versioned_docs/version-1.9.0/reference/client/introduction.md
rename to versioned_docs/version-1.13.0/reference/client/introduction.md
index 814f797400..0ac415d734 100644
--- a/versioned_docs/version-1.9.0/reference/client/introduction.md
+++ b/versioned_docs/version-1.13.0/reference/client/introduction.md
@@ -14,6 +14,10 @@ To create a client for a remote Graphql API, you can use the following command:
$ platformatic client http://exmaple.com/grapqhl --name myclient
```
+If the Platformatic app supports both OpenAPI and GraphQL, the OpenAPI client will be the one generated by default.
+
+If you want to force the generation of a specific client, pass the `--type ` parameter.
+
## Usage with Platformatic Service or Platformatic DB
If you run the generator in a Platformatic application, and it will
diff --git a/versioned_docs/version-1.9.0/reference/client/programmatic.md b/versioned_docs/version-1.13.0/reference/client/programmatic.md
similarity index 52%
rename from versioned_docs/version-1.9.0/reference/client/programmatic.md
rename to versioned_docs/version-1.13.0/reference/client/programmatic.md
index e35658a3b1..f2fb1074af 100644
--- a/versioned_docs/version-1.9.0/reference/client/programmatic.md
+++ b/versioned_docs/version-1.13.0/reference/client/programmatic.md
@@ -20,7 +20,56 @@ const res = await client.yourOperationName({ foo: 'bar' })
console.log(res)
```
-If you use Typescript you can take advantage of the generated types file
+Once you have a `client` generated from `buildOpenAPIClient`, you can access a mapping between operation IDs and method/path by leveraging the `Symbol.for('plt.operationIdMap')` property.
+
+```js
+const client = await buildOpenAPIClient({
+ // ... your client settings
+})
+
+const mapping = client[Symbol.for('plt.operationIdMap')]
+
+console.log(mapping)
+
+/**
+ *
+ * You should see something like:
+ * {
+ * getOperationFoo: { path: '/operation-foo/', method: 'get' },
+ * postOperationBar: { path: '/operation-bar/', method: 'post' },
+ * }
+ *
+ */
+
+```
+
+You're also able to pass an asynchronous function that modifies the headers for each request with the `getHeaders` option. This function will be executed before each request, just like the plugin `getHeaders` options. Note that `headers` and `getHeaders` are not mutually exclusive, and can work together:
+
+```js
+import { buildOpenAPIClient } from '@platformatic/client'
+
+const client = await buildOpenAPIClient({
+ url: `https://yourapi.com/documentation/json`,
+ headers: {
+ 'foo': 'bar'
+ },
+ getHeaders(options) {
+ const { url, method, body, headers, telemetryHeaders } = options
+
+ // generate your dynamic headers
+
+ return {
+ myDynamicHeader: 'my-value',
+ }
+ }
+})
+
+const res = await client.yourOperationName({ foo: 'bar' })
+
+console.log(res)
+```
+
+If you use Typescript you can take advantage of the generated types file:
```ts
import { buildOpenAPIClient } from '@platformatic/client'
diff --git a/versioned_docs/version-1.9.0/reference/composer/api-modification.md b/versioned_docs/version-1.13.0/reference/composer/api-modification.md
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/composer/api-modification.md
rename to versioned_docs/version-1.13.0/reference/composer/api-modification.md
diff --git a/versioned_docs/version-1.9.0/reference/composer/configuration.md b/versioned_docs/version-1.13.0/reference/composer/configuration.md
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/composer/configuration.md
rename to versioned_docs/version-1.13.0/reference/composer/configuration.md
diff --git a/versioned_docs/version-1.9.0/reference/composer/introduction.md b/versioned_docs/version-1.13.0/reference/composer/introduction.md
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/composer/introduction.md
rename to versioned_docs/version-1.13.0/reference/composer/introduction.md
diff --git a/versioned_docs/version-1.9.0/reference/composer/plugin.md b/versioned_docs/version-1.13.0/reference/composer/plugin.md
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/composer/plugin.md
rename to versioned_docs/version-1.13.0/reference/composer/plugin.md
diff --git a/versioned_docs/version-1.9.0/reference/composer/programmatic.md b/versioned_docs/version-1.13.0/reference/composer/programmatic.md
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/composer/programmatic.md
rename to versioned_docs/version-1.13.0/reference/composer/programmatic.md
diff --git a/versioned_docs/version-1.9.0/reference/db/authorization/images/http.png b/versioned_docs/version-1.13.0/reference/db/authorization/images/http.png
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/db/authorization/images/http.png
rename to versioned_docs/version-1.13.0/reference/db/authorization/images/http.png
diff --git a/versioned_docs/version-1.9.0/reference/db/authorization/images/jwt.png b/versioned_docs/version-1.13.0/reference/db/authorization/images/jwt.png
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/db/authorization/images/jwt.png
rename to versioned_docs/version-1.13.0/reference/db/authorization/images/jwt.png
diff --git a/versioned_docs/version-1.9.0/reference/db/authorization/images/sources/http.excalidraw b/versioned_docs/version-1.13.0/reference/db/authorization/images/sources/http.excalidraw
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/db/authorization/images/sources/http.excalidraw
rename to versioned_docs/version-1.13.0/reference/db/authorization/images/sources/http.excalidraw
diff --git a/versioned_docs/version-1.9.0/reference/db/authorization/images/sources/jwt.excalidraw b/versioned_docs/version-1.13.0/reference/db/authorization/images/sources/jwt.excalidraw
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/db/authorization/images/sources/jwt.excalidraw
rename to versioned_docs/version-1.13.0/reference/db/authorization/images/sources/jwt.excalidraw
diff --git a/versioned_docs/version-1.9.0/reference/db/authorization/images/sources/webhook.excalidraw b/versioned_docs/version-1.13.0/reference/db/authorization/images/sources/webhook.excalidraw
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/db/authorization/images/sources/webhook.excalidraw
rename to versioned_docs/version-1.13.0/reference/db/authorization/images/sources/webhook.excalidraw
diff --git a/versioned_docs/version-1.9.0/reference/db/authorization/images/webhook.png b/versioned_docs/version-1.13.0/reference/db/authorization/images/webhook.png
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/db/authorization/images/webhook.png
rename to versioned_docs/version-1.13.0/reference/db/authorization/images/webhook.png
diff --git a/versioned_docs/version-1.9.0/reference/db/authorization/introduction.md b/versioned_docs/version-1.13.0/reference/db/authorization/introduction.md
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/db/authorization/introduction.md
rename to versioned_docs/version-1.13.0/reference/db/authorization/introduction.md
diff --git a/versioned_docs/version-1.9.0/reference/db/authorization/rules.md b/versioned_docs/version-1.13.0/reference/db/authorization/rules.md
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/db/authorization/rules.md
rename to versioned_docs/version-1.13.0/reference/db/authorization/rules.md
diff --git a/versioned_docs/version-1.9.0/reference/db/authorization/strategies.md b/versioned_docs/version-1.13.0/reference/db/authorization/strategies.md
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/db/authorization/strategies.md
rename to versioned_docs/version-1.13.0/reference/db/authorization/strategies.md
diff --git a/versioned_docs/version-1.9.0/reference/db/authorization/user-roles-metadata.md b/versioned_docs/version-1.13.0/reference/db/authorization/user-roles-metadata.md
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/db/authorization/user-roles-metadata.md
rename to versioned_docs/version-1.13.0/reference/db/authorization/user-roles-metadata.md
diff --git a/versioned_docs/version-1.9.0/reference/db/configuration.md b/versioned_docs/version-1.13.0/reference/db/configuration.md
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/db/configuration.md
rename to versioned_docs/version-1.13.0/reference/db/configuration.md
diff --git a/versioned_docs/version-1.9.0/reference/db/introduction.md b/versioned_docs/version-1.13.0/reference/db/introduction.md
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/db/introduction.md
rename to versioned_docs/version-1.13.0/reference/db/introduction.md
diff --git a/versioned_docs/version-1.9.0/reference/db/logging.md b/versioned_docs/version-1.13.0/reference/db/logging.md
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/db/logging.md
rename to versioned_docs/version-1.13.0/reference/db/logging.md
diff --git a/versioned_docs/version-1.9.0/reference/db/migrations.md b/versioned_docs/version-1.13.0/reference/db/migrations.md
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/db/migrations.md
rename to versioned_docs/version-1.13.0/reference/db/migrations.md
diff --git a/versioned_docs/version-1.9.0/reference/db/plugin.md b/versioned_docs/version-1.13.0/reference/db/plugin.md
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/db/plugin.md
rename to versioned_docs/version-1.13.0/reference/db/plugin.md
diff --git a/versioned_docs/version-1.9.0/reference/db/programmatic.md b/versioned_docs/version-1.13.0/reference/db/programmatic.md
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/db/programmatic.md
rename to versioned_docs/version-1.13.0/reference/db/programmatic.md
diff --git a/versioned_docs/version-1.9.0/reference/db/schema-support.md b/versioned_docs/version-1.13.0/reference/db/schema-support.md
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/db/schema-support.md
rename to versioned_docs/version-1.13.0/reference/db/schema-support.md
diff --git a/versioned_docs/version-1.9.0/reference/errors.md b/versioned_docs/version-1.13.0/reference/errors.md
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/errors.md
rename to versioned_docs/version-1.13.0/reference/errors.md
diff --git a/versioned_docs/version-1.9.0/reference/runtime/configuration.md b/versioned_docs/version-1.13.0/reference/runtime/configuration.md
similarity index 97%
rename from versioned_docs/version-1.9.0/reference/runtime/configuration.md
rename to versioned_docs/version-1.13.0/reference/runtime/configuration.md
index 48945a58ac..e1b0d62846 100644
--- a/versioned_docs/version-1.9.0/reference/runtime/configuration.md
+++ b/versioned_docs/version-1.13.0/reference/runtime/configuration.md
@@ -214,3 +214,13 @@ npx platformatic runtime --allow-env=HOST,SERVER_LOGGER_LEVEL
If `--allow-env` is passed as an option to the CLI, it will be merged with the
default allow list.
+
+### Placeholder wildcard
+
+You're also able to define a placeholder wildcard, with your own prefix, for example:
+
+```bash
+npx platformatic runtime --allow-env=MY_NS_*
+```
+
+This will allow you to use placeholders like `{MY_NS_MY_VAR}`.
diff --git a/versioned_docs/version-1.9.0/reference/runtime/introduction.md b/versioned_docs/version-1.13.0/reference/runtime/introduction.md
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/runtime/introduction.md
rename to versioned_docs/version-1.13.0/reference/runtime/introduction.md
diff --git a/versioned_docs/version-1.9.0/reference/runtime/programmatic.md b/versioned_docs/version-1.13.0/reference/runtime/programmatic.md
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/runtime/programmatic.md
rename to versioned_docs/version-1.13.0/reference/runtime/programmatic.md
diff --git a/versioned_docs/version-1.9.0/reference/service/configuration.md b/versioned_docs/version-1.13.0/reference/service/configuration.md
similarity index 95%
rename from versioned_docs/version-1.9.0/reference/service/configuration.md
rename to versioned_docs/version-1.13.0/reference/service/configuration.md
index eee12e953c..774a16ba86 100644
--- a/versioned_docs/version-1.9.0/reference/service/configuration.md
+++ b/versioned_docs/version-1.13.0/reference/service/configuration.md
@@ -117,7 +117,11 @@ Supported object properties:
### `plugins`
An optional object that defines the plugins loaded by Platformatic Service.
-- **`paths`** (**required**, `array`): an array of paths (`string`)
+- **`packages`**: : an array of packages/modules (`string`)
+ or an array of objects composed as follows:
+ - `name` (`string`): the name of the package to `import`; required.
+ - `options` (`object`): Optional plugin options.
+- **`paths`** (**optional**, `array`): an array of paths (`string`)
or an array of objects composed as follows,
- `path` (`string`): Relative path to plugin's entry point.
- `options` (`object`): Optional plugin options.
@@ -140,6 +144,12 @@ _Example_
```json
{
"plugins": {
+ "packages": [{
+ "name": "@fastify/compress",
+ "options": {
+ "threshold": 1
+ }
+ }],
"paths": [{
"path": "./my-plugin.js",
"options": {
@@ -381,3 +391,15 @@ npx platformatic start --allow-env=HOST,SERVER_LOGGER_LEVEL
If `--allow-env` is passed as an option to the CLI, it will be merged with the
default allow list.
+
+### Placeholder wildcard
+
+You're also able to define a placeholder wildcard, with your own prefix, for example:
+
+```bash
+npx platformatic service start --allow-env=MY_NS_*
+# OR
+npx platformatic start --allow-env=MY_NS_*
+```
+
+This will allow you to use placeholders like `{MY_NS_MY_VAR}`.
diff --git a/versioned_docs/version-1.9.0/reference/service/introduction.md b/versioned_docs/version-1.13.0/reference/service/introduction.md
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/service/introduction.md
rename to versioned_docs/version-1.13.0/reference/service/introduction.md
diff --git a/versioned_docs/version-1.9.0/reference/service/plugin.md b/versioned_docs/version-1.13.0/reference/service/plugin.md
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/service/plugin.md
rename to versioned_docs/version-1.13.0/reference/service/plugin.md
diff --git a/versioned_docs/version-1.9.0/reference/service/programmatic.md b/versioned_docs/version-1.13.0/reference/service/programmatic.md
similarity index 94%
rename from versioned_docs/version-1.9.0/reference/service/programmatic.md
rename to versioned_docs/version-1.13.0/reference/service/programmatic.md
index 0e9871c6de..46aa873ee4 100644
--- a/versioned_docs/version-1.9.0/reference/service/programmatic.md
+++ b/versioned_docs/version-1.13.0/reference/service/programmatic.md
@@ -54,7 +54,7 @@ async function myPlugin (app, opts) {
// app.platformatic.configManager contains an instance of the ConfigManager
console.log(app.platformatic.configManager.current)
- await platformaticService(app, opts)
+ await app.register(platformaticService, opts)
}
// break Fastify encapsulation
@@ -99,6 +99,20 @@ console.log(await res.json())
await service.close()
```
+If you want to provide functionality _before_ the plugins are loaded, but after metrics and telemetry are in place,
+you can use the `beforePlugins` option:
+
+```js
+async function myPlugin (app, opts) {
+ await app.register(platformaticService, {
+ ...opts,
+ beforePlugins: [async function (app) {
+ app.decorate('myvalue', 42)
+ }]
+ })
+}
+```
+
## TypeScript support
@@ -225,7 +239,7 @@ function buildStackable () : Stackable {
// Fastify types
const app = _app as FastifyInstance & AcmeBaseMixin
- await platformaticService(app, opts)
+ await app.register(platformaticService, opts)
}
// break Fastify encapsulation
diff --git a/versioned_docs/version-1.9.0/reference/sql-events/fastify-plugin.md b/versioned_docs/version-1.13.0/reference/sql-events/fastify-plugin.md
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/sql-events/fastify-plugin.md
rename to versioned_docs/version-1.13.0/reference/sql-events/fastify-plugin.md
diff --git a/versioned_docs/version-1.9.0/reference/sql-events/introduction.md b/versioned_docs/version-1.13.0/reference/sql-events/introduction.md
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/sql-events/introduction.md
rename to versioned_docs/version-1.13.0/reference/sql-events/introduction.md
diff --git a/versioned_docs/version-1.9.0/reference/sql-graphql/examples/deleteEntity.js b/versioned_docs/version-1.13.0/reference/sql-graphql/examples/deleteEntity.js
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/sql-graphql/examples/deleteEntity.js
rename to versioned_docs/version-1.13.0/reference/sql-graphql/examples/deleteEntity.js
diff --git a/versioned_docs/version-1.9.0/reference/sql-graphql/examples/insertEntity.js b/versioned_docs/version-1.13.0/reference/sql-graphql/examples/insertEntity.js
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/sql-graphql/examples/insertEntity.js
rename to versioned_docs/version-1.13.0/reference/sql-graphql/examples/insertEntity.js
diff --git a/versioned_docs/version-1.9.0/reference/sql-graphql/examples/query.js b/versioned_docs/version-1.13.0/reference/sql-graphql/examples/query.js
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/sql-graphql/examples/query.js
rename to versioned_docs/version-1.13.0/reference/sql-graphql/examples/query.js
diff --git a/versioned_docs/version-1.9.0/reference/sql-graphql/examples/saveEntity.js b/versioned_docs/version-1.13.0/reference/sql-graphql/examples/saveEntity.js
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/sql-graphql/examples/saveEntity.js
rename to versioned_docs/version-1.13.0/reference/sql-graphql/examples/saveEntity.js
diff --git a/versioned_docs/version-1.9.0/reference/sql-graphql/ignore.md b/versioned_docs/version-1.13.0/reference/sql-graphql/ignore.md
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/sql-graphql/ignore.md
rename to versioned_docs/version-1.13.0/reference/sql-graphql/ignore.md
diff --git a/versioned_docs/version-1.9.0/reference/sql-graphql/introduction.md b/versioned_docs/version-1.13.0/reference/sql-graphql/introduction.md
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/sql-graphql/introduction.md
rename to versioned_docs/version-1.13.0/reference/sql-graphql/introduction.md
diff --git a/versioned_docs/version-1.9.0/reference/sql-graphql/many-to-many.md b/versioned_docs/version-1.13.0/reference/sql-graphql/many-to-many.md
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/sql-graphql/many-to-many.md
rename to versioned_docs/version-1.13.0/reference/sql-graphql/many-to-many.md
diff --git a/versioned_docs/version-1.9.0/reference/sql-graphql/mutations.md b/versioned_docs/version-1.13.0/reference/sql-graphql/mutations.md
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/sql-graphql/mutations.md
rename to versioned_docs/version-1.13.0/reference/sql-graphql/mutations.md
diff --git a/versioned_docs/version-1.9.0/reference/sql-graphql/queries.md b/versioned_docs/version-1.13.0/reference/sql-graphql/queries.md
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/sql-graphql/queries.md
rename to versioned_docs/version-1.13.0/reference/sql-graphql/queries.md
diff --git a/versioned_docs/version-1.9.0/reference/sql-graphql/subscriptions.md b/versioned_docs/version-1.13.0/reference/sql-graphql/subscriptions.md
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/sql-graphql/subscriptions.md
rename to versioned_docs/version-1.13.0/reference/sql-graphql/subscriptions.md
diff --git a/versioned_docs/version-1.9.0/reference/sql-mapper/entities/api.md b/versioned_docs/version-1.13.0/reference/sql-mapper/entities/api.md
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/sql-mapper/entities/api.md
rename to versioned_docs/version-1.13.0/reference/sql-mapper/entities/api.md
diff --git a/versioned_docs/version-1.9.0/reference/sql-mapper/entities/example.md b/versioned_docs/version-1.13.0/reference/sql-mapper/entities/example.md
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/sql-mapper/entities/example.md
rename to versioned_docs/version-1.13.0/reference/sql-mapper/entities/example.md
diff --git a/versioned_docs/version-1.9.0/reference/sql-mapper/entities/fields.md b/versioned_docs/version-1.13.0/reference/sql-mapper/entities/fields.md
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/sql-mapper/entities/fields.md
rename to versioned_docs/version-1.13.0/reference/sql-mapper/entities/fields.md
diff --git a/versioned_docs/version-1.9.0/reference/sql-mapper/entities/hooks.md b/versioned_docs/version-1.13.0/reference/sql-mapper/entities/hooks.md
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/sql-mapper/entities/hooks.md
rename to versioned_docs/version-1.13.0/reference/sql-mapper/entities/hooks.md
diff --git a/versioned_docs/version-1.9.0/reference/sql-mapper/entities/introduction.md b/versioned_docs/version-1.13.0/reference/sql-mapper/entities/introduction.md
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/sql-mapper/entities/introduction.md
rename to versioned_docs/version-1.13.0/reference/sql-mapper/entities/introduction.md
diff --git a/versioned_docs/version-1.9.0/reference/sql-mapper/entities/relations.md b/versioned_docs/version-1.13.0/reference/sql-mapper/entities/relations.md
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/sql-mapper/entities/relations.md
rename to versioned_docs/version-1.13.0/reference/sql-mapper/entities/relations.md
diff --git a/versioned_docs/version-1.9.0/reference/sql-mapper/entities/timestamps.md b/versioned_docs/version-1.13.0/reference/sql-mapper/entities/timestamps.md
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/sql-mapper/entities/timestamps.md
rename to versioned_docs/version-1.13.0/reference/sql-mapper/entities/timestamps.md
diff --git a/versioned_docs/version-1.9.0/reference/sql-mapper/entities/transactions.md b/versioned_docs/version-1.13.0/reference/sql-mapper/entities/transactions.md
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/sql-mapper/entities/transactions.md
rename to versioned_docs/version-1.13.0/reference/sql-mapper/entities/transactions.md
diff --git a/versioned_docs/version-1.9.0/reference/sql-mapper/examples/count.js b/versioned_docs/version-1.13.0/reference/sql-mapper/examples/count.js
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/sql-mapper/examples/count.js
rename to versioned_docs/version-1.13.0/reference/sql-mapper/examples/count.js
diff --git a/versioned_docs/version-1.9.0/reference/sql-mapper/examples/delete.js b/versioned_docs/version-1.13.0/reference/sql-mapper/examples/delete.js
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/sql-mapper/examples/delete.js
rename to versioned_docs/version-1.13.0/reference/sql-mapper/examples/delete.js
diff --git a/versioned_docs/version-1.9.0/reference/sql-mapper/examples/fastify-plugin.js b/versioned_docs/version-1.13.0/reference/sql-mapper/examples/fastify-plugin.js
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/sql-mapper/examples/fastify-plugin.js
rename to versioned_docs/version-1.13.0/reference/sql-mapper/examples/fastify-plugin.js
diff --git a/versioned_docs/version-1.9.0/reference/sql-mapper/examples/fields.js b/versioned_docs/version-1.13.0/reference/sql-mapper/examples/fields.js
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/sql-mapper/examples/fields.js
rename to versioned_docs/version-1.13.0/reference/sql-mapper/examples/fields.js
diff --git a/versioned_docs/version-1.9.0/reference/sql-mapper/examples/find.js b/versioned_docs/version-1.13.0/reference/sql-mapper/examples/find.js
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/sql-mapper/examples/find.js
rename to versioned_docs/version-1.13.0/reference/sql-mapper/examples/find.js
diff --git a/versioned_docs/version-1.9.0/reference/sql-mapper/examples/hooks.js b/versioned_docs/version-1.13.0/reference/sql-mapper/examples/hooks.js
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/sql-mapper/examples/hooks.js
rename to versioned_docs/version-1.13.0/reference/sql-mapper/examples/hooks.js
diff --git a/versioned_docs/version-1.9.0/reference/sql-mapper/examples/insert.js b/versioned_docs/version-1.13.0/reference/sql-mapper/examples/insert.js
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/sql-mapper/examples/insert.js
rename to versioned_docs/version-1.13.0/reference/sql-mapper/examples/insert.js
diff --git a/versioned_docs/version-1.9.0/reference/sql-mapper/examples/relations.js b/versioned_docs/version-1.13.0/reference/sql-mapper/examples/relations.js
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/sql-mapper/examples/relations.js
rename to versioned_docs/version-1.13.0/reference/sql-mapper/examples/relations.js
diff --git a/versioned_docs/version-1.9.0/reference/sql-mapper/examples/save.js b/versioned_docs/version-1.13.0/reference/sql-mapper/examples/save.js
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/sql-mapper/examples/save.js
rename to versioned_docs/version-1.13.0/reference/sql-mapper/examples/save.js
diff --git a/versioned_docs/version-1.9.0/reference/sql-mapper/fastify-plugin.md b/versioned_docs/version-1.13.0/reference/sql-mapper/fastify-plugin.md
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/sql-mapper/fastify-plugin.md
rename to versioned_docs/version-1.13.0/reference/sql-mapper/fastify-plugin.md
diff --git a/versioned_docs/version-1.9.0/reference/sql-mapper/images/plt-db-hooks.svg b/versioned_docs/version-1.13.0/reference/sql-mapper/images/plt-db-hooks.svg
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/sql-mapper/images/plt-db-hooks.svg
rename to versioned_docs/version-1.13.0/reference/sql-mapper/images/plt-db-hooks.svg
diff --git a/versioned_docs/version-1.9.0/reference/sql-mapper/introduction.md b/versioned_docs/version-1.13.0/reference/sql-mapper/introduction.md
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/sql-mapper/introduction.md
rename to versioned_docs/version-1.13.0/reference/sql-mapper/introduction.md
diff --git a/versioned_docs/version-1.9.0/reference/sql-openapi/api.md b/versioned_docs/version-1.13.0/reference/sql-openapi/api.md
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/sql-openapi/api.md
rename to versioned_docs/version-1.13.0/reference/sql-openapi/api.md
diff --git a/versioned_docs/version-1.9.0/reference/sql-openapi/ignore.md b/versioned_docs/version-1.13.0/reference/sql-openapi/ignore.md
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/sql-openapi/ignore.md
rename to versioned_docs/version-1.13.0/reference/sql-openapi/ignore.md
diff --git a/versioned_docs/version-1.9.0/reference/sql-openapi/introduction.md b/versioned_docs/version-1.13.0/reference/sql-openapi/introduction.md
similarity index 100%
rename from versioned_docs/version-1.9.0/reference/sql-openapi/introduction.md
rename to versioned_docs/version-1.13.0/reference/sql-openapi/introduction.md
diff --git a/versioned_sidebars/version-1.9.0-sidebars.json b/versioned_sidebars/version-1.13.0-sidebars.json
similarity index 98%
rename from versioned_sidebars/version-1.9.0-sidebars.json
rename to versioned_sidebars/version-1.13.0-sidebars.json
index 24557b357b..d4718c0a6e 100644
--- a/versioned_sidebars/version-1.9.0-sidebars.json
+++ b/versioned_sidebars/version-1.13.0-sidebars.json
@@ -53,6 +53,7 @@
"guides/jwt-auth0",
"guides/monitoring",
"guides/debug-platformatic-db",
+ "guides/environment-variables",
"guides/prisma",
"guides/generate-frontend-code-to-consume-platformatic-rest-api",
"guides/migrating-fastify-app-to-platformatic-service",
@@ -251,7 +252,8 @@
"collapsed": false,
"items": [
"platformatic-cloud/quick-start-guide",
- "platformatic-cloud/deploy-database-neon"
+ "platformatic-cloud/deploy-database-neon",
+ "platformatic-cloud/risk-engine"
]
}
]
diff --git a/versions.json b/versions.json
index f4032b092c..81e11d6143 100644
--- a/versions.json
+++ b/versions.json
@@ -1,7 +1,7 @@
[
+ "1.13.0",
"1.12.1",
"1.12.0",
"1.11.0",
- "1.10.0",
- "1.9.0"
+ "1.10.0"
]
\ No newline at end of file