shiply-cli 0.27.0 → 0.27.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/preflight.js CHANGED
@@ -106,7 +106,11 @@ export async function runNextPreflight(dir) {
106
106
  }
107
107
  // -- missing-build / stale-build-state: never publish raw Next SOURCE as a
108
108
  // static site (today's silent worst case), and warn when the app was
109
- // rebuilt but the worker bundle wasn't.
109
+ // rebuilt but the worker bundle wasn't. Presence-check worker.js, but
110
+ // compare freshness against handler.mjs — worker.js is a TEMPLATE the
111
+ // OpenNext build copies with its package-install mtime preserved
112
+ // (observed 26h stale on a fresh build); handler.mjs is genuinely
113
+ // regenerated every bundling run.
110
114
  const workerBuilt = await mtimeMs(join(dir, '.open-next', 'worker.js'));
111
115
  if (!isStaticExport) {
112
116
  if (workerBuilt === null) {
@@ -119,8 +123,9 @@ export async function runNextPreflight(dir) {
119
123
  });
120
124
  }
121
125
  else {
126
+ const bundled = await mtimeMs(join(dir, '.open-next', 'server-functions', 'default', 'handler.mjs'));
122
127
  const appBuilt = await mtimeMs(join(dir, '.next', 'BUILD_ID'));
123
- if (appBuilt !== null && appBuilt > workerBuilt + 60_000) {
128
+ if (bundled !== null && appBuilt !== null && appBuilt > bundled + 60_000) {
124
129
  findings.push({
125
130
  id: 'stale-build-state',
126
131
  level: 'warn',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shiply-cli",
3
- "version": "0.27.0",
3
+ "version": "0.27.1",
4
4
  "description": "Publish static sites to shiply.now from the command line \u00e2\u20ac\u201d instant web hosting for agents.",
5
5
  "license": "MIT",
6
6
  "type": "module",