@sprucelabs/schema 32.3.4 → 32.3.5

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.
@@ -1,8 +1,18 @@
1
1
  import AbstractField from './AbstractField.js';
2
2
  class BooleanField extends AbstractField {
3
3
  static generateTemplateDetails(options) {
4
+ const { definition, language } = options;
5
+ const { isArray } = definition;
6
+ const arrayNotation = isArray ? '[]' : '';
7
+ let valueType = '';
8
+ if (language === 'go') {
9
+ valueType = `${arrayNotation}bool`;
10
+ }
11
+ else {
12
+ valueType = `boolean${arrayNotation}`;
13
+ }
4
14
  return {
5
- valueType: `boolean${options.definition.isArray ? '[]' : ''}`,
15
+ valueType,
6
16
  };
7
17
  }
8
18
  /** * Turn everything into a string */
@@ -6,8 +6,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const AbstractField_1 = __importDefault(require("./AbstractField"));
7
7
  class BooleanField extends AbstractField_1.default {
8
8
  static generateTemplateDetails(options) {
9
+ const { definition, language } = options;
10
+ const { isArray } = definition;
11
+ const arrayNotation = isArray ? '[]' : '';
12
+ let valueType = '';
13
+ if (language === 'go') {
14
+ valueType = `${arrayNotation}bool`;
15
+ }
16
+ else {
17
+ valueType = `boolean${arrayNotation}`;
18
+ }
9
19
  return {
10
- valueType: `boolean${options.definition.isArray ? '[]' : ''}`,
20
+ valueType,
11
21
  };
12
22
  }
13
23
  /** * Turn everything into a string */
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "!build/__tests__",
9
9
  "esm"
10
10
  ],
11
- "version": "32.3.4",
11
+ "version": "32.3.5",
12
12
  "main": "./build/index.js",
13
13
  "types": "./build/index.d.ts",
14
14
  "module": "./build/esm/index.js",