@eventcatalog/create-eventcatalog 2.1.1 → 2.2.1

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.1",
22470
22470
  bin: {
22471
22471
  "create-catalog": "./dist/index.js"
22472
22472
  },
@@ -22603,6 +22603,7 @@ var installTemplate = async ({
22603
22603
  switch (name) {
22604
22604
  case "env":
22605
22605
  case "gitignore":
22606
+ case "npmrc":
22606
22607
  case "dockerignore":
22607
22608
  case "eslintrc.json": {
22608
22609
  return ".".concat(name);
@@ -22639,11 +22640,12 @@ async function createApp({
22639
22640
  typescript,
22640
22641
  eslint,
22641
22642
  experimentalApp,
22642
- organizationName: organizationName2
22643
+ organizationName: organizationName2,
22644
+ initEmptyProject
22643
22645
  }) {
22644
22646
  let repoInfo;
22645
22647
  const mode = typescript ? "ts" : "js";
22646
- const template = experimentalApp ? "app" : "default";
22648
+ const template = initEmptyProject ? "empty" : "default";
22647
22649
  const root = import_path10.default.resolve(appPath);
22648
22650
  if (!await isWriteable(import_path10.default.dirname(root))) {
22649
22651
  console.error(
@@ -22808,6 +22810,12 @@ var program = new import_commander.default.Command(package_default.name).version
22808
22810
 
22809
22811
  The organization name.
22810
22812
  `
22813
+ ).option(
22814
+ "--empty",
22815
+ `
22816
+
22817
+ Initialize the project with an empty template.
22818
+ `
22811
22819
  ).allowUnknownOption().parse(process.argv);
22812
22820
  var packageManager = !!program.useNpm ? "npm" : !!program.usePnpm ? "pnpm" : getPkgManager();
22813
22821
  async function run() {
@@ -22878,6 +22886,8 @@ Run ${import_chalk5.default.cyan(`${program.name()} --help`)} to see all options
22878
22886
  process.exit(1);
22879
22887
  }
22880
22888
  const example = typeof program.example === "string" && program.example.trim();
22889
+ const options = program.opts();
22890
+ const initEmptyProject = options.empty ?? false;
22881
22891
  try {
22882
22892
  await createApp({
22883
22893
  appPath: resolvedProjectPath,
@@ -22887,7 +22897,8 @@ Run ${import_chalk5.default.cyan(`${program.name()} --help`)} to see all options
22887
22897
  typescript: true,
22888
22898
  eslint: true,
22889
22899
  experimentalApp: false,
22890
- organizationName
22900
+ organizationName,
22901
+ initEmptyProject
22891
22902
  });
22892
22903
  } catch (reason) {
22893
22904
  if (!(reason instanceof DownloadError)) {
@@ -22909,7 +22920,8 @@ Do you want to use the default template instead?`,
22909
22920
  typescript: program.typescript,
22910
22921
  eslint: program.eslint,
22911
22922
  organizationName,
22912
- experimentalApp: program.experimentalApp
22923
+ experimentalApp: program.experimentalApp,
22924
+ initEmptyProject
22913
22925
  });
22914
22926
  }
22915
22927
  }
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.1",
5
5
  "bin": {
6
6
  "create-catalog": "./dist/index.js"
7
7
  },
@@ -0,0 +1 @@
1
+ strict-peer-dependencies=false
@@ -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
@@ -0,0 +1 @@
1
+ strict-peer-dependencies=false
Binary file
@@ -112,6 +112,7 @@ export const installTemplate = async ({
112
112
  switch (name) {
113
113
  case "env":
114
114
  case "gitignore":
115
+ case "npmrc":
115
116
  case "dockerignore":
116
117
  case "eslintrc.json": {
117
118
  return ".".concat(name);
@@ -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 {