- ...
- monorepo: pin monorepo, scaffolder and project to node 10
- CI: execute lint/build/test for generated create-aaa-backend project all the time
- storage: db connection pool defaults (min=1, max=cpu_cores*2, idle=10000ms) and allow to specify via
pgConnection.pool
.- Furhermore allows to specify pool size via
SEQ_POOL_MIN
,SEQ_POOL_MAX
andSEQ_POOL_IDLE
env vars.
- Furhermore allows to specify pool size via
- ansible provision fixes
- bad builds, ignore.
- Update dependencies with high vulnerabilities
- Update dependencies with critical vulnerabilities
- added proxy support for pushes package
- updated apn to 2.2.0
- removed Makefile
- removed bitrise
- New docker-compose setup
- unit test that all foreign keys are indexed
- switch between continuation-local-storage and cls-hooked via env var CLS_USE_CONTINUATION_LOCAL_STORAGE
- update to typescript 3.7.2
- fixed deprecated linter settings
- fix cls.test
- update lodash to 4.17.15
- update moment to 2.24.0
- update moment-timezone to 0.5.26
- update cls-bluebird to 2.1.0
- node versions supported 8, 10 and 12
- switched from continuation-local-storage to cls-hooked
- upgrade ts-lint to 5.20.0
- fix linter rules
- add nodemailer-smtp-transport
- update typescript to 3.6.4
- update nodemailer to 6.3.1
- Fixes for first fully working oss version
- template: cabgen
- add pghero pw
- add root user uid
- add permission uids
- add MIT license
- template: fix postgres versions in all.yaml.cabgen file.
- graphql: fixes invalid
totalCount
forresolvePaginatedOffsetListType
whenbefore
handlers on type or resolver were explicitly addingwhere
orinclude
restrictions.
- pushes: fixes title not in alert object for ios push notifications
- template: fixes
test/types.test.ts
import order linting
- graphql: allow to customize pagination default limits (defaultNodesLimit, maxNodesLimit, defaultNodesOffset)
- template: fix pen-testing encountered user enumeration on non email users (via customer project).
- template: updated ansible provision to install postgres 11 by default
- template: added automatic deploy to staging environment to drone config
- template: properly set onDelete and onUpdate on migrations
- rest, template: removed uid label on Joi type for better debugability
- graphql, polyfills, storage. graphql-sequelize: update sequelize from 3.30.4 to 3.31.0 to have support for enum values in arrays. See also Sequelize v3.31.0
- pushes: don't force sound for silent pushes
- pushes: support silent push notifications in iOS
- devtools: added interval with client ping to keep connection alive without logs, added extra colours and match for HTTP methods
- template: fixes assetsStatic.controller tslint
- template: fixes assetsStatic.controller typing
- template: Fixes inert static files controller issues with trailing
/
leading to fatal server errors (tries to resolve to directory with is forbidden) - monorepo: Fixed README.md for initial setup (tslint rules build missing)
- [DISABLED currently - non working] drone: added
yarn audit
/npm audit
(convert topackage-lock.json
via synp) subtask - pushes: use fcm endpoint now by default (gcm endpoint is deprecated as of April 10 2019), payload handling still works the same. Fruthermore adds additional log messages to push cli tool (
yarn push [ios|android]
).
- storage: adds new storage cli command
yarn db check-missing-fk-indices
- pushes: parse message parameter in cli tool
- rm
nsp
as this project is now deprecated - add istanbul for coverage reports
- pushes: fixing parameter parsing on push notification cli tool
- storage:
destroySlaveDBsOnSwitch
after fixed timeout of5000ms
, silent warning if it does not exceed but no test failure.
- template: fixed ansible script for setting up pghero. Added extra table create for history stats + cronjobs
- file-storage-local: properly applied
ignoreMissing
option when reading - storage: adds
destroySlaveDBsOnSwitch
flag to TestStrategy options, default totrue
ifprocess.env.CI
is set. Automatically wipes no longer used databases after switching.
- fixed synchronized: when the wrapped function throws, synchronized hangs on the last promise and it's error. Fixed by resetting the mutexPromise.
- file-storage-local: changed to using content as strings/buffers since
fs.writeFile
does not supportReadStreams
- file-storage-local: fixed
path.resolve
returning incorrect path in some cases - all: updated yarn.lock file with latest yarn version. Now includes package integrity checksums
- file-storage-local: removed duplicate
this
after lint-autofix
- file-storage-local: implemented local file storage service
- file-storage-s3: switched to using
url-join
for creating public URLs, fixedundefined
return forlistFiles
in case of an exception - template: set pipefail in tests
- logger:
safeConfig
rmadditionalStreams
from error email.
- logger: allow to attach
additionalStreams?: Stream[];
to the main bunyan logger and to child loggers from consuming projects.
- template: ensure
ssmtp
(SMTP relay) is installed inDockerfile
to provide a sendmail binary - logger: Fix from address, additional metrics in email, html output
- monorepo: added drone build pipeline (automated repo and scaffolder tests)
- template/drone: ensure no concurrent pipelines leak into execution, force compress image
- logger: switch error mails to
sendmail
binary by default, switch tonodemailer
impl.
- file-storage-s3: exported AWS SDK namespace
- file-storage: started implementing high-level FileStorageService, fully implemented S3FileStorageService (local storage service still only stub)
- image-service: changed ImageService to use FileStorageService for image storage
- template/drone: update default
.drone.yml
configuration, add.dockerignore
for cabgen
- image-service: reverted previous base directory changes and properly changed image file path composition
- image-service: switched to including base directory in uploaded image file path. Allows for static asset images to be stored outside of
uploads
folder - storage/template:
useIntermediateMigrationsCache
is disabled by default inprocess.env.CI
environments - drone: add default
.drone.yml
configuration
- image-service: fixed missing types for gm
- image-service: added first version of image service using local storage
- logger: fixed single-argument log statements not printing properly
- template: fixed linter issues
- utils: properly logged uncaught exception error instead of swallowing it
- storage: Modified storage.transaction to support unmanaged transactions. Added jsdoc comments detailing different functionality of
storage.transaction
overloads. Added helper methods for manually setting transaction in CLS context (required for unmanaged transactions). AddedrlsRole
storage config
- template: fixes tslint typings issue
- rest: Allow to inject additional cls request context variables through
onNewRequestContext
inconfigure/rest
(baseHooks.onNewRequestContext
).
- template: Update
Dockerfile
and forcefully install latest yarn in prepare of k8s deployments - template: Attention, the
package.json
no longer contains aprepublish
step, you need to runyarn build
manually - template: refactored authentication into separate service (added optional Google + Facebook authentication, refactored auth handlers, added password reset flow/template)
- template: integrated custom tsconfig/tslint rules including tslint-microsoft-contrib
- create-aaa-backend: fixed scaffolder not hashing default password if "yes to all" is enabled
- create-aaa-backend: fixed incorrect
FS_EXTRA.exists
usage - monorepo: updated all tslint versions to 5.11.0
- template: added foreign keys to sequelize model definition fields
- template: changed ansible provision scripts to install Postgres 10
- template: fixes big incremental backups first run through
--atime-preserve=system
- polyfills: Properly type
ICLSContext
- rest: Add default base hook
RequestCLSContextHook
: Create new CLS context in Hapi ifecycleonPreHandler
(configurable), allow to access therequest
object from everywhere in the chain (REQUEST_CONTEXT.getRequest()
. - logger: Allow to configure default log objects through configure:
injectDefaultLogParameters(args): object
- storage: adds
TRANSACTION_CONTEXT.getTransaction()
- template: Automatically attach
CTX_REQ_ID
(request id),CTX_REQ_USER
(authenticated user uid),CTX_TX_ID
(sequelize transaction id) to all logs (if inside request/transaction chain) To use this in your project:- Update
src/configure/rest
to enable the request CLS context handlingrequestCLSContext: { enabled: true }
- Update
src/configure/logger
to pass default log parameters viainjectDefaultLogParameters
- Update
- monorepo: upgrade typescript and tslint to latest
- monorepo: rm tsdoc documentation generation scripts
- monorepo: fix some MacOS/Linux
sed
hacks (we enforce no newline in allpackage.json
s) - create-aaa-backend: automatically generate a root user password (hash + salt) while scaffolding
- monorepo: rm old TODOs
- template: no
app/v1
andapi/v1
anymore (everything isapi/v1
now). - graphql: expose
mappers
util fns, previous only internally available
- template: GDPR flags as hard requirements in
/register
endpoint.
- rest: bugfix
REST.BASE.createBoom
now properly forwardserrorType
. - template: updated tests to ensure
errorType
in GPDR legalPATCH
is returned to clients.
- rest:
IStatusCodeDefinition.errorCode
is no longer present - template: added GDPR related migrations for
AppUserProfile
and introducedGET
andPATCH
endpoints for user settingslegalAcceptedAt
andhasGDPROptOut
.
- graphql: Changed handling of GraphQL before/after functions to support Promises
- utils: increase default timeout of
attachGlobalUncaughtExceptionHandler
to10000ms
until we find a way to wait for successful fatal-error email delivery.
- all: updated lodash to v4.17.10 to fix vulnerabilites discovered in v4.17.5 and below
- template: added HAPI hook for injecting
errorType
into error payload (including default "generic" value if omitted) - rest: Swagger error response documentation now supported multiple errors with same HTTP status code as well as new
errorType
value in error payload
- logger: removed
slack.webhook
andslack.formatter
fromBunyanErrorMailStream
config logging in fatal error email
- graphql: exported
toGlobalId
fromgraphql-relay
package
- monorepo: fixed
yarn unlink-all
error with external typings. - template: fixes
tsconfig.json
not generated while creating new project through the scaffolder. - storage: fixes bad storage test strategy reports computed values for slave initialization time.
- storage: cleanup, even faster warmup phase + slaves now also manage umzug instance creation on their own.
- monorepo:
yarn link-all
now prints linking instructions to execute in your actual project, making it very easy to consume the stack in consuming projects - storage: no more
NOTICE
messages via psql bridge on first test run or new storage test slaves - storage: auto-caching of migrations (not fixtures!) in intermediate database based on their md5 is now activated by default. This should reduce the initial migration warmup phase to ~1sec on subsequent runs, especially in projects with many migration files.
- logger: now safely "clones" bunyan record (using
safe-json-stringify
) to avoid modifying passed data.BunyanSlackStream
now also performs an additionalrequiredField
check before parsing/omitting if the record is a raw bunyan object (faster)
- logger: updated
omit-deep
dependency to fix endless recursion/max. call stack issue with omittingsequelize
objects (strangely worked fine so far?)
- logger: added optional Slack log stream, allowing for (selective) messages to be sent to a Slack channel
- template: rm unused
facebookConfig
binding from env configure - template: decrease incremental backup threshold (
0.1 --> 0.3
) covering retention cleaning (was not wiped instantly previously) - template: minor wordings in ansible deploy steps
- all: upgrade to Typescript 2.8.1
- graphql: allow to supply an optional sequelize attribute to graphql scalar typemapper (while initialization)
- graphql: deprecate
IApiRequestContext --> any
. Can be customly specified through generic in template if wanted. - monorepo: typescript build stack overhaul, now back to faster build times and immediate watch, single compliation and tslint config
- pushes: fixed typing for function parameter to satify
microsoft-tslint-contrib
rules - rest: added missing typings dependency for
handlebars
- storage: added missing typings dependency for
umzug
- Important bogus version, incomplete commit before publish. Use
1.8.9
instead
- template: automatically jump to
/vagrant
on sshing viavagrant ssh
(provisioning .bashrc for VMs) - template: fixes new node v8
inspect
protocol debugging setup for visual studio code and vagrant - template: rm wrong
pinHash
typing fromUser
model - template: incremental backup smooth out deletion of old backups (threshold)
- utils: exposes
synchronized
(stream like synchonization for all concurrent calls) andsynchronizedBy
(sychronization by unique cache key) async function mutex handler
- storage: fixes avgs reported through
testStrategy.printStrategyReport()
- template: added
Vagrantfile
@aaa-backend-stack/* pkg linking instructions and nfs setup
- template: fix ansible group_vars
all.yaml.cabgen
was not updated properly with new default settings. - pushes:
gcmMock.buildBaseResponse
is no longer private (side-effect-free fn anyways) - template: react faster to outdated incremental backup deletion.
- rest: fixes
@autoReply
decorator not properly wrapping sychronousBoom
error throws inside handlers (bubbling up the stack) by enforcing any handler work to happen in v8's nextTick throughPromise.delay(0)
(internally a simple timeout). Any handlers explicitly doing async operations before throwing were unaffected.
- logger: enabled silent mode for
sendmail
package inBunyanErrorMailStream
, preventing console/devtools from being spammed with email logs/content.
- tslint: added no new Buffer() rule
- template: added ntpd for vagrant VMs
- template: ansible, provision assets backup as incremental tar stage-1 by default. This is in sync with our current offerings and should free some space at our VMs.
- updated moments and moments-timezone to fix security warning
- graphql: Allow empty root mutation schema (GraphQL endpoint without a single mutation defined) and better error message for graphql endpoints without a single root query (every graphql endpoint needs at least one single resolvable query e.g. our Relay compliant
node.query.ts
implemenation). - utils: Reduce logger severity of skipping malformed (
error
towarn
) or disabled (warn
todebug
) hooks.
- graphql: Force
resolvePaginatedOffsetListType
andresolvePaginatedRelayListType
types with aninclude
defined to be run withdistinct: true
by default. This fixes wrongfully returnedtotalCount
s (actually the returned count was sum of the associations). Configurable through theresolverOptions
viacountRootDistinct?: boolean, countAssociatedDistinct?: boolean
.
- template: checkPasswordLogin now explicity queries for password and salt is set, else this might lead to
Salt must be a buffer
errors in pbkdf2. - graphql: Deprecate
include(previousInclude) => [includes]
in favor of more consistantinclude(value, previousInclude) => [includes]
(consistent withwhere(value, previousWhere) => {where}
). This allows to set innerinclude.where
options as you now have access to the parsed args value. Pre 1.8.0 users: This will raise deprecation warnings in your project, simply search+replaceinclude: (
toinclude: (value,
.
- logger: explicitly set bunyan standard error serializer (you'll get proper stacktraces in your json logs, no more
error@context
) in logger setup. important Use theerr
property when logging with bunyan to properly serialize errors!
- build-tools: upgrade
@types/node
to v8 - storage: cli add
yarn db import-sql-dump -f <FILE>
command for easily importing sql files. - monorepo/template: enables tslints'
no-floating-promises
rule across all libs and the main project. Usetslint:disable-next-line:no-floating-promises
if you explicitly want unchained behaviour. - pushes: fixes iOS
ApplePushNotification.send
not awaiting failureonExpiredToken
hook function before returning results (was running unchained previously). - utils: allow to further debug pbkdf2 hashing
Salt must be a buffer
errors by fatally logging the input params and type information.
- storage: expose
fastDropAndCreate()
and allow to connect/disconnect SalveDBs on TestStrategy throughdisconnectSlave
,reconnectSlave
andgetCurrentSlave
(make it easier to test .sql dumps).SlaveDB
furthermore exposes its computedIPGConnectionOptions
. - monorepo: update lerna to v2.6.0.
- monorepo: fast tsconfig.json global project rebuilding (test only)
- test-environment: Instantly print out the absolute path and short error message to the file where a failed test resides (no need to w8 for the whole test completion)
- polyfills:
Buffer.toJSON
is now globally patched to useBuffer.inspect
. This was done to reduce the memory requirements for the bunyan ringBuffer and exclude big stringified buffer objects (array, byte per line) from our logs. You may disable this handling by setting the env varDISABLE_GLOBAL_BUFFER_TO_JSON_INSPECT_PATCH
to something truthy.
- Upgrade path with vagrant/ansible deployments to Node.js v8 unlocked (
upgrade-node-8.yaml
). Docker images now default to Node.js v8. Runansible-playbook -i packages/template/ansible/environments/vm packages/template/ansible/upgrade-node-8.yaml
to resetup your local aaa-backend-stack Vagrant env. - rest: allow to pass
multiparty.FormOptions
intoextractMultipartPayload(payload, options: multiparty.FormOptions = {})
- graphql: REVERTED!
resolveListType --> []
andresolvePaginatedOffsetListType --> .nodes[]
encapsulation withGraphQLNonNull
.Can only create NonNull of a Nullable GraphQLType
.
- template: document
DO NOT ADD YOUR OWN IMPORTS BETWEEN THESE LINES UNLESS YOU KNOW WHAT YOU ARE DOING
insrc/configure/index.ts
and why this is important (initialization order) - graphql:
resolveListType --> []
andresolvePaginatedOffsetListType --> .nodes[]
are now properly encapsulated withGraphQLNonNull
. This should mitigate errors while working with typescript interfaces in strict mode received from introspection (no explicit!
required for.[]
property access).
- Bigger internal refactor, should be non-breaking.
hooks
can now be managed directly through the newHookLifeCycle
class exposed in@aaa-backend-stack/utils
.@aaa-backend-stack/rest
'sApi
actually inherits from it. This standaloneHookLifeCycle
will become handy for writing worker applications (which typically don't need the full api hooks stack).LazyInitializers
static config interfaces were moved to@aaa-backend-stack/build-tools
to fix potential cyclic deps.- Removed unneeded dependency on
@aaa-backend-stack/utils
in various packages and fixed missing packages ingraphql
.
- Important utils:
attachGlobalUncaughtExceptionHandler
now also listens tounhandledRejection
. Missing promise rejection error handling now forcefully exits the process on these kind of errors after 1sec (enough time to forward an fatal error email). This is in preparation of node8 which will terminate the process by default on this type of errors and furthermore should finally allow us to log these kind of errors. - template:
test/setup.ts
now also applies theattachGlobalUncaughtExceptionHandler(0)
to freak out on sync exceptions or unhandled promise rejections immediately (no timeout (defaults to 1000ms) before killing the process will be applied). - mailer:
IMailServiceOptions
constructor must now provide a validTransporter
for the single requiredtransporter
property.
- template:
test/setup.ts
is now executing database and hook reset procedure before (not after) running a test. This saves us one unneccessary reset-execution and furthermore helps with debugging intrace
severity (no database reset handling at the bottom of the log)! - graphql-rest-bindings: Fixes false-positive
stderr
s while generating new typings based on preexisting graphql withyarn introspect server
,yarn introspect refresh
andyarn watch
.
- storage: Fixes
TestStrategy
did not properly conform to hooks lifecycle.storage.isInitialized
was resolved before the first slave database was actually setuped. e.g. this prevented graphql tests from being able to limit via.only
. - storage: Fixes
yarn db forced-drop-and-create
was not working (storage connection was still present).
- Important logger: fix
ringBuffer
was no longer appended to fatal error-emails (wrong initialization order).
- mailer: expose
NODE_MAILER
and add optionalattachments: AttachmentObject[]
toIMailServiceSendOptions
. - mailer: Allow to use the original
SendMailOptions
with a settemplate
viaMailService.send
from nodemailer. - mailer: Expose
MailService.sendPlain
to send non template emails directly through the transporter. FurthermoreIMailServiceOptions.absolutePathToTemplates
is now optional (we no longer require handlebars templates for mail sending)
- template/graphql: added node relay-compliant graphql query resolver (can be potentially moved to @aaa-backend-stack/graphql)
- mailer:
MailService.send
is no longerprotected
, but insteadpublic
. Thus, we no longer enforce inheritance-based application mailers.
- graphql: Minor rm unneeded
console.log
statements
- graphql: fixes bug in
mapModelAttributesToUpdateArgsAndHandler
: Updates to currentnull
values of instance failed to apply properly. - graphql-rest-bindings: update
[email protected]
to properly handleAuthorization
header injection (similar to graphiql) - storage: adds cli command
db forced-drop-and-create
to handle databases not easily dropable throughdb drop
. - template: fixes guest auth controllers and model instance methods
- template: rm ci specific docker capabilities (no longer needed as we w8 until database is available) and pin docker-compose to v2
- devtools: another bugfix for static web template while using a custom
wsPath
- devtools: bugfix for static web template while using a custom
wsPath
- devtools: allow to customize websocket path through
wsPath
- monorepo: automatically add resolutions to all typings in the stack through
yarn pin-types-resolutions
- monorepo: fixes
yarn check-package-strict-version
, use this now before publishing!
- forcefully pin
@types/hapi
and@types/joi
through yarn resolutions in@aaa-backend-stack/rest
.
- template: split graphql and graphiql hooks from each other
- stack-documentation: update README.md from teammeeting
- template: fix
CONFIG.routes.assetsUrlHostExternal
is not passed asexternalAssetsUrlHost
to reset password email template - allow to supply a custom
hapiServerOptions
to restApi
initialization to overwrite theHapi.ServerOptions
with constructing a newHapi
server - add graphql-voyager to
@aaa-graphql-rest-bindings
. Available at<scheme>://<SERVER>:<PORT>/documentation/graphql-voyager
- mailer: log error when sending email fails. email sender fix.
- template: add
IDefaultModelAttributes
to all models, add_modelTemplate
- template: logging on undeliverable emails for forgotPasswort routes
- storage: better fatal error logging for
storage.migrateUp()
failures in Adapter and testStrategy
- template:
yarn test:file
helper and extracted mocha configuration into.mocha
opts file - git-info, logger, pushes, serverdate: only warn on reexecuting static
.configure()
- rest, graphql: only warn on malformed controller through
loadControllersByGlob
or malformed queries/mutations throughloadRootSchemaByGlob
.
- template: yarn test:watch npm-script for template (attention updated .nodemon)
- template: document swagger grouping of routes
- logger: never reopen logger file-streams in NODE_ENV==="test"
- template: proper postgres version 9.4 in docker common.yaml (same as used with vagrant)
- rest: statusCodes decorator (useful while migrating from routes/handlers to controllers)
- rm newrelic from template (must be removed manually in your projects)
- internal specific integration-testing-pre-setup
- strict typescript compiler-settings for various packages (build-tools, devtools, example-lib, git-info, graphql)
- auto-resort package.json
- update ws (devtools)
- better monorepo readme on publishing and quickstart pipeline
- update hapi-swagger
- replace date instances in snapshots bei default (iso strings) devtools firefox instructions
- template fix bulkdata/fixtures wrong interface settings
- utils now includes
checkFSTmpWriteable
: checks tmp fs is writeable (5MB file). Requires update of monitoring controller for usage.
- Template fixes inspect mode - debugging
- Template fixes db model interface
create-aaa-backend update-aaa-packages
to update all @aaa packages- Storage typings:
IFixtureTreeItem
now allows string arrays.
- Breaking storage singleton (StorageAdapter class) .init() is now async down to the ConnectionAdapter and tries to estabilish a connection for 30secs
- ConnectionAdapter.transaction() is overloaded and accepts TransactionOptions as first param + new experimental role and global/custom parameters (in preparation for row level security)
- Internal storage package refactor (
Connection-
,Migration-
,Model-
andStorageAdapter
). - Breaking TestStrategy setup now requires to construct a new
TestStrategy
and overgive theStorageAdapter
to manage.
- Patch release, broken remote setup in create-aaa-backend
- gchen's tslint rules added
- Initial internal release