Skip to content

Commit b10de99

Browse files
authored
Merge pull request #15 from hlambda/release/0.3.2
Release/0.3.2
2 parents b8d0017 + c185c7a commit b10de99

File tree

23 files changed

+175
-36
lines changed

23 files changed

+175
-36
lines changed

.env.example

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,34 @@ HLAMBDA_SWAGGER_UI_TOKEN_EXPIRES_IN_SECONDS="86400"
122122
# Expires in value in seconds, time before JWT token expires and cookie is deleted on the client.
123123
HLAMBDA_VSCODE_UI_TOKEN_EXPIRES_IN_SECONDS="86400"
124124

125+
# Constant reference in code: ENV_ENABLE_HLAMBDA_GIT_SYNC | Default value: false
126+
# Turns on the GIT SYNC option, where the server will be able to sync metadata with remote repository. (Default: false)
127+
ENABLE_HLAMBDA_GIT_SYNC="false"
128+
129+
# Constant reference in code: ENV_HLAMBDA_GIT_SYNC_URL | Default value:
130+
# Sync repository url.
131+
HLAMBDA_GIT_SYNC_URL=""
132+
133+
# Constant reference in code: ENV_HLAMBDA_GIT_SYNC_USERNAME | Default value:
134+
# Sync repository username.
135+
HLAMBDA_GIT_SYNC_USERNAME=""
136+
137+
# Constant reference in code: ENV_HLAMBDA_GIT_SYNC_PASSWORD | Default value:
138+
# Sync repository password.
139+
HLAMBDA_GIT_SYNC_PASSWORD=""
140+
141+
# Constant reference in code: ENV_HLAMBDA_GIT_SYNC_BRANCH | Default value: master
142+
# Sync default branch. (Default: master) If falsey value, the current HEAD branch will be used.
143+
HLAMBDA_GIT_SYNC_BRANCH="master"
144+
145+
# Constant reference in code: ENV_HLAMBDA_GIT_SYNC_INTERVAL_SECONDS | Default value: 240
146+
# When sync is enabled, system will automatically try to sync with the current branch, it will work only if there is no conflicts, to not destroy live work. (Default: 240 (4m). If set to 0, disables pooling)
147+
HLAMBDA_GIT_SYNC_INTERVAL_SECONDS="240"
148+
149+
# Constant reference in code: ENV_HLAMBDA_GIT_SYNC_COMMAND | Default value: git pull
150+
# This command will run when sync is executed. (Default: git pull)
151+
HLAMBDA_GIT_SYNC_COMMAND="git pull"
152+
125153
# Constant reference in code: ENV_HLAMBDA_CONFIGURATION_LOADER_PREFIX | Default value: hlambda-config.yaml
126154
# Sets the value for the name of the configuration file that will be loaded.
127155
HLAMBDA_CONFIGURATION_LOADER_PREFIX="hlambda-config.yaml"

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
# Release 0.3.2
2+
3+
- Fixed the version bump issue.
4+
- Updated `README.md`.
5+
- Added GitOps functionality, remote repository sync.
6+
- Added tab complete in Hlambda Pseudo Terminal. (With basic contextual suggestions)
7+
- Added option to reload server via vscode status bar.
8+
- If set, auto connect to Hasura instance from Hlambda environment variables. (Retreive GraphQL schema introspection, and list of custom actions.) System will look for `HASURA_GRAPHQL_API_ENDPOINT_EXTERNAL` to have access from the browser. (This can be tunnel url if Hasura instance is not available from the browser)
9+
- Bugfixes.
10+
11+
# Release 0.3.1
12+
13+
- Fix the CORS issue with the vscode when requesting external data from vscode-unpkg CDN.
14+
- Fix the issue with Webpack miss-configuration that was wrapping dist and src folder instead of only dist.
15+
116
# Release 0.3.0
217

318
- Added zero downtime reload.

Dockerfile

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ WORKDIR /usr/src/app
2020
# where available (npm@5+)
2121
COPY package*.json ./
2222

23-
# RUN echo "`date`" > ./image-build-time.txt
23+
RUN echo "`date +\"%Y-%m-%dT%H:%M:%S%z\"`" > ./image-build-time.txt
2424
RUN echo "`date +%s`" > ./image-build-timestamp.txt
2525

2626
RUN ["npm", "install"]
@@ -40,9 +40,4 @@ RUN cp -r ./metadata/* ./data/metadata-examples
4040
RUN npm install pm2 -g
4141

4242
# CMD ["npm", "run", "start"]
43-
4443
CMD [ "pm2-runtime", "start", "ecosystem.config.cjs" ]
45-
46-
# This is not ready, there are known bugs with cluster mode (state management between nodes, like path in remote shell etc...)
47-
#CMD ["npm", "run", "cluster-runtime"]
48-

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ In production deployments, you can bake metadata and disable the UI console.
4848
You can check ["Getting started"](https://www.hlambda.io/getting-started/) on how to get started with Hlambda. In short, it goes like this:
4949

5050
- Install latest hlambda CLI. (Hint: `npm i -g hlambda-cli`)
51-
- Spin up the Docker instance of the Hlambda server. (Hint: Use `hl snip d` to get docker snippet)
51+
- Spin up the Docker instance of the Hlambda server. (Hint: Use `hl snip d` to get the docker snippet)
5252
- Use CLI to generate a new Hlambda app. (Hint: `hl init my-app`)
5353
- (Optional) Configure multiple environments. (Hint: `hl env add staging`)
5454
- Deploy metadata (Hint: `hl m a`)
@@ -74,10 +74,14 @@ Any contributions are greatly appreciated.
7474

7575
## Authors
7676

77-
Gordan Nekić <gordan@neki.ch>
77+
- Gordan Nekić <gordan@neki.ch>
78+
79+
<a href="https://github.com/sponsors/gnekich" title="Sponsor Gordan Nekić"><img src="https://img.shields.io/github/sponsors/gnekich?style=plastic" alt="Github Sponsors button" /></a>
7880

7981
## How to support the project
8082

81-
I've recently created Patreon that will enable me to work more on the Hlambda services.
83+
I've recently created Patreon which will enable me to work more on the Hlambda services.
8284

8385
<span class="badge-patreon"><a href="https://www.patreon.com/bePatron?u=70751523" title="Donate to this project using Patreon"><img src="https://img.shields.io/badge/patreon-donate-green.svg" alt="Patreon donate button" /></a></span>
86+
87+
You can also sponsor the developers directly through the GitHub Sponsors program.

ecosystem.config.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module.exports = {
44
name: 'Backend Microservice',
55
script: 'src/index.js',
66
// script: 'npm', // Do not use this, express port binding will be problematic with npm start
7-
// args: 'run start', // Look abowe
7+
// args: 'run start', // Look above
88

99
exec_mode: 'cluster',
1010

metadata/apps/example-demo-app/hlambda-config.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ env:
1414
# Custom environment variables override for our app
1515
envForce:
1616
HASURA_GRAPHQL_API_ENDPOINT: 'http://graphql-engine:8099/v1/graphql'
17-
HASURA_GRAPHQL_ADMIN_SECRET: 'real-password'
17+
HASURA_GRAPHQL_ADMIN_SECRET: 'demo'
1818
SPECIAL_PASSWORD: 'value-from-env'
1919
HLAMBDA_DISABLE_CONSOLE: 'false'
20+
HASURA_GRAPHQL_API_ENDPOINT_EXTERNAL: 'http://localhost:18080/v1/graphql'
2021

2122
# Consider that cwd for the script is ./metadata/ , also we suggest that you do not deploy ts as metadata, only js and do transpilation before metadata apply.
2223
# But if you want you can slow down the reload time and await for scripts to run after every reload.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
env:
2+
HLAMBDA_GIT_SYNC_URL: 'https://github.com/hlambda/example-metadata-sync'
3+
HLAMBDA_GIT_SYNC_USERNAME: ''
4+
HLAMBDA_GIT_SYNC_PASSWORD: ''
5+
ENABLE_HLAMBDA_GIT_SYNC: false
6+
HLAMBDA_GIT_SYNC_INTERVAL_SECONDS: '240'

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "hlambda-core",
3-
"version": "0.3.0",
3+
"version": "0.3.2",
44
"description": "Hlambda core",
55
"type": "module",
66
"main": "src/index.js",
@@ -61,4 +61,4 @@
6161
"eslint-plugin-prettier": "^4.0.0",
6262
"nodemon": "^2.0.15"
6363
}
64-
}
64+
}

public/console/asset-manifest.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"files": {
33
"main.css": "/console/static/css/main.00555d9b.css",
4-
"main.js": "/console/static/js/main.efaa3242.js",
4+
"main.js": "/console/static/js/main.039a0e3a.js",
55
"static/js/787.0bbff5f9.chunk.js": "/console/static/js/787.0bbff5f9.chunk.js",
66
"index.html": "/console/index.html",
77
"main.00555d9b.css.map": "/console/static/css/main.00555d9b.css.map",
8-
"main.efaa3242.js.map": "/console/static/js/main.efaa3242.js.map",
8+
"main.039a0e3a.js.map": "/console/static/js/main.039a0e3a.js.map",
99
"787.0bbff5f9.chunk.js.map": "/console/static/js/787.0bbff5f9.chunk.js.map"
1010
},
1111
"entrypoints": [
1212
"static/css/main.00555d9b.css",
13-
"static/js/main.efaa3242.js"
13+
"static/js/main.039a0e3a.js"
1414
]
1515
}

0 commit comments

Comments
 (0)