@adobe/aio-cli-plugin-api-mesh 1.5.0 → 2.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.
- package/README.md +4 -3
- package/oclif.manifest.json +1 -1
- package/package.json +15 -15
- package/src/commands/api-mesh/__tests__/create.test.js +213 -238
- package/src/commands/api-mesh/__tests__/delete.test.js +43 -43
- package/src/commands/api-mesh/__tests__/describe.test.js +30 -40
- package/src/commands/api-mesh/__tests__/get.test.js +60 -69
- package/src/commands/api-mesh/__tests__/update.test.js +166 -130
- package/src/commands/api-mesh/create.js +17 -6
- package/src/commands/api-mesh/describe.js +1 -1
- package/src/commands/api-mesh/get.js +1 -1
- package/src/commands/api-mesh/source/__fixtures__/0.0.1-test-01.json +1 -1
- package/src/commands/api-mesh/source/__fixtures__/0.0.1-test-02.json +1 -1
- package/src/commands/api-mesh/source/__tests__/discover.test.js +2 -2
- package/src/commands/api-mesh/source/__tests__/get.test.js +19 -16
- package/src/commands/api-mesh/source/__tests__/install.test.js +14 -14
- package/src/commands/api-mesh/source/discover.js +24 -18
- package/src/commands/api-mesh/source/get.js +15 -11
- package/src/commands/api-mesh/source/install.js +49 -41
- package/src/commands/api-mesh/status.js +96 -0
- package/src/commands/api-mesh/update.js +12 -1
- package/src/constants.js +2 -0
- package/src/helpers.js +16 -10
- package/src/utils.js +2 -4
package/README.md
CHANGED
|
@@ -74,6 +74,7 @@ aio api-mesh:get PATH_OF_FILE_TO_DOWNLOAD_INTO
|
|
|
74
74
|
aio api-mesh:create PATH_OF_MESH_CONFIG_JSON_FILE
|
|
75
75
|
aio api-mesh:update PATH_OF_MESH_CONFIG_JSON_FILE
|
|
76
76
|
aio api-mesh:delete
|
|
77
|
+
aio api-mesh:status
|
|
77
78
|
```
|
|
78
79
|
|
|
79
80
|
All commands support `-i` or `--ignoreCache` flag that will force the CLI to ignore the cached Org, Project and Workspace details and prompt the user to select new options just for that action.
|
|
@@ -82,11 +83,10 @@ Create, Update and Delete support `-c` or `--autoConfirmAction` flag that will n
|
|
|
82
83
|
|
|
83
84
|
# Sources Registry
|
|
84
85
|
|
|
85
|
-
Source registry is a collection of predefined sources (API mesh source configurations) that are created to solve specific use cases. The source can be installed for customer-specific API mesh configuration.
|
|
86
|
+
Source registry is a collection of predefined sources (API mesh source configurations) that are created to solve specific use cases. The source can be installed for customer-specific API mesh configuration.
|
|
86
87
|
|
|
87
88
|
To submit a new source, please follow the instructions provided in the [Source Registry](https://github.com/adobe/api-mesh-sources/) repository.
|
|
88
89
|
|
|
89
|
-
|
|
90
90
|
## Commands
|
|
91
91
|
|
|
92
92
|
```
|
|
@@ -97,13 +97,14 @@ aio api-mesh:source:install SOURCE_NAME -f PATH_TO_FILE_WITH_VARIABLES
|
|
|
97
97
|
|
|
98
98
|
aio api-mesh:source:get SOURCE_NAME
|
|
99
99
|
aio api-mesh:source:get SOURCE_NAME@VERSION_OF_THE_SOURCE
|
|
100
|
-
aio api-mesh:source:get -m
|
|
100
|
+
aio api-mesh:source:get -m
|
|
101
101
|
aio api-mesh:source:discover
|
|
102
102
|
```
|
|
103
103
|
|
|
104
104
|
The "source:get" command accept multiple sources per one call.
|
|
105
105
|
|
|
106
106
|
Example:
|
|
107
|
+
|
|
107
108
|
```
|
|
108
109
|
aio api-mesh:source:get -m <NAME_OF_THE_SOURCE>@<VERSION_OF_THE_SOURC><NAME_OF_THE_SECOND_SOURCE>@<VERSION_OF_THE_SOURC>
|
|
109
110
|
<NAME_OF_THE_THIRD_SOURCE>@<VERSION_OF_THE_SOURC>
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"1.
|
|
1
|
+
{"version":"2.1.0","commands":{"PLUGINNAME":{"id":"PLUGINNAME","description":"Your description here","pluginName":"@adobe/aio-cli-plugin-api-mesh","pluginType":"core","aliases":[],"examples":["$ aio PLUGINNAME:some_command"],"flags":{"someflag":{"name":"someflag","type":"option","char":"f","description":"this is some flag"}},"args":[]},"api-mesh:create":{"id":"api-mesh:create","description":"Create a mesh with the given config.","pluginName":"@adobe/aio-cli-plugin-api-mesh","pluginType":"core","aliases":[],"flags":{"ignoreCache":{"name":"ignoreCache","type":"boolean","char":"i","description":"Ignore cache and force manual org -> project -> workspace selection","allowNo":false},"autoConfirmAction":{"name":"autoConfirmAction","type":"boolean","char":"c","description":"Auto confirm action prompt. CLI will not check for user approval before executing the action.","allowNo":false},"json":{"name":"json","type":"boolean","description":"Output JSON","allowNo":false}},"args":[{"name":"file"}]},"api-mesh:delete":{"id":"api-mesh:delete","description":"Delete the config of a given mesh","pluginName":"@adobe/aio-cli-plugin-api-mesh","pluginType":"core","aliases":[],"flags":{"ignoreCache":{"name":"ignoreCache","type":"boolean","char":"i","description":"Ignore cache and force manual org -> project -> workspace selection","allowNo":false},"autoConfirmAction":{"name":"autoConfirmAction","type":"boolean","char":"c","description":"Auto confirm action prompt. CLI will not check for user approval before executing the action.","allowNo":false}},"args":[]},"api-mesh:describe":{"id":"api-mesh:describe","description":"Get details of a mesh","pluginName":"@adobe/aio-cli-plugin-api-mesh","pluginType":"core","aliases":[],"flags":{"ignoreCache":{"name":"ignoreCache","type":"boolean","char":"i","description":"Ignore cache and force manual org -> project -> workspace selection","allowNo":false}},"args":[]},"api-mesh:get":{"id":"api-mesh:get","description":"Get the config of a given mesh","pluginName":"@adobe/aio-cli-plugin-api-mesh","pluginType":"core","aliases":[],"flags":{"ignoreCache":{"name":"ignoreCache","type":"boolean","char":"i","description":"Ignore cache and force manual org -> project -> workspace selection","allowNo":false}},"args":[{"name":"file"}]},"api-mesh:status":{"id":"api-mesh:status","description":"Get a mesh status with a given meshid.","pluginName":"@adobe/aio-cli-plugin-api-mesh","pluginType":"core","aliases":[],"flags":{"ignoreCache":{"name":"ignoreCache","type":"boolean","char":"i","description":"Ignore cache and force manual org -> project -> workspace selection","allowNo":false}},"args":[]},"api-mesh:update":{"id":"api-mesh:update","description":"Update a mesh with the given config.","pluginName":"@adobe/aio-cli-plugin-api-mesh","pluginType":"core","aliases":[],"flags":{"ignoreCache":{"name":"ignoreCache","type":"boolean","char":"i","description":"Ignore cache and force manual org -> project -> workspace selection","allowNo":false},"autoConfirmAction":{"name":"autoConfirmAction","type":"boolean","char":"c","description":"Auto confirm action prompt. CLI will not check for user approval before executing the action.","allowNo":false}},"args":[{"name":"file"}]},"api-mesh:source:discover":{"id":"api-mesh:source:discover","description":"Return the list of avaliable sources","pluginName":"@adobe/aio-cli-plugin-api-mesh","pluginType":"core","aliases":[],"flags":{"confirm":{"name":"confirm","type":"boolean","char":"c","description":"Auto confirm install action prompt. CLI will not check ask user to install source.","allowNo":false}},"args":[]},"api-mesh:source:get":{"id":"api-mesh:source:get","description":"Command returns the content of a specific source.","pluginName":"@adobe/aio-cli-plugin-api-mesh","pluginType":"core","aliases":[],"examples":["$ aio api-mesh:source:get -s=<version>@<source_name>","$ aio api-mesh:source:get -s<source_name>","$ aio api-mesh:source:get -m"],"flags":{"confirm":{"name":"confirm","type":"boolean","char":"c","description":"Auto confirm print action prompt. CLI will not check ask user to print source.","allowNo":false},"source":{"name":"source","type":"option","char":"s","description":"Source name"},"multiple":{"name":"multiple","type":"boolean","char":"m","description":"Select multiple sources","allowNo":false}},"args":[]},"api-mesh:source:install":{"id":"api-mesh:source:install","description":"Command to install the source to your API mesh.","pluginName":"@adobe/aio-cli-plugin-api-mesh","pluginType":"core","aliases":[],"examples":["$ aio api-mesh:source:install <version>@<source_name>","$ aio api-mesh:source:install <source_name> -v <variable_name>=<variable_value>","$ aio api-mesh:source:install <source_name> -f <path_to_variables_file>"],"flags":{"source":{"name":"source","type":"option","char":"s","description":"Source name"},"confirm":{"name":"confirm","type":"boolean","char":"c","description":"Auto confirm override action prompt. CLI will not check ask user to override source.","allowNo":false},"variable":{"name":"variable","type":"option","char":"v","description":"Variables required for the source"},"variable-file":{"name":"variable-file","type":"option","char":"f","description":"Variables file path"},"ignoreCache":{"name":"ignoreCache","type":"boolean","char":"i","description":"Ignore cache and force manual org -> project -> workspace selection","allowNo":false}},"args":[{"name":"source"}]}}}
|
package/package.json
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/aio-cli-plugin-api-mesh",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@adobe/aio-cli-lib-console": "^
|
|
9
|
-
"@adobe/aio-lib-core-config": "^
|
|
10
|
-
"@adobe/aio-lib-core-logging": "^
|
|
11
|
-
"@adobe/aio-lib-env": "^
|
|
12
|
-
"@adobe/aio-lib-ims": "^
|
|
8
|
+
"@adobe/aio-cli-lib-console": "^4.0.0",
|
|
9
|
+
"@adobe/aio-lib-core-config": "^3.0.0",
|
|
10
|
+
"@adobe/aio-lib-core-logging": "^2.0.0",
|
|
11
|
+
"@adobe/aio-lib-env": "^2.0.0",
|
|
12
|
+
"@adobe/aio-lib-ims": "^6.0.1",
|
|
13
13
|
"@oclif/command": "^1.6.1",
|
|
14
14
|
"@oclif/config": "^1.15.1",
|
|
15
15
|
"@oclif/core": "^1.14.1",
|
|
16
16
|
"@oclif/errors": "^1.1.2",
|
|
17
|
-
"axios": "^
|
|
17
|
+
"axios": "^1.2.0",
|
|
18
18
|
"chalk": "^4.1.0",
|
|
19
19
|
"dotenv": "^16.0.1",
|
|
20
|
+
"fs-extra": "^11.1.0",
|
|
20
21
|
"inquirer": "^8.2.4",
|
|
21
22
|
"json-interpolate": "^1.0.3",
|
|
22
23
|
"node-clipboardy": "^1.0.3",
|
|
@@ -26,32 +27,31 @@
|
|
|
26
27
|
"uuid": "^8.3.2"
|
|
27
28
|
},
|
|
28
29
|
"devDependencies": {
|
|
29
|
-
"@adobe/eslint-config-aio-lib-config": "^1.4.0",
|
|
30
30
|
"@babel/eslint-parser": "^7.15.8",
|
|
31
31
|
"@oclif/dev-cli": "1.26.10",
|
|
32
32
|
"@oclif/plugin-help": "2.2.3",
|
|
33
33
|
"@trivago/prettier-plugin-sort-imports": "^3.1.1",
|
|
34
34
|
"acorn": "7.4.1",
|
|
35
|
-
"eslint": "
|
|
35
|
+
"eslint": "^8",
|
|
36
36
|
"eslint-config-oclif": "^3.1.0",
|
|
37
37
|
"eslint-config-prettier": "^8.3.0",
|
|
38
|
-
"eslint-config-standard": "^
|
|
38
|
+
"eslint-config-standard": "^17.0.0",
|
|
39
39
|
"eslint-plugin-import": "^2.21.2",
|
|
40
40
|
"eslint-plugin-jest": "^23.13.2",
|
|
41
|
-
"eslint-plugin-jsdoc": "^37.0.0",
|
|
42
41
|
"eslint-plugin-node": "^11.0.0",
|
|
43
42
|
"eslint-plugin-prettier": "^4.0.0",
|
|
44
|
-
"eslint-plugin-promise": "^
|
|
45
|
-
"eslint-plugin-standard": "^
|
|
43
|
+
"eslint-plugin-promise": "^6.0.0",
|
|
44
|
+
"eslint-plugin-standard": "^5.0.0",
|
|
46
45
|
"execa": "4.1.0",
|
|
47
46
|
"husky": "7.0.4",
|
|
48
|
-
"jest": "
|
|
47
|
+
"jest": "^29.2.2",
|
|
49
48
|
"jest-junit": "^6.0.0",
|
|
50
49
|
"prettier": "2.2.1",
|
|
51
50
|
"stdout-stderr": "^0.1.9"
|
|
52
51
|
},
|
|
53
52
|
"engines": {
|
|
54
|
-
"
|
|
53
|
+
"npm": ">=8.0.0",
|
|
54
|
+
"node": "^16.13 || >=18.0.0"
|
|
55
55
|
},
|
|
56
56
|
"files": [
|
|
57
57
|
"/oclif.manifest.json",
|