feat: add baseURL dev and sequelize error
This commit is contained in:
@@ -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(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user