{"id":42430,"library":"awaitly-mongo","title":"Awaitly Mongo","description":"MongoDB persistence adapter for awaitly durable execution workflows. Version 23.0.0, maintained actively alongside awaitly core. Ships TypeScript types. Requires Node >=22 and awaitly ^1.33.0. Differentiates from generic MongoDB clients by tightly integrating with awaitly's workflow orchestration (state persistence, checkpointing, recovery). Breaking changes tracked against awaitly versions.","status":"active","version":"23.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/jagreehal/awaitly","tags":["javascript","awaitly","workflow","persistence","mongodb","mongo","database","durable-execution","typescript"],"install":[{"cmd":"npm install awaitly-mongo","lang":"bash","label":"npm"},{"cmd":"yarn add awaitly-mongo","lang":"bash","label":"yarn"},{"cmd":"pnpm add awaitly-mongo","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency required for workflow orchestration","package":"awaitly","optional":false}],"imports":[{"note":"ESM-only package; require() will throw a runtime error.","wrong":"const MongoAdapter = require('awaitly-mongo')","symbol":"MongoAdapter","correct":"import { MongoAdapter } from 'awaitly-mongo'"},{"note":"Named export, not default.","wrong":"import connectToMongo from 'awaitly-mongo'","symbol":"connectToMongo","correct":"import { connectToMongo } from 'awaitly-mongo'"},{"note":"TypeScript type: use import type for compile-time only.","wrong":"","symbol":"MongoAdapterOptions","correct":"import type { MongoAdapterOptions } from 'awaitly-mongo'"}],"quickstart":{"code":"import { MongoAdapter } from 'awaitly-mongo';\nimport { WorkflowClient } from 'awaitly';\n\nconst adapter = new MongoAdapter({\n  url: process.env.MONGO_URL ?? 'mongodb://localhost:27017',\n  database: 'awaitly',\n});\n\nconst client = new WorkflowClient({ persistence: adapter });\nconsole.log('Awaitly Mongo adapter ready');\n// Run workflows...","lang":"typescript","description":"Initialize MongoAdapter and attach it to Awaitly WorkflowClient for durable execution."},"warnings":[{"fix":"Upgrade Node.js to version 22 or higher.","message":"Requires Node >=22","severity":"breaking","affected_versions":">=23.0.0"},{"fix":"Use 'mongodb+srv://' connection strings for Atlas clusters.","message":"Deprecated connection string format without 'mongodb+srv' is discouraged","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Call adapter.close() on process exit or SIGTERM.","message":"MongoAdapter must be closed gracefully to prevent connection leaks","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Update awaitly to ^1.33.0.","message":"awaitly peer dependency must be >=1.33.0","severity":"breaking","affected_versions":">=23.0.0"},{"fix":"Use the provided createIndexes() method after connecting.","message":"Database indexes are not automatically created; you must run migration scripts","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use async/await instead of callbacks.","message":"Removed support for callbacks; all APIs return Promises","severity":"breaking","affected_versions":">=23.0.0"}],"env_vars":null,"search_vec":"'1.33.0':26 '22':23 '23.0.0':12 'activ':14 'adapt':5 'alongsid':15 'await':1,7,16,25,36,48,51 'break':44 'chang':45 'checkpoint':42 'client':31 'core':17 'databas':56 'differenti':27 'durabl':8,58 'durable-execut':57 'execut':9,59 'generic':29 'integr':34 'javascript':50 'maintain':13 'mongo':2,55 'mongodb':3,30,54 'node':22 'orchestr':39 'persist':4,41,53 'recoveri':43 'requir':21 'ship':18 'state':40 'tight':33 'track':46 'type':20 'typescript':19,60 'version':11,49 'workflow':10,38,52","created_at":"2026-06-05T16:54:56.156074+00:00","updated_at":"2026-06-05T16:54:56.156074+00:00","problems":[{"fix":"Run 'npm install awaitly-mongo awaitly'","cause":"Package not installed or peer dependency missing","error":"Error: Cannot find module 'awaitly-mongo'"},{"fix":"Change to 'import { MongoAdapter } from 'awaitly-mongo''","cause":"Using CommonJS require() instead of ESM import","error":"TypeError: MongoAdapter is not a constructor"},{"fix":"Ensure new MongoAdapter({ url, database }) has valid config","cause":"MongoAdapter is not properly initialized (missing URL or database)","error":"Error: db.collection is not a function"},{"fix":"Check MONGO_URL environment variable and network access","cause":"MongoDB server unreachable or credentials wrong","error":"MongoNetworkError: failed to connect to server"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/jagreehal/awaitly#readme","github":"https://github.com/jagreehal/awaitly","docs":null,"changelog":null,"pypi":null,"npm":"awaitly-mongo","openapi_spec":null,"status_page":null,"smithery":null,"categories":["database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-05","next_check":"2026-09-03","install_tag":null}}