@vmz/plugin 0.0.4 → 0.1.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.
Files changed (2) hide show
  1. package/index.d.ts +48 -4
  2. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -100,13 +100,13 @@ export interface VmzUserConfig {
100
100
  /** Application identity (optional authoring). */
101
101
  application?: { id?: string; [key: string]: unknown };
102
102
  /**
103
- * Site delivery (SiteDeliveryContract authoring). Pure data only.
104
- * Prefer `defineSite(...)` helper; never a parallel `vmz.site.ts` entry.
103
+ * Delivery: named profiles (`default` + `profiles`) or legacy site sugar.
104
+ * Pure data only; never a parallel `vmz.site.ts` entry.
105
105
  */
106
- delivery?: SiteDeliveryAuthoring;
106
+ delivery?: DeliveryAuthoring;
107
107
  }
108
108
 
109
- /** Authoring shape for `defineConfig({ delivery })`normalized at build to SiteDeliveryContract. */
109
+ /** Site resource sources (embedded | filesystem | remote) — orthogonal to assembly. */
110
110
  export interface SiteDeliveryAuthoring {
111
111
  artifact: string;
112
112
  siteId?: string;
@@ -138,6 +138,50 @@ export interface SiteDeliveryAuthoring {
138
138
  securityPolicy?: unknown;
139
139
  }
140
140
 
141
+ export type DeliveryAssembly = 'local-static' | 'static-cdn' | 'server-host' | 'cdn+server' | 'rust-embedded';
142
+
143
+ export type DeliveryServerRuntime = 'node' | 'worker' | 'deno' | 'bun' | 'rust-host';
144
+
145
+ export interface DeliveryProfileAuthoring {
146
+ host?: 'browser';
147
+ assembly: DeliveryAssembly;
148
+ serverRuntime?: DeliveryServerRuntime;
149
+ /** Inline site sources or `defineSite({...})`. */
150
+ sources?: SiteDeliveryAuthoring | SiteDeliveryAuthoring['sources'];
151
+ artifact?: string;
152
+ resolution?: SiteDeliveryAuthoring['resolution'];
153
+ activation?: SiteDeliveryAuthoring['activation'];
154
+ }
155
+
156
+ /** WeChat DevTools project identity. Pure data; not WeChat JSON / wx.* APIs. */
157
+ export interface WechatPackagingAuthoring {
158
+ /** Registered AppID. Omit for WeChat tourist mode (`touristappid`). */
159
+ appId?: string;
160
+ projectName?: string;
161
+ /** `app.json` `window.navigationBarTitleText`. */
162
+ title?: string;
163
+ }
164
+
165
+ /** Vendor packaging identity under `defineConfig({ delivery })`. */
166
+ export interface DeliveryPackagingAuthoring {
167
+ wechat?: WechatPackagingAuthoring;
168
+ }
169
+
170
+ /** Named profiles (preferred) or legacy site-only sugar. */
171
+ export type DeliveryAuthoring =
172
+ | {
173
+ default?: string;
174
+ profiles: Record<string, DeliveryProfileAuthoring>;
175
+ packaging?: DeliveryPackagingAuthoring;
176
+ }
177
+ | (SiteDeliveryAuthoring & {
178
+ default?: string;
179
+ assembly?: DeliveryAssembly;
180
+ host?: 'browser';
181
+ serverRuntime?: DeliveryServerRuntime;
182
+ packaging?: DeliveryPackagingAuthoring;
183
+ });
184
+
141
185
  export type DefinePluginInput = PluginManifest & {
142
186
  contribute?: VmzPlugin['contribute'];
143
187
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vmz/plugin",
3
- "version": "0.0.4",
3
+ "version": "0.1.1",
4
4
  "type": "module",
5
5
  "description": "VMZ plugin protocol types and definePlugin / defineConfig helpers (no N-API)",
6
6
  "license": "MIT",
@@ -18,7 +18,7 @@
18
18
  "README.md"
19
19
  ],
20
20
  "dependencies": {
21
- "@vmz/protocol": "0.0.4"
21
+ "@vmz/protocol": "0.1.1"
22
22
  },
23
23
  "keywords": [
24
24
  "vmz",