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 🙏

© 2024 – Pkg Stats / Ryan Hefner

sysfilezillaserverapi

v1.0.3

Published

SysFileZillaServerAPI e uma API, que roda em Express e utiliza o repositório CtrlFileZillaServer para gerenciar o FileZilla Server de forma remota

Downloads

6

Readme

SysFileZillaServerAPI

SysFileZillaServerAPI é uma API, que roda em Nodejs e permite gerenciar o Filezilla Server utilizando o repositório CtrlFileZillaServer

Language Platforms License HitCount

Diretório do Filezilla Server

O Diretório do Filezilla Server padrão é C:\Program Files (x86)\FileZilla Server\ porém pode ser alterado na variável cfg_pathfilezilla

Porta

A aplicação roda na porta 9092 porém pode ser alterado na variável cfg_porta

Autenticação

O acesso a api é feito utilizando autenticação básica HTTP (Basic Auth), e os usuários/senha são controlados na variável cfg_usuarios

Método

Toda chamada a API é feita via POST enviando no corpo da solicitação o JSON com os parâmetros

Sucesso

Em caso de sucesso, será retornado um json com dois valores:

  • httpcode: 200
  • body: Json com o resultado da requisição

Exemplo:

{
"httpcode": 200,
"body":{
}
}

Em alguns métodos não é retornado o body, são métodos que apenas retornam o httpcode: 200 para indicar o SUCESSO da requisição

Erro

Em caso de erro, será retornado um json com dois valores:

  • httpcode: 500
  • body/Msg: Mensagem de erro

Exemplo:

{
"httpcode": 500,
"body":{
"Msg": "Alguns dados nao foram preenchidos"
}
}

Dependências

Para o funcionamento deste método é necessário a dependência do pacote CtrlFileZillaServer:

sysutilapi

Métodos

Listagem de Contas

Método: contas_listar

Exemplo:

null

Retorno:

{
  "httpcode": 200,
  "body": [
    {
      "Nome": "teste1",
      "Diretorio": "C:\\",
      "Permissoes": {
        "FileRead": true,
        "FileWrite": true,
        "FileDelete": true,
        "DirCreate": true,
        "DirDelete": true,
        "DirList": true,
        "DirSubdirs": true
      }
    }
  ]
}

Criar Conta

Método: contas_criar

Exemplo:

{   
  "Conta": "testeabc",
  "Senha": "aaabbb", 
  "Diretorio": "C:\\PastaTeste1", 
  "Permissoes": {
    "FileRead": true,
    "FileWrite": true,
    "FileDelete": true,
    "DirCreate": true,
    "DirDelete": true,
    "DirList": true,
    "DirSubdirs": true
  } 
}

Retorno:

{
  "httpcode": 200
}

Verificar se Conta Existe

Método: contas_existe

Exemplo:

{   
  "Conta": "testeabc"
}

Retorno:

{
  "httpcode": 200,
  "body": true
}

Detalhes: Em body será retornado um boolean:

  • true: A conta existe
  • falae: A conta não existe

Deletar Conta

Método: contas_deletar

Exemplo:

{   
  "Conta": "testeabc"
}

Retorno:

{
  "httpcode": 200
}

Alterar Conta

Método: contas_alterar

Exemplo:

{   
  "Conta": "testeabc",
  "Senha": "aaabbb", 
  "Diretorio": "C:\\PastaTeste1", 
  "Permissoes": {
    "FileRead": true,
    "FileWrite": true,
    "FileDelete": true,
    "DirCreate": true,
    "DirDelete": true,
    "DirList": true,
    "DirSubdirs": true
  } 
}

Retorno:

{
  "httpcode": 200
}

Alterar Senha de Conta

Método: contas_alterar_senha

Exemplo:

{   
  "Conta": "testeabc",
  "Senha": "aaabbb"
}

Retorno:

{
  "httpcode": 200
}

Alterar Diretóiro de Conta

Método: contas_alterar_diretorio

Exemplo:

{   
  "Conta": "testeabc",
  "Diretorio": "C:\\PastaTeste1"
}

Retorno:

{
  "httpcode": 200
}

Alterar Permissões de Conta

Método: contas_alterar_permissoes

Exemplo:

{   
  "Conta": "testeabc",
  "Permissoes": {
    "FileRead": true,
    "FileWrite": true,
    "FileDelete": true,
    "DirCreate": true,
    "DirDelete": true,
    "DirList": true,
    "DirSubdirs": true
  } 
}

Retorno:

{
  "httpcode": 200
}

Referências

Permissões

O nó de permissões possui as permissões abaixo:

  • FileRead: Ler Arquivos
  • FileWrite: Criar/Editar Arquivos
  • FileDelete: Deletar Arquivos
  • DirCreate: Criar Diretório
  • DirDelete: Deletar Diretório
  • DirList: Listar Diretórios
  • DirSubdirs: Exibir Sub Diretórios

Os valores das variaveis é sempre um boolean, onde:

  • true: Tem permissão
  • false: Não tem permissão

Contato

Paloma Macetko