@adobe/aio-cli-plugin-api-mesh 4.0.0-beta → 4.1.0-alpha

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 +1 @@
1
- {"version":"4.0.0-beta","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},"env":{"name":"env","type":"option","char":"e","description":"Path to env file","default":".env"},"secrets":{"name":"secrets","type":"option","char":"s","description":"Path to secrets file","default":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},"json":{"name":"json","type":"boolean","description":"Output JSON","allowNo":false}},"args":[{"name":"file"}]},"api-mesh:init":{"id":"api-mesh:init","description":"This command will create a workspace where you can organise your API mesh configuration and other files","pluginName":"@adobe/aio-cli-plugin-api-mesh","pluginType":"core","aliases":[],"examples":[{"description":"API mesh workspace init","command":"aio api-mesh init commerce-mesh"},{"description":"API mesh workspace init with flags","command":"aio api-mesh init commerce-mesh --path ./mesh_projects/test_mesh --git y --packageManager yarn"}],"flags":{"path":{"name":"path","type":"option","char":"p","default":"."},"packageManager":{"name":"packageManager","type":"option","char":"m","options":["npm","yarn"]},"git":{"name":"git","type":"option","char":"g","options":["y","n"]}},"args":[{"name":"projectName","description":"Project name","required":true}]},"api-mesh:log-get-bulk":{"id":"api-mesh:log-get-bulk","description":"Download all mesh logs for a selected time period.","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},"startTime":{"name":"startTime","type":"option","description":"Start time for the logs in UTC","required":true},"endTime":{"name":"endTime","type":"option","description":"End time for the logs in UTC","required":true},"filename":{"name":"filename","type":"option","description":"Path to the output file for logs","required":true}},"args":[]},"api-mesh:log-get":{"id":"api-mesh:log-get","description":"Get the Log of a given mesh by RayId","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":"rayId","description":"Fetch a single log by rayID","required":true}]},"api-mesh:log-list":{"id":"api-mesh:log-list","description":"Get recent logs of requests made to the API 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},"filename":{"name":"filename","type":"option","description":"Name of CSV file to export the recent logs to"}},"args":[]},"api-mesh:run":{"id":"api-mesh:run","description":"Run a local development server that builds and compiles a mesh locally","pluginName":"@adobe/aio-cli-plugin-api-mesh","pluginType":"core","aliases":[],"examples":[],"flags":{"port":{"name":"port","type":"option","char":"p","description":"Port number for the local dev server"},"debug":{"name":"debug","type":"boolean","description":"Enable debugging mode","allowNo":false},"env":{"name":"env","type":"option","char":"e","description":"Path to env file","default":".env"},"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},"select":{"name":"select","type":"boolean","description":"Retrieve existing artifacts from the mesh","allowNo":false},"secrets":{"name":"secrets","type":"option","char":"s","description":"Path to secrets file","default":false}},"args":[{"name":"file","description":"Mesh 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},"env":{"name":"env","type":"option","char":"e","description":"Path to env file","default":".env"},"secrets":{"name":"secrets","type":"option","char":"s","description":"Path to secrets file","default":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"}]}}}
1
+ {"version":"4.1.0-alpha","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},"env":{"name":"env","type":"option","char":"e","description":"Path to env file","default":".env"},"secrets":{"name":"secrets","type":"option","char":"s","description":"Path to secrets file","default":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},"json":{"name":"json","type":"boolean","description":"Output JSON","allowNo":false}},"args":[{"name":"file"}]},"api-mesh:init":{"id":"api-mesh:init","description":"This command will create a workspace where you can organise your API mesh configuration and other files","pluginName":"@adobe/aio-cli-plugin-api-mesh","pluginType":"core","aliases":[],"examples":[{"description":"API mesh workspace init","command":"aio api-mesh init commerce-mesh"},{"description":"API mesh workspace init with flags","command":"aio api-mesh init commerce-mesh --path ./mesh_projects/test_mesh --git y --packageManager yarn"}],"flags":{"path":{"name":"path","type":"option","char":"p","default":"."},"packageManager":{"name":"packageManager","type":"option","char":"m","options":["npm","yarn"]},"git":{"name":"git","type":"option","char":"g","options":["y","n"]}},"args":[{"name":"projectName","description":"Project name","required":true}]},"api-mesh:log-get-bulk":{"id":"api-mesh:log-get-bulk","description":"Download all mesh logs for a selected time period.","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},"startTime":{"name":"startTime","type":"option","description":"Start time for the logs in UTC","required":true},"endTime":{"name":"endTime","type":"option","description":"End time for the logs in UTC","required":true},"filename":{"name":"filename","type":"option","description":"Path to the output file for logs","required":true}},"args":[]},"api-mesh:log-get":{"id":"api-mesh:log-get","description":"Get the Log of a given mesh by RayId","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":"rayId","description":"Fetch a single log by rayID","required":true}]},"api-mesh:log-list":{"id":"api-mesh:log-list","description":"Get recent logs of requests made to the API 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},"filename":{"name":"filename","type":"option","description":"Name of CSV file to export the recent logs to"}},"args":[]},"api-mesh:run":{"id":"api-mesh:run","description":"Run a local development server that builds and compiles a mesh locally","pluginName":"@adobe/aio-cli-plugin-api-mesh","pluginType":"core","aliases":[],"examples":[],"flags":{"port":{"name":"port","type":"option","char":"p","description":"Port number for the local dev server"},"debug":{"name":"debug","type":"boolean","description":"Enable debugging mode","allowNo":false},"env":{"name":"env","type":"option","char":"e","description":"Path to env file","default":".env"},"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},"select":{"name":"select","type":"boolean","description":"Retrieve existing artifacts from the mesh","allowNo":false},"secrets":{"name":"secrets","type":"option","char":"s","description":"Path to secrets file","default":false}},"args":[{"name":"file","description":"Mesh 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},"env":{"name":"env","type":"option","char":"e","description":"Path to env file","default":".env"},"secrets":{"name":"secrets","type":"option","char":"s","description":"Path to secrets file","default":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,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/aio-cli-plugin-api-mesh",
3
- "version": "4.0.0-beta",
3
+ "version": "4.1.0-alpha",
4
4
  "description": "Adobe I/O CLI plugin to develop and manage API mesh sources",
5
5
  "keywords": [
6
6
  "oclif-plugin"
@@ -37,7 +37,7 @@
37
37
  "version": "oclif-dev readme && git add README.md"
38
38
  },
39
39
  "dependencies": {
40
- "@adobe-apimesh/mesh-builder": "1.7.1",
40
+ "@adobe-apimesh/mesh-builder": "2.0.0",
41
41
  "@adobe/aio-cli-lib-console": "^5.0.0",
42
42
  "@adobe/aio-lib-core-config": "^5.0.0",
43
43
  "@adobe/aio-lib-core-logging": "^3.0.0",
@@ -295,7 +295,7 @@ describe('create command tests', () => {
295
295
  const runResult = CreateCommand.run();
296
296
  await expect(runResult).rejects.toEqual(
297
297
  new Error(
298
- 'Unable to create a mesh. Please check the mesh configuration file and try again. If the error persists please contact support. RequestId: dummy_request_id',
298
+ 'Unable to create a mesh. Check the mesh configuration file and try again. If the error persists please contact support. RequestId: dummy_request_id',
299
299
  ),
300
300
  );
301
301
  expect(logSpy.mock.calls).toMatchInlineSnapshot(`
@@ -308,7 +308,7 @@ describe('create command tests', () => {
308
308
  expect(errorLogSpy.mock.calls).toMatchInlineSnapshot(`
309
309
  [
310
310
  [
311
- "Unable to create a mesh. Please check the mesh configuration file and try again. If the error persists please contact support. RequestId: dummy_request_id",
311
+ "Unable to create a mesh. Check the mesh configuration file and try again. If the error persists please contact support. RequestId: dummy_request_id",
312
312
  ],
313
313
  ]
314
314
  `);
@@ -320,7 +320,7 @@ describe('create command tests', () => {
320
320
  expect(initRequestId).toHaveBeenCalled();
321
321
  expect(createMesh.mock.calls[0]).toMatchInlineSnapshot(`
322
322
  [
323
- "1234",
323
+ "CODE1234@AdobeOrg",
324
324
  "5678",
325
325
  "123456789",
326
326
  "Workspace01",
@@ -399,7 +399,7 @@ describe('create command tests', () => {
399
399
  expect(initRequestId).toHaveBeenCalled();
400
400
  expect(createMesh.mock.calls[0]).toMatchInlineSnapshot(`
401
401
  [
402
- "1234",
402
+ "CODE1234@AdobeOrg",
403
403
  "5678",
404
404
  "123456789",
405
405
  "Workspace01",
@@ -787,13 +787,13 @@ describe('create command tests', () => {
787
787
 
788
788
  const runResult = CreateCommand.run();
789
789
  await expect(runResult).rejects.toEqual(
790
- new Error('Input mesh file is not a valid JSON. Please check the file provided.'),
790
+ new Error('Input mesh file is not a valid JSON. Check the file provided.'),
791
791
  );
792
792
 
793
793
  await expect(errorLogSpy.mock.calls).toMatchInlineSnapshot(`
794
794
  [
795
795
  [
796
- "Input mesh file is not a valid JSON. Please check the file provided.",
796
+ "Input mesh file is not a valid JSON. Check the file provided.",
797
797
  ],
798
798
  ]
799
799
  `);
@@ -851,7 +851,7 @@ describe('create command tests', () => {
851
851
  expect(initRequestId).toHaveBeenCalled();
852
852
  expect(createMesh.mock.calls[0]).toMatchInlineSnapshot(`
853
853
  [
854
- "1234",
854
+ "CODE1234@AdobeOrg",
855
855
  "5678",
856
856
  "123456789",
857
857
  "Workspace01",
@@ -998,9 +998,7 @@ describe('create command tests', () => {
998
998
 
999
999
  const output = CreateCommand.run();
1000
1000
  await expect(output).rejects.toEqual(
1001
- new Error(
1002
- 'Unable to import the files in the mesh config. Please check the file and try again.',
1003
- ),
1001
+ new Error('Unable to import the files in the mesh config. Check the file and try again.'),
1004
1002
  );
1005
1003
 
1006
1004
  expect(logSpy.mock.calls).toMatchInlineSnapshot(`
@@ -1014,7 +1012,7 @@ describe('create command tests', () => {
1014
1012
  expect(errorLogSpy.mock.calls).toMatchInlineSnapshot(`
1015
1013
  [
1016
1014
  [
1017
- "Unable to import the files in the mesh config. Please check the file and try again.",
1015
+ "Unable to import the files in the mesh config. Check the file and try again.",
1018
1016
  ],
1019
1017
  ]
1020
1018
  `);
@@ -1035,9 +1033,7 @@ describe('create command tests', () => {
1035
1033
  const output = CreateCommand.run();
1036
1034
 
1037
1035
  await expect(output).rejects.toEqual(
1038
- new Error(
1039
- 'Unable to import the files in the mesh config. Please check the file and try again.',
1040
- ),
1036
+ new Error('Unable to import the files in the mesh config. Check the file and try again.'),
1041
1037
  );
1042
1038
 
1043
1039
  expect(logSpy.mock.calls).toMatchInlineSnapshot(`
@@ -1051,7 +1047,7 @@ describe('create command tests', () => {
1051
1047
  expect(errorLogSpy.mock.calls).toMatchInlineSnapshot(`
1052
1048
  [
1053
1049
  [
1054
- "Unable to import the files in the mesh config. Please check the file and try again.",
1050
+ "Unable to import the files in the mesh config. Check the file and try again.",
1055
1051
  ],
1056
1052
  ]
1057
1053
  `);
@@ -1364,7 +1360,7 @@ describe('create command tests', () => {
1364
1360
  expect(initRequestId).toHaveBeenCalled();
1365
1361
  expect(createMesh.mock.calls[0]).toMatchInlineSnapshot(`
1366
1362
  [
1367
- "1234",
1363
+ "CODE1234@AdobeOrg",
1368
1364
  "5678",
1369
1365
  "123456789",
1370
1366
  "Workspace01",
@@ -1489,7 +1485,7 @@ describe('create command tests', () => {
1489
1485
  expect(initRequestId).toHaveBeenCalled();
1490
1486
  expect(createMesh.mock.calls[0]).toMatchInlineSnapshot(`
1491
1487
  [
1492
- "1234",
1488
+ "CODE1234@AdobeOrg",
1493
1489
  "5678",
1494
1490
  "123456789",
1495
1491
  "Workspace01",
@@ -1604,9 +1600,7 @@ describe('create command tests', () => {
1604
1600
  const output = CreateCommand.run();
1605
1601
 
1606
1602
  await expect(output).rejects.toEqual(
1607
- new Error(
1608
- 'Unable to import the files in the mesh config. Please check the file and try again.',
1609
- ),
1603
+ new Error('Unable to import the files in the mesh config. Check the file and try again.'),
1610
1604
  );
1611
1605
 
1612
1606
  expect(logSpy.mock.calls).toMatchInlineSnapshot(`
@@ -1620,7 +1614,7 @@ describe('create command tests', () => {
1620
1614
  expect(errorLogSpy.mock.calls).toMatchInlineSnapshot(`
1621
1615
  [
1622
1616
  [
1623
- "Unable to import the files in the mesh config. Please check the file and try again.",
1617
+ "Unable to import the files in the mesh config. Check the file and try again.",
1624
1618
  ],
1625
1619
  ]
1626
1620
  `);
@@ -1706,13 +1700,13 @@ describe('create command tests', () => {
1706
1700
  const runResult = CreateCommand.run();
1707
1701
 
1708
1702
  await expect(runResult).rejects.toEqual(
1709
- new Error('Unable to import secrets. Please check the file and try again.'),
1703
+ new Error('Unable to import secrets. Check the file and try again.'),
1710
1704
  );
1711
1705
 
1712
1706
  expect(errorLogSpy.mock.calls).toMatchInlineSnapshot(`
1713
1707
  [
1714
1708
  [
1715
- "Unable to import secrets. Please check the file and try again.",
1709
+ "Unable to import secrets. Check the file and try again.",
1716
1710
  ],
1717
1711
  ]
1718
1712
  `);
@@ -1731,7 +1725,7 @@ describe('create command tests', () => {
1731
1725
  const runResult = CreateCommand.run();
1732
1726
 
1733
1727
  await expect(runResult).rejects.toEqual(
1734
- new Error('Unable to import secrets. Please check the file and try again.'),
1728
+ new Error('Unable to import secrets. Check the file and try again.'),
1735
1729
  );
1736
1730
 
1737
1731
  expect(logSpy.mock.calls).toMatchInlineSnapshot(`
@@ -1745,7 +1739,7 @@ describe('create command tests', () => {
1745
1739
  expect(errorLogSpy.mock.calls).toMatchInlineSnapshot(`
1746
1740
  [
1747
1741
  [
1748
- "Unable to import secrets. Please check the file and try again.",
1742
+ "Unable to import secrets. Check the file and try again.",
1749
1743
  ],
1750
1744
  ]
1751
1745
  `);
@@ -1801,7 +1795,7 @@ describe('create command tests', () => {
1801
1795
  const runResult = CreateCommand.run();
1802
1796
 
1803
1797
  await expect(runResult).rejects.toEqual(
1804
- new Error('Unable to import secrets. Please check the file and try again.'),
1798
+ new Error('Unable to import secrets. Check the file and try again.'),
1805
1799
  );
1806
1800
 
1807
1801
  expect(logSpy.mock.calls).toMatchInlineSnapshot(`
@@ -1814,7 +1808,7 @@ describe('create command tests', () => {
1814
1808
  expect(errorLogSpy.mock.calls).toMatchInlineSnapshot(`
1815
1809
  [
1816
1810
  [
1817
- "Unable to import secrets. Please check the file and try again.",
1811
+ "Unable to import secrets. Check the file and try again.",
1818
1812
  ],
1819
1813
  ]
1820
1814
  `);
@@ -1910,7 +1904,7 @@ describe('create command tests', () => {
1910
1904
 
1911
1905
  const runResult = CreateCommand.run();
1912
1906
  await expect(runResult).rejects.toEqual(
1913
- new Error('Unable to import secrets. Please check the file and try again.'),
1907
+ new Error('Unable to import secrets. Check the file and try again.'),
1914
1908
  );
1915
1909
  expect(logSpy.mock.calls).toMatchInlineSnapshot(`
1916
1910
  [
@@ -53,7 +53,7 @@ const mockAutoApproveAction = Promise.resolve(false);
53
53
  describe('delete command tests', () => {
54
54
  beforeEach(() => {
55
55
  initSdk.mockResolvedValue({
56
- imsOrgId: selectedOrg.id,
56
+ imsOrgCode: selectedOrg.code,
57
57
  projectId: selectedProject.id,
58
58
  workspaceId: selectedWorkspace.id,
59
59
  });
@@ -117,13 +117,13 @@ describe('delete command tests', () => {
117
117
 
118
118
  return runResult.catch(err => {
119
119
  expect(err.message).toMatchInlineSnapshot(
120
- `"Unable to delete. No mesh found for Org(1234) -> Project(5678) -> Workspace(123456789). Please check the details and try again."`,
120
+ `"Unable to delete mesh. No mesh found for Org(CODE1234@AdobeOrg) -> Project(5678) -> Workspace(123456789). Check the details and try again."`,
121
121
  );
122
122
  expect(logSpy.mock.calls).toMatchInlineSnapshot(`[]`);
123
123
  expect(errorLogSpy.mock.calls).toMatchInlineSnapshot(`
124
124
  [
125
125
  [
126
- "Unable to delete. No mesh found for Org(1234) -> Project(5678) -> Workspace(123456789). Please check the details and try again.",
126
+ "Unable to delete mesh. No mesh found for Org(CODE1234@AdobeOrg) -> Project(5678) -> Workspace(123456789). Check the details and try again.",
127
127
  ],
128
128
  ]
129
129
  `);
@@ -181,7 +181,7 @@ describe('delete command tests', () => {
181
181
 
182
182
  await expect(runResult).rejects.toEqual(
183
183
  new Error(
184
- 'Unable to delete mesh. Please check the details and try again. If the error persists please contact support. RequestId: dummy_request_id',
184
+ 'Unable to delete mesh. Check the details and try again. If the error persists please contact support. RequestId: dummy_request_id',
185
185
  ),
186
186
  );
187
187
  expect(logSpy.mock.calls).toMatchInlineSnapshot(`
@@ -194,7 +194,7 @@ describe('delete command tests', () => {
194
194
  expect(errorLogSpy.mock.calls).toMatchInlineSnapshot(`
195
195
  [
196
196
  [
197
- "Unable to delete mesh. Please check the details and try again. If the error persists please contact support. RequestId: dummy_request_id",
197
+ "Unable to delete mesh. Check the details and try again. If the error persists please contact support. RequestId: dummy_request_id",
198
198
  ],
199
199
  ]
200
200
  `);
@@ -212,7 +212,7 @@ describe('delete command tests', () => {
212
212
  expect(deleteMesh.mock.calls).toMatchInlineSnapshot(`
213
213
  [
214
214
  [
215
- "1234",
215
+ "CODE1234@AdobeOrg",
216
216
  "5678",
217
217
  "123456789",
218
218
  "mesh_id",
@@ -199,7 +199,7 @@ describe('describe command tests', () => {
199
199
 
200
200
  expect(initRequestId).toHaveBeenCalled();
201
201
  expect(describeMesh).toHaveBeenCalledWith(
202
- selectedOrg.id,
202
+ selectedOrg.code,
203
203
  selectedProject.id,
204
204
  selectedWorkspace.id,
205
205
  selectedWorkspace.title,
@@ -250,7 +250,7 @@ describe('describe command tests', () => {
250
250
 
251
251
  expect(initRequestId).toHaveBeenCalled();
252
252
  expect(describeMesh).toHaveBeenCalledWith(
253
- selectedOrg.id,
253
+ selectedOrg.code,
254
254
  selectedProject.id,
255
255
  selectedWorkspace.id,
256
256
  selectedWorkspace.title,
@@ -115,13 +115,13 @@ describe('get command tests', () => {
115
115
 
116
116
  return runResult.catch(err => {
117
117
  expect(err.message).toMatchInlineSnapshot(
118
- `"Unable to get mesh config. No mesh found for Org(1234) -> Project(5678) -> Workspace(123456789). Please check the details and try again."`,
118
+ `"Unable to get mesh config. No mesh found for Org(1234) -> Project(5678) -> Workspace(123456789). Check the details and try again."`,
119
119
  );
120
120
  expect(logSpy.mock.calls).toMatchInlineSnapshot(`[]`);
121
121
  expect(errorLogSpy.mock.calls).toMatchInlineSnapshot(`
122
122
  [
123
123
  [
124
- "Unable to get mesh config. No mesh found for Org(1234) -> Project(5678) -> Workspace(123456789). Please check the details and try again.",
124
+ "Unable to get mesh config. No mesh found for Org(1234) -> Project(5678) -> Workspace(123456789). Check the details and try again.",
125
125
  ],
126
126
  ]
127
127
  `);
@@ -134,13 +134,13 @@ describe('get command tests', () => {
134
134
 
135
135
  return runResult.catch(err => {
136
136
  expect(err.message).toMatchInlineSnapshot(
137
- `"Unable to get mesh ID. Please check the details and try again. RequestId: dummy_request_id"`,
137
+ `"Unable to get mesh ID. Check the details and try again. RequestId: dummy_request_id"`,
138
138
  );
139
139
  expect(logSpy.mock.calls).toMatchInlineSnapshot(`[]`);
140
140
  expect(errorLogSpy.mock.calls).toMatchInlineSnapshot(`
141
141
  [
142
142
  [
143
- "Unable to get mesh ID. Please check the details and try again. RequestId: dummy_request_id",
143
+ "Unable to get mesh ID. Check the details and try again. RequestId: dummy_request_id",
144
144
  ],
145
145
  ]
146
146
  `);
@@ -164,7 +164,7 @@ describe('get command tests', () => {
164
164
 
165
165
  await expect(runResult).rejects.toEqual(
166
166
  new Error(
167
- 'Unable to get mesh. Please check the details and try again. If the error persists please contact support. RequestId: dummy_request_id',
167
+ 'Unable to get mesh. Check the details and try again. If the error persists please contact support. RequestId: dummy_request_id',
168
168
  ),
169
169
  );
170
170
  expect(logSpy.mock.calls).toMatchInlineSnapshot(`
@@ -177,7 +177,7 @@ describe('get command tests', () => {
177
177
  expect(errorLogSpy.mock.calls).toMatchInlineSnapshot(`
178
178
  [
179
179
  [
180
- "Unable to get mesh. Please check the details and try again. If the error persists please contact support. RequestId: dummy_request_id",
180
+ "Unable to get mesh. Check the details and try again. If the error persists please contact support. RequestId: dummy_request_id",
181
181
  ],
182
182
  ]
183
183
  `);
@@ -25,7 +25,7 @@ require('@adobe-apimesh/mesh-builder');
25
25
 
26
26
  jest.mock('../../../helpers', () => ({
27
27
  initSdk: jest.fn().mockResolvedValue({
28
- imsOrgId: 'mockOrgId',
28
+ imsOrgCode: 'mockOrgCode',
29
29
  projectId: 'mockProjectId',
30
30
  workspaceId: 'mockWorkspaceId',
31
31
  workspaceName: 'mockWorkspaceTitle',
@@ -862,13 +862,13 @@ describe('run command tests', () => {
862
862
 
863
863
  expect(initSdk).toHaveBeenCalled();
864
864
  expect(getMeshId).toHaveBeenCalledWith(
865
- 'mockOrgId',
865
+ 'mockOrgCode',
866
866
  'mockProjectId',
867
867
  'mockWorkspaceId',
868
868
  'mockWorkspaceTitle',
869
869
  );
870
870
  expect(getMeshArtifact).toHaveBeenCalledWith(
871
- 'mockOrgId',
871
+ 'mockOrgCode',
872
872
  'mockProjectId',
873
873
  'mockWorkspaceId',
874
874
  'mockWorkspaceTitle',
@@ -88,7 +88,7 @@ describe('status command tests', () => {
88
88
  describe('unexpected error', () => {
89
89
  test('should output mesh not found error when mesh does not exist', async () => {
90
90
  getMeshId.mockResolvedValue(null);
91
- const expectedMessage = `Unable to get mesh status. No mesh found for Org(${mockOrg.id}) -> Project(${mockProject.id}) -> Workspace(${mockWorkspace.id}). Please check the details and try again.`;
91
+ const expectedMessage = `Unable to get mesh status. No mesh found for Org(${mockOrg.code}) -> Project(${mockProject.id}) -> Workspace(${mockWorkspace.id}). Check the details and try again.`;
92
92
  const runResult = StatusCommand.run();
93
93
  await expect(runResult).rejects.toEqual(new Error(expectedMessage));
94
94
  expect(errorLogSpy).toHaveBeenCalledWith(expectedMessage);
@@ -50,6 +50,7 @@ describe('update command tests', () => {
50
50
  beforeEach(() => {
51
51
  initSdk.mockResolvedValue({
52
52
  imsOrgId: selectedOrg.id,
53
+ imsOrgCode: selectedOrg.code,
53
54
  projectId: selectedProject.id,
54
55
  workspaceId: selectedWorkspace.id,
55
56
  workspaceName: selectedWorkspace.title,
@@ -325,13 +326,13 @@ describe('update command tests', () => {
325
326
  const runResult = UpdateCommand.run();
326
327
 
327
328
  await expect(runResult).rejects.toMatchInlineSnapshot(
328
- `[Error: Unable to get mesh ID. Please check the details and try again. RequestId: dummy_request_id]`,
329
+ `[Error: Unable to get mesh ID. Check the details and try again. RequestId: dummy_request_id]`,
329
330
  );
330
331
  expect(logSpy.mock.calls).toMatchInlineSnapshot(`[]`);
331
332
  expect(errorLogSpy.mock.calls).toMatchInlineSnapshot(`
332
333
  [
333
334
  [
334
- "Unable to get mesh ID. Please check the details and try again. RequestId: dummy_request_id",
335
+ "Unable to get mesh ID. Check the details and try again. RequestId: dummy_request_id",
335
336
  ],
336
337
  ]
337
338
  `);
@@ -373,7 +374,7 @@ describe('update command tests', () => {
373
374
  // );
374
375
 
375
376
  await expect(runResult).rejects.toMatchInlineSnapshot(
376
- `[Error: Unable to update the mesh. Please check the mesh configuration file and try again. If the error persists please contact support. RequestId: dummy_request_id]`,
377
+ `[Error: Unable to update the mesh. Check the mesh configuration file and try again. If the error persists please contact support. RequestId: dummy_request_id]`,
377
378
  );
378
379
  expect(logSpy.mock.calls).toMatchInlineSnapshot(`
379
380
  [
@@ -385,7 +386,7 @@ describe('update command tests', () => {
385
386
  expect(errorLogSpy.mock.calls).toMatchInlineSnapshot(`
386
387
  [
387
388
  [
388
- "Unable to update the mesh. Please check the mesh configuration file and try again. If the error persists please contact support. RequestId: dummy_request_id",
389
+ "Unable to update the mesh. Check the mesh configuration file and try again. If the error persists please contact support. RequestId: dummy_request_id",
389
390
  ],
390
391
  ]
391
392
  `);
@@ -554,7 +555,7 @@ describe('update command tests', () => {
554
555
  expect(initRequestId).toHaveBeenCalled();
555
556
  expect(updateMesh.mock.calls[0]).toMatchInlineSnapshot(`
556
557
  [
557
- "1234",
558
+ "CODE1234@AdobeOrg",
558
559
  "5678",
559
560
  "123456789",
560
561
  "Workspace01",
@@ -722,9 +723,7 @@ describe('update command tests', () => {
722
723
 
723
724
  const output = UpdateCommand.run();
724
725
  await expect(output).rejects.toEqual(
725
- new Error(
726
- 'Unable to import the files in the mesh config. Please check the file and try again.',
727
- ),
726
+ new Error('Unable to import the files in the mesh config. Check the file and try again.'),
728
727
  );
729
728
 
730
729
  expect(logSpy.mock.calls).toMatchInlineSnapshot(`
@@ -738,7 +737,7 @@ describe('update command tests', () => {
738
737
  expect(errorLogSpy.mock.calls).toMatchInlineSnapshot(`
739
738
  [
740
739
  [
741
- "Unable to import the files in the mesh config. Please check the file and try again.",
740
+ "Unable to import the files in the mesh config. Check the file and try again.",
742
741
  ],
743
742
  ]
744
743
  `);
@@ -59,7 +59,6 @@ class CreateCommand extends Command {
59
59
  const envFilePath = await flags.env;
60
60
  const secretsFilePath = await flags.secrets;
61
61
  const {
62
- imsOrgId,
63
62
  imsOrgCode,
64
63
  projectId,
65
64
  workspaceId,
@@ -83,7 +82,7 @@ class CreateCommand extends Command {
83
82
  data = JSON.parse(inputMeshData);
84
83
  } catch (err) {
85
84
  this.log(err.message);
86
- this.error('Input mesh file is not a valid JSON. Please check the file provided.');
85
+ this.error('Input mesh file is not a valid JSON. Check the file provided.');
87
86
  }
88
87
  }
89
88
 
@@ -102,9 +101,7 @@ class CreateCommand extends Command {
102
101
  data = await importFiles(data, filesList, args.file, flags.autoConfirmAction);
103
102
  } catch (err) {
104
103
  this.log(err.message);
105
- this.error(
106
- 'Unable to import the files in the mesh config. Please check the file and try again.',
107
- );
104
+ this.error('Unable to import the files in the mesh config. Check the file and try again.');
108
105
  }
109
106
  }
110
107
 
@@ -118,7 +115,7 @@ class CreateCommand extends Command {
118
115
  data.secrets = encryptedSecrets;
119
116
  } catch (err) {
120
117
  this.log(err.message);
121
- this.error('Unable to import secrets. Please check the file and try again.');
118
+ this.error('Unable to import secrets. Check the file and try again.');
122
119
  }
123
120
  }
124
121
 
@@ -131,7 +128,7 @@ class CreateCommand extends Command {
131
128
  if (shouldContinue) {
132
129
  try {
133
130
  const { mesh } = await createMesh(
134
- imsOrgId,
131
+ imsOrgCode,
135
132
  projectId,
136
133
  workspaceId,
137
134
  workspaceName,
@@ -169,7 +166,7 @@ class CreateCommand extends Command {
169
166
  this.log(error.message);
170
167
 
171
168
  this.error(
172
- `Unable to create a mesh. Please check the mesh configuration file and try again. If the error persists please contact support. RequestId: ${global.requestId}`,
169
+ `Unable to create a mesh. Check the mesh configuration file and try again. If the error persists please contact support. RequestId: ${global.requestId}`,
173
170
  );
174
171
  }
175
172
  } else {
@@ -34,14 +34,14 @@ class DeleteCommand extends Command {
34
34
  const ignoreCache = await flags.ignoreCache;
35
35
  const autoConfirmAction = await flags.autoConfirmAction;
36
36
 
37
- const { imsOrgId, projectId, workspaceId } = await initSdk({
37
+ const { imsOrgCode, projectId, workspaceId } = await initSdk({
38
38
  ignoreCache,
39
39
  });
40
40
 
41
41
  let meshId = null;
42
42
 
43
43
  try {
44
- meshId = await getMeshId(imsOrgId, projectId, workspaceId);
44
+ meshId = await getMeshId(imsOrgCode, projectId, workspaceId);
45
45
  } catch (err) {
46
46
  this.error(
47
47
  `Unable to get mesh ID. Please check the details and try again. RequestId: ${global.requestId}`,
@@ -59,7 +59,7 @@ class DeleteCommand extends Command {
59
59
 
60
60
  if (shouldContinue) {
61
61
  try {
62
- const deleteMeshResponse = await deleteMesh(imsOrgId, projectId, workspaceId, meshId);
62
+ const deleteMeshResponse = await deleteMesh(imsOrgCode, projectId, workspaceId, meshId);
63
63
 
64
64
  if (deleteMeshResponse) {
65
65
  this.log('Successfully deleted mesh %s', meshId);
@@ -72,7 +72,7 @@ class DeleteCommand extends Command {
72
72
  this.log(error.message);
73
73
 
74
74
  this.error(
75
- `Unable to delete mesh. Please check the details and try again. If the error persists please contact support. RequestId: ${global.requestId}`,
75
+ `Unable to delete mesh. Check the details and try again. If the error persists please contact support. RequestId: ${global.requestId}`,
76
76
  );
77
77
  }
78
78
  } else {
@@ -82,7 +82,7 @@ class DeleteCommand extends Command {
82
82
  }
83
83
  } else {
84
84
  this.error(
85
- `Unable to delete. No mesh found for Org(${imsOrgId}) -> Project(${projectId}) -> Workspace(${workspaceId}). Please check the details and try again.`,
85
+ `Unable to delete mesh. No mesh found for Org(${imsOrgCode}) -> Project(${projectId}) -> Workspace(${workspaceId}). Check the details and try again.`,
86
86
  );
87
87
  }
88
88
  }
@@ -30,12 +30,12 @@ class DescribeCommand extends Command {
30
30
 
31
31
  const { flags } = await this.parse(DescribeCommand);
32
32
  const ignoreCache = await flags.ignoreCache;
33
- const { imsOrgId, projectId, workspaceId, workspaceName } = await initSdk({
33
+ const { imsOrgCode, imsOrgId, projectId, workspaceId, workspaceName } = await initSdk({
34
34
  ignoreCache,
35
35
  });
36
36
 
37
37
  try {
38
- const meshDetails = await describeMesh(imsOrgId, projectId, workspaceId, workspaceName);
38
+ const meshDetails = await describeMesh(imsOrgCode, projectId, workspaceId, workspaceName);
39
39
 
40
40
  if (meshDetails) {
41
41
  const { meshId } = meshDetails;
@@ -37,7 +37,7 @@ class GetCommand extends Command {
37
37
  const ignoreCache = await flags.ignoreCache;
38
38
  const json = await flags.json;
39
39
 
40
- const { imsOrgId, projectId, workspaceId, workspaceName } = await initSdk({
40
+ const { imsOrgCode, projectId, workspaceId, workspaceName } = await initSdk({
41
41
  ignoreCache,
42
42
  verbose: !json,
43
43
  });
@@ -45,16 +45,16 @@ class GetCommand extends Command {
45
45
  let meshId = null;
46
46
 
47
47
  try {
48
- meshId = await getMeshId(imsOrgId, projectId, workspaceId, workspaceName);
48
+ meshId = await getMeshId(imsOrgCode, projectId, workspaceId, workspaceName);
49
49
  } catch (err) {
50
50
  this.error(
51
- `Unable to get mesh ID. Please check the details and try again. RequestId: ${global.requestId}`,
51
+ `Unable to get mesh ID. Check the details and try again. RequestId: ${global.requestId}`,
52
52
  );
53
53
  }
54
54
 
55
55
  if (meshId) {
56
56
  try {
57
- const mesh = await getMesh(imsOrgId, projectId, workspaceId, workspaceName, meshId);
57
+ const mesh = await getMesh(imsOrgCode, projectId, workspaceId, workspaceName, meshId);
58
58
 
59
59
  if (mesh) {
60
60
  this.log('Successfully retrieved mesh %s', JSON.stringify(mesh, null, 2));
@@ -75,7 +75,7 @@ class GetCommand extends Command {
75
75
  return mesh;
76
76
  } else {
77
77
  logger.error(
78
- `Unable to get mesh with the ID ${meshId}. Please check the mesh ID and try again. RequestId: ${global.requestId}`,
78
+ `Unable to get mesh with the ID ${meshId}. Check the mesh ID and try again. RequestId: ${global.requestId}`,
79
79
  { exit: false },
80
80
  );
81
81
  }
@@ -83,12 +83,12 @@ class GetCommand extends Command {
83
83
  this.log(error.message);
84
84
 
85
85
  this.error(
86
- `Unable to get mesh. Please check the details and try again. If the error persists please contact support. RequestId: ${global.requestId}`,
86
+ `Unable to get mesh. Check the details and try again. If the error persists please contact support. RequestId: ${global.requestId}`,
87
87
  );
88
88
  }
89
89
  } else {
90
90
  this.error(
91
- `Unable to get mesh config. No mesh found for Org(${imsOrgId}) -> Project(${projectId}) -> Workspace(${workspaceId}). Please check the details and try again.`,
91
+ `Unable to get mesh config. No mesh found for Org(${imsOrgCode}) -> Project(${projectId}) -> Workspace(${workspaceId}). Please check the details and try again.`,
92
92
  { exit: false },
93
93
  );
94
94
  }
@@ -82,10 +82,10 @@ class RunCommand extends Command {
82
82
  if (fs.existsSync(path.join(process.cwd(), 'package.json'))) {
83
83
  //If select flag is present then getMeshId for the specified org
84
84
  if (flags.select) {
85
- const { imsOrgId, projectId, workspaceId, workspaceName } = await initSdk({});
85
+ const { imsOrgCode, projectId, workspaceId, workspaceName } = await initSdk({});
86
86
 
87
87
  try {
88
- meshId = await getMeshId(imsOrgId, projectId, workspaceId, workspaceName);
88
+ meshId = await getMeshId(imsOrgCode, projectId, workspaceId, workspaceName);
89
89
  } catch (err) {
90
90
  throw new Error(
91
91
  `Unable to get mesh ID. Please check the details and try again. RequestId: ${global.requestId}`,
@@ -93,7 +93,7 @@ class RunCommand extends Command {
93
93
  }
94
94
 
95
95
  try {
96
- await getMeshArtifact(imsOrgId, projectId, workspaceId, workspaceName, meshId);
96
+ await getMeshArtifact(imsOrgCode, projectId, workspaceId, workspaceName, meshId);
97
97
  } catch (err) {
98
98
  throw new Error(
99
99
  `Unable to retrieve mesh. Please check the details and try again. RequestId: ${global.requestId}`,
@@ -18,14 +18,14 @@ class StatusCommand extends Command {
18
18
 
19
19
  const { flags } = await this.parse(StatusCommand);
20
20
  const ignoreCache = await flags.ignoreCache;
21
- const { imsOrgId, imsOrgCode, projectId, workspaceId, workspaceName } = await initSdk({
21
+ const { imsOrgCode, projectId, workspaceId, workspaceName } = await initSdk({
22
22
  ignoreCache,
23
23
  });
24
24
 
25
25
  let meshId = null;
26
26
 
27
27
  try {
28
- meshId = await getMeshId(imsOrgId, projectId, workspaceId, workspaceName);
28
+ meshId = await getMeshId(imsOrgCode, projectId, workspaceId, workspaceName);
29
29
  } catch (err) {
30
30
  // API Request failed
31
31
  this.log(err.message);
@@ -37,12 +37,12 @@ class StatusCommand extends Command {
37
37
  // API Request succeeded, but mesh could not be found
38
38
  if (!meshId) {
39
39
  this.error(
40
- `Unable to get mesh status. No mesh found for Org(${imsOrgId}) -> Project(${projectId}) -> Workspace(${workspaceId}). Please check the details and try again.`,
40
+ `Unable to get mesh status. No mesh found for Org(${imsOrgCode}) -> Project(${projectId}) -> Workspace(${workspaceId}). Check the details and try again.`,
41
41
  );
42
42
  }
43
43
 
44
44
  try {
45
- const mesh = await getMesh(imsOrgId, projectId, workspaceId, workspaceName, meshId);
45
+ const mesh = await getMesh(imsOrgCode, projectId, workspaceId, workspaceName, meshId);
46
46
  this.log(''.padEnd(102, '*'));
47
47
  await this.displayMeshStatus(mesh, imsOrgCode, projectId, workspaceId);
48
48
  this.log(''.padEnd(102, '*'));
@@ -73,10 +73,10 @@ class UpdateCommand extends Command {
73
73
  let meshId = null;
74
74
 
75
75
  try {
76
- meshId = await getMeshId(imsOrgId, projectId, workspaceId);
76
+ meshId = await getMeshId(imsOrgCode, projectId, workspaceId);
77
77
  } catch (err) {
78
78
  this.error(
79
- `Unable to get mesh ID. Please check the details and try again. RequestId: ${global.requestId}`,
79
+ `Unable to get mesh ID. Check the details and try again. RequestId: ${global.requestId}`,
80
80
  );
81
81
  }
82
82
 
@@ -90,7 +90,7 @@ class UpdateCommand extends Command {
90
90
  data = JSON.parse(inputMeshData);
91
91
  } catch (err) {
92
92
  this.log(err.message);
93
- this.error('Input mesh file is not a valid JSON. Please check the file provided.');
93
+ this.error('Input mesh file is not a valid JSON. Check the file provided.');
94
94
  }
95
95
  }
96
96
 
@@ -109,9 +109,7 @@ class UpdateCommand extends Command {
109
109
  data = await importFiles(data, filesList, args.file, flags.autoConfirmAction);
110
110
  } catch (err) {
111
111
  this.log(err.message);
112
- this.error(
113
- 'Unable to import the files in the mesh config. Please check the file and try again.',
114
- );
112
+ this.error('Unable to import the files in the mesh config. Check the file and try again.');
115
113
  }
116
114
  }
117
115
 
@@ -125,7 +123,7 @@ class UpdateCommand extends Command {
125
123
  data.secrets = encryptedSecrets;
126
124
  } catch (err) {
127
125
  this.log(err.message);
128
- this.error('Unable to import secrets. Please check the file and try again.');
126
+ this.error('Unable to import secrets. Check the file and try again.');
129
127
  }
130
128
  }
131
129
 
@@ -141,7 +139,7 @@ class UpdateCommand extends Command {
141
139
  if (shouldContinue) {
142
140
  try {
143
141
  const response = await updateMesh(
144
- imsOrgId,
142
+ imsOrgCode,
145
143
  projectId,
146
144
  workspaceId,
147
145
  workspaceName,
@@ -169,7 +167,7 @@ class UpdateCommand extends Command {
169
167
  this.log(error.message);
170
168
 
171
169
  this.error(
172
- `Unable to update the mesh. Please check the mesh configuration file and try again. If the error persists please contact support. RequestId: ${global.requestId}`,
170
+ `Unable to update the mesh. Check the mesh configuration file and try again. If the error persists please contact support. RequestId: ${global.requestId}`,
173
171
  );
174
172
  }
175
173
  } else {
package/src/constants.js CHANGED
@@ -9,6 +9,7 @@ const StageConstants = {
9
9
  AIO_CLI_API_KEY: 'aio-cli-console-auth-stage',
10
10
  SMS_BASE_URL: 'https://graph-stage.adobe.io/api-admin',
11
11
  MESH_BASE_URL: 'https://edge-stage-graph.adobe.io/api',
12
+ SMS_API_KEY: 'adobe-graph-stage-onboarding',
12
13
  };
13
14
 
14
15
  const ProdConstants = {
@@ -19,6 +20,7 @@ const ProdConstants = {
19
20
  SMS_BASE_URL: 'https://graph.adobe.io/api-admin',
20
21
  MESH_BASE_URL: 'https://edge-graph.adobe.io/api',
21
22
  MESH_SANDBOX_BASE_URL: 'https://edge-sandbox-graph.adobe.io/api',
23
+ SMS_API_KEY: 'adobe-graph-prod',
22
24
  };
23
25
 
24
26
  const envConstants = clientEnv === 'stage' ? StageConstants : ProdConstants;
@@ -12,7 +12,7 @@ const exec = util.promisify(require('child_process').exec);
12
12
  const contentDisposition = require('content-disposition');
13
13
  const chalk = require('chalk');
14
14
 
15
- const { DEV_CONSOLE_TRANSPORTER_API_KEY, SMS_BASE_URL } = CONSTANTS;
15
+ const { DEV_CONSOLE_TRANSPORTER_API_KEY, SMS_BASE_URL, SMS_API_KEY } = CONSTANTS;
16
16
 
17
17
  const { objToString, getDevConsoleConfig } = require('../helpers');
18
18
 
@@ -113,7 +113,7 @@ const describeMesh = async (organizationId, projectId, workspaceId, workspaceNam
113
113
  * @returns
114
114
  */
115
115
  const listLogs = async (organizationCode, projectId, workspaceId, meshId, fileName) => {
116
- const { accessToken, apiKey } = await getDevConsoleConfig();
116
+ const { accessToken } = await getDevConsoleConfig();
117
117
  const url = `${SMS_BASE_URL}/organizations/${organizationCode}/projects/${projectId}/workspaces/${workspaceId}/meshes/${meshId}/logs/list`;
118
118
  const config = {
119
119
  method: 'get',
@@ -121,7 +121,7 @@ const listLogs = async (organizationCode, projectId, workspaceId, meshId, fileNa
121
121
  headers: {
122
122
  'Authorization': `Bearer ${accessToken}`,
123
123
  'x-request-id': global.requestId,
124
- 'X-Api-Key': apiKey,
124
+ 'x-api-key': SMS_API_KEY,
125
125
  },
126
126
  };
127
127
 
@@ -142,20 +142,21 @@ const listLogs = async (organizationCode, projectId, workspaceId, meshId, fileNa
142
142
  };
143
143
 
144
144
  const getMesh = async (organizationId, projectId, workspaceId, workspaceName, meshId) => {
145
- const { baseUrl: devConsoleUrl, accessToken, apiKey } = await getDevConsoleConfig();
145
+ const { accessToken } = await getDevConsoleConfig();
146
146
  const config = {
147
147
  method: 'get',
148
- url: `${devConsoleUrl}/organizations/${organizationId}/projects/${projectId}/workspaces/${workspaceId}/meshes/${meshId}?API_KEY=${apiKey}`,
148
+ url: `${SMS_BASE_URL}/organizations/${organizationId}/projects/${projectId}/workspaces/${workspaceId}/meshes/${meshId}`,
149
149
  headers: {
150
150
  'Authorization': `Bearer ${accessToken}`,
151
151
  'x-request-id': global.requestId,
152
152
  'workspaceName': workspaceName,
153
+ 'x-api-key': SMS_API_KEY,
153
154
  },
154
155
  };
155
156
 
156
157
  logger.info(
157
158
  'Initiating GET %s',
158
- `${devConsoleUrl}/organizations/${organizationId}/projects/${projectId}/workspaces/${workspaceId}/meshes/${meshId}?API_KEY=${apiKey}`,
159
+ `${SMS_BASE_URL}/organizations/${organizationId}/projects/${projectId}/workspaces/${workspaceId}/meshes/${meshId}`,
159
160
  );
160
161
 
161
162
  try {
@@ -232,10 +233,10 @@ const createMesh = async (
232
233
  projectName,
233
234
  data,
234
235
  ) => {
235
- const { baseUrl: devConsoleUrl, accessToken, apiKey } = await getDevConsoleConfig();
236
+ const { accessToken } = await getDevConsoleConfig();
236
237
  const config = {
237
238
  method: 'post',
238
- url: `${devConsoleUrl}/organizations/${organizationId}/projects/${projectId}/workspaces/${workspaceId}/meshes?API_KEY=${apiKey}`,
239
+ url: `${SMS_BASE_URL}/organizations/${organizationId}/projects/${projectId}/workspaces/${workspaceId}/meshes`,
239
240
  headers: {
240
241
  'Authorization': `Bearer ${accessToken}`,
241
242
  'Content-Type': 'application/json',
@@ -243,13 +244,14 @@ const createMesh = async (
243
244
  'workspaceName': workspaceName,
244
245
  'orgName': orgName,
245
246
  'projectName': projectName,
247
+ 'x-api-key': SMS_API_KEY,
246
248
  },
247
249
  data: JSON.stringify(data),
248
250
  };
249
251
 
250
252
  logger.info(
251
253
  'Initiating POST %s',
252
- `${devConsoleUrl}/organizations/${organizationId}/projects/${projectId}/workspaces/${workspaceId}/meshes?API_KEY=${apiKey}`,
254
+ `${SMS_BASE_URL}/organizations/${organizationId}/projects/${projectId}/workspaces/${workspaceId}/meshes`,
253
255
  );
254
256
 
255
257
  try {
@@ -343,10 +345,10 @@ const updateMesh = async (
343
345
  meshId,
344
346
  data,
345
347
  ) => {
346
- const { baseUrl: devConsoleUrl, accessToken, apiKey } = await getDevConsoleConfig();
348
+ const { accessToken } = await getDevConsoleConfig();
347
349
  const config = {
348
350
  method: 'put',
349
- url: `${devConsoleUrl}/organizations/${organizationId}/projects/${projectId}/workspaces/${workspaceId}/meshes/${meshId}?API_KEY=${apiKey}`,
351
+ url: `${SMS_BASE_URL}/organizations/${organizationId}/projects/${projectId}/workspaces/${workspaceId}/meshes/${meshId}`,
350
352
  headers: {
351
353
  'Authorization': `Bearer ${accessToken}`,
352
354
  'Content-Type': 'application/json',
@@ -354,13 +356,14 @@ const updateMesh = async (
354
356
  'workspaceName': workspaceName,
355
357
  'orgName': orgName,
356
358
  'projectName': projectName,
359
+ 'x-api-key': SMS_API_KEY,
357
360
  },
358
361
  data: JSON.stringify(data),
359
362
  };
360
363
 
361
364
  logger.info(
362
365
  'Initiating PUT %s',
363
- `${devConsoleUrl}/organizations/${organizationId}/projects/${projectId}/workspaces/${workspaceId}/meshes/${meshId}?API_KEY=${apiKey}`,
366
+ `${SMS_BASE_URL}/organizations/${organizationId}/projects/${projectId}/workspaces/${workspaceId}/meshes/${meshId}`,
364
367
  );
365
368
 
366
369
  try {
@@ -433,19 +436,20 @@ const updateMesh = async (
433
436
  };
434
437
 
435
438
  const deleteMesh = async (organizationId, projectId, workspaceId, meshId) => {
436
- const { baseUrl: devConsoleUrl, accessToken, apiKey } = await getDevConsoleConfig();
439
+ const { accessToken } = await getDevConsoleConfig();
437
440
  const config = {
438
441
  method: 'delete',
439
- url: `${devConsoleUrl}/organizations/${organizationId}/projects/${projectId}/workspaces/${workspaceId}/meshes/${meshId}?API_KEY=${apiKey}`,
442
+ url: `${SMS_BASE_URL}/organizations/${organizationId}/projects/${projectId}/workspaces/${workspaceId}/meshes/${meshId}`,
440
443
  headers: {
441
444
  'Authorization': `Bearer ${accessToken}`,
442
445
  'x-request-id': global.requestId,
446
+ 'x-api-key': SMS_API_KEY,
443
447
  },
444
448
  };
445
449
 
446
450
  logger.info(
447
451
  'Initiating DELETE %s',
448
- `${devConsoleUrl}/organizations/${organizationId}/projects/${projectId}/workspaces/${workspaceId}/meshes/${meshId}?API_KEY=${apiKey}`,
452
+ `${SMS_BASE_URL}/organizations/${organizationId}/projects/${projectId}/workspaces/${workspaceId}/meshes/${meshId}`,
449
453
  );
450
454
 
451
455
  try {
@@ -517,23 +521,24 @@ const deleteMesh = async (organizationId, projectId, workspaceId, meshId) => {
517
521
  }
518
522
  };
519
523
 
520
- const getMeshId = async (organizationId, projectId, workspaceId, workspaceName) => {
521
- const { baseUrl: devConsoleUrl, accessToken, apiKey } = await getDevConsoleConfig();
524
+ const getMeshId = async (organizationCode, projectId, workspaceId, workspaceName) => {
525
+ const { accessToken } = await getDevConsoleConfig();
522
526
  logger.info('Initiating Mesh ID request');
523
527
 
524
528
  const config = {
525
529
  method: 'get',
526
- url: `${devConsoleUrl}/organizations/${organizationId}/projects/${projectId}/workspaces/${workspaceId}/meshes/describe?API_KEY=${apiKey}`,
530
+ url: `${SMS_BASE_URL}/organizations/${organizationCode}/projects/${projectId}/workspaces/${workspaceId}/mesh`,
527
531
  headers: {
528
532
  'Authorization': `Bearer ${accessToken}`,
529
533
  'x-request-id': global.requestId,
530
534
  'workspaceName': workspaceName,
535
+ 'x-api-key': SMS_API_KEY,
531
536
  },
532
537
  };
533
538
 
534
539
  logger.info(
535
540
  'Initiating GET %s',
536
- `${devConsoleUrl}/organizations/${organizationId}/projects/${projectId}/workspaces/${workspaceId}/meshes/describe?API_KEY=${apiKey}`,
541
+ `${SMS_BASE_URL}/organizations/${organizationCode}/projects/${projectId}/workspaces/${workspaceId}/mesh`,
537
542
  );
538
543
 
539
544
  try {
@@ -805,21 +810,22 @@ const unsubscribeCredentialFromMeshService = async (
805
810
  };
806
811
 
807
812
  const getMeshArtifact = async (organizationId, projectId, workspaceId, workspaceName, meshId) => {
808
- const { baseUrl: devConsoleUrl, accessToken, apiKey } = await getDevConsoleConfig();
813
+ const { accessToken } = await getDevConsoleConfig();
809
814
  const config = {
810
815
  method: 'get',
811
- url: `${devConsoleUrl}/organizations/${organizationId}/projects/${projectId}/workspaces/${workspaceId}/meshes/${meshId}/artifact?API_KEY=${apiKey}`,
816
+ url: `${SMS_BASE_URL}/organizations/${organizationId}/projects/${projectId}/workspaces/${workspaceId}/meshes/${meshId}/artifact`,
812
817
  headers: {
813
818
  'Authorization': `Bearer ${accessToken}`,
814
819
  'x-request-id': global.requestId,
815
820
  'workspaceName': workspaceName,
821
+ 'x-api-key': SMS_API_KEY,
816
822
  },
817
823
  responseType: 'arraybuffer',
818
824
  };
819
825
 
820
826
  logger.info(
821
827
  'Initiating GET %s',
822
- `${devConsoleUrl}/organizations/${organizationId}/projects/${projectId}/workspaces/${workspaceId}/meshes/${meshId}/artifact?API_KEY=${apiKey}`,
828
+ `${SMS_BASE_URL}/organizations/${organizationId}/projects/${projectId}/workspaces/${workspaceId}/meshes/${meshId}/artifact`,
823
829
  );
824
830
 
825
831
  try {
@@ -862,14 +868,14 @@ const getMeshArtifact = async (organizationId, projectId, workspaceId, workspace
862
868
  * @returns {Promise<Object>}
863
869
  */
864
870
  const getTenantFeatures = async organizationCode => {
865
- const { accessToken, apiKey } = await getDevConsoleConfig();
871
+ const { accessToken } = await getDevConsoleConfig();
866
872
  const config = {
867
873
  method: 'get',
868
874
  url: `${SMS_BASE_URL}/organizations/${organizationCode}/features`,
869
875
  headers: {
870
876
  'Authorization': `Bearer ${accessToken}`,
871
877
  'x-request-id': global.requestId,
872
- 'X-Api-Key': apiKey,
878
+ 'x-api-key': SMS_API_KEY,
873
879
  },
874
880
  };
875
881
 
@@ -917,14 +923,14 @@ const getTenantFeatures = async organizationCode => {
917
923
  * @returns {Promise<Object>}
918
924
  */
919
925
  const getMeshDeployments = async (organizationCode, projectId, workspaceId, meshId) => {
920
- const { accessToken, apiKey } = await getDevConsoleConfig();
926
+ const { accessToken } = await getDevConsoleConfig();
921
927
  const config = {
922
928
  method: 'get',
923
929
  url: `${SMS_BASE_URL}/organizations/${organizationCode}/projects/${projectId}/workspaces/${workspaceId}/meshes/${meshId}/deployments/latest`,
924
930
  headers: {
925
931
  'Authorization': `Bearer ${accessToken}`,
926
932
  'x-request-id': global.requestId,
927
- 'X-Api-Key': apiKey,
933
+ 'x-api-key': SMS_API_KEY,
928
934
  },
929
935
  };
930
936
 
@@ -973,14 +979,14 @@ const getMeshDeployments = async (organizationCode, projectId, workspaceId, mesh
973
979
  * @returns string
974
980
  */
975
981
  const getPublicEncryptionKey = async organizationCode => {
976
- const { accessToken, apiKey } = await getDevConsoleConfig();
982
+ const { accessToken } = await getDevConsoleConfig();
977
983
  const config = {
978
984
  method: 'get',
979
985
  url: `${SMS_BASE_URL}/organizations/${organizationCode}/getPublicKey`,
980
986
  headers: {
981
987
  'Authorization': `Bearer ${accessToken}`,
982
988
  'x-request-id': global.requestId,
983
- 'X-Api-Key': apiKey,
989
+ 'x-api-key': SMS_API_KEY,
984
990
  },
985
991
  };
986
992
  logger.info(
@@ -1018,14 +1024,14 @@ const getPresignedUrls = async (
1018
1024
  startTime,
1019
1025
  endTime,
1020
1026
  ) => {
1021
- const { accessToken, apiKey } = await getDevConsoleConfig();
1027
+ const { accessToken } = await getDevConsoleConfig();
1022
1028
  const config = {
1023
1029
  method: 'get',
1024
1030
  url: `${SMS_BASE_URL}/organizations/${organizationCode}/projects/${projectId}/workspaces/${workspaceId}/meshes/${meshId}/logs?startDateTime=${startTime}&endDateTime=${endTime}`,
1025
1031
  headers: {
1026
1032
  'Authorization': `Bearer ${accessToken}`,
1027
1033
  'x-request-id': global.requestId,
1028
- 'X-Api-Key': apiKey,
1034
+ 'x-api-key': SMS_API_KEY,
1029
1035
  },
1030
1036
  };
1031
1037
 
@@ -1057,14 +1063,14 @@ const getPresignedUrls = async (
1057
1063
  };
1058
1064
 
1059
1065
  const getLogsByRayId = async (organizationCode, projectId, workspaceId, meshId, rayId) => {
1060
- const { accessToken, apiKey } = await getDevConsoleConfig();
1066
+ const { accessToken } = await getDevConsoleConfig();
1061
1067
  const config = {
1062
1068
  method: 'get',
1063
1069
  url: `${SMS_BASE_URL}/organizations/${organizationCode}/projects/${projectId}/workspaces/${workspaceId}/meshes/${meshId}/logs/${rayId}`,
1064
1070
  headers: {
1065
1071
  'Authorization': `Bearer ${accessToken}`,
1066
1072
  'x-request-id': global.requestId,
1067
- 'X-Api-Key': apiKey,
1073
+ 'x-api-key': SMS_API_KEY,
1068
1074
  },
1069
1075
  };
1070
1076