feat: add baseURL dev and sequelize error

This commit is contained in:
2024-10-19 17:32:02 +08:00
parent 5c3f454d8c
commit 644539b624
10 changed files with 70 additions and 12 deletions

View File

@@ -3,7 +3,7 @@ import { glob } from 'glob';
import path from 'path';
import fs from 'fs';
import FormData from 'form-data';
import { baseURL } from '@/module/query.ts';
import { baseURL, getBaseURL } from '@/module/query.ts';
import { getConfig } from '@/module/index.ts';
import inquirer from 'inquirer';
@@ -76,12 +76,14 @@ const uploadFiles = async (files: string[], directory: string, { key, version }:
const filePath = path.join(directory, file);
form.append('file', fs.createReadStream(filePath), {
filename: file,
filepath: file,
});
}
form.append('appKey', key);
form.append('version', version);
return new Promise((resolve) => {
const url = new URL(baseURL);
const _baseURL = getBaseURL();
const url = new URL(_baseURL);
console.log('upload url', url.hostname, url.protocol, url.port);
form.submit(
{