diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ab0c6c9..72d87095 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ -# v0.7.5 -[2024-06-03] +# v0.8.0 +[2024-10-04] + +### Features + +* \[[550](https://github.com/MaskingTechnology/jitar/pull/550)] feat: application builds (#550) by Peter van Vliet + +# v0.7.6 +[2024-09-20] + +### Features + +* \[[542](https://github.com/MaskingTechnology/jitar/pull/542)] feat(runtime): gateway as runtime (#542) by Bas Meeuwissen ### Fixes @@ -7,6 +18,11 @@ ### Chores +* \[[533](https://github.com/MaskingTechnology/jitar/pull/533)] chore(deps): august updates (#533) by dependabot[bot] +* \[[532](https://github.com/MaskingTechnology/jitar/pull/532)] chore(dependencies): july updates (#532) by dependabot[bot] +* \[[530](https://github.com/MaskingTechnology/jitar/pull/530)] chore: sonar properties (#530) by Bas Meeuwissen +* \[[531](https://github.com/MaskingTechnology/jitar/pull/531)] chore(dependencies): bump braces from 3.0.2 to 3.0.3 (#531) by dependabot[bot] +* \[[528](https://github.com/MaskingTechnology/jitar/pull/528)] chore: release 0.7.5 (#528) by Bas Meeuwissen * \[[526](https://github.com/MaskingTechnology/jitar/pull/526)] chore: sonar issues (#526) by Bas Meeuwissen * \[[524](https://github.com/MaskingTechnology/jitar/pull/524)] chore(deps): june updates (#524) by dependabot[bot] * \[[522](https://github.com/MaskingTechnology/jitar/pull/522)] chore(examples): exclude webui folder (#522) by Bas Meeuwissen diff --git a/documentation/docs/.vitepress/config.ts b/documentation/docs/.vitepress/config.ts index 118a066c..f0350b2a 100644 --- a/documentation/docs/.vitepress/config.ts +++ b/documentation/docs/.vitepress/config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'vitepress' +import { defineConfig } from 'vitepress'; // https://vitepress.dev/reference/site-config export default defineConfig({ @@ -69,9 +69,7 @@ export default defineConfig({ text: 'MONITOR', items: [ { text: 'Logging', link: '/monitor/logging' }, - { text: 'Health', link: '/monitor/health' }, - { text: 'Procedures', link: '/monitor/procedures' }, - { text: 'Workers', link: '/monitor/workers' } + { text: 'Health', link: '/monitor/health' } ] }, { @@ -82,19 +80,11 @@ export default defineConfig({ { text: 'Migrate away from Jitar', link: '/guides/migrate-away-from-jitar' } ] }, - { - text: 'INTERNALS', - items: [ - { text: 'Caching', link: '/internals/caching' }, - { text: 'Data serialization', link: '/internals/data-serialization' }, - { text: 'Reflection', link: '/internals/reflection' } - ] - }, { text: 'EXAMPLES', items: [ { text: 'Concepts', link: '/examples/concepts' }, - { text: 'Apps', link: '/examples/apps' } + { text: 'Full stack', link: '/examples/full-stack' } ] }, { @@ -119,13 +109,14 @@ export default defineConfig({ }, socialLinks: [ + { icon: 'discord', link: 'https://discord.gg/Bqwy8azp5R' }, { icon: 'github', link: 'https://github.com/MaskingTechnology/jitar' }, - { icon: 'discord', link: 'https://discord.gg/Bqwy8azp5R' } + { icon: 'npm', link: 'https://www.npmjs.com/package/jitar' } ], footer: { message: 'Jitar is a project by Masking Technology', - copyright: 'Copyright © 2023 - Masking Technology B.V.' + copyright: 'Copyright © 2024 - Masking Technology B.V.' } } -}) +}); diff --git a/documentation/docs/community/contribute.md b/documentation/docs/community/contribute.md index c1993b99..b3f796ac 100644 --- a/documentation/docs/community/contribute.md +++ b/documentation/docs/community/contribute.md @@ -13,22 +13,22 @@ next: # Contribute -We are thrilled that you are interested in contributing to Jitar! We welcome all sorts of contributions, and there are several valuable ways to contribute. +We’re thrilled that you're interested in contributing to Jitar! We welcome all kinds of contributions, and there are many valuable ways to get involved. ## Issues -Feel free to add issues to our [issue board](https://github.com/MaskingTechnology/jitar/issues){target="_blank"}. Before adding an issue, we advise you to look at the current [discussions](https://github.com/MaskingTechnology/jitar/discussions){target="_blank"} to see if your issue is already being discussed. +Feel free to add issues to our [issue board](https://github.com/MaskingTechnology/jitar/issues){target="_blank"}. Before adding an issue, we recommend checking the current [discussions](https://github.com/MaskingTechnology/jitar/discussions){target="_blank"} to see if your issue is already being addressed. You can also vote on existing issues to help us prioritize the work that needs to be done. ## Pull requests -Jitar is an open source project and it’s open for contributions. You can pick up issues and/or submit a pull request. +Jitar is an open-source project, open to contributions. You can pick up issues or submit a pull request. ## Documentation -Did you spot a mistake in the documentation? Is the grammar of the texts incorrect? Please help us to improve the documentation. We’re non native English speakers and appreciate the help. +Did you spot a mistake in the documentation? Is the grammar incorrect? Please help us improve it. We’re non-native English speakers and would appreciate your help. ## Translation -Do you miss your native language here? The documentation is written in English only, but you’re more than welcome to translate it to your native language. +Is your native language missing here? The documentation is written only in English, but you’re more than welcome to translate it into your native language. diff --git a/documentation/docs/community/get-help.md b/documentation/docs/community/get-help.md index 220bad07..5010dd15 100644 --- a/documentation/docs/community/get-help.md +++ b/documentation/docs/community/get-help.md @@ -2,8 +2,8 @@ layout: doc prev: - text: App examples - link: /examples/apps + text: Full stack examples + link: /examples/full-stack next: text: Give feedback @@ -13,6 +13,6 @@ next: # Get help -Did you read through the docs, but still have questions? The community is here to help! +Read through the docs but still have questions? The community is here to help! You can find us on [Discord](https://discord.gg/Bqwy8azp5R){target="_blank"}, or start a [discussion on Github](https://github.com/MaskingTechnology/jitar/discussions){target="_blank"}. diff --git a/documentation/docs/community/give-feedback.md b/documentation/docs/community/give-feedback.md index a0d3b3c9..b790adb7 100644 --- a/documentation/docs/community/give-feedback.md +++ b/documentation/docs/community/give-feedback.md @@ -15,4 +15,4 @@ next: The only way to make Jitar better is by processing feedback. We value every piece of feedback, whether it’s a positive experience or a negative one. -You can reach out to us on [Discord](https://discord.gg/Bqwy8azp5R){target="_blank"} or [Github](https://github.com/MaskingTechnology/jitar/discussions){target="_blank"}. If you want to use twitter or mastodon, please mention `#jitar` so we can easily find your message. +You can reach out to us on [Discord](https://discord.gg/Bqwy8azp5R){target="_blank"} or [Github](https://github.com/MaskingTechnology/jitar/discussions){target="_blank"}. If you want to use [X](https://x.com/maskingtech){target="_blank"} or mastodon, please mention `#jitar` so we can easily find your message. diff --git a/documentation/docs/deploy/environments.md b/documentation/docs/deploy/environments.md index 4631c294..a82ac2e5 100644 --- a/documentation/docs/deploy/environments.md +++ b/documentation/docs/deploy/environments.md @@ -22,10 +22,10 @@ We like to use a standalone service for development. This requires only one Jita ```json { "url": "http://localhost:3000", + "middlewares": [...], "standalone": { "assets": [...], - "middlewares": [...] } } ``` @@ -33,7 +33,7 @@ We like to use a standalone service for development. This requires only one Jita Next you need to add a script in the `package.json` file. ```json -"standalone": "node --experimental-network-imports dist/standalone.js --config=services/standalone.json", +"standalone": "jitar start --service=services/standalone.json", ``` Now you can start the environment with NPM. diff --git a/documentation/docs/deploy/health-checks.md b/documentation/docs/deploy/health-checks.md index be80794c..c0add8ee 100644 --- a/documentation/docs/deploy/health-checks.md +++ b/documentation/docs/deploy/health-checks.md @@ -15,10 +15,6 @@ next: The [gateway service](../fundamentals/runtime-services#gateway) determines if a worker still can be used safely by frequently checking its health. Health checks are used for health determination. Jitar has no out-of-the-box health checks, but you can create and add your own. A common use case is for checking database availability. In case a worker can't access its database, we want the gateway to stop using it. Health checks can be added to any of the services. -::: warning BREAKING CHANGES -Version 0.5 introduced breaking changes. Please check our [migration guide](https://github.com/MaskingTechnology/jitar/blob/main/migrations/migrate-from-0.4.x-to-0.5.0.md) for more information. -::: - In this section you'll learn how to create and add your own health checks. ## Creating health checks @@ -33,7 +29,7 @@ export default class DatabaseHealthCheck implements HealthCheck { constructor(/* ... */) { /* ... */ } - get name() { return 'database'; } // New required property! + get name() { return 'database'; } get timeout() { return undefined; } @@ -64,11 +60,13 @@ We can use this module file for the registration at the service: "healthChecks": ["./databaseHealthCheck"], "worker": { - // ... + ... } } ``` Once added, the worker will trigger the check automatically. You can also check yourself using the health API. More information on this can be found in the [MONITOR section](../monitor/health). -**Note** that health checks are defined at the root level of the configuration. This means you can add health checks for all service types. When using external monitoring tools that monitor a cluster, this could be useful. +::: info NOTE +Health checks are defined at the root level of the configuration. This means you can add health checks for all service types. When using external monitoring tools that monitor a cluster, this could be useful. +::: diff --git a/documentation/docs/deploy/runtime-settings.md b/documentation/docs/deploy/runtime-settings.md index 0bc4f625..54d7151f 100644 --- a/documentation/docs/deploy/runtime-settings.md +++ b/documentation/docs/deploy/runtime-settings.md @@ -16,21 +16,21 @@ next: The server accepts a few command line arguments to configure its runtime behavior. A fully configured command line looks like this: ```bash -node --experimental-network-imports dist/jitar.js --config=services/standalone.json --loglevel=info --bodylimit=204800 +jitar start --service=services/standalone.json --env-file=.env --log-level=info --http-body-limit=204800 ``` -## Network imports +## Service file -Jitar is heavily dependent on network imports for importing functions and other components. Node needs the `--experimental-network-imports` flag in order to import enable this feature. +The `--service` argument must be specified to point to the server configuration file. More information regarding the configuration file can be found in the [runtime services](../fundamentals/runtime-services#basic-configuration) section. -## Log level +## Environment file -To control the level of logging, the optional `--loglevel` argument can be used. The default for this value is `info`. A more elaborate description of the log levels can be found in the [logging](../monitor/logging) section. +The `--env-file` argument can be used to specify a file that contains environment variables. This is an optional argument without a default value. -## Configuration +## Log level -The `--config` argument must be specified to point to the server configuration file. More information regarding the configuration file can be found in the [runtime services](../fundamentals/runtime-services#basic-configuration) section. +To control the level of logging, the optional `--log-level` argument can be used. The default for this value is `info`. A more elaborate description of the log levels can be found in the [logging](../monitor/logging) section. ## Body limit -To control the maximum json body size of incoming requests, the `--bodylimit` argument can be used. This is an optional argument and the body size limit defaults to 200KB if no value is provided. The value can only be set in bytes using a numeric value, e.g. `--bodylimit=1048576` for 1MB. +To control the maximum json body size of incoming requests, the `--http-body-limit` argument can be used. This is an optional argument and the body size limit defaults to 200KB if no value is provided. The value can only be set in bytes using a numeric value, e.g. `--http-body-limit=1048576` for 1MB. diff --git a/documentation/docs/develop/assets.md b/documentation/docs/develop/assets.md index c6cdfc0e..9fbdc324 100644 --- a/documentation/docs/develop/assets.md +++ b/documentation/docs/develop/assets.md @@ -20,8 +20,6 @@ Assets like images, documents, etc. can be placed in any location inside the sou "url": "http://repository.example.com:3000", "repository": { - "source": "./src", - "cache": "./.jitar", "index": "index.html", "assets": ["*.html", "*.js", "*.css", "assets/**/*"] } @@ -29,4 +27,3 @@ Assets like images, documents, etc. can be placed in any location inside the sou ``` Assets can be whitelisted per file, or by using glob patterns. For example the pattern `assets/**/*` whitelists all files and subfolder files in the assets folder. - diff --git a/documentation/docs/develop/data-sharing.md b/documentation/docs/develop/data-sharing.md index 28b46545..1630959c 100644 --- a/documentation/docs/develop/data-sharing.md +++ b/documentation/docs/develop/data-sharing.md @@ -21,7 +21,7 @@ Most of what you're learning here is not Jitar specific and applies to building ## Automatic (de)serialization -All parameters and return values are (de)serialized automatically for remote functions. Jitar provides a [powerful (de)serializer](../internals/data-serialization) that is able to transport any (complex) data type. By default all built-in JavaScript objects are supported like maps, sets, dates, etc. There's also support for custom classes. +All parameters and return values are (de)serialized automatically for remote functions. Jitar provides a powerful (de)serializer that is able to transport any (complex) data type. By default all built-in JavaScript objects are supported like maps, sets, dates, etc. There's also support for custom classes. ## Using objects When working with objects it's important to know that the other end always receives a copy of the object, and not the actual object itself. If you don't take this into account the application behaves differently in a distributed setup. Take for example the following setup. diff --git a/documentation/docs/develop/middleware.md b/documentation/docs/develop/middleware.md index 51cc0096..e8eac700 100644 --- a/documentation/docs/develop/middleware.md +++ b/documentation/docs/develop/middleware.md @@ -15,10 +15,6 @@ next: Middleware provides a way to hook into Jitars automated communication system. It allows you to add additional logic to incoming and outgoing requests. Common use cases are adding authentication and logging to applications. -::: warning BREAKING CHANGES -Version 0.5 introduced breaking changes. Please check our [migration guide](https://github.com/MaskingTechnology/jitar/blob/main/migrations/migrate-from-0.4.x-to-0.5.0.md) for more information. -::: - In this section you'll learn how to create and add your own middleware. ## Creating middleware @@ -105,15 +101,14 @@ We can use this module file for the registration at the service: // services/worker.json { "url": "http://localhost:3000", + "middlewares": ["./defaultRequestLogger"], "worker": { - "middlewares": ["./defaultRequestLogger"] + ... } } ``` -**Note** that middleware can only be added to a worker, gateway, proxy and standalone service because they are actively involved with the communication system. - It's likely that different services require different middleware. For example, you might want to add authentication middleware to the gateway and authorization middleware to the worker. ::: warning KEEP IN MIND diff --git a/documentation/docs/develop/validation.md b/documentation/docs/develop/validation.md index ae160a79..a3afba5d 100644 --- a/documentation/docs/develop/validation.md +++ b/documentation/docs/develop/validation.md @@ -13,4 +13,6 @@ next: # Validation -Jitar does not automatically validate data that is shared between instances. We are working on adding validation using middleware. For more information you can take a look at the [issue on GitHub](https://github.com/MaskingTechnology/jitar/issues/289){target="_blank"}. +Jitar does not automatically validate data that is shared between instances as this is not part of the functionality of a runtime. + +However, you can easily add validation to your application by using middleware, or in the application like we did in our [full stack example](../examples/full-stack). diff --git a/documentation/docs/develop/writing-functions.md b/documentation/docs/develop/writing-functions.md index b240d0fb..da35083f 100644 --- a/documentation/docs/develop/writing-functions.md +++ b/documentation/docs/develop/writing-functions.md @@ -63,7 +63,7 @@ async function sayHello({ name }: Person): Promise { /* … */ } ``` ::: warning IMPORTANT -Nested parameter destructuring is on the [known limitations](../internals/reflection#known-limitations) list and will be supported in future versions. +Nested parameter destructuring is a known limitation and will be supported in future versions. ::: ### Return value diff --git a/documentation/docs/examples/apps.md b/documentation/docs/examples/apps.md deleted file mode 100644 index 8f23cb26..00000000 --- a/documentation/docs/examples/apps.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -layout: doc - -prev: - text: Concept examples - link: /examples/concepts - -next: - text: Get help - link: /community/get-help - ---- - -# App examples - -These examples show some demo applications. - -## Contact list - -We have built a contact application as full stack example. The app is built with React, MongoDB and Jitar (ReMoJi stack). - -[View in repository](https://github.com/MaskingTechnology/jitar/tree/main/examples/apps/contact-list){target="_blank"} diff --git a/documentation/docs/examples/concepts.md b/documentation/docs/examples/concepts.md index 05fa4c10..409c2b1a 100644 --- a/documentation/docs/examples/concepts.md +++ b/documentation/docs/examples/concepts.md @@ -2,12 +2,12 @@ layout: doc prev: - text: Reflection - link: /internals/reflection + text: Migrate away from Jitar + link: /guides/migrate-away-from-jitar next: - text: App examples - link: /examples/apps + text: Full stack example + link: /examples/full-stack --- @@ -19,75 +19,63 @@ To experience the concepts of Jitar we've created examples for them. Each exampl In this example you’ll find the simplest Jitar application possible. It doesn’t have to be complicated, does it? -[View in repository](https://github.com/MaskingTechnology/jitar/tree/main/examples/concepts/hello-world){target="_blank"} +[View in repository](https://github.com/MaskingTechnology/jitar/tree/main/examples/hello-world){target="_blank"} ## Segmentation This example demonstrates how to distribute an application in production. It also shows the simple setup that is required for development purposes. -[View in repository](https://github.com/MaskingTechnology/jitar/tree/main/examples/concepts/segmentation){target="_blank"} +[View in repository](https://github.com/MaskingTechnology/jitar/tree/main/examples/segmentation){target="_blank"} ## Load balancing Jitar comes with load balancing capabilities out-of-the-box. This example demonstrates how to load balance application segments by running them on multiple workers. -[View in repository](https://github.com/MaskingTechnology/jitar/tree/main/examples/concepts/load-balancing){target="_blank"} +[View in repository](https://github.com/MaskingTechnology/jitar/tree/main/examples/load-balancing){target="_blank"} -## Access-protection +## Access protection Not every function should be publicly available. You’ll see how to protect the access to a function. -[View in repository](https://github.com/MaskingTechnology/jitar/tree/main/examples/concepts/access-protection){target="_blank"} +[View in repository](https://github.com/MaskingTechnology/jitar/tree/main/examples/access-protection){target="_blank"} ## Multi version Having multiple versions of the same function is easy when migrating parts of the application to the next version. The example shows how to create multiple versions for a function and how to register them as versioned functions in a segment. -[View in repository](https://github.com/MaskingTechnology/jitar/tree/main/examples/concepts/multi-version){target="_blank"} +[View in repository](https://github.com/MaskingTechnology/jitar/tree/main/examples/multi-version){target="_blank"} ## Data transportation Sharing data between services is crucial when communicating. In this example we demonstrate how data is transported between segments. -[View in repository](https://github.com/MaskingTechnology/jitar/tree/main/examples/concepts/data-transportation){target="_blank"} +[View in repository](https://github.com/MaskingTechnology/jitar/tree/main/examples/data-transportation){target="_blank"} ## Error handling Jitar provides a large number of errors out-of-the-box. But when you want to use a custom error, this example will show how those are supported. -[View in repository](https://github.com/MaskingTechnology/jitar/tree/main/examples/concepts/error-handling){target="_blank"} - -## Node client - -This example demonstrates how to set up a node client. It’s for you when you already have a node client and seek an alternative to our RPC API. - -[View in repository](https://github.com/MaskingTechnology/jitar/tree/main/examples/concepts/node-client){target="_blank"} +[View in repository](https://github.com/MaskingTechnology/jitar/tree/main/examples/error-handling){target="_blank"} ## Health checks For the health of a cluster it’s important that workers can communicate their health status. In this example you’ll learn how to create heath checks and request the health of a service. -[View in repository](https://github.com/MaskingTechnology/jitar/tree/main/examples/concepts/health-checks){target="_blank"} +[View in repository](https://github.com/MaskingTechnology/jitar/tree/main/examples/health-checks){target="_blank"} ## Middleware Middleware is useful for manipulating requests and responses. In this example we demonstrate how to create and add custom middleware. -[View in repository](https://github.com/MaskingTechnology/jitar/tree/main/examples/concepts/middleware){target="_blank"} +[View in repository](https://github.com/MaskingTechnology/jitar/tree/main/examples/middleware){target="_blank"} ## Cors When the frontend of the application is not hosted by Jitar you want to enable cors on the web server. Jitar provides a cors middleware and in this example we demonstrate how to enable cors. -[View in repository](https://github.com/MaskingTechnology/jitar/tree/main/examples/concepts/cors){target="_blank"} +[View in repository](https://github.com/MaskingTechnology/jitar/tree/main/examples/cors){target="_blank"} ## Construction When starting and stopping a Jitar service, it might be useful to do additional tasks. In this example the use of start up and tear down scripts is demonstrated. -[View in repository](https://github.com/MaskingTechnology/jitar/tree/main/examples/concepts/construction){target="_blank"} - -## Overrides - -This example demonstrates how to override module imports. - -[View in repository](https://github.com/MaskingTechnology/jitar/tree/main/examples/concepts/overrides){target="_blank"} +[View in repository](https://github.com/MaskingTechnology/jitar/tree/main/examples/construction){target="_blank"} diff --git a/documentation/docs/examples/full-stack.md b/documentation/docs/examples/full-stack.md new file mode 100644 index 00000000..0815d22a --- /dev/null +++ b/documentation/docs/examples/full-stack.md @@ -0,0 +1,32 @@ +--- +layout: doc + +prev: + text: Concepts + link: /examples/concepts + +next: + text: Get help + link: /community/get-help + +--- + +# Full stack example + +To demonstrate the capabilities of Jitar, we have created a full stack example project called [Comify](https://github.com/MaskingTechnology/comify){target="_blank"}. + +## Introduction + +It is an open source social media platform that leverages comics for communication. The idea is simple: take or upload a picture, add speech bubbles and share with others. These others can be related or unrelated users, depending on the view you're looking at. Comics can be liked, and users can react with a comment or another comic. + +## Capabilities + +We have used the following capabilites: + +* Authentication (client and server middleware) +* Data validation (application level) +* Data management (immutable objects and the saga pattern) +* Error handling (Jitar error binding) +* Segmentation (standalone, vertical and horizontal slicing) +* Separation of webui and domain (Vite plugin) +* Integration with external services (setup, teardown and health checks) \ No newline at end of file diff --git a/documentation/docs/fundamentals/building-blocks.md b/documentation/docs/fundamentals/building-blocks.md index d2191317..83e7a9fc 100644 --- a/documentation/docs/fundamentals/building-blocks.md +++ b/documentation/docs/fundamentals/building-blocks.md @@ -13,11 +13,11 @@ next: # Building blocks -If you're familiar with modern JavaScript / TypeScript, then you already know a lot. Because Jitar is a runtime, applications are built with pure JavaScript / TypeScript. The only thing you need to know is that Jitar applications are procedural by nature and functions are the primary building blocks for building them. +If you're familiar with modern JavaScript / TypeScript, then you already know a lot. Because Jitar is a runtime, applications are built with pure JavaScript / TypeScript. The only thing you need to know is that Jitar applications are procedural by nature and functions are the primary building blocks for building them. Classes can be used as secondary building blocks for utils and state. -For breaking applications into distributable pieces, Jitar uses a segmentation system. A segment defines what modules need to be deployed together. Jitar connects these segments by creating [RPC endpoints](../integrate/rpc-api) and requests under the hood. +For breaking applications into distributable pieces, Jitar uses a segmentation system. A segment defines what modules need to be deployed together. Jitar connects these segments by creating [RPC endpoints](../integrate/rpc-api) and requests for function calls under the hood. Class instance arguments will be shared using Jitar's [automatic (de)serialization](../develop/data-sharing#automatic-de-serialization) system. -In this section you'll learn about using functions and creating segments to create scalable applications. +In this section you'll learn about using functions and classes, and creating segments to create scalable applications. ## Functions @@ -55,6 +55,57 @@ Every function has a unique name used for internal and external identification. For the simple sayHello function the FQN of this function is `domain/sayHello`. **Note** that there is no leading / in the name. +## Classes + +Plain classes can be used for creating utilities or sharing state between the functions. Both use-cases are explained in detail below. + +### Utility + +Utility classes provide common logic used throughout the whole application. For example, a logger: + +```ts +// src/domain/Logger.ts +export class Logger +{ + log(level: string, message: string) + { + console.log(`[${level}] ${message}`); + } +} +``` + +These kinds of classes typically do not hold any state, and their instances are not shared between functions. + +### State + +For sharing state, class instances can be used as long as the instance is reconstructible at the other end. By this we mean that the exposed values can be put back in the instance via: + +* The constructor +* Public field +* Setter + +Let's look at an example. + +```ts +// src/domain/Person.ts +export class Person +{ + #name: string; + #age: number; + + constructor(name: string, age: number) + { + this.#name = name; + this.#age = age; + } + + get name(): string { return this.#name; } + get age(): number { return this.#age; } +} +``` + +This class complies with the rules because all the exposed values (name and age) can be set via the constructor. More information about this can be found on the [data sharing page](../develop/data-sharing). + ## Segments Segments are used to break applications down into distributable pieces. Jitar's segmentation system is module oriented. This means that a segment groups module files that need to be deployed together. @@ -72,7 +123,8 @@ For the definition of a segment, JSON files are used with the '.segment.json' ex "version": "0.0.0", "as": "sayHello" } - } + }, + "./domain/Person": {}, } ``` @@ -87,6 +139,10 @@ This configuration connects very well with the JavaScript module system. It incl The example configuration exposes the `sayHello` function from the `./domain/sayHello` module file. The function has public access, meaning that it's accessible from other segments. Both the version and as properties have the default value, so these can optionally be removed. +::: info CLASSES +These configuration options do NOT apply to classes because they are not a functional part of Jitar. Therefore, classes only need to be registered. Keep in mind that state classes need to be registered in all dependent segments (sender and receiver) to be (de)serializable. Utility classes are commonly used across multiple segments and, therefore, do not require segmentation. +::: + More in depth information on segments and the configuration can be found in the [DEPLOY section](../deploy/segmentation). ### Automated orchestration diff --git a/documentation/docs/fundamentals/runtime-services.md b/documentation/docs/fundamentals/runtime-services.md index ecd6902e..5397cee3 100644 --- a/documentation/docs/fundamentals/runtime-services.md +++ b/documentation/docs/fundamentals/runtime-services.md @@ -29,6 +29,7 @@ Configurations are placed in JSON files. The basic structure looks like this. "setUp": ["SET_UP_SCRIPT"], "tearDown": ["TEAR_DOWN_SCRIPT"], "healthChecks": ["HEALTH_CHECK_SCRIPT"], + "middlewares": ["MIDDLEWARE_SCRIPT"], "SERVICE_TYPE": { "PROPERTY_1": "…", @@ -51,57 +52,12 @@ There are four properties at root level: * url - service url containing protocol, address and port (e.g. `http://service.example.com:3000`). * setUp - optional list of [set up scripts](../develop/setup-and-teardown.md) that gets executed on startup. * tearDown - optional list of [tear down scripts](../develop/setup-and-teardown.md) that gets executed on shutdown. -* healthChecks - optional list of [health check scripts](../deploy/health-checks.md) for checking the service health. +* healthChecks - optional list of [health check modules](../deploy/health-checks.md) for checking the service health. +* middlewares - optional list of [middleware modules](../develop/middleware.md) to load. * SERVICE_TYPE - configuration of the specific service (differs per type). An instance can only run one type of service. Each service has its own configuration properties. All types and their properties are explained next. -## Repository - -The repository holds and serves application files like a web server, with addition that it's segment aware. - -### File serving - -The repository keeps track of every client and their segments. When a client requests a module file, the repository determines if it needs to serve the actual module or a remote implementation. It will only provide the actual module in case the module is unsegmented or gets requested from the same segment. - -Besides serving modules to clients, it also serves application assets like images, documents, etc.. To protect the access to the application files, assets need to be whitelisted. This can be done per file, or by using glob patterns. For example the pattern `assets/**/*` whitelists all files and subfolder files in the assets folder. - -### Caching - -All application files are served from a cache folder created by Jitar. This folder contains a copy of the application with additional generated files like segmentation information, remote module implementations and more. Detailed information can be found in the [INTERNALS section](../internals/caching.md). - -### Configuration properties - -The following configuration properties are available: - -* source - location of the application code (optional, default `./src`). -* cache - location of the application cache (optional, default `./.jitar`). -* index - file to serve when accessed by a web browser (optional, default `index.html`). -* serveIndexOnNotFound - when true, the index file will be served if the requested file is not found (default `false`). -* assets - list of whitelisted assets (optional, default `undefined`). -* overrides - map with import overrides (optional, default `undefined`). - -A full configuration example looks like this. - -```json -{ - "url": "http://repository.example.com:3000", - "repository": - { - "source": "./src", - "cache": "./.jitar", - "index": "index.html", - "serveIndexOnNotFound": false, - "assets": ["*.html", "*.js", "*.css", "assets/**/*"], - "overrides": { "./my-module": "./alternative-module" } - } -} -``` - -### When to use - -This is a core service that is always required, except when running Jitar as a [standalone service](#standalone). - ## Worker A worker loads application segments and runs its functions on request. @@ -122,10 +78,8 @@ When configured, a worker can register itself to a [gateway service](#gateway) t The following configuration properties are available: -* gateway - url of the gateway (optional, in case no gateway is used). -* repository - url of the repository (required). -* segments - list of segment names to load (optional, loads all segments by default). -* middlewares - list of [middleware modules](../develop/middleware.md) to load (optional). +* gateway - url of the gateway (optional, in case a gateway is used). +* segments - list of segment names to load (required). * trustKey - key for creating trusted client (optional). A full configuration example looks like this: @@ -136,9 +90,7 @@ A full configuration example looks like this: "worker": { "gateway": "http://gateway.example.com:3000", - "repository": "http://repository.example.com:3000", "segments": ["segment1", "segment2"], - "middlewares": ["./middleware1", "./middleware2"], "trustKey": "${MY_TRUST_KEY}" } } @@ -164,17 +116,11 @@ If a function is available on multiple workers, the gateway will automatically b The availability of workers is actively monitored. If a worker cannot be reached or replies to have [an unhealthy state](../monitor/health.md), it will be removed from the gateway. -### Caching - -There aren't any caching options yet, but we are planning on implementing them. Please [let us know](../community/contribute.md) if you need this, it will help us prioritize our work! - ### Configuration properties The following configuration properties are available: -* repository - url of the repository (required). * monitor - worker monitoring interval in milliseconds (optional, default `5000`). -* middlewares - list of [middleware modules](../develop/middleware.md) to load (optional). * trustKey - key for creating trusted clients (optional). A full configuration example looks like this: @@ -184,9 +130,7 @@ A full configuration example looks like this: "url": "http://gateway.example.com:3000", "gateway": { - "repository": "http://repository.example.com:3000", "monitor": 5000, - "middlewares": ["./middleware1", "./middleware2"], "trustKey": "${MY_TRUST_KEY}" } } @@ -196,6 +140,41 @@ A full configuration example looks like this: This service is used for creating a cluster and is only useful when working with multiple workers. It also works with a single worker, but adds a lot of overhead. +## Repository + +The repository holds and serves application files like a web server. + +### Access protection + +To protect the access to the application files, assets need to be whitelisted. This can be done per file, or by using glob patterns. For example the pattern `assets/**/*` whitelists all files and subfolder files in the assets folder. + +### Configuration properties + +The following configuration properties are available: + +* index - file to serve when accessed by a web browser (optional, default `index.html`). +* serveIndexOnNotFound - when true, the index file will be served if the requested file is not found (default `false`). +* assets - list of whitelisted assets (optional, default `undefined`). + +A full configuration example looks like this. + +```json +{ + "url": "http://repository.example.com:3000", + "repository": + { + "index": "index.html", + "serveIndexOnNotFound": false, + "assets": ["*.html", "*.js", "*.css", "assets/**/*"] + } +} +``` + +### When to use + +This service is useful for full-stack applications. +The [standalone service](#standalone) service includes this service. + ## Proxy The proxy acts as an intermediary between clients and a Jitar cluster. It's a single point of access for both the [repository](#repository) and [gateway](#gateway) / [worker](#worker) services. @@ -211,7 +190,6 @@ The following configuration properties are available: * gateway - url of the gateway (optional if worker property set). * worker - url of the worker (optional if gateway property set). * repository - url of the repository (required). -* middlewares - list of [middleware modules](../develop/middleware.md) to load (optional). A full configuration example looks like this: @@ -221,8 +199,7 @@ A full configuration example looks like this: "proxy": { "gateway": "http://gateway.example.com:3000", - "repository": "http://repository.example.com:3000", - "middlewares": ["./middleware1", "./middleware2"] + "repository": "http://repository.example.com:3000" } } ``` @@ -242,13 +219,10 @@ Combines the repository and worker core services into a single instance. The standalone service has the same configuration properties as the repository service: -* source - location of the application code (optional, default `./src`). -* cache - location of the application cache (optional, default `./.jitar`). * index - file to serve when accessed by a web browser (optional, default `index.html`). * serveIndexOnNotFound - when true, the index file will be served if the requested file is not found (default `false`). * assets - list of whitelisted assets (optional, default `undefined`). -* middlewares - list of [middleware modules](../develop/middleware.md) to load (optional). -* overrides - map with import overrides (optional, default `undefined`). +* segments - list of segment names to load (required). * trustKey - key for creating trusted clients (optional). A full configuration example looks like this: @@ -258,13 +232,10 @@ A full configuration example looks like this: "url": "http://standalone.example.com:3000", "standalone": { - "source": "./src", - "cache": "./.jitar", "index": "index.html", "serveIndexOnNotFound": false, "assets": ["*.html", "*.js", "*.css", "assets/**/*"], - "middlewares": ["./middleware1", "./middleware2"], - "overrides": { "./my-module": "./alternative-module" }, + "segments": ["segment1", "segment2"], "trustKey": "${MY_TRUST_KEY}" } } diff --git a/documentation/docs/guides/add-jitar-to-an-existing-project.md b/documentation/docs/guides/add-jitar-to-an-existing-project.md index 3d7f6b7d..124e0007 100644 --- a/documentation/docs/guides/add-jitar-to-an-existing-project.md +++ b/documentation/docs/guides/add-jitar-to-an-existing-project.md @@ -33,7 +33,7 @@ Adding Jitar to your project takes a few steps. In these steps we use the applic The first thing we need to do is to add Jitar as a dependency in the current project. ```bash -npm install Jitar +npm install jitar ``` There are also a few requirements for the `tsconfig.json` file. Make sure to use ESNext as target and module, and to output all transpiled code in a separate folder (we use `dist` by default). diff --git a/documentation/docs/guides/creating-a-cluster.md b/documentation/docs/guides/creating-a-cluster.md index 89352813..d61945a6 100644 --- a/documentation/docs/guides/creating-a-cluster.md +++ b/documentation/docs/guides/creating-a-cluster.md @@ -2,8 +2,8 @@ layout: doc prev: - text: Worker monitoring - link: /monitor/workers + text: Health + link: /monitor/health next: text: Add Jitar to an existing project diff --git a/documentation/docs/guides/migrate-away-from-jitar.md b/documentation/docs/guides/migrate-away-from-jitar.md index f72c77f7..d8efb51a 100644 --- a/documentation/docs/guides/migrate-away-from-jitar.md +++ b/documentation/docs/guides/migrate-away-from-jitar.md @@ -7,7 +7,7 @@ prev: next: text: Caching - link: /internals/caching + link: /examples/concepts --- diff --git a/documentation/docs/integrate/rpc-api.md b/documentation/docs/integrate/rpc-api.md index 452de4f4..0d3a99e8 100644 --- a/documentation/docs/integrate/rpc-api.md +++ b/documentation/docs/integrate/rpc-api.md @@ -23,6 +23,10 @@ Jitar automatically creates an endpoint for every segmented public function. The GET http://{ server address }/rpc/{ FQN }?{ parameters } HTTP/1.1 ``` +::: tip TIP +For protected functions the RPC endpoint is also available. To call these functions a [custom header](../deploy/segmentation.html#trusted-clients) is required. +::: + Let's see how this works for the following simple [function](../fundamentals/building-blocks#functions). ```ts @@ -108,7 +112,7 @@ GET http://localhost:3000/rpc/domain/sayHello?name=John&city=Rome HTTP/1.1 ``` ::: warning IMPORTANT -Nested parameter destructuring is on the [known limitations list](../internals/reflection#known-limitations) and will be supported in future versions. +Nested parameter destructuring is a known limitation and will be supported in future versions. ::: ### Rest parameters @@ -171,39 +175,42 @@ export class Person This class is immutable, so it can only be constructed with constructor arguments. To call this function we need to provide all information required to construct the instance. ```http -POST http://example.com:3000/rpc/domain/sayHello?serialize=true HTTP/1.1 +POST http://example.com:3000/rpc/domain/sayHello HTTP/1.1 content-type: application/json +x-jitar-data-encoding: serialized { "person": { "serialized": true, - "name": "Person", - "source": "domain/Person.js", - "args": ["John", 42], + "key": "person/Person", + "name": "class", + "args": { + "0": "John", + "1": 44 + }, "fields": { } } } ``` -Note that the query string now contains a `serialize` parameter. This tells Jitar to use the serializer for the request body that defines the instance of the Person class: +Note that headers now contains a `serialized` value. This tells Jitar to use the serializer for the request body that defines the instance of the Person class: * serialized - tells the serializer that this is an serialized object -* name - the name of the class -* source - the module file containing the class definition (relative to the source folder) -* args - the constructor arguments +* key - the FQN of the class definition (relative to the source root) +* name - the serializer name +* args - the constructor arguments in the parameter order * fields - the public field values -More information on serialization like how to deal with built-in classes can be found in the [data serialization](../internals/data-serialization) section of the Jitar internals. - ## Response result The RPC API translates the returned value of a function to a response. Non-object values will be translated to a string, object values to a JSON string. -Object values can be requested with or without the use of the serializer using the serialize query parameter. +Object values can be requested with or without the use of the serializer using the `data encoding` header. ```http -GET http://localhost:3000/rpc/person/getPerson?serialize={true | false} HTTP/1.1 +GET http://localhost:3000/rpc/person/getPerson HTTP/1.1 +x-jitar-data-encoding: serialized | undefined ``` For plain objects the result will be the same in both cases, but for class instances with private fields it makes a big difference. For example returning an instance of the following class. @@ -239,14 +246,17 @@ With the serializer the response looks very different. ```bash { "serialized": true, - "name": "Person", - "source": "domain/Person.js", - "args": ["John", 42], + "key": "person/Person", + "name": "class", + "args": { + "0": "John", + "1": 44 + }, "fields": { } } ``` -The serializer creates an object with a full description of the instance that is internally used for sharing data between servers. More information on serialization can be found in the [data serialization](../internals/data-serialization) section of the Jitar internals. +The serializer creates an object with a full description of the instance that is internally used for sharing data between servers. ## Error handling diff --git a/documentation/docs/integrate/vite-plugin.md b/documentation/docs/integrate/vite-plugin.md index 249f2da2..9d487b4f 100644 --- a/documentation/docs/integrate/vite-plugin.md +++ b/documentation/docs/integrate/vite-plugin.md @@ -15,48 +15,78 @@ next: For easy integration with popular frontend frameworks like React, Angular, Vue, etc. we provide a plugin for [Vite](https://vitejs.dev/){target="_blank"}. -Note: we also provide a creator app with templates for the most used frameworks. We recommend checking this out first before using this plugin. More information can be found in [our quick start](../introduction/quick-start). +::: tip +We think it's good to put all the frontend code in a separate folder for better separation of concerns. It also simplifies the build process. For this, we use the `webui` folder throughout the documentation. +::: + +::: info NOTE +We also provide a creator app with templates for the most used frameworks. We recommend checking this out first before using this plugin. More information can be found in [our quick start](../introduction/quick-start). +::: ## Installation You can simply install the plugin as dev-dependency using NPM. ```bash -npm install --save-dev @jitar/vite-plugin +npm install --save-dev @jitar/plugin-vite ``` Next it has to be added to the Vite config file. ```ts // vite.config.js +import jitar, { JitarConfig } from '@jitar/plugin-vite'; import { defineConfig } from 'vite'; -import jitar from '@jitar/plugin-vite'; + +const JITAR_URL = 'http://localhost:3000'; +const JITAR_SEGMENTS = ['frontend']; +const JITAR_MIDDLEWARES = ['./requesterMiddleware']; + +const jitarConfig: JitarConfig = { + sourceDir: 'src', + targetDir: 'dist', + jitarDir: 'domain', + jitarUrl: JITAR_URL, + segments: JITAR_SEGMENTS, + middleware: JITAR_MIDDLEWARES +}; export default defineConfig({ + publicDir: 'src/webui/public', + build: { + assetsDir: 'webui', + emptyOutDir: false + }, plugins: [ - jitar(srcPath, jitarPath, jitarUrl, [segments], [middlewares]) + jitar(jitarConfig) ] }); -``` +``` -The plugin takes 4 arguments: +The plugin configuration has 6 parameters: -1. srcPath - The path to the app source files. In most cases this is the `src` folder. -1. jitarPath - The path to the source files used by Jitar. This path is relative to the source root. We like to use `domain` (which points to `src/domain`), * but feel free to use something else. -1. jitarUrl - The URL of the Jitar instance. Jitar uses by default `http://localhost:3000`, but can be configured differently in the Jitar config. +1. sourceDir - The directory of the app source files. In most cases this is the `src` folder. +1. targetDir - The directory of the output folder of the Vite build. This is the folder that Jitar uses as input for creating its cache. +1. jitarDir - The directory of the source files used by Jitar. This path is relative to the source root. We like to use `domain` (which points to `src/domain`), but feel free to use something else. +1. jitarUrl - The URL of the Jitar instance. Jitar uses by default `http://localhost:3000`, but can be configured differently. 1. segments - The segments to use for the client app. This is an array of strings. The default is an empty array. 1. middlewares - The middlewares to use for calling remote procedures. This is an array of strings. The default is an empty array. -There are also a few requirements for the tsconfig.json file +To build the segments, an additional tsconfig file is required to compile the source code. The configuration is also used to exclude the `webui` folder from the TypeScript compilation. ```json +// tsconfig.jitar.json { + "extends": "./tsconfig.json", "compilerOptions": { "target": "ESNext", "module": "ESNext", "noEmit": false, - "outDir": "dist" - } + "rootDir": "./src", + "outDir": "./dist" + }, + "include": ["src"], + "exclude": ["src/webui"] } ``` @@ -64,14 +94,20 @@ Finally, the TypeScript compilation needs to be set as the last step in the pack ```json { - "build": "vite build && tsc", + "build": "npm run build-domain && npm run build-webui", + "build-domain": "rm -rf dist && tsc -p tsconfig.jitar.json && jitar build", + "build-webui": "vite build", } ``` -This makes sure all TypeScript is compiled in ESNext format and placed in the dist folder that Jitar uses as input for creating its cache. +::: tip +Checkout our demo project [Comify](https://github.com/MaskingTechnology/comify){target="_blank"} for a complete working setup. +::: ## Usage For development you can run Vite as you would normally do. The only requirement is that an instance of Jitar must already run in the background. For production you can build the project and use Jitar as your web server. -Important: Jitar currently doesn’t support hot reloads. This means that the Jitar server needs to get restarted every time the backend functions are created or updated. +::: info IMPORTANT +Jitar currently doesn’t support hot reloads. This means that the Jitar server needs to get restarted every time the backend functions are created or updated. +::: diff --git a/documentation/docs/internals/caching.md b/documentation/docs/internals/caching.md deleted file mode 100644 index 4cac81a8..00000000 --- a/documentation/docs/internals/caching.md +++ /dev/null @@ -1,85 +0,0 @@ ---- -layout: doc - -prev: - text: Migrate away from Jitar - link: /guides/migrate-away-from-jitar - -next: - text: Data serialization - link: /internals/data-serialization - ---- - -# Caching - -Jitar serves applications from cache that is generated at the start of a [standalone service](../fundamentals/runtime-services#standalone) or [repository service](../fundamentals/runtime-services#repository). The cache contains generated code needed for distributing the application. By default the cache is placed in the `.jitar` folder, but can be configured differently. There are two types of cache. Both will be explained next. - -Our goal is to give you a basic understanding of how Jitar works under the hood. We won't go into full detail here, but if you have any questions you can always [reach out to us](../community/get-help). - -## Segments - -For every segment configuration two cache files are generated. The first contains a list of module file names belonging to the segment. It's used by the repository service as a lookup list to determine if it needs to provide the actual or remote implementation of a module file. - -```js -// {segment name}.segment.repository.js -export const files = [ - "file1.js", - "file2.js" -]; -``` - -The second contains the actual segment model that holds a full description for all its functions (called procedures in this context). It's used by the worker service to load their segments. - -```js -// {segment name}.segment.worker.js -const { default : $1 } = await __import("./file1.js", "application", false); -const { a : $2, b : $3 } = await __import("./file2.js", "application", false); -const { Segment, /* more */} = await __import("jitar", "runtime", false); -export const segment = new Segment("default") - .addProcedure(...) - // … -``` - -Both cache files optimize the startup time of both services by prebaking the required information they need. - -## Modules - -For each module file, also two cache files are generated. Before diving in, let's look at a transpiled example module file first. - -```js -// file1.js -import fs from 'fs'; -import { a, b } from './file2.js'; - -export async function function1(param1) { /* … */ } - -export class Class1 { /* … */ } -``` - -The first generated cache file is a copy of the original file with a few modifications to make them work in a distributed setup. - -```js -// file1.local.js -const fs = await __import("fs", "runtime"); -const { a, b } = await __import("./file2.js", "application"); - -export async function function1(param1) { /* … */ } - -export class Class1 { /* … */ } - -Class1.source = "./file1.js" -``` - -In this file, all imports are rewritten to load them via Jitar runtime. All external imports (dependencies) are loaded at the runtime level with the module loader provided in the Jitar bootstrapper file. The application imports are loaded by the [repository service](../fundamentals/runtime-services#repository). Also, all classes are sourced to make them remotely loadable by [the serializer](./data-serialization). - -The second contains the remote implementation of the segmented functions. - -```js -// file1.remote.js -export async function function1(param1) { - return __run('function1', '0.0.0', { 'param1': param1 }, this); -} -``` - -The classes can't be called remotely (only be loaded) and therefore not included in the remote files. diff --git a/documentation/docs/internals/data-serialization.md b/documentation/docs/internals/data-serialization.md deleted file mode 100644 index 6d9b499f..00000000 --- a/documentation/docs/internals/data-serialization.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -layout: doc - -prev: - text: Caching - link: /internals/caching - -next: - text: Reflection - link: /internals/reflection - ---- - -# Data serialization - -Jitar comes with a powerful (de)serializer that is used for sharing data between workers. In this section you'll find more information on this topic.. - -Note: The serializer is available as a separate NPM package that you can use in your own project. You can find more information on this in the [readme of the package](https://github.com/MaskingTechnology/jitar/blob/main/packages/serialization/README.md){target="_blank"}. - -## Build-in serializers - -We try to support all JavaScript built-in types. Currently we support: - -* Primitives (bool, number, string, etc.) -* Objects (plain and class instances) -* Collections (Array, Map and Set) -* Data buffers (Typed Arrays) -* Others (BigInt, Date, RegExp and URL) - -## Adding your own - -The serialization package is open for implementing your own serializers in case your application has special (de)serialization needs. This can be done by creating a custom serializer and adding it to the server. Documentation how to build a custom serializer can be found in the [readme](https://github.com/MaskingTechnology/jitar/blob/main/packages/serialization/README.md){target="_blank"} of the serialization package. - -```ts -//src/jitar.ts -import { buildServer } from 'jitar'; -import CustomSerializer from './CustomSerializer.js'; - -const moduleImporter = async (specifier: string) => import(specifier); - -const server = await buildServer(moduleImporter); - -server.addSerializer(new CustomSerializer()); - -process.on('SIGINT', async () => server.stop()); - -server.start(); - - -``` - -Jitar uses a default class loader. If you need the class loader in your custom serializer you can get it from the server instance. - -```ts -const classLoader = server.classLoader; -``` diff --git a/documentation/docs/internals/reflection.md b/documentation/docs/internals/reflection.md deleted file mode 100644 index 9b73518f..00000000 --- a/documentation/docs/internals/reflection.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -layout: doc - -prev: - text: Data serialization - link: /internals/data-serialization - -next: - text: Concept examples - link: /examples/concepts - ---- - -# Reflection - -Jitar combines static and dynamic reflection techniques for automating the end-to-end communication. In this section you'll find more information on this topic. - -Note: The reflection is available as a separate NPM package that you can use in your own project. You can find more information on this in the [readme of the package](https://github.com/MaskingTechnology/jitar/blob/main/packages/reflection/README.md){target="_blank"}. - -## Use cases - -For creating [application cache](./caching), static reflection is used to read the module files (code) and extract the needed information like its imports, exports, functions and classes. - -For the [(de)serialization](./data-serialization) of complex objects, dynamic reflection is used for extracting reconstruction information like fields, getters / setters and constructor parameters. - -## Known limitations - -There are some known limitations to the static reflection. Most do not apply to the Jitar use cases, but have to be taken into account when using this package in your own project. Some limitations will be supported in a future version, but others simply can't be supported. - -The limitations that apply to Jitar applications are explained below. The full list can be found in the [readme of the package](https://github.com/MaskingTechnology/jitar/blob/main/packages/reflection/README.md){target="_blank"}. - -### Parameter destructuring aliases - -Aliases in destructuring are not supported yet, but will be supported in future versions. - -```ts -async function sayHello({name: fullName}: Person) { /* … */ } -``` - -### Nested destructuring - -Nesting in destructuring is not supported yet, but will be supported in future versions. - -```ts -async function sayHello({name, address: {city}}: Person) { /* … */ } -``` - -### Dynamic property destructuring - -Dynamic properties in destructuring are not supported and won't be supported because static reflection is used for reading the parameters. - -```ts -const key = 'name'; - -async function sayHello({[key]: fullName}: Person) { /* … */ } -``` diff --git a/documentation/docs/introduction/quick-start.md b/documentation/docs/introduction/quick-start.md index 49369bb9..ad9954fa 100644 --- a/documentation/docs/introduction/quick-start.md +++ b/documentation/docs/introduction/quick-start.md @@ -47,16 +47,15 @@ export async function sayHello(name: string): Promise } ``` - Looks like a normal function, right? The `async` might seem unnecessary, but is actually an important addition. The caller of the function does not know about its location. The function might be locally available, but can also be on another server. Making a function `async` ensures that it can be run, no matter where it resides. Functions can be imported and called like any normal async function. ```ts -// src/App.tsx +// src/webui/App.tsx /* other imports */ -import { sayHello } from './domain/sayHello'; +import { sayHello } from '../domain/sayHello'; const message = await sayHello('World'); @@ -102,42 +101,22 @@ Jitar provides multiple types of services that can be configured to fit your nee "url": "http://127.0.0.1:3000", "standalone": { - "source": "./dist", + "segments": ["default"], "assets": ["index.html", "main.js", "App.js", "vite.svg", "assets/**/*"] } } ``` -Jitar creates segment bundles and local and remote implementations required to run the application in any setup. To boost performance the output will be cached. By default the cache will be stored in the `.jitar` folder, but you can configure another folder if desired. - -Jitar also acts like a web server to serve the frontend components. By default it serves the `index.html` file when no specific file is requested, but you can configure another file. For [security reasons](../develop/security.md#file-access-protection), all assets must be specified in order to become accessible. - -The configuration needs to be supplied when starting a Jitar instance. To start Jitar, a simple bootstrapper script is required that starts a server. - -```ts -//src/jitar.ts -import { buildServer } from 'jitar'; - -const moduleImporter = async (specifier: string) => import(specifier); -const server = await buildServer(moduleImporter); +Jitar creates segment bundles required to run the application in any setup. By default the bundles will be stored in the `.jitar` folder, but you can configure another folder if desired. -process.on('SIGINT', async () => server.stop()); - -server.start(); -``` - -This script can be reused for every application running on Jitar. +Jitar can also act like a web server to serve the frontend components. By default it serves the `index.html` file when no specific file is requested, but you can configure another file. For [security reasons](../develop/security.md#file-access-protection), all assets must be specified in order to become accessible. With everything in place we can run the application with the following command. ```bash -node --experimental-network-imports dist/jitar.js --config=services/standalone.json +jitar start --service=services/standalone.json ``` -::: info NOTE -Node needs the `--experimental-network-imports` flag in order to import functions and other components from a remote location. -::: - The project provides a script containing the command in the `package.json` file, so we can also start Jitar like this: ```bash diff --git a/documentation/docs/monitor/health.md b/documentation/docs/monitor/health.md index 862616a5..13042d67 100644 --- a/documentation/docs/monitor/health.md +++ b/documentation/docs/monitor/health.md @@ -6,8 +6,8 @@ prev: link: /monitor/Logging next: - text: Procedures - link: /monitor/procedures + text: Creating a cluster + link: /guides/creating-a-cluster --- diff --git a/documentation/docs/monitor/logging.md b/documentation/docs/monitor/logging.md index 50957770..529481ee 100644 --- a/documentation/docs/monitor/logging.md +++ b/documentation/docs/monitor/logging.md @@ -13,19 +13,21 @@ next: # Logging -Jitar logs all activity, errors and more. To control the amount of logging, you can set the level of interest. The log level is provided as a server option by using the flag `--loglevel` during startup. +Jitar logs all activity, errors and more. To control the amount of logging, you can set the level of interest. The log level is provided as a server option by using the flag `--log-level` during startup. ```bash -node --experimental-network-imports dist/standalone.js --loglevel=debug --config=services/standalone.json +jitar start --service=services/standalone.json --log-level=debug ``` -This flag is optional. When not set, the default log level info is used. Other options are debug, warn or error. All levels will be explained next. +This flag is optional. When not set, the default log level `info` is used. Other options are `debug`, `warn`, `error` or `fatal`. All levels will be explained next. -Warning: It’s not possible to provide an output location, so all the messages are printed pretty in the console. Rerouting the log to a file from the console results in a hard to read log file. +::: info NOTE +It’s not possible to provide an output location, so all the messages are printed pretty in the console. Rerouting the log to a file from the console results in a hard to read log file. +::: ## Debug -The debug level is the most verbose level. It will output all debug, info, warn and error messages. The debug level contains messages of running background processes. These are: +The debug level is the most verbose level. It will output all messages. The debug level contains messages of running background processes. These are: * Health requested * Health status requested @@ -34,22 +36,18 @@ It's advisable to not use the debug level in production because the health of a ## Info -The info level will output all info, warn and error messages. The info level contains messages for all normal actions. These are: +The info level will output all messages, except debug ones. The info level contains messages for all normal actions. These are: -* Startup message -* Assets retrieved -* Client registration -* Module retrieval -* Worker registration / retrieval -* Registered procedure names -* Forward message +* Assets provided +* Worker registration * RPC registration / execution +* Server start / stop You can use this level in production, but it is still quite verbose. If you don't need this information then the next level might be a better choice. ## Warn -The warn level will output all warn and error messages. The warn level contains messages for all unexpected results that are not errors. These are: +The warn level will output all warn, error and fatal messages. The warn level contains messages for all unexpected results that are not errors. These are: * Asset that could not be found @@ -57,9 +55,15 @@ We advise to use this or the info level in production. ## Error -The error level is the most severe level. This level contains messages of all runtime errors. These are: +The error level will output all error and fatal messages. The error level contains messages for server and application errors. These are: -* Asset that could not be loaded -* Module that could not get loaded +* Health check that failed * Worker that could not get added * Procedure that threw an error + +## Fatal + +The fatal level is the most severe level. This level contains messages of all actions that are not recoverable. These are: + +* Server could not start +* CLI command that could not be executed diff --git a/documentation/docs/monitor/procedures.md b/documentation/docs/monitor/procedures.md deleted file mode 100644 index 0be93d4a..00000000 --- a/documentation/docs/monitor/procedures.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -layout: doc - -prev: - text: Health - link: /monitor/health - -next: - text: Workers - link: /monitor/workers - ---- - -# Procedures - -Both the [gateway service](../fundamentals/runtime-services#gateway) and the [worker service](../fundamentals/runtime-services#worker) keep a list of functions ([FQNs](../fundamentals/building-blocks#fully-qualified-name-fqn)) that can be run as remote procedures using the [RPC API](../integrate/rpc-api). This list can be requested with the procedures API. - -```http -GET http://proxy.example.com:3000/procedures HTTP/1.1 -``` - -The API returns a list of procedure names (FQNs) that are registered with this service. - -``` json -[ - "procedure1", - "procedure2" -] -``` - -This API is also available for the [proxy service](../fundamentals/runtime-services#proxy). It will forward the request to its configured gateway / worker. diff --git a/documentation/docs/monitor/workers.md b/documentation/docs/monitor/workers.md deleted file mode 100644 index 0d8b5cde..00000000 --- a/documentation/docs/monitor/workers.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -layout: doc - -prev: - text: Procedures - link: /monitor/procedures - -next: - text: Creating a cluster - link: /guides/creating-a-cluster - ---- - -# Workers - -The [gateway service](../fundamentals/runtime-services#gateway) keeps a list of its active workers. These can be requested with the workers API. - -```http -GET http://gateway.example.com:3000/workers HTTP/1.1 -``` - -This returns a list of registered workers. Per worker the url and procedure names (FQNs) are returned. - -```json -[ - { - "url": "http://worker.example.com:3002", - "procedureNames": [ - "procedure1", - "procedure2" - ] - } -] -``` diff --git a/documentation/package-lock.json b/documentation/package-lock.json index 9d12b0d8..e6bbd6bb 100644 --- a/documentation/package-lock.json +++ b/documentation/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "MIT", "devDependencies": { - "vitepress": "^1.3.0" + "vitepress": "^1.3.4" } }, "node_modules/@algolia/autocomplete-core": { @@ -100,6 +100,29 @@ "@algolia/transporter": "4.24.0" } }, + "node_modules/@algolia/client-account/node_modules/@algolia/client-common": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.24.0.tgz", + "integrity": "sha512-bc2ROsNL6w6rqpl5jj/UywlIYC21TwSSoFHKl01lYirGMW+9Eek6r02Tocg4gZ8HAw3iBvu6XQiM3BEbmEMoiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@algolia/requester-common": "4.24.0", + "@algolia/transporter": "4.24.0" + } + }, + "node_modules/@algolia/client-account/node_modules/@algolia/client-search": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.24.0.tgz", + "integrity": "sha512-uRW6EpNapmLAD0mW47OXqTP8eiIx5F6qN9/x/7HHO6owL3N1IXqydGwW5nhDFBrV+ldouro2W1VX3XlcUXEFCA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@algolia/client-common": "4.24.0", + "@algolia/requester-common": "4.24.0", + "@algolia/transporter": "4.24.0" + } + }, "node_modules/@algolia/client-analytics": { "version": "4.24.0", "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-4.24.0.tgz", @@ -113,7 +136,7 @@ "@algolia/transporter": "4.24.0" } }, - "node_modules/@algolia/client-common": { + "node_modules/@algolia/client-analytics/node_modules/@algolia/client-common": { "version": "4.24.0", "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.24.0.tgz", "integrity": "sha512-bc2ROsNL6w6rqpl5jj/UywlIYC21TwSSoFHKl01lYirGMW+9Eek6r02Tocg4gZ8HAw3iBvu6XQiM3BEbmEMoiA==", @@ -124,6 +147,29 @@ "@algolia/transporter": "4.24.0" } }, + "node_modules/@algolia/client-analytics/node_modules/@algolia/client-search": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.24.0.tgz", + "integrity": "sha512-uRW6EpNapmLAD0mW47OXqTP8eiIx5F6qN9/x/7HHO6owL3N1IXqydGwW5nhDFBrV+ldouro2W1VX3XlcUXEFCA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@algolia/client-common": "4.24.0", + "@algolia/requester-common": "4.24.0", + "@algolia/transporter": "4.24.0" + } + }, + "node_modules/@algolia/client-common": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-5.7.0.tgz", + "integrity": "sha512-hrYlN9yNQukmNj8bBlw9PCXi9jmRQqNUXaG6MXH1aDabjO6YD1WPVqTvaELbIBgTbDJzCn0R2owms0uaxQkjUg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 14.0.0" + } + }, "node_modules/@algolia/client-personalization": { "version": "4.24.0", "resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-4.24.0.tgz", @@ -136,18 +182,34 @@ "@algolia/transporter": "4.24.0" } }, - "node_modules/@algolia/client-search": { + "node_modules/@algolia/client-personalization/node_modules/@algolia/client-common": { "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.24.0.tgz", - "integrity": "sha512-uRW6EpNapmLAD0mW47OXqTP8eiIx5F6qN9/x/7HHO6owL3N1IXqydGwW5nhDFBrV+ldouro2W1VX3XlcUXEFCA==", + "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.24.0.tgz", + "integrity": "sha512-bc2ROsNL6w6rqpl5jj/UywlIYC21TwSSoFHKl01lYirGMW+9Eek6r02Tocg4gZ8HAw3iBvu6XQiM3BEbmEMoiA==", "dev": true, "license": "MIT", "dependencies": { - "@algolia/client-common": "4.24.0", "@algolia/requester-common": "4.24.0", "@algolia/transporter": "4.24.0" } }, + "node_modules/@algolia/client-search": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-5.7.0.tgz", + "integrity": "sha512-0Frfjt4oxvVP2qsTQAjwdaG5SvJ3TbHBkBrS6M7cG5RDrgHqOrhBnBGCFT+YO3CeNK54r+d57oB1VcD2F1lHuQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@algolia/client-common": "5.7.0", + "@algolia/requester-browser-xhr": "5.7.0", + "@algolia/requester-fetch": "5.7.0", + "@algolia/requester-node-http": "5.7.0" + }, + "engines": { + "node": ">= 14.0.0" + } + }, "node_modules/@algolia/logger-common": { "version": "4.24.0", "resolved": "https://registry.npmjs.org/@algolia/logger-common/-/logger-common-4.24.0.tgz", @@ -185,7 +247,30 @@ "@algolia/transporter": "4.24.0" } }, - "node_modules/@algolia/requester-browser-xhr": { + "node_modules/@algolia/recommend/node_modules/@algolia/client-common": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.24.0.tgz", + "integrity": "sha512-bc2ROsNL6w6rqpl5jj/UywlIYC21TwSSoFHKl01lYirGMW+9Eek6r02Tocg4gZ8HAw3iBvu6XQiM3BEbmEMoiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@algolia/requester-common": "4.24.0", + "@algolia/transporter": "4.24.0" + } + }, + "node_modules/@algolia/recommend/node_modules/@algolia/client-search": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.24.0.tgz", + "integrity": "sha512-uRW6EpNapmLAD0mW47OXqTP8eiIx5F6qN9/x/7HHO6owL3N1IXqydGwW5nhDFBrV+ldouro2W1VX3XlcUXEFCA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@algolia/client-common": "4.24.0", + "@algolia/requester-common": "4.24.0", + "@algolia/transporter": "4.24.0" + } + }, + "node_modules/@algolia/recommend/node_modules/@algolia/requester-browser-xhr": { "version": "4.24.0", "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.24.0.tgz", "integrity": "sha512-Z2NxZMb6+nVXSjF13YpjYTdvV3032YTBSGm2vnYvYPA6mMxzM3v5rsCiSspndn9rzIW4Qp1lPHBvuoKJV6jnAA==", @@ -195,6 +280,30 @@ "@algolia/requester-common": "4.24.0" } }, + "node_modules/@algolia/recommend/node_modules/@algolia/requester-node-http": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-4.24.0.tgz", + "integrity": "sha512-JF18yTjNOVYvU/L3UosRcvbPMGT9B+/GQWNWnenIImglzNVGpyzChkXLnrSf6uxwVNO6ESGu6oN8MqcGQcjQJw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@algolia/requester-common": "4.24.0" + } + }, + "node_modules/@algolia/requester-browser-xhr": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-5.7.0.tgz", + "integrity": "sha512-ohtIp+lyTGM3agrHyedC3w7ijfdUvSN6wmGuKqUezrNzd0nCkFoLW0OINlyv1ODrTEVnL8PAM/Zqubjafxd/Ww==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@algolia/client-common": "5.7.0" + }, + "engines": { + "node": ">= 14.0.0" + } + }, "node_modules/@algolia/requester-common": { "version": "4.24.0", "resolved": "https://registry.npmjs.org/@algolia/requester-common/-/requester-common-4.24.0.tgz", @@ -202,14 +311,32 @@ "dev": true, "license": "MIT" }, + "node_modules/@algolia/requester-fetch": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@algolia/requester-fetch/-/requester-fetch-5.7.0.tgz", + "integrity": "sha512-Eg8cBhNg2QNnDDldyK77aXvg3wIc5qnpCDCAJXQ2oaqZwwvvYaTgnP1ofznNG6+klri4Fk1YAaC9wyDBhByWIA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@algolia/client-common": "5.7.0" + }, + "engines": { + "node": ">= 14.0.0" + } + }, "node_modules/@algolia/requester-node-http": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-4.24.0.tgz", - "integrity": "sha512-JF18yTjNOVYvU/L3UosRcvbPMGT9B+/GQWNWnenIImglzNVGpyzChkXLnrSf6uxwVNO6ESGu6oN8MqcGQcjQJw==", + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-5.7.0.tgz", + "integrity": "sha512-8BDssYEkcp1co06KtHO9b37H+5zVM/h+5kyesJb2C2EHFO3kgzLHWl/JyXOVtYlKQBkmdObYOI0s6JaXRy2yQA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { - "@algolia/requester-common": "4.24.0" + "@algolia/client-common": "5.7.0" + }, + "engines": { + "node": ">= 14.0.0" } }, "node_modules/@algolia/transporter": { @@ -224,12 +351,35 @@ "@algolia/requester-common": "4.24.0" } }, + "node_modules/@babel/helper-string-parser": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.7.tgz", + "integrity": "sha512-CbkjYdsJNHFk8uqpEkpCvRs3YRp9tY6FmFY7wLMSYuGYkrdUi7r2lc4/wqsvlHoMznX3WJ9IP8giGPq68T/Y6g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.7.tgz", + "integrity": "sha512-AM6TzwYqGChO45oiuPqwL2t20/HdMC1rTPAesnBCgPCSF1x3oN9MVUwQV2iyz4xqWrctwK5RNC8LV22kaQCNYg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/parser": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz", - "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==", + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.7.tgz", + "integrity": "sha512-aZn7ETtQsjjGG5HruveUK06cU3Hljuhd9Iojm4M8WWv3wLE6OkE5PWbDUkItmMgegmccaITudyuW5RPYrYlgWw==", "dev": true, "license": "MIT", + "dependencies": { + "@babel/types": "^7.25.7" + }, "bin": { "parser": "bin/babel-parser.js" }, @@ -237,34 +387,49 @@ "node": ">=6.0.0" } }, + "node_modules/@babel/types": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.7.tgz", + "integrity": "sha512-vwIVdXG+j+FOpkwqHRcBgHLYNL7XMkufrlaFvL9o6Ai9sJn9+PdyIL5qa0XzTZw084c+u9LOls53eoZWP/W5WQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.25.7", + "@babel/helper-validator-identifier": "^7.25.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@docsearch/css": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@docsearch/css/-/css-3.6.0.tgz", - "integrity": "sha512-+sbxb71sWre+PwDK7X2T8+bhS6clcVMLwBPznX45Qu6opJcgRjAp7gYSDzVFp187J+feSj5dNBN1mJoi6ckkUQ==", + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/@docsearch/css/-/css-3.6.2.tgz", + "integrity": "sha512-vKNZepO2j7MrYBTZIGXvlUOIR+v9KRf70FApRgovWrj3GTs1EITz/Xb0AOlm1xsQBp16clVZj1SY/qaOJbQtZw==", "dev": true, "license": "MIT" }, "node_modules/@docsearch/js": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@docsearch/js/-/js-3.6.0.tgz", - "integrity": "sha512-QujhqINEElrkIfKwyyyTfbsfMAYCkylInLYMRqHy7PHc8xTBQCow73tlo/Kc7oIwBrCLf0P3YhjlOeV4v8hevQ==", + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/@docsearch/js/-/js-3.6.2.tgz", + "integrity": "sha512-pS4YZF+VzUogYrkblCucQ0Oy2m8Wggk8Kk7lECmZM60hTbaydSIhJTTiCrmoxtBqV8wxORnOqcqqOfbmkkQEcA==", "dev": true, "license": "MIT", "dependencies": { - "@docsearch/react": "3.6.0", + "@docsearch/react": "3.6.2", "preact": "^10.0.0" } }, "node_modules/@docsearch/react": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@docsearch/react/-/react-3.6.0.tgz", - "integrity": "sha512-HUFut4ztcVNmqy9gp/wxNbC7pTOHhgVVkHVGCACTuLhUKUhKAF9KYHJtMiLUJxEqiFLQiuri1fWF8zqwM/cu1w==", + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/@docsearch/react/-/react-3.6.2.tgz", + "integrity": "sha512-rtZce46OOkVflCQH71IdbXSFK+S8iJZlUF56XBW5rIgx/eG5qoomC7Ag3anZson1bBac/JFQn7XOBfved/IMRA==", "dev": true, "license": "MIT", "dependencies": { "@algolia/autocomplete-core": "1.9.3", "@algolia/autocomplete-preset-algolia": "1.9.3", - "@docsearch/css": "3.6.0", + "@docsearch/css": "3.6.2", "algoliasearch": "^4.19.1" }, "peerDependencies": { @@ -680,16 +845,16 @@ } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", "dev": true, "license": "MIT" }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.18.0.tgz", - "integrity": "sha512-Tya6xypR10giZV1XzxmH5wr25VcZSncG0pZIjfePT0OVBvqNEurzValetGNarVrGiq66EBVAFn15iYX4w6FKgQ==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.24.0.tgz", + "integrity": "sha512-Q6HJd7Y6xdB48x8ZNVDOqsbh2uByBhgK8PiQgPhwkIw/HC/YX5Ghq2mQY5sRMZWHb3VsFkWooUVOZHKr7DmDIA==", "cpu": [ "arm" ], @@ -701,9 +866,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.18.0.tgz", - "integrity": "sha512-avCea0RAP03lTsDhEyfy+hpfr85KfyTctMADqHVhLAF3MlIkq83CP8UfAHUssgXTYd+6er6PaAhx/QGv4L1EiA==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.24.0.tgz", + "integrity": "sha512-ijLnS1qFId8xhKjT81uBHuuJp2lU4x2yxa4ctFPtG+MqEE6+C5f/+X/bStmxapgmwLwiL3ih122xv8kVARNAZA==", "cpu": [ "arm64" ], @@ -715,9 +880,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.18.0.tgz", - "integrity": "sha512-IWfdwU7KDSm07Ty0PuA/W2JYoZ4iTj3TUQjkVsO/6U+4I1jN5lcR71ZEvRh52sDOERdnNhhHU57UITXz5jC1/w==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.24.0.tgz", + "integrity": "sha512-bIv+X9xeSs1XCk6DVvkO+S/z8/2AMt/2lMqdQbMrmVpgFvXlmde9mLcbQpztXm1tajC3raFDqegsH18HQPMYtA==", "cpu": [ "arm64" ], @@ -729,9 +894,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.18.0.tgz", - "integrity": "sha512-n2LMsUz7Ynu7DoQrSQkBf8iNrjOGyPLrdSg802vk6XT3FtsgX6JbE8IHRvposskFm9SNxzkLYGSq9QdpLYpRNA==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.24.0.tgz", + "integrity": "sha512-X6/nOwoFN7RT2svEQWUsW/5C/fYMBe4fnLK9DQk4SX4mgVBiTA9h64kjUYPvGQ0F/9xwJ5U5UfTbl6BEjaQdBQ==", "cpu": [ "x64" ], @@ -743,9 +908,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.18.0.tgz", - "integrity": "sha512-C/zbRYRXFjWvz9Z4haRxcTdnkPt1BtCkz+7RtBSuNmKzMzp3ZxdM28Mpccn6pt28/UWUCTXa+b0Mx1k3g6NOMA==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.24.0.tgz", + "integrity": "sha512-0KXvIJQMOImLCVCz9uvvdPgfyWo93aHHp8ui3FrtOP57svqrF/roSSR5pjqL2hcMp0ljeGlU4q9o/rQaAQ3AYA==", "cpu": [ "arm" ], @@ -757,9 +922,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.18.0.tgz", - "integrity": "sha512-l3m9ewPgjQSXrUMHg93vt0hYCGnrMOcUpTz6FLtbwljo2HluS4zTXFy2571YQbisTnfTKPZ01u/ukJdQTLGh9A==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.24.0.tgz", + "integrity": "sha512-it2BW6kKFVh8xk/BnHfakEeoLPv8STIISekpoF+nBgWM4d55CZKc7T4Dx1pEbTnYm/xEKMgy1MNtYuoA8RFIWw==", "cpu": [ "arm" ], @@ -771,9 +936,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.18.0.tgz", - "integrity": "sha512-rJ5D47d8WD7J+7STKdCUAgmQk49xuFrRi9pZkWoRD1UeSMakbcepWXPF8ycChBoAqs1pb2wzvbY6Q33WmN2ftw==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.24.0.tgz", + "integrity": "sha512-i0xTLXjqap2eRfulFVlSnM5dEbTVque/3Pi4g2y7cxrs7+a9De42z4XxKLYJ7+OhE3IgxvfQM7vQc43bwTgPwA==", "cpu": [ "arm64" ], @@ -785,9 +950,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.18.0.tgz", - "integrity": "sha512-be6Yx37b24ZwxQ+wOQXXLZqpq4jTckJhtGlWGZs68TgdKXJgw54lUUoFYrg6Zs/kjzAQwEwYbp8JxZVzZLRepQ==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.24.0.tgz", + "integrity": "sha512-9E6MKUJhDuDh604Qco5yP/3qn3y7SLXYuiC0Rpr89aMScS2UAmK1wHP2b7KAa1nSjWJc/f/Lc0Wl1L47qjiyQw==", "cpu": [ "arm64" ], @@ -799,9 +964,9 @@ ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.18.0.tgz", - "integrity": "sha512-hNVMQK+qrA9Todu9+wqrXOHxFiD5YmdEi3paj6vP02Kx1hjd2LLYR2eaN7DsEshg09+9uzWi2W18MJDlG0cxJA==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.24.0.tgz", + "integrity": "sha512-2XFFPJ2XMEiF5Zi2EBf4h73oR1V/lycirxZxHZNc93SqDN/IWhYYSYj8I9381ikUFXZrz2v7r2tOVk2NBwxrWw==", "cpu": [ "ppc64" ], @@ -813,9 +978,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.18.0.tgz", - "integrity": "sha512-ROCM7i+m1NfdrsmvwSzoxp9HFtmKGHEqu5NNDiZWQtXLA8S5HBCkVvKAxJ8U+CVctHwV2Gb5VUaK7UAkzhDjlg==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.24.0.tgz", + "integrity": "sha512-M3Dg4hlwuntUCdzU7KjYqbbd+BLq3JMAOhCKdBE3TcMGMZbKkDdJ5ivNdehOssMCIokNHFOsv7DO4rlEOfyKpg==", "cpu": [ "riscv64" ], @@ -827,9 +992,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.18.0.tgz", - "integrity": "sha512-0UyyRHyDN42QL+NbqevXIIUnKA47A+45WyasO+y2bGJ1mhQrfrtXUpTxCOrfxCR4esV3/RLYyucGVPiUsO8xjg==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.24.0.tgz", + "integrity": "sha512-mjBaoo4ocxJppTorZVKWFpy1bfFj9FeCMJqzlMQGjpNPY9JwQi7OuS1axzNIk0nMX6jSgy6ZURDZ2w0QW6D56g==", "cpu": [ "s390x" ], @@ -841,9 +1006,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.18.0.tgz", - "integrity": "sha512-xuglR2rBVHA5UsI8h8UbX4VJ470PtGCf5Vpswh7p2ukaqBGFTnsfzxUBetoWBWymHMxbIG0Cmx7Y9qDZzr648w==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.24.0.tgz", + "integrity": "sha512-ZXFk7M72R0YYFN5q13niV0B7G8/5dcQ9JDp8keJSfr3GoZeXEoMHP/HlvqROA3OMbMdfr19IjCeNAnPUG93b6A==", "cpu": [ "x64" ], @@ -855,9 +1020,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.18.0.tgz", - "integrity": "sha512-LKaqQL9osY/ir2geuLVvRRs+utWUNilzdE90TpyoX0eNqPzWjRm14oMEE+YLve4k/NAqCdPkGYDaDF5Sw+xBfg==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.24.0.tgz", + "integrity": "sha512-w1i+L7kAXZNdYl+vFvzSZy8Y1arS7vMgIy8wusXJzRrPyof5LAb02KGr1PD2EkRcl73kHulIID0M501lN+vobQ==", "cpu": [ "x64" ], @@ -869,9 +1034,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.18.0.tgz", - "integrity": "sha512-7J6TkZQFGo9qBKH0pk2cEVSRhJbL6MtfWxth7Y5YmZs57Pi+4x6c2dStAUvaQkHQLnEQv1jzBUW43GvZW8OFqA==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.24.0.tgz", + "integrity": "sha512-VXBrnPWgBpVDCVY6XF3LEW0pOU51KbaHhccHw6AS6vBWIC60eqsH19DAeeObl+g8nKAz04QFdl/Cefta0xQtUQ==", "cpu": [ "arm64" ], @@ -883,9 +1048,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.18.0.tgz", - "integrity": "sha512-Txjh+IxBPbkUB9+SXZMpv+b/vnTEtFyfWZgJ6iyCmt2tdx0OF5WhFowLmnh8ENGNpfUlUZkdI//4IEmhwPieNg==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.24.0.tgz", + "integrity": "sha512-xrNcGDU0OxVcPTH/8n/ShH4UevZxKIO6HJFK0e15XItZP2UcaiLFd5kiX7hJnqCbSztUF8Qot+JWBC/QXRPYWQ==", "cpu": [ "ia32" ], @@ -897,9 +1062,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.18.0.tgz", - "integrity": "sha512-UOo5FdvOL0+eIVTgS4tIdbW+TtnBLWg1YBCcU2KWM7nuNwRz9bksDX1bekJJCpu25N1DVWaCwnT39dVQxzqS8g==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.24.0.tgz", + "integrity": "sha512-fbMkAF7fufku0N2dE5TBXcNlg0pt0cJue4xBRE2Qc5Vqikxr4VCgKj/ht6SMdFcOacVA9rqF70APJ8RN/4vMJw==", "cpu": [ "x64" ], @@ -911,29 +1076,75 @@ ] }, "node_modules/@shikijs/core": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.10.3.tgz", - "integrity": "sha512-D45PMaBaeDHxww+EkcDQtDAtzv00Gcsp72ukBtaLSmqRvh0WgGMq3Al0rl1QQBZfuneO75NXMIzEZGFitThWbg==", + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.21.0.tgz", + "integrity": "sha512-zAPMJdiGuqXpZQ+pWNezQAk5xhzRXBNiECFPcJLtUdsFM3f//G95Z15EHTnHchYycU8kIIysqGgxp8OVSj1SPQ==", "dev": true, "license": "MIT", "dependencies": { - "@types/hast": "^3.0.4" + "@shikijs/engine-javascript": "1.21.0", + "@shikijs/engine-oniguruma": "1.21.0", + "@shikijs/types": "1.21.0", + "@shikijs/vscode-textmate": "^9.2.2", + "@types/hast": "^3.0.4", + "hast-util-to-html": "^9.0.3" + } + }, + "node_modules/@shikijs/engine-javascript": { + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-1.21.0.tgz", + "integrity": "sha512-jxQHNtVP17edFW4/0vICqAVLDAxmyV31MQJL4U/Kg+heQALeKYVOWo0sMmEZ18FqBt+9UCdyqGKYE7bLRtk9mg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@shikijs/types": "1.21.0", + "@shikijs/vscode-textmate": "^9.2.2", + "oniguruma-to-js": "0.4.3" + } + }, + "node_modules/@shikijs/engine-oniguruma": { + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-1.21.0.tgz", + "integrity": "sha512-AIZ76XocENCrtYzVU7S4GY/HL+tgHGbVU+qhiDyNw1qgCA5OSi4B4+HY4BtAoJSMGuD/L5hfTzoRVbzEm2WTvg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@shikijs/types": "1.21.0", + "@shikijs/vscode-textmate": "^9.2.2" } }, "node_modules/@shikijs/transformers": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/@shikijs/transformers/-/transformers-1.10.3.tgz", - "integrity": "sha512-MNjsyye2WHVdxfZUSr5frS97sLGe6G1T+1P41QjyBFJehZphMcr4aBlRLmq6OSPBslYe9byQPVvt/LJCOfxw8Q==", + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/@shikijs/transformers/-/transformers-1.21.0.tgz", + "integrity": "sha512-aA+XGGSzipcvqdsOYL8l6Q2RYiMuJNdhdt9eZnkJmW+wjSOixN/I7dBq3fISwvEMDlawrtuXM3eybLCEC+Fjlg==", "dev": true, "license": "MIT", "dependencies": { - "shiki": "1.10.3" + "shiki": "1.21.0" } }, + "node_modules/@shikijs/types": { + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-1.21.0.tgz", + "integrity": "sha512-tzndANDhi5DUndBtpojEq/42+dpUF2wS7wdCDQaFtIXm3Rd1QkrcVgSSRLOvEwexekihOXfbYJINW37g96tJRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@shikijs/vscode-textmate": "^9.2.2", + "@types/hast": "^3.0.4" + } + }, + "node_modules/@shikijs/vscode-textmate": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/@shikijs/vscode-textmate/-/vscode-textmate-9.2.2.tgz", + "integrity": "sha512-TMp15K+GGYrWlZM8+Lnj9EaHEFmOen0WJBrfa17hF7taDOYthuPPV0GWzfd/9iMij0akS/8Yw2ikquH7uVi/fg==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/estree": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", - "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", "dev": true, "license": "MIT" }, @@ -955,9 +1166,9 @@ "license": "MIT" }, "node_modules/@types/markdown-it": { - "version": "14.1.1", - "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-14.1.1.tgz", - "integrity": "sha512-4NpsnpYl2Gt1ljyBGrKMxFYAYvpqbnnkgP/i/g+NLpjEUa3obn1XJCur9YbEXKDAkaXqsR1LbDnGEJ0MmKFxfg==", + "version": "14.1.2", + "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-14.1.2.tgz", + "integrity": "sha512-promo4eFwuiW+TfGxhi+0x3czqTYJkG8qB17ZUJiVF10Xm7NLVRSLUsfRTU/6h1e24VvRnXCx+hG7li58lkzog==", "dev": true, "license": "MIT", "dependencies": { @@ -965,6 +1176,16 @@ "@types/mdurl": "^2" } }, + "node_modules/@types/mdast": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", + "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "*" + } + }, "node_modules/@types/mdurl": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-2.0.0.tgz", @@ -973,9 +1194,9 @@ "license": "MIT" }, "node_modules/@types/unist": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.2.tgz", - "integrity": "sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", + "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==", "dev": true, "license": "MIT" }, @@ -986,10 +1207,17 @@ "dev": true, "license": "MIT" }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true, + "license": "ISC" + }, "node_modules/@vitejs/plugin-vue": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.0.5.tgz", - "integrity": "sha512-LOjm7XeIimLBZyzinBQ6OSm3UBCNVCpLkxGC0oWmm2YPzVZoxMsdvNVimLTBzpAnR9hl/yn1SHGuRfe6/Td9rQ==", + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.1.4.tgz", + "integrity": "sha512-N2XSI2n3sQqp5w7Y/AN/L2XDjBIRGqXko+eDp42sydYSBeJuSm5a1sLf8zakmo8u7tA8NmBgoDLA1HeOESjp9A==", "dev": true, "license": "MIT", "engines": { @@ -1001,77 +1229,77 @@ } }, "node_modules/@vue/compiler-core": { - "version": "3.4.31", - "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.31.tgz", - "integrity": "sha512-skOiodXWTV3DxfDhB4rOf3OGalpITLlgCeOwb+Y9GJpfQ8ErigdBUHomBzvG78JoVE8MJoQsb+qhZiHfKeNeEg==", + "version": "3.5.10", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.10.tgz", + "integrity": "sha512-iXWlk+Cg/ag7gLvY0SfVucU8Kh2CjysYZjhhP70w9qI4MvSox4frrP+vDGvtQuzIcgD8+sxM6lZvCtdxGunTAA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.24.7", - "@vue/shared": "3.4.31", + "@babel/parser": "^7.25.3", + "@vue/shared": "3.5.10", "entities": "^4.5.0", "estree-walker": "^2.0.2", "source-map-js": "^1.2.0" } }, "node_modules/@vue/compiler-dom": { - "version": "3.4.31", - "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.31.tgz", - "integrity": "sha512-wK424WMXsG1IGMyDGyLqB+TbmEBFM78hIsOJ9QwUVLGrcSk0ak6zYty7Pj8ftm7nEtdU/DGQxAXp0/lM/2cEpQ==", + "version": "3.5.10", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.10.tgz", + "integrity": "sha512-DyxHC6qPcktwYGKOIy3XqnHRrrXyWR2u91AjP+nLkADko380srsC2DC3s7Y1Rk6YfOlxOlvEQKa9XXmLI+W4ZA==", "dev": true, "license": "MIT", "dependencies": { - "@vue/compiler-core": "3.4.31", - "@vue/shared": "3.4.31" + "@vue/compiler-core": "3.5.10", + "@vue/shared": "3.5.10" } }, "node_modules/@vue/compiler-sfc": { - "version": "3.4.31", - "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.4.31.tgz", - "integrity": "sha512-einJxqEw8IIJxzmnxmJBuK2usI+lJonl53foq+9etB2HAzlPjAS/wa7r0uUpXw5ByX3/0uswVSrjNb17vJm1kQ==", + "version": "3.5.10", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.10.tgz", + "integrity": "sha512-to8E1BgpakV7224ZCm8gz1ZRSyjNCAWEplwFMWKlzCdP9DkMKhRRwt0WkCjY7jkzi/Vz3xgbpeig5Pnbly4Tow==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.24.7", - "@vue/compiler-core": "3.4.31", - "@vue/compiler-dom": "3.4.31", - "@vue/compiler-ssr": "3.4.31", - "@vue/shared": "3.4.31", + "@babel/parser": "^7.25.3", + "@vue/compiler-core": "3.5.10", + "@vue/compiler-dom": "3.5.10", + "@vue/compiler-ssr": "3.5.10", + "@vue/shared": "3.5.10", "estree-walker": "^2.0.2", - "magic-string": "^0.30.10", - "postcss": "^8.4.38", + "magic-string": "^0.30.11", + "postcss": "^8.4.47", "source-map-js": "^1.2.0" } }, "node_modules/@vue/compiler-ssr": { - "version": "3.4.31", - "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.4.31.tgz", - "integrity": "sha512-RtefmITAje3fJ8FSg1gwgDhdKhZVntIVbwupdyZDSifZTRMiWxWehAOTCc8/KZDnBOcYQ4/9VWxsTbd3wT0hAA==", + "version": "3.5.10", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.5.10.tgz", + "integrity": "sha512-hxP4Y3KImqdtyUKXDRSxKSRkSm1H9fCvhojEYrnaoWhE4w/y8vwWhnosJoPPe2AXm5sU7CSbYYAgkt2ZPhDz+A==", "dev": true, "license": "MIT", "dependencies": { - "@vue/compiler-dom": "3.4.31", - "@vue/shared": "3.4.31" + "@vue/compiler-dom": "3.5.10", + "@vue/shared": "3.5.10" } }, "node_modules/@vue/devtools-api": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-7.3.5.tgz", - "integrity": "sha512-BSdBBu5hOIv+gBJC9jzYMh5bC27FQwjWLSb8fVAniqlL9gvsqvK27xTgczMf+hgctlszMYQnRm3bpY/j8vhPqw==", + "version": "7.4.6", + "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-7.4.6.tgz", + "integrity": "sha512-XipBV5k0/IfTr0sNBDTg7OBUCp51cYMMXyPxLXJZ4K/wmUeMqt8cVdr2ZZGOFq+si/jTyCYnNxeKoyev5DOUUA==", "dev": true, "license": "MIT", "dependencies": { - "@vue/devtools-kit": "^7.3.5" + "@vue/devtools-kit": "^7.4.6" } }, "node_modules/@vue/devtools-kit": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/@vue/devtools-kit/-/devtools-kit-7.3.5.tgz", - "integrity": "sha512-wwfi10gJ1HMtjzcd8aIOnzBHlIRqsYDgcDyrKvkeyc0Gbcoe7UrkXRVHZUOtcxxoplHA0PwpT6wFg0uUCmi8Ww==", + "version": "7.4.6", + "resolved": "https://registry.npmjs.org/@vue/devtools-kit/-/devtools-kit-7.4.6.tgz", + "integrity": "sha512-NbYBwPWgEic1AOd9bWExz9weBzFdjiIfov0yRn4DrRfR+EQJCI9dn4I0XS7IxYGdkmUJi8mFW42LLk18WsGqew==", "dev": true, "license": "MIT", "dependencies": { - "@vue/devtools-shared": "^7.3.5", + "@vue/devtools-shared": "^7.4.6", "birpc": "^0.2.17", "hookable": "^5.5.3", "mitt": "^3.0.1", @@ -1081,9 +1309,9 @@ } }, "node_modules/@vue/devtools-shared": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/@vue/devtools-shared/-/devtools-shared-7.3.5.tgz", - "integrity": "sha512-Rqii3VazmWTi67a86rYopi61n5Ved05EybJCwyrfoO9Ok3MaS/4yRFl706ouoISMlyrASJFEzM0/AiDA6w4f9A==", + "version": "7.4.6", + "resolved": "https://registry.npmjs.org/@vue/devtools-shared/-/devtools-shared-7.4.6.tgz", + "integrity": "sha512-rPeSBzElnHYMB05Cc056BQiJpgocQjY8XVulgni+O9a9Gr9tNXgPteSzFFD+fT/iWMxNuUgGKs9CuW5DZewfIg==", "dev": true, "license": "MIT", "dependencies": { @@ -1091,80 +1319,80 @@ } }, "node_modules/@vue/reactivity": { - "version": "3.4.31", - "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.31.tgz", - "integrity": "sha512-VGkTani8SOoVkZNds1PfJ/T1SlAIOf8E58PGAhIOUDYPC4GAmFA2u/E14TDAFcf3vVDKunc4QqCe/SHr8xC65Q==", + "version": "3.5.10", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.5.10.tgz", + "integrity": "sha512-kW08v06F6xPSHhid9DJ9YjOGmwNDOsJJQk0ax21wKaUYzzuJGEuoKNU2Ujux8FLMrP7CFJJKsHhXN9l2WOVi2g==", "dev": true, "license": "MIT", "dependencies": { - "@vue/shared": "3.4.31" + "@vue/shared": "3.5.10" } }, "node_modules/@vue/runtime-core": { - "version": "3.4.31", - "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.4.31.tgz", - "integrity": "sha512-LDkztxeUPazxG/p8c5JDDKPfkCDBkkiNLVNf7XZIUnJ+66GVGkP+TIh34+8LtPisZ+HMWl2zqhIw0xN5MwU1cw==", + "version": "3.5.10", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.5.10.tgz", + "integrity": "sha512-9Q86I5Qq3swSkFfzrZ+iqEy7Vla325M7S7xc1NwKnRm/qoi1Dauz0rT6mTMmscqx4qz0EDJ1wjB+A36k7rl8mA==", "dev": true, "license": "MIT", "dependencies": { - "@vue/reactivity": "3.4.31", - "@vue/shared": "3.4.31" + "@vue/reactivity": "3.5.10", + "@vue/shared": "3.5.10" } }, "node_modules/@vue/runtime-dom": { - "version": "3.4.31", - "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.4.31.tgz", - "integrity": "sha512-2Auws3mB7+lHhTFCg8E9ZWopA6Q6L455EcU7bzcQ4x6Dn4cCPuqj6S2oBZgN2a8vJRS/LSYYxwFFq2Hlx3Fsaw==", + "version": "3.5.10", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.5.10.tgz", + "integrity": "sha512-t3x7ht5qF8ZRi1H4fZqFzyY2j+GTMTDxRheT+i8M9Ph0oepUxoadmbwlFwMoW7RYCpNQLpP2Yx3feKs+fyBdpA==", "dev": true, "license": "MIT", "dependencies": { - "@vue/reactivity": "3.4.31", - "@vue/runtime-core": "3.4.31", - "@vue/shared": "3.4.31", + "@vue/reactivity": "3.5.10", + "@vue/runtime-core": "3.5.10", + "@vue/shared": "3.5.10", "csstype": "^3.1.3" } }, "node_modules/@vue/server-renderer": { - "version": "3.4.31", - "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.4.31.tgz", - "integrity": "sha512-D5BLbdvrlR9PE3by9GaUp1gQXlCNadIZytMIb8H2h3FMWJd4oUfkUTEH2wAr3qxoRz25uxbTcbqd3WKlm9EHQA==", + "version": "3.5.10", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.5.10.tgz", + "integrity": "sha512-IVE97tt2kGKwHNq9yVO0xdh1IvYfZCShvDSy46JIh5OQxP1/EXSpoDqetVmyIzL7CYOWnnmMkVqd7YK2QSWkdw==", "dev": true, "license": "MIT", "dependencies": { - "@vue/compiler-ssr": "3.4.31", - "@vue/shared": "3.4.31" + "@vue/compiler-ssr": "3.5.10", + "@vue/shared": "3.5.10" }, "peerDependencies": { - "vue": "3.4.31" + "vue": "3.5.10" } }, "node_modules/@vue/shared": { - "version": "3.4.31", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.31.tgz", - "integrity": "sha512-Yp3wtJk//8cO4NItOPpi3QkLExAr/aLBGZMmTtW9WpdwBCJpRM6zj9WgWktXAl8IDIozwNMByT45JP3tO3ACWA==", + "version": "3.5.10", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.10.tgz", + "integrity": "sha512-VkkBhU97Ki+XJ0xvl4C9YJsIZ2uIlQ7HqPpZOS3m9VCvmROPaChZU6DexdMJqvz9tbgG+4EtFVrSuailUq5KGQ==", "dev": true, "license": "MIT" }, "node_modules/@vueuse/core": { - "version": "10.11.0", - "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-10.11.0.tgz", - "integrity": "sha512-x3sD4Mkm7PJ+pcq3HX8PLPBadXCAlSDR/waK87dz0gQE+qJnaaFhc/dZVfJz+IUYzTMVGum2QlR7ImiJQN4s6g==", + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-11.1.0.tgz", + "integrity": "sha512-P6dk79QYA6sKQnghrUz/1tHi0n9mrb/iO1WTMk/ElLmTyNqgDeSZ3wcDf6fRBGzRJbeG1dxzEOvLENMjr+E3fg==", "dev": true, "license": "MIT", "dependencies": { "@types/web-bluetooth": "^0.0.20", - "@vueuse/metadata": "10.11.0", - "@vueuse/shared": "10.11.0", - "vue-demi": ">=0.14.8" + "@vueuse/metadata": "11.1.0", + "@vueuse/shared": "11.1.0", + "vue-demi": ">=0.14.10" }, "funding": { "url": "https://github.com/sponsors/antfu" } }, "node_modules/@vueuse/core/node_modules/vue-demi": { - "version": "0.14.8", - "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.8.tgz", - "integrity": "sha512-Uuqnk9YE9SsWeReYqK2alDI5YzciATE0r2SkA6iMAtuXvNTMNACJLJEXNXaEy94ECuBe4Sk6RzRU80kjdbIo1Q==", + "version": "0.14.10", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.10.tgz", + "integrity": "sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -1189,15 +1417,15 @@ } }, "node_modules/@vueuse/integrations": { - "version": "10.11.0", - "resolved": "https://registry.npmjs.org/@vueuse/integrations/-/integrations-10.11.0.tgz", - "integrity": "sha512-Pp6MtWEIr+NDOccWd8j59Kpjy5YDXogXI61Kb1JxvSfVBO8NzFQkmrKmSZz47i+ZqHnIzxaT38L358yDHTncZg==", + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/@vueuse/integrations/-/integrations-11.1.0.tgz", + "integrity": "sha512-O2ZgrAGPy0qAjpoI2YR3egNgyEqwG85fxfwmA9BshRIGjV4G6yu6CfOPpMHAOoCD+UfsIl7Vb1bXJ6ifrHYDDA==", "dev": true, "license": "MIT", "dependencies": { - "@vueuse/core": "10.11.0", - "@vueuse/shared": "10.11.0", - "vue-demi": ">=0.14.8" + "@vueuse/core": "11.1.0", + "@vueuse/shared": "11.1.0", + "vue-demi": ">=0.14.10" }, "funding": { "url": "https://github.com/sponsors/antfu" @@ -1205,16 +1433,16 @@ "peerDependencies": { "async-validator": "^4", "axios": "^1", - "change-case": "^4", - "drauu": "^0.3", + "change-case": "^5", + "drauu": "^0.4", "focus-trap": "^7", - "fuse.js": "^6", + "fuse.js": "^7", "idb-keyval": "^6", - "jwt-decode": "^3", + "jwt-decode": "^4", "nprogress": "^0.2", "qrcode": "^1.5", "sortablejs": "^1", - "universal-cookie": "^6" + "universal-cookie": "^7" }, "peerDependenciesMeta": { "async-validator": { @@ -1256,9 +1484,9 @@ } }, "node_modules/@vueuse/integrations/node_modules/vue-demi": { - "version": "0.14.8", - "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.8.tgz", - "integrity": "sha512-Uuqnk9YE9SsWeReYqK2alDI5YzciATE0r2SkA6iMAtuXvNTMNACJLJEXNXaEy94ECuBe4Sk6RzRU80kjdbIo1Q==", + "version": "0.14.10", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.10.tgz", + "integrity": "sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -1283,9 +1511,9 @@ } }, "node_modules/@vueuse/metadata": { - "version": "10.11.0", - "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-10.11.0.tgz", - "integrity": "sha512-kQX7l6l8dVWNqlqyN3ePW3KmjCQO3ZMgXuBMddIu83CmucrsBfXlH+JoviYyRBws/yLTQO8g3Pbw+bdIoVm4oQ==", + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-11.1.0.tgz", + "integrity": "sha512-l9Q502TBTaPYGanl1G+hPgd3QX5s4CGnpXriVBR5fEZ/goI6fvDaVmIl3Td8oKFurOxTmbXvBPSsgrd6eu6HYg==", "dev": true, "license": "MIT", "funding": { @@ -1293,22 +1521,22 @@ } }, "node_modules/@vueuse/shared": { - "version": "10.11.0", - "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-10.11.0.tgz", - "integrity": "sha512-fyNoIXEq3PfX1L3NkNhtVQUSRtqYwJtJg+Bp9rIzculIZWHTkKSysujrOk2J+NrRulLTQH9+3gGSfYLWSEWU1A==", + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-11.1.0.tgz", + "integrity": "sha512-YUtIpY122q7osj+zsNMFAfMTubGz0sn5QzE5gPzAIiCmtt2ha3uQUY1+JPyL4gRCTsLPX82Y9brNbo/aqlA91w==", "dev": true, "license": "MIT", "dependencies": { - "vue-demi": ">=0.14.8" + "vue-demi": ">=0.14.10" }, "funding": { "url": "https://github.com/sponsors/antfu" } }, "node_modules/@vueuse/shared/node_modules/vue-demi": { - "version": "0.14.8", - "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.8.tgz", - "integrity": "sha512-Uuqnk9YE9SsWeReYqK2alDI5YzciATE0r2SkA6iMAtuXvNTMNACJLJEXNXaEy94ECuBe4Sk6RzRU80kjdbIo1Q==", + "version": "0.14.10", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.10.tgz", + "integrity": "sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -1356,6 +1584,49 @@ "@algolia/transporter": "4.24.0" } }, + "node_modules/algoliasearch/node_modules/@algolia/client-common": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.24.0.tgz", + "integrity": "sha512-bc2ROsNL6w6rqpl5jj/UywlIYC21TwSSoFHKl01lYirGMW+9Eek6r02Tocg4gZ8HAw3iBvu6XQiM3BEbmEMoiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@algolia/requester-common": "4.24.0", + "@algolia/transporter": "4.24.0" + } + }, + "node_modules/algoliasearch/node_modules/@algolia/client-search": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.24.0.tgz", + "integrity": "sha512-uRW6EpNapmLAD0mW47OXqTP8eiIx5F6qN9/x/7HHO6owL3N1IXqydGwW5nhDFBrV+ldouro2W1VX3XlcUXEFCA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@algolia/client-common": "4.24.0", + "@algolia/requester-common": "4.24.0", + "@algolia/transporter": "4.24.0" + } + }, + "node_modules/algoliasearch/node_modules/@algolia/requester-browser-xhr": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.24.0.tgz", + "integrity": "sha512-Z2NxZMb6+nVXSjF13YpjYTdvV3032YTBSGm2vnYvYPA6mMxzM3v5rsCiSspndn9rzIW4Qp1lPHBvuoKJV6jnAA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@algolia/requester-common": "4.24.0" + } + }, + "node_modules/algoliasearch/node_modules/@algolia/requester-node-http": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-4.24.0.tgz", + "integrity": "sha512-JF18yTjNOVYvU/L3UosRcvbPMGT9B+/GQWNWnenIImglzNVGpyzChkXLnrSf6uxwVNO6ESGu6oN8MqcGQcjQJw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@algolia/requester-common": "4.24.0" + } + }, "node_modules/birpc": { "version": "0.2.17", "resolved": "https://registry.npmjs.org/birpc/-/birpc-0.2.17.tgz", @@ -1366,6 +1637,50 @@ "url": "https://github.com/sponsors/antfu" } }, + "node_modules/ccount": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ccount/-/ccount-2.0.1.tgz", + "integrity": "sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-entities-html4": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-2.1.0.tgz", + "integrity": "sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-entities-legacy": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz", + "integrity": "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/comma-separated-tokens": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz", + "integrity": "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/copy-anything": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-3.0.5.tgz", @@ -1389,6 +1704,30 @@ "dev": true, "license": "MIT" }, + "node_modules/dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/devlop": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/devlop/-/devlop-1.1.0.tgz", + "integrity": "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==", + "dev": true, + "license": "MIT", + "dependencies": { + "dequal": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/entities": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", @@ -1449,9 +1788,9 @@ "license": "MIT" }, "node_modules/focus-trap": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/focus-trap/-/focus-trap-7.5.4.tgz", - "integrity": "sha512-N7kHdlgsO/v+iD/dMoJKtsSqs5Dz/dXZVebRgJw23LDk+jMi/974zyiOYDziY2JPp8xivq9BmUGwIJMiuSBi7w==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/focus-trap/-/focus-trap-7.6.0.tgz", + "integrity": "sha512-1td0l3pMkWJLFipobUcGaf+5DTY4PLDDrcqoSaKP8ediO/CoWCCYk/fT/Y2A4e6TNB+Sh6clRJCjOPPnKoNHnQ==", "dev": true, "license": "MIT", "dependencies": { @@ -1473,6 +1812,44 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, + "node_modules/hast-util-to-html": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-9.0.3.tgz", + "integrity": "sha512-M17uBDzMJ9RPCqLMO92gNNUDuBSq10a25SDBI08iCCxmorf4Yy6sYHK57n9WAbRAAaU+DuR4W6GN9K4DFZesYg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "@types/unist": "^3.0.0", + "ccount": "^2.0.0", + "comma-separated-tokens": "^2.0.0", + "hast-util-whitespace": "^3.0.0", + "html-void-elements": "^3.0.0", + "mdast-util-to-hast": "^13.0.0", + "property-information": "^6.0.0", + "space-separated-tokens": "^2.0.0", + "stringify-entities": "^4.0.0", + "zwitch": "^2.0.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-whitespace": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-3.0.0.tgz", + "integrity": "sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/hookable": { "version": "5.5.3", "resolved": "https://registry.npmjs.org/hookable/-/hookable-5.5.3.tgz", @@ -1480,6 +1857,17 @@ "dev": true, "license": "MIT" }, + "node_modules/html-void-elements": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-3.0.0.tgz", + "integrity": "sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/is-what": { "version": "4.1.16", "resolved": "https://registry.npmjs.org/is-what/-/is-what-4.1.16.tgz", @@ -1494,26 +1882,144 @@ } }, "node_modules/magic-string": { - "version": "0.30.10", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.10.tgz", - "integrity": "sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==", + "version": "0.30.11", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.11.tgz", + "integrity": "sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==", "dev": true, "license": "MIT", "dependencies": { - "@jridgewell/sourcemap-codec": "^1.4.15" + "@jridgewell/sourcemap-codec": "^1.5.0" } }, "node_modules/mark.js": { "version": "8.11.1", "resolved": "https://registry.npmjs.org/mark.js/-/mark.js-8.11.1.tgz", "integrity": "sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ==", - "dev": true + "dev": true, + "license": "MIT" + }, + "node_modules/mdast-util-to-hast": { + "version": "13.2.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-13.2.0.tgz", + "integrity": "sha512-QGYKEuUsYT9ykKBCMOEDLsU5JRObWQusAolFMeko/tYPufNkRffBAQjIE+99jbA87xv6FgmjLtwjh9wBWajwAA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "@ungap/structured-clone": "^1.0.0", + "devlop": "^1.0.0", + "micromark-util-sanitize-uri": "^2.0.0", + "trim-lines": "^3.0.0", + "unist-util-position": "^5.0.0", + "unist-util-visit": "^5.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-util-character": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.0.tgz", + "integrity": "sha512-KvOVV+X1yLBfs9dCBSopq/+G1PcgT3lAK07mC4BzXi5E7ahzMAF8oIupDDJ6mievI6F+lAATkbQQlQixJfT3aQ==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-util-encode": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-2.0.0.tgz", + "integrity": "sha512-pS+ROfCXAGLWCOc8egcBvT0kf27GoWMqtdarNfDcjb6YLuV5cM3ioG45Ys2qOVqeqSbjaKg72vU+Wby3eddPsA==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT" + }, + "node_modules/micromark-util-sanitize-uri": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-2.0.0.tgz", + "integrity": "sha512-WhYv5UEcZrbAtlsnPuChHUAsu/iBPOVaEVsntLBIdpibO0ddy8OzavZz3iL2xVvBZOpolujSliP65Kq0/7KIYw==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-encode": "^2.0.0", + "micromark-util-symbol": "^2.0.0" + } + }, + "node_modules/micromark-util-symbol": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.0.tgz", + "integrity": "sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT" + }, + "node_modules/micromark-util-types": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz", + "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT" }, "node_modules/minisearch": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/minisearch/-/minisearch-6.3.0.tgz", - "integrity": "sha512-ihFnidEeU8iXzcVHy74dhkxh/dn8Dc08ERl0xwoMMGqp4+LvRSCgicb+zGqWthVokQKvCSxITlh3P08OzdTYCQ==", - "dev": true + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/minisearch/-/minisearch-7.1.0.tgz", + "integrity": "sha512-tv7c/uefWdEhcu6hvrfTihflgeEi2tN6VV7HJnCjK6VxM75QQJh4t9FwJCsA2EsRS8LCnu3W87CuGPWMocOLCA==", + "dev": true, + "license": "MIT" }, "node_modules/mitt": { "version": "3.0.1", @@ -1541,6 +2047,19 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, + "node_modules/oniguruma-to-js": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/oniguruma-to-js/-/oniguruma-to-js-0.4.3.tgz", + "integrity": "sha512-X0jWUcAlxORhOqqBREgPMgnshB7ZGYszBNspP+tS9hPD3l13CdaXcHbgImoHUHlrvGx/7AvFEkTRhAGYh+jzjQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "regex": "^4.3.2" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, "node_modules/perfect-debounce": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/perfect-debounce/-/perfect-debounce-1.0.0.tgz", @@ -1549,16 +2068,16 @@ "license": "MIT" }, "node_modules/picocolors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", - "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", + "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==", "dev": true, "license": "ISC" }, "node_modules/postcss": { - "version": "8.4.39", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.39.tgz", - "integrity": "sha512-0vzE+lAiG7hZl1/9I8yzKLx3aR9Xbof3fBHKunvMfOCYAtMhrsnccJY2iTURb9EZd5+pLuiNV9/c/GZJOHsgIw==", + "version": "8.4.47", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz", + "integrity": "sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==", "dev": true, "funding": [ { @@ -1577,17 +2096,17 @@ "license": "MIT", "dependencies": { "nanoid": "^3.3.7", - "picocolors": "^1.0.1", - "source-map-js": "^1.2.0" + "picocolors": "^1.1.0", + "source-map-js": "^1.2.1" }, "engines": { "node": "^10 || ^12 || >=14" } }, "node_modules/preact": { - "version": "10.22.1", - "resolved": "https://registry.npmjs.org/preact/-/preact-10.22.1.tgz", - "integrity": "sha512-jRYbDDgMpIb5LHq3hkI0bbl+l/TQ9UnkdQ0ww+lp+4MMOdqaUYdFc5qeyP+IV8FAd/2Em7drVPeKdQxsiWCf/A==", + "version": "10.24.1", + "resolved": "https://registry.npmjs.org/preact/-/preact-10.24.1.tgz", + "integrity": "sha512-PnBAwFI3Yjxxcxw75n6VId/5TFxNW/81zexzWD9jn1+eSrOP84NdsS38H5IkF/UH3frqRPT+MvuCoVHjTDTnDw==", "dev": true, "license": "MIT", "funding": { @@ -1595,6 +2114,24 @@ "url": "https://opencollective.com/preact" } }, + "node_modules/property-information": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/property-information/-/property-information-6.5.0.tgz", + "integrity": "sha512-PgTgs/BlvHxOu8QuEN7wi5A0OmXaBcHpmCSTehcs6Uuu9IkDIEo13Hy7n898RHfrQ49vKCoGeWZSaAK01nwVig==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/regex": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/regex/-/regex-4.3.3.tgz", + "integrity": "sha512-r/AadFO7owAq1QJVeZ/nq9jNS1vyZt+6t1p/E59B56Rn2GCya+gr1KSyOzNL/er+r+B7phv5jG2xU2Nz1YkmJg==", + "dev": true, + "license": "MIT" + }, "node_modules/rfdc": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz", @@ -1603,13 +2140,13 @@ "license": "MIT" }, "node_modules/rollup": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.18.0.tgz", - "integrity": "sha512-QmJz14PX3rzbJCN1SG4Xe/bAAX2a6NpCP8ab2vfu2GiUr8AQcr2nCV/oEO3yneFarB67zk8ShlIyWb2LGTb3Sg==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.24.0.tgz", + "integrity": "sha512-DOmrlGSXNk1DM0ljiQA+i+o0rSLhtii1je5wgk60j49d1jHT5YYttBv1iWOnYSTG+fZZESUOSNiAl89SIet+Cg==", "dev": true, "license": "MIT", "dependencies": { - "@types/estree": "1.0.5" + "@types/estree": "1.0.6" }, "bin": { "rollup": "dist/bin/rollup" @@ -1619,54 +2156,69 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.18.0", - "@rollup/rollup-android-arm64": "4.18.0", - "@rollup/rollup-darwin-arm64": "4.18.0", - "@rollup/rollup-darwin-x64": "4.18.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.18.0", - "@rollup/rollup-linux-arm-musleabihf": "4.18.0", - "@rollup/rollup-linux-arm64-gnu": "4.18.0", - "@rollup/rollup-linux-arm64-musl": "4.18.0", - "@rollup/rollup-linux-powerpc64le-gnu": "4.18.0", - "@rollup/rollup-linux-riscv64-gnu": "4.18.0", - "@rollup/rollup-linux-s390x-gnu": "4.18.0", - "@rollup/rollup-linux-x64-gnu": "4.18.0", - "@rollup/rollup-linux-x64-musl": "4.18.0", - "@rollup/rollup-win32-arm64-msvc": "4.18.0", - "@rollup/rollup-win32-ia32-msvc": "4.18.0", - "@rollup/rollup-win32-x64-msvc": "4.18.0", + "@rollup/rollup-android-arm-eabi": "4.24.0", + "@rollup/rollup-android-arm64": "4.24.0", + "@rollup/rollup-darwin-arm64": "4.24.0", + "@rollup/rollup-darwin-x64": "4.24.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.24.0", + "@rollup/rollup-linux-arm-musleabihf": "4.24.0", + "@rollup/rollup-linux-arm64-gnu": "4.24.0", + "@rollup/rollup-linux-arm64-musl": "4.24.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.24.0", + "@rollup/rollup-linux-riscv64-gnu": "4.24.0", + "@rollup/rollup-linux-s390x-gnu": "4.24.0", + "@rollup/rollup-linux-x64-gnu": "4.24.0", + "@rollup/rollup-linux-x64-musl": "4.24.0", + "@rollup/rollup-win32-arm64-msvc": "4.24.0", + "@rollup/rollup-win32-ia32-msvc": "4.24.0", + "@rollup/rollup-win32-x64-msvc": "4.24.0", "fsevents": "~2.3.2" } }, "node_modules/search-insights": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/search-insights/-/search-insights-2.14.0.tgz", - "integrity": "sha512-OLN6MsPMCghDOqlCtsIsYgtsC0pnwVTyT9Mu6A3ewOj1DxvzZF6COrn2g86E/c05xbktB0XN04m/t1Z+n+fTGw==", + "version": "2.17.2", + "resolved": "https://registry.npmjs.org/search-insights/-/search-insights-2.17.2.tgz", + "integrity": "sha512-zFNpOpUO+tY2D85KrxJ+aqwnIfdEGi06UH2+xEb+Bp9Mwznmauqc9djbnBibJO5mpfUPPa8st6Sx65+vbeO45g==", "dev": true, "license": "MIT", "peer": true }, "node_modules/shiki": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.10.3.tgz", - "integrity": "sha512-eneCLncGuvPdTutJuLyUGS8QNPAVFO5Trvld2wgEq1e002mwctAhJKeMGWtWVXOIEzmlcLRqcgPSorR6AVzOmQ==", + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.21.0.tgz", + "integrity": "sha512-apCH5BoWTrmHDPGgg3RF8+HAAbEL/CdbYr8rMw7eIrdhCkZHdVGat5mMNlRtd1erNG01VPMIKHNQ0Pj2HMAiog==", "dev": true, "license": "MIT", "dependencies": { - "@shikijs/core": "1.10.3", + "@shikijs/core": "1.21.0", + "@shikijs/engine-javascript": "1.21.0", + "@shikijs/engine-oniguruma": "1.21.0", + "@shikijs/types": "1.21.0", + "@shikijs/vscode-textmate": "^9.2.2", "@types/hast": "^3.0.4" } }, "node_modules/source-map-js": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", - "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", "dev": true, "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } }, + "node_modules/space-separated-tokens": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-2.0.2.tgz", + "integrity": "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/speakingurl": { "version": "14.0.1", "resolved": "https://registry.npmjs.org/speakingurl/-/speakingurl-14.0.1.tgz", @@ -1677,6 +2229,21 @@ "node": ">=0.10.0" } }, + "node_modules/stringify-entities": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-4.0.4.tgz", + "integrity": "sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==", + "dev": true, + "license": "MIT", + "dependencies": { + "character-entities-html4": "^2.0.0", + "character-entities-legacy": "^3.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/superjson": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/superjson/-/superjson-2.2.1.tgz", @@ -1697,16 +2264,140 @@ "dev": true, "license": "MIT" }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/trim-lines": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/trim-lines/-/trim-lines-3.0.1.tgz", + "integrity": "sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/unist-util-is": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-6.0.0.tgz", + "integrity": "sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-position": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-5.0.0.tgz", + "integrity": "sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-stringify-position": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz", + "integrity": "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-visit": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-5.0.0.tgz", + "integrity": "sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-is": "^6.0.0", + "unist-util-visit-parents": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-visit-parents": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-6.0.1.tgz", + "integrity": "sha512-L/PqWzfTP9lzzEa6CKs0k2nARxTdZduw3zyh8d2NVBnsyvHjSX4TWse388YrrQKbvI8w20fGjGlhgT96WwKykw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-is": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.3.tgz", + "integrity": "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-message": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-4.0.2.tgz", + "integrity": "sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-stringify-position": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/vite": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.3.3.tgz", - "integrity": "sha512-NPQdeCU0Dv2z5fu+ULotpuq5yfCS1BzKUIPhNbP3YBfAMGJXbt2nS+sbTFu+qchaqWTD+H3JK++nRwr6XIcp6A==", + "version": "5.4.8", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.8.tgz", + "integrity": "sha512-FqrItQ4DT1NC4zCUqMB4c4AZORMKIa0m8/URVCZ77OZ/QSNeJ54bU1vrFADbDsuwfIPcgknRkmqakQcgnL4GiQ==", "dev": true, "license": "MIT", "dependencies": { "esbuild": "^0.21.3", - "postcss": "^8.4.39", - "rollup": "^4.13.0" + "postcss": "^8.4.43", + "rollup": "^4.20.0" }, "bin": { "vite": "bin/vite.js" @@ -1725,6 +2416,7 @@ "less": "*", "lightningcss": "^1.21.0", "sass": "*", + "sass-embedded": "*", "stylus": "*", "sugarss": "*", "terser": "^5.4.0" @@ -1742,6 +2434,9 @@ "sass": { "optional": true }, + "sass-embedded": { + "optional": true + }, "stylus": { "optional": true }, @@ -1754,28 +2449,28 @@ } }, "node_modules/vitepress": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/vitepress/-/vitepress-1.3.0.tgz", - "integrity": "sha512-Cbm2AgXcCrukUeV+/24g1ZDSvw8blamh/1uf2pz3ApFpaYb9T7mo4imWDZ6APn2uPo4bJ6sgOzvsJ4aH+oLbBA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@docsearch/css": "^3.6.0", - "@docsearch/js": "^3.6.0", - "@shikijs/core": "^1.10.3", - "@shikijs/transformers": "^1.10.3", - "@types/markdown-it": "^14.1.1", - "@vitejs/plugin-vue": "^5.0.5", - "@vue/devtools-api": "^7.3.5", - "@vue/shared": "^3.4.31", - "@vueuse/core": "^10.11.0", - "@vueuse/integrations": "^10.11.0", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/vitepress/-/vitepress-1.3.4.tgz", + "integrity": "sha512-I1/F6OW1xl3kW4PaIMC6snxjWgf3qfziq2aqsDoFc/Gt41WbcRv++z8zjw8qGRIJ+I4bUW7ZcKFDHHN/jkH9DQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@docsearch/css": "^3.6.1", + "@docsearch/js": "^3.6.1", + "@shikijs/core": "^1.13.0", + "@shikijs/transformers": "^1.13.0", + "@types/markdown-it": "^14.1.2", + "@vitejs/plugin-vue": "^5.1.2", + "@vue/devtools-api": "^7.3.8", + "@vue/shared": "^3.4.38", + "@vueuse/core": "^11.0.0", + "@vueuse/integrations": "^11.0.0", "focus-trap": "^7.5.4", "mark.js": "8.11.1", - "minisearch": "^6.3.0", - "shiki": "^1.10.3", - "vite": "^5.3.3", - "vue": "^3.4.31" + "minisearch": "^7.1.0", + "shiki": "^1.13.0", + "vite": "^5.4.1", + "vue": "^3.4.38" }, "bin": { "vitepress": "bin/vitepress.js" @@ -1794,17 +2489,17 @@ } }, "node_modules/vue": { - "version": "3.4.31", - "resolved": "https://registry.npmjs.org/vue/-/vue-3.4.31.tgz", - "integrity": "sha512-njqRrOy7W3YLAlVqSKpBebtZpDVg21FPoaq1I7f/+qqBThK9ChAIjkRWgeP6Eat+8C+iia4P3OYqpATP21BCoQ==", + "version": "3.5.10", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.5.10.tgz", + "integrity": "sha512-Vy2kmJwHPlouC/tSnIgXVg03SG+9wSqT1xu1Vehc+ChsXsRd7jLkKgMltVEFOzUdBr3uFwBCG+41LJtfAcBRng==", "dev": true, "license": "MIT", "dependencies": { - "@vue/compiler-dom": "3.4.31", - "@vue/compiler-sfc": "3.4.31", - "@vue/runtime-dom": "3.4.31", - "@vue/server-renderer": "3.4.31", - "@vue/shared": "3.4.31" + "@vue/compiler-dom": "3.5.10", + "@vue/compiler-sfc": "3.5.10", + "@vue/runtime-dom": "3.5.10", + "@vue/server-renderer": "3.5.10", + "@vue/shared": "3.5.10" }, "peerDependencies": { "typescript": "*" @@ -1814,6 +2509,17 @@ "optional": true } } + }, + "node_modules/zwitch": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-2.0.4.tgz", + "integrity": "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } } } } diff --git a/documentation/package.json b/documentation/package.json index be932a9f..64738011 100644 --- a/documentation/package.json +++ b/documentation/package.json @@ -16,6 +16,6 @@ "docs:preview": "vitepress preview docs" }, "devDependencies": { - "vitepress": "^1.3.0" + "vitepress": "^1.3.4" } } \ No newline at end of file diff --git a/examples/README.md b/examples/README.md index 82baa8b6..a5703d36 100644 --- a/examples/README.md +++ b/examples/README.md @@ -20,24 +20,18 @@ A ``requests.http`` file is provided containing example requests to call the pro [REST Client](https://marketplace.visualstudio.com/items?itemName=humao.rest-client) extension to run these requests. But you can use any http client like [Postman](https://www.postman.com/). -## Concepts - -The following examples focus on one particular concept at a time. The examples are kept simple to explain the concept. - -1. [Hello Word](concepts/hello-world/README.md) - Demonstrates how to create a procedure and call it using the RPC API. -1. [Segmentation](concepts/segmentation/README.md) - Demonstrates how to split an application into multiple segments. -1. [Load balancing](concepts/load-balancing/README.md) - Demonstrates how to load balance segments. -1. [Access protection](concepts/access-protection/README.md) - Demonstrates how to protect the access to a procedure. -1. [Multi Version](concepts/multi-version/README.md) - Demonstrates how to create multiple versions of a procedure. -1. [Data Transportation](concepts/data-transportation/README.md) - Demonstrates how to transport data between segmented procedures. -1. [Error handling](concepts/error-handling/README.md) - Demonstrates how to the error handling works. -1. [Health checks](concepts/health-checks/README.md) - Demonstrates how to use health checks. -1. [Middleware](concepts/middleware/README.md) - Demonstrates how to use middleware. -1. [Cors](concepts/cors/README.md) - Demonstrates how to enable cors. -1. [Construction](concepts/construction/README.md) - Demonstrates how to use a set up and tear down scripts. - -## Application examples - -The following examples demonstrate how to build real-world applications using Jitar. - -1. [Full stack](apps/full-stack/README.md) - Example of a full stack application build with React, MongoDB and Jitar. +## Projects + +The following projects focus on one particular concept at a time. The examples are kept simple to explain the concept. + +1. [Hello Word](hello-world/README.md) - Demonstrates how to create a procedure and call it using the RPC API. +1. [Segmentation](segmentation/README.md) - Demonstrates how to split an application into multiple segments. +1. [Load balancing](load-balancing/README.md) - Demonstrates how to load balance segments. +1. [Access protection](access-protection/README.md) - Demonstrates how to protect the access to a procedure. +1. [Multi Version](multi-version/README.md) - Demonstrates how to create multiple versions of a procedure. +1. [Data Transportation](data-transportation/README.md) - Demonstrates how to transport data between segmented procedures. +1. [Error handling](error-handling/README.md) - Demonstrates how to the error handling works. +1. [Health checks](health-checks/README.md) - Demonstrates how to use health checks. +1. [Middleware](middleware/README.md) - Demonstrates how to use middleware. +1. [Cors](cors/README.md) - Demonstrates how to enable cors. +1. [Construction](construction/README.md) - Demonstrates how to use a set up and tear down scripts. diff --git a/examples/concepts/access-protection/.env b/examples/access-protection/.env similarity index 100% rename from examples/concepts/access-protection/.env rename to examples/access-protection/.env diff --git a/examples/concepts/access-protection/README.md b/examples/access-protection/README.md similarity index 100% rename from examples/concepts/access-protection/README.md rename to examples/access-protection/README.md diff --git a/examples/concepts/access-protection/jitar.json b/examples/access-protection/jitar.json similarity index 100% rename from examples/concepts/access-protection/jitar.json rename to examples/access-protection/jitar.json diff --git a/examples/concepts/access-protection/package.json b/examples/access-protection/package.json similarity index 100% rename from examples/concepts/access-protection/package.json rename to examples/access-protection/package.json diff --git a/examples/concepts/access-protection/requests.http b/examples/access-protection/requests.http similarity index 100% rename from examples/concepts/access-protection/requests.http rename to examples/access-protection/requests.http diff --git a/examples/concepts/access-protection/segments/protected.segment.json b/examples/access-protection/segments/protected.segment.json similarity index 100% rename from examples/concepts/access-protection/segments/protected.segment.json rename to examples/access-protection/segments/protected.segment.json diff --git a/examples/concepts/access-protection/segments/public.segment.json b/examples/access-protection/segments/public.segment.json similarity index 100% rename from examples/concepts/access-protection/segments/public.segment.json rename to examples/access-protection/segments/public.segment.json diff --git a/examples/concepts/access-protection/services/gateway.json b/examples/access-protection/services/gateway.json similarity index 100% rename from examples/concepts/access-protection/services/gateway.json rename to examples/access-protection/services/gateway.json diff --git a/examples/concepts/access-protection/services/protected.json b/examples/access-protection/services/protected.json similarity index 100% rename from examples/concepts/access-protection/services/protected.json rename to examples/access-protection/services/protected.json diff --git a/examples/concepts/access-protection/services/public.json b/examples/access-protection/services/public.json similarity index 100% rename from examples/concepts/access-protection/services/public.json rename to examples/access-protection/services/public.json diff --git a/examples/concepts/access-protection/services/standalone.json b/examples/access-protection/services/standalone.json similarity index 100% rename from examples/concepts/access-protection/services/standalone.json rename to examples/access-protection/services/standalone.json diff --git a/examples/concepts/access-protection/src/game/checkSecret.ts b/examples/access-protection/src/game/checkSecret.ts similarity index 100% rename from examples/concepts/access-protection/src/game/checkSecret.ts rename to examples/access-protection/src/game/checkSecret.ts diff --git a/examples/concepts/access-protection/src/game/getSecret.ts b/examples/access-protection/src/game/getSecret.ts similarity index 100% rename from examples/concepts/access-protection/src/game/getSecret.ts rename to examples/access-protection/src/game/getSecret.ts diff --git a/examples/concepts/access-protection/src/web/guessSecret.ts b/examples/access-protection/src/web/guessSecret.ts similarity index 100% rename from examples/concepts/access-protection/src/web/guessSecret.ts rename to examples/access-protection/src/web/guessSecret.ts diff --git a/examples/concepts/access-protection/tsconfig.json b/examples/access-protection/tsconfig.json similarity index 100% rename from examples/concepts/access-protection/tsconfig.json rename to examples/access-protection/tsconfig.json diff --git a/examples/apps/full-stack/.gitignore b/examples/apps/full-stack/.gitignore deleted file mode 100644 index 639f4320..00000000 --- a/examples/apps/full-stack/.gitignore +++ /dev/null @@ -1,25 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* -lerna-debug.log* - -node_modules -cache -dist -dist-ssr -*.local - -# Editor directories and files -.vscode/* -!.vscode/extensions.json -.idea -.DS_Store -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? \ No newline at end of file diff --git a/examples/apps/full-stack/README.md b/examples/apps/full-stack/README.md deleted file mode 100644 index a9ba8b56..00000000 --- a/examples/apps/full-stack/README.md +++ /dev/null @@ -1,107 +0,0 @@ - -# Jitar | Full Stack - -This full stack example a contact list application is build with React, MongoDB and Jitar (ReMoJi stack). -It includes frontend and backend functions and a database for storing contacts. - -## Project setup - -**Functions** - -* createId (`src/shared/common/createId.ts`) -* getCollection (`src/shared/common/getCollection.ts`) -* getDatabase (`src/shared/common/getDatabase.ts`) -* createContact (`src/shared/contact/createContact.ts`) -* deleteContact (`src/shared/contact/deleteContact.ts`) -* getContacts (`src/shared/contact/getContacts.ts`) - -**Data model** - -* DatabaseError (`src/shared/common/DatabaseError.ts`) -* Contact (`src/shared/contact/Contact.ts`) - -**Segments** - -* Server - contains all *shared* functions (`segments/server.segment.json`) - -**Services** - -Development - -* Standalone - loads all segments (`services/standalone.json`) - -Production - -* Repository (`services/repository.json`) -* Gateway (`services/gateway.json`) -* Proxy (`services/proxy.json`) -* Worker - loads the *server* segment (`services/worker.json`) - -## Running the example - -For running the example, Docker is required for setting up MongoDB. - -1\. Install all dependencies by running the following command from the root directory of the example. - -```bash -npm install -``` - -2\. Build the application from the same directory. - -```bash -npm run build -``` - -3\. Start MongoDB with docker-compose. - -```bash -docker-compose up -``` - -4\. Start Jitar in development mode with the following command. - -```bash -npm run standalone -``` - -5\. Open the following URL in your browser `http://localhost:3000` - -The example uses our Vite plugin. To run Vite in dev mode (for HMR) use the following command. - -```bash -npm run dev -``` - -The app is now also available under `http://localhost:5173/`. -Note that the Jitar instance needs to run beside Vite, otherwise the backend components won't be available. - -## Running in production - -To run the application in production mode, we need four terminal sessions to start the repository, gateway, worker and proxy (as webserver) separately. The starting order is of importance. - -**Repository** (terminal 1) - -```bash -npm run repo -``` - -**Gateway** (terminal 2) - -```bash -npm run gateway -``` - -**Worker** (terminal 3) - -```bash -npm run worker -``` - -**Proxy** (terminal 4) - -```bash -npm run proxy -``` - -Now open the following URL in your browser `http://localhost:8080` diff --git a/examples/apps/full-stack/docker-compose.yml b/examples/apps/full-stack/docker-compose.yml deleted file mode 100644 index 261d7798..00000000 --- a/examples/apps/full-stack/docker-compose.yml +++ /dev/null @@ -1,22 +0,0 @@ -version: '3.1' - -services: - - mongo: - image: mongo - restart: always - ports: - - 27017:27017 - environment: - MONGO_INITDB_ROOT_USERNAME: root - MONGO_INITDB_ROOT_PASSWORD: example - - mongo-express: - image: mongo-express - restart: always - ports: - - 8081:8081 - environment: - ME_CONFIG_MONGODB_ADMINUSERNAME: root - ME_CONFIG_MONGODB_ADMINPASSWORD: example - ME_CONFIG_MONGODB_URL: mongodb://root:example@mongo:27017/ \ No newline at end of file diff --git a/examples/apps/full-stack/index.html b/examples/apps/full-stack/index.html deleted file mode 100644 index a89a9791..00000000 --- a/examples/apps/full-stack/index.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - YACA | Yet Another Contact App - - -
- - - diff --git a/examples/apps/full-stack/package.json b/examples/apps/full-stack/package.json deleted file mode 100644 index 4a4ab46a..00000000 --- a/examples/apps/full-stack/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "jitar-full-stack-example", - "private": true, - "version": "0.0.0", - "type": "module", - "scripts": { - "dev": "vite", - "build": "npm run build-domain && npm run build-webui", - "build-domain": "rm -rf dist && tsc -p tsconfig.build.json && jitar build", - "build-webui": "vite build", - "standalone": "jitar start --service=services/standalone.json", - "repo": "jitar start --service=services/repository.json", - "gateway": "jitar start --service=services/gateway.json", - "worker": "jitar start --service=services/worker.json", - "proxy": "jitar start --service=services/proxy.json", - "preview": "vite preview" - }, - "dependencies": { - "jitar": "*", - "mongodb": "^6.8.0", - "react": "^18.3.1", - "react-dom": "^18.3.1" - }, - "devDependencies": { - "@jitar/plugin-vite": "*", - "@types/react": "^18.3.3", - "@types/react-dom": "^18.3.0", - "@vitejs/plugin-react": "*", - "typescript": "5.5.3", - "vite": "^5.3.3" - } -} \ No newline at end of file diff --git a/examples/apps/full-stack/public/.gitkeep b/examples/apps/full-stack/public/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/examples/apps/full-stack/requests.http b/examples/apps/full-stack/requests.http deleted file mode 100644 index 48c49f27..00000000 --- a/examples/apps/full-stack/requests.http +++ /dev/null @@ -1,15 +0,0 @@ - -GET http://localhost:8080/rpc/domain/contact/getContacts?version=0.0.0&serialize=true HTTP/1.1 - -### - -GET http://localhost:3000/rpc/domain/contact/getContacts?version=0.0.0&serialize=true HTTP/1.1 - -### - -POST http://localhost:3001/rpc/domain/contact/getContacts?version=0.0.0&serialize=true HTTP/1.1 -conent-type: application/json - -{ - -} \ No newline at end of file diff --git a/examples/apps/full-stack/segments/client.segment.json b/examples/apps/full-stack/segments/client.segment.json deleted file mode 100644 index 964ebef6..00000000 --- a/examples/apps/full-stack/segments/client.segment.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "./domain/contact/Contact": { "default": { } } -} \ No newline at end of file diff --git a/examples/apps/full-stack/segments/server.segment.json b/examples/apps/full-stack/segments/server.segment.json deleted file mode 100644 index 020ddb50..00000000 --- a/examples/apps/full-stack/segments/server.segment.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "./domain/contact/Contact": { "default": { } }, - "./domain/contact/createContact": { "default": { "access": "public" } }, - "./domain/contact/deleteContact": { "default": { "access": "public" } }, - "./domain/contact/getContacts": { "default": { "access": "public" } } -} \ No newline at end of file diff --git a/examples/apps/full-stack/services/gateway.json b/examples/apps/full-stack/services/gateway.json deleted file mode 100644 index 403fcc23..00000000 --- a/examples/apps/full-stack/services/gateway.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "url": "http://127.0.0.1:3000", - "gateway": { - - } -} \ No newline at end of file diff --git a/examples/apps/full-stack/services/proxy.json b/examples/apps/full-stack/services/proxy.json deleted file mode 100644 index 8dea2179..00000000 --- a/examples/apps/full-stack/services/proxy.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "url": "http://127.0.0.1:8080", - "proxy": - { - "repository": "http://127.0.0.1:2999", - "gateway": "http://127.0.0.1:3000" - } -} \ No newline at end of file diff --git a/examples/apps/full-stack/services/repository.json b/examples/apps/full-stack/services/repository.json deleted file mode 100644 index 066d5d35..00000000 --- a/examples/apps/full-stack/services/repository.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "url": "http://127.0.0.1:2999", - "repository": - { - "assets": [ "index.html", "assets/**/*" ], - "serveIndexOnNotFound": true - } -} \ No newline at end of file diff --git a/examples/apps/full-stack/services/standalone.json b/examples/apps/full-stack/services/standalone.json deleted file mode 100644 index d9f81ad1..00000000 --- a/examples/apps/full-stack/services/standalone.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "url": "http://127.0.0.1:3000", - "setUp": ["./integrations/jitar/setUpDatabase"], - "tearDown": ["./integrations/jitar/tearDownDatabase"], - "healthChecks": ["./integrations/jitar/databaseHealthCheck"], - "middleware": ["./integrations/jitar/requestLogger"], - "standalone": - { - "segments": ["server"], - "assets": [ "index.html", "assets/**/*" ], - "serveIndexOnNotFound": true - } -} \ No newline at end of file diff --git a/examples/apps/full-stack/services/worker.json b/examples/apps/full-stack/services/worker.json deleted file mode 100644 index 5247ed52..00000000 --- a/examples/apps/full-stack/services/worker.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "url": "http://127.0.0.1:3001", - "setUp": ["./integrations/jitar/setUpDatabase"], - "tearDown": ["./integrations/jitar/tearDownDatabase"], - "middleware": ["./integrations/jitar/requestLogger"], - "healthChecks": ["./integrations/jitar/databaseHealthCheck"], - "worker": - { - "segments": [ "server" ], - "gateway": "http://127.0.0.1:3000" - } -} \ No newline at end of file diff --git a/examples/apps/full-stack/src/domain/contact/Contact.ts b/examples/apps/full-stack/src/domain/contact/Contact.ts deleted file mode 100644 index 8fa59035..00000000 --- a/examples/apps/full-stack/src/domain/contact/Contact.ts +++ /dev/null @@ -1,28 +0,0 @@ - -export default class Contact -{ - #id: string; - #name: string; - #address: string; - #phone: string; - #email: string; - - constructor(id: string, name: string, address: string, phone: string, email: string) - { - this.#id = id; - this.#name = name; - this.#address = address; - this.#phone = phone; - this.#email = email; - } - - get id() { return this.#id; } - - get name() { return this.#name; } - - get address() { return this.#address; } - - get phone() { return this.#phone; } - - get email() { return this.#email; } -} diff --git a/examples/apps/full-stack/src/domain/contact/createContact.ts b/examples/apps/full-stack/src/domain/contact/createContact.ts deleted file mode 100644 index f043cc10..00000000 --- a/examples/apps/full-stack/src/domain/contact/createContact.ts +++ /dev/null @@ -1,11 +0,0 @@ - -import Database from '../../integrations/database/Database'; - -import Contact from './Contact'; - -export default async function createContact(name: string, address: string, phone: string, email: string): Promise -{ - const id = await Database.create('contacts', { name, address, phone, email }); - - return new Contact(id, name, address, phone, email); -} diff --git a/examples/apps/full-stack/src/domain/contact/deleteContact.ts b/examples/apps/full-stack/src/domain/contact/deleteContact.ts deleted file mode 100644 index a72abc61..00000000 --- a/examples/apps/full-stack/src/domain/contact/deleteContact.ts +++ /dev/null @@ -1,9 +0,0 @@ - -import Database from '../../integrations/database/Database'; - -import Contact from './Contact'; - -export default async function deleteContact(contact: Contact): Promise -{ - await Database.delete('contacts', contact.id); -} diff --git a/examples/apps/full-stack/src/domain/contact/getContacts.ts b/examples/apps/full-stack/src/domain/contact/getContacts.ts deleted file mode 100644 index e3d33357..00000000 --- a/examples/apps/full-stack/src/domain/contact/getContacts.ts +++ /dev/null @@ -1,11 +0,0 @@ - -import Database from '../../integrations/database/Database'; - -import Contact from './Contact'; - -export default async function getContacts(): Promise -{ - const documents = await Database.search('contacts'); - - return documents.map(document => new Contact(document.id, document.name, document.address, document.phone, document.email)); -} diff --git a/examples/apps/full-stack/src/integrations/database/Database.ts b/examples/apps/full-stack/src/integrations/database/Database.ts deleted file mode 100644 index 58a0b0c9..00000000 --- a/examples/apps/full-stack/src/integrations/database/Database.ts +++ /dev/null @@ -1,118 +0,0 @@ - -import { MongoClient, Db, ObjectId, WithId, Document, Filter } from 'mongodb'; - -import DatabaseError from './DatabaseError'; - -class Database -{ - #client?: MongoClient; - #database?: Db; - #connected = false; - - get connected(): boolean - { - return this.#connected; - } - - connect(connectionString: string, database: string): void - { - try - { - this.#client = new MongoClient(connectionString); - - this.#client.on('open', () => { this.#connected = true; }); - this.#client.on('close', () => { this.#connected = false; }); - - this.#client.on('serverHeartbeatSucceeded', () => { this.#connected = true; }); - this.#client.on('serverHeartbeatFailed', () => { this.#connected = false; }); - - this.#database = this.#client.db(database); - } - catch (error: unknown) - { - throw new DatabaseError('Connection failed'); - } - } - - async disconnect(): Promise - { - if (this.#client === undefined) - { - throw new DatabaseError('Database not connected'); - } - - try - { - await this.#client.close(); - - this.#connected = false; - this.#database = undefined; - this.#client = undefined; - } - catch (error: unknown) - { - throw new DatabaseError('Disconnection failed'); - } - } - - async create(collectionName: string, document: object): Promise - { - const collection = this.#getCollection(collectionName); - const _id = new ObjectId(); - - try - { - await collection.insertOne({ _id: _id, ...document } as any); - - return _id.toHexString(); - } - catch (error: unknown) - { - throw new DatabaseError('Create failed'); - } - } - - async search(collectionName: string, query?: object): Promise[]> - { - const collection = this.#getCollection(collectionName); - - try - { - const documents = await collection.find(query as Filter).toArray(); - - return documents.map(document => ({ ...document, id: document._id.toHexString() })); - } - catch (error: unknown) - { - throw new DatabaseError('Search failed'); - } - } - - async delete(collectionName: string, id: string): Promise - { - const collection = this.#getCollection(collectionName); - - try - { - await collection.deleteOne({ _id: new ObjectId(id) }); - } - catch (error: unknown) - { - throw new DatabaseError('Delete failed'); - } - } - - #getCollection(collectionName: string) - { - if (this.#database === undefined) - { - throw new DatabaseError('Database not connected'); - } - - return this.#database.collection(collectionName); - } -} - -const instance = new Database(); - -export default instance; diff --git a/examples/apps/full-stack/src/integrations/database/DatabaseError.ts b/examples/apps/full-stack/src/integrations/database/DatabaseError.ts deleted file mode 100644 index 24d16c14..00000000 --- a/examples/apps/full-stack/src/integrations/database/DatabaseError.ts +++ /dev/null @@ -1,8 +0,0 @@ - -export default class DatabaseError extends Error -{ - constructor(message: string) - { - super(message); - } -} diff --git a/examples/apps/full-stack/src/integrations/jitar/databaseHealthCheck.ts b/examples/apps/full-stack/src/integrations/jitar/databaseHealthCheck.ts deleted file mode 100644 index 5c674f40..00000000 --- a/examples/apps/full-stack/src/integrations/jitar/databaseHealthCheck.ts +++ /dev/null @@ -1,18 +0,0 @@ - -import { HealthCheck } from 'jitar'; - -import Database from '../database/Database'; - -class DatabaseHealthCheck implements HealthCheck -{ - get name() { return 'database'; } - - get timeout() { return undefined; } - - async isHealthy(): Promise - { - return Database.connected; - } -} - -export default new DatabaseHealthCheck(); diff --git a/examples/apps/full-stack/src/integrations/jitar/requestLogger.ts b/examples/apps/full-stack/src/integrations/jitar/requestLogger.ts deleted file mode 100644 index be58aef7..00000000 --- a/examples/apps/full-stack/src/integrations/jitar/requestLogger.ts +++ /dev/null @@ -1,26 +0,0 @@ - -import { Middleware, NextHandler, Request, Response } from 'jitar'; - -import Database from '../database/Database'; - -class RequestLogger implements Middleware -{ - async handle(request: Request, next: NextHandler): Promise - { - const startTime = Date.now(); - const response = await next(); - const endTime = Date.now(); - - const date = new Date(); - const action = request.fqn; - const duration = endTime - startTime; - - await Database.create('requests', { date, action, duration }); - - return response; - } -} - -const instance = new RequestLogger(); - -export default instance; diff --git a/examples/apps/full-stack/src/integrations/jitar/setUpDatabase.ts b/examples/apps/full-stack/src/integrations/jitar/setUpDatabase.ts deleted file mode 100644 index 0b950d43..00000000 --- a/examples/apps/full-stack/src/integrations/jitar/setUpDatabase.ts +++ /dev/null @@ -1,6 +0,0 @@ - -import Database from '../database/Database'; - -Database.connect('mongodb://root:example@localhost:27017', 'react-mongodb'); - -console.log('Connected to database'); diff --git a/examples/apps/full-stack/src/integrations/jitar/tearDownDatabase.ts b/examples/apps/full-stack/src/integrations/jitar/tearDownDatabase.ts deleted file mode 100644 index 48d05993..00000000 --- a/examples/apps/full-stack/src/integrations/jitar/tearDownDatabase.ts +++ /dev/null @@ -1,6 +0,0 @@ - -import Database from '../database/Database'; - -await Database.disconnect(); - -console.log('Disconnected from database'); diff --git a/examples/apps/full-stack/src/vite-env.d.ts b/examples/apps/full-stack/src/vite-env.d.ts deleted file mode 100644 index 11f02fe2..00000000 --- a/examples/apps/full-stack/src/vite-env.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// diff --git a/examples/apps/full-stack/src/webui/App.tsx b/examples/apps/full-stack/src/webui/App.tsx deleted file mode 100644 index 93307303..00000000 --- a/examples/apps/full-stack/src/webui/App.tsx +++ /dev/null @@ -1,15 +0,0 @@ - -import Header from './components/Header'; -import ContactPage from './pages/ContactPage'; - -function App() -{ - return ( -
-
- -
- ) -} - -export default App; diff --git a/examples/apps/full-stack/src/webui/components/Header.tsx b/examples/apps/full-stack/src/webui/components/Header.tsx deleted file mode 100644 index 6fa05e25..00000000 --- a/examples/apps/full-stack/src/webui/components/Header.tsx +++ /dev/null @@ -1,9 +0,0 @@ - -export default function Header() -{ - return ( -
-

Contacts

-
- ); -} diff --git a/examples/apps/full-stack/src/webui/components/contact/ContactForm.tsx b/examples/apps/full-stack/src/webui/components/contact/ContactForm.tsx deleted file mode 100644 index 8dec31cf..00000000 --- a/examples/apps/full-stack/src/webui/components/contact/ContactForm.tsx +++ /dev/null @@ -1,47 +0,0 @@ - -import Contact from '../../../domain/contact/Contact'; - -type ContactFormProps = -{ - contact?: Contact; - submitAction: (name: string, address: string, phone: string, email: string) => void; -}; - -export default function ContactForm(props: ContactFormProps) -{ - const submitAction = props.submitAction; - const contact = props.contact; - - const handleSubmit = (event: any): void => - { - event.preventDefault(); - - const form = event.target; - - submitAction(form.name.value, form.address.value, form.phone.value, form.email.value); - - form.reset(); - } - - return ( -
-
- - -
-
- - -
-
- - -
-
- - -
- -
- ); -} diff --git a/examples/apps/full-stack/src/webui/components/contact/ContactItem.tsx b/examples/apps/full-stack/src/webui/components/contact/ContactItem.tsx deleted file mode 100644 index 486f27eb..00000000 --- a/examples/apps/full-stack/src/webui/components/contact/ContactItem.tsx +++ /dev/null @@ -1,36 +0,0 @@ - -import Contact from '../../../domain/contact/Contact'; - -type ContactItemProps = -{ - contact: Contact; - removeAction: () => void; -}; - -export default function ContactItem(props: ContactItemProps) -{ - const contact = props.contact; - const removeAction = props.removeAction; - - return ( -
-

- {contact.name} - - - -

- -
- ); -} diff --git a/examples/apps/full-stack/src/webui/components/contact/ContactList.tsx b/examples/apps/full-stack/src/webui/components/contact/ContactList.tsx deleted file mode 100644 index a02cc565..00000000 --- a/examples/apps/full-stack/src/webui/components/contact/ContactList.tsx +++ /dev/null @@ -1,20 +0,0 @@ - -import Contact from '../../../domain/contact/Contact'; - -import ContactItem from './ContactItem'; - -type ContactListProps = -{ - contacts: Contact[]; - removeAction: (contact: Contact) => void; -}; - -export default function ContactList(props: ContactListProps) -{ - const contacts = props.contacts; - const removeAction = props.removeAction; - - return contacts.length > 0 - ? <>{ contacts.map((contact: Contact) => removeAction(contact)} />) } - :
No contacts yet
; -} diff --git a/examples/apps/full-stack/src/webui/main.tsx b/examples/apps/full-stack/src/webui/main.tsx deleted file mode 100644 index c0ae485b..00000000 --- a/examples/apps/full-stack/src/webui/main.tsx +++ /dev/null @@ -1,11 +0,0 @@ - -import React from 'react'; -import ReactDOM from 'react-dom/client'; - -import App from './App'; - -ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render( - - - -) diff --git a/examples/apps/full-stack/src/webui/pages/ContactPage.tsx b/examples/apps/full-stack/src/webui/pages/ContactPage.tsx deleted file mode 100644 index d3869f1b..00000000 --- a/examples/apps/full-stack/src/webui/pages/ContactPage.tsx +++ /dev/null @@ -1,43 +0,0 @@ - -import { useEffect, useState } from 'react'; - -import ContactForm from '../components/contact/ContactForm'; -import ContactList from '../components/contact/ContactList'; - -import Contact from '../../domain/contact/Contact'; -import getContacts from '../../domain/contact/getContacts'; -import createContact from '../../domain/contact/createContact'; -import deleteContact from '../../domain/contact/deleteContact'; - -export default function ContactPage() -{ - const [contacts, setContacts] = useState([]); - - const loadContacts = () => - { - getContacts().then(contacts => setContacts(contacts)); - } - - const storeContact = (name: string, address: string, phone: string, email: string): void => - { - createContact(name, address, phone, email).then(() => loadContacts()); - } - - const removeContact = (contact: Contact) => - { - deleteContact(contact).then(() => loadContacts()); - } - - useEffect(loadContacts, []); - - return ( -
-
- -
-
- -
-
- ); -} diff --git a/examples/apps/full-stack/tsconfig.json b/examples/apps/full-stack/tsconfig.json deleted file mode 100644 index 0ab93b49..00000000 --- a/examples/apps/full-stack/tsconfig.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": "./tsconfig.base.json", - "compilerOptions": { - "jsx": "react-jsx" - } -} \ No newline at end of file diff --git a/examples/apps/full-stack/vite.config.ts b/examples/apps/full-stack/vite.config.ts deleted file mode 100644 index cf4a1795..00000000 --- a/examples/apps/full-stack/vite.config.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineConfig } from 'vite'; -import react from '@vitejs/plugin-react'; -import jitar from '@jitar/plugin-vite'; - -export default defineConfig({ - build: { - emptyOutDir: false - }, - plugins: [ - react(), - jitar({ sourceDir: 'src', targetDir: 'dist', jitarDir: 'domain', jitarUrl: 'http://localhost:3000', segments: ['client'] }) - ] -}) diff --git a/examples/concepts/construction/README.md b/examples/construction/README.md similarity index 100% rename from examples/concepts/construction/README.md rename to examples/construction/README.md diff --git a/examples/concepts/construction/jitar.json b/examples/construction/jitar.json similarity index 100% rename from examples/concepts/construction/jitar.json rename to examples/construction/jitar.json diff --git a/examples/concepts/construction/package.json b/examples/construction/package.json similarity index 100% rename from examples/concepts/construction/package.json rename to examples/construction/package.json diff --git a/examples/concepts/construction/requests.http b/examples/construction/requests.http similarity index 100% rename from examples/concepts/construction/requests.http rename to examples/construction/requests.http diff --git a/examples/concepts/construction/segments/default.segment.json b/examples/construction/segments/default.segment.json similarity index 100% rename from examples/concepts/construction/segments/default.segment.json rename to examples/construction/segments/default.segment.json diff --git a/examples/concepts/construction/services/standalone.json b/examples/construction/services/standalone.json similarity index 100% rename from examples/concepts/construction/services/standalone.json rename to examples/construction/services/standalone.json diff --git a/examples/concepts/construction/src/database.ts b/examples/construction/src/database.ts similarity index 100% rename from examples/concepts/construction/src/database.ts rename to examples/construction/src/database.ts diff --git a/examples/concepts/construction/src/getData.ts b/examples/construction/src/getData.ts similarity index 100% rename from examples/concepts/construction/src/getData.ts rename to examples/construction/src/getData.ts diff --git a/examples/concepts/construction/src/setUpDatabase.ts b/examples/construction/src/setUpDatabase.ts similarity index 100% rename from examples/concepts/construction/src/setUpDatabase.ts rename to examples/construction/src/setUpDatabase.ts diff --git a/examples/concepts/construction/src/tearDownDatabase.ts b/examples/construction/src/tearDownDatabase.ts similarity index 100% rename from examples/concepts/construction/src/tearDownDatabase.ts rename to examples/construction/src/tearDownDatabase.ts diff --git a/examples/concepts/construction/tsconfig.json b/examples/construction/tsconfig.json similarity index 100% rename from examples/concepts/construction/tsconfig.json rename to examples/construction/tsconfig.json diff --git a/examples/concepts/cors/README.md b/examples/cors/README.md similarity index 100% rename from examples/concepts/cors/README.md rename to examples/cors/README.md diff --git a/examples/concepts/cors/jitar.json b/examples/cors/jitar.json similarity index 100% rename from examples/concepts/cors/jitar.json rename to examples/cors/jitar.json diff --git a/examples/concepts/cors/package.json b/examples/cors/package.json similarity index 100% rename from examples/concepts/cors/package.json rename to examples/cors/package.json diff --git a/examples/concepts/cors/requests.http b/examples/cors/requests.http similarity index 100% rename from examples/concepts/cors/requests.http rename to examples/cors/requests.http diff --git a/examples/concepts/cors/segments/server.segment.json b/examples/cors/segments/server.segment.json similarity index 100% rename from examples/concepts/cors/segments/server.segment.json rename to examples/cors/segments/server.segment.json diff --git a/examples/concepts/cors/services/standalone.json b/examples/cors/services/standalone.json similarity index 100% rename from examples/concepts/cors/services/standalone.json rename to examples/cors/services/standalone.json diff --git a/examples/concepts/cors/src/app.ts b/examples/cors/src/app.ts similarity index 100% rename from examples/concepts/cors/src/app.ts rename to examples/cors/src/app.ts diff --git a/examples/concepts/cors/src/client.ts b/examples/cors/src/client.ts similarity index 100% rename from examples/concepts/cors/src/client.ts rename to examples/cors/src/client.ts diff --git a/examples/concepts/cors/src/getWeatherForecast.ts b/examples/cors/src/getWeatherForecast.ts similarity index 100% rename from examples/concepts/cors/src/getWeatherForecast.ts rename to examples/cors/src/getWeatherForecast.ts diff --git a/examples/concepts/cors/src/handleCors.ts b/examples/cors/src/handleCors.ts similarity index 100% rename from examples/concepts/cors/src/handleCors.ts rename to examples/cors/src/handleCors.ts diff --git a/examples/concepts/cors/src/index.html b/examples/cors/src/index.html similarity index 100% rename from examples/concepts/cors/src/index.html rename to examples/cors/src/index.html diff --git a/examples/concepts/cors/tsconfig.json b/examples/cors/tsconfig.json similarity index 100% rename from examples/concepts/cors/tsconfig.json rename to examples/cors/tsconfig.json diff --git a/examples/concepts/data-transportation/README.md b/examples/data-transportation/README.md similarity index 100% rename from examples/concepts/data-transportation/README.md rename to examples/data-transportation/README.md diff --git a/examples/concepts/data-transportation/jitar.json b/examples/data-transportation/jitar.json similarity index 100% rename from examples/concepts/data-transportation/jitar.json rename to examples/data-transportation/jitar.json diff --git a/examples/concepts/data-transportation/package.json b/examples/data-transportation/package.json similarity index 100% rename from examples/concepts/data-transportation/package.json rename to examples/data-transportation/package.json diff --git a/examples/concepts/data-transportation/requests.http b/examples/data-transportation/requests.http similarity index 100% rename from examples/concepts/data-transportation/requests.http rename to examples/data-transportation/requests.http diff --git a/examples/concepts/data-transportation/segments/account.segment.json b/examples/data-transportation/segments/account.segment.json similarity index 100% rename from examples/concepts/data-transportation/segments/account.segment.json rename to examples/data-transportation/segments/account.segment.json diff --git a/examples/concepts/data-transportation/segments/helpdesk.segment.json b/examples/data-transportation/segments/helpdesk.segment.json similarity index 100% rename from examples/concepts/data-transportation/segments/helpdesk.segment.json rename to examples/data-transportation/segments/helpdesk.segment.json diff --git a/examples/concepts/data-transportation/services/account.json b/examples/data-transportation/services/account.json similarity index 100% rename from examples/concepts/data-transportation/services/account.json rename to examples/data-transportation/services/account.json diff --git a/examples/concepts/data-transportation/services/gateway.json b/examples/data-transportation/services/gateway.json similarity index 100% rename from examples/concepts/data-transportation/services/gateway.json rename to examples/data-transportation/services/gateway.json diff --git a/examples/concepts/data-transportation/services/helpdesk.json b/examples/data-transportation/services/helpdesk.json similarity index 100% rename from examples/concepts/data-transportation/services/helpdesk.json rename to examples/data-transportation/services/helpdesk.json diff --git a/examples/concepts/data-transportation/services/standalone.json b/examples/data-transportation/services/standalone.json similarity index 100% rename from examples/concepts/data-transportation/services/standalone.json rename to examples/data-transportation/services/standalone.json diff --git a/examples/concepts/data-transportation/src/account/Account.ts b/examples/data-transportation/src/account/Account.ts similarity index 100% rename from examples/concepts/data-transportation/src/account/Account.ts rename to examples/data-transportation/src/account/Account.ts diff --git a/examples/concepts/data-transportation/src/account/createAccount.ts b/examples/data-transportation/src/account/createAccount.ts similarity index 100% rename from examples/concepts/data-transportation/src/account/createAccount.ts rename to examples/data-transportation/src/account/createAccount.ts diff --git a/examples/concepts/data-transportation/src/helpdesk/Registration.ts b/examples/data-transportation/src/helpdesk/Registration.ts similarity index 100% rename from examples/concepts/data-transportation/src/helpdesk/Registration.ts rename to examples/data-transportation/src/helpdesk/Registration.ts diff --git a/examples/concepts/data-transportation/src/helpdesk/register.ts b/examples/data-transportation/src/helpdesk/register.ts similarity index 100% rename from examples/concepts/data-transportation/src/helpdesk/register.ts rename to examples/data-transportation/src/helpdesk/register.ts diff --git a/examples/concepts/data-transportation/tsconfig.json b/examples/data-transportation/tsconfig.json similarity index 100% rename from examples/concepts/data-transportation/tsconfig.json rename to examples/data-transportation/tsconfig.json diff --git a/examples/concepts/error-handling/README.md b/examples/error-handling/README.md similarity index 100% rename from examples/concepts/error-handling/README.md rename to examples/error-handling/README.md diff --git a/examples/concepts/error-handling/jitar.json b/examples/error-handling/jitar.json similarity index 100% rename from examples/concepts/error-handling/jitar.json rename to examples/error-handling/jitar.json diff --git a/examples/concepts/error-handling/package.json b/examples/error-handling/package.json similarity index 100% rename from examples/concepts/error-handling/package.json rename to examples/error-handling/package.json diff --git a/examples/concepts/error-handling/requests.http b/examples/error-handling/requests.http similarity index 100% rename from examples/concepts/error-handling/requests.http rename to examples/error-handling/requests.http diff --git a/examples/concepts/error-handling/segments/data.segment.json b/examples/error-handling/segments/data.segment.json similarity index 100% rename from examples/concepts/error-handling/segments/data.segment.json rename to examples/error-handling/segments/data.segment.json diff --git a/examples/concepts/error-handling/segments/process.segment.json b/examples/error-handling/segments/process.segment.json similarity index 100% rename from examples/concepts/error-handling/segments/process.segment.json rename to examples/error-handling/segments/process.segment.json diff --git a/examples/concepts/error-handling/services/data.json b/examples/error-handling/services/data.json similarity index 100% rename from examples/concepts/error-handling/services/data.json rename to examples/error-handling/services/data.json diff --git a/examples/concepts/error-handling/services/gateway.json b/examples/error-handling/services/gateway.json similarity index 100% rename from examples/concepts/error-handling/services/gateway.json rename to examples/error-handling/services/gateway.json diff --git a/examples/concepts/error-handling/services/process.json b/examples/error-handling/services/process.json similarity index 100% rename from examples/concepts/error-handling/services/process.json rename to examples/error-handling/services/process.json diff --git a/examples/concepts/error-handling/services/standalone.json b/examples/error-handling/services/standalone.json similarity index 100% rename from examples/concepts/error-handling/services/standalone.json rename to examples/error-handling/services/standalone.json diff --git a/examples/concepts/error-handling/src/DatabaseError.ts b/examples/error-handling/src/DatabaseError.ts similarity index 100% rename from examples/concepts/error-handling/src/DatabaseError.ts rename to examples/error-handling/src/DatabaseError.ts diff --git a/examples/concepts/error-handling/src/exportData.ts b/examples/error-handling/src/exportData.ts similarity index 100% rename from examples/concepts/error-handling/src/exportData.ts rename to examples/error-handling/src/exportData.ts diff --git a/examples/concepts/error-handling/src/getData.ts b/examples/error-handling/src/getData.ts similarity index 100% rename from examples/concepts/error-handling/src/getData.ts rename to examples/error-handling/src/getData.ts diff --git a/examples/concepts/error-handling/tsconfig.json b/examples/error-handling/tsconfig.json similarity index 100% rename from examples/concepts/error-handling/tsconfig.json rename to examples/error-handling/tsconfig.json diff --git a/examples/concepts/health-checks/README.md b/examples/health-checks/README.md similarity index 100% rename from examples/concepts/health-checks/README.md rename to examples/health-checks/README.md diff --git a/examples/concepts/health-checks/jitar.json b/examples/health-checks/jitar.json similarity index 100% rename from examples/concepts/health-checks/jitar.json rename to examples/health-checks/jitar.json diff --git a/examples/concepts/health-checks/package.json b/examples/health-checks/package.json similarity index 100% rename from examples/concepts/health-checks/package.json rename to examples/health-checks/package.json diff --git a/examples/concepts/health-checks/requests.http b/examples/health-checks/requests.http similarity index 100% rename from examples/concepts/health-checks/requests.http rename to examples/health-checks/requests.http diff --git a/examples/concepts/health-checks/segments/default.segment.json b/examples/health-checks/segments/default.segment.json similarity index 100% rename from examples/concepts/health-checks/segments/default.segment.json rename to examples/health-checks/segments/default.segment.json diff --git a/examples/concepts/health-checks/services/standalone.json b/examples/health-checks/services/standalone.json similarity index 100% rename from examples/concepts/health-checks/services/standalone.json rename to examples/health-checks/services/standalone.json diff --git a/examples/concepts/health-checks/src/databaseHealthCheck.ts b/examples/health-checks/src/databaseHealthCheck.ts similarity index 100% rename from examples/concepts/health-checks/src/databaseHealthCheck.ts rename to examples/health-checks/src/databaseHealthCheck.ts diff --git a/examples/concepts/health-checks/tsconfig.json b/examples/health-checks/tsconfig.json similarity index 100% rename from examples/concepts/health-checks/tsconfig.json rename to examples/health-checks/tsconfig.json diff --git a/examples/concepts/hello-world/README.md b/examples/hello-world/README.md similarity index 100% rename from examples/concepts/hello-world/README.md rename to examples/hello-world/README.md diff --git a/examples/concepts/hello-world/jitar.json b/examples/hello-world/jitar.json similarity index 100% rename from examples/concepts/hello-world/jitar.json rename to examples/hello-world/jitar.json diff --git a/examples/concepts/hello-world/package.json b/examples/hello-world/package.json similarity index 100% rename from examples/concepts/hello-world/package.json rename to examples/hello-world/package.json diff --git a/examples/concepts/hello-world/requests.http b/examples/hello-world/requests.http similarity index 100% rename from examples/concepts/hello-world/requests.http rename to examples/hello-world/requests.http diff --git a/examples/concepts/hello-world/segments/default.segment.json b/examples/hello-world/segments/default.segment.json similarity index 100% rename from examples/concepts/hello-world/segments/default.segment.json rename to examples/hello-world/segments/default.segment.json diff --git a/examples/concepts/hello-world/services/standalone.json b/examples/hello-world/services/standalone.json similarity index 100% rename from examples/concepts/hello-world/services/standalone.json rename to examples/hello-world/services/standalone.json diff --git a/examples/concepts/hello-world/src/sayHello.ts b/examples/hello-world/src/sayHello.ts similarity index 100% rename from examples/concepts/hello-world/src/sayHello.ts rename to examples/hello-world/src/sayHello.ts diff --git a/examples/concepts/hello-world/tsconfig.json b/examples/hello-world/tsconfig.json similarity index 100% rename from examples/concepts/hello-world/tsconfig.json rename to examples/hello-world/tsconfig.json diff --git a/examples/concepts/load-balancing/README.md b/examples/load-balancing/README.md similarity index 100% rename from examples/concepts/load-balancing/README.md rename to examples/load-balancing/README.md diff --git a/examples/concepts/load-balancing/jitar.json b/examples/load-balancing/jitar.json similarity index 100% rename from examples/concepts/load-balancing/jitar.json rename to examples/load-balancing/jitar.json diff --git a/examples/concepts/load-balancing/package.json b/examples/load-balancing/package.json similarity index 100% rename from examples/concepts/load-balancing/package.json rename to examples/load-balancing/package.json diff --git a/examples/concepts/load-balancing/requests.http b/examples/load-balancing/requests.http similarity index 100% rename from examples/concepts/load-balancing/requests.http rename to examples/load-balancing/requests.http diff --git a/examples/concepts/load-balancing/segments/calculator.segment.json b/examples/load-balancing/segments/calculator.segment.json similarity index 100% rename from examples/concepts/load-balancing/segments/calculator.segment.json rename to examples/load-balancing/segments/calculator.segment.json diff --git a/examples/concepts/load-balancing/services/gateway.json b/examples/load-balancing/services/gateway.json similarity index 100% rename from examples/concepts/load-balancing/services/gateway.json rename to examples/load-balancing/services/gateway.json diff --git a/examples/concepts/load-balancing/services/standalone.json b/examples/load-balancing/services/standalone.json similarity index 100% rename from examples/concepts/load-balancing/services/standalone.json rename to examples/load-balancing/services/standalone.json diff --git a/examples/concepts/load-balancing/services/worker1.json b/examples/load-balancing/services/worker1.json similarity index 100% rename from examples/concepts/load-balancing/services/worker1.json rename to examples/load-balancing/services/worker1.json diff --git a/examples/concepts/load-balancing/services/worker2.json b/examples/load-balancing/services/worker2.json similarity index 100% rename from examples/concepts/load-balancing/services/worker2.json rename to examples/load-balancing/services/worker2.json diff --git a/examples/concepts/load-balancing/src/calculator/add.ts b/examples/load-balancing/src/calculator/add.ts similarity index 100% rename from examples/concepts/load-balancing/src/calculator/add.ts rename to examples/load-balancing/src/calculator/add.ts diff --git a/examples/concepts/load-balancing/src/calculator/divide.ts b/examples/load-balancing/src/calculator/divide.ts similarity index 100% rename from examples/concepts/load-balancing/src/calculator/divide.ts rename to examples/load-balancing/src/calculator/divide.ts diff --git a/examples/concepts/load-balancing/src/calculator/multiply.ts b/examples/load-balancing/src/calculator/multiply.ts similarity index 100% rename from examples/concepts/load-balancing/src/calculator/multiply.ts rename to examples/load-balancing/src/calculator/multiply.ts diff --git a/examples/concepts/load-balancing/src/calculator/subtract.ts b/examples/load-balancing/src/calculator/subtract.ts similarity index 100% rename from examples/concepts/load-balancing/src/calculator/subtract.ts rename to examples/load-balancing/src/calculator/subtract.ts diff --git a/examples/concepts/load-balancing/tsconfig.json b/examples/load-balancing/tsconfig.json similarity index 100% rename from examples/concepts/load-balancing/tsconfig.json rename to examples/load-balancing/tsconfig.json diff --git a/examples/concepts/middleware/README.md b/examples/middleware/README.md similarity index 100% rename from examples/concepts/middleware/README.md rename to examples/middleware/README.md diff --git a/examples/concepts/middleware/jitar.json b/examples/middleware/jitar.json similarity index 100% rename from examples/concepts/middleware/jitar.json rename to examples/middleware/jitar.json diff --git a/examples/concepts/middleware/package.json b/examples/middleware/package.json similarity index 100% rename from examples/concepts/middleware/package.json rename to examples/middleware/package.json diff --git a/examples/concepts/middleware/requests.http b/examples/middleware/requests.http similarity index 100% rename from examples/concepts/middleware/requests.http rename to examples/middleware/requests.http diff --git a/examples/concepts/middleware/segments/default.segment.json b/examples/middleware/segments/default.segment.json similarity index 100% rename from examples/concepts/middleware/segments/default.segment.json rename to examples/middleware/segments/default.segment.json diff --git a/examples/concepts/middleware/services/standalone.json b/examples/middleware/services/standalone.json similarity index 100% rename from examples/concepts/middleware/services/standalone.json rename to examples/middleware/services/standalone.json diff --git a/examples/concepts/middleware/src/argumentMiddleware.ts b/examples/middleware/src/argumentMiddleware.ts similarity index 100% rename from examples/concepts/middleware/src/argumentMiddleware.ts rename to examples/middleware/src/argumentMiddleware.ts diff --git a/examples/concepts/middleware/src/hello.ts b/examples/middleware/src/hello.ts similarity index 100% rename from examples/concepts/middleware/src/hello.ts rename to examples/middleware/src/hello.ts diff --git a/examples/concepts/middleware/src/loggingMiddleware.ts b/examples/middleware/src/loggingMiddleware.ts similarity index 100% rename from examples/concepts/middleware/src/loggingMiddleware.ts rename to examples/middleware/src/loggingMiddleware.ts diff --git a/examples/concepts/middleware/src/ping.ts b/examples/middleware/src/ping.ts similarity index 100% rename from examples/concepts/middleware/src/ping.ts rename to examples/middleware/src/ping.ts diff --git a/examples/concepts/middleware/src/redirect.ts b/examples/middleware/src/redirect.ts similarity index 100% rename from examples/concepts/middleware/src/redirect.ts rename to examples/middleware/src/redirect.ts diff --git a/examples/concepts/middleware/src/redirectMiddleware.ts b/examples/middleware/src/redirectMiddleware.ts similarity index 100% rename from examples/concepts/middleware/src/redirectMiddleware.ts rename to examples/middleware/src/redirectMiddleware.ts diff --git a/examples/concepts/middleware/tsconfig.json b/examples/middleware/tsconfig.json similarity index 100% rename from examples/concepts/middleware/tsconfig.json rename to examples/middleware/tsconfig.json diff --git a/examples/concepts/multi-version/README.md b/examples/multi-version/README.md similarity index 100% rename from examples/concepts/multi-version/README.md rename to examples/multi-version/README.md diff --git a/examples/concepts/multi-version/jitar.json b/examples/multi-version/jitar.json similarity index 100% rename from examples/concepts/multi-version/jitar.json rename to examples/multi-version/jitar.json diff --git a/examples/concepts/multi-version/package.json b/examples/multi-version/package.json similarity index 100% rename from examples/concepts/multi-version/package.json rename to examples/multi-version/package.json diff --git a/examples/concepts/multi-version/requests.http b/examples/multi-version/requests.http similarity index 100% rename from examples/concepts/multi-version/requests.http rename to examples/multi-version/requests.http diff --git a/examples/concepts/multi-version/segments/default.segment.json b/examples/multi-version/segments/default.segment.json similarity index 100% rename from examples/concepts/multi-version/segments/default.segment.json rename to examples/multi-version/segments/default.segment.json diff --git a/examples/concepts/multi-version/services/standalone.json b/examples/multi-version/services/standalone.json similarity index 100% rename from examples/concepts/multi-version/services/standalone.json rename to examples/multi-version/services/standalone.json diff --git a/examples/concepts/multi-version/src/getEmployee.ts b/examples/multi-version/src/getEmployee.ts similarity index 100% rename from examples/concepts/multi-version/src/getEmployee.ts rename to examples/multi-version/src/getEmployee.ts diff --git a/examples/concepts/multi-version/tsconfig.json b/examples/multi-version/tsconfig.json similarity index 100% rename from examples/concepts/multi-version/tsconfig.json rename to examples/multi-version/tsconfig.json diff --git a/examples/concepts/segmentation/README.md b/examples/segmentation/README.md similarity index 100% rename from examples/concepts/segmentation/README.md rename to examples/segmentation/README.md diff --git a/examples/concepts/segmentation/jitar.json b/examples/segmentation/jitar.json similarity index 100% rename from examples/concepts/segmentation/jitar.json rename to examples/segmentation/jitar.json diff --git a/examples/concepts/segmentation/package.json b/examples/segmentation/package.json similarity index 100% rename from examples/concepts/segmentation/package.json rename to examples/segmentation/package.json diff --git a/examples/concepts/segmentation/requests.http b/examples/segmentation/requests.http similarity index 100% rename from examples/concepts/segmentation/requests.http rename to examples/segmentation/requests.http diff --git a/examples/concepts/segmentation/segments/data.segment.json b/examples/segmentation/segments/data.segment.json similarity index 100% rename from examples/concepts/segmentation/segments/data.segment.json rename to examples/segmentation/segments/data.segment.json diff --git a/examples/concepts/segmentation/segments/process.segment.json b/examples/segmentation/segments/process.segment.json similarity index 100% rename from examples/concepts/segmentation/segments/process.segment.json rename to examples/segmentation/segments/process.segment.json diff --git a/examples/concepts/segmentation/services/data.json b/examples/segmentation/services/data.json similarity index 100% rename from examples/concepts/segmentation/services/data.json rename to examples/segmentation/services/data.json diff --git a/examples/concepts/segmentation/services/gateway.json b/examples/segmentation/services/gateway.json similarity index 100% rename from examples/concepts/segmentation/services/gateway.json rename to examples/segmentation/services/gateway.json diff --git a/examples/concepts/segmentation/services/process.json b/examples/segmentation/services/process.json similarity index 100% rename from examples/concepts/segmentation/services/process.json rename to examples/segmentation/services/process.json diff --git a/examples/concepts/segmentation/services/standalone.json b/examples/segmentation/services/standalone.json similarity index 100% rename from examples/concepts/segmentation/services/standalone.json rename to examples/segmentation/services/standalone.json diff --git a/examples/concepts/segmentation/src/reporting/createReport.ts b/examples/segmentation/src/reporting/createReport.ts similarity index 100% rename from examples/concepts/segmentation/src/reporting/createReport.ts rename to examples/segmentation/src/reporting/createReport.ts diff --git a/examples/concepts/segmentation/src/reporting/createStatistics.ts b/examples/segmentation/src/reporting/createStatistics.ts similarity index 100% rename from examples/concepts/segmentation/src/reporting/createStatistics.ts rename to examples/segmentation/src/reporting/createStatistics.ts diff --git a/examples/concepts/segmentation/src/reporting/getData.ts b/examples/segmentation/src/reporting/getData.ts similarity index 100% rename from examples/concepts/segmentation/src/reporting/getData.ts rename to examples/segmentation/src/reporting/getData.ts diff --git a/examples/concepts/segmentation/tsconfig.json b/examples/segmentation/tsconfig.json similarity index 100% rename from examples/concepts/segmentation/tsconfig.json rename to examples/segmentation/tsconfig.json diff --git a/lerna.json b/lerna.json index 69237944..58f083c2 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,6 @@ { "$schema": "node_modules/lerna/schemas/lerna-schema.json", - "version": "0.7.5", + "version": "0.8.2", "command": { "version": { "message": "chore(release): publish %s" diff --git a/migrations/migrate-from-0.7.x-to-0.8.0.md b/migrations/migrate-from-0.7.x-to-0.8.0.md new file mode 100644 index 00000000..5c4bded3 --- /dev/null +++ b/migrations/migrate-from-0.7.x-to-0.8.0.md @@ -0,0 +1,118 @@ +# Migrate from 0.7.x to 0.8.0 + +The 0.8 version of Jitar is a complete rewrite from dynamic to static imports and introduces breaking changes. All changes are described here, with instructions how to adopt them. + +## CLI + +A CLI has been introduced to make it easier to build and start Jitar projects. + +## Jitar config file + +A new configuration file has been introduced to define the output folder for the jitar build. The `jitar.json` file should be placed in the root of the project. The file should look like this: + +```json +{ + "source": "./src", + "target": "./dist" +} +``` + +The above configuration shows the default configuration and works for JavaScript projects. For TypeScript projects, the source should be the transpiled JavaScript output folder. + +The `target` folder is the location of the build output. We like to work with the `.jitar` folder. + +## Services configuration + +The services configuration has been updated in a couple of ways. The `middleware` has been removed from the service configuration and moved to the root of the configuration file. + +`segments` is now a mandatory field. Previously, omitting it resulted in loading all segments, which was confusing and unclear. Each service must now explicitly define the segments it wants to load. + +The old configuration: + +```json +{ + "url": "https://standalone.example.com", + "standalone": + { + "middlewares": [ + "./myMiddleware" + ] + } +} +``` + +And now looks like the following: + + +```json +{ + "url": "http://standalone.example.com", + "middlewares": [ + "./myMiddleware" + ], + "standalone": + { + "segments": ["hello"] + } +} +``` + +## Segment configuration + +In the previous version of Jitar, JavaScript classes and Errors were dynamically loaded. Since dynamic imports are no longer supported, this practice is no longer possible. When classes and Errors need to be shared across multiple segments, they must be added to the segment configuration. + +Each segment that needs to receive a class or an Error must define them in its segment configuration. + +```json +{ + "./account/Account": { + "default": { } + } +} +``` + +## Jitar starter file + +The jitar starter file, named `jitar.ts` is not required anymore. This file must be removed from the project. + +## Package.json + +A couple of changes have to be made to any `package.json` file. + +### Experimental network imports + +The previous version of Jitar needed the `--experimental-network-imports` flag to be set. This was due to the dynamic imports. Node.js 22.7 removed the support for this flag and is no longer supported. + +### Scripts + +The build and start script should be updated to use the CLI. + +```json +{ + "scripts": { + "build": "jitar build", + "standalone": "jitar start --env-file=.env --service=services/standalone.json" + } +} +``` + +## Vite plugin + +The output folder of the Vite build is added to the configuration of the Vite plugin. + +```javascript +export default defineConfig({ + plugins: [ + jitar({ + sourceDir: 'src', + targetDir: 'dist', + jitarDir: '.jitar', + jitarUrl: 'http://localhost:3000', + segments: ['frontend'], + middleware: ['./myMiddleware'] + }) + ] +}); +``` + +For a full description of the Vite plugin, see the [Vite plugin](https://docs.jitar.dev/integrate/vite-plugin.html) documentation. \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 7acd2c74..1af77507 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "jitar-monorepo", - "version": "0.7.5", + "version": "0.8.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "jitar-monorepo", - "version": "0.7.5", + "version": "0.8.0", "license": "MIT", "workspaces": [ "packages/*", @@ -35,9 +35,16 @@ "vitest": "^2.1.1" } }, + "examples/access-protection": { + "name": "jitar-access-protection-example", + "dependencies": { + "jitar": "*" + } + }, "examples/apps/full-stack": { "name": "jitar-full-stack-example", "version": "0.0.0", + "extraneous": true, "dependencies": { "jitar": "*", "mongodb": "^6.8.0", @@ -53,33 +60,23 @@ "vite": "^5.3.3" } }, - "examples/apps/full-stack/node_modules/typescript": { - "version": "5.5.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.3.tgz", - "integrity": "sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, "examples/concepts/access-protection": { "name": "jitar-access-protection-example", + "extraneous": true, "dependencies": { "jitar": "*" } }, "examples/concepts/construction": { "name": "jitar-construction-example", + "extraneous": true, "dependencies": { "jitar": "*" } }, "examples/concepts/cors": { "name": "jitar-cors-example", + "extraneous": true, "dependencies": { "express": "*", "jitar": "*" @@ -90,214 +87,145 @@ }, "examples/concepts/data-transportation": { "name": "jitar-data-transportation-example", + "extraneous": true, "dependencies": { "jitar": "*" } }, "examples/concepts/error-handling": { "name": "jitar-error-handling-example", + "extraneous": true, "dependencies": { "jitar": "*" } }, "examples/concepts/health-checks": { "name": "jitar-health-checks-example", + "extraneous": true, "dependencies": { "jitar": "*" } }, "examples/concepts/hello-world": { "name": "jitar-helloworld-example", + "extraneous": true, "dependencies": { "jitar": "*" } }, "examples/concepts/load-balancing": { "name": "jitar-load-balancing-example", + "extraneous": true, "dependencies": { "jitar": "*" } }, "examples/concepts/middleware": { "name": "jitar-middleware-example", + "extraneous": true, "dependencies": { "jitar": "*" } }, "examples/concepts/multi-version": { "name": "jitar-multi-version-example", + "extraneous": true, "dependencies": { "jitar": "*" } }, "examples/concepts/segmentation": { "name": "jitar-segmentation-example", + "extraneous": true, "dependencies": { "jitar": "*" } }, - "node_modules/@ampproject/remapping": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", - "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", - "dev": true, + "examples/construction": { + "name": "jitar-construction-example", "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" + "jitar": "*" } }, - "node_modules/@babel/code-frame": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", - "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", - "dev": true, + "examples/cors": { + "name": "jitar-cors-example", "dependencies": { - "@babel/highlight": "^7.24.7", - "picocolors": "^1.0.0" + "express": "*", + "jitar": "*" }, - "engines": { - "node": ">=6.9.0" + "devDependencies": { + "cpx2": "*" } }, - "node_modules/@babel/compat-data": { - "version": "7.25.4", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.25.4.tgz", - "integrity": "sha512-+LGRog6RAsCJrrrg/IO6LGmpphNe5DiK30dGjCoxxeGv49B10/3XYGxPsAwrDlMFcFEvdAUavDT8r9k/hSyQqQ==", - "dev": true, - "engines": { - "node": ">=6.9.0" + "examples/data-transportation": { + "name": "jitar-data-transportation-example", + "dependencies": { + "jitar": "*" } }, - "node_modules/@babel/core": { - "version": "7.25.2", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.25.2.tgz", - "integrity": "sha512-BBt3opiCOxUr9euZ5/ro/Xv8/V7yJ5bjYMqG/C1YAo8MIKAnumZalCN+msbci3Pigy4lIQfPUpfMM27HMGaYEA==", - "dev": true, + "examples/error-handling": { + "name": "jitar-error-handling-example", "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.24.7", - "@babel/generator": "^7.25.0", - "@babel/helper-compilation-targets": "^7.25.2", - "@babel/helper-module-transforms": "^7.25.2", - "@babel/helpers": "^7.25.0", - "@babel/parser": "^7.25.0", - "@babel/template": "^7.25.0", - "@babel/traverse": "^7.25.2", - "@babel/types": "^7.25.2", - "convert-source-map": "^2.0.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.3", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" + "jitar": "*" } }, - "node_modules/@babel/core/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" + "examples/health-checks": { + "name": "jitar-health-checks-example", + "dependencies": { + "jitar": "*" } }, - "node_modules/@babel/generator": { - "version": "7.25.6", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.25.6.tgz", - "integrity": "sha512-VPC82gr1seXOpkjAAKoLhP50vx4vGNlF4msF64dSFq1P8RfB+QAuJWGHPXXPc8QyfVWwwB/TNNU4+ayZmHNbZw==", - "dev": true, + "examples/hello-world": { + "name": "jitar-helloworld-example", "dependencies": { - "@babel/types": "^7.25.6", - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" + "jitar": "*" } }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.25.2", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.2.tgz", - "integrity": "sha512-U2U5LsSaZ7TAt3cfaymQ8WHh0pxvdHoEk6HVpaexxixjyEquMh0L0YNJNM6CTGKMXV1iksi0iZkGw4AcFkPaaw==", - "dev": true, + "examples/load-balancing": { + "name": "jitar-load-balancing-example", "dependencies": { - "@babel/compat-data": "^7.25.2", - "@babel/helper-validator-option": "^7.24.8", - "browserslist": "^4.23.1", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" + "jitar": "*" } }, - "node_modules/@babel/helper-compilation-targets/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" + "examples/middleware": { + "name": "jitar-middleware-example", + "dependencies": { + "jitar": "*" } }, - "node_modules/@babel/helper-module-imports": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz", - "integrity": "sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==", - "dev": true, + "examples/multi-version": { + "name": "jitar-multi-version-example", "dependencies": { - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" + "jitar": "*" } }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.25.2", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.25.2.tgz", - "integrity": "sha512-BjyRAbix6j/wv83ftcVJmBt72QtHI56C7JXZoG2xATiLpmoC7dpd8WnkikExHDVPpi/3qCmO6WY1EaXOluiecQ==", - "dev": true, + "examples/segmentation": { + "name": "jitar-segmentation-example", "dependencies": { - "@babel/helper-module-imports": "^7.24.7", - "@babel/helper-simple-access": "^7.24.7", - "@babel/helper-validator-identifier": "^7.24.7", - "@babel/traverse": "^7.25.2" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" + "jitar": "*" } }, - "node_modules/@babel/helper-plugin-utils": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.8.tgz", - "integrity": "sha512-FFWx5142D8h2Mgr/iPVGH5G7w6jDn4jUSpZTyDnQO0Yn7Ks2Kuz6Pci8H6MPCoUJegd/UZQ3tAvfLCxQSnWWwg==", + "node_modules/@ampproject/remapping": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + }, "engines": { - "node": ">=6.9.0" + "node": ">=6.0.0" } }, - "node_modules/@babel/helper-simple-access": { + "node_modules/@babel/code-frame": { "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.24.7.tgz", - "integrity": "sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", + "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", "dev": true, "dependencies": { - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7" + "@babel/highlight": "^7.24.7", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" @@ -321,28 +249,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-validator-option": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.24.8.tgz", - "integrity": "sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers": { - "version": "7.25.6", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.25.6.tgz", - "integrity": "sha512-Xg0tn4HcfTijTwfDwYlvVCl43V6h4KyVVX2aEm4qdO/PC6L2YvzLHFdmxhoeSA3eslcE6+ZVXHgWwopXYLNq4Q==", - "dev": true, - "dependencies": { - "@babel/template": "^7.25.0", - "@babel/types": "^7.25.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/highlight": { "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", @@ -373,68 +279,6 @@ "node": ">=6.0.0" } }, - "node_modules/@babel/plugin-transform-react-jsx-self": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.24.7.tgz", - "integrity": "sha512-fOPQYbGSgH0HUp4UJO4sMBFjY6DuWq+2i8rixyUMb3CdGixs/gccURvYOAhajBdKDoGajFr3mUq5rH3phtkGzw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-react-jsx-source": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.24.7.tgz", - "integrity": "sha512-J2z+MWzZHVOemyLweMqngXrgGC42jQ//R0KdxqkIz/OrbVIIlhFI3WigZ5fO+nwFvBlncr4MGapd8vTyc7RPNQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/template": { - "version": "7.25.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.0.tgz", - "integrity": "sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.24.7", - "@babel/parser": "^7.25.0", - "@babel/types": "^7.25.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse": { - "version": "7.25.6", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.6.tgz", - "integrity": "sha512-9Vrcx5ZW6UwK5tvqsj0nGpp/XzqthkT0dqIc9g1AdtygFToNtTF67XzYS//dm+SAK9cp3B9R4ZO/46p63SCjlQ==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.24.7", - "@babel/generator": "^7.25.6", - "@babel/parser": "^7.25.6", - "@babel/template": "^7.25.0", - "@babel/types": "^7.25.6", - "debug": "^4.3.1", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/types": { "version": "7.25.6", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.6.tgz", @@ -1554,14 +1398,6 @@ "webidl-conversions": "^3.0.0" } }, - "node_modules/@mongodb-js/saslprep": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.1.9.tgz", - "integrity": "sha512-tVkljjeEaAhCqTzajSdgbQ6gE6f3oneVwa3iXR6csiEwXXOFsiC6Uh9iAjAhXPtqa/XMDHWjjeNH/77m/Yq2dw==", - "dependencies": { - "sparse-bitfield": "^3.0.3" - } - }, "node_modules/@napi-rs/wasm-runtime": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.4.tgz", @@ -2775,47 +2611,6 @@ "tslib": "^2.4.0" } }, - "node_modules/@types/babel__core": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", - "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", - "dev": true, - "dependencies": { - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7", - "@types/babel__generator": "*", - "@types/babel__template": "*", - "@types/babel__traverse": "*" - } - }, - "node_modules/@types/babel__generator": { - "version": "7.6.8", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz", - "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", - "dev": true, - "dependencies": { - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__template": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", - "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", - "dev": true, - "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__traverse": { - "version": "7.20.6", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.6.tgz", - "integrity": "sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==", - "dev": true, - "dependencies": { - "@babel/types": "^7.20.7" - } - }, "node_modules/@types/body-parser": { "version": "1.19.5", "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.5.tgz", @@ -2939,12 +2734,6 @@ "kleur": "^3.0.3" } }, - "node_modules/@types/prop-types": { - "version": "15.7.13", - "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.13.tgz", - "integrity": "sha512-hCZTSvwbzWGvhqxp/RqVqwU999pBf2vp7hzIjiYOsl8wqOmUxkQ6ddw1cV3l8811+kdUFus/q4d1Y3E3SyEifA==", - "dev": true - }, "node_modules/@types/qs": { "version": "6.9.16", "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.16.tgz", @@ -2957,25 +2746,6 @@ "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==", "dev": true }, - "node_modules/@types/react": { - "version": "18.3.10", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.10.tgz", - "integrity": "sha512-02sAAlBnP39JgXwkAq3PeU9DVaaGpZyF3MGcC0MKgQVkZor5IiiDAipVaxQHtDJAmO4GIy/rVBy/LzVj76Cyqg==", - "dev": true, - "dependencies": { - "@types/prop-types": "*", - "csstype": "^3.0.2" - } - }, - "node_modules/@types/react-dom": { - "version": "18.3.0", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.0.tgz", - "integrity": "sha512-EhwApuTmMBmXuFOikhQLIBUn6uFg81SwLMOAUgodJF14SOBOCMdU04gDoYi0WOJJHD144TL32z4yDqCW3dnkQg==", - "dev": true, - "dependencies": { - "@types/react": "*" - } - }, "node_modules/@types/resolve": { "version": "1.20.2", "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz", @@ -3003,19 +2773,6 @@ "@types/send": "*" } }, - "node_modules/@types/webidl-conversions": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.3.tgz", - "integrity": "sha512-CiJJvcRtIgzadHCYXw7dqEnMNRjhGZlYK05Mj9OyktqV8uVT8fD2BFOB7S1uwBE3Kj2Z+4UyPmFw/Ixgw/LAlA==" - }, - "node_modules/@types/whatwg-url": { - "version": "11.0.5", - "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-11.0.5.tgz", - "integrity": "sha512-coYR071JRaHa+xoEvvYqvnIHaVqaYrLPbsufM9BF63HkwI5Lgmy2QR8Q5K/lYDYo5AK82wOvSOS0UsLTpTG7uQ==", - "dependencies": { - "@types/webidl-conversions": "*" - } - }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "7.18.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.18.0.tgz", @@ -3208,25 +2965,6 @@ "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", "dev": true }, - "node_modules/@vitejs/plugin-react": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.3.2.tgz", - "integrity": "sha512-hieu+o05v4glEBucTcKMK3dlES0OeJlD9YVOAPraVMOInBCwzumaIFiUjr4bHK7NPgnAHgiskUoceKercrN8vg==", - "dev": true, - "dependencies": { - "@babel/core": "^7.25.2", - "@babel/plugin-transform-react-jsx-self": "^7.24.7", - "@babel/plugin-transform-react-jsx-source": "^7.24.7", - "@types/babel__core": "^7.20.5", - "react-refresh": "^0.14.2" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "peerDependencies": { - "vite": "^4.2.0 || ^5.0.0" - } - }, "node_modules/@vitest/coverage-v8": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-2.1.1.tgz", @@ -3782,46 +3520,6 @@ "node": ">=8" } }, - "node_modules/browserslist": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.0.tgz", - "integrity": "sha512-Rmb62sR1Zpjql25eSanFGEhAxcFwfA1K0GuQcLoaJBAcENegrQut3hYdhXFF1obQfiDyqIW/cLM5HSJ/9k884A==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "caniuse-lite": "^1.0.30001663", - "electron-to-chromium": "^1.5.28", - "node-releases": "^2.0.18", - "update-browserslist-db": "^1.1.0" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/bson": { - "version": "6.8.0", - "resolved": "https://registry.npmjs.org/bson/-/bson-6.8.0.tgz", - "integrity": "sha512-iOJg8pr7wq2tg/zSlCCHMi3hMm5JTOxLTagf3zxhcenHsFp+c6uOs6K7W5UE7A4QIJGtqh/ZovFNMP4mOPJynQ==", - "engines": { - "node": ">=16.20.1" - } - }, "node_modules/buffer": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", @@ -3960,26 +3658,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/caniuse-lite": { - "version": "1.0.30001666", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001666.tgz", - "integrity": "sha512-gD14ICmoV5ZZM1OdzPWmpx+q4GyefaK06zi8hmfHV5xe4/2nOQX3+Dw5o+fSqOws2xVwL9j+anOPFwHzdEdV4g==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ] - }, "node_modules/chai": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/chai/-/chai-5.1.1.tgz", @@ -4480,12 +4158,6 @@ "node": ">=14" } }, - "node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true - }, "node_modules/cookie": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", @@ -4600,12 +4272,6 @@ "node": ">=4" } }, - "node_modules/csstype": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", - "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", - "dev": true - }, "node_modules/dargs": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/dargs/-/dargs-7.0.0.tgz", @@ -4917,12 +4583,6 @@ "node": ">=0.10.0" } }, - "node_modules/electron-to-chromium": { - "version": "1.5.31", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.31.tgz", - "integrity": "sha512-QcDoBbQeYt0+3CWcK/rEbuHvwpbT/8SV9T3OSgs6cX1FlcUAkgrkqbg9zLnDrMM/rLamzQwal4LYFCiWk861Tg==", - "dev": true - }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -5895,15 +5555,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -6227,15 +5878,6 @@ "node": ">= 0.10" } }, - "node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/globby": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", @@ -6725,7 +6367,7 @@ "version": "9.0.5", "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", - "devOptional": true, + "dev": true, "dependencies": { "jsbn": "1.1.0", "sprintf-js": "^1.1.3" @@ -7254,57 +6896,54 @@ "link": true }, "node_modules/jitar-access-protection-example": { - "resolved": "examples/concepts/access-protection", + "resolved": "examples/access-protection", "link": true }, "node_modules/jitar-construction-example": { - "resolved": "examples/concepts/construction", + "resolved": "examples/construction", "link": true }, "node_modules/jitar-cors-example": { - "resolved": "examples/concepts/cors", + "resolved": "examples/cors", "link": true }, "node_modules/jitar-data-transportation-example": { - "resolved": "examples/concepts/data-transportation", + "resolved": "examples/data-transportation", "link": true }, "node_modules/jitar-error-handling-example": { - "resolved": "examples/concepts/error-handling", - "link": true - }, - "node_modules/jitar-full-stack-example": { - "resolved": "examples/apps/full-stack", + "resolved": "examples/error-handling", "link": true }, "node_modules/jitar-health-checks-example": { - "resolved": "examples/concepts/health-checks", + "resolved": "examples/health-checks", "link": true }, "node_modules/jitar-helloworld-example": { - "resolved": "examples/concepts/hello-world", + "resolved": "examples/hello-world", "link": true }, "node_modules/jitar-load-balancing-example": { - "resolved": "examples/concepts/load-balancing", + "resolved": "examples/load-balancing", "link": true }, "node_modules/jitar-middleware-example": { - "resolved": "examples/concepts/middleware", + "resolved": "examples/middleware", "link": true }, "node_modules/jitar-multi-version-example": { - "resolved": "examples/concepts/multi-version", + "resolved": "examples/multi-version", "link": true }, "node_modules/jitar-segmentation-example": { - "resolved": "examples/concepts/segmentation", + "resolved": "examples/segmentation", "link": true }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true }, "node_modules/js-yaml": { "version": "4.1.0", @@ -7322,19 +6961,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", - "devOptional": true - }, - "node_modules/jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true, - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } + "dev": true }, "node_modules/json-buffer": { "version": "3.0.1", @@ -8000,17 +7627,6 @@ "node": ">=8" } }, - "node_modules/loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dependencies": { - "js-tokens": "^3.0.0 || ^4.0.0" - }, - "bin": { - "loose-envify": "cli.js" - } - }, "node_modules/loupe": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.1.tgz", @@ -8020,15 +7636,6 @@ "get-func-name": "^2.0.1" } }, - "node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "dependencies": { - "yallist": "^3.0.2" - } - }, "node_modules/magic-string": { "version": "0.30.11", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.11.tgz", @@ -8107,11 +7714,6 @@ "node": ">= 0.6" } }, - "node_modules/memory-pager": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", - "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==" - }, "node_modules/meow": { "version": "8.1.2", "resolved": "https://registry.npmjs.org/meow/-/meow-8.1.2.tgz", @@ -8640,60 +8242,6 @@ "node": ">=0.10.0" } }, - "node_modules/mongodb": { - "version": "6.9.0", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.9.0.tgz", - "integrity": "sha512-UMopBVx1LmEUbW/QE0Hw18u583PEDVQmUmVzzBRH0o/xtE9DBRA5ZYLOjpLIa03i8FXjzvQECJcqoMvCXftTUA==", - "dependencies": { - "@mongodb-js/saslprep": "^1.1.5", - "bson": "^6.7.0", - "mongodb-connection-string-url": "^3.0.0" - }, - "engines": { - "node": ">=16.20.1" - }, - "peerDependencies": { - "@aws-sdk/credential-providers": "^3.188.0", - "@mongodb-js/zstd": "^1.1.0", - "gcp-metadata": "^5.2.0", - "kerberos": "^2.0.1", - "mongodb-client-encryption": ">=6.0.0 <7", - "snappy": "^7.2.2", - "socks": "^2.7.1" - }, - "peerDependenciesMeta": { - "@aws-sdk/credential-providers": { - "optional": true - }, - "@mongodb-js/zstd": { - "optional": true - }, - "gcp-metadata": { - "optional": true - }, - "kerberos": { - "optional": true - }, - "mongodb-client-encryption": { - "optional": true - }, - "snappy": { - "optional": true - }, - "socks": { - "optional": true - } - } - }, - "node_modules/mongodb-connection-string-url": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-3.0.1.tgz", - "integrity": "sha512-XqMGwRX0Lgn05TDB4PyG2h2kKO/FfWJyCzYQbIhXUxz7ETt0I/FqHjUeqj37irJ+Dl1ZtU82uYyj14u2XsZKfg==", - "dependencies": { - "@types/whatwg-url": "^11.0.2", - "whatwg-url": "^13.0.0" - } - }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -8889,12 +8437,6 @@ "integrity": "sha512-QNABxbrPa3qEIfrE6GOJ7BYIuignnJw7iQ2YPbc3Nla1HzRJjXzZOiikfF8m7eAMfichLt3M4VgLOetqgDmgGQ==", "dev": true }, - "node_modules/node-releases": { - "version": "2.0.18", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", - "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", - "dev": true - }, "node_modules/nopt": { "version": "7.2.1", "resolved": "https://registry.npmjs.org/nopt/-/nopt-7.2.1.tgz", @@ -10022,6 +9564,7 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, "engines": { "node": ">=6" } @@ -10100,44 +9643,12 @@ "node": ">= 0.8" } }, - "node_modules/react": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", - "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", - "dependencies": { - "loose-envify": "^1.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-dom": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", - "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", - "dependencies": { - "loose-envify": "^1.1.0", - "scheduler": "^0.23.2" - }, - "peerDependencies": { - "react": "^18.3.1" - } - }, "node_modules/react-is": { "version": "18.3.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", "dev": true }, - "node_modules/react-refresh": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.2.tgz", - "integrity": "sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/read": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/read/-/read-3.0.1.tgz", @@ -10656,14 +10167,6 @@ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, - "node_modules/scheduler": { - "version": "0.23.2", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", - "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", - "dependencies": { - "loose-envify": "^1.1.0" - } - }, "node_modules/semver": { "version": "7.6.3", "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", @@ -10874,7 +10377,7 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", - "devOptional": true, + "dev": true, "engines": { "node": ">= 6.0.0", "npm": ">= 3.0.0" @@ -10890,7 +10393,7 @@ "version": "2.8.3", "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.3.tgz", "integrity": "sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw==", - "devOptional": true, + "dev": true, "dependencies": { "ip-address": "^9.0.5", "smart-buffer": "^4.2.0" @@ -10954,14 +10457,6 @@ "source-map": "^0.6.0" } }, - "node_modules/sparse-bitfield": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", - "integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==", - "dependencies": { - "memory-pager": "^1.0.2" - } - }, "node_modules/spdx-correct": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", @@ -11019,7 +10514,7 @@ "version": "1.1.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", - "devOptional": true + "dev": true }, "node_modules/ssri": { "version": "10.0.6", @@ -11461,17 +10956,6 @@ "node": ">=0.6" } }, - "node_modules/tr46": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-4.1.1.tgz", - "integrity": "sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==", - "dependencies": { - "punycode": "^2.3.0" - }, - "engines": { - "node": ">=14" - } - }, "node_modules/treeverse": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/treeverse/-/treeverse-3.0.0.tgz", @@ -11675,36 +11159,6 @@ "yarn": "*" } }, - "node_modules/update-browserslist-db": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", - "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "escalade": "^3.2.0", - "picocolors": "^1.1.0" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -11927,26 +11381,6 @@ "defaults": "^1.0.3" } }, - "node_modules/webidl-conversions": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", - "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", - "engines": { - "node": ">=12" - } - }, - "node_modules/whatwg-url": { - "version": "13.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-13.0.0.tgz", - "integrity": "sha512-9WWbymnqj57+XEuqADHrCJ2eSXzn8WXIW/YSGaZtb2WKAInQ6CHfaUUcTyyver0p8BDg5StLQq8h1vtZuwmOig==", - "dependencies": { - "tr46": "^4.1.1", - "webidl-conversions": "^7.0.0" - }, - "engines": { - "node": ">=16" - } - }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -12226,12 +11660,6 @@ "node": ">=10" } }, - "node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true - }, "node_modules/yargs": { "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", @@ -12296,6 +11724,7 @@ "@jitar/build": "*", "@jitar/configuration": "*", "@jitar/http": "*", + "@jitar/logging": "*", "@jitar/runtime": "*", "@jitar/sourcing": "*" } @@ -12311,7 +11740,7 @@ } }, "packages/create-jitar": { - "version": "0.7.5", + "version": "0.8.2", "license": "MIT", "dependencies": { "kolorist": "^1.8.0", @@ -12359,7 +11788,7 @@ } }, "packages/jitar": { - "version": "0.7.5", + "version": "0.8.2", "license": "MIT", "dependencies": { "dotenv": "^16.4.5", @@ -12477,7 +11906,7 @@ }, "packages/plugin-vite": { "name": "@jitar/plugin-vite", - "version": "0.7.5", + "version": "0.8.2", "license": "MIT", "peerDependencies": { "vite": ">=4.0.0 || >=5.0.0" @@ -12517,6 +11946,7 @@ "dependencies": { "@jitar/errors": "*", "@jitar/execution": "*", + "@jitar/serialization": "*", "@jitar/sourcing": "*" } }, diff --git a/package.json b/package.json index 6b098cca..ee7cbd15 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jitar-monorepo", - "version": "0.7.5", + "version": "0.8.0", "private": true, "description": "Monorepo configuration for Jitar.", "license": "MIT", diff --git a/packages/build/src/BuildManager.ts b/packages/build/src/BuildManager.ts index f6094f72..e13fbf16 100644 --- a/packages/build/src/BuildManager.ts +++ b/packages/build/src/BuildManager.ts @@ -1,13 +1,16 @@ import type { RuntimeConfiguration } from '@jitar/configuration'; -import { Files, LocalFileManager } from '@jitar/sourcing'; +import { Logger, LogLevel } from '@jitar/logging'; import type { FileManager } from '@jitar/sourcing'; +import { Files, LocalFileManager } from '@jitar/sourcing'; import { ApplicationReader } from './source'; import { ApplicationBuilder } from './target'; export default class BuildManager { + #logger: Logger; + #projectFileManager: FileManager; #sourceFileManager: FileManager; #targetFileManager: FileManager; @@ -15,14 +18,16 @@ export default class BuildManager #applicationReader: ApplicationReader; #applicationBuilder: ApplicationBuilder; - constructor(configuration: RuntimeConfiguration) + constructor(configuration: RuntimeConfiguration, logLevel?: LogLevel) { + this.#logger = new Logger(logLevel); + this.#projectFileManager = new LocalFileManager('./'); this.#sourceFileManager = new LocalFileManager(configuration.source); this.#targetFileManager = new LocalFileManager(configuration.target); this.#applicationReader = new ApplicationReader(this.#sourceFileManager); - this.#applicationBuilder = new ApplicationBuilder(this.#targetFileManager); + this.#applicationBuilder = new ApplicationBuilder(this.#targetFileManager, this.#logger); } async build(): Promise diff --git a/packages/build/src/target/Builder.ts b/packages/build/src/target/Builder.ts index 465d6fad..6eaee15c 100644 --- a/packages/build/src/target/Builder.ts +++ b/packages/build/src/target/Builder.ts @@ -1,4 +1,5 @@ +import { Logger } from '@jitar/logging'; import type { FileManager } from '@jitar/sourcing'; import type { Application } from '../source'; @@ -11,10 +12,10 @@ export default class Builder #moduleBuilder: ModuleBuilder; #segmentBuilder: SegmentBuilder; - constructor(fileManager: FileManager) + constructor(fileManager: FileManager, logger: Logger) { this.#moduleBuilder = new ModuleBuilder(fileManager); - this.#segmentBuilder = new SegmentBuilder(fileManager); + this.#segmentBuilder = new SegmentBuilder(fileManager, logger); } async build(application: Application): Promise diff --git a/packages/build/src/target/SegmentBuilder.ts b/packages/build/src/target/SegmentBuilder.ts index e2c45b8e..81a91726 100644 --- a/packages/build/src/target/SegmentBuilder.ts +++ b/packages/build/src/target/SegmentBuilder.ts @@ -1,9 +1,9 @@ -import { VersionParser } from '@jitar/execution'; -import type { FileManager } from '@jitar/sourcing'; -import { ESDestructuredArray, ESDestructuredObject } from '@jitar/analysis'; import type { ESField, ESFunction, ESParameter } from '@jitar/analysis'; +import { ESDestructuredArray, ESDestructuredObject } from '@jitar/analysis'; +import { VersionParser } from '@jitar/execution'; import { Logger } from '@jitar/logging'; +import type { FileManager } from '@jitar/sourcing'; import type { Application, Segment, SegmentModule } from '../source'; import { FileHelper } from '../utils'; @@ -15,13 +15,14 @@ export default class SegmentBuilder { #fileManager: FileManager; - #logger = new Logger(); + #logger: Logger; #fileHelper = new FileHelper(); #versionParser = new VersionParser(); - constructor(fileManager: FileManager) + constructor(fileManager: FileManager, logger: Logger) { this.#fileManager = fileManager; + this.#logger = logger; } async build(application: Application): Promise @@ -30,12 +31,13 @@ export default class SegmentBuilder const builds = segmentation.segments.map(segment => this.#buildSegment(segment)); - await Promise.all(builds); + await Promise.all(builds); } async #buildSegment(segment: Segment): Promise { const filename = `${segment.name}.segment.js`; + const code = this.#createCode(segment); await this.#fileManager.write(filename, code); @@ -96,7 +98,7 @@ export default class SegmentBuilder #createSegmentCode(segment: Segment): string { const lines: string[] = []; - + lines.push(`export default new Segment("${segment.name}")`); for (const clazz of segment.classes) diff --git a/packages/cli/package.json b/packages/cli/package.json index 412f5174..f5db2b3d 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -20,6 +20,7 @@ "@jitar/configuration": "*", "@jitar/sourcing": "*", "@jitar/http": "*", + "@jitar/logging": "*", "@jitar/runtime": "*" } } diff --git a/packages/cli/src/commands/BuildApp.ts b/packages/cli/src/commands/BuildApp.ts index 710a171c..4e8a632b 100644 --- a/packages/cli/src/commands/BuildApp.ts +++ b/packages/cli/src/commands/BuildApp.ts @@ -1,9 +1,10 @@ -import { ConfigurationManager } from '@jitar/configuration'; import { BuildManager } from '@jitar/build'; +import { ConfigurationManager } from '@jitar/configuration'; +import { LogLevel, LogLevelParser } from '@jitar/logging'; -import Command from '../Command'; import ArgumentProcessor from '../ArgumentProcessor'; +import Command from '../Command'; export default class BuildApp implements Command { @@ -12,14 +13,29 @@ export default class BuildApp implements Command const environmentFile = args.getOptionalArgument('--env-file', undefined); const runtimeConfigFile = args.getOptionalArgument('--config', undefined); + const logLevelString = args.getOptionalArgument('--log-level', undefined); + const logLevel = this.#parseLogLevel(logLevelString); + const configurationManager = new ConfigurationManager(); await configurationManager.configureEnvironment(environmentFile); - + const configuration = await configurationManager.getRuntimeConfiguration(runtimeConfigFile); - const buildManager = new BuildManager(configuration); + const buildManager = new BuildManager(configuration, logLevel); return buildManager.build(); } + + #parseLogLevel(logLevel: string | undefined): LogLevel | undefined + { + if (logLevel === undefined) + { + return; + } + + const logLevelParser = new LogLevelParser(); + + return logLevelParser.parse(logLevel); + } } diff --git a/packages/cli/src/commands/ShowHelp.ts b/packages/cli/src/commands/ShowHelp.ts index 52240609..c448b49c 100644 --- a/packages/cli/src/commands/ShowHelp.ts +++ b/packages/cli/src/commands/ShowHelp.ts @@ -1,6 +1,6 @@ -import Command from '../Command'; import ArgumentProcessor from '../ArgumentProcessor'; +import Command from '../Command'; const message = ` Usage: jitar [options] @@ -13,18 +13,19 @@ Commands: help Shows help (this message) Options: - --config Path to the configuration file (default: jitar.json) - --service Path to the service configuration file (required for 'start' command) - --env-file Path to the environment file (default: none) - + --config Path to the configuration file (default: jitar.json) + --service Path to the service configuration file (required for 'start' command) + --env-file Path to the environment file (default: none) + --log-level Optional for 'start' and 'build' commands (default: info, other options: debug, warn, error, fatal) + --http-body-limit Optional for 'start' command (default: 204,800 bytes) More information can be found at https://docs.jitar.dev `; export default class ShowHelp implements Command { - // eslint-disable-next-line @typescript-eslint/no-unused-vars - async execute(args: ArgumentProcessor): Promise - { - console.log(message); - } + // eslint-disable-next-line @typescript-eslint/no-unused-vars + async execute(args: ArgumentProcessor): Promise + { + console.log(message); + } } diff --git a/packages/cli/src/commands/StartServer.ts b/packages/cli/src/commands/StartServer.ts index 49490682..9fb84692 100644 --- a/packages/cli/src/commands/StartServer.ts +++ b/packages/cli/src/commands/StartServer.ts @@ -1,11 +1,12 @@ import { ConfigurationManager, RuntimeConfiguration, ServerConfiguration } from '@jitar/configuration'; -import { LocalFileManager, SourcingManager } from '@jitar/sourcing'; +import { HttpRemoteBuilder, HttpServer } from '@jitar/http'; +import { LogLevel, LogLevelParser } from '@jitar/logging'; import { ServerBuilder } from '@jitar/runtime'; -import { HttpServer, HttpRemoteBuilder } from '@jitar/http'; +import { LocalFileManager, SourcingManager } from '@jitar/sourcing'; -import Command from '../Command'; import ArgumentProcessor from '../ArgumentProcessor'; +import Command from '../Command'; const banner = ` ██╗██╗████████╗ █████╗ ██████╗ @@ -26,8 +27,11 @@ export default class StartServer implements Command const runtimeConfigFile = args.getOptionalArgument('--config', undefined); const serviceConfigFile = args.getRequiredArgument('--service'); + const logLevelString = args.getOptionalArgument('--log-level', undefined); + const logLevel = this.#parseLogLevel(logLevelString); + const bodyLimitString = args.getOptionalArgument('--http-body-limit', undefined); - const bodyLimit = bodyLimitString !== undefined ? Number.parseInt(bodyLimitString) : undefined; + const bodyLimit = this.#parseBodyLimit(bodyLimitString); const configurationManager = new ConfigurationManager(); @@ -36,12 +40,12 @@ export default class StartServer implements Command const runtimeConfiguration = await configurationManager.getRuntimeConfiguration(runtimeConfigFile); const serverConfiguration = await configurationManager.getServerConfiguration(serviceConfigFile); - const httpServer = await this.#buildServer(runtimeConfiguration, serverConfiguration, bodyLimit); + const httpServer = await this.#buildServer(runtimeConfiguration, serverConfiguration, bodyLimit, logLevel); - return this.#runServer(httpServer); + return this.#runServer(httpServer); } - async #buildServer(runtimeConfiguration: RuntimeConfiguration, serverConfiguration: ServerConfiguration, bodyLimit?: number): Promise + async #buildServer(runtimeConfiguration: RuntimeConfiguration, serverConfiguration: ServerConfiguration, bodyLimit?: number, logLevel?: LogLevel): Promise { // eslint-disable-next-line @typescript-eslint/no-unused-vars const [protocol, host, port] = serverConfiguration.url.split(':'); @@ -51,7 +55,7 @@ export default class StartServer implements Command const remoteBuilder = new HttpRemoteBuilder(); const serverBuilder = new ServerBuilder(sourcingManager, remoteBuilder); - const server = await serverBuilder.build(serverConfiguration); + const server = await serverBuilder.build(serverConfiguration, logLevel); return new HttpServer(server, port, bodyLimit); } @@ -64,4 +68,26 @@ export default class StartServer implements Command return httpServer.start(); } + + #parseLogLevel(logLevel: string | undefined): LogLevel | undefined + { + if (logLevel === undefined) + { + return; + } + + const logLevelParser = new LogLevelParser(); + + return logLevelParser.parse(logLevel); + } + + #parseBodyLimit(bodyLimit: string | undefined): number | undefined + { + if (Number.isInteger(bodyLimit) === false) + { + return undefined; + } + + return Number.parseInt(bodyLimit!); + } } diff --git a/packages/create-jitar/package.json b/packages/create-jitar/package.json index 00455de9..e5126bef 100644 --- a/packages/create-jitar/package.json +++ b/packages/create-jitar/package.json @@ -1,6 +1,6 @@ { "name": "create-jitar", - "version": "0.7.5", + "version": "0.8.2", "type": "module", "license": "MIT", "author": "Masking Technology (https://jitar.dev)", @@ -49,5 +49,6 @@ "bugs": { "url": "https://github.com/MaskingTechnology/jitar/issues" }, - "homepage": "https://jitar.dev" + "homepage": "https://jitar.dev", + "gitHead": "0bff066d2b51e97e910486e72b9f6b089bae96b1" } diff --git a/packages/create-jitar/templates/jitar-only/jitar.json b/packages/create-jitar/templates/jitar-only/jitar.json new file mode 100644 index 00000000..4bb49481 --- /dev/null +++ b/packages/create-jitar/templates/jitar-only/jitar.json @@ -0,0 +1,4 @@ +{ + "source": "./dist", + "target": "./.jitar" +} \ No newline at end of file diff --git a/packages/create-jitar/templates/jitar-only/package.json b/packages/create-jitar/templates/jitar-only/package.json index e3196266..db47b543 100644 --- a/packages/create-jitar/templates/jitar-only/package.json +++ b/packages/create-jitar/templates/jitar-only/package.json @@ -3,14 +3,13 @@ "type": "module", "private": true, "scripts": { - "build": "tsc -p tsconfig.json", - "repo": "node --experimental-network-imports dist/jitar.js --config=services/repository.json", - "gateway": "node --experimental-network-imports dist/jitar.js --config=services/gateway.json", - "hi": "node --experimental-network-imports dist/jitar.js --config=services/hi.json", - "hello": "node --experimental-network-imports dist/jitar.js --config=services/hello.json", - "standalone": "node --experimental-network-imports dist/jitar.js --config=services/standalone.json" + "build": "rm -rf dist .jitar && tsc -p tsconfig.json && jitar build", + "standalone": "jitar start --service=services/standalone.json", + "gateway": "jitar start --service=services/gateway.json", + "hi": "jitar start --service=services/hi.json", + "hello": "jitar start --service=services/hello.json" }, "dependencies": { - "jitar": "^0.7.5" + "jitar": "^0.8.0" } } \ No newline at end of file diff --git a/packages/create-jitar/templates/jitar-only/services/gateway.json b/packages/create-jitar/templates/jitar-only/services/gateway.json index 4c1dfdb1..403fcc23 100644 --- a/packages/create-jitar/templates/jitar-only/services/gateway.json +++ b/packages/create-jitar/templates/jitar-only/services/gateway.json @@ -1,6 +1,6 @@ { "url": "http://127.0.0.1:3000", "gateway": { - "repository": "http://127.0.0.1:2999" + } } \ No newline at end of file diff --git a/packages/create-jitar/templates/jitar-only/services/hello.json b/packages/create-jitar/templates/jitar-only/services/hello.json index c852e801..f437f672 100644 --- a/packages/create-jitar/templates/jitar-only/services/hello.json +++ b/packages/create-jitar/templates/jitar-only/services/hello.json @@ -3,7 +3,6 @@ "worker": { "gateway": "http://127.0.0.1:3000", - "repository": "http://127.0.0.1:2999", "segments": [ "hello" ] } } \ No newline at end of file diff --git a/packages/create-jitar/templates/jitar-only/services/hi.json b/packages/create-jitar/templates/jitar-only/services/hi.json index f85a4a8a..35fd23ea 100644 --- a/packages/create-jitar/templates/jitar-only/services/hi.json +++ b/packages/create-jitar/templates/jitar-only/services/hi.json @@ -3,7 +3,6 @@ "worker": { "gateway": "http://127.0.0.1:3000", - "repository": "http://127.0.0.1:2999", "segments": [ "hi" ] } } \ No newline at end of file diff --git a/packages/create-jitar/templates/jitar-only/services/repository.json b/packages/create-jitar/templates/jitar-only/services/repository.json deleted file mode 100644 index d60c52d8..00000000 --- a/packages/create-jitar/templates/jitar-only/services/repository.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "url": "http://127.0.0.1:2999", - "repository": - { - - } -} \ No newline at end of file diff --git a/packages/create-jitar/templates/jitar-only/services/standalone.json b/packages/create-jitar/templates/jitar-only/services/standalone.json index 9117bcfa..7f4117dd 100644 --- a/packages/create-jitar/templates/jitar-only/services/standalone.json +++ b/packages/create-jitar/templates/jitar-only/services/standalone.json @@ -2,6 +2,6 @@ "url": "http://127.0.0.1:3000", "standalone": { - + "segments": [ "hi", "hello" ] } } \ No newline at end of file diff --git a/packages/create-jitar/templates/lit/index.html b/packages/create-jitar/templates/lit/index.html index 9e08d00d..1d66e6b8 100644 --- a/packages/create-jitar/templates/lit/index.html +++ b/packages/create-jitar/templates/lit/index.html @@ -5,8 +5,8 @@ Vite + Lit + TS - - + + diff --git a/examples/apps/full-stack/jitar.json b/packages/create-jitar/templates/lit/jitar.json similarity index 100% rename from examples/apps/full-stack/jitar.json rename to packages/create-jitar/templates/lit/jitar.json diff --git a/packages/create-jitar/templates/lit/package.json b/packages/create-jitar/templates/lit/package.json index 42b4e9d3..dff0656f 100644 --- a/packages/create-jitar/templates/lit/package.json +++ b/packages/create-jitar/templates/lit/package.json @@ -14,16 +14,18 @@ ], "scripts": { "dev": "vite", - "build": "vite build && tsc", - "standalone": "node --experimental-network-imports dist/jitar.js --config=services/standalone.json" + "build": "npm run build-domain && npm run build-webui", + "build-domain": "rm -rf dist && tsc -p tsconfig.build.json && jitar build", + "build-webui": "vite build", + "standalone": "jitar start --service=services/standalone.json" }, "dependencies": { - "jitar": "^0.7.5", - "lit": "^3.1.4" + "jitar": "^0.8.0", + "lit": "^3.2.0" }, "devDependencies": { - "@jitar/plugin-vite": "^0.7.5", + "@jitar/plugin-vite": "^0.8.0", "typescript": "^5.5.3", - "vite": "^5.3.3" + "vite": "^5.4.8" } } \ No newline at end of file diff --git a/packages/create-jitar/templates/lit/services/standalone.json b/packages/create-jitar/templates/lit/services/standalone.json index 5ccc4c82..16716079 100644 --- a/packages/create-jitar/templates/lit/services/standalone.json +++ b/packages/create-jitar/templates/lit/services/standalone.json @@ -1,11 +1,7 @@ { "url": "http://127.0.0.1:3000", "standalone": { - "assets": [ - "index.html", - "my-element.js", - "style.css", - "vite.svg" - ] + "segments": ["default"], + "assets": ["index.html", "my-element.js", "style.css", "vite.svg", "assets/**/*"] } } \ No newline at end of file diff --git a/packages/create-jitar/templates/lit/src/jitar.ts b/packages/create-jitar/templates/lit/src/jitar.ts deleted file mode 100644 index 6ae887de..00000000 --- a/packages/create-jitar/templates/lit/src/jitar.ts +++ /dev/null @@ -1,9 +0,0 @@ - -import { buildServer } from 'jitar'; - -const moduleImporter = async (specifier: string) => import(specifier); -const server = await buildServer(moduleImporter); - -process.on('SIGINT', async () => server.stop()); - -server.start(); diff --git a/examples/apps/full-stack/src/assets/jitar.svg b/packages/create-jitar/templates/lit/src/webui/assets/jitar.svg similarity index 100% rename from examples/apps/full-stack/src/assets/jitar.svg rename to packages/create-jitar/templates/lit/src/webui/assets/jitar.svg diff --git a/packages/create-jitar/templates/lit/src/assets/lit.svg b/packages/create-jitar/templates/lit/src/webui/assets/lit.svg similarity index 100% rename from packages/create-jitar/templates/lit/src/assets/lit.svg rename to packages/create-jitar/templates/lit/src/webui/assets/lit.svg diff --git a/packages/create-jitar/templates/lit/src/index.css b/packages/create-jitar/templates/lit/src/webui/index.css similarity index 100% rename from packages/create-jitar/templates/lit/src/index.css rename to packages/create-jitar/templates/lit/src/webui/index.css diff --git a/packages/create-jitar/templates/lit/src/my-element.ts b/packages/create-jitar/templates/lit/src/webui/my-element.ts similarity index 96% rename from packages/create-jitar/templates/lit/src/my-element.ts rename to packages/create-jitar/templates/lit/src/webui/my-element.ts index 862fb8b1..4f46f736 100644 --- a/packages/create-jitar/templates/lit/src/my-element.ts +++ b/packages/create-jitar/templates/lit/src/webui/my-element.ts @@ -2,7 +2,7 @@ import { LitElement, css, html } from 'lit' import { customElement, property } from 'lit/decorators.js' import litLogo from './assets/lit.svg' import jitarLogo from './assets/jitar.svg' -import { sayHello } from './domain/sayHello' +import { sayHello } from '../domain/sayHello' @customElement('my-element') export class MyElement extends LitElement @@ -66,4 +66,4 @@ declare global { 'my-element': MyElement } -} \ No newline at end of file +} diff --git a/packages/create-jitar/templates/lit/tsconfig.build.json b/packages/create-jitar/templates/lit/tsconfig.build.json new file mode 100644 index 00000000..98a6ed0f --- /dev/null +++ b/packages/create-jitar/templates/lit/tsconfig.build.json @@ -0,0 +1,12 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "allowImportingTsExtensions": false, + "noEmit": false, + "jsx": "react-jsx", + "rootDir": "./src", + "outDir": "./dist", + }, + "include": ["src"], + "exclude": ["src/webui"] +} \ No newline at end of file diff --git a/packages/create-jitar/templates/lit/tsconfig.json b/packages/create-jitar/templates/lit/tsconfig.json index f2316c17..c6ab9c3e 100644 --- a/packages/create-jitar/templates/lit/tsconfig.json +++ b/packages/create-jitar/templates/lit/tsconfig.json @@ -1,25 +1,24 @@ { "compilerOptions": { - "target": "ESNext", + "target": "ES2020", + "experimentalDecorators": true, + "useDefineForClassFields": false, "module": "ESNext", "lib": ["ES2020", "DOM", "DOM.Iterable"], - "declaration": false, - "emitDeclarationOnly": false, - "outDir": "dist", + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "Node", + "allowImportingTsExtensions": true, + "isolatedModules": true, + "moduleDetection": "force", + "noEmit": true, + + /* Linting */ "strict": true, "noUnusedLocals": true, "noUnusedParameters": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, - "moduleResolution": "Node", - "isolatedModules": true, - "allowSyntheticDefaultImports": true, - "experimentalDecorators": true, - "forceConsistentCasingInFileNames": true, - "useDefineForClassFields": false, - "skipLibCheck": true, - "noEmit": false, + "noFallthroughCasesInSwitch": true }, - "include": ["src/**/*.ts"], - "references": [{ "path": "./tsconfig.node.json" }] -} + "include": ["src"] +} \ No newline at end of file diff --git a/packages/create-jitar/templates/lit/vite.config.ts b/packages/create-jitar/templates/lit/vite.config.ts index 14084cb1..6c1de050 100644 --- a/packages/create-jitar/templates/lit/vite.config.ts +++ b/packages/create-jitar/templates/lit/vite.config.ts @@ -1,24 +1,11 @@ -import { resolve } from 'path' import { defineConfig } from 'vite' import jitar from '@jitar/plugin-vite' -export default defineConfig(({ mode }) => -{ - return { - plugins: [ - jitar('src', 'domain', 'http://localhost:3000') - ], - build: { - lib: { - entry: 'src/my-element.ts', - formats: ['es'], - }, - rollupOptions: { - external: mode === "production" ? "" : /^lit/, - input: { - main: resolve(__dirname, 'index.html'), - } - }, - }, - }; +export default defineConfig({ + build: { + emptyOutDir: false + }, + plugins: [ + jitar({ sourceDir: 'src', targetDir: 'dist', jitarDir: 'domain', jitarUrl: 'http://localhost:3000', segments: [] }) + ] }) \ No newline at end of file diff --git a/packages/create-jitar/templates/react/index.html b/packages/create-jitar/templates/react/index.html index e0d1c840..e75ce731 100644 --- a/packages/create-jitar/templates/react/index.html +++ b/packages/create-jitar/templates/react/index.html @@ -8,6 +8,6 @@
- + diff --git a/packages/create-jitar/templates/react/jitar.json b/packages/create-jitar/templates/react/jitar.json new file mode 100644 index 00000000..b4c921fe --- /dev/null +++ b/packages/create-jitar/templates/react/jitar.json @@ -0,0 +1,4 @@ +{ + "source": "./dist", + "target": "./dist" +} \ No newline at end of file diff --git a/packages/create-jitar/templates/react/package.json b/packages/create-jitar/templates/react/package.json index 6430e879..cf52ee49 100644 --- a/packages/create-jitar/templates/react/package.json +++ b/packages/create-jitar/templates/react/package.json @@ -5,17 +5,18 @@ "type": "module", "scripts": { "dev": "vite", - "build": "vite build && tsc", - "standalone": "node --experimental-network-imports dist/jitar.js --config=services/standalone.json", - "preview": "vite preview" + "build": "npm run build-domain && npm run build-webui", + "build-domain": "rm -rf dist && tsc -p tsconfig.build.json && jitar build", + "build-webui": "vite build", + "standalone": "jitar start --service=services/standalone.json" }, "dependencies": { - "jitar": "^0.7.5", + "jitar": "^0.8.0", "react": "^18.3.1", "react-dom": "^18.3.1" }, "devDependencies": { - "@jitar/plugin-vite": "^0.7.5", + "@jitar/plugin-vite": "^0.8.0", "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", "@vitejs/plugin-react": "^4.3.1", diff --git a/packages/create-jitar/templates/react/services/standalone.json b/packages/create-jitar/templates/react/services/standalone.json index 794badce..a1c3ccd6 100644 --- a/packages/create-jitar/templates/react/services/standalone.json +++ b/packages/create-jitar/templates/react/services/standalone.json @@ -2,6 +2,7 @@ "url": "http://127.0.0.1:3000", "standalone": { + "segments": ["default"], "assets": ["index.html", "main.js", "App.js", "vite.svg", "assets/**/*"] } } \ No newline at end of file diff --git a/packages/create-jitar/templates/react/src/jitar.ts b/packages/create-jitar/templates/react/src/jitar.ts deleted file mode 100644 index 6ae887de..00000000 --- a/packages/create-jitar/templates/react/src/jitar.ts +++ /dev/null @@ -1,9 +0,0 @@ - -import { buildServer } from 'jitar'; - -const moduleImporter = async (specifier: string) => import(specifier); -const server = await buildServer(moduleImporter); - -process.on('SIGINT', async () => server.stop()); - -server.start(); diff --git a/packages/create-jitar/templates/react/src/App.css b/packages/create-jitar/templates/react/src/webui/App.css similarity index 100% rename from packages/create-jitar/templates/react/src/App.css rename to packages/create-jitar/templates/react/src/webui/App.css diff --git a/packages/create-jitar/templates/react/src/App.tsx b/packages/create-jitar/templates/react/src/webui/App.tsx similarity index 95% rename from packages/create-jitar/templates/react/src/App.tsx rename to packages/create-jitar/templates/react/src/webui/App.tsx index a23807ce..e119b124 100644 --- a/packages/create-jitar/templates/react/src/App.tsx +++ b/packages/create-jitar/templates/react/src/webui/App.tsx @@ -4,7 +4,7 @@ import './App.css' import reactLogo from './assets/react.svg' import jitarLogo from './assets/jitar.svg' -import { sayHello } from './domain/sayHello' +import { sayHello } from '../domain/sayHello' function App() { diff --git a/packages/create-jitar/templates/lit/src/assets/jitar.svg b/packages/create-jitar/templates/react/src/webui/assets/jitar.svg similarity index 100% rename from packages/create-jitar/templates/lit/src/assets/jitar.svg rename to packages/create-jitar/templates/react/src/webui/assets/jitar.svg diff --git a/packages/create-jitar/templates/react/src/assets/react.svg b/packages/create-jitar/templates/react/src/webui/assets/react.svg similarity index 100% rename from packages/create-jitar/templates/react/src/assets/react.svg rename to packages/create-jitar/templates/react/src/webui/assets/react.svg diff --git a/packages/create-jitar/templates/react/src/index.css b/packages/create-jitar/templates/react/src/webui/index.css similarity index 100% rename from packages/create-jitar/templates/react/src/index.css rename to packages/create-jitar/templates/react/src/webui/index.css diff --git a/packages/create-jitar/templates/jitar-only/src/jitar.ts b/packages/create-jitar/templates/react/src/webui/jitar.ts similarity index 100% rename from packages/create-jitar/templates/jitar-only/src/jitar.ts rename to packages/create-jitar/templates/react/src/webui/jitar.ts diff --git a/packages/create-jitar/templates/react/src/main.tsx b/packages/create-jitar/templates/react/src/webui/main.tsx similarity index 100% rename from packages/create-jitar/templates/react/src/main.tsx rename to packages/create-jitar/templates/react/src/webui/main.tsx diff --git a/examples/apps/full-stack/tsconfig.base.json b/packages/create-jitar/templates/react/tsconfig.base.json similarity index 100% rename from examples/apps/full-stack/tsconfig.base.json rename to packages/create-jitar/templates/react/tsconfig.base.json diff --git a/examples/apps/full-stack/tsconfig.build.json b/packages/create-jitar/templates/react/tsconfig.build.json similarity index 100% rename from examples/apps/full-stack/tsconfig.build.json rename to packages/create-jitar/templates/react/tsconfig.build.json diff --git a/packages/create-jitar/templates/react/tsconfig.json b/packages/create-jitar/templates/react/tsconfig.json index 65e13e0b..0ab93b49 100644 --- a/packages/create-jitar/templates/react/tsconfig.json +++ b/packages/create-jitar/templates/react/tsconfig.json @@ -1,22 +1,6 @@ { + "extends": "./tsconfig.base.json", "compilerOptions": { - "target": "ESNext", - "useDefineForClassFields": true, - "lib": ["DOM", "DOM.Iterable", "ESNext"], - "allowJs": false, - "skipLibCheck": true, - "esModuleInterop": false, - "allowSyntheticDefaultImports": true, - "strict": true, - "forceConsistentCasingInFileNames": true, - "module": "ESNext", - "moduleResolution": "Node", - "resolveJsonModule": true, - "isolatedModules": true, - "noEmit": false, - "outDir": "dist", "jsx": "react-jsx" - }, - "include": ["src"], - "references": [{ "path": "./tsconfig.node.json" }] -} + } +} \ No newline at end of file diff --git a/packages/create-jitar/templates/react/tsconfig.node.json b/packages/create-jitar/templates/react/tsconfig.node.json deleted file mode 100644 index 9d31e2ae..00000000 --- a/packages/create-jitar/templates/react/tsconfig.node.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "compilerOptions": { - "composite": true, - "module": "ESNext", - "moduleResolution": "Node", - "allowSyntheticDefaultImports": true - }, - "include": ["vite.config.ts"] -} diff --git a/packages/create-jitar/templates/react/vite.config.ts b/packages/create-jitar/templates/react/vite.config.ts index 4f3e74d4..0fbd9924 100644 --- a/packages/create-jitar/templates/react/vite.config.ts +++ b/packages/create-jitar/templates/react/vite.config.ts @@ -1,10 +1,13 @@ -import { defineConfig } from 'vite' -import react from '@vitejs/plugin-react' -import jitar from '@jitar/plugin-vite' +import { defineConfig } from 'vite'; +import react from '@vitejs/plugin-react'; +import jitar from '@jitar/plugin-vite'; export default defineConfig({ + build: { + emptyOutDir: false + }, plugins: [ react(), - jitar('src', 'domain', 'http://localhost:3000') + jitar({ sourceDir: 'src', targetDir: 'dist', jitarDir: 'domain', jitarUrl: 'http://localhost:3000', segments: [] }) ] -}) \ No newline at end of file +}) diff --git a/packages/create-jitar/templates/solid/index.html b/packages/create-jitar/templates/solid/index.html index 48c59fc1..c197f91f 100644 --- a/packages/create-jitar/templates/solid/index.html +++ b/packages/create-jitar/templates/solid/index.html @@ -4,13 +4,13 @@ - + Solid App
- + diff --git a/packages/create-jitar/templates/solid/jitar.json b/packages/create-jitar/templates/solid/jitar.json new file mode 100644 index 00000000..b4c921fe --- /dev/null +++ b/packages/create-jitar/templates/solid/jitar.json @@ -0,0 +1,4 @@ +{ + "source": "./dist", + "target": "./dist" +} \ No newline at end of file diff --git a/packages/create-jitar/templates/solid/package.json b/packages/create-jitar/templates/solid/package.json index c70e5a84..48b045fe 100644 --- a/packages/create-jitar/templates/solid/package.json +++ b/packages/create-jitar/templates/solid/package.json @@ -5,22 +5,22 @@ "description": "", "type": "module", "scripts": { - "start": "vite", "dev": "vite", - "build": "vite build && tsc", - "serve": "vite preview", - "standalone": "node --experimental-network-imports dist/jitar.js --config=services/standalone.json" + "build": "npm run build-domain && npm run build-webui", + "build-domain": "rm -rf dist && tsc -p tsconfig.build.json && jitar build", + "build-webui": "vite build", + "standalone": "jitar start --service=services/standalone.json" }, "license": "MIT", "devDependencies": { - "@jitar/plugin-vite": "^0.7.5", + "@jitar/plugin-vite": "^0.8.0", "@types/express": "^4.17.21", "typescript": "^5.5.3", "vite": "^5.3.3", "vite-plugin-solid": "^2.10.2" }, "dependencies": { - "jitar": "^0.7.5", + "jitar": "^0.8.0", "solid-js": "^1.8.18" } -} \ No newline at end of file +} diff --git a/packages/create-jitar/templates/solid/services/standalone.json b/packages/create-jitar/templates/solid/services/standalone.json index dea5f797..aa5ff203 100644 --- a/packages/create-jitar/templates/solid/services/standalone.json +++ b/packages/create-jitar/templates/solid/services/standalone.json @@ -1,6 +1,7 @@ { "url": "http://127.0.0.1:3000", "standalone": { + "segments": ["default"], "assets": [ "index.html", "vite.svg", "assets/**/*" ] } } \ No newline at end of file diff --git a/packages/create-jitar/templates/solid/src/jitar.ts b/packages/create-jitar/templates/solid/src/jitar.ts deleted file mode 100644 index 6ae887de..00000000 --- a/packages/create-jitar/templates/solid/src/jitar.ts +++ /dev/null @@ -1,9 +0,0 @@ - -import { buildServer } from 'jitar'; - -const moduleImporter = async (specifier: string) => import(specifier); -const server = await buildServer(moduleImporter); - -process.on('SIGINT', async () => server.stop()); - -server.start(); diff --git a/packages/create-jitar/templates/solid/src/App.tsx b/packages/create-jitar/templates/solid/src/webui/App.tsx similarity index 94% rename from packages/create-jitar/templates/solid/src/App.tsx rename to packages/create-jitar/templates/solid/src/webui/App.tsx index c98551d3..02f4598f 100644 --- a/packages/create-jitar/templates/solid/src/App.tsx +++ b/packages/create-jitar/templates/solid/src/webui/App.tsx @@ -2,7 +2,7 @@ import solidjslogo from './logo.svg' import jitarLogo from './assets/jitar.svg' import type { Component } from 'solid-js' import { createResource } from 'solid-js' -import { sayHello } from './domain/sayHello' +import { sayHello } from '../domain/sayHello' const sayHelloResource = async () => { return await sayHello('Vite + Solid + Jitar') diff --git a/packages/create-jitar/templates/solid/src/assets/favicon.ico b/packages/create-jitar/templates/solid/src/webui/assets/favicon.ico similarity index 100% rename from packages/create-jitar/templates/solid/src/assets/favicon.ico rename to packages/create-jitar/templates/solid/src/webui/assets/favicon.ico diff --git a/packages/create-jitar/templates/react/src/assets/jitar.svg b/packages/create-jitar/templates/solid/src/webui/assets/jitar.svg similarity index 100% rename from packages/create-jitar/templates/react/src/assets/jitar.svg rename to packages/create-jitar/templates/solid/src/webui/assets/jitar.svg diff --git a/packages/create-jitar/templates/solid/src/index.css b/packages/create-jitar/templates/solid/src/webui/index.css similarity index 100% rename from packages/create-jitar/templates/solid/src/index.css rename to packages/create-jitar/templates/solid/src/webui/index.css diff --git a/packages/create-jitar/templates/solid/src/index.tsx b/packages/create-jitar/templates/solid/src/webui/index.tsx similarity index 100% rename from packages/create-jitar/templates/solid/src/index.tsx rename to packages/create-jitar/templates/solid/src/webui/index.tsx diff --git a/packages/create-jitar/templates/solid/src/logo.svg b/packages/create-jitar/templates/solid/src/webui/logo.svg similarity index 100% rename from packages/create-jitar/templates/solid/src/logo.svg rename to packages/create-jitar/templates/solid/src/webui/logo.svg diff --git a/packages/create-jitar/templates/solid/tsconfig.build.json b/packages/create-jitar/templates/solid/tsconfig.build.json new file mode 100644 index 00000000..5cdb7884 --- /dev/null +++ b/packages/create-jitar/templates/solid/tsconfig.build.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "noEmit": false, + "rootDir": "./src", + "outDir": "./dist", + }, + "include": ["src"], + "exclude": ["src/webui"] +} \ No newline at end of file diff --git a/packages/create-jitar/templates/solid/tsconfig.json b/packages/create-jitar/templates/solid/tsconfig.json index b8b91f93..9d5ec946 100644 --- a/packages/create-jitar/templates/solid/tsconfig.json +++ b/packages/create-jitar/templates/solid/tsconfig.json @@ -8,7 +8,7 @@ "esModuleInterop": true, "jsx": "preserve", "jsxImportSource": "solid-js", - "types": ["vite/client"], + "types": ["vite/client", "node"], "noEmit": false, /* update this property */ "outDir": "dist", /* add this property */ "isolatedModules": true diff --git a/packages/create-jitar/templates/solid/vite.config.ts b/packages/create-jitar/templates/solid/vite.config.ts index 91d57d21..d6ee0673 100644 --- a/packages/create-jitar/templates/solid/vite.config.ts +++ b/packages/create-jitar/templates/solid/vite.config.ts @@ -5,9 +5,10 @@ import jitar from '@jitar/plugin-vite' export default defineConfig({ plugins: [ solidPlugin(), - jitar('src', 'domain', 'http://localhost:3000') + jitar({ sourceDir: 'src', targetDir: 'dist', jitarDir: 'domain', jitarUrl: 'http://localhost:3000', segments: [] }) ], build: { + emptyOutDir: false, target: 'esnext', } }) \ No newline at end of file diff --git a/packages/create-jitar/templates/svelte/index.html b/packages/create-jitar/templates/svelte/index.html index b5b12526..721a425d 100644 --- a/packages/create-jitar/templates/svelte/index.html +++ b/packages/create-jitar/templates/svelte/index.html @@ -8,6 +8,6 @@
- + diff --git a/packages/create-jitar/templates/svelte/jitar.json b/packages/create-jitar/templates/svelte/jitar.json new file mode 100644 index 00000000..b4c921fe --- /dev/null +++ b/packages/create-jitar/templates/svelte/jitar.json @@ -0,0 +1,4 @@ +{ + "source": "./dist", + "target": "./dist" +} \ No newline at end of file diff --git a/packages/create-jitar/templates/svelte/package.json b/packages/create-jitar/templates/svelte/package.json index f707cb25..498a1b8b 100644 --- a/packages/create-jitar/templates/svelte/package.json +++ b/packages/create-jitar/templates/svelte/package.json @@ -5,22 +5,22 @@ "type": "module", "scripts": { "dev": "vite", - "build": "vite build && tsc", - "preview": "vite preview", - "check": "svelte-check --tsconfig ./tsconfig.json", - "standalone": "node --experimental-network-imports dist/jitar.js --config=services/standalone.json" + "build": "npm run build-domain && npm run build-webui", + "build-domain": "rm -rf dist && tsc -p tsconfig.build.json && jitar build", + "build-webui": "vite build", + "standalone": "jitar start --service=services/standalone.json" }, "devDependencies": { - "@jitar/plugin-vite": "^0.7.5", - "@sveltejs/vite-plugin-svelte": "^3.1.1", + "@jitar/plugin-vite": "^0.8.0", + "@sveltejs/vite-plugin-svelte": "^3.1.2", "@tsconfig/svelte": "^5.0.4", - "svelte": "^4.2.18", - "svelte-check": "^3.8.4", + "svelte": "^4.2.19", + "svelte-check": "^4.0.4", "tslib": "^2.6.3", "typescript": "^5.5.3", "vite": "^5.3.3" }, "dependencies": { - "jitar": "^0.7.5" + "jitar": "^0.8.0" } } \ No newline at end of file diff --git a/packages/create-jitar/templates/svelte/services/standalone.json b/packages/create-jitar/templates/svelte/services/standalone.json index 794badce..a1c3ccd6 100644 --- a/packages/create-jitar/templates/svelte/services/standalone.json +++ b/packages/create-jitar/templates/svelte/services/standalone.json @@ -2,6 +2,7 @@ "url": "http://127.0.0.1:3000", "standalone": { + "segments": ["default"], "assets": ["index.html", "main.js", "App.js", "vite.svg", "assets/**/*"] } } \ No newline at end of file diff --git a/packages/create-jitar/templates/svelte/src/jitar.ts b/packages/create-jitar/templates/svelte/src/jitar.ts deleted file mode 100644 index 6ae887de..00000000 --- a/packages/create-jitar/templates/svelte/src/jitar.ts +++ /dev/null @@ -1,9 +0,0 @@ - -import { buildServer } from 'jitar'; - -const moduleImporter = async (specifier: string) => import(specifier); -const server = await buildServer(moduleImporter); - -process.on('SIGINT', async () => server.stop()); - -server.start(); diff --git a/packages/create-jitar/templates/svelte/src/App.svelte b/packages/create-jitar/templates/svelte/src/webui/App.svelte similarity index 95% rename from packages/create-jitar/templates/svelte/src/App.svelte rename to packages/create-jitar/templates/svelte/src/webui/App.svelte index 204c9575..65cc5c3c 100644 --- a/packages/create-jitar/templates/svelte/src/App.svelte +++ b/packages/create-jitar/templates/svelte/src/webui/App.svelte @@ -2,7 +2,7 @@ import svelteLogo from './assets/svelte.svg' import jitarLogo from './assets/jitar.svg' - import { sayHello } from './domain/sayHello' + import { sayHello } from '../domain/sayHello' async function runComponent() { diff --git a/packages/create-jitar/templates/svelte/src/app.css b/packages/create-jitar/templates/svelte/src/webui/app.css similarity index 100% rename from packages/create-jitar/templates/svelte/src/app.css rename to packages/create-jitar/templates/svelte/src/webui/app.css diff --git a/packages/create-jitar/templates/solid/src/assets/jitar.svg b/packages/create-jitar/templates/svelte/src/webui/assets/jitar.svg similarity index 100% rename from packages/create-jitar/templates/solid/src/assets/jitar.svg rename to packages/create-jitar/templates/svelte/src/webui/assets/jitar.svg diff --git a/packages/create-jitar/templates/svelte/src/assets/svelte.svg b/packages/create-jitar/templates/svelte/src/webui/assets/svelte.svg similarity index 100% rename from packages/create-jitar/templates/svelte/src/assets/svelte.svg rename to packages/create-jitar/templates/svelte/src/webui/assets/svelte.svg diff --git a/packages/create-jitar/templates/svelte/src/main.ts b/packages/create-jitar/templates/svelte/src/webui/main.ts similarity index 62% rename from packages/create-jitar/templates/svelte/src/main.ts rename to packages/create-jitar/templates/svelte/src/webui/main.ts index e2b2c334..073d283b 100644 --- a/packages/create-jitar/templates/svelte/src/main.ts +++ b/packages/create-jitar/templates/svelte/src/webui/main.ts @@ -2,7 +2,7 @@ import './app.css' import App from './App.svelte' const app = new App({ - target: document.getElementById('app'), + target: document.getElementById('app') as HTMLElement, }) export default app \ No newline at end of file diff --git a/packages/create-jitar/templates/svelte/tsconfig.build.json b/packages/create-jitar/templates/svelte/tsconfig.build.json new file mode 100644 index 00000000..b10304a5 --- /dev/null +++ b/packages/create-jitar/templates/svelte/tsconfig.build.json @@ -0,0 +1,11 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "noEmit": false, + "rootDir": "./src", + "outDir": "./dist", + "checkJs": false + }, + "include": ["src"], + "exclude": ["src/webui"] +} \ No newline at end of file diff --git a/packages/create-jitar/templates/svelte/tsconfig.json b/packages/create-jitar/templates/svelte/tsconfig.json index 75c4495b..17df1159 100644 --- a/packages/create-jitar/templates/svelte/tsconfig.json +++ b/packages/create-jitar/templates/svelte/tsconfig.json @@ -18,6 +18,5 @@ "noEmit": false, "outDir": "dist" }, - "include": ["src/**/*.d.ts", "src/**/*.ts", "src/**/*.js", "src/**/*.svelte"], - "references": [{ "path": "./tsconfig.node.json" }] + "include": ["src/**/*.d.ts", "src/**/*.ts", "src/**/*.js", "src/**/*.svelte"] } diff --git a/packages/create-jitar/templates/svelte/tsconfig.node.json b/packages/create-jitar/templates/svelte/tsconfig.node.json deleted file mode 100644 index 056ec04c..00000000 --- a/packages/create-jitar/templates/svelte/tsconfig.node.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "compilerOptions": { - "composite": true, - "skipLibCheck": true, - "module": "ESNext", - "moduleResolution": "Node" - }, - "include": ["vite.config.ts"] -} diff --git a/packages/create-jitar/templates/svelte/vite.config.ts b/packages/create-jitar/templates/svelte/vite.config.ts index 6611e6a0..1f2dfc95 100644 --- a/packages/create-jitar/templates/svelte/vite.config.ts +++ b/packages/create-jitar/templates/svelte/vite.config.ts @@ -3,8 +3,11 @@ import { svelte } from '@sveltejs/vite-plugin-svelte' import jitar from '@jitar/plugin-vite' export default defineConfig({ + build: { + emptyOutDir: false, + }, plugins: [ svelte(), - jitar('src', 'domain', 'http://localhost:3000') + jitar({ sourceDir: 'src', targetDir: 'dist', jitarDir: 'domain', jitarUrl: 'http://localhost:3000', segments: [] }) ], }); diff --git a/packages/create-jitar/templates/vue/index.html b/packages/create-jitar/templates/vue/index.html index 143557b5..5c535248 100644 --- a/packages/create-jitar/templates/vue/index.html +++ b/packages/create-jitar/templates/vue/index.html @@ -8,6 +8,6 @@
- + diff --git a/packages/create-jitar/templates/vue/jitar.json b/packages/create-jitar/templates/vue/jitar.json new file mode 100644 index 00000000..b4c921fe --- /dev/null +++ b/packages/create-jitar/templates/vue/jitar.json @@ -0,0 +1,4 @@ +{ + "source": "./dist", + "target": "./dist" +} \ No newline at end of file diff --git a/packages/create-jitar/templates/vue/package.json b/packages/create-jitar/templates/vue/package.json index b5b2b20a..00ad47b8 100644 --- a/packages/create-jitar/templates/vue/package.json +++ b/packages/create-jitar/templates/vue/package.json @@ -5,16 +5,17 @@ "type": "module", "scripts": { "dev": "vite", - "build": "vite build && vue-tsc --noEmit && tsc", - "preview": "vite preview", - "standalone": "node --experimental-network-imports dist/jitar.js --config=services/standalone.json" + "build": "npm run build-domain && npm run build-webui", + "build-domain": "rm -rf dist && tsc -p tsconfig.build.json && jitar build", + "build-webui": "vite build && vue-tsc --noEmit", + "standalone": "jitar start --service=services/standalone.json" }, "dependencies": { - "jitar": "^0.7.5", + "jitar": "^0.8.0", "vue": "^3.4.31" }, "devDependencies": { - "@jitar/plugin-vite": "^0.7.5", + "@jitar/plugin-vite": "^0.8.0", "@vitejs/plugin-vue": "^5.0.5", "typescript": "^5.5.3", "vite": "^5.3.3", diff --git a/packages/create-jitar/templates/vue/services/standalone.json b/packages/create-jitar/templates/vue/services/standalone.json index 794badce..a1c3ccd6 100644 --- a/packages/create-jitar/templates/vue/services/standalone.json +++ b/packages/create-jitar/templates/vue/services/standalone.json @@ -2,6 +2,7 @@ "url": "http://127.0.0.1:3000", "standalone": { + "segments": ["default"], "assets": ["index.html", "main.js", "App.js", "vite.svg", "assets/**/*"] } } \ No newline at end of file diff --git a/packages/create-jitar/templates/vue/src/assets/jitar.svg b/packages/create-jitar/templates/vue/src/assets/jitar.svg deleted file mode 100644 index d2a98904..00000000 --- a/packages/create-jitar/templates/vue/src/assets/jitar.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/packages/create-jitar/templates/vue/src/jitar.ts b/packages/create-jitar/templates/vue/src/jitar.ts deleted file mode 100644 index 6ae887de..00000000 --- a/packages/create-jitar/templates/vue/src/jitar.ts +++ /dev/null @@ -1,9 +0,0 @@ - -import { buildServer } from 'jitar'; - -const moduleImporter = async (specifier: string) => import(specifier); -const server = await buildServer(moduleImporter); - -process.on('SIGINT', async () => server.stop()); - -server.start(); diff --git a/packages/create-jitar/templates/vue/src/App.vue b/packages/create-jitar/templates/vue/src/webui/App.vue similarity index 95% rename from packages/create-jitar/templates/vue/src/App.vue rename to packages/create-jitar/templates/vue/src/webui/App.vue index 86eff425..fe7789e9 100644 --- a/packages/create-jitar/templates/vue/src/App.vue +++ b/packages/create-jitar/templates/vue/src/webui/App.vue @@ -1,7 +1,7 @@