@vizejs/native 0.100.0 → 0.101.0

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 (3) hide show
  1. package/index.d.ts +119 -0
  2. package/index.js +79 -52
  3. package/package.json +11 -11
package/index.d.ts CHANGED
@@ -166,6 +166,28 @@ export interface CatalogOutputNapi {
166
166
  tags: Array<string>;
167
167
  }
168
168
 
169
+ export interface DefineReplacementNapi {
170
+ key: string;
171
+ value: string;
172
+ }
173
+
174
+ export interface CssAliasRuleNapi {
175
+ find: string;
176
+ replacement: string;
177
+ isRegex: boolean;
178
+ flags?: string;
179
+ }
180
+
181
+ export interface DynamicImportAliasRuleNapi {
182
+ fromPrefix: string;
183
+ toPrefix: string;
184
+ }
185
+
186
+ export interface ViteIdPartsNapi {
187
+ request: string;
188
+ querySuffix: string;
189
+ }
190
+
169
191
  /**
170
192
  * Classify a Vite plugin module request using the native Vize request model.
171
193
  * This keeps pure query parsing and virtual module categorization in Rust while
@@ -173,6 +195,82 @@ export interface CatalogOutputNapi {
173
195
  */
174
196
  export declare function classifyVitePluginRequest(id: string): VitePluginRequestNapi;
175
197
 
198
+ export declare function scopeViteCssForPipeline(css: string, scopeId: string): string;
199
+
200
+ export declare function resolveViteCssImports(
201
+ css: string,
202
+ importer: string,
203
+ aliasRules: Array<CssAliasRuleNapi>,
204
+ isDev?: boolean | undefined | null,
205
+ devUrlBase?: string | undefined | null,
206
+ ): string;
207
+
208
+ export declare function splitViteIdQuery(id: string): ViteIdPartsNapi;
209
+
210
+ export declare function isViteBareSpecifier(id: string): boolean;
211
+
212
+ export declare function normalizeViteRequireBase(
213
+ importer?: string | undefined | null,
214
+ ): string | null;
215
+
216
+ export declare function resolveViteAliasRequest(
217
+ id: string,
218
+ aliasRules: Array<CssAliasRuleNapi>,
219
+ ): string | null;
220
+
221
+ export declare function normalizeViteResolvedVuePath(id: string): string | null;
222
+
223
+ export declare function resolveViteVuePath(
224
+ root: string,
225
+ id: string,
226
+ importer?: string | undefined | null,
227
+ ): string;
228
+
229
+ export declare function createViteBareImportBases(
230
+ root: string,
231
+ importer?: string | undefined | null,
232
+ ): Array<string>;
233
+
234
+ export declare function createViteBareImportCandidates(
235
+ id: string,
236
+ aliasRules: Array<CssAliasRuleNapi>,
237
+ resolvedId?: string | undefined | null,
238
+ ): Array<string>;
239
+
240
+ export declare function resolveViteRelativeImport(id: string, importer: string): string | null;
241
+
242
+ export declare function createViteVirtualId(
243
+ realPath: string,
244
+ ssr?: boolean | undefined | null,
245
+ ): string;
246
+
247
+ export declare function fromViteVirtualId(virtualId: string): string;
248
+
249
+ export declare function normalizeViteVirtualVueModuleId(id: string): string;
250
+
251
+ export declare function normalizeViteFsIdForBuild(id: string): string;
252
+
253
+ export declare function toViteBrowserImportPrefix(replacement: string): string;
254
+
255
+ export declare function rewriteViteStaticAssetUrls(
256
+ code: string,
257
+ aliasRules: Array<DynamicImportAliasRuleNapi>,
258
+ ): string;
259
+
260
+ export declare function rewriteViteDynamicTemplateImports(
261
+ code: string,
262
+ aliasRules: Array<DynamicImportAliasRuleNapi>,
263
+ ): string;
264
+
265
+ export declare function isBuiltinViteDefine(key: string): boolean;
266
+
267
+ export declare function shouldApplyViteDefineInVirtualModule(key: string): boolean;
268
+
269
+ export declare function applyViteDefineReplacements(
270
+ code: string,
271
+ defines: Array<DefineReplacementNapi>,
272
+ ): string;
273
+
176
274
  /** Compile Vue template to VDom render function */
177
275
  export declare function compile(
178
276
  template: string,
@@ -537,6 +635,9 @@ export interface PropDefinitionNapi {
537
635
  defaultValue?: any;
538
636
  }
539
637
 
638
+ /** Run the Rust Vize CLI with argv-style arguments. */
639
+ export declare function runCli(args: Array<string>): void;
640
+
540
641
  /** Range config for NAPI */
541
642
  export interface RangeConfigNapi {
542
643
  min: number;
@@ -696,6 +797,24 @@ export interface VitePluginRequestNapi {
696
797
  boundaryKind?: string;
697
798
  }
698
799
 
800
+ export interface HmrHashesNapi {
801
+ scriptHash?: string;
802
+ templateHash?: string;
803
+ styleHash?: string;
804
+ }
805
+
806
+ export declare function hasViteHmrChanges(
807
+ prev: HmrHashesNapi | undefined | null,
808
+ next: HmrHashesNapi,
809
+ ): boolean;
810
+
811
+ export declare function detectViteHmrUpdateType(
812
+ prev: HmrHashesNapi | undefined | null,
813
+ next: HmrHashesNapi,
814
+ ): string;
815
+
816
+ export declare function generateViteHmrCode(scopeId: string, updateType: string): string;
817
+
699
818
  /** Type diagnostic for NAPI */
700
819
  export interface TypeDiagnosticNapi {
701
820
  severity: string;
package/index.js CHANGED
@@ -80,12 +80,12 @@ function requireNative() {
80
80
  const binding = require("@vizejs/native-android-arm64");
81
81
  const bindingPackageVersion = require("@vizejs/native-android-arm64/package.json").version;
82
82
  if (
83
- bindingPackageVersion !== "0.78.0" &&
83
+ bindingPackageVersion !== "0.100.0" &&
84
84
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
85
85
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
86
86
  ) {
87
87
  throw new Error(
88
- `Native binding package version mismatch, expected 0.78.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
88
+ `Native binding package version mismatch, expected 0.100.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
89
89
  );
90
90
  }
91
91
  return binding;
@@ -103,12 +103,12 @@ function requireNative() {
103
103
  const bindingPackageVersion =
104
104
  require("@vizejs/native-android-arm-eabi/package.json").version;
105
105
  if (
106
- bindingPackageVersion !== "0.78.0" &&
106
+ bindingPackageVersion !== "0.100.0" &&
107
107
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
108
108
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
109
109
  ) {
110
110
  throw new Error(
111
- `Native binding package version mismatch, expected 0.78.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
111
+ `Native binding package version mismatch, expected 0.100.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
112
112
  );
113
113
  }
114
114
  return binding;
@@ -134,12 +134,12 @@ function requireNative() {
134
134
  const bindingPackageVersion =
135
135
  require("@vizejs/native-win32-x64-gnu/package.json").version;
136
136
  if (
137
- bindingPackageVersion !== "0.78.0" &&
137
+ bindingPackageVersion !== "0.100.0" &&
138
138
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
139
139
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
140
140
  ) {
141
141
  throw new Error(
142
- `Native binding package version mismatch, expected 0.78.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
142
+ `Native binding package version mismatch, expected 0.100.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
143
143
  );
144
144
  }
145
145
  return binding;
@@ -157,12 +157,12 @@ function requireNative() {
157
157
  const bindingPackageVersion =
158
158
  require("@vizejs/native-win32-x64-msvc/package.json").version;
159
159
  if (
160
- bindingPackageVersion !== "0.78.0" &&
160
+ bindingPackageVersion !== "0.100.0" &&
161
161
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
162
162
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
163
163
  ) {
164
164
  throw new Error(
165
- `Native binding package version mismatch, expected 0.78.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
165
+ `Native binding package version mismatch, expected 0.100.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
166
166
  );
167
167
  }
168
168
  return binding;
@@ -181,12 +181,12 @@ function requireNative() {
181
181
  const bindingPackageVersion =
182
182
  require("@vizejs/native-win32-ia32-msvc/package.json").version;
183
183
  if (
184
- bindingPackageVersion !== "0.78.0" &&
184
+ bindingPackageVersion !== "0.100.0" &&
185
185
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
186
186
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
187
187
  ) {
188
188
  throw new Error(
189
- `Native binding package version mismatch, expected 0.78.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
189
+ `Native binding package version mismatch, expected 0.100.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
190
190
  );
191
191
  }
192
192
  return binding;
@@ -204,12 +204,12 @@ function requireNative() {
204
204
  const bindingPackageVersion =
205
205
  require("@vizejs/native-win32-arm64-msvc/package.json").version;
206
206
  if (
207
- bindingPackageVersion !== "0.78.0" &&
207
+ bindingPackageVersion !== "0.100.0" &&
208
208
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
209
209
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
210
210
  ) {
211
211
  throw new Error(
212
- `Native binding package version mismatch, expected 0.78.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
212
+ `Native binding package version mismatch, expected 0.100.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
213
213
  );
214
214
  }
215
215
  return binding;
@@ -229,12 +229,12 @@ function requireNative() {
229
229
  const binding = require("@vizejs/native-darwin-universal");
230
230
  const bindingPackageVersion = require("@vizejs/native-darwin-universal/package.json").version;
231
231
  if (
232
- bindingPackageVersion !== "0.78.0" &&
232
+ bindingPackageVersion !== "0.100.0" &&
233
233
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
234
234
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
235
235
  ) {
236
236
  throw new Error(
237
- `Native binding package version mismatch, expected 0.78.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
237
+ `Native binding package version mismatch, expected 0.100.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
238
238
  );
239
239
  }
240
240
  return binding;
@@ -251,12 +251,12 @@ function requireNative() {
251
251
  const binding = require("@vizejs/native-darwin-x64");
252
252
  const bindingPackageVersion = require("@vizejs/native-darwin-x64/package.json").version;
253
253
  if (
254
- bindingPackageVersion !== "0.78.0" &&
254
+ bindingPackageVersion !== "0.100.0" &&
255
255
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
256
256
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
257
257
  ) {
258
258
  throw new Error(
259
- `Native binding package version mismatch, expected 0.78.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
259
+ `Native binding package version mismatch, expected 0.100.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
260
260
  );
261
261
  }
262
262
  return binding;
@@ -273,12 +273,12 @@ function requireNative() {
273
273
  const binding = require("@vizejs/native-darwin-arm64");
274
274
  const bindingPackageVersion = require("@vizejs/native-darwin-arm64/package.json").version;
275
275
  if (
276
- bindingPackageVersion !== "0.78.0" &&
276
+ bindingPackageVersion !== "0.100.0" &&
277
277
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
278
278
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
279
279
  ) {
280
280
  throw new Error(
281
- `Native binding package version mismatch, expected 0.78.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
281
+ `Native binding package version mismatch, expected 0.100.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
282
282
  );
283
283
  }
284
284
  return binding;
@@ -299,12 +299,12 @@ function requireNative() {
299
299
  const binding = require("@vizejs/native-freebsd-x64");
300
300
  const bindingPackageVersion = require("@vizejs/native-freebsd-x64/package.json").version;
301
301
  if (
302
- bindingPackageVersion !== "0.78.0" &&
302
+ bindingPackageVersion !== "0.100.0" &&
303
303
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
304
304
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
305
305
  ) {
306
306
  throw new Error(
307
- `Native binding package version mismatch, expected 0.78.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
307
+ `Native binding package version mismatch, expected 0.100.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
308
308
  );
309
309
  }
310
310
  return binding;
@@ -321,12 +321,12 @@ function requireNative() {
321
321
  const binding = require("@vizejs/native-freebsd-arm64");
322
322
  const bindingPackageVersion = require("@vizejs/native-freebsd-arm64/package.json").version;
323
323
  if (
324
- bindingPackageVersion !== "0.78.0" &&
324
+ bindingPackageVersion !== "0.100.0" &&
325
325
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
326
326
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
327
327
  ) {
328
328
  throw new Error(
329
- `Native binding package version mismatch, expected 0.78.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
329
+ `Native binding package version mismatch, expected 0.100.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
330
330
  );
331
331
  }
332
332
  return binding;
@@ -349,12 +349,12 @@ function requireNative() {
349
349
  const bindingPackageVersion =
350
350
  require("@vizejs/native-linux-x64-musl/package.json").version;
351
351
  if (
352
- bindingPackageVersion !== "0.78.0" &&
352
+ bindingPackageVersion !== "0.100.0" &&
353
353
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
354
354
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
355
355
  ) {
356
356
  throw new Error(
357
- `Native binding package version mismatch, expected 0.78.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
357
+ `Native binding package version mismatch, expected 0.100.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
358
358
  );
359
359
  }
360
360
  return binding;
@@ -372,12 +372,12 @@ function requireNative() {
372
372
  const bindingPackageVersion =
373
373
  require("@vizejs/native-linux-x64-gnu/package.json").version;
374
374
  if (
375
- bindingPackageVersion !== "0.78.0" &&
375
+ bindingPackageVersion !== "0.100.0" &&
376
376
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
377
377
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
378
378
  ) {
379
379
  throw new Error(
380
- `Native binding package version mismatch, expected 0.78.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
380
+ `Native binding package version mismatch, expected 0.100.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
381
381
  );
382
382
  }
383
383
  return binding;
@@ -397,12 +397,12 @@ function requireNative() {
397
397
  const bindingPackageVersion =
398
398
  require("@vizejs/native-linux-arm64-musl/package.json").version;
399
399
  if (
400
- bindingPackageVersion !== "0.78.0" &&
400
+ bindingPackageVersion !== "0.100.0" &&
401
401
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
402
402
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
403
403
  ) {
404
404
  throw new Error(
405
- `Native binding package version mismatch, expected 0.78.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
405
+ `Native binding package version mismatch, expected 0.100.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
406
406
  );
407
407
  }
408
408
  return binding;
@@ -420,12 +420,12 @@ function requireNative() {
420
420
  const bindingPackageVersion =
421
421
  require("@vizejs/native-linux-arm64-gnu/package.json").version;
422
422
  if (
423
- bindingPackageVersion !== "0.78.0" &&
423
+ bindingPackageVersion !== "0.100.0" &&
424
424
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
425
425
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
426
426
  ) {
427
427
  throw new Error(
428
- `Native binding package version mismatch, expected 0.78.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
428
+ `Native binding package version mismatch, expected 0.100.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
429
429
  );
430
430
  }
431
431
  return binding;
@@ -445,12 +445,12 @@ function requireNative() {
445
445
  const bindingPackageVersion =
446
446
  require("@vizejs/native-linux-arm-musleabihf/package.json").version;
447
447
  if (
448
- bindingPackageVersion !== "0.78.0" &&
448
+ bindingPackageVersion !== "0.100.0" &&
449
449
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
450
450
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
451
451
  ) {
452
452
  throw new Error(
453
- `Native binding package version mismatch, expected 0.78.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
453
+ `Native binding package version mismatch, expected 0.100.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
454
454
  );
455
455
  }
456
456
  return binding;
@@ -468,12 +468,12 @@ function requireNative() {
468
468
  const bindingPackageVersion =
469
469
  require("@vizejs/native-linux-arm-gnueabihf/package.json").version;
470
470
  if (
471
- bindingPackageVersion !== "0.78.0" &&
471
+ bindingPackageVersion !== "0.100.0" &&
472
472
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
473
473
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
474
474
  ) {
475
475
  throw new Error(
476
- `Native binding package version mismatch, expected 0.78.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
476
+ `Native binding package version mismatch, expected 0.100.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
477
477
  );
478
478
  }
479
479
  return binding;
@@ -493,12 +493,12 @@ function requireNative() {
493
493
  const bindingPackageVersion =
494
494
  require("@vizejs/native-linux-loong64-musl/package.json").version;
495
495
  if (
496
- bindingPackageVersion !== "0.78.0" &&
496
+ bindingPackageVersion !== "0.100.0" &&
497
497
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
498
498
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
499
499
  ) {
500
500
  throw new Error(
501
- `Native binding package version mismatch, expected 0.78.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
501
+ `Native binding package version mismatch, expected 0.100.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
502
502
  );
503
503
  }
504
504
  return binding;
@@ -516,12 +516,12 @@ function requireNative() {
516
516
  const bindingPackageVersion =
517
517
  require("@vizejs/native-linux-loong64-gnu/package.json").version;
518
518
  if (
519
- bindingPackageVersion !== "0.78.0" &&
519
+ bindingPackageVersion !== "0.100.0" &&
520
520
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
521
521
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
522
522
  ) {
523
523
  throw new Error(
524
- `Native binding package version mismatch, expected 0.78.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
524
+ `Native binding package version mismatch, expected 0.100.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
525
525
  );
526
526
  }
527
527
  return binding;
@@ -541,12 +541,12 @@ function requireNative() {
541
541
  const bindingPackageVersion =
542
542
  require("@vizejs/native-linux-riscv64-musl/package.json").version;
543
543
  if (
544
- bindingPackageVersion !== "0.78.0" &&
544
+ bindingPackageVersion !== "0.100.0" &&
545
545
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
546
546
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
547
547
  ) {
548
548
  throw new Error(
549
- `Native binding package version mismatch, expected 0.78.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
549
+ `Native binding package version mismatch, expected 0.100.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
550
550
  );
551
551
  }
552
552
  return binding;
@@ -564,12 +564,12 @@ function requireNative() {
564
564
  const bindingPackageVersion =
565
565
  require("@vizejs/native-linux-riscv64-gnu/package.json").version;
566
566
  if (
567
- bindingPackageVersion !== "0.78.0" &&
567
+ bindingPackageVersion !== "0.100.0" &&
568
568
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
569
569
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
570
570
  ) {
571
571
  throw new Error(
572
- `Native binding package version mismatch, expected 0.78.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
572
+ `Native binding package version mismatch, expected 0.100.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
573
573
  );
574
574
  }
575
575
  return binding;
@@ -588,12 +588,12 @@ function requireNative() {
588
588
  const bindingPackageVersion =
589
589
  require("@vizejs/native-linux-ppc64-gnu/package.json").version;
590
590
  if (
591
- bindingPackageVersion !== "0.78.0" &&
591
+ bindingPackageVersion !== "0.100.0" &&
592
592
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
593
593
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
594
594
  ) {
595
595
  throw new Error(
596
- `Native binding package version mismatch, expected 0.78.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
596
+ `Native binding package version mismatch, expected 0.100.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
597
597
  );
598
598
  }
599
599
  return binding;
@@ -611,12 +611,12 @@ function requireNative() {
611
611
  const bindingPackageVersion =
612
612
  require("@vizejs/native-linux-s390x-gnu/package.json").version;
613
613
  if (
614
- bindingPackageVersion !== "0.78.0" &&
614
+ bindingPackageVersion !== "0.100.0" &&
615
615
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
616
616
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
617
617
  ) {
618
618
  throw new Error(
619
- `Native binding package version mismatch, expected 0.78.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
619
+ `Native binding package version mismatch, expected 0.100.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
620
620
  );
621
621
  }
622
622
  return binding;
@@ -638,12 +638,12 @@ function requireNative() {
638
638
  const bindingPackageVersion =
639
639
  require("@vizejs/native-openharmony-arm64/package.json").version;
640
640
  if (
641
- bindingPackageVersion !== "0.78.0" &&
641
+ bindingPackageVersion !== "0.100.0" &&
642
642
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
643
643
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
644
644
  ) {
645
645
  throw new Error(
646
- `Native binding package version mismatch, expected 0.78.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
646
+ `Native binding package version mismatch, expected 0.100.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
647
647
  );
648
648
  }
649
649
  return binding;
@@ -661,12 +661,12 @@ function requireNative() {
661
661
  const bindingPackageVersion =
662
662
  require("@vizejs/native-openharmony-x64/package.json").version;
663
663
  if (
664
- bindingPackageVersion !== "0.78.0" &&
664
+ bindingPackageVersion !== "0.100.0" &&
665
665
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
666
666
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
667
667
  ) {
668
668
  throw new Error(
669
- `Native binding package version mismatch, expected 0.78.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
669
+ `Native binding package version mismatch, expected 0.100.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
670
670
  );
671
671
  }
672
672
  return binding;
@@ -684,12 +684,12 @@ function requireNative() {
684
684
  const bindingPackageVersion =
685
685
  require("@vizejs/native-openharmony-arm/package.json").version;
686
686
  if (
687
- bindingPackageVersion !== "0.78.0" &&
687
+ bindingPackageVersion !== "0.100.0" &&
688
688
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
689
689
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
690
690
  ) {
691
691
  throw new Error(
692
- `Native binding package version mismatch, expected 0.78.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
692
+ `Native binding package version mismatch, expected 0.100.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
693
693
  );
694
694
  }
695
695
  return binding;
@@ -760,25 +760,52 @@ if (!nativeBinding) {
760
760
 
761
761
  module.exports = nativeBinding;
762
762
  module.exports.artToCsf = nativeBinding.artToCsf;
763
+ module.exports.applyViteDefineReplacements = nativeBinding.applyViteDefineReplacements;
764
+ module.exports.classifyVitePluginRequest = nativeBinding.classifyVitePluginRequest;
763
765
  module.exports.compile = nativeBinding.compile;
764
766
  module.exports.compileCss = nativeBinding.compileCss;
765
767
  module.exports.compileSfc = nativeBinding.compileSfc;
766
768
  module.exports.compileSfcBatch = nativeBinding.compileSfcBatch;
767
769
  module.exports.compileSfcBatchWithResults = nativeBinding.compileSfcBatchWithResults;
768
770
  module.exports.compileVapor = nativeBinding.compileVapor;
771
+ module.exports.createViteBareImportBases = nativeBinding.createViteBareImportBases;
772
+ module.exports.createViteBareImportCandidates = nativeBinding.createViteBareImportCandidates;
773
+ module.exports.createViteVirtualId = nativeBinding.createViteVirtualId;
774
+ module.exports.detectViteHmrUpdateType = nativeBinding.detectViteHmrUpdateType;
769
775
  module.exports.formatSfc = nativeBinding.formatSfc;
776
+ module.exports.fromViteVirtualId = nativeBinding.fromViteVirtualId;
770
777
  module.exports.generateArtCatalog = nativeBinding.generateArtCatalog;
771
778
  module.exports.generateArtDoc = nativeBinding.generateArtDoc;
772
779
  module.exports.generateArtDocsBatch = nativeBinding.generateArtDocsBatch;
773
780
  module.exports.generateArtPalette = nativeBinding.generateArtPalette;
774
781
  module.exports.generateDeclaration = nativeBinding.generateDeclaration;
775
782
  module.exports.generateVariants = nativeBinding.generateVariants;
783
+ module.exports.generateViteHmrCode = nativeBinding.generateViteHmrCode;
776
784
  module.exports.getPatinaRules = nativeBinding.getPatinaRules;
777
785
  module.exports.getTypeCheckCapabilities = nativeBinding.getTypeCheckCapabilities;
786
+ module.exports.hasViteHmrChanges = nativeBinding.hasViteHmrChanges;
787
+ module.exports.isBuiltinViteDefine = nativeBinding.isBuiltinViteDefine;
788
+ module.exports.isViteBareSpecifier = nativeBinding.isViteBareSpecifier;
778
789
  module.exports.lint = nativeBinding.lint;
779
790
  module.exports.lintPatinaSfc = nativeBinding.lintPatinaSfc;
791
+ module.exports.normalizeViteRequireBase = nativeBinding.normalizeViteRequireBase;
792
+ module.exports.normalizeViteResolvedVuePath = nativeBinding.normalizeViteResolvedVuePath;
793
+ module.exports.normalizeViteFsIdForBuild = nativeBinding.normalizeViteFsIdForBuild;
794
+ module.exports.normalizeViteVirtualVueModuleId = nativeBinding.normalizeViteVirtualVueModuleId;
780
795
  module.exports.parseArt = nativeBinding.parseArt;
781
796
  module.exports.parseSfc = nativeBinding.parseSfc;
782
797
  module.exports.parseTemplate = nativeBinding.parseTemplate;
798
+ module.exports.resolveViteAliasRequest = nativeBinding.resolveViteAliasRequest;
799
+ module.exports.resolveViteCssImports = nativeBinding.resolveViteCssImports;
800
+ module.exports.resolveViteRelativeImport = nativeBinding.resolveViteRelativeImport;
801
+ module.exports.resolveViteVuePath = nativeBinding.resolveViteVuePath;
802
+ module.exports.rewriteViteDynamicTemplateImports = nativeBinding.rewriteViteDynamicTemplateImports;
803
+ module.exports.rewriteViteStaticAssetUrls = nativeBinding.rewriteViteStaticAssetUrls;
804
+ module.exports.runCli = nativeBinding.runCli;
805
+ module.exports.scopeViteCssForPipeline = nativeBinding.scopeViteCssForPipeline;
806
+ module.exports.shouldApplyViteDefineInVirtualModule =
807
+ nativeBinding.shouldApplyViteDefineInVirtualModule;
808
+ module.exports.splitViteIdQuery = nativeBinding.splitViteIdQuery;
809
+ module.exports.toViteBrowserImportPrefix = nativeBinding.toViteBrowserImportPrefix;
783
810
  module.exports.typeCheck = nativeBinding.typeCheck;
784
811
  module.exports.typeCheckBatch = nativeBinding.typeCheckBatch;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vizejs/native",
3
- "version": "0.100.0",
3
+ "version": "0.101.0",
4
4
  "description": "High-performance Vue.js compiler - Native bindings",
5
5
  "keywords": [
6
6
  "compiler",
@@ -27,6 +27,16 @@
27
27
  "devDependencies": {
28
28
  "@napi-rs/cli": "3.6.2"
29
29
  },
30
+ "optionalDependencies": {
31
+ "@vizejs/native-darwin-arm64": "0.101.0",
32
+ "@vizejs/native-darwin-x64": "0.101.0",
33
+ "@vizejs/native-linux-arm64-gnu": "0.101.0",
34
+ "@vizejs/native-linux-arm64-musl": "0.101.0",
35
+ "@vizejs/native-linux-x64-gnu": "0.101.0",
36
+ "@vizejs/native-linux-x64-musl": "0.101.0",
37
+ "@vizejs/native-win32-arm64-msvc": "0.101.0",
38
+ "@vizejs/native-win32-x64-msvc": "0.101.0"
39
+ },
30
40
  "napi": {
31
41
  "binaryName": "vize-vitrine",
32
42
  "targets": [
@@ -40,16 +50,6 @@
40
50
  "aarch64-unknown-linux-musl"
41
51
  ]
42
52
  },
43
- "optionalDependencies": {
44
- "@vizejs/native-darwin-x64": "0.100.0",
45
- "@vizejs/native-darwin-arm64": "0.100.0",
46
- "@vizejs/native-win32-x64-msvc": "0.100.0",
47
- "@vizejs/native-win32-arm64-msvc": "0.100.0",
48
- "@vizejs/native-linux-x64-gnu": "0.100.0",
49
- "@vizejs/native-linux-x64-musl": "0.100.0",
50
- "@vizejs/native-linux-arm64-gnu": "0.100.0",
51
- "@vizejs/native-linux-arm64-musl": "0.100.0"
52
- },
53
53
  "scripts": {
54
54
  "build": "node ./scripts/build-local.mjs --release",
55
55
  "build:ci": "napi build --platform --profile ci --manifest-path ../../crates/vize_vitrine/Cargo.toml -p vize_vitrine --features napi --output-dir .",