@toa.io/cli 0.24.0-alpha.11 → 0.24.0-alpha.13
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.
- package/package.json +8 -7
- package/src/handlers/build.js +3 -2
- package/src/handlers/conceal.js +3 -2
- package/src/handlers/deploy.js +3 -2
- package/src/handlers/env.js +3 -2
- package/src/handlers/export/deployment.js +3 -2
- package/src/handlers/export/images.js +3 -2
- package/src/handlers/push.js +3 -2
- package/src/handlers/operations/index.js +0 -7
- package/src/handlers/operations/operator.js +0 -13
- package/src/handlers/operations/registry.js +0 -13
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toa.io/cli",
|
|
3
|
-
"version": "0.24.0-alpha.
|
|
3
|
+
"version": "0.24.0-alpha.13",
|
|
4
4
|
"description": "Toa CLI",
|
|
5
5
|
"author": "temich <tema.gurtovoy@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/toa-io/toa#readme",
|
|
@@ -22,15 +22,16 @@
|
|
|
22
22
|
"@toa.io/runtime": "*"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@toa.io/console": "0.24.0-alpha.
|
|
26
|
-
"@toa.io/generic": "0.24.0-alpha.
|
|
27
|
-
"@toa.io/kubernetes": "0.24.0-alpha.
|
|
28
|
-
"@toa.io/norm": "0.24.0-alpha.
|
|
29
|
-
"@toa.io/
|
|
25
|
+
"@toa.io/console": "0.24.0-alpha.13",
|
|
26
|
+
"@toa.io/generic": "0.24.0-alpha.13",
|
|
27
|
+
"@toa.io/kubernetes": "0.24.0-alpha.13",
|
|
28
|
+
"@toa.io/norm": "0.24.0-alpha.13",
|
|
29
|
+
"@toa.io/operations": "0.24.0-alpha.13",
|
|
30
|
+
"@toa.io/yaml": "0.24.0-alpha.13",
|
|
30
31
|
"dotenv": "16.1.1",
|
|
31
32
|
"find-up": "5.0.0",
|
|
32
33
|
"paseto": "3.1.4",
|
|
33
34
|
"yargs": "17.6.2"
|
|
34
35
|
},
|
|
35
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "80310f947c7a1dc9bb9831e98faf2d32ade6a67f"
|
|
36
37
|
}
|
package/src/handlers/build.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
const { context: find } = require('../util/find')
|
|
4
|
-
const
|
|
4
|
+
const { deployment: { Factory } } = require('@toa.io/operations')
|
|
5
5
|
|
|
6
6
|
const build = async (argv) => {
|
|
7
7
|
const path = find(argv.path)
|
|
8
|
-
const
|
|
8
|
+
const factory = await Factory.create(path, argv.environment)
|
|
9
|
+
const registry = factory.registry()
|
|
9
10
|
|
|
10
11
|
await registry.build()
|
|
11
12
|
}
|
package/src/handlers/conceal.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
+
const { deployment: { Factory } } = require('@toa.io/operations')
|
|
3
4
|
const { secrets } = require('@toa.io/kubernetes')
|
|
4
5
|
const { context: find } = require('../util/find')
|
|
5
6
|
const { promptSecrets } = require('./env')
|
|
6
|
-
const operations = require('./operations')
|
|
7
7
|
|
|
8
8
|
const conceal = async (argv) => {
|
|
9
9
|
if (argv.interactive) await concealValues(argv)
|
|
@@ -28,7 +28,8 @@ async function concealValue (argv) {
|
|
|
28
28
|
|
|
29
29
|
async function concealValues (argv) {
|
|
30
30
|
const path = find(argv.path)
|
|
31
|
-
const
|
|
31
|
+
const factory = await Factory.create(path, argv.environment)
|
|
32
|
+
const operator = factory.operator()
|
|
32
33
|
const variables = operator.variables()
|
|
33
34
|
const values = await promptSecrets(variables)
|
|
34
35
|
const groups = groupValues(values)
|
package/src/handlers/deploy.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const { deployment: { Factory } } = require('@toa.io/operations')
|
|
4
4
|
const { context: find } = require('../util/find')
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -9,7 +9,8 @@ const { context: find } = require('../util/find')
|
|
|
9
9
|
*/
|
|
10
10
|
const deploy = async (argv) => {
|
|
11
11
|
const path = find(argv.path)
|
|
12
|
-
const
|
|
12
|
+
const factory = await Factory.create(path, argv.environment)
|
|
13
|
+
const operator = factory.operator()
|
|
13
14
|
|
|
14
15
|
if (argv.dry === true) {
|
|
15
16
|
const options = {}
|
package/src/handlers/env.js
CHANGED
|
@@ -4,14 +4,15 @@ const { join } = require('node:path')
|
|
|
4
4
|
const readline = require('node:readline/promises')
|
|
5
5
|
const { stdin: input, stdout: output } = require('node:process')
|
|
6
6
|
const dotenv = require('dotenv')
|
|
7
|
+
const { deployment: { Factory } } = require('@toa.io/operations')
|
|
7
8
|
const { file } = require('@toa.io/filesystem')
|
|
8
|
-
const operations = require('./operations')
|
|
9
9
|
const { context: find } = require('../util/find')
|
|
10
10
|
|
|
11
11
|
async function env (argv) {
|
|
12
12
|
const path = find(argv.path)
|
|
13
13
|
const filepath = join(path, argv.as)
|
|
14
|
-
const
|
|
14
|
+
const factory = await Factory.create(path, argv.environment)
|
|
15
|
+
const operator = factory.operator()
|
|
15
16
|
const variables = operator.variables()
|
|
16
17
|
const currentValues = await read(filepath)
|
|
17
18
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const { console } = require('@toa.io/console')
|
|
4
4
|
const { context: find } = require('../../util/find')
|
|
5
|
-
const
|
|
5
|
+
const { deployment: { Factory } } = require('@toa.io/operations')
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @param {{ path: string, target: string, environment?: string }} argv
|
|
@@ -10,7 +10,8 @@ const operations = require('../operations')
|
|
|
10
10
|
*/
|
|
11
11
|
const dump = async (argv) => {
|
|
12
12
|
const path = find(argv.path)
|
|
13
|
-
const
|
|
13
|
+
const factory = await Factory.create(path, argv.environment)
|
|
14
|
+
const operator = factory.operator()
|
|
14
15
|
const target = await operator.export(argv.target)
|
|
15
16
|
|
|
16
17
|
console.log(target)
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
const { console } = require('@toa.io/console')
|
|
4
4
|
const { context: find } = require('../../util/find')
|
|
5
|
-
const
|
|
5
|
+
const { deployment: { Factory } } = require('@toa.io/operations')
|
|
6
6
|
|
|
7
7
|
const prepare = async (argv) => {
|
|
8
8
|
const path = find(argv.path)
|
|
9
|
-
const
|
|
9
|
+
const factory = await Factory.create(path, argv.environment)
|
|
10
|
+
const operator = factory.operator()
|
|
10
11
|
const target = await operator.prepare(argv.target)
|
|
11
12
|
|
|
12
13
|
console.log(target)
|
package/src/handlers/push.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const { deployment: { Factory } } = require('@toa.io/operations')
|
|
4
4
|
const { context: find } = require('../util/find')
|
|
5
5
|
|
|
6
6
|
const push = async (argv) => {
|
|
7
7
|
const path = find(argv.path)
|
|
8
|
-
const
|
|
8
|
+
const factory = await Factory.create(path)
|
|
9
|
+
const registry = factory.registry()
|
|
9
10
|
|
|
10
11
|
await registry.push()
|
|
11
12
|
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
const { context: load } = require('@toa.io/norm')
|
|
4
|
-
const { deployment: { Factory } } = require('@toa.io/operations')
|
|
5
|
-
|
|
6
|
-
async function operator (path, environment) {
|
|
7
|
-
const context = await load(path, environment)
|
|
8
|
-
const factory = new Factory(context)
|
|
9
|
-
|
|
10
|
-
return factory.operator()
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
exports.operator = operator
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
const { context: load } = require('@toa.io/norm')
|
|
4
|
-
const { deployment: { Factory } } = require('@toa.io/operations')
|
|
5
|
-
|
|
6
|
-
async function registry (path) {
|
|
7
|
-
const context = await load(path)
|
|
8
|
-
const factory = new Factory(context)
|
|
9
|
-
|
|
10
|
-
return factory.registry()
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
exports.registry = registry
|