kempo 4.2.32 → 4.2.33

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": "kempo",
3
- "version": "4.2.32",
3
+ "version": "4.2.33",
4
4
  "type": "module",
5
5
  "description": "A fullstack CMS framework for creating websites with user authentication",
6
6
  "scripts": {
@@ -11,7 +11,7 @@ const slugify = name => name
11
11
  .replace(/-+/g, '-')
12
12
  .replace(/^-|-$/g, '');
13
13
 
14
- export default async ({ rootDir, directory, name, author, locked = false }) => {
14
+ export default async ({ rootDir, directory, name, author, owner = 'custom', locked = false }) => {
15
15
  if(!rootDir){
16
16
  return [{ code: 400, msg: 'Root directory is required' }, null];
17
17
  }
@@ -38,7 +38,7 @@ export default async ({ rootDir, directory, name, author, locked = false }) => {
38
38
  const now = new Date().toISOString();
39
39
  const frontmatter = [
40
40
  '<!--',
41
- ` owner: custom`,
41
+ ` owner: ${owner}`,
42
42
  ` name: ${name}`,
43
43
  ` author: ${author || ''}`,
44
44
  ` created: ${now}`,
@@ -20,7 +20,7 @@ const serializeEntries = entries => entries.map(e => {
20
20
  return `<content ${attrs}>\n${e.markup}\n</content>`;
21
21
  }).join('\n');
22
22
 
23
- export default async ({ rootDir, name, location, priority, author }) => {
23
+ export default async ({ rootDir, name, location, priority, author, owner = 'custom' }) => {
24
24
  if(!rootDir){
25
25
  return [{ code: 400, msg: 'Root directory is required' }, null];
26
26
  }
@@ -42,7 +42,7 @@ export default async ({ rootDir, name, location, priority, author }) => {
42
42
  const entry = {
43
43
  id: crypto.randomUUID(),
44
44
  name,
45
- owner: 'custom',
45
+ owner,
46
46
  author: author || '',
47
47
  locked: false,
48
48
  location,
@@ -13,7 +13,7 @@ const slugify = name => name
13
13
  .replace(/-+/g, '-')
14
14
  .replace(/^-|-$/g, '');
15
15
 
16
- export default async ({ rootDir, directory, name, template, author, locked = false, extraMetadata = {} }) => {
16
+ export default async ({ rootDir, directory, name, template, author, owner = 'custom', locked = false, extraMetadata = {} }) => {
17
17
  if(!rootDir){
18
18
  return [{ code: 400, msg: 'Root directory is required' }, null];
19
19
  }
@@ -46,7 +46,7 @@ export default async ({ rootDir, directory, name, template, author, locked = fal
46
46
 
47
47
  const now = new Date().toISOString();
48
48
  const defaultLines = [
49
- ` owner: custom`,
49
+ ` owner: ${owner}`,
50
50
  ` name: ${name}`,
51
51
  ` author: ${author || ''}`,
52
52
  ` created: ${now}`,
@@ -11,7 +11,7 @@ const slugify = name => name
11
11
  .replace(/-+/g, '-')
12
12
  .replace(/^-|-$/g, '');
13
13
 
14
- export default async ({ rootDir, directory, name, author, copyFrom, locked = false }) => {
14
+ export default async ({ rootDir, directory, name, author, owner = 'custom', copyFrom, locked = false }) => {
15
15
  if(!rootDir) return [{ code: 400, msg: 'Root directory is required' }, null];
16
16
  if(!name) return [{ code: 400, msg: 'Template name is required' }, null];
17
17
 
@@ -30,7 +30,7 @@ export default async ({ rootDir, directory, name, author, copyFrom, locked = fal
30
30
  const now = new Date().toISOString();
31
31
  const frontmatter = [
32
32
  '<!--',
33
- ` owner: custom`,
33
+ ` owner: ${owner}`,
34
34
  ` author: ${author || ''}`,
35
35
  ` created: ${now}`,
36
36
  ` updated: ${now}`,