后端迁移开发脚本
This commit is contained in:
@@ -6,9 +6,9 @@
|
||||
"scripts": {
|
||||
"browser:install": "playwright install chromium",
|
||||
"browser:install:linux": "playwright install --with-deps chromium",
|
||||
"agiso:auto-delivery:test": "tsx scripts/test-agiso-auto-delivery.js",
|
||||
"cleanup:dev-data": "tsx scripts/cleanup-dev-data.js",
|
||||
"seed:dev-data": "tsx scripts/seed-dev-data.js",
|
||||
"agiso:auto-delivery:test": "tsx scripts/test-agiso-auto-delivery.ts",
|
||||
"cleanup:dev-data": "tsx scripts/cleanup-dev-data.ts",
|
||||
"seed:dev-data": "tsx scripts/seed-dev-data.ts",
|
||||
"build": "tsc -p tsconfig.build.json && rm -rf dist/db/migrations && mkdir -p dist/db && cp -R src/db/migrations dist/db/migrations",
|
||||
"db:migrate": "tsx src/db/migrate.ts",
|
||||
"dev": "tsx watch --clear-screen=false --include config src/index.ts",
|
||||
|
||||
@@ -70,7 +70,7 @@ function parseArgs(argv) {
|
||||
function printHelp() {
|
||||
console.log(`
|
||||
用法:
|
||||
node scripts/cleanup-dev-data.js [--apply]
|
||||
npm run cleanup:dev-data -- [--apply]
|
||||
|
||||
说明:
|
||||
基于当前 PostgreSQL fulfillment schema 清空测试业务数据。
|
||||
@@ -177,7 +177,7 @@ async function ensureSeedBindings() {
|
||||
enabled: true,
|
||||
priority: binding.priority,
|
||||
configJson: JSON.stringify({
|
||||
seededBy: 'scripts/seed-dev-data.js',
|
||||
seededBy: 'scripts/seed-dev-data.ts',
|
||||
scenario: binding.skuCode,
|
||||
}),
|
||||
createdAt: timestamp,
|
||||
@@ -458,7 +458,7 @@ function parseArgs(argv) {
|
||||
function printHelp() {
|
||||
console.log(`
|
||||
用法:
|
||||
node scripts/seed-dev-data.js [--apply] [--reset]
|
||||
npm run seed:dev-data -- [--apply] [--reset]
|
||||
|
||||
说明:
|
||||
基于当前 PostgreSQL fulfillment schema 生成一组可重复验证的开发种子数据。
|
||||
+4
-4
@@ -260,16 +260,16 @@ function printJson(title, value) {
|
||||
|
||||
function printHelp() {
|
||||
process.stdout.write(`用法:
|
||||
node scripts/test-agiso-auto-delivery.js <订单号> [--shop-id <店铺ID>] [--poll 0,3,10]
|
||||
npm run agiso:auto-delivery:test -- <订单号> [--shop-id <店铺ID>] [--poll 0,3,10]
|
||||
|
||||
说明:
|
||||
1. 该脚本只测试正确的发货接口 DummySend。
|
||||
2. 会先查 Order/Detail,再调用 DummySend,再按 poll 秒数轮询发货状态。
|
||||
|
||||
示例:
|
||||
node scripts/test-agiso-auto-delivery.js 4502285714045005830
|
||||
node scripts/test-agiso-auto-delivery.js 4502285714045005830 --poll 0,5,15
|
||||
node scripts/test-agiso-auto-delivery.js 4502285714045005830 --shop-id 2209880145223
|
||||
npm run agiso:auto-delivery:test -- 4502285714045005830
|
||||
npm run agiso:auto-delivery:test -- 4502285714045005830 --poll 0,5,15
|
||||
npm run agiso:auto-delivery:test -- 4502285714045005830 --shop-id 2209880145223
|
||||
`)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user