firebase-tools 15.14.0 → 15.14.1-main.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.
@@ -13,12 +13,14 @@ const error_1 = require("../../../../error");
13
13
  const utils_1 = require("../../../../utils");
14
14
  const registry_1 = require("../../../../emulator/registry");
15
15
  const types_1 = require("../../../../emulator/types");
16
+ const experiments = require("../../../../experiments");
16
17
  async function tryCreateDelegate(context) {
17
18
  const pubspecYamlPath = path.join(context.sourceDir, "pubspec.yaml");
18
19
  if (!(await (0, util_1.promisify)(fs.exists)(pubspecYamlPath))) {
19
20
  logger_1.logger.debug("Customer code is not Dart code.");
20
21
  return;
21
22
  }
23
+ experiments.assertEnabled("dartfunctions", "use Dart functions");
22
24
  const runtime = context.runtime ?? supported.latest("dart");
23
25
  if (!supported.isRuntime(runtime)) {
24
26
  throw new error_1.FirebaseError(`Runtime ${runtime} is not a valid Dart runtime`);
@@ -7,13 +7,10 @@ const python = require("./python");
7
7
  const validate = require("../validate");
8
8
  const error_1 = require("../../../error");
9
9
  const supported = require("./supported");
10
- const experiments = require("../../../experiments");
11
10
  const factories = [
12
11
  node.tryCreateDelegate,
13
12
  python.tryCreateDelegate,
14
- (ctx) => experiments.isEnabled("functionsrunapionly")
15
- ? dart.tryCreateDelegate(ctx)
16
- : Promise.resolve(undefined),
13
+ dart.tryCreateDelegate,
17
14
  ];
18
15
  async function getRuntimeDelegate(context) {
19
16
  const { projectDir, sourceDir, runtime } = context;
@@ -74,6 +74,11 @@ exports.ALL_EXPERIMENTS = experiments({
74
74
  public: false,
75
75
  default: false,
76
76
  },
77
+ dartfunctions: {
78
+ shortDescription: "Enable Dart Functions.",
79
+ public: false,
80
+ default: false,
81
+ },
77
82
  emulatoruisnapshot: {
78
83
  shortDescription: "Load pre-release versions of the emulator UI",
79
84
  },
@@ -145,7 +145,7 @@ async function languageSetup(setup) {
145
145
  value: "python",
146
146
  });
147
147
  }
148
- if (experiments.isEnabled("functionsrunapionly")) {
148
+ if (experiments.isEnabled("dartfunctions")) {
149
149
  choices.push({
150
150
  name: "Dart",
151
151
  value: "dart",