firebase-tools-with-isolate 13.15.0-0 → 13.26.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/lib/api.js +3 -1
- package/lib/apiv2.js +10 -3
- package/lib/appdistribution/client.js +62 -8
- package/lib/appdistribution/distribution.js +1 -1
- package/lib/apphosting/backend.js +299 -0
- package/lib/apphosting/config.js +31 -8
- package/lib/apphosting/githubConnections.js +70 -22
- package/lib/apphosting/index.js +3 -312
- package/lib/apphosting/rollout.js +138 -0
- package/lib/apphosting/secrets/index.js +70 -5
- package/lib/apphosting/utils.js +41 -0
- package/lib/apphosting/yaml.js +82 -0
- package/lib/archiveDirectory.js +1 -1
- package/lib/auth.js +31 -5
- package/lib/bin/firebase.js +2 -2
- package/lib/command.js +18 -4
- package/lib/commands/appdistribution-distribute.js +4 -4
- package/lib/commands/{appdistribution-group-create.js → appdistribution-groups-create.js} +2 -1
- package/lib/commands/{appdistribution-group-delete.js → appdistribution-groups-delete.js} +3 -2
- package/lib/commands/appdistribution-groups-list.js +55 -0
- package/lib/commands/appdistribution-testers-list.js +52 -0
- package/lib/commands/appdistribution-testers-remove.js +1 -1
- package/lib/commands/apphosting-backends-create.js +4 -4
- package/lib/commands/apphosting-backends-delete.js +7 -15
- package/lib/commands/apphosting-backends-get.js +1 -1
- package/lib/commands/apphosting-config-export.js +51 -0
- package/lib/commands/apphosting-repos-create.js +23 -0
- package/lib/commands/apphosting-rollouts-create.js +14 -15
- package/lib/commands/apphosting-secrets-grantaccess.js +2 -2
- package/lib/commands/database-import.js +4 -2
- package/lib/commands/database-push.js +4 -2
- package/lib/commands/database-set.js +4 -2
- package/lib/commands/database-settings-get.js +1 -1
- package/lib/commands/database-settings-set.js +1 -1
- package/lib/commands/dataconnect-sdk-generate.js +4 -1
- package/lib/commands/dataconnect-services-list.js +4 -3
- package/lib/commands/dataconnect-sql-diff.js +1 -1
- package/lib/commands/dataconnect-sql-grant.js +37 -0
- package/lib/commands/dataconnect-sql-migrate.js +1 -1
- package/lib/commands/dataconnect-sql-shell.js +115 -0
- package/lib/commands/deploy.js +5 -1
- package/lib/commands/emulators-start.js +4 -1
- package/lib/commands/ext-dev-init.js +2 -2
- package/lib/commands/ext-dev-list.js +1 -1
- package/lib/commands/ext-dev-register.js +2 -2
- package/lib/commands/ext-dev-upload.js +2 -2
- package/lib/commands/ext-dev-usage.js +2 -2
- package/lib/commands/ext-info.js +3 -1
- package/lib/commands/ext-install.js +2 -2
- package/lib/commands/ext-sdk-install.js +88 -0
- package/lib/commands/ext.js +1 -0
- package/lib/commands/firestore-databases-restore.js +39 -1
- package/lib/commands/functions-secrets-access.js +2 -4
- package/lib/commands/index.js +15 -2
- package/lib/commands/init.js +25 -15
- package/lib/commands/setup-emulators-dataconnect.js +0 -13
- package/lib/commands/use.js +1 -1
- package/lib/config.js +14 -4
- package/lib/crashlytics/buildToolsJarHelper.js +2 -2
- package/lib/dataconnect/client.js +3 -2
- package/lib/dataconnect/dataplaneClient.js +12 -9
- package/lib/dataconnect/ensureApis.js +6 -1
- package/lib/dataconnect/fileUtils.js +29 -12
- package/lib/dataconnect/freeTrial.js +45 -9
- package/lib/dataconnect/load.js +3 -1
- package/lib/dataconnect/provisionCloudSql.js +41 -24
- package/lib/dataconnect/schemaMigration.js +215 -74
- package/lib/dataconnect/types.js +4 -1
- package/lib/dataconnect/webhook.js +32 -0
- package/lib/deploy/dataconnect/deploy.js +18 -15
- package/lib/deploy/dataconnect/prepare.js +41 -0
- package/lib/deploy/dataconnect/release.js +16 -7
- package/lib/deploy/extensions/deploy.js +3 -1
- package/lib/deploy/extensions/deploymentSummary.js +7 -3
- package/lib/deploy/extensions/planner.js +95 -5
- package/lib/deploy/extensions/prepare.js +89 -42
- package/lib/deploy/extensions/release.js +17 -10
- package/lib/deploy/extensions/tasks.js +32 -21
- package/lib/deploy/firestore/prepare.js +9 -0
- package/lib/deploy/firestore/release.js +3 -6
- package/lib/deploy/functions/build.js +5 -5
- package/lib/deploy/functions/checkIam.js +7 -2
- package/lib/deploy/functions/deploy.js +12 -12
- package/lib/deploy/functions/ensure.js +11 -3
- package/lib/deploy/functions/params.js +5 -3
- package/lib/deploy/functions/prepare.js +18 -3
- package/lib/deploy/functions/release/index.js +4 -0
- package/lib/deploy/functions/release/planner.js +2 -1
- package/lib/deploy/functions/runtimes/discovery/index.js +6 -2
- package/lib/deploy/functions/runtimes/discovery/parsing.js +1 -1
- package/lib/deploy/functions/runtimes/discovery/v1alpha1.js +46 -0
- package/lib/deploy/functions/runtimes/node/index.js +5 -0
- package/lib/deploy/functions/services/auth.js +34 -3
- package/lib/deploy/functions/services/index.js +2 -0
- package/lib/deploy/index.js +8 -5
- package/lib/deploy/lifecycleHooks.js +2 -1
- package/lib/emulator/apphosting/config.js +27 -0
- package/lib/emulator/apphosting/index.js +38 -0
- package/lib/emulator/apphosting/serve.js +50 -0
- package/lib/emulator/apphosting/utils.js +18 -0
- package/lib/emulator/auth/handlers.js +27 -0
- package/lib/emulator/auth/operations.js +41 -2
- package/lib/emulator/auth/state.js +2 -1
- package/lib/emulator/commandUtils.js +8 -3
- package/lib/emulator/constants.js +11 -1
- package/lib/emulator/controller.js +59 -6
- package/lib/emulator/dataconnect/pg-gateway/auth/base-auth-flow.js +11 -0
- package/lib/emulator/dataconnect/pg-gateway/auth/cert.js +58 -0
- package/lib/emulator/dataconnect/pg-gateway/auth/index.js +22 -0
- package/lib/emulator/dataconnect/pg-gateway/auth/md5.js +124 -0
- package/lib/emulator/dataconnect/pg-gateway/auth/password.js +54 -0
- package/lib/emulator/dataconnect/pg-gateway/auth/sasl/sasl-mechanism.js +34 -0
- package/lib/emulator/dataconnect/pg-gateway/auth/sasl/scram-sha-256.js +270 -0
- package/lib/emulator/dataconnect/pg-gateway/auth/trust.js +2 -0
- package/lib/emulator/dataconnect/pg-gateway/backend-error.js +75 -0
- package/lib/emulator/dataconnect/pg-gateway/buffer-reader.js +54 -0
- package/lib/emulator/dataconnect/pg-gateway/buffer-writer.js +79 -0
- package/lib/emulator/dataconnect/pg-gateway/connection.js +315 -0
- package/lib/emulator/dataconnect/pg-gateway/connection.types.js +8 -0
- package/lib/emulator/dataconnect/pg-gateway/crypto.js +40 -0
- package/lib/emulator/dataconnect/pg-gateway/duplex.js +53 -0
- package/lib/emulator/dataconnect/pg-gateway/index.js +27 -0
- package/lib/emulator/dataconnect/pg-gateway/message-buffer.js +82 -0
- package/lib/emulator/dataconnect/pg-gateway/message-codes.js +52 -0
- package/lib/emulator/dataconnect/pg-gateway/platforms/node/index.js +16 -0
- package/lib/emulator/dataconnect/pg-gateway/polyfills/readable-stream-async-iterator.js +35 -0
- package/lib/emulator/dataconnect/pg-gateway/utils.js +40 -0
- package/lib/emulator/dataconnect/pgliteServer.js +95 -0
- package/lib/emulator/dataconnectEmulator.js +58 -75
- package/lib/emulator/dataconnectToolkitController.js +44 -0
- package/lib/emulator/downloadableEmulators.js +30 -19
- package/lib/emulator/emulatorLogger.js +3 -0
- package/lib/emulator/env.js +3 -0
- package/lib/emulator/eventarcEmulator.js +1 -1
- package/lib/emulator/extensionsEmulator.js +38 -6
- package/lib/emulator/functionsEmulator.js +115 -42
- package/lib/emulator/functionsEmulatorShared.js +18 -1
- package/lib/emulator/functionsRuntimeWorker.js +2 -1
- package/lib/emulator/hub.js +13 -9
- package/lib/emulator/hubExport.js +10 -3
- package/lib/emulator/loggingEmulator.js +2 -2
- package/lib/emulator/portUtils.js +11 -11
- package/lib/emulator/registry.js +2 -0
- package/lib/emulator/storage/persistence.js +2 -2
- package/lib/emulator/storage/rules/runtime.js +1 -1
- package/lib/emulator/taskQueue.js +348 -0
- package/lib/emulator/tasksEmulator.js +240 -0
- package/lib/emulator/types.js +6 -0
- package/lib/emulator/ui.js +51 -25
- package/lib/error.js +31 -1
- package/lib/experiments.js +5 -0
- package/lib/extensions/askUserForEventsConfig.js +18 -8
- package/lib/extensions/askUserForParam.js +2 -1
- package/lib/extensions/displayExtensionInfo.js +5 -5
- package/lib/extensions/emulator/triggerHelper.js +1 -1
- package/lib/extensions/extensionsApi.js +15 -11
- package/lib/extensions/extensionsHelper.js +39 -8
- package/lib/extensions/localHelper.js +32 -1
- package/lib/extensions/refs.js +26 -11
- package/lib/extensions/runtimes/common.js +215 -0
- package/lib/extensions/runtimes/node.js +401 -0
- package/lib/extensions/types.js +67 -1
- package/lib/extensions/warnings.js +5 -2
- package/lib/firestore/api.js +2 -1
- package/lib/firestore/checkDatabaseType.js +10 -3
- package/lib/firestore/delete.js +11 -0
- package/lib/firestore/options.js +7 -0
- package/lib/frameworks/angular/index.js +15 -3
- package/lib/frameworks/constants.js +2 -2
- package/lib/frameworks/flutter/index.js +6 -6
- package/lib/frameworks/flutter/utils.js +34 -1
- package/lib/frameworks/next/constants.js +1 -1
- package/lib/frameworks/next/index.js +45 -17
- package/lib/frameworks/next/utils.js +57 -4
- package/lib/frameworks/vite/index.js +2 -2
- package/lib/fsutils.js +13 -1
- package/lib/functions/constants.js +4 -0
- package/lib/functions/events/v1.js +9 -2
- package/lib/gcp/apphosting.js +1 -1
- package/lib/gcp/cloudmonitoring.js +3 -3
- package/lib/gcp/cloudsql/cloudsqladmin.js +32 -20
- package/lib/gcp/cloudsql/connect.js +49 -37
- package/lib/gcp/cloudsql/interactive.js +49 -0
- package/lib/gcp/cloudsql/permissions.js +165 -0
- package/lib/gcp/devConnect.js +38 -1
- package/lib/gcp/firestore.js +5 -1
- package/lib/gcp/secretManager.js +12 -5
- package/lib/getProjectNumber.js +1 -1
- package/lib/init/features/apphosting.js +15 -0
- package/lib/init/features/dataconnect/index.js +166 -121
- package/lib/init/features/dataconnect/sdk.js +90 -81
- package/lib/init/features/emulators.js +2 -15
- package/lib/init/features/firestore/index.js +20 -1
- package/lib/init/features/firestore/indexes.js +4 -4
- package/lib/init/features/genkit/index.js +444 -0
- package/lib/init/features/hosting/index.js +2 -2
- package/lib/init/features/index.js +1 -1
- package/lib/init/features/project.js +6 -6
- package/lib/init/features/storage.js +0 -2
- package/lib/init/index.js +1 -0
- package/lib/init/spawn.js +23 -2
- package/lib/logger.js +2 -2
- package/lib/management/projects.js +24 -4
- package/lib/projectUtils.js +1 -1
- package/lib/prompt.js +22 -1
- package/lib/rc.js +1 -8
- package/lib/requireAuth.js +19 -5
- package/lib/requireDatabaseInstance.js +1 -1
- package/lib/requirePermissions.js +1 -1
- package/lib/responseToError.js +5 -2
- package/lib/rulesDeploy.js +1 -1
- package/lib/templates.js +2 -2
- package/lib/utils.js +16 -11
- package/lib/vsCodeUtils.js +8 -0
- package/package.json +8 -7
- package/schema/connector-yaml.json +57 -17
- package/schema/firebase-config.json +36 -0
- package/templates/extensions/javascript/package.lint.json +2 -2
- package/templates/extensions/javascript/package.nolint.json +2 -2
- package/templates/extensions/typescript/package.lint.json +2 -2
- package/templates/extensions/typescript/package.nolint.json +2 -2
- package/templates/genkit/firebase.0.9.0.template +57 -0
- package/templates/init/apphosting/apphosting.yaml +23 -0
- package/templates/init/dataconnect/connector.yaml +4 -3
- package/templates/init/dataconnect/dataconnect-fdccompatiblemode.yaml +12 -0
- package/templates/init/dataconnect/dataconnect.yaml +6 -6
- package/templates/init/dataconnect/mutations.gql +44 -29
- package/templates/init/dataconnect/queries.gql +65 -38
- package/templates/init/dataconnect/schema.gql +38 -21
- package/templates/init/functions/javascript/package.lint.json +2 -2
- package/templates/init/functions/javascript/package.nolint.json +2 -2
- package/templates/init/functions/typescript/package.lint.json +2 -2
- package/templates/init/functions/typescript/package.nolint.json +2 -2
- package/lib/ensureCloudResourceLocation.js +0 -12
- package/lib/init/features/genkit.js +0 -53
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PGliteExtendedQueryPatch = exports.PostgresServer = void 0;
|
|
4
|
+
const pglite_1 = require("@electric-sql/pglite");
|
|
5
|
+
const { dynamicImport } = require(true && "../../dynamicImport");
|
|
6
|
+
const net = require("node:net");
|
|
7
|
+
const index_1 = require("./pg-gateway/index");
|
|
8
|
+
const node_1 = require("./pg-gateway/platforms/node");
|
|
9
|
+
const logger_1 = require("../../logger");
|
|
10
|
+
class PostgresServer {
|
|
11
|
+
async createPGServer(host = "127.0.0.1", port) {
|
|
12
|
+
const db = await this.getDb();
|
|
13
|
+
await db.waitReady;
|
|
14
|
+
const server = net.createServer(async (socket) => {
|
|
15
|
+
const connection = await (0, node_1.fromNodeSocket)(socket, {
|
|
16
|
+
serverVersion: "16.3 (PGlite 0.2.0)",
|
|
17
|
+
auth: { method: "trust" },
|
|
18
|
+
async onMessage(data, { isAuthenticated }) {
|
|
19
|
+
if (!isAuthenticated) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
const result = await db.execProtocolRaw(data);
|
|
23
|
+
return extendedQueryPatch.filterResponse(data, result);
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
const extendedQueryPatch = new PGliteExtendedQueryPatch(connection);
|
|
27
|
+
socket.on("end", () => {
|
|
28
|
+
logger_1.logger.debug("Postgres client disconnected");
|
|
29
|
+
});
|
|
30
|
+
socket.on("error", (err) => {
|
|
31
|
+
server.emit("error", err);
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
const listeningPromise = new Promise((resolve) => {
|
|
35
|
+
server.listen(port, host, () => {
|
|
36
|
+
resolve();
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
await db.waitReady;
|
|
40
|
+
await listeningPromise;
|
|
41
|
+
return server;
|
|
42
|
+
}
|
|
43
|
+
async getDb() {
|
|
44
|
+
if (this.db) {
|
|
45
|
+
return this.db;
|
|
46
|
+
}
|
|
47
|
+
const vector = (await dynamicImport("@electric-sql/pglite/vector")).vector;
|
|
48
|
+
const uuidOssp = (await dynamicImport("@electric-sql/pglite/contrib/uuid_ossp")).uuid_ossp;
|
|
49
|
+
return pglite_1.PGlite.create({
|
|
50
|
+
username: this.username,
|
|
51
|
+
database: this.database,
|
|
52
|
+
debug: 0,
|
|
53
|
+
extensions: {
|
|
54
|
+
vector,
|
|
55
|
+
uuidOssp,
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
constructor(database, username) {
|
|
60
|
+
this.username = username;
|
|
61
|
+
this.database = database;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
exports.PostgresServer = PostgresServer;
|
|
65
|
+
class PGliteExtendedQueryPatch {
|
|
66
|
+
constructor(connection) {
|
|
67
|
+
this.connection = connection;
|
|
68
|
+
this.isExtendedQuery = false;
|
|
69
|
+
}
|
|
70
|
+
async *filterResponse(message, response) {
|
|
71
|
+
const pipelineStartMessages = [
|
|
72
|
+
index_1.FrontendMessageCode.Parse,
|
|
73
|
+
index_1.FrontendMessageCode.Bind,
|
|
74
|
+
index_1.FrontendMessageCode.Close,
|
|
75
|
+
];
|
|
76
|
+
if (pipelineStartMessages.includes(message[0])) {
|
|
77
|
+
this.isExtendedQuery = true;
|
|
78
|
+
}
|
|
79
|
+
if (message[0] === index_1.FrontendMessageCode.Sync) {
|
|
80
|
+
this.isExtendedQuery = false;
|
|
81
|
+
return this.connection.createReadyForQuery();
|
|
82
|
+
}
|
|
83
|
+
for await (const message of (0, index_1.getMessages)(response)) {
|
|
84
|
+
if (message[0] === index_1.BackendMessageCode.ErrorMessage) {
|
|
85
|
+
this.isExtendedQuery = false;
|
|
86
|
+
}
|
|
87
|
+
if (this.isExtendedQuery && message[0] === index_1.BackendMessageCode.ReadyForQuery) {
|
|
88
|
+
logger_1.logger.debug("Filtered out a ReadyForQuery.");
|
|
89
|
+
continue;
|
|
90
|
+
}
|
|
91
|
+
yield message;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
exports.PGliteExtendedQueryPatch = PGliteExtendedQueryPatch;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.DataConnectEmulatorClient = exports.DataConnectEmulator = exports.dataConnectEmulatorEvents = void 0;
|
|
4
4
|
const childProcess = require("child_process");
|
|
5
|
+
const events_1 = require("events");
|
|
5
6
|
const clc = require("colorette");
|
|
6
7
|
const api_1 = require("../api");
|
|
7
8
|
const constants_1 = require("./constants");
|
|
@@ -11,12 +12,12 @@ const error_1 = require("../error");
|
|
|
11
12
|
const emulatorLogger_1 = require("./emulatorLogger");
|
|
12
13
|
const types_2 = require("../dataconnect/types");
|
|
13
14
|
const portUtils_1 = require("./portUtils");
|
|
14
|
-
const apiv2_1 = require("../apiv2");
|
|
15
15
|
const registry_1 = require("./registry");
|
|
16
16
|
const logger_1 = require("../logger");
|
|
17
17
|
const load_1 = require("../dataconnect/load");
|
|
18
|
+
const pgliteServer_1 = require("./dataconnect/pgliteServer");
|
|
19
|
+
const controller_1 = require("./controller");
|
|
18
20
|
const utils_1 = require("../utils");
|
|
19
|
-
const events_1 = require("events");
|
|
20
21
|
exports.dataConnectEmulatorEvents = new events_1.EventEmitter();
|
|
21
22
|
class DataConnectEmulator {
|
|
22
23
|
constructor(args) {
|
|
@@ -32,48 +33,65 @@ class DataConnectEmulator {
|
|
|
32
33
|
const info = await DataConnectEmulator.build({ configDir: resolvedConfigDir });
|
|
33
34
|
if ((0, types_2.requiresVector)(info.metadata)) {
|
|
34
35
|
if (constants_1.Constants.isDemoProject(this.args.projectId)) {
|
|
35
|
-
this.logger.logLabeled("WARN", "
|
|
36
|
+
this.logger.logLabeled("WARN", "dataconnect", "Detected a 'demo-' project, but vector embeddings require a real project. Operations that use vector_embed will fail.");
|
|
36
37
|
}
|
|
37
38
|
else {
|
|
38
|
-
this.logger.logLabeled("WARN", "
|
|
39
|
+
this.logger.logLabeled("WARN", "dataconnect", "Operations that use vector_embed will make calls to production Vertex AI");
|
|
39
40
|
}
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
43
|
catch (err) {
|
|
43
44
|
this.logger.log("DEBUG", `'fdc build' failed with error: ${err.message}`);
|
|
44
45
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
this.
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
46
|
+
await (0, downloadableEmulators_1.start)(types_1.Emulators.DATACONNECT, {
|
|
47
|
+
auto_download: this.args.auto_download,
|
|
48
|
+
listen: (0, portUtils_1.listenSpecsToString)(this.args.listen),
|
|
49
|
+
config_dir: resolvedConfigDir,
|
|
50
|
+
enable_output_schema_extensions: this.args.enable_output_schema_extensions,
|
|
51
|
+
enable_output_generated_sdk: this.args.enable_output_generated_sdk,
|
|
52
|
+
});
|
|
53
|
+
this.usingExistingEmulator = false;
|
|
54
|
+
if (this.args.autoconnectToPostgres) {
|
|
55
|
+
const info = await (0, load_1.load)(this.args.projectId, this.args.config, this.args.configDir);
|
|
56
|
+
const dbId = info.dataConnectYaml.schema.datasource.postgresql?.database || "postgres";
|
|
57
|
+
const serviceId = info.dataConnectYaml.serviceId;
|
|
58
|
+
const pgPort = this.args.postgresListen?.[0].port;
|
|
59
|
+
const pgHost = this.args.postgresListen?.[0].address;
|
|
60
|
+
let connStr = (0, api_1.dataConnectLocalConnString)();
|
|
61
|
+
if (connStr) {
|
|
62
|
+
this.logger.logLabeled("INFO", "dataconnect", `FIREBASE_DATACONNECT_POSTGRESQL_STRING is set to ${clc.bold(connStr)} - using that instead of starting a new database`);
|
|
63
|
+
}
|
|
64
|
+
else if (pgHost && pgPort) {
|
|
65
|
+
const pgServer = new pgliteServer_1.PostgresServer(dbId, "postgres");
|
|
66
|
+
const server = await pgServer.createPGServer(pgHost, pgPort);
|
|
67
|
+
const connectableHost = (0, utils_1.connectableHostname)(pgHost);
|
|
68
|
+
connStr = `postgres://${connectableHost}:${pgPort}/${dbId}?sslmode=disable`;
|
|
69
|
+
server.on("error", (err) => {
|
|
70
|
+
if (err instanceof error_1.FirebaseError) {
|
|
71
|
+
this.logger.logLabeled("ERROR", "Data Connect", `${err}`);
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
this.logger.logLabeled("ERROR", "dataconnect", `Postgres threw an unexpected error, shutting down the Data Connect emulator: ${err}`);
|
|
75
|
+
}
|
|
76
|
+
void (0, controller_1.cleanShutdown)();
|
|
77
|
+
});
|
|
78
|
+
this.logger.logLabeled("INFO", "dataconnect", `Started up Postgres server, listening on ${JSON.stringify(server.address())}`);
|
|
79
|
+
}
|
|
80
|
+
await this.connectToPostgres(new URL(connStr), dbId, serviceId);
|
|
63
81
|
}
|
|
64
82
|
return;
|
|
65
83
|
}
|
|
66
84
|
async connect() {
|
|
67
85
|
const emuInfo = await this.emulatorClient.getInfo();
|
|
68
86
|
if (!emuInfo) {
|
|
69
|
-
this.logger.logLabeled("ERROR", "
|
|
87
|
+
this.logger.logLabeled("ERROR", "dataconnect", "Could not connect to Data Connect emulator. Check dataconnect-debug.log for more details.");
|
|
70
88
|
return Promise.reject();
|
|
71
89
|
}
|
|
72
90
|
return Promise.resolve();
|
|
73
91
|
}
|
|
74
92
|
async stop() {
|
|
75
93
|
if (this.usingExistingEmulator) {
|
|
76
|
-
this.logger.logLabeled("INFO", "
|
|
94
|
+
this.logger.logLabeled("INFO", "dataconnect", "Skipping cleanup of Data Connect emulator, as it was not started by this process.");
|
|
77
95
|
return;
|
|
78
96
|
}
|
|
79
97
|
return (0, downloadableEmulators_1.stop)(types_1.Emulators.DATACONNECT);
|
|
@@ -100,6 +118,9 @@ class DataConnectEmulator {
|
|
|
100
118
|
`--config_dir=${args.configDir}`,
|
|
101
119
|
`--connector_id=${args.connectorId}`,
|
|
102
120
|
];
|
|
121
|
+
if (args.watch) {
|
|
122
|
+
cmd.push("--watch");
|
|
123
|
+
}
|
|
103
124
|
const res = childProcess.spawnSync(commandInfo.binary, cmd, { encoding: "utf-8" });
|
|
104
125
|
logger_1.logger.info(res.stderr);
|
|
105
126
|
if (res.error) {
|
|
@@ -134,53 +155,23 @@ class DataConnectEmulator {
|
|
|
134
155
|
throw new error_1.FirebaseError(`Unable to parse 'fdc build' output: ${res.stdout ?? res.stderr}`);
|
|
135
156
|
}
|
|
136
157
|
}
|
|
137
|
-
|
|
138
|
-
if ((0, api_1.dataConnectLocalConnString)()) {
|
|
139
|
-
return (0, api_1.dataConnectLocalConnString)();
|
|
140
|
-
}
|
|
141
|
-
return this.args.rc.getDataconnect()?.postgres?.localConnectionString;
|
|
142
|
-
}
|
|
143
|
-
async discoverRunningInstance() {
|
|
144
|
-
const emuInfo = await this.emulatorClient.getInfo();
|
|
145
|
-
if (!emuInfo) {
|
|
146
|
-
return false;
|
|
147
|
-
}
|
|
148
|
-
const serviceInfo = await (0, load_1.load)(this.args.projectId, this.args.config, this.args.configDir);
|
|
149
|
-
const sameService = emuInfo.services.find((s) => serviceInfo.dataConnectYaml.serviceId === s.serviceId);
|
|
150
|
-
if (!sameService) {
|
|
151
|
-
throw new error_1.FirebaseError(`There is a Data Connect emulator already running on ${this.args.listen[0].address}:${this.args.listen[0].port}, but it is emulating a different service. Please stop that instance of the Data Connect emulator, or specify a different port in 'firebase.json'`);
|
|
152
|
-
}
|
|
153
|
-
if (sameService.connectionString &&
|
|
154
|
-
sameService.connectionString !== this.getLocalConectionString()) {
|
|
155
|
-
throw new error_1.FirebaseError(`There is a Data Connect emulator already running, but it is using a different Postgres connection string. Please stop that instance of the Data Connect emulator, or specify a different port in 'firebase.json'`);
|
|
156
|
-
}
|
|
157
|
-
return true;
|
|
158
|
-
}
|
|
159
|
-
watchUnmanagedInstance() {
|
|
160
|
-
return setInterval(async () => {
|
|
161
|
-
if (!this.usingExistingEmulator) {
|
|
162
|
-
return;
|
|
163
|
-
}
|
|
164
|
-
const emuInfo = await this.emulatorClient.getInfo();
|
|
165
|
-
if (!emuInfo) {
|
|
166
|
-
this.logger.logLabeled("INFO", "Data Connect", "The already running emulator seems to have shut down. Starting a new instance of the Data Connect emulator...");
|
|
167
|
-
await this.start();
|
|
168
|
-
exports.dataConnectEmulatorEvents.emit("restart");
|
|
169
|
-
}
|
|
170
|
-
}, 5000);
|
|
171
|
-
}
|
|
172
|
-
async connectToPostgres(localConnectionString, database, serviceId) {
|
|
173
|
-
const connectionString = localConnectionString ?? this.getLocalConectionString();
|
|
158
|
+
async connectToPostgres(connectionString, database, serviceId) {
|
|
174
159
|
if (!connectionString) {
|
|
175
|
-
const msg = `No Postgres connection
|
|
176
|
-
Run ${clc.bold("firebase setup:emulators:dataconnect")} to set up a Postgres connection.`;
|
|
160
|
+
const msg = `No Postgres connection found. The Data Connect emulator will not be able to execute operations.`;
|
|
177
161
|
throw new error_1.FirebaseError(msg);
|
|
178
162
|
}
|
|
179
163
|
const MAX_RETRIES = 3;
|
|
180
164
|
for (let i = 1; i <= MAX_RETRIES; i++) {
|
|
181
165
|
try {
|
|
182
|
-
this.logger.logLabeled("DEBUG", "Data Connect", `Connecting to ${connectionString}}
|
|
183
|
-
|
|
166
|
+
this.logger.logLabeled("DEBUG", "Data Connect", `Connecting to ${connectionString}}...`);
|
|
167
|
+
connectionString.toString();
|
|
168
|
+
await this.emulatorClient.configureEmulator({
|
|
169
|
+
connectionString: connectionString.toString(),
|
|
170
|
+
database,
|
|
171
|
+
serviceId,
|
|
172
|
+
maxOpenConnections: 1,
|
|
173
|
+
});
|
|
174
|
+
this.logger.logLabeled("DEBUG", "Data Connect", `Successfully connected to ${connectionString}}`);
|
|
184
175
|
return true;
|
|
185
176
|
}
|
|
186
177
|
catch (err) {
|
|
@@ -188,7 +179,7 @@ Run ${clc.bold("firebase setup:emulators:dataconnect")} to set up a Postgres con
|
|
|
188
179
|
throw err;
|
|
189
180
|
}
|
|
190
181
|
this.logger.logLabeled("DEBUG", "Data Connect", `Retrying connectToPostgress call (${i} of ${MAX_RETRIES} attempts): ${err}`);
|
|
191
|
-
await new Promise((resolve) => setTimeout(resolve,
|
|
182
|
+
await new Promise((resolve) => setTimeout(resolve, 2000));
|
|
192
183
|
}
|
|
193
184
|
}
|
|
194
185
|
return false;
|
|
@@ -222,14 +213,6 @@ class DataConnectEmulatorClient {
|
|
|
222
213
|
}
|
|
223
214
|
}
|
|
224
215
|
exports.DataConnectEmulatorClient = DataConnectEmulatorClient;
|
|
225
|
-
async function checkIfDataConnectEmulatorRunningOnAddress(l) {
|
|
226
|
-
const client = new apiv2_1.Client({
|
|
227
|
-
urlPrefix: `http:/${l.family === "IPv6" ? `[${l.address}]` : l.address}:${l.port}`,
|
|
228
|
-
auth: false,
|
|
229
|
-
});
|
|
230
|
-
return getInfo(client);
|
|
231
|
-
}
|
|
232
|
-
exports.checkIfDataConnectEmulatorRunningOnAddress = checkIfDataConnectEmulatorRunningOnAddress;
|
|
233
216
|
async function getInfo(client) {
|
|
234
217
|
try {
|
|
235
218
|
const res = await client.get("emulator/info");
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DataConnectToolkitController = void 0;
|
|
4
|
+
const error_1 = require("../error");
|
|
5
|
+
const portUtils = require("./portUtils");
|
|
6
|
+
const utils_1 = require("../utils");
|
|
7
|
+
const dataconnectEmulator_1 = require("./dataconnectEmulator");
|
|
8
|
+
const name = "Data Connect Toolkit";
|
|
9
|
+
class DataConnectToolkitController {
|
|
10
|
+
static async start(args) {
|
|
11
|
+
if (this.isRunning || this.instance) {
|
|
12
|
+
throw new error_1.FirebaseError(`${name} is already running!`, {});
|
|
13
|
+
}
|
|
14
|
+
this.instance = new dataconnectEmulator_1.DataConnectEmulator(args);
|
|
15
|
+
this.isRunning = true;
|
|
16
|
+
await this.instance.start();
|
|
17
|
+
const info = this.instance.getInfo();
|
|
18
|
+
await portUtils.waitForPortUsed(info.port, (0, utils_1.connectableHostname)(info.host), info.timeout);
|
|
19
|
+
}
|
|
20
|
+
static async stop() {
|
|
21
|
+
if (!this.isRunning) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
try {
|
|
25
|
+
await this.instance.stop();
|
|
26
|
+
this.isRunning = false;
|
|
27
|
+
}
|
|
28
|
+
catch (e) {
|
|
29
|
+
throw new error_1.FirebaseError(`Data Connect Toolkit failed to stop with error: ${e}`);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
static getInfo() {
|
|
33
|
+
return this.instance.getInfo();
|
|
34
|
+
}
|
|
35
|
+
static getUrl() {
|
|
36
|
+
const info = this.instance.getInfo();
|
|
37
|
+
if (info.host.includes(":")) {
|
|
38
|
+
return `http://[${info.host}]:${info.port}`;
|
|
39
|
+
}
|
|
40
|
+
return `http://${info.host}:${info.port}`;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.DataConnectToolkitController = DataConnectToolkitController;
|
|
44
|
+
DataConnectToolkitController.isRunning = false;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.start = exports.downloadIfNecessary = exports.stop = exports.getPID = exports.get = exports.getDownloadDetails = exports.requiresJava = exports.handleEmulatorProcessError = exports._getCommand = exports.getLogFileName = exports.DownloadDetails = void 0;
|
|
4
|
+
const lsofi = require("lsofi");
|
|
4
5
|
const types_1 = require("./types");
|
|
5
6
|
const constants_1 = require("./constants");
|
|
6
7
|
const error_1 = require("../error");
|
|
@@ -14,6 +15,7 @@ const os = require("os");
|
|
|
14
15
|
const registry_1 = require("./registry");
|
|
15
16
|
const download_1 = require("../emulator/download");
|
|
16
17
|
const experiments = require("../experiments");
|
|
18
|
+
const process = require("process");
|
|
17
19
|
const EMULATOR_INSTANCE_KILL_TIMEOUT = 4000;
|
|
18
20
|
const CACHE_DIR = process.env.FIREBASE_EMULATORS_PATH || path.join(os.homedir(), ".cache", "firebase", "emulators");
|
|
19
21
|
const EMULATOR_UPDATE_DETAILS = {
|
|
@@ -23,9 +25,9 @@ const EMULATOR_UPDATE_DETAILS = {
|
|
|
23
25
|
expectedChecksum: "2fd771101c0e1f7898c04c9204f2ce63",
|
|
24
26
|
},
|
|
25
27
|
firestore: {
|
|
26
|
-
version: "1.19.
|
|
27
|
-
expectedSize:
|
|
28
|
-
expectedChecksum: "
|
|
28
|
+
version: "1.19.8",
|
|
29
|
+
expectedSize: 63634791,
|
|
30
|
+
expectedChecksum: "9b43a6daa590678de9b7df6d68260395",
|
|
29
31
|
},
|
|
30
32
|
storage: {
|
|
31
33
|
version: "1.1.3",
|
|
@@ -35,9 +37,9 @@ const EMULATOR_UPDATE_DETAILS = {
|
|
|
35
37
|
ui: experiments.isEnabled("emulatoruisnapshot")
|
|
36
38
|
? { version: "SNAPSHOT", expectedSize: -1, expectedChecksum: "" }
|
|
37
39
|
: {
|
|
38
|
-
version: "1.
|
|
39
|
-
expectedSize:
|
|
40
|
-
expectedChecksum: "
|
|
40
|
+
version: "1.14.0",
|
|
41
|
+
expectedSize: 3615311,
|
|
42
|
+
expectedChecksum: "30763ff4a8b81e2c482f05b56799b5c0",
|
|
41
43
|
},
|
|
42
44
|
pubsub: {
|
|
43
45
|
version: "0.8.14",
|
|
@@ -46,20 +48,20 @@ const EMULATOR_UPDATE_DETAILS = {
|
|
|
46
48
|
},
|
|
47
49
|
dataconnect: process.platform === "darwin"
|
|
48
50
|
? {
|
|
49
|
-
version: "1.3
|
|
50
|
-
expectedSize:
|
|
51
|
-
expectedChecksum: "
|
|
51
|
+
version: "1.7.3",
|
|
52
|
+
expectedSize: 25211648,
|
|
53
|
+
expectedChecksum: "8410794304b2ae340c3facf07d7edc16",
|
|
52
54
|
}
|
|
53
55
|
: process.platform === "win32"
|
|
54
56
|
? {
|
|
55
|
-
version: "1.3
|
|
56
|
-
expectedSize:
|
|
57
|
-
expectedChecksum: "
|
|
57
|
+
version: "1.7.3",
|
|
58
|
+
expectedSize: 25641984,
|
|
59
|
+
expectedChecksum: "a4bd0f9d9d884528fa4494e4d7918c08",
|
|
58
60
|
}
|
|
59
61
|
: {
|
|
60
|
-
version: "1.3
|
|
61
|
-
expectedSize:
|
|
62
|
-
expectedChecksum: "
|
|
62
|
+
version: "1.7.3",
|
|
63
|
+
expectedSize: 25125016,
|
|
64
|
+
expectedChecksum: "48660e6370aeed973f33c3420c3255fb",
|
|
63
65
|
},
|
|
64
66
|
};
|
|
65
67
|
exports.DownloadDetails = {
|
|
@@ -231,8 +233,8 @@ const Commands = {
|
|
|
231
233
|
shell: true,
|
|
232
234
|
},
|
|
233
235
|
ui: {
|
|
234
|
-
binary: "
|
|
235
|
-
args: [
|
|
236
|
+
binary: "",
|
|
237
|
+
args: [],
|
|
236
238
|
optionalArgs: [],
|
|
237
239
|
joinArgs: false,
|
|
238
240
|
shell: false,
|
|
@@ -295,6 +297,7 @@ function _getCommand(emulator, args) {
|
|
|
295
297
|
optionalArgs: baseCmd.optionalArgs,
|
|
296
298
|
joinArgs: baseCmd.joinArgs,
|
|
297
299
|
shell: baseCmd.shell,
|
|
300
|
+
port: args.port,
|
|
298
301
|
};
|
|
299
302
|
}
|
|
300
303
|
exports._getCommand = _getCommand;
|
|
@@ -308,11 +311,15 @@ async function _fatal(emulator, errorMsg) {
|
|
|
308
311
|
process.exit(1);
|
|
309
312
|
}
|
|
310
313
|
}
|
|
311
|
-
async function handleEmulatorProcessError(emulator, err) {
|
|
314
|
+
async function handleEmulatorProcessError(emulator, err, port) {
|
|
312
315
|
const description = constants_1.Constants.description(emulator);
|
|
313
316
|
if (err.path === "java" && err.code === "ENOENT") {
|
|
314
317
|
await _fatal(emulator, `${description} has exited because java is not installed, you can install it from https://openjdk.java.net/install/`);
|
|
315
318
|
}
|
|
319
|
+
else if (err.code === "EADDRINUSE") {
|
|
320
|
+
const ps = port ? await lsofi(port) : false;
|
|
321
|
+
await _fatal(emulator, `${description} has exited because its configured port is already in use${ps ? ` by process number ${ps}` : ""}. Are you running another copy of the emulator suite?`);
|
|
322
|
+
}
|
|
316
323
|
else {
|
|
317
324
|
await _fatal(emulator, `${description} has exited: ${err}`);
|
|
318
325
|
}
|
|
@@ -365,9 +372,13 @@ async function _runBinary(emulator, command, extraEnv) {
|
|
|
365
372
|
if (data.toString().includes("java.lang.UnsupportedClassVersionError")) {
|
|
366
373
|
logger.logLabeled("WARN", emulator.name, "Unsupported java version, make sure java --version reports 1.8 or higher.");
|
|
367
374
|
}
|
|
375
|
+
if (data.toString().includes("address already in use")) {
|
|
376
|
+
const message = `${description} has exited because its configured port ${command.port} is already in use. Are you running another copy of the emulator suite?`;
|
|
377
|
+
logger.logLabeled("ERROR", emulator.name, message);
|
|
378
|
+
}
|
|
368
379
|
});
|
|
369
380
|
emulator.instance.on("error", (err) => {
|
|
370
|
-
handleEmulatorProcessError(emulator.name, err);
|
|
381
|
+
void handleEmulatorProcessError(emulator.name, err, command.port);
|
|
371
382
|
});
|
|
372
383
|
emulator.instance.once("exit", async (code, signal) => {
|
|
373
384
|
if (signal) {
|
|
@@ -225,6 +225,9 @@ You can probably fix this by running "npm install ${systemLog.data.name}@latest"
|
|
|
225
225
|
case "BULLET":
|
|
226
226
|
utils.logLabeledBullet(label, text, "info", mergedData);
|
|
227
227
|
break;
|
|
228
|
+
case "INFO":
|
|
229
|
+
utils.logLabeledBullet(label, text, "info", mergedData);
|
|
230
|
+
break;
|
|
228
231
|
case "SUCCESS":
|
|
229
232
|
utils.logLabeledSuccess(label, text, "info", mergedData);
|
|
230
233
|
break;
|
package/lib/emulator/env.js
CHANGED
|
@@ -31,6 +31,9 @@ function setEnvVarsForEmulators(env, emulators) {
|
|
|
31
31
|
case types_1.Emulators.EVENTARC:
|
|
32
32
|
env[constants_1.Constants.CLOUD_EVENTARC_EMULATOR_HOST] = `http://${host}`;
|
|
33
33
|
break;
|
|
34
|
+
case types_1.Emulators.TASKS:
|
|
35
|
+
env[constants_1.Constants.CLOUD_TASKS_EMULATOR_HOST] = host;
|
|
36
|
+
break;
|
|
34
37
|
}
|
|
35
38
|
}
|
|
36
39
|
}
|
|
@@ -53,7 +53,7 @@ class EventarcEmulator {
|
|
|
53
53
|
const key = `${eventTrigger.eventType}-${channel}`;
|
|
54
54
|
return { projectId, triggerName, eventTrigger, key };
|
|
55
55
|
};
|
|
56
|
-
const removeTriggerRoute = `/emulator/v1/remove/projects/:project_id/triggers/:trigger_name`;
|
|
56
|
+
const removeTriggerRoute = `/emulator/v1/remove/projects/:project_id/triggers/:trigger_name(*)`;
|
|
57
57
|
const removeTriggerHandler = (req, res) => {
|
|
58
58
|
try {
|
|
59
59
|
const { projectId, triggerName, eventTrigger, key } = getTriggerIdentifiers(req);
|
|
@@ -19,10 +19,14 @@ const emulatorLogger_1 = require("./emulatorLogger");
|
|
|
19
19
|
const validation_1 = require("./extensions/validation");
|
|
20
20
|
const registry_1 = require("./registry");
|
|
21
21
|
const types_1 = require("./types");
|
|
22
|
+
const common_1 = require("../extensions/runtimes/common");
|
|
22
23
|
class ExtensionsEmulator {
|
|
23
24
|
constructor(args) {
|
|
24
25
|
this.want = [];
|
|
26
|
+
this.wantDynamic = {};
|
|
25
27
|
this.backends = [];
|
|
28
|
+
this.staticBackends = [];
|
|
29
|
+
this.dynamicBackends = {};
|
|
26
30
|
this.logger = emulatorLogger_1.EmulatorLogger.forEmulator(types_1.Emulators.EXTENSIONS);
|
|
27
31
|
this.pendingDownloads = new Map();
|
|
28
32
|
this.args = args;
|
|
@@ -127,12 +131,40 @@ class ExtensionsEmulator {
|
|
|
127
131
|
this.logger.logLabeled("DEBUG", "Extensions", `Finished "npm run gcp-build" for ${sourceCodePath}`);
|
|
128
132
|
}
|
|
129
133
|
async getExtensionBackends() {
|
|
134
|
+
this.backends = await this.getStaticExtensionBackends();
|
|
135
|
+
for (const backends of Object.values(this.dynamicBackends)) {
|
|
136
|
+
this.backends.push(...backends);
|
|
137
|
+
}
|
|
138
|
+
return this.backends;
|
|
139
|
+
}
|
|
140
|
+
async getStaticExtensionBackends() {
|
|
130
141
|
await this.readManifest();
|
|
131
142
|
await this.checkAndWarnAPIs(this.want);
|
|
132
|
-
this.
|
|
143
|
+
this.staticBackends = await Promise.all(this.want.map((i) => {
|
|
133
144
|
return this.toEmulatableBackend(i);
|
|
134
145
|
}));
|
|
135
|
-
return this.
|
|
146
|
+
return this.staticBackends;
|
|
147
|
+
}
|
|
148
|
+
getDynamicExtensionBackends() {
|
|
149
|
+
const dynamicBackends = [];
|
|
150
|
+
for (const backends of Object.values(this.dynamicBackends)) {
|
|
151
|
+
dynamicBackends.push(...backends);
|
|
152
|
+
}
|
|
153
|
+
return dynamicBackends;
|
|
154
|
+
}
|
|
155
|
+
async addDynamicExtensions(codebase, build) {
|
|
156
|
+
const extensions = (0, common_1.extractExtensionsFromBuilds)({ build });
|
|
157
|
+
this.wantDynamic[codebase] = await planner.wantDynamic({
|
|
158
|
+
projectId: this.args.projectId,
|
|
159
|
+
projectNumber: this.args.projectNumber,
|
|
160
|
+
extensions,
|
|
161
|
+
emulatorMode: true,
|
|
162
|
+
});
|
|
163
|
+
await this.checkAndWarnAPIs(this.wantDynamic[codebase]);
|
|
164
|
+
this.dynamicBackends[codebase] = await Promise.all(this.wantDynamic[codebase].map((i) => {
|
|
165
|
+
return this.toEmulatableBackend(i);
|
|
166
|
+
}));
|
|
167
|
+
await this.getExtensionBackends();
|
|
136
168
|
}
|
|
137
169
|
async toEmulatableBackend(instance) {
|
|
138
170
|
const extensionDir = await this.ensureSourceCode(instance);
|
|
@@ -204,10 +236,10 @@ class ExtensionsEmulator {
|
|
|
204
236
|
}
|
|
205
237
|
}
|
|
206
238
|
}
|
|
207
|
-
filterUnemulatedTriggers(
|
|
239
|
+
filterUnemulatedTriggers(backends) {
|
|
208
240
|
let foundUnemulatedTrigger = false;
|
|
209
241
|
const filteredBackends = backends.filter((backend) => {
|
|
210
|
-
const unemulatedServices = (0, validation_1.checkForUnemulatedTriggerTypes)(backend, options);
|
|
242
|
+
const unemulatedServices = (0, validation_1.checkForUnemulatedTriggerTypes)(backend, this.args.options);
|
|
211
243
|
if (unemulatedServices.length) {
|
|
212
244
|
foundUnemulatedTrigger = true;
|
|
213
245
|
const msg = ` ignored becuase it includes ${unemulatedServices.join(", ")} triggered functions, and the ${unemulatedServices.join(", ")} emulator does not exist or is not running.`;
|
|
@@ -229,8 +261,8 @@ class ExtensionsEmulator {
|
|
|
229
261
|
uiUrl.pathname = `/${types_1.Emulators.EXTENSIONS}/${backend.extensionInstanceId}`;
|
|
230
262
|
return clc.underline(clc.bold(uiUrl.toString()));
|
|
231
263
|
}
|
|
232
|
-
extensionsInfoTable(
|
|
233
|
-
const filtedBackends = this.filterUnemulatedTriggers(
|
|
264
|
+
extensionsInfoTable() {
|
|
265
|
+
const filtedBackends = this.filterUnemulatedTriggers(this.backends);
|
|
234
266
|
const uiRunning = registry_1.EmulatorRegistry.isRunning(types_1.Emulators.UI);
|
|
235
267
|
const tableHead = ["Extension Instance Name", "Extension Ref"];
|
|
236
268
|
if (uiRunning) {
|