eitri-cli 1.12.0-beta.3 → 1.12.0-beta.4
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/eitri-cli-v2/Cargo.toml +1 -0
- package/eitri-cli-v2/config/config.dev.toml +3 -1
- package/eitri-cli-v2/config/config.loc.toml +3 -1
- package/eitri-cli-v2/config/config.prod.toml +3 -1
- package/eitri-cli-v2/config/config.runes-foundry.toml +3 -1
- package/eitri-cli-v2/config/config.test.toml +3 -1
- package/eitri-cli-v2/eitri-cli-v2.darwin-arm64.node +0 -0
- package/eitri-cli-v2/eitri-cli-v2.darwin-x64.node +0 -0
- package/eitri-cli-v2/eitri-cli-v2.linux-x64-gnu.node +0 -0
- package/eitri-cli-v2/eitri-cli-v2.win32-x64-msvc.node +0 -0
- package/index.js +4 -0
- package/package.json +1 -1
- package/src/cmd/start.js +1 -1
- package/src/service/LibsService.js +10 -8
- package/src/service/Watcher.js +3 -3
- package/src/service/Workspace.js +7 -3
package/eitri-cli-v2/Cargo.toml
CHANGED
|
@@ -17,10 +17,12 @@ url = "https://api.eitri.tech/share-api/share"
|
|
|
17
17
|
|
|
18
18
|
[foundry]
|
|
19
19
|
url = "https://api.eitri.tech"
|
|
20
|
-
base_path = "runes-foundry"
|
|
20
|
+
base_path = "/runes-foundry"
|
|
21
21
|
target_path = "/runes-foundry/targets"
|
|
22
22
|
run_test_path = "/runes-foundry/run-test"
|
|
23
23
|
share_path = "/foundry/share"
|
|
24
|
+
clean_path = "/sources"
|
|
25
|
+
shared_tags_json_path = "/user/:workspaceId/index.json"
|
|
24
26
|
|
|
25
27
|
[foundry.libs]
|
|
26
28
|
update_libs_endpoint_version = "application/vnd.workspace.api.v2+json"
|
|
@@ -17,10 +17,12 @@ url = "https://api.eitri.tech/share-api/share"
|
|
|
17
17
|
|
|
18
18
|
[foundry]
|
|
19
19
|
url = "http://localhost:3000"
|
|
20
|
-
base_path = "runes-foundry"
|
|
20
|
+
base_path = "/runes-foundry"
|
|
21
21
|
target_path = "/runes-foundry/targets"
|
|
22
22
|
run_test_path = "/runes-foundry/run-test"
|
|
23
23
|
share_path = "/runes-foundry/share"
|
|
24
|
+
clean_path = "/sources"
|
|
25
|
+
shared_tags_json_path = "/user/:workspaceId/index.json"
|
|
24
26
|
|
|
25
27
|
[foundry.libs]
|
|
26
28
|
update_libs_endpoint_version = "application/vnd.workspace.api.v2+json"
|
|
@@ -17,10 +17,12 @@ url = "https://api.eitri.tech/share-api/share"
|
|
|
17
17
|
|
|
18
18
|
[foundry]
|
|
19
19
|
url = "https://api.eitri.tech"
|
|
20
|
-
base_path = "foundry"
|
|
20
|
+
base_path = "/foundry"
|
|
21
21
|
target_path = "/foundry/targets"
|
|
22
22
|
run_test_path = "/foundry/run-test"
|
|
23
23
|
share_path = "/foundry/share"
|
|
24
|
+
clean_path = "/sources"
|
|
25
|
+
shared_tags_json_path = "/user/:workspaceId/index.json"
|
|
24
26
|
|
|
25
27
|
[foundry.libs]
|
|
26
28
|
update_libs_endpoint_version = "application/vnd.workspace.api.v2+json"
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
|
|
2
2
|
[foundry]
|
|
3
3
|
url = "https://api.eitri.tech"
|
|
4
|
-
base_path = "runes-foundry"
|
|
4
|
+
base_path = "/runes-foundry"
|
|
5
5
|
target_path = "/runes-foundry/targets"
|
|
6
6
|
run_test_path = "/runes-foundry/run-test"
|
|
7
7
|
share_path = "/runes-foundry/share"
|
|
8
|
+
clean_path = "/sources"
|
|
9
|
+
shared_tags_json_path = "/user/:workspaceId/index.json"
|
|
@@ -17,10 +17,12 @@ url = "https://api.eitri.tech/share-api/share"
|
|
|
17
17
|
|
|
18
18
|
[foundry]
|
|
19
19
|
url = "https://api.eitri.tech"
|
|
20
|
-
base_path = "runes-foundry"
|
|
20
|
+
base_path = "/runes-foundry"
|
|
21
21
|
target_path = "/runes-foundry/targets"
|
|
22
22
|
run_test_path = "/runes-foundry/run-test"
|
|
23
23
|
share_path = "/foundry/share"
|
|
24
|
+
clean_path = "/sources"
|
|
25
|
+
shared_tags_json_path = "/user/:workspaceId/index.json"
|
|
24
26
|
|
|
25
27
|
[foundry.libs]
|
|
26
28
|
update_libs_endpoint_version = "application/vnd.workspace.api.v2+json"
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/index.js
CHANGED
|
@@ -75,6 +75,10 @@ const run = async () => {
|
|
|
75
75
|
.option(
|
|
76
76
|
"-e, --emulator <platform>",
|
|
77
77
|
"Abre o Eitri-App no emulador, desde que seja definido qual plataforma será aberto, android ou ios."
|
|
78
|
+
)
|
|
79
|
+
.option(
|
|
80
|
+
"-sh, --shared",
|
|
81
|
+
"Executa o Eitri-App no modo compartilhável."
|
|
78
82
|
);
|
|
79
83
|
|
|
80
84
|
startProgram.action((cmdObj) => {
|
package/package.json
CHANGED
package/src/cmd/start.js
CHANGED
|
@@ -48,7 +48,7 @@ module.exports = async function start(args) {
|
|
|
48
48
|
debug("Fim da busca e validação do EitriAppConf", { miniConf })
|
|
49
49
|
|
|
50
50
|
const url = config.get('workspace').url
|
|
51
|
-
const setupResult = await workspace.setup()
|
|
51
|
+
const setupResult = await workspace.setup(args)
|
|
52
52
|
debug("Informações do setupResult do workspace", { setupResult })
|
|
53
53
|
|
|
54
54
|
|
|
@@ -2,11 +2,12 @@ const axios = require('axios')
|
|
|
2
2
|
const configService = require('./ConfigService')
|
|
3
3
|
const CDN_83io_LIBRARY = configService.get('cdn')?.library
|
|
4
4
|
const TrackingEitriAnalytics = require('./TrackingEitriAnalytics')
|
|
5
|
+
const { validateUUID } = require('../util/GenericUtils')
|
|
5
6
|
|
|
6
7
|
class LibsService {
|
|
7
8
|
|
|
8
|
-
static async validateLibsVersions({libs = [], eitriAppConf = {}}) {
|
|
9
|
-
const {luminusUiVersion, bifrostVersion} = this.getEitriConfLibsVersions(libs)
|
|
9
|
+
static async validateLibsVersions({ libs = [], eitriAppConf = {} }) {
|
|
10
|
+
const { luminusUiVersion, bifrostVersion } = this.getEitriConfLibsVersions(libs)
|
|
10
11
|
if (!luminusUiVersion) {
|
|
11
12
|
throw new Error("Nenhuma versão do [luminus-ui/eitri-app-components] encontrada em seu eitri-app.conf");
|
|
12
13
|
}
|
|
@@ -15,10 +16,11 @@ class LibsService {
|
|
|
15
16
|
throw new Error("Nenhuma versão do [bifrost/eitri-app-client] encontrada em seu eitri-app.conf");
|
|
16
17
|
}
|
|
17
18
|
|
|
18
|
-
const {luminusUiVersions, bifrostVersions} = await this.simultaneousRequestAndHandleData();
|
|
19
|
+
const { luminusUiVersions, bifrostVersions } = await this.simultaneousRequestAndHandleData();
|
|
19
20
|
const allBifrostVersions = bifrostVersions?.versions?.concat(bifrostVersions?.betaVersions, bifrostVersions?.alphaVersions);
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
|
|
23
|
+
if (!luminusUiVersion.includes("@") && !validateUUID(luminusUiVersion)) {
|
|
22
24
|
const existsLuminus = luminusUiVersions?.versions?.some(version => version === luminusUiVersion);
|
|
23
25
|
if (!existsLuminus) {
|
|
24
26
|
this.throwNonExistentLibError({
|
|
@@ -30,7 +32,7 @@ class LibsService {
|
|
|
30
32
|
}
|
|
31
33
|
}
|
|
32
34
|
|
|
33
|
-
if(!bifrostVersion.includes("@")){
|
|
35
|
+
if (!bifrostVersion.includes("@")) {
|
|
34
36
|
const existsBifrost = allBifrostVersions.some(version => version === bifrostVersion);
|
|
35
37
|
if (!existsBifrost) {
|
|
36
38
|
this.throwNonExistentLibError({
|
|
@@ -127,12 +129,12 @@ class LibsService {
|
|
|
127
129
|
TrackingEitriAnalytics.sendEvent({
|
|
128
130
|
eventName: `${method}.error`,
|
|
129
131
|
userId: "",
|
|
130
|
-
data: {errorMessage}
|
|
132
|
+
data: { errorMessage }
|
|
131
133
|
})
|
|
132
134
|
}
|
|
133
135
|
|
|
134
|
-
static throwNonExistentLibError(input = {libName: "", eitriConfLibVersion: "", availableVersions: [], eitriAppConf: {}}) {
|
|
135
|
-
const {libName, eitriConfLibVersion, availableVersions, eitriAppConf} = input
|
|
136
|
+
static throwNonExistentLibError(input = { libName: "", eitriConfLibVersion: "", availableVersions: [], eitriAppConf: {} }) {
|
|
137
|
+
const { libName, eitriConfLibVersion, availableVersions, eitriAppConf } = input
|
|
136
138
|
|
|
137
139
|
const friendlyErrorMessage = `Versão da biblioteca [${libName}] não encontrada`;
|
|
138
140
|
console.log(`\n\x1b[1m\x1b[31m${friendlyErrorMessage}\x1b[0m\n`);
|
package/src/service/Watcher.js
CHANGED
|
@@ -30,7 +30,7 @@ class Watcher {
|
|
|
30
30
|
return
|
|
31
31
|
}
|
|
32
32
|
if (stat.isFile()) {
|
|
33
|
-
console.log('\x1b[
|
|
33
|
+
console.log('\x1b[34meitri:Alterações em: %s\x1b[0m', filePath)
|
|
34
34
|
this.workspace
|
|
35
35
|
.upsert(filePath, { why: WatcherOpts.SAVE })
|
|
36
36
|
.then((result) => {
|
|
@@ -43,10 +43,10 @@ class Watcher {
|
|
|
43
43
|
}
|
|
44
44
|
if (result.relativePath === '/folder.hash') {
|
|
45
45
|
|
|
46
|
-
console.log(`\x1b[
|
|
46
|
+
console.log(`\x1b[94meitri:Forjado em ${result.time} milissegundos\x1b[0m`);
|
|
47
47
|
this.trackingService.sendSave(event)
|
|
48
48
|
} else {
|
|
49
|
-
console.log(`\x1b[
|
|
49
|
+
console.log(`\x1b[94meitri:Transportado em ${result.time} milissegundos\x1b[0m`);
|
|
50
50
|
this.trackingService.sendCompile(event)
|
|
51
51
|
}
|
|
52
52
|
return this.hashFolder.updateHashFile()
|
package/src/service/Workspace.js
CHANGED
|
@@ -31,7 +31,7 @@ const EitriAppType = require("../model/EitriAppType");
|
|
|
31
31
|
const chalk = require("chalk");
|
|
32
32
|
const LibsService = require("./LibsService");
|
|
33
33
|
const { LogSuccess } = require("../util/LogUtil");
|
|
34
|
-
const {extractSlug} = require("../util/LibUtil");
|
|
34
|
+
const { extractSlug } = require("../util/LibUtil");
|
|
35
35
|
const vegvisirService = new VegvisirService()
|
|
36
36
|
const huginService = new HuginService()
|
|
37
37
|
|
|
@@ -139,6 +139,9 @@ class Workspace {
|
|
|
139
139
|
throw Error("Arquivo eitri-app.conf.js sem version");
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
|
+
if (process.env.WORKSPACE_SHARED) {
|
|
143
|
+
this._miniConf['eitri-luminus'] = process.env.WORKSPACE_SHARED
|
|
144
|
+
}
|
|
142
145
|
return this._miniConf;
|
|
143
146
|
}
|
|
144
147
|
|
|
@@ -183,8 +186,9 @@ class Workspace {
|
|
|
183
186
|
});
|
|
184
187
|
}
|
|
185
188
|
|
|
186
|
-
async setup() {
|
|
189
|
+
async setup(args) {
|
|
187
190
|
const miniConf = this.getMiniConf();
|
|
191
|
+
miniConf.isShared = args.shared
|
|
188
192
|
const headers = {
|
|
189
193
|
accept: this.config.libs.updateLibsEndpointVersion,
|
|
190
194
|
};
|
|
@@ -242,7 +246,7 @@ class Workspace {
|
|
|
242
246
|
let libVersionsOutput = "";
|
|
243
247
|
state.libs.forEach((lib) => {
|
|
244
248
|
let libraryDisplayName = lib.name
|
|
245
|
-
if(libraryDisplayName === "eitri-luminus"){
|
|
249
|
+
if (libraryDisplayName === "eitri-luminus") {
|
|
246
250
|
libraryDisplayName = extractSlug(miniConf[lib.name])
|
|
247
251
|
}
|
|
248
252
|
|