Releases: aligent/microservice-development-utilities
release/nx-cdk/0.9.0
0.9.0 (2026-06-05)
π Features
-
appbuilder-util-lib (1ac5c69)
- Update tsconfig extends to use local tsconfig.json and remove composite option in appbuilder-util-lib.
nx-cdk
- Migrate nx-cdk generators from rolldown to vite bundling, add unified vite.config.base.mjs template,
- Update eslint configs, package dependencies, and service templates.
β€οΈ Thank You
- Kai Nguyen
release/appbuilder-util-lib/0.2.1
0.2.1 (2026-06-05)
π©Ή Fixes
-
appbuilder-util-lib (1ac5c69)
- Update tsconfig extends to use local tsconfig.json and remove composite option in appbuilder-util-lib.
nx-cdk
- Migrate nx-cdk generators from rolldown to vite bundling, add unified vite.config.base.mjs template,
- Update eslint configs, package dependencies, and service templates.
β€οΈ Thank You
- Kai Nguyen
release/nx-openapi/2.1.2
2.1.2 (2026-06-04)
π©Ή Fixes
-
Add logMiddleware to generated clients and make authMethod required (6bc89c0)
- Include
logMiddlewarein the generated client template for request/response logging - Make
authMethoda required parameter with an interactive prompt instead of defaulting toapi-key - Update README to document
logMiddlewareandretryMiddlewarein generated clients
- Include
β€οΈ Thank You
- Kai Nguyen
release/nx-appbuilder/0.4.0
0.4.0 (2026-06-04)
π Features
-
App generator: swap babel-loader for esbuild-loader (6750346)
The scaffolded
src/actions/webpack-config.cjsnow usesesbuild-loader
(withloader: 'ts'andtarget: 'node<major>', picked up from the
workspace's.nvmrc) instead ofbabel-loader+@babel/preset-env+
@babel/preset-typescript. Thebabel.actions.config.jsfile is no longer
emitted, and the associated@babel/*/babel-loaderdev-dependency pins
have been removed from the generated app'spackage.json.Existing apps that want to adopt the same setup can:
- Replace the
babel-loaderrule insrc/actions/webpack-config.cjswith
theesbuild-loaderblock (see the generator template for the canonical
shape). - Delete
babel.actions.config.js. - Drop
@babel/preset-env,@babel/preset-typescriptandbabel-loader
from theirpackage.json, and addesbuild-loader.
App generator: backend-UI tsconfig now sets
module: Preserve+moduleResolution: BundlerWhen
hasAdminUI=true, the generated
src/commerce-backend-ui-1/web-src/tsconfig.jsonnow includes:"module": "Preserve", "moduleResolution": "Bundler"
This lets TypeScript see ESM-style imports the way the webpack/esbuild
pipeline does, matching what aio's web build expects. - Replace the
β€οΈ Thank You
- Lachlan Turner
release/microservice-util-lib/1.5.0
1.5.0 (2026-06-01)
π Features
-
Retry middleware:
onRetryhook now supports request transformation (6a4de66)The
onRetrycallback can now optionally return aRequestto replace the current request before retrying. If it returnsvoid, the original request is used as-is. This merges the observation and transformation concerns into a single hook.// Logging only (returns void) onRetry: (context) => { console.log(`Retrying (attempt ${context.attempt})`); }, // Re-sign OAuth 1.0a + logging (returns Request) onRetry: async (context) => { console.log(`Retrying (attempt ${context.attempt})`); return resignOauth10aRequest(context.request, oauthConfig); },
New:
resignOauth10aRequeststandalone functionRe-signs a
Requestwith fresh OAuth 1.0a credentials (nonce, timestamp, signature) without requiring openapi-fetch middleware context. Designed for use with theonRetryhook to regenerate signatures on retried requests.Internal: extracted
signOauth10acoreThe shared OAuth 1.0a signing logic is now in a single
signOauth10ahelper, used by bothgenerateOauthParams(middleware path) andresignOauth10aRequest(standalone path).Tests
Added test coverage for
onRetryrequest transformation,resignOauth10aRequest,HttpResponseError, and body parser utilities.
β€οΈ Thank You
- Kai Nguyen
release/aws-wrappers/0.1.1
0.1.1 (2026-05-29)
π©Ή Fixes
-
Fix: dual-publish
@aligent/aws-wrappersas CJS + ESM (0d337a7)The 0.1.0 release widened the
loggeroption toLoggerInterfaceto dodge the Powertools dual-package hazard, but that wasn't enough.LoggerInterface.createChildtransitively referencesLogFormatter(a class with#privatefields), so ESM consumers still sawTS2322when passing aLoggerinstance into a CJS-built wrapper.The package is now dual-published.
dist/cjs/anddist/esm/are emitted from separate tsconfigs and routed via theexportsmap inpackage.json, so each consumer resolves a single coherent build of every#private-bearing dependency type.Consumer impact:
- ESM consumers (
type: module) now resolve todist/esm/via theimportcondition and can pass aLoggerfrom any Powertools build without TS errors. - CJS consumers (
type: commonjs) continue to resolve via therequirecondition, unchanged at runtime. - Public API surface is identical β same exported class names, same constructor signatures, same method shapes.
- Consumers who were deep-importing from
@aligent/aws-wrappers/src/...(always discouraged) will need to switch to the top-level entry point.
Internal: relative imports now carry explicit
.jsextensions (required for ESM under Node16), andaws-xray-sdk-coreis imported as a default rather than a named import (the package is CJS-only with noexportsmap, so named ESM imports fail at runtime viacjs-module-lexer). - ESM consumers (
β€οΈ Thank You
- Todd Hainsworth
release/nx-appbuilder/0.3.0
0.3.0 (2026-05-27)
π Features
- Fix lint hang in generated apps: add prettier and eslint as direct devDependencies at both workspace and app levels (eslint-plugin-prettier requires prettier as a peer dependency). (7e01a6b)
Switch the generated app's eslint config to use the base preset by default and only opt into the React preset when hasAdminUI is set.
Move the preset generator's workspace devDependency versions into a Dependabot-tracked template-package/package.json mirroring the existing app pattern, and factor the loadTemplatePackage + pickVersions helpers into a shared module.
β€οΈ Thank You
- Lachlan Turner
release/nx-appbuilder/0.2.1
0.2.1 (2026-05-25)
π©Ή Fixes
- Add missing webpack-config.cjs to generated appbuilder apps (c4f6d2e)
β€οΈ Thank You
- Lachlan Turner
release/aws-wrappers/0.1.0
0.1.0 (2026-05-25)
π Features
-
New: @aligent/aws-wrappers package (c509819)
Opinionated AWS SDK wrappers that bundle Powertools
Loggerand X-Ray tracing by default. Seven service classes:S3Service,DynamoDBService,SecretsManagerService,StepFunctionsService,SSMService,SQSService,SNSService.Constructor convention
Every wrapper takes the same options bag:
new XService({ logger?, client? }). The default logger isnew Logger()soPOWERTOOLS_SERVICE_NAMEflows through from the environment (the Powertools idiom). The default client wraps the SDK constructor incaptureAWSv3Clientfor X-Ray tracing; supplying a client opts out of that.The
loggeroption is typed asLoggerInterface(from@aws-lambda-powertools/logger/types), not the concreteLoggerclass. Powertools ships dual ESM/CJS builds and TypeScript treats the twoLoggerclasses as nominally distinct (each carries its own#privatefield), which would otherwise produce TS2322 when ESM consumers passed aLoggerinstance into a CJS-built wrapper.LoggerInterfaceis a structural type alias with no private brand, so aLoggerfrom either build satisfies the wrapper's parameter type β and any structurally-compatible logger is accepted, giving consumers more flexibility.SNSServiceandSQSServiceadditionally accepttruncate?: boolean(see "Opt-in payload truncation" below).Logging convention
Every public method emits exactly one
logger.info('<verb> <noun>', { input })line at the start of the call. The shape ofinputis level-driven:- At
DEBUG(e.g.POWERTOOLS_LOG_LEVEL=DEBUG), the full SDK input is logged. Operators have explicitly opted into seeing payloads, secret material, and PII. - At any other level, only a per-method allowlist is logged.
Implemented via the
filterFieldsForLogLevel(logger, input, safeFields)helper. Per-method allowlists are defined as module-level<METHOD>_SAFE_FIELDSconstants typed asReadonlyArray<keyof CommandInput>.Redactions applied at INFO level:
- S3 β
putObject/putJsonObjectomitBody. Batch methods (deleteObjects,emptyBucket) log{ bucket, keyCount }only. - SNS β
publishomitsMessage,Subject,MessageAttributes,PhoneNumber.publishBatchlogs{ TopicArn, entryCount }. - SQS β
sendMessageomitsMessageBody,MessageAttributes. Batch methods log{ QueueUrl, entryCount }. - DynamoDB β
getItem/deleteItemomitKey.putItemomitsItem.updateItemomitsKeyandExpressionAttributeValues.query/scan/paginateItems/paginateScanomitExpressionAttributeValues.batchGet/batchWritelog{ tables: Object.keys(RequestItems) }. - SecretsManager β write methods omit
SecretString/SecretBinary. - SSM β
putParameteromitsValue. - SFN β
startExecutionomits the executioninput(often carries PII).
Batch methods and DynamoDB
batchGet/batchWritekeep a bespoke inline DEBUG conditional rather than using the helper, because their safe shape includes a computed field (entryCount,keyCount,tables) that isn't a key on the SDK input.Pagination and chunking
- Auto-pagination (flat array):
S3.listObjects/getAllObjects/emptyBucket,SSM.getParametersByPath,SFN.listExecutions. - Generator pagination (yields items):
DynamoDB.paginateItems/paginateScanβ bounded memory for potentially unbounded result sets. - Auto-chunking:
S3.deleteObjects/emptyBucket(1000-key cap),SQS.sendMessageBatch/deleteMessageBatch(10-entry cap),SNS.publishBatch(10-entry cap). DynamoDB.batchWriteretriesUnprocessedItemswith jittered exponential backoff (5 attempts, 200ms base), throwing if items remain after the final attempt.
Opt-in payload truncation
SNS.publishandSQS.sendMessageexpose atruncateknob at both the constructor and per-call layer for callers who prefer data loss over SDK-level failure on oversize (e.g. notification flows where dropped detail beats a thrown error). Default is off β fail-fast at the SDK is the right behaviour for most code paths.When enabled,
truncateUtf8byte-boundsMessage/MessageBodyto 256 KB andtruncateCodepointschar-bounds SNSSubjectto 100. Both helpers respect codepoint boundaries (no half-emoji, no malformed UTF-8). Each truncating call emits a singlelogger.warnlisting the modified fields.DynamoDB specifics
- Backed by
DynamoDBDocumentClient. The baseDynamoDBClientis wrapped withcaptureAWSv3Clientbefore being passed toDynamoDBDocumentClient.from(...)so X-Ray captures every command. marshallOptions: { removeUndefinedValues: true }.- Key-bearing methods (
getItem,updateItem,deleteItem) take two generics βK extends Record<string, unknown>for the partition/sort key shape,R extends Record<string, unknown>for the return type. Input is threaded throughWithTypedKey<TInput, K>so the SDK input is preserved with the typedKeysubstituted. - Methods that return command output (
query,scan) preserve the full output and type only the data-bearing field (Items?: T[]). paginateItems/paginateScanyield items typed asT.batchGetis intentionally non-generic β multi-tableResponsescannot be soundly described by a singleT.- All generics default to
Record<string, unknown>so callers can omit them.
S3 specifics
- Input shapes are intentionally tight (
Bucket/Key/Bodyonly) viaRequired<Pick<...>>projections. Callers needing SDK-level options (server-side encryption, tagging, version IDs) drop down toS3Clientdirectly. getPresignedUrl({ Bucket, Key, action, expiresIn? })signsGET/PUTURLs via@aws-sdk/s3-request-presigner.GETURLs includeResponseContentDisposition: 'attachment';expiresIndefaults to 3600 seconds.
SSM specifics
getParameterstakes an alias-to-path record so callers destructure with the names they want locally:const { username, password } = await ssm.getParameters({ username: '/myapp/db/username', password: '/myapp/db/password', });
WithDecryption: trueis baked into all read operations.putParameter/deleteParameterexposed for runtime writes. Class-level TSDoc steers callers to IaC (CDK / Terraform) for parameter lifecycle; runtime writes are reserved for values that genuinely mutate within the application.
SecretsManager specifics
getSecret/getJsonSecretthrow on missingSecretString(e.g. binary-only secrets) and on invalid JSON respectively.- Write methods (
createSecret,updateSecret,putSecretValue,deleteSecret) exposed for rotation flows and dynamically-issued credentials. Class-level TSDoc steers callers to IaC for the common-case secret lifecycle.
Documentation
Package-level
CLAUDE.mdcaptures the locked-in conventions, design rationale, the question checklists for adding a new service or modifying an existing one, the per-method redaction policy, the truncation pattern, and theaws-sdk-client-mockpaginator-with-real-client test pattern.Infra
- Adds
nx-appbuilderto the package list in repo rootREADME.mdand the package table in repo rootCLAUDE.md(pre-existing gap surfaced during the docs sweep).
- At
β€οΈ Thank You
- Todd Hainsworth
release/nx-cdk/0.8.1
0.8.1 (2026-05-18)
π©Ή Fixes
-
- Add
stack-nameto deployment workflow templates (d20b8cf) - Set default CDK environment (account/region) in ApplicationStage
- Add
β€οΈ Thank You
- Kai Nguyen