-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
523 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
.root | ||
node_modules | ||
*_back | ||
dist | ||
types | ||
**/i18n/** | ||
.rpt2_cache | ||
**.log | ||
coverage | ||
.idea | ||
.git | ||
template | ||
public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// Delete this comment line, the template will no longer be written | ||
export default { | ||
extends: [import.meta.resolve('@gez/lint/css')], | ||
rules: {} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
{ | ||
"$schema": "https://biomejs.dev/schemas/1.9.2/schema.json", | ||
"vcs": { | ||
"enabled": false | ||
}, | ||
"overrides": [ | ||
{ | ||
"include": [ | ||
"*.vue" | ||
], | ||
"linter": { | ||
"rules": { | ||
"style": { | ||
"useConst": "off", | ||
"useImportType": "off" | ||
} | ||
} | ||
} | ||
} | ||
], | ||
"files": { | ||
"ignoreUnknown": false, | ||
"ignore": [ | ||
"node_modules/**/*", | ||
"node_modules_back/**/*", | ||
"dist/**/*", | ||
"types/**/*", | ||
".rpt2_cache/**/*", | ||
"coverage/**/*", | ||
".idea/**/*", | ||
".git/**/*", | ||
"public/**/*", | ||
".root/**/*", | ||
"**/i18n/**", | ||
"**/svg-icons.ts", | ||
"build.config.ts", | ||
"*.min.js" | ||
] | ||
}, | ||
"formatter": { | ||
"enabled": true, | ||
"indentStyle": "space", | ||
"indentWidth": 4 | ||
}, | ||
"organizeImports": { | ||
"enabled": true | ||
}, | ||
"linter": { | ||
"enabled": true, | ||
"rules": { | ||
"recommended": true, | ||
"suspicious": { | ||
"noEmptyInterface": "off", | ||
"noExplicitAny": "off", | ||
"noAssignInExpressions": "off", | ||
"useGetterReturn": "warn", | ||
"noGlobalIsNan": "warn", | ||
"noImplicitAnyLet": "warn", | ||
"noShadowRestrictedNames": "warn", | ||
"useIsArray": "warn", | ||
"noThenProperty": "warn" | ||
}, | ||
"security": { | ||
"noGlobalEval": "warn" | ||
}, | ||
"complexity": { | ||
"noForEach": "off", | ||
"noThisInStatic": "off", | ||
"noBannedTypes": "off", | ||
"useOptionalChain": "warn", | ||
"noUselessConstructor": "warn", | ||
"noUselessSwitchCase": "warn", | ||
"noStaticOnlyClass": "warn" | ||
}, | ||
"style": { | ||
"useFilenamingConvention": { | ||
"level": "warn", | ||
"options": { | ||
"strictCase": true, | ||
"requireAscii": true, | ||
"filenameCases": [ | ||
"kebab-case" | ||
] | ||
} | ||
}, | ||
"useExponentiationOperator": "off", | ||
"noUselessElse": "off", | ||
"useTemplate": "off", | ||
"noUnusedTemplateLiteral": "off", | ||
"noNonNullAssertion": "off", | ||
"noParameterAssign": "off", | ||
"noArguments": "warn", | ||
"useNodejsImportProtocol": "warn", | ||
"useDefaultParameterLast": "warn" | ||
}, | ||
"performance": { | ||
"noDelete": "warn", | ||
"noAccumulatingSpread": "warn" | ||
}, | ||
"correctness": { | ||
"noUnsafeOptionalChaining": "warn", | ||
"noVoidTypeReturn": "warn" | ||
} | ||
} | ||
}, | ||
"javascript": { | ||
"formatter": { | ||
"quoteStyle": "single", | ||
"trailingCommas": "none" | ||
} | ||
}, | ||
"json": { | ||
"formatter": { | ||
"enabled": false | ||
} | ||
}, | ||
"css": { | ||
"formatter": { | ||
"enabled": false | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Template generation, do not manually modify | ||
import { defineBuildConfig } from 'unbuild'; | ||
|
||
export default defineBuildConfig({ | ||
clean: true, | ||
entries: [ | ||
{ | ||
input: './src/', | ||
format: 'esm', | ||
ext: 'mjs', | ||
cleanDist: true, | ||
declaration: true, | ||
esbuild: { | ||
target: 'node22' | ||
} | ||
} | ||
] | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"name": "@gez/fetch", | ||
"template": "library-node", | ||
"scripts": { | ||
"lint:css": "stylelint '**/*.{css,vue}' --fix --aei", | ||
"lint:type": "tsc --noEmit", | ||
"test": "vitest --pass-with-no-tests", | ||
"coverage": "vitest run --coverage --pass-with-no-tests", | ||
"lint:js": "biome check --write --no-errors-on-unmatched", | ||
"build": "unbuild" | ||
}, | ||
"devDependencies": { | ||
"@biomejs/biome": "1.9.4", | ||
"@gez/lint": "3.0.0-beta.27", | ||
"@types/cli-progress": "^3.11.6", | ||
"@types/node": "22.9.0", | ||
"@vitest/coverage-v8": "2.1.5", | ||
"axios": "^1.7.7", | ||
"cli-progress": "^3.12.0", | ||
"stylelint": "16.10.0", | ||
"typescript": "5.6.3", | ||
"unbuild": "2.0.0", | ||
"vitest": "2.1.5" | ||
}, | ||
"version": "0.0.0", | ||
"type": "module", | ||
"private": false, | ||
"exports": { | ||
".": { | ||
"import": "./dist/index.mjs", | ||
"types": "./dist/index.d.ts" | ||
} | ||
}, | ||
"module": "dist/index.mjs", | ||
"types": "./dist/index.d.ts", | ||
"files": [ | ||
"src", | ||
"dist", | ||
"*.mjs", | ||
"template", | ||
"public" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { test } from 'vitest'; | ||
import { fetchPkgsWithProgress } from '.'; | ||
|
||
test('base', async () => { | ||
await fetchPkgsWithProgress({ | ||
baseURL: 'https://dp-os.github.io/gez/', | ||
urls: ['ssr-html/versions/latest.tgz', 'ssr-html/versions/1.0.tgz'], | ||
timeout: 4500 | ||
}).then((...args) => { | ||
console.log(...args); | ||
}); | ||
}, 5000); |
Oops, something went wrong.