firebase-tools 9.20.0 → 9.23.1
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/CHANGELOG.md +5 -1
- package/lib/api.js +2 -0
- package/lib/apiv2.js +7 -4
- package/lib/commands/crashlytics-symbols-upload.js +2 -2
- package/lib/commands/deploy.js +9 -1
- package/lib/commands/ext-configure.js +1 -1
- package/lib/commands/ext-dev-deprecate.js +63 -0
- package/lib/commands/ext-dev-undeprecate.js +56 -0
- package/lib/commands/ext-dev-unpublish.js +10 -3
- package/lib/commands/ext-export.js +44 -0
- package/lib/commands/ext-install.js +1 -1
- package/lib/commands/ext-update.js +1 -1
- package/lib/commands/functions-delete.js +55 -42
- package/lib/commands/functions-list.js +11 -11
- package/lib/commands/index.js +6 -5
- package/lib/commands/init.js +3 -0
- package/lib/config.js +3 -2
- package/lib/deploy/extensions/args.js +2 -0
- package/lib/deploy/extensions/deploy.js +49 -0
- package/lib/deploy/extensions/deploymentSummary.js +52 -0
- package/lib/deploy/extensions/errors.js +31 -0
- package/lib/deploy/extensions/index.js +8 -0
- package/lib/deploy/extensions/params.js +39 -0
- package/lib/deploy/extensions/planner.js +94 -0
- package/lib/deploy/extensions/prepare.js +111 -0
- package/lib/deploy/extensions/release.js +43 -0
- package/lib/deploy/extensions/secrets.js +150 -0
- package/lib/deploy/extensions/tasks.js +98 -0
- package/lib/deploy/extensions/validate.js +17 -0
- package/lib/deploy/functions/backend.js +84 -115
- package/lib/deploy/functions/checkIam.js +73 -12
- package/lib/deploy/functions/containerCleaner.js +97 -50
- package/lib/deploy/functions/deploy.js +4 -10
- package/lib/deploy/functions/eventTypes.js +10 -0
- package/lib/deploy/functions/functionsDeployHelper.js +3 -68
- package/lib/deploy/functions/prepare.js +72 -29
- package/lib/deploy/functions/pricing.js +17 -17
- package/lib/deploy/functions/prompts.js +22 -21
- package/lib/deploy/functions/release/executor.js +39 -0
- package/lib/deploy/functions/release/fabricator.js +425 -0
- package/lib/deploy/functions/release/index.js +73 -0
- package/lib/deploy/functions/release/planner.js +162 -0
- package/lib/deploy/functions/release/reporter.js +165 -0
- package/lib/deploy/functions/release/sourceTokenScraper.js +28 -0
- package/lib/deploy/functions/release/timer.js +14 -0
- package/lib/deploy/functions/runtimes/discovery/v1alpha1.js +129 -126
- package/lib/deploy/functions/runtimes/node/parseTriggers.js +32 -54
- package/lib/deploy/functions/services/index.js +38 -0
- package/lib/deploy/functions/services/storage.js +43 -0
- package/lib/deploy/functions/triggerRegionHelper.js +9 -25
- package/lib/deploy/functions/validate.js +1 -24
- package/lib/deploy/index.js +10 -1
- package/lib/emulator/auth/apiSpec.js +37 -6
- package/lib/emulator/auth/operations.js +45 -17
- package/lib/emulator/auth/server.js +16 -2
- package/lib/emulator/auth/state.js +34 -15
- package/lib/emulator/auth/widget_ui.js +14 -0
- package/lib/emulator/downloadableEmulators.js +7 -7
- package/lib/emulator/functionsEmulator.js +18 -4
- package/lib/emulator/storage/cloudFunctions.js +37 -7
- package/lib/ensureApiEnabled.js +10 -12
- package/lib/extensions/askUserForParam.js +14 -6
- package/lib/extensions/checkProjectBilling.js +7 -7
- package/lib/extensions/export.js +107 -0
- package/lib/extensions/extensionsApi.js +103 -21
- package/lib/extensions/extensionsHelper.js +5 -2
- package/lib/extensions/listExtensions.js +16 -11
- package/lib/extensions/paramHelper.js +6 -4
- package/lib/extensions/provisioningHelper.js +16 -3
- package/lib/extensions/refs.js +9 -1
- package/lib/extensions/secretsUtils.js +10 -9
- package/lib/extensions/updateHelper.js +12 -2
- package/lib/extensions/versionHelper.js +14 -0
- package/lib/extensions/warnings.js +33 -1
- package/lib/gcp/artifactregistry.js +16 -0
- package/lib/gcp/cloudfunctions.js +25 -72
- package/lib/gcp/cloudfunctionsv2.js +46 -98
- package/lib/gcp/cloudscheduler.js +22 -16
- package/lib/gcp/cloudtasks.js +143 -0
- package/lib/gcp/docker.js +36 -2
- package/lib/gcp/location.js +44 -0
- package/lib/gcp/proto.js +2 -2
- package/lib/gcp/pubsub.js +1 -9
- package/lib/gcp/secretManager.js +27 -6
- package/lib/gcp/storage.js +48 -32
- package/lib/init/features/project.js +2 -1
- package/lib/previews.js +1 -1
- package/lib/projectUtils.js +10 -1
- package/lib/utils.js +30 -1
- package/package.json +5 -4
- package/schema/firebase-config.json +9 -0
- package/lib/deploy/functions/deploymentPlanner.js +0 -113
- package/lib/deploy/functions/deploymentTimer.js +0 -23
- package/lib/deploy/functions/errorHandler.js +0 -75
- package/lib/deploy/functions/release.js +0 -116
- package/lib/deploy/functions/tasks.js +0 -324
- package/lib/functions/listFunctions.js +0 -10
- package/lib/functionsDelete.js +0 -60
package/lib/functionsDelete.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deleteFunctions = void 0;
|
|
4
|
-
const helper = require("./deploy/functions/functionsDeployHelper");
|
|
5
|
-
const queue_1 = require("./throttler/queue");
|
|
6
|
-
const tasks = require("./deploy/functions/tasks");
|
|
7
|
-
const deploymentTimer_1 = require("./deploy/functions/deploymentTimer");
|
|
8
|
-
const errorHandler_1 = require("./deploy/functions/errorHandler");
|
|
9
|
-
async function deleteFunctions(functionsToDelete, schedulesToDelete, topicsToDelete, appEngineLocation) {
|
|
10
|
-
const timer = new deploymentTimer_1.DeploymentTimer();
|
|
11
|
-
const errorHandler = new errorHandler_1.ErrorHandler();
|
|
12
|
-
const cloudFunctionsQueue = new queue_1.Queue({
|
|
13
|
-
handler: tasks.functionsDeploymentHandler(timer, errorHandler),
|
|
14
|
-
retries: 30,
|
|
15
|
-
backoff: 10000,
|
|
16
|
-
concurrency: 40,
|
|
17
|
-
maxBackoff: 40000,
|
|
18
|
-
});
|
|
19
|
-
const schedulerQueue = new queue_1.Queue({
|
|
20
|
-
handler: tasks.schedulerDeploymentHandler(errorHandler),
|
|
21
|
-
});
|
|
22
|
-
const topicQueue = new queue_1.Queue({
|
|
23
|
-
handler: tasks.schedulerDeploymentHandler(errorHandler),
|
|
24
|
-
});
|
|
25
|
-
functionsToDelete.forEach((fn) => {
|
|
26
|
-
const taskParams = {
|
|
27
|
-
projectId: fn.project,
|
|
28
|
-
errorHandler,
|
|
29
|
-
};
|
|
30
|
-
const deleteFunctionTask = tasks.deleteFunctionTask(taskParams, fn);
|
|
31
|
-
void cloudFunctionsQueue.run(deleteFunctionTask);
|
|
32
|
-
});
|
|
33
|
-
schedulesToDelete.forEach((schedule) => {
|
|
34
|
-
const taskParams = {
|
|
35
|
-
projectId: schedule.project,
|
|
36
|
-
errorHandler,
|
|
37
|
-
};
|
|
38
|
-
const deleteSchedulerTask = tasks.deleteScheduleTask(taskParams, schedule, appEngineLocation);
|
|
39
|
-
void schedulerQueue.run(deleteSchedulerTask);
|
|
40
|
-
});
|
|
41
|
-
topicsToDelete.forEach((topic) => {
|
|
42
|
-
const taskParams = {
|
|
43
|
-
projectId: topic.project,
|
|
44
|
-
errorHandler,
|
|
45
|
-
};
|
|
46
|
-
const deleteTopicTask = tasks.deleteTopicTask(taskParams, topic);
|
|
47
|
-
void topicQueue.run(deleteTopicTask);
|
|
48
|
-
});
|
|
49
|
-
const queuePromises = [cloudFunctionsQueue.wait(), schedulerQueue.wait(), topicQueue.wait()];
|
|
50
|
-
cloudFunctionsQueue.close();
|
|
51
|
-
schedulerQueue.close();
|
|
52
|
-
topicQueue.close();
|
|
53
|
-
cloudFunctionsQueue.process();
|
|
54
|
-
schedulerQueue.process();
|
|
55
|
-
topicQueue.process();
|
|
56
|
-
await Promise.all(queuePromises);
|
|
57
|
-
helper.logAndTrackDeployStats(cloudFunctionsQueue, errorHandler);
|
|
58
|
-
errorHandler.printErrors();
|
|
59
|
-
}
|
|
60
|
-
exports.deleteFunctions = deleteFunctions;
|