firebase-tools 11.16.1 → 11.18.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/deploy/extensions/planner.js +2 -1
- package/lib/deploy/functions/deploy.js +5 -2
- package/lib/deploy/functions/runtimes/index.js +2 -1
- package/lib/deploy/functions/runtimes/node/parseRuntimeAndValidateSDK.js +1 -0
- package/lib/deploy/lifecycleHooks.js +2 -1
- package/lib/emulator/auth/apiSpec.js +549 -201
- package/lib/emulator/auth/operations.js +4 -2
- package/lib/emulator/auth/server.js +19 -8
- package/lib/emulator/eventarcEmulator.js +2 -1
- package/lib/emulator/eventarcEmulatorUtils.js +60 -0
- package/lib/emulator/extensions/validation.js +2 -0
- package/lib/emulator/extensionsEmulator.js +1 -1
- package/lib/emulator/functionsEmulator.js +40 -29
- package/lib/extensions/billingMigrationHelper.js +2 -1
- package/lib/extensions/displayExtensionInfo.js +2 -1
- package/lib/extensions/emulator/specHelper.js +4 -3
- package/lib/extensions/emulator/triggerHelper.js +64 -20
- package/lib/extensions/extensionsHelper.js +9 -9
- package/lib/extensions/types.js +2 -1
- package/lib/extensions/utils.js +14 -1
- package/lib/firestore/indexes-api.js +7 -1
- package/lib/firestore/indexes-sort.js +4 -0
- package/lib/firestore/indexes.js +31 -5
- package/lib/firestore/util.js +5 -1
- package/lib/firestore/validator.js +7 -1
- package/lib/frameworks/angular/index.js +3 -0
- package/lib/frameworks/next/index.js +59 -16
- package/lib/frameworks/next/interfaces.js +2 -0
- package/lib/frameworks/next/utils.js +34 -0
- package/lib/frameworks/nuxt/index.js +3 -0
- package/lib/frameworks/utils.js +24 -0
- package/lib/frameworks/vite/index.js +4 -1
- package/lib/init/features/emulators.js +1 -1
- package/lib/utils.js +1 -1
- package/npm-shrinkwrap.json +38 -72
- package/package.json +1 -1
- package/schema/firebase-config.json +4 -2
|
@@ -122,12 +122,13 @@ async function want(args) {
|
|
|
122
122
|
exports.want = want;
|
|
123
123
|
async function resolveVersion(ref) {
|
|
124
124
|
const extensionRef = refs.toExtensionRef(ref);
|
|
125
|
-
const versions = await extensionsApi.listExtensionVersions(extensionRef);
|
|
125
|
+
const versions = await extensionsApi.listExtensionVersions(extensionRef, undefined, true);
|
|
126
126
|
if (versions.length === 0) {
|
|
127
127
|
throw new error_1.FirebaseError(`No versions found for ${extensionRef}`);
|
|
128
128
|
}
|
|
129
129
|
if (!ref.version || ref.version === "latest") {
|
|
130
130
|
return versions
|
|
131
|
+
.filter((ev) => ev.spec.version !== undefined)
|
|
131
132
|
.map((ev) => ev.spec.version)
|
|
132
133
|
.sort(semver.compare)
|
|
133
134
|
.pop();
|
|
@@ -80,7 +80,7 @@ async function deploy(context, options, payload) {
|
|
|
80
80
|
await (0, checkIam_1.checkHttpIam)(context, options, payload);
|
|
81
81
|
const uploads = [];
|
|
82
82
|
for (const [codebase, { wantBackend, haveBackend }] of Object.entries(payload.functions)) {
|
|
83
|
-
if (shouldUploadBeSkipped(wantBackend, haveBackend)) {
|
|
83
|
+
if (shouldUploadBeSkipped(context, wantBackend, haveBackend)) {
|
|
84
84
|
continue;
|
|
85
85
|
}
|
|
86
86
|
uploads.push(uploadCodebase(context, codebase, wantBackend));
|
|
@@ -88,7 +88,10 @@ async function deploy(context, options, payload) {
|
|
|
88
88
|
await Promise.all(uploads);
|
|
89
89
|
}
|
|
90
90
|
exports.deploy = deploy;
|
|
91
|
-
function shouldUploadBeSkipped(wantBackend, haveBackend) {
|
|
91
|
+
function shouldUploadBeSkipped(context, wantBackend, haveBackend) {
|
|
92
|
+
if (context.filters && context.filters.length > 0) {
|
|
93
|
+
return false;
|
|
94
|
+
}
|
|
92
95
|
const wantEndpoints = backend.allEndpoints(wantBackend);
|
|
93
96
|
const haveEndpoints = backend.allEndpoints(haveBackend);
|
|
94
97
|
if (wantEndpoints.length !== haveEndpoints.length) {
|
|
@@ -4,7 +4,7 @@ exports.getRuntimeDelegate = exports.getHumanFriendlyRuntimeName = exports.isVal
|
|
|
4
4
|
const node = require("./node");
|
|
5
5
|
const validate = require("../validate");
|
|
6
6
|
const error_1 = require("../../../error");
|
|
7
|
-
const RUNTIMES = ["nodejs10", "nodejs12", "nodejs14", "nodejs16"];
|
|
7
|
+
const RUNTIMES = ["nodejs10", "nodejs12", "nodejs14", "nodejs16", "nodejs18"];
|
|
8
8
|
const EXPERIMENTAL_RUNTIMES = ["go113"];
|
|
9
9
|
const DEPRECATED_RUNTIMES = ["nodejs6", "nodejs8"];
|
|
10
10
|
function isDeprecatedRuntime(runtime) {
|
|
@@ -22,6 +22,7 @@ const MESSAGE_FRIENDLY_RUNTIMES = {
|
|
|
22
22
|
nodejs12: "Node.js 12",
|
|
23
23
|
nodejs14: "Node.js 14",
|
|
24
24
|
nodejs16: "Node.js 16",
|
|
25
|
+
nodejs18: "Node.js 18",
|
|
25
26
|
go113: "Go 1.13",
|
|
26
27
|
};
|
|
27
28
|
function getHumanFriendlyRuntimeName(runtime) {
|
|
@@ -14,6 +14,7 @@ const ENGINE_RUNTIMES = {
|
|
|
14
14
|
12: "nodejs12",
|
|
15
15
|
14: "nodejs14",
|
|
16
16
|
16: "nodejs16",
|
|
17
|
+
18: "nodejs18",
|
|
17
18
|
};
|
|
18
19
|
const ENGINE_RUNTIMES_NAMES = Object.values(ENGINE_RUNTIMES);
|
|
19
20
|
exports.RUNTIME_NOT_SET = "`runtime` field is required but was not found in firebase.json.\n" +
|
|
@@ -40,12 +40,13 @@ function runCommand(command, childOptions) {
|
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
function getChildEnvironment(target, overallOptions, config) {
|
|
43
|
+
var _a;
|
|
43
44
|
const projectId = needProjectId(overallOptions);
|
|
44
45
|
const projectDir = overallOptions.projectRoot;
|
|
45
46
|
let resourceDir;
|
|
46
47
|
switch (target) {
|
|
47
48
|
case "hosting":
|
|
48
|
-
resourceDir = overallOptions.config.path(config.public);
|
|
49
|
+
resourceDir = overallOptions.config.path((_a = config.public) !== null && _a !== void 0 ? _a : config.source);
|
|
49
50
|
break;
|
|
50
51
|
case "functions":
|
|
51
52
|
resourceDir = overallOptions.config.path(config.source);
|