fix(core): update
This commit is contained in:
parent
2b44caf70a
commit
3af21511c0
@ -5,7 +5,7 @@
|
|||||||
"githost": "gitlab.com",
|
"githost": "gitlab.com",
|
||||||
"gitscope": "pushrocks",
|
"gitscope": "pushrocks",
|
||||||
"gitrepo": "isohash",
|
"gitrepo": "isohash",
|
||||||
"shortDescription": "a hash package that works cross environment",
|
"description": "a hash package that works cross environment",
|
||||||
"npmPackagename": "@pushrocks/isohash",
|
"npmPackagename": "@pushrocks/isohash",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"projectDomain": "push.rocks"
|
"projectDomain": "push.rocks"
|
||||||
|
18041
package-lock.json
generated
18041
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
15
package.json
15
package.json
@ -13,16 +13,15 @@
|
|||||||
"build": "(tsbuild --web)"
|
"build": "(tsbuild --web)"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gitzone/tsbuild": "^2.1.60",
|
"@gitzone/tsbuild": "^2.1.65",
|
||||||
"@gitzone/tstest": "^1.0.69",
|
"@gitzone/tsrun": "^1.2.39",
|
||||||
"@pushrocks/tapbundle": "^5.0.2",
|
"@gitzone/tstest": "^1.0.74",
|
||||||
"@types/node": "^17.0.23",
|
"@pushrocks/tapbundle": "^5.0.4",
|
||||||
"tslint": "^6.1.3",
|
"@types/node": "^18.15.11"
|
||||||
"tslint-config-prettier": "^1.15.0"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pushrocks/smartenv": "^5.0.0",
|
"@pushrocks/smartenv": "^5.0.5",
|
||||||
"@pushrocks/smarthash": "^2.1.10"
|
"@pushrocks/smarthash": "^3.0.2"
|
||||||
},
|
},
|
||||||
"browserslist": [
|
"browserslist": [
|
||||||
"last 1 chrome versions"
|
"last 1 chrome versions"
|
||||||
|
4430
pnpm-lock.yaml
generated
Normal file
4430
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
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/isohash',
|
||||||
|
version: '2.0.1',
|
||||||
|
description: 'a hash package that works cross environment'
|
||||||
|
}
|
@ -1,7 +1,7 @@
|
|||||||
import * as plugins from './isohash.plugins.js';
|
import * as plugins from './isohash.plugins.js';
|
||||||
|
|
||||||
const hex = (buffer: ArrayBuffer) => {
|
const hex = (buffer: ArrayBuffer) => {
|
||||||
const hexCodes = [];
|
const hexCodes: string[] = [];
|
||||||
const view = new DataView(buffer);
|
const view = new DataView(buffer);
|
||||||
for (let i = 0; i < view.byteLength; i += 4) {
|
for (let i = 0; i < view.byteLength; i += 4) {
|
||||||
// Using getUint32 reduces the number of iterations needed (we process 4 bytes each time)
|
// Using getUint32 reduces the number of iterations needed (we process 4 bytes each time)
|
||||||
@ -30,7 +30,7 @@ export const sha256FromString = async (stringArg: string): Promise<string> => {
|
|||||||
const result = hex(hash);
|
const result = hex(hash);
|
||||||
return result;
|
return result;
|
||||||
} else if (smartenv.isNode) {
|
} else if (smartenv.isNode) {
|
||||||
const smarthashModule = await smartenv.getSafeNodeModule('@pushrocks/smarthash');
|
const smarthashModule: typeof import('@pushrocks/smarthash') = await smartenv.getSafeNodeModule('@pushrocks/smarthash');
|
||||||
const result = await smarthashModule.sha256FromString(stringArg);
|
const result = await smarthashModule.sha256FromString(stringArg);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
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