create-packer 1.49.0 → 1.50.1
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/package.json +1 -1
- package/template/lib/workspace/node_modules/.pnpm/node_modules/react-lib/.gitignore +26 -0
- package/template/lib/workspace/node_modules/.pnpm/node_modules/ts-lib/.gitignore +25 -0
- package/template/lib/workspace/package.json +13 -16
- package/template/lib/workspace/packages/react/package.json +1 -9
- package/template/lib/workspace/packages/react/tsconfig.json +2 -2
- package/template/lib/workspace/packages/ts/package.json +1 -7
- package/template/lib/workspace/packages/ts/tsconfig.json +3 -7
- package/template/lib/workspace/scripts/build.ts +21 -16
- package/template/lib/workspace/tsconfig.json +4 -17
- package/template/web-extension/.wxt/tsconfig.json +27 -27
- package/template/web-extension/.wxt/types/globals.d.ts +15 -15
- package/template/web-extension/.wxt/types/i18n.d.ts +81 -81
- package/template/web-extension/.wxt/types/paths.d.ts +17 -17
- package/template/web-extension/.wxt/wxt.d.ts +7 -7
- package/template/lib/workspace/packages/react/tsconfig.lint.json +0 -21
- package/template/lib/workspace/packages/ts/.eslintrc +0 -72
- package/template/lib/workspace/packages/ts/src/sum.test.ts +0 -6
- package/template/lib/workspace/packages/ts/tsconfig.lint.json +0 -21
- package/template/lib/workspace/tsconfig.node.json +0 -23
package/package.json
CHANGED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Logs
|
|
2
|
+
logs
|
|
3
|
+
*.log
|
|
4
|
+
npm-debug.log*
|
|
5
|
+
yarn-debug.log*
|
|
6
|
+
yarn-error.log*
|
|
7
|
+
pnpm-debug.log*
|
|
8
|
+
lerna-debug.log*
|
|
9
|
+
|
|
10
|
+
node_modules
|
|
11
|
+
dist
|
|
12
|
+
dist-ssr
|
|
13
|
+
*.local
|
|
14
|
+
types
|
|
15
|
+
|
|
16
|
+
# Editor directories and files
|
|
17
|
+
.vscode/*
|
|
18
|
+
!.vscode/extensions.json
|
|
19
|
+
.history
|
|
20
|
+
.idea
|
|
21
|
+
.DS_Store
|
|
22
|
+
*.suo
|
|
23
|
+
*.ntvs*
|
|
24
|
+
*.njsproj
|
|
25
|
+
*.sln
|
|
26
|
+
*.sw?
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Logs
|
|
2
|
+
logs
|
|
3
|
+
*.log
|
|
4
|
+
npm-debug.log*
|
|
5
|
+
yarn-debug.log*
|
|
6
|
+
yarn-error.log*
|
|
7
|
+
pnpm-debug.log*
|
|
8
|
+
lerna-debug.log*
|
|
9
|
+
|
|
10
|
+
node_modules
|
|
11
|
+
dist
|
|
12
|
+
dist-ssr
|
|
13
|
+
*.local
|
|
14
|
+
|
|
15
|
+
# Editor directories and files
|
|
16
|
+
.vscode/*
|
|
17
|
+
!.vscode/extensions.json
|
|
18
|
+
.history
|
|
19
|
+
.idea
|
|
20
|
+
.DS_Store
|
|
21
|
+
*.suo
|
|
22
|
+
*.ntvs*
|
|
23
|
+
*.njsproj
|
|
24
|
+
*.sln
|
|
25
|
+
*.sw?
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"stylelint:fix": "stylelint packages/**/*.{css,scss,less,ts,tsx} --fix",
|
|
12
12
|
"lint": "pnpm -r run lint && pnpm eslint && pnpm stylelint",
|
|
13
13
|
"lint:fix": "pnpm -r run lint && pnpm eslint:fix && pnpm stylelint:fix",
|
|
14
|
-
"build": "ts-node
|
|
14
|
+
"build": "ts-node ./scripts/build.ts",
|
|
15
15
|
"changeVersion": "pnpm changeset && pnpm changeset version && pnpm run clear:changelog",
|
|
16
16
|
"clear:changelog": "pnpm -r exec rimraf CHANGELOG.md",
|
|
17
17
|
"commit": "git add . && cz",
|
|
@@ -33,10 +33,8 @@
|
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"1k-tasks": "4.2.1",
|
|
37
36
|
"@commitlint/config-conventional": "17.6.6",
|
|
38
37
|
"@commitlint/cz-commitlint": "17.5.0",
|
|
39
|
-
"@eslint/js": "9.15.0",
|
|
40
38
|
"commitizen": "4.3.0",
|
|
41
39
|
"rimraf": "5.0.1"
|
|
42
40
|
},
|
|
@@ -46,10 +44,9 @@
|
|
|
46
44
|
"@storybook/addon-docs": "9.1.2",
|
|
47
45
|
"@storybook/react-vite": "9.1.2",
|
|
48
46
|
"@svgr/rollup": "8.1.0",
|
|
47
|
+
"@tsdown/css": "^0.22.13",
|
|
49
48
|
"@types/node": "20.3.2",
|
|
50
|
-
"
|
|
51
|
-
"@types/react-dom": "18.3.0",
|
|
52
|
-
"autoprefixer": "10.4.14",
|
|
49
|
+
"chalk": "^5.6.2",
|
|
53
50
|
"eslint": "9.17.0",
|
|
54
51
|
"eslint-import-resolver-typescript": "4.4.4",
|
|
55
52
|
"eslint-plugin-import": "2.31.0",
|
|
@@ -57,21 +54,21 @@
|
|
|
57
54
|
"eslint-plugin-react-hooks": "5.1.0",
|
|
58
55
|
"eslint-plugin-storybook": "9.1.2",
|
|
59
56
|
"globals": "15.12.0",
|
|
60
|
-
"inquirer": "
|
|
61
|
-
"
|
|
62
|
-
"postcss
|
|
63
|
-
"postcss-
|
|
64
|
-
"postcss-
|
|
65
|
-
"postcss-
|
|
57
|
+
"inquirer": "8.1.2",
|
|
58
|
+
"ora": "^9.4.1",
|
|
59
|
+
"postcss": "8.5.21",
|
|
60
|
+
"postcss-import": "16.1.1",
|
|
61
|
+
"postcss-nested": "7.0.2",
|
|
62
|
+
"postcss-nesting": "14.0.0",
|
|
63
|
+
"postcss-scss": "4.0.9",
|
|
64
|
+
"postcss-styled-syntax": "0.7.2",
|
|
66
65
|
"prettier": "3.2.5",
|
|
67
|
-
"prop-types": "15.8.1",
|
|
68
|
-
"react": "18.2.0",
|
|
69
|
-
"react-dom": "18.2.0",
|
|
70
66
|
"storybook": "9.1.2",
|
|
71
67
|
"stylelint": "16.10.0",
|
|
72
68
|
"stylelint-config-standard-scss": "13.0.0",
|
|
73
69
|
"ts-node": "10.9.1",
|
|
70
|
+
"tsdown": "0.22.13",
|
|
74
71
|
"typescript": "6.0.3",
|
|
75
|
-
"typescript-eslint": "8.
|
|
72
|
+
"typescript-eslint": "8.65.0 "
|
|
76
73
|
}
|
|
77
74
|
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"*.scss"
|
|
10
10
|
],
|
|
11
11
|
"scripts": {
|
|
12
|
-
"lint": "tsc --noEmit
|
|
12
|
+
"lint": "tsc --noEmit",
|
|
13
13
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
14
14
|
"storybook": "storybook dev -p 6006",
|
|
15
15
|
"build-storybook": "storybook build",
|
|
@@ -28,18 +28,10 @@
|
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/react": "18.3.3",
|
|
30
30
|
"@types/react-dom": "18.3.0",
|
|
31
|
-
"eslint": "9.17.0",
|
|
32
|
-
"eslint-import-resolver-typescript": "4.4.4",
|
|
33
|
-
"eslint-plugin-import": "2.31.0",
|
|
34
|
-
"eslint-plugin-react": "7.37.2",
|
|
35
|
-
"eslint-plugin-react-hooks": "5.1.0",
|
|
36
|
-
"eslint-plugin-storybook": "0.11.1",
|
|
37
31
|
"globals": "15.12.0",
|
|
38
32
|
"prettier": "3.2.5",
|
|
39
33
|
"react": "18.2.0",
|
|
40
34
|
"react-dom": "18.2.0",
|
|
41
|
-
"stylelint": "16.10.0",
|
|
42
|
-
"stylelint-config-standard": "36.0.1",
|
|
43
35
|
"typescript": "6.0.3"
|
|
44
36
|
}
|
|
45
37
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
+
"rootDir": "./src",
|
|
3
4
|
"useDefineForClassFields": true,
|
|
4
5
|
"strict": true,
|
|
5
6
|
"forceConsistentCasingInFileNames": true,
|
|
@@ -17,9 +18,8 @@
|
|
|
17
18
|
"sourceMap": false,
|
|
18
19
|
"declaration": true,
|
|
19
20
|
"outDir": "dist",
|
|
20
|
-
"baseUrl": ".",
|
|
21
21
|
"emitDeclarationOnly": true
|
|
22
22
|
},
|
|
23
23
|
"include": ["src", "./global.d.ts"],
|
|
24
|
-
"exclude": ["node_modules/**/*"]
|
|
24
|
+
"exclude": ["node_modules/**/*", "**/*.stories.{ts,tsx}"]
|
|
25
25
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"sideEffects": false,
|
|
8
8
|
"scripts": {
|
|
9
|
-
"lint": "tsc --noEmit
|
|
9
|
+
"lint": "tsc --noEmit",
|
|
10
10
|
"build": "tsc",
|
|
11
11
|
"test": "vitest",
|
|
12
12
|
"coverage": "vitest run --coverage"
|
|
@@ -17,14 +17,8 @@
|
|
|
17
17
|
"license": "ISC",
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@vitest/coverage-v8": "3.1.2",
|
|
20
|
-
"eslint": "9.17.0",
|
|
21
|
-
"eslint-import-resolver-typescript": "4.4.4",
|
|
22
|
-
"eslint-plugin-import": "2.31.0",
|
|
23
20
|
"prettier": "3.2.5",
|
|
24
|
-
"stylelint": "16.10.0",
|
|
25
|
-
"stylelint-config-standard-scss": "13.0.0",
|
|
26
21
|
"typescript": "6.0.3",
|
|
27
|
-
"typescript-eslint": "8.59.2",
|
|
28
22
|
"vitest": "3.1.2"
|
|
29
23
|
}
|
|
30
24
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
+
"rootDir": "./src",
|
|
3
4
|
"useDefineForClassFields": true,
|
|
4
5
|
"strict": true,
|
|
5
6
|
"forceConsistentCasingInFileNames": true,
|
|
@@ -16,13 +17,8 @@
|
|
|
16
17
|
"sourceMap": false,
|
|
17
18
|
"declaration": true,
|
|
18
19
|
"outDir": "dist",
|
|
19
|
-
"baseUrl": ".",
|
|
20
20
|
"emitDeclarationOnly": true
|
|
21
21
|
},
|
|
22
|
-
"include": [
|
|
23
|
-
|
|
24
|
-
],
|
|
25
|
-
"exclude": [
|
|
26
|
-
"src/**/*.test.ts"
|
|
27
|
-
]
|
|
22
|
+
"include": ["src"],
|
|
23
|
+
"exclude": ["**/*.test.ts"]
|
|
28
24
|
}
|
|
@@ -1,21 +1,26 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import path from 'node:path'
|
|
2
|
+
import ora from 'ora'
|
|
3
|
+
import chalk from 'chalk'
|
|
4
|
+
import * as tsdown from 'tsdown'
|
|
3
5
|
|
|
4
6
|
async function build(lib: string) {
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
7
|
+
const task = ora().start(chalk.yellow(`buliding ${lib}...\n`))
|
|
8
|
+
try {
|
|
9
|
+
await tsdown.build({
|
|
10
|
+
cwd: path.join(process.cwd(), 'packages', lib),
|
|
11
|
+
entry: ['src/index.ts'],
|
|
12
|
+
format: ['esm'],
|
|
13
|
+
outDir: 'dist',
|
|
14
|
+
target: ['chrome109', 'edge109', 'firefox114', 'safari16.4'],
|
|
15
|
+
platform: 'browser',
|
|
16
|
+
dts: true,
|
|
17
|
+
unbundle: true,
|
|
18
|
+
logLevel: 'error'
|
|
19
|
+
})
|
|
20
|
+
task.succeed()
|
|
21
|
+
} catch (e: any) {
|
|
22
|
+
task.fail(e.message)
|
|
23
|
+
}
|
|
19
24
|
}
|
|
20
25
|
|
|
21
26
|
build('ts')
|
|
@@ -5,31 +5,18 @@
|
|
|
5
5
|
"forceConsistentCasingInFileNames": true,
|
|
6
6
|
"strictPropertyInitialization": false,
|
|
7
7
|
"resolveJsonModule": true,
|
|
8
|
-
"module": "
|
|
8
|
+
"module": "nodenext",
|
|
9
9
|
"esModuleInterop": true,
|
|
10
|
-
"jsx": "react-jsx",
|
|
11
10
|
"allowSyntheticDefaultImports": true,
|
|
12
11
|
"allowJs": true,
|
|
13
12
|
"target": "ESNext",
|
|
14
13
|
"noImplicitAny": false,
|
|
15
14
|
"skipLibCheck": true,
|
|
16
|
-
"moduleResolution": "
|
|
15
|
+
"moduleResolution": "nodenext",
|
|
17
16
|
"sourceMap": false,
|
|
18
17
|
"declaration": true,
|
|
19
|
-
"outDir": "dist",
|
|
20
|
-
"baseUrl": ".",
|
|
21
18
|
"emitDeclarationOnly": true
|
|
22
19
|
},
|
|
23
|
-
"include": [
|
|
24
|
-
|
|
25
|
-
],
|
|
26
|
-
"exclude": [
|
|
27
|
-
"node_modules/**/*",
|
|
28
|
-
"scripts/**/*"
|
|
29
|
-
],
|
|
30
|
-
"references": [
|
|
31
|
-
{
|
|
32
|
-
"path": "./tsconfig.node.json"
|
|
33
|
-
}
|
|
34
|
-
]
|
|
20
|
+
"include": [".storybook", "scripts/**/*"],
|
|
21
|
+
"exclude": ["node_modules/**/*", "scripts/**/*"]
|
|
35
22
|
}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ESNext",
|
|
4
|
-
"module": "ESNext",
|
|
5
|
-
"moduleResolution": "Bundler",
|
|
6
|
-
"noEmit": true,
|
|
7
|
-
"esModuleInterop": true,
|
|
8
|
-
"forceConsistentCasingInFileNames": true,
|
|
9
|
-
"resolveJsonModule": true,
|
|
10
|
-
"strict": true,
|
|
11
|
-
"skipLibCheck": true,
|
|
12
|
-
"paths": {
|
|
13
|
-
"@": [".."],
|
|
14
|
-
"@/*": ["../*"],
|
|
15
|
-
"~": [".."],
|
|
16
|
-
"~/*": ["../*"],
|
|
17
|
-
"@@": [".."],
|
|
18
|
-
"@@/*": ["../*"],
|
|
19
|
-
"~~": [".."],
|
|
20
|
-
"~~/*": ["../*"]
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
"include": [
|
|
24
|
-
"../**/*",
|
|
25
|
-
"./wxt.d.ts"
|
|
26
|
-
],
|
|
27
|
-
"exclude": ["../dist"]
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ESNext",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "Bundler",
|
|
6
|
+
"noEmit": true,
|
|
7
|
+
"esModuleInterop": true,
|
|
8
|
+
"forceConsistentCasingInFileNames": true,
|
|
9
|
+
"resolveJsonModule": true,
|
|
10
|
+
"strict": true,
|
|
11
|
+
"skipLibCheck": true,
|
|
12
|
+
"paths": {
|
|
13
|
+
"@": [".."],
|
|
14
|
+
"@/*": ["../*"],
|
|
15
|
+
"~": [".."],
|
|
16
|
+
"~/*": ["../*"],
|
|
17
|
+
"@@": [".."],
|
|
18
|
+
"@@/*": ["../*"],
|
|
19
|
+
"~~": [".."],
|
|
20
|
+
"~~/*": ["../*"]
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"include": [
|
|
24
|
+
"../**/*",
|
|
25
|
+
"./wxt.d.ts"
|
|
26
|
+
],
|
|
27
|
+
"exclude": ["../dist"]
|
|
28
28
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
// Generated by wxt
|
|
2
|
-
interface ImportMetaEnv {
|
|
3
|
-
readonly MANIFEST_VERSION: 2 | 3;
|
|
4
|
-
readonly BROWSER: string;
|
|
5
|
-
readonly CHROME: boolean;
|
|
6
|
-
readonly FIREFOX: boolean;
|
|
7
|
-
readonly SAFARI: boolean;
|
|
8
|
-
readonly EDGE: boolean;
|
|
9
|
-
readonly OPERA: boolean;
|
|
10
|
-
readonly COMMAND: "build" | "serve";
|
|
11
|
-
readonly ENTRYPOINT: string;
|
|
12
|
-
}
|
|
13
|
-
interface ImportMeta {
|
|
14
|
-
readonly env: ImportMetaEnv
|
|
15
|
-
}
|
|
1
|
+
// Generated by wxt
|
|
2
|
+
interface ImportMetaEnv {
|
|
3
|
+
readonly MANIFEST_VERSION: 2 | 3;
|
|
4
|
+
readonly BROWSER: string;
|
|
5
|
+
readonly CHROME: boolean;
|
|
6
|
+
readonly FIREFOX: boolean;
|
|
7
|
+
readonly SAFARI: boolean;
|
|
8
|
+
readonly EDGE: boolean;
|
|
9
|
+
readonly OPERA: boolean;
|
|
10
|
+
readonly COMMAND: "build" | "serve";
|
|
11
|
+
readonly ENTRYPOINT: string;
|
|
12
|
+
}
|
|
13
|
+
interface ImportMeta {
|
|
14
|
+
readonly env: ImportMetaEnv
|
|
15
|
+
}
|
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
// Generated by wxt
|
|
2
|
-
import "wxt/browser";
|
|
3
|
-
|
|
4
|
-
declare module "wxt/browser" {
|
|
5
|
-
/**
|
|
6
|
-
* See https://developer.chrome.com/docs/extensions/reference/i18n/#method-getMessage
|
|
7
|
-
*/
|
|
8
|
-
interface GetMessageOptions {
|
|
9
|
-
/**
|
|
10
|
-
* See https://developer.chrome.com/docs/extensions/reference/i18n/#method-getMessage
|
|
11
|
-
*/
|
|
12
|
-
escapeLt?: boolean
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface WxtI18n extends I18n.Static {
|
|
16
|
-
/**
|
|
17
|
-
* The extension or app ID; you might use this string to construct URLs for resources inside the extension. Even unlocalized extensions can use this message.
|
|
18
|
-
* Note: You can't use this message in a manifest file.
|
|
19
|
-
*
|
|
20
|
-
* "<browser.runtime.id>"
|
|
21
|
-
*/
|
|
22
|
-
getMessage(
|
|
23
|
-
messageName: "@@extension_id",
|
|
24
|
-
substitutions?: string | string[],
|
|
25
|
-
options?: GetMessageOptions,
|
|
26
|
-
): string;
|
|
27
|
-
/**
|
|
28
|
-
* "<browser.i18n.getUiLocale()>"
|
|
29
|
-
*/
|
|
30
|
-
getMessage(
|
|
31
|
-
messageName: "@@ui_locale",
|
|
32
|
-
substitutions?: string | string[],
|
|
33
|
-
options?: GetMessageOptions,
|
|
34
|
-
): string;
|
|
35
|
-
/**
|
|
36
|
-
* The text direction for the current locale, either "ltr" for left-to-right languages such as English or "rtl" for right-to-left languages such as Japanese.
|
|
37
|
-
*
|
|
38
|
-
* "<ltr|rtl>"
|
|
39
|
-
*/
|
|
40
|
-
getMessage(
|
|
41
|
-
messageName: "@@bidi_dir",
|
|
42
|
-
substitutions?: string | string[],
|
|
43
|
-
options?: GetMessageOptions,
|
|
44
|
-
): string;
|
|
45
|
-
/**
|
|
46
|
-
* If the @@bidi_dir is "ltr", then this is "rtl"; otherwise, it's "ltr".
|
|
47
|
-
*
|
|
48
|
-
* "<rtl|ltr>"
|
|
49
|
-
*/
|
|
50
|
-
getMessage(
|
|
51
|
-
messageName: "@@bidi_reversed_dir",
|
|
52
|
-
substitutions?: string | string[],
|
|
53
|
-
options?: GetMessageOptions,
|
|
54
|
-
): string;
|
|
55
|
-
/**
|
|
56
|
-
* If the @@bidi_dir is "ltr", then this is "left"; otherwise, it's "right".
|
|
57
|
-
*
|
|
58
|
-
* "<left|right>"
|
|
59
|
-
*/
|
|
60
|
-
getMessage(
|
|
61
|
-
messageName: "@@bidi_start_edge",
|
|
62
|
-
substitutions?: string | string[],
|
|
63
|
-
options?: GetMessageOptions,
|
|
64
|
-
): string;
|
|
65
|
-
/**
|
|
66
|
-
* If the @@bidi_dir is "ltr", then this is "right"; otherwise, it's "left".
|
|
67
|
-
*
|
|
68
|
-
* "<right|left>"
|
|
69
|
-
*/
|
|
70
|
-
getMessage(
|
|
71
|
-
messageName: "@@bidi_end_edge",
|
|
72
|
-
substitutions?: string | string[],
|
|
73
|
-
options?: GetMessageOptions,
|
|
74
|
-
): string;
|
|
75
|
-
getMessage(
|
|
76
|
-
messageName: "@@extension_id" | "@@ui_locale" | "@@bidi_dir" | "@@bidi_reversed_dir" | "@@bidi_start_edge" | "@@bidi_end_edge",
|
|
77
|
-
substitutions?: string | string[],
|
|
78
|
-
options?: GetMessageOptions,
|
|
79
|
-
): string;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
1
|
+
// Generated by wxt
|
|
2
|
+
import "wxt/browser";
|
|
3
|
+
|
|
4
|
+
declare module "wxt/browser" {
|
|
5
|
+
/**
|
|
6
|
+
* See https://developer.chrome.com/docs/extensions/reference/i18n/#method-getMessage
|
|
7
|
+
*/
|
|
8
|
+
interface GetMessageOptions {
|
|
9
|
+
/**
|
|
10
|
+
* See https://developer.chrome.com/docs/extensions/reference/i18n/#method-getMessage
|
|
11
|
+
*/
|
|
12
|
+
escapeLt?: boolean
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface WxtI18n extends I18n.Static {
|
|
16
|
+
/**
|
|
17
|
+
* The extension or app ID; you might use this string to construct URLs for resources inside the extension. Even unlocalized extensions can use this message.
|
|
18
|
+
* Note: You can't use this message in a manifest file.
|
|
19
|
+
*
|
|
20
|
+
* "<browser.runtime.id>"
|
|
21
|
+
*/
|
|
22
|
+
getMessage(
|
|
23
|
+
messageName: "@@extension_id",
|
|
24
|
+
substitutions?: string | string[],
|
|
25
|
+
options?: GetMessageOptions,
|
|
26
|
+
): string;
|
|
27
|
+
/**
|
|
28
|
+
* "<browser.i18n.getUiLocale()>"
|
|
29
|
+
*/
|
|
30
|
+
getMessage(
|
|
31
|
+
messageName: "@@ui_locale",
|
|
32
|
+
substitutions?: string | string[],
|
|
33
|
+
options?: GetMessageOptions,
|
|
34
|
+
): string;
|
|
35
|
+
/**
|
|
36
|
+
* The text direction for the current locale, either "ltr" for left-to-right languages such as English or "rtl" for right-to-left languages such as Japanese.
|
|
37
|
+
*
|
|
38
|
+
* "<ltr|rtl>"
|
|
39
|
+
*/
|
|
40
|
+
getMessage(
|
|
41
|
+
messageName: "@@bidi_dir",
|
|
42
|
+
substitutions?: string | string[],
|
|
43
|
+
options?: GetMessageOptions,
|
|
44
|
+
): string;
|
|
45
|
+
/**
|
|
46
|
+
* If the @@bidi_dir is "ltr", then this is "rtl"; otherwise, it's "ltr".
|
|
47
|
+
*
|
|
48
|
+
* "<rtl|ltr>"
|
|
49
|
+
*/
|
|
50
|
+
getMessage(
|
|
51
|
+
messageName: "@@bidi_reversed_dir",
|
|
52
|
+
substitutions?: string | string[],
|
|
53
|
+
options?: GetMessageOptions,
|
|
54
|
+
): string;
|
|
55
|
+
/**
|
|
56
|
+
* If the @@bidi_dir is "ltr", then this is "left"; otherwise, it's "right".
|
|
57
|
+
*
|
|
58
|
+
* "<left|right>"
|
|
59
|
+
*/
|
|
60
|
+
getMessage(
|
|
61
|
+
messageName: "@@bidi_start_edge",
|
|
62
|
+
substitutions?: string | string[],
|
|
63
|
+
options?: GetMessageOptions,
|
|
64
|
+
): string;
|
|
65
|
+
/**
|
|
66
|
+
* If the @@bidi_dir is "ltr", then this is "right"; otherwise, it's "left".
|
|
67
|
+
*
|
|
68
|
+
* "<right|left>"
|
|
69
|
+
*/
|
|
70
|
+
getMessage(
|
|
71
|
+
messageName: "@@bidi_end_edge",
|
|
72
|
+
substitutions?: string | string[],
|
|
73
|
+
options?: GetMessageOptions,
|
|
74
|
+
): string;
|
|
75
|
+
getMessage(
|
|
76
|
+
messageName: "@@extension_id" | "@@ui_locale" | "@@bidi_dir" | "@@bidi_reversed_dir" | "@@bidi_start_edge" | "@@bidi_end_edge",
|
|
77
|
+
substitutions?: string | string[],
|
|
78
|
+
options?: GetMessageOptions,
|
|
79
|
+
): string;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
// Generated by wxt
|
|
2
|
-
import "wxt/browser";
|
|
3
|
-
|
|
4
|
-
declare module "wxt/browser" {
|
|
5
|
-
export type PublicPath =
|
|
6
|
-
| ""
|
|
7
|
-
| "/"
|
|
8
|
-
| "/background.js"
|
|
9
|
-
| "/content-scripts/content.js"
|
|
10
|
-
| "/popup.html"
|
|
11
|
-
| "/vite.svg"
|
|
12
|
-
type HtmlPublicPath = Extract<PublicPath, `${string}.html`>
|
|
13
|
-
export interface WxtRuntime {
|
|
14
|
-
getURL(path: PublicPath): string;
|
|
15
|
-
getURL(path: `${HtmlPublicPath}${string}`): string;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
1
|
+
// Generated by wxt
|
|
2
|
+
import "wxt/browser";
|
|
3
|
+
|
|
4
|
+
declare module "wxt/browser" {
|
|
5
|
+
export type PublicPath =
|
|
6
|
+
| ""
|
|
7
|
+
| "/"
|
|
8
|
+
| "/background.js"
|
|
9
|
+
| "/content-scripts/content.js"
|
|
10
|
+
| "/popup.html"
|
|
11
|
+
| "/vite.svg"
|
|
12
|
+
type HtmlPublicPath = Extract<PublicPath, `${string}.html`>
|
|
13
|
+
export interface WxtRuntime {
|
|
14
|
+
getURL(path: PublicPath): string;
|
|
15
|
+
getURL(path: `${HtmlPublicPath}${string}`): string;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
// Generated by wxt
|
|
2
|
-
/// <reference types="wxt/vite-builder-env" />
|
|
3
|
-
/// <reference path="./types/paths.d.ts" />
|
|
4
|
-
/// <reference path="./types/i18n.d.ts" />
|
|
5
|
-
/// <reference path="./types/globals.d.ts" />
|
|
6
|
-
/// <reference path="./types/imports-module.d.ts" />
|
|
7
|
-
/// <reference path="./types/imports.d.ts" />
|
|
1
|
+
// Generated by wxt
|
|
2
|
+
/// <reference types="wxt/vite-builder-env" />
|
|
3
|
+
/// <reference path="./types/paths.d.ts" />
|
|
4
|
+
/// <reference path="./types/i18n.d.ts" />
|
|
5
|
+
/// <reference path="./types/globals.d.ts" />
|
|
6
|
+
/// <reference path="./types/imports-module.d.ts" />
|
|
7
|
+
/// <reference path="./types/imports.d.ts" />
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"useDefineForClassFields": true,
|
|
4
|
-
"strict": true,
|
|
5
|
-
"forceConsistentCasingInFileNames": true,
|
|
6
|
-
"strictPropertyInitialization": false,
|
|
7
|
-
"resolveJsonModule": true,
|
|
8
|
-
"module": "ESNext",
|
|
9
|
-
"esModuleInterop": true,
|
|
10
|
-
"jsx": "react-jsx",
|
|
11
|
-
"allowSyntheticDefaultImports": true,
|
|
12
|
-
"allowJs": true,
|
|
13
|
-
"target": "ESNext",
|
|
14
|
-
"noImplicitAny": false,
|
|
15
|
-
"skipLibCheck": true,
|
|
16
|
-
"moduleResolution": "bundler",
|
|
17
|
-
"sourceMap": false,
|
|
18
|
-
"baseUrl": "."
|
|
19
|
-
},
|
|
20
|
-
"include": ["src/**/*", "./global.d.ts"],
|
|
21
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"root": true,
|
|
3
|
-
"parser": "@typescript-eslint/parser",
|
|
4
|
-
"plugins": [],
|
|
5
|
-
"extends": [
|
|
6
|
-
"eslint:recommended",
|
|
7
|
-
"plugin:@typescript-eslint/recommended",
|
|
8
|
-
"plugin:import/recommended",
|
|
9
|
-
"plugin:import/typescript"
|
|
10
|
-
],
|
|
11
|
-
"settings": {
|
|
12
|
-
"import/resolver": {
|
|
13
|
-
"typescript": true,
|
|
14
|
-
"node": true
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
"env": {
|
|
18
|
-
"browser": true,
|
|
19
|
-
"node": true,
|
|
20
|
-
"es6": true,
|
|
21
|
-
"jest": true
|
|
22
|
-
},
|
|
23
|
-
"parserOptions": {
|
|
24
|
-
"ecmaVersion": 2018,
|
|
25
|
-
"sourceType": "module",
|
|
26
|
-
"ecmaFeatures": {
|
|
27
|
-
"jsx": true
|
|
28
|
-
},
|
|
29
|
-
"useJSXTextNode": true
|
|
30
|
-
},
|
|
31
|
-
"rules": {
|
|
32
|
-
"import/export": "off",
|
|
33
|
-
"import/namespace": "off",
|
|
34
|
-
"import/order": [
|
|
35
|
-
"error",
|
|
36
|
-
{
|
|
37
|
-
"groups": [
|
|
38
|
-
"builtin",
|
|
39
|
-
"external",
|
|
40
|
-
"internal",
|
|
41
|
-
"parent",
|
|
42
|
-
"sibling",
|
|
43
|
-
"index",
|
|
44
|
-
"object",
|
|
45
|
-
"type"
|
|
46
|
-
]
|
|
47
|
-
}
|
|
48
|
-
],
|
|
49
|
-
"@typescript-eslint/no-var-requires": 0,
|
|
50
|
-
"@typescript-eslint/explicit-function-return-type": "off",
|
|
51
|
-
"@typescript-eslint/no-explicit-any": 0,
|
|
52
|
-
"@typescript-eslint/no-non-null-assertion": "off",
|
|
53
|
-
"@typescript-eslint/no-inferrable-types": [
|
|
54
|
-
"warn",
|
|
55
|
-
{
|
|
56
|
-
"ignoreParameters": true
|
|
57
|
-
}
|
|
58
|
-
],
|
|
59
|
-
"@typescript-eslint/no-unused-vars": [
|
|
60
|
-
"warn",
|
|
61
|
-
{
|
|
62
|
-
"argsIgnorePattern": "^_"
|
|
63
|
-
}
|
|
64
|
-
],
|
|
65
|
-
"@typescript-eslint/member-delimiter-style": 0,
|
|
66
|
-
"@typescript-eslint/class-name-casing": 0,
|
|
67
|
-
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
68
|
-
"@typescript-eslint/ban-ts-comment": "off",
|
|
69
|
-
"@typescript-eslint/no-empty-interface": "off",
|
|
70
|
-
"no-constant-condition": "off"
|
|
71
|
-
}
|
|
72
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"useDefineForClassFields": true,
|
|
4
|
-
"strict": true,
|
|
5
|
-
"forceConsistentCasingInFileNames": true,
|
|
6
|
-
"strictPropertyInitialization": false,
|
|
7
|
-
"resolveJsonModule": true,
|
|
8
|
-
"module": "ESNext",
|
|
9
|
-
"esModuleInterop": true,
|
|
10
|
-
"allowSyntheticDefaultImports": true,
|
|
11
|
-
"allowJs": true,
|
|
12
|
-
"target": "ESNext",
|
|
13
|
-
"noImplicitAny": false,
|
|
14
|
-
"skipLibCheck": true,
|
|
15
|
-
"moduleResolution": "bundler",
|
|
16
|
-
"sourceMap": false,
|
|
17
|
-
"baseUrl": "."
|
|
18
|
-
},
|
|
19
|
-
"include": ["src"],
|
|
20
|
-
"exclude": ["src/**/*.test.ts"]
|
|
21
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"composite": true,
|
|
4
|
-
"module": "CommonJS",
|
|
5
|
-
"esModuleInterop": true,
|
|
6
|
-
"allowSyntheticDefaultImports": true,
|
|
7
|
-
"allowJs": true,
|
|
8
|
-
"strictNullChecks": true,
|
|
9
|
-
"target": "ESNext",
|
|
10
|
-
"noImplicitAny": false,
|
|
11
|
-
"moduleResolution": "node",
|
|
12
|
-
"sourceMap": false,
|
|
13
|
-
"declaration": true,
|
|
14
|
-
"outDir": "lib",
|
|
15
|
-
"baseUrl": "."
|
|
16
|
-
},
|
|
17
|
-
"include": [
|
|
18
|
-
"scripts/**/*"
|
|
19
|
-
],
|
|
20
|
-
"exclude": [
|
|
21
|
-
"node_modules/**/*"
|
|
22
|
-
]
|
|
23
|
-
}
|