Compare commits
104 Commits
Author | SHA1 | Date | |
---|---|---|---|
ace668bfc1 | |||
f2949c5f21 | |||
6ebb7cec81 | |||
c64de19815 | |||
26d4753ddf | |||
6d5b9f3553 | |||
8dd8bd0be1 | |||
0bd91c2bda | |||
6ef3e6e6f5 | |||
93709f920e | |||
75fa530f73 | |||
f5617d9d45 | |||
b46d1e19a7 | |||
c8d173807d | |||
5944c7e96f | |||
39ea160fdf | |||
91ca5e53f1 | |||
778267bb36 | |||
61407e4854 | |||
2771413723 | |||
b83752a98a | |||
48f71ed1c2 | |||
54ed2f97b8 | |||
92198a75c9 | |||
f82a34b1ea | |||
c3b68fa0fc | |||
1af7afd723 | |||
66e45154e3 | |||
dcc58a312e | |||
90f57bee1a | |||
98d1f8aea2 | |||
1f542367e6 | |||
201a5014ed | |||
6cc245ae7e | |||
1377fb6eb7 | |||
daf8c80513 | |||
46fce49356 | |||
8616613a95 | |||
352e4d8e96 | |||
c2105ce78f | |||
2864fc5507 | |||
fea523ff5c | |||
872f2354c5 | |||
ff0318534f | |||
e103074684 | |||
f72beabd90 | |||
958a625633 | |||
871fd55c5c | |||
07fd9b9fa7 | |||
62d6a8d685 | |||
047cf02e6a | |||
69127cacdd | |||
7529098a50 | |||
15c331690b | |||
29d176bafa | |||
8763926288 | |||
da16094e36 | |||
5fd2b07266 | |||
6618463e0a | |||
93af3cd0e1 | |||
854598ab25 | |||
dffc390637 | |||
ae5b6b5afd | |||
c7f87eebae | |||
63c54ff790 | |||
7670698e84 | |||
7e2481d511 | |||
9ae3acb3d8 | |||
4e12b7ee3b | |||
e07f5717c8 | |||
e0daf85e34 | |||
db27753aac | |||
5d00afcdf0 | |||
011ac2d7b4 | |||
ecede34127 | |||
08fe9e8727 | |||
80806fdca9 | |||
01499cc63a | |||
c8c9d8a407 | |||
527d1b7aa5 | |||
d35fac2278 | |||
776d5b2f23 | |||
f9a3cd4149 | |||
14492ff7a8 | |||
f0cab00277 | |||
6331887373 | |||
98d28a14c5 | |||
76eb47f245 | |||
2b9fa4e8b7 | |||
28845ec1fd | |||
6b8621588d | |||
ae0536d909 | |||
1dbfdeea3c | |||
7e75a788ab | |||
3073fc1f3c | |||
760b5557f3 | |||
1aae44a0ec | |||
53a5a3a805 | |||
c4958baf52 | |||
57f185080c | |||
adce81b084 | |||
bf77c64b78 | |||
072f4960f5 | |||
00f34eb67f |
66
.gitea/workflows/default_nottags.yaml
Normal file
66
.gitea/workflows/default_nottags.yaml
Normal file
@ -0,0 +1,66 @@
|
||||
name: Default (not tags)
|
||||
|
||||
on:
|
||||
push:
|
||||
tags-ignore:
|
||||
- '**'
|
||||
|
||||
env:
|
||||
IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@gitea.lossless.digital/${{gitea.repository}}.git
|
||||
NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}}
|
||||
NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}}
|
||||
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
|
||||
NPMCI_URL_CLOUDLY: ${{secrets.NPMCI_URL_CLOUDLY}}
|
||||
|
||||
jobs:
|
||||
security:
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: true
|
||||
container:
|
||||
image: ${{ env.IMAGE }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install pnpm and npmci
|
||||
run: |
|
||||
pnpm install -g pnpm
|
||||
pnpm install -g @shipzone/npmci
|
||||
|
||||
- name: Run npm prepare
|
||||
run: npmci npm prepare
|
||||
|
||||
- name: Audit production dependencies
|
||||
run: |
|
||||
npmci command npm config set registry https://registry.npmjs.org
|
||||
npmci command pnpm audit --audit-level=high --prod
|
||||
continue-on-error: true
|
||||
|
||||
- name: Audit development dependencies
|
||||
run: |
|
||||
npmci command npm config set registry https://registry.npmjs.org
|
||||
npmci command pnpm audit --audit-level=high --dev
|
||||
continue-on-error: true
|
||||
|
||||
test:
|
||||
if: ${{ always() }}
|
||||
needs: security
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ${{ env.IMAGE }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Test stable
|
||||
run: |
|
||||
npmci node install stable
|
||||
npmci npm install
|
||||
npmci npm test
|
||||
|
||||
- name: Test build
|
||||
run: |
|
||||
npmci node install stable
|
||||
npmci npm install
|
||||
npmci npm build
|
124
.gitea/workflows/default_tags.yaml
Normal file
124
.gitea/workflows/default_tags.yaml
Normal file
@ -0,0 +1,124 @@
|
||||
name: Default (tags)
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
env:
|
||||
IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@gitea.lossless.digital/${{gitea.repository}}.git
|
||||
NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}}
|
||||
NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}}
|
||||
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
|
||||
NPMCI_URL_CLOUDLY: ${{secrets.NPMCI_URL_CLOUDLY}}
|
||||
|
||||
jobs:
|
||||
security:
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: true
|
||||
container:
|
||||
image: ${{ env.IMAGE }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Prepare
|
||||
run: |
|
||||
pnpm install -g pnpm
|
||||
pnpm install -g @shipzone/npmci
|
||||
npmci npm prepare
|
||||
|
||||
- name: Audit production dependencies
|
||||
run: |
|
||||
npmci command npm config set registry https://registry.npmjs.org
|
||||
npmci command pnpm audit --audit-level=high --prod
|
||||
continue-on-error: true
|
||||
|
||||
- name: Audit development dependencies
|
||||
run: |
|
||||
npmci command npm config set registry https://registry.npmjs.org
|
||||
npmci command pnpm audit --audit-level=high --dev
|
||||
continue-on-error: true
|
||||
|
||||
test:
|
||||
if: ${{ always() }}
|
||||
needs: security
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ${{ env.IMAGE }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Prepare
|
||||
run: |
|
||||
pnpm install -g pnpm
|
||||
pnpm install -g @shipzone/npmci
|
||||
npmci npm prepare
|
||||
|
||||
- name: Test stable
|
||||
run: |
|
||||
npmci node install stable
|
||||
npmci npm install
|
||||
npmci npm test
|
||||
|
||||
- name: Test build
|
||||
run: |
|
||||
npmci node install stable
|
||||
npmci npm install
|
||||
npmci npm build
|
||||
|
||||
release:
|
||||
needs: test
|
||||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ${{ env.IMAGE }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Prepare
|
||||
run: |
|
||||
pnpm install -g pnpm
|
||||
pnpm install -g @shipzone/npmci
|
||||
npmci npm prepare
|
||||
|
||||
- name: Release
|
||||
run: |
|
||||
npmci node install stable
|
||||
npmci npm publish
|
||||
|
||||
metadata:
|
||||
needs: test
|
||||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ${{ env.IMAGE }}
|
||||
continue-on-error: true
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Prepare
|
||||
run: |
|
||||
pnpm install -g pnpm
|
||||
pnpm install -g @shipzone/npmci
|
||||
npmci npm prepare
|
||||
|
||||
- name: Code quality
|
||||
run: |
|
||||
npmci command npm install -g typescript
|
||||
npmci npm install
|
||||
|
||||
- name: Trigger
|
||||
run: npmci trigger
|
||||
|
||||
- name: Build docs and upload artifacts
|
||||
run: |
|
||||
npmci node install stable
|
||||
npmci npm install
|
||||
pnpm install -g @git.zone/tsdoc
|
||||
npmci command tsdoc
|
||||
continue-on-error: true
|
27
.gitignore
vendored
27
.gitignore
vendored
@ -1,13 +1,20 @@
|
||||
node_modules/
|
||||
.settings/
|
||||
.idea/
|
||||
test/temp/
|
||||
.nogit/
|
||||
|
||||
# artifacts
|
||||
coverage/
|
||||
docs/
|
||||
public/
|
||||
pages/
|
||||
|
||||
#npm devug
|
||||
npm-debug.log
|
||||
# installs
|
||||
node_modules/
|
||||
|
||||
ts/*.js
|
||||
ts/*.js.map
|
||||
ts/typings/
|
||||
# caches
|
||||
.yarn/
|
||||
.cache/
|
||||
.rpt2_cache
|
||||
|
||||
# builds
|
||||
dist/
|
||||
dist_*/
|
||||
|
||||
# custom
|
15
.travis.yml
15
.travis.yml
@ -1,15 +0,0 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- 4
|
||||
- stable
|
||||
deploy:
|
||||
provider: npm
|
||||
email: npm@lossless.digital
|
||||
api_key:
|
||||
secure: o/3H4keWRAvHZaJnUN9UX+hqu+prKGtBsOEWVIaRXUpf6nIHIDm9zlJrS5cv2VUseOZqLAOkzeGYPqlOJlxccy5frKEYMhtCY97BjKvUOf01roL82OGiahw5Bv04NcaBoSepCliyyXihlgZO/5tSoR1seY4ycul2qWLktaEmh8HcTPjem8gB49Svpfk8yPKLpq6cv/sSakt2X24Cq+vfdxYiz7GcgBfv3EVAndUmQ9KMQfkSbq8XgYEZKrLi5kdpXX0y1LRdsbn2rwuMwLOmefCenmQSuBCbYmbOxPgVHHHjVm9To/rhx8YHBCcZSH9go2pdDLwrd7VPOCK+vMHCz/rlASwVM/BGr+aJHCFLAyovrIU7cvbbjLPOUjto6xY2XckMmDBD1YDxYnAJAON1QrdXE9hVVRfMNfaC2leFAwhla1WMok5DcEv+/Q9cUXQCBGQHtBhkhmCCt54ERLFnjXCDZr1icR/0lhtQY54hin5jSHqnU2hTZtTpQX7sF0yZM2sbhTBpV5FTDAGH/ohNWSEnTwAXmL9iwZCTvtWUbBeOUSDRj8BLS54uiaIcIVytNY0p2PdnhwJAWO+4FGjSOT+RuK8RiKzyVXjPiX8TCzaOqBFs947m8SSNMSt6zyqOI27gOSzU7szgsKY769Fl+X9sdzFXaSa72rj4EdvgiBA=
|
||||
on:
|
||||
tags: true
|
||||
repo: pushrocks/smartgit
|
||||
notifications:
|
||||
slack:
|
||||
secure: f5Uss0z9RPl/QcA/DroB8loyE93aOYI6bqCkrsiUscmZtlv/TVQtT4dxqGA6uvcG6iTQDBi3Ul88dQxWkRm4IqbhY35/iMaV2dHW4FVYMAh8GQMbsfL2sALCcufxD9blw47awv3iFcwhV1EeyesscjgL0JIjduk96v/7G/6QIO2838M1lzlgtj+kRUkim8qkaEs1je3gRrhMUIjLuAdscMXyUKYFMjWo9ACSjVUl30R/ZNemb18itIja6i92GotreBgcfEMczvy58ovDC7xdJUsY8LjMI01DwY+WPRnI0tAhsuI8moBwwcdM4e3bAjKjucQRjO33O5bMWRZ6QCiYd0DnCEFyCPQLJ4GSy/tkD00n8ijLHAOSV3AH1zNbdK1EAdSPQXDvlI36KJn/2hyQLoitGHVUPr76ujJWP82ypO2tgIp3XQU0dJVCxDuHnwJO2+hjdI+gCPqxNTpjeujHx3UdkTGNRjuuf9dlZ/D08fApjYxy2fxItTqo3QjP/nrqvBXUOPP8yPHpjIT4H2t5Pr4SJjBGI6X4qhKyFj6s9rA/Xu1rL+45zu1C3uC3z+u3T9UwrbzJ/cZM6r6UQvQmUvIfBNaMlg4I/diQCDIPL+Rhop2nylY3IcHmJnk2itn7kOqj1tohCpFEml5pRuSZy4udWywkdtyBAsHWFLF7oiQ=
|
11
.vscode/launch.json
vendored
Normal file
11
.vscode/launch.json
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"command": "npm test",
|
||||
"name": "Run npm test",
|
||||
"request": "launch",
|
||||
"type": "node-terminal"
|
||||
}
|
||||
]
|
||||
}
|
26
.vscode/settings.json
vendored
Normal file
26
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
{
|
||||
"json.schemas": [
|
||||
{
|
||||
"fileMatch": ["/npmextra.json"],
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"npmci": {
|
||||
"type": "object",
|
||||
"description": "settings for npmci"
|
||||
},
|
||||
"gitzone": {
|
||||
"type": "object",
|
||||
"description": "settings for gitzone",
|
||||
"properties": {
|
||||
"projectType": {
|
||||
"type": "string",
|
||||
"enum": ["website", "element", "service", "npm", "wcc"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
2
LICENSE
2
LICENSE
@ -1,6 +1,6 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015 Push.Rocks
|
||||
Copyright (c) 2015 Lossless GmbH
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
15
README.md
15
README.md
@ -1,15 +0,0 @@
|
||||
# smartgit is an easy wrapper for nodegit
|
||||
an easy wrapper for nodegit
|
||||
|
||||
### Buildstatus/Dependencies
|
||||
[](https://travis-ci.org/pushrocks/smartgit)
|
||||
[](https://david-dm.org/pushrocks/smartgit#info=devDependencies)
|
||||
|
||||
### Usage
|
||||
This npm package comes with everything you need to start your own gulp plugin.
|
||||
|
||||
Features:
|
||||
|
||||
* easily cone a git repo
|
||||
* easily create a new git repo
|
||||
* easily add all changes and make a new commit
|
14
dist/index.js
vendored
14
dist/index.js
vendored
@ -1,14 +0,0 @@
|
||||
/// <reference path="./typings/main.d.ts" />
|
||||
"use strict";
|
||||
var SmartgitCheck = require("./smartgit.check");
|
||||
var SmartgitClone = require("./smartgit.clone");
|
||||
var SmartgitCommit = require("./smartgit.commit");
|
||||
var SmartgitInit = require("./smartgit.init");
|
||||
var smartgit = {};
|
||||
smartgit.clone = SmartgitClone;
|
||||
smartgit.commit = SmartgitCommit;
|
||||
smartgit.check = SmartgitCheck;
|
||||
smartgit.init = SmartgitInit;
|
||||
module.exports = smartgit;
|
||||
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLDRDQUE0Qzs7QUFHNUMsSUFBTyxhQUFhLFdBQVcsa0JBQWtCLENBQUMsQ0FBQztBQUNuRCxJQUFPLGFBQWEsV0FBVyxrQkFBa0IsQ0FBQyxDQUFDO0FBQ25ELElBQU8sY0FBYyxXQUFXLG1CQUFtQixDQUFDLENBQUM7QUFDckQsSUFBTyxZQUFZLFdBQVcsaUJBQWlCLENBQUMsQ0FBQztBQUVqRCxJQUFJLFFBQVEsR0FBTyxFQUFFLENBQUM7QUFDdEIsUUFBUSxDQUFDLEtBQUssR0FBRyxhQUFhLENBQUM7QUFDL0IsUUFBUSxDQUFDLE1BQU0sR0FBRyxjQUFjLENBQUM7QUFDakMsUUFBUSxDQUFDLEtBQUssR0FBRyxhQUFhLENBQUM7QUFDL0IsUUFBUSxDQUFDLElBQUksR0FBRyxZQUFZLENBQUM7QUFHN0IsTUFBTSxDQUFDLE9BQU8sR0FBRyxRQUFRLENBQUMiLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLy8gPHJlZmVyZW5jZSBwYXRoPVwiLi90eXBpbmdzL21haW4uZC50c1wiIC8+XG5cbmltcG9ydCBwbHVnaW5zID0gcmVxdWlyZShcIi4vc21hcnRnaXQucGx1Z2luc1wiKTtcbmltcG9ydCBTbWFydGdpdENoZWNrID0gcmVxdWlyZShcIi4vc21hcnRnaXQuY2hlY2tcIik7XG5pbXBvcnQgU21hcnRnaXRDbG9uZSA9IHJlcXVpcmUoXCIuL3NtYXJ0Z2l0LmNsb25lXCIpO1xuaW1wb3J0IFNtYXJ0Z2l0Q29tbWl0ID0gcmVxdWlyZShcIi4vc21hcnRnaXQuY29tbWl0XCIpO1xuaW1wb3J0IFNtYXJ0Z2l0SW5pdCA9IHJlcXVpcmUoXCIuL3NtYXJ0Z2l0LmluaXRcIik7XG5cbnZhciBzbWFydGdpdDphbnkgPSB7fTtcbnNtYXJ0Z2l0LmNsb25lID0gU21hcnRnaXRDbG9uZTtcbnNtYXJ0Z2l0LmNvbW1pdCA9IFNtYXJ0Z2l0Q29tbWl0O1xuc21hcnRnaXQuY2hlY2sgPSBTbWFydGdpdENoZWNrO1xuc21hcnRnaXQuaW5pdCA9IFNtYXJ0Z2l0SW5pdDtcblxuXG5tb2R1bGUuZXhwb3J0cyA9IHNtYXJ0Z2l0O1xuIl0sInNvdXJjZVJvb3QiOiIvc291cmNlLyJ9
|
3
dist/smartgit.add.js
vendored
3
dist/smartgit.add.js
vendored
@ -1,3 +0,0 @@
|
||||
|
||||
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzbWFydGdpdC5hZGQuanMiLCJzb3VyY2VzQ29udGVudCI6W10sInNvdXJjZVJvb3QiOiIvc291cmNlLyJ9
|
6
dist/smartgit.check.js
vendored
6
dist/smartgit.check.js
vendored
@ -1,6 +0,0 @@
|
||||
"use strict";
|
||||
module.exports = function (repoArg) {
|
||||
return true;
|
||||
};
|
||||
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNtYXJ0Z2l0LmNoZWNrLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFFQSxpQkFBUyxVQUFTLE9BQU87SUFDckIsTUFBTSxDQUFDLElBQUksQ0FBQztBQUNoQixDQUFDLENBQUMiLCJmaWxlIjoic21hcnRnaXQuY2hlY2suanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLy8gPHJlZmVyZW5jZSBwYXRoPVwiLi90eXBpbmdzL21haW4uZC50c1wiIC8+XG5pbXBvcnQgcGx1Z2lucyA9IHJlcXVpcmUoXCIuL3NtYXJ0Z2l0LnBsdWdpbnNcIik7XG5leHBvcnQgPSBmdW5jdGlvbihyZXBvQXJnKSB7XG4gICAgcmV0dXJuIHRydWU7XG59OyJdLCJzb3VyY2VSb290IjoiL3NvdXJjZS8ifQ==
|
25
dist/smartgit.clone.js
vendored
25
dist/smartgit.clone.js
vendored
@ -1,25 +0,0 @@
|
||||
"use strict";
|
||||
/// <reference path="./typings/main.d.ts" />
|
||||
var plugins = require("./smartgit.plugins");
|
||||
var SmartgitCheck = require("./smartgit.check");
|
||||
module.exports = function (options) {
|
||||
var done = plugins.Q.defer();
|
||||
/***** URL Checks ******/
|
||||
if (options.from == "undefined" || options.to == "undefined") {
|
||||
plugins.beautylog.error("smartgit.clone".blue + " : Something is strange about the way you invoked the function");
|
||||
return;
|
||||
}
|
||||
/***** Path Checks ******/
|
||||
if (!/^\/.*/.test(options.to)) {
|
||||
plugins.beautylog.error("It seems that the given path " + options.to + " is not absolute.");
|
||||
return;
|
||||
}
|
||||
plugins.beautylog.log("Now cloning " + options.from);
|
||||
var cloneOptions = {};
|
||||
var cloneRepository = plugins.nodegit.Clone(options.from, options.to, cloneOptions);
|
||||
SmartgitCheck(cloneRepository);
|
||||
done.resolve();
|
||||
return done.promise;
|
||||
};
|
||||
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNtYXJ0Z2l0LmNsb25lLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSw0Q0FBNEM7QUFDNUMsSUFBTyxPQUFPLFdBQVcsb0JBQW9CLENBQUMsQ0FBQztBQUMvQyxJQUFPLGFBQWEsV0FBVyxrQkFBa0IsQ0FBQyxDQUFDO0FBRW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9uaW5nIFwiICsgb3B0aW9ucy5mcm9tKTtcbiAgICB2YXIgY2xvbmVPcHRpb25zOmFueSA9IHt9O1xuICAgIHZhciBjbG9uZVJlcG9zaXRvcnkgPSBwbHVnaW5zLm5vZGVnaXQuQ2xvbmUob3B0aW9ucy5mcm9tLCBvcHRpb25zLnRvLCBjbG9uZU9wdGlvbnMpO1xuICAgIFNtYXJ0Z2l0Q2hlY2soY2xvbmVSZXBvc2l0b3J5KTtcbiAgICBkb25lLnJlc29sdmUoKTtcbiAgICByZXR1cm4gZG9uZS5wcm9taXNlO1xufTsiXSwic291cmNlUm9vdCI6Ii9zb3VyY2UvIn0=
|
10
dist/smartgit.commit.js
vendored
10
dist/smartgit.commit.js
vendored
@ -1,10 +0,0 @@
|
||||
"use strict";
|
||||
/// <reference path="./typings/main.d.ts" />
|
||||
var plugins = require("./smartgit.plugins");
|
||||
module.exports = function (pathArg, commitMessage) {
|
||||
var result = plugins.nodegit.index.addByPath(pathArg);
|
||||
if (result == 0) {
|
||||
}
|
||||
};
|
||||
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNtYXJ0Z2l0LmNvbW1pdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsNENBQTRDO0FBQzVDLElBQU8sT0FBTyxXQUFXLG9CQUFvQixDQUFDLENBQUM7QUFFL0MsaUJBQVMsVUFBUyxPQUFjLEVBQUMsYUFBb0I7SUFDakQsSUFBSSxNQUFNLEdBQUcsT0FBTyxDQUFDLE9BQU8sQ0FBQyxLQUFLLENBQUMsU0FBUyxDQUFDLE9BQU8sQ0FBQyxDQUFDO0lBQ3RELEVBQUUsQ0FBQyxDQUFDLE1BQU0sSUFBSSxDQUFDLENBQUMsQ0FBQyxDQUFDO0lBRWxCLENBQUM7QUFDTCxDQUFDLENBQUMiLCJmaWxlIjoic21hcnRnaXQuY29tbWl0LmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8vIDxyZWZlcmVuY2UgcGF0aD1cIi4vdHlwaW5ncy9tYWluLmQudHNcIiAvPlxuaW1wb3J0IHBsdWdpbnMgPSByZXF1aXJlKFwiLi9zbWFydGdpdC5wbHVnaW5zXCIpO1xuXG5leHBvcnQgPSBmdW5jdGlvbihwYXRoQXJnOnN0cmluZyxjb21taXRNZXNzYWdlOnN0cmluZykge1xuICAgIHZhciByZXN1bHQgPSBwbHVnaW5zLm5vZGVnaXQuaW5kZXguYWRkQnlQYXRoKHBhdGhBcmcpO1xuICAgIGlmIChyZXN1bHQgPT0gMCkge1xuICAgICAgICBcbiAgICB9XG59OyJdLCJzb3VyY2VSb290IjoiL3NvdXJjZS8ifQ==
|
17
dist/smartgit.init.js
vendored
17
dist/smartgit.init.js
vendored
@ -1,17 +0,0 @@
|
||||
"use strict";
|
||||
/// <reference path="./typings/main.d.ts" />
|
||||
var plugins = require("./smartgit.plugins");
|
||||
module.exports = function () {
|
||||
var gitinit = function (dest) {
|
||||
if (dest === void 0) { dest = "undefined"; }
|
||||
if (dest == "undefined") {
|
||||
return; // ...and return function here if not
|
||||
}
|
||||
var isBare = 0; //lets create a subfolder
|
||||
plugins.nodegit.Repository.init(dest, isBare).then(function (repo) {
|
||||
// do something with repo here.
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNtYXJ0Z2l0LmluaXQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLDRDQUE0QztBQUM1QyxJQUFPLE9BQU8sV0FBVyxvQkFBb0IsQ0FBQyxDQUFDO0FBRS9DLGlCQUFTO0lBQ0wsSUFBSSxPQUFPLEdBQUcsVUFBUyxJQUF5QjtRQUF6QixvQkFBeUIsR0FBekIsa0JBQXlCO1FBQzVDLEVBQUUsQ0FBQyxDQUFDLElBQUksSUFBSSxXQUFXLENBQUMsQ0FBQyxDQUFDO1lBQ3RCLE1BQ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NvdXJjZVJvb3QiOiIvc291cmNlLyJ9
|
3
dist/smartgit.interfaces.js
vendored
3
dist/smartgit.interfaces.js
vendored
@ -1,3 +0,0 @@
|
||||
|
||||
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzbWFydGdpdC5pbnRlcmZhY2VzLmpzIiwic291cmNlc0NvbnRlbnQiOltdLCJzb3VyY2VSb290IjoiL3NvdXJjZS8ifQ==
|
8
dist/smartgit.plugins.js
vendored
8
dist/smartgit.plugins.js
vendored
@ -1,8 +0,0 @@
|
||||
/// <reference path="./typings/main.d.ts" />
|
||||
"use strict";
|
||||
exports.path = require("path");
|
||||
exports.beautylog = require("beautylog");
|
||||
exports.nodegit = require("nodegit");
|
||||
exports.Q = require("q");
|
||||
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNtYXJ0Z2l0LnBsdWdpbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsNENBQTRDOztBQUVqQyxZQUFJLEdBQUcsT0FBTyxDQUFDLE1BQU0sQ0FBQyxDQUFDO0FBQ3ZCLGlCQUFTLEdBQUcsT0FBTyxDQUFDLFdBQVcsQ0FBQyxDQUFDO0FBQ2pDLGVBQU8sR0FBRyxPQUFPLENBQUMsU0FBUyxDQUFDLENBQUM7QUFDN0IsU0FBQyxHQUFHLE9BQU8sQ0FBQyxHQUFHLENBQUMsQ0FBQyIsImZpbGUiOiJzbWFydGdpdC5wbHVnaW5zLmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8vIDxyZWZlcmVuY2UgcGF0aD1cIi4vdHlwaW5ncy9tYWluLmQudHNcIiAvPlxuXG5leHBvcnQgbGV0IHBhdGggPSByZXF1aXJlKFwicGF0aFwiKTtcbmV4cG9ydCBsZXQgYmVhdXR5bG9nID0gcmVxdWlyZShcImJlYXV0eWxvZ1wiKTtcbmV4cG9ydCBsZXQgbm9kZWdpdCA9IHJlcXVpcmUoXCJub2RlZ2l0XCIpO1xuZXhwb3J0IGxldCBRID0gcmVxdWlyZShcInFcIik7XG5cblxuIl0sInNvdXJjZVJvb3QiOiIvc291cmNlLyJ9
|
90
index.js
90
index.js
@ -1,90 +0,0 @@
|
||||
/// <reference path="./index.ts" />
|
||||
var SmartgitPlugins;
|
||||
(function (SmartgitPlugins) {
|
||||
SmartgitPlugins.init = function () {
|
||||
var plugins = {
|
||||
path: require("path"),
|
||||
beautylog: require("beautylog"),
|
||||
nodegit: require("nodegit"),
|
||||
Q: require("q")
|
||||
};
|
||||
return plugins;
|
||||
};
|
||||
})(SmartgitPlugins || (SmartgitPlugins = {}));
|
||||
/// <reference path="./index.ts" />
|
||||
var SmartgitClone;
|
||||
(function (SmartgitClone) {
|
||||
function init() {
|
||||
var clone = function (options) {
|
||||
/***** URL Checks ******/
|
||||
if (options.from == "undefined" || options.to == "undefined") {
|
||||
plugins.beautylog.error("smartgit.clone".blue + " : Something is strange about the way you invoked the function");
|
||||
return;
|
||||
}
|
||||
/***** Path Checks ******/
|
||||
if (!/^\/.*/.test(options.to)) {
|
||||
plugins.beautylog.error("It seems that the given path " + options.to + " is not absolute.");
|
||||
return;
|
||||
}
|
||||
plugins.beautylog.log("Now cloning " + options.from);
|
||||
var cloneOptions = {};
|
||||
var cloneRepository = plugins.nodegit.Clone(options.from, options.to, cloneOptions);
|
||||
smartgit.check(cloneRepository);
|
||||
};
|
||||
return clone;
|
||||
}
|
||||
SmartgitClone.init = init;
|
||||
})(SmartgitClone || (SmartgitClone = {}));
|
||||
/// <reference path="./index.ts" />
|
||||
var SmartgitInit;
|
||||
(function (SmartgitInit) {
|
||||
SmartgitInit.init = function () {
|
||||
var gitinit = function (dest) {
|
||||
if (dest === void 0) { dest = "undefined"; }
|
||||
if (dest == "undefined") {
|
||||
return; // ...and return function here if not
|
||||
}
|
||||
var isBare = 0; //lets create a subfolder
|
||||
plugins.nodegit.Repository.init(dest, isBare).then(function (repo) {
|
||||
// do something with repo here.
|
||||
});
|
||||
};
|
||||
return gitinit;
|
||||
};
|
||||
})(SmartgitInit || (SmartgitInit = {}));
|
||||
/// <reference path="./index.ts" />
|
||||
var SmartgitCommit;
|
||||
(function (SmartgitCommit) {
|
||||
SmartgitCommit.init = function () {
|
||||
var commit = function (pathArg, commitMessage) {
|
||||
var result = plugins.nodegit.index.addByPath(pathArg);
|
||||
if (result == 0) {
|
||||
}
|
||||
};
|
||||
return commit;
|
||||
};
|
||||
})(SmartgitCommit || (SmartgitCommit = {}));
|
||||
/// <reference path="./index.ts" />
|
||||
var SmartgitCheck;
|
||||
(function (SmartgitCheck) {
|
||||
SmartgitCheck.init = function () {
|
||||
var check = function () {
|
||||
return true;
|
||||
};
|
||||
return check;
|
||||
};
|
||||
})(SmartgitCheck || (SmartgitCheck = {}));
|
||||
/// <reference path="typings/tsd.d.ts" />
|
||||
/// <reference path="smartgit.plugins.ts" />
|
||||
/// <reference path="smartgit.clone.ts" />
|
||||
/// <reference path="smartgit.init.ts" />
|
||||
/// <reference path="smartgit.commit.ts" />
|
||||
/// <reference path="smartgit.check.ts" />
|
||||
var plugins = SmartgitPlugins.init();
|
||||
//Build the smartgit object
|
||||
var smartgit = {};
|
||||
smartgit.clone = SmartgitClone.init();
|
||||
smartgit.commit = SmartgitCommit.init();
|
||||
smartgit.check = SmartgitCheck.init();
|
||||
smartgit.init = SmartgitInit.init();
|
||||
module.exports = smartgit;
|
17
npmextra.json
Normal file
17
npmextra.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"npmci": {
|
||||
"npmGlobalTools": [],
|
||||
"npmAccessLevel": "public"
|
||||
},
|
||||
"gitzone": {
|
||||
"projectType": "npm",
|
||||
"module": {
|
||||
"githost": "gitlab.com",
|
||||
"gitscope": "push.rocks",
|
||||
"gitrepo": "smartgit",
|
||||
"description": "smart wrapper for nodegit",
|
||||
"npmPackagename": "@push.rocks/smartgit",
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
||||
}
|
55
package.json
55
package.json
@ -1,14 +1,18 @@
|
||||
{
|
||||
"name": "smartgit",
|
||||
"version": "0.0.8",
|
||||
"description": "an easy wrapper for nodegit",
|
||||
"main": "dist/index.js",
|
||||
"name": "@push.rocks/smartgit",
|
||||
"version": "3.0.2",
|
||||
"description": "smart wrapper for nodegit",
|
||||
"main": "dist_ts/index.js",
|
||||
"typings": "dist_ts/index.d.ts",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"test": "(npmts)"
|
||||
"test": "(tstest test/)",
|
||||
"build": "(tsbuild --web --allowimplicitany)",
|
||||
"buildDocs": "tsdoc"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/pushrocks/smartgit.git"
|
||||
"url": "https://gitlab.com/pushrocks/smartgit.git"
|
||||
},
|
||||
"keywords": [
|
||||
"json",
|
||||
@ -18,16 +22,39 @@
|
||||
"author": "Smart Coordination GmbH <office@push.rocks> (https://push.rocks)",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/pushrocks/smartgit/issues"
|
||||
"url": "https://gitlab.com/pushrocks/smartgit/issues"
|
||||
},
|
||||
"homepage": "https://github.com/pushrocks/smartgit",
|
||||
"homepage": "https://gitlab.com/pushrocks/smartgit",
|
||||
"dependencies": {
|
||||
"beautylog": "3.1.2",
|
||||
"nodegit": "0.12.1",
|
||||
"q": "1.4.1"
|
||||
"@push.rocks/smartenv": "^5.0.12",
|
||||
"@push.rocks/smartfile": "^11.0.0",
|
||||
"@push.rocks/smartpath": "^5.0.5",
|
||||
"@push.rocks/smartpromise": "^4.0.2",
|
||||
"@push.rocks/smartshell": "^3.0.3",
|
||||
"@push.rocks/smartstring": "^4.0.9",
|
||||
"@types/minimatch": "^5.1.2",
|
||||
"isomorphic-git": "^1.25.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"npmts": "3.6.10",
|
||||
"should": "^8.3.0"
|
||||
}
|
||||
"@git.zone/tsbuild": "^2.1.66",
|
||||
"@git.zone/tsrun": "^1.2.44",
|
||||
"@git.zone/tstest": "^1.0.77",
|
||||
"@push.rocks/tapbundle": "^5.0.15"
|
||||
},
|
||||
"private": false,
|
||||
"files": [
|
||||
"ts/**/*",
|
||||
"ts_web/**/*",
|
||||
"dist/**/*",
|
||||
"dist_*/**/*",
|
||||
"dist_ts/**/*",
|
||||
"dist_ts_web/**/*",
|
||||
"assets/**/*",
|
||||
"cli.js",
|
||||
"npmextra.json",
|
||||
"readme.md"
|
||||
],
|
||||
"browserslist": [
|
||||
"last 1 chrome versions"
|
||||
]
|
||||
}
|
||||
|
5676
pnpm-lock.yaml
generated
Normal file
5676
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
85
readme.md
Normal file
85
readme.md
Normal file
@ -0,0 +1,85 @@
|
||||
# @push.rocks/smartgit
|
||||
smart wrapper for nodegit
|
||||
|
||||
## Availabililty and Links
|
||||
* [npmjs.org (npm package)](https://www.npmjs.com/package/@push.rocks/smartgit)
|
||||
* [gitlab.com (source)](https://gitlab.com/push.rocks/smartgit)
|
||||
* [github.com (source mirror)](https://github.com/push.rocks/smartgit)
|
||||
* [docs (typedoc)](https://push.rocks.gitlab.io/smartgit/)
|
||||
|
||||
## Status for master
|
||||
|
||||
Status Category | Status Badge
|
||||
-- | --
|
||||
GitLab Pipelines | [](https://lossless.cloud)
|
||||
GitLab Pipline Test Coverage | [](https://lossless.cloud)
|
||||
npm | [](https://lossless.cloud)
|
||||
Snyk | [](https://lossless.cloud)
|
||||
TypeScript Support | [](https://lossless.cloud)
|
||||
node Support | [](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||
Code Style | [](https://lossless.cloud)
|
||||
PackagePhobia (total standalone install weight) | [](https://lossless.cloud)
|
||||
PackagePhobia (package size on registry) | [](https://lossless.cloud)
|
||||
BundlePhobia (total size when bundled) | [](https://lossless.cloud)
|
||||
|
||||
## Usage
|
||||
|
||||
We recommend the use of TypeScript for best in class intellisense
|
||||
|
||||
```javascript
|
||||
// import smartgit:
|
||||
import { GitRepo } from 'smartgit';
|
||||
|
||||
// Initialize smartgit:
|
||||
// -- note: there are 3 ways to initialize smartgit
|
||||
// -- -- 1. with a existing Git repo
|
||||
// -- -- 2. with a cloned Git repo
|
||||
// -- -- 3. with a new Git repo
|
||||
|
||||
// -- 1. existing Git Repo:
|
||||
let myExistingGitRepo = new GitRepo('/path/to/existing/git/repo/');
|
||||
|
||||
// -- 2. cloned Git Repo:
|
||||
let myClonedGitRepo: GitRepo;
|
||||
smartgit.createRepoFromClone('git@github.com:username/reponame.git').then((gitRepo) => {
|
||||
// non blocking
|
||||
myClonedGitRepo = gitRepo;
|
||||
});
|
||||
|
||||
// -- 3. new Git Repo
|
||||
let myNewGitRepo: GitRepo;
|
||||
smartgit
|
||||
.createRepoFromInit('/path/to/new/folder') // smartgit will create any new folder, be careful
|
||||
.then((gitRepo) => {
|
||||
// non blocking
|
||||
myNewGitRepo = gitRepo;
|
||||
});
|
||||
|
||||
// Using smartgit instance
|
||||
// -- most used actions
|
||||
// -- all actions return promises, so make sure to use promise chaining for any dependent tasks
|
||||
myExistingGitRepo.addAll(); // returns promise, stages all changed files
|
||||
myExistingGitRepo.add(['relative/path/to/file.txt', 'another/file2.txt']); // returns promise, stages specific files
|
||||
myExistingGitRepo.commit('my commit message'); // returns promise, commits staged files
|
||||
myExistingGitRepo
|
||||
.status() // returns promise
|
||||
.then((status) => {
|
||||
// Use TypeScript for status type information
|
||||
});
|
||||
myExistingGitRepo.check(); // returns promise, checks repo health
|
||||
myExistingGitRepo.remoteAdd('git@github.com:username/reponame.git');
|
||||
```
|
||||
|
||||
Tip: use [smartssh](https://npmjs.com/smartssh) to setup your SSH environment
|
||||
|
||||
[](https://push.rocks)
|
||||
|
||||
## Contribution
|
||||
|
||||
We are always happy for code contributions. If you are not the code contributing type that is ok. Still, maintaining Open Source repositories takes considerable time and thought. If you like the quality of what we do and our modules are useful to you we would appreciate a little monthly contribution: You can [contribute one time](https://lossless.link/contribute-onetime) or [contribute monthly](https://lossless.link/contribute). :)
|
||||
|
||||
For further information read the linked docs at the top of this readme.
|
||||
|
||||
## Legal
|
||||
> MIT licensed | **©** [Task Venture Capital GmbH](https://task.vc)
|
||||
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
|
9
test.js
9
test.js
@ -1,9 +0,0 @@
|
||||
/// <reference path="typings/tsd.d.ts" />
|
||||
var smartgit = require("./index.js");
|
||||
var beautylog = require("beautylog");
|
||||
var path = require("path");
|
||||
smartgit.clone({
|
||||
from: "https://github.com/pushrocks/docs.git",
|
||||
to: path.resolve("./test/temp/")
|
||||
});
|
||||
beautylog.success("Test successfull");
|
26
test/test.js
26
test/test.js
@ -1,26 +0,0 @@
|
||||
/// <reference path="../ts/typings/main.d.ts" />
|
||||
var smartgit = require("../dist/index.js");
|
||||
var beautylog = require("beautylog");
|
||||
var path = require("path");
|
||||
var should = require("should");
|
||||
describe("smartgit", function () {
|
||||
describe(".clone", function () {
|
||||
it("should clone a repository", function (done) {
|
||||
this.timeout(10000);
|
||||
smartgit.clone({
|
||||
from: "https://github.com/pushrocks/docs.git",
|
||||
to: path.resolve("./test/temp/")
|
||||
}).then(function () {
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
describe(".check", function () {
|
||||
});
|
||||
describe("commit", function () {
|
||||
});
|
||||
describe("init", function () {
|
||||
});
|
||||
});
|
||||
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsZ0RBQWdEO0FBQ2hELElBQUksUUFBUSxHQUFHLE9BQU8sQ0FBQyxrQkFBa0IsQ0FBQyxDQUFDO0FBQzNDLElBQUksU0FBUyxHQUFHLE9BQU8sQ0FBQyxXQUFXLENBQUMsQ0FBQztBQUNyQyxJQUFJL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SByZXF1aXJlKFwic2hvdWxkXCIpO1xuXG5kZXNjcmliZShcInNtYXJ0Z2l0XCIsZnVuY3Rpb24oKXtcbiAgICBkZXNjcmliZShcIi5jbG9uZVwiLGZ1bmN0aW9uKCl7XG4gICAgICAgIGl0KFwic2hvdWxkIGNsb25lIGEgcmVwb3NpdG9yeVwiLGZ1bmN0aW9uKGRvbmUpe1xuICAgICAgICAgICAgdGhpcy50aW1lb3V0KDEwMDAwKTtcbiAgICAgICAgICAgIHNtYXJ0Z2l0LmNsb25lKHtcbiAgICAgICAgICAgICAgICBmcm9tOlwiaHR0cHM6Ly9naXRodWIuY29tL3B1c2hyb2Nrcy9kb2NzLmdpdFwiLFxuICAgICAgICAgICAgICAgIHRvOnBhdGgucmVzb2x2ZShcIi4vdGVzdC90ZW1wL1wiKVxuICAgICAgICAgICAgfSkudGhlbihmdW5jdGlvbigpe1xuICAgICAgICAgICAgICAgIGRvbmUoKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9KTtcbiAgICB9KTtcbiAgICBkZXNjcmliZShcIi5jaGVja1wiLGZ1bmN0aW9uKCl7XG5cbiAgICB9KTtcbiAgICBkZXNjcmliZShcImNvbW1pdFwiLGZ1bmN0aW9uKCl7XG5cbiAgICB9KTtcbiAgICBkZXNjcmliZShcImluaXRcIixmdW5jdGlvbigpe1xuXG4gICAgfSk7XG59KTsiXSwic291cmNlUm9vdCI6Ii9zb3VyY2UvIn0=
|
@ -1 +0,0 @@
|
||||
{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,IAAI,QAAQ,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAC3C,IAAI,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AACrC,IAAI,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AAC3B,IAAI,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAE/B,QAAQ,CAAC,UAAU,EAAC;IAChB,QAAQ,CAAC,QAAQ,EAAC;QACd,EAAE,CAAC,2BAA2B,EAAC,UAAS,IAAI;YACxC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YACpB,QAAQ,CAAC,KAAK,CAAC;gBACX,IAAI,EAAC,uCAAuC;gBAC5C,EAAE,EAAC,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC;aAClC,CAAC,CAAC,IAAI,CAAC;gBACJ,IAAI,EAAE,CAAC;YACX,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IACH,QAAQ,CAAC,QAAQ,EAAC;IAElB,CAAC,CAAC,CAAC;IACH,QAAQ,CAAC,QAAQ,EAAC;IAElB,CAAC,CAAC,CAAC;IACH,QAAQ,CAAC,MAAM,EAAC;IAEhB,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
49
test/test.ts
49
test/test.ts
@ -1,28 +1,29 @@
|
||||
/// <reference path="../ts/typings/main.d.ts" />
|
||||
let smartgit = require("../dist/index.js");
|
||||
let beautylog = require("beautylog");
|
||||
let path = require("path");
|
||||
let should = require("should");
|
||||
import { tap, expect } from '@push.rocks/tapbundle';
|
||||
import * as smartgit from '../ts/index.js';
|
||||
|
||||
describe("smartgit",function(){
|
||||
describe(".clone",function(){
|
||||
it("should clone a repository",function(done){
|
||||
this.timeout(10000);
|
||||
smartgit.clone({
|
||||
from:"https://github.com/pushrocks/docs.git",
|
||||
to:path.resolve("./test/temp/")
|
||||
}).then(function(){
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
describe(".check",function(){
|
||||
import * as smartpath from '@push.rocks/smartpath';
|
||||
const __dirname = smartpath.get.dirnameFromImportMetaUrl(import.meta.url);
|
||||
import * as path from 'path';
|
||||
|
||||
});
|
||||
describe("commit",function(){
|
||||
let testSmartgitInstance: smartgit.Smartgit;
|
||||
const testRepoDir = path.join(__dirname, '../.nogit/testrepo');
|
||||
const testRepoDirSmartfile = path.join(__dirname, '../.nogit/pushrocks_smartfile');
|
||||
|
||||
});
|
||||
describe("init",function(){
|
||||
tap.test('should create a valid smartgit instance', async () => {
|
||||
testSmartgitInstance = new smartgit.Smartgit();
|
||||
await testSmartgitInstance.init();
|
||||
expect(testSmartgitInstance).toBeInstanceOf(smartgit.Smartgit);
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
tap.test('should create a new repo at .nogit', async () => {
|
||||
const gitRepo = await testSmartgitInstance.createRepoByOpen(testRepoDir);
|
||||
});
|
||||
|
||||
tap.test('should clone a repo', async () => {
|
||||
const gitRepo = await testSmartgitInstance.createRepoByClone(
|
||||
'https://gitlab.com/push.rocks/smartfile.git',
|
||||
testRepoDirSmartfile
|
||||
);
|
||||
});
|
||||
|
||||
await tap.start();
|
||||
|
8
ts/00_commitinfo_data.ts
Normal file
8
ts/00_commitinfo_data.ts
Normal file
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* autocreated commitinfo by @pushrocks/commitinfo
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@push.rocks/smartgit',
|
||||
version: '3.0.2',
|
||||
description: 'smart wrapper for nodegit'
|
||||
}
|
18
ts/index.ts
18
ts/index.ts
@ -1,16 +1,2 @@
|
||||
/// <reference path="./typings/main.d.ts" />
|
||||
|
||||
import plugins = require("./smartgit.plugins");
|
||||
import SmartgitCheck = require("./smartgit.check");
|
||||
import SmartgitClone = require("./smartgit.clone");
|
||||
import SmartgitCommit = require("./smartgit.commit");
|
||||
import SmartgitInit = require("./smartgit.init");
|
||||
|
||||
var smartgit:any = {};
|
||||
smartgit.clone = SmartgitClone;
|
||||
smartgit.commit = SmartgitCommit;
|
||||
smartgit.check = SmartgitCheck;
|
||||
smartgit.init = SmartgitInit;
|
||||
|
||||
|
||||
module.exports = smartgit;
|
||||
export * from './smartgit.classes.gitrepo.js';
|
||||
export * from './smartgit.classes.smartgit.js';
|
||||
|
@ -1,5 +0,0 @@
|
||||
/// <reference path="./typings/main.d.ts" />
|
||||
import plugins = require("./smartgit.plugins");
|
||||
export = function(repoArg) {
|
||||
return true;
|
||||
};
|
113
ts/smartgit.classes.gitrepo.ts
Normal file
113
ts/smartgit.classes.gitrepo.ts
Normal file
@ -0,0 +1,113 @@
|
||||
import * as plugins from './smartgit.plugins.js';
|
||||
|
||||
import { Smartgit } from './smartgit.classes.smartgit.js';
|
||||
|
||||
/**
|
||||
* class GitRepo allows access to git directories from node
|
||||
*/
|
||||
export class GitRepo {
|
||||
// STATIC
|
||||
/**
|
||||
* creates a new GitRepo Instance after cloning a project
|
||||
*/
|
||||
public static async fromCloningIntoDir(
|
||||
smartgitRefArg: Smartgit,
|
||||
fromArg: string,
|
||||
toArg: string
|
||||
): Promise<GitRepo> {
|
||||
const dirArg = plugins.path.resolve(toArg);
|
||||
await plugins.isomorphicGit.clone({
|
||||
dir: toArg,
|
||||
fs: smartgitRefArg.envDeps.fs,
|
||||
http: smartgitRefArg.envDeps.http,
|
||||
url: fromArg,
|
||||
});
|
||||
return new GitRepo(smartgitRefArg, toArg);
|
||||
}
|
||||
|
||||
public static async fromCreatingRepoInDir(
|
||||
smartgitRefArg: Smartgit,
|
||||
dirArg: string
|
||||
): Promise<GitRepo> {
|
||||
dirArg = plugins.path.resolve(dirArg);
|
||||
await plugins.isomorphicGit.init({
|
||||
dir: dirArg,
|
||||
fs: smartgitRefArg.envDeps.fs,
|
||||
});
|
||||
return new GitRepo(smartgitRefArg, dirArg);
|
||||
}
|
||||
|
||||
public static async fromOpeningRepoDir(smartgitRefArg: Smartgit, dirArg: string) {
|
||||
dirArg = plugins.path.resolve(dirArg);
|
||||
return new GitRepo(smartgitRefArg, dirArg);
|
||||
}
|
||||
|
||||
// INSTANCE
|
||||
public smartgitRef: Smartgit;
|
||||
public repoDir: string;
|
||||
|
||||
constructor(smartgitRefArg: Smartgit, repoDirArg: string) {
|
||||
this.smartgitRef = smartgitRefArg;
|
||||
this.repoDir = repoDirArg;
|
||||
}
|
||||
|
||||
/**
|
||||
* lists remotes
|
||||
*/
|
||||
public async listRemotes(): Promise<
|
||||
{
|
||||
remote: string;
|
||||
url: string;
|
||||
}[]
|
||||
> {
|
||||
const remotes = await plugins.isomorphicGit.listRemotes({
|
||||
fs: this.smartgitRef.envDeps.fs,
|
||||
dir: this.repoDir,
|
||||
});
|
||||
return remotes;
|
||||
}
|
||||
|
||||
/**
|
||||
* ensures the existance of a remote within a repository
|
||||
* @param remoteNameArg
|
||||
* @param remoteUrlArg
|
||||
*/
|
||||
public async ensureRemote(remoteNameArg: string, remoteUrlArg: string): Promise<void> {
|
||||
const remotes = await this.listRemotes();
|
||||
const existingRemote = remotes.find((itemArg) => itemArg.remote === remoteNameArg);
|
||||
if (existingRemote) {
|
||||
if (existingRemote.url !== remoteUrlArg) {
|
||||
await plugins.isomorphicGit.deleteRemote({
|
||||
remote: remoteNameArg,
|
||||
fs: this.smartgitRef.envDeps.fs,
|
||||
dir: this.repoDir,
|
||||
});
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
await plugins.isomorphicGit.addRemote({
|
||||
remote: remoteNameArg,
|
||||
fs: this.smartgitRef.envDeps.fs,
|
||||
url: remoteUrlArg,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* gets the url for a specific remote
|
||||
*/
|
||||
public async getUrlForRemote(remoteName: string): Promise<string> {
|
||||
const remotes = await this.listRemotes();
|
||||
const existingRemote = remotes.find((remoteArg) => remoteArg.remote === remoteName);
|
||||
return existingRemote?.url;
|
||||
}
|
||||
|
||||
public async pushBranchToRemote(branchName: string, remoteName: string) {
|
||||
await plugins.isomorphicGit.push({
|
||||
fs: this.smartgitRef.envDeps.fs,
|
||||
http: this.smartgitRef.envDeps.http,
|
||||
ref: branchName,
|
||||
remote: remoteName,
|
||||
});
|
||||
}
|
||||
}
|
40
ts/smartgit.classes.smartgit.ts
Normal file
40
ts/smartgit.classes.smartgit.ts
Normal file
@ -0,0 +1,40 @@
|
||||
import * as plugins from './smartgit.plugins.js';
|
||||
import { GitRepo } from './smartgit.classes.gitrepo.js';
|
||||
|
||||
export class Smartgit {
|
||||
public smartenvInstance = new plugins.smartenv.Smartenv();
|
||||
public envDeps: {
|
||||
fs: any;
|
||||
http: any;
|
||||
} = {
|
||||
fs: null,
|
||||
http: null,
|
||||
};
|
||||
|
||||
constructor() {}
|
||||
|
||||
public async init() {
|
||||
if (this.smartenvInstance.isNode) {
|
||||
this.envDeps.fs = await this.smartenvInstance.getSafeNodeModule('fs');
|
||||
this.envDeps.http = await this.smartenvInstance.getSafeNodeModule(
|
||||
'isomorphic-git/http/node/index.js'
|
||||
);
|
||||
} else {
|
||||
throw new Error('currently only node.js is supported.');
|
||||
}
|
||||
}
|
||||
|
||||
public async createRepoByClone(fromUrlArg: string, toDirArg: string) {
|
||||
const repo = await GitRepo.fromCloningIntoDir(this, fromUrlArg, toDirArg);
|
||||
}
|
||||
|
||||
public async createRepoByInit(dirArg: string) {
|
||||
const repo = await GitRepo.fromCreatingRepoInDir(this, dirArg);
|
||||
return repo;
|
||||
}
|
||||
|
||||
public async createRepoByOpen(dirArg: string) {
|
||||
const repo = await GitRepo.fromOpeningRepoDir(this, dirArg);
|
||||
return repo;
|
||||
}
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
/// <reference path="./typings/main.d.ts" />
|
||||
import plugins = require("./smartgit.plugins");
|
||||
import SmartgitCheck = require("./smartgit.check");
|
||||
|
||||
export = function(options){
|
||||
let done = plugins.Q.defer();
|
||||
/***** URL Checks ******/
|
||||
if (options.from == "undefined" || options.to == "undefined") {
|
||||
plugins.beautylog.error("smartgit.clone".blue + " : Something is strange about the way you invoked the function");
|
||||
return;
|
||||
}
|
||||
|
||||
/***** Path Checks ******/
|
||||
if (!/^\/.*/.test(options.to)){ //check wether path is absolute
|
||||
plugins.beautylog.error("It seems that the given path " + options.to + " is not absolute.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
plugins.beautylog.log("Now cloning " + options.from);
|
||||
var cloneOptions:any = {};
|
||||
var cloneRepository = plugins.nodegit.Clone(options.from, options.to, cloneOptions);
|
||||
SmartgitCheck(cloneRepository);
|
||||
done.resolve();
|
||||
return done.promise;
|
||||
};
|
@ -1,9 +0,0 @@
|
||||
/// <reference path="./typings/main.d.ts" />
|
||||
import plugins = require("./smartgit.plugins");
|
||||
|
||||
export = function(pathArg:string,commitMessage:string) {
|
||||
var result = plugins.nodegit.index.addByPath(pathArg);
|
||||
if (result == 0) {
|
||||
|
||||
}
|
||||
};
|
@ -1,14 +0,0 @@
|
||||
/// <reference path="./typings/main.d.ts" />
|
||||
import plugins = require("./smartgit.plugins");
|
||||
|
||||
export = function(){
|
||||
var gitinit = function(dest:string = "undefined") {
|
||||
if (dest == "undefined") { //lets check if a destination is defined...
|
||||
return; // ...and return function here if not
|
||||
}
|
||||
var isBare = 0; //lets create a subfolder
|
||||
plugins.nodegit.Repository.init(dest, isBare).then(function (repo) {
|
||||
// do something with repo here.
|
||||
});
|
||||
};
|
||||
}
|
@ -1,8 +1,17 @@
|
||||
/// <reference path="./typings/main.d.ts" />
|
||||
// node native
|
||||
import * as path from 'path';
|
||||
|
||||
export let path = require("path");
|
||||
export let beautylog = require("beautylog");
|
||||
export let nodegit = require("nodegit");
|
||||
export let Q = require("q");
|
||||
export { path };
|
||||
|
||||
import * as smartenv from '@push.rocks/smartenv';
|
||||
import * as smartfile from '@push.rocks/smartfile';
|
||||
import * as smartpath from '@push.rocks/smartpath';
|
||||
import * as smartpromise from '@push.rocks/smartpromise';
|
||||
import * as smartstring from '@push.rocks/smartstring';
|
||||
|
||||
export { smartenv, smartfile, smartpath, smartpromise, smartstring };
|
||||
|
||||
// third party
|
||||
import isomorphicGit from 'isomorphic-git';
|
||||
|
||||
export { isomorphicGit };
|
||||
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
"ambientDependencies": {
|
||||
"colors": "registry:dt/colors#0.6.0-1+20160317120654",
|
||||
"mocha": "registry:dt/mocha#2.2.5+20160317120654",
|
||||
"node": "registry:dt/node#4.0.0+20160330064709"
|
||||
}
|
||||
}
|
11
tsconfig.json
Normal file
11
tsconfig.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"experimentalDecorators": true,
|
||||
"useDefineForClassFields": false,
|
||||
"target": "ES2022",
|
||||
"module": "ES2022",
|
||||
"moduleResolution": "nodenext",
|
||||
"esModuleInterop": true,
|
||||
"verbatimModuleSyntax": true,
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user