fimo-astro 0.21.0-experimental.1
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.
- package/README.md +26 -0
- package/dist/config.d.ts +11 -0
- package/dist/config.js +32 -0
- package/package.json +46 -0
package/README.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# fimo-astro
|
|
2
|
+
|
|
3
|
+
Fimo hosting integration for Astro projects. Install it next to `fimo` at the
|
|
4
|
+
same version:
|
|
5
|
+
|
|
6
|
+
```bash
|
|
7
|
+
npm install fimo fimo-astro
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
```js
|
|
11
|
+
// astro.config.mjs
|
|
12
|
+
import { defineConfig } from 'astro/config';
|
|
13
|
+
import { fimo } from 'fimo-astro/config';
|
|
14
|
+
|
|
15
|
+
export default defineConfig({
|
|
16
|
+
integrations: [fimo()],
|
|
17
|
+
output: 'server',
|
|
18
|
+
});
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
The runtime SDK (`fimo/astro`, `fimo/astro/components`) stays in the `fimo`
|
|
22
|
+
package. This package only owns the hosting provider adapter so projects on
|
|
23
|
+
other frameworks never install it. Static Astro sites that host elsewhere can
|
|
24
|
+
keep using `fimo/astro/config` for preview and branch env wiring alone.
|
|
25
|
+
|
|
26
|
+
Docs: https://fimo.ai/docs/cli/frameworks/astro
|
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { AstroIntegration } from 'astro';
|
|
2
|
+
/**
|
|
3
|
+
* Connect an Astro app to Fimo preview and hosted server rendering:
|
|
4
|
+
* `integrations: [fimo()]`.
|
|
5
|
+
*
|
|
6
|
+
* The provider adapter lives here, outside `fimo`, so its Astro peer graph is
|
|
7
|
+
* only installed by Astro projects (FIMO-1635). Everything provider-neutral
|
|
8
|
+
* (preview connector, branch env) comes from `fimo/astro/config`.
|
|
9
|
+
*/
|
|
10
|
+
export declare function fimo(): AstroIntegration;
|
|
11
|
+
//# sourceMappingURL=config.d.ts.map
|
package/dist/config.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';
|
|
2
|
+
import astroHostingAdapter from '@astrojs/vercel';
|
|
3
|
+
import { fimo as fimoAstro } from 'fimo/astro/config';
|
|
4
|
+
const require = createRequire(import.meta.url);
|
|
5
|
+
const astroHostingEntrypoint = require.resolve('@astrojs/vercel/entrypoint');
|
|
6
|
+
function createFimoHostingAdapter() {
|
|
7
|
+
const adapter = astroHostingAdapter();
|
|
8
|
+
const configDone = adapter.hooks['astro:config:done'];
|
|
9
|
+
if (configDone) {
|
|
10
|
+
adapter.hooks['astro:config:done'] = (options) => {
|
|
11
|
+
configDone({
|
|
12
|
+
...options,
|
|
13
|
+
setAdapter: (resolvedAdapter) => options.setAdapter({
|
|
14
|
+
...resolvedAdapter,
|
|
15
|
+
serverEntrypoint: astroHostingEntrypoint,
|
|
16
|
+
}),
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
return adapter;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Connect an Astro app to Fimo preview and hosted server rendering:
|
|
24
|
+
* `integrations: [fimo()]`.
|
|
25
|
+
*
|
|
26
|
+
* The provider adapter lives here, outside `fimo`, so its Astro peer graph is
|
|
27
|
+
* only installed by Astro projects (FIMO-1635). Everything provider-neutral
|
|
28
|
+
* (preview connector, branch env) comes from `fimo/astro/config`.
|
|
29
|
+
*/
|
|
30
|
+
export function fimo() {
|
|
31
|
+
return fimoAstro({ hostingAdapter: createFimoHostingAdapter() });
|
|
32
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "fimo-astro",
|
|
3
|
+
"version": "0.21.0-experimental.1",
|
|
4
|
+
"description": "Fimo hosting integration for Astro projects. Pairs with the fimo package at the same version.",
|
|
5
|
+
"files": [
|
|
6
|
+
"dist/",
|
|
7
|
+
"!dist/**/*.d.ts.map",
|
|
8
|
+
"README.md"
|
|
9
|
+
],
|
|
10
|
+
"type": "module",
|
|
11
|
+
"sideEffects": false,
|
|
12
|
+
"exports": {
|
|
13
|
+
"./package.json": "./package.json",
|
|
14
|
+
"./config": {
|
|
15
|
+
"types": "./dist/config.d.ts",
|
|
16
|
+
"import": "./dist/config.js"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"publishConfig": {
|
|
20
|
+
"access": "public"
|
|
21
|
+
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "tsc -b tsconfig.json",
|
|
24
|
+
"check:types": "tsc -b tsconfig.json --noEmit",
|
|
25
|
+
"clean": "rm -rf dist tsconfig.tsbuildinfo",
|
|
26
|
+
"test": "vitest run",
|
|
27
|
+
"test:watch": "vitest"
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@astrojs/vercel": "11.0.4"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@fimo/tsconfig": "0.21.0-experimental.1",
|
|
34
|
+
"@types/node": "^22.15.29",
|
|
35
|
+
"fimo": "0.21.0-experimental.1",
|
|
36
|
+
"typescript": "7.0.2",
|
|
37
|
+
"vitest": "^4.1.6"
|
|
38
|
+
},
|
|
39
|
+
"peerDependencies": {
|
|
40
|
+
"astro": "^7.0.0",
|
|
41
|
+
"fimo": ">=0.14.0"
|
|
42
|
+
},
|
|
43
|
+
"engines": {
|
|
44
|
+
"node": ">=20.12.0"
|
|
45
|
+
}
|
|
46
|
+
}
|