{"_id":"@affiliate.fm/ai-content-rewriter","_rev":"17-e683db75e7bda7381061cb8ac19b4104","name":"@affiliate.fm/ai-content-rewriter","dist-tags":{"latest":"1.2.3"},"versions":{"0.1.0":{"name":"@affiliate.fm/ai-content-rewriter","version":"0.1.0","keywords":["ai","rewrite","content","openai","gpt","copywriting","seo","affiliate","marketing"],"author":{"name":"Affiliate.FM"},"license":"MIT","_id":"@affiliate.fm/ai-content-rewriter@0.1.0","maintainers":[{"name":"affiliatefm","email":"info@affiliate.fm"}],"homepage":"https://affiliate.fm/tools/ai-content-rewriter/","bugs":{"url":"https://github.com/affiliatefm/ai-content-rewriter/issues"},"dist":{"shasum":"ee7170d67d255f1ca6beb3b034eea9297b588cb3","tarball":"https://registry.npmjs.org/@affiliate.fm/ai-content-rewriter/-/ai-content-rewriter-0.1.0.tgz","fileCount":34,"integrity":"sha512-uwQo6tSCAoK8WmjlwJ3ZsWbPqN62a11SMvjS+jiGJZarjlD8EVutz1vRkpp8Jkn9b7IE+dNOsnrCynp0MTRPbg==","signatures":[{"sig":"MEYCIQDdXnr1+r6Rydvx1a5k9epIEa8FJA1PYsFTT+9IkQx5jQIhAMuwM9EIPicUyGQs9tLWmaJoPQ1XHQ7CdSlBjlQD6Dd7","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":104732},"main":"./lib/index.js","type":"module","types":"./lib/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./lib/index.d.ts","import":"./lib/index.js"},"./browser":{"types":"./lib/browser.d.ts","import":"./lib/browser.js"}},"gitHead":"8d00c6f3a3656051c018a1021f632d3d96ea5249","scripts":{"dev":"tsc --watch","build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"affiliatefm","email":"info@affiliate.fm"},"repository":{"url":"git+https://github.com/affiliatefm/ai-content-rewriter.git","type":"git"},"_npmVersion":"10.8.2","description":"AI-powered content rewriting library. Supports multiple providers, format auto-detection, and configurable prompts.","directories":{},"_nodeVersion":"18.20.8","dependencies":{"openai":"^4.73.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/node":"^22.10.1"},"_npmOperationalInternal":{"tmp":"tmp/ai-content-rewriter_0.1.0_1768743169605_0.4099561335500841","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@affiliate.fm/ai-content-rewriter","version":"0.2.0","keywords":["ai","rewrite","content","openai","gpt","copywriting","seo","affiliate","marketing"],"author":{"name":"Affiliate.FM"},"license":"MIT","_id":"@affiliate.fm/ai-content-rewriter@0.2.0","maintainers":[{"name":"affiliatefm","email":"info@affiliate.fm"}],"homepage":"https://affiliate.fm/tools/ai-content-rewriter/","bugs":{"url":"https://github.com/affiliatefm/ai-content-rewriter/issues"},"dist":{"shasum":"e95ff55ee0a0ebe07406948c1cbabf1f9a539929","tarball":"https://registry.npmjs.org/@affiliate.fm/ai-content-rewriter/-/ai-content-rewriter-0.2.0.tgz","fileCount":38,"integrity":"sha512-QAshmLZcp9k4IfG0ZBtW50GY3859qLlxUJIOuvj1x9tVB5KRNkwv0XlYxGIAgP/NFlVuJMOFZ//sR0aWElJ2/w==","signatures":[{"sig":"MEUCIAp1CcRZfTI6SaCq595eKhJYqkFR06BTYu4wxXA5N+tmAiEAjs4YoUeZOrkj1PFHGmxdrTSAGwvH4H9uj4cpSwfDzus=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":130767},"main":"./lib/index.js","type":"module","types":"./lib/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./lib/index.d.ts","import":"./lib/index.js"},"./browser":{"types":"./lib/browser.d.ts","import":"./lib/browser.js"}},"gitHead":"d0dec132c51b1ae9694525ee83098fba367e6d3b","scripts":{"dev":"tsc --watch","build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"affiliatefm","email":"info@affiliate.fm"},"repository":{"url":"git+https://github.com/affiliatefm/ai-content-rewriter.git","type":"git"},"_npmVersion":"10.8.2","description":"AI-powered content rewriting library. Supports multiple providers, format auto-detection, and configurable prompts.","directories":{},"_nodeVersion":"18.20.8","dependencies":{"openai":"^4.73.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/node":"^22.10.1"},"_npmOperationalInternal":{"tmp":"tmp/ai-content-rewriter_0.2.0_1768747961593_0.7930531335918869","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@affiliate.fm/ai-content-rewriter","version":"0.2.1","keywords":["ai","rewrite","content","openai","gpt","copywriting","seo","affiliate","marketing"],"author":{"name":"Affiliate.FM"},"license":"MIT","_id":"@affiliate.fm/ai-content-rewriter@0.2.1","maintainers":[{"name":"affiliatefm","email":"info@affiliate.fm"}],"homepage":"https://affiliate.fm/tools/ai-content-rewriter/","bugs":{"url":"https://github.com/affiliatefm/ai-content-rewriter/issues"},"dist":{"shasum":"f8e5c5d23acc14cfb79d76f201137cde45fec4ee","tarball":"https://registry.npmjs.org/@affiliate.fm/ai-content-rewriter/-/ai-content-rewriter-0.2.1.tgz","fileCount":38,"integrity":"sha512-N5bPJBKN4nj984Do9gJuRdrDIKNAswzE/c2HlA4BBa/fvhqVbR04qMFFGiZ5NIF5WMeYeYmjH1+DnnEpSSKaMQ==","signatures":[{"sig":"MEUCIGY2U8Bs+OT/RZK2eZRvH6JjFBa8AfWL4oyjhdA4iMSBAiEAmLUXG4Ism2mDGzI9aQlUs28cF7To+6MZh8vs2O/7fbo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":134390},"main":"./lib/index.js","type":"module","types":"./lib/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./lib/index.d.ts","import":"./lib/index.js"},"./browser":{"types":"./lib/browser.d.ts","import":"./lib/browser.js"}},"gitHead":"5ea45cfdab9a6c027afcfbf4f0969ae9918bec37","scripts":{"dev":"tsc --watch","build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"affiliatefm","email":"info@affiliate.fm"},"repository":{"url":"git+https://github.com/affiliatefm/ai-content-rewriter.git","type":"git"},"_npmVersion":"10.8.2","description":"AI-powered content rewriting library. Supports multiple providers, format auto-detection, and configurable prompts.","directories":{},"_nodeVersion":"18.20.8","dependencies":{"openai":"^4.73.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/node":"^22.10.1"},"_npmOperationalInternal":{"tmp":"tmp/ai-content-rewriter_0.2.1_1768748632838_0.2547798752164452","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@affiliate.fm/ai-content-rewriter","version":"0.3.1","keywords":["ai","rewrite","content","openai","gpt","copywriting","seo","affiliate","marketing"],"author":{"name":"Affiliate.FM"},"license":"MIT","_id":"@affiliate.fm/ai-content-rewriter@0.3.1","maintainers":[{"name":"affiliatefm","email":"info@affiliate.fm"}],"homepage":"https://affiliate.fm/tools/ai-content-rewriter/","bugs":{"url":"https://github.com/affiliatefm/ai-content-rewriter/issues"},"dist":{"shasum":"6570f572203b7e9104c92b3a9ddd4e7be9236d66","tarball":"https://registry.npmjs.org/@affiliate.fm/ai-content-rewriter/-/ai-content-rewriter-0.3.1.tgz","fileCount":38,"integrity":"sha512-CsZj8xKMIHIqq+7xh5oQ1gmjMbIC1cHKkKBN6WuKmC35FE32Tvp4j6MhyeYyu0deKPw44/ZeUEBsoZqwQ718tw==","signatures":[{"sig":"MEUCIQCwx15HkT1t84y/7QEmOcdZ7VcttAimDNkHNgEkVKtBaAIgUgNi5XI6Sx6Vw4WyrfxzUsuoM9+0zt1KGy3VQnZBu7g=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":138157},"main":"./lib/index.js","type":"module","types":"./lib/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./lib/index.d.ts","import":"./lib/index.js"},"./browser":{"types":"./lib/browser.d.ts","import":"./lib/browser.js"}},"gitHead":"61c3046858e429c81bd49dd719cc5b1088e10e83","scripts":{"dev":"tsc --watch","build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"affiliatefm","email":"info@affiliate.fm"},"repository":{"url":"git+https://github.com/affiliatefm/ai-content-rewriter.git","type":"git"},"_npmVersion":"10.8.2","description":"AI-powered content rewriting library. Supports multiple providers, format auto-detection, and configurable prompts.","directories":{},"_nodeVersion":"18.20.8","dependencies":{"openai":"^4.73.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/node":"^22.10.1"},"_npmOperationalInternal":{"tmp":"tmp/ai-content-rewriter_0.3.1_1768752650581_0.7752795211073562","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@affiliate.fm/ai-content-rewriter","version":"0.4.0","keywords":["ai","rewrite","content","openai","gpt","copywriting","seo","affiliate","marketing"],"author":{"name":"Affiliate.FM"},"license":"MIT","_id":"@affiliate.fm/ai-content-rewriter@0.4.0","maintainers":[{"name":"affiliatefm","email":"info@affiliate.fm"}],"homepage":"https://affiliate.fm/tools/ai-content-rewriter/","bugs":{"url":"https://github.com/affiliatefm/ai-content-rewriter/issues"},"dist":{"shasum":"0c6288ced3841cefd3d08673884717e7ea8b7810","tarball":"https://registry.npmjs.org/@affiliate.fm/ai-content-rewriter/-/ai-content-rewriter-0.4.0.tgz","fileCount":38,"integrity":"sha512-vjwnao2PBNvByLtL1m8GkLiMKKvg7O3KEAXMW2HuOPwL2G1+6i6KbM1ghRDkz8/rVsKMWoFprH/TqIKEUp8mag==","signatures":[{"sig":"MEQCICsHTS+X5l1Y1RKXmPtXP45QQGGGEeJDV2Cj0esGEFdfAiAzZTpQ4qjLR7Y+m9l8K8n5mGGp7WhptEWT2ElblJALIw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":161940},"main":"./lib/index.js","type":"module","types":"./lib/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./lib/index.d.ts","import":"./lib/index.js"},"./browser":{"types":"./lib/browser.d.ts","import":"./lib/browser.js"}},"gitHead":"f66b5e560bb107290fa2aeb5653494e01ff36e42","scripts":{"dev":"tsc --watch","build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"affiliatefm","email":"info@affiliate.fm"},"repository":{"url":"git+https://github.com/affiliatefm/ai-content-rewriter.git","type":"git"},"_npmVersion":"10.8.2","description":"AI-powered content rewriting library. Supports multiple providers, format auto-detection, and configurable prompts.","directories":{},"_nodeVersion":"18.20.8","dependencies":{"openai":"^4.73.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/node":"^22.10.1"},"_npmOperationalInternal":{"tmp":"tmp/ai-content-rewriter_0.4.0_1768756209337_0.591693877296682","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"@affiliate.fm/ai-content-rewriter","version":"1.0.0","keywords":["ai","rewrite","content","openai","gpt","copywriting","seo","affiliate","marketing"],"author":{"name":"Affiliate.FM"},"license":"MIT","_id":"@affiliate.fm/ai-content-rewriter@1.0.0","maintainers":[{"name":"affiliatefm","email":"info@affiliate.fm"}],"homepage":"https://affiliate.fm/tools/ai-content-rewriter/","bugs":{"url":"https://github.com/affiliatefm/ai-content-rewriter/issues"},"dist":{"shasum":"407560540c38b2cbc84b6f749b8241b0bf2df9ba","tarball":"https://registry.npmjs.org/@affiliate.fm/ai-content-rewriter/-/ai-content-rewriter-1.0.0.tgz","fileCount":38,"integrity":"sha512-p271nTBLPDj4TgLAOzyN28/7EK5SynaXEznu7Xd1LPhGabPzJHlMAHYCI/Ffs5c7UIjhsS5+JFAYDNkPGp8JKw==","signatures":[{"sig":"MEUCIQD9E7cC1h/AcXq5+BvskPWNHotVmXHLZycLxxLtxH0ofAIgYL+0Id/eemW/hnEbCsSvgVPdE5F1S9NbsccdVllwvkA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":154571},"main":"./lib/index.js","type":"module","types":"./lib/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./lib/index.d.ts","import":"./lib/index.js"},"./browser":{"types":"./lib/browser.d.ts","import":"./lib/browser.js"}},"gitHead":"c8ca0a7b9d30af749b4ac206128f31a04e09ac34","scripts":{"dev":"tsc --watch","build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"affiliatefm","email":"info@affiliate.fm"},"repository":{"url":"git+https://github.com/affiliatefm/ai-content-rewriter.git","type":"git"},"_npmVersion":"10.8.2","description":"AI-powered content rewriting library. Supports multiple providers, format auto-detection, and configurable prompts.","directories":{},"_nodeVersion":"18.20.8","dependencies":{"openai":"^4.73.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/node":"^22.10.1"},"_npmOperationalInternal":{"tmp":"tmp/ai-content-rewriter_1.0.0_1768756369064_0.017727641992121734","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@affiliate.fm/ai-content-rewriter","version":"1.0.1","keywords":["ai","rewrite","content","openai","gpt","copywriting","seo","affiliate","marketing"],"author":{"name":"Affiliate.FM"},"license":"MIT","_id":"@affiliate.fm/ai-content-rewriter@1.0.1","maintainers":[{"name":"affiliatefm","email":"info@affiliate.fm"}],"homepage":"https://affiliate.fm/tools/ai-content-rewriter/","bugs":{"url":"https://github.com/affiliatefm/ai-content-rewriter/issues"},"dist":{"shasum":"90a38a944d91bed13d42b322be1abbd45a8bf0d5","tarball":"https://registry.npmjs.org/@affiliate.fm/ai-content-rewriter/-/ai-content-rewriter-1.0.1.tgz","fileCount":38,"integrity":"sha512-X0v0KHkDH3GsWbvigdZ2wHBzs7D+G7SW5X5SwSvfOcMhuopVnRlR370JT80iVGoIvzPU3pKp0/dDr/95usXDQQ==","signatures":[{"sig":"MEYCIQC5p+8EF30cFbUw9pzzO+MhMNDcrLHPBfNUE9kyQH1DsQIhAIbedVNnZJFaeo6bU2mwGl2WMVykxKijS0HegiWjrLEQ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":160855},"main":"./lib/index.js","type":"module","types":"./lib/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./lib/index.d.ts","import":"./lib/index.js"},"./browser":{"types":"./lib/browser.d.ts","import":"./lib/browser.js"}},"gitHead":"b179b9f2112472682739c9c6320e46bbdb50ad64","scripts":{"dev":"tsc --watch","build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"affiliatefm","email":"info@affiliate.fm"},"repository":{"url":"git+https://github.com/affiliatefm/ai-content-rewriter.git","type":"git"},"_npmVersion":"10.8.2","description":"AI-powered content rewriting library. Supports multiple providers, format auto-detection, and configurable prompts.","directories":{},"_nodeVersion":"18.20.8","dependencies":{"openai":"^4.73.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/node":"^22.10.1"},"_npmOperationalInternal":{"tmp":"tmp/ai-content-rewriter_1.0.1_1768756711659_0.7629292259062395","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@affiliate.fm/ai-content-rewriter","version":"1.1.0","keywords":["ai","rewrite","content","openai","gpt","copywriting","seo","affiliate","marketing"],"author":{"name":"Affiliate.FM"},"license":"MIT","_id":"@affiliate.fm/ai-content-rewriter@1.1.0","maintainers":[{"name":"affiliatefm","email":"info@affiliate.fm"}],"homepage":"https://affiliate.fm/tools/ai-content-rewriter/","bugs":{"url":"https://github.com/affiliatefm/ai-content-rewriter/issues"},"dist":{"shasum":"eebcd093115d8eeaaf55947f304a6b17fc769399","tarball":"https://registry.npmjs.org/@affiliate.fm/ai-content-rewriter/-/ai-content-rewriter-1.1.0.tgz","fileCount":38,"integrity":"sha512-aSAQ2MUjYdCAhLJBz/YjJImcOmaZPw4h9bPMYFee5w3BHHAQvGoeA35wHGtPPdbMCrJy1k8Ae5gxF0fjvMuJyQ==","signatures":[{"sig":"MEYCIQDPHjOd7qHnuvG5h+C3RPAyQNn7twoDvchlTJiyuyk0jwIhAJSEnnCbNW2vSQwAZkkTVcV62K9NPiE9jS+9AEqQyt8I","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":157868},"main":"./lib/index.js","type":"module","types":"./lib/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./lib/index.d.ts","import":"./lib/index.js"},"./browser":{"types":"./lib/browser.d.ts","import":"./lib/browser.js"}},"gitHead":"14880ec3e75282760dca05d5e9f6adc65f9bf1c0","scripts":{"dev":"tsc --watch","build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"affiliatefm","email":"info@affiliate.fm"},"repository":{"url":"git+https://github.com/affiliatefm/ai-content-rewriter.git","type":"git"},"_npmVersion":"10.8.2","description":"AI-powered content rewriting library. Supports multiple providers, format auto-detection, and configurable prompts.","directories":{},"_nodeVersion":"18.20.8","dependencies":{"openai":"^4.73.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/node":"^22.10.1"},"_npmOperationalInternal":{"tmp":"tmp/ai-content-rewriter_1.1.0_1768758825799_0.41946555901701976","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@affiliate.fm/ai-content-rewriter","version":"1.2.0","keywords":["ai","rewrite","content","openai","gpt","copywriting","seo","affiliate","marketing"],"author":{"name":"Affiliate.FM"},"license":"MIT","_id":"@affiliate.fm/ai-content-rewriter@1.2.0","maintainers":[{"name":"affiliatefm","email":"info@affiliate.fm"}],"homepage":"https://affiliate.fm/tools/ai-content-rewriter/","bugs":{"url":"https://github.com/affiliatefm/ai-content-rewriter/issues"},"dist":{"shasum":"f7fb662f21a61954cd8cf0691f7c235919ed5d91","tarball":"https://registry.npmjs.org/@affiliate.fm/ai-content-rewriter/-/ai-content-rewriter-1.2.0.tgz","fileCount":38,"integrity":"sha512-a5MCBONumwYBVSsr20vlUUdTUbPaSq9T6JTghq/6DWJAZ+CeXsOKqMMwpL+XJRTyw55yxqduHzg2Pcnig+0U1Q==","signatures":[{"sig":"MEUCIFoA3fOvGNtctDISIkpeqZcB3h7T5hoBWfiruYuUQcF8AiEA45fBb40rVIsiduTsghU4pbi3HAH26s/0b/qoLScK+Xs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":151650},"main":"./lib/index.js","type":"module","types":"./lib/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./lib/index.d.ts","import":"./lib/index.js"},"./browser":{"types":"./lib/browser.d.ts","import":"./lib/browser.js"}},"gitHead":"49edf4943581070c06fb92ddff8f64ced6ec57c4","scripts":{"dev":"tsc --watch","build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"affiliatefm","email":"info@affiliate.fm"},"deprecated":"use 1.2.2","repository":{"url":"git+https://github.com/affiliatefm/ai-content-rewriter.git","type":"git"},"_npmVersion":"10.8.2","description":"AI-powered content rewriting library. Supports multiple providers, format auto-detection, and configurable prompts.","directories":{},"_nodeVersion":"18.20.8","dependencies":{"openai":"^4.73.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/node":"^22.10.1"},"_npmOperationalInternal":{"tmp":"tmp/ai-content-rewriter_1.2.0_1768759542872_0.2851578699505517","host":"s3://npm-registry-packages-npm-production"}},"1.2.1":{"name":"@affiliate.fm/ai-content-rewriter","version":"1.2.1","keywords":["ai","rewrite","content","openai","gpt","copywriting","seo","affiliate","marketing"],"author":{"name":"Affiliate.FM"},"license":"MIT","_id":"@affiliate.fm/ai-content-rewriter@1.2.1","maintainers":[{"name":"affiliatefm","email":"info@affiliate.fm"}],"homepage":"https://affiliate.fm/tools/ai-content-rewriter/","bugs":{"url":"https://github.com/affiliatefm/ai-content-rewriter/issues"},"dist":{"shasum":"e21b328124fce2ea721a58d5b5a8172973049578","tarball":"https://registry.npmjs.org/@affiliate.fm/ai-content-rewriter/-/ai-content-rewriter-1.2.1.tgz","fileCount":38,"integrity":"sha512-ggCB68ptKW0HfFsG1nEsTU88xFbf6HZxAD1qNwRMgR5YVPHWR30piNVtXTdnsAYDHOqzgQHkaBOHH7KupKqtNg==","signatures":[{"sig":"MEUCIQDPfkTGCTEssGNZyX1QFXDTW0GT53/ULobaqfmyNbIK9QIgGXM4bWTsSG4oNFhPO4rwROu5XfArdkSf4B2PIFMUnPk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":153565},"main":"./lib/index.js","type":"module","types":"./lib/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./lib/index.d.ts","import":"./lib/index.js"},"./browser":{"types":"./lib/browser.d.ts","import":"./lib/browser.js"}},"gitHead":"856d74c11ee01cf9aa3267bf55b009eb6e48913e","scripts":{"dev":"tsc --watch","build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"affiliatefm","email":"info@affiliate.fm"},"deprecated":"use 1.2.2","repository":{"url":"git+https://github.com/affiliatefm/ai-content-rewriter.git","type":"git"},"_npmVersion":"10.8.2","description":"AI-powered content rewriting library. Supports multiple providers, format auto-detection, and configurable prompts.","directories":{},"_nodeVersion":"18.20.8","dependencies":{"openai":"^4.73.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/node":"^22.10.1"},"_npmOperationalInternal":{"tmp":"tmp/ai-content-rewriter_1.2.1_1768759744861_0.09693474129915369","host":"s3://npm-registry-packages-npm-production"}},"1.2.2":{"name":"@affiliate.fm/ai-content-rewriter","version":"1.2.2","keywords":["ai","rewrite","content","openai","gpt","copywriting","seo","affiliate","marketing"],"author":{"name":"Affiliate.FM"},"license":"MIT","_id":"@affiliate.fm/ai-content-rewriter@1.2.2","maintainers":[{"name":"affiliatefm","email":"info@affiliate.fm"}],"homepage":"https://affiliate.fm/tools/ai-content-rewriter/","bugs":{"url":"https://github.com/affiliatefm/ai-content-rewriter/issues"},"dist":{"shasum":"9e560d482f164a7d7ada92e626c35aa301b422e4","tarball":"https://registry.npmjs.org/@affiliate.fm/ai-content-rewriter/-/ai-content-rewriter-1.2.2.tgz","fileCount":38,"integrity":"sha512-u8oBcas/swpgbWZ9pzLC2LZg1FNRJrTRdeB/Ka726DappEt3Xl7oZAU9u74RnRXVxp7si2xVssi7F8hhMSvzEA==","signatures":[{"sig":"MEUCIEi2q/hMSDxMBR3c9MJG5Fe0rssb2dbvkHh4mkyvgEfyAiEApocsvuvJ+zwkeo2MOVN8h7E7HnsKPh6GWPyUJaH08x4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":153145},"main":"./lib/index.js","type":"module","types":"./lib/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./lib/index.d.ts","import":"./lib/index.js"},"./browser":{"types":"./lib/browser.d.ts","import":"./lib/browser.js"}},"gitHead":"6ae6947ae99850bafd343ef75859d61d8c3157b7","scripts":{"dev":"tsc --watch","build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"affiliatefm","email":"info@affiliate.fm"},"repository":{"url":"git+https://github.com/affiliatefm/ai-content-rewriter.git","type":"git"},"_npmVersion":"10.8.2","description":"AI-powered content rewriting library. Supports multiple providers, format auto-detection, and configurable prompts.","directories":{},"_nodeVersion":"18.20.8","dependencies":{"openai":"^4.73.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/node":"^22.10.1"},"_npmOperationalInternal":{"tmp":"tmp/ai-content-rewriter_1.2.2_1768760015578_0.7812280826293794","host":"s3://npm-registry-packages-npm-production"}},"1.2.3":{"name":"@affiliate.fm/ai-content-rewriter","version":"1.2.3","description":"AI-powered content rewriting library for OpenAI (gpt-4.1). Includes format auto-detection and configurable prompts.","type":"module","main":"./lib/index.js","types":"./lib/index.d.ts","exports":{".":{"types":"./lib/index.d.ts","import":"./lib/index.js"},"./browser":{"types":"./lib/browser.d.ts","import":"./lib/browser.js"}},"scripts":{"build":"tsc","dev":"tsc --watch","prepublishOnly":"npm run build"},"keywords":["ai","rewrite","content","openai","gpt","copywriting","seo","affiliate","marketing"],"author":{"name":"Affiliate.FM"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/affiliatefm/ai-content-rewriter.git"},"homepage":"https://affiliate.fm/tools/ai-content-rewriter/","bugs":{"url":"https://github.com/affiliatefm/ai-content-rewriter/issues"},"engines":{"node":">=18.0.0"},"dependencies":{"openai":"^4.73.0"},"devDependencies":{"@types/node":"^22.10.1","typescript":"^5.7.2"},"_id":"@affiliate.fm/ai-content-rewriter@1.2.3","gitHead":"3f16a77236683988fe6725640a3a9a4f14cbddce","_nodeVersion":"18.20.8","_npmVersion":"10.8.2","dist":{"integrity":"sha512-mhiiNlARBAM/Sezt6pFVPxWxfd0zcNV6OTHHyWuekWm3BPapZRu+CPftBezEUXfgFqYUL/8xJSOn927IwUvBqQ==","shasum":"6f5e00255fd3d034634aa718b4f91481528dd70d","tarball":"https://registry.npmjs.org/@affiliate.fm/ai-content-rewriter/-/ai-content-rewriter-1.2.3.tgz","fileCount":38,"unpackedSize":158021,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCiyt1ZMuCZVT0HWY1m6pi1iRL2zyE91h/QLrswjN3HuAIhAJnyWROphgZaIUOrLvB7xXMjUbIMkU3GqSANjAwePfpn"}]},"_npmUser":{"name":"affiliatefm","email":"info@affiliate.fm"},"directories":{},"maintainers":[{"name":"affiliatefm","email":"info@affiliate.fm"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ai-content-rewriter_1.2.3_1768803085701_0.10882680359528152"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-18T13:32:49.524Z","modified":"2026-01-19T06:11:25.991Z","0.1.0":"2026-01-18T13:32:49.751Z","0.2.0":"2026-01-18T14:52:41.738Z","0.2.1":"2026-01-18T15:03:52.985Z","0.3.0":"2026-01-18T15:24:31.682Z","0.3.1":"2026-01-18T16:10:50.734Z","0.4.0":"2026-01-18T17:10:09.513Z","1.0.0":"2026-01-18T17:12:49.197Z","1.0.1":"2026-01-18T17:18:31.824Z","1.1.0":"2026-01-18T17:53:45.985Z","1.2.0":"2026-01-18T18:05:43.023Z","1.2.1":"2026-01-18T18:09:05.000Z","1.2.2":"2026-01-18T18:13:35.724Z","1.2.3":"2026-01-19T06:11:25.852Z"},"bugs":{"url":"https://github.com/affiliatefm/ai-content-rewriter/issues"},"author":{"name":"Affiliate.FM"},"license":"MIT","homepage":"https://affiliate.fm/tools/ai-content-rewriter/","keywords":["ai","rewrite","content","openai","gpt","copywriting","seo","affiliate","marketing"],"repository":{"type":"git","url":"git+https://github.com/affiliatefm/ai-content-rewriter.git"},"description":"AI-powered content rewriting library for OpenAI (gpt-4.1). Includes format auto-detection and configurable prompts.","maintainers":[{"name":"affiliatefm","email":"info@affiliate.fm"}],"readme":"# AI Content Rewriter\n\nAI-powered content rewriting library for OpenAI (gpt-4.1). Includes format auto-detection and configurable prompts.\n\nBuilt by [Affiliate.FM](https://affiliate.fm) — independent media and open-source tools for ethical affiliate marketing.\n\n## Installation\n\n```bash\nnpm install @affiliate.fm/ai-content-rewriter\n```\n\n## Quick Start\n\n```typescript\nimport { ContentRewriter } from \"@affiliate.fm/ai-content-rewriter\";\n\n// Create rewriter instance\nconst rewriter = new ContentRewriter({\n  provider: \"openai\",\n  apiKey: process.env.OPENAI_API_KEY,\n  model: \"gpt-4.1\", // Optional, defaults to gpt-4.1\n});\n\n// Rewrite content (single variant)\nconst [result] = await rewriter.rewrite(\"<h1>Original Title</h1><p>Original content...</p>\");\n\nconsole.log(result.content);     // Rewritten HTML\nconsole.log(result.title);       // Rewritten title\nconsole.log(result.description); // Rewritten description\nconsole.log(result.cost);        // Cost in USD\n\n// Generate multiple variants\nconst results = await rewriter.rewrite(htmlContent, { variants: 5 });\n```\n\n## Class API (Recommended)\n\n```typescript\nimport { ContentRewriter } from \"@affiliate.fm/ai-content-rewriter\";\n\nconst rewriter = new ContentRewriter({\n  provider: \"openai\",\n  apiKey: \"sk-...\",\n  model: \"gpt-4.1\",         // Optional\n  temperature: 0.9,          // Optional, default: 0.9\n});\n\n// Simple rewrite\nconst [result] = await rewriter.rewrite(html);\n\n// With options\nconst results = await rewriter.rewrite(html, {\n  variants: 3,\n  promptTemplate: \"DEFAULT\",\n  temperature: 0.8,            // Override default\n  onProgress: (p) => console.log(`${p.currentVariant}/${p.totalVariants}`),\n});\n\n// Single result shorthand\nconst result = await rewriter.rewriteOne(html);\n\n// Get available prompt templates\nconst templates = rewriter.getPromptTemplates();\n```\n\n## Features\n\n### Format Auto-Detection\n\nAutomatically detects content format (HTML, Markdown, or plain text):\n\n```typescript\n// HTML - detected automatically\nconst [result] = await rewriter.rewrite(\"<h1>Title</h1><p>Content</p>\");\n\n// Markdown - detected automatically\nconst [result] = await rewriter.rewrite(\"# Title\\n\\nContent here\");\n\n// Plain text - detected automatically\nconst [result] = await rewriter.rewrite(\"Just plain text content\");\n\n// Or specify explicitly\nconst [result] = await rewriter.rewrite({ content: \"...\", format: \"html\" });\n```\n\n### Built-in Prompt Templates\n\n```typescript\nimport { PROMPTS } from \"@affiliate.fm/ai-content-rewriter\";\n\n// Available templates:\n// - DEFAULT - Universal rewrite preserving language\n// - CUSTOM - Placeholder for a custom prompt\n\nconst results = await rewriter.rewrite(html, {\n  promptTemplate: \"DEFAULT\",\n});\n\n// Or use a custom prompt\nconst results = await rewriter.rewrite(html, {\n  prompt: \"Your custom rewriting instructions here...\",\n});\n```\n\n### Progress Tracking\n\n```typescript\nconst results = await rewriter.rewrite(content, {\n  variants: 5,\n  onProgress: (progress) => {\n    console.log(progress.phase); // 'preparing' | 'generating' | 'processing' | 'done'\n    console.log(`Variant ${progress.currentVariant}/${progress.totalVariants}`);\n    \n    // For large content processed in chunks\n    if (progress.currentChunk) {\n      console.log(`Chunk ${progress.currentChunk}/${progress.totalChunks}`);\n    }\n    \n    console.log(`Cost so far: $${progress.costSoFar?.toFixed(4)}`);\n  },\n});\n```\n\n### Large Content Handling\n\nContent over 12,000 characters is automatically split into chunks and processed in parallel:\n\n```typescript\nconst largeArticle = await fetchLargeArticle();\n\nconst results = await rewriter.rewrite(largeArticle, {\n  onProgress: (progress) => {\n    if (progress.totalChunks) {\n      console.log(`Processing chunk ${progress.currentChunk}/${progress.totalChunks}`);\n    }\n  },\n});\n```\n\n### Cancellation\n\n```typescript\nconst controller = new AbortController();\n\n// Start rewrite\nconst promise = rewriter.rewrite(content, {\n  signal: controller.signal,\n});\n\n// Cancel if needed\ncontroller.abort();\n```\n\n### AI Pattern Masking (Anti-Detection)\n\nBy default, the library automatically masks common AI-generated patterns to make content appear more natural:\n\n```typescript\n// Masking is enabled by default\nconst results = await rewriter.rewrite(content);\n\n// Disable masking if needed\nconst results = await rewriter.rewrite(content, {\n  maskAIPatterns: false,\n});\n\n// Or use masking utilities directly\nimport { maskAIPatterns, maskAIPatternsInHTML } from \"@affiliate.fm/ai-content-rewriter\";\n\nconst humanizedText = maskAIPatterns(aiGeneratedText);\nconst humanizedHtml = maskAIPatternsInHTML(aiGeneratedHtml);\n```\n\n**What gets masked:**\n- Em-dashes and en-dashes → regular dashes\n- Formal academic phrases → casual alternatives (\"moreover\" → \"also\", \"furthermore\" → \"plus\")\n- Typical AI phrases (\"it is important to note\" → \"note that\")\n- Unicode bullet points → simple markers\n- Overly structured patterns (numbered conclusions, \"Firstly, Secondly...\")\n- Optional: contractions for more natural flow\n\n### Uniqueness Checking\n\n```typescript\nimport { checkUniqueness } from \"@affiliate.fm/ai-content-rewriter\";\n\nconst result = checkUniqueness(originalHtml, rewrittenHtml);\n\nconsole.log(`${result.uniqueness}% unique`);  // e.g., \"92% unique\"\nconsole.log(`${result.similarity}% similar`); // e.g., \"8% similar\"\n\nif (result.isLowUniqueness) {\n  console.warn('Content uniqueness is below 85%');\n}\n```\n\n### Cost Estimation\n\n```typescript\nimport { estimateCost } from \"@affiliate.fm/ai-content-rewriter\";\n\n// Estimate before running\nconst estimatedCost = estimateCost(\"gpt-4.1\", htmlContent.length, 3); // 3 variants\nconsole.log(`Estimated cost: $${estimatedCost.toFixed(4)}`);\n```\n\n## API Reference\n\n### `ContentRewriter` Class\n\n```typescript\nconst rewriter = new ContentRewriter({\n  provider: \"openai\",        // Required: \"openai\" (only supported)\n  apiKey: \"sk-...\",          // Required\n  model: \"gpt-4.1\",          // Optional, default: \"gpt-4.1\"\n  baseUrl: \"...\",            // Optional, for proxies\n  temperature: 0.9,          // Optional, default: 0.9\n  customPrompts: { ... },    // Optional, add custom templates\n});\n\n// Main method\nconst results = await rewriter.rewrite(input, options);\n\n// Single result shorthand  \nconst result = await rewriter.rewriteOne(input, options);\n\n// Get prompt templates\nconst templates = rewriter.getPromptTemplates();\n\n// Get provider info\nconst provider = rewriter.getProvider();\n```\n\n### Rewrite Options (per-call)\n\n```typescript\ninterface RewriteCallOptions {\n  variants?: number;         // 1-30, default: 1\n  prompt?: string;           // Custom prompt\n  promptTemplate?: string;   // Template key\n  temperature?: number;      // 0-2, override constructor default\n  maskAIPatterns?: boolean;  // default: true\n  onProgress?: ProgressCallback;\n  signal?: AbortSignal;\n}\n```\n\n### Content Input\n\n```typescript\n// String shorthand\nawait rewriter.rewrite(\"<h1>Title</h1><p>Content</p>\");\n\n// Object with metadata\nawait rewriter.rewrite({\n  content: \"<h1>Title</h1><p>Content</p>\",\n  title: \"Optional explicit title\",\n  description: \"Optional meta description\",\n  format: \"html\", // Optional: \"html\" | \"markdown\" | \"text\"\n});\n```\n\n### Rewrite Result\n\n```typescript\ninterface RewriteResult {\n  content: string;           // Rewritten content\n  title: string;             // Rewritten title\n  description: string;       // Rewritten description\n  cost?: number;             // Cost in USD\n  format: ContentFormat;     // Detected/specified format\n}\n```\n\n## Error Handling\n\n```typescript\nimport { \n  RewriterError, \n  ProviderError, \n  RateLimitError, \n  ValidationError \n} from \"@affiliate.fm/ai-content-rewriter\";\n\ntry {\n  const results = await rewriter.rewrite(content);\n} catch (error) {\n  if (error instanceof RateLimitError) {\n    console.log(`Rate limited. Retry after ${error.retryAfter}s`);\n  } else if (error instanceof ProviderError) {\n    console.log(`Provider error: ${error.message}`);\n  } else if (error instanceof ValidationError) {\n    console.log(`Invalid input: ${error.message}`);\n  }\n}\n```\n\n## Browser Usage\n\nThe library works in browsers with the OpenAI SDK's browser mode:\n\n```typescript\nimport { ContentRewriter } from \"@affiliate.fm/ai-content-rewriter/browser\";\n\nconst rewriter = new ContentRewriter({\n  provider: \"openai\",\n  apiKey: \"sk-...\",\n});\n\nconst results = await rewriter.rewrite(content);\n```\n\n## Pricing\n\nCost is calculated based on OpenAI's token pricing (gpt-4.1 only):\n\n| Model | Input (per 1M tokens) | Output (per 1M tokens) |\n|-------|----------------------|------------------------|\n| gpt-4.1 | $5.00 | $15.00 |\n\n## Related\n\n- [astro-content-ai-translator](https://affiliate.fm/tools/astro-content-ai-translator/) — AI-powered translation for Astro\n- [website-core-template](https://affiliate.fm/tools/website-core-template/) — Multilingual static site template\n\n## License\n\nMIT\n","readmeFilename":"README.md"}