@fedify/init 2.4.0-pr.936.41 → 2.4.0
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 +9 -5
- package/dist/action/configs.js +1 -1
- package/dist/action/deps.js +1 -1
- package/dist/action/mod.d.ts +1 -1
- package/dist/action/patch.js +4 -2
- package/dist/action/templates.js +14 -2
- package/dist/ask/dir.js +51 -19
- package/dist/ask/kv.js +1 -1
- package/dist/ask/mq.js +1 -1
- package/dist/ask/pm.js +44 -26
- package/dist/command.d.ts +5 -5
- package/dist/const.js +6 -2
- package/dist/deno.js +1 -1
- package/dist/json/deps.js +13 -13
- package/dist/json/deps.json +15 -15
- package/dist/json/kv.js +1 -1
- package/dist/json/kv.json +1 -1
- package/dist/json/mq.js +1 -1
- package/dist/json/mq.json +1 -1
- package/dist/json/rt.js +7 -14
- package/dist/json/rt.json +7 -20
- package/dist/lib.js +78 -2
- package/dist/mod.d.ts +1 -1
- package/dist/templates/defaults/smoke.test.ts.tpl +170 -0
- package/dist/templates/next/middleware.ts.tpl +7 -2
- package/dist/templates/sveltekit/hooks.server.ts.tpl +7 -0
- package/dist/test/create.js +7 -12
- package/dist/test/db.js +1 -1
- package/dist/test/lookup.js +3 -2
- package/dist/test/port.js +4 -4
- package/dist/types.d.ts +3 -1
- package/dist/utils.js +9 -3
- package/dist/webframeworks/astro.js +11 -5
- package/dist/webframeworks/bare-bones.js +8 -4
- package/dist/webframeworks/const.js +1 -1
- package/dist/webframeworks/elysia.js +9 -5
- package/dist/webframeworks/express.js +8 -4
- package/dist/webframeworks/hono.js +8 -4
- package/dist/webframeworks/mod.js +3 -1
- package/dist/webframeworks/next.js +10 -5
- package/dist/webframeworks/nitro.js +11 -4
- package/dist/webframeworks/nuxt.js +10 -5
- package/dist/webframeworks/solidstart.js +10 -5
- package/dist/webframeworks/sveltekit.js +82 -0
- package/dist/webframeworks/utils.js +15 -1
- package/package.json +6 -5
package/README.md
CHANGED
|
@@ -25,17 +25,21 @@ Supported options
|
|
|
25
25
|
|
|
26
26
|
The initializer supports the following project configurations:
|
|
27
27
|
|
|
28
|
-
- **Web frameworks**: Bare-bones, [
|
|
29
|
-
[
|
|
28
|
+
- **Web frameworks**: Bare-bones, [Astro], [Elysia], [Express], [Hono],
|
|
29
|
+
[Next.js], [Nitro], [Nuxt], [SolidStart], [SvelteKit]
|
|
30
30
|
- **Package managers**: Deno, pnpm, Bun, Yarn, npm
|
|
31
31
|
- **Key-value stores**: In-Memory, Deno KV, Redis, PostgreSQL
|
|
32
32
|
- **Message queues**: In-Process, Deno KV, Redis, PostgreSQL, AMQP
|
|
33
33
|
|
|
34
|
-
[
|
|
35
|
-
[Nitro]: https://nitro.build/
|
|
36
|
-
[Next.js]: https://nextjs.org/
|
|
34
|
+
[Astro]: https://astro.build/
|
|
37
35
|
[Elysia]: https://elysiajs.com/
|
|
38
36
|
[Express]: https://expressjs.com/
|
|
37
|
+
[Hono]: https://hono.dev/
|
|
38
|
+
[Next.js]: https://nextjs.org/
|
|
39
|
+
[Nitro]: https://nitro.build/
|
|
40
|
+
[Nuxt]: https://nuxt.com/
|
|
41
|
+
[SolidStart]: https://start.solidjs.com/
|
|
42
|
+
[SvelteKit]: https://svelte.dev/
|
|
39
43
|
|
|
40
44
|
|
|
41
45
|
Installation
|
package/dist/action/configs.js
CHANGED
|
@@ -119,7 +119,7 @@ const loadVscodeExtensions = (data) => ({
|
|
|
119
119
|
});
|
|
120
120
|
const withFormatIgnorePatterns = (config, data) => ({
|
|
121
121
|
...config,
|
|
122
|
-
ignorePatterns: [
|
|
122
|
+
ignorePatterns: [.../* @__PURE__ */ new Set([...config.ignorePatterns ?? [], ...data.initializer.format?.ignorePatterns ?? []])].sort()
|
|
123
123
|
});
|
|
124
124
|
function getVscodeSettingsForPrettier() {
|
|
125
125
|
const { "oxc.fmt.configPath": _configPath, ...settings } = vscode_settings_default;
|
package/dist/action/deps.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { merge, replace } from "../utils.js";
|
|
2
2
|
import { PACKAGE_VERSION } from "../lib.js";
|
|
3
|
-
import { _logtape_logtape, _std_dotenv } from "../json/deps.js";
|
|
3
|
+
import { "@logtape/logtape" as _logtape_logtape, "@std/dotenv" as _std_dotenv } from "../json/deps.js";
|
|
4
4
|
import { getPackagesPath } from "./const.js";
|
|
5
5
|
import { isDeno, needsDenoDotenv } from "./utils.js";
|
|
6
6
|
import { always, entries, filter, fromEntries, map, pipe, when } from "@fxts/core";
|
package/dist/action/mod.d.ts
CHANGED
package/dist/action/patch.js
CHANGED
|
@@ -3,7 +3,7 @@ import { createFile, throwUnlessNotExists } from "../lib.js";
|
|
|
3
3
|
import { displayFile, noticeFilesToCreate, noticeFilesToInsert } from "./notice.js";
|
|
4
4
|
import { joinDir, stringifyEnvs } from "./utils.js";
|
|
5
5
|
import { devToolConfigs, loadDenoConfig, loadOxfmtConfig, loadOxlintConfig, loadPackageJson, loadTsConfig, loadVscodeExtensions, loadVscodeSettings } from "./configs.js";
|
|
6
|
-
import { getImports, loadFederation, loadLogging } from "./templates.js";
|
|
6
|
+
import { getImports, loadFederation, loadLogging, loadTest } from "./templates.js";
|
|
7
7
|
import { always, apply, entries, map, pipe, pipeLazy, tap } from "@fxts/core";
|
|
8
8
|
import { toMerged } from "es-toolkit";
|
|
9
9
|
import { access, readFile } from "node:fs/promises";
|
|
@@ -80,6 +80,7 @@ const getFiles = async (data) => ({
|
|
|
80
80
|
...data
|
|
81
81
|
}),
|
|
82
82
|
[data.initializer.loggingFile]: await loadLogging(data),
|
|
83
|
+
[data.initializer.testFile]: await loadTest(data),
|
|
83
84
|
".env": stringifyEnvs(data.env),
|
|
84
85
|
...data.initializer.files
|
|
85
86
|
});
|
|
@@ -119,6 +120,7 @@ const getJsons = (data) => {
|
|
|
119
120
|
const getGeneratedFilePaths = (data) => [
|
|
120
121
|
data.initializer.federationFile,
|
|
121
122
|
data.initializer.loggingFile,
|
|
123
|
+
data.initializer.testFile,
|
|
122
124
|
".env",
|
|
123
125
|
...Object.keys(data.initializer.files ?? {}),
|
|
124
126
|
...Object.keys(getJsons(data)),
|
|
@@ -233,4 +235,4 @@ const appendText = (prev, data) => prev ? `${prev}\n${data}` : data;
|
|
|
233
235
|
*/
|
|
234
236
|
const readFileIfExists = (path) => readFile(path, "utf8").catch(pipeLazy(tap(throwUnlessNotExists), always("")));
|
|
235
237
|
//#endregion
|
|
236
|
-
export { assertNoGeneratedFileConflicts, patchFiles, recommendPatchFiles };
|
|
238
|
+
export { GeneratedFileConflictError, assertNoGeneratedFileConflicts, getJsonsCacheKey, patchFiles, recommendPatchFiles };
|
package/dist/action/templates.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { replace } from "../utils.js";
|
|
2
|
-
import { readTemplate } from "../lib.js";
|
|
2
|
+
import { getDevCommand, readTemplate } from "../lib.js";
|
|
3
3
|
import { needsDenoDotenv } from "./utils.js";
|
|
4
4
|
import { concat, entries, join, map, pipe, when } from "@fxts/core";
|
|
5
5
|
import { toMerged } from "es-toolkit";
|
|
@@ -30,6 +30,18 @@ const getFederationTemplate = (packageManager) => packageManager === "deno" ? "d
|
|
|
30
30
|
*/
|
|
31
31
|
const loadLogging = async ({ projectName, initializer }) => pipe(await readTemplate(initializer.loggingTemplate ?? "defaults/logging.ts"), replace(/\/\* project name \*\//, JSON.stringify(projectName)));
|
|
32
32
|
/**
|
|
33
|
+
* Loads the smoke-test script content for the initializer.
|
|
34
|
+
*
|
|
35
|
+
* Every framework shares the same *defaults/smoke.test.ts* template, so unlike
|
|
36
|
+
* {@link loadLogging} there is no per-framework template override. The
|
|
37
|
+
* template spawns the project's own dev server, so it needs the dev command
|
|
38
|
+
* for the chosen package manager baked in at generation time.
|
|
39
|
+
*
|
|
40
|
+
* @param param0 - {@link InitCommandData} containing `packageManager`
|
|
41
|
+
* @returns The complete smoke-test script content as a string
|
|
42
|
+
*/
|
|
43
|
+
const loadTest = async ({ packageManager }) => pipe(await readTemplate("defaults/smoke.test.ts"), replace(/\/\* dev command \*\//, JSON.stringify(getDevCommand(packageManager).split(" ")).replaceAll(",", ", ")));
|
|
44
|
+
/**
|
|
33
45
|
* Generates import statements for KV store and message queue dependencies.
|
|
34
46
|
* Merges imports from both KV and MQ configurations and creates proper
|
|
35
47
|
* ES module import syntax.
|
|
@@ -75,4 +87,4 @@ const ENV_REG_EXP = /process\.env\.(\w+)/g;
|
|
|
75
87
|
*/
|
|
76
88
|
const convertEnv = (obj, pm) => pm === "deno" && ENV_REG_EXP.test(obj) ? obj.replaceAll(ENV_REG_EXP, (_, g1) => `Deno.env.get("${g1}")`) : obj;
|
|
77
89
|
//#endregion
|
|
78
|
-
export { getImports, loadFederation, loadLogging };
|
|
90
|
+
export { convertEnv, getAlias, getImports, loadFederation, loadLogging, loadTest };
|
package/dist/ask/dir.js
CHANGED
|
@@ -33,7 +33,7 @@ const askDir = (cwd) => input({
|
|
|
33
33
|
});
|
|
34
34
|
const askIfNonEmpty = async (dir) => {
|
|
35
35
|
if (await isDirectoryEmpty(dir)) return true;
|
|
36
|
-
if (await askNonEmpty(dir)) return await
|
|
36
|
+
if (await askNonEmpty(dir)) return await moveOrDeleteDir(dir);
|
|
37
37
|
return false;
|
|
38
38
|
};
|
|
39
39
|
const askNonEmpty = (dir) => toggle.default({
|
|
@@ -41,31 +41,57 @@ const askNonEmpty = (dir) => toggle.default({
|
|
|
41
41
|
Do you want to use it anyway?`,
|
|
42
42
|
default: false
|
|
43
43
|
});
|
|
44
|
-
const
|
|
45
|
-
const
|
|
44
|
+
const moveOrDeleteDir = (dir) => pipe(dir, buildMoveOrDelete, (action) => pipe(action.confirm, when(identity, runAction(action.command, action.error))));
|
|
45
|
+
const buildMoveOrDelete = (dir) => pipe(getOsType(), detectSupportedAction, (fn) => {
|
|
46
|
+
return {
|
|
47
|
+
confirm: fn.confirmAction(dir),
|
|
48
|
+
command: fn.actionPlan.command(dir),
|
|
49
|
+
error: errorMessages[fn.actionPlan.mode](dir)
|
|
50
|
+
};
|
|
51
|
+
});
|
|
52
|
+
const detectSupportedAction = (os) => {
|
|
53
|
+
const actionPlan = trashOrDeleteCommands[os] ?? trashOrDeleteCommands.linux;
|
|
54
|
+
return {
|
|
55
|
+
confirmAction: actionPlan.mode === "trash" ? moveToTrashConfirm : deletePermanentlyConfirm,
|
|
56
|
+
actionPlan
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
const moveToTrashConfirm = (dir) => toggle.default({
|
|
46
60
|
message: `Do you want to move the contents of "${dir}" to the trash?
|
|
47
61
|
If you choose "No", you should choose another directory.`,
|
|
48
62
|
default: false
|
|
49
63
|
});
|
|
50
|
-
const
|
|
64
|
+
const deletePermanentlyConfirm = (dir) => toggle.default({
|
|
65
|
+
message: `Do you really want to delete all contents of "${dir}" PERMANENTLY?
|
|
66
|
+
If you choose "No", you should choose another directory.`,
|
|
67
|
+
default: false
|
|
68
|
+
});
|
|
69
|
+
const runAction = (command, error) => () => pipe(command, (cmd) => $`${cmd}`.spawn(), () => true).catch((e) => {
|
|
51
70
|
logger.error(e);
|
|
52
|
-
printError(
|
|
53
|
-
Please move it manually.`);
|
|
71
|
+
printError(error);
|
|
54
72
|
return false;
|
|
55
73
|
});
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
74
|
+
const trashOrDeleteCommands = {
|
|
75
|
+
darwin: {
|
|
76
|
+
mode: "trash",
|
|
77
|
+
command: (dir) => ["trash", dir]
|
|
78
|
+
},
|
|
79
|
+
win32: {
|
|
80
|
+
mode: "trash",
|
|
81
|
+
command: (dir) => [
|
|
82
|
+
"powershell",
|
|
83
|
+
"-Command",
|
|
84
|
+
getPowershellTrashCommand(dir)
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
linux: {
|
|
88
|
+
mode: "permanent",
|
|
89
|
+
command: (dir) => [
|
|
90
|
+
"rm",
|
|
91
|
+
"-rf",
|
|
92
|
+
dir
|
|
93
|
+
]
|
|
94
|
+
}
|
|
69
95
|
};
|
|
70
96
|
const getPowershellTrashCommand = (dir) => [
|
|
71
97
|
"Add-Type",
|
|
@@ -77,5 +103,11 @@ const getPowershellTrashCommand = (dir) => [
|
|
|
77
103
|
"'OnlyErrorDialogs',",
|
|
78
104
|
"'SendToRecycleBin')"
|
|
79
105
|
].join(" ");
|
|
106
|
+
const errorMessages = {
|
|
107
|
+
"trash": (dir) => message`Failed to move ${dir} to trash.
|
|
108
|
+
Please move it manually.`,
|
|
109
|
+
"permanent": (dir) => message`Failed to delete ${dir} permanently.
|
|
110
|
+
Please remove it manually.`
|
|
111
|
+
};
|
|
80
112
|
//#endregion
|
|
81
113
|
export { fillDir as default };
|
package/dist/ask/kv.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { KV_STORE } from "../const.js";
|
|
1
2
|
import { printErrorMessage } from "../utils.js";
|
|
2
3
|
import { isTest, kvStores } from "../lib.js";
|
|
3
|
-
import { KV_STORE } from "../const.js";
|
|
4
4
|
import { select } from "@inquirer/prompts";
|
|
5
5
|
import { pipe, tap, throwError, unless, when } from "@fxts/core/index.js";
|
|
6
6
|
//#region src/ask/kv.ts
|
package/dist/ask/mq.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { MESSAGE_QUEUE } from "../const.js";
|
|
1
2
|
import { printErrorMessage } from "../utils.js";
|
|
2
3
|
import { isTest, messageQueues } from "../lib.js";
|
|
3
|
-
import { MESSAGE_QUEUE } from "../const.js";
|
|
4
4
|
import { select } from "@inquirer/prompts";
|
|
5
5
|
import { pipe, tap, throwError, unless, when } from "@fxts/core/index.js";
|
|
6
6
|
//#region src/ask/mq.ts
|
package/dist/ask/pm.js
CHANGED
|
@@ -1,46 +1,64 @@
|
|
|
1
|
-
import { getInstallUrl, isPackageManagerAvailable, kvStores, messageQueues, packageManagers, runtimes } from "../lib.js";
|
|
2
1
|
import { PACKAGE_MANAGER } from "../const.js";
|
|
2
|
+
import { printErrorMessage } from "../utils.js";
|
|
3
|
+
import { checkAllRuntimes, getInstallUrl, isPackageManagerAvailable, isTest, runtimes } from "../lib.js";
|
|
4
|
+
import { pmToRt } from "../webframeworks/utils.js";
|
|
3
5
|
import webFrameworks from "../webframeworks/mod.js";
|
|
4
|
-
import
|
|
6
|
+
import process from "node:process";
|
|
5
7
|
import { select } from "@inquirer/prompts";
|
|
6
|
-
import { message } from "@optique/core/message";
|
|
8
|
+
import { message, optionName, text } from "@optique/core/message";
|
|
7
9
|
import { print } from "@optique/run";
|
|
8
10
|
//#region src/ask/pm.ts
|
|
9
11
|
/**
|
|
10
12
|
* Fills in the package manager by prompting the user if not provided.
|
|
11
|
-
* Ensures the selected package manager is compatible with the chosen web
|
|
12
|
-
*
|
|
13
|
+
* Ensures the selected package manager is compatible with the chosen web
|
|
14
|
+
* framework and installed on the system. When an explicitly requested package
|
|
15
|
+
* manager is unavailable, informs the user and prompts again.
|
|
13
16
|
*
|
|
14
17
|
* @param options - Initialization options possibly containing a packageManager and webFramework
|
|
15
18
|
* @returns A promise resolving to options with a guaranteed packageManager
|
|
16
19
|
*/
|
|
17
20
|
const fillPackageManager = async ({ packageManager, ...options }) => {
|
|
18
|
-
const
|
|
19
|
-
if (
|
|
21
|
+
const choices = await calculateChoices(options.webFramework);
|
|
22
|
+
if (packageManager != null) {
|
|
23
|
+
const choice = choices.find(({ value }) => value === packageManager);
|
|
24
|
+
if (choice.disabled == null) return {
|
|
25
|
+
...options,
|
|
26
|
+
packageManager
|
|
27
|
+
};
|
|
28
|
+
print(message`${optionName(choice.name)} ${text(choice.disabled)}`);
|
|
29
|
+
if (isTest(options)) process.exit(1);
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
20
32
|
...options,
|
|
21
|
-
packageManager:
|
|
33
|
+
packageManager: await askPackageManager(choices)
|
|
22
34
|
};
|
|
23
|
-
noticeInstallUrl(pm);
|
|
24
|
-
return await fillPackageManager(options);
|
|
25
35
|
};
|
|
26
|
-
const
|
|
36
|
+
const calculateChoices = async (wf) => {
|
|
37
|
+
const runtimeChecks = await checkAllRuntimes(webFrameworks[wf].minRuntimeVersions);
|
|
38
|
+
const choices = await Promise.all(PACKAGE_MANAGER.map(choicePackageManager(wf, runtimeChecks)));
|
|
39
|
+
if (choices.every((choice) => choice.disabled)) {
|
|
40
|
+
printErrorMessage`No package manager with a supported runtime is available for ${webFrameworks[wf].label}.`;
|
|
41
|
+
process.exit(1);
|
|
42
|
+
}
|
|
43
|
+
return choices;
|
|
44
|
+
};
|
|
45
|
+
const askPackageManager = (choices) => select({
|
|
27
46
|
message: "Choose the package manager to use",
|
|
28
|
-
choices
|
|
29
|
-
});
|
|
30
|
-
const choicePackageManager = (wf) => (value) => ({
|
|
31
|
-
name: isWfSupportsPm(wf, value) ? value : `${value} (not supported with ${webFrameworks[wf].label})`,
|
|
32
|
-
value,
|
|
33
|
-
disabled: !isWfSupportsPm(wf, value)
|
|
47
|
+
choices
|
|
34
48
|
});
|
|
35
|
-
const
|
|
36
|
-
const
|
|
37
|
-
const label =
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
49
|
+
const choicePackageManager = (wf, runtimeChecks) => async (value) => {
|
|
50
|
+
const check = runtimeChecks[pmToRt(value)];
|
|
51
|
+
const label = runtimes[pmToRt(value)].label;
|
|
52
|
+
const disabled = !isWfSupportsPm(wf, value) ? `not supported with ${webFrameworks[wf].label}` : check.status === "unsupported" ? `requires ${label} ${check.required} or later (detected: ${check.detected})` : check.status === "missing" ? `requires ${label} which is not installed` : check.status === "malformed" ? `could not detect ${label} version` : pmToRt(value) === "node" && !await isPackageManagerAvailable(value) ? `is not installed; install it from ${getInstallUrl(value)}` : "";
|
|
53
|
+
return disabled === "" ? {
|
|
54
|
+
name: value,
|
|
55
|
+
value
|
|
56
|
+
} : {
|
|
57
|
+
name: value,
|
|
58
|
+
value,
|
|
59
|
+
disabled
|
|
60
|
+
};
|
|
42
61
|
};
|
|
43
|
-
const
|
|
44
|
-
const whenHasLabel = (desc) => when((name) => name in desc, (name) => desc[name].label);
|
|
62
|
+
const isWfSupportsPm = (wf, pm) => webFrameworks[wf].packageManagers.includes(pm);
|
|
45
63
|
//#endregion
|
|
46
64
|
export { fillPackageManager as default };
|
package/dist/command.d.ts
CHANGED
|
@@ -7,9 +7,9 @@ import { InferValue } from "@optique/core";
|
|
|
7
7
|
* Defines `dir`, `webFramework`, `packageManager`, `kvStore`, `messageQueue`,
|
|
8
8
|
* `dryRun`, and `allowNonEmpty` options that the CLI parser will accept.
|
|
9
9
|
*/
|
|
10
|
-
declare const initOptions: _$_optique_core0.
|
|
10
|
+
declare const initOptions: _$_optique_core0.FluentParser<"sync", {
|
|
11
11
|
readonly dir: string | undefined;
|
|
12
|
-
readonly webFramework: "bare-bones" | "hono" | "nitro" | "
|
|
12
|
+
readonly webFramework: "next" | "bare-bones" | "hono" | "nitro" | "elysia" | "astro" | "express" | "nuxt" | "solidstart" | "sveltekit" | undefined;
|
|
13
13
|
readonly packageManager: "deno" | "pnpm" | "bun" | "yarn" | "npm" | undefined;
|
|
14
14
|
readonly kvStore: "postgres" | "mysql" | "in-memory" | "redis" | "denokv" | undefined;
|
|
15
15
|
readonly messageQueue: "postgres" | "mysql" | "redis" | "denokv" | "in-process" | "amqp" | undefined;
|
|
@@ -18,7 +18,7 @@ declare const initOptions: _$_optique_core0.Parser<"sync", {
|
|
|
18
18
|
readonly skipInstall: boolean;
|
|
19
19
|
}, {
|
|
20
20
|
readonly dir: [_$_optique_core0.ValueParserResult<string> | undefined] | undefined;
|
|
21
|
-
readonly webFramework: [_$_optique_core0.ValueParserResult<"bare-bones" | "hono" | "nitro" | "
|
|
21
|
+
readonly webFramework: [_$_optique_core0.ValueParserResult<"next" | "bare-bones" | "hono" | "nitro" | "elysia" | "astro" | "express" | "nuxt" | "solidstart" | "sveltekit"> | undefined] | undefined;
|
|
22
22
|
readonly packageManager: [_$_optique_core0.ValueParserResult<"deno" | "pnpm" | "bun" | "yarn" | "npm"> | undefined] | undefined;
|
|
23
23
|
readonly kvStore: [_$_optique_core0.ValueParserResult<"postgres" | "mysql" | "in-memory" | "redis" | "denokv"> | undefined] | undefined;
|
|
24
24
|
readonly messageQueue: [_$_optique_core0.ValueParserResult<"postgres" | "mysql" | "redis" | "denokv" | "in-process" | "amqp"> | undefined] | undefined;
|
|
@@ -29,9 +29,9 @@ declare const initOptions: _$_optique_core0.Parser<"sync", {
|
|
|
29
29
|
/**
|
|
30
30
|
* The `fedify init` CLI command parser.
|
|
31
31
|
*/
|
|
32
|
-
declare const initCommand: _$_optique_core0.
|
|
32
|
+
declare const initCommand: _$_optique_core0.FluentParser<"sync", {
|
|
33
33
|
readonly dir: string | undefined;
|
|
34
|
-
readonly webFramework: "bare-bones" | "hono" | "nitro" | "
|
|
34
|
+
readonly webFramework: "next" | "bare-bones" | "hono" | "nitro" | "elysia" | "astro" | "express" | "nuxt" | "solidstart" | "sveltekit" | undefined;
|
|
35
35
|
readonly packageManager: "deno" | "pnpm" | "bun" | "yarn" | "npm" | undefined;
|
|
36
36
|
readonly kvStore: "postgres" | "mysql" | "in-memory" | "redis" | "denokv" | undefined;
|
|
37
37
|
readonly messageQueue: "postgres" | "mysql" | "redis" | "denokv" | "in-process" | "amqp" | undefined;
|
package/dist/const.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import kv_default from "./json/kv.js";
|
|
2
2
|
import mq_default from "./json/mq.js";
|
|
3
|
+
import rt_default from "./json/rt.js";
|
|
3
4
|
//#region src/const.ts
|
|
4
5
|
/** All supported package manager identifiers, in display order. */
|
|
5
6
|
const PACKAGE_MANAGER = [
|
|
@@ -19,12 +20,15 @@ const WEB_FRAMEWORK = [
|
|
|
19
20
|
"astro",
|
|
20
21
|
"express",
|
|
21
22
|
"nuxt",
|
|
22
|
-
"solidstart"
|
|
23
|
+
"solidstart",
|
|
24
|
+
"sveltekit"
|
|
23
25
|
];
|
|
24
26
|
/** All supported message queue backend identifiers. */
|
|
25
27
|
const MESSAGE_QUEUE = Object.keys(mq_default);
|
|
26
28
|
/** All supported key-value store backend identifiers. */
|
|
27
29
|
const KV_STORE = Object.keys(kv_default);
|
|
30
|
+
/** All supported runtime identifiers. */
|
|
31
|
+
const RUNTIME = Object.keys(rt_default);
|
|
28
32
|
/**
|
|
29
33
|
* External database services that need to be running for integration tests.
|
|
30
34
|
* Used by the test suite to check service availability before running tests.
|
|
@@ -36,4 +40,4 @@ const DB_TO_CHECK = [
|
|
|
36
40
|
"amqp"
|
|
37
41
|
];
|
|
38
42
|
//#endregion
|
|
39
|
-
export { DB_TO_CHECK, KV_STORE, MESSAGE_QUEUE, PACKAGE_MANAGER, WEB_FRAMEWORK };
|
|
43
|
+
export { DB_TO_CHECK, KV_STORE, MESSAGE_QUEUE, PACKAGE_MANAGER, RUNTIME, WEB_FRAMEWORK };
|
package/dist/deno.js
CHANGED
package/dist/json/deps.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
//#region src/json/deps.json
|
|
2
2
|
var _hongminhee_x_forwarded_fetch = "^0.2.0";
|
|
3
|
-
var _hono_hono = "^4.12.
|
|
4
|
-
var _logtape_logtape = "^2.
|
|
3
|
+
var _hono_hono = "^4.12.33";
|
|
4
|
+
var _logtape_logtape = "^2.3.0";
|
|
5
5
|
var _std_dotenv = "^0.225.7";
|
|
6
|
-
var npm__astrojs_node = "^11.0.
|
|
6
|
+
var npm__astrojs_node = "^11.0.3";
|
|
7
7
|
var npm__deno_astro_adapter = "^0.6.0";
|
|
8
8
|
var npm__dotenvx_dotenvx = "^1.75.1";
|
|
9
9
|
var npm__elysiajs_node = "^1.4.5";
|
|
10
10
|
var npm__hono_node_server = "^1.19.12";
|
|
11
|
-
var npm__sinclair_typebox = "^0.34.
|
|
11
|
+
var npm__sinclair_typebox = "^0.34.52";
|
|
12
12
|
var npm__solidjs_router = "^0.16.1";
|
|
13
13
|
var npm__solidjs_start = "^1.3.2";
|
|
14
14
|
var npm__types_bun = "^1.3.14";
|
|
@@ -16,20 +16,20 @@ var npm__types_express = "^4.17.21";
|
|
|
16
16
|
var npm__types_node_20 = "^20.11.2";
|
|
17
17
|
var npm__types_node_22 = "^22.17.0";
|
|
18
18
|
var npm__types_node_25 = "^25.5.0";
|
|
19
|
-
var npm_astro = "^7.
|
|
20
|
-
var npm_create_astro = "^5.2.
|
|
19
|
+
var npm_astro = "^7.1.6";
|
|
20
|
+
var npm_create_astro = "^5.2.3";
|
|
21
21
|
var npm_elysia = "^1.4.29";
|
|
22
22
|
var npm_express = "^5.2.1";
|
|
23
|
-
var npm_hono = "^4.12.
|
|
23
|
+
var npm_hono = "^4.12.33";
|
|
24
24
|
var npm_openapi_types = "^12.1.3";
|
|
25
|
-
var npm_oxfmt = "^0.
|
|
26
|
-
var npm_oxlint = "^1.
|
|
27
|
-
var npm_prettier = "^3.
|
|
25
|
+
var npm_oxfmt = "^0.61.0";
|
|
26
|
+
var npm_oxlint = "^1.76.0";
|
|
27
|
+
var npm_prettier = "^3.9.6";
|
|
28
28
|
var npm_prettier_plugin_astro = "^0.14.1";
|
|
29
|
-
var npm_solid_js = "^1.9.
|
|
30
|
-
var npm_tsx = "^4.
|
|
29
|
+
var npm_solid_js = "^1.9.14";
|
|
30
|
+
var npm_tsx = "^4.23.1";
|
|
31
31
|
var npm_typescript = "^5.9.3";
|
|
32
32
|
var npm_vinxi = "^0.5.11";
|
|
33
33
|
var npm_x_forwarded_fetch = "^0.2.0";
|
|
34
34
|
//#endregion
|
|
35
|
-
export { _hongminhee_x_forwarded_fetch, _hono_hono, _logtape_logtape, _std_dotenv, npm__astrojs_node, npm__deno_astro_adapter, npm__dotenvx_dotenvx, npm__elysiajs_node, npm__hono_node_server, npm__sinclair_typebox, npm__solidjs_router, npm__solidjs_start, npm__types_bun, npm__types_express, npm__types_node_20, npm__types_node_22, npm__types_node_25, npm_astro, npm_create_astro, npm_elysia, npm_express, npm_hono, npm_openapi_types, npm_oxfmt, npm_oxlint, npm_prettier, npm_prettier_plugin_astro, npm_solid_js, npm_tsx, npm_typescript, npm_vinxi, npm_x_forwarded_fetch };
|
|
35
|
+
export { _hongminhee_x_forwarded_fetch as "@hongminhee/x-forwarded-fetch", _hono_hono as "@hono/hono", _logtape_logtape as "@logtape/logtape", _std_dotenv as "@std/dotenv", npm__astrojs_node as "npm:@astrojs/node", npm__deno_astro_adapter as "npm:@deno/astro-adapter", npm__dotenvx_dotenvx as "npm:@dotenvx/dotenvx", npm__elysiajs_node as "npm:@elysiajs/node", npm__hono_node_server as "npm:@hono/node-server", npm__sinclair_typebox as "npm:@sinclair/typebox", npm__solidjs_router as "npm:@solidjs/router", npm__solidjs_start as "npm:@solidjs/start", npm__types_bun as "npm:@types/bun", npm__types_express as "npm:@types/express", npm__types_node_20 as "npm:@types/node@20", npm__types_node_22 as "npm:@types/node@22", npm__types_node_25 as "npm:@types/node@25", npm_astro as "npm:astro", npm_create_astro as "npm:create-astro", npm_elysia as "npm:elysia", npm_express as "npm:express", npm_hono as "npm:hono", npm_openapi_types as "npm:openapi-types", npm_oxfmt as "npm:oxfmt", npm_oxlint as "npm:oxlint", npm_prettier as "npm:prettier", npm_prettier_plugin_astro as "npm:prettier-plugin-astro", npm_solid_js as "npm:solid-js", npm_tsx as "npm:tsx", npm_typescript as "npm:typescript", npm_vinxi as "npm:vinxi", npm_x_forwarded_fetch as "npm:x-forwarded-fetch" };
|
package/dist/json/deps.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"@hongminhee/x-forwarded-fetch": "^0.2.0",
|
|
3
|
-
"@hono/hono": "^4.12.
|
|
4
|
-
"@logtape/logtape": "^2.
|
|
3
|
+
"@hono/hono": "^4.12.33",
|
|
4
|
+
"@logtape/logtape": "^2.3.0",
|
|
5
5
|
"@std/dotenv": "^0.225.7",
|
|
6
|
-
"npm:@astrojs/node": "^11.0.
|
|
6
|
+
"npm:@astrojs/node": "^11.0.3",
|
|
7
7
|
"npm:@deno/astro-adapter": "^0.6.0",
|
|
8
8
|
"npm:@dotenvx/dotenvx": "^1.75.1",
|
|
9
9
|
"npm:@elysiajs/node": "^1.4.5",
|
|
10
10
|
"npm:@hono/node-server": "^1.19.12",
|
|
11
|
-
"npm:@nuxt/kit": "^4.
|
|
12
|
-
"npm:@sinclair/typebox": "^0.34.
|
|
11
|
+
"npm:@nuxt/kit": "^4.5.1",
|
|
12
|
+
"npm:@sinclair/typebox": "^0.34.52",
|
|
13
13
|
"npm:@solidjs/router": "^0.16.1",
|
|
14
14
|
"npm:@solidjs/start": "^1.3.2",
|
|
15
15
|
"npm:@types/bun": "^1.3.14",
|
|
@@ -17,21 +17,21 @@
|
|
|
17
17
|
"npm:@types/node@20": "^20.11.2",
|
|
18
18
|
"npm:@types/node@22": "^22.17.0",
|
|
19
19
|
"npm:@types/node@25": "^25.5.0",
|
|
20
|
-
"npm:astro": "^7.
|
|
21
|
-
"npm:create-astro": "^5.2.
|
|
20
|
+
"npm:astro": "^7.1.6",
|
|
21
|
+
"npm:create-astro": "^5.2.3",
|
|
22
22
|
"npm:elysia": "^1.4.29",
|
|
23
23
|
"npm:express": "^5.2.1",
|
|
24
24
|
"npm:h3": "^1.15.0",
|
|
25
|
-
"npm:hono": "^4.12.
|
|
26
|
-
"npm:nuxi": "^3.
|
|
27
|
-
"npm:nuxt": "^4.
|
|
25
|
+
"npm:hono": "^4.12.33",
|
|
26
|
+
"npm:nuxi": "^3.37.0",
|
|
27
|
+
"npm:nuxt": "^4.5.1",
|
|
28
28
|
"npm:openapi-types": "^12.1.3",
|
|
29
|
-
"npm:oxfmt": "^0.
|
|
30
|
-
"npm:oxlint": "^1.
|
|
31
|
-
"npm:prettier": "^3.
|
|
29
|
+
"npm:oxfmt": "^0.61.0",
|
|
30
|
+
"npm:oxlint": "^1.76.0",
|
|
31
|
+
"npm:prettier": "^3.9.6",
|
|
32
32
|
"npm:prettier-plugin-astro": "^0.14.1",
|
|
33
|
-
"npm:solid-js": "^1.9.
|
|
34
|
-
"npm:tsx": "^4.
|
|
33
|
+
"npm:solid-js": "^1.9.14",
|
|
34
|
+
"npm:tsx": "^4.23.1",
|
|
35
35
|
"npm:typescript": "^5.9.3",
|
|
36
36
|
"npm:vinxi": "^0.5.11",
|
|
37
37
|
"npm:x-forwarded-fetch": "^0.2.0"
|
package/dist/json/kv.js
CHANGED
package/dist/json/kv.json
CHANGED
package/dist/json/mq.js
CHANGED
|
@@ -55,7 +55,7 @@ var mq_default = {
|
|
|
55
55
|
"yarn",
|
|
56
56
|
"pnpm"
|
|
57
57
|
],
|
|
58
|
-
"dependencies": { "npm:mysql2": "^3.
|
|
58
|
+
"dependencies": { "npm:mysql2": "^3.23.2" },
|
|
59
59
|
"imports": {
|
|
60
60
|
"@fedify/mysql": { "MysqlMessageQueue": "MysqlMessageQueue" },
|
|
61
61
|
"mysql2/promise": { "default": "mysql" }
|
package/dist/json/mq.json
CHANGED
package/dist/json/rt.js
CHANGED
|
@@ -3,27 +3,20 @@ var rt_default = {
|
|
|
3
3
|
deno: {
|
|
4
4
|
"label": "Deno",
|
|
5
5
|
"checkCommand": ["deno", "--version"],
|
|
6
|
-
"outputPattern": "^deno\\s
|
|
6
|
+
"outputPattern": "^deno\\s+(\\d+\\.\\d+\\.\\d+\\b)",
|
|
7
|
+
"minVersion": "2.0.0"
|
|
7
8
|
},
|
|
8
9
|
bun: {
|
|
9
10
|
"label": "Bun",
|
|
10
11
|
"checkCommand": ["bun", "--version"],
|
|
11
|
-
"outputPattern": "
|
|
12
|
+
"outputPattern": "^(\\d+\\.\\d+\\.\\d+\\b)",
|
|
13
|
+
"minVersion": "1.1.0"
|
|
12
14
|
},
|
|
13
|
-
|
|
15
|
+
node: {
|
|
14
16
|
"label": "Node.js",
|
|
15
17
|
"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+$"
|
|
18
|
+
"outputPattern": "^v(\\d+\\.\\d+\\.\\d+\\b)",
|
|
19
|
+
"minVersion": "22.0.0"
|
|
27
20
|
}
|
|
28
21
|
};
|
|
29
22
|
//#endregion
|
package/dist/json/rt.json
CHANGED
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
"deno",
|
|
6
6
|
"--version"
|
|
7
7
|
],
|
|
8
|
-
"outputPattern": "^deno\\s
|
|
8
|
+
"outputPattern": "^deno\\s+(\\d+\\.\\d+\\.\\d+\\b)",
|
|
9
|
+
"minVersion": "2.0.0"
|
|
9
10
|
},
|
|
10
11
|
"bun": {
|
|
11
12
|
"label": "Bun",
|
|
@@ -13,30 +14,16 @@
|
|
|
13
14
|
"bun",
|
|
14
15
|
"--version"
|
|
15
16
|
],
|
|
16
|
-
"outputPattern": "
|
|
17
|
+
"outputPattern": "^(\\d+\\.\\d+\\.\\d+\\b)",
|
|
18
|
+
"minVersion": "1.1.0"
|
|
17
19
|
},
|
|
18
|
-
"
|
|
20
|
+
"node": {
|
|
19
21
|
"label": "Node.js",
|
|
20
22
|
"checkCommand": [
|
|
21
23
|
"node",
|
|
22
24
|
"--version"
|
|
23
25
|
],
|
|
24
|
-
"outputPattern": "^v\\d+\\.\\d+\\.\\d
|
|
25
|
-
|
|
26
|
-
"yarn": {
|
|
27
|
-
"label": "Node.js",
|
|
28
|
-
"checkCommand": [
|
|
29
|
-
"node",
|
|
30
|
-
"--version"
|
|
31
|
-
],
|
|
32
|
-
"outputPattern": "^v\\d+\\.\\d+\\.\\d+$"
|
|
33
|
-
},
|
|
34
|
-
"npm": {
|
|
35
|
-
"label": "Node.js",
|
|
36
|
-
"checkCommand": [
|
|
37
|
-
"node",
|
|
38
|
-
"--version"
|
|
39
|
-
],
|
|
40
|
-
"outputPattern": "^v\\d+\\.\\d+\\.\\d+$"
|
|
26
|
+
"outputPattern": "^v(\\d+\\.\\d+\\.\\d+\\b)",
|
|
27
|
+
"minVersion": "22.0.0"
|
|
41
28
|
}
|
|
42
29
|
}
|