- ...
- 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_MAXandSEQ_POOL_IDLEenv 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
totalCountforresolvePaginatedOffsetListTypewhenbeforehandlers on type or resolver were explicitly addingwhereorincluderestrictions.
- pushes: fixes title not in alert object for ios push notifications
- template: fixes
test/types.test.tsimport 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.jsonvia 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
nspas this project is now deprecated - add istanbul for coverage reports
- pushes: fixing parameter parsing on push notification cli tool
- storage:
destroySlaveDBsOnSwitchafter 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
ignoreMissingoption when reading - storage: adds
destroySlaveDBsOnSwitchflag to TestStrategy options, default totrueifprocess.env.CIis 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.writeFiledoes not supportReadStreams
- file-storage-local: fixed
path.resolvereturning incorrect path in some cases - all: updated yarn.lock file with latest yarn version. Now includes package integrity checksums
- file-storage-local: removed duplicate
thisafter lint-autofix
- file-storage-local: implemented local file storage service
- file-storage-s3: switched to using
url-joinfor creating public URLs, fixedundefinedreturn forlistFilesin case of an exception - template: set pipefail in tests
- logger:
safeConfigrmadditionalStreamsfrom 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 inDockerfileto 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
sendmailbinary by default, switch tonodemailerimpl.
- 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.ymlconfiguration, add.dockerignorefor 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
uploadsfolder - storage/template:
useIntermediateMigrationsCacheis disabled by default inprocess.env.CIenvironments - drone: add default
.drone.ymlconfiguration
- 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.transactionoverloads. Added helper methods for manually setting transaction in CLS context (required for unmanaged transactions). AddedrlsRolestorage config
- template: fixes tslint typings issue
- rest: Allow to inject additional cls request context variables through
onNewRequestContextinconfigure/rest(baseHooks.onNewRequestContext).
- template: Update
Dockerfileand forcefully install latest yarn in prepare of k8s deployments - template: Attention, the
package.jsonno longer contains aprepublishstep, you need to runyarn buildmanually - 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.existsusage - 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 therequestobject 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/restto enable the request CLS context handlingrequestCLSContext: { enabled: true } - Update
src/configure/loggerto pass default log parameters viainjectDefaultLogParameters
- Update
- monorepo: upgrade typescript and tslint to latest
- monorepo: rm tsdoc documentation generation scripts
- monorepo: fix some MacOS/Linux
sedhacks (we enforce no newline in allpackage.jsons) - create-aaa-backend: automatically generate a root user password (hash + salt) while scaffolding
- monorepo: rm old TODOs
- template: no
app/v1andapi/v1anymore (everything isapi/v1now). - graphql: expose
mappersutil fns, previous only internally available
- template: GDPR flags as hard requirements in
/registerendpoint.
- rest: bugfix
REST.BASE.createBoomnow properly forwardserrorType. - template: updated tests to ensure
errorTypein GPDR legalPATCHis returned to clients.
- rest:
IStatusCodeDefinition.errorCodeis no longer present - template: added GDPR related migrations for
AppUserProfileand introducedGETandPATCHendpoints for user settingslegalAcceptedAtandhasGDPROptOut.
- graphql: Changed handling of GraphQL before/after functions to support Promises
- utils: increase default timeout of
attachGlobalUncaughtExceptionHandlerto10000msuntil 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
errorTypeinto 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
errorTypevalue in error payload
- logger: removed
slack.webhookandslack.formatterfromBunyanErrorMailStreamconfig logging in fatal error email
- graphql: exported
toGlobalIdfromgraphql-relaypackage
- monorepo: fixed
yarn unlink-allerror with external typings. - template: fixes
tsconfig.jsonnot 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-allnow prints linking instructions to execute in your actual project, making it very easy to consume the stack in consuming projects - storage: no more
NOTICEmessages 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.BunyanSlackStreamnow also performs an additionalrequiredFieldcheck before parsing/omitting if the record is a raw bunyan object (faster)
- logger: updated
omit-deepdependency to fix endless recursion/max. call stack issue with omittingsequelizeobjects (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
facebookConfigbinding 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-contribrules - rest: added missing typings dependency for
handlebars - storage: added missing typings dependency for
umzug
- Important bogus version, incomplete commit before publish. Use
1.8.9instead
- template: automatically jump to
/vagranton sshing viavagrant ssh(provisioning .bashrc for VMs) - template: fixes new node v8
inspectprotocol debugging setup for visual studio code and vagrant - template: rm wrong
pinHashtyping fromUsermodel - 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.cabgenwas not updated properly with new default settings. - pushes:
gcmMock.buildBaseResponseis no longer private (side-effect-free fn anyways) - template: react faster to outdated incremental backup deletion.
- rest: fixes
@autoReplydecorator not properly wrapping sychronousBoomerror 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
sendmailpackage 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.tsimplemenation). - utils: Reduce logger severity of skipping malformed (
errortowarn) or disabled (warntodebug) hooks.
- graphql: Force
resolvePaginatedOffsetListTypeandresolvePaginatedRelayListTypetypes with anincludedefined to be run withdistinct: trueby default. This fixes wrongfully returnedtotalCounts (actually the returned count was sum of the associations). Configurable through theresolverOptionsviacountRootDistinct?: boolean, countAssociatedDistinct?: boolean.
- template: checkPasswordLogin now explicity queries for password and salt is set, else this might lead to
Salt must be a buffererrors 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.whereoptions 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 theerrproperty when logging with bunyan to properly serialize errors!
- build-tools: upgrade
@types/nodeto v8 - storage: cli add
yarn db import-sql-dump -f <FILE>command for easily importing sql files. - monorepo/template: enables tslints'
no-floating-promisesrule across all libs and the main project. Usetslint:disable-next-line:no-floating-promisesif you explicitly want unchained behaviour. - pushes: fixes iOS
ApplePushNotification.sendnot awaiting failureonExpiredTokenhook function before returning results (was running unchained previously). - utils: allow to further debug pbkdf2 hashing
Salt must be a buffererrors by fatally logging the input params and type information.
- storage: expose
fastDropAndCreate()and allow to connect/disconnect SalveDBs on TestStrategy throughdisconnectSlave,reconnectSlaveandgetCurrentSlave(make it easier to test .sql dumps).SlaveDBfurthermore 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.toJSONis 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_PATCHto 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.yamlto resetup your local aaa-backend-stack Vagrant env. - rest: allow to pass
multiparty.FormOptionsintoextractMultipartPayload(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 DOINGinsrc/configure/index.tsand 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.
hookscan now be managed directly through the newHookLifeCycleclass exposed in@aaa-backend-stack/utils.@aaa-backend-stack/rest'sApiactually inherits from it. This standaloneHookLifeCyclewill become handy for writing worker applications (which typically don't need the full api hooks stack).LazyInitializersstatic config interfaces were moved to@aaa-backend-stack/build-toolsto fix potential cyclic deps.- Removed unneeded dependency on
@aaa-backend-stack/utilsin various packages and fixed missing packages ingraphql.
- Important utils:
attachGlobalUncaughtExceptionHandlernow 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.tsnow 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:
IMailServiceOptionsconstructor must now provide a validTransporterfor the single requiredtransporterproperty.
- template:
test/setup.tsis 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 intraceseverity (no database reset handling at the bottom of the log)! - graphql-rest-bindings: Fixes false-positive
stderrs while generating new typings based on preexisting graphql withyarn introspect server,yarn introspect refreshandyarn watch.
- storage: Fixes
TestStrategydid not properly conform to hooks lifecycle.storage.isInitializedwas 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-createwas not working (storage connection was still present).
- Important logger: fix
ringBufferwas no longer appended to fatal error-emails (wrong initialization order).
- mailer: expose
NODE_MAILERand add optionalattachments: AttachmentObject[]toIMailServiceSendOptions. - mailer: Allow to use the original
SendMailOptionswith a settemplateviaMailService.sendfrom nodemailer. - mailer: Expose
MailService.sendPlainto send non template emails directly through the transporter. FurthermoreIMailServiceOptions.absolutePathToTemplatesis 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.sendis no longerprotected, but insteadpublic. Thus, we no longer enforce inheritance-based application mailers.
- graphql: Minor rm unneeded
console.logstatements
- graphql: fixes bug in
mapModelAttributesToUpdateArgsAndHandler: Updates to currentnullvalues of instance failed to apply properly. - graphql-rest-bindings: update
graphql-voyager@1.0.0-rc.10to properly handleAuthorizationheader injection (similar to graphiql) - storage: adds cli command
db forced-drop-and-createto 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/hapiand@types/joithrough 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.assetsUrlHostExternalis not passed asexternalAssetsUrlHostto reset password email template - allow to supply a custom
hapiServerOptionsto restApiinitialization to overwrite theHapi.ServerOptionswith constructing a newHapiserver - 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
IDefaultModelAttributesto 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:filehelper and extracted mocha configuration into.mochaopts file - git-info, logger, pushes, serverdate: only warn on reexecuting static
.configure() - rest, graphql: only warn on malformed controller through
loadControllersByGlobor 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-packagesto update all @aaa packages- Storage typings:
IFixtureTreeItemnow 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
TestStrategyand overgive theStorageAdapterto manage.
- Patch release, broken remote setup in create-aaa-backend
- gchen's tslint rules added
- Initial internal release