{"name":"@eggjs/tegg-transaction-decorator","version":"3.73.0-beta.2","keywords":["egg","typescript","decorator","transaction","tegg"],"author":{"name":"qile222","email":"chhxxc@gmail.com"},"license":"MIT","_id":"@eggjs/tegg-transaction-decorator@3.73.0-beta.2","maintainers":[{"name":"gxkl","email":"gxkl203@gmail.com"},{"name":"eggjs-admin","email":"fengmk2+eggjs@gmail.com"},{"name":"fengmk2","email":"fengmk2@gmail.com"},{"name":"atian25","email":"atian25@qq.com"},{"name":"hyj1991","email":"yeekwanvong@gmail.com"},{"name":"killagu","email":"killa07071201@gmail.com"},{"name":"coolme200","email":"2001-wms@163.com"},{"name":"akitasummer","email":"644171127@qq.com"},{"name":"niania","email":"ljracm@gmail.com"}],"homepage":"https://github.com/eggjs/tegg","bugs":{"url":"https://github.com/eggjs/tegg/issues"},"dist":{"shasum":"6dd13d4a3b03843e1d40c7c3cdd2ac25027531c3","tarball":"http://registry-npm.ywwl.com/@eggjs/tegg-transaction-decorator/download/@eggjs/tegg-transaction-decorator-3.73.0-beta.2.tgz","fileCount":11,"integrity":"sha512-QRUbJI5cxvux9QWltPG41WzvSx+HEYFMmpsT/LDqvZc6euNYvVwpJzMFw1YikLHjl+rV//mQHdyD/c42d4pldg==","signatures":[{"sig":"MEUCIQDLo2u5suzjCsGJeG6uAw8DDRmmHRG4K83fDz/4erss9gIgNzo2xe/KTuj8KZzdoMVdWhUIonTO4vsRw0ZcMH5QS8s=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10775,"size":4403,"noattachment":false,"key":"/@eggjs/tegg-transaction-decorator/-/@eggjs/tegg-transaction-decorator-3.73.0-beta.2.tgz"},"main":"dist/index.js","types":"./dist/index.d.ts","engines":{"node":">=14.0.0"},"gitHead":"e22d62615ba53d4f1734d30e3048a03b7b2c5de9","scripts":{"tsc":"ut run clean && tsc -p ./tsconfig.json","test":"cross-env NODE_ENV=test NODE_OPTIONS='--no-deprecation' mocha","clean":"tsc -b --clean","tsc:pub":"ut run clean && tsc -p ./tsconfig.pub.json","prepublishOnly":"ut tsc:pub"},"_npmUser":{"name":"niania","email":"ljracm@gmail.com"},"repository":{"url":"git+ssh://git@github.com/eggjs/tegg.git","type":"git","directory":"core/transaction-decorator"},"_npmVersion":"lerna/6.6.2/node@v22.22.0+arm64 (darwin)","description":"tegg transaction decorator","directories":{},"_nodeVersion":"22.22.0","dependencies":{"@eggjs/tegg-types":"^3.73.0-beta.2","@eggjs/tegg-metadata":"^3.73.0-beta.2","@eggjs/core-decorator":"^3.73.0-beta.2","@eggjs/tegg-common-util":"^3.73.0-beta.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"mocha":"^10.2.0","ts-node":"^10.9.1","cross-env":"^7.0.3","typescript":"^5.0.4","@types/node":"^20.2.4","@types/mocha":"^10.0.1"},"_npmOperationalInternal":{"tmp":"tmp/tegg-transaction-decorator_3.73.0-beta.2_1774424343887_0.8145791540939382","host":"s3://npm-registry-packages-npm-production"},"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":1774424344042,"_cnpm_publish_time":1774424344042,"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"}}