fix(core): update
This commit is contained in:
parent
91ca5e53f1
commit
39ea160fdf
24976
package-lock.json
generated
24976
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
23
package.json
23
package.json
@ -4,6 +4,7 @@
|
|||||||
"description": "smart wrapper for nodegit",
|
"description": "smart wrapper for nodegit",
|
||||||
"main": "dist_ts/index.js",
|
"main": "dist_ts/index.js",
|
||||||
"typings": "dist_ts/index.d.ts",
|
"typings": "dist_ts/index.d.ts",
|
||||||
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "(tstest test/)",
|
"test": "(tstest test/)",
|
||||||
"build": "(tsbuild --web)"
|
"build": "(tsbuild --web)"
|
||||||
@ -24,21 +25,19 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://gitlab.com/pushrocks/smartgit",
|
"homepage": "https://gitlab.com/pushrocks/smartgit",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pushrocks/smartenv": "^4.0.16",
|
"@pushrocks/smartenv": "^5.0.2",
|
||||||
"@pushrocks/smartfile": "^8.0.10",
|
"@pushrocks/smartfile": "^10.0.4",
|
||||||
"@pushrocks/smartpath": "^4.0.3",
|
"@pushrocks/smartpath": "^5.0.5",
|
||||||
"@pushrocks/smartpromise": "^3.1.6",
|
"@pushrocks/smartpromise": "^3.1.7",
|
||||||
"@pushrocks/smartshell": "^2.0.28",
|
"@pushrocks/smartshell": "^2.0.30",
|
||||||
"@pushrocks/smartstring": "^3.0.24",
|
"@pushrocks/smartstring": "^4.0.2",
|
||||||
"@types/minimatch": "^3.0.5",
|
"@types/minimatch": "^3.0.5",
|
||||||
"isomorphic-git": "^1.10.1"
|
"isomorphic-git": "^1.19.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gitzone/tsbuild": "^2.1.28",
|
"@gitzone/tsbuild": "^2.1.63",
|
||||||
"@gitzone/tstest": "^1.0.59",
|
"@gitzone/tstest": "^1.0.72",
|
||||||
"@pushrocks/tapbundle": "^3.2.14",
|
"@pushrocks/tapbundle": "^5.0.4"
|
||||||
"tslint": "^6.1.3",
|
|
||||||
"tslint-config-prettier": "^1.18.0"
|
|
||||||
},
|
},
|
||||||
"private": false,
|
"private": false,
|
||||||
"files": [
|
"files": [
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
import { tap, expect } from '@pushrocks/tapbundle';
|
import { tap, expect } from '@pushrocks/tapbundle';
|
||||||
import * as smartgit from '../ts/index';
|
import * as smartgit from '../ts/index.js';
|
||||||
|
|
||||||
|
import * as smartpath from '@pushrocks/smartpath';
|
||||||
|
const __dirname = smartpath.get.dirnameFromImportMetaUrl(import.meta.url);
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
|
|
||||||
let testSmartgitInstance: smartgit.Smartgit;
|
let testSmartgitInstance: smartgit.Smartgit;
|
||||||
@ -10,7 +12,7 @@ const testRepoDirSmartfile = path.join(__dirname, '../.nogit/pushrocks_smartfile
|
|||||||
tap.test('should create a valid smartgit instance', async () => {
|
tap.test('should create a valid smartgit instance', async () => {
|
||||||
testSmartgitInstance = new smartgit.Smartgit();
|
testSmartgitInstance = new smartgit.Smartgit();
|
||||||
await testSmartgitInstance.init();
|
await testSmartgitInstance.init();
|
||||||
expect(testSmartgitInstance).to.be.instanceOf(smartgit.Smartgit);
|
expect(testSmartgitInstance).toBeInstanceOf(smartgit.Smartgit);
|
||||||
})
|
})
|
||||||
|
|
||||||
tap.test('should create a new repo at .nogit', async () => {
|
tap.test('should create a new repo at .nogit', async () => {
|
||||||
|
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: '@pushrocks/smartgit',
|
||||||
|
version: '2.0.2',
|
||||||
|
description: 'smart wrapper for nodegit'
|
||||||
|
}
|
@ -1,4 +1,2 @@
|
|||||||
import plugins = require('./smartgit.plugins');
|
export * from './smartgit.classes.gitrepo.js';
|
||||||
|
export * from './smartgit.classes.smartgit.js';
|
||||||
export * from './smartgit.classes.gitrepo';
|
|
||||||
export * from './smartgit.classes.smartgit';
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import * as plugins from './smartgit.plugins';
|
import * as plugins from './smartgit.plugins.js';
|
||||||
|
|
||||||
import { Smartgit } from './smartgit.classes.smartgit';
|
import { Smartgit } from './smartgit.classes.smartgit.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* class GitRepo allows access to git directories from node
|
* class GitRepo allows access to git directories from node
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import * as plugins from './smartgit.plugins';
|
import * as plugins from './smartgit.plugins.js';
|
||||||
import { GitRepo } from './smartgit.classes.gitrepo';
|
import { GitRepo } from './smartgit.classes.gitrepo.js';
|
||||||
|
|
||||||
export class Smartgit {
|
export class Smartgit {
|
||||||
public smartenvInstance = new plugins.smartenv.Smartenv();
|
public smartenvInstance = new plugins.smartenv.Smartenv();
|
||||||
@ -15,8 +15,8 @@ export class Smartgit {
|
|||||||
|
|
||||||
public async init() {
|
public async init() {
|
||||||
if (this.smartenvInstance.isNode) {
|
if (this.smartenvInstance.isNode) {
|
||||||
this.envDeps.fs = this.smartenvInstance.getSafeNodeModule('fs');
|
this.envDeps.fs = await this.smartenvInstance.getSafeNodeModule('fs');
|
||||||
this.envDeps.http = this.smartenvInstance.getSafeNodeModule('isomorphic-git/http/node');
|
this.envDeps.http = await this.smartenvInstance.getSafeNodeModule('isomorphic-git/http/node/index.js');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
10
tsconfig.json
Normal file
10
tsconfig.json
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"experimentalDecorators": true,
|
||||||
|
"useDefineForClassFields": false,
|
||||||
|
"target": "ES2022",
|
||||||
|
"module": "ES2022",
|
||||||
|
"moduleResolution": "nodenext",
|
||||||
|
"esModuleInterop": true
|
||||||
|
}
|
||||||
|
}
|
17
tslint.json
17
tslint.json
@ -1,17 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": ["tslint:latest", "tslint-config-prettier"],
|
|
||||||
"rules": {
|
|
||||||
"semicolon": [true, "always"],
|
|
||||||
"no-console": false,
|
|
||||||
"ordered-imports": false,
|
|
||||||
"object-literal-sort-keys": false,
|
|
||||||
"member-ordering": {
|
|
||||||
"options":{
|
|
||||||
"order": [
|
|
||||||
"static-method"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"defaultSeverity": "warning"
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user