The AFK half of the wayfinder ticket "Seed the dev store from the live catalogue". Products, metafields and images still come from the CSV export — the CSV re-hosts images for free — but collection membership cannot: the Collection column is import-only, takes one collection per product, and this catalogue runs 1.6 memberships per product across 16 collections. - scripts/seed-dev-store.mjs (`npm run seed:dev-store`): creates each missing collection with its members in one call and publishes it. Uses CollectionCreateInput.sources because collectionAddProducts is deprecated at 2026-10, and publishes because collectionCreate leaves a collection unpublished — invisible to the Storefront API the dev store exists to serve. Idempotent, never deletes, reports handles it cannot find (which is how a partial CSV import shows up), and is a dry run unless given --apply. - assets/dev-store-seed.json: the baseline the seed is checked against and the membership map it consumes — 61 products with option values, weights and product types, 16 collections with 100 memberships, and the 10 metafield definitions that must exist before the import. - The ticket now records what the probes settled: the option shape is readable from the Storefront API (all 61 use Option1 name=Title; 22 are `Default Title`, 39 carry real values, so the import must not normalise), and the repo's production credentials are Storefront-scoped only — `products`, `collections` and `productsCount` are Access denied without read_products — so the ticket's "Admin API script using the credentials the repo already mints" was never available. A dev-store custom app is required instead.
50 lines
1.8 KiB
JSON
50 lines
1.8 KiB
JSON
{
|
|
"name": "mozimo",
|
|
"version": "0.2.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"engines": {
|
|
"node": ">=24.0.0"
|
|
},
|
|
"scripts": {
|
|
"dev": "node --env-file-if-exists=.env node_modules/vite/bin/vite.js dev",
|
|
"build": "vite build && node scripts/generate-sitemap.mjs",
|
|
"start": "node --env-file-if-exists=.env server.mjs",
|
|
"preview": "vite preview --host 0.0.0.0",
|
|
"lint": "eslint . && prettier --check .",
|
|
"format": "prettier --write .",
|
|
"pb": "bash -c 'if [ ! -f .pb/pocketbase ]; then mkdir -p .pb && curl -sL -o .pb/pb.zip https://github.com/pocketbase/pocketbase/releases/download/v0.40.2/pocketbase_0.40.2_linux_amd64.zip && (cd .pb && unzip -o -q pb.zip pocketbase && rm pb.zip); fi; cd .pb && ./pocketbase serve --http=127.0.0.1:8090 --dir=./pb_data'",
|
|
"seed": "node --env-file-if-exists=.env scripts/pb-seed.mjs",
|
|
"seed:dev-store": "node --env-file-if-exists=.env scripts/seed-dev-store.mjs"
|
|
},
|
|
"dependencies": {
|
|
"@sentry/tanstackstart-react": "^10.73.0",
|
|
"@tanstack/react-router": "^1.168.3",
|
|
"@tanstack/react-start": "^1.167.5",
|
|
"react": "^19.1.0",
|
|
"react-dom": "^19.1.0",
|
|
"web-vitals": "^6.2.1"
|
|
},
|
|
"devDependencies": {
|
|
"@eslint/js": "^10.0.1",
|
|
"@svgr/webpack": "^8.1.0",
|
|
"@tailwindcss/vite": "^4.2.2",
|
|
"@tanstack/eslint-plugin-router": "^1.162.0",
|
|
"@types/node": "^25.5.0",
|
|
"@types/react": "^19",
|
|
"@types/react-dom": "^19",
|
|
"@vitejs/plugin-react": "^6.0.1",
|
|
"autoprefixer": "^10.4.21",
|
|
"eslint": "^10.1.0",
|
|
"eslint-config-prettier": "^10.1.8",
|
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
"eslint-plugin-react-refresh": "^0.5.6",
|
|
"globals": "^17.12.0",
|
|
"prettier": "^3.9.6",
|
|
"tailwindcss": "^4.2.2",
|
|
"typescript": "^6.0.2",
|
|
"typescript-eslint": "^8.69.0",
|
|
"vite": "^8.0.2"
|
|
}
|
|
}
|