zephyr-rolldown-plugin 0.0.0-canary.3 → 0.0.0-canary.30

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 +1,2 @@
1
1
  export { withZephyr } from './lib/zephyr-rolldown-plugin';
2
+ export type { ZephyrBuildHooks, DeploymentInfo } from 'zephyr-agent';
@@ -1,5 +1,8 @@
1
1
  import type { InputOptions, NormalizedOutputOptions, OutputBundle } from 'rolldown';
2
- export declare function withZephyr(): {
2
+ import { type ZephyrBuildHooks } from 'zephyr-agent';
3
+ export declare function withZephyr(options?: {
4
+ hooks?: ZephyrBuildHooks;
5
+ }): {
3
6
  name: string;
4
7
  buildStart: (options: InputOptions) => Promise<void>;
5
8
  writeBundle: (_options: NormalizedOutputOptions, bundle: OutputBundle) => Promise<void>;
@@ -13,8 +13,9 @@ const getInputFolder = (options) => {
13
13
  return Object.values(options.input)[0];
14
14
  return (0, node_process_1.cwd)();
15
15
  };
16
- function withZephyr() {
16
+ function withZephyr(options) {
17
17
  const { zephyr_engine_defer, zephyr_defer_create } = zephyr_agent_1.ZephyrEngine.defer_create();
18
+ const hooks = options === null || options === void 0 ? void 0 : options.hooks;
18
19
  return {
19
20
  name: 'with-zephyr',
20
21
  buildStart: async (options) => {
@@ -27,7 +28,6 @@ function withZephyr() {
27
28
  writeBundle: async (_options, bundle) => {
28
29
  try {
29
30
  const zephyr_engine = await zephyr_engine_defer;
30
- // basehref support
31
31
  zephyr_engine.buildProperties.baseHref = _options.dir;
32
32
  // Start a new build
33
33
  await zephyr_engine.start_new_build();
@@ -35,11 +35,12 @@ function withZephyr() {
35
35
  await zephyr_engine.upload_assets({
36
36
  assetsMap: (0, get_assets_map_1.getAssetsMap)(bundle),
37
37
  buildStats: await (0, zephyr_agent_1.zeBuildDashData)(zephyr_engine),
38
+ hooks,
38
39
  });
39
40
  await zephyr_engine.build_finished();
40
41
  }
41
42
  catch (error) {
42
- (0, zephyr_agent_1.logFn)('error', zephyr_agent_1.ZephyrError.format(error));
43
+ (0, zephyr_agent_1.handleGlobalError)(error);
43
44
  }
44
45
  },
45
46
  };
@@ -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,GAAG,CAAC,OAAqB,EAAU,EAAE;IACvD,IAAI,OAAO,OAAO,CAAC,KAAK,KAAK,QAAQ;QAAE,OAAO,OAAO,CAAC,KAAK,CAAC;IAC5D,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC1D,IAAI,OAAO,OAAO,CAAC,KAAK,KAAK,QAAQ;QAAE,OAAO,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9E,OAAO,IAAA,kBAAG,GAAE,CAAC;AACf,CAAC,CAAC;AAEF,SAAgB,UAAU;IACxB,MAAM,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,GAAG,2BAAY,CAAC,YAAY,EAAE,CAAC;IAEjF,OAAO;QACL,IAAI,EAAE,aAAa;QACnB,UAAU,EAAE,KAAK,EAAE,OAAqB,EAAE,EAAE;YAC1C,MAAM,qBAAqB,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;YACtD,mBAAmB,CAAC;gBAClB,OAAO,EAAE,QAAQ,EAAE,gEAAgE;gBACnF,OAAO,EAAE,qBAAqB;aAC/B,CAAC,CAAC;QACL,CAAC;QACD,WAAW,EAAE,KAAK,EAAE,QAAiC,EAAE,MAAoB,EAAE,EAAE;YAC7E,IAAI,CAAC;gBACH,MAAM,aAAa,GAAG,MAAM,mBAAmB,CAAC;gBAEhD,mBAAmB;gBACn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EAAE,CAAC;IACjF,MAAM,KAAK,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,CAAC;IAE7B,OAAO;QACL,IAAI,EAAE,aAAa;QACnB,UAAU,EAAE,KAAK,EAAE,OAAqB,EAAE,EAAE;YAC1C,MAAM,qBAAqB,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;YACtD,mBAAmB,CAAC;gBAClB,OAAO,EAAE,QAAQ,EAAE,gEAAgE;gBACnF,OAAO,EAAE,qBAAqB;aAC/B,CAAC,CAAC;QACL,CAAC;QACD,WAAW,EAAE,KAAK,EAAE,QAAiC,EAAE,MAAoB,EAAE,EAAE;YAC7E,IAAI,CAAC;gBACH,MAAM,aAAa,GAAG,MAAM,mBAAmB,CAAC;gBAEhD,aAAa,CAAC,eAAe,CAAC,QAAQ,GAAG,QAAQ,CAAC,GAAG,CAAC;gBAEtD,oBAAoB;gBACpB,MAAM,aAAa,CAAC,eAAe,EAAE,CAAC;gBAEtC,qCAAqC;gBACrC,MAAM,aAAa,CAAC,aAAa,CAAC;oBAChC,SAAS,EAAE,IAAA,6BAAY,EAAC,MAAM,CAAC;oBAC/B,UAAU,EAAE,MAAM,IAAA,8BAAe,EAAC,aAAa,CAAC;oBAChD,KAAK;iBACN,CAAC,CAAC;gBAEH,MAAM,aAAa,CAAC,cAAc,EAAE,CAAC;YACvC,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,IAAA,gCAAiB,EAAC,KAAK,CAAC,CAAC;YAC3B,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC"}
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zephyr-rolldown-plugin",
3
- "version": "0.1.0",
3
+ "version": "0.1.3",
4
4
  "description": "Rolldown plugin for Zephyr",
5
5
  "repository": {
6
6
  "type": "git",
@@ -20,16 +20,17 @@
20
20
  "patch-version": "pnpm version"
21
21
  },
22
22
  "dependencies": {
23
- "is-ci": "catalog:plugin-shared",
24
- "rolldown": "catalog:rolldown",
25
23
  "zephyr-agent": "workspace:*"
26
24
  },
27
25
  "devDependencies": {
28
- "@types/is-ci": "catalog:typescript",
29
26
  "@types/jest": "catalog:typescript",
30
27
  "@typescript-eslint/eslint-plugin": "catalog:eslint",
28
+ "rolldown": "catalog:rolldown",
31
29
  "ts-jest": "catalog:typescript"
32
30
  },
31
+ "peerDependencies": {
32
+ "rolldown": ">=1.0.0-beta.0"
33
+ },
33
34
  "publishConfig": {
34
35
  "access": "public",
35
36
  "provenance": true
@@ -0,0 +1,3 @@
1
+ import baseConfig from '../../eslint.config.mjs';
2
+
3
+ export default [...baseConfig];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zephyr-rolldown-plugin",
3
- "version": "0.0.0-canary.3",
3
+ "version": "0.0.0-canary.30",
4
4
  "description": "Rolldown plugin for Zephyr",
5
5
  "repository": {
6
6
  "type": "git",
@@ -16,16 +16,17 @@
16
16
  "main": "dist/index.js",
17
17
  "types": "dist/index.d.ts",
18
18
  "dependencies": {
19
- "is-ci": "^4.1.0",
20
- "rolldown": "1.0.0-beta.3",
21
- "zephyr-agent": "0.0.0-canary.3"
19
+ "zephyr-agent": "0.0.0-canary.30"
22
20
  },
23
21
  "devDependencies": {
24
- "@types/is-ci": "3.0.4",
25
22
  "@types/jest": "29.5.14",
26
23
  "@typescript-eslint/eslint-plugin": "^8.27.0",
24
+ "rolldown": "1.0.0-beta.54",
27
25
  "ts-jest": "^29.2.6"
28
26
  },
27
+ "peerDependencies": {
28
+ "rolldown": ">=1.0.0-beta.0"
29
+ },
29
30
  "publishConfig": {
30
31
  "access": "public",
31
32
  "provenance": true