Kodesentralen releases ExpanderSync: a tool to get customizations into a local file structure

Hi everyone,

While working with different customer projects, we have realized that it would be convenient to have all SuperOffice customizations in a local folder & file structure. This would make it a bit easier to get an overview, search globally for keywords, etc. It would also allow us to integrate with a code repository (e.g. github), to get change history, etc. Lots of benefits!

Consequently, we have started writing a small tool to achieve this. There are probably lots of potential for improving it, but we have found it useful in its current state and so we would like to share it with you. Perhaps some of you have some good ideas for it or would like to contribute with some improvements. Please do.

Please note: This is a open source project from Kodesentralen, not SuperOffice. It comes with no warranty whatsoever, and SuperOffice escpecially is not related to this project.

The tool has a small CRMScript that can be installed in any SuperOffice installation. It works as the REST endpoint that allows you to download and upload stuff from/to the database. The client part is a small node.js project that calls the REST endpoint and fetches the stuff and stores it in a local file structure. Currently it supports ejscripts, screens, screen choosers, extra fields/tables and extra menus. For ejscripts it supports two-way syncing based on last_modified datetimes. For the others, it currently only supports fetching.

Please make sure you know what you are doing and backup your stuff before using this tool. Don't come crying to us when your stuff is overwritten ;-)

The code can be downloaded from https://github.com/kodesentralen/expandersync

Sverre

RE: Kodesentralen releases ExpanderSync: a tool to get customizations into a local file structure

Nice! Can't wait to check it out later today.

We've got two similar tools as well. Lars has made his "node-sync" tool which does the two-way sync that you do, and I've made a script that dumps all scripts, screens, extratabledefinitions and triggers to a local file structure. It'll be nice to see how they all compare, and figure out what's missing in between.

Af: Frode Lillerud 3. sep 2020

RE: Kodesentralen releases ExpanderSync: a tool to get customizations into a local file structure

Have tested for a few minutes. I like it. This will be useful. Particularly for online customers.

I've only tested "get" functionality, not the "sync" functionality.

Some random comments so far:

- For those not used to node, remember to do an "npm install" after the "git clone".

- The URL in the command needs to be wrapped in quotes, "https://url....", at least on Windows.

- The screen_choosers table used in the example command isn't among the legal tables in the script.

- The trailing \ in the target directory in the command is important to include to get directory stucture correct.

- This tool is veeeery powerful. The key is extremely important to keep unique and secret for each customer. Can't stress that enough!

Af: Frode Lillerud 3. sep 2020

RE: Kodesentralen releases ExpanderSync: a tool to get customizations into a local file structure

This is a very nice way of keeping track of customizations on customers :) 

I actually started working on something similar a while back, but figured adding intellisense in vscode (to edit the files locally) was to much of a hassle.


//Eivind


Af: Eivind Johan Fasting 4. sep 2020