@equicord/publish-browser-extension 4.0.1 → 4.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -1,10 +1,10 @@
1
- import { d as chromeStatus, n as submit, t as init, u as chromeSetDeployPercentage } from "./init-CL9ikrQH.js";
1
+ import { d as chromeStatus, n as submit, t as init, u as chromeSetDeployPercentage } from "./init-DY8IxpMl.js";
2
2
  import { cac } from "cac";
3
3
  import { consola as consola$1 } from "consola";
4
4
  import { config } from "dotenv";
5
5
 
6
6
  //#region package.json
7
- var version = "4.0.1";
7
+ var version = "4.0.2";
8
8
 
9
9
  //#endregion
10
10
  //#region src/cli.ts
package/dist/index.d.ts CHANGED
@@ -203,6 +203,12 @@ declare class FirefoxAddonStore implements Store {
203
203
  ensureZipsExist(): Promise<void>;
204
204
  submit(dryRun?: boolean): Promise<void>;
205
205
  private uploadAndPollValidation;
206
+ /**
207
+ * Ensure the extension id is wrapped in curly braces, that's what the addon store API is expecting
208
+ * @example
209
+ * "test" -> "{test}"
210
+ */
211
+ private get wrappedExtensionId();
206
212
  }
207
213
  //#endregion
208
214
  //#region src/edge/edge-api.d.ts
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- import { a as FirefoxAddonStoreOptions, c as EdgeAddonStoreOptions, d as chromeStatus, f as ChromeWebStore, i as FirefoxAddonStore, l as EdgeApi, m as CwsApi, n as submit, o as AddonsApi, p as ChromeWebStoreOptions, r as InlineConfig, s as EdgeAddonStore, t as init, u as chromeSetDeployPercentage } from "./init-CL9ikrQH.js";
1
+ import { a as FirefoxAddonStoreOptions, c as EdgeAddonStoreOptions, d as chromeStatus, f as ChromeWebStore, i as FirefoxAddonStore, l as EdgeApi, m as CwsApi, n as submit, o as AddonsApi, p as ChromeWebStoreOptions, r as InlineConfig, s as EdgeAddonStore, t as init, u as chromeSetDeployPercentage } from "./init-DY8IxpMl.js";
2
2
 
3
3
  export { AddonsApi, ChromeWebStore, ChromeWebStoreOptions, CwsApi, EdgeAddonStore, EdgeAddonStoreOptions, EdgeApi, FirefoxAddonStore, FirefoxAddonStoreOptions, InlineConfig, chromeSetDeployPercentage, chromeStatus, init, submit };
@@ -3926,7 +3926,7 @@ var FirefoxAddonStore = class {
3926
3926
  }
3927
3927
  async submit(dryRun) {
3928
3928
  this.setStatus("Getting addon details");
3929
- const addon = await this.api.details({ extensionId: this.options.extensionId });
3929
+ const addon = await this.api.details({ extensionId: this.wrappedExtensionId });
3930
3930
  if (dryRun) {
3931
3931
  this.setStatus("DRY RUN: Skipped upload and publishing");
3932
3932
  return;
@@ -3934,7 +3934,7 @@ var FirefoxAddonStore = class {
3934
3934
  const upload = await withTimeout(this.uploadAndPollValidation(5e3), 10 * 6e4);
3935
3935
  this.setStatus("Submitting new version");
3936
3936
  const version = await this.api.versionCreate({
3937
- extensionId: this.options.extensionId,
3937
+ extensionId: this.wrappedExtensionId,
3938
3938
  sourceFile: this.options.sourcesZip,
3939
3939
  uploadUuid: upload.uuid
3940
3940
  });
@@ -3957,6 +3957,18 @@ var FirefoxAddonStore = class {
3957
3957
  }
3958
3958
  return details;
3959
3959
  }
3960
+ /**
3961
+ * Ensure the extension id is wrapped in curly braces, that's what the addon store API is expecting
3962
+ * @example
3963
+ * "test" -> "{test}"
3964
+ */
3965
+ get wrappedExtensionId() {
3966
+ let id = this.options.extensionId;
3967
+ if (id.includes("@")) return id;
3968
+ if (!id.startsWith("{")) id = "{" + id;
3969
+ if (!id.endsWith("}")) id += "}";
3970
+ return id;
3971
+ }
3960
3972
  };
3961
3973
 
3962
3974
  //#endregion
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@equicord/publish-browser-extension",
3
3
  "description": "Easily publish web extensions to their stores",
4
- "version": "4.0.1",
4
+ "version": "4.0.2",
5
5
  "packageManager": "bun@1.3.4",
6
6
  "type": "module",
7
7
  "scripts": {