firebase-tools-with-isolate 15.11.0-3 → 15.13.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 +1 -1
- package/lib/agentSkills.js +70 -0
- package/lib/api.js +3 -1
- package/lib/apphosting/backend.js +22 -3
- package/lib/apphosting/config.js +19 -2
- package/lib/apphosting/localbuilds.js +25 -4
- package/lib/apphosting/prompts.js +35 -0
- package/lib/bin/mcp.js +5 -1
- package/lib/commands/apphosting-backends-create.js +19 -2
- package/lib/commands/apphosting-backends-list.js +25 -5
- package/lib/commands/ext-info.js +5 -1
- package/lib/commands/functions-delete.js +1 -0
- package/lib/commands/functions-export.js +40 -0
- package/lib/commands/index.js +3 -0
- package/lib/commands/init.js +1 -0
- package/lib/deploy/apphosting/deploy.js +11 -6
- package/lib/deploy/apphosting/prepare.js +88 -4
- package/lib/deploy/apphosting/release.js +2 -5
- package/lib/deploy/apphosting/util.js +45 -2
- package/lib/deploy/functions/prepare.js +5 -1
- package/lib/deploy/functions/prepareFunctionsUpload.js +5 -2
- package/lib/deploy/functions/release/fabricator.js +4 -3
- package/lib/deploy/functions/release/index.js +5 -0
- package/lib/deploy/functions/services/ailogic.js +68 -0
- package/lib/deploy/functions/services/index.js +4 -0
- package/lib/emulator/downloadableEmulatorInfo.json +24 -24
- package/lib/emulator/storage/rules/manager.js +10 -3
- package/lib/emulator/storage/rules/runtime.js +9 -7
- package/lib/experiments.js +22 -0
- package/lib/extensions/listExtensions.js +2 -0
- package/lib/firebase_studio/migrate.js +30 -61
- package/lib/functions/iac/export.js +36 -0
- package/lib/functions/iac/terraform.js +146 -0
- package/lib/gcp/ailogic.js +108 -0
- package/lib/gcp/apphosting.js +6 -0
- package/lib/gcp/cloudfunctionsv2.js +24 -0
- package/lib/gcp/cloudsql/cloudsqladmin.js +1 -1
- package/lib/init/features/agentSkills.js +26 -0
- package/lib/init/features/apphosting.js +11 -2
- package/lib/init/features/dataconnect/sdk.js +26 -12
- package/lib/init/features/functions/index.js +7 -4
- package/lib/init/features/index.js +4 -1
- package/lib/init/index.js +6 -0
- package/lib/mcp/index.js +1 -1
- package/lib/mcp/tools/core/read_resources.js +1 -1
- package/lib/tsconfig.publish.tsbuildinfo +1 -1
- package/lib/utils.js +8 -0
- package/package.json +7 -5
- package/standalone/package.json +1 -1
- package/templates/extensions/typescript/package.lint.json +1 -1
- package/templates/extensions/typescript/package.nolint.json +1 -1
- package/templates/extensions/typescript/tsconfig.json +1 -0
- package/templates/init/functions/typescript/package-ongraphrequest.lint.json +1 -1
- package/templates/init/functions/typescript/package-ongraphrequest.nolint.json +1 -1
- package/templates/init/functions/typescript/package.lint.json +1 -1
- package/templates/init/functions/typescript/package.nolint.json +1 -1
- package/templates/init/functions/typescript/tsconfig.json +1 -0
|
@@ -12,6 +12,7 @@ const path = require("path");
|
|
|
12
12
|
const cwd = process.cwd();
|
|
13
13
|
const prompt_1 = require("../../../prompt");
|
|
14
14
|
const load_1 = require("../../../dataconnect/load");
|
|
15
|
+
const experiments = require("../../../experiments");
|
|
15
16
|
const error_1 = require("../../../error");
|
|
16
17
|
const lodash_1 = require("lodash");
|
|
17
18
|
const utils_1 = require("../../../utils");
|
|
@@ -275,19 +276,20 @@ function addSdkGenerateToConnectorYaml(connectorInfo, connectorYaml, app) {
|
|
|
275
276
|
}
|
|
276
277
|
case appUtils_1.Platform.WEB: {
|
|
277
278
|
const javascriptSdk = {
|
|
278
|
-
outputDir: path.relative(connectorDir, path.join(
|
|
279
|
-
package:
|
|
280
|
-
packageJsonDir: path.relative(connectorDir,
|
|
281
|
-
react: false,
|
|
282
|
-
angular: false,
|
|
279
|
+
outputDir: path.relative(connectorDir, path.join(app.directory, "src/dataconnect-generated")),
|
|
280
|
+
package: "@dataconnect/generated",
|
|
281
|
+
packageJsonDir: path.relative(connectorDir, app.directory),
|
|
282
|
+
react: app.frameworks?.includes(appUtils_1.Framework.REACT) ?? false,
|
|
283
|
+
angular: app.frameworks?.includes(appUtils_1.Framework.ANGULAR) ?? false,
|
|
283
284
|
};
|
|
284
|
-
|
|
285
|
-
javascriptSdk
|
|
285
|
+
if (experiments.isEnabled("fdcrealtime")) {
|
|
286
|
+
javascriptSdk.clientCache = {};
|
|
286
287
|
}
|
|
287
288
|
if (!(0, lodash_1.isArray)(generate?.javascriptSdk)) {
|
|
288
289
|
generate.javascriptSdk = generate.javascriptSdk ? [generate.javascriptSdk] : [];
|
|
289
290
|
}
|
|
290
|
-
|
|
291
|
+
const existing = generate.javascriptSdk.find((s) => s.outputDir === javascriptSdk.outputDir);
|
|
292
|
+
if (!existing) {
|
|
291
293
|
generate.javascriptSdk.push(javascriptSdk);
|
|
292
294
|
}
|
|
293
295
|
break;
|
|
@@ -297,23 +299,31 @@ function addSdkGenerateToConnectorYaml(connectorInfo, connectorYaml, app) {
|
|
|
297
299
|
outputDir: path.relative(connectorDir, path.join(appDir, `lib/dataconnect_generated`)),
|
|
298
300
|
package: "dataconnect_generated/generated.dart",
|
|
299
301
|
};
|
|
302
|
+
if (experiments.isEnabled("fdcrealtime")) {
|
|
303
|
+
dartSdk.clientCache = {};
|
|
304
|
+
}
|
|
300
305
|
if (!(0, lodash_1.isArray)(generate?.dartSdk)) {
|
|
301
306
|
generate.dartSdk = generate.dartSdk ? [generate.dartSdk] : [];
|
|
302
307
|
}
|
|
303
|
-
|
|
308
|
+
const existing = generate.dartSdk.find((s) => s.outputDir === dartSdk.outputDir);
|
|
309
|
+
if (!existing) {
|
|
304
310
|
generate.dartSdk.push(dartSdk);
|
|
305
311
|
}
|
|
306
312
|
break;
|
|
307
313
|
}
|
|
308
314
|
case appUtils_1.Platform.ANDROID: {
|
|
309
315
|
const kotlinSdk = {
|
|
310
|
-
outputDir: path.relative(connectorDir, path.join(
|
|
316
|
+
outputDir: path.relative(connectorDir, path.join(app.directory, "src/main/kotlin")),
|
|
311
317
|
package: `com.google.firebase.dataconnect.generated`,
|
|
312
318
|
};
|
|
319
|
+
if (experiments.isEnabled("fdcrealtime")) {
|
|
320
|
+
kotlinSdk.clientCache = {};
|
|
321
|
+
}
|
|
313
322
|
if (!(0, lodash_1.isArray)(generate?.kotlinSdk)) {
|
|
314
323
|
generate.kotlinSdk = generate.kotlinSdk ? [generate.kotlinSdk] : [];
|
|
315
324
|
}
|
|
316
|
-
|
|
325
|
+
const existing = generate.kotlinSdk.find((s) => s.outputDir === kotlinSdk.outputDir);
|
|
326
|
+
if (!existing) {
|
|
317
327
|
generate.kotlinSdk.push(kotlinSdk);
|
|
318
328
|
}
|
|
319
329
|
break;
|
|
@@ -323,10 +333,14 @@ function addSdkGenerateToConnectorYaml(connectorInfo, connectorYaml, app) {
|
|
|
323
333
|
outputDir: path.relative(connectorDir, path.join(app.directory, `../FirebaseDataConnectGenerated`)),
|
|
324
334
|
package: "DataConnectGenerated",
|
|
325
335
|
};
|
|
336
|
+
if (experiments.isEnabled("fdcrealtime")) {
|
|
337
|
+
swiftSdk.clientCache = {};
|
|
338
|
+
}
|
|
326
339
|
if (!(0, lodash_1.isArray)(generate?.swiftSdk)) {
|
|
327
340
|
generate.swiftSdk = generate.swiftSdk ? [generate.swiftSdk] : [];
|
|
328
341
|
}
|
|
329
|
-
|
|
342
|
+
const existing = generate.swiftSdk.find((s) => s.outputDir === swiftSdk.outputDir);
|
|
343
|
+
if (!existing) {
|
|
330
344
|
generate.swiftSdk.push(swiftSdk);
|
|
331
345
|
}
|
|
332
346
|
break;
|
|
@@ -11,6 +11,7 @@ const projectConfig_1 = require("../../../functions/projectConfig");
|
|
|
11
11
|
const error_1 = require("../../../error");
|
|
12
12
|
const api_1 = require("../../../api");
|
|
13
13
|
const supported = require("../../../deploy/functions/runtimes/supported");
|
|
14
|
+
const experiments = require("../../../experiments");
|
|
14
15
|
const MAX_ATTEMPTS = 5;
|
|
15
16
|
async function askQuestions(setup, config, options) {
|
|
16
17
|
const projectId = setup?.rcfile?.projects?.default;
|
|
@@ -144,10 +145,12 @@ async function languageSetup(setup) {
|
|
|
144
145
|
value: "python",
|
|
145
146
|
});
|
|
146
147
|
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
148
|
+
if (experiments.isEnabled("functionsrunapionly")) {
|
|
149
|
+
choices.push({
|
|
150
|
+
name: "Dart",
|
|
151
|
+
value: "dart",
|
|
152
|
+
});
|
|
153
|
+
}
|
|
151
154
|
const language = await (0, prompt_1.select)({
|
|
152
155
|
message: "What language would you like to use to write Cloud Functions?",
|
|
153
156
|
default: "javascript",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.authActuate = exports.authAskQuestions = exports.aiLogicActuate = exports.aiLogicAskQuestions = exports.aitools = exports.apptestingAcutate = exports.apptestingAskQuestions = exports.genkit = exports.apphosting = exports.dataconnectResolverActuate = exports.dataconnectResolverAskQuestions = exports.dataconnectSdkActuate = exports.dataconnectSdkAskQuestions = exports.dataconnectActuate = exports.dataconnectAskQuestions = exports.hostingGithub = exports.remoteconfig = exports.project = exports.extensions = exports.emulators = exports.storageActuate = exports.storageAskQuestions = exports.hostingActuate = exports.hostingAskQuestions = exports.functionsActuate = exports.functionsAskQuestions = exports.firestoreActuate = exports.firestoreAskQuestions = exports.databaseActuate = exports.databaseAskQuestions = exports.account = void 0;
|
|
3
|
+
exports.agentSkillsActuate = exports.agentSkillsAskQuestions = exports.authActuate = exports.authAskQuestions = exports.aiLogicActuate = exports.aiLogicAskQuestions = exports.aitools = exports.apptestingAcutate = exports.apptestingAskQuestions = exports.genkit = exports.apphosting = exports.dataconnectResolverActuate = exports.dataconnectResolverAskQuestions = exports.dataconnectSdkActuate = exports.dataconnectSdkAskQuestions = exports.dataconnectActuate = exports.dataconnectAskQuestions = exports.hostingGithub = exports.remoteconfig = exports.project = exports.extensions = exports.emulators = exports.storageActuate = exports.storageAskQuestions = exports.hostingActuate = exports.hostingAskQuestions = exports.functionsActuate = exports.functionsAskQuestions = exports.firestoreActuate = exports.firestoreAskQuestions = exports.databaseActuate = exports.databaseAskQuestions = exports.account = void 0;
|
|
4
4
|
var account_1 = require("./account");
|
|
5
5
|
Object.defineProperty(exports, "account", { enumerable: true, get: function () { return account_1.doSetup; } });
|
|
6
6
|
var database_1 = require("./database");
|
|
@@ -52,3 +52,6 @@ Object.defineProperty(exports, "aiLogicActuate", { enumerable: true, get: functi
|
|
|
52
52
|
var auth_1 = require("./auth");
|
|
53
53
|
Object.defineProperty(exports, "authAskQuestions", { enumerable: true, get: function () { return auth_1.askQuestions; } });
|
|
54
54
|
Object.defineProperty(exports, "authActuate", { enumerable: true, get: function () { return auth_1.actuate; } });
|
|
55
|
+
var agentSkills_1 = require("./agentSkills");
|
|
56
|
+
Object.defineProperty(exports, "agentSkillsAskQuestions", { enumerable: true, get: function () { return agentSkills_1.askQuestions; } });
|
|
57
|
+
Object.defineProperty(exports, "agentSkillsActuate", { enumerable: true, get: function () { return agentSkills_1.actuate; } });
|
package/lib/init/index.js
CHANGED
|
@@ -74,6 +74,12 @@ const featuresList = [
|
|
|
74
74
|
askQuestions: features.authAskQuestions,
|
|
75
75
|
actuate: features.authActuate,
|
|
76
76
|
},
|
|
77
|
+
{
|
|
78
|
+
name: "agentSkills",
|
|
79
|
+
displayName: "Agent Skills",
|
|
80
|
+
askQuestions: features.agentSkillsAskQuestions,
|
|
81
|
+
actuate: features.agentSkillsActuate,
|
|
82
|
+
},
|
|
77
83
|
];
|
|
78
84
|
const featureMap = new Map(featuresList.map((feature) => [feature.name, feature]));
|
|
79
85
|
async function init(setup, config, options) {
|
package/lib/mcp/index.js
CHANGED
|
@@ -347,7 +347,7 @@ class FirebaseMcpServer {
|
|
|
347
347
|
}
|
|
348
348
|
}
|
|
349
349
|
async mcpListResources() {
|
|
350
|
-
await
|
|
350
|
+
await this.trackGA4("mcp_list_resources", { resource_name: "__list__" });
|
|
351
351
|
return {
|
|
352
352
|
resources: resources_1.resources.map((r) => r.mcp),
|
|
353
353
|
};
|
|
@@ -22,7 +22,7 @@ exports.read_resources = (0, tool_1.tool)("core", {
|
|
|
22
22
|
}),
|
|
23
23
|
}, async ({ uris }, ctx) => {
|
|
24
24
|
if (!uris?.length) {
|
|
25
|
-
void (0, track_1.trackGA4)("
|
|
25
|
+
void (0, track_1.trackGA4)("mcp_list_resources", { resource_name: "__list__" });
|
|
26
26
|
return (0, util_1.toContent)(resources_1.resources
|
|
27
27
|
.map((r) => `Available resources:\n\n- [${r.mcp.title || r.mcp.name}](${r.mcp.uri}): ${r.mcp.description}`)
|
|
28
28
|
.join("\n"));
|