extension 3.0.0-next.8 → 3.0.0

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.
@@ -0,0 +1,2 @@
1
+ export declare function normalizeSourceOption(source: boolean | string | undefined, startingUrl?: string): string | undefined;
2
+ export declare function parseLogContexts(raw: string | undefined): Array<'background' | 'content' | 'page' | 'sidebar' | 'popup' | 'options' | 'devtools'> | undefined;
package/dist/utils.d.ts CHANGED
@@ -1,5 +1,5 @@
1
+ export declare function resolveModuleEntry(modulePath: string, pkgJson: any): string | undefined;
1
2
  export type Browser = 'chrome' | 'edge' | 'firefox' | 'chromium' | 'chromium-based' | 'gecko-based' | 'firefox-based';
2
3
  export declare function parseOptionalBoolean(value?: string): boolean;
3
- export declare function requireOrDlx(moduleName: string, versionHint?: string): Promise<any>;
4
4
  export declare const vendors: (browser?: Browser | "all") => string[];
5
5
  export declare function validateVendorsOrExit(vendorsList: string[], onInvalid: (invalid: string, supported: string[]) => void): void;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "license": "MIT",
3
3
  "repository": {
4
4
  "type": "git",
5
- "url": "https://github.com/extension-js/extension.js",
5
+ "url": "git+https://github.com/extension-js/extension.js.git",
6
6
  "directory": "programs/cli"
7
7
  },
8
8
  "engines": {
@@ -35,9 +35,12 @@
35
35
  "extension": "./dist/cli.js"
36
36
  },
37
37
  "name": "extension",
38
- "version": "3.0.0-next.8",
38
+ "version": "3.0.0",
39
39
  "description": "Create cross-browser extensions with no build configuration.",
40
40
  "homepage": "https://extension.js.org/",
41
+ "bugs": {
42
+ "url": "https://github.com/extension-js/extension.js/issues"
43
+ },
41
44
  "author": {
42
45
  "name": "Cezar Augusto",
43
46
  "email": "boss@cezaraugusto.net",
@@ -45,12 +48,10 @@
45
48
  },
46
49
  "publishConfig": {
47
50
  "access": "public",
48
- "registry": "https://registry.npmjs.org",
49
- "tag": "latest"
51
+ "registry": "https://registry.npmjs.org"
50
52
  },
51
53
  "scripts": {
52
- "prepare": "rslib build >/dev/null 2>&1 || true",
53
- "postinstall": "rslib build >/dev/null 2>&1 || true",
54
+ "prepublishOnly": "pnpm run compile",
54
55
  "compile": "rslib build",
55
56
  "watch": "rslib build --watch",
56
57
  "test": "vitest run"
@@ -87,6 +88,7 @@
87
88
  "cli"
88
89
  ],
89
90
  "dependencies": {
91
+ "extension-develop": "^3.0.0",
90
92
  "commander": "^12.1.0",
91
93
  "extension-create": "^2.2.0",
92
94
  "pintor": "0.3.0",
@@ -1,3 +1,11 @@
1
+ // ██████╗██╗ ██╗
2
+ // ██╔════╝██║ ██║
3
+ // ██║ ██║ ██║
4
+ // ██║ ██║ ██║
5
+ // ╚██████╗███████╗██║
6
+ // ╚═════╝╚══════╝╚═╝
7
+ // MIT License (c) 2020–present Cezar Augusto & the Extension.js authors — presence implies inheritance
8
+
1
9
  type CSSContentData = Readonly<Record<string, string>>
2
10
 
3
11
  declare module '*.css' {
@@ -1,3 +1,11 @@
1
+ // ██████╗██╗ ██╗
2
+ // ██╔════╝██║ ██║
3
+ // ██║ ██║ ██║
4
+ // ██║ ██║ ██║
5
+ // ╚██████╗███████╗██║
6
+ // ╚═════╝╚══════╝╚═╝
7
+ // MIT License (c) 2020–present Cezar Augusto & the Extension.js authors — presence implies inheritance
8
+
1
9
  type CSSModuleData = Readonly<Record<string, string>>
2
10
 
3
11
  declare module '*.module.css' {
@@ -0,0 +1,85 @@
1
+ // ██████╗██╗ ██╗
2
+ // ██╔════╝██║ ██║
3
+ // ██║ ██║ ██║
4
+ // ██║ ██║ ██║
5
+ // ╚██████╗███████╗██║
6
+ // ╚═════╝╚══════╝╚═╝
7
+ // MIT License (c) 2020–present Cezar Augusto & the Extension.js authors — presence implies inheritance
8
+
9
+ declare module 'extension-develop' {
10
+ // These types mirror the public surface of programs/develop/module.ts,
11
+ // but are intentionally loose on the CLI side. The real, precise types
12
+ // come from the installed `extension-develop` package when consumers
13
+ // depend on it directly.
14
+
15
+ export type ExtensionBrowser =
16
+ | 'chrome'
17
+ | 'edge'
18
+ | 'firefox'
19
+ | 'chromium'
20
+ | 'chromium-based'
21
+ | 'gecko-based'
22
+ | 'firefox-based'
23
+
24
+ export type ExtensionMode = 'development' | 'production'
25
+
26
+ export interface BuildOptions {
27
+ browser?: ExtensionBrowser | 'all'
28
+ polyfill?: boolean
29
+ zip?: boolean
30
+ zipSource?: boolean
31
+ zipFilename?: string
32
+ silent?: boolean
33
+ }
34
+
35
+ export interface DevOptions {
36
+ browser?: ExtensionBrowser | 'all'
37
+ profile?: string | boolean
38
+ persistProfile?: boolean
39
+ chromiumBinary?: string
40
+ geckoBinary?: string
41
+ polyfill?: boolean | string
42
+ open?: boolean
43
+ startingUrl?: string
44
+ source?: boolean | string
45
+ watchSource?: boolean
46
+ logLevel?: string
47
+ logFormat?: 'pretty' | 'json'
48
+ logTimestamps?: boolean
49
+ logColor?: boolean
50
+ logUrl?: string
51
+ logTab?: string | number
52
+ }
53
+
54
+ export interface PreviewOptions extends DevOptions {}
55
+
56
+ export interface StartOptions extends DevOptions {}
57
+
58
+ export interface FileConfig {
59
+ [key: string]: unknown
60
+ }
61
+
62
+ export interface Manifest {
63
+ [key: string]: unknown
64
+ }
65
+
66
+ export function extensionBuild(
67
+ pathOrRemoteUrl: string,
68
+ options: BuildOptions
69
+ ): Promise<any>
70
+
71
+ export function extensionDev(
72
+ pathOrRemoteUrl: string,
73
+ options: DevOptions
74
+ ): Promise<any>
75
+
76
+ export function extensionStart(
77
+ pathOrRemoteUrl: string,
78
+ options: StartOptions
79
+ ): Promise<any>
80
+
81
+ export function extensionPreview(
82
+ pathOrRemoteUrl: string,
83
+ options: PreviewOptions
84
+ ): Promise<any>
85
+ }
package/types/images.d.ts CHANGED
@@ -1,3 +1,11 @@
1
+ // ██████╗██╗ ██╗
2
+ // ██╔════╝██║ ██║
3
+ // ██║ ██║ ██║
4
+ // ██║ ██║ ██║
5
+ // ╚██████╗███████╗██║
6
+ // ╚═════╝╚══════╝╚═╝
7
+ // MIT License (c) 2020–present Cezar Augusto & the Extension.js authors — presence implies inheritance
8
+
1
9
  declare module '*.png' {
2
10
  const content: string
3
11
 
package/types/index.d.ts CHANGED
@@ -1,3 +1,11 @@
1
+ // ██████╗██╗ ██╗
2
+ // ██╔════╝██║ ██║
3
+ // ██║ ██║ ██║
4
+ // ██║ ██║ ██║
5
+ // ╚██████╗███████╗██║
6
+ // ╚═════╝╚══════╝╚═╝
7
+ // MIT License (c) 2020–present Cezar Augusto & the Extension.js authors — presence implies inheritance
8
+
1
9
  /// <reference types="node" />
2
10
  /// <reference types="chrome" />
3
11
  /// <reference types="./js-frameworks.d.ts" />
@@ -20,8 +28,7 @@ interface ExtensionEnv {
20
28
  EXTENSION_PUBLIC_BROWSER: ExtensionBrowser
21
29
  EXTENSION_PUBLIC_MODE: ExtensionMode
22
30
  EXTENSION_PUBLIC_DESCRIPTION_TEXT: string
23
- EXTENSION_PUBLIC_OPENAI_API_KEY: string
24
- EXTENSION_ENV: ExtensionMode
31
+ EXTENSION_PUBLIC_LLM_API_KEY: string
25
32
  EXTENSION_AUTHOR_MODE: string
26
33
  EXTENSION_PUBLIC_AUTHOR_MODE: string
27
34
  }
package/types/index.ts CHANGED
@@ -1,3 +1,11 @@
1
+ // ██████╗██╗ ██╗
2
+ // ██╔════╝██║ ██║
3
+ // ██║ ██║ ██║
4
+ // ██║ ██║ ██║
5
+ // ╚██████╗███████╗██║
6
+ // ╚═════╝╚══════╝╚═╝
7
+ // MIT License (c) 2020–present Cezar Augusto & the Extension.js authors — presence implies inheritance
8
+
1
9
  /// <reference types="node" />
2
10
  /// <reference types="react" />
3
11
  /// <reference types="react-dom" />
@@ -1,3 +1,11 @@
1
+ // ██████╗██╗ ██╗
2
+ // ██╔════╝██║ ██║
3
+ // ██║ ██║ ██║
4
+ // ██║ ██║ ██║
5
+ // ╚██████╗███████╗██║
6
+ // ╚═════╝╚══════╝╚═╝
7
+ // MIT License (c) 2020–present Cezar Augusto & the Extension.js authors — presence implies inheritance
8
+
1
9
  /// <reference types="react" />
2
10
  /// <reference types="react-dom" />
3
11
  /// <reference types="svelte" />
@@ -1,3 +1,11 @@
1
+ // ██████╗██╗ ██╗
2
+ // ██╔════╝██║ ██║
3
+ // ██║ ██║ ██║
4
+ // ██║ ██║ ██║
5
+ // ╚██████╗███████╗██║
6
+ // ╚═════╝╚══════╝╚═╝
7
+ // MIT License (c) 2020–present Cezar Augusto & the Extension.js authors — presence implies inheritance
8
+
1
9
  /// <reference types="webextension-polyfill" />
2
10
 
3
11
  declare global {