firebase-tools-with-isolate 14.10.1 → 14.16.0-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 (236) hide show
  1. package/lib/api.js +5 -1
  2. package/lib/apphosting/backend.js +40 -15
  3. package/lib/apptesting/ensureProjectConfigured.js +56 -0
  4. package/lib/apptesting/invokeTests.js +40 -0
  5. package/lib/apptesting/parseTestFiles.js +75 -0
  6. package/lib/apptesting/types.js +18 -0
  7. package/lib/auth.js +37 -2
  8. package/lib/command.js +24 -5
  9. package/lib/commands/apphosting-backends-create.js +8 -5
  10. package/lib/commands/apptesting-execute.js +101 -0
  11. package/lib/commands/dataconnect-sdk-generate.js +28 -26
  12. package/lib/commands/dataconnect-services-list.js +1 -1
  13. package/lib/commands/dataconnect-sql-diff.js +2 -2
  14. package/lib/commands/dataconnect-sql-grant.js +7 -2
  15. package/lib/commands/dataconnect-sql-migrate.js +2 -2
  16. package/lib/commands/dataconnect-sql-setup.js +3 -5
  17. package/lib/commands/dataconnect-sql-shell.js +2 -2
  18. package/lib/commands/ext-export.js +1 -1
  19. package/lib/commands/firestore-bulkdelete.js +73 -0
  20. package/lib/commands/firestore-databases-create.js +11 -0
  21. package/lib/commands/firestore-operations-cancel.js +44 -0
  22. package/lib/commands/firestore-operations-describe.js +29 -0
  23. package/lib/commands/firestore-operations-list.js +29 -0
  24. package/lib/commands/firestore-utils.js +15 -0
  25. package/lib/commands/functions-config-clone.js +2 -0
  26. package/lib/commands/functions-config-export.js +5 -2
  27. package/lib/commands/functions-config-get.js +2 -0
  28. package/lib/commands/functions-config-set.js +2 -0
  29. package/lib/commands/functions-config-unset.js +2 -0
  30. package/lib/commands/index.js +9 -0
  31. package/lib/commands/init.js +24 -4
  32. package/lib/commands/internaltesting-functions-discover.js +20 -5
  33. package/lib/commands/login.js +13 -9
  34. package/lib/commands/use.js +5 -0
  35. package/lib/config.js +16 -4
  36. package/lib/crashlytics/addNote.js +27 -0
  37. package/lib/crashlytics/buildToolsJarHelper.js +1 -2
  38. package/lib/crashlytics/deleteNote.js +23 -0
  39. package/lib/crashlytics/getIssueDetails.js +26 -0
  40. package/lib/crashlytics/getSampleCrash.js +34 -0
  41. package/lib/crashlytics/listNotes.js +29 -0
  42. package/lib/crashlytics/listTopDevices.js +33 -0
  43. package/lib/crashlytics/listTopIssues.js +8 -23
  44. package/lib/crashlytics/listTopOperatingSystems.js +32 -0
  45. package/lib/crashlytics/listTopVersions.js +32 -0
  46. package/lib/crashlytics/updateIssue.js +35 -0
  47. package/lib/crashlytics/utils.js +38 -0
  48. package/lib/dataconnect/appFinder.js +102 -0
  49. package/lib/dataconnect/client.js +23 -15
  50. package/lib/dataconnect/ensureApis.js +6 -9
  51. package/lib/dataconnect/errors.js +7 -1
  52. package/lib/dataconnect/freeTrial.js +16 -38
  53. package/lib/dataconnect/load.js +105 -6
  54. package/lib/dataconnect/provisionCloudSql.js +67 -70
  55. package/lib/dataconnect/schemaMigration.js +219 -169
  56. package/lib/deploy/dataconnect/deploy.js +7 -9
  57. package/lib/deploy/dataconnect/prepare.js +7 -12
  58. package/lib/deploy/dataconnect/release.js +43 -31
  59. package/lib/deploy/firestore/deploy.js +10 -0
  60. package/lib/deploy/functions/backend.js +7 -1
  61. package/lib/deploy/functions/build.js +28 -14
  62. package/lib/deploy/functions/deploy.js +3 -2
  63. package/lib/deploy/functions/ensure.js +1 -1
  64. package/lib/deploy/functions/functionsDeployHelper.js +8 -1
  65. package/lib/deploy/functions/params.js +4 -0
  66. package/lib/deploy/functions/prepare.js +25 -13
  67. package/lib/deploy/functions/pricing.js +12 -5
  68. package/lib/deploy/functions/release/fabricator.js +25 -3
  69. package/lib/deploy/functions/release/reporter.js +1 -0
  70. package/lib/deploy/functions/runtimes/discovery/index.js +52 -5
  71. package/lib/deploy/functions/runtimes/node/index.js +83 -51
  72. package/lib/emulator/auth/operations.js +10 -1
  73. package/lib/emulator/commandUtils.js +7 -1
  74. package/lib/emulator/controller.js +22 -34
  75. package/lib/emulator/dataconnectEmulator.js +27 -24
  76. package/lib/emulator/downloadableEmulatorInfo.json +18 -18
  77. package/lib/emulator/env.js +2 -1
  78. package/lib/emulator/functionsEmulator.js +12 -2
  79. package/lib/emulator/hub.js +11 -8
  80. package/lib/emulator/tasksEmulator.js +1 -1
  81. package/lib/emulator/ui.js +3 -1
  82. package/lib/env.js +18 -0
  83. package/lib/experiments.js +20 -0
  84. package/lib/extensions/extensionsHelper.js +4 -15
  85. package/lib/extensions/runtimes/common.js +3 -2
  86. package/lib/extensions/utils.js +1 -12
  87. package/lib/firestore/api-sort.js +96 -3
  88. package/lib/firestore/api-types.js +20 -1
  89. package/lib/firestore/api.js +144 -15
  90. package/lib/firestore/pretty-print.js +35 -1
  91. package/lib/firestore/validator.js +1 -1
  92. package/lib/functional.js +7 -1
  93. package/lib/functions/deprecationWarnings.js +21 -0
  94. package/lib/functions/env.js +31 -16
  95. package/lib/functions/projectConfig.js +87 -8
  96. package/lib/functions/secrets.js +3 -0
  97. package/lib/gcp/cloudfunctions.js +1 -6
  98. package/lib/gcp/cloudfunctionsv2.js +3 -39
  99. package/lib/gcp/cloudscheduler.js +1 -1
  100. package/lib/gcp/cloudsql/cloudsqladmin.js +4 -16
  101. package/lib/gcp/cloudsql/connect.js +4 -3
  102. package/lib/gcp/cloudsql/permissionsSetup.js +23 -16
  103. package/lib/gcp/k8s.js +32 -0
  104. package/lib/gcp/runv2.js +181 -0
  105. package/lib/gemini/fdcExperience.js +5 -3
  106. package/lib/init/features/aitools/claude.js +43 -0
  107. package/lib/init/features/aitools/cursor.js +61 -0
  108. package/lib/init/features/aitools/gemini.js +58 -0
  109. package/lib/init/features/aitools/index.js +28 -0
  110. package/lib/init/features/aitools/promptUpdater.js +111 -0
  111. package/lib/init/features/aitools/studio.js +17 -0
  112. package/lib/init/features/aitools/types.js +2 -0
  113. package/lib/init/features/aitools.js +83 -0
  114. package/lib/init/features/apptesting/index.js +34 -0
  115. package/lib/init/features/dataconnect/create_app.js +53 -0
  116. package/lib/init/features/dataconnect/index.js +280 -186
  117. package/lib/init/features/dataconnect/sdk.js +232 -144
  118. package/lib/init/features/index.js +8 -3
  119. package/lib/init/features/project.js +4 -0
  120. package/lib/init/index.js +18 -2
  121. package/lib/management/apps.js +3 -3
  122. package/lib/management/studio.js +120 -0
  123. package/lib/mcp/errors.js +5 -7
  124. package/lib/mcp/index.js +179 -61
  125. package/lib/mcp/logging-transport.js +23 -0
  126. package/lib/mcp/prompt.js +10 -0
  127. package/lib/mcp/prompts/core/deploy.js +101 -0
  128. package/lib/mcp/prompts/core/index.js +5 -0
  129. package/lib/mcp/prompts/crashlytics/connect.js +114 -0
  130. package/lib/mcp/prompts/crashlytics/index.js +5 -0
  131. package/lib/mcp/prompts/dataconnect/index.js +9 -0
  132. package/lib/mcp/prompts/dataconnect/schema.js +67 -0
  133. package/lib/mcp/prompts/index.js +47 -0
  134. package/lib/mcp/tools/apphosting/fetch_logs.js +22 -22
  135. package/lib/mcp/tools/apphosting/list_backends.js +10 -10
  136. package/lib/mcp/tools/auth/disable_user.js +7 -7
  137. package/lib/mcp/tools/auth/get_user.js +13 -6
  138. package/lib/mcp/tools/auth/index.js +10 -10
  139. package/lib/mcp/tools/auth/list_users.js +6 -6
  140. package/lib/mcp/tools/auth/set_claims.js +7 -7
  141. package/lib/mcp/tools/auth/set_sms_region_policy.js +6 -6
  142. package/lib/mcp/tools/core/consult_assistant.js +13 -8
  143. package/lib/mcp/tools/core/create_android_sha.js +9 -9
  144. package/lib/mcp/tools/core/create_app.js +7 -7
  145. package/lib/mcp/tools/core/create_project.js +13 -13
  146. package/lib/mcp/tools/core/get_admin_sdk_config.js +7 -7
  147. package/lib/mcp/tools/core/get_environment.js +8 -8
  148. package/lib/mcp/tools/core/get_project.js +5 -5
  149. package/lib/mcp/tools/core/get_sdk_config.js +19 -9
  150. package/lib/mcp/tools/core/index.js +28 -24
  151. package/lib/mcp/tools/core/init.js +39 -16
  152. package/lib/mcp/tools/core/list_apps.js +6 -6
  153. package/lib/mcp/tools/core/list_projects.js +6 -6
  154. package/lib/mcp/tools/core/login.js +46 -0
  155. package/lib/mcp/tools/core/logout.js +62 -0
  156. package/lib/mcp/tools/core/update_environment.js +10 -10
  157. package/lib/mcp/tools/crashlytics/add_note.js +32 -0
  158. package/lib/mcp/tools/crashlytics/constants.js +11 -0
  159. package/lib/mcp/tools/crashlytics/delete_note.js +35 -0
  160. package/lib/mcp/tools/crashlytics/get_issue_details.js +31 -0
  161. package/lib/mcp/tools/crashlytics/get_sample_crash.js +43 -0
  162. package/lib/mcp/tools/crashlytics/index.js +22 -2
  163. package/lib/mcp/tools/crashlytics/list_notes.js +37 -0
  164. package/lib/mcp/tools/crashlytics/list_top_devices.js +33 -0
  165. package/lib/mcp/tools/crashlytics/list_top_issues.js +12 -13
  166. package/lib/mcp/tools/crashlytics/list_top_operating_systems.js +33 -0
  167. package/lib/mcp/tools/crashlytics/list_top_versions.js +33 -0
  168. package/lib/mcp/tools/crashlytics/update_issue.js +37 -0
  169. package/lib/mcp/tools/database/get_data.js +49 -0
  170. package/lib/mcp/tools/database/get_rules.js +39 -0
  171. package/lib/mcp/tools/database/index.js +8 -0
  172. package/lib/mcp/tools/database/set_data.js +57 -0
  173. package/lib/mcp/tools/database/validate_rules.js +41 -0
  174. package/lib/mcp/tools/dataconnect/compile.js +43 -0
  175. package/lib/mcp/tools/dataconnect/execute.js +71 -0
  176. package/lib/mcp/tools/dataconnect/generate_operation.js +8 -8
  177. package/lib/mcp/tools/dataconnect/generate_schema.js +6 -6
  178. package/lib/mcp/tools/dataconnect/index.js +10 -18
  179. package/lib/mcp/tools/dataconnect/list_services.js +107 -11
  180. package/lib/mcp/tools/firestore/delete_document.js +13 -13
  181. package/lib/mcp/tools/firestore/get_documents.js +13 -13
  182. package/lib/mcp/tools/firestore/list_collections.js +7 -10
  183. package/lib/mcp/tools/firestore/query_collection.js +13 -13
  184. package/lib/mcp/tools/index.js +24 -18
  185. package/lib/mcp/tools/messaging/index.js +2 -2
  186. package/lib/mcp/tools/messaging/send_message.js +7 -7
  187. package/lib/mcp/tools/remoteconfig/get_template.js +5 -5
  188. package/lib/mcp/tools/remoteconfig/index.js +4 -4
  189. package/lib/mcp/tools/remoteconfig/publish_template.js +7 -7
  190. package/lib/mcp/tools/remoteconfig/rollback_template.js +6 -6
  191. package/lib/mcp/tools/rules/get_rules.js +8 -8
  192. package/lib/mcp/tools/rules/validate_rules.js +10 -10
  193. package/lib/mcp/tools/storage/get_download_url.js +8 -8
  194. package/lib/mcp/tools/storage/get_rules.js +8 -8
  195. package/lib/mcp/types.js +2 -0
  196. package/lib/mcp/util/dataconnect/compile.js +20 -0
  197. package/lib/mcp/util/dataconnect/content.js +655 -0
  198. package/lib/mcp/util/dataconnect/emulator.js +16 -0
  199. package/lib/mcp/util.js +5 -18
  200. package/lib/requireAuth.js +14 -4
  201. package/lib/rtdb.js +10 -6
  202. package/lib/scopes.js +2 -1
  203. package/lib/serve/functions.js +4 -3
  204. package/lib/timeout.js +21 -0
  205. package/lib/track.js +18 -1
  206. package/lib/unzip.js +13 -0
  207. package/lib/utils.js +76 -2
  208. package/package.json +6 -4
  209. package/prompts/FIREBASE.md +121 -0
  210. package/prompts/FIREBASE_FUNCTIONS.md +221 -0
  211. package/schema/apptesting-yaml.json +64 -0
  212. package/schema/firebase-config.json +163 -53
  213. package/templates/init/aitools/cursor-rules-header.txt +8 -0
  214. package/templates/init/aitools/gemini-extension.json +11 -0
  215. package/templates/init/apptesting/smoke_test.yaml +6 -0
  216. package/templates/init/dataconnect/connector.yaml +0 -16
  217. package/templates/init/dataconnect/dataconnect.yaml +2 -1
  218. package/templates/init/dataconnect/mutations.gql +29 -29
  219. package/templates/init/dataconnect/queries.gql +73 -73
  220. package/templates/init/dataconnect/schema.gql +48 -48
  221. package/templates/init/firestore/firestore.indexes.json +26 -1
  222. package/lib/dataconnect/fileUtils.js +0 -168
  223. package/lib/emulator/adminSdkConfig.test.js +0 -16
  224. package/lib/extensions/resolveSource.js +0 -23
  225. package/lib/firestore/api-sort.test.js +0 -74
  226. package/lib/firestore/backupUtils.test.js +0 -18
  227. package/lib/firestore/pretty-print.test.js +0 -61
  228. package/lib/firestore/util.test.js +0 -42
  229. package/lib/mcp/tools/dataconnect/emulator.js +0 -16
  230. package/lib/mcp/tools/dataconnect/execute_graphql.js +0 -48
  231. package/lib/mcp/tools/dataconnect/execute_graphql_read.js +0 -48
  232. package/lib/mcp/tools/dataconnect/execute_mutation.js +0 -62
  233. package/lib/mcp/tools/dataconnect/execute_query.js +0 -62
  234. package/lib/mcp/tools/dataconnect/get_connector.js +0 -31
  235. package/lib/mcp/tools/dataconnect/get_schema.js +0 -31
  236. /package/lib/mcp/{tools → util}/dataconnect/converter.js +0 -0
@@ -1,18 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.brownfieldSqlSetup = exports.setupBrownfieldAsGreenfield = exports.getSchemaMetadata = exports.greenFieldSchemaSetup = exports.setupSQLPermissions = exports.checkSQLRoleIsGranted = exports.fdcSqlRoleMap = exports.SchemaSetupStatus = void 0;
3
+ exports.grantRoleTo = exports.brownfieldSqlSetup = exports.setupBrownfieldAsGreenfield = exports.getSchemaMetadata = exports.greenFieldSchemaSetup = exports.setupSQLPermissions = exports.checkSQLRoleIsGranted = exports.fdcSqlRoleMap = exports.SchemaSetupStatus = void 0;
4
4
  const clc = require("colorette");
5
5
  const permissions_1 = require("./permissions");
6
6
  const cloudsqladmin_1 = require("./cloudsqladmin");
7
- const connect_1 = require("./connect");
8
7
  const logger_1 = require("../../logger");
9
8
  const prompt_1 = require("../../prompt");
10
9
  const error_1 = require("../../error");
11
10
  const projectUtils_1 = require("../../projectUtils");
12
- const connect_2 = require("./connect");
11
+ const connect_1 = require("./connect");
13
12
  const lodash_1 = require("lodash");
14
- const connect_3 = require("./connect");
13
+ const connect_2 = require("./connect");
15
14
  const utils = require("../../utils");
15
+ const cloudSqlAdminClient = require("./cloudsqladmin");
16
16
  var SchemaSetupStatus;
17
17
  (function (SchemaSetupStatus) {
18
18
  SchemaSetupStatus["NotSetup"] = "not-setup";
@@ -53,7 +53,7 @@ async function checkSQLRoleIsGranted(options, instanceId, databaseId, grantedRol
53
53
  END $$;
54
54
  `;
55
55
  try {
56
- await (0, connect_2.executeSqlCmdsAsIamUser)(options, instanceId, databaseId, [checkCmd], true);
56
+ await (0, connect_1.executeSqlCmdsAsIamUser)(options, instanceId, databaseId, [checkCmd], true);
57
57
  return true;
58
58
  }
59
59
  catch (e) {
@@ -77,7 +77,6 @@ async function setupSQLPermissions(instanceId, databaseId, schemaInfo, options,
77
77
  if (!userIsCSQLAdmin) {
78
78
  throw new error_1.FirebaseError(`Missing required IAM permission to setup SQL schemas. SQL schema setup requires 'roles/cloudsql.admin' or an equivalent role.`);
79
79
  }
80
- await (0, connect_1.setupIAMUsers)(instanceId, databaseId, options);
81
80
  let runGreenfieldSetup = false;
82
81
  if (schemaInfo.setupStatus === SchemaSetupStatus.GreenField) {
83
82
  runGreenfieldSetup = true;
@@ -89,7 +88,7 @@ async function setupSQLPermissions(instanceId, databaseId, schemaInfo, options,
89
88
  }
90
89
  if (runGreenfieldSetup) {
91
90
  const greenfieldSetupCmds = await greenFieldSchemaSetup(instanceId, databaseId, schema, options);
92
- await (0, connect_2.executeSqlCmdsAsSuperUser)(options, instanceId, databaseId, greenfieldSetupCmds, silent, true);
91
+ await (0, connect_1.executeSqlCmdsAsSuperUser)(options, instanceId, databaseId, greenfieldSetupCmds, silent, true);
93
92
  logFn(clc.green("Database setup complete."));
94
93
  return SchemaSetupStatus.GreenField;
95
94
  }
@@ -125,15 +124,15 @@ async function greenFieldSchemaSetup(instanceId, databaseId, schema, options) {
125
124
  logger_1.logger.warn("Detected cloudsqlsuperuser was previously given to firebase owner, revoking to improve database security.");
126
125
  revokes.push(`REVOKE "cloudsqlsuperuser" FROM "${(0, permissions_1.firebaseowner)(databaseId)}"`);
127
126
  }
128
- const user = (await (0, connect_2.getIAMUser)(options)).user;
127
+ const user = (await (0, connect_1.getIAMUser)(options)).user;
129
128
  const projectNumber = await (0, projectUtils_1.needProjectNumber)(options);
130
- const { user: fdcP4SAUser } = (0, connect_3.toDatabaseUser)((0, connect_3.getDataConnectP4SA)(projectNumber));
129
+ const { user: fdcP4SAUser } = (0, connect_2.toDatabaseUser)((0, connect_2.getDataConnectP4SA)(projectNumber));
131
130
  const sqlRoleSetupCmds = (0, lodash_1.concat)(revokes, [`CREATE SCHEMA IF NOT EXISTS "${schema}"`], (0, permissions_1.ownerRolePermissions)(databaseId, permissions_1.FIREBASE_SUPER_USER, schema), (0, permissions_1.writerRolePermissions)(databaseId, permissions_1.FIREBASE_SUPER_USER, schema), (0, permissions_1.readerRolePermissions)(databaseId, permissions_1.FIREBASE_SUPER_USER, schema), `GRANT "${(0, permissions_1.firebaseowner)(databaseId, schema)}" TO "${user}"`, `GRANT "${(0, permissions_1.firebasewriter)(databaseId, schema)}" TO "${fdcP4SAUser}"`, (0, permissions_1.defaultPermissions)(databaseId, schema, (0, permissions_1.firebaseowner)(databaseId, schema)));
132
131
  return sqlRoleSetupCmds;
133
132
  }
134
133
  exports.greenFieldSchemaSetup = greenFieldSchemaSetup;
135
134
  async function getSchemaMetadata(instanceId, databaseId, schema, options) {
136
- const checkSchemaExists = await (0, connect_2.executeSqlCmdsAsIamUser)(options, instanceId, databaseId, [
135
+ const checkSchemaExists = await (0, connect_1.executeSqlCmdsAsIamUser)(options, instanceId, databaseId, [
137
136
  `SELECT pg_get_userbyid(nspowner)
138
137
  FROM pg_namespace
139
138
  WHERE nspname = '${schema}';`,
@@ -148,7 +147,7 @@ async function getSchemaMetadata(instanceId, databaseId, schema, options) {
148
147
  }
149
148
  const schemaOwner = checkSchemaExists[0].rows[0].pg_get_userbyid;
150
149
  const cmd = `SELECT tablename, tableowner FROM pg_tables WHERE schemaname='${schema}'`;
151
- const res = await (0, connect_2.executeSqlCmdsAsIamUser)(options, instanceId, databaseId, [cmd], true);
150
+ const res = await (0, connect_1.executeSqlCmdsAsIamUser)(options, instanceId, databaseId, [cmd], true);
152
151
  const tables = res[0].rows.map((row) => {
153
152
  return {
154
153
  name: row.tablename,
@@ -157,7 +156,7 @@ async function getSchemaMetadata(instanceId, databaseId, schema, options) {
157
156
  });
158
157
  const checkRoleExists = async (role) => {
159
158
  const cmd = [`SELECT to_regrole('"${role}"') IS NOT NULL AS exists;`];
160
- const result = await (0, connect_2.executeSqlCmdsAsIamUser)(options, instanceId, databaseId, cmd, true);
159
+ const result = await (0, connect_1.executeSqlCmdsAsIamUser)(options, instanceId, databaseId, cmd, true);
161
160
  return result[0].rows[0].exists;
162
161
  };
163
162
  let setupStatus;
@@ -198,7 +197,7 @@ async function setupBrownfieldAsGreenfield(instanceId, databaseId, schemaInfo, o
198
197
  ...alterTableCmds,
199
198
  ...revokeOwnersFromSuperuserCmds,
200
199
  ];
201
- await (0, connect_2.executeSqlCmdsAsSuperUser)(options, instanceId, databaseId, setupCmds, silent, true);
200
+ await (0, connect_1.executeSqlCmdsAsSuperUser)(options, instanceId, databaseId, setupCmds, silent, true);
202
201
  }
203
202
  exports.setupBrownfieldAsGreenfield = setupBrownfieldAsGreenfield;
204
203
  async function brownfieldSqlSetup(instanceId, databaseId, schemaInfo, options, silent = false) {
@@ -206,9 +205,9 @@ async function brownfieldSqlSetup(instanceId, databaseId, schemaInfo, options, s
206
205
  const uniqueTablesOwners = filterTableOwners(schemaInfo, databaseId);
207
206
  const grantOwnersToFirebasesuperuser = uniqueTablesOwners.map((owner) => `GRANT "${owner}" TO "${permissions_1.FIREBASE_SUPER_USER}"`);
208
207
  const revokeOwnersFromFirebasesuperuser = uniqueTablesOwners.map((owner) => `REVOKE "${owner}" FROM "${permissions_1.FIREBASE_SUPER_USER}"`);
209
- const iamUser = (await (0, connect_2.getIAMUser)(options)).user;
208
+ const iamUser = (await (0, connect_1.getIAMUser)(options)).user;
210
209
  const projectNumber = await (0, projectUtils_1.needProjectNumber)(options);
211
- const { user: fdcP4SAUser } = (0, connect_3.toDatabaseUser)((0, connect_3.getDataConnectP4SA)(projectNumber));
210
+ const { user: fdcP4SAUser } = (0, connect_2.toDatabaseUser)((0, connect_2.getDataConnectP4SA)(projectNumber));
212
211
  const firebaseDefaultPermissions = uniqueTablesOwners.flatMap((owner) => (0, permissions_1.defaultPermissions)(databaseId, schema, owner));
213
212
  const brownfieldSetupCmds = [
214
213
  ...grantOwnersToFirebasesuperuser,
@@ -219,6 +218,14 @@ async function brownfieldSqlSetup(instanceId, databaseId, schemaInfo, options, s
219
218
  ...firebaseDefaultPermissions,
220
219
  ...revokeOwnersFromFirebasesuperuser,
221
220
  ];
222
- await (0, connect_2.executeSqlCmdsAsSuperUser)(options, instanceId, databaseId, brownfieldSetupCmds, silent, true);
221
+ await (0, connect_1.executeSqlCmdsAsSuperUser)(options, instanceId, databaseId, brownfieldSetupCmds, silent, true);
223
222
  }
224
223
  exports.brownfieldSqlSetup = brownfieldSqlSetup;
224
+ async function grantRoleTo(options, instanceId, databaseId, role, email) {
225
+ const projectId = (0, projectUtils_1.needProjectId)(options);
226
+ const { user, mode } = (0, connect_2.toDatabaseUser)(email);
227
+ await cloudSqlAdminClient.createUser(projectId, instanceId, mode, user);
228
+ const fdcSqlRole = exports.fdcSqlRoleMap[role](databaseId);
229
+ await (0, connect_1.executeSqlCmdsAsSuperUser)(options, instanceId, databaseId, [`GRANT "${fdcSqlRole}" TO "${user}"`], false);
230
+ }
231
+ exports.grantRoleTo = grantRoleTo;
package/lib/gcp/k8s.js ADDED
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mebibytes = void 0;
4
+ const BYTES_PER_UNIT = {
5
+ "": 1,
6
+ k: 1e3,
7
+ M: 1e6,
8
+ G: 1e9,
9
+ T: 1e12,
10
+ Ki: 1 << 10,
11
+ Mi: 1 << 20,
12
+ Gi: 1 << 30,
13
+ Ti: 1 << 40,
14
+ };
15
+ function mebibytes(memory) {
16
+ const re = /^([0-9]+(\.[0-9]*)?)(Ki|Mi|Gi|Ti|k|M|G|T|([eE]([0-9]+)))?$/;
17
+ const matches = re.exec(memory);
18
+ if (!matches) {
19
+ throw new Error(`Invalid memory quantity "${memory}""`);
20
+ }
21
+ const quantity = Number.parseFloat(matches[1]);
22
+ let bytes;
23
+ if (matches[5]) {
24
+ bytes = quantity * Math.pow(10, Number.parseFloat(matches[5]));
25
+ }
26
+ else {
27
+ const suffix = matches[3] || "";
28
+ bytes = quantity * BYTES_PER_UNIT[suffix];
29
+ }
30
+ return bytes / (1 << 20);
31
+ }
32
+ exports.mebibytes = mebibytes;
@@ -0,0 +1,181 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.serviceFromEndpoint = exports.endpointFromService = exports.FIREBASE_FUNCTION_METADTA_ANNOTATION = exports.FUNCTION_SIGNATURE_TYPE_ENV = exports.FUNCTION_TARGET_ENV = exports.FUNCTION_ID_ANNOTATION = exports.FUNCTION_TARGET_ANNOTATION = exports.TRIGGER_TYPE_ANNOTATION = exports.CLIENT_NAME_LABEL = exports.RUNTIME_LABEL = exports.updateService = exports.submitBuild = exports.API_VERSION = void 0;
4
+ const apiv2_1 = require("../apiv2");
5
+ const error_1 = require("../error");
6
+ const api_1 = require("../api");
7
+ const proto = require("./proto");
8
+ const metaprogramming_1 = require("../metaprogramming");
9
+ const operation_poller_1 = require("../operation-poller");
10
+ const backend = require("../deploy/functions/backend");
11
+ const constants_1 = require("../functions/constants");
12
+ const k8s_1 = require("./k8s");
13
+ const supported_1 = require("../deploy/functions/runtimes/supported");
14
+ const __1 = require("..");
15
+ const functional_1 = require("../functional");
16
+ exports.API_VERSION = "v2";
17
+ const client = new apiv2_1.Client({
18
+ urlPrefix: (0, api_1.runOrigin)(),
19
+ auth: true,
20
+ apiVersion: exports.API_VERSION,
21
+ });
22
+ (0, metaprogramming_1.assertImplements)();
23
+ async function submitBuild(projectId, location, build) {
24
+ const res = await client.post(`/projects/${projectId}/locations/${location}/builds`, build);
25
+ if (res.status !== 200) {
26
+ throw new error_1.FirebaseError(`Failed to submit build: ${res.status} ${res.body}`);
27
+ }
28
+ await (0, operation_poller_1.pollOperation)({
29
+ apiOrigin: (0, api_1.cloudbuildOrigin)(),
30
+ apiVersion: "v1",
31
+ operationResourceName: res.body.buildOperation,
32
+ });
33
+ }
34
+ exports.submitBuild = submitBuild;
35
+ async function updateService(service) {
36
+ const fieldMask = proto.fieldMasks(service, "labels", "annotations", "tags");
37
+ fieldMask.push("template.revision");
38
+ const res = await client.post(service.name, service, {
39
+ queryParams: {
40
+ updateMask: fieldMask.join(","),
41
+ },
42
+ });
43
+ const svc = await (0, operation_poller_1.pollOperation)({
44
+ apiOrigin: (0, api_1.runOrigin)(),
45
+ apiVersion: exports.API_VERSION,
46
+ operationResourceName: res.body.name,
47
+ });
48
+ return svc;
49
+ }
50
+ exports.updateService = updateService;
51
+ function functionNameToServiceName(id) {
52
+ return id.toLowerCase().replace(/_/g, "-");
53
+ }
54
+ exports.RUNTIME_LABEL = "goog-cloudfunctions-runtime";
55
+ exports.CLIENT_NAME_LABEL = "goog-managed-by";
56
+ exports.TRIGGER_TYPE_ANNOTATION = "cloudfunctions.googleapis.com/trigger-type";
57
+ exports.FUNCTION_TARGET_ANNOTATION = "run.googleapis.com/build-function-target";
58
+ exports.FUNCTION_ID_ANNOTATION = "cloudfunctions.googleapis.com/function-id";
59
+ exports.FUNCTION_TARGET_ENV = "FUNCTION_TARGET";
60
+ exports.FUNCTION_SIGNATURE_TYPE_ENV = "FUNCTION_SIGNATURE_TYPE";
61
+ exports.FIREBASE_FUNCTION_METADTA_ANNOTATION = "firebase-functions-metadata";
62
+ function endpointFromService(service) {
63
+ const [, project, , location, , svcId] = service.name.split("/");
64
+ const metadata = JSON.parse(service.annotations?.[exports.FIREBASE_FUNCTION_METADTA_ANNOTATION] || "{}");
65
+ const [env, secretEnv] = (0, functional_1.partition)(service.template.containers[0].env || [], (e) => "value" in e);
66
+ const id = metadata.functionId ||
67
+ service.annotations?.[exports.FUNCTION_ID_ANNOTATION] ||
68
+ service.annotations?.[exports.FUNCTION_TARGET_ANNOTATION] ||
69
+ env.find((e) => e.name === exports.FUNCTION_TARGET_ENV)?.value ||
70
+ svcId;
71
+ const memory = (0, k8s_1.mebibytes)(service.template.containers[0].resources.limits.memory);
72
+ if (!backend.isValidMemoryOption(memory)) {
73
+ __1.logger.debug("Converting a service to an endpoint with an invalid memory option", memory);
74
+ }
75
+ const cpu = Number(service.template.containers[0].resources.limits.cpu);
76
+ const endpoint = {
77
+ platform: service.labels?.[exports.CLIENT_NAME_LABEL] === "cloud-functions" ? "gcfv2" : "run",
78
+ id,
79
+ project,
80
+ labels: service.labels || {},
81
+ region: location,
82
+ runtime: service.labels?.[exports.RUNTIME_LABEL] || (0, supported_1.latest)("nodejs"),
83
+ availableMemoryMb: memory,
84
+ cpu: cpu,
85
+ entryPoint: env.find((e) => e.name === exports.FUNCTION_TARGET_ENV)?.value ||
86
+ service.annotations?.[exports.FUNCTION_TARGET_ANNOTATION] ||
87
+ service.annotations?.[exports.FUNCTION_ID_ANNOTATION] ||
88
+ id,
89
+ httpsTrigger: {},
90
+ };
91
+ proto.renameIfPresent(endpoint, service.template, "concurrency", "containerConcurrency");
92
+ proto.renameIfPresent(endpoint, service.labels || {}, "codebase", constants_1.CODEBASE_LABEL);
93
+ proto.renameIfPresent(endpoint, service.scaling || {}, "minInstances", "minInstanceCount");
94
+ proto.renameIfPresent(endpoint, service.scaling || {}, "maxInstances", "maxInstanceCount");
95
+ endpoint.environmentVariables = env.reduce((acc, e) => {
96
+ acc[e.name] = e.value;
97
+ return acc;
98
+ }, {});
99
+ endpoint.secretEnvironmentVariables = secretEnv.map((e) => {
100
+ const [, projectId, , secret] = e.valueSource.secretKeyRef.secret.split("/");
101
+ return {
102
+ key: e.name,
103
+ projectId,
104
+ secret,
105
+ version: e.valueSource.secretKeyRef.version || "latest",
106
+ };
107
+ });
108
+ return endpoint;
109
+ }
110
+ exports.endpointFromService = endpointFromService;
111
+ function serviceFromEndpoint(endpoint, image) {
112
+ const labels = {
113
+ ...endpoint.labels,
114
+ [exports.RUNTIME_LABEL]: endpoint.runtime,
115
+ [exports.CLIENT_NAME_LABEL]: "firebase-functions",
116
+ };
117
+ delete labels["deployment-tool"];
118
+ if (endpoint.codebase) {
119
+ labels[constants_1.CODEBASE_LABEL] = endpoint.codebase;
120
+ }
121
+ const annotations = {
122
+ [exports.FIREBASE_FUNCTION_METADTA_ANNOTATION]: JSON.stringify({
123
+ functionId: endpoint.id,
124
+ }),
125
+ };
126
+ const template = {
127
+ containers: [
128
+ {
129
+ name: "worker",
130
+ image,
131
+ env: [
132
+ ...Object.entries(endpoint.environmentVariables || {}).map(([name, value]) => ({
133
+ name,
134
+ value,
135
+ })),
136
+ ...(endpoint.secretEnvironmentVariables || []).map((secret) => ({
137
+ name: secret.key,
138
+ valueSource: {
139
+ secretKeyRef: {
140
+ secret: secret.secret,
141
+ version: secret.version,
142
+ },
143
+ },
144
+ })),
145
+ {
146
+ name: exports.FUNCTION_TARGET_ENV,
147
+ value: endpoint.entryPoint,
148
+ },
149
+ {
150
+ name: exports.FUNCTION_SIGNATURE_TYPE_ENV,
151
+ value: backend.isEventTriggered(endpoint) ? "cloudevent" : "http",
152
+ },
153
+ ],
154
+ resources: {
155
+ limits: {
156
+ cpu: String(endpoint.cpu || 1),
157
+ memory: `${endpoint.availableMemoryMb || 256}Mi`,
158
+ },
159
+ cpuIdle: true,
160
+ startupCpuBoost: true,
161
+ },
162
+ },
163
+ ],
164
+ containerConcurrency: endpoint.concurrency || backend.DEFAULT_CONCURRENCY,
165
+ };
166
+ proto.renameIfPresent(template, endpoint, "containerConcurrency", "concurrency");
167
+ const service = {
168
+ name: `projects/${endpoint.project}/locations/${endpoint.region}/services/${functionNameToServiceName(endpoint.id)}`,
169
+ labels,
170
+ annotations,
171
+ template,
172
+ client: "cli-firebase",
173
+ };
174
+ if (endpoint.minInstances || endpoint.maxInstances) {
175
+ service.scaling = {};
176
+ proto.renameIfPresent(service.scaling, endpoint, "minInstanceCount", "minInstances");
177
+ proto.renameIfPresent(service.scaling, endpoint, "maxInstanceCount", "maxInstances");
178
+ }
179
+ return service;
180
+ }
181
+ exports.serviceFromEndpoint = serviceFromEndpoint;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.extractCodeBlock = exports.generateOperation = exports.chatWithFirebase = exports.generateSchema = void 0;
3
+ exports.extractCodeBlock = exports.generateOperation = exports.chatWithFirebase = exports.generateSchema = exports.PROMPT_GENERATE_SEED_DATA = exports.PROMPT_GENERATE_CONNECTOR = void 0;
4
4
  const apiv2_1 = require("../apiv2");
5
5
  const api_1 = require("../api");
6
6
  const error_1 = require("../error");
@@ -9,6 +9,8 @@ const SCHEMA_GENERATOR_EXPERIENCE = "/appeco/firebase/fdc-schema-generator";
9
9
  const GEMINI_IN_FIREBASE_EXPERIENCE = "/appeco/firebase/firebase-chat/free";
10
10
  const OPERATION_GENERATION_EXPERIENCE = "/appeco/firebase/fdc-query-generator";
11
11
  const FIREBASE_CHAT_REQUEST_CONTEXT_TYPE_NAME = "type.googleapis.com/google.cloud.cloudaicompanion.v1main.FirebaseChatRequestContext";
12
+ exports.PROMPT_GENERATE_CONNECTOR = "Create 4 operations for an app using the instance schema with proper authentication.";
13
+ exports.PROMPT_GENERATE_SEED_DATA = "Create a mutation to populate the database with some seed data.";
12
14
  async function generateSchema(prompt, project, chatHistory = []) {
13
15
  const res = await apiClient.post(`/v1beta/projects/${project}/locations/global/instances/default:completeTask`, {
14
16
  input: { messages: [...chatHistory, { content: prompt, author: "USER" }] },
@@ -16,7 +18,7 @@ async function generateSchema(prompt, project, chatHistory = []) {
16
18
  experience: SCHEMA_GENERATOR_EXPERIENCE,
17
19
  },
18
20
  });
19
- return res.body.output.messages[0].content;
21
+ return extractCodeBlock(res.body.output.messages[0].content);
20
22
  }
21
23
  exports.generateSchema = generateSchema;
22
24
  async function chatWithFirebase(prompt, project, chatHistory = []) {
@@ -42,7 +44,7 @@ async function generateOperation(prompt, service, project, chatHistory = []) {
42
44
  },
43
45
  },
44
46
  });
45
- return res.body.output.messages[0].content;
47
+ return extractCodeBlock(res.body.output.messages[0].content);
46
48
  }
47
49
  exports.generateOperation = generateOperation;
48
50
  function extractCodeBlock(text) {
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.claude = void 0;
4
+ const promptUpdater_1 = require("./promptUpdater");
5
+ const MCP_CONFIG_PATH = ".mcp.json";
6
+ const CLAUDE_PROMPT_PATH = "CLAUDE.md";
7
+ exports.claude = {
8
+ name: "claude",
9
+ displayName: "Claude Code",
10
+ async configure(config, projectPath, enabledFeatures) {
11
+ const files = [];
12
+ let existingConfig = {};
13
+ let mcpUpdated = false;
14
+ try {
15
+ const existingContent = config.readProjectFile(MCP_CONFIG_PATH);
16
+ if (existingContent) {
17
+ existingConfig = JSON.parse(existingContent);
18
+ }
19
+ }
20
+ catch (e) {
21
+ }
22
+ if (!existingConfig.mcpServers?.firebase) {
23
+ if (!existingConfig.mcpServers) {
24
+ existingConfig.mcpServers = {};
25
+ }
26
+ existingConfig.mcpServers.firebase = {
27
+ command: "npx",
28
+ args: ["-y", "firebase-tools", "experimental:mcp", "--dir", projectPath],
29
+ };
30
+ config.writeProjectFile(MCP_CONFIG_PATH, JSON.stringify(existingConfig, null, 2));
31
+ mcpUpdated = true;
32
+ }
33
+ files.push({ path: MCP_CONFIG_PATH, updated: mcpUpdated });
34
+ const { updated } = await (0, promptUpdater_1.updateFirebaseSection)(config, CLAUDE_PROMPT_PATH, enabledFeatures, {
35
+ interactive: true,
36
+ });
37
+ files.push({
38
+ path: CLAUDE_PROMPT_PATH,
39
+ updated,
40
+ });
41
+ return { files };
42
+ },
43
+ };
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.cursor = void 0;
4
+ const path = require("path");
5
+ const templates_1 = require("../../../templates");
6
+ const promptUpdater_1 = require("./promptUpdater");
7
+ const CURSOR_MCP_PATH = ".cursor/mcp.json";
8
+ const CURSOR_RULES_DIR = ".cursor/rules";
9
+ exports.cursor = {
10
+ name: "cursor",
11
+ displayName: "Cursor",
12
+ async configure(config, projectPath, enabledFeatures) {
13
+ const files = [];
14
+ let mcpUpdated = false;
15
+ let existingMcpConfig = {};
16
+ try {
17
+ const existingMcp = config.readProjectFile(CURSOR_MCP_PATH);
18
+ if (existingMcp) {
19
+ existingMcpConfig = JSON.parse(existingMcp);
20
+ }
21
+ }
22
+ catch (e) {
23
+ }
24
+ if (!existingMcpConfig.mcpServers?.firebase) {
25
+ if (!existingMcpConfig.mcpServers) {
26
+ existingMcpConfig.mcpServers = {};
27
+ }
28
+ existingMcpConfig.mcpServers.firebase = {
29
+ command: "npx",
30
+ args: ["-y", "firebase-tools", "experimental:mcp", "--dir", projectPath],
31
+ };
32
+ config.writeProjectFile(CURSOR_MCP_PATH, JSON.stringify(existingMcpConfig, null, 2));
33
+ mcpUpdated = true;
34
+ }
35
+ files.push({ path: CURSOR_MCP_PATH, updated: mcpUpdated });
36
+ const header = (0, templates_1.readTemplateSync)("init/aitools/cursor-rules-header.txt");
37
+ const baseContent = (0, promptUpdater_1.generateFeaturePromptSection)("base");
38
+ const basePromptPath = path.join(CURSOR_RULES_DIR, "FIREBASE_BASE.md");
39
+ const baseResult = await (0, promptUpdater_1.replaceFirebaseFile)(config, basePromptPath, baseContent);
40
+ files.push({ path: basePromptPath, updated: baseResult.updated });
41
+ if (enabledFeatures.includes("functions")) {
42
+ const functionsContent = (0, promptUpdater_1.generateFeaturePromptSection)("functions");
43
+ const functionsPromptPath = path.join(CURSOR_RULES_DIR, "FIREBASE_FUNCTIONS.md");
44
+ const functionsResult = await (0, promptUpdater_1.replaceFirebaseFile)(config, functionsPromptPath, functionsContent);
45
+ files.push({ path: functionsPromptPath, updated: functionsResult.updated });
46
+ }
47
+ const imports = ["@FIREBASE_BASE.md"];
48
+ if (enabledFeatures.includes("functions")) {
49
+ imports.push("@FIREBASE_FUNCTIONS.md");
50
+ }
51
+ const importContent = `# Firebase Context\n\n${imports.join("\n")}\n`;
52
+ const { content: mainContent } = (0, promptUpdater_1.generatePromptSection)(enabledFeatures, {
53
+ customContent: importContent,
54
+ });
55
+ const fullContent = header + "\n" + mainContent;
56
+ const firebaseMDCPath = path.join(CURSOR_RULES_DIR, "FIREBASE.mdc");
57
+ const mainResult = await (0, promptUpdater_1.replaceFirebaseFile)(config, firebaseMDCPath, fullContent);
58
+ files.push({ path: firebaseMDCPath, updated: mainResult.updated });
59
+ return { files };
60
+ },
61
+ };
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.gemini = void 0;
4
+ const templates_1 = require("../../../templates");
5
+ const promptUpdater_1 = require("./promptUpdater");
6
+ const utils_1 = require("../../../utils");
7
+ const GEMINI_DIR = ".gemini/extensions/firebase";
8
+ const CONTEXTS_DIR = `${GEMINI_DIR}/contexts`;
9
+ exports.gemini = {
10
+ name: "gemini",
11
+ displayName: "Gemini CLI",
12
+ async configure(config, projectPath, enabledFeatures) {
13
+ const files = [];
14
+ const extensionPath = `${GEMINI_DIR}/gemini-extension.json`;
15
+ const extensionTemplate = (0, templates_1.readTemplateSync)("init/aitools/gemini-extension.json");
16
+ const newConfigRaw = extensionTemplate.replace("{{PROJECT_PATH}}", projectPath);
17
+ let extensionUpdated = false;
18
+ try {
19
+ const existingRaw = config.readProjectFile(extensionPath);
20
+ const existingConfig = JSON.parse(existingRaw);
21
+ const newConfig = JSON.parse(newConfigRaw);
22
+ if (!(0, utils_1.deepEqual)(existingConfig, newConfig)) {
23
+ config.writeProjectFile(extensionPath, newConfigRaw);
24
+ extensionUpdated = true;
25
+ }
26
+ }
27
+ catch {
28
+ config.writeProjectFile(extensionPath, newConfigRaw);
29
+ extensionUpdated = true;
30
+ }
31
+ files.push({ path: extensionPath, updated: extensionUpdated });
32
+ const baseContent = (0, promptUpdater_1.generateFeaturePromptSection)("base");
33
+ const basePath = `${CONTEXTS_DIR}/FIREBASE-BASE.md`;
34
+ const baseResult = await (0, promptUpdater_1.replaceFirebaseFile)(config, basePath, baseContent);
35
+ files.push({ path: basePath, updated: baseResult.updated });
36
+ const imports = [
37
+ "# Firebase Context",
38
+ "",
39
+ "<!-- Import base Firebase context -->",
40
+ `@./contexts/FIREBASE-BASE.md`,
41
+ ];
42
+ if (enabledFeatures.includes("functions")) {
43
+ const functionsContent = (0, promptUpdater_1.generateFeaturePromptSection)("functions");
44
+ const functionsPath = `${CONTEXTS_DIR}/FIREBASE-FUNCTIONS.md`;
45
+ const functionsResult = await (0, promptUpdater_1.replaceFirebaseFile)(config, functionsPath, functionsContent);
46
+ files.push({ path: functionsPath, updated: functionsResult.updated });
47
+ imports.push("", "<!-- Import Firebase Functions context -->", `@./contexts/FIREBASE-FUNCTIONS.md`);
48
+ }
49
+ const importContent = imports.join("\n");
50
+ const { content: mainContent } = (0, promptUpdater_1.generatePromptSection)(enabledFeatures, {
51
+ customContent: importContent,
52
+ });
53
+ const contextPath = `${GEMINI_DIR}/FIREBASE.md`;
54
+ const mainResult = await (0, promptUpdater_1.replaceFirebaseFile)(config, contextPath, mainContent);
55
+ files.push({ path: contextPath, updated: mainResult.updated });
56
+ return { files };
57
+ },
58
+ };
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.AI_TOOLS = void 0;
18
+ const cursor_1 = require("./cursor");
19
+ const gemini_1 = require("./gemini");
20
+ const studio_1 = require("./studio");
21
+ const claude_1 = require("./claude");
22
+ exports.AI_TOOLS = {
23
+ cursor: cursor_1.cursor,
24
+ gemini: gemini_1.gemini,
25
+ studio: studio_1.studio,
26
+ claude: claude_1.claude,
27
+ };
28
+ __exportStar(require("./types"), exports);