vite-plugin-zephyr 1.2.3 → 1.3.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.
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- export { withZephyr } from './lib/vite-plugin-zephyr';
2
- export { withZephyrPartial } from './lib/vite-plugin-zephyr-partial';
3
- export type { WithZephyrOptions } from './lib/vite-plugin-zephyr';
4
- export type { VitePartialBuildOptions } from './lib/internal/partial-build-scope';
5
- export type { ModuleFederationOptions } from './lib/internal/mf-vite-etl/ensure_runtime_plugin';
1
+ export { withZephyr } from './lib/vite-plugin-zephyr.js';
2
+ export { withZephyrPartial } from './lib/vite-plugin-zephyr-partial.js';
3
+ export type { WithZephyrOptions } from './lib/vite-plugin-zephyr.js';
4
+ export type { VitePartialBuildOptions } from './lib/internal/partial-build-scope.js';
5
+ export type { ModuleFederationOptions } from './lib/internal/mf-vite-etl/ensure_runtime_plugin.js';
6
6
  export type { ZephyrBuildHooks, DeploymentInfo } from 'zephyr-agent';
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,4 @@
1
- import type { Plugin, PluginOption } from 'vite' with {
2
- 'resolution-mode': 'import'
1
+ import type { Plugin, PluginOption } from 'vite' with { 'resolution-mode': 'import'
3
2
  };
4
3
  import type { ModuleFederationOptions } from '../mf-vite-etl/ensure_runtime_plugin.mjs';
5
4
  export interface ViteMFPlugin {
@@ -1,7 +1,6 @@
1
- import type { Plugin, PluginOption } from 'vite' with {
2
- 'resolution-mode': 'import'
1
+ import type { Plugin, PluginOption } from 'vite' with { 'resolution-mode': 'import'
3
2
  };
4
- import type { ModuleFederationOptions } from '../mf-vite-etl/ensure_runtime_plugin';
3
+ import type { ModuleFederationOptions } from '../mf-vite-etl/ensure_runtime_plugin.js';
5
4
  export interface ViteMFPlugin {
6
5
  _options: ModuleFederationOptions;
7
6
  }
@@ -1,4 +1,4 @@
1
1
  import { type ZeBuildAssetsMap, type ZephyrEngine } from 'zephyr-agent';
2
- import type { ZephyrInternalOptions } from '../types/zephyr-internal-options';
2
+ import type { ZephyrInternalOptions } from '../types/zephyr-internal-options.js';
3
3
  export declare function extract_vite_assets_map(_zephyr_engine: ZephyrEngine, vite_internal_options: ZephyrInternalOptions): Promise<ZeBuildAssetsMap>;
4
4
  //# sourceMappingURL=extract_vite_assets_map.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { type ZephyrBuildTarget } from 'zephyr-agent';
2
- import type { ZephyrOutputAsset } from '../types/zephyr-output';
2
+ import type { ZephyrOutputAsset } from '../types/zephyr-output.js';
3
3
  interface LoadPublicDirOptions {
4
4
  outDir: string;
5
5
  publicDir: string;
@@ -1,4 +1,4 @@
1
- import type { ZephyrInternalOptions } from '../types/zephyr-internal-options';
2
- import type { ZephyrOutputBundle } from '../types/zephyr-output';
1
+ import type { ZephyrInternalOptions } from '../types/zephyr-internal-options.js';
2
+ import type { ZephyrOutputBundle } from '../types/zephyr-output.js';
3
3
  export declare function loadStaticAssets(vite_internal_options: ZephyrInternalOptions): Promise<ZephyrOutputBundle>;
4
4
  //# sourceMappingURL=load_static_assets.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { type ZephyrBuildTarget } from 'zephyr-agent';
2
- import type { ZephyrOutputAsset } from '../types/zephyr-output';
2
+ import type { ZephyrOutputAsset } from '../types/zephyr-output.js';
3
3
  interface LoadStaticEntriesOptions {
4
4
  root: string;
5
5
  outDir: string;
@@ -1,5 +1,5 @@
1
1
  import { type ZephyrBuildTarget } from 'zephyr-agent';
2
- import type { ZephyrOutput, ZephyrOutputBundle } from '../types/zephyr-output';
2
+ import type { ZephyrOutput, ZephyrOutputBundle } from '../types/zephyr-output.js';
3
3
  export interface MergeViteOutputAssetsOptions {
4
4
  /** TAP paths are protocol values and must already use their published spelling. */
5
5
  target?: ZephyrBuildTarget;
@@ -1,4 +1,4 @@
1
- import type { ModuleFederationManifestOptions, ModuleFederationOptions } from './ensure_runtime_plugin';
1
+ import type { ModuleFederationManifestOptions, ModuleFederationOptions } from './ensure_runtime_plugin.js';
2
2
  /** The established single-container snapshot shape. */
3
3
  export interface ViteLegacyModuleFederationConfig {
4
4
  name: string;
@@ -1,5 +1,5 @@
1
1
  import type { ZephyrBuildTarget } from 'zephyr-agent';
2
- import type { ZephyrOutputBundle } from './zephyr-output';
2
+ import type { ZephyrOutputBundle } from './zephyr-output.js';
3
3
  export interface ZephyrInternalOptions {
4
4
  root: string;
5
5
  outDir: string;
@@ -1,5 +1,4 @@
1
- import type { Plugin } from 'vite' with {
2
- 'resolution-mode': 'import'
1
+ import type { Plugin } from 'vite' with { 'resolution-mode': 'import'
3
2
  };
4
3
  import { type VitePartialBuildOptions } from './internal/partial-build-scope.mjs';
5
4
  export declare function withZephyrPartial(options?: VitePartialBuildOptions): Plugin;
@@ -1,6 +1,5 @@
1
- import type { Plugin } from 'vite' with {
2
- 'resolution-mode': 'import'
1
+ import type { Plugin } from 'vite' with { 'resolution-mode': 'import'
3
2
  };
4
- import { type VitePartialBuildOptions } from './internal/partial-build-scope';
3
+ import { type VitePartialBuildOptions } from './internal/partial-build-scope.js';
5
4
  export declare function withZephyrPartial(options?: VitePartialBuildOptions): Plugin;
6
5
  //# sourceMappingURL=vite-plugin-zephyr-partial.d.ts.map
@@ -1,5 +1,4 @@
1
- import type { Plugin } from 'vite' with {
2
- 'resolution-mode': 'import'
1
+ import type { Plugin } from 'vite' with { 'resolution-mode': 'import'
3
2
  };
4
3
  import { type ZephyrBuildHooks, type ZephyrBuildTarget } from 'zephyr-agent';
5
4
  import { type ModuleFederationOptions } from './internal/mf-vite-etl/ensure_runtime_plugin.mjs';
@@ -1,9 +1,8 @@
1
- import type { Plugin } from 'vite' with {
2
- 'resolution-mode': 'import'
1
+ import type { Plugin } from 'vite' with { 'resolution-mode': 'import'
3
2
  };
4
3
  import { type ZephyrBuildHooks, type ZephyrBuildTarget } from 'zephyr-agent';
5
- import { type ModuleFederationOptions } from './internal/mf-vite-etl/ensure_runtime_plugin';
6
- import { type VitePartialBuildOptions } from './internal/partial-build-scope';
4
+ import { type ModuleFederationOptions } from './internal/mf-vite-etl/ensure_runtime_plugin.js';
5
+ import { type VitePartialBuildOptions } from './internal/partial-build-scope.js';
7
6
  export interface WithZephyrOptions {
8
7
  /** Zephyr build target, including the `tap-app` mini-app artifact family. */
9
8
  target?: ZephyrBuildTarget;
@@ -504,11 +504,6 @@ var __webpack_exports__ = {};
504
504
  }
505
505
  if (!zephyr_engine.hasActiveBuild) await zephyr_engine.start_new_build();
506
506
  const federationMetadata = getModuleFederationPublicationMetadata();
507
- (0, external_zephyr_agent_namespaceObject.assertTapFederationPublicationMetadata)({
508
- target: options.target,
509
- mfConfigs: federationMetadata.mfConfigs,
510
- federation: federationMetadata.federation
511
- });
512
507
  await zephyr_engine.upload_assets({
513
508
  assetsMap,
514
509
  buildStats: attachViteFederationBuildStats(await (0, external_zephyr_agent_namespaceObject.zeBuildDashData)(zephyr_engine), federationMetadata),
@@ -623,11 +618,6 @@ var __webpack_exports__ = {};
623
618
  message: 'Vite upload metadata was not prepared.'
624
619
  });
625
620
  const federationMetadata = getModuleFederationPublicationMetadata();
626
- (0, external_zephyr_agent_namespaceObject.assertTapFederationPublicationMetadata)({
627
- target: options.target,
628
- mfConfigs: federationMetadata.mfConfigs,
629
- federation: federationMetadata.federation
630
- });
631
621
  await zephyrEngine.upload_assets({
632
622
  assetsMap,
633
623
  buildStats: attachViteFederationBuildStats(await (0, external_zephyr_agent_namespaceObject.zeBuildDashData)(zephyrEngine), federationMetadata),
@@ -645,7 +635,6 @@ var __webpack_exports__ = {};
645
635
  const session = applicationContext.beginBuild({
646
636
  invocationId: `${buildInvocationId}:${generation}`,
647
637
  generation,
648
- strictAssetPaths: preservesLockedArtifactPaths,
649
638
  participants: [
650
639
  ...environments.map(([name, environment])=>({
651
640
  name,
@@ -2,7 +2,7 @@ import "node:module";
2
2
  import { readFile } from "node:fs/promises";
3
3
  import { createHash, randomUUID } from "node:crypto";
4
4
  import magic_string from "magic-string";
5
- import { ApplicationContext, ZeErrors, ZephyrEngine, ZephyrError, assertTapFederationPublicationMetadata, assertZephyrBuildTarget, claimPartialAssetMapBatch, commitPartialAssetMapClaimBatch, createManifestContent, handleGlobalError, normalizeBasePath, rewriteEnvReadsToVirtualModule, rollbackPartialAssetMapClaimBatch, savePartialAssetMap, zeBuildAssets, zeBuildDashData, ze_log } from "zephyr-agent";
5
+ import { ApplicationContext, ZeErrors, ZephyrEngine, ZephyrError, assertZephyrBuildTarget, claimPartialAssetMapBatch, commitPartialAssetMapClaimBatch, createManifestContent, handleGlobalError, normalizeBasePath, rewriteEnvReadsToVirtualModule, rollbackPartialAssetMapClaimBatch, savePartialAssetMap, zeBuildAssets, zeBuildDashData, ze_log } from "zephyr-agent";
6
6
  import { extractEntrypoint } from "./internal/extract/extract-entrypoint.mjs";
7
7
  import { extract_mf_plugins } from "./internal/extract/extract_mf_plugin.mjs";
8
8
  import { extract_vite_assets_map } from "./internal/extract/extract_vite_assets_map.mjs";
@@ -10,12 +10,13 @@ import { RESOLVED_ZEPHYR_MF_RUNTIME_PLUGIN_ID, ZEPHYR_MF_RUNTIME_PLUGIN_ID, ensu
10
10
  import { extract_remotes_dependencies } from "./internal/mf-vite-etl/extract-mf-vite-remotes.mjs";
11
11
  import { createViteModuleFederationPublicationMetadata, getConfigIdentities } from "./internal/mf-vite-etl/federation-metadata.mjs";
12
12
  import { resolveVitePartialBuildScope } from "./internal/partial-build-scope.mjs";
13
- import { __webpack_require__ } from "../rslib-runtime.mjs";
14
- import * as __rspack_external__module_federation_vite_fd47a9e9 from "@module-federation/vite";
13
+ import { __webpack_require__ } from "../rslib-runtime~0.mjs";
14
+ import { createRequire as __rspack_createRequire } from "node:module";
15
+ const __rspack_createRequire_require = __rspack_createRequire(import.meta.url);
15
16
  import * as __rspack_external_node_path_806ed179 from "node:path";
16
17
  __webpack_require__.add({
17
18
  "@module-federation/vite" (module) {
18
- module.exports = __rspack_external__module_federation_vite_fd47a9e9;
19
+ module.exports = __rspack_createRequire_require("@module-federation/vite");
19
20
  }
20
21
  });
21
22
  const DEFAULT_LIBRARY_TYPE = 'module';
@@ -455,11 +456,6 @@ function withZephyrCore(options = {}) {
455
456
  }
456
457
  if (!zephyr_engine.hasActiveBuild) await zephyr_engine.start_new_build();
457
458
  const federationMetadata = getModuleFederationPublicationMetadata();
458
- assertTapFederationPublicationMetadata({
459
- target: options.target,
460
- mfConfigs: federationMetadata.mfConfigs,
461
- federation: federationMetadata.federation
462
- });
463
459
  await zephyr_engine.upload_assets({
464
460
  assetsMap,
465
461
  buildStats: attachViteFederationBuildStats(await zeBuildDashData(zephyr_engine), federationMetadata),
@@ -574,11 +570,6 @@ function withZephyrCore(options = {}) {
574
570
  message: 'Vite upload metadata was not prepared.'
575
571
  });
576
572
  const federationMetadata = getModuleFederationPublicationMetadata();
577
- assertTapFederationPublicationMetadata({
578
- target: options.target,
579
- mfConfigs: federationMetadata.mfConfigs,
580
- federation: federationMetadata.federation
581
- });
582
573
  await zephyrEngine.upload_assets({
583
574
  assetsMap,
584
575
  buildStats: attachViteFederationBuildStats(await zeBuildDashData(zephyrEngine), federationMetadata),
@@ -596,7 +587,6 @@ function withZephyrCore(options = {}) {
596
587
  const session = applicationContext.beginBuild({
597
588
  invocationId: `${buildInvocationId}:${generation}`,
598
589
  generation,
599
- strictAssetPaths: preservesLockedArtifactPaths,
600
590
  participants: [
601
591
  ...environments.map(([name, environment])=>({
602
592
  name,
@@ -18,4 +18,4 @@ __webpack_require__.m = __webpack_modules__;
18
18
  })();
19
19
  export { __webpack_require__ };
20
20
 
21
- //# sourceMappingURL=rslib-runtime.mjs.map
21
+ //# sourceMappingURL=rslib-runtime~0.mjs.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/vitejs/vite-plugin-registry/refs/heads/main/data/schema/extended-package-json.schema.json",
3
3
  "name": "vite-plugin-zephyr",
4
- "version": "1.2.3",
4
+ "version": "1.3.0",
5
5
  "description": "Vite plugin for Zephyr",
6
6
  "keywords": [
7
7
  "deploy",
@@ -48,19 +48,19 @@
48
48
  "provenance": true
49
49
  },
50
50
  "dependencies": {
51
- "acorn": "^8.17.0",
51
+ "acorn": "^8.18.0",
52
52
  "acorn-walk": "^8.3.5",
53
- "magic-string": "0.30.21",
54
- "zephyr-agent": "1.2.3"
53
+ "magic-string": "1.2.3",
54
+ "zephyr-agent": "1.3.0"
55
55
  },
56
56
  "devDependencies": {
57
- "@module-federation/vite": "1.16.15",
58
- "@rslib/core": "0.23.2",
59
- "@rstest/core": "0.11.1",
57
+ "@module-federation/vite": "1.21.2",
58
+ "@rslib/core": "1.0.0",
59
+ "@rstest/core": "0.11.12",
60
60
  "@types/node": "^24.13.3",
61
- "rollup": "^4.62.2",
62
- "typescript": "~5.9.3",
63
- "vite": "^8.1.4"
61
+ "rollup": "^4.63.1",
62
+ "typescript": "~7.0.0",
63
+ "vite": "^8.2.2"
64
64
  },
65
65
  "peerDependencies": {
66
66
  "@module-federation/vite": "^1.13.2",
@@ -84,7 +84,7 @@
84
84
  }
85
85
  },
86
86
  "scripts": {
87
- "build": "rslib build",
87
+ "build": "rslib build --lib esm && rslib build --lib cjs --no-clean",
88
88
  "patch-version": "pnpm version",
89
89
  "dev": "rslib build --watch",
90
90
  "typecheck": "tsc -b",