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.
Files changed (2) hide show
  1. package/dist/prompt.js +11 -11
  2. 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("`--project` is required when using --yes.");
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} is required.`);
48
+ throw new Error(`${label} は必須です。`);
49
49
  }
50
50
  return value;
51
51
  };
52
- console.log("Firebase Data Connect / Cloud Functions bootstrap");
52
+ console.log("Firebase Data Connect / Cloud Functions セットアップ");
53
53
  console.log("");
54
- const targetDir = resolve(await ask("Target repository path", defaults.targetDir, true));
55
- const projectId = await ask("Firebase project id", defaults.projectId || "my-project", true);
56
- const region = await ask("Functions region", defaults.region, true);
57
- const serviceId = await ask("Data Connect service id", `${projectId}-service`, true);
58
- const location = await ask("Data Connect location", defaults.location || region, true);
59
- const documentPath = await ask("Firestore document path", defaults.documentPath, true);
60
- const rawFunctionName = await ask("Function export name", defaults.functionName, true);
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("Run npm install in functions directory? (y/n)", defaults.installDependencies ? "y" : "n", true);
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,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "firebase-dataconnect-bootstrap",
3
- "version": "0.1.0",
3
+ "version": "1.1.0",
4
4
  "description": "Bootstrap Firebase Data Connect and Firestore onDocumentWritten function setup in any repository.",
5
5
  "type": "module",
6
6
  "bin": {