eitri-cli 1.9.0-beta.10 → 1.9.0-beta.11

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.
@@ -18,15 +18,21 @@ pipelines:
18
18
  - node
19
19
  script:
20
20
  - apt-get update
21
+ - apt-get install -y wget
22
+ - wget -q https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
23
+ - apt-get install -y ./google-chrome-stable_current_amd64.deb
24
+ - export PUPPETEER_EXECUTABLE_PATH='/usr/bin/google-chrome-stable'
21
25
  - apt-get install -y libssl-dev
22
26
  - apt-get install -y pkg-config
23
- - apt-get install -y cargo
27
+ - apt-get install -y git
28
+ - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
29
+ - export PATH="/root/.cargo/bin:${PATH}"
30
+ - rustup --version
31
+ - rustup target add x86_64-unknown-linux-gnu
24
32
  - cd eitri-cli-v2
25
- - yarn install
33
+ - npm i
34
+ - npm run build
26
35
  - cd ..
27
- - apt-get install -y git
28
- - apt-get install -y chromium
29
- - export PUPPETEER_EXECUTABLE_PATH='/usr/bin/chromium-browser'
30
36
  - yarn
31
37
  - npm i -g .
32
38
  - yarn test cli.test.js --force-exit
@@ -38,7 +44,10 @@ pipelines:
38
44
  - apt-get update
39
45
  - apt-get install -y libssl-dev
40
46
  - apt-get install -y pkg-config
41
- - apt-get install -y cargo
47
+ - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
48
+ - export PATH="/root/.cargo/bin:${PATH}"
49
+ - rustup --version
50
+ - rustup target add x86_64-unknown-linux-gnu
42
51
  - cd eitri-cli-v2
43
52
  - cargo test
44
53
  branches:
@@ -49,6 +58,7 @@ pipelines:
49
58
  # - step: *runTests
50
59
  # - step: *runRustTests
51
60
  - step:
61
+ image: joseluisq/rust-linux-darwin-builder:1.76.0
52
62
  name: "Generation of a new version: beta or stable."
53
63
  caches:
54
64
  - node
@@ -65,17 +75,22 @@ pipelines:
65
75
  - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
66
76
  - export PATH="/root/.cargo/bin:${PATH}"
67
77
  - rustup --version
78
+ - curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && apt-get install -y nodejs
68
79
  - rustup target add x86_64-pc-windows-gnu
69
80
  - rustup target add x86_64-unknown-linux-gnu
81
+ - export CC=o64-clang
82
+ - export CXX=o64-clang++
70
83
  - cd eitri-cli-v2
71
- - yarn install
72
- - yarn install:win32
84
+ - npm install
85
+ - npm run build-release:unix
86
+ - npm run build-release:win32
87
+ - npm run build-release:darwin
73
88
  - rm -rf target
74
89
  - cd ..
75
90
  - echo 'Start release'
76
91
  - echo 'If there is a new version, it will be automatically published on NPM according to the channel/branch (beta or master (stable)).'
77
- - yarn
78
- - yarn run release
92
+ - npm i
93
+ - npm run release
79
94
  - RELEASE_VERSION=$(git describe --tags --abbrev=0 | sed 's/^v//')
80
95
  - node -e "const fs = require('fs'); const packageJson = JSON.parse(fs.readFileSync('package.json')); packageJson.version = process.env.RELEASE_VERSION; fs.writeFileSync('package.json', JSON.stringify(packageJson, null, 4));"
81
96
  - echo 'New release'
@@ -500,7 +500,6 @@ checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a"
500
500
  name = "eitri-cli-v2"
501
501
  version = "0.1.0"
502
502
  dependencies = [
503
- "cc",
504
503
  "homedir",
505
504
  "httpmock",
506
505
  "neon",
@@ -20,4 +20,3 @@ serde_derive = "1.0.197"
20
20
  serde_json = "1.0.114"
21
21
  tokio = { version = "1.36.0", features = ["full"] }
22
22
  openssl = { version = "0.10", features = ["vendored"] }
23
- cc = "1.0.90"
Binary file
@@ -1,2 +1,11 @@
1
- const os = require('os')
2
- module.exports = os.platform() === 'win32' ? require('./index.win32.node'): require('./index.unix.node')
1
+ const os = require("os");
2
+
3
+ if (os.platform() === "darwin") {
4
+ module.exports = require("./index.darwin.node");
5
+ } else if (os.platform() === "linux") {
6
+ module.exports = require("./index.unix.node");
7
+ } else if (os.platform() === "win32") {
8
+ module.exports = require("./index.win32.node");
9
+ } else {
10
+ console.error("Plataforma não supotada")
11
+ }
Binary file
Binary file
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "eitri-cli-v2",
3
+ "version": "0.1.0",
4
+ "lockfileVersion": 3,
5
+ "requires": true,
6
+ "packages": {
7
+ "node_modules/cargo-cp-artifact": {
8
+ "version": "0.1.8",
9
+ "resolved": "https://registry.npmjs.org/cargo-cp-artifact/-/cargo-cp-artifact-0.1.8.tgz",
10
+ "integrity": "sha512-3j4DaoTrsCD1MRkTF2Soacii0Nx7UHCce0EwUf4fHnggwiE4fbmF2AbnfzayR36DF8KGadfh7M/Yfy625kgPlA==",
11
+ "dev": true,
12
+ "bin": {
13
+ "cargo-cp-artifact": "bin/cargo-cp-artifact.js"
14
+ }
15
+ }
16
+ }
17
+ }
@@ -7,7 +7,6 @@
7
7
  "": {
8
8
  "name": "eitri-cli-v2",
9
9
  "version": "0.1.0",
10
- "hasInstallScript": true,
11
10
  "license": "ISC",
12
11
  "devDependencies": {
13
12
  "cargo-cp-artifact": "^0.1"
@@ -6,11 +6,11 @@
6
6
  "scripts": {
7
7
  "build": "cargo-cp-artifact -nc index.unix.node -- cargo build --message-format=json-render-diagnostics --target x86_64-unknown-linux-gnu",
8
8
  "build:win32": "cargo-cp-artifact -nc index.win32.node -- cargo build --message-format=json-render-diagnostics --target x86_64-pc-windows-gnu",
9
+ "build:darwin": "cargo-cp-artifact -nc index.darwin.node -- cargo build --message-format=json-render-diagnostics --target=aarch64-apple-darwin",
9
10
  "build-debug": "npm run build --",
10
- "build-release": "npm run build -- --release",
11
+ "build-release:unix": "npm run build -- --release",
11
12
  "build-release:win32": "npm run build:win32 -- --release",
12
- "install": "npm run build-release",
13
- "install:win32": "npm run build-release:win32",
13
+ "build-release:darwin": "npm run build:darwin -- --release",
14
14
  "test": "cargo test"
15
15
  },
16
16
  "author": "",
@@ -2,7 +2,6 @@ use std::{env, fs, path::Path, process::exit};
2
2
 
3
3
  use crate::model::eitri_conf::EitriConf;
4
4
  use crate::utils::convert_eitri_conf;
5
- use tokio::fs::try_exists;
6
5
 
7
6
  pub async fn read_eitri_conf() -> EitriConf {
8
7
  let current_dir = match env::current_dir().ok() {
@@ -17,14 +16,7 @@ pub async fn read_eitri_conf() -> EitriConf {
17
16
  let file_path = Path::new(&current_dir_str);
18
17
  let file_path = file_path.join("eitri-app.conf.json");
19
18
 
20
- let exists_json = match try_exists(&file_path).await {
21
- Ok(exists) => exists,
22
- Err(_) => false,
23
- };
24
-
25
- if !exists_json {
26
- convert_eitri_conf::convert();
27
- }
19
+ convert_eitri_conf::convert();
28
20
 
29
21
  let content = match fs::read_to_string(file_path.display().to_string()).ok() {
30
22
  Some(it) => it,
@@ -35,7 +27,18 @@ pub async fn read_eitri_conf() -> EitriConf {
35
27
  };
36
28
 
37
29
  let eitri_conf: EitriConf = match serde_json::from_str(&content).ok() {
38
- Some(it) => it,
30
+ Some(it) => {
31
+ match fs::remove_file(file_path.display().to_string()) {
32
+ Ok(()) => (),
33
+ Err(_err) => {
34
+ eprintln!(
35
+ "Houve um erro ao tentar ler o eitri-app.conf do projeto. Tente novamente."
36
+ );
37
+ exit(1)
38
+ }
39
+ };
40
+ it
41
+ }
39
42
  None => {
40
43
  eprintln!("Houve um erro ao fazer parse do json");
41
44
  exit(1)
@@ -4,5 +4,5 @@
4
4
 
5
5
  cargo-cp-artifact@^0.1:
6
6
  version "0.1.8"
7
- resolved "https://registry.yarnpkg.com/cargo-cp-artifact/-/cargo-cp-artifact-0.1.8.tgz#353814f49f6aa76601a4bcb3ea5f3071180b90de"
7
+ resolved "https://registry.npmjs.org/cargo-cp-artifact/-/cargo-cp-artifact-0.1.8.tgz"
8
8
  integrity sha512-3j4DaoTrsCD1MRkTF2Soacii0Nx7UHCce0EwUf4fHnggwiE4fbmF2AbnfzayR36DF8KGadfh7M/Yfy625kgPlA==
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eitri-cli",
3
- "version": "1.9.0-beta.10",
3
+ "version": "1.9.0-beta.11",
4
4
  "description": "Command Line Interface to make \"Eitri-App\" with code and fire.",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -138,7 +138,7 @@ describe("eitri-cli", () => {
138
138
  console.error(error);
139
139
  throw error;
140
140
  }
141
- });
141
+ }, 2 * minutes);
142
142
 
143
143
  it(
144
144
  "should do push-version",
@@ -1,16 +0,0 @@
1
- {
2
- "systemParams": "linux-x64-108",
3
- "modulesFolders": [
4
- "node_modules"
5
- ],
6
- "flags": [],
7
- "linkedModules": [],
8
- "topLevelPatterns": [
9
- "cargo-cp-artifact@^0.1"
10
- ],
11
- "lockfileEntries": {
12
- "cargo-cp-artifact@^0.1": "https://registry.yarnpkg.com/cargo-cp-artifact/-/cargo-cp-artifact-0.1.8.tgz#353814f49f6aa76601a4bcb3ea5f3071180b90de"
13
- },
14
- "files": [],
15
- "artifacts": {}
16
- }