extension 2.1.3 → 3.0.0-next.7
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/README.md +19 -10
- package/dist/cli-lib/manifest-summary.d.ts +13 -0
- package/dist/cli-lib/messages.d.ts +2 -0
- package/dist/cli-lib/telemetry-cli.d.ts +2 -0
- package/dist/cli-lib/telemetry.d.ts +22 -0
- package/dist/cli.js +730 -136
- package/dist/commands/build.d.ts +2 -0
- package/dist/commands/create.d.ts +2 -0
- package/dist/commands/dev.d.ts +2 -0
- package/dist/commands/preview.d.ts +2 -0
- package/dist/commands/start.d.ts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/utils.d.ts +5 -0
- package/package.json +29 -20
- package/types/polyfill.d.ts +6 -0
- package/dist/cli.d.ts +0 -2
package/README.md
CHANGED
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
[npm-version-url]: https://www.npmjs.com/package/extension
|
|
3
3
|
[action-image]: https://github.com/extension-js/extension.js/actions/workflows/ci.yml/badge.svg?branch=main&color=2ecc40
|
|
4
4
|
[action-url]: https://github.com/extension-js/extension.js/actions
|
|
5
|
-
[coverage-image]: https://img.shields.io/codecov/c/github/extension-js/extension.js?color=2ecc40
|
|
6
|
-
[coverage-url]: https://codecov.io/github/extension-js/extension.js
|
|
7
5
|
[discord-image]: https://img.shields.io/discord/1253608412890271755?label=Discord&logo=discord&style=flat&color=2ecc40
|
|
8
6
|
[discord-url]: https://discord.gg/v9h2RgeTSN
|
|
9
7
|
[snyk-image]: https://snyk.io/test/github/extension-js/extension/badge.svg?color=2ecc40
|
|
@@ -11,7 +9,7 @@
|
|
|
11
9
|
|
|
12
10
|
> The cross-browser extension framework
|
|
13
11
|
|
|
14
|
-
# Extension.js [![Version][npm-version-image]][npm-version-url] [![workflow][action-image]][action-url] [![
|
|
12
|
+
# Extension.js [![Version][npm-version-image]][npm-version-url] [![workflow][action-image]][action-url] [![discord][discord-image]][discord-url]
|
|
15
13
|
|
|
16
14
|
<img alt="Logo" align="right" src="https://avatars.githubusercontent.com/u/172809806" width="15.5%" />
|
|
17
15
|
|
|
@@ -40,11 +38,13 @@ https://github.com/cezaraugusto/extension/assets/4672033/7263d368-99c4-434f-a60a
|
|
|
40
38
|
|
|
41
39
|
<!-- For a preview of extensions running these technologies, see the [templates](https://templates.extension.land) website. -->
|
|
42
40
|
|
|
43
|
-
|
|
44
|
-
| :---------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------: |
|
|
45
|
-
| ESNext<br>latest | TypeScript<br>latest | WASM<br>latest | React<br>18+ | Vue<br>3+ | Svelte<br>5+ | Preact<br>10+ | Angular<br>👋 | Solid<br>👋 |
|
|
41
|
+
<div align="center">
|
|
46
42
|
|
|
47
|
-
|
|
43
|
+
| <img src="https://github.com/cezaraugusto/extension.js/assets/4672033/a9e2541a-96f0-4caa-9fc9-5fc5c3e901c8" width="70"> | <img src="https://github.com/cezaraugusto/extension.js/assets/4672033/b42c5330-9e2a-4045-99c3-1f7d264dfaf4" width="70"> | <img src="https://github.com/cezaraugusto/extension.js/assets/4672033/f19edff3-9005-4f50-b05c-fba615896a7f" width="70"> | <img src="https://github.com/cezaraugusto/extension.js/assets/4672033/ff64721d-d145-4213-930d-e70193f8d57e" width="70"> | <img src="https://github.com/cezaraugusto/extension.js/assets/4672033/15f1314a-aa65-4ce2-a3f3-cf53c4f730cf" width="70"> | <img src="https://github.com/cezaraugusto/extension.js/assets/4672033/de1082fd-7cf6-4202-8c12-a5c3cd3e5b42" width="70"> | <img src="https://github.com/cezaraugusto/extension.js/assets/4672033/8807efd9-93e5-4db5-a1d2-9ac524f7ecc2" width="70"> |
|
|
44
|
+
| :---------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------: |
|
|
45
|
+
| ESNext<br>[Try out](https://templates.extension.land/javascript) | TypeScript<br>[Try out](https://templates.extension.land/typescript) | WASM<br>(soon) | React<br>[Try out](https://templates.extension.land/react) | Vue<br>[Try out](https://templates.extension.land/vue) | Svelte<br>[Try out](https://templates.extension.land/svelte) | Preact<br>[Try out](https://templates.extension.land/preact) |
|
|
46
|
+
|
|
47
|
+
</div>
|
|
48
48
|
|
|
49
49
|
## Get Started Immediately
|
|
50
50
|
|
|
@@ -102,9 +102,9 @@ Done. You are all set!
|
|
|
102
102
|
|
|
103
103
|
## Using a specific browser for development
|
|
104
104
|
|
|
105
|
-
| <img src="https://raw.githubusercontent.com/alrra/browser-logos/main/src/chrome/chrome.svg" width="70"> | <img src="https://raw.githubusercontent.com/alrra/browser-logos/main/src/edge/edge.svg" width="70"> | <img src="https://raw.githubusercontent.com/alrra/browser-logos/main/src/firefox/firefox.svg" width="70"> | <img src="https://raw.githubusercontent.com/alrra/browser-logos/main/src/
|
|
106
|
-
| :-----------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------: |
|
|
107
|
-
| Chrome browser<br>✅ | Edge browser<br>✅ | Firefox browser<br>✅ |
|
|
105
|
+
| <img src="https://raw.githubusercontent.com/alrra/browser-logos/main/src/chrome/chrome.svg" width="70"> | <img src="https://raw.githubusercontent.com/alrra/browser-logos/main/src/edge/edge.svg" width="70"> | <img src="https://raw.githubusercontent.com/alrra/browser-logos/main/src/firefox/firefox.svg" width="70"> | <img src="https://raw.githubusercontent.com/alrra/browser-logos/main/src/safari/safari.svg" width="70"> | <img src="https://raw.githubusercontent.com/alrra/browser-logos/main/src/chromium/chromium.svg" width="70"> | <img src="https://raw.githubusercontent.com/alrra/browser-logos/main/src/firefox/firefox.svg" width="70"> |
|
|
106
|
+
| :-----------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------: |
|
|
107
|
+
| Chrome browser<br>✅ | Edge browser<br>✅ | Firefox browser<br>✅ | Safari browser<br>(soon) | Chromium-based<br>✅ | Gecko-based<br>✅ |
|
|
108
108
|
|
|
109
109
|
### Browser flags and custom binaries
|
|
110
110
|
|
|
@@ -130,6 +130,15 @@ npx extension@latest dev --chromium-binary "/Applications/Google Chrome.app/Cont
|
|
|
130
130
|
npx extension@latest dev --gecko-binary "/Applications/Firefox.app/Contents/MacOS/firefox"
|
|
131
131
|
```
|
|
132
132
|
|
|
133
|
+
<div align="center">
|
|
134
|
+
<p>
|
|
135
|
+
<span style="font-size:21px; color:black;">Browser testing via</span><br>
|
|
136
|
+
<a href="https://www.lambdatest.com/?utm_source=extensionjs&utm_medium=sponsor" target="_blank">
|
|
137
|
+
<img src="https://www.lambdatest.com/blue-logo.png" width="250" height="45" alt="LambdaTest Logo" />
|
|
138
|
+
</a>
|
|
139
|
+
</p>
|
|
140
|
+
</div>
|
|
141
|
+
|
|
133
142
|
## License
|
|
134
143
|
|
|
135
144
|
MIT (c) Cezar Augusto and the Extension.js Authors.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type ManifestSummary = {
|
|
2
|
+
mv: 2 | 3;
|
|
3
|
+
permissions_count: number;
|
|
4
|
+
optional_permissions_count: number;
|
|
5
|
+
host_permissions_count: number;
|
|
6
|
+
uses_all_urls: boolean;
|
|
7
|
+
uses_declarative_net_request: boolean;
|
|
8
|
+
background_type: 'service_worker' | 'event_page' | 'none';
|
|
9
|
+
content_scripts_count: number;
|
|
10
|
+
has_devtools_page: boolean;
|
|
11
|
+
has_action_popup: boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare function summarizeManifest(manifest: any): ManifestSummary;
|
|
@@ -7,4 +7,6 @@ export declare function noURLWithoutStart(argument: string): string;
|
|
|
7
7
|
export declare function notImplemented(argument: string): string;
|
|
8
8
|
export declare function programUserHelp(): string;
|
|
9
9
|
export declare function unsupportedBrowserFlag(value: string, supported: string[]): string;
|
|
10
|
+
export declare function invalidLogsOptionPipe(value: string): string;
|
|
11
|
+
export declare function invalidLogsOptionValue(value: string, allowed: string[]): string;
|
|
10
12
|
export declare function programAIHelp(): string;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
type TelemetryInit = {
|
|
2
|
+
app: string;
|
|
3
|
+
version: string;
|
|
4
|
+
apiKey?: string;
|
|
5
|
+
host?: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare class Telemetry {
|
|
9
|
+
private anonId;
|
|
10
|
+
private common;
|
|
11
|
+
private debug;
|
|
12
|
+
private disabled;
|
|
13
|
+
private apiKey?;
|
|
14
|
+
private host?;
|
|
15
|
+
private buffer;
|
|
16
|
+
private timer;
|
|
17
|
+
constructor(init: TelemetryInit);
|
|
18
|
+
track(event: string, props?: Record<string, unknown>): void;
|
|
19
|
+
flush(): Promise<void>;
|
|
20
|
+
shutdown(): void;
|
|
21
|
+
}
|
|
22
|
+
export {};
|