{"_id":"@antscorp/create-zma-loyalty","name":"@antscorp/create-zma-loyalty","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.2":{"name":"@antscorp/create-zma-loyalty","version":"0.1.2","description":"Create and maintain a brand-neutral Zalo Mini App loyalty project","type":"module","license":"UNLICENSED","bin":{"create-zma-loyalty":"dist/cli.mjs"},"publishConfig":{"access":"public"},"engines":{"node":">=22.12 <23","npm":">=10 <11"},"scripts":{"build":"node ../../tools/template/sync-snapshot.mjs && tsup","type-check":"tsc --noEmit","test":"vitest run test","prepack":"npm run build"},"dependencies":{"@clack/prompts":"1.7.0","citty":"0.2.2","nypm":"0.6.9","yaml":"2.9.0","zod":"4.4.3"},"_id":"@antscorp/create-zma-loyalty@0.1.2","gitHead":"f18a38bc61ec3446dc3cf9cebf10aa1f7c78f2b9","_nodeVersion":"22.22.0","_npmVersion":"10.9.4","dist":{"integrity":"sha512-by+Z+g4kgKm+uX5WTOUJJK+jhhVKKUYEyulk4xMtFss0O/pWTxpXZBBgGLNW32hjowGKgsyGBwDgSJ75A6mt+g==","shasum":"2e94832016096798bd683ef4f424cc37355aa7db","tarball":"https://registry.npmjs.org/@antscorp/create-zma-loyalty/-/create-zma-loyalty-0.1.2.tgz","fileCount":166,"unpackedSize":533014,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBwPPA/MoW3G21SUYRe/ZAsElRZiWbYjusC2fbz6d3DIAiA2M45HBVtv9tzkOBDbcHrmsGaMj0rvJEDMPz6dFBcc/Q=="}]},"_npmUser":{"name":"vinlt.antsomi","email":"vinlt@antsomi.com"},"directories":{},"maintainers":[{"name":"vinlt.antsomi","email":"vinlt@antsomi.com"},{"name":"khanhhv","email":"khanhhv@antsomi.com"},{"name":"sangndd-antsomi","email":"sangndd@antsomi.com"},{"name":"datle0497","email":"datle0497@gmail.com"},{"name":"ngocthangh","email":"ngocthanguit@gmail.com"},{"name":"cuongcn","email":"cuong.cn0103@gmail.com"},{"name":"hoangkhang887","email":"lenguyenhoangkhang2@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/create-zma-loyalty_0.1.2_1786604449456_0.0875229659099781"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-13T07:00:49.190Z","0.1.2":"2026-08-13T07:00:49.643Z","modified":"2026-08-13T07:00:49.928Z"},"maintainers":[{"name":"vinlt.antsomi","email":"vinlt@antsomi.com"},{"name":"khanhhv","email":"khanhhv@antsomi.com"},{"name":"sangndd-antsomi","email":"sangndd@antsomi.com"},{"name":"datle0497","email":"datle0497@gmail.com"},{"name":"ngocthangh","email":"ngocthanguit@gmail.com"},{"name":"cuongcn","email":"cuong.cn0103@gmail.com"},{"name":"hoangkhang887","email":"lenguyenhoangkhang2@gmail.com"}],"description":"Create and maintain a brand-neutral Zalo Mini App loyalty project","license":"UNLICENSED","readme":"# @antscorp/create-zma-loyalty\n\nPublic CLI package for transactionally creating and maintaining brand-neutral\nZalo Mini App loyalty projects.\n\n## Create\n\nInteractive terminal:\n\n```bash\nnpx @antscorp/create-zma-loyalty@latest\n```\n\nThe installed binary remains `create-zma-loyalty`.\n\nThe wizard asks for a setup mode and an explicit project folder name. The\nrecommended Antsomi starter requires the brand key, OA ID, and App ID, then\nsuggests `at.zma.<brand-key>` as an editable folder name while supplying\nreplace-later public materials and placeholders for remaining platform values.\nThe folder basename is also written as `package.json#name`; custom setup keeps\nthe full field-by-field workflow.\n\nAfter creation, human output shows the absolute project path, exact local run\ncommands, and a short reminder to replace `replace-with-*` values through the\nsupported configuration workflow. JSON mode keeps the same commands in\n`data.nextSteps` without terminal formatting.\n\nNon-interactive starter mode:\n\n```bash\ncreate-zma-loyalty at.zma.pho24 \\\n  --preset antsomi \\\n  --brand-key pho24 \\\n  --oa-id your-public-oa-id \\\n  --app-id your-public-app-id \\\n  --yes --no-install --no-git\n```\n\nDeterministic config-file mode:\n\n```bash\ncreate-zma-loyalty at.zma.pho24 \\\n  --config ./project.yaml \\\n  --yes \\\n  --no-install \\\n  --no-git \\\n  --json\n```\n\nThe target must be an absent conservative npm-safe relative path. Its final\nfolder segment becomes the generated npm package name, so\n`apps/at.zma.pho24` produces package `at.zma.pho24`. Brand identity remains an\nindependent configuration value. There is no force mode. Work is performed in a\nvalidated sibling staging directory. After\ngeneration, optional install, and optional Git initialization succeed, the CLI\natomically reserves the target name and copies with fail-on-exist semantics while\nrechecking directory identities. Portable Node APIs cannot provide an atomic\nno-replace directory rename, so publication is cross-platform no-replace safe but\ndoes not provide all-at-once visibility; it never replaces a concurrently created\ntarget. Git initialization creates no commit or remote.\n\n## Configure\n\n```bash\ncd at.zma.pho24\ncreate-zma-loyalty configure --sync-only --dry-run --json\ncreate-zma-loyalty configure --config ../project.yaml\n```\n\nJSON/YAML input is validated by the same strict version 1 schema. Assets are\nvalidated and copied to canonical project destinations. Generated config,\nschema, TypeScript, CSS, app config, and `.zma-template.json` share a canonical\nSHA-256 config fingerprint. Configure leaves all non-declared human-owned files\nunchanged; dry-run writes nothing. Apply preflights and stages the entire owned\nfile set, rolls every prior byte and mtime back on failure, and commits\n`.zma-template.json` last.\n\n## Doctor and upgrade\n\n```bash\ncreate-zma-loyalty doctor --json\ncreate-zma-loyalty upgrade --dry-run --json\ncreate-zma-loyalty upgrade --yes --json\n```\n\nDoctor is read-only and reports `healthy` or `upgrade-available` with the exact\nmigration IDs. Upgrade validates the same project state, requires `--yes` for\nnon-interactive apply, checks per-file SHA-256 preconditions, commits metadata\nlast, and is idempotent. Migration manifest v1 can only replace existing files;\nthere is no force mode, target-version selection, create, delete, or rename.\n\n`--json` emits exactly one `PASS`/`FAIL` JSON value. Exit codes are `0` success,\n`1` validation/operation/cancellation, `2` usage, and `3`\n`MIGRATION_CONFLICT` with path-only diagnostics.\n\nThe embedded template includes a runnable React/Vite/ZMP shell with fixed\nnon-sticky chrome, responsive semantic tokens, React Router, TanStack Query,\nreduced-motion defaults, injectable Zalo/API boundaries, mock-first data, and a\nnarrow non-persistent Zustand notice store. Generated source is project-owned;\nonly declared config, assets, metadata, and `src/generated/**` remain owned by\nthe CLI. The runtime includes strict reward/voucher schemas, catalogue-backed\ndetail, confirmation-first redeem, cursor voucher wallet, safe image fallback,\nURL-owned tabs/dialogs, and scroll-top pull-to-refresh without a live backend.\nIt also includes URL-owned cursor activity history below the member QR, one\nstrict content catalogue, safe structured news/legal rendering, public content\nroutes, HTTP(S)-only external CTA through the platform adapter, and mock API plus\nplatform defaults for credential-free browser development.\n","readmeFilename":"README.md","_rev":"1-ed6ba7a978cdda7e41bb87808586f287"}