@contrail/cli 2.1.16 → 2.1.18

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 CHANGED
@@ -15,7 +15,7 @@ $ npm install -g @contrail/cli
15
15
  $ contrail COMMAND
16
16
  running command...
17
17
  $ contrail (--version)
18
- @contrail/cli/2.1.16 darwin-arm64 node-v18.13.0
18
+ @contrail/cli/2.1.18 darwin-arm64 node-v18.13.0
19
19
  $ contrail --help [COMMAND]
20
20
  USAGE
21
21
  $ contrail COMMAND
@@ -11,8 +11,9 @@ class CreateApp extends core_1.Command {
11
11
  async run() {
12
12
  await (0, login_1.authUser)();
13
13
  const currentUser = await (0, login_1.getCurrentUser)();
14
- const defaultAppName = `Hello World by ${currentUser.email}`;
15
- const defaultAppIdentifier = `${currentUser.email}/hello-world`;
14
+ const username = currentUser.email.split('@')[0];
15
+ const defaultAppName = `Hello World by ${username}`;
16
+ const defaultAppIdentifier = `@${username}/hello-world`;
16
17
  const defaultAppDescription = `Hello world app by ${currentUser.email}`;
17
18
  const defaultAppPublisher = `${currentUser.email}`;
18
19
  const answers = await inquirer_1.default.prompt([{
@@ -43,8 +44,12 @@ class CreateApp extends core_1.Command {
43
44
  default: defaultAppPublisher,
44
45
  required: true
45
46
  }]);
47
+ let sanitizedIdentifier = answers.appIdentifier;
48
+ if (!sanitizedIdentifier.startsWith('@')) {
49
+ sanitizedIdentifier = `@${sanitizedIdentifier}`;
50
+ }
46
51
  const newApp = {
47
- identifier: answers.appIdentifier,
52
+ identifier: sanitizedIdentifier,
48
53
  name: answers.appName,
49
54
  publisher: answers.appPublisher,
50
55
  public: false,
@@ -56,12 +61,12 @@ class CreateApp extends core_1.Command {
56
61
  await new sdk_1.Entities().create({ entityName: 'app', object: newApp });
57
62
  }
58
63
  catch (e) {
59
- console.error(`%s Failed to create new app: ${answers.appIdentifier}`, chalk_1.default.red.bold('APP'));
64
+ console.error(`%s Failed to create new app: ${sanitizedIdentifier}`, chalk_1.default.red.bold('APP'));
60
65
  this.exit(1);
61
66
  }
62
67
  await (0, setup_template_1.setUpTemplate)({
63
68
  appName: answers.appName,
64
- appIdentifier: answers.appIdentifier,
69
+ appIdentifier: sanitizedIdentifier,
65
70
  appDescription: answers.appDescription
66
71
  });
67
72
  }
@@ -26,28 +26,8 @@ actions:
26
26
  message:
27
27
  label: "Additional message to log."
28
28
  propertyType: "string"
29
- sayHello:
30
- internal: true
31
- name: "Say Hello"
32
- description: "Prints hello world to the log."
33
- async: false
34
29
 
35
30
  workflows:
36
- friendlyGreeting:
37
- builtIn: true
38
- name: "Friendly Greeting"
39
- triggerKey: "helloFoo"
40
- isActive: true
41
- public: true
42
- concurrency: 3 # The maximum number of concurrent jobs to run for this workflow. Defaults to 5
43
- workflowDefinition:
44
- paths:
45
- - conditional: "true"
46
- actionDefinitionConfigs:
47
- - action: sayHello
48
- name: Say Hello
49
-
50
-
51
31
  logItemUpdate:
52
32
  name: "Item Update -> Log"
53
33
  triggerKey: item|update
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.1.16",
2
+ "version": "2.1.18",
3
3
  "commands": {
4
4
  "app:create": {
5
5
  "id": "app:create",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrail/cli",
3
- "version": "2.1.16",
3
+ "version": "2.1.18",
4
4
  "description": "VibeIQ's Contrail Platform CLI.",
5
5
  "bin": {
6
6
  "contrail-cli": "./bin/run",