@glance-apps/sync 1.0.2 → 1.0.3

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/CHANGELOG.md CHANGED
@@ -7,6 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.0.3] - 2026-05-23
11
+
12
+ ### Fixed
13
+
14
+ - **Generic WebDAV — `appFolderName` not used in URLs**: `getFileUrl` and
15
+ `getDirUrl` now insert `appFolderName` between the server root and the sync
16
+ filename, matching the behaviour of the Nextcloud and Koofr providers.
17
+ `webdavUrl` is now expected to be a server root (e.g. `https://dav.example.com`)
18
+ rather than a full folder path. Callers with an existing `webdavUrl` that
19
+ already includes the folder path should migrate it into `syncFolder`/`appFolderName`
20
+ and strip the path back to the origin.
21
+ - **Generic WebDAV — Apache 403 on missing parent directories**: `upload` now
22
+ calls `mkcolWithParents` when PUT returns 403 in addition to 404/409. Apache
23
+ `mod_dav` returns 403 (not 409) when both the target directory and its parent
24
+ are absent. The `if (res.status === 403) throw FORBIDDEN` guard that follows
25
+ still catches genuine auth failures after the retry.
26
+
10
27
  ## [1.0.2] - 2026-05-22
11
28
 
12
29
  ### Added
@@ -58,5 +75,8 @@ entire sync infrastructure can be shared across the GLANCE app family.
58
75
  - TypeScript declarations in `types/index.d.ts`.
59
76
  - WebDAV CORS proxy handler in `api/webdav-proxy.js`.
60
77
 
61
- [Unreleased]: https://github.com/glance-apps/glance-sync/compare/v1.0.0...HEAD
78
+ [Unreleased]: https://github.com/glance-apps/glance-sync/compare/v1.0.3...HEAD
79
+ [1.0.3]: https://github.com/glance-apps/glance-sync/compare/v1.0.2...v1.0.3
80
+ [1.0.2]: https://github.com/glance-apps/glance-sync/compare/v1.0.1...v1.0.2
81
+ [1.0.1]: https://github.com/glance-apps/glance-sync/compare/v1.0.0...v1.0.1
62
82
  [1.0.0]: https://github.com/glance-apps/glance-sync/releases/tag/v1.0.0
package/README.md CHANGED
@@ -169,7 +169,7 @@ TypeScript declarations for all of the above are in `types/index.d.ts`.
169
169
 
170
170
  ## Versioning
171
171
 
172
- This package is at **v1.0.0** and follows [Semantic Versioning](https://semver.org/). Breaking changes to the public API or the sync envelope schema will result in a major version bump.
172
+ This package follows [Semantic Versioning](https://semver.org/). Breaking changes to the public API or the sync envelope schema will result in a major version bump.
173
173
 
174
174
  ## License
175
175
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glance-apps/sync",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/providers.js CHANGED
@@ -261,9 +261,9 @@ export function createProviders(engineConfig) {
261
261
  webdav: {
262
262
  name: 'Generic WebDAV',
263
263
  getFileUrl: (config) =>
264
- `${config.webdavUrl.replace(/\/+$/, '')}/${syncFilename}`,
264
+ `${config.webdavUrl.replace(/\/+$/, '')}/${appFolderName}/${syncFilename}`,
265
265
  getDirUrl: (config) =>
266
- `${config.webdavUrl.replace(/\/+$/, '')}/`,
266
+ `${config.webdavUrl.replace(/\/+$/, '')}/${appFolderName}/`,
267
267
  getAuthHeaders: (config) => ({
268
268
  'X-WebDAV-Auth': 'Basic ' + toBase64(config.username + ':' + config.appPassword)
269
269
  }),
@@ -277,7 +277,7 @@ export function createProviders(engineConfig) {
277
277
  if (etag) extraHeaders['If-Match'] = etag;
278
278
  const doUpload = () => wf('PUT', fileUrl, authHeaders, body, extraHeaders);
279
279
  let res = await doUpload();
280
- if (res.status === 404 || res.status === 409) {
280
+ if (res.status === 404 || res.status === 409 || res.status === 403) {
281
281
  await mkcol(dirUrl, authHeaders);
282
282
  res = await doUpload();
283
283
  }
@@ -307,11 +307,11 @@ export function createProviders(engineConfig) {
307
307
  return { success: false, error: `Unexpected response: ${res.status}${res.statusText ? ' ' + res.statusText : ''}` };
308
308
  },
309
309
  configFields: [
310
- { key: 'webdavUrl', label: 'WebDAV URL', type: 'url', placeholder: 'https://dav.example.com/dayGLANCE/' },
310
+ { key: 'webdavUrl', label: 'WebDAV URL', type: 'url', placeholder: 'https://dav.example.com' },
311
311
  { key: 'username', label: 'Username', type: 'text', placeholder: 'your-username' },
312
312
  { key: 'appPassword', label: 'Password / App Password', type: 'password', placeholder: 'your-password' }
313
313
  ],
314
- helpText: 'Enter the full URL of the WebDAV folder where dayGLANCE should store its sync file. pCloud, Seafile, and most self-hosted WebDAV providers are supported.'
314
+ helpText: 'Enter the server root URL (e.g. https://dav.example.com). The sync folder is configured separately via the Sync Folder setting. pCloud, Seafile, and most self-hosted WebDAV providers are supported.'
315
315
  }
316
316
  };
317
317
  }