Skip to content

Commit

Permalink
Release 0.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
hisorange committed Nov 16, 2021
1 parent fa1b1ac commit dc16fd2
Show file tree
Hide file tree
Showing 13 changed files with 911 additions and 67 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- name: Install the interpreter
uses: actions/setup-node@v2
with:
node-version: 14.x
node-version: 16.x
cache: yarn

- name: Load the cached dependencies
Expand All @@ -61,12 +61,12 @@ jobs:
#- name: Run lint tests
# run: yarn lint

- name: Run type checking
run: yarn test:types

- name: Run unit tests
run: yarn test

- name: Execute the Development Build
run: yarn build

outputs:
commit_message: ${{ env.GIT_COMMIT_MESSAGE_SUBJECT }}

Expand All @@ -92,7 +92,7 @@ jobs:
with:
context: .
push: true
tags: artgenio/core:latest,artgenio/core:${{ needs.check.outputs.tag }}
tags: artgenio/core:latest,artgenio/core:${{ needs.check.outputs.version }}


release-gh:
Expand Down Expand Up @@ -120,7 +120,7 @@ jobs:
body:
"**Automated release ${{ needs.check.outputs.commit_message }}** by GitHub Actions <3\n\n
${{ needs.check.outputs.commit_body }}\n
Docker install ```docker run -p 80:7200 artgenio/core:${{ needs.check.outputs.tag }}```
Docker install ```docker run -p 80:7200 artgenio/core:${{ needs.check.outputs.version }}```
"
tag_name: ${{ needs.check.outputs.tag }}
draft: false
Expand Down
8 changes: 3 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,10 @@ dist
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.yarn
.pnp.*

# End of https://www.toptal.com/developers/gitignore/api/node

/build/
/build/

3 changes: 3 additions & 0 deletions .yarnclean
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,6 @@ wercker.yml
.travis.yml

# misc

*.test.js
*.test.js.map
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ COPY --from=builder /temp/storage storage
COPY --from=builder /temp/config config
COPY --from=builder /temp/assets assets
COPY --from=builder /temp/docs docs
COPY --from=builder /temp/version version

ENV NODE_ENV=production
ENV PORT=7200
Expand Down
10 changes: 10 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
### Version 0.0.5

- Authentication strategies
- Key value storage service
- JWT, Access Key support
- Improved build with ESBuild for the API
- Better Rest coverage
- Authentication on the Rest & OData endpoints
- Removed redundant endpoints / workflows

### Version 0.0.4

- Initial automated release
Expand Down
15 changes: 15 additions & 0 deletions etsc.build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
const esbuildPluginTsc = require('esbuild-plugin-tsc');

module.exports = {
outDir: './build',
tsConfigFile: 'tsconfig.prod.json',
esbuild: {
minify: false,
target: 'node16',
plugins: [
esbuildPluginTsc({
tsConfigFile: 'tsconfig.prod.json',
}),
],
},
};
12 changes: 4 additions & 8 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
const jestConfig = {
preset: 'ts-jest',
testEnvironment: 'node',
rootDir: '.',
testMatch: ['**/__tests__/**/*.(test|spec).ts', '**/src/**/*.(test|spec).ts'],
roots: ['./tests', './src'],
testMatch: ['**/*.(test|spec).ts'],

silent: true,
verbose: true,
Expand All @@ -12,12 +12,8 @@ const jestConfig = {
// Coverage configuration
collectCoverage: true,
coverageDirectory: './coverage',
coverageReporters: ['clover', 'lcov', 'text'],
collectCoverageFrom: [
'./src/**/*.ts',
'!./src/**/index.ts',
'!**/node_modules/**',
],
coverageReporters: ['text'],
collectCoverageFrom: ['./src/**/*.ts'],
coverageThreshold: {
global: {
branches: 10,
Expand Down
16 changes: 0 additions & 16 deletions nodemon.json

This file was deleted.

16 changes: 10 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@artgen/core",
"version": "0.0.1",
"version": "0.0.5",
"description": "Versatily headless CMS",
"main": "build/main.js",
"homepage": "https://artgen.io",
Expand All @@ -22,29 +22,31 @@
"yarn": "1.x"
},
"scripts": {
"build:api": "tsc -p tsconfig.prod.json",
"build:dev": "tsc -p tsconfig.dev.json",
"build:docker": "docker build . --target=production -t artgenio/core:dev",
"build:api": "etsc --config=etsc.build.js",
"build:ui": " vite build --config ./src/management/backoffice/vite.config.js",
"build": "yarn build:api && yarn build:ui",
"lint": "eslint --fix .",
"pretest:unit": "eslint .",
"start:dev": "tsnd src/main.ts",
"start:watch": "tsnd src/main.ts --watch",
"start": "NODE_ENV=production node build/main.js",
"test:unit": "jest",
"test:types": "tsc -p tsconfig.prod.json --noEmit",
"test:cov": "jest",
"test:watch": "jest --watch --collectCoverage=0",
"test": "jest --collectCoverage=0"
},
"dependencies": {
"@loopback/context": "^3.17.1",
"@loopback/metadata": "^3.3.2",
"ajv": "^8.6.3",
"axios": "^0.21.1",
"axios": "^0.24.0",
"bcrypt": "^5.0.1",
"cache-manager": "^3.4.4",
"chalk": "^4.1.2",
"config": "^3.3.6",
"dagre": "^0.8.5",
"dayjs": "^1.10.7",
"dependency-graph": "^0.11.0",
"eventemitter2": "^6.4.5",
"fastify": "^3.20.1",
Expand Down Expand Up @@ -105,7 +107,6 @@
"@types/bcrypt": "^5.0.0",
"@types/config": "^0.0.39",
"@types/dagre": "^0.7.46",
"@types/eventemitter2": "^4.1.0",
"@types/inflection": "^1.13.0",
"@types/jest": "^26.0.24",
"@types/jsonwebtoken": "^8.5.5",
Expand All @@ -132,6 +133,9 @@
"antd": "^4.16.13",
"autoprefixer": "^10.3.7",
"axios-hooks": "^3.0.0",
"esbuild": "^0.13.13",
"esbuild-node-tsc": "^1.8.0",
"esbuild-plugin-tsc": "^0.3.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^3.4.0",
Expand Down
4 changes: 2 additions & 2 deletions src/system/server/http.server.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ describe('HTTPServerProvider', () => {
expect(server).toHaveProperty('listen');
});

test('should have a swagger registered', async () => {
test('should have a openapi registered', async () => {
const instance = await instantiateClass(HttpServerProvider, app.context);
const server = await instance.value();

const response = await server.inject({
method: 'GET',
url: '/swagger/static/index.html',
url: '/api/docs/static/index.html',
});

expect(response.statusCode).toBe(200);
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.prod.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
"noEmitOnError": true,
"declaration": false
},
"include": ["./src"]
"include": ["./src"],
"exclude": ["./src/**/*.test.ts", "./src/**/*.spec.ts",]
}
1 change: 1 addition & 0 deletions version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.0.5
Loading

0 comments on commit dc16fd2

Please sign in to comment.