Skip to content

📂 file-collector is a CLI to load information from static files into the topo server.

License

Notifications You must be signed in to change notification settings

architecture-topography/file-collector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CircleCI

File Collector

The file collector will read from a topo diagram from a json file and call the correct mutations in TOPO to create the diagram.

Running locally

To run locally with node-ts (basically compiling typescript on the fly).

  1. Install all the dependecies with yarn install.
  2. Run yarn start.

Testing

  1. Install all the dependencies with yarn install.
  2. Run unit tests with yarn test.

Building and packaging

To build the TypeScript into javascript that you can run with node. Follow the following steps.

  1. Install all the dependencies with yarn install.
  2. Build with yarn build. All the compiled javascript will be in the lib directory.

To package into binaries. Run yarn package and the packaged binaries will be in the packaged directory.

Usage

Depending on whether your running with yarn start of with one of the packaged binaries, the start of your command will be different. The examples below assume that you're using the osx binary.

To run a demo file on a locally running topo instance you would run the following.

./packaged/file-collector-macos -f examples/demo.json --host 'http://localhost:4000'

This should give you output similar to

[cli] TOPO File Collector
[topoInterface] Deleted existing data
[topoInterface] Created technology: React
[topoInterface] Created technology: Ruby on Rails
[topoInterface] Created technology: Elixir
[topoInterface] Created box: ThoughtWorks
[topoInterface] Created box: Staffing
[topoInterface] Created box: Finance
[topoInterface] Created box: People
[topoInterface] Created box: Professional Services
[topoInterface] Created box: Demand
[topoInterface] Created box: Selling Work
[topoInterface] Created System: Sales Funnel

A couple of things to note:

  • This will try to make as much as possible. It wont cancel out after an error
  • It always starts by deleting all the nodes in topo. The assumption is that the JSON file is the source of truth.

About

📂 file-collector is a CLI to load information from static files into the topo server.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •