uniweb 0.12.5 → 0.12.6
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/package.json +5 -5
- package/src/commands/deploy.js +25 -4
- package/src/commands/publish.js +5 -5
- package/src/index.js +13 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uniweb",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.6",
|
|
4
4
|
"description": "Create structured Vite + React sites with content/code separation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -41,14 +41,14 @@
|
|
|
41
41
|
"js-yaml": "^4.1.0",
|
|
42
42
|
"prompts": "^2.4.2",
|
|
43
43
|
"tar": "^7.0.0",
|
|
44
|
+
"@uniweb/kit": "0.9.9",
|
|
44
45
|
"@uniweb/runtime": "0.8.10",
|
|
45
|
-
"@uniweb/core": "0.7.9"
|
|
46
|
-
"@uniweb/kit": "0.9.9"
|
|
46
|
+
"@uniweb/core": "0.7.9"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"@uniweb/build": "0.13.3",
|
|
50
|
-
"@uniweb/
|
|
51
|
-
"@uniweb/
|
|
50
|
+
"@uniweb/semantic-parser": "1.1.16",
|
|
51
|
+
"@uniweb/content-reader": "1.1.9"
|
|
52
52
|
},
|
|
53
53
|
"peerDependenciesMeta": {
|
|
54
54
|
"@uniweb/build": {
|
package/src/commands/deploy.js
CHANGED
|
@@ -254,10 +254,31 @@ async function inspectLocalFoundationReceipt(localPath, { dirtyAsStale, registry
|
|
|
254
254
|
return { stale: true, reason: 'foundation directory is not in a git repo or has no commits', receipt }
|
|
255
255
|
}
|
|
256
256
|
if (receipt.publishedFromGitSha && receipt.publishedFromGitSha !== gitSha) {
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
257
|
+
// Receipt's recorded sha differs from the foundation's per-directory
|
|
258
|
+
// last-touched commit. Normally that's "real" staleness — somebody
|
|
259
|
+
// committed changes to src/ that haven't been republished.
|
|
260
|
+
//
|
|
261
|
+
// Exception: when the publish was made FROM A DIRTY tree, the
|
|
262
|
+
// recorded sha is a checkpoint, not an identity. The published
|
|
263
|
+
// artifact reflects the committed state at that sha PLUS the
|
|
264
|
+
// uncommitted changes that were on disk when publish ran. After
|
|
265
|
+
// those changes get committed (a normal post-deploy housekeeping
|
|
266
|
+
// step — e.g., committing the auto-derived `uniweb.id`), the
|
|
267
|
+
// per-foundation sha moves forward, but the artifact upstream
|
|
268
|
+
// hasn't materially changed. Don't fire staleness on the sha
|
|
269
|
+
// alone in that case; let the dirty-tree check below do its job
|
|
270
|
+
// if the tree IS still dirty, and otherwise treat as fresh.
|
|
271
|
+
//
|
|
272
|
+
// Edge: if the user committed real source changes ON TOP of the
|
|
273
|
+
// auto-derive in the same commit, we won't detect that as stale
|
|
274
|
+
// here — the next publish would 409 against the registry though,
|
|
275
|
+
// surfacing the issue with a clear "bump the version" message.
|
|
276
|
+
if (!receipt.publishedFromGitDirty) {
|
|
277
|
+
return {
|
|
278
|
+
stale: true,
|
|
279
|
+
reason: `foundation has new commits since last publish (${receipt.publishedFromGitSha.slice(0, 7)} → ${gitSha.slice(0, 7)})`,
|
|
280
|
+
receipt,
|
|
281
|
+
}
|
|
261
282
|
}
|
|
262
283
|
}
|
|
263
284
|
if (gitDirty && dirtyAsStale) {
|
package/src/commands/publish.js
CHANGED
|
@@ -293,9 +293,9 @@ export async function publish(args = []) {
|
|
|
293
293
|
// the receipt-as-cache work shipped). Clean error before
|
|
294
294
|
// any build work.
|
|
295
295
|
console.log('')
|
|
296
|
-
error(
|
|
296
|
+
error(`Foundation source has changed since the last publish, but ${colors.bright}${lookupName}@${preflightVersion}${colors.reset} is already published.`)
|
|
297
297
|
console.log('')
|
|
298
|
-
console.log(` Bump
|
|
298
|
+
console.log(` Bump ${colors.cyan}package.json::version${colors.reset} to publish an update:`)
|
|
299
299
|
console.log(` ${colors.dim}"version": "${bumpPatch(preflightVersion)}"${colors.reset}`)
|
|
300
300
|
process.exit(1)
|
|
301
301
|
}
|
|
@@ -686,10 +686,10 @@ export async function publish(args = []) {
|
|
|
686
686
|
}
|
|
687
687
|
}
|
|
688
688
|
console.log('')
|
|
689
|
-
error(
|
|
689
|
+
error(`Foundation source has changed since the last publish, but ${colors.bright}${name}@${version}${colors.reset} is already published.`)
|
|
690
690
|
console.log('')
|
|
691
|
-
console.log(` Bump
|
|
692
|
-
console.log(` ${colors.dim}
|
|
691
|
+
console.log(` Bump ${colors.cyan}package.json::version${colors.reset} to publish an update:`)
|
|
692
|
+
console.log(` ${colors.dim}"version": "${bumpPatch(version)}"${colors.reset}`)
|
|
693
693
|
process.exit(1)
|
|
694
694
|
}
|
|
695
695
|
|
package/src/index.js
CHANGED
|
@@ -440,9 +440,20 @@ async function main() {
|
|
|
440
440
|
return
|
|
441
441
|
}
|
|
442
442
|
|
|
443
|
-
// Global install launcher: delegate project-bound commands to local CLI
|
|
443
|
+
// Global install launcher: delegate project-bound commands to local CLI.
|
|
444
|
+
//
|
|
445
|
+
// Escape hatch: `UNIWEB_DISABLE_LOCAL_DELEGATION=1` forces the in-process
|
|
446
|
+
// CLI to handle the command itself, even when a project-local copy of
|
|
447
|
+
// `uniweb` is installed. This exists for the workspace-ergonomics eval
|
|
448
|
+
// harness — when it points the eval at `node $WORKSPACE_ROOT/.../index.js`
|
|
449
|
+
// it expects to exercise the workspace source, not whatever `uniweb`
|
|
450
|
+
// version is symlinked under the test fixture's `node_modules`. Without
|
|
451
|
+
// the escape, evals silently test the published npm version and any
|
|
452
|
+
// unpublished workspace fixes are invisible. See
|
|
453
|
+
// `kb/framework/build/workspace-ergonomics-runbook.md` (`--cli=workspace`).
|
|
444
454
|
const global = isGlobalInstall()
|
|
445
|
-
|
|
455
|
+
const skipDelegation = process.env.UNIWEB_DISABLE_LOCAL_DELEGATION === '1'
|
|
456
|
+
if (global && !skipDelegation && command && !STANDALONE_COMMANDS.has(command)) {
|
|
446
457
|
const localCli = findLocalCli()
|
|
447
458
|
if (localCli) {
|
|
448
459
|
await delegateToLocal(localCli)
|