{"name":"@eggjs/tegg-transaction-decorator","version":"4.0.0-beta.5","keywords":["egg","typescript","decorator","transaction","tegg"],"author":{"name":"qile222","email":"chhxxc@gmail.com"},"license":"MIT","_id":"@eggjs/tegg-transaction-decorator@4.0.0-beta.5","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":"ce274711b2e8db00af3cc29c4cbdae1c65b44e53","tarball":"http://registry-npm.ywwl.com/@eggjs/tegg-transaction-decorator/download/@eggjs/tegg-transaction-decorator-4.0.0-beta.5.tgz","fileCount":14,"integrity":"sha512-K4vUMYMwSzBDGN4jgfm1XInJ3GNGFyfn8RP5bI7Edz+N1PMdfH5oySltdRhzXE1L8UsWDiwqF1xR7UjmpTcPJA==","signatures":[{"sig":"MEUCIQDrLHKSSnZCSpC/V6fW3yY9B80KnUy4eXwdRtfIrLC6UQIgNUHaeeAGUCScL16LEDvAKAAMjpjZ9ecSlj6adu/KfrI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@eggjs%2ftegg-transaction-decorator@4.0.0-beta.5","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":7751,"size":3014,"noattachment":false,"key":"/@eggjs/tegg-transaction-decorator/-/@eggjs/tegg-transaction-decorator-4.0.0-beta.5.tgz"},"main":"./dist/index.js","type":"module","_from":"file:eggjs-tegg-transaction-decorator-4.0.0-beta.5.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","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/606d458532e7fbd6bfb9a8b783f4ed0d/eggjs-tegg-transaction-decorator-4.0.0-beta.5.tgz","_integrity":"sha512-K4vUMYMwSzBDGN4jgfm1XInJ3GNGFyfn8RP5bI7Edz+N1PMdfH5oySltdRhzXE1L8UsWDiwqF1xR7UjmpTcPJA==","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.5","@eggjs/core-decorator":"4.0.0-beta.5"},"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.5_1759570514413_0.9918713361174452","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":1759570514691,"_cnpm_publish_time":1759570514691,"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"}}