This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
roots: [ | |
'<rootDir>/dist/', | |
], | |
testEnvironment: 'node', | |
transform: { | |
'^.+\\.(ts|tsx)$': 'ts-jest', | |
}, | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# $1 is the name of the repository | |
# $2 is the optional tag of the repository | |
REMOVE=$(node should-remove.js microservice) | |
if [[ $REMOVE == "true" ]]; then | |
git clone https://github.com/owner/$1.git | |
cd $1/ | |
if [ "$2" != "" ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
mesg-cli service:stop "$(cat MESG_INSTANCE_HASH.txt)" | |
mesg-cli daemon:stop | |
rm -f ./MESG_SERVICE_HASH.txt | |
rm -f ./MESG_INSTANCE_HASH.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
npx rimraf ~/.mesg | |
mesg-cli daemon:start | |
mesg-cli account:create $MESG_ACCOUNT --passphrase $MESG_PASSPHRASE --quiet | |
mesg-cli service:create "$(mesg-cli service:compile --quiet)" --account $MESG_ACCOUNT --passphrase $MESG_PASSPHRASE --quiet > MESG_SERVICE_HASH.txt | |
mesg-cli service:start "$(cat MESG_SERVICE_HASH.txt)" --env PUSHER_APP_ID=$PUSHER_APP_ID --env PUSHER_APP_KEY=$PUSHER_APP_KEY --env PUSHER_APP_SECRET=$PUSHER_APP_SECRET --env PUSHER_CLUSTER=$PUSHER_CLUSTER --quiet > MESG_INSTANCE_HASH.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "mesg-pusher", | |
"version": "0.0.0-semantically-released", | |
"description": "MESG Service to interact with Pusher", | |
"main": "index.js", | |
"repository": "https://github.com/Roms1383/mesg-pusher.git", | |
"author": "Romain KELIFA", | |
"license": "MIT", | |
"files": [ | |
"**/!(*.spec|*.test|*.config).js", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: [push] | |
env: | |
NPM: '6.12.0' | |
YARN: '1.19.1' | |
CI: true | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('dotenv').config() | |
const Client = require('pusher-js') | |
const MESG = require('mesg-js').application() | |
const execute = async ({ taskKey, params, instanceHash }) => { | |
const { outputs } = await MESG.executeTaskAndWaitResult({ | |
taskKey, | |
inputs: MESG.encodeData(params), | |
instanceHash | |
}) | |
return MESG.decodeData(outputs) |
NewerOlder