vercel 37.12.0 → 37.12.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.
Files changed (2) hide show
  1. package/dist/index.js +47 -11
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -147072,15 +147072,26 @@ function createMetadataWizard(metadataSchema) {
147072
147072
  let allFieldsAreReadonly = true;
147073
147073
  const steps = [];
147074
147074
  for (const [key, schema] of Object.entries(properties)) {
147075
- if (isHidden(schema)) {
147076
- continue;
147077
- }
147078
- if (!supportedUIControls.has(schema["ui:control"])) {
147079
- isSupported = false;
147080
- break;
147081
- }
147082
- if (!isReadOnly(schema)) {
147083
- allFieldsAreReadonly = false;
147075
+ try {
147076
+ if (isHidden(schema)) {
147077
+ continue;
147078
+ }
147079
+ if (isDisabled(schema)) {
147080
+ continue;
147081
+ }
147082
+ if (!supportedUIControls.has(schema["ui:control"])) {
147083
+ isSupported = false;
147084
+ break;
147085
+ }
147086
+ if (!isReadOnly(schema)) {
147087
+ allFieldsAreReadonly = false;
147088
+ }
147089
+ } catch (error3) {
147090
+ if (error3 instanceof ExpressionError) {
147091
+ isSupported = false;
147092
+ break;
147093
+ }
147094
+ throw error3;
147084
147095
  }
147085
147096
  switch (schema["ui:control"]) {
147086
147097
  case "input": {
@@ -147126,14 +147137,37 @@ async function getMetadataFromSteps(client2, steps) {
147126
147137
  return Object.fromEntries(metadataEntries);
147127
147138
  }
147128
147139
  function isHidden(schema) {
147140
+ if (instanceOfExpression(schema["ui:hidden"])) {
147141
+ throw new ExpressionError("Expression found in schema");
147142
+ }
147129
147143
  return Boolean(
147130
147144
  schema["ui:hidden"] === true || schema["ui:hidden"] === "create"
147131
147145
  );
147132
147146
  }
147133
147147
  function isReadOnly(schema) {
147134
- return Boolean(schema["ui:read-only"]);
147148
+ if (instanceOfExpression(schema["ui:read-only"])) {
147149
+ throw new ExpressionError("Expression found in schema");
147150
+ }
147151
+ return Boolean(
147152
+ schema["ui:read-only"] === true || schema["ui:read-only"] === "create"
147153
+ );
147135
147154
  }
147136
- var supportedUIControls;
147155
+ function isDisabled(schema) {
147156
+ if (instanceOfExpression(schema["ui:disabled"])) {
147157
+ throw new ExpressionError("Expression found in schema");
147158
+ }
147159
+ return Boolean(
147160
+ schema["ui:disabled"] === true || schema["ui:disabled"] === "create"
147161
+ );
147162
+ }
147163
+ function instanceOfExpression(obj) {
147164
+ const checkedAsObject = Object(obj);
147165
+ if (obj !== checkedAsObject) {
147166
+ return false;
147167
+ }
147168
+ return "expr" in checkedAsObject;
147169
+ }
147170
+ var supportedUIControls, ExpressionError;
147137
147171
  var init_wizard = __esm({
147138
147172
  "src/commands/integration/wizard.ts"() {
147139
147173
  "use strict";
@@ -147144,6 +147178,8 @@ var init_wizard = __esm({
147144
147178
  "region",
147145
147179
  "vercel-region"
147146
147180
  ]);
147181
+ ExpressionError = class extends Error {
147182
+ };
147147
147183
  }
147148
147184
  });
147149
147185
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vercel",
3
- "version": "37.12.0",
3
+ "version": "37.12.1",
4
4
  "preferGlobal": true,
5
5
  "license": "Apache-2.0",
6
6
  "description": "The command-line interface for Vercel",