@flyo/nitro-astro 2.0.9 → 2.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -29,7 +29,7 @@
29
29
  </g>
30
30
  </g>
31
31
  </svg>
32
- `;function $e(e){const n={accessToken:!1,liveEdit:!1,fallbackComponent:null,componentsDir:"src/components/flyo",serverCacheHeaderTtl:1200,clientCacheHeaderTtl:900,...e};return n.liveEdit==="true"?n.liveEdit=!0:n.liveEdit==="false"&&(n.liveEdit=!1),{name:"@flyo/nitro-astro",hooks:{"astro:config:setup":({injectScript:t,updateConfig:i,injectRoute:a,addMiddleware:o,addDevToolbarApp:r})=>{r({id:"flyo-nitro",name:"Flyo Nitro",icon:xe,entrypoint:"@flyo/nitro-astro/toolbar.ts"}),a({pattern:"sitemap.xml",entrypoint:"@flyo/nitro-astro/sitemap.ts"}),o({entrypoint:"@flyo/nitro-astro/middleware.ts",order:"post"}),i({image:{service:{entrypoint:"@flyo/nitro-astro/cdn.ts"}},vite:{plugins:[Ie(e.componentsDir,e.components||{},e.fallbackComponent)]}}),t("page-ssr",`
32
+ `;function $e(e){const n={accessToken:!1,liveEdit:!1,fallbackComponent:null,componentsDir:"src/components/flyo",serverCacheHeaderTtl:1200,clientCacheHeaderTtl:900,...e};return n.liveEdit==="true"?n.liveEdit=!0:n.liveEdit==="false"&&(n.liveEdit=!1),{name:"@flyo/nitro-astro",hooks:{"astro:config:setup":({injectScript:t,updateConfig:i,injectRoute:a,addMiddleware:o,addDevToolbarApp:r})=>{r({id:"flyo-nitro",name:"Flyo Nitro",icon:xe,entrypoint:"@flyo/nitro-astro/toolbar.ts"}),a({pattern:"sitemap.xml",entrypoint:"@flyo/nitro-astro/sitemap.ts"}),o({entrypoint:"@flyo/nitro-astro/middleware.ts",order:"post"}),i({image:{service:{entrypoint:"@flyo/nitro-astro/cdn.ts"}},vite:{plugins:[Ie(n.componentsDir,n.components||{},n.fallbackComponent)]}}),t("page-ssr",`
33
33
  import { Configuration } from '@flyo/nitro-typescript'
34
34
 
35
35
  var defaultConfig = new Configuration({
@@ -789,9 +789,9 @@ function Pe(e) {
789
789
  vite: {
790
790
  plugins: [
791
791
  Re(
792
- e.componentsDir,
793
- e.components || {},
794
- e.fallbackComponent
792
+ n.componentsDir,
793
+ n.components || {},
794
+ n.fallbackComponent
795
795
  )
796
796
  ]
797
797
  }
@@ -15,9 +15,23 @@ export interface IntegrationOptions {
15
15
  * If enabled, the user can interact with the components, also it represents the application to be in development mode.
16
16
  */
17
17
  liveEdit: string | boolean | number;
18
- /** Directory path for components. */
18
+ /**
19
+ * Directory path for components.
20
+ * By default the flyo components are located in `src/components/flyo`.
21
+ */
19
22
  componentsDir: string;
20
- /** Object containing component definitions. */
23
+ /**
24
+ * Object containing component definitions.
25
+ * The key is the component name defined in Flyo Interface, while the value is the name of the component inside the components directory.
26
+ * ```json
27
+ * components: {
28
+ * FlyoComponentName: "FlyoComponentName",
29
+ * AnotherFlyoComponent "subfolder/AnotherFlyoComponent",
30
+ * }
31
+ * ```
32
+ * > The suffix .astro is not required.
33
+ * > Adding new elements to components section, requires restarting the development server.
34
+ */
21
35
  components: object;
22
36
  /**
23
37
  * (Optional) Fallback component name.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flyo/nitro-astro",
3
- "version": "2.0.9",
3
+ "version": "2.0.10",
4
4
  "description": "Connecting Flyo Headless Content Hub into your Astro project.",
5
5
  "homepage": "https://dev.flyo.cloud/nitro",
6
6
  "keywords": [