firebase-tools 10.7.2 → 10.9.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/lib/commands/ext-configure.js +26 -15
- package/lib/commands/ext-export.js +14 -5
- package/lib/commands/ext-install.js +31 -2
- package/lib/commands/ext-update.js +17 -10
- package/lib/commands/functions-list.js +12 -20
- package/lib/commands/functions-secrets-set.js +1 -13
- package/lib/deploy/extensions/planner.js +12 -0
- package/lib/deploy/extensions/tasks.js +13 -0
- package/lib/deploy/functions/backend.js +47 -14
- package/lib/deploy/functions/build.js +9 -1
- package/lib/deploy/functions/checkIam.js +65 -46
- package/lib/deploy/functions/functionsDeployHelper.js +1 -1
- package/lib/deploy/functions/prepare.js +42 -15
- package/lib/deploy/functions/pricing.js +2 -2
- package/lib/deploy/functions/release/fabricator.js +66 -11
- package/lib/deploy/functions/release/index.js +0 -21
- package/lib/deploy/functions/runtimes/discovery/index.js +2 -1
- package/lib/deploy/functions/runtimes/discovery/v1alpha1.js +13 -1
- package/lib/deploy/functions/runtimes/node/index.js +26 -26
- package/lib/deploy/functions/services/storage.js +6 -12
- package/lib/deploy/functions/validate.js +79 -15
- package/lib/deploy/index.js +2 -1
- package/lib/emulator/controller.js +10 -5
- package/lib/emulator/downloadableEmulators.js +18 -34
- package/lib/emulator/extensionsEmulator.js +4 -1
- package/lib/emulator/functionsEmulator.js +4 -1
- package/lib/extensions/askUserForEventsConfig.js +97 -0
- package/lib/extensions/export.js +7 -0
- package/lib/extensions/extensionsApi.js +47 -7
- package/lib/extensions/manifest.js +1 -1
- package/lib/extensions/updateHelper.js +7 -1
- package/lib/extensions/warnings.js +3 -3
- package/lib/frameworks/index.js +121 -0
- package/lib/functions/functionslog.js +4 -9
- package/lib/gcp/cloudfunctions.js +1 -1
- package/lib/gcp/cloudfunctionsv2.js +9 -11
- package/lib/gcp/serviceusage.js +24 -0
- package/lib/hosting/normalizedHostingConfigs.js +3 -0
- package/lib/previews.js +1 -1
- package/lib/serve/index.js +2 -1
- package/lib/throttler/throttler.js +2 -1
- package/npm-shrinkwrap.json +103 -9
- package/package.json +2 -2
- package/schema/firebase-config.json +9 -0
- package/templates/extensions/javascript/package.lint.json +5 -5
- package/templates/extensions/javascript/package.nolint.json +3 -3
- package/templates/extensions/typescript/package.lint.json +8 -7
- package/templates/extensions/typescript/package.nolint.json +2 -1
- package/templates/init/functions/typescript/package.lint.json +1 -0
- package/templates/init/functions/typescript/package.nolint.json +5 -5
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.prepareFrameworks = exports.shortSiteName = void 0;
|
|
4
|
+
const path_1 = require("path");
|
|
5
|
+
const process_1 = require("process");
|
|
6
|
+
const projectUtils_1 = require("../projectUtils");
|
|
7
|
+
const normalizedHostingConfigs_1 = require("../hosting/normalizedHostingConfigs");
|
|
8
|
+
const api_1 = require("../hosting/api");
|
|
9
|
+
const apps_1 = require("../management/apps");
|
|
10
|
+
const fs_1 = require("fs");
|
|
11
|
+
const prompt_1 = require("../prompt");
|
|
12
|
+
const { writeFile } = fs_1.promises;
|
|
13
|
+
const shortSiteName = (site) => (site === null || site === void 0 ? void 0 : site.name) && site.name.split("/").pop();
|
|
14
|
+
exports.shortSiteName = shortSiteName;
|
|
15
|
+
const prepareFrameworks = async (targetNames, context, options) => {
|
|
16
|
+
const project = (0, projectUtils_1.needProjectId)(context);
|
|
17
|
+
const configs = (0, normalizedHostingConfigs_1.normalizedHostingConfigs)(Object.assign({ site: project }, options), { resolveTargets: true });
|
|
18
|
+
options.normalizedHostingConfigs = configs;
|
|
19
|
+
if (configs.length === 0)
|
|
20
|
+
return;
|
|
21
|
+
for (const config of configs) {
|
|
22
|
+
const { source, site, public: publicDir } = config;
|
|
23
|
+
if (!source)
|
|
24
|
+
continue;
|
|
25
|
+
const dist = (0, path_1.join)(".firebase", site);
|
|
26
|
+
const hostingDist = (0, path_1.join)(dist, "hosting");
|
|
27
|
+
const functionsDist = (0, path_1.join)(dist, "functions");
|
|
28
|
+
if (publicDir)
|
|
29
|
+
throw new Error(`hosting.public and hosting.source cannot both be set in firebase.json`);
|
|
30
|
+
const getProjectPath = (...args) => (0, path_1.join)(process.cwd(), source, ...args);
|
|
31
|
+
const functionName = `ssr${site.replace(/-/g, "")}`;
|
|
32
|
+
const { build } = require("firebase-frameworks/tools");
|
|
33
|
+
const { usingCloudFunctions, rewrites, redirects, headers, usesFirebaseConfig } = await build({
|
|
34
|
+
dist,
|
|
35
|
+
project,
|
|
36
|
+
site,
|
|
37
|
+
function: {
|
|
38
|
+
name: functionName,
|
|
39
|
+
region: "us-central1",
|
|
40
|
+
},
|
|
41
|
+
}, getProjectPath);
|
|
42
|
+
config.public = hostingDist;
|
|
43
|
+
if (usingCloudFunctions) {
|
|
44
|
+
if (context.hostingChannel) {
|
|
45
|
+
const message = "Cannot preview changes to the backend, you will only see changes to the static content on this channel.";
|
|
46
|
+
if (!options.nonInteractive) {
|
|
47
|
+
const continueDeploy = await (0, prompt_1.promptOnce)({
|
|
48
|
+
type: "confirm",
|
|
49
|
+
default: true,
|
|
50
|
+
message: `${message} Would you like to continue with the deploy?`,
|
|
51
|
+
});
|
|
52
|
+
if (!continueDeploy)
|
|
53
|
+
(0, process_1.exit)(1);
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
console.error(message);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
const functionConfig = {
|
|
61
|
+
source: functionsDist,
|
|
62
|
+
codebase: `firebase-frameworks-${site}`,
|
|
63
|
+
};
|
|
64
|
+
if (targetNames.includes("functions")) {
|
|
65
|
+
const combinedFunctionsConfig = [functionConfig].concat(options.config.get("functions") || []);
|
|
66
|
+
options.config.set("functions", combinedFunctionsConfig);
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
targetNames.unshift("functions");
|
|
70
|
+
options.config.set("functions", functionConfig);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
config.rewrites = [
|
|
74
|
+
...(config.rewrites || []),
|
|
75
|
+
...rewrites,
|
|
76
|
+
{
|
|
77
|
+
source: "**",
|
|
78
|
+
function: functionName,
|
|
79
|
+
},
|
|
80
|
+
];
|
|
81
|
+
let firebaseProjectConfig = null;
|
|
82
|
+
if (usesFirebaseConfig) {
|
|
83
|
+
const sites = await (0, api_1.listSites)(project);
|
|
84
|
+
const selectedSite = sites.find((it) => (0, exports.shortSiteName)(it) === site);
|
|
85
|
+
if (selectedSite) {
|
|
86
|
+
const { appId } = selectedSite;
|
|
87
|
+
if (appId) {
|
|
88
|
+
firebaseProjectConfig = await (0, apps_1.getAppConfig)(appId, apps_1.AppPlatform.WEB);
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
console.warn(`No Firebase app associated with site ${site}, unable to provide authenticated server context.
|
|
92
|
+
You can link a Web app to a Hosting site here https://console.firebase.google.com/project/_/settings/general/web`);
|
|
93
|
+
if (!options.nonInteractive) {
|
|
94
|
+
const continueDeploy = await (0, prompt_1.promptOnce)({
|
|
95
|
+
type: "confirm",
|
|
96
|
+
default: true,
|
|
97
|
+
message: "Would you like to continue with the deploy?",
|
|
98
|
+
});
|
|
99
|
+
if (!continueDeploy)
|
|
100
|
+
(0, process_1.exit)(1);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
writeFile((0, path_1.join)(functionsDist, ".env"), `FRAMEWORKS_FIREBASE_PROJECT_CONFIG="${JSON.stringify(firebaseProjectConfig).replace(/"/g, '\\"')}"`);
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
config.rewrites = [
|
|
109
|
+
...(config.rewrites || []),
|
|
110
|
+
...rewrites,
|
|
111
|
+
{
|
|
112
|
+
source: "**",
|
|
113
|
+
destination: "/index.html",
|
|
114
|
+
},
|
|
115
|
+
];
|
|
116
|
+
}
|
|
117
|
+
config.redirects = [...(config.redirects || []), ...redirects];
|
|
118
|
+
config.headers = [...(config.headers || []), ...headers];
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
exports.prepareFrameworks = prepareFrameworks;
|
|
@@ -2,18 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.logEntries = exports.getApiFilter = void 0;
|
|
4
4
|
const logger_1 = require("../logger");
|
|
5
|
-
const previews_1 = require("../previews");
|
|
6
5
|
function getApiFilter(functionList) {
|
|
7
|
-
const baseFilter =
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
'labels."goog-managed-by"="cloudfunctions")'
|
|
11
|
-
: 'resource.type="cloud_function"';
|
|
6
|
+
const baseFilter = 'resource.type="cloud_function" OR ' +
|
|
7
|
+
'(resource.type="cloud_run_revision" AND ' +
|
|
8
|
+
'labels."goog-managed-by"="cloudfunctions")';
|
|
12
9
|
if (functionList) {
|
|
13
10
|
const apiFuncFilters = functionList.split(",").map((fn) => {
|
|
14
|
-
return
|
|
15
|
-
? `resource.labels.function_name="${fn}" ` + `OR resource.labels.service_name="${fn}"`
|
|
16
|
-
: `resource.labels.function_name="${fn}"`;
|
|
11
|
+
return `resource.labels.function_name="${fn}" ` + `OR resource.labels.service_name="${fn}"`;
|
|
17
12
|
});
|
|
18
13
|
return baseFilter + `\n(${apiFuncFilters.join(" OR ")})`;
|
|
19
14
|
}
|
|
@@ -145,7 +145,7 @@ async function setInvokerUpdate(projectId, fnName, invoker) {
|
|
|
145
145
|
exports.setInvokerUpdate = setInvokerUpdate;
|
|
146
146
|
async function updateFunction(cloudFunction) {
|
|
147
147
|
const endpoint = `/${cloudFunction.name}`;
|
|
148
|
-
const fieldMasks = proto.fieldMasks(cloudFunction, "labels", "environmentVariables");
|
|
148
|
+
const fieldMasks = proto.fieldMasks(cloudFunction, "labels", "environmentVariables", "secretEnvironmentVariables");
|
|
149
149
|
try {
|
|
150
150
|
const headers = {};
|
|
151
151
|
if (previews_1.previews.artifactregistry) {
|
|
@@ -59,9 +59,13 @@ function mebibytes(memory) {
|
|
|
59
59
|
exports.mebibytes = mebibytes;
|
|
60
60
|
function functionsOpLogReject(funcName, type, err) {
|
|
61
61
|
var _a, _b;
|
|
62
|
+
utils.logWarning(clc.bold.yellow("functions:") + ` ${err === null || err === void 0 ? void 0 : err.message}`);
|
|
62
63
|
if (((_b = (_a = err === null || err === void 0 ? void 0 : err.context) === null || _a === void 0 ? void 0 : _a.response) === null || _b === void 0 ? void 0 : _b.statusCode) === 429) {
|
|
63
64
|
utils.logWarning(`${clc.bold.yellow("functions:")} got "Quota Exceeded" error while trying to ${type} ${funcName}. Waiting to retry...`);
|
|
64
65
|
}
|
|
66
|
+
else if (err === null || err === void 0 ? void 0 : err.message.includes("If you recently started to use Eventarc, it may take a few minutes before all necessary permissions are propagated to the Service Agent")) {
|
|
67
|
+
utils.logWarning(`${clc.bold.yellow("functions:")} since this is your first time using functions v2, we need a little bit longer to finish setting everything up, please retry the deployment in a few minutes.`);
|
|
68
|
+
}
|
|
65
69
|
else {
|
|
66
70
|
utils.logWarning(clc.bold.yellow("functions:") + " failed to " + type + " function " + funcName);
|
|
67
71
|
}
|
|
@@ -133,7 +137,7 @@ async function listFunctionsInternal(projectId, region) {
|
|
|
133
137
|
}
|
|
134
138
|
}
|
|
135
139
|
async function updateFunction(cloudFunction) {
|
|
136
|
-
const fieldMasks = proto.fieldMasks(cloudFunction, "labels", "serviceConfig.environmentVariables");
|
|
140
|
+
const fieldMasks = proto.fieldMasks(cloudFunction, "labels", "serviceConfig.environmentVariables", "serviceConfig.secretEnvironmentVariables");
|
|
137
141
|
try {
|
|
138
142
|
const queryParams = {
|
|
139
143
|
updateMask: fieldMasks.join(","),
|
|
@@ -178,15 +182,9 @@ function functionFromEndpoint(endpoint, source) {
|
|
|
178
182
|
serviceConfig: {},
|
|
179
183
|
};
|
|
180
184
|
proto.copyIfPresent(gcfFunction, endpoint, "labels");
|
|
181
|
-
proto.copyIfPresent(gcfFunction.serviceConfig, endpoint, "environmentVariables", "serviceAccountEmail", "ingressSettings", "timeoutSeconds");
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
return `${mb / 1024}Gi`;
|
|
185
|
-
}
|
|
186
|
-
else {
|
|
187
|
-
return `${mb}Mi`;
|
|
188
|
-
}
|
|
189
|
-
});
|
|
185
|
+
proto.copyIfPresent(gcfFunction.serviceConfig, endpoint, "environmentVariables", "secretEnvironmentVariables", "serviceAccountEmail", "ingressSettings", "timeoutSeconds");
|
|
186
|
+
const mem = endpoint.availableMemoryMb || backend.DEFAULT_MEMORY;
|
|
187
|
+
gcfFunction.serviceConfig.availableMemory = mem > 1024 ? `${mem / 1024}Gi` : `${mem}Mi`;
|
|
190
188
|
proto.renameIfPresent(gcfFunction.serviceConfig, endpoint, "minInstanceCount", "minInstances");
|
|
191
189
|
proto.renameIfPresent(gcfFunction.serviceConfig, endpoint, "maxInstanceCount", "maxInstances");
|
|
192
190
|
if (endpoint.vpc) {
|
|
@@ -295,7 +293,7 @@ function endpointFromFunction(gcfFunction) {
|
|
|
295
293
|
const endpoint = Object.assign(Object.assign({ platform: "gcfv2", id,
|
|
296
294
|
project,
|
|
297
295
|
region }, trigger), { entryPoint: gcfFunction.buildConfig.entryPoint, runtime: gcfFunction.buildConfig.runtime, uri: gcfFunction.serviceConfig.uri });
|
|
298
|
-
proto.copyIfPresent(endpoint, gcfFunction.serviceConfig, "serviceAccountEmail", "ingressSettings", "environmentVariables", "timeoutSeconds");
|
|
296
|
+
proto.copyIfPresent(endpoint, gcfFunction.serviceConfig, "serviceAccountEmail", "ingressSettings", "environmentVariables", "secretEnvironmentVariables", "timeoutSeconds");
|
|
299
297
|
proto.renameIfPresent(endpoint, gcfFunction.serviceConfig, "availableMemoryMb", "availableMemory", mebibytes);
|
|
300
298
|
proto.renameIfPresent(endpoint, gcfFunction.serviceConfig, "minInstances", "minInstanceCount");
|
|
301
299
|
proto.renameIfPresent(endpoint, gcfFunction.serviceConfig, "maxInstances", "maxInstanceCount");
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.generateServiceIdentity = void 0;
|
|
4
|
+
const cli_color_1 = require("cli-color");
|
|
5
|
+
const api_1 = require("../api");
|
|
6
|
+
const apiv2_1 = require("../apiv2");
|
|
7
|
+
const error_1 = require("../error");
|
|
8
|
+
const utils = require("../utils");
|
|
9
|
+
const apiClient = new apiv2_1.Client({
|
|
10
|
+
urlPrefix: api_1.serviceUsageOrigin,
|
|
11
|
+
apiVersion: "v1beta1",
|
|
12
|
+
});
|
|
13
|
+
async function generateServiceIdentity(projectNumber, service, prefix) {
|
|
14
|
+
utils.logLabeledBullet(prefix, `generating the service identity for ${(0, cli_color_1.bold)(service)}...`);
|
|
15
|
+
try {
|
|
16
|
+
return await apiClient.post(`projects/${projectNumber}/services/${service}:generateServiceIdentity`);
|
|
17
|
+
}
|
|
18
|
+
catch (err) {
|
|
19
|
+
throw new error_1.FirebaseError(`Error generating the service identity for ${service}.`, {
|
|
20
|
+
original: err,
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.generateServiceIdentity = generateServiceIdentity;
|
|
@@ -57,6 +57,9 @@ function filterExcept(configs, exceptOption) {
|
|
|
57
57
|
return filteredConfigs;
|
|
58
58
|
}
|
|
59
59
|
function normalizedHostingConfigs(cmdOptions, options = {}) {
|
|
60
|
+
const normalizedHostingConfigs = cmdOptions.normalizedHostingConfigs;
|
|
61
|
+
if (normalizedHostingConfigs)
|
|
62
|
+
return normalizedHostingConfigs;
|
|
60
63
|
let configs = (0, lodash_1.cloneDeep)(cmdOptions.config.get("hosting"));
|
|
61
64
|
if (!configs) {
|
|
62
65
|
return [];
|
package/lib/previews.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.previews = void 0;
|
|
4
4
|
const lodash_1 = require("lodash");
|
|
5
5
|
const configstore_1 = require("./configstore");
|
|
6
|
-
exports.previews = Object.assign({ rtdbrules: false, ext: false, extdev: false,
|
|
6
|
+
exports.previews = Object.assign({ rtdbrules: false, ext: false, extdev: false, rtdbmanagement: false, golang: false, deletegcfartifacts: false, artifactregistry: false, emulatoruisnapshot: false, frameworkawareness: false, functionsparams: false }, configstore_1.configstore.get("previews"));
|
|
7
7
|
if (process.env.FIREBASE_CLI_PREVIEWS) {
|
|
8
8
|
process.env.FIREBASE_CLI_PREVIEWS.split(",").forEach((feature) => {
|
|
9
9
|
if ((0, lodash_1.has)(exports.previews, feature)) {
|
package/lib/serve/index.js
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.serve = void 0;
|
|
4
4
|
const _ = require("lodash");
|
|
5
5
|
const logger_1 = require("../logger");
|
|
6
|
+
const frameworks_1 = require("../frameworks");
|
|
6
7
|
const previews_1 = require("../previews");
|
|
7
8
|
const { FunctionsServer } = require("./functions");
|
|
8
9
|
const TARGETS = {
|
|
@@ -15,7 +16,7 @@ async function serve(options) {
|
|
|
15
16
|
if (previews_1.previews.frameworkawareness &&
|
|
16
17
|
targetNames.includes("hosting") &&
|
|
17
18
|
[].concat(options.config.get("hosting")).some((it) => it.source)) {
|
|
18
|
-
await
|
|
19
|
+
await (0, frameworks_1.prepareFrameworks)(targetNames, options, options);
|
|
19
20
|
}
|
|
20
21
|
await Promise.all(_.map(targetNames, (targetName) => {
|
|
21
22
|
return TARGETS[targetName].start(options);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Throttler = exports.timeToWait = void 0;
|
|
3
|
+
exports.Throttler = exports.timeToWait = exports.backoff = void 0;
|
|
4
4
|
const logger_1 = require("../logger");
|
|
5
5
|
const retries_exhausted_error_1 = require("./errors/retries-exhausted-error");
|
|
6
6
|
const timeout_error_1 = require("./errors/timeout-error");
|
|
@@ -9,6 +9,7 @@ function backoff(retryNumber, delay, maxDelay) {
|
|
|
9
9
|
setTimeout(resolve, timeToWait(retryNumber, delay, maxDelay));
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
|
+
exports.backoff = backoff;
|
|
12
13
|
function timeToWait(retryNumber, delay, maxDelay) {
|
|
13
14
|
return Math.min(delay * Math.pow(2, retryNumber), maxDelay);
|
|
14
15
|
}
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "firebase-tools",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.9.1",
|
|
4
4
|
"lockfileVersion": 2,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "firebase-tools",
|
|
9
|
-
"version": "10.
|
|
9
|
+
"version": "10.9.1",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@google-cloud/pubsub": "^2.18.4",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"exit-code": "^1.0.2",
|
|
31
31
|
"express": "^4.16.4",
|
|
32
32
|
"filesize": "^6.1.0",
|
|
33
|
-
"firebase-frameworks": "^0.
|
|
33
|
+
"firebase-frameworks": "^0.4.2",
|
|
34
34
|
"fs-extra": "^5.0.0",
|
|
35
35
|
"glob": "^7.1.2",
|
|
36
36
|
"google-auth-library": "^7.11.0",
|
|
@@ -6059,18 +6059,67 @@
|
|
|
6059
6059
|
}
|
|
6060
6060
|
},
|
|
6061
6061
|
"node_modules/firebase-frameworks": {
|
|
6062
|
-
"version": "0.
|
|
6063
|
-
"resolved": "https://registry.npmjs.org/firebase-frameworks/-/firebase-frameworks-0.
|
|
6064
|
-
"integrity": "sha512-
|
|
6062
|
+
"version": "0.4.2",
|
|
6063
|
+
"resolved": "https://registry.npmjs.org/firebase-frameworks/-/firebase-frameworks-0.4.2.tgz",
|
|
6064
|
+
"integrity": "sha512-a3xNE3wPh8JWq2WOgWlSypVS9O/y/3/3Im9EV7bNBF44wFV2oOAyFdVgDk6it81+lBRv7ci8PttgQZohtsFeVA==",
|
|
6065
6065
|
"dependencies": {
|
|
6066
|
+
"fs-extra": "^10.1.0",
|
|
6067
|
+
"jsonc-parser": "^3.0.0",
|
|
6068
|
+
"semver": "^7.3.7",
|
|
6066
6069
|
"tslib": "^2.3.1"
|
|
6067
6070
|
}
|
|
6068
6071
|
},
|
|
6072
|
+
"node_modules/firebase-frameworks/node_modules/fs-extra": {
|
|
6073
|
+
"version": "10.1.0",
|
|
6074
|
+
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
|
|
6075
|
+
"integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",
|
|
6076
|
+
"dependencies": {
|
|
6077
|
+
"graceful-fs": "^4.2.0",
|
|
6078
|
+
"jsonfile": "^6.0.1",
|
|
6079
|
+
"universalify": "^2.0.0"
|
|
6080
|
+
},
|
|
6081
|
+
"engines": {
|
|
6082
|
+
"node": ">=12"
|
|
6083
|
+
}
|
|
6084
|
+
},
|
|
6085
|
+
"node_modules/firebase-frameworks/node_modules/jsonfile": {
|
|
6086
|
+
"version": "6.1.0",
|
|
6087
|
+
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
|
|
6088
|
+
"integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
|
|
6089
|
+
"dependencies": {
|
|
6090
|
+
"universalify": "^2.0.0"
|
|
6091
|
+
},
|
|
6092
|
+
"optionalDependencies": {
|
|
6093
|
+
"graceful-fs": "^4.1.6"
|
|
6094
|
+
}
|
|
6095
|
+
},
|
|
6096
|
+
"node_modules/firebase-frameworks/node_modules/semver": {
|
|
6097
|
+
"version": "7.3.7",
|
|
6098
|
+
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz",
|
|
6099
|
+
"integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==",
|
|
6100
|
+
"dependencies": {
|
|
6101
|
+
"lru-cache": "^6.0.0"
|
|
6102
|
+
},
|
|
6103
|
+
"bin": {
|
|
6104
|
+
"semver": "bin/semver.js"
|
|
6105
|
+
},
|
|
6106
|
+
"engines": {
|
|
6107
|
+
"node": ">=10"
|
|
6108
|
+
}
|
|
6109
|
+
},
|
|
6069
6110
|
"node_modules/firebase-frameworks/node_modules/tslib": {
|
|
6070
6111
|
"version": "2.3.1",
|
|
6071
6112
|
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz",
|
|
6072
6113
|
"integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw=="
|
|
6073
6114
|
},
|
|
6115
|
+
"node_modules/firebase-frameworks/node_modules/universalify": {
|
|
6116
|
+
"version": "2.0.0",
|
|
6117
|
+
"resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz",
|
|
6118
|
+
"integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==",
|
|
6119
|
+
"engines": {
|
|
6120
|
+
"node": ">= 10.0.0"
|
|
6121
|
+
}
|
|
6122
|
+
},
|
|
6074
6123
|
"node_modules/firebase-functions": {
|
|
6075
6124
|
"version": "3.18.1",
|
|
6076
6125
|
"resolved": "https://registry.npmjs.org/firebase-functions/-/firebase-functions-3.18.1.tgz",
|
|
@@ -7945,6 +7994,11 @@
|
|
|
7945
7994
|
"node": ">=6"
|
|
7946
7995
|
}
|
|
7947
7996
|
},
|
|
7997
|
+
"node_modules/jsonc-parser": {
|
|
7998
|
+
"version": "3.0.0",
|
|
7999
|
+
"resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.0.0.tgz",
|
|
8000
|
+
"integrity": "sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA=="
|
|
8001
|
+
},
|
|
7948
8002
|
"node_modules/jsonfile": {
|
|
7949
8003
|
"version": "4.0.0",
|
|
7950
8004
|
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
|
|
@@ -18400,17 +18454,52 @@
|
|
|
18400
18454
|
}
|
|
18401
18455
|
},
|
|
18402
18456
|
"firebase-frameworks": {
|
|
18403
|
-
"version": "0.
|
|
18404
|
-
"resolved": "https://registry.npmjs.org/firebase-frameworks/-/firebase-frameworks-0.
|
|
18405
|
-
"integrity": "sha512-
|
|
18457
|
+
"version": "0.4.2",
|
|
18458
|
+
"resolved": "https://registry.npmjs.org/firebase-frameworks/-/firebase-frameworks-0.4.2.tgz",
|
|
18459
|
+
"integrity": "sha512-a3xNE3wPh8JWq2WOgWlSypVS9O/y/3/3Im9EV7bNBF44wFV2oOAyFdVgDk6it81+lBRv7ci8PttgQZohtsFeVA==",
|
|
18406
18460
|
"requires": {
|
|
18461
|
+
"fs-extra": "^10.1.0",
|
|
18462
|
+
"jsonc-parser": "^3.0.0",
|
|
18463
|
+
"semver": "^7.3.7",
|
|
18407
18464
|
"tslib": "^2.3.1"
|
|
18408
18465
|
},
|
|
18409
18466
|
"dependencies": {
|
|
18467
|
+
"fs-extra": {
|
|
18468
|
+
"version": "10.1.0",
|
|
18469
|
+
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
|
|
18470
|
+
"integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",
|
|
18471
|
+
"requires": {
|
|
18472
|
+
"graceful-fs": "^4.2.0",
|
|
18473
|
+
"jsonfile": "^6.0.1",
|
|
18474
|
+
"universalify": "^2.0.0"
|
|
18475
|
+
}
|
|
18476
|
+
},
|
|
18477
|
+
"jsonfile": {
|
|
18478
|
+
"version": "6.1.0",
|
|
18479
|
+
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
|
|
18480
|
+
"integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
|
|
18481
|
+
"requires": {
|
|
18482
|
+
"graceful-fs": "^4.1.6",
|
|
18483
|
+
"universalify": "^2.0.0"
|
|
18484
|
+
}
|
|
18485
|
+
},
|
|
18486
|
+
"semver": {
|
|
18487
|
+
"version": "7.3.7",
|
|
18488
|
+
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz",
|
|
18489
|
+
"integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==",
|
|
18490
|
+
"requires": {
|
|
18491
|
+
"lru-cache": "^6.0.0"
|
|
18492
|
+
}
|
|
18493
|
+
},
|
|
18410
18494
|
"tslib": {
|
|
18411
18495
|
"version": "2.3.1",
|
|
18412
18496
|
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz",
|
|
18413
18497
|
"integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw=="
|
|
18498
|
+
},
|
|
18499
|
+
"universalify": {
|
|
18500
|
+
"version": "2.0.0",
|
|
18501
|
+
"resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz",
|
|
18502
|
+
"integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ=="
|
|
18414
18503
|
}
|
|
18415
18504
|
}
|
|
18416
18505
|
},
|
|
@@ -19883,6 +19972,11 @@
|
|
|
19883
19972
|
"minimist": "^1.2.5"
|
|
19884
19973
|
}
|
|
19885
19974
|
},
|
|
19975
|
+
"jsonc-parser": {
|
|
19976
|
+
"version": "3.0.0",
|
|
19977
|
+
"resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.0.0.tgz",
|
|
19978
|
+
"integrity": "sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA=="
|
|
19979
|
+
},
|
|
19886
19980
|
"jsonfile": {
|
|
19887
19981
|
"version": "4.0.0",
|
|
19888
19982
|
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "firebase-tools",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.9.1",
|
|
4
4
|
"description": "Command-Line Interface for Firebase",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
"exit-code": "^1.0.2",
|
|
108
108
|
"express": "^4.16.4",
|
|
109
109
|
"filesize": "^6.1.0",
|
|
110
|
-
"firebase-frameworks": "^0.
|
|
110
|
+
"firebase-frameworks": "^0.4.2",
|
|
111
111
|
"fs-extra": "^5.0.0",
|
|
112
112
|
"glob": "^7.1.2",
|
|
113
113
|
"google-auth-library": "^7.11.0",
|
|
@@ -910,6 +910,9 @@
|
|
|
910
910
|
"site": {
|
|
911
911
|
"type": "string"
|
|
912
912
|
},
|
|
913
|
+
"source": {
|
|
914
|
+
"type": "string"
|
|
915
|
+
},
|
|
913
916
|
"target": {
|
|
914
917
|
"type": "string"
|
|
915
918
|
},
|
|
@@ -1392,6 +1395,9 @@
|
|
|
1392
1395
|
"site": {
|
|
1393
1396
|
"type": "string"
|
|
1394
1397
|
},
|
|
1398
|
+
"source": {
|
|
1399
|
+
"type": "string"
|
|
1400
|
+
},
|
|
1395
1401
|
"target": {
|
|
1396
1402
|
"type": "string"
|
|
1397
1403
|
},
|
|
@@ -1874,6 +1880,9 @@
|
|
|
1874
1880
|
"site": {
|
|
1875
1881
|
"type": "string"
|
|
1876
1882
|
},
|
|
1883
|
+
"source": {
|
|
1884
|
+
"type": "string"
|
|
1885
|
+
},
|
|
1877
1886
|
"target": {
|
|
1878
1887
|
"type": "string"
|
|
1879
1888
|
},
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
"description": "Greet the world",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"firebase-admin": "^
|
|
7
|
-
"firebase-functions": "^3.
|
|
6
|
+
"firebase-admin": "^10.2.0",
|
|
7
|
+
"firebase-functions": "^3.21.0"
|
|
8
8
|
},
|
|
9
9
|
"devDependencies": {
|
|
10
|
-
"eslint": "^
|
|
11
|
-
"eslint-plugin-promise": "^
|
|
10
|
+
"eslint": "^8.15.1",
|
|
11
|
+
"eslint-plugin-promise": "^6.0.0"
|
|
12
12
|
},
|
|
13
13
|
"scripts": {
|
|
14
14
|
"lint": "./node_modules/.bin/eslint --max-warnings=0 .."
|
|
15
15
|
},
|
|
16
16
|
"private": true
|
|
17
|
-
}
|
|
17
|
+
}
|
|
@@ -2,17 +2,18 @@
|
|
|
2
2
|
"name": "functions",
|
|
3
3
|
"scripts": {
|
|
4
4
|
"lint": "eslint \"src/**/*\"",
|
|
5
|
-
"build": "tsc"
|
|
5
|
+
"build": "tsc",
|
|
6
|
+
"build:watch": "tsc --watch"
|
|
6
7
|
},
|
|
7
8
|
"main": "lib/index.js",
|
|
8
9
|
"dependencies": {
|
|
9
|
-
"firebase-admin": "^
|
|
10
|
-
"firebase-functions": "^3.
|
|
10
|
+
"firebase-admin": "^10.2.0",
|
|
11
|
+
"firebase-functions": "^3.21.0"
|
|
11
12
|
},
|
|
12
13
|
"devDependencies": {
|
|
13
|
-
"eslint": "^
|
|
14
|
-
"eslint-plugin-import": "^2.
|
|
15
|
-
"typescript": "^
|
|
14
|
+
"eslint": "^8.15.1",
|
|
15
|
+
"eslint-plugin-import": "^2.26.0",
|
|
16
|
+
"typescript": "^4.6.4"
|
|
16
17
|
},
|
|
17
18
|
"private": true
|
|
18
|
-
}
|
|
19
|
+
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
"name": "functions",
|
|
3
3
|
"scripts": {
|
|
4
4
|
"build": "tsc",
|
|
5
|
+
"build:watch": "tsc --watch",
|
|
5
6
|
"serve": "npm run build && firebase emulators:start --only functions",
|
|
6
7
|
"shell": "npm run build && firebase functions:shell",
|
|
7
8
|
"start": "npm run shell",
|
|
@@ -13,12 +14,11 @@
|
|
|
13
14
|
},
|
|
14
15
|
"main": "lib/index.js",
|
|
15
16
|
"dependencies": {
|
|
16
|
-
"firebase-admin": "^10.0
|
|
17
|
-
"firebase-functions": "^3.
|
|
17
|
+
"firebase-admin": "^10.2.0",
|
|
18
|
+
"firebase-functions": "^3.21.0"
|
|
18
19
|
},
|
|
19
20
|
"devDependencies": {
|
|
20
|
-
"typescript": "^4.
|
|
21
|
-
"firebase-functions-test": "^0.2.0"
|
|
21
|
+
"typescript": "^4.6.4"
|
|
22
22
|
},
|
|
23
23
|
"private": true
|
|
24
|
-
}
|
|
24
|
+
}
|