firebase-dataconnect-bootstrap 0.1.0 → 1.1.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/dist/prompt.js +11 -11
- package/package.json +1 -1
package/dist/prompt.js
CHANGED
|
@@ -35,7 +35,7 @@ export async function collectConfig(parsed) {
|
|
|
35
35
|
const defaults = normalizeConfig(parsed);
|
|
36
36
|
if (parsed.yes) {
|
|
37
37
|
if (!defaults.projectId) {
|
|
38
|
-
throw new Error("`--
|
|
38
|
+
throw new Error("`--yes` を使う場合は `--project` が必須です。");
|
|
39
39
|
}
|
|
40
40
|
return defaults;
|
|
41
41
|
}
|
|
@@ -45,21 +45,21 @@ export async function collectConfig(parsed) {
|
|
|
45
45
|
const answer = await rl.question(`${label} [${fallback}]: `);
|
|
46
46
|
const value = answer.trim() || fallback;
|
|
47
47
|
if (!value && required) {
|
|
48
|
-
throw new Error(`${label}
|
|
48
|
+
throw new Error(`${label} は必須です。`);
|
|
49
49
|
}
|
|
50
50
|
return value;
|
|
51
51
|
};
|
|
52
|
-
console.log("Firebase Data Connect / Cloud Functions
|
|
52
|
+
console.log("Firebase Data Connect / Cloud Functions セットアップ");
|
|
53
53
|
console.log("");
|
|
54
|
-
const targetDir = resolve(await ask("
|
|
55
|
-
const projectId = await ask("Firebase
|
|
56
|
-
const region = await ask("Functions
|
|
57
|
-
const serviceId = await ask("Data Connect
|
|
58
|
-
const location = await ask("Data Connect
|
|
59
|
-
const documentPath = await ask("Firestore
|
|
60
|
-
const rawFunctionName = await ask("
|
|
54
|
+
const targetDir = resolve(await ask("対象リポジトリのパス", defaults.targetDir, true));
|
|
55
|
+
const projectId = await ask("Firebase プロジェクトID", defaults.projectId || "my-project", true);
|
|
56
|
+
const region = await ask("Functions のリージョン", defaults.region, true);
|
|
57
|
+
const serviceId = await ask("Data Connect サービスID", `${projectId}-service`, true);
|
|
58
|
+
const location = await ask("Data Connect ロケーション", defaults.location || region, true);
|
|
59
|
+
const documentPath = await ask("Firestore ドキュメントパス", defaults.documentPath, true);
|
|
60
|
+
const rawFunctionName = await ask("関数のエクスポート名", defaults.functionName, true);
|
|
61
61
|
const functionName = normalizeFunctionName(rawFunctionName);
|
|
62
|
-
const installRaw = await ask("
|
|
62
|
+
const installRaw = await ask("functions ディレクトリで npm install を実行しますか? (y/n)", defaults.installDependencies ? "y" : "n", true);
|
|
63
63
|
const installDependencies = installRaw.toLowerCase().startsWith("y");
|
|
64
64
|
return {
|
|
65
65
|
targetDir,
|