@gen3/workspaces 0.12.45 → 0.12.47

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.
@@ -17,7 +17,7 @@ const ALLOWED_TIERS = new Set([
17
17
  'free',
18
18
  'remote'
19
19
  ]);
20
- const SAFE_SEGMENT_RE = /^[A-Za-z0-9._-]+$/;
20
+ const SAFE_SEGMENT_RE = /^@?[A-Za-z0-9._-]+$/;
21
21
  const MIME_TYPES = {
22
22
  '.html': 'text/html; charset=utf-8',
23
23
  '.js': 'application/javascript; charset=utf-8',
@@ -140,8 +140,13 @@ function injectBranding(html, branding) {
140
140
  let existing = {};
141
141
  try {
142
142
  existing = JSON.parse(existingJson);
143
- } catch {
144
- // empty or malformed — start fresh
143
+ } catch (error) {
144
+ // empty or malformed — start fresh
145
+ if (error instanceof Error) {
146
+ console.log('Failed to parse existing JSON', error.message);
147
+ } else {
148
+ console.log('Failed to parse existing JSON', error);
149
+ }
145
150
  }
146
151
  if (branding.appName) existing.appName = branding.appName;
147
152
  if (branding.faviconUrl) existing.faviconUrl = branding.faviconUrl;