Zum Hauptinhalt springen
Markdown anzeigen

Configuration Files

When using the SDK, you will notice that a couple of configuration files are being created:

1. Application Manifest (zeyos.app.json)​

Describes the application's properties and represents the properties of all included assets

JSON
{
"identifier": "myapp",
"name": "My Application",
"version": 10000,
"vendor": "Company Name",
"services": {
"reminder": {
"type": "timing",
"schedule": 600,
"interval": 60
}
},
"resources": {
"logo": {
"mimetype": "image/png",
"public": 1
}
},
"weblets": {
"dashboard": {
"type": "popup_framed",
"width": 800,
"height": 600
}
}
}

2. The ZeyOS Sync File (sync.json)​

The sync.json file is created whenever you are syncing an application with a ZeyOS instance.

The instance configuration stores the authentication information when executing zeysdk link [INSTANCE_ID]. By using zeysdk use [INSTANCE_ID] a user can switch between different instances.

JSON
Example:

{
"id": "instance-id",
"url": "platform-url",
"syncstates": {
"settings": {
"hash": "file-hash",
"lastmodified": "timestamp"
},
"defaultsettings": {
"hash": "file-hash",
"lastmodified": "timestamp"
},
"services": {},
"resources": {},
"weblets": {}
}
}

The sync configuration consists of two core sections:

1. Connection Settings
JSON
{
"id": "instance-id",
"url": "https://platform-url"
}
  • Updated automatically when running zeysdk link
  • Contains platform URL
  • Manages instance connection details
2. Sync States
JSON
{
"syncstates": {
"settings": {
"hash": "file-hash",
"lastmodified": 1234567890
},
"services": {},
"resources": {},
"weblets": {}
}
}
  • Tracks file states for settings, resources, services, weblets, and assets
  • Uses hashes for change detection
  • Stores the server-returned lastmodified timestamp for synced items
  • Manages synchronization between local and server files

Sync Scenarios​

New Files (Empty States)

When no sync hash exists:

ScenarioActionResolution Options
File doesn't exist on serverAuto-createN/A
File exists on serverConflict• theirs: Use server version• mine: Use local version
Existing Files (With States)

When a sync hash exists:

ScenarioActionResolution Options
File missing on serverConflict• theirs: Remove locally• mine: Create on server
States don't matchConflict• theirs: Use server version• mine: Use local version
States matchAuto-syncCopy to server

We highly recommend using the SDK's interface to edit those file and restrain from editing them directly.

However, in some cases you might want to automate certain tasks through additional scripts and task runners - in such cases it is certainly useful to have a better understanding about the underlying file structure and properties.

BE CAREFUL WHEN MANIPULATING THE SYNC STATES, YOU ARE PUTTING YOUR SYSTEM INTEGRITY AT RISK!