Skip to content
This repository was archived by the owner on Feb 6, 2025. It is now read-only.

Commit c4148a9

Browse files
authored
Merge branch 'main' into docs/deploy-page
2 parents a3aa26e + 5583494 commit c4148a9

File tree

60 files changed

+4519
-70
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+4519
-70
lines changed

docs/dictionary/en-custom.txt

+5-1
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,8 @@ Zustand
9696
Supertokens
9797
Bitwarden
9898
Jovu
99-
Jovu's
99+
Jovu's
100+
Appsettings
101+
appsettings
102+
Codespaces
103+
Keycloak

docs/getting-started/community-plugins.md

+30-14
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
---
2-
title: Community Plugins
3-
sidebar_label: Plugins List
2+
title: Node.js Plugins
3+
sidebar_label: Node.js Plugins
44
slug: /plugins-list
55
pagination_next: plugins/overview
66
pagination_prev: getting-started/plugins
77
---
88

9-
# Amplication Community Plugins
9+
# Amplication Node.js Plugins
1010

11-
The following plugins are currently available.
11+
The following plugins are currently available for Node.js services generated by Amplication.
1212
Additional plugins will be added in future releases of Amplication.
1313

1414
:::note
15-
For the most updated list of plugins, it's recommended to check the _All Plugins_ page on your Amplication dashboard.
15+
For the most updated list of Node.js plugins, please check the _Plugins_ tab on your Amplication dashboard.
1616
:::
1717

1818
### Mongo DB
@@ -85,21 +85,15 @@ Integrate Auth0's robust authentication solutions into your service with the [Au
8585
[ESLint](https://github.com/amplication/plugins/tree/master/plugins/linter-eslint) is a library that helps find issues and enforce code style in your JavaScript code.
8686
ESLint has a wide array of rules that can be configured to enforce code quality and consistency.
8787

88-
### Redis
88+
### Redis Caching
8989

90-
[Redis](https://github.com/amplication/plugins/tree/master/plugins/cache-redis) is an open-source, in-memory data store that can be used as a database, cache, streaming engine, and message broker.
91-
Redis provides high availability via replication and high performance via caching.
92-
It is commonly used to quickly access frequently used application data.
90+
Enhance your application's performance with the [Redis Caching](https://github.com/amplication/plugins/tree/master/plugins/cache-redis) plugin. Redis is known for its fast data retrieval capabilities, making it an excellent choice for implementing caching strategies.
9391

9492
### Redis Message Broker
9593

9694
[Redis Message Broker](https://github.com/amplication/plugins/tree/master/plugins/broker-redis) is an extension of the traditional Redis in-memory data store, allowing it to function as a message broker.
9795
Install this plugin to leverage Redis's in-memory capabilities and enables asynchronous message communication between different parts of an application or between different applications.
9896

99-
### Redis Caching
100-
101-
Enhance your application's performance with the [Redis Caching](https://github.com/amplication/plugins/tree/master/plugins/cache-redis) plugin. Redis is known for its fast data retrieval capabilities, making it an excellent choice for implementing caching strategies.
102-
10397
### OpenAI
10498

10599
The [OpenAI](https://github.com/amplication/plugins/tree/master/plugins/integration-openai) plugin allows you to integrate OpenAI's various AI models into your Amplication app.
@@ -195,8 +189,30 @@ Incorporate Hashicorp Vault's powerful secrets management capabilities with the
195189

196190
### JSON Logger
197191

198-
The JSON Logger Plugin is designed for logging in JSON format. It offers configurable log levels, including 'fatal', 'error', 'warn', 'info', 'debug', 'trace', and 'silent'. Users can also add custom properties to log messages.
192+
The [JSON Logger Plugin](https://github.com/amplication/plugins/tree/master/plugins/logger-json) is designed for logging in JSON format. It offers configurable log levels, including 'fatal', 'error', 'warn', 'info', 'debug', 'trace', and 'silent'. Users can also add custom properties to log messages.
199193

200194
### MQTT
201195

202196
MQTT (Message Queuing Telemetry Transport) is an ISO standard publish-subscribe-based messaging protocol. It is designed for connections with remote locations where a "small code footprint" is required or the network bandwidth is limited. MQTT is highly scalable and is ideal for IoT devices, mobile applications, and messaging applications that require minimal data packets for communication.
197+
198+
### RabbitMQ Message Broker
199+
200+
Use RabbitMQ as a message broker to facilitate communication between your services.
201+
202+
[RabbitMQ](https://github.com/amplication/plugins/tree/master/plugins/broker-rabbitmq) is a robust, open-source message-queuing software that implements the Advanced Message Queuing Protocol (AMQP). It's known for its reliability, scalability, and support for multiple messaging protocols, making it an excellent choice for building distributed systems and microservices architectures.
203+
204+
### GitHub Codespaces Dev Container
205+
206+
Streamline your development environment setup with the [GitHub Codespaces Dev Container](https://github.com/amplication/plugins/tree/master/plugins/devcontainer-github-codespaces) plugin. This plugin configures a consistent, reproducible development environment using GitHub Codespaces, ensuring that all team members work with the same tools and dependencies.
207+
208+
### Keycloak Authentication Provider
209+
210+
Enhance your service's security with the [Keycloak Authentication Provider](https://github.com/amplication/plugins/tree/master/plugins/auth-keycloak) plugin. Keycloak is an open-source identity and access management solution that provides single sign-on, identity federation, and user management capabilities, allowing you to easily implement robust authentication and authorization in your applications.
211+
212+
### SAML Authentication Provider
213+
214+
Implement SAML (Security Assertion Markup Language) authentication in your service with the [SAML Authentication Provider](https://github.com/amplication/plugins/tree/master/plugins/auth-saml) plugin. SAML is an XML-based open standard for exchanging authentication and authorization data between parties, particularly between an identity provider and a service provider.
215+
216+
### HTTPS Transport
217+
218+
Secure your API communications with the [HTTPS Transport](https://github.com/amplication/plugins/tree/master/plugins/transport-https) plugin. This plugin enables HTTPS (Hypertext Transfer Protocol Secure) for your service, ensuring that all data transmitted between the client and server is encrypted and secure.

docs/getting-started/smart-git-sync.md

+7-3
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,10 @@ For example, let's say you've just added a new _Task_ entity to your project. On
4444

4545
This method ensures that every single change you make in your Amplication project is automatically tracked and committed to the `amplication` branch in your Git repository. You can then easily review and merge these changes through pull requests.
4646

47-
:::info
48-
After the Amplication build completes, review the PR, resolve any conflicts, and merge it. **Keep the `amplication` branch and avoid deleting it**.
47+
:::note
48+
After the Amplication build completes, review the PR, resolve any conflicts, and merge it.
49+
50+
**Keep the `amplication` branch and avoid deleting it**. In case of conflicts, handle them on the `amplication` branch and perform commits there. Regular development work should not be done on this branch.
4951
:::
5052

5153
## The `amplication` branch
@@ -61,7 +63,9 @@ For example, Amplication will base the `amplication` branch from `main` if your
6163
You can merge Amplication-made changes by merging pull requests created by Amplication from the `amplication` branch to your repository's default branch.
6264

6365
:::note
64-
Refrain from modifying the `amplication` branch directly. Creating new commits or merging changes from other branches can introduce bugs and inconsistencies. In case of conflict, delete the `amplication` branch and resolve the merge conflict in the next PR.
66+
**Do not delete the `amplication` branch**.
67+
68+
Do not modify the `amplication` branch, except to resolve conflicts. Handle conflicts directly on the `amplication` branch. Avoid creating new commits or merging changes from other branches to prevent bugs and inconsistencies.
6569
:::
6670

6771
![](./assets/sync-with-git-provider/github-pull-request.png)

docs/getting-started/sync-with-bitbucket.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -120,4 +120,14 @@ And there you have it – a new pull request ready for review.
120120

121121
![bitbucket-pull-request](./assets/sync-with-git-provider/bitbucket-pull-request.png)
122122

123-
Amplication creates pull requests from the `amplication` branch into your repository's default base branch. Pro and Enterprise users can [change the base branch for these pull requests](/how-to/change-base-branch-for-pull-requests)
123+
## Merging Amplication's Pull Request into your branch
124+
125+
Amplication creates pull requests from the `amplication` branch into your repository's default base branch.
126+
Amplication triggers the creation of a commit on the changed files whenever a new build is performed on a project.
127+
The changed files are all the files that were added, removed, or changed from the last build.
128+
129+
:::note
130+
**Do not delete the `amplication` branch**.
131+
132+
Do not modify the `amplication` branch, except to resolve conflicts. Handle conflicts directly on the `amplication` branch. Avoid creating new commits or merging changes from other branches to prevent bugs and inconsistencies.
133+
:::

docs/getting-started/sync-with-github.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,12 @@ Now let's review what happens from GitHub's side when Amplication generates a ne
142142
Amplication triggers the creation of a commit on the changed files whenever a new build is performed on a project.
143143
The changed files are all the files that were added, removed, or changed from the last build.
144144

145+
:::note
146+
**Do not delete the `amplication` branch**.
147+
148+
Do not modify the `amplication` branch, except to resolve conflicts. Handle conflicts directly on the `amplication` branch. Avoid creating new commits or merging changes from other branches to prevent bugs and inconsistencies.
149+
:::
150+
145151
![A pull request generated by Amplication on GitHub](./assets/sync-with-git-provider/github-pull-request-amplication-branch.png)
146152

147153
Amplication reduces the chances of user changes being overridden by interacting with the user’s repository through an `amplication` branch. This branch is created in your selected repository by Amplication's GitHub App.
@@ -172,7 +178,7 @@ It will take you to the specific build log for this commit on Amplication.
172178

173179
## Merging your pull request
174180

175-
After clicking on `Merge`, you can safely delete this branch. You can then navigate back to your main branch where you will find your Amplication code.
181+
After clicking on `Merge`, do not delete the `amplication` branch. You can then navigate back to your main branch where you will find your Amplication code.
176182

177183
![](./assets/sync-with-git-provider/4d38da6f-9b1c-4844-91ec-ec9b101c4503.png)
178184

docs/plugins/before-after.md

+27-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ slug: /plugins/plugin-events/plugin-events-before-after
77

88
# Before and After Lifecycle Functions
99

10-
All events expose an identical interface with two functions that can be handled by the plugin and responsible for a different step in the lifecycle of the event. One for “before” the event is emitted and another for “after” the event is emitted.
10+
All events expose an identical interface with two functions that can be handled by the plugin and responsible for a different step in the lifecycle of the event. One for "before" the event is emitted and another for "after" the event is emitted.
11+
12+
## Event Structure and Parameters
1113

1214
```tsx
1315
export interface PluginEventType<T extends EventParams> {
@@ -20,26 +22,48 @@ For each event, the type of `EventParams` is different, providing access to rele
2022

2123
```tsx
2224
export interface EventParams {}
25+
```
26+
27+
## Before and After Function Signatures
2328

29+
```tsx
2430
export type PluginBeforeEvent<T extends EventParams> = (
2531
dsgContext: DsgContext,
2632
eventParams: T
2733
) => Promisable<T>;
2834

35+
// Node.js [version](https://github.com/amplication/amplication/blob/master/libs/util/code-gen-types/src/plugins.types.ts#L21)
2936
export type PluginAfterEvent<T extends EventParams> = (
3037
dsgContext: DsgContext,
3138
eventParams: T,
3239
modules: ModuleMap
3340
) => Promisable<ModuleMap>;
41+
42+
// .NET [version](https://github.com/amplication/amplication/blob/master/libs/util/code-gen-types/src/dotnet-plugins.types.ts#L22)
43+
export type PluginAfterEvent<T extends EventParams, F> = (
44+
dsgContext: DsgContext,
45+
eventParams: T,
46+
files: FileMap<F>
47+
) => Promisable<FileMap<F>>;
3448
```
3549

3650
In the `before` and `after` functions, we have an access to the context and the event params.
3751
The [context](docs\plugins\context.md) is used to gather common parts between events.
3852
The event params manipulate the default behavior by passing different values.
3953

40-
In the `after` function, we also have access to the generated modules. An example of using this parameter is when you want to restructure the generated modules in a different folder structure.
54+
## Accessing and Modifying Generated Files
55+
56+
In the `after` function, we also have access to the generated files. An example of using this parameter is when you want to restructure the generated files in a different folder structure.
57+
58+
:::info
59+
In the `after` function for .NET plugins, we use a [`FileMap`](https://github.com/amplication/amplication/blob/master/libs/util/code-gen-types/src/files/file-map.ts). For Node.js plugins' `after` function we use a [`ModuleMap`](https://github.com/amplication/amplication/blob/master/libs/util/code-gen-types/src/code-gen-types.ts#L149).
60+
:::
61+
62+
## Function Examples
63+
64+
Most of the functions include examples. But, if you're looking for more comprehensive and real-world examples, you can explore the [code of the Amplication plugins](https://github.com/amplication/plugins/tree/master/plugins) directly. These plugins showcase various implementations and use cases for the before and after lifecycle functions.
4165

42-
## Cautionary Guidelines
66+
## Best Practices and Cautions
4367

4468
1. In the `after` function, avoid unintentionally overriding the entire generated file. Opt for smaller changes instead.
4569
2. In the `before` function, take care when modifying templates to not unintentionally affect code generation.

0 commit comments

Comments
 (0)