firebase-tools-with-isolate 13.3.1 → 13.6.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/accountExporter.js +1 -1
- package/lib/accountImporter.js +1 -1
- package/lib/api.js +112 -55
- package/lib/apiv2.js +10 -3
- package/lib/appdistribution/client.js +4 -4
- package/lib/auth.js +17 -17
- package/lib/commands/apphosting-backends-delete.js +3 -38
- package/lib/commands/apphosting-backends-get.js +2 -32
- package/lib/commands/apphosting-backends-list.js +12 -5
- package/lib/commands/hosting-disable.js +1 -1
- package/lib/commands/open.js +1 -1
- package/lib/database/metadata.js +3 -3
- package/lib/defaultCredentials.js +2 -2
- package/lib/deploy/extensions/v2FunctionHelper.js +2 -1
- package/lib/deploy/functions/backend.js +5 -1
- package/lib/deploy/functions/build.js +10 -7
- package/lib/deploy/functions/containerCleaner.js +4 -4
- package/lib/deploy/functions/deploy.js +8 -2
- package/lib/deploy/functions/ensure.js +2 -2
- package/lib/deploy/functions/prepare.js +6 -9
- package/lib/deploy/functions/release/fabricator.js +9 -5
- package/lib/deploy/functions/runtimes/discovery/index.js +2 -2
- package/lib/deploy/functions/runtimes/discovery/v1alpha1.js +2 -1
- package/lib/deploy/functions/runtimes/node/parseTriggers.js +2 -2
- package/lib/deploy/hosting/uploader.js +1 -1
- package/lib/deploy/index.js +1 -1
- package/lib/deploy/remoteconfig/functions.js +1 -1
- package/lib/emulator/adminSdkConfig.js +1 -1
- package/lib/emulator/commandUtils.js +7 -4
- package/lib/emulator/controller.js +3 -4
- package/lib/emulator/downloadableEmulators.js +10 -10
- package/lib/emulator/functionsEmulator.js +21 -1
- package/lib/ensureApiEnabled.js +9 -7
- package/lib/extensions/extensionsApi.js +5 -5
- package/lib/extensions/extensionsHelper.js +4 -4
- package/lib/extensions/provisioningHelper.js +2 -2
- package/lib/extensions/publishHelpers.js +1 -1
- package/lib/extensions/publisherApi.js +3 -3
- package/lib/extensions/resolveSource.js +1 -1
- package/lib/extensions/secretsUtils.js +2 -1
- package/lib/extensions/tos.js +1 -1
- package/lib/fetchMOTD.js +1 -1
- package/lib/fetchWebSetup.js +4 -3
- package/lib/firestore/api-sort.js +17 -0
- package/lib/firestore/api.js +9 -2
- package/lib/firestore/checkDatabaseType.js +1 -1
- package/lib/firestore/delete.js +1 -1
- package/lib/firestore/pretty-print.js +11 -2
- package/lib/frameworks/index.js +6 -2
- package/lib/frameworks/next/constants.js +38 -1
- package/lib/frameworks/next/index.js +25 -3
- package/lib/frameworks/next/utils.js +20 -1
- package/lib/functions/secrets.js +3 -3
- package/lib/functionsConfig.js +1 -1
- package/lib/gcp/apphosting.js +22 -17
- package/lib/gcp/artifactregistry.js +1 -1
- package/lib/gcp/auth.js +6 -3
- package/lib/gcp/cloudbilling.js +1 -1
- package/lib/gcp/cloudbuild.js +1 -1
- package/lib/gcp/cloudfunctions.js +1 -1
- package/lib/gcp/cloudfunctionsv2.js +4 -1
- package/lib/gcp/cloudlogging.js +1 -1
- package/lib/gcp/cloudmonitoring.js +1 -1
- package/lib/gcp/cloudscheduler.js +2 -2
- package/lib/gcp/cloudtasks.js +1 -1
- package/lib/gcp/devConnect.js +84 -0
- package/lib/gcp/eventarc.js +1 -1
- package/lib/gcp/firestore.js +2 -2
- package/lib/gcp/iam.js +2 -2
- package/lib/gcp/identityPlatform.js +1 -1
- package/lib/gcp/pubsub.js +1 -1
- package/lib/gcp/resourceManager.js +2 -1
- package/lib/gcp/rules.js +1 -1
- package/lib/gcp/run.js +1 -1
- package/lib/gcp/runtimeconfig.js +1 -1
- package/lib/gcp/secretManager.js +1 -1
- package/lib/gcp/serviceusage.js +1 -1
- package/lib/gcp/storage.js +12 -8
- package/lib/hosting/api.js +14 -3
- package/lib/hosting/cloudRunProxy.js +1 -1
- package/lib/init/features/apphosting/index.js +5 -5
- package/lib/init/features/apphosting/repo.js +84 -99
- package/lib/init/features/database.js +2 -1
- package/lib/init/features/extensions/index.js +2 -1
- package/lib/init/features/functions/index.js +3 -2
- package/lib/init/features/hosting/github.js +4 -3
- package/lib/management/apps.js +4 -4
- package/lib/management/database.js +1 -1
- package/lib/management/projects.js +4 -4
- package/lib/remoteconfig/get.js +1 -1
- package/lib/remoteconfig/rollback.js +1 -1
- package/lib/remoteconfig/versionslist.js +1 -1
- package/lib/serve/functions.js +2 -0
- package/lib/shortenUrl.js +2 -2
- package/lib/utils.js +1 -1
- package/package.json +5 -5
|
@@ -8,14 +8,15 @@ const requirePermissions_1 = require("../../../requirePermissions");
|
|
|
8
8
|
const ensureApiEnabled_1 = require("../../../ensureApiEnabled");
|
|
9
9
|
const projectConfig_1 = require("../../../functions/projectConfig");
|
|
10
10
|
const error_1 = require("../../../error");
|
|
11
|
+
const api_1 = require("../../../api");
|
|
11
12
|
const MAX_ATTEMPTS = 5;
|
|
12
13
|
async function doSetup(setup, config, options) {
|
|
13
14
|
const projectId = setup?.rcfile?.projects?.default;
|
|
14
15
|
if (projectId) {
|
|
15
16
|
await (0, requirePermissions_1.requirePermissions)({ ...options, project: projectId });
|
|
16
17
|
await Promise.all([
|
|
17
|
-
(0, ensureApiEnabled_1.ensure)(projectId,
|
|
18
|
-
(0, ensureApiEnabled_1.ensure)(projectId,
|
|
18
|
+
(0, ensureApiEnabled_1.ensure)(projectId, (0, api_1.functionsOrigin)(), "unused", true),
|
|
19
|
+
(0, ensureApiEnabled_1.ensure)(projectId, (0, api_1.runtimeconfigOrigin)(), "unused", true),
|
|
19
20
|
]);
|
|
20
21
|
}
|
|
21
22
|
setup.functions = {};
|
|
@@ -28,7 +28,7 @@ const YML_MERGE_FILENAME = "firebase-hosting-merge.yml";
|
|
|
28
28
|
const CHECKOUT_GITHUB_ACTION_NAME = "actions/checkout@v4";
|
|
29
29
|
const HOSTING_GITHUB_ACTION_NAME = "FirebaseExtended/action-hosting-deploy@v0";
|
|
30
30
|
const SERVICE_ACCOUNT_MAX_KEY_NUMBER = 10;
|
|
31
|
-
const githubApiClient = new apiv2_1.Client({ urlPrefix: api_1.githubApiOrigin, auth: false });
|
|
31
|
+
const githubApiClient = new apiv2_1.Client({ urlPrefix: (0, api_1.githubApiOrigin)(), auth: false });
|
|
32
32
|
async function initGitHub(setup) {
|
|
33
33
|
if (!setup.projectId) {
|
|
34
34
|
return (0, utils_1.reject)("Could not determine Project ID, can't set up GitHub workflow.", { exit: 1 });
|
|
@@ -109,7 +109,7 @@ async function initGitHub(setup) {
|
|
|
109
109
|
}
|
|
110
110
|
logger_1.logger.info();
|
|
111
111
|
(0, utils_1.logLabeledBullet)("Action required", `Visit this URL to revoke authorization for the Firebase CLI GitHub OAuth App:`);
|
|
112
|
-
logger_1.logger.info((0, colorette_1.bold)((0, colorette_1.underline)(`https://github.com/settings/connections/applications/${api_1.githubClientId}`)));
|
|
112
|
+
logger_1.logger.info((0, colorette_1.bold)((0, colorette_1.underline)(`https://github.com/settings/connections/applications/${(0, api_1.githubClientId)()}`)));
|
|
113
113
|
(0, utils_1.logLabeledBullet)("Action required", `Push any new workflow file(s) to your repo`);
|
|
114
114
|
}
|
|
115
115
|
exports.initGitHub = initGitHub;
|
|
@@ -260,7 +260,7 @@ async function promptForRepo(options, ghAccessToken) {
|
|
|
260
260
|
(0, utils_1.logWarning)("The provided authorization cannot be used with this repository. If this repository is in an organization, did you remember to grant access?", "error");
|
|
261
261
|
logger_1.logger.info();
|
|
262
262
|
(0, utils_1.logLabeledBullet)("Action required", `Visit this URL to ensure access has been granted to the appropriate organization(s) for the Firebase CLI GitHub OAuth App:`);
|
|
263
|
-
logger_1.logger.info((0, colorette_1.bold)((0, colorette_1.underline)(`https://github.com/settings/connections/applications/${api_1.githubClientId}`)));
|
|
263
|
+
logger_1.logger.info((0, colorette_1.bold)((0, colorette_1.underline)(`https://github.com/settings/connections/applications/${(0, api_1.githubClientId)()}`)));
|
|
264
264
|
logger_1.logger.info();
|
|
265
265
|
}
|
|
266
266
|
return false;
|
|
@@ -378,6 +378,7 @@ async function createServiceAccountAndKey(options, repo, accountId) {
|
|
|
378
378
|
}
|
|
379
379
|
const requiredRoles = [
|
|
380
380
|
resourceManager_1.firebaseRoles.authAdmin,
|
|
381
|
+
resourceManager_1.firebaseRoles.serviceUsageConsumer,
|
|
381
382
|
resourceManager_1.firebaseRoles.apiKeysViewer,
|
|
382
383
|
resourceManager_1.firebaseRoles.hostingAdmin,
|
|
383
384
|
resourceManager_1.firebaseRoles.runViewer,
|
package/lib/management/apps.js
CHANGED
|
@@ -40,7 +40,7 @@ function getAppPlatform(platform) {
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
exports.getAppPlatform = getAppPlatform;
|
|
43
|
-
const apiClient = new apiv2_1.Client({ urlPrefix: api_1.firebaseApiOrigin, apiVersion: "v1beta1" });
|
|
43
|
+
const apiClient = new apiv2_1.Client({ urlPrefix: (0, api_1.firebaseApiOrigin)(), apiVersion: "v1beta1" });
|
|
44
44
|
async function createIosApp(projectId, options) {
|
|
45
45
|
try {
|
|
46
46
|
const response = await apiClient.request({
|
|
@@ -51,7 +51,7 @@ async function createIosApp(projectId, options) {
|
|
|
51
51
|
});
|
|
52
52
|
const appData = await (0, operation_poller_1.pollOperation)({
|
|
53
53
|
pollerName: "Create iOS app Poller",
|
|
54
|
-
apiOrigin: api_1.firebaseApiOrigin,
|
|
54
|
+
apiOrigin: (0, api_1.firebaseApiOrigin)(),
|
|
55
55
|
apiVersion: "v1beta1",
|
|
56
56
|
operationResourceName: response.body.name,
|
|
57
57
|
});
|
|
@@ -73,7 +73,7 @@ async function createAndroidApp(projectId, options) {
|
|
|
73
73
|
});
|
|
74
74
|
const appData = await (0, operation_poller_1.pollOperation)({
|
|
75
75
|
pollerName: "Create Android app Poller",
|
|
76
|
-
apiOrigin: api_1.firebaseApiOrigin,
|
|
76
|
+
apiOrigin: (0, api_1.firebaseApiOrigin)(),
|
|
77
77
|
apiVersion: "v1beta1",
|
|
78
78
|
operationResourceName: response.body.name,
|
|
79
79
|
});
|
|
@@ -98,7 +98,7 @@ async function createWebApp(projectId, options) {
|
|
|
98
98
|
});
|
|
99
99
|
const appData = await (0, operation_poller_1.pollOperation)({
|
|
100
100
|
pollerName: "Create Web app Poller",
|
|
101
|
-
apiOrigin: api_1.firebaseApiOrigin,
|
|
101
|
+
apiOrigin: (0, api_1.firebaseApiOrigin)(),
|
|
102
102
|
apiVersion: "v1beta1",
|
|
103
103
|
operationResourceName: response.body.name,
|
|
104
104
|
});
|
|
@@ -31,7 +31,7 @@ var DatabaseLocation;
|
|
|
31
31
|
DatabaseLocation["ASIA_SOUTHEAST1"] = "asia-southeast1";
|
|
32
32
|
DatabaseLocation["ANY"] = "-";
|
|
33
33
|
})(DatabaseLocation = exports.DatabaseLocation || (exports.DatabaseLocation = {}));
|
|
34
|
-
const apiClient = new apiv2_1.Client({ urlPrefix: api_1.rtdbManagementOrigin, apiVersion: exports.MGMT_API_VERSION });
|
|
34
|
+
const apiClient = new apiv2_1.Client({ urlPrefix: (0, api_1.rtdbManagementOrigin)(), apiVersion: exports.MGMT_API_VERSION });
|
|
35
35
|
async function populateInstanceDetails(options) {
|
|
36
36
|
options.instanceDetails = await getDatabaseInstanceDetails(options.project, options.instance);
|
|
37
37
|
return Promise.resolve();
|
|
@@ -35,7 +35,7 @@ exports.PROJECTS_CREATE_QUESTIONS = [
|
|
|
35
35
|
},
|
|
36
36
|
];
|
|
37
37
|
const firebaseAPIClient = new apiv2_1.Client({
|
|
38
|
-
urlPrefix: api.firebaseApiOrigin,
|
|
38
|
+
urlPrefix: api.firebaseApiOrigin(),
|
|
39
39
|
auth: true,
|
|
40
40
|
apiVersion: "v1beta1",
|
|
41
41
|
});
|
|
@@ -171,7 +171,7 @@ async function promptAvailableProjectId() {
|
|
|
171
171
|
exports.promptAvailableProjectId = promptAvailableProjectId;
|
|
172
172
|
async function createCloudProject(projectId, options) {
|
|
173
173
|
try {
|
|
174
|
-
const client = new apiv2_1.Client({ urlPrefix: api.resourceManagerOrigin, apiVersion: "v1" });
|
|
174
|
+
const client = new apiv2_1.Client({ urlPrefix: api.resourceManagerOrigin(), apiVersion: "v1" });
|
|
175
175
|
const data = {
|
|
176
176
|
projectId,
|
|
177
177
|
name: options.displayName || projectId,
|
|
@@ -185,7 +185,7 @@ async function createCloudProject(projectId, options) {
|
|
|
185
185
|
});
|
|
186
186
|
const projectInfo = await (0, operation_poller_1.pollOperation)({
|
|
187
187
|
pollerName: "Project Creation Poller",
|
|
188
|
-
apiOrigin: api.resourceManagerOrigin,
|
|
188
|
+
apiOrigin: api.resourceManagerOrigin(),
|
|
189
189
|
apiVersion: "v1",
|
|
190
190
|
operationResourceName: response.body.name,
|
|
191
191
|
});
|
|
@@ -216,7 +216,7 @@ async function addFirebaseToCloudProject(projectId) {
|
|
|
216
216
|
});
|
|
217
217
|
const projectInfo = await (0, operation_poller_1.pollOperation)({
|
|
218
218
|
pollerName: "Add Firebase Poller",
|
|
219
|
-
apiOrigin: api.firebaseApiOrigin,
|
|
219
|
+
apiOrigin: api.firebaseApiOrigin(),
|
|
220
220
|
apiVersion: "v1beta1",
|
|
221
221
|
operationResourceName: response.body.name,
|
|
222
222
|
});
|
package/lib/remoteconfig/get.js
CHANGED
|
@@ -8,7 +8,7 @@ const error_1 = require("../error");
|
|
|
8
8
|
const TIMEOUT = 30000;
|
|
9
9
|
const MAX_DISPLAY_ITEMS = 50;
|
|
10
10
|
const apiClient = new apiv2_1.Client({
|
|
11
|
-
urlPrefix: api_1.remoteConfigApiOrigin,
|
|
11
|
+
urlPrefix: (0, api_1.remoteConfigApiOrigin)(),
|
|
12
12
|
apiVersion: "v1",
|
|
13
13
|
});
|
|
14
14
|
function parseTemplateForTable(templateItems) {
|
|
@@ -4,7 +4,7 @@ exports.rollbackTemplate = void 0;
|
|
|
4
4
|
const api_1 = require("../api");
|
|
5
5
|
const apiv2_1 = require("../apiv2");
|
|
6
6
|
const apiClient = new apiv2_1.Client({
|
|
7
|
-
urlPrefix: api_1.remoteConfigApiOrigin,
|
|
7
|
+
urlPrefix: (0, api_1.remoteConfigApiOrigin)(),
|
|
8
8
|
apiVersion: "v1",
|
|
9
9
|
});
|
|
10
10
|
const TIMEOUT = 30000;
|
|
@@ -6,7 +6,7 @@ const apiv2_1 = require("../apiv2");
|
|
|
6
6
|
const error_1 = require("../error");
|
|
7
7
|
const logger_1 = require("../logger");
|
|
8
8
|
const apiClient = new apiv2_1.Client({
|
|
9
|
-
urlPrefix: api_1.remoteConfigApiOrigin,
|
|
9
|
+
urlPrefix: (0, api_1.remoteConfigApiOrigin)(),
|
|
10
10
|
apiVersion: "v1",
|
|
11
11
|
});
|
|
12
12
|
const TIMEOUT = 30000;
|
package/lib/serve/functions.js
CHANGED
|
@@ -8,6 +8,7 @@ const auth_1 = require("../auth");
|
|
|
8
8
|
const projectConfig = require("../functions/projectConfig");
|
|
9
9
|
const utils = require("../utils");
|
|
10
10
|
const registry_1 = require("../emulator/registry");
|
|
11
|
+
const commandUtils_1 = require("../emulator/commandUtils");
|
|
11
12
|
class FunctionsServer {
|
|
12
13
|
assertServer() {
|
|
13
14
|
if (!this.emulator || !this.backends) {
|
|
@@ -38,6 +39,7 @@ class FunctionsServer {
|
|
|
38
39
|
projectAlias: options.projectAlias,
|
|
39
40
|
account,
|
|
40
41
|
...partialArgs,
|
|
42
|
+
debugPort: (0, commandUtils_1.parseInspectionPort)(options),
|
|
41
43
|
};
|
|
42
44
|
if (options.host) {
|
|
43
45
|
utils.assertIsStringOrUndefined(options.host);
|
package/lib/shortenUrl.js
CHANGED
|
@@ -6,13 +6,13 @@ const apiv2_1 = require("./apiv2");
|
|
|
6
6
|
const api_1 = require("./api");
|
|
7
7
|
const DYNAMIC_LINKS_PREFIX = "https://firebase.tools/l";
|
|
8
8
|
const apiClient = new apiv2_1.Client({
|
|
9
|
-
urlPrefix: api_1.dynamicLinksOrigin,
|
|
9
|
+
urlPrefix: (0, api_1.dynamicLinksOrigin)(),
|
|
10
10
|
auth: false,
|
|
11
11
|
apiVersion: "v1",
|
|
12
12
|
});
|
|
13
13
|
async function shortenUrl(url, guessable = false) {
|
|
14
14
|
try {
|
|
15
|
-
const response = await apiClient.post(`shortLinks?key=${api_1.dynamicLinksKey}`, {
|
|
15
|
+
const response = await apiClient.post(`shortLinks?key=${(0, api_1.dynamicLinksKey)()}`, {
|
|
16
16
|
dynamicLinkInfo: {
|
|
17
17
|
link: url,
|
|
18
18
|
domainUriPrefix: DYNAMIC_LINKS_PREFIX,
|
package/lib/utils.js
CHANGED
|
@@ -27,7 +27,7 @@ const THIRTY_DAYS_IN_MILLISECONDS = 30 * 24 * 60 * 60 * 1000;
|
|
|
27
27
|
exports.envOverrides = [];
|
|
28
28
|
function consoleUrl(project, path) {
|
|
29
29
|
const api = require("./api");
|
|
30
|
-
return `${api.consoleOrigin}/project/${project}${path}`;
|
|
30
|
+
return `${api.consoleOrigin()}/project/${project}${path}`;
|
|
31
31
|
}
|
|
32
32
|
exports.consoleUrl = consoleUrl;
|
|
33
33
|
function getInheritedOption(options, key) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "firebase-tools-with-isolate",
|
|
3
|
+
"version": "13.6.0",
|
|
3
4
|
"description": "Command-Line Interface for Firebase with monorepo support",
|
|
4
|
-
"version": "13.3.1",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"firebase": "lib/bin/firebase.js"
|
|
@@ -187,12 +187,12 @@
|
|
|
187
187
|
"@types/marked-terminal": "^3.1.3",
|
|
188
188
|
"@types/mocha": "^9.0.0",
|
|
189
189
|
"@types/multer": "^1.4.3",
|
|
190
|
-
"@types/node": "^
|
|
190
|
+
"@types/node": "^18.19.1",
|
|
191
191
|
"@types/node-fetch": "^2.5.12",
|
|
192
192
|
"@types/progress": "^2.0.3",
|
|
193
193
|
"@types/puppeteer": "^5.4.2",
|
|
194
|
-
"@types/react": "^18.
|
|
195
|
-
"@types/react-dom": "^18.
|
|
194
|
+
"@types/react": "^18.2.58",
|
|
195
|
+
"@types/react-dom": "^18.2.19",
|
|
196
196
|
"@types/retry": "^0.12.1",
|
|
197
197
|
"@types/rimraf": "^2.0.3",
|
|
198
198
|
"@types/semver": "^6.0.0",
|
|
@@ -225,7 +225,7 @@
|
|
|
225
225
|
"google-discovery-to-swagger": "^2.1.0",
|
|
226
226
|
"googleapis": "^105.0.0",
|
|
227
227
|
"mocha": "^9.1.3",
|
|
228
|
-
"next": "^
|
|
228
|
+
"next": "^14.1.0",
|
|
229
229
|
"nock": "^13.0.5",
|
|
230
230
|
"node-mocks-http": "^1.11.0",
|
|
231
231
|
"nyc": "^15.1.0",
|