npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

impex-runner

v1.1.1

Published

Biblioteca Node.js para executar scripts ImpEx no SAP Commerce (Hybris) via HAC

Readme

impex-runner

npm version
License: MIT

Biblioteca Node.js para executar scripts ImpEx no SAP Commerce (Hybris) via HAC.

Documentacao atualizada para a versao 1.1.0.

Caracteristicas

  • Execucao sequencial de multiplos scripts ImpEx
  • Login automatico no HAC
  • Controle de erro com parada configuravel
  • Delay configuravel entre scripts
  • Suporte a SSL/TLS e timeout
  • Criacao automatica de impex-launcher.js e impex-runner-config/ no projeto cliente
  • Inclusao automatica de impex-runner-config/ no .gitignore
  • Resolucao de caminhos .impex a partir da raiz real do projeto

Instalacao

npm install impex-runner

Depois da instalacao, a lib cria automaticamente no projeto cliente:

  • impex-launcher.js
  • impex-runner-config/.env.local
  • impex-runner-config/.env.d1
  • impex-runner-config/.env.s1
  • impex-runner-config/.env.prd
  • impex-runner-config/README.md

Uso

Para usar a biblioteca no projeto, basta seguir estes 3 passos:

  1. Configure o arquivo impex-launcher.js.
  2. Ajuste a lista de caminhos dos arquivos .impex que deseja executar.
  3. Execute:
node impex-launcher.js

Exemplo de lista de scripts no impex-launcher.js:

const scripts = [
  'impexs/01-users.impex',
  'impexs/02-products.impex',
  'impexs/03-categories.impex'
] ; 

Como informar os scripts

Os caminhos dos arquivos .impex devem ser informados de forma relativa a raiz do projeto.

Exemplo correto:

const scripts = [
  'core-customize/hybris/bin/custom/b2b/b2binitialdata/resources/b2binitialdata/import/sampledata/contentCatalogs/B2BContentCatalog/structureds/test/login/01-test-login.impex'
] ; 

Evite usar caminhos como:

const scripts = [
  '../../../../../../../core-customize/hybris/bin/custom/.../01-test-login.impex'
] ; 

A biblioteca detecta a raiz do projeto priorizando:

  1. .git
  2. pom.xml
  3. build.gradle
  4. package.json como fallback

Se precisar sobrescrever isso manualmente:

const config = {
  hacUrl: 'https://localhost:9002/hac',
  username: 'admin',
  password: 'nimdaa',
  projectRoot: '/projects/your-project'
} ; 

Configuracao

config

| Propriedade | Tipo | Obrigatorio | Padrao | Descricao | | --- | --- | --- | --- | --- | | hacUrl | string | Sim | - | URL do HAC | | username | string | Sim | - | Usuario do HAC | | password | string | Sim | - | Senha do HAC | | verifySSL | boolean | Nao | true | Valida certificado SSL | | timeout | number | Nao | 60000 | Timeout em ms | | environment | string | Nao | - | Nome do ambiente para log | | projectRoot | string | Nao | auto | Raiz do projeto para resolver os arquivos |

options

| Propriedade | Tipo | Padrao | Descricao | | --- | --- | --- | --- | | clearTerminal | boolean | true | Limpa o terminal antes da execucao | | stopOnError | boolean | true | Interrompe ao encontrar erro | | delayBetweenScripts | number | 1000 | Delay entre scripts em ms |

Retorno

runImpexScripts(config, scripts, options) retorna uma Promise<Array> com o resultado de cada arquivo executado.

Exemplo:

[
  { script: '01-users.impex', success: true },
  { script: '02-products.impex', success: false, error: '...' }
]

Seguranca

Nao commite credenciais no repositorio.

Os arquivos de ambiente sao criados dentro de impex-runner-config/ e o postinstall tenta adicionar essa pasta ao .gitignore automaticamente.

Exemplo usando variaveis de ambiente:

const config = {
  hacUrl: process.env.HAC_URL,
  username: process.env.HAC_USERNAME,
  password: process.env.HAC_PASSWORD,
  verifySSL: process.env.VERIFY_SSL === 'true'
} ; 

Fluxo recomendado

  1. Instale a lib com npm install impex-runner
  2. Configure o arquivo impex-launcher.js
  3. Ajuste os caminhos dos .impex desejados
  4. Execute node impex-launcher.js

Licenca

MIT. Veja LICENSE.