firebase-tools 9.23.3 → 10.1.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/api.js +1 -1
- package/lib/apiv2.js +2 -2
- package/lib/appdistribution/client.js +1 -1
- package/lib/appdistribution/options-parser-util.js +1 -1
- package/lib/auth.js +2 -2
- package/lib/command.js +26 -26
- package/lib/commands/appdistribution-distribute.js +4 -4
- package/lib/commands/appdistribution-testers-add.js +2 -2
- package/lib/commands/appdistribution-testers-remove.js +2 -2
- package/lib/commands/apps-android-sha-create.js +2 -2
- package/lib/commands/apps-android-sha-delete.js +2 -2
- package/lib/commands/apps-android-sha-list.js +2 -2
- package/lib/commands/apps-create.js +9 -9
- package/lib/commands/apps-list.js +3 -3
- package/lib/commands/apps-sdkconfig.js +8 -8
- package/lib/commands/database-get.js +1 -1
- package/lib/commands/database-instances-create.js +4 -4
- package/lib/commands/database-instances-list.js +4 -4
- package/lib/commands/database-profile.js +1 -1
- package/lib/commands/database-push.js +1 -1
- package/lib/commands/database-remove.js +4 -4
- package/lib/commands/database-set.js +4 -4
- package/lib/commands/database-settings-get.js +1 -1
- package/lib/commands/database-settings-set.js +1 -1
- package/lib/commands/database-update.js +4 -4
- package/lib/commands/ext-configure.js +2 -2
- package/lib/commands/ext-dev-deprecate.js +4 -4
- package/lib/commands/ext-dev-extension-delete.js +3 -3
- package/lib/commands/ext-dev-init.js +3 -3
- package/lib/commands/ext-dev-list.js +1 -1
- package/lib/commands/ext-dev-publish.js +3 -3
- package/lib/commands/ext-dev-register.js +5 -5
- package/lib/commands/ext-dev-undeprecate.js +4 -4
- package/lib/commands/ext-dev-unpublish.js +3 -3
- package/lib/commands/ext-dev-usage.js +145 -0
- package/lib/commands/ext-export.js +8 -8
- package/lib/commands/ext-info.js +4 -4
- package/lib/commands/ext-install.js +26 -22
- package/lib/commands/ext-list.js +2 -2
- package/lib/commands/ext-sources-create.js +2 -2
- package/lib/commands/ext-uninstall.js +3 -3
- package/lib/commands/ext-update.js +17 -17
- package/lib/commands/ext.js +3 -3
- package/lib/commands/firestore-delete.js +3 -3
- package/lib/commands/functions-config-export.js +11 -11
- package/lib/commands/functions-delete.js +3 -3
- package/lib/commands/functions-deletegcfartifacts.js +4 -4
- package/lib/commands/functions-list.js +1 -1
- package/lib/commands/functions-log.js +1 -1
- package/lib/commands/hosting-channel-create.js +12 -12
- package/lib/commands/hosting-channel-delete.js +9 -9
- package/lib/commands/hosting-channel-deploy.js +17 -17
- package/lib/commands/hosting-channel-list.js +5 -5
- package/lib/commands/hosting-channel-open.js +9 -9
- package/lib/commands/hosting-clone.js +15 -15
- package/lib/commands/hosting-disable.js +4 -4
- package/lib/commands/hosting-sites-create.js +7 -7
- package/lib/commands/hosting-sites-delete.js +7 -7
- package/lib/commands/hosting-sites-get.js +2 -2
- package/lib/commands/hosting-sites-list.js +3 -3
- package/lib/commands/index.js +1 -0
- package/lib/commands/login.js +2 -2
- package/lib/commands/logout.js +1 -1
- package/lib/commands/open.js +1 -1
- package/lib/commands/projects-addfirebase.js +2 -2
- package/lib/commands/projects-create.js +2 -2
- package/lib/commands/projects-list.js +1 -1
- package/lib/commands/remoteconfig-get.js +3 -3
- package/lib/commands/remoteconfig-rollback.js +3 -3
- package/lib/commands/remoteconfig-versions-list.js +1 -1
- package/lib/commands/setup-emulators-storage.js +1 -1
- package/lib/config.js +6 -6
- package/lib/database/api.js +2 -2
- package/lib/deploy/extensions/deploy.js +4 -4
- package/lib/deploy/extensions/deploymentSummary.js +5 -4
- package/lib/deploy/extensions/index.js +1 -0
- package/lib/deploy/extensions/params.js +1 -1
- package/lib/deploy/extensions/planner.js +3 -3
- package/lib/deploy/extensions/prepare.js +9 -9
- package/lib/deploy/extensions/release.js +1 -1
- package/lib/deploy/extensions/secrets.js +7 -7
- package/lib/deploy/extensions/validate.js +2 -2
- package/lib/deploy/functions/backend.js +6 -4
- package/lib/deploy/functions/checkIam.js +7 -7
- package/lib/deploy/functions/containerCleaner.js +3 -3
- package/lib/deploy/functions/deploy.js +10 -11
- package/lib/deploy/functions/ensureCloudBuildEnabled.js +3 -3
- package/lib/deploy/functions/index.js +1 -0
- package/lib/deploy/functions/prepare.js +27 -21
- package/lib/deploy/functions/prompts.js +5 -5
- package/lib/deploy/functions/release/executor.js +4 -1
- package/lib/deploy/functions/release/fabricator.js +5 -5
- package/lib/deploy/functions/release/index.js +3 -3
- package/lib/deploy/functions/release/planner.js +6 -6
- package/lib/deploy/functions/release/reporter.js +8 -4
- package/lib/deploy/functions/runtimes/discovery/index.js +2 -2
- package/lib/deploy/functions/runtimes/discovery/v1alpha1.js +14 -14
- package/lib/deploy/functions/runtimes/golang/index.js +9 -13
- package/lib/deploy/functions/runtimes/index.js +6 -10
- package/lib/deploy/functions/runtimes/node/index.js +6 -10
- package/lib/deploy/functions/runtimes/node/parseRuntimeAndValidateSDK.js +1 -1
- package/lib/deploy/functions/runtimes/node/parseTriggers.js +3 -3
- package/lib/deploy/functions/runtimes/node/validate.js +2 -1
- package/lib/deploy/functions/services/storage.js +1 -1
- package/lib/deploy/functions/triggerRegionHelper.js +1 -1
- package/lib/deploy/functions/validate.js +4 -3
- package/lib/deploy/hosting/deploy.js +7 -7
- package/lib/deploy/hosting/uploader.js +1 -1
- package/lib/deploy/hosting/validate.js +3 -3
- package/lib/deploy/remoteconfig/prepare.js +3 -3
- package/lib/deploy/remoteconfig/release.js +3 -3
- package/lib/deploy/storage/deploy.js +1 -1
- package/lib/deploy/storage/release.js +2 -2
- package/lib/detectProjectRoot.js +5 -5
- package/lib/emulator/auth/apiSpec.js +13 -7
- package/lib/emulator/auth/handlers.js +3 -3
- package/lib/emulator/auth/index.js +1 -1
- package/lib/emulator/auth/operations.js +256 -248
- package/lib/emulator/auth/server.js +11 -8
- package/lib/emulator/auth/state.js +12 -12
- package/lib/emulator/commandUtils.js +5 -5
- package/lib/emulator/controller.js +16 -11
- package/lib/emulator/downloadableEmulators.js +2 -2
- package/lib/emulator/emulatorLogger.js +1 -1
- package/lib/emulator/functionsEmulator.js +101 -74
- package/lib/emulator/functionsEmulatorRuntime.js +33 -18
- package/lib/emulator/functionsEmulatorShell.js +3 -2
- package/lib/emulator/functionsRuntimeWorker.js +1 -1
- package/lib/emulator/hubExport.js +2 -2
- package/lib/emulator/storage/apis/firebase.js +2 -2
- package/lib/emulator/storage/apis/gcloud.js +2 -2
- package/lib/emulator/storage/cloudFunctions.js +1 -1
- package/lib/emulator/storage/files.js +14 -14
- package/lib/emulator/storage/index.js +2 -2
- package/lib/emulator/storage/metadata.js +7 -6
- package/lib/emulator/storage/rules/runtime.js +5 -5
- package/lib/emulator/storage/server.js +2 -2
- package/lib/ensureApiEnabled.js +7 -7
- package/lib/error.js +3 -3
- package/lib/extensions/askUserForConsent.js +2 -3
- package/lib/extensions/askUserForParam.js +10 -10
- package/lib/extensions/billingMigrationHelper.js +1 -1
- package/lib/extensions/changelog.js +3 -3
- package/lib/extensions/displayExtensionInfo.js +5 -5
- package/lib/extensions/emulator/optionsHelper.js +1 -1
- package/lib/extensions/emulator/specHelper.js +1 -1
- package/lib/extensions/emulator/triggerHelper.js +1 -1
- package/lib/extensions/export.js +6 -6
- package/lib/extensions/extensionsApi.js +14 -1
- package/lib/extensions/extensionsHelper.js +38 -29
- package/lib/extensions/listExtensions.js +1 -1
- package/lib/extensions/localHelper.js +1 -1
- package/lib/extensions/metricsTypeDef.js +2 -0
- package/lib/extensions/metricsUtils.js +98 -0
- package/lib/extensions/paramHelper.js +6 -6
- package/lib/extensions/provisioningHelper.js +6 -4
- package/lib/extensions/resolveSource.js +1 -1
- package/lib/extensions/secretsUtils.js +3 -3
- package/lib/extensions/updateHelper.js +9 -9
- package/lib/extensions/utils.js +1 -1
- package/lib/extensions/warnings.js +10 -9
- package/lib/fetchWebSetup.js +2 -2
- package/lib/filterTargets.js +2 -2
- package/lib/firestore/indexes.js +2 -2
- package/lib/fsAsync.js +3 -3
- package/lib/fsutils.js +2 -2
- package/lib/functional.js +2 -1
- package/lib/functions/env.js +1 -1
- package/lib/functions/runtimeConfigExport.js +4 -4
- package/lib/functionsConfig.js +3 -3
- package/lib/functionsShellCommandAction.js +4 -3
- package/lib/gcp/cloudmonitoring.js +74 -0
- package/lib/gcp/cloudscheduler.js +1 -1
- package/lib/gcp/iam.js +2 -2
- package/lib/gcp/resourceManager.js +2 -2
- package/lib/gcp/secretManager.js +3 -2
- package/lib/getDefaultDatabaseInstance.js +1 -1
- package/lib/getDefaultHostingSite.js +1 -1
- package/lib/getProjectNumber.js +2 -2
- package/lib/handlePreviewToggles.js +5 -5
- package/lib/hosting/api.js +6 -6
- package/lib/hosting/cloudRunProxy.js +6 -6
- package/lib/hosting/functionsProxy.js +3 -3
- package/lib/hosting/implicitInit.js +2 -2
- package/lib/hosting/normalizedHostingConfigs.js +3 -3
- package/lib/hosting/proxy.js +2 -2
- package/lib/init/features/account.js +7 -7
- package/lib/init/features/database.js +9 -9
- package/lib/init/features/emulators.js +8 -8
- package/lib/init/features/firestore/index.js +3 -3
- package/lib/init/features/firestore/indexes.js +2 -2
- package/lib/init/features/firestore/rules.js +2 -2
- package/lib/init/features/functions/golang.js +4 -4
- package/lib/init/features/functions/index.js +4 -4
- package/lib/init/features/hosting/github.js +31 -31
- package/lib/init/features/project.js +8 -8
- package/lib/init/features/remoteconfig.js +2 -2
- package/lib/init/features/storage.js +2 -2
- package/lib/listFiles.js +1 -1
- package/lib/management/apps.js +3 -3
- package/lib/management/projects.js +6 -6
- package/lib/previews.js +2 -2
- package/lib/profiler.js +1 -1
- package/lib/projectPath.js +1 -1
- package/lib/projectUtils.js +1 -1
- package/lib/prompt.js +0 -1
- package/lib/rc.js +1 -1
- package/lib/requireAuth.js +2 -2
- package/lib/requireDatabaseInstance.js +1 -1
- package/lib/requireHostingSite.js +1 -1
- package/lib/requirePermissions.js +4 -4
- package/lib/rulesDeploy.js +2 -2
- package/lib/serve/functions.js +14 -7
- package/lib/serve/hosting.js +7 -7
- package/lib/utils.js +3 -2
- package/npm-shrinkwrap.json +24889 -0
- package/package.json +24 -24
- package/templates/init/functions/javascript/package.lint.json +1 -1
- package/templates/init/functions/javascript/package.nolint.json +1 -1
- package/templates/init/functions/typescript/package.lint.json +1 -1
- package/templates/init/functions/typescript/package.nolint.json +1 -1
- package/templates/init/hosting/index.html +1 -1
- package/CHANGELOG.md +0 -1
|
@@ -9,8 +9,8 @@ function backendFromV1Alpha1(yaml, project, region, runtime) {
|
|
|
9
9
|
const manifest = JSON.parse(JSON.stringify(yaml));
|
|
10
10
|
const bkend = backend.empty();
|
|
11
11
|
bkend.requiredAPIs = parseRequiredAPIs(manifest);
|
|
12
|
-
parsing_1.requireKeys("", manifest, "endpoints");
|
|
13
|
-
parsing_1.assertKeyTypes("", manifest, {
|
|
12
|
+
(0, parsing_1.requireKeys)("", manifest, "endpoints");
|
|
13
|
+
(0, parsing_1.assertKeyTypes)("", manifest, {
|
|
14
14
|
specVersion: "string",
|
|
15
15
|
requiredAPIs: "object",
|
|
16
16
|
endpoints: "object",
|
|
@@ -41,7 +41,7 @@ function parseEndpoints(manifest, id, project, defaultRegion, runtime) {
|
|
|
41
41
|
const allParsed = [];
|
|
42
42
|
const prefix = `endpoints[${id}]`;
|
|
43
43
|
const ep = manifest.endpoints[id];
|
|
44
|
-
parsing_1.assertKeyTypes(prefix, ep, {
|
|
44
|
+
(0, parsing_1.assertKeyTypes)(prefix, ep, {
|
|
45
45
|
region: "array",
|
|
46
46
|
platform: "string",
|
|
47
47
|
entryPoint: "string",
|
|
@@ -83,8 +83,8 @@ function parseEndpoints(manifest, id, project, defaultRegion, runtime) {
|
|
|
83
83
|
for (const region of ep.region || [defaultRegion]) {
|
|
84
84
|
let triggered;
|
|
85
85
|
if (backend.isEventTriggered(ep)) {
|
|
86
|
-
parsing_1.requireKeys(prefix + ".eventTrigger", ep.eventTrigger, "eventType", "eventFilters");
|
|
87
|
-
parsing_1.assertKeyTypes(prefix + ".eventTrigger", ep.eventTrigger, {
|
|
86
|
+
(0, parsing_1.requireKeys)(prefix + ".eventTrigger", ep.eventTrigger, "eventType", "eventFilters");
|
|
87
|
+
(0, parsing_1.assertKeyTypes)(prefix + ".eventTrigger", ep.eventTrigger, {
|
|
88
88
|
eventFilters: "object",
|
|
89
89
|
eventType: "string",
|
|
90
90
|
retry: "boolean",
|
|
@@ -94,19 +94,19 @@ function parseEndpoints(manifest, id, project, defaultRegion, runtime) {
|
|
|
94
94
|
triggered = { eventTrigger: ep.eventTrigger };
|
|
95
95
|
}
|
|
96
96
|
else if (backend.isHttpsTriggered(ep)) {
|
|
97
|
-
parsing_1.assertKeyTypes(prefix + ".httpsTrigger", ep.httpsTrigger, {
|
|
97
|
+
(0, parsing_1.assertKeyTypes)(prefix + ".httpsTrigger", ep.httpsTrigger, {
|
|
98
98
|
invoker: "array",
|
|
99
99
|
});
|
|
100
100
|
triggered = { httpsTrigger: {} };
|
|
101
|
-
proto_1.copyIfPresent(triggered.httpsTrigger, ep.httpsTrigger, "invoker");
|
|
101
|
+
(0, proto_1.copyIfPresent)(triggered.httpsTrigger, ep.httpsTrigger, "invoker");
|
|
102
102
|
}
|
|
103
103
|
else if (backend.isScheduleTriggered(ep)) {
|
|
104
|
-
parsing_1.assertKeyTypes(prefix + ".scheduleTrigger", ep.scheduleTrigger, {
|
|
104
|
+
(0, parsing_1.assertKeyTypes)(prefix + ".scheduleTrigger", ep.scheduleTrigger, {
|
|
105
105
|
schedule: "string",
|
|
106
106
|
timeZone: "string",
|
|
107
107
|
retryConfig: "object",
|
|
108
108
|
});
|
|
109
|
-
parsing_1.assertKeyTypes(prefix + ".scheduleTrigger.retryConfig", ep.scheduleTrigger.retryConfig, {
|
|
109
|
+
(0, parsing_1.assertKeyTypes)(prefix + ".scheduleTrigger.retryConfig", ep.scheduleTrigger.retryConfig, {
|
|
110
110
|
retryCount: "number",
|
|
111
111
|
maxDoublings: "number",
|
|
112
112
|
minBackoffDuration: "string",
|
|
@@ -116,20 +116,20 @@ function parseEndpoints(manifest, id, project, defaultRegion, runtime) {
|
|
|
116
116
|
triggered = { scheduleTrigger: ep.scheduleTrigger };
|
|
117
117
|
}
|
|
118
118
|
else if (backend.isTaskQueueTriggered(ep)) {
|
|
119
|
-
parsing_1.assertKeyTypes(prefix + ".taskQueueTrigger", ep.taskQueueTrigger, {
|
|
119
|
+
(0, parsing_1.assertKeyTypes)(prefix + ".taskQueueTrigger", ep.taskQueueTrigger, {
|
|
120
120
|
rateLimits: "object",
|
|
121
121
|
retryConfig: "object",
|
|
122
122
|
invoker: "array",
|
|
123
123
|
});
|
|
124
124
|
if (ep.taskQueueTrigger.rateLimits) {
|
|
125
|
-
parsing_1.assertKeyTypes(prefix + ".taskQueueTrigger.rateLimits", ep.taskQueueTrigger.rateLimits, {
|
|
125
|
+
(0, parsing_1.assertKeyTypes)(prefix + ".taskQueueTrigger.rateLimits", ep.taskQueueTrigger.rateLimits, {
|
|
126
126
|
maxBurstSize: "number",
|
|
127
127
|
maxConcurrentDispatches: "number",
|
|
128
128
|
maxDispatchesPerSecond: "number",
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
131
|
if (ep.taskQueueTrigger.retryConfig) {
|
|
132
|
-
parsing_1.assertKeyTypes(prefix + ".taskQueueTrigger.retryConfig", ep.taskQueueTrigger.retryConfig, {
|
|
132
|
+
(0, parsing_1.assertKeyTypes)(prefix + ".taskQueueTrigger.retryConfig", ep.taskQueueTrigger.retryConfig, {
|
|
133
133
|
maxAttempts: "number",
|
|
134
134
|
maxRetryDuration: "string",
|
|
135
135
|
minBackoff: "string",
|
|
@@ -143,12 +143,12 @@ function parseEndpoints(manifest, id, project, defaultRegion, runtime) {
|
|
|
143
143
|
throw new error_1.FirebaseError(`Do not recognize trigger type for endpoint ${id}. Try upgrading ` +
|
|
144
144
|
"firebase-tools with npm install -g firebase-tools@latest");
|
|
145
145
|
}
|
|
146
|
-
parsing_1.requireKeys(prefix, ep, "entryPoint");
|
|
146
|
+
(0, parsing_1.requireKeys)(prefix, ep, "entryPoint");
|
|
147
147
|
const parsed = Object.assign({ platform: ep.platform || "gcfv2", id,
|
|
148
148
|
region,
|
|
149
149
|
project,
|
|
150
150
|
runtime, entryPoint: ep.entryPoint }, triggered);
|
|
151
|
-
proto_1.copyIfPresent(parsed, ep, "availableMemoryMb", "maxInstances", "minInstances", "concurrency", "serviceAccountEmail", "timeout", "vpcConnector", "vpcConnectorEgressSettings", "labels", "ingressSettings", "environmentVariables");
|
|
151
|
+
(0, proto_1.copyIfPresent)(parsed, ep, "availableMemoryMb", "maxInstances", "minInstances", "concurrency", "serviceAccountEmail", "timeout", "vpcConnector", "vpcConnectorEgressSettings", "labels", "ingressSettings", "environmentVariables");
|
|
152
152
|
allParsed.push(parsed);
|
|
153
153
|
}
|
|
154
154
|
return allParsed;
|
|
@@ -10,7 +10,6 @@ const spawn = require("cross-spawn");
|
|
|
10
10
|
const error_1 = require("../../../../error");
|
|
11
11
|
const logger_1 = require("../../../../logger");
|
|
12
12
|
const discovery = require("../discovery");
|
|
13
|
-
const projectUtils_1 = require("../../../../projectUtils");
|
|
14
13
|
const gomod = require("./gomod");
|
|
15
14
|
const VERSION_TO_RUNTIME = {
|
|
16
15
|
"1.13": "go113",
|
|
@@ -19,21 +18,18 @@ exports.ADMIN_SDK = "firebase.google.com/go/v4";
|
|
|
19
18
|
exports.FUNCTIONS_SDK = "github.com/FirebaseExtended/firebase-functions-go";
|
|
20
19
|
exports.FUNCTIONS_CODEGEN = exports.FUNCTIONS_SDK + "/support/codegen";
|
|
21
20
|
exports.FUNCTIONS_RUNTIME = exports.FUNCTIONS_SDK + "/support/runtime";
|
|
22
|
-
async function tryCreateDelegate(context
|
|
23
|
-
const
|
|
24
|
-
const sourceDir = options.config.path(relativeSourceDir);
|
|
25
|
-
const goModPath = path.join(sourceDir, "go.mod");
|
|
26
|
-
const projectId = projectUtils_1.needProjectId(options);
|
|
21
|
+
async function tryCreateDelegate(context) {
|
|
22
|
+
const goModPath = path.join(context.sourceDir, "go.mod");
|
|
27
23
|
let module;
|
|
28
24
|
try {
|
|
29
|
-
const modBuffer = await util_1.promisify(fs.readFile)(goModPath);
|
|
25
|
+
const modBuffer = await (0, util_1.promisify)(fs.readFile)(goModPath);
|
|
30
26
|
module = gomod.parseModule(modBuffer.toString("utf8"));
|
|
31
27
|
}
|
|
32
28
|
catch (err) {
|
|
33
29
|
logger_1.logger.debug("Customer code is not Golang code (or they aren't using gomod)");
|
|
34
30
|
return;
|
|
35
31
|
}
|
|
36
|
-
let runtime =
|
|
32
|
+
let runtime = context.runtime;
|
|
37
33
|
if (!runtime) {
|
|
38
34
|
if (!module.version) {
|
|
39
35
|
throw new error_1.FirebaseError("Could not detect Golang version from go.mod");
|
|
@@ -43,7 +39,7 @@ async function tryCreateDelegate(context, options) {
|
|
|
43
39
|
}
|
|
44
40
|
runtime = VERSION_TO_RUNTIME[module.version];
|
|
45
41
|
}
|
|
46
|
-
return new Delegate(projectId, sourceDir, runtime, module);
|
|
42
|
+
return new Delegate(context.projectId, context.sourceDir, runtime, module);
|
|
47
43
|
}
|
|
48
44
|
exports.tryCreateDelegate = tryCreateDelegate;
|
|
49
45
|
class Delegate {
|
|
@@ -59,7 +55,7 @@ class Delegate {
|
|
|
59
55
|
}
|
|
60
56
|
async build() {
|
|
61
57
|
try {
|
|
62
|
-
await util_1.promisify(fs.mkdir)(path.join(this.sourceDir, "autogen"));
|
|
58
|
+
await (0, util_1.promisify)(fs.mkdir)(path.join(this.sourceDir, "autogen"));
|
|
63
59
|
}
|
|
64
60
|
catch (err) {
|
|
65
61
|
if ((err === null || err === void 0 ? void 0 : err.code) !== "EEXIST") {
|
|
@@ -80,7 +76,7 @@ class Delegate {
|
|
|
80
76
|
children: [new Error(genBinary.stderr.toString())],
|
|
81
77
|
});
|
|
82
78
|
}
|
|
83
|
-
await util_1.promisify(fs.writeFile)(path.join(this.sourceDir, "autogen", "main.go"), genBinary.stdout);
|
|
79
|
+
await (0, util_1.promisify)(fs.writeFile)(path.join(this.sourceDir, "autogen", "main.go"), genBinary.stdout);
|
|
84
80
|
}
|
|
85
81
|
watch() {
|
|
86
82
|
return Promise.resolve(() => Promise.resolve());
|
|
@@ -99,7 +95,7 @@ class Delegate {
|
|
|
99
95
|
childProcess.once("exit", resolve);
|
|
100
96
|
childProcess.once("error", reject);
|
|
101
97
|
});
|
|
102
|
-
await node_fetch_1.default(`http://localhost:${adminPort}/quitquitquit`);
|
|
98
|
+
await (0, node_fetch_1.default)(`http://localhost:${adminPort}/quitquitquit`);
|
|
103
99
|
setTimeout(() => {
|
|
104
100
|
if (!childProcess.killed) {
|
|
105
101
|
childProcess.kill("SIGKILL");
|
|
@@ -111,7 +107,7 @@ class Delegate {
|
|
|
111
107
|
async discoverSpec(configValues, envs) {
|
|
112
108
|
let discovered = await discovery.detectFromYaml(this.sourceDir, this.projectId, this.runtime);
|
|
113
109
|
if (!discovered) {
|
|
114
|
-
const getPort = util_1.promisify(portfinder.getPort);
|
|
110
|
+
const getPort = (0, util_1.promisify)(portfinder.getPort);
|
|
115
111
|
const port = await getPort();
|
|
116
112
|
portfinder.basePort = port + 1;
|
|
117
113
|
const adminPort = await getPort();
|
|
@@ -30,22 +30,18 @@ function getHumanFriendlyRuntimeName(runtime) {
|
|
|
30
30
|
}
|
|
31
31
|
exports.getHumanFriendlyRuntimeName = getHumanFriendlyRuntimeName;
|
|
32
32
|
const factories = [node.tryCreateDelegate, golang.tryCreateDelegate];
|
|
33
|
-
async function getRuntimeDelegate(context
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
throw new error_1.FirebaseError(`No functions code detected at default location (./functions), and no functions.source defined in firebase.json`);
|
|
37
|
-
}
|
|
38
|
-
validate.functionsDirectoryExists(options, sourceDirName);
|
|
39
|
-
const runtime = options.config.get("functions.runtime");
|
|
33
|
+
async function getRuntimeDelegate(context) {
|
|
34
|
+
const { projectDir, sourceDir, runtime } = context;
|
|
35
|
+
validate.functionsDirectoryExists(sourceDir, projectDir);
|
|
40
36
|
if (runtime && !isValidRuntime(runtime)) {
|
|
41
|
-
throw new error_1.FirebaseError(
|
|
37
|
+
throw new error_1.FirebaseError(`Cannot deploy function with runtime ${runtime}`);
|
|
42
38
|
}
|
|
43
39
|
for (const factory of factories) {
|
|
44
|
-
const delegate = await factory(context
|
|
40
|
+
const delegate = await factory(context);
|
|
45
41
|
if (delegate) {
|
|
46
42
|
return delegate;
|
|
47
43
|
}
|
|
48
44
|
}
|
|
49
|
-
throw new error_1.FirebaseError(`Could not detect language for functions at ${
|
|
45
|
+
throw new error_1.FirebaseError(`Could not detect language for functions at ${sourceDir}`);
|
|
50
46
|
}
|
|
51
47
|
exports.getRuntimeDelegate = getRuntimeDelegate;
|
|
@@ -6,26 +6,22 @@ const fs = require("fs");
|
|
|
6
6
|
const path = require("path");
|
|
7
7
|
const error_1 = require("../../../../error");
|
|
8
8
|
const parseRuntimeAndValidateSDK_1 = require("./parseRuntimeAndValidateSDK");
|
|
9
|
-
const projectUtils_1 = require("../../../../projectUtils");
|
|
10
|
-
const validate = require("./validate");
|
|
11
9
|
const logger_1 = require("../../../../logger");
|
|
10
|
+
const validate = require("./validate");
|
|
12
11
|
const versioning = require("./versioning");
|
|
13
12
|
const parseTriggers = require("./parseTriggers");
|
|
14
|
-
async function tryCreateDelegate(context
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
const packageJsonPath = path.join(sourceDir, "package.json");
|
|
18
|
-
if (!(await util_1.promisify(fs.exists)(packageJsonPath))) {
|
|
13
|
+
async function tryCreateDelegate(context) {
|
|
14
|
+
const packageJsonPath = path.join(context.sourceDir, "package.json");
|
|
15
|
+
if (!(await (0, util_1.promisify)(fs.exists)(packageJsonPath))) {
|
|
19
16
|
logger_1.logger.debug("Customer code is not Node");
|
|
20
17
|
return undefined;
|
|
21
18
|
}
|
|
22
|
-
|
|
23
|
-
runtime = parseRuntimeAndValidateSDK_1.getRuntimeChoice(sourceDir, runtime);
|
|
19
|
+
const runtime = (0, parseRuntimeAndValidateSDK_1.getRuntimeChoice)(context.sourceDir, context.runtime);
|
|
24
20
|
if (!runtime.startsWith("nodejs")) {
|
|
25
21
|
logger_1.logger.debug("Customer has a package.json but did not get a nodejs runtime. This should not happen");
|
|
26
22
|
throw new error_1.FirebaseError(`Unexpected runtime ${runtime}`);
|
|
27
23
|
}
|
|
28
|
-
return new Delegate(
|
|
24
|
+
return new Delegate(context.projectId, context.projectDir, context.sourceDir, runtime);
|
|
29
25
|
}
|
|
30
26
|
exports.tryCreateDelegate = tryCreateDelegate;
|
|
31
27
|
class Delegate {
|
|
@@ -18,7 +18,7 @@ const ENGINE_RUNTIMES = {
|
|
|
18
18
|
const ENGINE_RUNTIMES_NAMES = Object.values(ENGINE_RUNTIMES);
|
|
19
19
|
exports.RUNTIME_NOT_SET = "`runtime` field is required but was not found in firebase.json.\n" +
|
|
20
20
|
"To fix this, add the following lines to the `functions` section of your firebase.json:\n" +
|
|
21
|
-
'"runtime": "
|
|
21
|
+
'"runtime": "nodejs16"\n';
|
|
22
22
|
exports.UNSUPPORTED_NODE_VERSION_FIREBASE_JSON_MSG = clc.bold(`functions.runtime value is unsupported. ` +
|
|
23
23
|
`Valid choices are: ${clc.bold("nodejs{10|12|14|16}")}.`);
|
|
24
24
|
exports.UNSUPPORTED_NODE_VERSION_PACKAGE_JSON_MSG = clc.bold(`package.json in functions directory has an engines field which is unsupported. ` +
|
|
@@ -25,7 +25,7 @@ function parseTriggers(projectId, sourceDir, configValues, envs) {
|
|
|
25
25
|
if (env.NODE_OPTIONS) {
|
|
26
26
|
env.NODE_OPTIONS = removeInspectOptions(env.NODE_OPTIONS.split(" ")).join(" ");
|
|
27
27
|
}
|
|
28
|
-
const parser = child_process_1.fork(TRIGGER_PARSER, [sourceDir], {
|
|
28
|
+
const parser = (0, child_process_1.fork)(TRIGGER_PARSER, [sourceDir], {
|
|
29
29
|
silent: true,
|
|
30
30
|
env: env,
|
|
31
31
|
execArgv: execArgv,
|
|
@@ -100,9 +100,9 @@ function addResourcesToBackend(projectId, runtime, annotation, want) {
|
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
const endpoint = Object.assign({ platform: annotation.platform || "gcfv1", id: annotation.name, region: region, project: projectId, entryPoint: annotation.entryPoint, runtime: runtime }, triggered);
|
|
103
|
-
if (annotation.vpcConnector) {
|
|
103
|
+
if (annotation.vpcConnector != null) {
|
|
104
104
|
let maybeId = annotation.vpcConnector;
|
|
105
|
-
if (!maybeId.includes("/")) {
|
|
105
|
+
if (maybeId && !maybeId.includes("/")) {
|
|
106
106
|
maybeId = `projects/${projectId}/locations/${region}/connectors/${maybeId}`;
|
|
107
107
|
}
|
|
108
108
|
endpoint.vpcConnector = maybeId;
|
|
@@ -9,7 +9,8 @@ const cjson = require("cjson");
|
|
|
9
9
|
function assertFunctionsSourcePresent(data, sourceDir, projectDir) {
|
|
10
10
|
const indexJsFile = path.join(sourceDir, data.main || "index.js");
|
|
11
11
|
if (!fsutils.fileExistsSync(indexJsFile)) {
|
|
12
|
-
const
|
|
12
|
+
const relativeMainPath = path.relative(projectDir, indexJsFile);
|
|
13
|
+
const msg = `${relativeMainPath} does not exist, can't deploy Cloud Functions`;
|
|
13
14
|
throw new error_1.FirebaseError(msg);
|
|
14
15
|
}
|
|
15
16
|
}
|
|
@@ -36,7 +36,7 @@ async function ensureStorageTriggerRegion(endpoint, eventTrigger) {
|
|
|
36
36
|
}
|
|
37
37
|
if (endpoint.region !== eventTrigger.region &&
|
|
38
38
|
eventTrigger.region !== "us-central1" &&
|
|
39
|
-
!location_1.regionInLocation(endpoint.region, eventTrigger.region)) {
|
|
39
|
+
!(0, location_1.regionInLocation)(endpoint.region, eventTrigger.region)) {
|
|
40
40
|
throw new error_1.FirebaseError(`A function in region ${endpoint.region} cannot listen to a bucket in region ${eventTrigger.region}`);
|
|
41
41
|
}
|
|
42
42
|
}
|
|
@@ -9,7 +9,7 @@ async function ensureTriggerRegions(want) {
|
|
|
9
9
|
if (ep.platform === "gcfv1" || !backend.isEventTriggered(ep)) {
|
|
10
10
|
continue;
|
|
11
11
|
}
|
|
12
|
-
regionLookups.push(services_1.serviceForEndpoint(ep).ensureTriggerRegion(ep, ep.eventTrigger));
|
|
12
|
+
regionLookups.push((0, services_1.serviceForEndpoint)(ep).ensureTriggerRegion(ep, ep.eventTrigger));
|
|
13
13
|
}
|
|
14
14
|
await Promise.all(regionLookups);
|
|
15
15
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.functionIdsAreValid = exports.functionsDirectoryExists = void 0;
|
|
4
|
+
const path = require("path");
|
|
4
5
|
const clc = require("cli-color");
|
|
5
6
|
const error_1 = require("../../error");
|
|
6
7
|
const fsutils = require("../../fsutils");
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
function functionsDirectoryExists(sourceDir, projectDir) {
|
|
9
|
+
if (!fsutils.dirExistsSync(sourceDir)) {
|
|
10
|
+
const sourceDirName = path.relative(projectDir, sourceDir);
|
|
10
11
|
const msg = `could not deploy functions because the ${clc.bold('"' + sourceDirName + '"')} ` +
|
|
11
12
|
`directory was not found. Please create it or specify a different source directory in firebase.json`;
|
|
12
13
|
throw new error_1.FirebaseError(msg);
|
|
@@ -18,7 +18,7 @@ async function deploy(context, options) {
|
|
|
18
18
|
let spins = 0;
|
|
19
19
|
function updateSpinner(newMessage, debugging) {
|
|
20
20
|
if (debugging) {
|
|
21
|
-
utils_1.logLabeledBullet("hosting", newMessage);
|
|
21
|
+
(0, utils_1.logLabeledBullet)("hosting", newMessage);
|
|
22
22
|
}
|
|
23
23
|
else {
|
|
24
24
|
process.stdout.write(_ERASE_LINE + clc.move(-9999, 0));
|
|
@@ -33,20 +33,20 @@ async function deploy(context, options) {
|
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
35
|
if (!((_a = deploy.config) === null || _a === void 0 ? void 0 : _a.public)) {
|
|
36
|
-
utils_1.logLabeledBullet(`hosting[${deploy.site}]`, 'no "public" directory to upload, continuing with release');
|
|
36
|
+
(0, utils_1.logLabeledBullet)(`hosting[${deploy.site}]`, 'no "public" directory to upload, continuing with release');
|
|
37
37
|
return runDeploys(deploys, debugging);
|
|
38
38
|
}
|
|
39
|
-
utils_1.logLabeledBullet("hosting[" + deploy.site + "]", "beginning deploy...");
|
|
39
|
+
(0, utils_1.logLabeledBullet)("hosting[" + deploy.site + "]", "beginning deploy...");
|
|
40
40
|
const t0 = Date.now();
|
|
41
41
|
const publicDir = options.config.path(deploy.config.public);
|
|
42
|
-
const files = listFiles_1.listFiles(publicDir, deploy.config.ignore);
|
|
43
|
-
utils_1.logLabeledBullet(`hosting[${deploy.site}]`, `found ${files.length} files in ${clc.bold(deploy.config.public)}`);
|
|
42
|
+
const files = (0, listFiles_1.listFiles)(publicDir, deploy.config.ignore);
|
|
43
|
+
(0, utils_1.logLabeledBullet)(`hosting[${deploy.site}]`, `found ${files.length} files in ${clc.bold(deploy.config.public)}`);
|
|
44
44
|
const uploader = new uploader_1.Uploader({
|
|
45
45
|
version: deploy.version,
|
|
46
46
|
files: files,
|
|
47
47
|
public: publicDir,
|
|
48
48
|
cwd: options.cwd,
|
|
49
|
-
projectRoot: detectProjectRoot_1.detectProjectRoot(options),
|
|
49
|
+
projectRoot: (0, detectProjectRoot_1.detectProjectRoot)(options),
|
|
50
50
|
});
|
|
51
51
|
const progressInterval = setInterval(() => updateSpinner(uploader.statusMessage(), debugging), debugging ? 2000 : 200);
|
|
52
52
|
try {
|
|
@@ -62,7 +62,7 @@ async function deploy(context, options) {
|
|
|
62
62
|
if (!debugging) {
|
|
63
63
|
process.stdout.write(_ERASE_LINE + clc.move(-9999, 0));
|
|
64
64
|
}
|
|
65
|
-
utils_1.logLabeledSuccess("hosting[" + deploy.site + "]", "file upload complete");
|
|
65
|
+
(0, utils_1.logLabeledSuccess)("hosting[" + deploy.site + "]", "file upload complete");
|
|
66
66
|
const dt = Date.now() - t0;
|
|
67
67
|
logger_1.logger.debug("[hosting] deploy completed after " + dt + "ms");
|
|
68
68
|
track("Hosting Deploy", "success", dt);
|
|
@@ -145,7 +145,7 @@ class Uploader {
|
|
|
145
145
|
this.hashMap[hash] = filePath;
|
|
146
146
|
this.pathMap[filePath] = hash;
|
|
147
147
|
this.populateBatch["/" + filePath] = hash;
|
|
148
|
-
const curBatchSize = lodash_1.size(this.populateBatch);
|
|
148
|
+
const curBatchSize = (0, lodash_1.size)(this.populateBatch);
|
|
149
149
|
if (curBatchSize > 0 && curBatchSize % this.populateBatchSize === 0) {
|
|
150
150
|
this.queuePopulate();
|
|
151
151
|
}
|
|
@@ -20,7 +20,7 @@ function validateDeploy(deploy, options) {
|
|
|
20
20
|
if (!hasPublicDir && !hasAnyDynamicRewrites && !hasAnyRedirects) {
|
|
21
21
|
throw new error_1.FirebaseError('Must supply a "public" directory or at least one rewrite or redirect in each "hosting" config.');
|
|
22
22
|
}
|
|
23
|
-
if (hasPublicDir && !fsutils_1.dirExistsSync(projectPath_1.resolveProjectPath(options, cfg.public))) {
|
|
23
|
+
if (hasPublicDir && !(0, fsutils_1.dirExistsSync)((0, projectPath_1.resolveProjectPath)(options, cfg.public))) {
|
|
24
24
|
throw new error_1.FirebaseError(`Specified "public" directory "${cfg.public}" does not exist, can't deploy hosting to site "${deploy.site}"`);
|
|
25
25
|
}
|
|
26
26
|
if (cfg.i18n) {
|
|
@@ -32,8 +32,8 @@ function validateDeploy(deploy, options) {
|
|
|
32
32
|
}
|
|
33
33
|
else {
|
|
34
34
|
const i18nPath = path.join(cfg.public, cfg.i18n.root);
|
|
35
|
-
if (!fsutils_1.dirExistsSync(projectPath_1.resolveProjectPath(options, i18nPath))) {
|
|
36
|
-
utils_1.logLabeledWarning("hosting", `Couldn't find specified i18n root directory ${clc.bold(cfg.i18n.root)} in public directory ${clc.bold(cfg.public)}.`);
|
|
35
|
+
if (!(0, fsutils_1.dirExistsSync)((0, projectPath_1.resolveProjectPath)(options, i18nPath))) {
|
|
36
|
+
(0, utils_1.logLabeledWarning)("hosting", `Couldn't find specified i18n root directory ${clc.bold(cfg.i18n.root)} in public directory ${clc.bold(cfg.public)}.`);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
}
|
|
@@ -14,9 +14,9 @@ async function default_1(context, options) {
|
|
|
14
14
|
return;
|
|
15
15
|
}
|
|
16
16
|
const template = loadCJSON(filePath);
|
|
17
|
-
const projectNumber = await projectUtils_1.needProjectNumber(options);
|
|
18
|
-
template.etag = await functions_1.getEtag(projectNumber);
|
|
19
|
-
functions_2.validateInputRemoteConfigTemplate(template);
|
|
17
|
+
const projectNumber = await (0, projectUtils_1.needProjectNumber)(options);
|
|
18
|
+
template.etag = await (0, functions_1.getEtag)(projectNumber);
|
|
19
|
+
(0, functions_2.validateInputRemoteConfigTemplate)(template);
|
|
20
20
|
context.remoteconfigTemplate = template;
|
|
21
21
|
return;
|
|
22
22
|
}
|
|
@@ -7,8 +7,8 @@ async function default_1(context, options) {
|
|
|
7
7
|
return;
|
|
8
8
|
}
|
|
9
9
|
const template = context.remoteconfigTemplate;
|
|
10
|
-
const projectNumber = await projectUtils_1.needProjectNumber(options);
|
|
11
|
-
const etag = await functions_1.getEtag(projectNumber);
|
|
12
|
-
return functions_1.publishTemplate(projectNumber, template, etag, options);
|
|
10
|
+
const projectNumber = await (0, projectUtils_1.needProjectNumber)(options);
|
|
11
|
+
const etag = await (0, functions_1.getEtag)(projectNumber);
|
|
12
|
+
return (0, functions_1.publishTemplate)(projectNumber, template, etag, options);
|
|
13
13
|
}
|
|
14
14
|
exports.default = default_1;
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const lodash_1 = require("lodash");
|
|
4
4
|
const rulesDeploy_1 = require("../../rulesDeploy");
|
|
5
5
|
async function default_1(context) {
|
|
6
|
-
const rulesDeploy = lodash_1.get(context, "storage.rulesDeploy");
|
|
6
|
+
const rulesDeploy = (0, lodash_1.get)(context, "storage.rulesDeploy");
|
|
7
7
|
if (!rulesDeploy) {
|
|
8
8
|
return;
|
|
9
9
|
}
|
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const lodash_1 = require("lodash");
|
|
4
4
|
const rulesDeploy_1 = require("../../rulesDeploy");
|
|
5
5
|
async function default_1(context, options) {
|
|
6
|
-
const rules = lodash_1.get(context, "storage.rules", []);
|
|
7
|
-
const rulesDeploy = lodash_1.get(context, "storage.rulesDeploy");
|
|
6
|
+
const rules = (0, lodash_1.get)(context, "storage.rules", []);
|
|
7
|
+
const rulesDeploy = (0, lodash_1.get)(context, "storage.rulesDeploy");
|
|
8
8
|
if (!rules.length || !rulesDeploy) {
|
|
9
9
|
return;
|
|
10
10
|
}
|
package/lib/detectProjectRoot.js
CHANGED
|
@@ -7,14 +7,14 @@ const path_1 = require("path");
|
|
|
7
7
|
function detectProjectRoot(options) {
|
|
8
8
|
let projectRootDir = options.cwd || process.cwd();
|
|
9
9
|
if (options.configPath) {
|
|
10
|
-
const fullPath = path_1.resolve(projectRootDir, options.configPath);
|
|
11
|
-
if (!fsutils_1.fileExistsSync(fullPath)) {
|
|
10
|
+
const fullPath = (0, path_1.resolve)(projectRootDir, options.configPath);
|
|
11
|
+
if (!(0, fsutils_1.fileExistsSync)(fullPath)) {
|
|
12
12
|
throw new error_1.FirebaseError(`Could not load config file ${options.configPath}.`, { exit: 1 });
|
|
13
13
|
}
|
|
14
|
-
return path_1.dirname(fullPath);
|
|
14
|
+
return (0, path_1.dirname)(fullPath);
|
|
15
15
|
}
|
|
16
|
-
while (!fsutils_1.fileExistsSync(path_1.resolve(projectRootDir, "./firebase.json"))) {
|
|
17
|
-
const parentDir = path_1.dirname(projectRootDir);
|
|
16
|
+
while (!(0, fsutils_1.fileExistsSync)((0, path_1.resolve)(projectRootDir, "./firebase.json"))) {
|
|
17
|
+
const parentDir = (0, path_1.dirname)(projectRootDir);
|
|
18
18
|
if (parentDir === projectRootDir) {
|
|
19
19
|
return null;
|
|
20
20
|
}
|
|
@@ -4191,7 +4191,7 @@ exports.default = {
|
|
|
4191
4191
|
type: "string",
|
|
4192
4192
|
},
|
|
4193
4193
|
email: {
|
|
4194
|
-
description: "The account's email address to send the OOB code to, and generally the email address of the account that needs to be updated. Required for PASSWORD_RESET, EMAIL_SIGNIN, and VERIFY_EMAIL.",
|
|
4194
|
+
description: "The account's email address to send the OOB code to, and generally the email address of the account that needs to be updated. Required for PASSWORD_RESET, EMAIL_SIGNIN, and VERIFY_EMAIL. Only required for VERIFY_AND_CHANGE_EMAIL requests when return_oob_link is set to true. In this case, it is the original email of the user.",
|
|
4195
4195
|
type: "string",
|
|
4196
4196
|
},
|
|
4197
4197
|
iOSAppStoreId: {
|
|
@@ -4202,10 +4202,16 @@ exports.default = {
|
|
|
4202
4202
|
description: "If an associated iOS app can handle the OOB code, the iOS bundle id of this app. This will allow the correct app to open if it is already installed.",
|
|
4203
4203
|
type: "string",
|
|
4204
4204
|
},
|
|
4205
|
-
idToken: {
|
|
4206
|
-
|
|
4205
|
+
idToken: {
|
|
4206
|
+
description: "An ID token for the account. It is required for VERIFY_AND_CHANGE_EMAIL and VERIFY_EMAIL requests unless return_oob_link is set to true.",
|
|
4207
|
+
type: "string",
|
|
4208
|
+
},
|
|
4209
|
+
newEmail: {
|
|
4210
|
+
description: "The email address the account is being updated to. Required only for VERIFY_AND_CHANGE_EMAIL requests.",
|
|
4211
|
+
type: "string",
|
|
4212
|
+
},
|
|
4207
4213
|
requestType: {
|
|
4208
|
-
description: "Required. The type of out-of-band (OOB) code to send. Depending on this value, other fields in this request will be required and/or have different meanings. There are
|
|
4214
|
+
description: "Required. The type of out-of-band (OOB) code to send. Depending on this value, other fields in this request will be required and/or have different meanings. There are 4 different OOB codes that can be sent: * PASSWORD_RESET * EMAIL_SIGNIN * VERIFY_EMAIL * VERIFY_AND_CHANGE_EMAIL",
|
|
4209
4215
|
enum: [
|
|
4210
4216
|
"OOB_REQ_TYPE_UNSPECIFIED",
|
|
4211
4217
|
"PASSWORD_RESET",
|
|
@@ -5198,7 +5204,7 @@ exports.default = {
|
|
|
5198
5204
|
properties: {
|
|
5199
5205
|
captchaChallenge: { type: "string" },
|
|
5200
5206
|
captchaResponse: {
|
|
5201
|
-
description: "The
|
|
5207
|
+
description: "The reCAPTCHA token provided by the reCAPTCHA client-side integration. reCAPTCHA Enterprise uses it for risk assessment. Required when reCAPTCHA Enterprise is enabled.",
|
|
5202
5208
|
type: "string",
|
|
5203
5209
|
},
|
|
5204
5210
|
delegatedProjectNumber: { format: "int64", type: "string" },
|
|
@@ -5363,7 +5369,7 @@ exports.default = {
|
|
|
5363
5369
|
properties: {
|
|
5364
5370
|
captchaChallenge: { type: "string" },
|
|
5365
5371
|
captchaResponse: {
|
|
5366
|
-
description: "The
|
|
5372
|
+
description: "The reCAPTCHA token provided by the reCAPTCHA client-side integration. reCAPTCHA Enterprise uses it for assessment. Required when reCAPTCHA enterprise is enabled.",
|
|
5367
5373
|
type: "string",
|
|
5368
5374
|
},
|
|
5369
5375
|
disabled: {
|
|
@@ -6720,7 +6726,7 @@ exports.default = {
|
|
|
6720
6726
|
description: "Encapsulates settings provided to GetIamPolicy.",
|
|
6721
6727
|
properties: {
|
|
6722
6728
|
requestedPolicyVersion: {
|
|
6723
|
-
description: "Optional. The policy
|
|
6729
|
+
description: "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).",
|
|
6724
6730
|
format: "int32",
|
|
6725
6731
|
type: "integer",
|
|
6726
6732
|
},
|
|
@@ -38,7 +38,7 @@ function registerHandlers(app, getProjectStateByApiKey) {
|
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
40
|
try {
|
|
41
|
-
const resp = operations_1.setAccountInfoImpl(state, {
|
|
41
|
+
const resp = (0, operations_1.setAccountInfoImpl)(state, {
|
|
42
42
|
oobCode,
|
|
43
43
|
});
|
|
44
44
|
const email = resp.email;
|
|
@@ -91,7 +91,7 @@ function registerHandlers(app, getProjectStateByApiKey) {
|
|
|
91
91
|
},
|
|
92
92
|
});
|
|
93
93
|
}
|
|
94
|
-
const { email } = operations_1.resetPassword(state, {
|
|
94
|
+
const { email } = (0, operations_1.resetPassword)(state, {
|
|
95
95
|
oobCode,
|
|
96
96
|
newPassword: req.query.newPassword,
|
|
97
97
|
});
|
|
@@ -106,7 +106,7 @@ function registerHandlers(app, getProjectStateByApiKey) {
|
|
|
106
106
|
}
|
|
107
107
|
case "verifyEmail": {
|
|
108
108
|
try {
|
|
109
|
-
const { email } = operations_1.setAccountInfoImpl(state, { oobCode });
|
|
109
|
+
const { email } = (0, operations_1.setAccountInfoImpl)(state, { oobCode });
|
|
110
110
|
if (continueUrl) {
|
|
111
111
|
return res.redirect(303, continueUrl);
|
|
112
112
|
}
|
|
@@ -16,7 +16,7 @@ class AuthEmulator {
|
|
|
16
16
|
}
|
|
17
17
|
async start() {
|
|
18
18
|
const { host, port } = this.getInfo();
|
|
19
|
-
const app = await server_1.createApp(this.args.projectId);
|
|
19
|
+
const app = await (0, server_1.createApp)(this.args.projectId);
|
|
20
20
|
const server = app.listen(port, host);
|
|
21
21
|
this.destroyServer = utils.createDestroyer(server);
|
|
22
22
|
}
|