@kernocal/validate-store 0.1.5 → 0.1.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 +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -32,7 +32,7 @@ export default defineConfig({
|
|
|
32
32
|
modules: ['@kernocal/wxt-validate-store'],
|
|
33
33
|
validateStore: {
|
|
34
34
|
enabled: true,
|
|
35
|
-
storeDataSrc: './store/
|
|
35
|
+
storeDataSrc: './store/data',
|
|
36
36
|
storeExportsDir: './store/exports',
|
|
37
37
|
},
|
|
38
38
|
});
|
|
@@ -40,4 +40,4 @@ export default defineConfig({
|
|
|
40
40
|
|
|
41
41
|
## Store Data
|
|
42
42
|
|
|
43
|
-
Your `
|
|
43
|
+
Your `data` module should export a `storeData` object conforming to the `StoreDetails` type. See the exported types for the full schema.
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "wxt";
|
|
2
2
|
import { defineWxtModule } from "wxt/modules";
|
|
3
3
|
import { resolve } from "node:path";
|
|
4
|
-
import { pathToFileURL } from "node:url";
|
|
5
4
|
import { access, mkdir, writeFile } from "node:fs/promises";
|
|
5
|
+
import { createJiti } from "jiti";
|
|
6
6
|
import defu from "defu";
|
|
7
7
|
import sharp from "sharp";
|
|
8
8
|
//#region src/util.ts
|
|
@@ -102,13 +102,13 @@ var src_default = defineWxtModule({
|
|
|
102
102
|
async setup(wxt, options) {
|
|
103
103
|
const parsedOptions = defu(options, {
|
|
104
104
|
enabled: true,
|
|
105
|
-
storeDataSrc: resolve(wxt.config.root, "store/
|
|
105
|
+
storeDataSrc: resolve(wxt.config.root, "store/data"),
|
|
106
106
|
storeExportsDir: resolve(wxt.config.root, "store/exports")
|
|
107
107
|
});
|
|
108
108
|
if (!parsedOptions.enabled) return wxt.logger.warn("`[validate-store]` module disabled");
|
|
109
109
|
wxt.hook("build:manifestGenerated", async (_wxt, manifest) => {
|
|
110
110
|
if (_wxt.config.mode === "development") return;
|
|
111
|
-
const { storeData } = await import(
|
|
111
|
+
const { storeData } = await createJiti(import.meta.url).import(parsedOptions.storeDataSrc);
|
|
112
112
|
const issues = [];
|
|
113
113
|
const { root } = _wxt.config;
|
|
114
114
|
const { screenshots, largePromoTile, smallPromoTile } = storeData.common;
|
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"wxt-module"
|
|
11
11
|
],
|
|
12
12
|
"license": "MIT",
|
|
13
|
-
"version": "0.1.
|
|
13
|
+
"version": "0.1.7",
|
|
14
14
|
"type": "module",
|
|
15
15
|
"module": "./dist/index.js",
|
|
16
16
|
"types": "./dist/index.d.ts",
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"defu": "^6.1.4",
|
|
34
|
+
"jiti": "^2.4.2",
|
|
34
35
|
"sharp": "^0.34.5"
|
|
35
36
|
},
|
|
36
37
|
"devDependencies": {
|