uniweb 0.12.29 → 0.12.31
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 +2 -2
- package/src/commands/push.js +13 -5
- package/src/framework-index.json +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uniweb",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.31",
|
|
4
4
|
"description": "Create structured Vite + React sites with content/code separation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@uniweb/runtime": "0.8.18"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@uniweb/build": "0.14.
|
|
49
|
+
"@uniweb/build": "0.14.14",
|
|
50
50
|
"@uniweb/content-reader": "1.1.12",
|
|
51
51
|
"@uniweb/semantic-parser": "1.1.17"
|
|
52
52
|
},
|
package/src/commands/push.js
CHANGED
|
@@ -122,11 +122,17 @@ function changedSummary(finalized) {
|
|
|
122
122
|
// (the `@uniweb/data-schema` form) from the backend via the client. Cached per run;
|
|
123
123
|
// HTTP 404 → null (the emitter then says "register it first"). The bearer is acquired
|
|
124
124
|
// lazily by the client, so a fully-local sync never authenticates.
|
|
125
|
-
|
|
125
|
+
//
|
|
126
|
+
// `offline` (set for `-o` / `--dry-run`) forces every non-local Model to null WITHOUT
|
|
127
|
+
// touching the backend — an offline emit must never authenticate. The collections
|
|
128
|
+
// emitter then soft-skips a convention-defaulted schema with a warning ("not synced")
|
|
129
|
+
// and still emits the site-content lane; an EXPLICIT non-local schema surfaces as a
|
|
130
|
+
// clear "could not be resolved" error rather than an auth prompt.
|
|
131
|
+
export function makeModelResolver({ client, offline = false }) {
|
|
126
132
|
const cache = new Map()
|
|
127
133
|
return async (modelName) => {
|
|
128
134
|
if (cache.has(modelName)) return cache.get(modelName)
|
|
129
|
-
const decl = await client.readDataSchema(modelName)
|
|
135
|
+
const decl = offline ? null : await client.readDataSchema(modelName)
|
|
130
136
|
cache.set(modelName, decl)
|
|
131
137
|
return decl
|
|
132
138
|
}
|
|
@@ -161,8 +167,10 @@ export async function push(args = []) {
|
|
|
161
167
|
const foundationDir = flagValue(args, '--foundation')
|
|
162
168
|
const sendAll = args.includes('--all') // bypass the send-only-changed cache
|
|
163
169
|
// One front door. The bearer is resolved lazily on first need (a non-local Model
|
|
164
|
-
// read during the build, or the submit)
|
|
165
|
-
//
|
|
170
|
+
// read during the build, or the submit). Offline emit (--dry-run / -o) is fully
|
|
171
|
+
// offline: it never submits, and its Model resolver never reads from the backend
|
|
172
|
+
// (the `offline` flag below), so it never authenticates — even when a collection
|
|
173
|
+
// references a Model the local foundation doesn't define.
|
|
166
174
|
const client = new BackendClient({
|
|
167
175
|
originFlag: flagValue(args, '--registry'),
|
|
168
176
|
token: tokenFlag,
|
|
@@ -181,7 +189,7 @@ export async function push(args = []) {
|
|
|
181
189
|
try {
|
|
182
190
|
pkg = await emitSyncPackages(siteDir, {
|
|
183
191
|
...(foundationDir ? { foundationDir } : {}),
|
|
184
|
-
resolveModel: makeModelResolver({ client }),
|
|
192
|
+
resolveModel: makeModelResolver({ client, offline: Boolean(output) || dryRun }),
|
|
185
193
|
priorHashes,
|
|
186
194
|
sendAll,
|
|
187
195
|
})
|
package/src/framework-index.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"generatedAt": "2026-06-
|
|
3
|
+
"generatedAt": "2026-06-17T05:20:13.929Z",
|
|
4
4
|
"packages": {
|
|
5
5
|
"@uniweb/build": {
|
|
6
|
-
"version": "0.14.
|
|
6
|
+
"version": "0.14.14",
|
|
7
7
|
"path": "framework/build",
|
|
8
8
|
"deps": [
|
|
9
9
|
"@uniweb/content-reader",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"deps": []
|
|
100
100
|
},
|
|
101
101
|
"@uniweb/unipress": {
|
|
102
|
-
"version": "0.4.
|
|
102
|
+
"version": "0.4.19",
|
|
103
103
|
"path": "framework/unipress",
|
|
104
104
|
"deps": [
|
|
105
105
|
"@uniweb/build",
|