@fedify/init 2.1.6 → 2.1.7

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/dist/deno.js CHANGED
@@ -1,4 +1,4 @@
1
1
  //#region deno.json
2
- var version = "2.1.6";
2
+ var version = "2.1.7";
3
3
  //#endregion
4
4
  export { version };
@@ -0,0 +1,10 @@
1
+ import bun from "@nurodev/astro-bun";
2
+ import { fedifyIntegration } from "@fedify/astro";
3
+ import { defineConfig } from "astro/config";
4
+
5
+ // https://astro.build/config
6
+ export default defineConfig({
7
+ integrations: [fedifyIntegration()],
8
+ output: "server",
9
+ adapter: bun(),
10
+ });
@@ -1,55 +1,61 @@
1
1
  import { PACKAGE_VERSION, readTemplate } from "../lib.js";
2
2
  import { PACKAGE_MANAGER } from "../const.js";
3
3
  import { defaultDenoDependencies, defaultDevDependencies } from "./const.js";
4
- import { getInstruction } from "./utils.js";
4
+ import { getInstruction, packageManagerToRuntime } from "./utils.js";
5
5
  //#region src/webframeworks/astro.ts
6
6
  const astroDescription = {
7
7
  label: "Astro",
8
8
  packageManagers: PACKAGE_MANAGER,
9
9
  defaultPort: 4321,
10
- init: async ({ packageManager: pm }) => ({
11
- command: Array.from(getAstroInitCommand(pm)),
12
- dependencies: pm === "deno" ? {
13
- ...defaultDenoDependencies,
14
- "@deno/astro-adapter": "npm:@deno/astro-adapter@^0.3.2",
15
- "@fedify/astro": PACKAGE_VERSION
16
- } : {
17
- "@astrojs/node": "^9.5.4",
18
- "@fedify/astro": PACKAGE_VERSION
19
- },
20
- devDependencies: {
21
- ...defaultDevDependencies,
22
- ...pm !== "deno" ? {
23
- typescript: "^5.9.3",
24
- "@types/node": "^22.17.0"
25
- } : {}
26
- },
27
- federationFile: "src/federation.ts",
28
- loggingFile: "src/logging.ts",
29
- files: {
30
- [`astro.config.ts`]: await readTemplate(`astro/astro.config.${pm === "deno" ? "deno" : "node"}.ts`),
31
- "src/middleware.ts": await readTemplate("astro/src/middleware.ts"),
32
- ...pm !== "deno" ? { "eslint.config.ts": await readTemplate("defaults/eslint.config.ts") } : {}
33
- },
34
- compilerOptions: void 0,
35
- tasks: {
36
- ...pm === "deno" ? {
37
- dev: "deno run -A npm:astro dev",
38
- build: "deno run -A npm:astro build",
39
- preview: "deno run -A npm:astro preview"
10
+ init: async ({ packageManager: pm }) => {
11
+ const runtime = packageManagerToRuntime(pm);
12
+ return {
13
+ command: Array.from(getAstroInitCommand(pm)),
14
+ dependencies: pm === "deno" ? {
15
+ ...defaultDenoDependencies,
16
+ "@deno/astro-adapter": "npm:@deno/astro-adapter@^0.3.2",
17
+ "@fedify/astro": PACKAGE_VERSION
40
18
  } : pm === "bun" ? {
41
- dev: "bunx astro dev",
42
- build: "bunx astro build",
43
- preview: "bunx astro preview"
19
+ "@fedify/astro": PACKAGE_VERSION,
20
+ "@nurodev/astro-bun": "^2.1.2"
44
21
  } : {
45
- dev: "astro dev",
46
- build: "astro build",
47
- preview: "astro preview"
22
+ "@astrojs/node": "^9.5.4",
23
+ "@fedify/astro": PACKAGE_VERSION
48
24
  },
49
- ...pm !== "deno" ? { lint: "eslint ." } : {}
50
- },
51
- instruction: getInstruction(pm, 4321)
52
- })
25
+ devDependencies: {
26
+ ...defaultDevDependencies,
27
+ ...pm !== "deno" ? {
28
+ typescript: "^5.9.3",
29
+ "@types/node": "^22.17.0"
30
+ } : {}
31
+ },
32
+ federationFile: "src/federation.ts",
33
+ loggingFile: "src/logging.ts",
34
+ files: {
35
+ [`astro.config.ts`]: await readTemplate(`astro/astro.config.${runtime}.ts`),
36
+ "src/middleware.ts": await readTemplate("astro/src/middleware.ts"),
37
+ ...pm !== "deno" ? { "eslint.config.ts": await readTemplate("defaults/eslint.config.ts") } : {}
38
+ },
39
+ compilerOptions: void 0,
40
+ tasks: {
41
+ ...pm === "deno" ? {
42
+ dev: "deno run -A npm:astro dev",
43
+ build: "deno run -A npm:astro build",
44
+ preview: "deno run -A npm:astro preview"
45
+ } : pm === "bun" ? {
46
+ dev: "bunx astro dev",
47
+ build: "bunx astro build",
48
+ preview: "bun ./dist/server/entry.mjs"
49
+ } : {
50
+ dev: "astro dev",
51
+ build: "astro build",
52
+ preview: "astro preview"
53
+ },
54
+ ...pm !== "deno" ? { lint: "eslint ." } : {}
55
+ },
56
+ instruction: getInstruction(pm, 4321)
57
+ };
58
+ }
53
59
  };
54
60
  /**
55
61
  * Returns the shell command array to scaffold a new Astro project
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fedify/init",
3
- "version": "2.1.6",
3
+ "version": "2.1.7",
4
4
  "description": "Project initializer for Fedify",
5
5
  "keywords": [
6
6
  "fedify",