{"id":17664435,"url":"https://github.com/tilfin/dynamo-processor","last_synced_at":"2026-02-12T11:37:59.959Z","repository":{"id":48905391,"uuid":"67671463","full_name":"tilfin/dynamo-processor","owner":"tilfin","description":"DynamoDB operation processor for Node.js","archived":false,"fork":false,"pushed_at":"2025-01-17T14:43:51.000Z","size":90,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-14T13:17:33.439Z","etag":null,"topics":["dynamo-processor","dynamodb","dynamodb-operation-processor","nodejs","operations"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tilfin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-08T05:30:15.000Z","updated_at":"2025-01-18T02:06:53.000Z","dependencies_parsed_at":"2025-02-28T03:12:23.689Z","dependency_job_id":"ba881a77-3c8d-414f-a037-48397cc35032","html_url":"https://github.com/tilfin/dynamo-processor","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/tilfin/dynamo-processor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilfin%2Fdynamo-processor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilfin%2Fdynamo-processor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilfin%2Fdynamo-processor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilfin%2Fdynamo-processor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tilfin","download_url":"https://codeload.github.com/tilfin/dynamo-processor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilfin%2Fdynamo-processor/sbom","scorecard":{"id":885274,"data":{"date":"2025-08-11","repo":{"name":"github.com/tilfin/dynamo-processor","commit":"a35add0de9efff08ac67bfc71d34966a75dacc21"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/16 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/tilfin/dynamo-processor/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/tilfin/dynamo-processor/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/tilfin/dynamo-processor/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/tilfin/dynamo-processor/ci.yml/main?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:28","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned","Info:   0 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 23 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-24T09:47:25.094Z","repository_id":48905391,"created_at":"2025-08-24T09:47:25.094Z","updated_at":"2025-08-24T09:47:25.094Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29364669,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T08:51:36.827Z","status":"ssl_error","status_checked_at":"2026-02-12T08:51:26.849Z","response_time":55,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dynamo-processor","dynamodb","dynamodb-operation-processor","nodejs","operations"],"created_at":"2024-10-23T20:05:25.903Z","updated_at":"2026-02-12T11:37:59.935Z","avatar_url":"https://github.com/tilfin.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"dynamo-processor\n================\n\n[![NPM Version][npm-image]][npm-url]\n[![Node](https://img.shields.io/node/v/dynamo-processor.svg)]()\n[![CI](https://github.com/tilfin/dynamo-processor/actions/workflows/ci.yml/badge.svg)](https://github.com/tilfin/dynamo-processor/actions/workflows/ci.yml)\n[![Coverage Status](https://coveralls.io/repos/github/tilfin/dynamo-processor/badge.svg?branch=master)](https://coveralls.io/github/tilfin/dynamo-processor?branch=master)\n\nDynamoDB processor operates a process by simple JSON expression.\n\n## Features\n\n* If it have failed to set child objects to Map Type field, auto trying to update with initial fields again. futhermore, If it have failed by the conflict, auto trying the updating process at first once more.\n* Node.js 20 or later\n* AWS SDK for JavaScript v3 \n\nClick [here](https://github.com/tilfin/dynamo-processor/tree/v2.0.4) for the version that supports **AWS SDK v2**\n\n## Install\n\n```\n$ npm install -save @aws-sdk/client-dynamodb @aws-sdk/lib-dynamodb @aws-sdk/util-dynamodb\n$ npm install -save dynamo-processor\n```\n\n## How to Use\n\n### CommonJS\n\n```\nconst DynamoProcessor = require('dynamo-processor')\nconst dp = new DynamoProcessor({ region: 'ap-northeast-1' });\n```\n\n### ES Module\n\n```\nimport { DynamoProcessor } from 'dynamo-processor'\nconst dp = new DynamoProcessor({ region: 'ap-northeast-1' });\n```\n\n`new DynamoProcessor(options)`\n\n* **options** `\u003cObject\u003e` DynamoDBClientConfig as well\n  * **wrapFunc** `\u003cBoolean\u003e` If this is true, proc method returns a _Function_ that wraps the _Promise_ in case that promise evaluation need lazy. (default is false)\n\n\n## Methods\n\n* `proc` method is to analyze an item and to process the item by the action\n* `get`, `put`, `update`, `delete`, `batchWrite`, `batchDelete` methods as shortcut for each action\n\n### getItem\n\n#### proc({ action: 'get', table, key })\n\n```js\ndp.proc({\n  table: 'users',\n  action: 'get', // optional\n  key: {\n    id: 1\n  }\n})\n.then((item) =\u003e {\n  console.log(item); // { name: 'Taro', id: 1, age: 16 }\n});\n```\n\n#### get(key)\n\n```js\ndp.get('users', { id: 1 });\n```\n\n### batchGetItem\n\n#### proc({ action: 'get', table, keys })\n\n```js\ndp.proc({\n  table: 'users',\n  action: 'get', // optional\n  keys: [\n    { id: 1 },\n    { id: 2 }\n  ]\n})\n.then((items) =\u003e {\n  console.log(items[0]); // { id: 1, ... }\n  console.log(items[1]); // { id: 2, ... }\n});\n```\n\n### putItem\n\n```js\ndp.proc({\n  table: 'users',\n  action: 'put', // optional\n  item: {\n    id: 2,\n    name: 'Michael',\n    age: 25,\n    address: {\n      prefecture: 'Osaka'\n    }\n  }\n})\n.then((item) =\u003e {\n  console.log(item);\n  // { name: 'Michael',\n  //   id: 2,\n  //   address: { prefecture: 'Osaka' },\n  //   age: 25 }\n});\n```\n\n#### put(table, item)\n\n```js\ndp.put('users', {\n  id: 2,\n  name: 'Michael',\n  age: 25,\n  address: {\n    prefecture: 'Osaka'\n  }\n});\n```\n\n### batchWriteItem (PutRequest)\n\n#### proc({ action: 'put', table, items })\n\n```js\ndp.proc({\n  table: 'users',\n  action: 'put', // optional\n  items: [\n    { id: 2, name: 'Michael' },\n    { id: 3, name: 'Cindy' }\n  ]\n})\n.then(unprocessedItems =\u003e {\n  console.log(unprocessedItems); // undefined shows all success\n});\n```\n\n#### batchWrite(table, items)\n\n```js\ndp.batchWrite('users', [\n  { id: 2, name: 'Michael' },\n  { id: 3, name: 'Cindy' }\n]);\n```\n\n### updateItem\n\n#### SET\n\nThe space in a key is instead of the separator (`.`) between parent and child\nbecause a space is rarely used for a variable name.\n\n```js\ndp.proc({\n  table: 'users',\n  action: 'update', // optional\n  key: {\n    id: 3\n  },\n  set: {\n    name: 'Taro',\n    age: 14,\n    'address prefecture': 'Tokyo'\n  }\n})\n.then((item) =\u003e {\n  console.log(item);\n  // { name: 'Taro',\n  //   id: 3,\n  //   address: { prefecture: 'Tokyo' },\n  //   age: 14 }\n});\n```\n\n#### ADD\n\n```js\ndp.proc({\n  table: 'users',\n  action: 'update', // optional\n  key: {\n    id: 3\n  },\n  add: {\n    age: 1\n  }\n})\n.then((item) =\u003e {\n  console.log(item);\n  // { name: 'Taro',\n  //   id: 3,\n  //   address: { prefecture: 'Tokyo' },\n  //   age: 15 }  age was incremented\n});\n```\n\n#### ADD to set\n\n`pushset` is adding to NumberSet or StringSet or BinarySet.\n\n```js\ndp.proc({\n  table: 'users',\n  action: 'update', // optional\n  key: {\n    id: 4\n  },\n  pushset: {\n    cards: 30\n  }\n})\n.then((item) =\u003e {\n  console.log(item);\n});\n```\n\n#### REMOVE\n\n```js\ndp.proc({\n  table: 'users',\n  action: 'update', // optional\n  key: {\n    id: 3\n  },\n  remove: [\n    'age',\n    'address prefecture'\n  ]\n})\n.then((item) =\u003e {\n  console.log(item);\n  // { name: 'Taro',\n  //   id: 3,\n  //   address: {} }  age and address.prefecture was removed\n});\n```\n\n#### DELETE from set\n\n`delete` is removing from NumberSet or StringSet or BinarySet.\n\n```js\ndp.proc({\n  table: 'users',\n  action: 'update', // optional\n  key: {\n    id: 4\n  },\n  delete: {\n    cards: 20\n  }\n})\n.then((item) =\u003e {\n  console.log(item);\n});\n```\n\n#### update(table, keys, ope, [initFields])\n\n```js\ndp.update('users', {\n    id: 4\n  },\n  {\n    set: { name: 'foo' }\n  }\n})\n.then((item) =\u003e {\n  console.log(item);\n});\n```\n\n### deleteItem\n\n#### proc({ action: 'delete', table, key })\n\n```js\ndp.proc({\n  table: 'users',\n  action: 'delete',\n  key: {\n    id: 1\n  }\n})\n.then((item) =\u003e {\n  console.log(item); // null\n});\n```\n\n#### delete(table, keys)\n\n```js\ndp.delete('users', { id: 1 });\n```\n\n### batchWriteItem (DeleteRequest)\n\n#### proc({ action: 'delete', table, keys })\n\n```js\ndp.proc({\n  table: 'users',\n  action: 'delete',\n  keys: [\n    { id: 2 },\n    { id: 3 }\n  ]\n})\n.then(unprocessedItemKeys =\u003e {\n  console.log(unprocessedItemKeys); // undefined shows all success\n});\n```\n\n#### batchDelete(table, keys)\n\n```js\ndp.batchDelete('users',[\n  { id: 2 },\n  { id: 3 }\n])\n```\n\n### Multiple items\n\n#### getItems as Promise Array\n\n```js\nPromise.all(\n  dp.proc({\n    table: 'users',\n    action: 'get', // optional\n    keys: [\n      { id: 1 },\n      { id: 2 }\n    ]\n  }, { useBatch: false })\n)\n.then((items) =\u003e {\n  console.log(items[0]); // { id: 1, ... }\n  console.log(items[1]); // { id: 2, ... }\n});\n```\n\n#### putItems as Promise Array\n\n```js\nPromise.all(\n  dp.proc({\n    table: 'users',\n    action: 'put', // optional\n    items: [\n      { id: 1, val: 'foo' },\n      { id: 2, val: 'bar' }\n    ]\n  }, { useBatch: false })\n)\n.then((items) =\u003e {\n  console.log(items[0]); // { id: 1, ... }\n  console.log(items[1]); // { id: 2, ... }\n});\n```\n\n#### deleteItems as Promise Array\n\n```js\nPromise.all(\n  dp.proc({\n    table: 'users',\n    action: 'delete',\n    keys: [\n      { id: 1 },\n      { id: 2 }\n    ]\n  }, { useBatch: false })\n)\n.then(results =\u003e {\n  console.log(results[0]); // null\n  console.log(results[1]); // null\n});\n```\n\n### createTable\n\n```js\ndp.createTable('producthistories', {\n    productId: 'S', // HASH key\n    version: 'N'    // RANGE key\n  },\n  { // options\n    readCU: 20, // default 5\n    writeCU: 3   // default 5\n  })\n.then(() =\u003e {\n  console.log('Succeeded to create table')\n});\n```\n\nIf first argument is object, it passes through as raw params. In short, `dp.createTable(params)` equals `dynamodb.createTable(params).promise()`.\n\n### deleteTable\n\n```js\ndp.deleteTable('producthistories')\n.then(() =\u003e {\n  console.log('Delete to create table')\n});\n```\n\n## LICENSE\n\n[MIT](LICENSE)\n\n[npm-image]: https://img.shields.io/npm/v/dynamo-processor.svg\n[npm-url]: https://npmjs.org/package/dynamo-processor\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftilfin%2Fdynamo-processor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftilfin%2Fdynamo-processor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftilfin%2Fdynamo-processor/lists"}