@utoo/web 1.2.0-rc.1 → 1.2.0-rc.10

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 (58) hide show
  1. package/README.md +55 -0
  2. package/esm/{aa0ad15d2a587c43406f.wasm → a0a815481b4ff49f8961.wasm} +0 -0
  3. package/esm/index.d.ts +3 -2
  4. package/esm/index.js +3 -2
  5. package/esm/loaderWorker.js +1 -1
  6. package/esm/loaderWorker.js.LICENSE.txt +0 -21
  7. package/esm/{forkedProject.d.ts → project/ForkedProject.d.ts} +5 -3
  8. package/esm/{forkedProject.js → project/ForkedProject.js} +8 -0
  9. package/esm/{internalProject.d.ts → project/InternalProject.d.ts} +4 -3
  10. package/esm/project/InternalProject.js +132 -0
  11. package/esm/{project.d.ts → project/Project.d.ts} +3 -1
  12. package/esm/{project.js → project/Project.js} +19 -6
  13. package/esm/serviceWorker.js +4 -3
  14. package/esm/{type.d.ts → types.d.ts} +43 -0
  15. package/esm/types.js +56 -0
  16. package/esm/utils/sabcom.d.ts +61 -0
  17. package/esm/utils/sabcom.js +203 -0
  18. package/esm/utoo/index.d.ts +73 -38
  19. package/esm/utoo/index.js +165 -141
  20. package/esm/utoo/index_bg.wasm +0 -0
  21. package/esm/webpackLoaders/{worker/cjs.js → cjs.js} +65 -41
  22. package/esm/webpackLoaders/loaderWorkerPool.d.ts +2 -0
  23. package/esm/webpackLoaders/loaderWorkerPool.js +90 -0
  24. package/esm/webpackLoaders/polyfills/fsPolyfill.d.ts +78 -0
  25. package/esm/webpackLoaders/{worker/polyfills → polyfills}/fsPolyfill.js +154 -191
  26. package/esm/webpackLoaders/polyfills/fsPromisesPolyfill.d.ts +26 -0
  27. package/esm/webpackLoaders/polyfills/fsPromisesPolyfill.js +112 -0
  28. package/esm/webpackLoaders/{worker/polyfills → polyfills}/nodePolyFills.d.ts +0 -2
  29. package/esm/webpackLoaders/{worker/polyfills → polyfills}/nodePolyFills.js +4 -3
  30. package/esm/webpackLoaders/{worker/type.d.ts → types.d.ts} +1 -0
  31. package/esm/webpackLoaders/{worker/index.js → worker.js} +8 -3
  32. package/esm/worker.js +2 -2
  33. package/package.json +14 -13
  34. package/esm/internalProject.js +0 -110
  35. package/esm/loaderWorkerPool.d.ts +0 -3
  36. package/esm/loaderWorkerPool.js +0 -125
  37. package/esm/sabcom.d.ts +0 -31
  38. package/esm/sabcom.js +0 -71
  39. package/esm/type.js +0 -12
  40. package/esm/webpackLoaders/loaders/less-loader/index.d.ts +0 -3
  41. package/esm/webpackLoaders/loaders/less-loader/index.js +0 -103
  42. package/esm/webpackLoaders/loaders/less-loader/options.json +0 -67
  43. package/esm/webpackLoaders/loaders/less-loader/utils.d.ts +0 -14
  44. package/esm/webpackLoaders/loaders/less-loader/utils.js +0 -217
  45. package/esm/webpackLoaders/worker/polyfills/fastGlobPolyfill.d.ts +0 -2
  46. package/esm/webpackLoaders/worker/polyfills/fastGlobPolyfill.js +0 -48
  47. package/esm/webpackLoaders/worker/polyfills/fsPolyfill.d.ts +0 -124
  48. package/esm/webpackLoaders/worker/polyfills/fsPromisesPolyfill.d.ts +0 -9
  49. package/esm/webpackLoaders/worker/polyfills/fsPromisesPolyfill.js +0 -9
  50. /package/esm/{installServiceWorker.d.ts → utils/installServiceWorker.d.ts} +0 -0
  51. /package/esm/{installServiceWorker.js → utils/installServiceWorker.js} +0 -0
  52. /package/esm/{message.d.ts → utils/message.d.ts} +0 -0
  53. /package/esm/{message.js → utils/message.js} +0 -0
  54. /package/esm/webpackLoaders/{worker/cjs.d.ts → cjs.d.ts} +0 -0
  55. /package/esm/webpackLoaders/{worker/polyfills → polyfills}/workerThreadsPolyfill.d.ts +0 -0
  56. /package/esm/webpackLoaders/{worker/polyfills → polyfills}/workerThreadsPolyfill.js +0 -0
  57. /package/esm/webpackLoaders/{worker/type.js → types.js} +0 -0
  58. /package/esm/webpackLoaders/{worker/index.d.ts → worker.d.ts} +0 -0
package/README.md ADDED
@@ -0,0 +1,55 @@
1
+ # @utoo/web
2
+
3
+ > 🌖 Web-compatible version of the Utoo toolchain, powered by [Turbopack](https://turbo.build/pack) and WebAssembly.
4
+
5
+ `@utoo/web` brings the power of the Utoo bundler to the browser, leveraging WebAssembly to provide high-performance bundling in non-native environments. It enables a complete web development environment, including a real file system and dependency management, entirely within the browser.
6
+
7
+ ## ✨ Features
8
+
9
+ - 📂 **Real File System**: Uses Origin Private File System (OPFS) for a Node.js-like file system experience.
10
+ - 📦 **Browser Dependency Resolution**: Resolve dependencies directly from `package.json` without needing a pre-existing lock file. Supports custom registries (npm, npmmirror, private registries).
11
+ - 🌐 **Browser-based Bundling**: Run the Utoo bundler directly in the browser.
12
+ - 🔌 **Webpack Compatibility**: Supports a subset of Webpack configurations in the browser. See [Features List](../pack/docs/features-list.md) for details.
13
+ - 🔄 **Webpack Loaders**: Compatible with standard Webpack loaders (css-loader, style-loader, etc.).
14
+ - 🎨 **PostCSS & Tailwind**: Support for PostCSS and Tailwind CSS processing.
15
+
16
+
17
+ ## 📦 Installation
18
+
19
+ ```bash
20
+ npm install @utoo/web
21
+ ```
22
+
23
+ ## 🛠️ Development
24
+
25
+ ### Prerequisites
26
+
27
+ - Rust toolchain (nightly)
28
+ - `wasm-bindgen-cli`
29
+ - `binaryen` (for `wasm-opt`)
30
+
31
+ ### Build
32
+
33
+ ```bash
34
+ # Install toolchain
35
+ npm run install-toolchain
36
+
37
+ # Build WASM and TypeScript
38
+ npm run build
39
+ ```
40
+
41
+ ### Run Demo
42
+
43
+ To run the web demo:
44
+
45
+ ```bash
46
+ npm start -w utooweb-demo
47
+ ```
48
+
49
+ ## 📚 Documentation
50
+
51
+ For detailed API usage and examples, please refer to the [API Documentation](./API.md) ([中文版](./API_zh-CN.md)).
52
+
53
+ ## �📄 License
54
+
55
+ [MIT](./LICENSE)
package/esm/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
- export { Project } from "./project";
2
- export * from "./type";
1
+ export { compatOptionsFromWebpack, type WebpackConfig, } from "@utoo/pack-shared";
2
+ export { Project } from "./project/Project";
3
+ export * from "./types";
package/esm/index.js CHANGED
@@ -1,2 +1,3 @@
1
- export { Project } from "./project";
2
- export * from "./type";
1
+ export { compatOptionsFromWebpack, } from "@utoo/pack-shared";
2
+ export { Project } from "./project/Project";
3
+ export * from "./types";