zephyr-rolldown-plugin 0.0.49 → 0.0.51

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
@@ -1,7 +1,39 @@
1
- # Zephyr Rolldown Plugin (WIP)
1
+ # Zephyr Rolldown Plugin
2
+
3
+ <div align="center">
4
+
5
+ [Zephyr Cloud](https://zephyr-cloud.io) | [Zephyr Docs](https://docs.zephyr-cloud.io) | [Discord](https://zephyr-cloud.io/discord) | [Twitter](https://x.com/ZephyrCloudIO) | [LinkedIn](https://www.linkedin.com/company/zephyr-cloud/)
6
+
7
+ <hr/>
8
+ <img src="https://cdn.prod.website-files.com/669061ee3adb95b628c3acda/66981c766e352fe1f57191e2_Opengraph-zephyr.png" alt="Zephyr Logo" />
9
+ </div>
10
+
11
+ A Rolldown plugin for deploying applications with Zephyr Cloud. This plugin enables seamless deployment of your Rolldown-built applications to Zephyr's global edge network.
12
+
13
+ For more information, please refer to our [documentation](https://docs.zephyr-cloud.io/recipes/rolldown-react) for rolldown.
14
+
15
+ > **Note**: This plugin is currently in development (WIP - Work In Progress).
16
+
17
+ ## Installation
18
+
19
+ ```bash
20
+ # npm
21
+ npm install --save-dev zephyr-rolldown-plugin
22
+
23
+ # yarn
24
+ yarn add --dev zephyr-rolldown-plugin
25
+
26
+ # pnpm
27
+ pnpm add --dev zephyr-rolldown-plugin
28
+
29
+ # bun
30
+ bun add --dev zephyr-rolldown-plugin
31
+ ```
2
32
 
3
33
  ## Usage
4
34
 
35
+ Add the plugin to your Rolldown configuration:
36
+
5
37
  ```javascript
6
38
  // rolldown.config.mjs
7
39
  import { defineConfig } from 'rolldown';
@@ -28,7 +60,81 @@ export default defineConfig({
28
60
  });
29
61
  },
30
62
  },
31
- withZephyr(),
63
+ withZephyr(), // Add Zephyr plugin
32
64
  ],
33
65
  });
34
66
  ```
67
+
68
+ ### TypeScript Configuration
69
+
70
+ ```typescript
71
+ // rolldown.config.ts
72
+ import { defineConfig } from 'rolldown';
73
+ import { withZephyr } from 'zephyr-rolldown-plugin';
74
+
75
+ export default defineConfig({
76
+ input: 'src/main.tsx',
77
+ plugins: [
78
+ // ... other plugins
79
+ withZephyr({
80
+ // Configuration options
81
+ deploy: true,
82
+ environment: 'production',
83
+ }),
84
+ ],
85
+ });
86
+ ```
87
+
88
+ ## Features
89
+
90
+ - 🚀 Automatic deployment during build
91
+ - 📦 Asset optimization and bundling with Rolldown
92
+ - 🔧 Zero-config setup
93
+ - 📊 Build analytics and monitoring
94
+ - 🌐 Global CDN distribution
95
+ - ⚡ Fast builds with Rolldown's Rust-based bundler
96
+
97
+ ## Getting Started
98
+
99
+ 1. Install the plugin in your Rolldown project
100
+ 2. Add it to your Rolldown configuration
101
+ 3. Build your application as usual
102
+ 4. Your app will be automatically deployed to Zephyr Cloud
103
+
104
+ ## Build Scripts
105
+
106
+ Add these scripts to your `package.json`:
107
+
108
+ ```json
109
+ {
110
+ "scripts": {
111
+ "dev": "rolldown --watch",
112
+ "build": "rolldown",
113
+ "build:prod": "NODE_ENV=production rolldown"
114
+ }
115
+ }
116
+ ```
117
+
118
+ ## Requirements
119
+
120
+ - Rolldown (latest version)
121
+ - Node.js 18 or higher
122
+ - Zephyr Cloud account (sign up at [zephyr-cloud.io](https://zephyr-cloud.io))
123
+
124
+ ## Status
125
+
126
+ This plugin is currently in active development. Features and API may change as Rolldown evolves. We're working closely with the Rolldown team to ensure optimal integration.
127
+
128
+ ## Examples
129
+
130
+ Check out our [examples directory](../../examples/) for complete working examples:
131
+
132
+ - [rolldown-react](../../examples/rolldown-react/) - Basic React setup with Rolldown and Zephyr
133
+
134
+ ## Contributing
135
+
136
+ We welcome contributions! Please read our [contributing guidelines](../../CONTRIBUTING.md) for more information.
137
+
138
+ ## License
139
+
140
+ Licensed under the Apache-2.0 License. See [LICENSE](LICENSE) for more information.
@@ -27,6 +27,8 @@ function withZephyr() {
27
27
  writeBundle: async (_options, bundle) => {
28
28
  try {
29
29
  const zephyr_engine = await zephyr_engine_defer;
30
+ // basehref support
31
+ zephyr_engine.buildProperties.baseHref = _options.dir;
30
32
  // Start a new build
31
33
  await zephyr_engine.start_new_build();
32
34
  // Upload assets and finish the build
@@ -1 +1 @@
1
- {"version":3,"file":"zephyr-rolldown-plugin.js","sourceRoot":"","sources":["../../src/lib/zephyr-rolldown-plugin.ts"],"names":[],"mappings":";;AAYA,gCA+BC;AA1CD,+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;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AqB,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;gBACnB,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;iBACjD,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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zephyr-rolldown-plugin",
3
- "version": "0.0.49",
3
+ "version": "0.0.51",
4
4
  "description": "Rolldown plugin for Zephyr",
5
5
  "repository": {
6
6
  "type": "git",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zephyr-rolldown-plugin",
3
- "version": "0.0.49",
3
+ "version": "0.0.51",
4
4
  "description": "Rolldown plugin for Zephyr",
5
5
  "repository": {
6
6
  "type": "git",
@@ -18,7 +18,7 @@
18
18
  "dependencies": {
19
19
  "is-ci": "^4.1.0",
20
20
  "rolldown": "1.0.0-beta.3",
21
- "zephyr-agent": "0.0.49"
21
+ "zephyr-agent": "0.0.51"
22
22
  },
23
23
  "devDependencies": {
24
24
  "@types/is-ci": "3.0.4",