domma-cms 0.9.0 → 0.9.1

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.
@@ -95,13 +95,13 @@
95
95
  placeholder="Optional form description..."></textarea>
96
96
  </div>
97
97
  </div>
98
- <div class="row mt-3">
99
- <div class="col-auto">
100
- <label class="form-check-label" title="Included in fresh installs via the seed script">
101
- <input id="field-bundled" type="checkbox" class="form-check"> Bundled
102
- </label>
98
+ <div class="row mt-3">
99
+ <div class="col-auto">
100
+ <label class="form-check-label" title="Included in fresh installs via the seed script">
101
+ <input id="field-bundled" type="checkbox" class="form-check"> Bundled
102
+ </label>
103
+ </div>
103
104
  </div>
104
- </div>
105
105
  </div>
106
106
  </div>
107
107
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "domma-cms",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
4
4
  "description": "File-based CMS powered by Domma and Fastify. Run npx domma-cms my-site to create a new project.",
5
5
  "type": "module",
6
6
  "main": "server/server.js",
@@ -184,7 +184,8 @@ export async function listBlocks() {
184
184
  try {
185
185
  const meta = JSON.parse(await fs.readFile(path.join(BLOCKS_DIR, `${name}.meta.json`), 'utf8'));
186
186
  bundled = !!meta.bundled;
187
- } catch { /* no meta file */ }
187
+ } catch { /* no meta file */
188
+ }
188
189
  blocks.push({
189
190
  name,
190
191
  size: fileStat?.size ?? 0,
@@ -210,7 +211,8 @@ export async function getBlock(name) {
210
211
  try {
211
212
  const meta = JSON.parse(await fs.readFile(path.join(BLOCKS_DIR, `${name}.meta.json`), 'utf8'));
212
213
  bundled = !!meta.bundled;
213
- } catch { /* no meta file */ }
214
+ } catch { /* no meta file */
215
+ }
214
216
  return {name, content, bundled};
215
217
  } catch (err) {
216
218
  if (err.code === 'ENOENT') {
@@ -238,7 +240,8 @@ export async function saveBlock(name, content, {bundled} = {}) {
238
240
  if (bundled) {
239
241
  await fs.writeFile(metaPath, JSON.stringify({bundled: true}, null, 2) + '\n', 'utf8');
240
242
  } else {
241
- await fs.unlink(metaPath).catch(() => {});
243
+ await fs.unlink(metaPath).catch(() => {
244
+ });
242
245
  }
243
246
  return {success: true, name};
244
247
  }