{"_id":"0data","name":"0data","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"0data","version":"1.0.0","description":"Minimal CLI for managing a dev AWS RDS MySQL database","type":"module","main":"./dist/main.js","bin":{"0data":"dist/main.js"},"scripts":{"build":"esbuild src/main.ts --bundle --platform=node --target=node18 --format=esm --external:mysql2 --banner:js=\"#!/usr/bin/env node\" --outfile=dist/main.js","check":"tsc --noEmit","prepublishOnly":"npm run build"},"dependencies":{"mysql2":"^3.14.1"},"devDependencies":{"@types/node":"^20.11.24","esbuild":"^0.28.0","typescript":"^5.3.3"},"gitHead":"f2dfe1eff88bfaf5ddfeee3361d151cff440f7b7","_id":"0data@1.0.0","_nodeVersion":"26.2.0","_npmVersion":"11.14.1","dist":{"integrity":"sha512-8JhjL4AcNwfYQvxSrckBeGnst/sdxaN5dcVjdAj4zma9BjyegoGHK4Ju7J2PutQvo/lPicWRuCURaciKztygEg==","shasum":"e787d568dbb7f7aab7bb10f5479df2ebacd6e945","tarball":"https://registry.npmjs.org/0data/-/0data-1.0.0.tgz","fileCount":3,"unpackedSize":58675,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHrdUTtl9XfM+dt1cx66qHnbVyY+Gz/cSRW2UQAUL2zSAiEA49q8J0eOLZMi1K4BbQ75O74vH1oFRzU+oYtSjICVCnw="}]},"_npmUser":{"name":"cristlee","email":"cristlee9527@gmail.com"},"directories":{},"maintainers":[{"name":"cristlee","email":"cristlee9527@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/0data_1.0.0_1779853487487_0.774917949137373"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-27T03:44:46.795Z","1.0.0":"2026-05-27T03:44:47.639Z","modified":"2026-05-27T03:44:47.876Z"},"maintainers":[{"name":"cristlee","email":"cristlee9527@gmail.com"}],"description":"Minimal CLI for managing a dev AWS RDS MySQL database","readme":"# dm\n\nMinimal Deno CLI for managing a dev AWS RDS MySQL database.\n\n## Setup\n\nCreate the local config file:\n\n```bash\ndeno task dm init\n```\n\nEdit:\n\n```bash\n~/.config/dm/config.json\n```\n\nExample:\n\n```json\n{\n  \"defaultProfile\": \"default\",\n  \"profiles\": {\n    \"default\": {\n      \"host\": \"your-dev-rds.xxxxxx.us-east-1.rds.amazonaws.com\",\n      \"port\": 3306,\n      \"user\": \"admin\",\n      \"password\": \"dev-password\",\n      \"database\": \"app_dev\",\n      \"ssl\": {\n        \"rejectUnauthorized\": false\n      }\n    },\n    \"other_dev\": {\n      \"host\": \"your-other-dev-rds.xxxxxx.us-east-1.rds.amazonaws.com\",\n      \"port\": 3306,\n      \"user\": \"admin\",\n      \"password\": \"dev-password\",\n      \"database\": \"other_app_dev\",\n      \"ssl\": {\n        \"rejectUnauthorized\": false\n      }\n    }\n  }\n}\n```\n\nThe init command sets the config directory to `700` and the config file to `600`\non Linux.\n\nFor a dev RDS instance, `\"rejectUnauthorized\": false` is the quickest way to\navoid local TLS CA setup. For a stronger setup, download the AWS RDS CA bundle\nand use:\n\n```json\n{\n  \"ssl\": {\n    \"caPath\": \"/path/to/global-bundle.pem\",\n    \"rejectUnauthorized\": true\n  }\n}\n```\n\n## Commands\n\n```bash\ndeno task dm ping\ndeno task dm databases\ndeno task dm tables\ndeno task dm profile ls\ndeno task dm profile current\ndeno task dm profile set default\ndeno task dm users\ndeno task dm describe users\ndeno task dm indexes users\ndeno task dm indexes users --format json\ndeno task dm count users\ndeno task dm bucket ls\ndeno task dm bucket set my-r2-bucket\ndeno task dm bucket files\ndeno task dm export\ndeno task dm export --prod\ndeno task dm export --prod --limit 5000\n```\n\nThis first version runs with `-A` through the `dm` task.\n\n`count` uses MySQL's `information_schema.TABLES.TABLE_ROWS` estimate. That is\nfast for large InnoDB tables, but it is approximate.\n\nAds exports are grouped by database profile. Samples live in\n`exports/<profile>/sample/`; production exports should go in\n`exports/<profile>/production/` after the sample headers and values are\napproved. Use `deno task dm export --prod` to write plan exports to the\nproduction folder. Sample plan exports default to 100 rows, while `--prod`\ndefaults to 1000 rows; pass `--limit <n>` to override either default.\n\nThe ads staging exports use the same dataset filenames in both folders:\n`user_profiles.csv`, `contact_identifiers.csv`, and `purchase_events.csv`. They\nare raw ClickHouse BI inputs, so nullable source values should be preserved in\nthese files and filtered later in derived audience/upload tables.\n\nAgents should generate `exports/<current-profile>/export.config.json` for\nrepeatable ads exports. The plan contains table names, source-to-output column\nmappings, date columns, limits, and output filenames. Once the plan exists, run:\n\n```bash\ndeno task dm export\n```\n","readmeFilename":"README.md","_rev":"1-d97e7f57a02311fbd415e58b5ff4ae8b"}