@wvb/config 0.0.0 → 0.1.0-next.68e19d2

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/CHANGELOG.md CHANGED
@@ -1 +1,9 @@
1
1
  # Changelog
2
+
3
+ ## config v0.1.0-next.68e19d2
4
+
5
+ This release includes packages: [`@wvb/config`](https://www.npmjs.com/package/@wvb/config/v/0.1.0-next.68e19d2)
6
+
7
+ - feat(ffi): add ffi package for Android/iOS bindings (#139) (c41b723)
8
+ - feat: redesgin cli commands, add local remote provider, oxc -> biome (#132) (af26b39)
9
+ - chore: fix xtask artifacts missing platforms (#112) (5d60ad6)
@@ -79,16 +79,20 @@ interface BaseRemoteUploader {
79
79
  upload(params: RemoteUploadParams): Promise<void>;
80
80
  }
81
81
  //#endregion
82
- //#region src/remote/remote.d.ts
82
+ //#region src/remote/config.d.ts
83
83
  interface RemoteConfig {
84
84
  /**
85
85
  * Endpoint to remote server.
86
86
  */
87
- endpoint?: string;
87
+ endpoint: string;
88
88
  /**
89
89
  * Name of the bundle to be used in remote.
90
90
  */
91
- bundleName?: string;
91
+ bundleName?: string | (() => string | Promise<string>);
92
+ /**
93
+ * Name of the bundle to be used in remote.
94
+ */
95
+ version?: string | (() => string | Promise<string>);
92
96
  uploader?: BaseRemoteUploader;
93
97
  deployer?: BaseRemoteDeployer;
94
98
  integrity?: boolean | IntegrityMakeConfig;
@@ -79,16 +79,20 @@ interface BaseRemoteUploader {
79
79
  upload(params: RemoteUploadParams): Promise<void>;
80
80
  }
81
81
  //#endregion
82
- //#region src/remote/remote.d.ts
82
+ //#region src/remote/config.d.ts
83
83
  interface RemoteConfig {
84
84
  /**
85
85
  * Endpoint to remote server.
86
86
  */
87
- endpoint?: string;
87
+ endpoint: string;
88
88
  /**
89
89
  * Name of the bundle to be used in remote.
90
90
  */
91
- bundleName?: string;
91
+ bundleName?: string | (() => string | Promise<string>);
92
+ /**
93
+ * Name of the bundle to be used in remote.
94
+ */
95
+ version?: string | (() => string | Promise<string>);
92
96
  uploader?: BaseRemoteUploader;
93
97
  deployer?: BaseRemoteDeployer;
94
98
  integrity?: boolean | IntegrityMakeConfig;
package/dist/index.d.cts CHANGED
@@ -1,14 +1,20 @@
1
- import { n as RemoteConfig } from "./index-cK1sn_xk.cjs";
1
+ import { n as RemoteConfig } from "./index-C5v3A9IM.cjs";
2
2
 
3
3
  //#region src/builtin.d.ts
4
4
  type RemoteBundleMatches = string | RegExp | Array<string | RegExp> | ((info: {
5
5
  name: string;
6
6
  version: string;
7
7
  }) => boolean | Promise<boolean>);
8
+ interface BuiltinDownloadConfig {
9
+ /**
10
+ * Concurrency of the download bundles.
11
+ */
12
+ concurrency?: number;
13
+ }
8
14
  interface BuiltinConfig {
9
15
  /**
10
16
  * Directory path where to download builtin bundles from remote.
11
- * @default ".wvb/builtin"
17
+ * @default ".wvb/builtin/bundles"
12
18
  */
13
19
  outDir?: string;
14
20
  /**
@@ -24,19 +30,33 @@ interface BuiltinConfig {
24
30
  * @default true
25
31
  */
26
32
  clean?: boolean;
27
- /**
28
- * Concurrency of the download bundles.
29
- */
30
- concurrency?: number;
33
+ download?: BuiltinDownloadConfig;
31
34
  }
32
35
  //#endregion
33
- //#region src/create.d.ts
36
+ //#region src/pack.d.ts
34
37
  type IgnoreConfig = Array<string | RegExp> | ((file: string) => boolean | Promise<boolean>);
35
38
  type HeadersConfig = Record<string, HeadersInit> | Array<[string, HeadersInit]> | ((file: string) => HeadersInit | null | undefined | Promise<HeadersInit | null | undefined>);
36
39
  /**
37
- * Webview Bundle create config.
40
+ * Webview Bundle pack config.
38
41
  */
39
- interface CreateConfig {
42
+ interface PackConfig {
43
+ /**
44
+ * Path to the source directory.
45
+ *
46
+ * All files under this directory will be included in the Webview Bundle.
47
+ * Use "ignore" to exclude files you don't want to pack.
48
+ */
49
+ srcDir?: string;
50
+ /**
51
+ * Directory that out-file should be created.
52
+ * @default ".wvb"
53
+ */
54
+ outDir?: string;
55
+ /**
56
+ * Outfile name to create Webview Bundle archive.
57
+ * If not provided, default to name field in "package.json" with normalized.
58
+ */
59
+ outFile?: string;
40
60
  /**
41
61
  * Overwrite out-file if file is already exists
42
62
  * @default true
@@ -60,25 +80,6 @@ interface CreateConfig {
60
80
  headers?: HeadersConfig;
61
81
  }
62
82
  //#endregion
63
- //#region src/extract.d.ts
64
- interface ExtractConfig {
65
- /**
66
- * Webview Bundle file to use for extracting.
67
- * If not provided, the file at the "outFile" path is used by default.
68
- */
69
- file?: string;
70
- /**
71
- * Path to extract Webview Bundle files.
72
- * If not provided, will use Webview Bundle file name as directory.
73
- */
74
- outDir?: string;
75
- /**
76
- * Clean up extracted files if out directory already exists.
77
- * @default false
78
- */
79
- clean?: boolean;
80
- }
81
- //#endregion
82
83
  //#region src/serve.d.ts
83
84
  interface ServeConfig {
84
85
  /**
@@ -115,28 +116,10 @@ interface Config {
115
116
  * @default process.cwd()
116
117
  */
117
118
  root?: string;
118
- /**
119
- * Path to the source directory.
120
- *
121
- * All files under this directory will be included in the Webview Bundle.
122
- * Use "create.ignore" to exclude files you don't want to pack.
123
- */
124
- srcDir?: string;
125
- /**
126
- * Directory that out-file should be created.
127
- * @default ".wvb"
128
- */
129
- outDir?: string;
130
- /**
131
- * Outfile name to create Webview Bundle archive.
132
- * If not provided, default to name field in "package.json" with normalized.
133
- */
134
- outFile?: string;
135
- create?: CreateConfig;
136
- extract?: ExtractConfig;
119
+ pack?: PackConfig;
137
120
  remote?: RemoteConfig;
138
121
  serve?: ServeConfig;
139
122
  builtin?: BuiltinConfig;
140
123
  }
141
124
  //#endregion
142
- export { type BuiltinConfig, type Config, type ConfigInput, type ConfigInputFn, type ConfigInputFnObj, type ConfigInputFnPromise, type CreateConfig, type ExtractConfig, type HeadersConfig, type IgnoreConfig, type RemoteBundleMatches, type ServeConfig, defineConfig };
125
+ export { type BuiltinConfig, type Config, type ConfigInput, type ConfigInputFn, type ConfigInputFnObj, type ConfigInputFnPromise, type HeadersConfig, type IgnoreConfig, type PackConfig, type RemoteBundleMatches, type ServeConfig, defineConfig };
package/dist/index.d.mts CHANGED
@@ -1,14 +1,20 @@
1
- import { n as RemoteConfig } from "./index-Da62rQR9.mjs";
1
+ import { n as RemoteConfig } from "./index-f7Ruzcf_.mjs";
2
2
 
3
3
  //#region src/builtin.d.ts
4
4
  type RemoteBundleMatches = string | RegExp | Array<string | RegExp> | ((info: {
5
5
  name: string;
6
6
  version: string;
7
7
  }) => boolean | Promise<boolean>);
8
+ interface BuiltinDownloadConfig {
9
+ /**
10
+ * Concurrency of the download bundles.
11
+ */
12
+ concurrency?: number;
13
+ }
8
14
  interface BuiltinConfig {
9
15
  /**
10
16
  * Directory path where to download builtin bundles from remote.
11
- * @default ".wvb/builtin"
17
+ * @default ".wvb/builtin/bundles"
12
18
  */
13
19
  outDir?: string;
14
20
  /**
@@ -24,19 +30,33 @@ interface BuiltinConfig {
24
30
  * @default true
25
31
  */
26
32
  clean?: boolean;
27
- /**
28
- * Concurrency of the download bundles.
29
- */
30
- concurrency?: number;
33
+ download?: BuiltinDownloadConfig;
31
34
  }
32
35
  //#endregion
33
- //#region src/create.d.ts
36
+ //#region src/pack.d.ts
34
37
  type IgnoreConfig = Array<string | RegExp> | ((file: string) => boolean | Promise<boolean>);
35
38
  type HeadersConfig = Record<string, HeadersInit> | Array<[string, HeadersInit]> | ((file: string) => HeadersInit | null | undefined | Promise<HeadersInit | null | undefined>);
36
39
  /**
37
- * Webview Bundle create config.
40
+ * Webview Bundle pack config.
38
41
  */
39
- interface CreateConfig {
42
+ interface PackConfig {
43
+ /**
44
+ * Path to the source directory.
45
+ *
46
+ * All files under this directory will be included in the Webview Bundle.
47
+ * Use "ignore" to exclude files you don't want to pack.
48
+ */
49
+ srcDir?: string;
50
+ /**
51
+ * Directory that out-file should be created.
52
+ * @default ".wvb"
53
+ */
54
+ outDir?: string;
55
+ /**
56
+ * Outfile name to create Webview Bundle archive.
57
+ * If not provided, default to name field in "package.json" with normalized.
58
+ */
59
+ outFile?: string;
40
60
  /**
41
61
  * Overwrite out-file if file is already exists
42
62
  * @default true
@@ -60,25 +80,6 @@ interface CreateConfig {
60
80
  headers?: HeadersConfig;
61
81
  }
62
82
  //#endregion
63
- //#region src/extract.d.ts
64
- interface ExtractConfig {
65
- /**
66
- * Webview Bundle file to use for extracting.
67
- * If not provided, the file at the "outFile" path is used by default.
68
- */
69
- file?: string;
70
- /**
71
- * Path to extract Webview Bundle files.
72
- * If not provided, will use Webview Bundle file name as directory.
73
- */
74
- outDir?: string;
75
- /**
76
- * Clean up extracted files if out directory already exists.
77
- * @default false
78
- */
79
- clean?: boolean;
80
- }
81
- //#endregion
82
83
  //#region src/serve.d.ts
83
84
  interface ServeConfig {
84
85
  /**
@@ -115,28 +116,10 @@ interface Config {
115
116
  * @default process.cwd()
116
117
  */
117
118
  root?: string;
118
- /**
119
- * Path to the source directory.
120
- *
121
- * All files under this directory will be included in the Webview Bundle.
122
- * Use "create.ignore" to exclude files you don't want to pack.
123
- */
124
- srcDir?: string;
125
- /**
126
- * Directory that out-file should be created.
127
- * @default ".wvb"
128
- */
129
- outDir?: string;
130
- /**
131
- * Outfile name to create Webview Bundle archive.
132
- * If not provided, default to name field in "package.json" with normalized.
133
- */
134
- outFile?: string;
135
- create?: CreateConfig;
136
- extract?: ExtractConfig;
119
+ pack?: PackConfig;
137
120
  remote?: RemoteConfig;
138
121
  serve?: ServeConfig;
139
122
  builtin?: BuiltinConfig;
140
123
  }
141
124
  //#endregion
142
- export { type BuiltinConfig, type Config, type ConfigInput, type ConfigInputFn, type ConfigInputFnObj, type ConfigInputFnPromise, type CreateConfig, type ExtractConfig, type HeadersConfig, type IgnoreConfig, type RemoteBundleMatches, type ServeConfig, defineConfig };
125
+ export { type BuiltinConfig, type Config, type ConfigInput, type ConfigInputFn, type ConfigInputFnObj, type ConfigInputFnPromise, type HeadersConfig, type IgnoreConfig, type PackConfig, type RemoteBundleMatches, type ServeConfig, defineConfig };
@@ -1,2 +1,2 @@
1
- import { _ as IntegrityMakeFn, a as RemoteUploadProgress, b as BaseRemoteDeployer, c as SignatureHash, d as SignatureSigner, f as SignatureSigningKeyConfig, g as IntegrityMakeConfig, h as IntegrityAlgorithm, i as RemoteUploadParams, l as SignatureSignConfig, m as signSignature, n as RemoteConfig, o as SignatureAlgorithm, p as SigningKeyFormat, r as BaseRemoteUploader, s as SignatureEcdsaCurve, t as RemoteBundleDeployment, u as SignatureSignFn, v as IntegrityMaker, x as RemoteDeployParams, y as makeIntegrity } from "../index-cK1sn_xk.cjs";
1
+ import { _ as IntegrityMakeFn, a as RemoteUploadProgress, b as BaseRemoteDeployer, c as SignatureHash, d as SignatureSigner, f as SignatureSigningKeyConfig, g as IntegrityMakeConfig, h as IntegrityAlgorithm, i as RemoteUploadParams, l as SignatureSignConfig, m as signSignature, n as RemoteConfig, o as SignatureAlgorithm, p as SigningKeyFormat, r as BaseRemoteUploader, s as SignatureEcdsaCurve, t as RemoteBundleDeployment, u as SignatureSignFn, v as IntegrityMaker, x as RemoteDeployParams, y as makeIntegrity } from "../index-C5v3A9IM.cjs";
2
2
  export { BaseRemoteDeployer, BaseRemoteUploader, IntegrityAlgorithm, IntegrityMakeConfig, IntegrityMakeFn, IntegrityMaker, RemoteBundleDeployment, RemoteConfig, RemoteDeployParams, RemoteUploadParams, RemoteUploadProgress, SignatureAlgorithm, SignatureEcdsaCurve, SignatureHash, SignatureSignConfig, SignatureSignFn, SignatureSigner, SignatureSigningKeyConfig, SigningKeyFormat, makeIntegrity, signSignature };
@@ -1,2 +1,2 @@
1
- import { _ as IntegrityMakeFn, a as RemoteUploadProgress, b as BaseRemoteDeployer, c as SignatureHash, d as SignatureSigner, f as SignatureSigningKeyConfig, g as IntegrityMakeConfig, h as IntegrityAlgorithm, i as RemoteUploadParams, l as SignatureSignConfig, m as signSignature, n as RemoteConfig, o as SignatureAlgorithm, p as SigningKeyFormat, r as BaseRemoteUploader, s as SignatureEcdsaCurve, t as RemoteBundleDeployment, u as SignatureSignFn, v as IntegrityMaker, x as RemoteDeployParams, y as makeIntegrity } from "../index-Da62rQR9.mjs";
1
+ import { _ as IntegrityMakeFn, a as RemoteUploadProgress, b as BaseRemoteDeployer, c as SignatureHash, d as SignatureSigner, f as SignatureSigningKeyConfig, g as IntegrityMakeConfig, h as IntegrityAlgorithm, i as RemoteUploadParams, l as SignatureSignConfig, m as signSignature, n as RemoteConfig, o as SignatureAlgorithm, p as SigningKeyFormat, r as BaseRemoteUploader, s as SignatureEcdsaCurve, t as RemoteBundleDeployment, u as SignatureSignFn, v as IntegrityMaker, x as RemoteDeployParams, y as makeIntegrity } from "../index-f7Ruzcf_.mjs";
2
2
  export { BaseRemoteDeployer, BaseRemoteUploader, IntegrityAlgorithm, IntegrityMakeConfig, IntegrityMakeFn, IntegrityMaker, RemoteBundleDeployment, RemoteConfig, RemoteDeployParams, RemoteUploadParams, RemoteUploadProgress, SignatureAlgorithm, SignatureEcdsaCurve, SignatureHash, SignatureSignConfig, SignatureSignFn, SignatureSigner, SignatureSigningKeyConfig, SigningKeyFormat, makeIntegrity, signSignature };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wvb/config",
3
- "version": "0.0.0",
3
+ "version": "0.1.0-next.68e19d2",
4
4
  "description": "Configuration for webview bundle",
5
5
  "homepage": "https://github.com/webview-bundle/webview-bundle",
6
6
  "bugs": {
@@ -45,6 +45,6 @@
45
45
  "@types/node": "22.19.3",
46
46
  "tsdown": "0.20.1",
47
47
  "typescript": "5.9.3",
48
- "vitest": "4.0.15"
48
+ "vitest": "4.1.5"
49
49
  }
50
50
  }