This commit is contained in:
Xu Chang 2022-05-19 09:35:21 +08:00
parent eb1b4dd942
commit e1f346fc58
3 changed files with 14 additions and 6 deletions

View File

@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
exports.decomposeFileUrl = exports.composeFileUrl = void 0;
function composeFileUrl(extraFile) {
const { type, bucket, filename, origin, extra1 } = extraFile;
if (origin === 'unknown') {
// 未知第三方源
if (extra1) {
// 有extra1就用extra1
return extra1;
}
throw new Error('not implemented yet');
return '';
}
exports.composeFileUrl = composeFileUrl;
function decomposeFileUrl(url) {

View File

@ -24,13 +24,20 @@ import spawn from 'cross-spawn';
console.log(`${chalk.greenBright(`npm link oak-app-domain`)}`);
const isMac = process.platform === 'darwin';
const result2 = spawn.sync(
`${isMac ? 'sudo' : ''}`,
const result2 = isMac? spawn.sync(
'sudo',
[`npm link ${process.cwd()}/src/base-app-domain`],
{
stdio: 'inherit',
shell: true,
}
) : spawn.sync(
'npm',
[`link ${process.cwd()}/src/base-app-domain`],
{
stdio: 'inherit',
shell: true,
}
);
if (result2.status === 0) {

View File

@ -42,7 +42,8 @@ Component({
});
}
else {
this.triggerEvent('add', tempFiles);
// this.triggerEvent('add', tempFiles);
this.data.createData(tempFiles);
/* const { globalData: { features } } = getApp();
const { oakFullpath } = this.data;
for (const file of tempFiles) {