@fedify/init 2.0.0-dev.0 → 2.0.0-dev.372

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.
Files changed (63) hide show
  1. package/dist/action/{configs.mjs → configs.js} +6 -6
  2. package/dist/action/{deps.mjs → deps.js} +7 -5
  3. package/dist/action/{env.mjs → env.js} +2 -2
  4. package/dist/action/{install.mjs → install.js} +1 -1
  5. package/dist/action/{mod.d.mts → mod.d.ts} +2 -2
  6. package/dist/action/{mod.mjs → mod.js} +11 -11
  7. package/dist/action/{notice.mjs → notice.js} +1 -1
  8. package/dist/action/{patch.mjs → patch.js} +8 -7
  9. package/dist/action/{precommand.mjs → precommand.js} +1 -1
  10. package/dist/action/{recommend.mjs → recommend.js} +4 -4
  11. package/dist/action/{set.mjs → set.js} +3 -3
  12. package/dist/action/{templates.mjs → templates.js} +3 -3
  13. package/dist/ask/{dir.mjs → dir.js} +2 -2
  14. package/dist/ask/{kv.mjs → kv.js} +3 -3
  15. package/dist/ask/{mod.mjs → mod.js} +5 -5
  16. package/dist/ask/{mq.mjs → mq.js} +3 -3
  17. package/dist/ask/{pm.mjs → pm.js} +4 -4
  18. package/dist/ask/{wf.mjs → wf.js} +2 -2
  19. package/dist/{command.mjs → command.js} +2 -2
  20. package/dist/deno.js +38 -0
  21. package/dist/json/biome.js +18 -0
  22. package/dist/json/db-to-check.js +24 -0
  23. package/dist/json/kv.js +50 -0
  24. package/dist/json/mq.js +69 -0
  25. package/dist/json/pm.js +41 -0
  26. package/dist/json/rt.js +36 -0
  27. package/dist/json/vscode-settings-for-deno.js +50 -0
  28. package/dist/json/vscode-settings.js +46 -0
  29. package/dist/{lib.mjs → lib.js} +9 -8
  30. package/dist/mod.d.ts +3 -0
  31. package/dist/mod.js +4 -0
  32. package/dist/test/{action.mjs → action.js} +5 -5
  33. package/dist/test/{create.mjs → create.js} +14 -10
  34. package/dist/test/db.js +52 -0
  35. package/dist/test/{fill.mjs → fill.js} +1 -1
  36. package/dist/test/{lookup.mjs → lookup.js} +12 -8
  37. package/dist/test/{mod.mjs → mod.js} +6 -6
  38. package/dist/test/{run.mjs → run.js} +4 -4
  39. package/dist/test/{utils.mjs → utils.js} +1 -1
  40. package/dist/{types.d.mts → types.d.ts} +3 -3
  41. package/dist/{utils.mjs → utils.js} +2 -2
  42. package/dist/{webframeworks.mjs → webframeworks.js} +3 -3
  43. package/package.json +9 -4
  44. package/dist/deno.mjs +0 -5
  45. package/dist/json/biome.mjs +0 -14
  46. package/dist/json/db-to-check.mjs +0 -21
  47. package/dist/json/kv.mjs +0 -47
  48. package/dist/json/mq.mjs +0 -65
  49. package/dist/json/pm.mjs +0 -36
  50. package/dist/json/rt.mjs +0 -31
  51. package/dist/json/vscode-settings-for-deno.mjs +0 -39
  52. package/dist/json/vscode-settings.mjs +0 -37
  53. package/dist/mod.d.mts +0 -3
  54. package/dist/mod.mjs +0 -4
  55. package/dist/test/db.mjs +0 -42
  56. /package/dist/action/{const.mjs → const.js} +0 -0
  57. /package/dist/action/{dir.mjs → dir.js} +0 -0
  58. /package/dist/action/{utils.mjs → utils.js} +0 -0
  59. /package/dist/{command.d.mts → command.d.ts} +0 -0
  60. /package/dist/{const.d.mts → const.d.ts} +0 -0
  61. /package/dist/{const.mjs → const.js} +0 -0
  62. /package/dist/test/{mod.d.mts → mod.d.ts} +0 -0
  63. /package/dist/{utils.d.mts → utils.d.ts} +0 -0
@@ -1,9 +1,9 @@
1
- import { isNotFoundError, runSubCommand } from "./utils.mjs";
2
- import { version } from "./deno.mjs";
3
- import kv_default from "./json/kv.mjs";
4
- import mq_default from "./json/mq.mjs";
5
- import pm_default from "./json/pm.mjs";
6
- import rt_default from "./json/rt.mjs";
1
+ import { isNotFoundError, runSubCommand } from "./utils.js";
2
+ import deno_default from "./deno.js";
3
+ import kv_default from "./json/kv.js";
4
+ import mq_default from "./json/mq.js";
5
+ import pm_default from "./json/pm.js";
6
+ import rt_default from "./json/rt.js";
7
7
  import { entries, evolve, fromEntries, isObject, map, negate, pipe, throwIf } from "@fxts/core";
8
8
  import process from "node:process";
9
9
  import { commandLine, message } from "@optique/core/message";
@@ -14,7 +14,7 @@ import { mkdir, readdir, writeFile } from "node:fs/promises";
14
14
  import { dirname, join as join$1 } from "node:path";
15
15
 
16
16
  //#region src/lib.ts
17
- const PACKAGE_VERSION = version;
17
+ const PACKAGE_VERSION = deno_default.version;
18
18
  const logger = getLogger([
19
19
  "fedify",
20
20
  "cli",
@@ -79,7 +79,8 @@ const isNotExistsError = (e) => isObject(e) && "code" in e && e.code === "ENOENT
79
79
  const throwUnlessNotExists = throwIf(negate(isNotExistsError));
80
80
  const isDirectoryEmpty = async (path) => {
81
81
  try {
82
- return (await readdir(path)).length === 0;
82
+ const files = await readdir(path);
83
+ return files.length === 0;
83
84
  } catch (e) {
84
85
  throwUnlessNotExists(e);
85
86
  return true;
package/dist/mod.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import { initCommand, initOptions } from "./command.js";
2
+ import { runInit } from "./action/mod.js";
3
+ export { initCommand, initOptions, runInit };
package/dist/mod.js ADDED
@@ -0,0 +1,4 @@
1
+ import action_default from "./action/mod.js";
2
+ import { initCommand, initOptions } from "./command.js";
3
+
4
+ export { initCommand, initOptions, action_default as runInit };
@@ -1,8 +1,8 @@
1
- import { set } from "../utils.mjs";
2
- import { checkRequiredDbs } from "./db.mjs";
3
- import { fillEmptyOptions } from "./fill.mjs";
4
- import run_default from "./run.mjs";
5
- import { emptyTestDir, genRunId, genTestDirPrefix, logTestDir } from "./utils.mjs";
1
+ import { set } from "../utils.js";
2
+ import { checkRequiredDbs } from "./db.js";
3
+ import { fillEmptyOptions } from "./fill.js";
4
+ import run_default from "./run.js";
5
+ import { emptyTestDir, genRunId, genTestDirPrefix, logTestDir } from "./utils.js";
6
6
  import { pipe, tap, when } from "@fxts/core";
7
7
 
8
8
  //#region src/test/action.ts
@@ -1,7 +1,7 @@
1
- import { CommandError, printErrorMessage, printMessage, product, runSubCommand } from "../utils.mjs";
2
- import pm_default from "../json/pm.mjs";
3
- import { kvStores, messageQueues } from "../lib.mjs";
4
- import webframeworks_default from "../webframeworks.mjs";
1
+ import { CommandError, printErrorMessage, printMessage, product, runSubCommand } from "../utils.js";
2
+ import pm_default from "../json/pm.js";
3
+ import { kvStores, messageQueues } from "../lib.js";
4
+ import webframeworks_default from "../webframeworks.js";
5
5
  import { filter, isEmpty, pipe, toArray } from "@fxts/core";
6
6
  import process from "node:process";
7
7
  import { values } from "@optique/core";
@@ -14,14 +14,15 @@ const createTestApp = (testDirPrefix, dry) => async (options) => {
14
14
  const testDir = join$1(testDirPrefix, ...options);
15
15
  const vals = values(testDir.split(sep).slice(-4));
16
16
  try {
17
- await saveOutputs(testDir, await runSubCommand(toArray(genInitCommand(testDir, dry, options)), {
17
+ const result = await runSubCommand(toArray(genInitCommand(testDir, dry, options)), {
18
18
  cwd: join$1(import.meta.dirname, "../.."),
19
19
  stdio: [
20
20
  "ignore",
21
21
  "pipe",
22
22
  "pipe"
23
23
  ]
24
- }));
24
+ });
25
+ await saveOutputs(testDir, result);
25
26
  printMessage` Pass: ${vals}`;
26
27
  return testDir;
27
28
  } catch (error) {
@@ -29,10 +30,13 @@ const createTestApp = (testDirPrefix, dry) => async (options) => {
29
30
  stdout: error.stdout,
30
31
  stderr: error.stderr
31
32
  });
32
- else await saveOutputs(testDir, {
33
- stdout: "",
34
- stderr: error instanceof Error ? error.message : String(error)
35
- });
33
+ else {
34
+ const errorMessage = error instanceof Error ? error.message : String(error);
35
+ await saveOutputs(testDir, {
36
+ stdout: "",
37
+ stderr: errorMessage
38
+ });
39
+ }
36
40
  printMessage` Fail: ${vals}`;
37
41
  return "";
38
42
  }
@@ -0,0 +1,52 @@
1
+ import { printErrorMessage, printMessage } from "../utils.js";
2
+ import { DB_TO_CHECK } from "../const.js";
3
+ import db_to_check_default from "../json/db-to-check.js";
4
+ import { concat, filter, pipe, toArray, uniq } from "@fxts/core";
5
+ import { createConnection } from "node:net";
6
+
7
+ //#region src/test/db.ts
8
+ /**
9
+ * Checks if a given port is open by attempting a raw TCP connection to
10
+ * localhost at that port. This works reliably for non-HTTP services like
11
+ * Redis, PostgreSQL, or AMQP.
12
+ * @param port The port number to check.
13
+ * @param timeout The timeout in milliseconds. Defaults to 3000.
14
+ * @returns A promise that resolves to true if the port is open, else false.
15
+ */
16
+ function isPortOpen(port, timeout = 3e3) {
17
+ return new Promise((resolve) => {
18
+ const socket = createConnection({
19
+ port,
20
+ host: "localhost"
21
+ });
22
+ socket.setTimeout(timeout);
23
+ socket.once("connect", () => {
24
+ socket.destroy();
25
+ resolve(true);
26
+ });
27
+ socket.once("timeout", () => {
28
+ socket.destroy();
29
+ resolve(false);
30
+ });
31
+ socket.once("error", () => {
32
+ socket.destroy();
33
+ resolve(false);
34
+ });
35
+ });
36
+ }
37
+ const getRequiredDbs = ({ kvStore, messageQueue }) => pipe(kvStore, concat(messageQueue), uniq, filter((db) => DB_TO_CHECK.includes(db)), toArray);
38
+ async function checkRequiredDbs(options) {
39
+ const dbs = Array.from(getRequiredDbs(options));
40
+ if (dbs.length === 0) return;
41
+ printMessage`Checking required databases...`;
42
+ for (const db of dbs) {
43
+ const info = db_to_check_default[db];
44
+ const port = String(info.defaultPort);
45
+ const running = await isPortOpen(info.defaultPort);
46
+ if (running) printMessage` ${info.name} is running on port ${port}.`;
47
+ else printErrorMessage`${info.name} is not running on port ${port}. Tests requiring ${info.name} may fail. Install: ${info.documentation}`;
48
+ }
49
+ }
50
+
51
+ //#endregion
52
+ export { checkRequiredDbs };
@@ -1,4 +1,4 @@
1
- import { KV_STORE, MESSAGE_QUEUE, PACKAGE_MANAGER, WEB_FRAMEWORK } from "../const.mjs";
1
+ import { KV_STORE, MESSAGE_QUEUE, PACKAGE_MANAGER, WEB_FRAMEWORK } from "../const.js";
2
2
  import { isEmpty, omit, pipe } from "@fxts/core";
3
3
 
4
4
  //#region src/test/fill.ts
@@ -1,6 +1,6 @@
1
- import { printErrorMessage, printMessage, runSubCommand } from "../utils.mjs";
2
- import { getDevCommand } from "../lib.mjs";
3
- import webframeworks_default from "../webframeworks.mjs";
1
+ import { printErrorMessage, printMessage, runSubCommand } from "../utils.js";
2
+ import { getDevCommand } from "../lib.js";
3
+ import webframeworks_default from "../webframeworks.js";
4
4
  import process from "node:process";
5
5
  import { values } from "@optique/core";
6
6
  import { spawn } from "node:child_process";
@@ -38,7 +38,8 @@ function filterWebFrameworks(dirs) {
38
38
  const wfs = new Set(dirs.map((dir) => dir.split(sep).slice(-4, -3)[0]));
39
39
  const hasBanned = BANNED_WFS.filter((wf) => wfs.has(wf));
40
40
  if (isEmpty(hasBanned)) return dirs;
41
- printErrorMessage`\n${values(hasBanned.map((wf) => webframeworks_default[wf]["label"]))} is not supported in lookup test yet.`;
41
+ const bannedLabels = hasBanned.map((wf) => webframeworks_default[wf]["label"]);
42
+ printErrorMessage`\n${values(bannedLabels)} is not supported in lookup test yet.`;
42
43
  return dirs.filter((dir) => !BANNED_WFS.includes(dir.split(sep).slice(-4, -3)[0]));
43
44
  }
44
45
  /**
@@ -69,7 +70,8 @@ const sendLookup = async (port) => {
69
70
  const serverUrl = `http://localhost:${port}`;
70
71
  const lookupTarget = `${serverUrl}/users/${HANDLE}`;
71
72
  printMessage` Waiting for server to start at ${serverUrl}...`;
72
- if (!await waitForServer(serverUrl, STARTUP_TIMEOUT)) {
73
+ const isReady = await waitForServer(serverUrl, STARTUP_TIMEOUT);
74
+ if (!isReady) {
73
75
  printErrorMessage`Server did not start within \
74
76
  ${String(STARTUP_TIMEOUT)}ms`;
75
77
  return false;
@@ -96,7 +98,8 @@ async function waitForServer(url, timeout) {
96
98
  const startTime = Date.now();
97
99
  while (Date.now() - startTime < timeout) {
98
100
  try {
99
- if ((await fetch(url, { signal: AbortSignal.timeout(1e3) })).ok) return true;
101
+ const response = await fetch(url, { signal: AbortSignal.timeout(1e3) });
102
+ if (response.ok) return true;
100
103
  } catch {}
101
104
  await new Promise((resolve) => setTimeout(resolve, 500));
102
105
  }
@@ -118,7 +121,8 @@ async function serverClosure(dir, cmd, callback) {
118
121
  serverProcess.stdout?.pipe(stdout);
119
122
  serverProcess.stderr?.pipe(stderr);
120
123
  try {
121
- return await callback(await determinePort(serverProcess));
124
+ const port = await determinePort(serverProcess);
125
+ return await callback(port);
122
126
  } finally {
123
127
  try {
124
128
  process.kill(-serverProcess.pid, "SIGKILL");
@@ -180,4 +184,4 @@ function determinePort(server) {
180
184
  }
181
185
 
182
186
  //#endregion
183
- export { runServerAndLookupUser as default };
187
+ export { runServerAndLookupUser };
@@ -1,16 +1,16 @@
1
- import { testInitCommand } from "../command.mjs";
2
- import action_default from "./action.mjs";
1
+ import { testInitCommand } from "../command.js";
2
+ import action_default from "./action.js";
3
3
  import { run } from "@optique/run";
4
4
 
5
5
  //#region src/test/mod.ts
6
6
  async function main() {
7
7
  console.log("Running test-init command...");
8
- await action_default(run(testInitCommand, {
8
+ const result = run(testInitCommand, {
9
9
  programName: "fedify-test-init",
10
10
  help: "both"
11
- }));
11
+ });
12
+ await action_default(result);
12
13
  }
13
14
  await main();
14
15
 
15
- //#endregion
16
- export { };
16
+ //#endregion
@@ -1,12 +1,12 @@
1
- import { printMessage } from "../utils.mjs";
2
- import create_default, { filterOptions, generateTestCases } from "./create.mjs";
3
- import runServerAndLookupUser from "./lookup.mjs";
1
+ import { printMessage } from "../utils.js";
2
+ import create_default, { filterOptions, generateTestCases } from "./create.js";
3
+ import { runServerAndLookupUser } from "./lookup.js";
4
4
  import { always, filter, map, pipe, tap, unless } from "@fxts/core";
5
5
  import { optionNames } from "@optique/core";
6
6
  import { join as join$1 } from "node:path";
7
7
 
8
8
  //#region src/test/run.ts
9
- const runTests = (dry) => ({ testDirPrefix, dryRun, hydRun, ...options }) => pipe(options, printStartMessage(dry), generateTestCases, filter(filterOptions), map(create_default(join$1(testDirPrefix, getMid(dryRun, hydRun, dry)), dry)), Array.fromAsync, unless(always(dry), runServerAndLookupUser));
9
+ const runTests = (dry) => ({ testDirPrefix, dryRun, hydRun,...options }) => pipe(options, printStartMessage(dry), generateTestCases, filter(filterOptions), map(create_default(join$1(testDirPrefix, getMid(dryRun, hydRun, dry)), dry)), Array.fromAsync, unless(always(dry), runServerAndLookupUser));
10
10
  var run_default = runTests;
11
11
  const printStartMessage = (dry) => tap(() => printMessage`\n
12
12
  Init ${dry ? "Dry" : "Hyd"} Test start!
@@ -1,4 +1,4 @@
1
- import { printMessage } from "../utils.mjs";
1
+ import { printMessage } from "../utils.js";
2
2
  import { rm } from "node:fs/promises";
3
3
  import { join } from "node:path";
4
4
  import { tmpdir } from "node:os";
@@ -1,6 +1,6 @@
1
- import { InitCommand } from "./command.mjs";
2
- import { PACKAGE_MANAGER } from "./const.mjs";
3
- import { RequiredNotNull } from "./utils.mjs";
1
+ import { InitCommand } from "./command.js";
2
+ import { PACKAGE_MANAGER } from "./const.js";
3
+ import { RequiredNotNull } from "./utils.js";
4
4
  import { Message } from "@optique/core";
5
5
 
6
6
  //#region src/types.d.ts
@@ -11,7 +11,7 @@ const colorEnabled = process.stdout.isTTY && !("NO_COLOR" in process.env && proc
11
11
  const colors = new Chalk(colorEnabled ? {} : { level: 0 });
12
12
  const isPromise = (value) => value instanceof Promise;
13
13
  function set(key, f) {
14
- return ((obj) => {
14
+ return (obj) => {
15
15
  const result = f(obj);
16
16
  if (isPromise(result)) return result.then((value) => ({
17
17
  ...obj,
@@ -21,7 +21,7 @@ function set(key, f) {
21
21
  ...obj,
22
22
  [key]: result
23
23
  };
24
- });
24
+ };
25
25
  }
26
26
  const merge$1 = (source = {}) => (target = {}) => toMerged(target, source);
27
27
  const replace = (pattern, replacement) => (text$1) => text$1.replace(pattern, replacement);
@@ -1,6 +1,6 @@
1
- import { replace } from "./utils.mjs";
2
- import { PACKAGE_VERSION, getInstruction, getNextInitCommand, getNitroInitCommand, packageManagerToRuntime, readTemplate } from "./lib.mjs";
3
- import { PACKAGE_MANAGER } from "./const.mjs";
1
+ import { replace } from "./utils.js";
2
+ import { PACKAGE_VERSION, getInstruction, getNextInitCommand, getNitroInitCommand, packageManagerToRuntime, readTemplate } from "./lib.js";
3
+ import { PACKAGE_MANAGER } from "./const.js";
4
4
  import { pipe } from "@fxts/core";
5
5
 
6
6
  //#region src/webframeworks.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fedify/init",
3
- "version": "2.0.0-dev.0",
3
+ "version": "2.0.0-dev.372+33936bb9",
4
4
  "description": "Project initializer for Fedify",
5
5
  "keywords": [
6
6
  "fedify",
@@ -14,9 +14,9 @@
14
14
  },
15
15
  "license": "MIT",
16
16
  "author": {
17
- "name": "Hong Minhee",
18
- "email": "hong@minhee.org",
19
- "url": "https://hongminhee.org/"
17
+ "name": "ChanHaeng Lee",
18
+ "email": "2chanhaeng@gmail.com",
19
+ "url": "https://chomu.dev/"
20
20
  },
21
21
  "funding": [
22
22
  "https://opencollective.com/fedify",
@@ -27,6 +27,11 @@
27
27
  "url": "git+https://github.com/fedify-dev/fedify.git",
28
28
  "directory": "packages/init"
29
29
  },
30
+ "engines": {
31
+ "node": ">=20.0.0",
32
+ "bun": ">=1.2.0",
33
+ "denp": ">=2.0.0"
34
+ },
30
35
  "type": "module",
31
36
  "main": "./dist/mod.js",
32
37
  "types": "./dist/mod.d.ts",
package/dist/deno.mjs DELETED
@@ -1,5 +0,0 @@
1
- //#region deno.json
2
- var version = "2.0.0";
3
-
4
- //#endregion
5
- export { version };
@@ -1,14 +0,0 @@
1
- //#region src/json/biome.json
2
- var biome_default = {
3
- $schema: "https://biomejs.dev/schemas/1.8.3/schema.json",
4
- organizeImports: { "enabled": true },
5
- formatter: {
6
- "enabled": true,
7
- "indentStyle": "space",
8
- "indentWidth": 2
9
- },
10
- linter: { "enabled": false }
11
- };
12
-
13
- //#endregion
14
- export { biome_default as default };
@@ -1,21 +0,0 @@
1
- //#region src/json/db-to-check.json
2
- var db_to_check_default = {
3
- redis: {
4
- "name": "Redis",
5
- "defaultPort": 6379,
6
- "documentation": "https://redis.io/docs/latest/operate/oss_and_stack/install/archive/install-redis/"
7
- },
8
- postgres: {
9
- "name": "PostgreSQL",
10
- "defaultPort": 5432,
11
- "documentation": "https://www.postgresql.org/download/"
12
- },
13
- amqp: {
14
- "name": "RabbitMQ",
15
- "defaultPort": 5672,
16
- "documentation": "https://www.rabbitmq.com/docs/download"
17
- }
18
- };
19
-
20
- //#endregion
21
- export { db_to_check_default as default };
package/dist/json/kv.mjs DELETED
@@ -1,47 +0,0 @@
1
- //#region src/json/kv.json
2
- var kv_default = {
3
- redis: {
4
- "label": "Redis",
5
- "packageManagers": [
6
- "deno",
7
- "bun",
8
- "npm",
9
- "yarn",
10
- "pnpm"
11
- ],
12
- "dependencies": { "npm:ioredis": "^5.4.1" },
13
- "imports": {
14
- "@fedify/redis": { "RedisKvStore": "RedisKvStore" },
15
- "ioredis": { "Redis": "Redis" }
16
- },
17
- "object": "new RedisKvStore(new Redis(process.env.REDIS_URL))",
18
- "env": { "REDIS_URL": "redis://localhost:6379" }
19
- },
20
- postgres: {
21
- "label": "PostgreSQL",
22
- "packageManagers": [
23
- "deno",
24
- "bun",
25
- "npm",
26
- "yarn",
27
- "pnpm"
28
- ],
29
- "dependencies": { "npm:postgres": "^3.4.5" },
30
- "imports": {
31
- "@fedify/postgres": { "PostgresKvStore": "PostgresKvStore" },
32
- "postgres": { "default": "postgres" }
33
- },
34
- "object": "new PostgresKvStore(postgres(process.env.POSTGRES_URL))",
35
- "env": { "POSTGRES_URL": "postgres://postgres@localhost:5432/postgres" }
36
- },
37
- denokv: {
38
- "label": "Deno KV",
39
- "packageManagers": ["deno"],
40
- "imports": { "@fedify/denokv": { "DenoKvStore": "DenoKvStore" } },
41
- "object": "new DenoKvStore(await Deno.openKv())",
42
- "denoUnstable": ["kv"]
43
- }
44
- };
45
-
46
- //#endregion
47
- export { kv_default as default };
package/dist/json/mq.mjs DELETED
@@ -1,65 +0,0 @@
1
- //#region src/json/mq.json
2
- var mq_default = {
3
- redis: {
4
- "label": "Redis",
5
- "packageManagers": [
6
- "deno",
7
- "bun",
8
- "npm",
9
- "yarn",
10
- "pnpm"
11
- ],
12
- "dependencies": { "npm:ioredis": "^5.4.1" },
13
- "imports": {
14
- "@fedify/redis": { "RedisMessageQueue": "RedisMessageQueue" },
15
- "ioredis": { "Redis": "Redis" }
16
- },
17
- "object": "new RedisMessageQueue(() => new Redis(process.env.REDIS_URL))",
18
- "env": { "REDIS_URL": "redis://localhost:6379" }
19
- },
20
- postgres: {
21
- "label": "PostgreSQL",
22
- "packageManagers": [
23
- "deno",
24
- "bun",
25
- "npm",
26
- "yarn",
27
- "pnpm"
28
- ],
29
- "dependencies": { "npm:postgres": "^3.4.5" },
30
- "imports": {
31
- "@fedify/postgres": { "PostgresMessageQueue": "PostgresMessageQueue" },
32
- "postgres": { "default": "postgres" }
33
- },
34
- "object": "new PostgresMessageQueue(postgres(process.env.POSTGRES_URL))",
35
- "env": { "POSTGRES_URL": "postgres://postgres@localhost:5432/postgres" }
36
- },
37
- amqp: {
38
- "label": "AMQP (e.g., RabbitMQ)",
39
- "packageManagers": [
40
- "deno",
41
- "bun",
42
- "npm",
43
- "yarn",
44
- "pnpm"
45
- ],
46
- "dependencies": { "npm:amqplib": "^0.10.4" },
47
- "devDependencies": { "npm:@types/amqplib": "^0.10.5" },
48
- "imports": {
49
- "@fedify/amqp": { "AmqpMessageQueue": "AmqpMessageQueue" },
50
- "amqplib": { "connect": "connect" }
51
- },
52
- "object": "new AmqpMessageQueue(await connect(process.env.AMQP_URL))",
53
- "env": { "AMQP_URL": "amqp://localhost" }
54
- },
55
- denokv: {
56
- "label": "Deno KV",
57
- "packageManagers": ["deno"],
58
- "imports": { "@fedify/denokv": { "DenoKvMessageQueue": "DenoKvMessageQueue" } },
59
- "object": "new DenoKvMessageQueue(await Deno.openKv())",
60
- "denoUnstable": ["kv"]
61
- }
62
- };
63
-
64
- //#endregion
65
- export { mq_default as default };
package/dist/json/pm.mjs DELETED
@@ -1,36 +0,0 @@
1
- //#region src/json/pm.json
2
- var pm_default = {
3
- deno: {
4
- "label": "deno",
5
- "checkCommand": ["deno", "--version"],
6
- "outputPattern": "^deno\\s+\\d+\\.\\d+\\.\\d+\\b",
7
- "installUrl": "https://docs.deno.com/runtime/getting_started/installation"
8
- },
9
- bun: {
10
- "label": "bun",
11
- "checkCommand": ["bun", "--version"],
12
- "outputPattern": "^\\d+\\.\\d+\\.\\d+$",
13
- "installUrl": "https://bun.sh/docs/installation"
14
- },
15
- npm: {
16
- "label": "npm",
17
- "checkCommand": ["npm", "--version"],
18
- "outputPattern": "^\\d+\\.\\d+\\.\\d+$",
19
- "installUrl": "https://docs.npmjs.com/downloading-and-installing-node-js-and-npm"
20
- },
21
- yarn: {
22
- "label": "Yarn",
23
- "checkCommand": ["yarn", "--version"],
24
- "outputPattern": "^\\d+\\.\\d+\\.\\d+$",
25
- "installUrl": "https://classic.yarnpkg.com/en/docs/install/#windows-stable"
26
- },
27
- pnpm: {
28
- "label": "pnpm",
29
- "checkCommand": ["pnpm", "--version"],
30
- "outputPattern": "^\\d+\\.\\d+\\.\\d+$",
31
- "installUrl": "https://pnpm.io/installation"
32
- }
33
- };
34
-
35
- //#endregion
36
- export { pm_default as default };
package/dist/json/rt.mjs DELETED
@@ -1,31 +0,0 @@
1
- //#region src/json/rt.json
2
- var rt_default = {
3
- deno: {
4
- "label": "Deno",
5
- "checkCommand": ["deno", "--version"],
6
- "outputPattern": "^deno\\s+\\d+\\.\\d+\\.\\d+\\b"
7
- },
8
- bun: {
9
- "label": "Bun",
10
- "checkCommand": ["bun", "--version"],
11
- "outputPattern": "^\\d+\\.\\d+\\.\\d+$"
12
- },
13
- pnpm: {
14
- "label": "Node.js",
15
- "checkCommand": ["node", "--version"],
16
- "outputPattern": "^v\\d+\\.\\d+\\.\\d+$"
17
- },
18
- yarn: {
19
- "label": "Node.js",
20
- "checkCommand": ["node", "--version"],
21
- "outputPattern": "^v\\d+\\.\\d+\\.\\d+$"
22
- },
23
- npm: {
24
- "label": "Node.js",
25
- "checkCommand": ["node", "--version"],
26
- "outputPattern": "^v\\d+\\.\\d+\\.\\d+$"
27
- }
28
- };
29
-
30
- //#endregion
31
- export { rt_default as default };
@@ -1,39 +0,0 @@
1
- //#region src/json/vscode-settings-for-deno.json
2
- var vscode_settings_for_deno_default = {
3
- "deno.enable": true,
4
- "deno.unstable": true,
5
- "editor.detectIndentation": false,
6
- "editor.indentSize": 2,
7
- "editor.insertSpaces": true,
8
- "[javascript]": {
9
- "editor.defaultFormatter": "denoland.vscode-deno",
10
- "editor.formatOnSave": true,
11
- "editor.codeActionsOnSave": { "source.sortImports": "always" }
12
- },
13
- "[javascriptreact]": {
14
- "editor.defaultFormatter": "denoland.vscode-deno",
15
- "editor.formatOnSave": true,
16
- "editor.codeActionsOnSave": { "source.sortImports": "always" }
17
- },
18
- "[json]": {
19
- "editor.defaultFormatter": "vscode.json-language-features",
20
- "editor.formatOnSave": true
21
- },
22
- "[jsonc]": {
23
- "editor.defaultFormatter": "vscode.json-language-features",
24
- "editor.formatOnSave": true
25
- },
26
- "[typescript]": {
27
- "editor.defaultFormatter": "denoland.vscode-deno",
28
- "editor.formatOnSave": true,
29
- "editor.codeActionsOnSave": { "source.sortImports": "always" }
30
- },
31
- "[typescriptreact]": {
32
- "editor.defaultFormatter": "denoland.vscode-deno",
33
- "editor.formatOnSave": true,
34
- "editor.codeActionsOnSave": { "source.sortImports": "always" }
35
- }
36
- };
37
-
38
- //#endregion
39
- export { vscode_settings_for_deno_default as default };
@@ -1,37 +0,0 @@
1
- //#region src/json/vscode-settings.json
2
- var vscode_settings_default = {
3
- "editor.detectIndentation": false,
4
- "editor.indentSize": 2,
5
- "editor.insertSpaces": true,
6
- "[javascript]": {
7
- "editor.defaultFormatter": "biomejs.biome",
8
- "editor.formatOnSave": true,
9
- "editor.codeActionsOnSave": { "source.organizeImports.biome": "always" }
10
- },
11
- "[javascriptreact]": {
12
- "editor.defaultFormatter": "biomejs.biome",
13
- "editor.formatOnSave": true,
14
- "editor.codeActionsOnSave": { "source.organizeImports.biome": "always" }
15
- },
16
- "[json]": {
17
- "editor.defaultFormatter": "biomejs.biome",
18
- "editor.formatOnSave": true
19
- },
20
- "[jsonc]": {
21
- "editor.defaultFormatter": "biomejs.biome",
22
- "editor.formatOnSave": true
23
- },
24
- "[typescript]": {
25
- "editor.defaultFormatter": "biomejs.biome",
26
- "editor.formatOnSave": true,
27
- "editor.codeActionsOnSave": { "source.organizeImports.biome": "always" }
28
- },
29
- "[typescriptreact]": {
30
- "editor.defaultFormatter": "biomejs.biome",
31
- "editor.formatOnSave": true,
32
- "editor.codeActionsOnSave": { "source.organizeImports.biome": "always" }
33
- }
34
- };
35
-
36
- //#endregion
37
- export { vscode_settings_default as default };
package/dist/mod.d.mts DELETED
@@ -1,3 +0,0 @@
1
- import { initCommand, initOptions } from "./command.mjs";
2
- import { runInit } from "./action/mod.mjs";
3
- export { initCommand, initOptions, runInit };