firebase-tools 11.16.1 → 11.17.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.
@@ -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) {
@@ -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);