Mono repo -> Master (#22553)
Combines the following repositories into one: https://github.com/mattermost/mattermost-server https://github.com/mattermost/mattermost-webapp https://github.com/mattermost/focalboard https://github.com/mattermost/mattermost-plugin-playbooks
Этот коммит содержится в:
30
e2e/cypress/tests/plugins/shell.js
Обычный файл
30
e2e/cypress/tests/plugins/shell.js
Обычный файл
@@ -0,0 +1,30 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
const extractZip = require('extract-zip');
|
||||
const shell = require('shelljs');
|
||||
|
||||
const shellFind = ({path, pattern}) => {
|
||||
return shell.find(path).filter((file) => {
|
||||
return file.match(pattern);
|
||||
});
|
||||
};
|
||||
|
||||
const shellRm = ({option, file}) => {
|
||||
return shell.rm(option, file);
|
||||
};
|
||||
|
||||
const shellUnzip = async ({source, target}) => {
|
||||
try {
|
||||
await extractZip(source, {dir: target});
|
||||
return null;
|
||||
} catch (err) {
|
||||
return err;
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
shellFind,
|
||||
shellRm,
|
||||
shellUnzip,
|
||||
};
|
||||
Ссылка в новой задаче
Block a user