uniweb 0.12.29 → 0.12.30

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uniweb",
3
- "version": "0.12.29",
3
+ "version": "0.12.30",
4
4
  "description": "Create structured Vite + React sites with content/code separation",
5
5
  "type": "module",
6
6
  "bin": {
@@ -41,9 +41,9 @@
41
41
  "js-yaml": "^4.1.0",
42
42
  "prompts": "^2.4.2",
43
43
  "tar": "^7.0.0",
44
- "@uniweb/core": "0.7.13",
45
44
  "@uniweb/kit": "0.9.17",
46
- "@uniweb/runtime": "0.8.18"
45
+ "@uniweb/runtime": "0.8.18",
46
+ "@uniweb/core": "0.7.13"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "@uniweb/build": "0.14.13",
@@ -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
- export function makeModelResolver({ client }) {
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), so a fully-local sync — and --dry-run / -o
165
- // never authenticate when every Model is defined by the local foundation.
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
  })
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "generatedAt": "2026-06-16T22:32:52.549Z",
3
+ "generatedAt": "2026-06-16T23:17:46.927Z",
4
4
  "packages": {
5
5
  "@uniweb/build": {
6
6
  "version": "0.14.13",
@@ -99,7 +99,7 @@
99
99
  "deps": []
100
100
  },
101
101
  "@uniweb/unipress": {
102
- "version": "0.4.17",
102
+ "version": "0.4.18",
103
103
  "path": "framework/unipress",
104
104
  "deps": [
105
105
  "@uniweb/build",