@eventcatalog/create-eventcatalog 3.1.3 → 4.1.0

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@eventcatalog/create-eventcatalog",
3
3
  "description": "Create EventCatalog with one command",
4
- "version": "3.1.3",
4
+ "version": "4.1.0",
5
5
  "bin": {
6
6
  "create-catalog": "./dist/index.js"
7
7
  },
@@ -34,6 +34,7 @@
34
34
  "cross-spawn": "6.0.5",
35
35
  "fast-glob": "^3.3.2",
36
36
  "got": "^14.0.0",
37
+ "ora": "^5.4.1",
37
38
  "prompts": "2.1.0",
38
39
  "rimraf": "^5.0.7",
39
40
  "tar": "^4.4.19",
@@ -44,7 +45,6 @@
44
45
  },
45
46
  "dependencies": {
46
47
  "@changesets/cli": "^2.27.6",
47
- "axios": "^1.7.7",
48
48
  "uuid": "^10.0.0"
49
49
  },
50
50
  "scripts": {
@@ -1,4 +1,3 @@
1
- import axios from 'axios';
2
1
  import os from 'os';
3
2
  import pkg from '../package.json';
4
3
 
@@ -11,9 +10,6 @@ interface EventMetadata {
11
10
  async function raiseEvent(eventData: EventMetadata): Promise<void> {
12
11
  const url = "https://queue.simpleanalyticscdn.com/events";
13
12
  const userAgent = `@eventcatalog/create-eventcatalog/${pkg.version} (${os.platform()}; ${os.arch()}; Node/${process.version})`;
14
- const headers = {
15
- "Content-Type": "application/json",
16
- };
17
13
 
18
14
  const payload = {
19
15
  type: "event",
@@ -28,7 +24,11 @@ async function raiseEvent(eventData: EventMetadata): Promise<void> {
28
24
  };
29
25
 
30
26
  try {
31
- await axios.post(url, payload, { headers });
27
+ await fetch(url, {
28
+ method: "POST",
29
+ headers: { "Content-Type": "application/json" },
30
+ body: JSON.stringify(payload),
31
+ });
32
32
  } catch (error) {
33
33
  // swallow the error
34
34
  }
@@ -18,6 +18,13 @@ export default {
18
18
  // Change to make the base url of the site different, by default https://{website}.com/docs,
19
19
  // changing to /company would be https://{website}.com/company/docs,
20
20
  base: '/',
21
+ // Customize the navigation for your docs sidebar.
22
+ // read more at https://eventcatalog.dev/docs/development/customization/customize-sidebars/documentation-sidebar
23
+ navigation: {
24
+ pages: [
25
+ 'list:all',
26
+ ]
27
+ },
21
28
  logo: {
22
29
  alt: 'EventCatalog Logo',
23
30
  src: '/logo.png',
@@ -58,13 +65,6 @@ export default {
58
65
  },
59
66
  ],
60
67
  ],
61
- docs: {
62
- sidebar: {
63
- // TREE_VIEW will render the DOCS as a tree view and map your file system folder structure
64
- // LIST_VIEW will render the DOCS that look familiar to API documentation websites
65
- type: 'LIST_VIEW'
66
- },
67
- },
68
68
  // Enable RSS feed for your eventcatalog
69
69
  rss: {
70
70
  enabled: true,
@@ -13,6 +13,13 @@ export default {
13
13
  // Change to make the base url of the site different, by default https://{website}.com/docs,
14
14
  // changing to /company would be https://{website}.com/company/docs,
15
15
  base: '/',
16
+ // Customize the navigation for your docs sidebar.
17
+ // read more at https://eventcatalog.dev/docs/development/customization/customize-sidebars/documentation-sidebar
18
+ navigation: {
19
+ pages: [
20
+ 'list:all',
21
+ ]
22
+ },
16
23
  // Customize the logo, add your logo to public/ folder
17
24
  logo: {
18
25
  alt: 'EventCatalog Logo',
@@ -25,13 +32,6 @@ export default {
25
32
  // number of items to include in the feed per resource (event, service, etc)
26
33
  limit: 20
27
34
  },
28
- docs: {
29
- sidebar: {
30
- // TREE_VIEW will render the DOCS as a tree view and map your file system folder structure
31
- // LIST_VIEW will render the DOCS that look familiar to API documentation websites
32
- type: 'LIST_VIEW'
33
- },
34
- },
35
35
  // required random generated id used by eventcatalog
36
36
  cId: '<cId>',
37
37
  // This lets you copy markdown contents from EventCatalog to your clipboard
@@ -13,25 +13,20 @@ export default {
13
13
  // Change to make the base url of the site different, by default https://{website}.com/docs,
14
14
  // changing to /company would be https://{website}.com/company/docs,
15
15
  base: '/',
16
+ // Customize the navigation for your docs sidebar.
17
+ // read more at https://eventcatalog.dev/docs/development/customization/customize-sidebars/documentation-sidebar
18
+ navigation: {
19
+ pages: [
20
+ 'list:top-level-domains',
21
+ 'list:all',
22
+ ]
23
+ },
16
24
  // Customize the logo, add your logo to public/ folder
17
25
  logo: {
18
26
  alt: 'EventCatalog Logo',
19
27
  src: '/logo.png',
20
28
  text: 'EventCatalog'
21
29
  },
22
- docs: {
23
- sidebar: {
24
- // TREE_VIEW will render the DOCS as a tree view and map your file system folder structure
25
- // LIST_VIEW will render the DOCS that look familiar to API documentation websites
26
- type: 'LIST_VIEW'
27
- },
28
- },
29
- // Enable RSS feed for your eventcatalog
30
- rss: {
31
- enabled: true,
32
- // number of items to include in the feed per resource (event, service, etc)
33
- limit: 20
34
- },
35
30
  // This lets you copy markdown contents from EventCatalog to your clipboard
36
31
  // Including schemas for your events and services
37
32
  llmsTxt: {
@@ -13,30 +13,24 @@ export default {
13
13
  // Change to make the base url of the site different, by default https://{website}.com/docs,
14
14
  // changing to /company would be https://{website}.com/company/docs,
15
15
  base: '/',
16
+ // Customize the navigation for your docs sidebar.
17
+ // read more at https://eventcatalog.dev/docs/development/customization/customize-sidebars/documentation-sidebar
18
+ navigation: {
19
+ pages: [
20
+ 'list:all',
21
+ ]
22
+ },
16
23
  // Customize the logo, add your logo to public/ folder
17
24
  logo: {
18
25
  alt: 'EventCatalog Logo',
19
26
  src: '/logo.png',
20
27
  text: 'EventCatalog'
21
28
  },
22
- // Enable RSS feed for your eventcatalog
23
- rss: {
24
- enabled: true,
25
- // number of items to include in the feed per resource (event, service, etc)
26
- limit: 20
27
- },
28
29
  // This lets you copy markdown contents from EventCatalog to your clipboard
29
30
  // Including schemas for your events and services
30
31
  llmsTxt: {
31
32
  enabled: true,
32
33
  },
33
- docs: {
34
- sidebar: {
35
- // TREE_VIEW will render the DOCS as a tree view and map your file system folder structure
36
- // LIST_VIEW will render the DOCS that look familiar to API documentation websites
37
- type: 'LIST_VIEW'
38
- },
39
- },
40
34
  // required random generated id used by eventcatalog
41
35
  cId: '<cId>'
42
36
  }
@@ -13,6 +13,13 @@ export default {
13
13
  // Change to make the base url of the site different, by default https://{website}.com/docs,
14
14
  // changing to /company would be https://{website}.com/company/docs,
15
15
  base: '/',
16
+ // Customize the navigation for your docs sidebar.
17
+ // read more at https://eventcatalog.dev/docs/development/customization/customize-sidebars/documentation-sidebar
18
+ navigation: {
19
+ pages: [
20
+ 'list:all',
21
+ ]
22
+ },
16
23
  // Customize the logo, add your logo to public/ folder
17
24
  logo: {
18
25
  alt: 'EventCatalog Logo',
@@ -25,13 +32,6 @@ export default {
25
32
  // number of items to include in the feed per resource (event, service, etc)
26
33
  limit: 20
27
34
  },
28
- docs: {
29
- sidebar: {
30
- // TREE_VIEW will render the DOCS as a tree view and map your file system folder structure
31
- // LIST_VIEW will render the DOCS that look familiar to API documentation websites
32
- type: 'LIST_VIEW'
33
- },
34
- },
35
35
  // This lets you copy markdown contents from EventCatalog to your clipboard
36
36
  // Including schemas for your events and services
37
37
  llmsTxt: {
@@ -18,6 +18,13 @@ export default {
18
18
  // Change to make the base url of the site different, by default https://{website}.com/docs,
19
19
  // changing to /company would be https://{website}.com/company/docs,
20
20
  base: "/",
21
+ // Customize the navigation for your docs sidebar.
22
+ // read more at https://eventcatalog.dev/docs/development/customization/customize-sidebars/documentation-sidebar
23
+ navigation: {
24
+ pages: [
25
+ 'list:all',
26
+ ]
27
+ },
21
28
  // Customize the logo, add your logo to public/ folder
22
29
  logo: {
23
30
  alt: "EventCatalog Logo",
@@ -49,12 +56,6 @@ export default {
49
56
  },
50
57
  ],
51
58
  ],
52
- // Enable RSS feed for your eventcatalog
53
- rss: {
54
- enabled: true,
55
- // number of items to include in the feed per resource (event, service, etc)
56
- limit: 20
57
- },
58
59
  // required random generated id used by eventcatalog
59
60
  cId: '<cId>'
60
61
  };
@@ -4,7 +4,6 @@ import { install } from "../helpers/install";
4
4
  import os from "os";
5
5
  import fs from "fs";
6
6
  import path from "path";
7
- import chalk from "chalk";
8
7
  import { v4 } from 'uuid'
9
8
 
10
9
  import { GetTemplateFileArgs, InstallTemplateArgs } from "./types";
@@ -34,8 +33,6 @@ export const installTemplate = async ({
34
33
  eslint,
35
34
  organizationName
36
35
  }: InstallTemplateArgs) => {
37
- console.log(chalk.bold(`Using ${packageManager}.`));
38
-
39
36
  /**
40
37
  * Create a package.json for the new project
41
38
  */
@@ -106,30 +103,16 @@ export const installTemplate = async ({
106
103
  * Install package.json dependencies if they exist.
107
104
  */
108
105
  if (dependencies.length) {
109
- console.log();
110
- console.log("Installing dependencies:");
111
- for (const dependency of dependencies) {
112
- console.log(`- ${chalk.cyan(dependency)}`);
113
- }
114
- console.log();
115
-
116
106
  await install(root, dependencies, installFlags);
117
107
  }
118
108
 
119
109
  if (devDependencies.length) {
120
- console.log();
121
- console.log("Installing devDependencies:");
122
- for (const devDependency of devDependencies) {
123
- // console.log(`- ${chalk.cyan(devDependency)}`);
124
- }
125
-
126
110
  const devInstallFlags = { devDependencies: true, ...installFlags };
127
111
  await install(root, devDependencies, devInstallFlags);
128
112
  }
129
113
  /**
130
114
  * Copy the template files to the target directory.
131
115
  */
132
- console.log("\nInitializing project with template:", template, "\n");
133
116
  const templatePath = path.join(__dirname, "../templates", template);
134
117
  // console.log("templatePath", templatePath, __dirname, template);
135
118
  await copy("**", root, {
@@ -18,6 +18,13 @@ export default {
18
18
  // Change to make the base url of the site different, by default https://{website}.com/docs,
19
19
  // changing to /company would be https://{website}.com/company/docs,
20
20
  base: "/",
21
+ // Customize the navigation for your docs sidebar.
22
+ // read more at https://eventcatalog.dev/docs/development/customization/customize-sidebars/documentation-sidebar
23
+ navigation: {
24
+ pages: [
25
+ 'list:all',
26
+ ]
27
+ },
21
28
  // Customize the logo, add your logo to public/ folder
22
29
  logo: {
23
30
  alt: "EventCatalog Logo",
@@ -63,19 +70,6 @@ export default {
63
70
  },
64
71
  ],
65
72
  ],
66
- docs: {
67
- sidebar: {
68
- // TREE_VIEW will render the DOCS as a tree view and map your file system folder structure
69
- // LIST_VIEW will render the DOCS that look familiar to API documentation websites
70
- type: 'LIST_VIEW'
71
- },
72
- },
73
- // Enable RSS feed for your eventcatalog
74
- rss: {
75
- enabled: true,
76
- // number of items to include in the feed per resource (event, service, etc)
77
- limit: 20
78
- },
79
73
  // required random generated id used by eventcatalog
80
74
  cId: '<cId>'
81
75
  };