eitri-cli 1.11.0-beta.4 → 1.11.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.
@@ -3,6 +3,11 @@
3
3
 
4
4
  /* auto-generated by NAPI-RS */
5
5
 
6
+ export interface EitriLibsArguments {
7
+ bifrost?: boolean
8
+ luminus?: boolean
9
+ }
6
10
  export function publish(environment: string, message: string): Promise<void>
7
11
  export function runTest(userJwt: string, userWorkspaceId: string, testPath: string): Promise<void>
12
+ export function eitriLibs(eitriLibsArgs: EitriLibsArguments): Promise<void>
8
13
  export function doctor(): Promise<void>
@@ -295,8 +295,9 @@ if (!nativeBinding) {
295
295
  throw new Error(`Failed to load native binding`)
296
296
  }
297
297
 
298
- const { publish, runTest, doctor } = nativeBinding
298
+ const { publish, runTest, eitriLibs, doctor } = nativeBinding
299
299
 
300
300
  module.exports.publish = publish
301
301
  module.exports.runTest = runTest
302
+ module.exports.eitriLibs = eitriLibs
302
303
  module.exports.doctor = doctor
package/index.js CHANGED
@@ -122,13 +122,19 @@ const run = async () => {
122
122
 
123
123
  program
124
124
  .command("libs")
125
- .description("Bibliotecas do Eitri")
125
+ .description("Listagem das versões das Bibliotecas do Eitri")
126
126
  .option(
127
- "-l, --list",
128
- "Lista as bibliotecas do Eitri com suas versões"
127
+ "--bifrost",
128
+ "Lista todas as versões do Bifrost"
129
129
  )
130
- .action((cmdObj) => {
131
- require("./src/cmd/eitriLibs")(cmdObj);
130
+ .option(
131
+ "--luminus",
132
+ "Lista todas as versões do Luminus"
133
+ )
134
+ .action(async (cmdObj) => {
135
+ const eitriCLIV2 = require('./eitri-cli-v2/index.js')
136
+ await eitriCLIV2.eitriLibs(cmdObj);
137
+
132
138
  });
133
139
 
134
140
  program
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eitri-cli",
3
- "version": "1.11.0-beta.4",
3
+ "version": "1.11.0",
4
4
  "description": "Command Line Interface to make \"Eitri-App\" with code and fire.",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -1,38 +0,0 @@
1
- const {workspace} = require('../service/Workspace')
2
- const TrackingService = require('../service/TrackingService')
3
- const TrackingEitriAnalytics = require('../service/TrackingEitriAnalytics')
4
- const LibsService = require('../service/LibsService')
5
-
6
- const blindGuardian = workspace.blindGuardian
7
- const trackingService = new TrackingService(blindGuardian)
8
-
9
- module.exports = async function eitriLibs(cmdObj) {
10
- if(cmdObj.list){
11
- await listLibs()
12
- }
13
- }
14
-
15
- async function listLibs() {
16
- try {
17
- const libsVersions = await LibsService.simultaneousRequestAndHandleData()
18
- console.log("libsVersions", libsVersions)
19
- TrackingEitriAnalytics.sendEvent({
20
- eventName: "eitriLibs.listLibs",
21
- userId: workspace?.userEmail,
22
- data: libsVersions
23
- })
24
- process.exit(0)
25
- } catch (e) {
26
- TrackingEitriAnalytics.sendEvent({
27
- eventName: "clean.error",
28
- userId: workspace?.userEmail,
29
- data: {
30
- errorMessage: e?.message || ""
31
- }
32
- })
33
-
34
-
35
- await trackingService.sendError(e)
36
- process.exit(1)
37
- }
38
- }