@cloudnux/cli 0.1.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,131 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Entrypoint",
4
+ "description": "Component entrypoint configuration",
5
+ "type": "object",
6
+ "properties": {
7
+ "entries": {
8
+ "$ref": "#/definitions/Record"
9
+ }
10
+ },
11
+ "required": [
12
+ "entries"
13
+ ],
14
+ "definitions": {
15
+ "MethodType": {
16
+ "enum": [
17
+ "GET",
18
+ "PUT",
19
+ "POST",
20
+ "PATCH",
21
+ "DELETE"
22
+ ]
23
+ },
24
+ "HttpTrigger": {
25
+ "type": "object",
26
+ "properties": {
27
+ "options": {
28
+ "type": "object",
29
+ "properties": {
30
+ "route": {
31
+ "type": "string"
32
+ },
33
+ "method": {
34
+ "$ref": "#/definitions/MethodType"
35
+ }
36
+ },
37
+ "required": [
38
+ "route",
39
+ "method"
40
+ ],
41
+ "additionalProperties": false
42
+ }
43
+ },
44
+ "required": [
45
+ "options"
46
+ ]
47
+ },
48
+ "ScheduleTrigger": {
49
+ "type": "object",
50
+ "properties": {
51
+ "options": {
52
+ "type": "object",
53
+ "properties": {
54
+ "pattern": {
55
+ "type": "string"
56
+ }
57
+ },
58
+ "required": [
59
+ "pattern"
60
+ ],
61
+ "additionalProperties": false
62
+ }
63
+ },
64
+ "required": [
65
+ "options"
66
+ ]
67
+ },
68
+ "Trigger": {
69
+ "type": "object",
70
+ "properties": {
71
+ "type": {
72
+ "enum": [
73
+ "http",
74
+ "schedule"
75
+ ]
76
+ }
77
+ },
78
+ "allOf": [
79
+ {
80
+ "if": {
81
+ "properties": {
82
+ "type": {
83
+ "const": "http"
84
+ }
85
+ }
86
+ },
87
+ "then": {
88
+ "$ref": "#/definitions/HttpTrigger"
89
+ }
90
+ },
91
+ {
92
+ "if": {
93
+ "properties": {
94
+ "type": {
95
+ "const": "schedule"
96
+ }
97
+ }
98
+ },
99
+ "then": {
100
+ "$ref": "#/definitions/ScheduleTrigger"
101
+ }
102
+ }
103
+ ],
104
+ "required": [
105
+ "type"
106
+ ]
107
+ },
108
+ "Entry": {
109
+ "type": "object",
110
+ "properties": {
111
+ "trigger": {
112
+ "$ref": "#/definitions/Trigger"
113
+ },
114
+ "handler": {
115
+ "type": "string"
116
+ }
117
+ },
118
+ "required": [
119
+ "trigger",
120
+ "handler"
121
+ ],
122
+ "additionalProperties": false
123
+ },
124
+ "Record": {
125
+ "type": "object",
126
+ "additionalProperties": {
127
+ "$ref": "#/definitions/Entry"
128
+ }
129
+ }
130
+ }
131
+ }
@@ -0,0 +1,134 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Task Configuration Schema",
4
+ "type": "object",
5
+ "definitions": {
6
+ "TaskParamBase": {
7
+ "type": "object",
8
+ "properties": {
9
+ "modulesPath": {
10
+ "type": "string",
11
+ "description": "Path to find all modules"
12
+ },
13
+ "cloudProvider": {
14
+ "type": "string",
15
+ "description": "Cloud provider package to use. aws/azure/gcp are aliases for respective @entrypoint-framework packages"
16
+ },
17
+ "workingDir": {
18
+ "type": "string",
19
+ "description": "Path to store the current environment build artifacts",
20
+ "default": ".epf/<environment>"
21
+ },
22
+ "title": {
23
+ "type": "string",
24
+ "description": "Task title (set by task manager)"
25
+ },
26
+ "environment": {
27
+ "type": "string",
28
+ "description": "Environment name"
29
+ },
30
+ "children": {
31
+ "type": "array",
32
+ "items": {
33
+ "$ref": "#/definitions/Task"
34
+ }
35
+ }
36
+ },
37
+ "required": [
38
+ "modulesPath",
39
+ "cloudProvider",
40
+ "workingDir",
41
+ "environment"
42
+ ],
43
+ "additionalProperties": true
44
+ },
45
+ "Task": {
46
+ "type": "object",
47
+ "properties": {
48
+ "title": {
49
+ "oneOf": [
50
+ {
51
+ "type": "string"
52
+ },
53
+ {
54
+ "type": "object",
55
+ "description": "Function that returns a string based on task parameters"
56
+ }
57
+ ]
58
+ },
59
+ "skip": {
60
+ "type": "object",
61
+ "description": "Function that determines if task should be skipped"
62
+ },
63
+ "action": {
64
+ "type": "object",
65
+ "description": "Async function that executes the task"
66
+ },
67
+ "children": {
68
+ "type": "array",
69
+ "items": {
70
+ "$ref": "#/definitions/Task"
71
+ }
72
+ }
73
+ },
74
+ "required": [
75
+ "title",
76
+ "action"
77
+ ]
78
+ },
79
+ "Environment": {
80
+ "type": "object",
81
+ "properties": {
82
+ "tasks": {
83
+ "type": "array",
84
+ "items": {
85
+ "$ref": "#/definitions/Task"
86
+ },
87
+ "description": "Tasks to be executed for this environment"
88
+ }
89
+ },
90
+ "required": [
91
+ "tasks"
92
+ ],
93
+ "additionalProperties": true
94
+ }
95
+ },
96
+ "properties": {
97
+ "modulesPath": {
98
+ "type": "string",
99
+ "description": "Glob path to find all modules (package.json) having entrypoints",
100
+ "default": "./packages/modules/**/package.json"
101
+ },
102
+ "cloudProvider": {
103
+ "type": "string",
104
+ "description": "Cloud provider package to use",
105
+ "default": "aws"
106
+ },
107
+ "workingDir": {
108
+ "type": "string",
109
+ "description": "Path to store the build artifacts for all environments",
110
+ "default": "./.epf"
111
+ },
112
+ "environments": {
113
+ "type": "object",
114
+ "description": "Environment configuration with key as environment name",
115
+ "additionalProperties": {
116
+ "$ref": "#/definitions/Environment"
117
+ },
118
+ "default": {
119
+ "develop": {
120
+ "tasks": []
121
+ },
122
+ "prod": {
123
+ "tasks": []
124
+ }
125
+ }
126
+ }
127
+ },
128
+ "required": [
129
+ "modulesPath",
130
+ "cloudProvider",
131
+ "workingDir",
132
+ "environments"
133
+ ]
134
+ }
@@ -0,0 +1,134 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Task Configuration Schema",
4
+ "type": "object",
5
+ "definitions": {
6
+ "TaskParamBase": {
7
+ "type": "object",
8
+ "properties": {
9
+ "modulesPath": {
10
+ "type": "string",
11
+ "description": "Path to find all modules"
12
+ },
13
+ "cloudProvider": {
14
+ "type": "string",
15
+ "description": "Cloud provider package to use. aws/azure/gcp are aliases for respective @entrypoint-framework packages"
16
+ },
17
+ "workingDir": {
18
+ "type": "string",
19
+ "description": "Path to store the current environment build artifacts",
20
+ "default": ".epf/<environment>"
21
+ },
22
+ "title": {
23
+ "type": "string",
24
+ "description": "Task title (set by task manager)"
25
+ },
26
+ "environment": {
27
+ "type": "string",
28
+ "description": "Environment name"
29
+ },
30
+ "children": {
31
+ "type": "array",
32
+ "items": {
33
+ "$ref": "#/definitions/Task"
34
+ }
35
+ }
36
+ },
37
+ "required": [
38
+ "modulesPath",
39
+ "cloudProvider",
40
+ "workingDir",
41
+ "environment"
42
+ ],
43
+ "additionalProperties": true
44
+ },
45
+ "Task": {
46
+ "type": "object",
47
+ "properties": {
48
+ "title": {
49
+ "oneOf": [
50
+ {
51
+ "type": "string"
52
+ },
53
+ {
54
+ "type": "object",
55
+ "description": "Function that returns a string based on task parameters"
56
+ }
57
+ ]
58
+ },
59
+ "skip": {
60
+ "type": "object",
61
+ "description": "Function that determines if task should be skipped"
62
+ },
63
+ "action": {
64
+ "type": "object",
65
+ "description": "Async function that executes the task"
66
+ },
67
+ "children": {
68
+ "type": "array",
69
+ "items": {
70
+ "$ref": "#/definitions/Task"
71
+ }
72
+ }
73
+ },
74
+ "required": [
75
+ "title",
76
+ "action"
77
+ ]
78
+ },
79
+ "Environment": {
80
+ "type": "object",
81
+ "properties": {
82
+ "tasks": {
83
+ "type": "array",
84
+ "items": {
85
+ "$ref": "#/definitions/Task"
86
+ },
87
+ "description": "Tasks to be executed for this environment"
88
+ }
89
+ },
90
+ "required": [
91
+ "tasks"
92
+ ],
93
+ "additionalProperties": true
94
+ }
95
+ },
96
+ "properties": {
97
+ "modulesPath": {
98
+ "type": "string",
99
+ "description": "Glob path to find all modules (package.json) having entrypoints",
100
+ "default": "./packages/modules/**/package.json"
101
+ },
102
+ "cloudProvider": {
103
+ "type": "string",
104
+ "description": "Cloud provider package to use",
105
+ "default": "aws"
106
+ },
107
+ "workingDir": {
108
+ "type": "string",
109
+ "description": "Path to store the build artifacts for all environments",
110
+ "default": "./.epf"
111
+ },
112
+ "environments": {
113
+ "type": "object",
114
+ "description": "Environment configuration with key as environment name",
115
+ "additionalProperties": {
116
+ "$ref": "#/definitions/Environment"
117
+ },
118
+ "default": {
119
+ "develop": {
120
+ "tasks": []
121
+ },
122
+ "prod": {
123
+ "tasks": []
124
+ }
125
+ }
126
+ }
127
+ },
128
+ "required": [
129
+ "modulesPath",
130
+ "cloudProvider",
131
+ "workingDir",
132
+ "environments"
133
+ ]
134
+ }