zephyr-rolldown-plugin 0.0.0-canary-20250806123601 → 0.0.0-canary-20250813124421

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.
@@ -1,3 +1,3 @@
1
- import type { OutputBundle } from 'rolldown';
2
1
  import type { ZeBuildAssetsMap } from 'zephyr-agent';
3
- export declare function getAssetsMap(assets: OutputBundle): ZeBuildAssetsMap;
2
+ import type { XOutputAsset, XOutputBundle, XOutputChunk } from 'zephyr-rollx-internal';
3
+ export declare function getAssetsMap(assets: XOutputBundle<XOutputChunk | XOutputAsset>): ZeBuildAssetsMap;
@@ -1,21 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getAssetsMap = getAssetsMap;
4
- const zephyr_agent_1 = require("zephyr-agent");
4
+ const zephyr_rollx_internal_1 = require("zephyr-rollx-internal");
5
5
  function getAssetsMap(assets) {
6
- return (0, zephyr_agent_1.buildAssetsMap)(assets, extractBuffer, getAssetType);
6
+ return (0, zephyr_rollx_internal_1.getRollxAssetsMap)(assets);
7
7
  }
8
- const extractBuffer = (asset) => {
9
- switch (asset.type) {
10
- case 'chunk':
11
- return asset.code;
12
- case 'asset':
13
- return typeof asset.source === 'string'
14
- ? asset.source
15
- : new TextDecoder().decode(asset.source);
16
- default:
17
- return void 0;
18
- }
19
- };
20
- const getAssetType = (asset) => asset.type;
21
8
  //# sourceMappingURL=get-assets-map.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-assets-map.js","sourceRoot":"","sources":["../../../src/lib/internal/get-assets-map.ts"],"names":[],"mappings":";;AAIA,oCAEC;AAJD,+CAA8C;AAE9C,SAAgB,YAAY,CAAC,MAAoB;IAC/C,OAAO,IAAA,6BAAc,EAAC,MAAM,EAAE,aAAa,EAAE,YAAY,CAAC,CAAC;AAC7D,CAAC;AAED,MAAM,aAAa,GAAG,CAAC,KAAgC,EAAsB,EAAE;IAC7E,QAAQ,KAAK,CAAC,IAAI,EAAE,CAAC;QACnB,KAAK,OAAO;YACV,OAAO,KAAK,CAAC,IAAI,CAAC;QACpB,KAAK,OAAO;YACV,OAAO,OAAO,KAAK,CAAC,MAAM,KAAK,QAAQ;gBACrC,CAAC,CAAC,KAAK,CAAC,MAAM;gBACd,CAAC,CAAC,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAC7C;YACE,OAAO,KAAK,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,KAAgC,EAAU,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC"}
1
+ {"version":3,"file":"get-assets-map.js","sourceRoot":"","sources":["../../../src/lib/internal/get-assets-map.ts"],"names":[],"mappings":";;AAIA,oCAIC;AARD,iEAA0D;AAI1D,SAAgB,YAAY,CAC1B,MAAkD;IAElD,OAAO,IAAA,yCAAiB,EAAC,MAAM,CAAC,CAAC;AACnC,CAAC"}
@@ -1,6 +1,7 @@
1
- import type { InputOptions, NormalizedOutputOptions, OutputBundle } from 'rolldown';
1
+ import type { InputOptions, NormalizedOutputOptions } from 'rolldown';
2
+ import { type XOutputAsset, type XOutputBundle, type XOutputChunk } from 'zephyr-rollx-internal';
2
3
  export declare function withZephyr(): {
3
4
  name: string;
4
- buildStart: (options: InputOptions) => Promise<void>;
5
- writeBundle: (_options: NormalizedOutputOptions, bundle: OutputBundle) => Promise<void>;
5
+ buildStart: (inputOptions: InputOptions) => Promise<void>;
6
+ writeBundle: (_options: NormalizedOutputOptions, bundle: XOutputBundle<XOutputChunk | XOutputAsset>) => Promise<void>;
6
7
  };
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.withZephyr = withZephyr;
4
- const zephyr_agent_1 = require("zephyr-agent");
5
4
  const node_process_1 = require("node:process");
5
+ const zephyr_agent_1 = require("zephyr-agent");
6
+ const zephyr_rollx_internal_1 = require("zephyr-rollx-internal");
6
7
  const get_assets_map_1 = require("./internal/get-assets-map");
7
8
  const getInputFolder = (options) => {
8
9
  if (typeof options.input === 'string')
@@ -15,12 +16,13 @@ const getInputFolder = (options) => {
15
16
  };
16
17
  function withZephyr() {
17
18
  const { zephyr_engine_defer, zephyr_defer_create } = zephyr_agent_1.ZephyrEngine.defer_create();
19
+ let path_to_execution_dir;
18
20
  return {
19
21
  name: 'with-zephyr',
20
- buildStart: async (options) => {
21
- const path_to_execution_dir = getInputFolder(options);
22
+ buildStart: async (inputOptions) => {
23
+ path_to_execution_dir = getInputFolder(inputOptions);
22
24
  zephyr_defer_create({
23
- builder: 'rollup', //TODO(Nestor): API is the same, but we should make it explicit.
25
+ builder: 'rolldown', // Now explicitly using 'rolldown' as the builder
24
26
  context: path_to_execution_dir,
25
27
  });
26
28
  },
@@ -31,10 +33,18 @@ function withZephyr() {
31
33
  zephyr_engine.buildProperties.baseHref = _options.dir;
32
34
  // Start a new build
33
35
  await zephyr_engine.start_new_build();
34
- // Upload assets and finish the build
36
+ // Get assets map
37
+ const assetsMap = (0, get_assets_map_1.getAssetsMap)(bundle);
38
+ // Generate enhanced build stats for Rolldown
39
+ const buildStats = await (0, zephyr_rollx_internal_1.extractRollxBuildStats)({
40
+ zephyr_engine,
41
+ bundle,
42
+ root: path_to_execution_dir,
43
+ });
44
+ // Upload assets and build stats
35
45
  await zephyr_engine.upload_assets({
36
- assetsMap: (0, get_assets_map_1.getAssetsMap)(bundle),
37
- buildStats: await (0, zephyr_agent_1.zeBuildDashData)(zephyr_engine),
46
+ assetsMap,
47
+ buildStats,
38
48
  });
39
49
  await zephyr_engine.build_finished();
40
50
  }
@@ -1 +1 @@
1
- {"version":3,"file":"zephyr-rolldown-plugin.js","sourceRoot":"","sources":["../../src/lib/zephyr-rolldown-plugin.ts"],"names":[],"mappings":";;AAYA,gCAkCC;AA7CD,+CAAiF;AACjF,+CAAmC;AACnC,8DAAyD;AAEzD,MAAM,cAAc,G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,WAAW,EAAE,KAAK,EAChB,QAAiC,EACjC,MAAkD,EAClD,EAAE;YACF,IAAI,CAAC;gBACH,MAAM,aAAa,GAAG,MAAM,mBAAmB,CAAC;gBAEhD,mBAAmB;gBACnB,aAAa,CAAC,eAAe,CAAC,QAAQ,GAAG,QAAQ,CAAC,GAAG,CAAC;gBAEtD,oBAAoB;gBACpB,MAAM,aAAa,CAAC,eAAe,EAAE,CAAC;gBAEtC,iBAAiB;gBACjB,MAAM,SAAS,GAAG,IAAA,6BAAY,EAAC,MAAM,CAAC,CAAC;gBAEvC,6CAA6C;gBAC7C,MAAM,UAAU,GAAG,MAAM,IAAA,8CAAsB,EAAC;oBAC9C,aAAa;oBACb,MAAM;oBACN,IAAI,EAAE,qBAAqB;iBAC5B,CAAC,CAAC;gBAEH,gCAAgC;gBAChC,MAAM,aAAa,CAAC,aAAa,CAAC;oBAChC,SAAS;oBACT,UAAU;iBACX,CAAC,CAAC;gBAEH,MAAM,aAAa,CAAC,cAAc,EAAE,CAAC;YACvC,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,IAAA,oBAAK,EAAC,OAAO,EAAE,0BAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;YAC5C,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC"}
package/dist/package.json CHANGED
@@ -22,7 +22,8 @@
22
22
  "dependencies": {
23
23
  "is-ci": "catalog:plugin-shared",
24
24
  "rolldown": "catalog:rolldown",
25
- "zephyr-agent": "workspace:*"
25
+ "zephyr-agent": "workspace:*",
26
+ "zephyr-rollx-internal": "workspace:*"
26
27
  },
27
28
  "devDependencies": {
28
29
  "@types/is-ci": "catalog:typescript",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zephyr-rolldown-plugin",
3
- "version": "0.0.0-canary-20250806123601",
3
+ "version": "0.0.0-canary-20250813124421",
4
4
  "description": "Rolldown plugin for Zephyr",
5
5
  "repository": {
6
6
  "type": "git",
@@ -18,7 +18,8 @@
18
18
  "dependencies": {
19
19
  "is-ci": "^4.1.0",
20
20
  "rolldown": "1.0.0-beta.3",
21
- "zephyr-agent": "0.0.0-canary-20250806123601"
21
+ "zephyr-agent": "0.0.0-canary-20250813124421",
22
+ "zephyr-rollx-internal": "0.0.0-canary-20250813124421"
22
23
  },
23
24
  "devDependencies": {
24
25
  "@types/is-ci": "3.0.4",