{"name":"@eggjs/tegg-transaction-decorator","version":"4.0.0-beta.9","keywords":["egg","typescript","decorator","transaction","tegg"],"author":{"name":"qile222","email":"chhxxc@gmail.com"},"license":"MIT","_id":"@eggjs/tegg-transaction-decorator@4.0.0-beta.9","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":"akitasummer@outlook.com"}],"homepage":"https://github.com/eggjs/tegg","bugs":{"url":"https://github.com/eggjs/tegg/issues"},"dist":{"shasum":"65aea9e50750a03ac151110eba2627f5f8ac03e0","tarball":"http://registry-npm.ywwl.com/@eggjs/tegg-transaction-decorator/download/@eggjs/tegg-transaction-decorator-4.0.0-beta.9.tgz","fileCount":17,"integrity":"sha512-Cl4ieJxp26MDUWizzw96LUwlf7XCEA4MXPrRx7Hp5cfd7KxF6AbXhMZYNmpCrlKc1ma7i6xxHeULAU2F0bAsGw==","signatures":[{"sig":"MEQCIEP4S5BOlw4wuTIFp6UsN/+/+z/AwnKmCyt+CvpBvAuXAiArhxokEr8MsvVO7I/K8xaxHoDGJL57WOhLzWOTizl1Rg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@eggjs%2ftegg-transaction-decorator@4.0.0-beta.9","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":10824,"size":4309,"noattachment":false,"key":"/@eggjs/tegg-transaction-decorator/-/@eggjs/tegg-transaction-decorator-4.0.0-beta.9.tgz"},"main":"./dist/index.js","type":"module","_from":"file:eggjs-tegg-transaction-decorator-4.0.0-beta.9.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=22.18.0"},"exports":{".":"./dist/index.js","./package.json":"./package.json"},"scripts":{"build":"tsdown && rimraf dist && tsc -b --clean && tsc","clean":"rimraf dist","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:43acf551-c281-4e3c-be96-33e3a2cac98b"}},"_resolved":"/tmp/c84aa947c8ca4100425f452d69e91d7d/eggjs-tegg-transaction-decorator-4.0.0-beta.9.tgz","_integrity":"sha512-Cl4ieJxp26MDUWizzw96LUwlf7XCEA4MXPrRx7Hp5cfd7KxF6AbXhMZYNmpCrlKc1ma7i6xxHeULAU2F0bAsGw==","repository":{"url":"git+ssh://git@github.com/eggjs/tegg.git","type":"git","directory":"core/transaction-decorator"},"_npmVersion":"11.6.1","description":"tegg transaction decorator","directories":{},"_nodeVersion":"22.20.0","dependencies":{"@eggjs/tegg-types":"4.0.0-beta.9","@eggjs/core-decorator":"4.0.0-beta.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"tsdown":"^0.15.6","typescript":"^5.9.3","@types/node":"^22.10.5","unplugin-unused":"^0.5.3"},"_npmOperationalInternal":{"tmp":"tmp/tegg-transaction-decorator_4.0.0-beta.9_1759601549993_0.051608972484534776","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":1759601550184,"_cnpm_publish_time":1759601550184,"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"}}