extension 2.0.0-rc.36 → 2.0.0-rc.37
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 +5 -5
- package/dist/cli.js +16 -16
- package/dist/vitest.config.d.ts +2 -0
- package/package.json +5 -6
- package/dist/types/css-content.d.ts +0 -7
- package/dist/types/css-modules.d.ts +0 -19
- package/dist/types/images.d.ts +0 -58
- package/dist/types/index.ts +0 -7
- package/dist/types/js-frameworks.d.ts +0 -3
- package/dist/types/polyfill.d.ts +0 -1
package/README.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
[npm-version-image]: https://img.shields.io/npm/v/extension.svg?color=0971fe
|
|
2
2
|
[npm-version-url]: https://www.npmjs.com/package/extension
|
|
3
|
-
[downloads-image]: https://img.shields.io/npm/dm/extension.svg
|
|
3
|
+
[downloads-image]: https://img.shields.io/npm/dm/extension.svg?color=2ecc40
|
|
4
4
|
[downloads-url]: https://npmjs.org/package/extension
|
|
5
|
-
[action-image]: https://github.com/extension-js/extension.js/actions/workflows/ci.yml/badge.svg?branch=main
|
|
5
|
+
[action-image]: https://github.com/extension-js/extension.js/actions/workflows/ci.yml/badge.svg?branch=main&color=2ecc40
|
|
6
6
|
[action-url]: https://github.com/extension-js/extension.js/actions
|
|
7
|
-
[coverage-image]: https://img.shields.io/codecov/c/github/extension-js/extension.js
|
|
7
|
+
[coverage-image]: https://img.shields.io/codecov/c/github/extension-js/extension.js?color=2ecc40
|
|
8
8
|
[coverage-url]: https://codecov.io/github/extension-js/extension.js
|
|
9
|
-
[discord-image]: https://img.shields.io/discord/1253608412890271755?label=Discord&logo=discord&style=flat
|
|
9
|
+
[discord-image]: https://img.shields.io/discord/1253608412890271755?label=Discord&logo=discord&style=flat&color=2ecc40
|
|
10
10
|
[discord-url]: https://discord.gg/v9h2RgeTSN
|
|
11
|
-
[snyk-image]: https://snyk.io/test/github/extension-js/extension/badge.svg
|
|
11
|
+
[snyk-image]: https://snyk.io/test/github/extension-js/extension/badge.svg?color=2ecc40
|
|
12
12
|
[snyk-url]: https://snyk.io/test/github/extension-js/extension
|
|
13
13
|
|
|
14
14
|
> The cross-browser extension framework
|
package/dist/cli.js
CHANGED
|
@@ -25,51 +25,51 @@ var __webpack_exports__ = {};
|
|
|
25
25
|
const external_commander_namespaceObject = require("commander");
|
|
26
26
|
const external_extension_create_namespaceObject = require("extension-create");
|
|
27
27
|
const external_extension_develop_namespaceObject = require("extension-develop");
|
|
28
|
-
const
|
|
29
|
-
var
|
|
28
|
+
const external_pintor_namespaceObject = require("pintor");
|
|
29
|
+
var external_pintor_default = /*#__PURE__*/ __webpack_require__.n(external_pintor_namespaceObject);
|
|
30
30
|
function updateFailed(err) {
|
|
31
|
-
return "\uD83E\uDDE9\n" +
|
|
31
|
+
return "\uD83E\uDDE9\n" + external_pintor_default().red(`Failed to check for updates: ${err.message}`);
|
|
32
32
|
}
|
|
33
33
|
function checkUpdates(packageJson, update) {
|
|
34
|
-
return `\u{1F9E9}\n${
|
|
34
|
+
return `\u{1F9E9}\n${external_pintor_default().yellow('Notice:')} A new version of ${external_pintor_default().green('Extension.js')} is available!\nYou are currently using version ${external_pintor_default().yellow(packageJson.version)}.\nThe latest stable version is ${external_pintor_default().yellow(update.latest)}.\nPlease update to the latest version to enjoy new features and improvements.\n`;
|
|
35
35
|
}
|
|
36
36
|
function programHelp() {
|
|
37
37
|
return `\u{1F9E9}
|
|
38
|
-
${
|
|
38
|
+
${external_pintor_default().underline('Help center for the Extension.js program')}
|
|
39
39
|
|
|
40
|
-
${
|
|
40
|
+
${external_pintor_default().yellow('Usage:')} extension [command] [options]
|
|
41
41
|
|
|
42
|
-
${
|
|
42
|
+
${external_pintor_default().yellow('Note:')} If you are looking for a specific list of options,
|
|
43
43
|
all high-level commands offer their own \`--help\` file with
|
|
44
44
|
information about usage and a list of command flags available.
|
|
45
45
|
|
|
46
46
|
For example:
|
|
47
47
|
|
|
48
|
-
${
|
|
48
|
+
${external_pintor_default().green('extension create --help')}
|
|
49
49
|
outputs information about the "create" command.
|
|
50
50
|
|
|
51
51
|
Options available:
|
|
52
52
|
|
|
53
|
-
${
|
|
53
|
+
${external_pintor_default().green('extension create <extension-name>')}
|
|
54
54
|
Creates a new extension from a template. The "create" command
|
|
55
55
|
is optional and can be omitted.
|
|
56
56
|
|
|
57
|
-
${
|
|
57
|
+
${external_pintor_default().green('extension dev <extension-path>')}
|
|
58
58
|
Starts a new browser instance in development mode, with the target
|
|
59
59
|
extension loaded and auto-reloaded based on file changes.
|
|
60
60
|
|
|
61
|
-
${
|
|
61
|
+
${external_pintor_default().green('extension start <extension-path>')}
|
|
62
62
|
Starts a new browser instance in production mode, with the target
|
|
63
63
|
extension compiled based on the browser choice.
|
|
64
64
|
|
|
65
|
-
${
|
|
65
|
+
${external_pintor_default().green('extension build <extension-path>')}
|
|
66
66
|
Builds the target extension with browser defaults, ready for packaging.
|
|
67
67
|
|
|
68
|
-
${
|
|
68
|
+
${external_pintor_default().green('extension --help')}
|
|
69
69
|
This command ;) Outputs a help file with key command options.
|
|
70
70
|
|
|
71
|
-
${
|
|
72
|
-
${
|
|
71
|
+
${external_pintor_default().yellow('Feels something is wrong? Help by reporting a bug:')}
|
|
72
|
+
${external_pintor_default().underline('https://github.com/cezaraugusto/extension/issues/new')}
|
|
73
73
|
`;
|
|
74
74
|
}
|
|
75
75
|
const external_update_check_namespaceObject = require("update-check");
|
|
@@ -86,7 +86,7 @@ async function check_updates_checkUpdates(packageJson) {
|
|
|
86
86
|
}
|
|
87
87
|
if (update && isStableVersion(update.latest)) console.log(checkUpdates(packageJson, update));
|
|
88
88
|
}
|
|
89
|
-
var package_namespaceObject = JSON.parse('{"license":"MIT","repository":{"type":"git","url":"https://github.com/extension-js/extension.js.git","directory":"programs/cli"},"engines":{"node":">=18"},"exports":{".":{"types":"./dist/cli.d.ts","import":"./dist/cli.js","require":"./dist/cli.js"}},"main":"./dist/cli.js","types":"./dist/cli.d.ts","files":["dist","types"],"bin":{"extension":"./dist/cli.js"},"name":"extension","version":"2.0.0-rc.
|
|
89
|
+
var package_namespaceObject = JSON.parse('{"license":"MIT","repository":{"type":"git","url":"https://github.com/extension-js/extension.js.git","directory":"programs/cli"},"engines":{"node":">=18"},"exports":{".":{"types":"./dist/cli.d.ts","import":"./dist/cli.js","require":"./dist/cli.js"}},"main":"./dist/cli.js","types":"./dist/cli.d.ts","files":["dist","types"],"bin":{"extension":"./dist/cli.js"},"name":"extension","version":"2.0.0-rc.37","description":"Create cross-browser extensions with no build configuration.","author":{"name":"Cezar Augusto","email":"boss@cezaraugusto.net","url":"https://cezaraugusto.com"},"scripts":{"watch":"rslib build --watch","compile:types":"bash install_scripts.sh","compile:cli":"rslib build","compile":"pnpm compile:cli && pnpm compile:types","clean":"rm -rf dist","test":"echo \\"Note: no test specified\\" && exit 0","test:cli":"vitest run"},"keywords":["zero-config","build","develop","browser","extension","chrome extension","edge extension","firefox extension","safari extension","web","react","typescript"],"dependencies":{"@types/chrome":"^0.0.287","@types/node":"^22.10.1","@types/react":"^19.0.1","@types/react-dom":"^19.0.1","@types/webextension-polyfill":"0.12.3","commander":"^12.1.0","extension-create":"workspace:*","extension-develop":"workspace:*","pintor":"0.3.0","semver":"^7.6.3","update-check":"^1.5.4","webextension-polyfill":"^0.12.0"},"devDependencies":{"@rslib/core":"^0.6.9","@types/mock-fs":"^4.13.4","@types/semver":"^7.5.8","mock-fs":"^5.4.1","tsconfig":"*","typescript":"5.7.2","vitest":"3.2.2"}}');
|
|
90
90
|
check_updates_checkUpdates(package_namespaceObject);
|
|
91
91
|
const extensionJs = external_commander_namespaceObject.program;
|
|
92
92
|
const vendors = (browser)=>'all' === browser ? 'chrome,edge,firefox'.split(',') : browser.split(',');
|
package/package.json
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"extension": "./dist/cli.js"
|
|
26
26
|
},
|
|
27
27
|
"name": "extension",
|
|
28
|
-
"version": "2.0.0-rc.
|
|
28
|
+
"version": "2.0.0-rc.37",
|
|
29
29
|
"description": "Create cross-browser extensions with no build configuration.",
|
|
30
30
|
"author": {
|
|
31
31
|
"name": "Cezar Augusto",
|
|
@@ -52,13 +52,13 @@
|
|
|
52
52
|
"@types/react": "^19.0.1",
|
|
53
53
|
"@types/react-dom": "^19.0.1",
|
|
54
54
|
"@types/webextension-polyfill": "0.12.3",
|
|
55
|
-
"chalk": "^5.3.0",
|
|
56
55
|
"commander": "^12.1.0",
|
|
56
|
+
"pintor": "0.3.0",
|
|
57
57
|
"semver": "^7.6.3",
|
|
58
58
|
"update-check": "^1.5.4",
|
|
59
59
|
"webextension-polyfill": "^0.12.0",
|
|
60
|
-
"extension-create": "2.0.0-rc.
|
|
61
|
-
"extension-develop": "2.0.0-rc.
|
|
60
|
+
"extension-create": "2.0.0-rc.37",
|
|
61
|
+
"extension-develop": "2.0.0-rc.37"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@rslib/core": "^0.6.9",
|
|
@@ -72,9 +72,8 @@
|
|
|
72
72
|
"scripts": {
|
|
73
73
|
"watch": "rslib build --watch",
|
|
74
74
|
"compile:types": "bash install_scripts.sh",
|
|
75
|
-
"compile:readme-files": "node ./scripts/copyMarkdownFilesToCli.js",
|
|
76
75
|
"compile:cli": "rslib build",
|
|
77
|
-
"compile": "pnpm compile:
|
|
76
|
+
"compile": "pnpm compile:cli && pnpm compile:types",
|
|
78
77
|
"clean": "rm -rf dist",
|
|
79
78
|
"test": "echo \"Note: no test specified\" && exit 0",
|
|
80
79
|
"test:cli": "vitest run"
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
type CSSModuleData = Readonly<Record<string, string>>
|
|
2
|
-
|
|
3
|
-
declare module '*.module.css' {
|
|
4
|
-
const content: CSSModuleData
|
|
5
|
-
|
|
6
|
-
export default content
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
declare module '*.module.scss' {
|
|
10
|
-
const content: CSSModuleData
|
|
11
|
-
|
|
12
|
-
export default content
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
declare module '*.module.sass' {
|
|
16
|
-
const content: CSSModuleData
|
|
17
|
-
|
|
18
|
-
export default content
|
|
19
|
-
}
|
package/dist/types/images.d.ts
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
declare module '*.png' {
|
|
2
|
-
const content: string
|
|
3
|
-
|
|
4
|
-
export default content
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
declare module '*.jpg' {
|
|
8
|
-
const content: string
|
|
9
|
-
|
|
10
|
-
export default content
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
declare module '*.jpeg' {
|
|
14
|
-
const content: string
|
|
15
|
-
|
|
16
|
-
export default content
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
declare module '*.gif' {
|
|
20
|
-
const content: string
|
|
21
|
-
|
|
22
|
-
export default content
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
declare module '*.webp' {
|
|
26
|
-
const content: string
|
|
27
|
-
|
|
28
|
-
export default content
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
declare module '*.avif' {
|
|
32
|
-
const content: string
|
|
33
|
-
|
|
34
|
-
export default content
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
declare module '*.ico' {
|
|
38
|
-
const content: string
|
|
39
|
-
|
|
40
|
-
export default content
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
declare module '*.bmp' {
|
|
44
|
-
const content: string
|
|
45
|
-
|
|
46
|
-
export default content
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
declare module '*.svg' {
|
|
50
|
-
/**
|
|
51
|
-
* Use `any` to avoid conflicts with
|
|
52
|
-
* `@svgr/webpack` plugin or
|
|
53
|
-
* `babel-plugin-inline-react-svg` plugin.
|
|
54
|
-
*/
|
|
55
|
-
const content: any
|
|
56
|
-
|
|
57
|
-
export default content
|
|
58
|
-
}
|
package/dist/types/index.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
|
-
/// <reference types="react-dom" />
|
|
4
|
-
/// <reference types="chrome" />
|
|
5
|
-
/// <reference path="./css-content.d.ts" />
|
|
6
|
-
/// <reference path="./css-modules.d.ts" />
|
|
7
|
-
/// <reference path="./images.d.ts" />
|
package/dist/types/polyfill.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/// <reference types="webextension-polyfill" />
|