@bleedingdev/modern-js-app-tools 3.9.0-ultramodern.4 → 3.9.0-ultramodern.6

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 (86) hide show
  1. package/dist/cjs/builder/generator/index.js +0 -1
  2. package/dist/cjs/builder/shared/builderPlugins/index.js +4 -11
  3. package/dist/cjs/config/index.js +4 -11
  4. package/dist/cjs/index.js +80 -111
  5. package/dist/cjs/plugins/deploy/platforms/node.js +0 -13
  6. package/dist/cjs/plugins/serverBuild.js +2 -1
  7. package/dist/esm/builder/generator/index.mjs +1 -2
  8. package/dist/esm/builder/shared/builderPlugins/index.mjs +0 -1
  9. package/dist/esm/config/index.mjs +0 -1
  10. package/dist/esm/index.mjs +1 -6
  11. package/dist/esm/plugins/deploy/platforms/node.mjs +0 -13
  12. package/dist/esm/plugins/serverBuild.mjs +2 -1
  13. package/dist/esm-node/builder/generator/index.mjs +1 -2
  14. package/dist/esm-node/builder/shared/builderPlugins/index.mjs +0 -1
  15. package/dist/esm-node/config/index.mjs +0 -1
  16. package/dist/esm-node/index.mjs +1 -6
  17. package/dist/esm-node/plugins/deploy/platforms/node.mjs +0 -13
  18. package/dist/esm-node/plugins/serverBuild.mjs +2 -1
  19. package/dist/types/builder/shared/builderPlugins/index.d.ts +0 -1
  20. package/dist/types/config/index.d.ts +0 -1
  21. package/dist/types/index.d.ts +0 -1
  22. package/dist/types/plugins/deploy/utils/generator.d.ts +1 -1
  23. package/dist/types/types/config/output.d.ts +0 -9
  24. package/dist/types/types/index.d.ts +1 -1
  25. package/dist/types/types/plugin.d.ts +56 -2
  26. package/dist/types/utils/initAppContext.d.ts +3 -2
  27. package/docs/configure/app/bff/effect.md +29 -24
  28. package/docs/guides/advanced-features/bff/data-platform.md +2 -2
  29. package/docs/guides/advanced-features/bff/frameworks.md +36 -24
  30. package/docs/guides/advanced-features/bff/function.md +2 -2
  31. package/docs/guides/advanced-features/bff/operators.md +17 -17
  32. package/docs/guides/get-started/quick-start.md +1 -5
  33. package/docs/guides/get-started/ultramodern.md +5 -86
  34. package/docs/llms.txt +2 -2
  35. package/package.json +14 -30
  36. package/rslib.config.mts +0 -5
  37. package/dist/cjs/builder/shared/builderPlugins/adapterPrecompress.js +0 -125
  38. package/dist/cjs/config/build-environment.js +0 -268
  39. package/dist/cjs/config/public.js +0 -46
  40. package/dist/cjs/plugins/backend-federation/codegen.js +0 -256
  41. package/dist/cjs/plugins/backend-federation/config.js +0 -204
  42. package/dist/cjs/plugins/backend-federation/emit.js +0 -150
  43. package/dist/cjs/plugins/backendFederationBuild.js +0 -53
  44. package/dist/cjs/plugins/deploy/platforms/cloudflare-output-verifier/index.js +0 -62
  45. package/dist/cjs/plugins/deploy/utils/npmAliases.js +0 -226
  46. package/dist/cjs/plugins/ultramodernReleaseEnvelope.js +0 -44
  47. package/dist/cjs/presetUltramodern.js +0 -175
  48. package/dist/cjs/types/config/precompress.js +0 -18
  49. package/dist/esm/builder/shared/builderPlugins/adapterPrecompress.mjs +0 -77
  50. package/dist/esm/config/build-environment.mjs +0 -224
  51. package/dist/esm/config/public.mjs +0 -1
  52. package/dist/esm/plugins/backend-federation/codegen.mjs +0 -205
  53. package/dist/esm/plugins/backend-federation/config.mjs +0 -128
  54. package/dist/esm/plugins/backend-federation/emit.mjs +0 -99
  55. package/dist/esm/plugins/backendFederationBuild.mjs +0 -1
  56. package/dist/esm/plugins/deploy/platforms/cloudflare-output-verifier/index.mjs +0 -1
  57. package/dist/esm/plugins/deploy/utils/npmAliases.mjs +0 -174
  58. package/dist/esm/plugins/ultramodernReleaseEnvelope.mjs +0 -6
  59. package/dist/esm/presetUltramodern.mjs +0 -119
  60. package/dist/esm/types/config/precompress.mjs +0 -0
  61. package/dist/esm-node/builder/shared/builderPlugins/adapterPrecompress.mjs +0 -78
  62. package/dist/esm-node/config/build-environment.mjs +0 -225
  63. package/dist/esm-node/config/public.mjs +0 -2
  64. package/dist/esm-node/plugins/backend-federation/codegen.mjs +0 -206
  65. package/dist/esm-node/plugins/backend-federation/config.mjs +0 -129
  66. package/dist/esm-node/plugins/backend-federation/emit.mjs +0 -100
  67. package/dist/esm-node/plugins/backendFederationBuild.mjs +0 -2
  68. package/dist/esm-node/plugins/deploy/platforms/cloudflare-output-verifier/index.mjs +0 -2
  69. package/dist/esm-node/plugins/deploy/utils/npmAliases.mjs +0 -175
  70. package/dist/esm-node/plugins/ultramodernReleaseEnvelope.mjs +0 -7
  71. package/dist/esm-node/presetUltramodern.mjs +0 -120
  72. package/dist/esm-node/types/config/precompress.mjs +0 -1
  73. package/dist/types/builder/shared/builderPlugins/adapterPrecompress.d.ts +0 -3
  74. package/dist/types/config/build-environment.d.ts +0 -22
  75. package/dist/types/config/public.d.ts +0 -2
  76. package/dist/types/plugins/backend-federation/codegen.d.ts +0 -86
  77. package/dist/types/plugins/backend-federation/config.d.ts +0 -103
  78. package/dist/types/plugins/backend-federation/emit.d.ts +0 -13
  79. package/dist/types/plugins/backendFederationBuild.d.ts +0 -2
  80. package/dist/types/plugins/deploy/platforms/cloudflare-output-verifier/index.d.ts +0 -1
  81. package/dist/types/plugins/deploy/utils/npmAliases.d.ts +0 -14
  82. package/dist/types/plugins/ultramodernReleaseEnvelope.d.ts +0 -3
  83. package/dist/types/precompress/LICENSE +0 -20
  84. package/dist/types/precompress/index.d.ts +0 -76
  85. package/dist/types/presetUltramodern.d.ts +0 -87
  86. package/dist/types/types/config/precompress.d.ts +0 -19
@@ -125,11 +125,7 @@ Now, the project structure is as follows:
125
125
  ```
126
126
 
127
127
  The default workspace starts shell-only and installs the published BleedingDev
128
- package aliases:
129
-
130
- ```bash
131
- pnpm dlx @bleedingdev/modern-js-ultramodern-create my-super-app
132
- ```
128
+ package aliases.
133
129
 
134
130
  From a generated SuperApp workspace, add a business MicroVertical in place:
135
131
 
@@ -15,17 +15,9 @@ UltraModern.js 3.0 is our SuperApp framework forked from Modern.js. It keeps the
15
15
  - Add platform-level contracts only where they improve cross-team reliability.
16
16
  - Keep escape hatches explicit and outside the generated HTTP API path.
17
17
 
18
- ## Compatibility Contract
18
+ ## Current Workspace Contract
19
19
 
20
- UltraModern.js 3.0 keeps:
21
-
22
- - Modern.js app/config/plugin mental model.
23
- - Existing project structure and command flow.
24
- - Progressive adoption path (apps can stay mostly unchanged).
25
-
26
- UltraModern.js additions are designed as the default product surface for new SuperApps. The framework direction is Effect + TanStack + SSR + Micro Verticals, and generated HTTP API work uses that direction by default instead of preserving parallel raw-handler layouts.
27
- Existing Modern.js apps can migrate gradually; once an API surface is generated
28
- or migrated as UltraModern HTTP API, it must use the strict Effect HttpApi path.
20
+ UltraModern.js uses Effect HttpApi, TanStack Router, SSR, and independently deployable Micro Verticals. Generated workspaces use `api/index.ts`, `shared/api.ts`, and `src/api/*` with concrete Effect schemas. The CLI creates, adds to, and validates workspaces against the current contract.
29
21
 
30
22
  ## Intentional Differences (v3 line)
31
23
 
@@ -53,21 +45,9 @@ or migrated as UltraModern HTTP API, it must use the strict Effect HttpApi path.
53
45
  - Generated UltraModern API work uses the Effect runtime only; raw Hono/function handlers are not part of the generated API architecture.
54
46
  - We make incompatible scaffold changes when they remove architecture drift.
55
47
 
56
- ## Migration Guide
57
-
58
- For teams already on Modern.js 3.0 or an older BleedingDev UltraModern scaffold, the adoption path is to move API work onto the strict Effect HttpApi surface instead of preserving older raw handler layouts.
59
-
60
- 1. Keep existing Modern.js apps running as-is while they are outside the generated UltraModern surface. TanStack Router is the preferred path for new scaffolds and incremental route adoption, but route migration can happen on the team's schedule.
61
- 2. Use `bff.runtimeFramework: 'effect'` with `bff.effect.strictEffectApproach: true` for API work. Entries live at `api/index.ts`, contracts live at `shared/api.ts`, clients live under `src/api/*`, and request/response/error shapes come from Effect `Schema` plus `HttpApi`.
62
- 3. Treat raw handlers, `api/lambda/**`, manual `Response` construction, and manual request parsing as migration defects in generated or migrated UltraModern workspaces.
63
- 4. The public preset now ships with explicit release and certification gates. Generated workspaces include `.github/workflows/ultramodern-workspace-gates.yml`, so `pnpm check` and `pnpm build` stay part of the local adoption contract from day one while CI runs the primitive gates as parallel matrix jobs.
64
-
65
- For an older generated workspace, migrate by treating the published cohort as
66
- the source of truth:
48
+ ## Create and Validate a Workspace
67
49
 
68
50
  ```bash
69
- pnpm dlx @bleedingdev/modern-js-ultramodern-create@latest --help
70
- pnpm dlx @bleedingdev/modern-js-ultramodern-create@latest catalog --vertical --dry-run
71
51
  pnpm dlx @bleedingdev/modern-js-ultramodern-create@latest catalog --vertical
72
52
  mise install
73
53
  mise exec -- pnpm install
@@ -75,73 +55,12 @@ mise exec -- pnpm check
75
55
  mise exec -- pnpm build
76
56
  ```
77
57
 
78
- ### Migrating localized Cloudflare SSR workspaces
79
-
80
- Current cohorts localize Cloudflare SSR workspaces.
81
- The framework moves bare locale-root redirects into the framework-owned
82
- Cloudflare Worker entry and the i18n server runtime. A request for `/` is
83
- redirected server-side with `302` to the negotiated locale path, for example
84
- `/cs` for `Accept-Language: cs-CZ` or `/en` for English and fallback traffic.
85
-
86
- Existing generated workspaces should upgrade the whole BleedingDev Modern
87
- package cohort together. Resolve the current cohort version first, then run
88
- the matching migration:
89
-
90
- ```bash
91
- COHORT="$(npm view @bleedingdev/modern-js-ultramodern-create version)"
92
- pnpm dlx "@bleedingdev/modern-js-ultramodern-create@$COHORT" ultramodern \
93
- migrate-strict-effect --version "$COHORT"
94
- pnpm install
95
- pnpm check
96
- pnpm build
97
- pnpm cloudflare:build
98
- ```
99
-
100
- For deployed Cloudflare Workers, redeploy after the cohort update and verify
101
- the root response before accepting the migration:
58
+ Localized Cloudflare SSR workspaces redirect `/` on the server to the negotiated locale. For example, `Accept-Language: cs-CZ` returns `302` with `Location: /cs`, `Cache-Control: private, no-store`, and `Vary` covering locale detection headers. Validate the deployed Worker with:
102
59
 
103
60
  ```bash
104
61
  curl -I -H 'Accept-Language: cs-CZ,cs;q=0.9,en;q=0.1' https://<worker-host>/
105
62
  ```
106
63
 
107
- The expected response is `302` with `Location: /cs` or the matching locale,
108
- `Cache-Control: private, no-store`, and `Vary` covering the locale detection
109
- headers. Following the redirect should return the SSR locale page with the
110
- matching document language and i18n SSR data.
111
-
112
- Do not fix older root `404` responses by adding app-owned root route files,
113
- client-side redirects, custom navigation wrappers, Cloudflare Worker
114
- postprocessing, generated output edits, or local redirect shims. If `/` still
115
- returns `404` after upgrading, confirm the production build log shows
116
- `Modern.js Framework v<cohort-version>` for the cohort you migrated to and
117
- redeploy the Worker.
118
-
119
- Strict generated API migration is part of every current cohort: the direct
120
- `api/index.ts` generator, generated `.mts` checks, the strict Oxlint boundary
121
- rule set, Effect cohort overrides, and the strict Effect migration command.
122
- Agents that cannot install the BleedingDev cohort yet should use the local
123
- Modern.js workspace for migration validation; otherwise pin the target cohort
124
- with `--ultramodern-package-version`.
125
-
126
- Before hand-editing package aliases or generated metadata, run the framework
127
- migration command from the target workspace:
128
-
129
- ```bash
130
- COHORT="$(npm view @bleedingdev/modern-js-ultramodern-create version)"
131
- pnpm dlx "@bleedingdev/modern-js-ultramodern-create@$COHORT" ultramodern \
132
- migrate-strict-effect --version "$COHORT"
133
- pnpm api:check
134
- pnpm contract:check
135
- ```
136
-
137
- The command updates `.modernjs/ultramodern.json`, root
138
- `modernjs.packageSource`, generated Modern package aliases, framework-owned
139
- toolchain pins, direct topology API metadata, strict Effect pnpm
140
- overrides/trust policy, and the pnpm lockfile. Remaining failures are source
141
- migration work: move code to `shared/api.ts`, `api/index.ts`, and
142
- `src/api/*-client.ts`, then delete `api/effect`, `api/lambda`, `shared/effect`,
143
- and `src/effect`.
144
-
145
64
  Generated strict Effect workspaces pin the compatible Effect cohort with pnpm
146
65
  overrides: `effect@4.0.0-rc.112`, `@effect/opentelemetry@4.0.0-rc.112`,
147
66
  and `@effect/vitest@4.0.0-rc.112`. Do not add app-local direct Effect
@@ -210,7 +129,7 @@ transport surfaces when needed. They do not make raw request handlers valid
210
129
  inside generated HTTP API modules.
211
130
 
212
131
  Strict API tests should exercise the `HttpApi` contract. Use
213
- `createEffectBffTestHandler` from `@modern-js/plugin-bff/effect-edge` for
132
+ `createEffectBffTestHandler` from `@modern-js/bff-effect/effect-edge` for
214
133
  edge-compatible proof tests; if you manually compose a web handler, provide
215
134
  `HttpServer.layerServices` beside your API group layer before calling
216
135
  `HttpRouter.toWebHandler`.
package/docs/llms.txt CHANGED
@@ -47,7 +47,7 @@
47
47
  - [Deploy Application](/guides/basic-features/deploy.md): Currently, Modern.js offers two deployment way: You can host your application in a container that includes a Node.js environment on your own, which provides flexibility for the deployment of the application.You can also deploy your application through a platform. Currently, Modern.js officially supports deployment on Netlify, Vercel, and Github pages.
48
48
  - [BFF](/guides/advanced-features/bff.md): BFF (Backends for Frontends) is an architectural pattern primarily used to address issues of data aggregation in front-end and back-end collaboration. Under the BFF architecture, front-end applications do not communicate directly with backend services. Instead, they interact with backend services through a dedicated BFF middleware layer, custom-made for the front end. The main problems it tries to solve include: Aggregation, mapping, clipping, and proxying of lower-level APIs according to their own business needs.Cache data for some specific scenarios to improve performance and thus improve user experience.Quickly development of new products based on existing interfaces.Interface with third-party systems, such as login authentication. Modern.js officially supported the BFF and provided the Integrated BFF to further strengthen the BFF's capabilities, mainly including the following capabilities: Quick development and debugging go live, running, building, and deploying BFF code in the same project.Minimal pure function call, directly import BFF function on the front end, and can be automatically converted into HTTP request when called.No private protocol, follow RESTful API specification, all BFF interfaces are standardized.Full TypeScript support.Meet user preferences and support multi-frame extension writing.
49
49
  - [Basic Usage](/guides/advanced-features/bff/function.md): In a Modern.js application, developers can define API files under the api/lambda directory and export API functions from these files. In the frontend code, these API functions can be directly invoked by importing the file, which initiates the API requests. This invocation method is called unified invocation, where developers do not need to write glue code for the frontend and backend separately, thereby ensuring type safety across both.
50
- - [Runtime Framework](/guides/advanced-features/bff/frameworks.md): Modern.js supports two BFF runtime frameworks: effect (default): use Effect HttpApi runtime from api/index.hono: use file-convention BFF handlers from api/lambda/**. effect and hono are strict runtime modes. There is no automatic fallback between them. ::::info Generated UltraModern workspaces use strict Effect APIs: author HTTP APIs in shared/api.ts and api/index.ts, not Hono/file-convention handlers. ::::
50
+ - [Runtime Framework](/guides/advanced-features/bff/frameworks.md): Modern.js and the UltraModern BFF extension provide two runtime frameworks: hono is the native plugin default and uses file-convention handlers from api/lambda/**.effect is the UltraModern extension default and uses Effect HttpApi from api/index. effect and hono are strict runtime modes. There is no automatic fallback between them. ::::info Generated UltraModern workspaces use strict Effect APIs: author HTTP APIs in shared/api.ts and api/index.ts, not Hono/file-convention handlers. ::::
51
51
  - [Data Platform](/guides/advanced-features/bff/data-platform.md): Modern.js Effect API runtime now supports a request-envelope based data platform contract for safer and more predictable data orchestration in complex applications such as Module Federation and micro frontends.
52
52
  - [Creating Extensible BFF Functions](/guides/advanced-features/bff/operators.md): The previous section showed how to export a simple BFF function in a file. In more complex scenarios, each BFF function may need to do independent type validation, pre-logic, etc. Therefore, Modern.js exposes Api, which supports creating BFF functions through this API. BFF functions created in this way can be easily extended with functionality.
53
53
  - [Extend BFF Server](/guides/advanced-features/bff/extend-server.md): In some applications, developers may want to handle all BFF functions uniformly, such as authentication, logging, data processing, etc. Modern.js allows users to freely extend the BFF Server through Middleware method.
@@ -111,7 +111,7 @@
111
111
  - [watchFiles](/configure/app/dev/watch-files.md): Type: Default: undefined Watch specified files and directories for changes. When a file change is detected, it can trigger a page reload or restart the dev server.
112
112
  - [writeToDisk](/configure/app/dev/write-to-disk.md): Type: boolean | ((filename: string) => boolean)Default: (file) => !file.includes('.hot-update.') Controls whether the build output from development mode is written to disk.
113
113
  - [crossProject](/configure/app/bff/cross-project.md): Type: booleanDefault: false This configuration is used to enable BFF cross-project invocation functionality. When enabled, the current project can be used as a BFF producer, generating an SDK that can be directly called by other projects. For detailed configuration and usage of BFF cross-project invocation, please refer to the BFF Cross-Project Invocation Guide.
114
- - [effect](/configure/app/bff/effect.md): Type: Default: {} bff.effect is only effective when bff.runtimeFramework is set to 'effect'. Generated UltraModern workspaces use this runtime as the only generated HTTP API path. The API contract lives at shared/api.ts, the server runtime lives at api/index.ts, clients live under src/api/*-client.ts, and generated checks reject api/effect, api/lambda, shared/effect, src/effect, Hono server imports, raw request handlers, manual request parsing, and manual Response construction in API modules. For Effect v4, TypeScript should use export-map aware module resolution.
114
+ - [effect](/configure/app/bff/effect.md): Type: Default: {} bff.effect is only effective when bff.runtimeFramework is set to 'effect'. Use bffPlugin from @modern-js/plugin-bff-build-extensions to register the Effect runtime. It composes the native BFF plugin. Install @modern-js/bff-effect and @modern-js/plugin-bff-extensions from the same framework cohort as application production dependencies, so the adapter remains available after development dependencies are removed. The build plugin can be a development dependency. See the runtime configuration example. Native @modern-js/plugin-bff/server exports Hono APIs. For Node Effect APIs, import framework helpers such as defineEffectBff from @modern-js/bff-effect/effect and namespaces from the corresponding effect/* modules. Worker handlers and worker request context use @modern-js/bff-effect/effect-edge. Generated UltraModern workspaces use this runtime as the only generated HTTP API path. The API contract lives at shared/api.ts, the server runtime lives at api/index.ts, clients live under src/api/*-client.ts, and generated checks reject api/effect, api/lambda, shared/effect, src/effect, Hono server imports, raw request handlers, manual request parsing, and manual Response construction in API modules. For Effect v4, TypeScript should use export-map aware module resolution.
115
115
  - [prefix](/configure/app/bff/prefix.md): Type: stringDefault: /api By default, the prefix for accessing routes in the BFF API directory is /api, as shown in the following directory structure: The route corresponding to api/hello.ts when accessed is localhost:8080/api/hello. This configuration option can modify the default route prefix: The corresponding route for api/hello.ts when accessed is localhost:8080/api-demo/hello.
116
116
  - [runtimeFramework](/configure/app/bff/runtime-framework.md): Type: 'hono' | 'effect'Default: 'effect' Controls which runtime framework Modern.js uses for BFF routing. Set to 'effect' to run BFF only from api/index (Effect HttpApi runtime).Set to 'hono' to run BFF only from file-convention handlers under api/lambda/**. There is no implicit fallback between runtimes. Choose one runtime mode per app. Generated UltraModern apps use strict Effect APIs by default and set bff.effect.strictEffectApproach: true; hono and api/lambda/** are not valid generated UltraModern HTTP API paths.
117
117
  - [appIcon](/configure/app/html/app-icon.md): Type: Default: undefined Set the web application icons to display when added to the home screen of a mobile device: Generate the web app manifest file and its icons field.Generate the apple-touch-icon and manifest tags in the HTML file.
package/package.json CHANGED
@@ -17,7 +17,7 @@
17
17
  "modern",
18
18
  "modern.js"
19
19
  ],
20
- "version": "3.9.0-ultramodern.4",
20
+ "version": "3.9.0-ultramodern.6",
21
21
  "types": "./dist/types/index.d.ts",
22
22
  "main": "./dist/cjs/index.js",
23
23
  "exports": {
@@ -37,12 +37,6 @@
37
37
  },
38
38
  "default": "./dist/cjs/builder/index.js"
39
39
  },
40
- "./config": {
41
- "types": "./dist/types/config/public.d.ts",
42
- "import": "./dist/esm-node/config/public.mjs",
43
- "require": "./dist/cjs/config/public.js",
44
- "default": "./dist/cjs/config/public.js"
45
- },
46
40
  "./cli": {
47
41
  "types": "./dist/types/index.d.ts",
48
42
  "node": {
@@ -59,12 +53,6 @@
59
53
  },
60
54
  "default": "./dist/cjs/run/index.js"
61
55
  },
62
- "./cloudflare-output-verifier": {
63
- "types": "./dist/types/plugins/deploy/platforms/cloudflare-output-verifier/index.d.ts",
64
- "import": "./dist/esm-node/plugins/deploy/platforms/cloudflare-output-verifier/index.mjs",
65
- "require": "./dist/cjs/plugins/deploy/platforms/cloudflare-output-verifier/index.js",
66
- "default": "./dist/cjs/plugins/deploy/platforms/cloudflare-output-verifier/index.js"
67
- },
68
56
  "./types": {
69
57
  "types": "./lib/types.d.ts",
70
58
  "default": "./lib/types.d.ts"
@@ -91,9 +79,6 @@
91
79
  "builder": [
92
80
  "./dist/types/builder/index.d.ts"
93
81
  ],
94
- "config": [
95
- "./dist/types/config/public.d.ts"
96
- ],
97
82
  "bundle-docs": [
98
83
  "./dist/types/bundleDocs.d.ts"
99
84
  ]
@@ -134,18 +119,18 @@
134
119
  "@babel/traverse": "^8.0.4",
135
120
  "@babel/types": "^8.0.4",
136
121
  "@loadable/component": "5.16.7",
137
- "@modern-js/app-tools-extensions": "npm:@bleedingdev/modern-js-app-tools-extensions@3.9.0-ultramodern.4",
138
- "@modern-js/builder": "npm:@bleedingdev/modern-js-builder@3.9.0-ultramodern.4",
139
- "@modern-js/i18n-utils": "npm:@bleedingdev/modern-js-i18n-utils@3.9.0-ultramodern.4",
140
- "@modern-js/plugin": "npm:@bleedingdev/modern-js-plugin@3.9.0-ultramodern.4",
141
- "@modern-js/plugin-data-loader": "npm:@bleedingdev/modern-js-plugin-data-loader@3.9.0-ultramodern.4",
142
- "@modern-js/prod-server": "npm:@bleedingdev/modern-js-prod-server@3.9.0-ultramodern.4",
143
- "@modern-js/server": "npm:@bleedingdev/modern-js-server@3.9.0-ultramodern.4",
144
- "@modern-js/server-core": "npm:@bleedingdev/modern-js-server-core@3.9.0-ultramodern.4",
145
- "@modern-js/server-runtime-extensions": "npm:@bleedingdev/modern-js-server-runtime-extensions@3.9.0-ultramodern.4",
146
- "@modern-js/server-utils": "npm:@bleedingdev/modern-js-server-utils@3.9.0-ultramodern.4",
147
- "@modern-js/types": "npm:@bleedingdev/modern-js-types@3.9.0-ultramodern.4",
148
- "@modern-js/utils": "npm:@bleedingdev/modern-js-utils@3.9.0-ultramodern.4",
122
+ "@modern-js/app-tools-extensions": "npm:@bleedingdev/modern-js-app-tools-extensions@3.9.0-ultramodern.6",
123
+ "@modern-js/builder": "npm:@bleedingdev/modern-js-builder@3.9.0-ultramodern.6",
124
+ "@modern-js/i18n-utils": "npm:@bleedingdev/modern-js-i18n-utils@3.9.0-ultramodern.6",
125
+ "@modern-js/plugin": "npm:@bleedingdev/modern-js-plugin@3.9.0-ultramodern.6",
126
+ "@modern-js/plugin-data-loader": "npm:@bleedingdev/modern-js-plugin-data-loader@3.9.0-ultramodern.6",
127
+ "@modern-js/prod-server": "npm:@bleedingdev/modern-js-prod-server@3.9.0-ultramodern.6",
128
+ "@modern-js/server": "npm:@bleedingdev/modern-js-server@3.9.0-ultramodern.6",
129
+ "@modern-js/server-core": "npm:@bleedingdev/modern-js-server-core@3.9.0-ultramodern.6",
130
+ "@modern-js/server-runtime-extensions": "npm:@bleedingdev/modern-js-server-runtime-extensions@3.9.0-ultramodern.6",
131
+ "@modern-js/server-utils": "npm:@bleedingdev/modern-js-server-utils@3.9.0-ultramodern.6",
132
+ "@modern-js/types": "npm:@bleedingdev/modern-js-types@3.9.0-ultramodern.6",
133
+ "@modern-js/utils": "npm:@bleedingdev/modern-js-utils@3.9.0-ultramodern.6",
149
134
  "@rsbuild/core": "2.2.3",
150
135
  "@swc/core": "1.16.2",
151
136
  "@swc/helpers": "^0.5.23",
@@ -173,8 +158,7 @@
173
158
  },
174
159
  "scripts": {
175
160
  "dev": "rslib build --watch",
176
- "build": "rslib build && pnpm run verify:public-surface && node ./bin/modern-bundle-docs.js",
177
- "verify:public-surface": "node ./tests/config/verify-public-surface.mjs",
161
+ "build": "rslib build && node ./bin/modern-bundle-docs.js",
178
162
  "test": "rstest"
179
163
  }
180
164
  }
package/rslib.config.mts CHANGED
@@ -1,6 +1,5 @@
1
1
  import { rslibConfig } from '@modern-js/rslib';
2
2
  import { defineConfig } from '@rslib/core';
3
- import { publicDeclarationsPlugin } from '../../../scripts/prebundle/ultramodern/public-declarations.mjs';
4
3
 
5
4
  const APP_TOOLS_CODE_ENTRY_GLOBS = [
6
5
  './src/**/*.{js,jsx,ts,tsx,mts,cts}',
@@ -9,10 +8,6 @@ const APP_TOOLS_CODE_ENTRY_GLOBS = [
9
8
 
10
9
  export default defineConfig({
11
10
  ...rslibConfig,
12
- plugins: [
13
- ...(rslibConfig.plugins ?? []),
14
- publicDeclarationsPlugin('app-tools'),
15
- ],
16
11
  lib: rslibConfig.lib?.map(libConfig => {
17
12
  return {
18
13
  ...libConfig,
@@ -1,125 +0,0 @@
1
- "use strict";
2
- var __webpack_require__ = {};
3
- (()=>{
4
- __webpack_require__.n = (module)=>{
5
- var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
6
- __webpack_require__.d(getter, {
7
- a: getter
8
- });
9
- return getter;
10
- };
11
- })();
12
- (()=>{
13
- __webpack_require__.d = (exports1, getters, values)=>{
14
- var define = (defs, kind)=>{
15
- for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
16
- enumerable: true,
17
- [kind]: defs[key]
18
- });
19
- };
20
- define(getters, "get");
21
- define(values, "value");
22
- };
23
- })();
24
- (()=>{
25
- __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
26
- })();
27
- (()=>{
28
- __webpack_require__.r = (exports1)=>{
29
- if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
30
- value: 'Module'
31
- });
32
- Object.defineProperty(exports1, '__esModule', {
33
- value: true
34
- });
35
- };
36
- })();
37
- var __webpack_exports__ = {};
38
- __webpack_require__.r(__webpack_exports__);
39
- __webpack_require__.d(__webpack_exports__, {
40
- builderPluginAdapterPrecompress: ()=>builderPluginAdapterPrecompress
41
- });
42
- const external_node_zlib_namespaceObject = require("node:zlib");
43
- const external_compression_webpack_plugin_namespaceObject = require("compression-webpack-plugin");
44
- var external_compression_webpack_plugin_default = /*#__PURE__*/ __webpack_require__.n(external_compression_webpack_plugin_namespaceObject);
45
- const DEFAULT_PRECOMPRESS_TEST = /\.(js|mjs|cjs|css|html|svg|json|map)$/i;
46
- const DEFAULT_PRECOMPRESS_THRESHOLD = 10240;
47
- const DEFAULT_PRECOMPRESS_MIN_RATIO = 0.8;
48
- const createDefaultGzipOptions = ()=>({
49
- algorithm: 'gzip',
50
- filename: '[path][base].gz',
51
- test: DEFAULT_PRECOMPRESS_TEST,
52
- threshold: DEFAULT_PRECOMPRESS_THRESHOLD,
53
- minRatio: DEFAULT_PRECOMPRESS_MIN_RATIO,
54
- compressionOptions: {
55
- level: 6
56
- }
57
- });
58
- const createDefaultBrotliOptions = ()=>({
59
- algorithm: 'brotliCompress',
60
- filename: '[path][base].br',
61
- test: DEFAULT_PRECOMPRESS_TEST,
62
- threshold: DEFAULT_PRECOMPRESS_THRESHOLD,
63
- minRatio: DEFAULT_PRECOMPRESS_MIN_RATIO,
64
- compressionOptions: {
65
- params: {
66
- [external_node_zlib_namespaceObject.constants.BROTLI_PARAM_QUALITY]: 9
67
- }
68
- }
69
- });
70
- const mergeCompressionOptions = (base, next)=>{
71
- const merged = {
72
- ...base,
73
- ...next
74
- };
75
- if (base.compressionOptions || next.compressionOptions) {
76
- const baseCompressionOptions = base.compressionOptions;
77
- const nextCompressionOptions = next.compressionOptions;
78
- const mergedCompressionOptions = {
79
- ...baseCompressionOptions,
80
- ...nextCompressionOptions
81
- };
82
- if (baseCompressionOptions?.params || nextCompressionOptions?.params) mergedCompressionOptions.params = {
83
- ...baseCompressionOptions?.params,
84
- ...nextCompressionOptions?.params
85
- };
86
- merged.compressionOptions = mergedCompressionOptions;
87
- }
88
- return merged;
89
- };
90
- const resolveCodecOptions = (codecConfig, createDefaultOptions)=>{
91
- if (false === codecConfig) return null;
92
- if (void 0 === codecConfig || true === codecConfig) return createDefaultOptions();
93
- return mergeCompressionOptions(createDefaultOptions(), codecConfig);
94
- };
95
- const resolvePrecompressConfig = (normalizedConfig)=>{
96
- const precompress = normalizedConfig.output.precompress;
97
- if (false === precompress || void 0 === precompress) return false;
98
- if (true === precompress) return {};
99
- return precompress;
100
- };
101
- const builderPluginAdapterPrecompress = (options)=>({
102
- name: 'builder-plugin-adapter-modern-precompress',
103
- setup (api) {
104
- api.modifyBundlerChain((chain, { isProd, target })=>{
105
- if (!isProd || 'web' !== target) return;
106
- const precompressConfig = resolvePrecompressConfig(options.normalizedConfig);
107
- if (false === precompressConfig) return;
108
- const gzipOptions = resolveCodecOptions(precompressConfig.gzip, createDefaultGzipOptions);
109
- if (gzipOptions) chain.plugin('modern-precompress-gzip').use(external_compression_webpack_plugin_default(), [
110
- gzipOptions
111
- ]);
112
- const brotliOptions = resolveCodecOptions(precompressConfig.brotli, createDefaultBrotliOptions);
113
- if (brotliOptions) chain.plugin('modern-precompress-brotli').use(external_compression_webpack_plugin_default(), [
114
- brotliOptions
115
- ]);
116
- });
117
- }
118
- });
119
- exports.builderPluginAdapterPrecompress = __webpack_exports__.builderPluginAdapterPrecompress;
120
- for(var __rspack_i in __webpack_exports__)if (-1 === [
121
- "builderPluginAdapterPrecompress"
122
- ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
123
- Object.defineProperty(exports, '__esModule', {
124
- value: true
125
- });