fix(core): update
This commit is contained in:
parent
7292b45d33
commit
096c38de9e
8072
package-lock.json
generated
8072
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
14
package.json
14
package.json
@ -12,19 +12,19 @@
|
|||||||
"build": "(tsbuild --web)"
|
"build": "(tsbuild --web)"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gitzone/tsbuild": "^2.1.24",
|
"@gitzone/tsbuild": "^2.1.25",
|
||||||
"@gitzone/tsrun": "^1.2.12",
|
"@gitzone/tsrun": "^1.2.12",
|
||||||
"@gitzone/tstest": "^1.0.33",
|
"@gitzone/tstest": "^1.0.52",
|
||||||
"@pushrocks/tapbundle": "^3.2.1",
|
"@pushrocks/tapbundle": "^3.2.9",
|
||||||
"@types/node": "^14.0.14",
|
"@types/node": "^14.11.2",
|
||||||
"tslint": "^6.1.2",
|
"tslint": "^6.1.3",
|
||||||
"tslint-config-prettier": "^1.18.0"
|
"tslint-config-prettier": "^1.18.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pushrocks/consolecolor": "^2.0.1",
|
"@pushrocks/consolecolor": "^2.0.1",
|
||||||
"@pushrocks/smartarchive": "^1.0.12",
|
"@pushrocks/smartarchive": "^1.0.12",
|
||||||
"@pushrocks/smartfile": "^7.0.12",
|
"@pushrocks/smartfile": "^8.0.4",
|
||||||
"@pushrocks/smartrequest": "^1.1.47",
|
"@pushrocks/smartrequest": "^1.1.51",
|
||||||
"package-json": "^6.5.0"
|
"package-json": "^6.5.0"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
|
@ -52,10 +52,10 @@ export class NpmRegistry {
|
|||||||
/**
|
/**
|
||||||
* gets a file from a package as Smartfile
|
* gets a file from a package as Smartfile
|
||||||
*/
|
*/
|
||||||
public async getFileFromPackage(packageName: string, filePath: string) {
|
public async getFileFromPackage(packageNameArg: string, filePath: string) {
|
||||||
const baseDir = plugins.path.join(paths.nogitDir, packageName.replace('/', '__'));
|
const baseDir = plugins.path.join(paths.nogitDir, packageNameArg.replace('/', '__'));
|
||||||
await plugins.smartfile.fs.ensureDir(baseDir);
|
await plugins.smartfile.fs.ensureDir(baseDir);
|
||||||
await this.savePackageToDisk(packageName, baseDir);
|
await this.savePackageToDisk(packageNameArg, baseDir);
|
||||||
const smartfile = await plugins.smartfile.Smartfile.fromFilePath(
|
const smartfile = await plugins.smartfile.Smartfile.fromFilePath(
|
||||||
plugins.path.join(baseDir, 'package', filePath)
|
plugins.path.join(baseDir, 'package', filePath)
|
||||||
);
|
);
|
||||||
@ -63,6 +63,15 @@ export class NpmRegistry {
|
|||||||
return smartfile;
|
return smartfile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async getPackageAsSmartfileVirtualDir(packageNameArg: string): Promise<plugins.smartfile.VirtualDirectory> {
|
||||||
|
const baseDir = plugins.path.join(paths.nogitDir, packageNameArg.replace('/', '__'));
|
||||||
|
await plugins.smartfile.fs.ensureDir(baseDir);
|
||||||
|
await this.savePackageToDisk(packageNameArg, baseDir);
|
||||||
|
const virtualDir = await plugins.smartfile.VirtualDirectory.fromFsDirPath(baseDir);
|
||||||
|
await plugins.smartfile.fs.remove(baseDir);
|
||||||
|
return virtualDir;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* searches for a package on npm
|
* searches for a package on npm
|
||||||
* @param searchObjectArg
|
* @param searchObjectArg
|
||||||
|
Loading…
Reference in New Issue
Block a user