mirror of
https://github.com/morten-olsen/mini-loader.git
synced 2026-02-08 01:36:26 +01:00
Compare commits
1 Commits
fix/enable
...
dependabot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5d82b2b838 |
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -127,7 +127,7 @@ jobs:
|
||||
cache: '${{ env.NODE_CACHE }}'
|
||||
node-version: '${{ env.NODE_VERSION }}'
|
||||
scope: '${{ env.NODE_SCOPE }}'
|
||||
- uses: actions/download-artifact@v3
|
||||
- uses: actions/download-artifact@v4.1.7
|
||||
with:
|
||||
name: lib
|
||||
path: ./
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { z } from 'zod';
|
||||
|
||||
const setLoadSchema = z.object({
|
||||
id: z.string().optional(),
|
||||
id: z.string(),
|
||||
name: z.string().optional(),
|
||||
script: z.string(),
|
||||
});
|
||||
|
||||
@@ -60,7 +60,7 @@ class LoadRepo extends EventEmitter<LoadRepoEvents> {
|
||||
public set = async (options: SetLoadOptions) => {
|
||||
const { database } = this.#options;
|
||||
const db = await database.instance;
|
||||
const id = options.id || `auto-id/${nanoid()}`;
|
||||
const id = options.id || nanoid();
|
||||
const script = createHash('sha256').update(options.script).digest('hex');
|
||||
const scriptDir = resolve(this.#options.config.files.data, 'scripts');
|
||||
await mkdir(scriptDir, { recursive: true });
|
||||
|
||||
Reference in New Issue
Block a user