{"name":"@eggjs/tegg-transaction-decorator","version":"3.41.0","description":"tegg transaction decorator","keywords":["egg","typescript","decorator","transaction","tegg"],"author":{"name":"qile222","email":"chhxxc@gmail.com"},"homepage":"https://github.com/eggjs/tegg","repository":{"type":"git","url":"git+ssh://git@github.com/eggjs/tegg.git","directory":"core/transaction-decorator"},"dependencies":{"@eggjs/core-decorator":"^3.41.0","@eggjs/tegg-common-util":"^3.41.0","@eggjs/tegg-metadata":"^3.41.0","@eggjs/tegg-types":"^3.41.0"},"scripts":{"test":"cross-env NODE_ENV=test NODE_OPTIONS='--no-deprecation' mocha","clean":"tsc -b --clean","tsc":"npm run clean && tsc -p ./tsconfig.json","tsc:pub":"npm run clean && tsc -p ./tsconfig.pub.json","prepublishOnly":"npm run tsc:pub"},"publishConfig":{"access":"public"},"engines":{"node":">=14.0.0"},"license":"MIT","main":"dist/index.js","bugs":{"url":"https://github.com/eggjs/tegg/issues"},"devDependencies":{"@types/mocha":"^10.0.1","@types/node":"^20.2.4","cross-env":"^7.0.3","mocha":"^10.2.0","ts-node":"^10.9.1","typescript":"^5.0.4"},"gitHead":"27fd9ffe0b6d290e9fb8d7b52f0b6c7cafc7a608","types":"./dist/index.d.ts","_id":"@eggjs/tegg-transaction-decorator@3.41.0","_nodeVersion":"18.19.1","_npmVersion":"lerna/6.6.2/node@v18.19.1+x64 (darwin)","dist":{"integrity":"sha512-mvF0Xqu2hwCB+Yf6yp7cApgvxS3uoF9E4FcWwi6xzP/M2P2cuz6cuS/OaddZgm4xZhx8pHX463ISOWdUqA2TDw==","shasum":"e1c1a669c2bc5c601fc1bc2d727171c244edc146","tarball":"http://registry-npm.ywwl.com/@eggjs/tegg-transaction-decorator/download/@eggjs/tegg-transaction-decorator-3.41.0.tgz","fileCount":11,"unpackedSize":10747,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCE3C5YaQnBYtDCyZ/JEJTJiEUmYOncb5Huc1dBbitS5wIgW9VjaQCJnoecfRo87pa7jeNjOhK44ddQCur1jkAnt2Q="}],"size":4395,"noattachment":false,"key":"/@eggjs/tegg-transaction-decorator/-/@eggjs/tegg-transaction-decorator-3.41.0.tgz"},"_npmUser":{"name":"killagu","email":"killa07071201@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tegg-transaction-decorator_3.41.0_1724673913336_0.9500781396578715"},"_hasShrinkwrap":false,"readme":"# @eggjs/tegg-transaction-decorator\n\n事务注解\n\n## Usage\n### 传播机制\n```ts\nexport class Foo {\n\n  @Transactional({ propagation: PropagationType.ALWAYS_NEW })\n  async bar() {\n    await this.foo();\n  }\n\n  @Transactional({ propagation: PropagationType.REQUIRED })\n  async foo(msg) {\n    console.log('has msg: ', msg);\n  }\n\n}\n```\n\n### 数据源\n```ts\nexport class Bar {\n\n  @Transactional({ dataSourceName: 'xx' })\n  async bar() {\n    await this.foo();\n  }\n\n}\n\n```\n\nFoo.bar 始终会在一个独立的事务中执行，而 Foo.foo 会在 Foo.bar 的事务中执行\n","publish_time":1724673913621,"maintainers":[{"name":"akitasummer","email":"644171127@qq.com"},{"name":"gxkl","email":"gxkl203@gmail.com"},{"name":"gemwuu","email":"gemwuu@gmail.com"},{"name":"eggjs-admin","email":"fengmk2+eggjs@gmail.com"},{"name":"fengmk2","email":"fengmk2@gmail.com"},{"name":"atian25","email":"atian25@qq.com"},{"name":"dead_horse","email":"dead_horse@qq.com"},{"name":"wanghx","email":"whxaxes@gmail.com"},{"name":"hyj1991","email":"yeekwanvong@gmail.com"},{"name":"killagu","email":"killa07071201@gmail.com"},{"name":"coolme200","email":"2001-wms@163.com"},{"name":"mansonchor.zzw","email":"mansonchor1987@gmail.com"},{"name":"hubcarl","email":"hubcarl@126.com"}],"_cnpm_publish_time":1724673913621,"dist-tags":{"alpha":"3.57.15-alpha.0","beta":"3.73.0-beta.1","beta-v3":"3.74.0-beta.3","latest":"3.88.1"}}