Skip to content

Commit deba97d

Browse files
fix: createVersion extId styling, upload timeout (#100)
* fix: revert extId brackets for v5 api support * fix: increase timeout to mozilla's recommendations https://blog.mozilla.org/addons/2022/03/17/new-api-for-submitting-and-updating-add-ons/#:~:text=Uploading%20the%20add%2Don%20file
1 parent e40146c commit deba97d

File tree

1 file changed

+2
-17
lines changed

1 file changed

+2
-17
lines changed

src/index.ts

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -120,21 +120,6 @@ export class MozillaAddonsAPI {
120120

121121
this.options = { ...options }
122122

123-
// Make sure it's not an email-based extID
124-
if (
125-
typeof this.options.extId === "string" &&
126-
this.options.extId.length > 0 &&
127-
!this.options.extId.includes("@")
128-
) {
129-
if (!this.options.extId.startsWith("{")) {
130-
this.options.extId = "{" + options.extId
131-
}
132-
133-
if (!this.options.extId.endsWith("}")) {
134-
this.options.extId += "}"
135-
}
136-
}
137-
138123
this.options.channel = options.channel || "listed"
139124

140125
if (this.options.license === "inherit") {
@@ -163,8 +148,8 @@ export class MozillaAddonsAPI {
163148
})
164149
return uploadStatus.valid
165150
},
166-
8,
167-
5000
151+
60,
152+
10000 // 10 min timeout recommended by mozilla
168153
)
169154

170155
// Wait for upload to be validated

0 commit comments

Comments
 (0)