From b3eeb2e1159f6cd6d605e09702d2776327b38c4e Mon Sep 17 00:00:00 2001 From: scott-wyatt Date: Sat, 29 Sep 2018 17:09:14 -0400 Subject: [PATCH] [feat] archetype --- .npmignore | 2 ++ {lib/archetype => archetype}/.gitignore | 0 {lib/archetype => archetype}/package.json | 3 --- .../src/api/controllers/index.ts | 0 {lib/archetype => archetype}/src/api/index.ts | 0 .../src/api/models/index.ts | 0 .../src/api/policies/index.ts | 0 .../src/api/resolvers/index.ts | 0 .../src/api/services/index.ts | 0 .../src/config/env/development/index.ts | 0 .../src/config/env/index.ts | 0 .../src/config/env/production}/index.ts | 0 .../src/config/env/staging}/index.ts | 0 archetype/src/config/env/testing/index.ts | 1 + .../src/config/i18n.ts | 0 .../src/config/index.ts | 0 .../src/config/locales/en.json | 0 .../archetype => archetype}/src/config/log.ts | 0 .../src/config/main.ts | 0 .../src/config/models.ts | 0 .../src/config/routes.ts | 0 .../src/config/stores.ts | 0 .../archetype => archetype}/src/config/web.ts | 0 {lib/archetype => archetype}/src/index.ts | 0 {lib/archetype => archetype}/src/server.ts | 2 +- .../archetype => archetype}/src/tsconfig.json | 0 .../src/tsconfig.release.json | 0 {lib/archetype => archetype}/src/tslint.json | 0 .../src/typings/index.d.ts | 0 {lib/archetype => archetype}/test/index.js | 0 .../test/integration/FabrixApp.test.js | 0 {lib/archetype => archetype}/test/mocha.opts | 0 .../src/config/env/production/index.ts | 1 - .../src/config/env/production/log.ts | 25 ------------------- lib/tsconfig.json | 5 +--- package-lock.json | 2 +- package.json | 10 +++++--- 37 files changed, 12 insertions(+), 39 deletions(-) rename {lib/archetype => archetype}/.gitignore (100%) rename {lib/archetype => archetype}/package.json (97%) rename {lib/archetype => archetype}/src/api/controllers/index.ts (100%) rename {lib/archetype => archetype}/src/api/index.ts (100%) rename {lib/archetype => archetype}/src/api/models/index.ts (100%) rename {lib/archetype => archetype}/src/api/policies/index.ts (100%) rename {lib/archetype => archetype}/src/api/resolvers/index.ts (100%) rename {lib/archetype => archetype}/src/api/services/index.ts (100%) rename {lib/archetype => archetype}/src/config/env/development/index.ts (100%) rename {lib/archetype => archetype}/src/config/env/index.ts (100%) rename {lib/archetype/src/config/env/staging => archetype/src/config/env/production}/index.ts (100%) rename {lib/archetype/src/config/env/testing => archetype/src/config/env/staging}/index.ts (100%) create mode 100755 archetype/src/config/env/testing/index.ts rename {lib/archetype => archetype}/src/config/i18n.ts (100%) rename {lib/archetype => archetype}/src/config/index.ts (100%) rename {lib/archetype => archetype}/src/config/locales/en.json (100%) rename {lib/archetype => archetype}/src/config/log.ts (100%) rename {lib/archetype => archetype}/src/config/main.ts (100%) rename {lib/archetype => archetype}/src/config/models.ts (100%) rename {lib/archetype => archetype}/src/config/routes.ts (100%) rename {lib/archetype => archetype}/src/config/stores.ts (100%) rename {lib/archetype => archetype}/src/config/web.ts (100%) rename {lib/archetype => archetype}/src/index.ts (100%) rename {lib/archetype => archetype}/src/server.ts (85%) rename {lib/archetype => archetype}/src/tsconfig.json (100%) rename {lib/archetype => archetype}/src/tsconfig.release.json (100%) rename {lib/archetype => archetype}/src/tslint.json (100%) rename {lib/archetype => archetype}/src/typings/index.d.ts (100%) rename {lib/archetype => archetype}/test/index.js (100%) rename {lib/archetype => archetype}/test/integration/FabrixApp.test.js (100%) rename {lib/archetype => archetype}/test/mocha.opts (100%) delete mode 100755 lib/archetype/src/config/env/production/index.ts delete mode 100644 lib/archetype/src/config/env/production/log.ts diff --git a/.npmignore b/.npmignore index 1d95e28..53b0ace 100755 --- a/.npmignore +++ b/.npmignore @@ -7,3 +7,5 @@ test-performance/ .istanbul.yml .travis.yml appveyor.yml +.circleci +.idea diff --git a/lib/archetype/.gitignore b/archetype/.gitignore similarity index 100% rename from lib/archetype/.gitignore rename to archetype/.gitignore diff --git a/lib/archetype/package.json b/archetype/package.json similarity index 97% rename from lib/archetype/package.json rename to archetype/package.json index a3e1745..b182b9c 100755 --- a/lib/archetype/package.json +++ b/archetype/package.json @@ -14,9 +14,6 @@ }, "main": "dist/index.js", "typings": "dist/index.d.ts", - "files": [ - "dist" - ], "dependencies": { "@fabrix/fabrix": "^1.5", "@fabrix/spool-router": "^1.5" diff --git a/lib/archetype/src/api/controllers/index.ts b/archetype/src/api/controllers/index.ts similarity index 100% rename from lib/archetype/src/api/controllers/index.ts rename to archetype/src/api/controllers/index.ts diff --git a/lib/archetype/src/api/index.ts b/archetype/src/api/index.ts similarity index 100% rename from lib/archetype/src/api/index.ts rename to archetype/src/api/index.ts diff --git a/lib/archetype/src/api/models/index.ts b/archetype/src/api/models/index.ts similarity index 100% rename from lib/archetype/src/api/models/index.ts rename to archetype/src/api/models/index.ts diff --git a/lib/archetype/src/api/policies/index.ts b/archetype/src/api/policies/index.ts similarity index 100% rename from lib/archetype/src/api/policies/index.ts rename to archetype/src/api/policies/index.ts diff --git a/lib/archetype/src/api/resolvers/index.ts b/archetype/src/api/resolvers/index.ts similarity index 100% rename from lib/archetype/src/api/resolvers/index.ts rename to archetype/src/api/resolvers/index.ts diff --git a/lib/archetype/src/api/services/index.ts b/archetype/src/api/services/index.ts similarity index 100% rename from lib/archetype/src/api/services/index.ts rename to archetype/src/api/services/index.ts diff --git a/lib/archetype/src/config/env/development/index.ts b/archetype/src/config/env/development/index.ts similarity index 100% rename from lib/archetype/src/config/env/development/index.ts rename to archetype/src/config/env/development/index.ts diff --git a/lib/archetype/src/config/env/index.ts b/archetype/src/config/env/index.ts similarity index 100% rename from lib/archetype/src/config/env/index.ts rename to archetype/src/config/env/index.ts diff --git a/lib/archetype/src/config/env/staging/index.ts b/archetype/src/config/env/production/index.ts similarity index 100% rename from lib/archetype/src/config/env/staging/index.ts rename to archetype/src/config/env/production/index.ts diff --git a/lib/archetype/src/config/env/testing/index.ts b/archetype/src/config/env/staging/index.ts similarity index 100% rename from lib/archetype/src/config/env/testing/index.ts rename to archetype/src/config/env/staging/index.ts diff --git a/archetype/src/config/env/testing/index.ts b/archetype/src/config/env/testing/index.ts new file mode 100755 index 0000000..336ce12 --- /dev/null +++ b/archetype/src/config/env/testing/index.ts @@ -0,0 +1 @@ +export {} diff --git a/lib/archetype/src/config/i18n.ts b/archetype/src/config/i18n.ts similarity index 100% rename from lib/archetype/src/config/i18n.ts rename to archetype/src/config/i18n.ts diff --git a/lib/archetype/src/config/index.ts b/archetype/src/config/index.ts similarity index 100% rename from lib/archetype/src/config/index.ts rename to archetype/src/config/index.ts diff --git a/lib/archetype/src/config/locales/en.json b/archetype/src/config/locales/en.json similarity index 100% rename from lib/archetype/src/config/locales/en.json rename to archetype/src/config/locales/en.json diff --git a/lib/archetype/src/config/log.ts b/archetype/src/config/log.ts similarity index 100% rename from lib/archetype/src/config/log.ts rename to archetype/src/config/log.ts diff --git a/lib/archetype/src/config/main.ts b/archetype/src/config/main.ts similarity index 100% rename from lib/archetype/src/config/main.ts rename to archetype/src/config/main.ts diff --git a/lib/archetype/src/config/models.ts b/archetype/src/config/models.ts similarity index 100% rename from lib/archetype/src/config/models.ts rename to archetype/src/config/models.ts diff --git a/lib/archetype/src/config/routes.ts b/archetype/src/config/routes.ts similarity index 100% rename from lib/archetype/src/config/routes.ts rename to archetype/src/config/routes.ts diff --git a/lib/archetype/src/config/stores.ts b/archetype/src/config/stores.ts similarity index 100% rename from lib/archetype/src/config/stores.ts rename to archetype/src/config/stores.ts diff --git a/lib/archetype/src/config/web.ts b/archetype/src/config/web.ts similarity index 100% rename from lib/archetype/src/config/web.ts rename to archetype/src/config/web.ts diff --git a/lib/archetype/src/index.ts b/archetype/src/index.ts similarity index 100% rename from lib/archetype/src/index.ts rename to archetype/src/index.ts diff --git a/lib/archetype/src/server.ts b/archetype/src/server.ts similarity index 85% rename from lib/archetype/src/server.ts rename to archetype/src/server.ts index 68d13e3..d0a81ac 100755 --- a/lib/archetype/src/server.ts +++ b/archetype/src/server.ts @@ -5,7 +5,7 @@ */ import { FabrixApp } from '@fabrix/fabrix' -import * as App from '.' +import * as App from './' const app = new FabrixApp(App) diff --git a/lib/archetype/src/tsconfig.json b/archetype/src/tsconfig.json similarity index 100% rename from lib/archetype/src/tsconfig.json rename to archetype/src/tsconfig.json diff --git a/lib/archetype/src/tsconfig.release.json b/archetype/src/tsconfig.release.json similarity index 100% rename from lib/archetype/src/tsconfig.release.json rename to archetype/src/tsconfig.release.json diff --git a/lib/archetype/src/tslint.json b/archetype/src/tslint.json similarity index 100% rename from lib/archetype/src/tslint.json rename to archetype/src/tslint.json diff --git a/lib/archetype/src/typings/index.d.ts b/archetype/src/typings/index.d.ts similarity index 100% rename from lib/archetype/src/typings/index.d.ts rename to archetype/src/typings/index.d.ts diff --git a/lib/archetype/test/index.js b/archetype/test/index.js similarity index 100% rename from lib/archetype/test/index.js rename to archetype/test/index.js diff --git a/lib/archetype/test/integration/FabrixApp.test.js b/archetype/test/integration/FabrixApp.test.js similarity index 100% rename from lib/archetype/test/integration/FabrixApp.test.js rename to archetype/test/integration/FabrixApp.test.js diff --git a/lib/archetype/test/mocha.opts b/archetype/test/mocha.opts similarity index 100% rename from lib/archetype/test/mocha.opts rename to archetype/test/mocha.opts diff --git a/lib/archetype/src/config/env/production/index.ts b/lib/archetype/src/config/env/production/index.ts deleted file mode 100755 index 62d96a1..0000000 --- a/lib/archetype/src/config/env/production/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { log } from './log' diff --git a/lib/archetype/src/config/env/production/log.ts b/lib/archetype/src/config/env/production/log.ts deleted file mode 100644 index d669db5..0000000 --- a/lib/archetype/src/config/env/production/log.ts +++ /dev/null @@ -1,25 +0,0 @@ -import * as winston from 'winston' - -export const log = { - logger: new winston.Logger({ - level: 'info', - exitOnError: false, - transports: [ - new winston.transports.Console({ - timestamp: true - }), - new winston.transports.File({ - name: 'info-file', - level: 'info', - filename: 'fabrix-info.log', - timestamp: true - }), - new winston.transports.File({ - name: 'error-file', - level: 'error', - filename: 'fabrix-error.log', - timestamp: true - }) - ] - }) -} diff --git a/lib/tsconfig.json b/lib/tsconfig.json index 3b5c4fc..2b5d942 100644 --- a/lib/tsconfig.json +++ b/lib/tsconfig.json @@ -24,11 +24,8 @@ "**/*.ts", "index.ts" ], - "exclude": [ - "archetype/**/*.ts" - ], "paths": { "@fabrix/*": ["./*"], - "@fabrix/fabrix": ["./Farbix"] + "@fabrix/fabrix": ["./index"] } } diff --git a/package-lock.json b/package-lock.json index c3894da..0275bd8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@fabrix/fabrix", - "version": "1.5.5", + "version": "1.5.7", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 1bec0f4..1cfcdca 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@fabrix/fabrix", - "version": "1.5.5", + "version": "1.5.7", "description": "Strongly Typed Modern Web Application Framework for Node.js", "keywords": [ "framework", @@ -20,6 +20,8 @@ "fabrix.ts", "typescript", "server", + "cqrs", + "event-sourcing", "graphql" ], "scripts": { @@ -29,15 +31,15 @@ "test": "npm run clean && npm run lint && npm run build && nyc mocha", "test-performance": "mocha test-performance", "prepublishOnly": "npm run compile", - "compile": "npm run clean && npm run archetype && npm run build", + "compile": "npm run clean && npm run build", "clean": "rm -rf dist", - "archetype": "copyfiles -u 1 -a ./lib/archetype/* -a ./lib/archetype/**/* -a ./lib/archetype/**/**/* -a ./lib/archetype/**/**/**/* ./dist/", "ci": "cd .. && ci" }, "main": "dist/index", "typings": "dist/index", "files": [ - "dist" + "dist", + "archetype" ], "pre-commit": [ "test"