@@ -18,7 +18,7 @@ const bundledNodePath = path.join(
|
||||
const runtimeNodePath = fs.existsSync(bundledNodePath)
|
||||
? bundledNodePath
|
||||
: process.execPath;
|
||||
const serverBuildPath = path.join(repoRoot, 'server-node', 'dist', 'server.js');
|
||||
const serverBuildPath = path.join(repoRoot, 'server-node', 'dist', 'server.cjs');
|
||||
const webBuildPath = path.join(repoRoot, 'dist', 'index.html');
|
||||
const publicRoot = path.join(repoRoot, 'public');
|
||||
const proxyPort = 18080;
|
||||
@@ -34,7 +34,7 @@ type ManagedChild = {
|
||||
function assertBuildArtifacts() {
|
||||
if (!fs.existsSync(serverBuildPath)) {
|
||||
throw new Error(
|
||||
'server-node/dist/server.js 不存在,请先运行 npm run server-node:build',
|
||||
'server-node/dist/server.cjs 不存在,请先运行 npm run server-node:build',
|
||||
);
|
||||
}
|
||||
|
||||
@@ -399,7 +399,7 @@ async function main() {
|
||||
assert.equal(saveResponse.status, 200);
|
||||
assert.equal(savePayload.ok, true);
|
||||
assert.equal(savePayload.data.gameState.chapter, 2);
|
||||
assert.equal(savePayload.meta.operation, 'PUT /api/runtime/save/snapshot');
|
||||
assert.equal(savePayload.meta.operation, 'runtime.snapshot.put');
|
||||
assert.ok(savePayload.meta.requestId);
|
||||
console.log('[smoke:proxy] proxied runtime save ok');
|
||||
|
||||
|
||||
@@ -40,6 +40,59 @@ function createSmokeConfig(): AppConfig {
|
||||
imageModel: 'test-image-model',
|
||||
requestTimeoutMs: 1000,
|
||||
},
|
||||
smsAuth: {
|
||||
enabled: true,
|
||||
provider: 'mock',
|
||||
endpoint: 'dypnsapi.aliyuncs.com',
|
||||
accessKeyId: '',
|
||||
accessKeySecret: '',
|
||||
signName: 'Test Sign',
|
||||
templateCode: '100001',
|
||||
templateParamKey: 'code',
|
||||
countryCode: '86',
|
||||
schemeName: '',
|
||||
codeLength: 6,
|
||||
codeType: 1,
|
||||
validTimeSeconds: 300,
|
||||
intervalSeconds: 60,
|
||||
duplicatePolicy: 1,
|
||||
caseAuthPolicy: 1,
|
||||
returnVerifyCode: false,
|
||||
mockVerifyCode: '123456',
|
||||
maxSendPerPhonePerDay: 20,
|
||||
maxSendPerIpPerHour: 30,
|
||||
maxVerifyFailuresPerPhonePerHour: 12,
|
||||
maxVerifyFailuresPerIpPerHour: 24,
|
||||
captchaTtlSeconds: 180,
|
||||
captchaTriggerVerifyFailuresPerPhone: 3,
|
||||
captchaTriggerVerifyFailuresPerIp: 5,
|
||||
blockPhoneFailureThreshold: 6,
|
||||
blockIpFailureThreshold: 10,
|
||||
blockPhoneDurationMinutes: 30,
|
||||
blockIpDurationMinutes: 30,
|
||||
},
|
||||
wechatAuth: {
|
||||
enabled: true,
|
||||
provider: 'mock',
|
||||
appId: '',
|
||||
appSecret: '',
|
||||
authorizeEndpoint: 'https://open.weixin.qq.com/connect/qrconnect',
|
||||
accessTokenEndpoint: 'https://api.weixin.qq.com/sns/oauth2/access_token',
|
||||
userInfoEndpoint: 'https://api.weixin.qq.com/sns/userinfo',
|
||||
callbackPath: '/api/auth/wechat/callback',
|
||||
defaultRedirectPath: '/',
|
||||
mockUserId: 'mock_wechat_user',
|
||||
mockUnionId: 'mock_wechat_union',
|
||||
mockDisplayName: '微信旅人',
|
||||
mockAvatarUrl: '',
|
||||
},
|
||||
authSession: {
|
||||
refreshCookieName: 'genarrative_refresh_session',
|
||||
refreshSessionTtlDays: 30,
|
||||
refreshCookieSecure: false,
|
||||
refreshCookieSameSite: 'Lax',
|
||||
refreshCookiePath: '/api/auth',
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user