
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
@amocrm/widget-installer
Advanced tools
Сервис, который упаковывает директорию в zip-архив и загружает в аккаунт amoCRM. Если в amoCRM виджет не существует, он будет создан, иначе будет обновлен.
Сервис, который упаковывает директорию в zip-архив и загружает в аккаунт amoCRM. Если в amoCRM виджет не существует, он будет создан, иначе будет обновлен.
Обратите внимание, что с 2022-06-08 amoCRM добавила amoМаркет. Если аккаунт обновился и имеет доступ к маркету (вместо раздела Настройки -> Интеграции), то в объекте параметров конструктора WidgetInstaller можете указать amoMarket: true. Иначе укажате amoMarket: false.
# npm
npm install --save-dev @amopro/widget-installer
# or yarn
yarn add --dev @amopro/widget-installer
Вы можете посмотреть заготовку виджета в репозитории amocrm-widget-starter-kit
const path = require('path');
const WIDGET_DIR = path.resolve('widget');
// ...
// Здесь вы собираете виджет в папку "widget"
// ...
try {
const installer = require('@amopro/widget-installer');
const {WidgetInstaller, makeZipArchive} = installer;
console.log('Make widget archive...');
const widgetZipPath = await makeZipArchive(WIDGET_DIR);
console.log('Widget uploading...');
const installerParams = {
subDomain: process.env.AMO_SUBDOMAIN,
login: process.env.AMO_LOGIN,
password: process.env.AMO_PASSWORD,
widgetZipPath: widgetZipPath,
redirectUri: process.env.APP_URL + '/amocrm/auth',
revokeAccessHookUri: process.env.APP_URL + '/amocrm/destroy',
amoMarket: true, // true - если аккаунт имеет доступ к amoМаркет (с 2022-06-08)
};
const wi = new WidgetInstaller(installerParams);
await wi.upload();
console.log('Widget uploaded!');
// после загрузки можно удалить архив
const fse = require('fs-extra');
fse.removeSync(path.resolve('widget.zip'));
} catch (e) {
console.error('uploading error', e.toString());
throw e;
}
FAQs
Сервис, который упаковывает директорию в zip-архив и загружает в аккаунт amoCRM. Если в amoCRM виджет не существует, он будет создан, иначе будет обновлен.
We found that @amocrm/widget-installer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.