@eventcatalog/create-eventcatalog 2.1.1 → 2.2.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 CHANGED
@@ -22466,7 +22466,7 @@ var import_os2 = __toESM(require("os"));
22466
22466
  var package_default = {
22467
22467
  name: "@eventcatalog/create-eventcatalog",
22468
22468
  description: "Create EventCatalog with one command",
22469
- version: "2.1.1",
22469
+ version: "2.2.0",
22470
22470
  bin: {
22471
22471
  "create-catalog": "./dist/index.js"
22472
22472
  },
@@ -22639,11 +22639,12 @@ async function createApp({
22639
22639
  typescript,
22640
22640
  eslint,
22641
22641
  experimentalApp,
22642
- organizationName: organizationName2
22642
+ organizationName: organizationName2,
22643
+ initEmptyProject
22643
22644
  }) {
22644
22645
  let repoInfo;
22645
22646
  const mode = typescript ? "ts" : "js";
22646
- const template = experimentalApp ? "app" : "default";
22647
+ const template = initEmptyProject ? "empty" : "default";
22647
22648
  const root = import_path10.default.resolve(appPath);
22648
22649
  if (!await isWriteable(import_path10.default.dirname(root))) {
22649
22650
  console.error(
@@ -22808,6 +22809,12 @@ var program = new import_commander.default.Command(package_default.name).version
22808
22809
 
22809
22810
  The organization name.
22810
22811
  `
22812
+ ).option(
22813
+ "--empty",
22814
+ `
22815
+
22816
+ Initialize the project with an empty template.
22817
+ `
22811
22818
  ).allowUnknownOption().parse(process.argv);
22812
22819
  var packageManager = !!program.useNpm ? "npm" : !!program.usePnpm ? "pnpm" : getPkgManager();
22813
22820
  async function run() {
@@ -22878,6 +22885,8 @@ Run ${import_chalk5.default.cyan(`${program.name()} --help`)} to see all options
22878
22885
  process.exit(1);
22879
22886
  }
22880
22887
  const example = typeof program.example === "string" && program.example.trim();
22888
+ const options = program.opts();
22889
+ const initEmptyProject = options.empty ?? false;
22881
22890
  try {
22882
22891
  await createApp({
22883
22892
  appPath: resolvedProjectPath,
@@ -22887,7 +22896,8 @@ Run ${import_chalk5.default.cyan(`${program.name()} --help`)} to see all options
22887
22896
  typescript: true,
22888
22897
  eslint: true,
22889
22898
  experimentalApp: false,
22890
- organizationName
22899
+ organizationName,
22900
+ initEmptyProject
22891
22901
  });
22892
22902
  } catch (reason) {
22893
22903
  if (!(reason instanceof DownloadError)) {
@@ -22909,7 +22919,8 @@ Do you want to use the default template instead?`,
22909
22919
  typescript: program.typescript,
22910
22920
  eslint: program.eslint,
22911
22921
  organizationName,
22912
- experimentalApp: program.experimentalApp
22922
+ experimentalApp: program.experimentalApp,
22923
+ initEmptyProject
22913
22924
  });
22914
22925
  }
22915
22926
  }
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": "2.1.1",
4
+ "version": "2.2.0",
5
5
  "bin": {
6
6
  "create-catalog": "./dist/index.js"
7
7
  },
@@ -0,0 +1,23 @@
1
+ ## Stage 1: Build the app
2
+ FROM node:lts AS build
3
+
4
+ WORKDIR /app
5
+
6
+ # Install dependencies
7
+ COPY package.json package-lock.json ./
8
+ RUN npm install
9
+
10
+ # Copy source code
11
+ COPY . .
12
+
13
+ # Fix for Astro in Docker: https://github.com/withastro/astro/issues/2596
14
+ ENV NODE_OPTIONS=--max_old_space_size=2048
15
+ # Build the app
16
+ RUN npm run build
17
+
18
+
19
+ ## Stage 2: Serve app with httpd server
20
+ FROM httpd:2.4
21
+
22
+ # Copy built app to serve
23
+ COPY --from=build /app/dist /usr/local/apache2/htdocs
@@ -0,0 +1 @@
1
+ # My Event Catalog
@@ -0,0 +1,8 @@
1
+ .eventcatalog-core/
2
+ .git/
3
+ dist/
4
+ node_modules/
5
+ .gitignore
6
+ .dockerignore
7
+ Dockerfile
8
+ README.md
@@ -0,0 +1,21 @@
1
+ /** @type {import('@eventcatalog/core/bin/eventcatalog.config').Config} */
2
+ export default {
3
+ title: 'EventCatalog',
4
+ tagline: 'Discover, Explore and Document your Event Driven Architectures',
5
+ organizationName: '<organizationName>',
6
+ homepageLink: 'https://eventcatalog.dev/',
7
+ editUrl: 'https://github.com/boyney123/eventcatalog-demo/edit/master',
8
+ // By default set to false, add true to get urls ending in /
9
+ trailingSlash: false,
10
+ // Change to make the base url of the site different, by default https://{website}.com/docs,
11
+ // changing to /company would be https://{website}.com/company/docs,
12
+ base: '/',
13
+ // Customize the logo, add your logo to public/ folder
14
+ logo: {
15
+ alt: 'EventCatalog Logo',
16
+ src: '/logo.png',
17
+ text: 'EventCatalog'
18
+ },
19
+ // required random generated id used by eventcatalog
20
+ cId: '<cId>'
21
+ }
@@ -0,0 +1 @@
1
+ /* Custom styling support coming soon. */
@@ -0,0 +1,24 @@
1
+ # Dependencies
2
+ /node_modules
3
+
4
+ # Production
5
+ /build
6
+
7
+ # Generated files
8
+ .astro
9
+ out
10
+ dist
11
+
12
+
13
+ # Misc
14
+ .DS_Store
15
+ .env.local
16
+ .env.development.local
17
+ .env.test.local
18
+ .env.production.local
19
+
20
+ npm-debug.log*
21
+ yarn-debug.log*
22
+ yarn-error.log*
23
+
24
+ .eventcatalog-core
Binary file
@@ -1,6 +1,6 @@
1
1
  import { PackageManager } from "../helpers/get-pkg-manager";
2
2
 
3
- export type TemplateType = "default" | "app";
3
+ export type TemplateType = "default" | "app" | "empty";
4
4
  export type TemplateMode = "js" | "ts";
5
5
 
6
6
  export interface GetTemplateFileArgs {