@botonic/cli 0.40.0 → 0.40.1-alpha.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.
Files changed (41) hide show
  1. package/README.md +7 -26
  2. package/lib/analytics/credentials-handler.d.ts +0 -4
  3. package/lib/analytics/credentials-handler.js +2 -29
  4. package/lib/analytics/credentials-handler.js.map +1 -1
  5. package/lib/botonic-api-service.d.ts +1 -2
  6. package/lib/botonic-api-service.js +9 -29
  7. package/lib/botonic-api-service.js.map +1 -1
  8. package/lib/commands/deploy.d.ts +1 -2
  9. package/lib/commands/deploy.js +3 -28
  10. package/lib/commands/deploy.js.map +1 -1
  11. package/lib/commands/login.d.ts +0 -1
  12. package/lib/commands/login.js +2 -14
  13. package/lib/commands/login.js.map +1 -1
  14. package/lib/commands/logout.d.ts +0 -1
  15. package/lib/commands/logout.js +0 -3
  16. package/lib/commands/logout.js.map +1 -1
  17. package/lib/commands/new.d.ts +1 -2
  18. package/lib/commands/new.js +2 -12
  19. package/lib/commands/new.js.map +1 -1
  20. package/lib/commands/serve.d.ts +1 -4
  21. package/lib/commands/serve.js +6 -104
  22. package/lib/commands/serve.js.map +1 -1
  23. package/lib/commands/test.d.ts +0 -1
  24. package/lib/commands/test.js +0 -6
  25. package/lib/commands/test.js.map +1 -1
  26. package/lib/constants.d.ts +2 -6
  27. package/lib/constants.js +4 -12
  28. package/lib/constants.js.map +1 -1
  29. package/lib/interfaces.d.ts +0 -21
  30. package/oclif.manifest.json +1 -1
  31. package/package.json +3 -15
  32. package/scripts/postinstall.js +0 -23
  33. package/lib/analytics/telemetry.d.ts +0 -35
  34. package/lib/analytics/telemetry.js +0 -97
  35. package/lib/analytics/telemetry.js.map +0 -1
  36. package/lib/botonic-playground-service.d.ts +0 -21
  37. package/lib/botonic-playground-service.js +0 -98
  38. package/lib/botonic-playground-service.js.map +0 -1
  39. package/lib/commands/destroy.d.ts +0 -13
  40. package/lib/commands/destroy.js +0 -39
  41. package/lib/commands/destroy.js.map +0 -1
@@ -4,7 +4,6 @@ const tslib_1 = require("tslib");
4
4
  const command_1 = require("@oclif/command");
5
5
  const child_process_1 = require("child_process");
6
6
  const colors_1 = require("colors");
7
- // import fetchRepoDir from 'fetch-repo-dir'
8
7
  const fs_extra_1 = require("fs-extra");
9
8
  // eslint-disable-next-line import/named
10
9
  const inquirer_1 = require("inquirer");
@@ -12,7 +11,6 @@ const ora_1 = tslib_1.__importDefault(require("ora"));
12
11
  const os_1 = require("os");
13
12
  const path_1 = tslib_1.__importStar(require("path"));
14
13
  const util_1 = require("util");
15
- const telemetry_1 = require("../analytics/telemetry");
16
14
  const botonic_api_service_1 = require("../botonic-api-service");
17
15
  const botonic_examples_1 = require("../botonic-examples");
18
16
  const download_gzip_1 = require("../util/download-gzip");
@@ -24,12 +22,10 @@ class Run extends command_1.Command {
24
22
  super(...arguments);
25
23
  this.examples = botonic_examples_1.EXAMPLES;
26
24
  this.botonicApiService = new botonic_api_service_1.BotonicAPIService();
27
- this.telemetry = new telemetry_1.Telemetry();
28
25
  }
29
26
  /* istanbul ignore next */
30
27
  run() {
31
28
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
32
- this.telemetry.trackCreate();
33
29
  try {
34
30
  const args = this.parse(Run).args;
35
31
  const userProjectDirName = args.name;
@@ -40,9 +36,6 @@ class Run extends command_1.Command {
40
36
  `${this.examples.map(p => p.name).join(', ')}`));
41
37
  return;
42
38
  }
43
- this.telemetry.trackCreate({
44
- selected_project_name: selectedProject.name,
45
- });
46
39
  yield this.downloadSelectedProjectIntoPath(selectedProject, userProjectDirName);
47
40
  process.chdir(userProjectDirName);
48
41
  const devPlatform = (0, os_1.platform)();
@@ -61,7 +54,6 @@ class Run extends command_1.Command {
61
54
  }
62
55
  catch (e) {
63
56
  const error = `botonic new error: ${String(e)}`;
64
- this.telemetry.trackError(error);
65
57
  throw new Error(error);
66
58
  }
67
59
  });
@@ -114,25 +106,23 @@ class Run extends command_1.Command {
114
106
  catch (e) {
115
107
  spinnerDownload.fail();
116
108
  const error = `Downloading Project: ${selectedProject.name}: ${String(e)}`;
117
- this.telemetry.trackError(error);
118
109
  throw new Error(error);
119
110
  }
120
111
  });
121
112
  }
122
- installDependencies(commmand = 'npm install') {
113
+ installDependencies(command = 'npm install') {
123
114
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
124
115
  const spinner = (0, ora_1.default)({
125
116
  text: 'Installing dependencies...',
126
117
  spinner: 'bouncingBar',
127
118
  }).start();
128
119
  try {
129
- yield exec(commmand);
120
+ yield exec(command);
130
121
  spinner.succeed();
131
122
  }
132
123
  catch (e) {
133
124
  spinner.fail();
134
125
  const error = `Installing dependencies: ${String(e)}`;
135
- this.telemetry.trackError(error);
136
126
  throw new Error(error);
137
127
  }
138
128
  });
@@ -1 +1 @@
1
- {"version":3,"file":"new.js","sourceRoot":"","sources":["../../src/commands/new.ts"],"names":[],"mappings":";;;AAAA,4CAAwC;AACxC,iDAAwD;AACxD,mCAAkC;AAClC,4CAA4C;AAC5C,uCAAmC;AACnC,wCAAwC;AACxC,uCAAiC;AACjC,sDAAqB;AACrB,2BAA6B;AAC7B,qDAAiC;AACjC,+BAAgC;AAEhC,sDAAkD;AAClD,gEAA0D;AAC1D,0DAA8C;AAE9C,yDAK8B;AAC9B,qDAAmE;AAEnE,8DAA8D;AAC9D,MAAM,IAAI,GAAG,IAAA,gBAAS,EAAC,oBAAgB,CAAC,CAAA;AAOxC,MAAqB,GAAI,SAAQ,iBAAO;IAAxC;;QAmBU,aAAQ,GAAG,2BAAQ,CAAA;QAEnB,sBAAiB,GAAG,IAAI,uCAAiB,EAAE,CAAA;QAC3C,cAAS,GAAG,IAAI,qBAAS,EAAE,CAAA;IA+IrC,CAAC;IA7IC,0BAA0B;IACpB,GAAG;;YACP,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,CAAA;YAC5B,IAAI;gBACF,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAA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I,GAAG;IACZ,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,wBAAwB,EAAE,QAAQ,EAAE,IAAI,EAAE;IACvE;QACE,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE,kCAAkC;QAC/C,QAAQ,EAAE,KAAK;KAChB;CACF,CAAA"}
@@ -2,10 +2,7 @@ import { Command } from '@oclif/command';
2
2
  export default class Run extends Command {
3
3
  static description: string;
4
4
  static examples: string[];
5
- static flags: {
6
- preview: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
7
- };
5
+ static flags: {};
8
6
  static args: never[];
9
- private telemetry;
10
7
  run(): Promise<void>;
11
8
  }
@@ -3,108 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const command_1 = require("@oclif/command");
5
5
  const colors_1 = tslib_1.__importDefault(require("colors"));
6
- const concurrently_1 = tslib_1.__importDefault(require("concurrently"));
7
- const fs_1 = tslib_1.__importDefault(require("fs"));
8
- const kill_port_1 = tslib_1.__importDefault(require("kill-port"));
9
- const path_1 = tslib_1.__importDefault(require("path"));
10
- const telemetry_1 = require("../analytics/telemetry");
11
- const botonic_playground_service_1 = require("../botonic-playground-service");
12
6
  const system_1 = require("../util/system");
13
7
  class Run extends command_1.Command {
14
- constructor() {
15
- super(...arguments);
16
- this.telemetry = new telemetry_1.Telemetry();
17
- }
18
8
  run() {
19
9
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
20
- this.telemetry.trackServe();
21
- const { flags } = this.parse(Run);
22
- if (flags.preview) {
23
- const apps = ['websocket', 'rest', 'webchat', 'webviews'];
24
- const BASE_PATH = process.cwd();
25
- const API_REST_DIR_SRC = path_1.default.resolve(BASE_PATH, './api');
26
- const API_REST_PORT = 9010;
27
- const API_WS_DIR_SRC = path_1.default.resolve(BASE_PATH, './api');
28
- const API_WS_PORT = 9091;
29
- const WEBCHAT_DIR_SRC = path_1.default.resolve(BASE_PATH, './webchat');
30
- const WEBCHAT_PORT = 9000;
31
- const pgs = new botonic_playground_service_1.PlaygroundService(API_REST_PORT);
32
- try {
33
- yield pgs.start();
34
- }
35
- catch (e) {
36
- console.log("Couldn't start the Playground service: ", e);
37
- }
38
- if (apps.includes('websocket')) {
39
- try {
40
- yield (0, kill_port_1.default)(API_WS_PORT, 'tcp');
41
- }
42
- catch (e) {
43
- console.error(`Error whilst shutting down "api websocket" port (${API_WS_PORT}): ${colors_1.default.red(e.message)}`);
44
- }
45
- }
46
- if (apps.includes('rest')) {
47
- try {
48
- yield (0, kill_port_1.default)(API_REST_PORT, 'tcp');
49
- }
50
- catch (e) {
51
- console.error(`Error whilst shutting down "api rest" port (${API_REST_PORT}): ${colors_1.default.red(e.message)}`);
52
- }
53
- }
54
- if (apps.includes('webchat')) {
55
- try {
56
- yield (0, kill_port_1.default)(WEBCHAT_PORT, 'tcp');
57
- }
58
- catch (e) {
59
- console.error(`Error whilst shutting down "webchat" port (${WEBCHAT_PORT}): ${colors_1.default.red(e.message)}`);
60
- }
61
- }
62
- const WEBCHAT_JOB_SECONDS_DELAY = 10; // Sleep 10s to give rest and ws servers enough time to be up and running
63
- const jobs = {
64
- rest: {
65
- name: 'api.rest',
66
- command: 'yarn workspace api start:rest',
67
- prefixColor: 'blueBright.bgBlack',
68
- runWhen: () => fs_1.default.existsSync(API_REST_DIR_SRC),
69
- },
70
- websocket: {
71
- name: 'api.ws',
72
- command: 'yarn workspace api start:websocket',
73
- prefixColor: 'magentaBright.bgBlack',
74
- runWhen: () => fs_1.default.existsSync(API_WS_DIR_SRC),
75
- },
76
- webchat: {
77
- name: 'webchat',
78
- command: `sleep ${WEBCHAT_JOB_SECONDS_DELAY}; yarn workspace webchat start --env playgroundCode=${pgs.code || ''}`,
79
- prefixColor: 'yellowBright.bgBlack',
80
- runWhen: () => fs_1.default.existsSync(WEBCHAT_DIR_SRC),
81
- },
82
- };
83
- try {
84
- yield (0, concurrently_1.default)(Object.keys(jobs)
85
- .map(n => apps.includes(n) && jobs[n])
86
- .filter(job => job && job.runWhen()), {
87
- //prefix: '{name} |',
88
- timestampFormat: 'HH:mm:ss',
89
- });
90
- }
91
- catch (e) {
92
- console.log(e);
93
- }
94
- yield pgs.stop();
95
- console.log('*****END*****');
96
- // TODO: Yarn will exit the process before its children, leaving the console
97
- // in a bad state (see: https://github.com/yarnpkg/yarn/issues/4667)
98
- // Possible fix by upgrading to Yarn v2
10
+ try {
11
+ console.log(colors_1.default.blue('\nServing Botonic...'));
12
+ (0, system_1.spawnNpmScript)('start');
99
13
  }
100
- else {
101
- try {
102
- console.log(colors_1.default.blue('\nServing Botonic...'));
103
- (0, system_1.spawnNpmScript)('start');
104
- }
105
- catch (e) {
106
- console.log(e);
107
- }
14
+ catch (e) {
15
+ console.log(e);
108
16
  }
109
17
  return Promise.resolve();
110
18
  });
@@ -115,12 +23,6 @@ Run.description = 'Serve your bot in your localhost';
115
23
  Run.examples = [
116
24
  `$ botonic serve\n> Project is running at http://localhost:8080/`,
117
25
  ];
118
- Run.flags = {
119
- preview: command_1.flags.boolean({
120
- char: 'p',
121
- description: 'Run preview Botonic 1.0 serve.',
122
- default: false,
123
- }),
124
- };
26
+ Run.flags = {};
125
27
  Run.args = [];
126
28
  //# sourceMappingURL=serve.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"serve.js","sourceRoot":"","sources":["../../src/commands/serve.ts"],"names":[],"mappings":";;;AAAA,4CAA+C;AAC/C,4DAA2B;AAC3B,wEAAuC;AACvC,oDAAmB;AACnB,kEAA4B;AAC5B,wDAAuB;AAEvB,sDAAkD;AAClD,8EAAiE;AACjE,2CAA+C;AAE/C,MAAqB,GAAI,SAAQ,iBAAO;IAAxC;;QAiBU,cAAS,GAAG,IAAI,qBAAS,EAAE,CAAA;IA8GrC,CAAC;IA5GO,GAAG;;YACP,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,CAAA;YAC3B,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,C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,IAAI,CAAC,sBAAsB,CAAC,CAAC,CAAA;gBAChD,IAAA,uBAAc,EAAC,OAAO,CAAC,CAAA;aACxB;YAAC,OAAO,CAAC,EAAE;gBACV,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;aACf;YACD,OAAO,OAAO,CAAC,OAAO,EAAE,CAAA;QAC1B,CAAC;KAAA;;AAnBH,sBAoBC;AAnBQ,eAAW,GAAG,kCAAkC,CAAA;AAEhD,YAAQ,GAAG;IAChB,iEAAiE;CAClE,CAAA;AAEM,SAAK,GAAG,EAAE,CAAA;AAEV,QAAI,GAAG,EAAE,CAAA"}
@@ -4,6 +4,5 @@ export default class Run extends Command {
4
4
  static examples: string[];
5
5
  static flags: {};
6
6
  static args: never[];
7
- private telemetry;
8
7
  run(): Promise<void>;
9
8
  }
@@ -4,15 +4,9 @@ const tslib_1 = require("tslib");
4
4
  const command_1 = require("@oclif/command");
5
5
  const child_process_1 = require("child_process");
6
6
  const colors_1 = tslib_1.__importDefault(require("colors"));
7
- const telemetry_1 = require("../analytics/telemetry");
8
7
  class Run extends command_1.Command {
9
- constructor() {
10
- super(...arguments);
11
- this.telemetry = new telemetry_1.Telemetry();
12
- }
13
8
  run() {
14
9
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
15
- this.telemetry.trackTest();
16
10
  this.parse(Run);
17
11
  (0, child_process_1.exec)('npm run test', (error, _stdout, stderr) => {
18
12
  console.log(colors_1.default.blue('\n Executing tests...\n'));
@@ -1 +1 @@
1
- {"version":3,"file":"test.js","sourceRoot":"","sources":["../../src/commands/test.ts"],"names":[],"mappings":";;;AAAA,4CAAwC;AACxC,iDAAoC;AACpC,4DAA2B;AAE3B,sDAAkD;AAElD,MAAqB,GAAI,SAAQ,iBAAO;IAAxC;;QAwBU,cAAS,GAAG,IAAI,qBAAS,EAAE,CAAA;IAerC,CAAC;IAbO,GAAG;;YACP,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,CAAA;YAC1B,IAAI,CAAC,K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BACP;gBACD,OAAO,CAAC,GAAG,CAAC,gBAAM,CAAC,KAAK,CAAC,GAAG,MAAM,EAAE,CAAC,CAAC,CAAA;YACxC,CAAC,CAAC,CAAA;YACF,OAAO,OAAO,CAAC,OAAO,EAAE,CAAA;QAC1B,CAAC;KAAA;;AAnCH,sBAoCC;AAnCQ,eAAW,GAAG,8BAA8B,CAAA;AAE5C,YAAQ,GAAG;IAChB;;;;;;;;;;;;;qBAaiB;CAClB,CAAA;AAEM,SAAK,GAAG,EAAE,CAAA;AAEV,QAAI,GAAG,EAAE,CAAA"}
@@ -1,12 +1,8 @@
1
1
  export declare const BOTONIC_NPM_NAMESPACE = "@botonic";
2
2
  export declare const BOTONIC_HOME_DIRNAME = ".botonic";
3
- export declare const GLOBAL_CREDS_FILENAME = "credentials.json";
3
+ export declare const GLOBAL_CREDENTIALS_FILENAME = "credentials.json";
4
4
  export declare const BOTONIC_PROJECT_PATH: string;
5
- export declare const BOT_CREDS_FILENAME = ".botonic.json";
6
- export declare const ANALYTICS_WRITE_KEY = "YD0jpJHNGW12uhLNbgB4wbdTRQ4Cy1Zu";
5
+ export declare const BOT_CREDENTIALS_FILENAME = ".botonic.json";
7
6
  export declare const CLOUD_PROVIDERS: Readonly<{
8
- AWS: "aws";
9
7
  HUBTYPE: "hubtype";
10
8
  }>;
11
- export declare const AWS_CLOUD_CONFIG_FILENAME = "aws.config.js";
12
- export declare const PATH_TO_AWS_CONFIG: string;
package/lib/constants.js CHANGED
@@ -1,18 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PATH_TO_AWS_CONFIG = exports.AWS_CLOUD_CONFIG_FILENAME = exports.CLOUD_PROVIDERS = exports.ANALYTICS_WRITE_KEY = exports.BOT_CREDS_FILENAME = exports.BOTONIC_PROJECT_PATH = exports.GLOBAL_CREDS_FILENAME = exports.BOTONIC_HOME_DIRNAME = exports.BOTONIC_NPM_NAMESPACE = void 0;
4
- const path_1 = require("path");
5
- const process_1 = require("process");
3
+ exports.CLOUD_PROVIDERS = exports.BOT_CREDENTIALS_FILENAME = exports.BOTONIC_PROJECT_PATH = exports.GLOBAL_CREDENTIALS_FILENAME = exports.BOTONIC_HOME_DIRNAME = exports.BOTONIC_NPM_NAMESPACE = void 0;
6
4
  exports.BOTONIC_NPM_NAMESPACE = '@botonic';
7
5
  exports.BOTONIC_HOME_DIRNAME = '.botonic';
8
- exports.GLOBAL_CREDS_FILENAME = 'credentials.json';
6
+ exports.GLOBAL_CREDENTIALS_FILENAME = 'credentials.json';
9
7
  exports.BOTONIC_PROJECT_PATH = process.cwd();
10
- exports.BOT_CREDS_FILENAME = '.botonic.json';
11
- exports.ANALYTICS_WRITE_KEY = 'YD0jpJHNGW12uhLNbgB4wbdTRQ4Cy1Zu';
12
- exports.CLOUD_PROVIDERS = Object.freeze({
13
- AWS: 'aws',
14
- HUBTYPE: 'hubtype',
15
- });
16
- exports.AWS_CLOUD_CONFIG_FILENAME = 'aws.config.js';
17
- exports.PATH_TO_AWS_CONFIG = (0, path_1.join)((0, process_1.cwd)(), exports.AWS_CLOUD_CONFIG_FILENAME);
8
+ exports.BOT_CREDENTIALS_FILENAME = '.botonic.json';
9
+ exports.CLOUD_PROVIDERS = Object.freeze({ HUBTYPE: 'hubtype' });
18
10
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;AAC3B,qCAA6B;AAEhB,QAAA,qBAAqB,GAAG,UAAU,CAAA;AAClC,QAAA,oBAAoB,GAAG,UAAU,CAAA;AACjC,QAAA,qBAAqB,GAAG,kBAAkB,CAAA;AAC1C,QAAA,oBAAoB,GAAG,OAAO,CAAC,GAAG,EAAE,CAAA;AACpC,QAAA,kBAAkB,GAAG,eAAe,CAAA;AACpC,QAAA,mBAAmB,GAAG,kCAAkC,CAAA;AACxD,QAAA,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC;IAC3C,GAAG,EAAE,KAAK;IACV,OAAO,EAAE,SAAS;CACnB,CAAC,CAAA;AACW,QAAA,yBAAyB,GAAG,eAAe,CAAA;AAC3C,QAAA,kBAAkB,GAAG,IAAA,WAAI,EAAC,IAAA,aAAG,GAAE,EAAE,iCAAyB,CAAC,CAAA"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,qBAAqB,GAAG,UAAU,CAAA;AAClC,QAAA,oBAAoB,GAAG,UAAU,CAAA;AACjC,QAAA,2BAA2B,GAAG,kBAAkB,CAAA;AAChD,QAAA,oBAAoB,GAAG,OAAO,CAAC,GAAG,EAAE,CAAA;AACpC,QAAA,wBAAwB,GAAG,eAAe,CAAA;AAC1C,QAAA,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAA"}
@@ -23,13 +23,9 @@ export interface Me {
23
23
  organization_id: string;
24
24
  campaign: string;
25
25
  }
26
- export interface AnalyticsInfo {
27
- anonymous_id: string;
28
- }
29
26
  export interface GlobalCredentials {
30
27
  oauth?: OAuth;
31
28
  me?: Me;
32
- analytics: AnalyticsInfo;
33
29
  }
34
30
  export interface PaginatedResponse<T> {
35
31
  count: number;
@@ -59,15 +55,6 @@ export interface BotDetail {
59
55
  is_published: boolean;
60
56
  active_users: number;
61
57
  }
62
- export interface PlaygroundSessionInfo {
63
- id: string;
64
- created_at: string;
65
- code: string;
66
- url: string;
67
- anonymous_id: string;
68
- app_name: string;
69
- is_active: boolean;
70
- }
71
58
  interface ProviderAccountsInfo {
72
59
  id: string;
73
60
  queue_id: string;
@@ -95,14 +82,6 @@ interface ProviderAccountsInfo {
95
82
  export interface BotCredentials {
96
83
  bot: BotDetail | null;
97
84
  }
98
- export interface TrackArgs {
99
- event: string;
100
- anonymousId: string;
101
- properties?: any;
102
- }
103
- export interface AnalyticsService {
104
- track: (args: TrackArgs) => void;
105
- }
106
85
  export interface SystemInformation {
107
86
  platform: string;
108
87
  arch: string;
@@ -1 +1 @@
1
- {"version":"0.40.0","commands":{"deploy":{"id":"deploy","description":"Deploy Botonic project to cloud provider","pluginName":"@botonic/cli","pluginType":"core","aliases":[],"examples":["$ botonic deploy\nBuilding...\nCreating bundle...\nUploading...\n🚀 Bot deployed!\n","$ botonic deploy aws\nDeploying to AWS...\n"],"flags":{"command":{"name":"command","type":"option","char":"c","description":"Command to execute from the package \"scripts\" object"},"email":{"name":"email","type":"option","char":"e","description":"Email from Hubtype Organization"},"password":{"name":"password","type":"option","char":"p","description":"Password from Hubtype Organization"},"botName":{"name":"botName","type":"option","char":"b","description":"Name of the bot from Hubtype where you want to deploy"}},"args":[{"name":"provider","options":["aws","hubtype"]}]},"destroy":{"id":"destroy","description":"Destroy Botonic project from cloud provider","pluginName":"@botonic/cli","pluginType":"core","aliases":[],"examples":["$ botonic destroy aws\nDestroying AWS stack...\n"],"flags":{},"args":[{"name":"provider","options":["aws","hubtype"]}]},"login":{"id":"login","description":"Log in to Botonic","pluginName":"@botonic/cli","pluginType":"core","aliases":[],"examples":[],"flags":{"path":{"name":"path","type":"option","char":"p","description":"Path to botonic project. Defaults to current dir."}},"args":[]},"logout":{"id":"logout","description":"Log out of Botonic","pluginName":"@botonic/cli","pluginType":"core","aliases":[],"examples":[],"flags":{"path":{"name":"path","type":"option","char":"p","description":"Path to botonic project. Defaults to current dir."}},"args":[]},"new":{"id":"new","description":"Create a new Botonic project","pluginName":"@botonic/cli","pluginType":"core","aliases":[],"examples":["$ botonic new test_bot\nCreating...\n✨ test_bot was successfully created!\n"],"flags":{},"args":[{"name":"name","description":"name of the bot folder","required":true},{"name":"projectName","description":"OPTIONAL name of the bot project","required":false}]},"serve":{"id":"serve","description":"Serve your bot in your localhost","pluginName":"@botonic/cli","pluginType":"core","aliases":[],"examples":["$ botonic serve\n> Project is running at http://localhost:8080/"],"flags":{"preview":{"name":"preview","type":"boolean","char":"p","description":"Run preview Botonic 1.0 serve.","allowNo":false}},"args":[]},"test":{"id":"test","description":"Test your Botonic components","pluginName":"@botonic/cli","pluginType":"core","aliases":[],"examples":["PASS tests/app.test.js\n ✓ TEST: hi.js (10ms)\n ✓ TEST: pizza.js (1ms)\n ✓ TEST: sausage.js (1ms)\n ✓ TEST: bacon.js\n ✓ TEST: pasta.js (1ms)\n ✓ TEST: cheese.js (1ms)\n ✓ TEST: tomato.js\n\nTest Suites: 1 passed, 1 total\nTests: 7 passed, 7 total\nSnapshots: 0 total\nTime: 1.223s\nRan all test suites."],"flags":{},"args":[]}}}
1
+ {"version":"0.40.1-alpha.0","commands":{"deploy":{"id":"deploy","description":"Deploy Botonic project to cloud provider","pluginName":"@botonic/cli","pluginType":"core","aliases":[],"examples":["$ botonic deploy\nBuilding...\nCreating bundle...\nUploading...\n🚀 Bot deployed!\n","$ botonic deploy aws\nDeploying to AWS...\n"],"flags":{"command":{"name":"command","type":"option","char":"c","description":"Command to execute from the package \"scripts\" object"},"email":{"name":"email","type":"option","char":"e","description":"Email from Hubtype Organization"},"password":{"name":"password","type":"option","char":"p","description":"Password from Hubtype Organization"},"botName":{"name":"botName","type":"option","char":"b","description":"Name of the bot from Hubtype where you want to deploy"}},"args":[{"name":"provider","options":["hubtype"]}]},"login":{"id":"login","description":"Log in to Botonic","pluginName":"@botonic/cli","pluginType":"core","aliases":[],"examples":[],"flags":{"path":{"name":"path","type":"option","char":"p","description":"Path to botonic project. Defaults to current dir."}},"args":[]},"logout":{"id":"logout","description":"Log out of Botonic","pluginName":"@botonic/cli","pluginType":"core","aliases":[],"examples":[],"flags":{"path":{"name":"path","type":"option","char":"p","description":"Path to botonic project. Defaults to current dir."}},"args":[]},"new":{"id":"new","description":"Create a new Botonic project","pluginName":"@botonic/cli","pluginType":"core","aliases":[],"examples":["$ botonic new test_bot\nCreating...\n✨ test_bot was successfully created!\n"],"flags":{},"args":[{"name":"name","description":"name of the bot folder","required":true},{"name":"projectName","description":"OPTIONAL name of the bot project","required":false}]},"serve":{"id":"serve","description":"Serve your bot in your localhost","pluginName":"@botonic/cli","pluginType":"core","aliases":[],"examples":["$ botonic serve\n> Project is running at http://localhost:8080/"],"flags":{},"args":[]},"test":{"id":"test","description":"Test your Botonic components","pluginName":"@botonic/cli","pluginType":"core","aliases":[],"examples":["PASS tests/app.test.js\n ✓ TEST: hi.js (10ms)\n ✓ TEST: pizza.js (1ms)\n ✓ TEST: sausage.js (1ms)\n ✓ TEST: bacon.js\n ✓ TEST: pasta.js (1ms)\n ✓ TEST: cheese.js (1ms)\n ✓ TEST: tomato.js\n\nTest Suites: 1 passed, 1 total\nTests: 7 passed, 7 total\nSnapshots: 0 total\nTime: 1.223s\nRan all test suites."],"flags":{},"args":[]}}}
package/package.json CHANGED
@@ -1,13 +1,12 @@
1
1
  {
2
2
  "name": "@botonic/cli",
3
3
  "description": "Build Chatbots Using React",
4
- "version": "0.40.0",
4
+ "version": "0.40.1-alpha.0",
5
5
  "license": "MIT",
6
6
  "bin": {
7
7
  "botonic": "./bin/run"
8
8
  },
9
9
  "scripts": {
10
- "cloc": "../../scripts/qa/cloc-package.sh .",
11
10
  "prepublishOnly": "npm i && npm run build",
12
11
  "build": "rm -rf lib && ../../node_modules/.bin/tsc -p tsconfig.json",
13
12
  "build:watch": "rm -rf lib && ../../node_modules/.bin/tsc -w",
@@ -24,37 +23,26 @@
24
23
  "@oclif/command": "^1.8.36",
25
24
  "@oclif/config": "^1.18.17",
26
25
  "@oclif/plugin-help": "^3.3.1",
27
- "analytics-node": "^3.5.0",
28
- "axios": "^1.10.0",
26
+ "axios": "^1.12.2",
29
27
  "colors": "^1.4.0",
30
- "concurrently": "^6.5.1",
31
- "fetch-repo-dir": "^1.0.6",
32
28
  "form-data": "^3.0.2",
33
29
  "fs-extra": "^10.1.0",
34
30
  "inquirer": "^7.3.3",
35
- "kill-port": "^1.6.1",
36
- "localtunnel": "^2.0.2",
37
31
  "ora": "^5.4.1",
38
32
  "qs": "^6.14.0",
39
33
  "tar": "^6.2.1",
40
- "ts-node": "^10.9.2",
41
34
  "tslib": "^2.8.1",
42
- "uuid": "^10.0.0",
43
35
  "zip-a-folder": "3.1.8"
44
36
  },
45
37
  "devDependencies": {
46
38
  "@oclif/dev-cli": "^1.26.10",
47
- "@types/analytics-node": "^3.1.14",
48
- "@types/concurrently": "^6.4.0",
49
39
  "@types/fs-extra": "^9.0.13",
50
40
  "@types/inquirer": "^7.3.3",
51
- "@types/localtunnel": "^2.0.4",
52
41
  "@types/tar": "^6.1.13",
53
- "@types/uuid": "^10.0.0",
54
42
  "globby": "^11.1.0"
55
43
  },
56
44
  "engines": {
57
- "node": ">=20.0.0",
45
+ "node": ">=22.19.0",
58
46
  "npm": ">=10.0.0"
59
47
  },
60
48
  "bugs": "https://github.com/hubtype/botonic/issues",
@@ -11,26 +11,3 @@
11
11
 
12
12
  Build chatbots with React
13
13
  `)*/
14
-
15
- try {
16
- const { Telemetry } = require('../lib/analytics/telemetry')
17
- const telemetry = new Telemetry()
18
- telemetry.trackInstallBotonic()
19
- console.log('\n✨ Botonic was installed successfully.\n')
20
- console.log(
21
- 'Create your first chatbot with:\n\x1b[1mbotonic new myBot\x1b[0m\n'
22
- )
23
- } catch (e) {
24
- if (process.env.BOTONIC_DISABLE_ANALYTICS !== '1') {
25
- const Analytics = require('analytics-node')
26
- var analytics = new Analytics('YD0jpJHNGW12uhLNbgB4wbdTRQ4Cy1Zu', {
27
- flushAt: 1,
28
- })
29
- const { v4 } = require('uuid')
30
- analytics.track({
31
- event: 'Installed Botonic CLI',
32
- anonymousId: v4(),
33
- properties: { error: `postinstall exception: ${String(e)}` },
34
- })
35
- }
36
- }
@@ -1,35 +0,0 @@
1
- import { AnalyticsService } from '../interfaces';
2
- import { GlobalCredentialsHandler } from './credentials-handler';
3
- export declare class Telemetry {
4
- analyticsService: AnalyticsService;
5
- globalCredentialsHandler: GlobalCredentialsHandler | undefined;
6
- isAnalyticsEnabled: boolean;
7
- events: {
8
- INSTALL_BOTONIC: string;
9
- LOGIN: string;
10
- LOGOUT: string;
11
- CREATE_BOT: string;
12
- SERVE_BOT: string;
13
- TEST_BOT: string;
14
- TRAIN_BOT: string;
15
- DEPLOY_BOT: string;
16
- ERROR_BOTONIC_CLI: string;
17
- DEPLOY_BOT_1_0: string;
18
- DESTROY_BOT_1_0: string;
19
- };
20
- constructor();
21
- createAnonymousIdIfNotExists(): string | undefined;
22
- getTelemetryProperties(properties: any): any;
23
- track(event: string, properties?: {}): void;
24
- trackLogin(properties?: {}): void;
25
- trackLogout(properties?: {}): void;
26
- trackCreate(properties?: {}): void;
27
- trackServe(properties?: {}): void;
28
- trackTest(properties?: {}): void;
29
- trackTrain(properties?: {}): void;
30
- trackInstallBotonic(properties?: {}): void;
31
- trackDeploy(properties?: {}): void;
32
- trackDeploy1_0(properties?: {}): void;
33
- trackDestroy1_0(properties?: {}): void;
34
- trackError(type: string, properties?: {}): void;
35
- }
@@ -1,97 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Telemetry = void 0;
4
- const tslib_1 = require("tslib");
5
- const analytics_node_1 = tslib_1.__importDefault(require("analytics-node"));
6
- const constants_1 = require("../constants");
7
- const environment_info_1 = require("../util/environment-info");
8
- const credentials_handler_1 = require("./credentials-handler");
9
- const TRACKING_EVENTS = {
10
- // BEWARE: Changing these names will screw analytics
11
- // Despite the event is written in past tense, events are tracked at the very beginning of the action.
12
- INSTALL_BOTONIC: 'Installed Botonic CLI',
13
- LOGIN: 'Logged In Botonic CLI',
14
- LOGOUT: 'Logged Out Botonic CLI',
15
- CREATE_BOT: 'Created Botonic Bot CLI',
16
- SERVE_BOT: 'Served Botonic CLI',
17
- TEST_BOT: 'botonic test',
18
- TRAIN_BOT: 'Trained with Botonic train',
19
- DEPLOY_BOT: 'Deployed Botonic CLI',
20
- ERROR_BOTONIC_CLI: 'Error Botonic CLI',
21
- DEPLOY_BOT_1_0: 'Deployed Botonic 1.0',
22
- DESTROY_BOT_1_0: 'Destroyed Botonic 1.0',
23
- };
24
- class Telemetry {
25
- constructor() {
26
- this.isAnalyticsEnabled = process.env.BOTONIC_DISABLE_ANALYTICS !== '1';
27
- this.events = TRACKING_EVENTS;
28
- this.analyticsService = new analytics_node_1.default(constants_1.ANALYTICS_WRITE_KEY, { flushAt: 1 });
29
- try {
30
- this.globalCredentialsHandler = new credentials_handler_1.GlobalCredentialsHandler();
31
- }
32
- catch (e) {
33
- this.isAnalyticsEnabled = false;
34
- this.globalCredentialsHandler = undefined;
35
- console.error(e);
36
- }
37
- }
38
- createAnonymousIdIfNotExists() {
39
- if (!this.globalCredentialsHandler)
40
- return undefined;
41
- if (!this.globalCredentialsHandler.hasAnonymousId()) {
42
- return this.globalCredentialsHandler.refreshAnonymousId();
43
- }
44
- const credentials = this.globalCredentialsHandler.load();
45
- return credentials === null || credentials === void 0 ? void 0 : credentials.analytics.anonymous_id;
46
- }
47
- getTelemetryProperties(properties) {
48
- return Object.assign(Object.assign({}, (0, environment_info_1.getSystemInformation)()), properties);
49
- }
50
- track(event, properties = {}) {
51
- if (this.globalCredentialsHandler && this.isAnalyticsEnabled) {
52
- const anonymousId = this.createAnonymousIdIfNotExists();
53
- if (!anonymousId)
54
- return;
55
- this.analyticsService.track({
56
- event: event,
57
- anonymousId: anonymousId,
58
- properties: this.getTelemetryProperties(properties),
59
- });
60
- }
61
- }
62
- trackLogin(properties = {}) {
63
- this.track(this.events.LOGIN, properties);
64
- }
65
- trackLogout(properties = {}) {
66
- this.track(this.events.LOGOUT, properties);
67
- }
68
- trackCreate(properties = {}) {
69
- this.track(this.events.CREATE_BOT, properties);
70
- }
71
- trackServe(properties = {}) {
72
- this.track(this.events.SERVE_BOT, properties);
73
- }
74
- trackTest(properties = {}) {
75
- this.track(this.events.TEST_BOT, properties);
76
- }
77
- trackTrain(properties = {}) {
78
- this.track(this.events.TRAIN_BOT, properties);
79
- }
80
- trackInstallBotonic(properties = {}) {
81
- this.track(this.events.INSTALL_BOTONIC, properties);
82
- }
83
- trackDeploy(properties = {}) {
84
- this.track(this.events.DEPLOY_BOT, properties);
85
- }
86
- trackDeploy1_0(properties = {}) {
87
- this.track(this.events.DEPLOY_BOT_1_0, properties);
88
- }
89
- trackDestroy1_0(properties = {}) {
90
- this.track(this.events.DESTROY_BOT_1_0, properties);
91
- }
92
- trackError(type, properties = {}) {
93
- this.track(this.events.ERROR_BOTONIC_CLI, Object.assign(Object.assign({}, properties), { error_type: type }));
94
- }
95
- }
96
- exports.Telemetry = Telemetry;
97
- //# sourceMappingURL=telemetry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"telemetry.js","sourceRoot":"","sources":["../../src/analytics/telemetry.ts"],"names":[],"mappings":";;;;AAAA,4EAAsC;AAEtC,4CAAkD;AAElD,+DAA+D;AAC/D,+DAAgE;AAEhE,MAAM,eAAe,GAAG;IACtB,oDAAoD;IACpD,sGAAsG;IACtG,eAAe,EAAE,uBAAuB;IACxC,KAAK,EAAE,uBAAuB;IAC9B,MAAM,EAAE,wBAAwB;IAChC,UAAU,EAAE,yBAAyB;IACrC,SAAS,EAAE,oBAAoB;IAC/B,QAAQ,EAAE,cAAc;IACxB,SAAS,EAAE,4BAA4B;IACvC,UAAU,EAAE,sBAAsB;IAClC,iBAAiB,EAAE,mBAAmB;IACtC,cAAc,EAAE,sBAAsB;IACtC,eAAe,EAAE,uBAAuB;CACzC,CAAA;AAED,MAAa,SAAS;IAMpB;QAHA,uBAAkB,GAAG,OAAO,CAAC,GAAG,CAAC,yBAAyB,KAAK,GAAG,CAAA;QAClE,WAAM,GAAG,eAAe,CAAA;QAGtB,IAAI,CAAC,gBAAgB,GAAG,IAAI,wBAAS,CAAC,+BAAmB,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAA;QAC1E,IAAI;YACF,IAAI,CAAC,wBAAwB,GAAG,IAAI,8CAAwB,EAAE,CAAA;SAC/D;QAAC,OAAO,CAAC,EAAE;YACV,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAA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C"}
@@ -1,21 +0,0 @@
1
- import { GlobalCredentialsHandler } from './analytics/credentials-handler';
2
- import { PlaygroundSessionInfo } from './interfaces';
3
- export declare class PlaygroundService {
4
- baseUrl: string;
5
- playgroundSessionsApi: string;
6
- globalCredentialsHandler: GlobalCredentialsHandler;
7
- playgroundSession: PlaygroundSessionInfo | null;
8
- port: number;
9
- onClose?: () => void;
10
- tunnel: any;
11
- constructor(port: number, onClose?: () => void);
12
- start(): Promise<void>;
13
- getPlaygroundSession(id: string): Promise<PlaygroundSessionInfo | null>;
14
- newPlaygroundSession({ url, app_name, anonymous_id, }: {
15
- url: any;
16
- app_name: any;
17
- anonymous_id: any;
18
- }): Promise<PlaygroundSessionInfo | null>;
19
- get code(): string | undefined;
20
- stop(): Promise<void>;
21
- }