@iac-factory/git-clone
TypeScript icon, indicating that this package has built-in type declarations

0.4.9 • Public • Published

@iac-factory/git-clone

Anything with a is a dropdown containing additional, contextual information.

Overview

While seemingly a double negative, @iac-factory/git-utility is a commandline tool that aims to extend git via a few notable ways:

  • Utilities around npm + package.json metadata
  • Recursive cloning of one or more remotes + submodules
  • Interactive cli -- useful for harder-to-remember rev-parse commands
  • Encompasses common command(s) into single executables
  • Built with continuous integration top of mind
  • Lower level file-system + operating system handling

Interestingly, @iac-factory/git-utility also comes with a cheat-sheet:

npx @iac-factory/git-utility --git-cheatsheet

Setup (Local Development)

# --> (1) Clone the repository
# --> (2) Change into the local clone's directory

cd "$(git rev-parse --show-toplevel)" && npm install

Usage(s)

Security Disclaimer ⓘ

Disclaimer

CLI utilities can be incredibly dangerous.

  • stdin, os.exec, and shells are easy to interface and therefore exploit.
  • Having the ability to issue os.exec or interface stdin always makes the application dangerous.
  • Protecting against harmful bugs or malicious actors isn't difficult if the application's logic is handled correctly, and precautions are made to disable REPLs (but allowing SIGKILL, SIGSTOP, and other user-controlled signals).

A language's packaging utility (npx, pep, cargo, etc.) extends some amazing capabilities, but should never have the opportunity to be taken advantage of (Development Supply-Chain Attacks).

Ensure due diligence in writing cli applications.

.npmrc

The following section is required.

; GitHub `npm` Configuration for the `@iac-factory` Scope
@iac-factory:registry = https://npm.pkg.github.com

; Scope Authentication - See EOF (1) Reference 
//npm.pkg.github.com/:_authToken=[TOKEN]

# /// (1) https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token
Advanced Configuration ⓘ

~/.npmrc

; For reference, every programming language's package-manager
; has a similar *.*rc (dot-rc) related setup (few exceptions
; include Go, C, etc.)

;
; Defaults := $ npm config ls --list
;          -> $ npm config ls --json

fund = false
cache = ~/.npm
prefix = /usr/local
package-lock = true
engine-strict = false

# --> loglevel = debug

registry = https://registry.npmjs.org/

; Package Initialization

; Personal Preference
init.author.email = jacob.sanders@cloudhybrid.io
init.author.name = Jacob B. Sanders
init.author.url = https://github.com/iac-factory
init.license = BSD-2-Clause
init.version = 0.0.1

; @cloud-technology:registry=https://gitlab.cloud-technology.io/api/v4/packages/npm/
; @iac-factory:registry=https://gitlab.cloud-technology.io/api/v4/packages/npm/

bin-links = true

; GitHub `npm` Configuration for the `@cloud-technology` Scope
@cloud-technology:registry = https://npm.pkg.github.com

; GitHub `npm` Configuration for the `@iac-factory` Scope
@iac-factory:registry = https://npm.pkg.github.com

; Scope Authentication - See EOF (1) Reference
; //npm.pkg.github.com/:_authToken=[TOKEN]

# /// (1) https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token

References

Regardless of involvements with the project, please acknowledge the following philosophies:

Releasing & Deployments ⓘ

Release Management

In order to release a new version(s) of applicable packages,

cd "$(git rev-parse --show-toplevel)" && npm publish

A series of prompts will follow if applicable to candidate.

Readme

Keywords

none

Package Sidebar

Install

npm i @iac-factory/git-clone

Weekly Downloads

1

Version

0.4.9

License

BSD-2-Clause

Unpacked Size

66.7 kB

Total Files

34

Last publish

Collaborators

  • segmentational