Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NodeGit + SQLite #3585

Merged
merged 68 commits into from
Jun 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
fa2714c
Initialize Git repository (nodegit) (#3509)
mittalyashu Oct 15, 2019
c367a57
fix: switchRepository mutation to toggle modal
mittalyashu Oct 16, 2019
ccbe79a
Remove remote refs & validate git repository
mittalyashu Oct 16, 2019
1d056dd
Add getBranchName function using nodegit
mittalyashu Oct 16, 2019
65f0015
Add source column to db table
mittalyashu Oct 16, 2019
9a5fc06
git status and get file status type
mittalyashu Oct 16, 2019
3234b31
Query repository data on route (enter & update)
mittalyashu Oct 23, 2019
eda7722
Clear repositoryData on routeLeave
mittalyashu Oct 23, 2019
687354c
Update projectId to repositoryId (route params)
mittalyashu Oct 23, 2019
633d3b3
Add repositoryData state, getters, and mutation
mittalyashu Oct 23, 2019
db875e9
Show branch name and working changes
mittalyashu Oct 23, 2019
e3565ed
Move to next page after database data
mittalyashu Oct 23, 2019
1d0b9a7
Show staged files in workspace
mittalyashu Oct 24, 2019
403d389
Query repository & repositorySettings features data
mittalyashu Oct 24, 2019
9d6bfad
Remove refs from workspace
mittalyashu Nov 2, 2019
45ded66
Move to status-list component
mittalyashu Nov 2, 2019
5a2e090
Create status item component
mittalyashu Nov 2, 2019
f2301ec
Remove branchName parmas from workspace route
mittalyashu Nov 2, 2019
23b6b7c
Pass branchName as props to commit-message
mittalyashu Nov 2, 2019
51f4e09
NodeGit + SQLite migration : implement clone feature (#3589)
Nov 3, 2019
a0dbc25
Remove workspace vuex store
mittalyashu Nov 4, 2019
9c95e12
Emit stagedFile to statusList component
mittalyashu Nov 4, 2019
a9efe52
Change projectId to repositoryId
mittalyashu Nov 4, 2019
96f4546
Show repo path in switch repo modal
mittalyashu Nov 6, 2019
17a4d06
Set default branchName to "master"
mittalyashu Nov 6, 2019
70ed93d
Remove getFeatureValue computed property
mittalyashu Nov 6, 2019
e9472ff
Get repository data using mixin
mittalyashu Nov 6, 2019
3d75ae9
Git remote functions
mittalyashu Nov 7, 2019
c129a7b
Remove branchName as route props
mittalyashu Nov 7, 2019
f5e9e03
Query remoteUrl from db
mittalyashu Nov 7, 2019
3dee2af
Save remote url to db on adding repository
mittalyashu Nov 7, 2019
ab82f7f
Update add remote url with nodegit
mittalyashu Nov 7, 2019
2b9e8bc
store filePreview value locally data property
mittalyashu Nov 7, 2019
8bae0c9
adjust workspace files width
mittalyashu Nov 7, 2019
5daf674
Remove file diff preview method
mittalyashu Nov 7, 2019
5fca92d
refactor: remove unused code
mittalyashu Nov 7, 2019
01ab321
Remove spacingProps, import repositoryData
mittalyashu Nov 7, 2019
aa5a100
Update repositoryData computed property data
mittalyashu Nov 8, 2019
afd5dc0
Update to repositoryId & remove branchName params
mittalyashu Nov 8, 2019
57adc6e
Remove event.preventDefault()
mittalyashu Nov 8, 2019
ed22a6c
Remove repositoryDataMixin import from settings.vue
mittalyashu Nov 8, 2019
72b419d
Update remoteUrl on saveSettings method
mittalyashu Nov 8, 2019
a7a73c7
Git fetch functions
mittalyashu Nov 8, 2019
3ecd481
pullRemoteBranch function
mittalyashu Nov 8, 2019
f3dba44
Add gitFetch method to navbar
mittalyashu Nov 8, 2019
6ed9260
Update directoryPath arguments (openTerminal & openFileExplorer)
mittalyashu Nov 8, 2019
7f9b06d
Update gitPull method with nodegit
mittalyashu Nov 8, 2019
418a971
Remove branchName as route params
mittalyashu Nov 8, 2019
dc5cc4d
Update repositoryData import
mittalyashu Nov 8, 2019
c54a89d
Toggle commit-message component in workspace view
mittalyashu Nov 8, 2019
08712e9
Query repositoryName on enter repository route
mittalyashu Nov 8, 2019
4438ac9
Change Git module to Clone in clone.js
mittalyashu Nov 8, 2019
14ea52e
Remove console statement
mittalyashu Nov 8, 2019
328a19e
Format the code
mittalyashu Nov 8, 2019
669e34d
Update openCmdTerminal() method
mittalyashu Nov 8, 2019
1b3fcf5
Initialize repository (nodegit) (#3592)
Dec 20, 2019
55d712c
Settings to auto initialize non-git repository (#3596)
mittalyashu Dec 20, 2019
f6161e9
Remove console.log statement in setSettings
mittalyashu Dec 24, 2019
cfd8cab
Fix PR #3598 : Auto init non-git repository (part 2) (#3599)
Jan 22, 2020
6bea6a0
addRepositoryToDatabase based closing modal
mittalyashu Jan 22, 2020
64c7d97
update isGit value in repository store
mittalyashu Jan 23, 2020
2f5f4e5
Update .electron-vue files
mittalyashu Jun 5, 2021
33acddb
Merge branch 'master' into chore/add-nodegit
mittalyashu Jun 5, 2021
111b1d3
change node engine v14
mittalyashu Jun 5, 2021
4c92c94
ci: run pipeline with node v14 & v16
mittalyashu Jun 5, 2021
bafb502
ci: change npm to yarn
mittalyashu Jun 5, 2021
a70dbec
set node engine v14 or v16
mittalyashu Jun 5, 2021
ed183e1
ci: yarn postinstall deps
mittalyashu Jun 5, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
177 changes: 95 additions & 82 deletions .electron-vue/build.js
Original file line number Diff line number Diff line change
@@ -1,87 +1,100 @@
"use strict"
"use strict";

process.env.NODE_ENV = "production"
process.env.NODE_ENV = "production";

const { say } = require("cfonts")
const chalk = require("chalk")
const del = require("del")
const { spawn } = require("child_process")
const webpack = require("webpack")
const Multispinner = require("multispinner")
const { say } = require("cfonts");
const chalk = require("chalk");
const del = require("del");
const { spawn } = require("child_process");
const webpack = require("webpack");
const Listr = require("listr");

const mainConfig = require("./webpack.main.config")
const rendererConfig = require("./webpack.renderer.config")
const webConfig = require("./webpack.web.config")
const mainConfig = require("./webpack.main.config");
const rendererConfig = require("./webpack.renderer.config");
const webConfig = require("./webpack.web.config");

const doneLog = chalk.bgGreen.white(" DONE ") + " "
const errorLog = chalk.bgRed.white(" ERROR ") + " "
const okayLog = chalk.bgBlue.white(" OKAY ") + " "
const isCI = process.env.CI || false
const doneLog = chalk.bgGreen.white(" DONE ") + " ";
const errorLog = chalk.bgRed.white(" ERROR ") + " ";
const okayLog = chalk.bgBlue.white(" OKAY ") + " ";
const isCI = process.env.CI || false;

if (process.env.BUILD_TARGET === "clean") clean()
else if (process.env.BUILD_TARGET === "web") web()
else build()
if (process.env.BUILD_TARGET === "clean") clean();
else if (process.env.BUILD_TARGET === "web") web();
else build();

function clean() {
del.sync(["build/*", "!build/icons", "!build/icons/icon.*"])
console.log(`\n${doneLog}\n`)
process.exit()
del.sync(["build/*", "!build/icons", "!build/icons/icon.*"]);
console.log(`\n${doneLog}\n`);
process.exit();
}

function build() {
greeting()
async function build() {
greeting();

del.sync(["dist/electron/*", "!.gitkeep"])
del.sync(["dist/electron/*", "!.gitkeep"]);

const tasks = ["main", "renderer"]
const tasks = ["main", "renderer"];
const m = new Multispinner(tasks, {
preText: "building",
postText: "process"
})

let results = ""

m.on("success", () => {
process.stdout.write("\x1B[2J\x1B[0f")
console.log(`\n\n${results}`)
console.log(
`${okayLog}take it away ${chalk.yellow("`electron-builder`")}\n`
)
process.exit()
})

pack(mainConfig)
.then(result => {
results += result + "\n\n"
m.success("main")
})
.catch(err => {
m.error("main")
console.log(`\n ${errorLog}failed to build main process`)
console.error(`\n${err}\n`)
process.exit(1)
})

pack(rendererConfig)
.then(result => {
results += result + "\n\n"
m.success("renderer")
});

let results = "";

const tasks = new Listr(
[
{
title: "building master process",
task: async () => {
await pack(mainConfig)
.then(result => {
results += result + "\n\n";
})
.catch(err => {
console.log(`\n ${errorLog}failed to build main process`);
console.error(`\n${err}\n`);
});
}
},
{
title: "building renderer process",
task: async () => {
await pack(rendererConfig)
.then(result => {
results += result + "\n\n";
})
.catch(err => {
console.log(`\n ${errorLog}failed to build renderer process`);
console.error(`\n${err}\n`);
});
}
}
],
{ concurrent: 2 }
);

await tasks
.run()
.then(() => {
process.stdout.write("\x1B[2J\x1B[0f");
console.log(`\n\n${results}`);
console.log(
`${okayLog}take it away ${chalk.yellow("`electron-builder`")}\n`
);
process.exit();
})
.catch(err => {
m.error("renderer")
console.log(`\n ${errorLog}failed to build renderer process`)
console.error(`\n${err}\n`)
process.exit(1)
})
process.exit(1);
});
}

function pack(config) {
return new Promise((resolve, reject) => {
config.mode = "production"
config.mode = "production";
webpack(config, (err, stats) => {
if (err) reject(err.stack || err)
if (err) reject(err.stack || err);
else if (stats.hasErrors()) {
let err = ""
let err = "";

stats
.toString({
Expand All @@ -90,53 +103,53 @@ function pack(config) {
})
.split(/\r?\n/)
.forEach(line => {
err += ` ${line}\n`
})
err += ` ${line}\n`;
});

reject(err)
reject(err);
} else {
resolve(
stats.toString({
chunks: false,
colors: true
})
)
);
}
})
})
});
});
}

function web() {
del.sync(["dist/web/*", "!.gitkeep"])
webConfig.mode = "production"
del.sync(["dist/web/*", "!.gitkeep"]);
webConfig.mode = "production";
webpack(webConfig, (err, stats) => {
if (err || stats.hasErrors()) console.log(err)
if (err || stats.hasErrors()) console.log(err);

console.log(
stats.toString({
chunks: false,
colors: true
})
)
);

process.exit()
})
process.exit();
});
}

function greeting() {
const cols = process.stdout.columns
let text = ""
const cols = process.stdout.columns;
let text = "";

if (cols > 85) text = "lets-build"
else if (cols > 60) text = "lets-|build"
else text = false
if (cols > 85) text = "lets-build";
else if (cols > 60) text = "lets-|build";
else text = false;

if (text && !isCI) {
say(text, {
colors: ["yellow"],
font: "simple3d",
space: false
})
} else console.log(chalk.yellow.bold("\n lets-build"))
console.log()
});
} else console.log(chalk.yellow.bold("\n lets-build"));
console.log();
}
6 changes: 3 additions & 3 deletions .electron-vue/dev-client.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const hotClient = require("webpack-hot-middleware/client?noInfo=true&reload=true")
const hotClient = require("webpack-hot-middleware/client?noInfo=true&reload=true");

hotClient.subscribe(event => {
/**
Expand Down Expand Up @@ -35,6 +35,6 @@ hotClient.subscribe(event => {
<div id="dev-client">
Compiling Main Process...
</div>
`
`;
}
})
});
Loading