We wanted to republish a statically published site from a TypeScript scheduled task. Since @webhare/whfs has no folder republish, we called republish() on every file from site.listRecursive(), inside whdb.runInWork().
Expected: the files get queued and republished. What happened: nothing. system.fs_objects.published stayed at 900000 for a published file (id 66194) before, during and after the work, and lastpublishdate did not change. No error. Calling ScheduleFolderRepublish from mod::publisher/lib/control.whlib via loadlib in the same kind of script did republish all files within seconds.
Measured on a local install built from master 43ed756 (2026-09-24).
What stands out, from reading the code: convertToWillPublish in jssdk/whfs/src/support.ts (line 103) passes curPrioOrError (published % 100000, which is 0 for a published file that is not queued) to isPublish(), so the "once published" flag is never seen and the function returns early. The HareScript ConvertToWillPublish in system/lib/internal/whfs/support.whlib (line 91) checks the once-published flag on the full value. The same call with enablePublishIfDisabled = false also appears in objects.ts (line 362) and finishhandler.ts (line 55); we did not measure those paths.
Separately: is a folder/site republish from TypeScript planned, or is loadlib + ScheduleFolderRepublish the intended route for now?
Happy to put together a minimal module that reproduces this, if that helps.
We wanted to republish a statically published site from a TypeScript scheduled task. Since
@webhare/whfshas no folder republish, we calledrepublish()on every file fromsite.listRecursive(), insidewhdb.runInWork().Expected: the files get queued and republished. What happened: nothing.
system.fs_objects.publishedstayed at 900000 for a published file (id 66194) before, during and after the work, andlastpublishdatedid not change. No error. CallingScheduleFolderRepublishfrommod::publisher/lib/control.whlibvialoadlibin the same kind of script did republish all files within seconds.Measured on a local install built from master 43ed756 (2026-09-24).
What stands out, from reading the code:
convertToWillPublishinjssdk/whfs/src/support.ts(line 103) passescurPrioOrError(published % 100000, which is 0 for a published file that is not queued) toisPublish(), so the "once published" flag is never seen and the function returns early. The HareScriptConvertToWillPublishinsystem/lib/internal/whfs/support.whlib(line 91) checks the once-published flag on the full value. The same call withenablePublishIfDisabled = falsealso appears inobjects.ts(line 362) andfinishhandler.ts(line 55); we did not measure those paths.Separately: is a folder/site republish from TypeScript planned, or is
loadlib+ScheduleFolderRepublishthe intended route for now?Happy to put together a minimal module that reproduces this, if that helps.