screwdriver-data-schema 22.7.1 → 22.8.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.
@@ -0,0 +1,20 @@
1
+ 'use strict';
2
+
3
+ const Joi = require('joi');
4
+
5
+ const compatibilities = Joi.object({
6
+ clouds: Joi.array()
7
+ .items(Joi.string())
8
+ .description('A list of cloud that template supports')
9
+ .example(['aws', 'gcp', 'azure'])
10
+ .optional(),
11
+ architectures: Joi.array()
12
+ .items(Joi.string())
13
+ .description('A list of architectures that template supports')
14
+ .example(['x86', 'x86_64', 'arm64'])
15
+ .optional()
16
+ });
17
+
18
+ module.exports = {
19
+ compatibilities
20
+ };
package/models/command.js CHANGED
@@ -4,6 +4,9 @@ const Joi = require('joi');
4
4
  const mutate = require('../lib/mutate');
5
5
  const Command = require('../config/command');
6
6
  const pipelineId = require('./pipeline').base.extract('id');
7
+ const Compatibilities = require('../config/compatibilities');
8
+
9
+ const { compatibilities } = Compatibilities;
7
10
 
8
11
  const MODEL = {
9
12
  id: Joi.number().integer().positive().description('Identifier of this command').example(123345),
@@ -24,7 +27,8 @@ const MODEL = {
24
27
  .example('2038-01-19T03:14:08.131Z'),
25
28
  usage: Command.usage,
26
29
  trusted: Joi.boolean().description('Mark whether command is trusted'),
27
- latest: Joi.boolean().description('Whether this is latest version')
30
+ latest: Joi.boolean().description('Whether this is latest version'),
31
+ compatibilities
28
32
  };
29
33
 
30
34
  module.exports = {
@@ -54,7 +58,7 @@ module.exports = {
54
58
  mutate(
55
59
  MODEL,
56
60
  ['id', 'namespace', 'name', 'version', 'description', 'maintainer', 'format', 'pipelineId'],
57
- ['habitat', 'docker', 'binary', 'createTime', 'usage', 'trusted', 'latest']
61
+ ['habitat', 'docker', 'binary', 'createTime', 'usage', 'trusted', 'latest', 'compatibilities']
58
62
  )
59
63
  ).label('Get Command'),
60
64
 
@@ -4,6 +4,9 @@ const Joi = require('joi');
4
4
  const mutate = require('../lib/mutate');
5
5
  const Template = require('../config/template');
6
6
  const pipelineId = require('./pipeline').base.extract('id');
7
+ const Compatibilities = require('../config/compatibilities');
8
+
9
+ const { compatibilities } = Compatibilities;
7
10
 
8
11
  const MODEL = {
9
12
  id: Joi.number().integer().positive().description('Identifier of this template').example(123345),
@@ -22,7 +25,8 @@ const MODEL = {
22
25
  .description('When this template was created')
23
26
  .example('2038-01-19T03:14:08.131Z'),
24
27
  trusted: Joi.boolean().description('Mark whether template is trusted'),
25
- latest: Joi.boolean().description('Whether this is latest version')
28
+ latest: Joi.boolean().description('Whether this is latest version'),
29
+ compatibilities
26
30
  };
27
31
 
28
32
  const CREATE_MODEL = { ...MODEL, config: Template.configNoDupSteps };
@@ -54,7 +58,7 @@ module.exports = {
54
58
  mutate(
55
59
  MODEL,
56
60
  ['id', 'labels', 'name', 'version', 'description', 'maintainer', 'pipelineId'],
57
- ['config', 'namespace', 'images', 'createTime', 'trusted', 'latest']
61
+ ['config', 'namespace', 'images', 'createTime', 'trusted', 'latest', 'compatibilities']
58
62
  )
59
63
  ).label('Get Template'),
60
64
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "screwdriver-data-schema",
3
- "version": "22.7.1",
3
+ "version": "22.8.0",
4
4
  "description": "Internal Data Schema of Screwdriver",
5
5
  "main": "index.js",
6
6
  "scripts": {