create-feltkit 0.3.20 → 0.3.21
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/bin/create.js
CHANGED
|
@@ -98,6 +98,22 @@ const dir = dirIndex >= 0 ? args[dirIndex] : "my-feltkit-app";
|
|
|
98
98
|
if (!template) {
|
|
99
99
|
// The default: compose. Everything after the directory is the composer's to interpret, so a flag added to
|
|
100
100
|
// `feltkit create` works here the day it ships, without this file knowing about it.
|
|
101
|
+
//
|
|
102
|
+
// With no terminal, and nothing in the arguments saying what to do instead, refuse here rather than letting the
|
|
103
|
+
// composer refuse. Both refuse for the same good reason — an interview needs someone to answer it — but the
|
|
104
|
+
// composer answers in its own vocabulary, telling the reader to run `feltkit create …`, which is not a command
|
|
105
|
+
// someone who typed `npm create feltkit` has. This is the caller that most often has no terminal (a script, a
|
|
106
|
+
// container build, a test), so it is the caller whose routes the message should name.
|
|
107
|
+
if (!process.stdin.isTTY && !args.includes("--yes") && !args.includes("--interactive")) {
|
|
108
|
+
console.error(`${red("✗")} Not a terminal, so the composition interview cannot be answered. Nothing was written.`);
|
|
109
|
+
console.error(" Choose one:");
|
|
110
|
+
console.error(` npm create feltkit@latest ${dir} -- --template tasks a complete starter, no questions`);
|
|
111
|
+
console.error(` npm create feltkit@latest ${dir} -- --yes --param identity.accounts.emailFrom=auth@example.com`);
|
|
112
|
+
console.error(" compose from flags, no questions");
|
|
113
|
+
console.error(` npm create feltkit@latest ${dir} -- --interactive answer the questions over a pipe`);
|
|
114
|
+
console.error(dim(` Starters: ${Object.keys(TEMPLATES).join(", ")}. Every composition flag: npm create feltkit@latest ${dir} -- --help`));
|
|
115
|
+
process.exit(1);
|
|
116
|
+
}
|
|
101
117
|
const bin = composerBin();
|
|
102
118
|
if (!bin) {
|
|
103
119
|
console.error(`${red("✗")} ${COMPOSER} is not installed beside this package, so the composition interview cannot be started.`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-feltkit",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.21",
|
|
4
4
|
"description": "Create a FeltKit application: npm create feltkit@latest my-app (add -- --template managed for Managed FeltDB)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -37,6 +37,6 @@
|
|
|
37
37
|
},
|
|
38
38
|
"homepage": "https://www.npmjs.com/package/create-feltkit",
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@feltdb/feltkit": "0.3.
|
|
40
|
+
"@feltdb/feltkit": "0.3.21"
|
|
41
41
|
}
|
|
42
42
|
}
|
package/template/package.json
CHANGED