SlimIO Synchronize. This tool has been created to help Developer and Integrator to work, download and verify each local SlimIO repositories.
Note: This project can work with any github Organisation (only the psp command is dedicated to SlimIO).
Requirements
- Node.js v12 or higher
Getting Started
This package is not yet available on npm. Currently simple for our team to clone and run a link.
$ git clone https://github.com/SlimIO/Sync.git
$ cd Sync
$ npm ci
$ npm linkEnvironment Variables
To configure the project you have to register (set) environment variables on your system. These variables can be set in a .env file (that file must be created at the root of the project).
GIT_TOKEN=
GITHUB_ORGA=
NPM_TOKEN=
TOML=true
To known how to get a GIT_TOKEN and NPM_TOKEN or how to register environment variables follow our Governance Guide.
Usage example
$ psync install # or $ psync outdated # or $ psync psp
To show help just type
Synchronizing all projects (or some given projects).
The install command has been build to install and sync all SlimIO projects automatically.
To pickup some given project (by their github name):
psync install --pick Scheduler,Addon,Core
If your need is only to clone repositories (which is faster) just add the --noinstall option.
Windows users
Windows Defender must be a problem for the install command. The following script will prevent Windows Defender to scan Node.js or npm commands and binaries...
Write-Host "Excluding appdata NPM folder and Node.JS install folder from Windows Defender." Add-MpPreference -ExclusionPath ([System.Environment]::ExpandEnvironmentVariables("%APPDATA%\npm\")) Add-MpPreference -ExclusionPath (Get-ItemProperty "HKLM:SOFTWARE\Node.js" | Select-Object -Property InstallPath) Write-Host "Excluding node related executables from Windows Defender." ("node", "node.exe", "Expo XDE.exe", "yarn", "yarn.exe") | foreach {Add-MpPreference -ExclusionProcess $_}
Note: powershell script extension is ps1.
API
TBC
Dependencies
| Name | Refactoring | Security Risk | Usage |
|---|---|---|---|
| @iarna/toml | Minor | Low | Better TOML parsing and stringifying all in that familiar JSON interface. |
| @slimio/async-cli-spinner | Minor | Low | Elegant Asynchronous Terminal (CLI) Spinner |
| @slimio/lazy | Minor | Low | Setup Lazy evaluation on JavaScript Objects |
| @slimio/lock | Minor | Low | Semaphore for async/await |
| @slimio/pretty-json | Minor | Low | Stdout beautified JSON |
| @slimio/psp | Minor | High | SlimIO projects structure policies |
| cliui | Minor | High | Create complicated column design in the terminal |
| dotenv | Minor | Low | Loads environment variables from .env |
| fast-levenshtein | Minor | Low | An efficient Javascript implementation of the Levenshtein algorithm. |
| fast-outdated | Minor | High | Javascript implementation of npm outdated command |
| fetch-github-repositories | Minor | Low | Fetch github repositories |
| httpie | Minor | Low | A Node.js HTTP client as easy as pie! |
| isomorphic-git | Minor | High | Pure Javascript git implementation |
| kleur | Minor | Low | The fastest Node.js library for formatting terminal text with ANSI colors |
| lodash.pick | Minor | Low | Pick items in a given Object |
| make-promises-safe | ⚠️Major | Low | Force Node.js DEP00018 |
| ms | Minor | Low | Convert various time formats to milliseconds. |
| open | Minor | High | Open stuff like URLs, files, executables. Cross-platform. |
| qoa | Minor | Low | Minimal interactive command-line prompts |
| sade | Minor | Low | Sade is a small but powerful tool for building command-line interface (CLI) applications for Node.js that are fast, responsive, and helpful! |
| semver | ⚠️Major | Low | Semver parser/utilities for node |
License
MIT
