@eventcatalog/create-eventcatalog 4.1.2 → 4.2.0-beta.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/dist/index.js +510 -539
- package/package.json +9 -6
- package/templates/amazon-api-gateway/README-template.md +4 -8
- package/templates/amazon-api-gateway/eventcatalog.auth.js +4 -5
- package/templates/amazon-api-gateway/eventcatalog.config.js +16 -11
- package/templates/amazon-api-gateway/eventcatalog.styles.css +1 -1
- package/templates/analytics.ts +8 -8
- package/templates/asyncapi/asyncapi-files/messages/user-signed-up.yml +1 -1
- package/templates/asyncapi/asyncapi-files/user-service.yml +1 -1
- package/templates/asyncapi/eventcatalog.auth.js +4 -5
- package/templates/asyncapi/eventcatalog.config.js +16 -9
- package/templates/asyncapi/eventcatalog.styles.css +1 -1
- package/templates/asyncapi/teams/order-management.mdx +6 -6
- package/templates/asyncapi/teams/user-management.mdx +4 -4
- package/templates/asyncapi/users/aSmith.mdx +0 -1
- package/templates/asyncapi/users/alee.mdx +1 -1
- package/templates/asyncapi/users/azhang.mdx +1 -1
- package/templates/asyncapi/users/dboyne.mdx +4 -3
- package/templates/asyncapi/users/dkim.mdx +1 -1
- package/templates/asyncapi/users/jbrown.mdx +1 -1
- package/templates/asyncapi/users/mSmith.mdx +2 -2
- package/templates/confluent/README-template.md +4 -8
- package/templates/confluent/eventcatalog.auth.js +4 -5
- package/templates/confluent/eventcatalog.config.js +7 -8
- package/templates/confluent/eventcatalog.styles.css +1 -1
- package/templates/default/channels/inventory.{env}.events/index.mdx +10 -8
- package/templates/default/channels/orders.{env}.events/index.mdx +5 -3
- package/templates/default/channels/payment.{env}.events/index.mdx +14 -13
- package/templates/default/domains/E-Commerce/index.mdx +32 -20
- package/templates/default/domains/E-Commerce/ubiquitous-language.mdx +9 -9
- package/templates/default/domains/Orders/changelog.mdx +1 -1
- package/templates/default/domains/Orders/entities/CartItem/index.mdx +15 -14
- package/templates/default/domains/Orders/entities/Customer/index.mdx +5 -5
- package/templates/default/domains/Orders/entities/Order/index.mdx +9 -9
- package/templates/default/domains/Orders/entities/OrderItem/index.mdx +6 -5
- package/templates/default/domains/Orders/entities/ShoppingCart/index.mdx +16 -15
- package/templates/default/domains/Orders/index.mdx +22 -7
- package/templates/default/domains/Orders/services/InventoryService/changelog.mdx +1 -1
- package/templates/default/domains/Orders/services/InventoryService/commands/AddInventory/index.mdx +2 -5
- package/templates/default/domains/Orders/services/InventoryService/commands/AddInventory/schema.json +26 -27
- package/templates/default/domains/Orders/services/InventoryService/commands/PlaceOrder/index.mdx +10 -12
- package/templates/default/domains/Orders/services/InventoryService/commands/UpdateInventory/index.mdx +1 -1
- package/templates/default/domains/Orders/services/InventoryService/commands/UpdateInventory/schema.json +26 -27
- package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/changelog.mdx +3 -4
- package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/index.mdx +14 -4
- package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/versioned/0.0.1/changelog.mdx +3 -7
- package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/versioned/0.0.1/index.mdx +9 -5
- package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/versioned/0.0.1/schema.json +36 -0
- package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/versioned/1.0.0/changelog.mdx +11 -11
- package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/versioned/1.0.0/index.mdx +16 -12
- package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/versioned/1.0.0/schema.json +36 -0
- package/templates/default/domains/Orders/services/InventoryService/events/OutOfStock/index.mdx +2 -0
- package/templates/default/domains/Orders/services/InventoryService/events/OutOfStock/schema.json +28 -0
- package/templates/default/domains/Orders/services/InventoryService/events/OutOfStock/versioned/0.0.1/index.mdx +14 -12
- package/templates/default/domains/Orders/services/InventoryService/events/OutOfStock/versioned/0.0.1/schema.json +28 -0
- package/templates/default/domains/Orders/services/InventoryService/index.mdx +40 -21
- package/templates/default/domains/Orders/services/InventoryService/queries/GetInventoryList/index.mdx +5 -5
- package/templates/default/domains/Orders/services/InventoryService/queries/GetInventoryList/schema.json +48 -49
- package/templates/default/domains/Orders/services/InventoryService/queries/GetInventoryStatus/index.mdx +6 -7
- package/templates/default/domains/Orders/services/InventoryService/queries/GetInventoryStatus/schema.json +25 -26
- package/templates/default/domains/Orders/services/NotificationService/index.mdx +29 -10
- package/templates/default/domains/Orders/services/NotificationService/queries/GetNotificationDetails/index.mdx +4 -4
- package/templates/default/domains/Orders/services/NotificationService/queries/GetNotificationDetails/schema.json +0 -1
- package/templates/default/domains/Orders/services/NotificationService/queries/GetUserNotifications/index.mdx +4 -5
- package/templates/default/domains/Orders/services/NotificationService/queries/GetUserNotifications/schema.json +43 -44
- package/templates/default/domains/Orders/services/OrdersService/changelog.mdx +1 -1
- package/templates/default/domains/Orders/services/OrdersService/events/OrderAmended/schema.json +66 -67
- package/templates/default/domains/Orders/services/OrdersService/events/OrderCancelled/index.mdx +1 -2
- package/templates/default/domains/Orders/services/OrdersService/events/OrderCancelled/schema.json +67 -68
- package/templates/default/domains/Orders/services/OrdersService/events/OrderConfirmed/index.mdx +1 -1
- package/templates/default/domains/Orders/services/OrdersService/events/OrderConfirmed/schema.json +62 -63
- package/templates/default/domains/Orders/services/OrdersService/index.mdx +26 -6
- package/templates/default/domains/Orders/services/OrdersService/openapi.yml +3 -3
- package/templates/default/domains/Orders/services/OrdersService/order-service-asyncapi.yaml +11 -11
- package/templates/default/domains/Orders/services/OrdersService/queries/GetOrder/index.mdx +5 -5
- package/templates/default/domains/Orders/services/OrdersService/versioned/0.0.2/changelog.mdx +1 -1
- package/templates/default/domains/Orders/services/OrdersService/versioned/0.0.2/index.mdx +1 -1
- package/templates/default/domains/Orders/services/OrdersService/versioned/0.0.2/openapi.yml +1 -1
- package/templates/default/domains/Orders/services/OrdersService/versioned/0.0.2/order-service-asyncapi.yaml +11 -11
- package/templates/default/domains/Orders/services/ShippingService/commands/CancelShipment/index.mdx +1 -2
- package/templates/default/domains/Orders/services/ShippingService/commands/CancelShipment/schema.json +12 -12
- package/templates/default/domains/Orders/services/ShippingService/commands/CreateReturnLabel/index.mdx +2 -2
- package/templates/default/domains/Orders/services/ShippingService/commands/CreateReturnLabel/schema.json +17 -17
- package/templates/default/domains/Orders/services/ShippingService/commands/CreateShipment/index.mdx +2 -2
- package/templates/default/domains/Orders/services/ShippingService/commands/UpdateShipmentStatus/index.mdx +2 -2
- package/templates/default/domains/Orders/services/ShippingService/commands/UpdateShipmentStatus/schema.json +26 -26
- package/templates/default/domains/Orders/services/ShippingService/events/DeliveryFailed/index.mdx +2 -2
- package/templates/default/domains/Orders/services/ShippingService/events/DeliveryFailed/schema.json +15 -15
- package/templates/default/domains/Orders/services/ShippingService/events/ReturnInitiated/index.mdx +2 -2
- package/templates/default/domains/Orders/services/ShippingService/events/ReturnInitiated/schema.json +15 -15
- package/templates/default/domains/Orders/services/ShippingService/events/ShipmentCreated/index.mdx +2 -2
- package/templates/default/domains/Orders/services/ShippingService/events/ShipmentCreated/schema.json +0 -1
- package/templates/default/domains/Orders/services/ShippingService/events/ShipmentDelivered/index.mdx +2 -2
- package/templates/default/domains/Orders/services/ShippingService/events/ShipmentDelivered/schema.json +15 -15
- package/templates/default/domains/Orders/services/ShippingService/events/ShipmentDispatched/index.mdx +2 -2
- package/templates/default/domains/Orders/services/ShippingService/events/ShipmentDispatched/schema.json +15 -15
- package/templates/default/domains/Orders/services/ShippingService/events/ShipmentInTransit/index.mdx +2 -2
- package/templates/default/domains/Orders/services/ShippingService/events/ShipmentInTransit/schema.json +15 -15
- package/templates/default/domains/Orders/services/ShippingService/index.mdx +14 -5
- package/templates/default/domains/Orders/ubiquitous-language.mdx +10 -10
- package/templates/default/domains/Orders/versioned/0.0.1/index.mdx +7 -7
- package/templates/default/domains/Orders/versioned/0.0.2/index.mdx +3 -3
- package/templates/default/domains/Payment/entities/Address/index.mdx +17 -16
- package/templates/default/domains/Payment/entities/Invoice/index.mdx +8 -7
- package/templates/default/domains/Payment/entities/Payment/index.mdx +15 -14
- package/templates/default/domains/Payment/entities/PaymentMethod/index.mdx +8 -7
- package/templates/default/domains/Payment/entities/Transaction/index.mdx +6 -5
- package/templates/default/domains/Payment/flows/PaymentProcessed/index.mdx +71 -70
- package/templates/default/domains/Payment/index.mdx +10 -10
- package/templates/default/domains/Payment/services/FraudDetectionService/events/FraudCheckCompleted/index.mdx +2 -2
- package/templates/default/domains/Payment/services/FraudDetectionService/events/FraudCheckCompleted/schema.json +1 -1
- package/templates/default/domains/Payment/services/FraudDetectionService/index.mdx +3 -2
- package/templates/default/domains/Payment/services/PaymentGatewayService/commands/ProcessPayment/index.mdx +4 -3
- package/templates/default/domains/Payment/services/PaymentGatewayService/commands/ProcessPayment/schema.json +1 -1
- package/templates/default/domains/Payment/services/PaymentGatewayService/events/PaymentFailed/index.mdx +4 -2
- package/templates/default/domains/Payment/services/PaymentGatewayService/events/PaymentFailed/schema.json +1 -1
- package/templates/default/domains/Payment/services/PaymentGatewayService/index.mdx +3 -2
- package/templates/default/domains/Payment/services/PaymentService/events/PaymentInitiated/index.mdx +2 -1
- package/templates/default/domains/Payment/services/PaymentService/events/PaymentInitiated/schema.json +31 -0
- package/templates/default/domains/Payment/services/PaymentService/events/PaymentProcessed/index.mdx +2 -1
- package/templates/default/domains/Payment/services/PaymentService/events/PaymentProcessed/schema.json +54 -0
- package/templates/default/domains/Payment/services/PaymentService/events/PaymentProcessed/versioned/0.0.1/index.mdx +4 -3
- package/templates/default/domains/Payment/services/PaymentService/events/PaymentProcessed/versioned/0.0.1/schema.json +54 -0
- package/templates/default/domains/Payment/services/PaymentService/index.mdx +1 -0
- package/templates/default/domains/Payment/services/PaymentService/queries/GetPaymentStatus/index.mdx +5 -5
- package/templates/default/domains/Payment/services/PaymentService/queries/GetPaymentStatus/schema.json +0 -1
- package/templates/default/domains/Payment/ubiquitous-language.mdx +8 -8
- package/templates/default/domains/ProductCatalog/entities/Category/index.mdx +10 -9
- package/templates/default/domains/ProductCatalog/entities/Inventory/index.mdx +15 -14
- package/templates/default/domains/ProductCatalog/entities/Product/index.mdx +11 -10
- package/templates/default/domains/ProductCatalog/entities/Review/index.mdx +15 -14
- package/templates/default/domains/ProductCatalog/index.mdx +8 -6
- package/templates/default/domains/ProductCatalog/ubiquitous-language.mdx +10 -10
- package/templates/default/domains/Subscriptions/entities/BillingProfile/index.mdx +8 -7
- package/templates/default/domains/Subscriptions/entities/SubscriptionPeriod/index.mdx +8 -7
- package/templates/default/domains/Subscriptions/flows/CancelSubscription/SubscriptionRenewed/index.mdx +207 -208
- package/templates/default/domains/Subscriptions/flows/CancelSubscription/index.mdx +48 -49
- package/templates/default/domains/Subscriptions/flows/CancelSubscription/versioned/0.0.1/index.mdx +36 -36
- package/templates/default/domains/Subscriptions/index.mdx +10 -10
- package/templates/default/domains/Subscriptions/services/BillingService/events/SubscriptionPaymentDue/index.mdx +3 -2
- package/templates/default/domains/Subscriptions/services/BillingService/events/SubscriptionPaymentDue/schema.json +1 -1
- package/templates/default/domains/Subscriptions/services/BillingService/index.mdx +2 -1
- package/templates/default/domains/Subscriptions/services/PlanManagementService/index.mdx +6 -2
- package/templates/default/domains/Subscriptions/services/SubscriptionService/commands/CancelSubscription/index.mdx +6 -5
- package/templates/default/domains/Subscriptions/services/SubscriptionService/commands/CancelSubscription/schema.json +30 -0
- package/templates/default/domains/Subscriptions/services/SubscriptionService/commands/SubscribeUser/index.mdx +6 -5
- package/templates/default/domains/Subscriptions/services/SubscriptionService/commands/SubscribeUser/schema.json +31 -0
- package/templates/default/domains/Subscriptions/services/SubscriptionService/events/UserSubscriptionCancelled/index.mdx +6 -5
- package/templates/default/domains/Subscriptions/services/SubscriptionService/events/UserSubscriptionCancelled/schema.json +35 -0
- package/templates/default/domains/Subscriptions/services/SubscriptionService/events/UserSubscriptionStarted/index.mdx +6 -5
- package/templates/default/domains/Subscriptions/services/SubscriptionService/events/UserSubscriptionStarted/schema.json +36 -0
- package/templates/default/domains/Subscriptions/services/SubscriptionService/index.mdx +30 -10
- package/templates/default/domains/Subscriptions/services/SubscriptionService/queries/GetSubscriptionStatus/index.mdx +5 -5
- package/templates/default/domains/Subscriptions/services/SubscriptionService/queries/GetSubscriptionStatus/schema.json +10 -2
- package/templates/default/domains/Subscriptions/services/SubscriptionService/queries/GetSubscriptionStatus/versioned/0.0.1/index.mdx +5 -5
- package/templates/default/domains/Subscriptions/services/SubscriptionService/queries/GetSubscriptionStatus/versioned/0.0.1/schema.json +10 -2
- package/templates/default/domains/Subscriptions/ubiquitous-language.mdx +9 -9
- package/templates/default/eventcatalog.auth.js +4 -5
- package/templates/default/eventcatalog.config.js +6 -8
- package/templates/default/eventcatalog.styles.css +1 -1
- package/templates/default/teams/full-stack.mdx +4 -4
- package/templates/default/teams/mobile-devs.mdx +4 -2
- package/templates/default/users/aSmith.mdx +0 -1
- package/templates/default/users/dboyne.mdx +4 -3
- package/templates/default/users/mSmith.mdx +2 -2
- package/templates/empty/eventcatalog.auth.js +4 -5
- package/templates/empty/eventcatalog.config.js +6 -7
- package/templates/empty/eventcatalog.styles.css +1 -1
- package/templates/eventbridge/README-template.md +4 -8
- package/templates/eventbridge/eventcatalog.auth.js +4 -5
- package/templates/eventbridge/eventcatalog.config.js +7 -8
- package/templates/eventbridge/eventcatalog.styles.css +1 -1
- package/templates/graphql/eventcatalog.auth.js +4 -5
- package/templates/graphql/eventcatalog.config.js +29 -20
- package/templates/graphql/eventcatalog.styles.css +1 -1
- package/templates/graphql/teams/order-management.mdx +6 -6
- package/templates/graphql/teams/payment-management.mdx +4 -4
- package/templates/graphql/teams/product-management.mdx +4 -4
- package/templates/graphql/users/aSmith.mdx +0 -1
- package/templates/graphql/users/alee.mdx +1 -1
- package/templates/graphql/users/azhang.mdx +1 -1
- package/templates/graphql/users/dboyne.mdx +4 -3
- package/templates/graphql/users/dkim.mdx +1 -1
- package/templates/graphql/users/jbrown.mdx +1 -1
- package/templates/graphql/users/mSmith.mdx +2 -2
- package/templates/index.ts +49 -59
- package/templates/openapi/eventcatalog.auth.js +4 -5
- package/templates/openapi/eventcatalog.config.js +33 -26
- package/templates/openapi/eventcatalog.styles.css +1 -1
- package/templates/openapi/teams/order-management.mdx +6 -6
- package/templates/openapi/teams/payment-management.mdx +4 -4
- package/templates/openapi/teams/product-management.mdx +4 -4
- package/templates/openapi/users/aSmith.mdx +0 -1
- package/templates/openapi/users/alee.mdx +1 -1
- package/templates/openapi/users/azhang.mdx +1 -1
- package/templates/openapi/users/dboyne.mdx +4 -3
- package/templates/openapi/users/dkim.mdx +1 -1
- package/templates/openapi/users/jbrown.mdx +1 -1
- package/templates/openapi/users/mSmith.mdx +2 -2
- package/templates/types.ts +12 -3
package/templates/index.ts
CHANGED
|
@@ -1,22 +1,18 @@
|
|
|
1
|
-
import { copy } from
|
|
2
|
-
import { install } from
|
|
1
|
+
import { copy } from '../helpers/copy';
|
|
2
|
+
import { install } from '../helpers/install';
|
|
3
3
|
|
|
4
|
-
import os from
|
|
5
|
-
import fs from
|
|
6
|
-
import path from
|
|
7
|
-
import { v4 } from 'uuid'
|
|
4
|
+
import os from 'os';
|
|
5
|
+
import fs from 'fs';
|
|
6
|
+
import path from 'path';
|
|
7
|
+
import { v4 } from 'uuid';
|
|
8
8
|
|
|
9
|
-
import { GetTemplateFileArgs, InstallTemplateArgs } from
|
|
10
|
-
import { raiseEvent } from
|
|
9
|
+
import { GetTemplateFileArgs, InstallTemplateArgs } from './types';
|
|
10
|
+
import { raiseEvent } from './analytics';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Get the file path for a given file in a template, e.g. "next.config.js".
|
|
14
14
|
*/
|
|
15
|
-
export const getTemplateFile = ({
|
|
16
|
-
template,
|
|
17
|
-
mode,
|
|
18
|
-
file,
|
|
19
|
-
}: GetTemplateFileArgs): string => {
|
|
15
|
+
export const getTemplateFile = ({ template, mode, file }: GetTemplateFileArgs): string => {
|
|
20
16
|
return path.join(__dirname, template, mode, file);
|
|
21
17
|
};
|
|
22
18
|
|
|
@@ -31,32 +27,29 @@ export const installTemplate = async ({
|
|
|
31
27
|
template,
|
|
32
28
|
mode,
|
|
33
29
|
eslint,
|
|
34
|
-
organizationName
|
|
30
|
+
organizationName,
|
|
35
31
|
}: InstallTemplateArgs) => {
|
|
36
32
|
/**
|
|
37
33
|
* Create a package.json for the new project
|
|
38
34
|
*/
|
|
39
35
|
const packageJson = {
|
|
40
36
|
name: appName,
|
|
41
|
-
version:
|
|
37
|
+
version: '0.1.0',
|
|
42
38
|
private: true,
|
|
43
39
|
scripts: {
|
|
44
|
-
dev:
|
|
45
|
-
build:
|
|
46
|
-
start:
|
|
47
|
-
preview:
|
|
48
|
-
generate:
|
|
49
|
-
lint:
|
|
40
|
+
dev: 'eventcatalog dev',
|
|
41
|
+
build: 'eventcatalog build',
|
|
42
|
+
start: 'eventcatalog start',
|
|
43
|
+
preview: 'eventcatalog preview',
|
|
44
|
+
generate: 'eventcatalog generate',
|
|
45
|
+
lint: 'eventcatalog-linter',
|
|
50
46
|
test: 'echo "Error: no test specified" && exit 1',
|
|
51
|
-
}
|
|
47
|
+
},
|
|
52
48
|
};
|
|
53
49
|
/**
|
|
54
50
|
* Write it to disk.
|
|
55
51
|
*/
|
|
56
|
-
fs.writeFileSync(
|
|
57
|
-
path.join(root, "package.json"),
|
|
58
|
-
JSON.stringify(packageJson, null, 2) + os.EOL,
|
|
59
|
-
);
|
|
52
|
+
fs.writeFileSync(path.join(root, 'package.json'), JSON.stringify(packageJson, null, 2) + os.EOL);
|
|
60
53
|
/**
|
|
61
54
|
* These flags will be passed to `install()`, which calls the package manager
|
|
62
55
|
* install process.
|
|
@@ -67,35 +60,32 @@ export const installTemplate = async ({
|
|
|
67
60
|
* Default dependencies.
|
|
68
61
|
*/
|
|
69
62
|
// const dependencies = ["@eventcatalog/eventcatalog-2"];
|
|
70
|
-
const dependencies = [
|
|
71
|
-
"@eventcatalog/core",
|
|
72
|
-
"@eventcatalog/linter"
|
|
73
|
-
] as any;
|
|
63
|
+
const dependencies = ['@eventcatalog/core', '@eventcatalog/linter'] as any;
|
|
74
64
|
|
|
75
65
|
// if asyncapi is selected, add the asyncapi dependencies
|
|
76
|
-
if (template ===
|
|
77
|
-
dependencies.push(
|
|
66
|
+
if (template === 'asyncapi') {
|
|
67
|
+
dependencies.push('@eventcatalog/generator-asyncapi');
|
|
78
68
|
}
|
|
79
69
|
|
|
80
|
-
if (template ===
|
|
81
|
-
dependencies.push(
|
|
70
|
+
if (template === 'openapi') {
|
|
71
|
+
dependencies.push('@eventcatalog/generator-openapi');
|
|
82
72
|
}
|
|
83
73
|
|
|
84
|
-
if (template ===
|
|
85
|
-
dependencies.push(
|
|
74
|
+
if (template === 'graphql') {
|
|
75
|
+
dependencies.push('@eventcatalog/generator-graphql');
|
|
86
76
|
}
|
|
87
77
|
|
|
88
|
-
if (template ===
|
|
89
|
-
dependencies.push(
|
|
78
|
+
if (template === 'confluent') {
|
|
79
|
+
dependencies.push('@eventcatalog/generator-confluent-schema-registry');
|
|
90
80
|
}
|
|
91
81
|
|
|
92
|
-
if (template ===
|
|
93
|
-
dependencies.push(
|
|
82
|
+
if (template === 'eventbridge') {
|
|
83
|
+
dependencies.push('@eventcatalog/generator-eventbridge');
|
|
94
84
|
}
|
|
95
85
|
|
|
96
|
-
if (template ===
|
|
97
|
-
dependencies.push(
|
|
98
|
-
dependencies.push(
|
|
86
|
+
if (template === 'amazon-apigateway') {
|
|
87
|
+
dependencies.push('@eventcatalog/generator-amazon-apigateway');
|
|
88
|
+
dependencies.push('@eventcatalog/generator-openapi');
|
|
99
89
|
}
|
|
100
90
|
|
|
101
91
|
// "@myuser/my-package": "file:../lib"
|
|
@@ -115,24 +105,24 @@ export const installTemplate = async ({
|
|
|
115
105
|
/**
|
|
116
106
|
* Copy the template files to the target directory.
|
|
117
107
|
*/
|
|
118
|
-
const templatePath = path.join(__dirname,
|
|
108
|
+
const templatePath = path.join(__dirname, '../templates', template);
|
|
119
109
|
// console.log("templatePath", templatePath, __dirname, template);
|
|
120
|
-
await copy(
|
|
110
|
+
await copy('**', root, {
|
|
121
111
|
parents: true,
|
|
122
112
|
cwd: templatePath,
|
|
123
113
|
rename: (name) => {
|
|
124
114
|
switch (name) {
|
|
125
|
-
case
|
|
126
|
-
case
|
|
127
|
-
case
|
|
128
|
-
case
|
|
129
|
-
case
|
|
130
|
-
return
|
|
115
|
+
case 'env':
|
|
116
|
+
case 'gitignore':
|
|
117
|
+
case 'npmrc':
|
|
118
|
+
case 'dockerignore':
|
|
119
|
+
case 'eslintrc.json': {
|
|
120
|
+
return '.'.concat(name);
|
|
131
121
|
}
|
|
132
122
|
// README.md is ignored by webpack-asset-relocator-loader used by ncc:
|
|
133
123
|
// https://github.com/vercel/webpack-asset-relocator-loader/blob/e9308683d47ff507253e37c9bcbb99474603192b/src/asset-relocator.js#L227
|
|
134
|
-
case
|
|
135
|
-
return
|
|
124
|
+
case 'README-template.md': {
|
|
125
|
+
return 'README.md';
|
|
136
126
|
}
|
|
137
127
|
default: {
|
|
138
128
|
return name;
|
|
@@ -144,18 +134,18 @@ export const installTemplate = async ({
|
|
|
144
134
|
const cId = v4();
|
|
145
135
|
|
|
146
136
|
// update the properties in the eventcatalog.config.js
|
|
147
|
-
const eventCatalogConfigPath = path.join(root,
|
|
148
|
-
let eventCatalogConfig = fs.readFileSync(eventCatalogConfigPath,
|
|
149
|
-
eventCatalogConfig = eventCatalogConfig.replace(
|
|
150
|
-
eventCatalogConfig = eventCatalogConfig.replace(
|
|
137
|
+
const eventCatalogConfigPath = path.join(root, 'eventcatalog.config.js');
|
|
138
|
+
let eventCatalogConfig = fs.readFileSync(eventCatalogConfigPath, 'utf8');
|
|
139
|
+
eventCatalogConfig = eventCatalogConfig.replace(/<organizationName>/g, organizationName);
|
|
140
|
+
eventCatalogConfig = eventCatalogConfig.replace(/<cId>/g, cId);
|
|
151
141
|
fs.writeFileSync(eventCatalogConfigPath, eventCatalogConfig);
|
|
152
142
|
|
|
153
143
|
await raiseEvent({ command: 'create', org: organizationName, cId });
|
|
154
144
|
|
|
155
145
|
if (!eslint) {
|
|
156
146
|
// remove un-necessary template file if eslint is not desired
|
|
157
|
-
await fs.promises.unlink(path.join(root,
|
|
147
|
+
await fs.promises.unlink(path.join(root, '.eslintrc.json'));
|
|
158
148
|
}
|
|
159
149
|
};
|
|
160
150
|
|
|
161
|
-
export * from
|
|
151
|
+
export * from './types';
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
|
|
2
1
|
/**
|
|
3
2
|
* This is an optional file that can add authentication to your EventCatalog.
|
|
4
|
-
*
|
|
3
|
+
*
|
|
5
4
|
* To enable authentication you need to set `server:output` in your `eventcatalog.config.js` file.
|
|
6
5
|
* And then pick which provider you want to use.
|
|
7
|
-
*
|
|
6
|
+
*
|
|
8
7
|
* You can read more in the documentation:
|
|
9
8
|
* https://www.eventcatalog.dev/docs/development/guides/authentication/introduction
|
|
10
|
-
*
|
|
9
|
+
*
|
|
11
10
|
*/
|
|
12
11
|
|
|
13
12
|
// export default {
|
|
@@ -42,4 +41,4 @@
|
|
|
42
41
|
// issuer: process.env.AUTH_OKTA_ISSUER,
|
|
43
42
|
// },
|
|
44
43
|
// },
|
|
45
|
-
// }
|
|
44
|
+
// }
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import path from
|
|
2
|
-
import url from
|
|
1
|
+
import path from 'path';
|
|
2
|
+
import url from 'url';
|
|
3
3
|
|
|
4
4
|
const __dirname = path.dirname(url.fileURLToPath(import.meta.url));
|
|
5
5
|
|
|
6
6
|
/** @type {import('@eventcatalog/core/bin/eventcatalog.config').Config} */
|
|
7
7
|
export default {
|
|
8
|
-
title:
|
|
9
|
-
tagline:
|
|
8
|
+
title: 'EventCatalog',
|
|
9
|
+
tagline:
|
|
10
|
+
'This internal platform provides a comprehensive view of our event-driven architecture across all systems. Use this portal to discover existing domains, explore services and their dependencies, and understand the message contracts that connect our infrastructure',
|
|
10
11
|
organizationName: '<organizationName>',
|
|
11
|
-
homepageLink:
|
|
12
|
-
editUrl:
|
|
12
|
+
homepageLink: 'https://eventcatalog.dev/',
|
|
13
|
+
editUrl: 'https://github.com/boyney123/eventcatalog-demo/edit/master',
|
|
13
14
|
// Supports static or server. Static renders a static site, server renders a server side rendered site
|
|
14
15
|
// large catalogs may benefit from server side rendering
|
|
15
16
|
output: 'static',
|
|
@@ -17,19 +18,17 @@ export default {
|
|
|
17
18
|
trailingSlash: false,
|
|
18
19
|
// Change to make the base url of the site different, by default https://{website}.com/docs,
|
|
19
20
|
// changing to /company would be https://{website}.com/company/docs,
|
|
20
|
-
base:
|
|
21
|
+
base: '/',
|
|
21
22
|
// Customize the navigation for your docs sidebar.
|
|
22
23
|
// read more at https://eventcatalog.dev/docs/development/customization/customize-sidebars/documentation-sidebar
|
|
23
24
|
navigation: {
|
|
24
|
-
pages: [
|
|
25
|
-
'list:all',
|
|
26
|
-
]
|
|
25
|
+
pages: ['list:all'],
|
|
27
26
|
},
|
|
28
27
|
// Customize the logo, add your logo to public/ folder
|
|
29
28
|
logo: {
|
|
30
|
-
alt:
|
|
31
|
-
src:
|
|
32
|
-
text:
|
|
29
|
+
alt: 'EventCatalog Logo',
|
|
30
|
+
src: '/logo.png',
|
|
31
|
+
text: 'EventCatalog',
|
|
33
32
|
},
|
|
34
33
|
// This lets you copy markdown contents from EventCatalog to your clipboard
|
|
35
34
|
// Including schemas for your events and services
|
|
@@ -38,38 +37,46 @@ export default {
|
|
|
38
37
|
},
|
|
39
38
|
generators: [
|
|
40
39
|
[
|
|
41
|
-
|
|
40
|
+
'@eventcatalog/generator-openapi',
|
|
42
41
|
{
|
|
43
42
|
services: [
|
|
44
|
-
{
|
|
43
|
+
{
|
|
44
|
+
path: path.join(__dirname, 'openapi-files', 'product-api.yml'),
|
|
45
|
+
id: 'product-service',
|
|
46
|
+
owners: ['product-management'],
|
|
47
|
+
},
|
|
45
48
|
],
|
|
46
|
-
domain: { id:
|
|
49
|
+
domain: { id: 'products', name: 'Products', version: '0.0.1' },
|
|
47
50
|
},
|
|
48
51
|
],
|
|
49
52
|
[
|
|
50
|
-
|
|
53
|
+
'@eventcatalog/generator-openapi',
|
|
51
54
|
{
|
|
52
55
|
services: [
|
|
53
|
-
{ path: path.join(__dirname,
|
|
54
|
-
{ path: path.join(__dirname,
|
|
56
|
+
{ path: path.join(__dirname, 'openapi-files', 'order-api.yml'), id: 'order-service', owners: ['order-management'] },
|
|
57
|
+
{ path: path.join(__dirname, 'openapi-files', 'order-history.yml'), id: 'order-history', owners: ['order-management'] },
|
|
55
58
|
],
|
|
56
59
|
domain: {
|
|
57
|
-
id:
|
|
58
|
-
name:
|
|
59
|
-
version:
|
|
60
|
+
id: 'order-management',
|
|
61
|
+
name: 'Order management',
|
|
62
|
+
version: '0.0.1',
|
|
60
63
|
},
|
|
61
64
|
},
|
|
62
65
|
],
|
|
63
66
|
[
|
|
64
|
-
|
|
67
|
+
'@eventcatalog/generator-openapi',
|
|
65
68
|
{
|
|
66
69
|
services: [
|
|
67
|
-
{
|
|
70
|
+
{
|
|
71
|
+
path: path.join(__dirname, 'openapi-files', 'payment-api.yml'),
|
|
72
|
+
id: 'payment-service',
|
|
73
|
+
owners: ['payment-management'],
|
|
74
|
+
},
|
|
68
75
|
],
|
|
69
|
-
domain: { id:
|
|
76
|
+
domain: { id: 'payment', name: 'Payment', version: '0.0.1' },
|
|
70
77
|
},
|
|
71
78
|
],
|
|
72
79
|
],
|
|
73
80
|
// required random generated id used by eventcatalog
|
|
74
|
-
cId: '<cId>'
|
|
81
|
+
cId: '<cId>',
|
|
75
82
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/* Custom styling support coming soon. */
|
|
1
|
+
/* Custom styling support coming soon. */
|
|
@@ -3,11 +3,11 @@ id: order-management
|
|
|
3
3
|
name: Order Management
|
|
4
4
|
summmary: Order Management team based in London, UK
|
|
5
5
|
members:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
- dboyne
|
|
7
|
+
- asmith
|
|
8
|
+
- msmith
|
|
9
|
+
- alee
|
|
10
|
+
- azhang
|
|
11
11
|
email: test@test.com
|
|
12
12
|
slackDirectMessageUrl: https://yourteam.slack.com/channels/boyney123
|
|
13
13
|
---
|
|
@@ -28,4 +28,4 @@ The Order Management team is responsible for managing orders, inventory, shipmen
|
|
|
28
28
|
|
|
29
29
|
- David Boyne
|
|
30
30
|
- Alice Smith
|
|
31
|
-
- Mike Smith
|
|
31
|
+
- Mike Smith
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
id: payment-management
|
|
3
3
|
name: Payment Management
|
|
4
4
|
members:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
- dboyne
|
|
6
|
+
- jbrown
|
|
7
|
+
- dkim
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
The payment management team is responsible for managing payments and payment accounts.
|
|
@@ -15,4 +15,4 @@ The payment management team is responsible for managing payments and payment acc
|
|
|
15
15
|
- Manage payment and payment account provisioning
|
|
16
16
|
- Manage payment and payment account deprovisioning
|
|
17
17
|
- Manage user and user account password management
|
|
18
|
-
- Manage user and user account role management
|
|
18
|
+
- Manage user and user account role management
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
id: product-management
|
|
3
3
|
name: Product Management
|
|
4
4
|
members:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
- dboyne
|
|
6
|
+
- jbrown
|
|
7
|
+
- dkim
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
The product management team is responsible for managing products and product accounts.
|
|
@@ -15,4 +15,4 @@ The product management team is responsible for managing products and product acc
|
|
|
15
15
|
- Manage product and product account provisioning
|
|
16
16
|
- Manage product and product account deprovisioning
|
|
17
17
|
- Manage product and product account password management
|
|
18
|
-
- Manage product and product account role management
|
|
18
|
+
- Manage product and product account role management
|
|
@@ -24,4 +24,3 @@ As the Product Owner for Full Stackers, my role involves a wide range of respons
|
|
|
24
24
|
My mission is to deliver products that not only meet but exceed customer expectations. I thrive on the challenge of translating complex requirements into simple, intuitive solutions.
|
|
25
25
|
|
|
26
26
|
If you’re interested in product management, user experience, or discussing the latest trends in technology, feel free to reach out!
|
|
27
|
-
|
|
@@ -5,4 +5,4 @@ avatarUrl: https://randomuser.me/api/portraits/women/91.jpg
|
|
|
5
5
|
role: Technical Writer
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
As a Technical Writer on the Documentation team, I create clear, comprehensive documentation for our products and APIs. My focus is on making complex technical concepts accessible to developers and end-users alike. I collaborate with engineering teams to ensure our documentation stays current and accurate.
|
|
8
|
+
As a Technical Writer on the Documentation team, I create clear, comprehensive documentation for our products and APIs. My focus is on making complex technical concepts accessible to developers and end-users alike. I collaborate with engineering teams to ensure our documentation stays current and accurate.
|
|
@@ -8,4 +8,4 @@ slackDirectMessageUrl: https://yourteam.slack.com/channels/azhang
|
|
|
8
8
|
msTeamsDirectMessageUrl: https://teams.microsoft.com/l/chat/0/0?users=azhang@company.com
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
Building and maintaining data pipelines and infrastructure...
|
|
11
|
+
Building and maintaining data pipelines and infrastructure...
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: dboyne
|
|
3
3
|
name: David Boyne
|
|
4
|
-
avatarUrl:
|
|
4
|
+
avatarUrl: 'https://pbs.twimg.com/profile_images/1262283153563140096/DYRDqKg6_400x400.png'
|
|
5
5
|
role: Lead developer
|
|
6
6
|
email: test@test.com
|
|
7
7
|
slackDirectMessageUrl: https://yourteam.slack.com/channels/boyney123
|
|
@@ -28,5 +28,6 @@ I am passionate about leveraging the power of events to build systems that are n
|
|
|
28
28
|
Feel free to connect with me to discuss all things tech, event-driven architectures, or to exchange ideas on building better software systems!
|
|
29
29
|
|
|
30
30
|
---
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
|
|
32
|
+
_David Boyne_
|
|
33
|
+
_Tech Lead, Full Stackers_
|
|
@@ -8,4 +8,4 @@ slackDirectMessageUrl: https://yourteam.slack.com/channels/dkim
|
|
|
8
8
|
msTeamsDirectMessageUrl: https://teams.microsoft.com/l/chat/0/0?users=dkim@company.com
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
Optimizing application performance and user experience...
|
|
11
|
+
Optimizing application performance and user experience...
|
|
@@ -8,4 +8,4 @@ slackDirectMessageUrl: https://yourteam.slack.com/channels/jbrown
|
|
|
8
8
|
msTeamsDirectMessageUrl: https://teams.microsoft.com/l/chat/0/0?users=jbrown@company.com
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
Creating intuitive and engaging user interfaces...
|
|
11
|
+
Creating intuitive and engaging user interfaces...
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: msmith
|
|
3
3
|
name: Martin Smith
|
|
4
|
-
avatarUrl:
|
|
4
|
+
avatarUrl: 'https://randomuser.me/api/portraits/men/51.jpg'
|
|
5
5
|
role: Senior software engineer
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
As a Senior Mobile Developer on The Mobile Devs team, I play a key role in designing, developing, and maintaining our company’s mobile applications. My focus is on creating a seamless and intuitive user experience for our customers on both iOS and Android platforms. I work closely with cross-functional teams, including backend developers, UX/UI designers, and product managers, to deliver high-quality mobile solutions that meet business objectives and exceed user expectations.
|
|
8
|
+
As a Senior Mobile Developer on The Mobile Devs team, I play a key role in designing, developing, and maintaining our company’s mobile applications. My focus is on creating a seamless and intuitive user experience for our customers on both iOS and Android platforms. I work closely with cross-functional teams, including backend developers, UX/UI designers, and product managers, to deliver high-quality mobile solutions that meet business objectives and exceed user expectations.
|
package/templates/types.ts
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
|
-
import { PackageManager } from
|
|
1
|
+
import { PackageManager } from '../helpers/get-pkg-manager';
|
|
2
2
|
|
|
3
|
-
export type TemplateType =
|
|
4
|
-
|
|
3
|
+
export type TemplateType =
|
|
4
|
+
| 'default'
|
|
5
|
+
| 'app'
|
|
6
|
+
| 'empty'
|
|
7
|
+
| 'asyncapi'
|
|
8
|
+
| 'openapi'
|
|
9
|
+
| 'confluent'
|
|
10
|
+
| 'eventbridge'
|
|
11
|
+
| 'amazon-apigateway'
|
|
12
|
+
| 'graphql';
|
|
13
|
+
export type TemplateMode = 'js' | 'ts';
|
|
5
14
|
|
|
6
15
|
export interface GetTemplateFileArgs {
|
|
7
16
|
template: TemplateType;
|