Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Example/harmony_use_pushy/harmony/entry/hvigorfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ export function generatePushyBuildTime(str?: string) {
if (!fs.existsSync(dirPath)) {
fs.mkdirSync(dirPath, { recursive: true });
}
const moduleJsonPath = path.resolve(__dirname, './oh-package.json5');
const moduleJsonPath = path.resolve(__dirname, '../AppScope/app.json5');
let versionName = '';
if (fs.existsSync(moduleJsonPath)) {
const moduleContent = fs.readFileSync(moduleJsonPath, 'utf-8');
const versionMatch = moduleContent.match(/"version":\s*"([^"]+)"/);
const versionMatch = moduleContent.match(/"versionName":\s*"([^"]+)"/);
if (versionMatch && versionMatch[1]) {
versionName = versionMatch[1];
}
Expand Down
5 changes: 4 additions & 1 deletion src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,10 @@
// @ts-ignore
delete fetchBody.buildTime;
}
const body = JSON.stringify(fetchBody);
let body = JSON.stringify(fetchBody);
if (Platform.OS === 'harmony') {

Check failure on line 209 in src/client.ts

View workflow job for this annotation

GitHub Actions / lint (20.x)

This comparison appears to be unintentional because the types '"ios" | "android" | "windows" | "macos"' and '"harmony"' have no overlap.
body = fetchBody;

Check failure on line 210 in src/client.ts

View workflow job for this annotation

GitHub Actions / lint (20.x)

Type '{ packageVersion: string; hash: string; buildTime: string; cInfo: { pushy: any; rn: string; os: string; uuid: any; }; }' is not assignable to type 'string'.
}
const fetchPayload = {
method: 'POST',
headers: {
Expand Down
Loading