shared-hosting-sync 0.1.0 → 0.1.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
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.3 — 27 October 2026
4
+
5
+ - Add a styled console startup banner with app version and creator contact details,
6
+ terminal-aware colors, and a compact layout for narrow terminals.
7
+ - Add a dedicated dashboard About & Help section with creator details, the running
8
+ version, setup guidance, troubleshooting, and documentation links.
9
+ - Keep unfinished project setup intact while About & Help is open.
10
+
11
+ ## 0.1.1 — 26 October 2026
12
+
13
+ - Fix dashboard “Edit setup” so saved projects can change their local folder,
14
+ including after the original folder has moved.
15
+ - Retain the existing project, saved credentials, and server destination when
16
+ changing folders, and load environment settings from the replacement folder.
17
+ - Reject replacement folders already assigned to another project.
18
+
3
19
  ## 0.1.0 — 21 October 2026
4
20
 
5
21
  First release of shared-hosting-sync, developed under the devsync name.
package/PHASES.md CHANGED
@@ -118,7 +118,7 @@ conflicts, crashed owners, and dashboard/CLI coordination. Locks are local to on
118
118
  machine/settings store and do not detect remote aliases or other deployment tools.
119
119
  Production-host checks and cross-platform installation remain release work.
120
120
 
121
- ## Phase 6: npm release — 0.1.0
121
+ ## Phase 6: npm release — 0.1.0 published 21 October 2026
122
122
 
123
123
  - Package and primary command renamed to `shared-hosting-sync`; `devsync` remains
124
124
  an alias, with compatible settings and environment variables.
@@ -137,5 +137,11 @@ Production-host checks and cross-platform installation remain release work.
137
137
  registry acceptance. Registry installation confirms publication; see RELEASING.md
138
138
  for the verification steps.
139
139
 
140
+ Published [shared-hosting-sync@0.1.0](https://www.npmjs.com/package/shared-hosting-sync/v/0.1.0)
141
+ with `latest` pointing to 0.1.0. Windows, Linux, and macOS release checks passed.
142
+ The registry tarball matches the validated archive byte for byte (SHA-256
143
+ `e2301a79bc1aa64f28262b929c7b57c9447dfba6c82bc2c5b56b0b476f2c6a6e`).
144
+ A fresh registry installation verified both command aliases and SQLite startup.
145
+
140
146
  After release: GitHub Actions integration, deployment history, rollback, and
141
147
  optional remote deletion.
package/README.md CHANGED
@@ -357,27 +357,6 @@ FTPS certificates must pass normal certificate verification. Self-signed or
357
357
  expired hosting certificates need correction or an appropriately trusted CA;
358
358
  devsync does not silently bypass verification.
359
359
 
360
- ## Current implementation
361
-
362
- The package is in development. Before relying on it for deployments:
363
-
364
- - CLI onboarding, `.env` discovery, hidden password prompts, server-folder
365
- selection, and `deploy` are implemented in Phase 2.
366
- - Phase 4 adds UI upload previews, deploy/sync, watch start/stop, progress, and
367
- actionable file errors through the shared deployment engine.
368
- - Phase 5 adds shared CLI/UI locks, transient connection recovery, watch retries,
369
- exclusion previews in the CLI, and real local FTPS/SFTP integration checks.
370
- - Phase 3 adds complete UI onboarding, local/server folder pickers, secure
371
- imported settings, and reviewed project saving.
372
- - Phase 1 fixes destination handling, same-size change detection, path validation,
373
- and failed-sync status. See [PHASES.md](PHASES.md) for the implementation milestones.
374
- - Phase 6 prepares `shared-hosting-sync@0.1.0`, including production-only packaging,
375
- global installation checks, and Windows/Linux/macOS release checks in CI.
376
- See [RELEASING.md](RELEASING.md) for maintainer publication instructions.
377
-
378
- See [PRODUCT.md](PRODUCT.md) for product requirements and [ROADMAP.md](ROADMAP.md)
379
- for historical design notes. PHASES.md tracks the current release sequence.
380
-
381
360
  ## Development
382
361
 
383
362
  ```sh
@@ -401,6 +380,18 @@ directory. It writes a tarball, manifest, and SHA-256 checksum to `artifacts/`.
401
380
  Tests, fixtures, development scripts, local state, and credentials are excluded
402
381
  from the published package. See [RELEASING.md](RELEASING.md) for the release process.
403
382
 
383
+ ## Buy me a coffee ☕
384
+
385
+ If shared-hosting-sync saves you time, consider buying me a coffee. Your support
386
+ helps keep the project growing.
387
+
388
+ You can send your support to either number:
389
+
390
+ - **+256757035774**
391
+ - **+256789291098**
392
+
393
+ Thank you for supporting the project!
394
+
404
395
  ## License
405
396
 
406
397
  MIT. See [LICENSE](LICENSE).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shared-hosting-sync",
3
- "version": "0.1.0",
3
+ "version": "0.1.3",
4
4
  "description": "Deploy and sync local projects to shared hosting over FTP, FTPS, or SFTP, with a CLI and local dashboard.",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/cli.js CHANGED
@@ -494,9 +494,40 @@ ${C.b('other')}
494
494
  }
495
495
  }
496
496
 
497
+ function printBanner() {
498
+ const color = process.stdout.isTTY && !('NO_COLOR' in process.env)
499
+ const paint = (style, value) => color ? style(value) : value
500
+ const lines = [
501
+ ['DEVSYNC', C.b],
502
+ [`Shared hosting sync / v${version}`, C.c],
503
+ ['', C.dim],
504
+ ['Local projects → your hosting', C.dim],
505
+ ['', C.dim],
506
+ ['Created by Rogers Kitamirike', C.b],
507
+ ['Ugandan developer', C.dim],
508
+ ['', C.dim],
509
+ ['Phone +256757035774', C.c],
510
+ ['Email kitarogz@gmail.com', C.c]
511
+ ]
512
+ const width = 46
513
+ console.log()
514
+ if (process.stdout.columns && process.stdout.columns < width + 6) {
515
+ for (const [line, style] of lines) console.log(paint(style, line))
516
+ } else {
517
+ const border = (line) => paint(C.c, line)
518
+ console.log(border(' ╭' + '─'.repeat(width + 2) + '╮'))
519
+ for (const [line, style] of lines) {
520
+ console.log(border(' │ ') + paint(style, line) + ' '.repeat(width - line.length) + border(' │'))
521
+ }
522
+ console.log(border(' ╰' + '─'.repeat(width + 2) + '╯'))
523
+ }
524
+ console.log()
525
+ }
526
+
497
527
  async function main() {
498
528
  try {
499
529
  if (flags.version || cmd === 'version') { console.log(`${name} ${version}`); return }
530
+ printBanner()
500
531
  if (flags.help || cmd === 'help') return COMMANDS.help()
501
532
  if (!cmd) return flags.sync ? await COMMANDS.sync() : await COMMANDS.plan()
502
533
  if (!Object.hasOwn(COMMANDS, cmd)) throw new Error(`unknown command: ${cmd}. Run devsync help`)
@@ -12,7 +12,7 @@ const present = (value) => value !== undefined && value !== null && value !== ''
12
12
 
13
13
  export function resolveEnv(projectId, { transport = 'sftp', envFile, localPath, overrides = {}, useEnvFileEnvironment = true } = {}) {
14
14
  const project = projectId == null ? null : getProject(projectId)
15
- localPath = project?.localPath || localPath
15
+ localPath = localPath || project?.localPath
16
16
  if (!localPath) throw new Error('A local project folder is required')
17
17
  const values = { ...defaultsFor(transport) }
18
18
  const sources = Object.fromEntries(ENV_SCHEMA.map((s) => [s.key, 'default']))
@@ -72,7 +72,10 @@ export class OnboardingService {
72
72
  if (this.drafts.size >= 50) throw fail('Too many open setups. Close a setup and try again.', 429)
73
73
  let project = projectId ? getProject(Number(projectId)) : null
74
74
  if (projectId && !project) throw fail('Project not found', 404)
75
- const folder = assertLocalFolder(project?.localPath || localPath)
75
+ // An existing project can be repaired even after its original folder moved.
76
+ const folder = project && localPath === undefined ? project.localPath : assertLocalFolder(localPath)
77
+ const owner = getProjectByLocalPath(folder)
78
+ if (project && owner && owner.id !== project.id) throw fail('That local folder belongs to another project', 409)
76
79
  project ||= getProjectByLocalPath(folder)
77
80
  this.ensureEditable(project?.id)
78
81
  const resolved = resolveEnv(project?.id, { localPath: folder, useEnvFileEnvironment: false })
@@ -164,6 +167,8 @@ export class OnboardingService {
164
167
  label = label.trim()
165
168
  const duplicate = getProjectByLabel(label)
166
169
  if (duplicate && duplicate.id !== draft.projectId) throw fail('That project name is already in use', 409)
170
+ const owner = getProjectByLocalPath(draft.localPath)
171
+ if (owner && owner.id !== draft.projectId) throw fail('That local folder belongs to another project', 409)
167
172
  const errors = ENV_SCHEMA.map((schema) => settingError(schema.key, draft.values[schema.key], draft.values)).filter(Boolean)
168
173
  if (errors.length) throw fail(errors.join('; '))
169
174
  if (!draft.tested) throw fail('Test the connection before saving', 409)
@@ -179,7 +184,7 @@ export class OnboardingService {
179
184
  project ||= createProject({ label, localPath: draft.localPath })
180
185
  mutateProject(project.id, () => {
181
186
  saveConfiguration(project.id, draft.values, { sources: draft.sources })
182
- if (project.label !== label) updateProject(project.id, { label })
187
+ updateProject(project.id, { label, local_path: draft.localPath })
183
188
  })
184
189
  } catch (error) {
185
190
  if (created && project) deleteProject(project.id)
package/src/ui/index.html CHANGED
@@ -10,8 +10,30 @@
10
10
  <body>
11
11
  <header class="topbar"><a class="brand" href="/">shared-hosting-sync<span class="brand-dot"></span></a><span class="topbar-note">Your projects. Your hosting.</span><span class="connection-pill" id="serverStatus">Connecting…</span></header>
12
12
  <div class="layout">
13
- <aside class="sidebar"><div class="sidebar-heading">PROJECTS <span id="projectCount">0</span></div><div id="projectList"></div><button class="add-project" id="addProject">+ Add project</button><div class="sidebar-note">Runs on this computer.<br>Hosting credentials stay local.</div></aside>
13
+ <aside class="sidebar"><div class="sidebar-heading">PROJECTS <span id="projectCount">0</span></div><div id="projectList"></div><button class="add-project" id="addProject">+ Add project</button><button class="about-help-button secondary" id="openAboutHelp" aria-haspopup="dialog">About &amp; Help</button><div class="sidebar-note">Runs on this computer.<br>Hosting credentials stay local.</div></aside>
14
14
  <main id="pane" class="pane" aria-live="polite"><div class="empty">Loading your projects…</div></main>
15
15
  </div>
16
+ <dialog id="aboutHelpDialog" class="about-help-dialog" aria-labelledby="aboutHelpTitle">
17
+ <div class="about-help-heading"><div><p class="eyebrow">DEVSYNC</p><h1 id="aboutHelpTitle">About &amp; Help</h1></div><form method="dialog"><button class="secondary" aria-label="Close About and Help" autofocus>Close</button></form></div>
18
+ <p class="sub">A simpler way to move local projects to your hosting.</p>
19
+ <nav class="help-links" aria-label="About and help sections"><a href="#aboutCreator">About</a><a href="#gettingStarted">Getting started</a><a href="#commonQuestions">Common questions</a></nav>
20
+ <section class="summary-card" id="aboutCreator" aria-labelledby="creatorTitle">
21
+ <p class="eyebrow">MEET THE CREATOR</p><h2 id="creatorTitle">Rogers Kitamirike</h2><p class="muted">Ugandan developer · Creator of DevSync</p>
22
+ <dl class="review"><dt>Phone</dt><dd><a href="tel:+256757035774">+256757035774</a></dd><dt>Email</dt><dd><a href="mailto:kitarogz@gmail.com">kitarogz@gmail.com</a></dd><dt>Package</dt><dd>shared-hosting-sync <span id="aboutVersion"></span></dd></dl>
23
+ <div class="help-links"><a href="https://github.com/kitaroghope/shared-hosting-sync#readme" target="_blank" rel="noopener noreferrer">Documentation ↗</a><a href="https://github.com/kitaroghope/shared-hosting-sync/issues" target="_blank" rel="noopener noreferrer">Report an issue ↗</a></div>
24
+ </section>
25
+ <section class="summary-card" id="gettingStarted" aria-labelledby="gettingStartedTitle"><h2 id="gettingStartedTitle">Get your first project online</h2>
26
+ <ol class="help-steps"><li><strong>Add your local folder.</strong> Choose Add project, then select the folder to upload. For a built website, choose its build or dist folder.</li><li><strong>Connect your hosting.</strong> Enter your FTP, FTPS, or SFTP details, or load DEVSYNC_* settings from the folder’s .env. Test the connection to continue.</li><li><strong>Choose the server folder.</strong> Browse to the destination, select Use server folder, review, and save.</li><li><strong>Preview, then deploy.</strong> Preview uploads shows the planned files. Deploy uploads all eligible files; Sync uploads changed files. Watch follows subsequent saves while DevSync runs.</li></ol>
27
+ </section>
28
+ <section class="summary-card" id="commonQuestions" aria-labelledby="commonQuestionsTitle"><h2 id="commonQuestionsTitle">Common questions</h2>
29
+ <details><summary>How do I change a project’s local folder or hosting settings?</summary><p>Open the saved project and choose Edit setup. Change or browse for the local folder, review your hosting settings and destination, then save. Stop any active watch or upload before editing.</p></details>
30
+ <details><summary>Why can’t I connect to my hosting?</summary><p>Confirm the host, protocol, port, username, and credentials with your hosting provider. FTP and FTPS usually use port 21; SFTP usually uses 22. If your ISP blocks port 21, ask your host whether SFTP or an alternative port is available. The server must support the protocol and port you choose.</p></details>
31
+ <details><summary>Why are my changes not uploading?</summary><p>Check the selected local folder and server destination. Use Preview uploads to see which files are included or excluded, check whether Preview only is enabled, and open the Activity log for errors. Watch requires DevSync to remain running.</p></details>
32
+ <details><summary>Which settings take priority?</summary><p>Settings in the selected folder’s .env take priority over .devsync.env and saved settings. If an edit appears to revert, check those files. DevSync does not rewrite your application’s environment files.</p></details>
33
+ <details><summary>Are credentials and server files protected?</summary><p>Saved credentials are encrypted on this computer. Environment files and other protected files are excluded from deployment. Local deletions are never mirrored to the server. Preview uploads before deploying to confirm your destination and file list.</p></details>
34
+ <details><summary>Can I use DevSync from a terminal?</summary><p>Run <code>devsync help</code> for commands, <code>devsync ui</code> for this dashboard, or <code>devsync doctor</code> to check your local installation. The <code>shared-hosting-sync</code> command works as an alias.</p></details>
35
+ </section>
36
+ <p class="help about-help-footer">Need a hand? Email the creator or report an issue with the error message and your DevSync version. Keep passwords and private keys out of reports.</p>
37
+ </dialog>
16
38
  </body>
17
39
  </html>
package/src/ui/style.css CHANGED
@@ -127,3 +127,15 @@ h1{font-size:25px}
127
127
  .operation-metrics>div{padding:14px;background:#10161f;border:1px solid var(--line);border-radius:8px}.operation-metrics strong{display:block;font-size:21px}.operation-metrics span{font-size:12px;color:var(--muted)}
128
128
  .plan-table-wrap{max-height:300px;overflow:auto;margin:14px 0}.plan-table{width:100%;border-collapse:collapse;font-size:12px;text-align:left}.plan-table th,.plan-table td{padding:10px;border-bottom:1px solid var(--line);word-break:break-word}.plan-table th{color:var(--muted);position:sticky;top:0;background:var(--panel)}.plan-table td:last-child{white-space:nowrap}
129
129
  .file-list{font:12px/1.7 ui-monospace,monospace;max-height:220px;overflow:auto;padding:0 0 0 20px;word-break:break-word}.operation-log{font:12px/1.8 ui-monospace,monospace;max-height:260px;overflow:auto;list-style:none;padding:12px;background:#0e131c;border-radius:6px}.operation-log time{color:var(--muted)}.log-error{color:var(--danger)}.log-success{color:var(--accent)}
130
+
131
+ .about-help-button{width:100%;margin-top:24px;text-align:left}
132
+ .about-help-dialog{color:var(--text);background:var(--bg);border:1px solid var(--line);border-radius:16px;width:min(820px,calc(100% - 32px));max-height:88vh;padding:30px;overflow:auto;scroll-behavior:smooth}
133
+ .about-help-dialog::backdrop{background:rgba(0,0,0,.72)}
134
+ .about-help-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}
135
+ .about-help-heading form{margin:0}.about-help-heading h1{margin-bottom:10px}
136
+ .help-links{display:flex;flex-wrap:wrap;gap:12px 22px}
137
+ .help-links a{text-underline-offset:4px}
138
+ .help-steps{padding-left:22px;margin-bottom:0}.help-steps li{padding-left:6px;margin:14px 0;color:var(--muted)}.help-steps strong{color:var(--text)}
139
+ .about-help-dialog section{scroll-margin-top:16px}.about-help-dialog details p{margin:12px 0 0;color:var(--muted)}
140
+ .about-help-dialog code{color:var(--accent);overflow-wrap:anywhere}.about-help-footer{margin:24px 0 0}
141
+ @media(max-width:580px){.about-help-dialog{padding:20px;max-height:92vh}.about-help-dialog .summary-card{padding:18px}.about-help-button{margin-top:10px}.about-help-dialog .review{margin:18px 0}}
package/src/ui/ui.js CHANGED
@@ -118,7 +118,7 @@ function renderWizard() {
118
118
  renderedStep = step
119
119
  let content = ''
120
120
  if (step === 1) {
121
- content = `<h2>Where are your project files?</h2><p>Choose the folder you want to deploy. For a built frontend, choose its dist or build folder.</p><form id="localForm"><div class="field"><label for="localPath">Local project folder</label><div class="path-row"><input id="localPath" value="${esc(draft?.localPath || '')}" placeholder="Absolute path to a project folder" ${draft?.projectId ? 'readonly' : ''}><button class="secondary" type="button" id="openLocal" ${draft?.projectId ? 'disabled' : ''}>Browse folders</button></div><span class="help">Only hosting settings named DEVSYNC_* are read from this folder’s .env.</span></div><div id="localPicker"></div><div class="actions"><button class="secondary" type="button" id="cancelSetup">Cancel</button><span class="spacer"></span><button class="primary" type="submit">Continue to hosting</button></div></form>`
121
+ content = `<h2>Where are your project files?</h2><p>Choose the folder you want to deploy. For a built frontend, choose its dist or build folder.</p><form id="localForm"><div class="field"><label for="localPath">Local project folder</label><div class="path-row"><input id="localPath" value="${esc(draft?.localPath || '')}" placeholder="Absolute path to a project folder"><button class="secondary" type="button" id="openLocal">Browse folders</button></div><span class="help">Only hosting settings named DEVSYNC_* are read from this folder’s .env.</span></div><div id="localPicker"></div><div class="actions"><button class="secondary" type="button" id="cancelSetup">Cancel</button><span class="spacer"></span><button class="primary" type="submit">Continue to hosting</button></div></form>`
122
122
  } else if (step === 2) {
123
123
  const transport = draft.values.DEVSYNC_TRANSPORT
124
124
  const loaded = Object.entries(draft.sources).filter(([, value]) => value === '.env' || value === '.devsync.env').length
@@ -139,7 +139,7 @@ function renderWizard() {
139
139
  const localPath = $('#localPath').value.trim()
140
140
  if (!localPath) throw new Error('Choose a local project folder first')
141
141
  if (!draft || localPath !== draft.localPath) {
142
- const loaded = await api('POST', '/api/onboarding', { localPath })
142
+ const loaded = await api('POST', '/api/onboarding', { localPath, ...(draft?.projectId ? { projectId: draft.projectId } : {}) })
143
143
  if (draft) try { await api('DELETE', `/api/onboarding/${draft.id}`) } catch {}
144
144
  state.draft = loaded
145
145
  state.fileOverrides = false
@@ -255,7 +255,7 @@ async function openProject(id) {
255
255
  const values = config.values
256
256
  $('#pane').innerHTML = `<p class="eyebrow">SAVED PROJECT</p><div class="summary-head"><div><h1>${esc(data.label)}</h1><p class="sub">${esc(data.localPath)}</p></div><span class="ready">● ${Object.keys(config.errors).length ? 'Setup needed' : 'Project configured'}</span></div><div id="message" class="notice"></div><section class="summary-card"><h2>Source → destination</h2><dl class="review"><dt>Local source</dt><dd>${esc(data.localPath)}</dd><dt>Server folder</dt><dd>${esc(values.DEVSYNC_REMOTE_PATH || 'Not configured')}</dd><dt>Connection</dt><dd>${esc(values.DEVSYNC_TRANSPORT?.toUpperCase())} · ${esc(values.DEVSYNC_HOST || 'Not configured')}:${esc(values.DEVSYNC_PORT)}</dd><dt>Username</dt><dd>${esc(values.DEVSYNC_USERNAME || 'Not configured')}</dd><dt>Credentials</dt><dd>${config.secrets.DEVSYNC_PASSWORD || config.secrets.DEVSYNC_PRIVATE_KEY ? 'Supplied · never shown in this browser' : 'Not configured'}</dd></dl><div class="actions"><button class="primary" id="editProject">Edit setup</button><button class="secondary" id="testProject">Test connection</button><span class="spacer"></span><button class="danger" id="deleteProject">Remove project</button></div></section>`
257
257
  if (Object.keys(config.errors).length) message(Object.values(config.errors).join('; '), 'warning')
258
- $('#editProject').onclick = () => act(async () => { state.draft = await api('POST', '/api/onboarding', { projectId: id }); deploymentPanel.close(); state.fileOverrides = false; state.step = 2; renderWizard() })
258
+ $('#editProject').onclick = () => act(async () => { state.draft = await api('POST', '/api/onboarding', { projectId: id }); deploymentPanel.close(); state.fileOverrides = false; state.local = null; state.remote = null; state.verifiedPath = null; state.step = 1; renderWizard() })
259
259
  $('#testProject').onclick = () => act(async () => { await api('POST', '/api/test', { projectId: id }); message('Connection test passed.', 'success') }, 'Testing your hosting connection…')
260
260
  $('#deleteProject').onclick = () => act(async () => {
261
261
  if (!confirm(`Remove "${data.label}" from devsync? Local and server files stay in place.`)) return
@@ -274,6 +274,16 @@ async function openProject(id) {
274
274
  setBusy(state.busy)
275
275
  }
276
276
 
277
+ $('#openAboutHelp').onclick = async () => {
278
+ const dialog = $('#aboutHelpDialog')
279
+ if (dialog.open) return
280
+ dialog.showModal()
281
+ try {
282
+ const health = await api('GET', '/api/health')
283
+ $('#aboutVersion').textContent = `· v${health.version}`
284
+ } catch { $('#aboutVersion').textContent = '· Version unavailable' }
285
+ }
286
+
277
287
  $('#addProject').onclick = () => act(startNew)
278
288
  ;(async () => {
279
289
  try {