extension 3.0.0-next.6 → 3.0.0-next.62
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-lib/messages.d.ts +9 -0
- package/dist/cli.js +609 -653
- package/dist/utils.d.ts +1 -1
- package/package.json +5 -6
- package/types/extension-develop-shim.d.ts +77 -0
- package/types/index.d.ts +2 -1
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,7 +35,7 @@
|
|
|
35
35
|
"extension": "./dist/cli.js"
|
|
36
36
|
},
|
|
37
37
|
"name": "extension",
|
|
38
|
-
"version": "3.0.0-next.
|
|
38
|
+
"version": "3.0.0-next.62",
|
|
39
39
|
"description": "Create cross-browser extensions with no build configuration.",
|
|
40
40
|
"homepage": "https://extension.js.org/",
|
|
41
41
|
"author": {
|
|
@@ -45,12 +45,10 @@
|
|
|
45
45
|
},
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public",
|
|
48
|
-
"registry": "https://registry.npmjs.org"
|
|
49
|
-
"tag": "latest"
|
|
48
|
+
"registry": "https://registry.npmjs.org"
|
|
50
49
|
},
|
|
51
50
|
"scripts": {
|
|
52
|
-
"
|
|
53
|
-
"postinstall": "rslib build >/dev/null 2>&1 || true",
|
|
51
|
+
"prepublishOnly": "pnpm run compile",
|
|
54
52
|
"compile": "rslib build",
|
|
55
53
|
"watch": "rslib build --watch",
|
|
56
54
|
"test": "vitest run"
|
|
@@ -87,6 +85,7 @@
|
|
|
87
85
|
"cli"
|
|
88
86
|
],
|
|
89
87
|
"dependencies": {
|
|
88
|
+
"extension-develop": "^3.0.0-next.62",
|
|
90
89
|
"commander": "^12.1.0",
|
|
91
90
|
"extension-create": "^2.2.0",
|
|
92
91
|
"pintor": "0.3.0",
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
declare module 'extension-develop' {
|
|
2
|
+
// These types mirror the public surface of programs/develop/module.ts,
|
|
3
|
+
// but are intentionally loose on the CLI side. The real, precise types
|
|
4
|
+
// come from the installed `extension-develop` package when consumers
|
|
5
|
+
// depend on it directly.
|
|
6
|
+
|
|
7
|
+
export type ExtensionBrowser =
|
|
8
|
+
| 'chrome'
|
|
9
|
+
| 'edge'
|
|
10
|
+
| 'firefox'
|
|
11
|
+
| 'chromium'
|
|
12
|
+
| 'chromium-based'
|
|
13
|
+
| 'gecko-based'
|
|
14
|
+
| 'firefox-based'
|
|
15
|
+
|
|
16
|
+
export type ExtensionMode = 'development' | 'production'
|
|
17
|
+
|
|
18
|
+
export interface BuildOptions {
|
|
19
|
+
browser?: ExtensionBrowser | 'all'
|
|
20
|
+
polyfill?: boolean
|
|
21
|
+
zip?: boolean
|
|
22
|
+
zipSource?: boolean
|
|
23
|
+
zipFilename?: string
|
|
24
|
+
silent?: boolean
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface DevOptions {
|
|
28
|
+
browser?: ExtensionBrowser | 'all'
|
|
29
|
+
profile?: string | boolean
|
|
30
|
+
persistProfile?: boolean
|
|
31
|
+
chromiumBinary?: string
|
|
32
|
+
geckoBinary?: string
|
|
33
|
+
polyfill?: boolean | string
|
|
34
|
+
open?: boolean
|
|
35
|
+
startingUrl?: string
|
|
36
|
+
source?: boolean | string
|
|
37
|
+
watchSource?: boolean
|
|
38
|
+
logLevel?: string
|
|
39
|
+
logFormat?: 'pretty' | 'json'
|
|
40
|
+
logTimestamps?: boolean
|
|
41
|
+
logColor?: boolean
|
|
42
|
+
logUrl?: string
|
|
43
|
+
logTab?: string | number
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface PreviewOptions extends DevOptions {}
|
|
47
|
+
|
|
48
|
+
export interface StartOptions extends DevOptions {}
|
|
49
|
+
|
|
50
|
+
export interface FileConfig {
|
|
51
|
+
[key: string]: unknown
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface Manifest {
|
|
55
|
+
[key: string]: unknown
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function extensionBuild(
|
|
59
|
+
pathOrRemoteUrl: string,
|
|
60
|
+
options: BuildOptions
|
|
61
|
+
): Promise<any>
|
|
62
|
+
|
|
63
|
+
export function extensionDev(
|
|
64
|
+
pathOrRemoteUrl: string,
|
|
65
|
+
options: DevOptions
|
|
66
|
+
): Promise<any>
|
|
67
|
+
|
|
68
|
+
export function extensionStart(
|
|
69
|
+
pathOrRemoteUrl: string,
|
|
70
|
+
options: StartOptions
|
|
71
|
+
): Promise<any>
|
|
72
|
+
|
|
73
|
+
export function extensionPreview(
|
|
74
|
+
pathOrRemoteUrl: string,
|
|
75
|
+
options: PreviewOptions
|
|
76
|
+
): Promise<any>
|
|
77
|
+
}
|
package/types/index.d.ts
CHANGED
|
@@ -21,7 +21,8 @@ interface ExtensionEnv {
|
|
|
21
21
|
EXTENSION_PUBLIC_MODE: ExtensionMode
|
|
22
22
|
EXTENSION_PUBLIC_DESCRIPTION_TEXT: string
|
|
23
23
|
EXTENSION_PUBLIC_OPENAI_API_KEY: string
|
|
24
|
-
|
|
24
|
+
EXTENSION_AUTHOR_MODE: string
|
|
25
|
+
EXTENSION_PUBLIC_AUTHOR_MODE: string
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
// Global augmentations
|