@eventcatalog/core 0.0.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/CHANGELOG.md +1 -0
- package/README.md +11 -0
- package/bin/eventcatalog.js +125 -0
- package/components/BreadCrumbs.tsx +50 -0
- package/components/ContentView.tsx +127 -0
- package/components/Footer.tsx +38 -0
- package/components/Grids/EventGrid.tsx +89 -0
- package/components/Grids/ServiceGrid.tsx +70 -0
- package/components/Header.tsx +59 -0
- package/components/Mdx/Admonition.tsx +33 -0
- package/components/Mdx/Examples.tsx +77 -0
- package/components/Mermaid/index.tsx +47 -0
- package/components/NotFound/index.tsx +44 -0
- package/components/Sidebars/EventSidebar.tsx +202 -0
- package/components/Sidebars/ServiceSidebar.tsx +198 -0
- package/components/SyntaxHighlighter.tsx +34 -0
- package/hooks/EventCatalog.tsx +35 -0
- package/lib/__tests__/assets/events/AddedItemToCart/index.md +19 -0
- package/lib/__tests__/assets/events/EmailSent/index.md +15 -0
- package/lib/__tests__/assets/events/EventWithSchemaAndExamples/examples/Basic.cs +31 -0
- package/lib/__tests__/assets/events/EventWithSchemaAndExamples/examples/Basic.js +1 -0
- package/lib/__tests__/assets/events/EventWithSchemaAndExamples/index.md +8 -0
- package/lib/__tests__/assets/events/EventWithSchemaAndExamples/schema.json +4 -0
- package/lib/__tests__/assets/events/EventWithVersions/index.md +10 -0
- package/lib/__tests__/assets/events/EventWithVersions/versioned/0.0.1/index.md +10 -0
- package/lib/__tests__/assets/services/Email Platform/index.md +17 -0
- package/lib/__tests__/events.spec.ts +294 -0
- package/lib/__tests__/file-reader.spec.ts +57 -0
- package/lib/__tests__/graphs.spec.ts +62 -0
- package/lib/__tests__/services.spec.ts +144 -0
- package/lib/events.ts +221 -0
- package/lib/file-reader.ts +52 -0
- package/lib/graphs.ts +33 -0
- package/lib/services.ts +72 -0
- package/next-env.d.ts +5 -0
- package/next.config.js +3 -0
- package/package.json +52 -0
- package/pages/_app.tsx +49 -0
- package/pages/api/event/[name]/download.js +25 -0
- package/pages/events/[name]/logs.tsx +170 -0
- package/pages/events/[name]/v/[version].tsx +19 -0
- package/pages/events/[name].tsx +139 -0
- package/pages/events.tsx +227 -0
- package/pages/index.tsx +47 -0
- package/pages/overview.tsx +80 -0
- package/pages/services/[name].tsx +102 -0
- package/pages/services.tsx +123 -0
- package/pages/users/[id].tsx +83 -0
- package/postcss.config.js +6 -0
- package/public/favicon.ico +0 -0
- package/public/logo-random.svg +114 -0
- package/public/logo.svg +44 -0
- package/public/opengraph.png +0 -0
- package/scripts/__tests__/assets/eventcatalog.config.js +33 -0
- package/scripts/__tests__/generate.spec.ts +39 -0
- package/scripts/generate.js +28 -0
- package/styles/Home.module.css +116 -0
- package/styles/globals.css +48 -0
- package/tailwind.config.js +16 -0
- package/tsconfig.json +38 -0
- package/types/index.ts +7 -0
- package/utils/random-bg.ts +13 -0
package/tsconfig.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "es5",
|
|
4
|
+
"lib": ["dom", "dom.iterable", "esnext"],
|
|
5
|
+
"allowJs": true,
|
|
6
|
+
"skipLibCheck": true,
|
|
7
|
+
"strict": false,
|
|
8
|
+
"forceConsistentCasingInFileNames": true,
|
|
9
|
+
"noEmit": true,
|
|
10
|
+
"incremental": true,
|
|
11
|
+
"esModuleInterop": true,
|
|
12
|
+
"module": "esnext",
|
|
13
|
+
"moduleResolution": "node",
|
|
14
|
+
"resolveJsonModule": true,
|
|
15
|
+
"isolatedModules": true,
|
|
16
|
+
"baseUrl": ".",
|
|
17
|
+
"paths": {
|
|
18
|
+
"@/components/*": ["components/*"],
|
|
19
|
+
"@/modules/*": ["modules/*"],
|
|
20
|
+
"@/hooks/*": ["hooks/*"],
|
|
21
|
+
"@/types/*": ["types/*"],
|
|
22
|
+
"@/contexts/*": ["contexts/*"],
|
|
23
|
+
"@/data/*": ["data/*"],
|
|
24
|
+
"@/lib/*": ["lib/*"],
|
|
25
|
+
"@/utils/*": ["utils/*"],
|
|
26
|
+
"@/styles/*": ["styles/*"]
|
|
27
|
+
},
|
|
28
|
+
"jsx": "preserve"
|
|
29
|
+
},
|
|
30
|
+
"include": [
|
|
31
|
+
"next-env.d.ts",
|
|
32
|
+
"**/*.ts",
|
|
33
|
+
"**/*.tsx",
|
|
34
|
+
"hooks/EventCatalog.tsx",
|
|
35
|
+
"scripts/generate.js"
|
|
36
|
+
],
|
|
37
|
+
"exclude": ["node_modules"]
|
|
38
|
+
}
|
package/types/index.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
export default (str: string) => {
|
|
3
|
+
let hash = 0;
|
|
4
|
+
for (let i = 0; i < str.length; i++) {
|
|
5
|
+
hash = str.charCodeAt(i) + ((hash << 5) - hash);
|
|
6
|
+
}
|
|
7
|
+
let colour = '#';
|
|
8
|
+
for (let i = 0; i < 3; i++) {
|
|
9
|
+
const value = (hash >> (i * 8)) & 0xff;
|
|
10
|
+
colour += `00${value.toString(16)}`.substr(-2);
|
|
11
|
+
}
|
|
12
|
+
return colour;
|
|
13
|
+
};
|