处理编译大量warning问题 (#503)
Project CI / AI game creator shell Rust crates (push) Successful in 1m11s
Project CI / AI game creator shell Rust smoke (push) Successful in 1m34s
Project CI / Backend tests (push) Successful in 4m46s
Project CI / AI game creator shell Rust lane 2/2 (push) Successful in 8m31s
Project CI / AI game creator shell Rust lane 1/2 (push) Successful in 9m41s
Project CI / Frontend tests (push) Successful in 2m19s
Project CI / Native shell tests (push) Successful in 7m5s
Project CI / AI game creator shell web tests (push) Successful in 1m54s
Project CI / Repository checks (push) Successful in 2m36s

Reviewed-on: https://git.genarrative.world/git/GenarrativeAI/Genarrative/pulls/503
Co-authored-by: Linghong <ink29535@proton.me>
Co-committed-by: Linghong <ink29535@proton.me>
This commit was merged in pull request #503.
This commit is contained in:
2026-09-24 13:01:31 +08:00
committed by 孔令弘
parent dcb4f2a1c1
commit ec3a187dd7
149 changed files with 918 additions and 7145 deletions
@@ -1,5 +1,7 @@
import { spawnSync } from 'node:child_process';
import fs from 'node:fs';
import { createRequire } from 'node:module';
import { dirname, resolve } from 'node:path';
const shellRoot = new URL('../', import.meta.url);
const easConfigPath = new URL('eas.json', shellRoot);
@@ -7,7 +9,10 @@ const packagePath = new URL('package.json', shellRoot);
const easConfig = JSON.parse(fs.readFileSync(easConfigPath, 'utf8'));
const packageConfig = JSON.parse(fs.readFileSync(packagePath, 'utf8'));
const npmCommand = process.platform === 'win32' ? 'npm.cmd' : 'npm';
const shellRequire = createRequire(packagePath);
const easPackagePath = shellRequire.resolve('eas-cli/package.json');
const easPackage = JSON.parse(fs.readFileSync(easPackagePath, 'utf8'));
const easCliPath = resolve(dirname(easPackagePath), easPackage.bin.eas);
const androidBuildOutputPath =
'../../build/native/mobile/genarrative-mobile-android.apk';
const iosSimulatorBuildOutputPath =
@@ -43,8 +48,8 @@ if (packageConfig.devDependencies?.['eas-cli'] !== '^20.3.0') {
}
const easVersionResult = spawnSync(
npmCommand,
['exec', 'eas', '--', '--version'],
process.execPath,
[easCliPath, '--version'],
{
cwd: shellRoot,
encoding: 'utf8',
@@ -29,11 +29,13 @@ const expoPrivacyInfoPluginSource = fs.readFileSync(
'utf8',
);
const sharedContractSource = fs.readFileSync(sharedContractPath, 'utf8');
const npmCommand = process.platform === 'win32' ? 'npm.cmd' : 'npm';
const expoPackagePath = shellRequire.resolve('expo/package.json');
const expoPackage = JSON.parse(fs.readFileSync(expoPackagePath, 'utf8'));
const expoCliPath = resolve(dirname(expoPackagePath), expoPackage.bin.expo);
const result = spawnSync(
npmCommand,
['exec', 'expo', 'config', '--', '--type', 'public', '--json'],
process.execPath,
[expoCliPath, 'config', '--type', 'public', '--json'],
{
cwd: shellRoot,
encoding: 'utf8',
@@ -1,5 +1,7 @@
import { spawnSync } from 'node:child_process';
import fs from 'node:fs';
import { createRequire } from 'node:module';
import { dirname, resolve } from 'node:path';
const shellRoot = new URL('../', import.meta.url);
const outputRoot = new URL('../.expo-export-smoke/', import.meta.url);
@@ -7,7 +9,10 @@ const hostBridgeContractUrl = new URL(
'../../../packages/shared/src/contracts/hostBridge.ts',
import.meta.url,
);
const npmCommand = process.platform === 'win32' ? 'npm.cmd' : 'npm';
const shellRequire = createRequire(new URL('package.json', shellRoot));
const expoPackagePath = shellRequire.resolve('expo/package.json');
const expoPackage = JSON.parse(fs.readFileSync(expoPackagePath, 'utf8'));
const expoCliPath = resolve(dirname(expoPackagePath), expoPackage.bin.expo);
const platforms = ['android', 'ios'];
const blockedDevelopmentWebUrlPatterns = [
/http:\\?\/\\?\/localhost(?::\d+)?/u,
@@ -51,17 +56,8 @@ const requiredNativeHostContextTokens = [
function runExpoExport(platform) {
const outputDir = `.expo-export-smoke/${platform}`;
const result = spawnSync(
npmCommand,
[
'exec',
'expo',
'export',
'--',
'--platform',
platform,
'--output-dir',
outputDir,
],
process.execPath,
[expoCliPath, 'export', '--platform', platform, '--output-dir', outputDir],
{
cwd: shellRoot,
encoding: 'utf8',