Skip to content

Commit 78f72ec

Browse files
authored
Staging->dev backport (#79)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> - Updated `.claude/settings.json` to allow a few additional `Bash(...)` commands, including `vue-tsc`, `git add`, and the `@sentry/nuxt` version check. - Removed the README’s TODO note about eliminating `any` typing. - Adjusted `services/rapid.ts` to add logging around Rapid loading, editor change handling, and uploader success events, while also changing the stable change flow to calculate a combined change count before notifying state updates. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2 parents ee0fdd0 + f7d355e commit 78f72ec

3 files changed

Lines changed: 11 additions & 13 deletions

File tree

.claude/settings.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
"Bash(npm ls *)",
55
"Bash(node -e \"const e=require\\('./node_modules/vue-router/package.json'\\).exports; console.log\\(JSON.stringify\\(Object.keys\\(e\\)\\)\\)\")",
66
"Bash(node -e \"console.log\\(require\\('./node_modules/vue-router/package.json'\\).version\\)\")",
7-
"Bash(node -e \"console.log\\(require\\('./node_modules/@sentry/nuxt/package.json'\\).version\\)\")"
7+
"Bash(node -e \"console.log\\(require\\('./node_modules/@sentry/nuxt/package.json'\\).version\\)\")",
8+
"Bash(npx vue-tsc *)",
9+
"Bash(git add *)"
810
]
911
}
1012
}

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introdu
66

77
### Note: The new workflow enabled creates the tags once the PR is merged to develop, stage or production
88

9-
# TODOs
10-
* Remove "any" typing, currently ignored by linter/tsc
11-
129
## Dev Setup
1310

1411
```zsh

services/rapid.ts

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export class RapidManager {
3939
this.#stateCallback(state);
4040
}
4141
}
42+
4243
onUploadResult(callback: (result: any) => void) {
4344
this.#uploadCallback = callback;
4445
}
@@ -49,7 +50,6 @@ export class RapidManager {
4950
}
5051
}
5152

52-
5353
load() {
5454
if (this.loaded.value) {
5555
return
@@ -97,9 +97,7 @@ export class RapidManager {
9797
this.rapidContext.containerNode = this.containerNode;
9898
this.rapidContext.assetPath = this.#baseUrl;
9999

100-
101100
console.log('Rapid loaded', this.rapidContext);
102-
103101
}
104102

105103
#patchRapid() {
@@ -110,22 +108,23 @@ export class RapidManager {
110108
rapidOsmClient.authenticated = () => this.#tdeiAuth.ok;
111109

112110
// Don't bother to fetch user details when uploading changesets:
113-
rapidOsmService.userDetails = (callback) => { callback('dummy error') };
114-
// const editor = this.rapidContext.editor;
115-
// console.info('Rapid editor', editor);
111+
rapidOsmService.userDetails = (callback: (error: string) => void) => {
112+
callback('dummy error')
113+
};
114+
116115
console.log('Rapid editor ', this.rapidContext);
117116
const editSystem = this.rapidContext.systems.editor;
118-
editSystem.on('stablechange', (state) => {
117+
editSystem.on('stablechange', (state: any) => {
119118
// this.#notifyStateChange(state);
120119
const changes = editSystem.changes();
121120
console.log('Rapid editor changes', changes);
122121
const changesLength = changes.modified.length || changes.created.length || changes.deleted.length;
123122

124123
this.#notifyStateChange(changesLength);
125-
126124
});
125+
127126
const uploader = this.rapidContext.systems.uploader;
128-
uploader.on('resultSuccess', (result) => {
127+
uploader.on('resultSuccess', (result: any) => {
129128
console.log('Rapid uploader resultSuccess', result);
130129
this.#notifyUploadResult(result);
131130
});

0 commit comments

Comments
 (0)