{"id":47270,"library":"cloudly-storage","title":"Cloudly Storage","description":"Cloudflare Workers Storage library (v0.10.22) providing a simplified typed interface for KV, Durable Objects, and R2. Designed for Cloudflare Workers ecosystem with strict TypeScript support, minimal overhead, and first-class integration with other Cloudly libraries. Releases follow semantic versioning with monthly cadence. Key differentiator: unified storage abstraction across CF storage primitives with type-safety and minimal boilerplate.","status":"active","version":"0.10.22","language":"javascript","source_language":"en","source_url":"https://github.com/utily/cloudly-storage","tags":["javascript","typescript"],"install":[{"cmd":"npm install cloudly-storage","lang":"bash","label":"npm"},{"cmd":"yarn add cloudly-storage","lang":"bash","label":"yarn"},{"cmd":"pnpm add cloudly-storage","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"TypeScript types for Workers runtime APIs","package":"@cloudflare/workers-types","optional":true},{"reason":"self-reference for clarity","package":"cloudly-storage","optional":true}],"imports":[{"note":"Named export only; no default export.","wrong":"import Storage from 'cloudly-storage'","symbol":"Storage","correct":"import { Storage } from 'cloudly-storage'"},{"note":"Use KVStorage, not KV.","wrong":"import { KV } from 'cloudly-storage'","symbol":"KVStorage","correct":"import { KVStorage } from 'cloudly-storage'"},{"note":"Full name required.","wrong":"import { DOStorage } from 'cloudly-storage'","symbol":"DurableObjectStorage","correct":"import { DurableObjectStorage } from 'cloudly-storage'"}],"quickstart":{"code":"import { Storage } from 'cloudly-storage';\n\nconst storage = new Storage({\n  kv: { namespace: process.env.KV_NAMESPACE },\n  durableObject: { namespace: process.env.DO_NAMESPACE },\n  r2: { bucket: process.env.R2_BUCKET },\n});\n\nasync function handleRequest() {\n  await storage.put('key', { value: 'data' });\n  const result = await storage.get('key');\n  console.log(result?.value);\n}\n\nhandleRequest();","lang":"typescript","description":"Initializes a unified storage instance, puts and gets a value across KV, Durable Objects, and R2."},"warnings":[{"fix":"Update imports from `DOStorage` to `DurableObjectStorage`.","message":"v0.10.0 renames `DurableObjectStorage` to `DurableObjectStorage` (was `DOStorage`).","severity":"breaking","affected_versions":">=0.10.0"},{"fix":"Use `storage.put(...)` instead of `storage.set(...)`.","message":"v0.8.0 deprecates `Storage.set` in favor of `put`.","severity":"deprecated","affected_versions":">=0.8.0 <0.10.0"},{"fix":"Ensure environment variables or config object includes required properties.","message":"Storage instances require explicit namespace/bucket configuration; missing namespace throws at runtime.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Use `import` syntax.","message":"The library is ESM-only; CommonJS `require` will fail.","severity":"gotcha","affected_versions":">=0.10.0"},{"fix":"Check for `undefined` instead of `null`.","message":"v0.9.0 changes `get` return type from `T | null` to `T | undefined`.","severity":"breaking","affected_versions":">=0.9.0"}],"env_vars":null,"search_vec":"'abstract':50 'across':51 'boilerpl':61 'cadenc':45 'cf':52 'class':33 'cloud':1,37 'cloudflar':3,21 'design':19 'differenti':47 'durabl':15 'ecosystem':23 'first':32 'first-class':31 'follow':40 'integr':34 'interfac':12 'javascript':62 'key':46 'kv':14 'librari':6,38 'minim':28,60 'month':44 'object':16 'overhead':29 'primit':54 'provid':8 'r2':18 'releas':39 'safeti':58 'semant':41 'simplifi':10 'storag':2,5,49,53 'strict':25 'support':27 'type':11,57 'type-safeti':56 'typescript':26,63 'unifi':48 'v0.10.22':7 'version':42 'worker':4,22","created_at":"2026-06-07T16:50:39.622576+00:00","updated_at":"2026-06-07T16:50:39.622576+00:00","problems":[{"fix":"Run `npm install cloudly-storage` and use `import` syntax.","cause":"Package not installed or ESM-only requiring CommonJS import","error":"Module not found: 'cloudly-storage'"},{"fix":"Provide correct namespace/bucket in constructor.","cause":"Storage instance not initialized with configuration","error":"TypeError: storage.get is not a function"},{"fix":"Set `KV_NAMESPACE` environment variable or pass namespace in config.","cause":"Missing `kv.namespace` in config","error":"Error: Namespace is required for KV storage"}],"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/utily","github":"https://github.com/utily/cloudly-storage","docs":null,"changelog":null,"pypi":null,"npm":"cloudly-storage","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-07","next_check":"2026-09-05","install_tag":null}}