@vmz/plugin 0.3.11 → 0.3.13

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 CHANGED
@@ -40,7 +40,7 @@ Official plugins export a factory: `pluginName(optional config)`, with the same
40
40
  `pluginName()` must behave exactly like the plugin's default configuration.
41
41
 
42
42
  ```ts
43
- import { defineConfig } from '@vmz/plugin';
43
+ import { defineConfig } from '@vmz/vmz';
44
44
  import katex from '@vmz/plugin-katex';
45
45
 
46
46
  export default defineConfig({
package/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- /** VMZ plugin protocol helpers — types + identity `define*` (no N-API). */
1
+ /** VMZ plugin protocol helpers — types + identity `definePlugin` (no N-API). */
2
2
 
3
3
  export { PLUGIN_PROTOCOL } from '@vmz/protocol';
4
4
 
@@ -94,123 +94,9 @@ export interface VmzEngines {
94
94
  markdown?: string;
95
95
  }
96
96
 
97
- /** Workspace format options (`vmz format` reads `vmz.config` `format`). */
98
- export interface VmzFormatConfig {
99
- /** Include globs under the project root. */
100
- includes?: string[];
101
- /** Skip paths under these globs after includes expand. */
102
- excludes?: string[];
103
- /** Run `cargo fmt` when a Cargo workspace is present. */
104
- rust?: boolean;
105
- /** Run the Oak CST formatter on JS/TS targets. */
106
- javascript?: boolean;
107
- /** Format `.vmz` author files via `vmz-formatter`. */
108
- vmz?: boolean;
109
- /** Biome-style formatter config (default: `biome.json` at project root). */
110
- style?: string;
111
- }
112
-
113
- export interface VmzUserConfig {
114
- plugins?: Array<string | VmzPlugin | Promise<VmzPlugin>>;
115
- engines?: VmzEngines;
116
- /** Workspace format targets and engines (`vmz format`). */
117
- format?: VmzFormatConfig;
118
- /** Application identity (optional authoring). */
119
- application?: { id?: string; [key: string]: unknown };
120
- /**
121
- * Delivery: named profiles (`default` + `profiles`) or legacy site sugar.
122
- * Pure data only; never a parallel `vmz.site.ts` entry.
123
- */
124
- delivery?: DeliveryAuthoring;
125
- }
126
-
127
- /** Site resource sources (embedded | filesystem | remote) — orthogonal to assembly. */
128
- export interface SiteDeliveryAuthoring {
129
- artifact: string;
130
- siteId?: string;
131
- sources: Array<{
132
- id: string;
133
- kind: 'embedded' | 'filesystem' | 'remote';
134
- directory?: string;
135
- baseUrl?: string;
136
- artifact?: string;
137
- trust?: string;
138
- timeoutMs?: number;
139
- priority?: number;
140
- integrity?: unknown;
141
- signaturePolicy?: string;
142
- }>;
143
- resolution?: {
144
- mode?: 'release';
145
- fallback?: string[];
146
- };
147
- activation?: 'atomic';
148
- expectedCompatibility?: unknown;
149
- failure?: unknown;
150
- failurePolicy?: unknown;
151
- update?: unknown;
152
- updatePolicy?: unknown;
153
- rollback?: unknown;
154
- rollbackPolicy?: unknown;
155
- security?: unknown;
156
- securityPolicy?: unknown;
157
- }
158
-
159
- export type DeliveryAssembly = 'local-static' | 'web-static' | 'server-host' | 'cdn+server' | 'rust-embedded';
160
-
161
- export type DeliveryServerRuntime = 'node' | 'worker' | 'deno' | 'bun' | 'rust-host';
162
-
163
- export interface DeliveryProfileAuthoring {
164
- host?: 'browser';
165
- assembly: DeliveryAssembly;
166
- /**
167
- * Artifact directory under CLI `--out-dir` (default = profile id).
168
- * Example: profile `static` + `name: 'cdn'` → `dist/cdn`.
169
- */
170
- name?: string;
171
- serverRuntime?: DeliveryServerRuntime;
172
- /** Inline site sources or `defineSite({...})`. */
173
- sources?: SiteDeliveryAuthoring | SiteDeliveryAuthoring['sources'];
174
- artifact?: string;
175
- resolution?: SiteDeliveryAuthoring['resolution'];
176
- activation?: SiteDeliveryAuthoring['activation'];
177
- }
178
-
179
- /** WeChat DevTools project identity. Pure data; not WeChat JSON / wx.* APIs. */
180
- export interface WechatPackagingAuthoring {
181
- /** Registered AppID. Omit for WeChat tourist mode (`touristappid`). */
182
- appId?: string;
183
- projectName?: string;
184
- /** `app.json` `window.navigationBarTitleText`. */
185
- title?: string;
186
- }
187
-
188
- /** Vendor packaging identity under `defineConfig({ delivery })`. */
189
- export interface DeliveryPackagingAuthoring {
190
- wechat?: WechatPackagingAuthoring;
191
- }
192
-
193
- /** Named profiles (preferred) or legacy site-only sugar. */
194
- export type DeliveryAuthoring =
195
- | {
196
- default?: string;
197
- profiles: Record<string, DeliveryProfileAuthoring>;
198
- packaging?: DeliveryPackagingAuthoring;
199
- }
200
- | (SiteDeliveryAuthoring & {
201
- default?: string;
202
- assembly?: DeliveryAssembly;
203
- host?: 'browser';
204
- serverRuntime?: DeliveryServerRuntime;
205
- packaging?: DeliveryPackagingAuthoring;
206
- });
207
-
208
97
  export type DefinePluginInput = PluginManifest & {
209
98
  contribute?: VmzPlugin['contribute'];
210
99
  };
211
100
 
212
101
  /** Identity helper for IDE inference. */
213
102
  export function definePlugin(def: DefinePluginInput): VmzPlugin;
214
-
215
- /** Identity helper for `vmz.config.ts` inference. */
216
- export function defineConfig(config: VmzUserConfig): VmzUserConfig;
package/index.js CHANGED
@@ -59,11 +59,3 @@ export function definePlugin(def) {
59
59
  contribute: def.contribute,
60
60
  };
61
61
  }
62
-
63
- /**
64
- * @param {import('./index.js').VmzUserConfig} config
65
- * @returns {import('./index.js').VmzUserConfig}
66
- */
67
- export function defineConfig(config) {
68
- return config ?? {};
69
- }
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "dependencies": {
3
- "@vmz/protocol": "0.3.11"
3
+ "@vmz/protocol": "0.3.13"
4
4
  },
5
- "description": "VMZ plugin protocol types and definePlugin / defineConfig helpers (no N-API)",
5
+ "description": "VMZ plugin protocol types and definePlugin helper (no N-API)",
6
6
  "exports": {
7
7
  ".": {
8
8
  "default": "./index.js",
@@ -31,5 +31,5 @@
31
31
  },
32
32
  "type": "module",
33
33
  "types": "./index.d.ts",
34
- "version": "0.3.11"
34
+ "version": "0.3.13"
35
35
  }