@fedify/cli 2.0.0-pr.479.1922 → 2.0.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.
Files changed (160) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +3 -3
  3. package/dist/cache.js +17 -3
  4. package/dist/config.js +105 -0
  5. package/dist/deno.js +18 -8
  6. package/dist/generate-vocab/action.js +1 -1
  7. package/dist/imagerenderer.js +1 -1
  8. package/dist/inbox/rendercode.js +11 -21
  9. package/dist/inbox.js +162 -132
  10. package/dist/init/mod.js +3 -3
  11. package/dist/log.js +35 -1
  12. package/dist/lookup.js +55 -23
  13. package/dist/mod.js +95 -18
  14. package/dist/nodeinfo.js +39 -22
  15. package/dist/options.js +84 -0
  16. package/dist/relay.js +136 -0
  17. package/dist/tempserver.js +15 -8
  18. package/dist/tunnel.js +6 -10
  19. package/dist/utils.js +19 -108
  20. package/dist/webfinger/action.js +1 -1
  21. package/dist/webfinger/command.js +17 -9
  22. package/dist/webfinger/lib.js +3 -3
  23. package/package.json +50 -28
  24. package/deno.json +0 -71
  25. package/dist/globals.js +0 -49
  26. package/dist/init/action/configs.js +0 -91
  27. package/dist/init/action/const.js +0 -10
  28. package/dist/init/action/deps.js +0 -50
  29. package/dist/init/action/dir.js +0 -16
  30. package/dist/init/action/env.js +0 -13
  31. package/dist/init/action/install.js +0 -20
  32. package/dist/init/action/mod.js +0 -39
  33. package/dist/init/action/notice.js +0 -55
  34. package/dist/init/action/patch.js +0 -147
  35. package/dist/init/action/precommand.js +0 -28
  36. package/dist/init/action/recommend.js +0 -24
  37. package/dist/init/action/set.js +0 -31
  38. package/dist/init/action/templates.js +0 -58
  39. package/dist/init/action/utils.js +0 -50
  40. package/dist/init/ask/dir.js +0 -82
  41. package/dist/init/ask/kv.js +0 -44
  42. package/dist/init/ask/mod.js +0 -16
  43. package/dist/init/ask/mq.js +0 -46
  44. package/dist/init/ask/pm.js +0 -49
  45. package/dist/init/ask/wf.js +0 -29
  46. package/dist/init/command.js +0 -50
  47. package/dist/init/const.js +0 -31
  48. package/dist/init/json/biome.js +0 -24
  49. package/dist/init/json/kv.js +0 -53
  50. package/dist/init/json/mq.js +0 -72
  51. package/dist/init/json/pm.js +0 -44
  52. package/dist/init/json/rt.js +0 -39
  53. package/dist/init/json/vscode-settings-for-deno.js +0 -53
  54. package/dist/init/json/vscode-settings.js +0 -49
  55. package/dist/init/lib.js +0 -136
  56. package/dist/init/templates/defaults/federation.ts.tpl +0 -23
  57. package/dist/init/templates/defaults/logging.ts.tpl +0 -23
  58. package/dist/init/templates/express/app.ts.tpl +0 -16
  59. package/dist/init/templates/express/index.ts.tpl +0 -6
  60. package/dist/init/templates/hono/app.tsx.tpl +0 -14
  61. package/dist/init/templates/hono/index/bun.ts.tpl +0 -10
  62. package/dist/init/templates/hono/index/deno.ts.tpl +0 -13
  63. package/dist/init/templates/hono/index/node.ts.tpl +0 -14
  64. package/dist/init/templates/next/middleware.ts.tpl +0 -45
  65. package/dist/init/templates/nitro/.env.test.tpl +0 -1
  66. package/dist/init/templates/nitro/nitro.config.ts.tpl +0 -14
  67. package/dist/init/templates/nitro/server/error.ts.tpl +0 -3
  68. package/dist/init/templates/nitro/server/middleware/federation.ts.tpl +0 -8
  69. package/dist/init/test/action.js +0 -17
  70. package/dist/init/test/create.js +0 -100
  71. package/dist/init/test/fill.js +0 -32
  72. package/dist/init/test/lookup.js +0 -190
  73. package/dist/init/test/run.js +0 -25
  74. package/dist/init/test/utils.js +0 -17
  75. package/dist/init/webframeworks.js +0 -136
  76. package/scripts/pack.ts +0 -71
  77. package/src/cache.ts +0 -17
  78. package/src/docloader.ts +0 -67
  79. package/src/generate-vocab/action.ts +0 -17
  80. package/src/generate-vocab/command.ts +0 -44
  81. package/src/generate-vocab/mod.ts +0 -2
  82. package/src/globals.ts +0 -43
  83. package/src/imagerenderer.ts +0 -149
  84. package/src/inbox/entry.ts +0 -10
  85. package/src/inbox/rendercode.ts +0 -68
  86. package/src/inbox/view.tsx +0 -598
  87. package/src/inbox.tsx +0 -536
  88. package/src/init/action/configs.ts +0 -133
  89. package/src/init/action/const.ts +0 -9
  90. package/src/init/action/deps.ts +0 -161
  91. package/src/init/action/dir.ts +0 -11
  92. package/src/init/action/env.ts +0 -14
  93. package/src/init/action/install.ts +0 -24
  94. package/src/init/action/mod.ts +0 -66
  95. package/src/init/action/notice.ts +0 -103
  96. package/src/init/action/patch.ts +0 -233
  97. package/src/init/action/precommand.ts +0 -29
  98. package/src/init/action/recommend.ts +0 -38
  99. package/src/init/action/set.ts +0 -65
  100. package/src/init/action/templates.ts +0 -96
  101. package/src/init/action/utils.ts +0 -64
  102. package/src/init/ask/dir.ts +0 -98
  103. package/src/init/ask/kv.ts +0 -82
  104. package/src/init/ask/mod.ts +0 -23
  105. package/src/init/ask/mq.ts +0 -86
  106. package/src/init/ask/pm.ts +0 -58
  107. package/src/init/ask/wf.ts +0 -27
  108. package/src/init/command.ts +0 -135
  109. package/src/init/const.ts +0 -4
  110. package/src/init/json/biome.json +0 -17
  111. package/src/init/json/kv.json +0 -39
  112. package/src/init/json/mq.json +0 -95
  113. package/src/init/json/pm.json +0 -47
  114. package/src/init/json/rt.json +0 -42
  115. package/src/init/json/vscode-settings-for-deno.json +0 -43
  116. package/src/init/json/vscode-settings.json +0 -41
  117. package/src/init/lib.ts +0 -223
  118. package/src/init/mod.ts +0 -3
  119. package/src/init/templates/defaults/federation.ts.tpl +0 -23
  120. package/src/init/templates/defaults/logging.ts.tpl +0 -23
  121. package/src/init/templates/express/app.ts.tpl +0 -16
  122. package/src/init/templates/express/index.ts.tpl +0 -6
  123. package/src/init/templates/hono/app.tsx.tpl +0 -14
  124. package/src/init/templates/hono/index/bun.ts.tpl +0 -10
  125. package/src/init/templates/hono/index/deno.ts.tpl +0 -13
  126. package/src/init/templates/hono/index/node.ts.tpl +0 -14
  127. package/src/init/templates/next/middleware.ts.tpl +0 -45
  128. package/src/init/templates/nitro/.env.test.tpl +0 -1
  129. package/src/init/templates/nitro/nitro.config.ts.tpl +0 -14
  130. package/src/init/templates/nitro/server/error.ts.tpl +0 -3
  131. package/src/init/templates/nitro/server/middleware/federation.ts.tpl +0 -8
  132. package/src/init/test/action.ts +0 -28
  133. package/src/init/test/create.ts +0 -137
  134. package/src/init/test/fill.ts +0 -67
  135. package/src/init/test/lookup.ts +0 -254
  136. package/src/init/test/run.ts +0 -39
  137. package/src/init/test/types.ts +0 -27
  138. package/src/init/test/utils.ts +0 -21
  139. package/src/init/types.ts +0 -89
  140. package/src/init/webframeworks.ts +0 -168
  141. package/src/kv.bun.ts +0 -12
  142. package/src/kv.node.ts +0 -11
  143. package/src/log.ts +0 -64
  144. package/src/lookup.test.ts +0 -182
  145. package/src/lookup.ts +0 -563
  146. package/src/mod.ts +0 -62
  147. package/src/nodeinfo.test.ts +0 -229
  148. package/src/nodeinfo.ts +0 -454
  149. package/src/table.ts +0 -17
  150. package/src/tempserver.ts +0 -87
  151. package/src/tunnel.test.ts +0 -157
  152. package/src/tunnel.ts +0 -94
  153. package/src/utils.ts +0 -254
  154. package/src/webfinger/action.ts +0 -50
  155. package/src/webfinger/command.ts +0 -64
  156. package/src/webfinger/error.ts +0 -47
  157. package/src/webfinger/lib.ts +0 -37
  158. package/src/webfinger/mod.test.ts +0 -79
  159. package/src/webfinger/mod.ts +0 -2
  160. package/tsdown.config.ts +0 -35
@@ -1,44 +0,0 @@
1
-
2
- import { Temporal } from "@js-temporal/polyfill";
3
-
4
- import { printErrorMessage } from "../../utils.js";
5
- import { KV_STORE } from "../const.js";
6
- import { isTest, kvStores } from "../lib.js";
7
- import { select } from "@inquirer/prompts";
8
- import { pipe, tap, throwError, unless, when } from "@fxts/core/index.js";
9
-
10
- //#region src/init/ask/kv.ts
11
- /**
12
- * Fills in the key-value store by prompting the user if not provided.
13
- * Ensures the selected KV store is compatible with the chosen package manager.
14
- *
15
- * @param options - Initialization options possibly containing a kvStore and packageManager
16
- * @returns A promise resolving to options with a guaranteed kvStore
17
- */
18
- const fillKvStore = (options) => pipe(options, when(isKvStoreEmpty, askKvStore), unless(isKvSupportsPm, (opt) => pipe(opt, when(isTest, throwError(unmatchedWhileTesting)), tap(noticeUnmatched), fillKvStore)));
19
- var kv_default = fillKvStore;
20
- const isKvStoreEmpty = (options) => !options.kvStore;
21
- const askKvStore = async (data) => ({
22
- ...data,
23
- kvStore: await select({
24
- message: "Choose the key-value store to use",
25
- choices: KV_STORE.map(choiceKvStore(data.packageManager))
26
- })
27
- });
28
- const unmatchedWhileTesting = ({ kvStore: kv, packageManager: pm }) => /* @__PURE__ */ new Error(`Key-value store '${kv}' is not compatible with package manager '${pm}'`);
29
- const noticeUnmatched = ({ kvStore: kv, packageManager: pm }) => printErrorMessage`Error: Key-value store '${kv}' is not compatible with package manager '${pm}'`;
30
- const choiceKvStore = (pm) => (kv) => ({
31
- name: isKvSupportsPm({
32
- kvStore: kv,
33
- packageManager: pm
34
- }) ? kv : `${kv} (not supported with ${pm})`,
35
- value: kv,
36
- disabled: !isKvSupportsPm({
37
- kvStore: kv,
38
- packageManager: pm
39
- })
40
- });
41
- const isKvSupportsPm = ({ kvStore, packageManager }) => kvStores[kvStore].packageManagers.includes(packageManager);
42
-
43
- //#endregion
44
- export { kv_default as default };
@@ -1,16 +0,0 @@
1
-
2
- import { Temporal } from "@js-temporal/polyfill";
3
-
4
- import dir_default from "./dir.js";
5
- import kv_default from "./kv.js";
6
- import mq_default from "./mq.js";
7
- import pm_default from "./pm.js";
8
- import wf_default from "./wf.js";
9
- import { pipe } from "@fxts/core";
10
-
11
- //#region src/init/ask/mod.ts
12
- const askOptions = (options) => pipe(options, dir_default, wf_default, pm_default, mq_default, kv_default);
13
- var ask_default = askOptions;
14
-
15
- //#endregion
16
- export { ask_default as default };
@@ -1,46 +0,0 @@
1
-
2
- import { Temporal } from "@js-temporal/polyfill";
3
-
4
- import { printErrorMessage } from "../../utils.js";
5
- import { MESSAGE_QUEUE } from "../const.js";
6
- import { isTest, messageQueues } from "../lib.js";
7
- import { select } from "@inquirer/prompts";
8
- import { pipe, tap, throwError, unless, when } from "@fxts/core/index.js";
9
-
10
- //#region src/init/ask/mq.ts
11
- /**
12
- * Fills in the message queue by prompting the user if not provided.
13
- * Ensures the selected message queue is compatible with the chosen package manager.
14
- *
15
- * @param options - Initialization options possibly containing a messageQueue and packageManager
16
- * @returns A promise resolving to options with a guaranteed messageQueue
17
- */
18
- const fillMessageQueue = (options) => pipe(options, when(isMessageQueueEmpty, askMessageQueue), unless(isMqSupportsPm, (opt) => pipe(opt, when(isTest, throwError(unmatchedWhileTesting)), tap(noticeUnmatched), fillMessageQueue)));
19
- var mq_default = fillMessageQueue;
20
- const isMessageQueueEmpty = (options) => !options.messageQueue;
21
- const askMessageQueue = async (data) => ({
22
- ...data,
23
- messageQueue: await select({
24
- message: "Choose the message queue to use",
25
- choices: MESSAGE_QUEUE.map(choiceMessageQueue(data.packageManager))
26
- })
27
- });
28
- const unmatchedWhileTesting = ({ messageQueue: mq, packageManager: pm }) => /* @__PURE__ */ new Error(`Message queue '${mq}' is not compatible with package manager '${pm}'`);
29
- const noticeUnmatched = ({ messageQueue: mq, packageManager: pm }) => {
30
- printErrorMessage`Error: Message queue '${mq}' is not compatible with package manager '${pm}'`;
31
- };
32
- const choiceMessageQueue = (packageManager) => (messageQueue) => ({
33
- name: isMqSupportsPm({
34
- messageQueue,
35
- packageManager
36
- }) ? messageQueue : `${messageQueue} (not supported with ${packageManager})`,
37
- value: messageQueue,
38
- disabled: !isMqSupportsPm({
39
- messageQueue,
40
- packageManager
41
- })
42
- });
43
- const isMqSupportsPm = ({ messageQueue, packageManager }) => messageQueues[messageQueue].packageManagers.includes(packageManager);
44
-
45
- //#endregion
46
- export { mq_default as default };
@@ -1,49 +0,0 @@
1
-
2
- import { Temporal } from "@js-temporal/polyfill";
3
-
4
- import { PACKAGE_MANAGER } from "../const.js";
5
- import webframeworks_default from "../webframeworks.js";
6
- import { getInstallUrl, getLabel, isPackageManagerAvailable } from "../lib.js";
7
- import { print } from "@optique/run";
8
- import { message } from "@optique/core/message";
9
- import { select } from "@inquirer/prompts";
10
-
11
- //#region src/init/ask/pm.ts
12
- /**
13
- * Fills in the package manager by prompting the user if not provided.
14
- * Ensures the selected package manager is compatible with the chosen web framework.
15
- * If the selected package manager is not installed, informs the user and prompts again.
16
- *
17
- * @param options - Initialization options possibly containing a packageManager and webFramework
18
- * @returns A promise resolving to options with a guaranteed packageManager
19
- */
20
- const fillPackageManager = async ({ packageManager,...options }) => {
21
- const pm = packageManager ?? await askPackageManager(options.webFramework);
22
- if (await isPackageManagerAvailable(pm)) return {
23
- ...options,
24
- packageManager: pm
25
- };
26
- noticeInstallUrl(pm);
27
- return await fillPackageManager(options);
28
- };
29
- var pm_default = fillPackageManager;
30
- const askPackageManager = (wf) => select({
31
- message: "Choose the package manager to use",
32
- choices: PACKAGE_MANAGER.map(choicePackageManager(wf))
33
- });
34
- const choicePackageManager = (wf) => (value) => ({
35
- name: isWfSupportsPm(wf, value) ? value : `${value} (not supported with ${webframeworks_default[wf].label})`,
36
- value,
37
- disabled: !isWfSupportsPm(wf, value)
38
- });
39
- const isWfSupportsPm = (wf, pm) => webframeworks_default[wf].packageManagers.includes(pm);
40
- const noticeInstallUrl = (pm) => {
41
- const label = getLabel(pm);
42
- const url = getInstallUrl(pm);
43
- print(message` Package manager ${label} is not installed.`);
44
- print(message` You can install it from following link: ${url}`);
45
- print(message` or choose another package manager:`);
46
- };
47
-
48
- //#endregion
49
- export { pm_default as default };
@@ -1,29 +0,0 @@
1
-
2
- import { Temporal } from "@js-temporal/polyfill";
3
-
4
- import { WEB_FRAMEWORK } from "../const.js";
5
- import webframeworks_default from "../webframeworks.js";
6
- import { select } from "@inquirer/prompts";
7
-
8
- //#region src/init/ask/wf.ts
9
- /**
10
- * Fills in the web framework by prompting the user if not provided.
11
- *
12
- * @param options - Initialization options possibly containing a webFramework
13
- * @returns A promise resolving to options with a guaranteed webFramework
14
- */
15
- const fillWebFramework = async (options) => ({
16
- ...options,
17
- webFramework: options.webFramework ?? await askWebFramework()
18
- });
19
- var wf_default = fillWebFramework;
20
- const askWebFramework = () => select({
21
- message: "Choose the web framework to use",
22
- choices: WEB_FRAMEWORK.map((value) => ({
23
- name: webframeworks_default[value].label,
24
- value
25
- }))
26
- });
27
-
28
- //#endregion
29
- export { wf_default as default };
@@ -1,50 +0,0 @@
1
-
2
- import { Temporal } from "@js-temporal/polyfill";
3
-
4
- import { debugOption } from "../globals.js";
5
- import { KV_STORE, MESSAGE_QUEUE, PACKAGE_MANAGER, WEB_FRAMEWORK } from "./const.js";
6
- import { argument, choice, command, constant, merge, message, multiple, object, option, optionNames, optional, or } from "@optique/core";
7
- import { path } from "@optique/run";
8
-
9
- //#region src/init/command.ts
10
- const webFramework = optional(option("-w", "--web-framework", choice(WEB_FRAMEWORK, { metavar: "WEB_FRAMEWORK" }), { description: message`The web framework to integrate Fedify with.` }));
11
- const packageManager = optional(option("-p", "--package-manager", choice(PACKAGE_MANAGER, { metavar: "PACKAGE_MANAGER" }), { description: message`The package manager to use for installing dependencies.` }));
12
- const kvStore = optional(option("-k", "--kv-store", choice(KV_STORE, { metavar: "KV_STORE" }), { description: message`The key-value store to use for caching and some other features.` }));
13
- const messageQueue = optional(option("-m", "--message-queue", choice(MESSAGE_QUEUE, { metavar: "MESSAGE_QUEUE" }), { description: message`The message queue to use for background tasks.` }));
14
- const testMode = option("--test-mode", { description: message`The test mode to use for testing purposes.` });
15
- const initCommand = command("init", object("Initialization options", {
16
- command: constant("init"),
17
- dir: optional(argument(path({ metavar: "DIR" }), { description: message`The project directory to initialize. If a specified directory does not exist, it will be created.` })),
18
- webFramework,
19
- packageManager,
20
- kvStore,
21
- messageQueue,
22
- dryRun: option("--dry-run", { description: message`Perform a trial run with no changes made.` }),
23
- debugOption,
24
- testMode
25
- }), {
26
- brief: message`Initialize a new Fedify project directory.`,
27
- description: message`Initialize a new Fedify project directory.
28
-
29
- By default, it initializes the current directory. You can specify a different directory as an argument.
30
-
31
- Unless you specify all options (${optionNames(["-w", "--web-framework"])}, ${optionNames(["-p", "--package-manager"])}, ${optionNames(["-k", "--kv-store"])}, and ${optionNames(["-m", "--message-queue"])}), it will prompt you to select the options interactively.`
32
- });
33
- const noHydRun = object({ noHydRun: option("--no-hyd-run", { description: message`Log outputs without creating files.` }) });
34
- const noDryRun = object({ noDryRun: option("--no-dry-run", { description: message`Test with files creations and installations.` }) });
35
- const testInitCommand = command("test-init", merge(object("Initialization options", {
36
- command: constant("test-init"),
37
- webFramework: multiple(webFramework),
38
- packageManager: multiple(packageManager),
39
- kvStore: multiple(kvStore),
40
- messageQueue: multiple(messageQueue),
41
- debugOption
42
- }), optional(or(noHydRun, noDryRun))), {
43
- brief: message`Test an initializing command .`,
44
- description: message`Test an initializing command on temporary directories.
45
-
46
- Unless you specify all options (${optionNames(["-w", "--web-framework"])}, ${optionNames(["-p", "--package-manager"])}, ${optionNames(["-k", "--kv-store"])}, and ${optionNames(["-m", "--message-queue"])}), it will test all combinations of the options.`
47
- });
48
-
49
- //#endregion
50
- export { initCommand, testInitCommand };
@@ -1,31 +0,0 @@
1
-
2
- import { Temporal } from "@js-temporal/polyfill";
3
-
4
- //#region src/init/const.ts
5
- const PACKAGE_MANAGER = [
6
- "deno",
7
- "pnpm",
8
- "bun",
9
- "yarn",
10
- "npm"
11
- ];
12
- const WEB_FRAMEWORK = [
13
- "hono",
14
- "nitro",
15
- "next",
16
- "express"
17
- ];
18
- const MESSAGE_QUEUE = [
19
- "denokv",
20
- "redis",
21
- "postgres",
22
- "amqp"
23
- ];
24
- const KV_STORE = [
25
- "denokv",
26
- "redis",
27
- "postgres"
28
- ];
29
-
30
- //#endregion
31
- export { KV_STORE, MESSAGE_QUEUE, PACKAGE_MANAGER, WEB_FRAMEWORK };
@@ -1,24 +0,0 @@
1
-
2
- import { Temporal } from "@js-temporal/polyfill";
3
-
4
- //#region src/init/json/biome.json
5
- var $schema = "https://biomejs.dev/schemas/1.8.3/schema.json";
6
- var organizeImports = { "enabled": true };
7
- var formatter = {
8
- "enabled": true,
9
- "indentStyle": "space",
10
- "indentWidth": 2
11
- };
12
- var linter = {
13
- "enabled": true,
14
- "rules": { "recommended": true }
15
- };
16
- var biome_default = {
17
- $schema,
18
- organizeImports,
19
- formatter,
20
- linter
21
- };
22
-
23
- //#endregion
24
- export { biome_default as default };
@@ -1,53 +0,0 @@
1
-
2
- import { Temporal } from "@js-temporal/polyfill";
3
-
4
- //#region src/init/json/kv.json
5
- var redis = {
6
- "label": "Redis",
7
- "packageManagers": [
8
- "deno",
9
- "bun",
10
- "npm",
11
- "yarn",
12
- "pnpm"
13
- ],
14
- "dependencies": { "npm:ioredis": "^5.4.1" },
15
- "imports": {
16
- "@fedify/redis": { "RedisKvStore": "RedisKvStore" },
17
- "ioredis": { "Redis": "Redis" }
18
- },
19
- "object": "new RedisKvStore(new Redis(process.env.REDIS_URL))",
20
- "env": { "REDIS_URL": "redis://localhost:6379" }
21
- };
22
- var postgres = {
23
- "label": "PostgreSQL",
24
- "packageManagers": [
25
- "deno",
26
- "bun",
27
- "npm",
28
- "yarn",
29
- "pnpm"
30
- ],
31
- "dependencies": { "npm:postgres": "^3.4.5" },
32
- "imports": {
33
- "@fedify/postgres": { "PostgresKvStore": "PostgresKvStore" },
34
- "postgres": { "default": "postgres" }
35
- },
36
- "object": "new PostgresKvStore(postgres(process.env.DATABASE_URL))",
37
- "env": { "DATABASE_URL": "postgres://postgres@localhost:5432/postgres" }
38
- };
39
- var denokv = {
40
- "label": "Deno KV",
41
- "packageManagers": ["deno"],
42
- "imports": { "@fedify/denokv": { "DenoKvStore": "DenoKvStore" } },
43
- "object": "new DenoKvStore(await Deno.openKv())",
44
- "denoUnstable": ["kv"]
45
- };
46
- var kv_default = {
47
- redis,
48
- postgres,
49
- denokv
50
- };
51
-
52
- //#endregion
53
- export { kv_default as default };
@@ -1,72 +0,0 @@
1
-
2
- import { Temporal } from "@js-temporal/polyfill";
3
-
4
- //#region src/init/json/mq.json
5
- var redis = {
6
- "label": "Redis",
7
- "packageManagers": [
8
- "deno",
9
- "bun",
10
- "npm",
11
- "yarn",
12
- "pnpm"
13
- ],
14
- "dependencies": { "npm:ioredis": "^5.4.1" },
15
- "imports": {
16
- "@fedify/redis": { "RedisMessageQueue": "RedisMessageQueue" },
17
- "ioredis": { "Redis": "Redis" }
18
- },
19
- "object": "new RedisMessageQueue(() => new Redis(process.env.REDIS_URL))",
20
- "env": { "REDIS_URL": "redis://localhost:6379" }
21
- };
22
- var postgres = {
23
- "label": "PostgreSQL",
24
- "packageManagers": [
25
- "deno",
26
- "bun",
27
- "npm",
28
- "yarn",
29
- "pnpm"
30
- ],
31
- "dependencies": { "npm:postgres": "^3.4.5" },
32
- "imports": {
33
- "@fedify/postgres": { "PostgresMessageQueue": "PostgresMessageQueue" },
34
- "postgres": { "default": "postgres" }
35
- },
36
- "object": "new PostgresMessageQueue(postgres(process.env.DATABASE_URL))",
37
- "env": { "DATABASE_URL": "postgres://postgres@localhost:5432/postgres" }
38
- };
39
- var amqp = {
40
- "label": "AMQP (e.g., RabbitMQ)",
41
- "packageManagers": [
42
- "deno",
43
- "bun",
44
- "npm",
45
- "yarn",
46
- "pnpm"
47
- ],
48
- "dependencies": { "npm:amqplib": "^0.10.4" },
49
- "devDependencies": { "npm:@types/amqplib": "^0.10.5" },
50
- "imports": {
51
- "@fedify/amqp": { "AmqpMessageQueue": "AmqpMessageQueue" },
52
- "amqplib": { "connect": "connect" }
53
- },
54
- "object": "new AmqpMessageQueue(await connect(process.env.AMQP_URL))",
55
- "env": { "AMQP_URL": "amqp://localhost" }
56
- };
57
- var denokv = {
58
- "label": "Deno KV",
59
- "packageManagers": ["deno"],
60
- "imports": { "@fedify/denokv": { "DenoKvMessageQueue": "DenoKvMessageQueue" } },
61
- "object": "new DenoKvMessageQueue(await Deno.openKv())",
62
- "denoUnstable": ["kv"]
63
- };
64
- var mq_default = {
65
- redis,
66
- postgres,
67
- amqp,
68
- denokv
69
- };
70
-
71
- //#endregion
72
- export { mq_default as default };
@@ -1,44 +0,0 @@
1
-
2
- import { Temporal } from "@js-temporal/polyfill";
3
-
4
- //#region src/init/json/pm.json
5
- var deno = {
6
- "label": "deno",
7
- "checkCommand": ["deno", "--version"],
8
- "outputPattern": "^deno\\s+\\d+\\.\\d+\\.\\d+\\b",
9
- "installUrl": "https://docs.deno.com/runtime/getting_started/installation"
10
- };
11
- var bun = {
12
- "label": "bun",
13
- "checkCommand": ["bun", "--version"],
14
- "outputPattern": "^\\d+\\.\\d+\\.\\d+$",
15
- "installUrl": "https://bun.sh/docs/installation"
16
- };
17
- var npm = {
18
- "label": "npm",
19
- "checkCommand": ["npm", "--version"],
20
- "outputPattern": "^\\d+\\.\\d+\\.\\d+$",
21
- "installUrl": "https://docs.npmjs.com/downloading-and-installing-node-js-and-npm"
22
- };
23
- var yarn = {
24
- "label": "Yarn",
25
- "checkCommand": ["yarn", "--version"],
26
- "outputPattern": "^\\d+\\.\\d+\\.\\d+$",
27
- "installUrl": "https://classic.yarnpkg.com/en/docs/install/#windows-stable"
28
- };
29
- var pnpm = {
30
- "label": "pnpm",
31
- "checkCommand": ["pnpm", "--version"],
32
- "outputPattern": "^\\d+\\.\\d+\\.\\d+$",
33
- "installUrl": "https://pnpm.io/installation"
34
- };
35
- var pm_default = {
36
- deno,
37
- bun,
38
- npm,
39
- yarn,
40
- pnpm
41
- };
42
-
43
- //#endregion
44
- export { pm_default as default };
@@ -1,39 +0,0 @@
1
-
2
- import { Temporal } from "@js-temporal/polyfill";
3
-
4
- //#region src/init/json/rt.json
5
- var deno = {
6
- "label": "Deno",
7
- "checkCommand": ["deno", "--version"],
8
- "outputPattern": "^deno\\s+\\d+\\.\\d+\\.\\d+\\b"
9
- };
10
- var bun = {
11
- "label": "Bun",
12
- "checkCommand": ["bun", "--version"],
13
- "outputPattern": "^\\d+\\.\\d+\\.\\d+$"
14
- };
15
- var pnpm = {
16
- "label": "Node.js",
17
- "checkCommand": ["node", "--version"],
18
- "outputPattern": "^v\\d+\\.\\d+\\.\\d+$"
19
- };
20
- var yarn = {
21
- "label": "Node.js",
22
- "checkCommand": ["node", "--version"],
23
- "outputPattern": "^v\\d+\\.\\d+\\.\\d+$"
24
- };
25
- var npm = {
26
- "label": "Node.js",
27
- "checkCommand": ["node", "--version"],
28
- "outputPattern": "^v\\d+\\.\\d+\\.\\d+$"
29
- };
30
- var rt_default = {
31
- deno,
32
- bun,
33
- pnpm,
34
- yarn,
35
- npm
36
- };
37
-
38
- //#endregion
39
- export { rt_default as default };
@@ -1,53 +0,0 @@
1
-
2
- import { Temporal } from "@js-temporal/polyfill";
3
-
4
- //#region src/init/json/vscode-settings-for-deno.json
5
- var deno_enable = true;
6
- var deno_unstable = true;
7
- var editor_detectIndentation = false;
8
- var editor_indentSize = 2;
9
- var editor_insertSpaces = true;
10
- var __javascript_ = {
11
- "editor.defaultFormatter": "denoland.vscode-deno",
12
- "editor.formatOnSave": true,
13
- "editor.codeActionsOnSave": { "source.sortImports": "always" }
14
- };
15
- var __javascriptreact_ = {
16
- "editor.defaultFormatter": "denoland.vscode-deno",
17
- "editor.formatOnSave": true,
18
- "editor.codeActionsOnSave": { "source.sortImports": "always" }
19
- };
20
- var __json_ = {
21
- "editor.defaultFormatter": "vscode.json-language-features",
22
- "editor.formatOnSave": true
23
- };
24
- var __jsonc_ = {
25
- "editor.defaultFormatter": "vscode.json-language-features",
26
- "editor.formatOnSave": true
27
- };
28
- var __typescript_ = {
29
- "editor.defaultFormatter": "denoland.vscode-deno",
30
- "editor.formatOnSave": true,
31
- "editor.codeActionsOnSave": { "source.sortImports": "always" }
32
- };
33
- var __typescriptreact_ = {
34
- "editor.defaultFormatter": "denoland.vscode-deno",
35
- "editor.formatOnSave": true,
36
- "editor.codeActionsOnSave": { "source.sortImports": "always" }
37
- };
38
- var vscode_settings_for_deno_default = {
39
- "deno.enable": deno_enable,
40
- "deno.unstable": deno_unstable,
41
- "editor.detectIndentation": editor_detectIndentation,
42
- "editor.indentSize": editor_indentSize,
43
- "editor.insertSpaces": editor_insertSpaces,
44
- "[javascript]": __javascript_,
45
- "[javascriptreact]": __javascriptreact_,
46
- "[json]": __json_,
47
- "[jsonc]": __jsonc_,
48
- "[typescript]": __typescript_,
49
- "[typescriptreact]": __typescriptreact_
50
- };
51
-
52
- //#endregion
53
- export { vscode_settings_for_deno_default as default };
@@ -1,49 +0,0 @@
1
-
2
- import { Temporal } from "@js-temporal/polyfill";
3
-
4
- //#region src/init/json/vscode-settings.json
5
- var editor_detectIndentation = false;
6
- var editor_indentSize = 2;
7
- var editor_insertSpaces = true;
8
- var __javascript_ = {
9
- "editor.defaultFormatter": "biomejs.biome",
10
- "editor.formatOnSave": true,
11
- "editor.codeActionsOnSave": { "source.organizeImports.biome": "always" }
12
- };
13
- var __javascriptreact_ = {
14
- "editor.defaultFormatter": "biomejs.biome",
15
- "editor.formatOnSave": true,
16
- "editor.codeActionsOnSave": { "source.organizeImports.biome": "always" }
17
- };
18
- var __json_ = {
19
- "editor.defaultFormatter": "biomejs.biome",
20
- "editor.formatOnSave": true
21
- };
22
- var __jsonc_ = {
23
- "editor.defaultFormatter": "biomejs.biome",
24
- "editor.formatOnSave": true
25
- };
26
- var __typescript_ = {
27
- "editor.defaultFormatter": "biomejs.biome",
28
- "editor.formatOnSave": true,
29
- "editor.codeActionsOnSave": { "source.organizeImports.biome": "always" }
30
- };
31
- var __typescriptreact_ = {
32
- "editor.defaultFormatter": "biomejs.biome",
33
- "editor.formatOnSave": true,
34
- "editor.codeActionsOnSave": { "source.organizeImports.biome": "always" }
35
- };
36
- var vscode_settings_default = {
37
- "editor.detectIndentation": editor_detectIndentation,
38
- "editor.indentSize": editor_indentSize,
39
- "editor.insertSpaces": editor_insertSpaces,
40
- "[javascript]": __javascript_,
41
- "[javascriptreact]": __javascriptreact_,
42
- "[json]": __json_,
43
- "[jsonc]": __jsonc_,
44
- "[typescript]": __typescript_,
45
- "[typescriptreact]": __typescriptreact_
46
- };
47
-
48
- //#endregion
49
- export { vscode_settings_default as default };