Commit a7c6d8f0 authored by nanahira's avatar nanahira

Merge branch 'master' into pics

parents 5628fbe7 9dbb5aa3
Pipeline #9585 failed with stages
in 6 minutes and 5 seconds
......@@ -40,4 +40,5 @@ lerna-debug.log*
.git*
Dockerfile
.dockerignore
/koishi.config.*
\ No newline at end of file
/koishi.config.*
/koishi-plugins
......@@ -2,4 +2,5 @@ webpack.config.js
dist/*
build/*
*.js
/koishi.config.*
\ No newline at end of file
/koishi.config.*
/koishi-plugins
......@@ -36,4 +36,5 @@ lerna-debug.log*
/data
/output
/config.yaml
/koishi.config.*
\ No newline at end of file
/koishi.config.*
/koishi-plugins
......@@ -6,4 +6,5 @@
.idea
.dockerignore
Dockerfile
/koishi.config.*
\ No newline at end of file
/koishi.config.*
/koishi-plugins
......@@ -28,10 +28,10 @@ logger:
allowWrite: false
# 插件设置
plugins:
act:
$install: latest
$community: true # Will prefer koishi-plugin-act over @koishijs/plugin-act
adapter-onebot:
$install: true # Will always install the latest version
bots:
......@@ -41,4 +41,4 @@ plugins:
token: 'token'
verifer:
$install: '1.0.0-beta.0' # Will install this version. NPM format is also supported.
```
\ No newline at end of file
```
{
"name": "koishi-bootstrap",
"version": "5.2.0",
"version": "5.3.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "koishi-bootstrap",
"version": "5.2.0",
"version": "5.3.1",
"license": "MIT",
"dependencies": {
"@koishijs/cli": "^4.2.0",
......
{
"name": "koishi-bootstrap",
"description": "Koishi bootstraper, for Docker.",
"version": "5.2.0",
"version": "5.3.1",
"scripts": {
"lint": "eslint --fix .",
"build": "tsc",
......
......@@ -8,4 +8,6 @@ export interface KoishiConfig {
export interface PackageConfig {
dependencies: Record<string, string>;
devDependencies: Record<string, string>;
peerDependencies: Record<string, string>;
}
......@@ -16,7 +16,7 @@ async function handlePackageEntry(packageName: string, versionString: string) {
try {
await fs.promises.access(path);
console.log(`Removing ${path} ...`);
// await fs.promises.rmdir(path, { recursive: true });
await fs.promises.rmdir(path, { recursive: true });
} catch (e) {}
}),
);
......
import loadJsonFile from 'load-json-file';
import { PackageConfig } from '../def/interfaces';
export async function getPackageJsonPackages() {
const { dependencies } = await loadJsonFile<PackageConfig>('./package.json');
return dependencies;
export async function getPackageJsonPackages(
path = './package.json',
type: keyof PackageConfig = 'dependencies',
) {
const json = await loadJsonFile<PackageConfig>(path);
return json[type];
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment