@jk2908/solas 0.5.1 → 0.5.2
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/CHANGELOG.md +6 -0
- package/dist/index.js +2 -1
- package/dist/internal/codegen/environments.js +2 -2
- package/dist/internal/env/rsc.d.ts +1 -0
- package/dist/internal/env/rsc.js +1 -0
- package/dist/internal/runtimes/create.d.ts +4 -0
- package/dist/internal/runtimes/create.js +9 -0
- package/dist/solas.d.ts +1 -3
- package/dist/solas.js +0 -10
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.5.2 - 2026-06-06
|
|
4
|
+
|
|
5
|
+
- Fixed browser bundling regressions caused by exposing runtime creation through `Solas.Runtime.create(...)` in the shared `$` export path.
|
|
6
|
+
- Removed `Solas.Runtime.create(...)` and moved runtime selection to a server-only `createRuntime(...)` helper under internal runtimes.
|
|
7
|
+
- Updated plugin/runtime entry generation to call `createRuntime(...)` from `env/rsc`, keeping browser-reachable modules free of Node runtime imports.
|
|
8
|
+
|
|
3
9
|
## 0.5.1 - 2026-06-06
|
|
4
10
|
|
|
5
11
|
- Fixed production app bundling by removing the `mime-types` package dependency from Solas runtime paths, preventing client bundles from resolving `/node_modules/mime-types/*` imports.
|
package/dist/index.js
CHANGED
|
@@ -14,6 +14,7 @@ import { writeMaps } from './internal/codegen/maps.js';
|
|
|
14
14
|
import { writeTypes } from './internal/codegen/types.js';
|
|
15
15
|
import { postbuild } from './internal/postbuild.js';
|
|
16
16
|
import { collect as collectPublicFiles } from './internal/public-files.js';
|
|
17
|
+
import { createRuntime } from './internal/runtimes/create.js';
|
|
17
18
|
import { Runtime } from './internal/runtimes/runtime.js';
|
|
18
19
|
import { Solas } from './solas.js';
|
|
19
20
|
const DEFAULT_CONFIG = {
|
|
@@ -33,7 +34,7 @@ function solas(c) {
|
|
|
33
34
|
...validatedConfig,
|
|
34
35
|
runtime: validatedConfig.runtime ?? DEFAULT_CONFIG.runtime,
|
|
35
36
|
};
|
|
36
|
-
Runtime.runtime =
|
|
37
|
+
Runtime.runtime = createRuntime(config.runtime);
|
|
37
38
|
if (config.logger?.level)
|
|
38
39
|
Logger.defaultLevel = config.logger.level;
|
|
39
40
|
const logger = new Logger();
|
|
@@ -8,14 +8,14 @@ export function writeRSCEntry(config) {
|
|
|
8
8
|
return source `
|
|
9
9
|
${AUTOGEN_MSG}
|
|
10
10
|
|
|
11
|
-
import { createHandler, Runtime } from '${Solas.Config.PKG_NAME}/env/rsc'
|
|
11
|
+
import { createHandler, createRuntime, Runtime } from '${Solas.Config.PKG_NAME}/env/rsc'
|
|
12
12
|
import { Solas } from '${Solas.Config.PKG_NAME}/$'
|
|
13
13
|
|
|
14
14
|
import { manifest } from './manifest.js'
|
|
15
15
|
import { importMap } from './maps.js'
|
|
16
16
|
import { config } from './config.js'
|
|
17
17
|
|
|
18
|
-
Runtime.runtime =
|
|
18
|
+
Runtime.runtime = createRuntime(${runtime})
|
|
19
19
|
const runtimeManifest = await Solas.Runtime.loadManifest(Solas.Config.OUT_DIR)
|
|
20
20
|
|
|
21
21
|
export default createHandler(config, manifest, importMap, runtimeManifest)
|
|
@@ -2,6 +2,7 @@ import type { ReactFormState } from 'react-dom/client';
|
|
|
2
2
|
import type { ImportMap, Manifest, RuntimeConfig } from '../../types.js';
|
|
3
3
|
import { Solas } from '../../solas.js';
|
|
4
4
|
import { Metadata } from '../metadata.js';
|
|
5
|
+
export { createRuntime } from '../runtimes/create.js';
|
|
5
6
|
export { Runtime } from '../runtimes/runtime.js';
|
|
6
7
|
export type RscPayload = {
|
|
7
8
|
returnValue?: {
|
package/dist/internal/env/rsc.js
CHANGED
|
@@ -17,6 +17,7 @@ import { processActionRequest } from '../server/actions.js';
|
|
|
17
17
|
import DefaultErr from '../ui/defaults/error.js';
|
|
18
18
|
import { RequestContext } from './request-context.js';
|
|
19
19
|
import { getKnownDigest, isKnownError } from './utils.js';
|
|
20
|
+
export { createRuntime } from '../runtimes/create.js';
|
|
20
21
|
export { Runtime } from '../runtimes/runtime.js';
|
|
21
22
|
const logger = new Logger();
|
|
22
23
|
const BASE_PATH = BasePath.normalise(import.meta.env.BASE_URL);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { RuntimeBun } from './bun.js';
|
|
2
|
+
import { RuntimeNode } from './node.js';
|
|
3
|
+
export function createRuntime(runtime) {
|
|
4
|
+
if (runtime === 'bun' ||
|
|
5
|
+
(runtime === 'auto' && typeof globalThis.Bun !== 'undefined')) {
|
|
6
|
+
return new RuntimeBun();
|
|
7
|
+
}
|
|
8
|
+
return new RuntimeNode();
|
|
9
|
+
}
|
package/dist/solas.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { Prerender } from './internal/prerender.js';
|
|
2
|
-
import type { PluginConfig
|
|
3
|
-
import { Runtime as InternalRuntime } from './internal/runtimes/runtime.js';
|
|
2
|
+
import type { PluginConfig } from './types.js';
|
|
4
3
|
export declare namespace Solas {
|
|
5
4
|
interface Routes {
|
|
6
5
|
}
|
|
@@ -36,7 +35,6 @@ export declare namespace Solas {
|
|
|
36
35
|
artifacts: Prerender.Artifact.Manifest;
|
|
37
36
|
publicFiles: ReadonlySet<string>;
|
|
38
37
|
};
|
|
39
|
-
function create(runtime: Runtime): InternalRuntime.Impl;
|
|
40
38
|
function getManifestPath(outDir: string): string;
|
|
41
39
|
function loadManifest(outDir: string): Promise<Manifest | null>;
|
|
42
40
|
}
|
package/dist/solas.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { RuntimeBun } from './internal/runtimes/bun.js';
|
|
2
|
-
import { RuntimeNode } from './internal/runtimes/node.js';
|
|
3
1
|
import { Runtime as InternalRuntime } from './internal/runtimes/runtime.js';
|
|
4
2
|
export { Solas };
|
|
5
3
|
var Solas;
|
|
@@ -171,14 +169,6 @@ var Solas;
|
|
|
171
169
|
Solas.getVersion = getVersion;
|
|
172
170
|
let Runtime;
|
|
173
171
|
(function (Runtime) {
|
|
174
|
-
function create(runtime) {
|
|
175
|
-
if (runtime === 'bun' ||
|
|
176
|
-
(runtime === 'auto' && typeof globalThis.Bun !== 'undefined')) {
|
|
177
|
-
return new RuntimeBun();
|
|
178
|
-
}
|
|
179
|
-
return new RuntimeNode();
|
|
180
|
-
}
|
|
181
|
-
Runtime.create = create;
|
|
182
172
|
const manifestCache = new Map();
|
|
183
173
|
function getManifestPath(outDir) {
|
|
184
174
|
return [outDir, Config.GENERATED_DIR, Config.RUNTIME_MANIFEST]
|
package/package.json
CHANGED