Skip to main content
View Markdown

Update Asset

The update command changes an existing manifest entry without modifying the local asset file.

Bash
zeysdk update <ASSET_PATH> [options]

Parameters

ParameterDescriptionRequiredExample
ASSET_PATHAsset path including class directory and filenameYesservices/my-service.ixml

Options

OptionDescription
--verboseShow detailed output
--name <name>Asset name
--type <type>Service or weblet type; case-insensitive
--view <view>Weblet view
--entity <entity>Entity for an entity-triggered service
--schedule <minutes>TIMING start time as an integer from 0 to 1439
--interval <minutes>TIMING interval as an integer of at least 1
--public <value>Resource public flag (0 or 1)
--url <url>Empty or an http:///https:// URL for a weblet or service
--accesskey <key>HTTP access key for REMOTECALL services
--width <pixels>Popup or embedded weblet width; non-negative integer
--height <pixels>Popup or embedded weblet height; non-negative integer
--svgpath <path>SVG path for an INTEGRATED, STANDALONE, or DETACHED icon
--color <hex>Three or six uppercase hex digits without #
--langaliases <json>Language aliases as valid JSON text; an empty value stores null

Any metadata flag selects non-interactive mode and merges applicable values over the existing entry. With no metadata flags, services, resources, and weblets use interactive prompts. Generic assets preserve their existing content and have no editable metadata prompts.

Validation and Behavior

  1. Requires zeyos.app.json and an existing asset key.
  2. Rejects absolute paths, traversal, symbolic-link path components, and invalid characters.
  3. For services, resources, and weblets, requires the supplied extension to match the MIME type registered in the manifest. Use rename to change an extension.
  4. Validates type-specific metadata, then rewrites only the selected manifest entry. The local file contents are not read or changed.

Service and weblet types are the same as for add. Type flags are normalized to uppercase. Entity-triggered services require an entity; --schedule and --interval enforce the documented TIMING ranges. Popup and embedded weblets use dimensions, while integrated, standalone, and detached weblets use SVG path and color.

Service Types

TypeDescriptionScheduleInterval
TIMINGScheduled taskMinutes from midnight (0-1439)Integer of at least 1
REMOTECALLExternal API callN/AN/A
AFTER_CREATIONPost-create hookN/AN/A
BEFORE_MODIFICATIONPre-update hookN/AN/A
AFTER_MODIFICATIONPost-update hookN/AN/A
AFTER_CREATION_MODIFICATIONCombined hookN/AN/A
BEFORE_DELETIONPre-delete hookN/AN/A
AFTER_DELETIONPost-delete hookN/AN/A

Weblet Types

TypeDescriptionWidth/Height
INTEGRATEDIn-app webletNot used
STANDALONEIndependent windowNot used
DETACHEDFloating windowNot used
POPUP_FRAMEDModal with frameNon-negative integers
POPUP_PLAINModal without titleNon-negative integers
EMBEDDED_FRAMEDInline with frameNon-negative integers
EMBEDDED_COLLAPSEDCollapsible panelNon-negative integers
EMBEDDED_PLAINInline without frameNon-negative integers

Examples

Bash
# Change a timing interval while preserving other service metadata
zeysdk update services/daily-backup.ixml --interval 720

# Change a service type; entity hooks require an entity
zeysdk update services/contact-hook.ixml \
--type AFTER_MODIFICATION --entity contacts

# Change a weblet to an integrated type with icon metadata
zeysdk update weblets/customer-view.ixml \
--type INTEGRATED --view customers.index \
--color 4287F5 --svgpath 'M10 10h100v100h-100z'

# Update resource metadata
zeysdk update resources/company-logo.png \
--name "Company Brand Logo" --public 1

# Clear optional values explicitly
zeysdk update services/remote-call.ixml --url '' --accesskey ''
zeysdk update weblets/customer-view.ixml --langaliases ''

Error Handling

ErrorDescriptionResolutionExample
Invalid asset classUnsupported typeUse correct classservices/backup.ixml not service/backup.ixml
Missing app.jsonConfig file not foundInitialize appRun zeysdk create first
Asset not foundAsset doesn't existCreate assetRun zeysdk add first
Invalid filenameBad characters or unsafe pathKeep the path inside its asset directoryUse services/backup-daily.ixml
Extension mismatchPath extension differs from the registered MIME typeUse the registered filename or renameDo not update a .png resource as .jpg
Invalid typeWrong service/weblet typeUse valid typeUse TIMING not SCHEDULED
Invalid scheduleNot an integer from 0 to 1439Use minutes from midnightUse 1410 for 23:30
Invalid intervalNot an integer of at least 1Use a positive minute countUse 1440 for daily
Invalid dimensionsNot a non-negative integerUse pixels without unitsUse 800 not 800px
Invalid colorIncludes #, lowercase, or wrong lengthUse 3 or 6 uppercase hex digitsUse 4287F5

Notes

  • update changes metadata, not the asset file contents
  • Service and weblet prompts depend on the selected type.
  • Resource visibility is controlled by the public metadata field
  • Use zeysdk compare after updates to review pending metadata changes
  • Empty strings can clear optional URL, access-key, view, icon, and language-alias values where applicable.