vike 0.4.152-commit-3d25618 → 0.4.152-commit-06c1fd5
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/cjs/node/runtime/html/stream.js +2 -1
- package/dist/cjs/node/runtime/utils.js +0 -1
- package/dist/cjs/utils/projectInfo.js +1 -1
- package/dist/esm/node/runtime/html/stream.js +3 -2
- package/dist/esm/node/runtime/utils.d.ts +0 -1
- package/dist/esm/node/runtime/utils.js +0 -1
- package/dist/esm/utils/projectInfo.d.ts +2 -2
- package/dist/esm/utils/projectInfo.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/utils/dynamicImport.js +0 -8
- package/dist/esm/utils/dynamicImport.d.ts +0 -2
- package/dist/esm/utils/dynamicImport.js +0 -4
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.isStreamWritableNode = exports.isStreamWritableWeb = exports.streamPipeNodeToString = exports.streamReadableWebToString = exports.inferStreamName = exports.getStreamName = exports.isStreamReadableNode = exports.isStreamReadableWeb = exports.isStreamPipeNode = exports.isStreamPipeWeb = exports.isStream = exports.pipeToStreamWritableWeb = exports.pipeToStreamWritableNode = exports.getStreamReadableWeb = exports.getStreamReadableNode = exports.pipeNodeStream = exports.pipeWebStream = exports.pipeStream = exports.stampPipe = exports.streamToString = exports.processStream = void 0;
|
|
7
7
|
const utils_js_1 = require("../utils.js");
|
|
8
8
|
const react_streaming_js_1 = require("./stream/react-streaming.js");
|
|
9
|
+
const import_1 = require("@brillout/import");
|
|
9
10
|
const picocolors_1 = __importDefault(require("@brillout/picocolors"));
|
|
10
11
|
const debug = (0, utils_js_1.createDebugger)('vike:stream');
|
|
11
12
|
function isStreamReadableWeb(thing) {
|
|
@@ -757,7 +758,7 @@ function encodeForWebStream(thing) {
|
|
|
757
758
|
}
|
|
758
759
|
// Because of Cloudflare Workers, we cannot statically import the `stream` module, instead we dynamically import it.
|
|
759
760
|
async function loadStreamNodeModule() {
|
|
760
|
-
const streamModule = await (0,
|
|
761
|
+
const streamModule = (await (0, import_1.import_)('stream')).default;
|
|
761
762
|
const { Readable, Writable } = streamModule;
|
|
762
763
|
return { Readable, Writable };
|
|
763
764
|
}
|
|
@@ -64,7 +64,6 @@ __exportStar(require("../../utils/path-shim.js"), exports);
|
|
|
64
64
|
__exportStar(require("../../utils/nodeEnv.js"), exports);
|
|
65
65
|
__exportStar(require("../../utils/isHtml.js"), exports);
|
|
66
66
|
__exportStar(require("../../utils/warnIfErrorIsNotObject.js"), exports);
|
|
67
|
-
__exportStar(require("../../utils/dynamicImport.js"), exports);
|
|
68
67
|
__exportStar(require("../../utils/stripAnsi.js"), exports);
|
|
69
68
|
__exportStar(require("../../utils/getTerminWidth.js"), exports);
|
|
70
69
|
__exportStar(require("../../utils/truncateString.js"), exports);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PROJECT_VERSION = exports.projectInfo = void 0;
|
|
4
4
|
const assertSingleInstance_js_1 = require("./assertSingleInstance.js");
|
|
5
|
-
const PROJECT_VERSION = '0.4.152-commit-
|
|
5
|
+
const PROJECT_VERSION = '0.4.152-commit-06c1fd5';
|
|
6
6
|
exports.PROJECT_VERSION = PROJECT_VERSION;
|
|
7
7
|
const projectInfo = {
|
|
8
8
|
projectName: 'Vike',
|
|
@@ -19,8 +19,9 @@ export { streamReadableWebToString };
|
|
|
19
19
|
export { streamPipeNodeToString };
|
|
20
20
|
export { isStreamWritableWeb };
|
|
21
21
|
export { isStreamWritableNode };
|
|
22
|
-
import { assert, assertUsage, checkType, isObject, hasProp, objectAssign, capitalizeFirstLetter, assertWarning, isCallable, createDebugger,
|
|
22
|
+
import { assert, assertUsage, checkType, isObject, hasProp, objectAssign, capitalizeFirstLetter, assertWarning, isCallable, createDebugger, isBug } from '../utils.js';
|
|
23
23
|
import { getStreamFromReactStreaming, isStreamReactStreaming, streamReactStreamingToString } from './stream/react-streaming.js';
|
|
24
|
+
import { import_ } from '@brillout/import';
|
|
24
25
|
import pc from '@brillout/picocolors';
|
|
25
26
|
const debug = createDebugger('vike:stream');
|
|
26
27
|
function isStreamReadableWeb(thing) {
|
|
@@ -753,7 +754,7 @@ function encodeForWebStream(thing) {
|
|
|
753
754
|
}
|
|
754
755
|
// Because of Cloudflare Workers, we cannot statically import the `stream` module, instead we dynamically import it.
|
|
755
756
|
async function loadStreamNodeModule() {
|
|
756
|
-
const streamModule = await
|
|
757
|
+
const streamModule = (await import_('stream')).default;
|
|
757
758
|
const { Readable, Writable } = streamModule;
|
|
758
759
|
return { Readable, Writable };
|
|
759
760
|
}
|
|
@@ -45,7 +45,6 @@ export * from '../../utils/path-shim.js';
|
|
|
45
45
|
export * from '../../utils/nodeEnv.js';
|
|
46
46
|
export * from '../../utils/isHtml.js';
|
|
47
47
|
export * from '../../utils/warnIfErrorIsNotObject.js';
|
|
48
|
-
export * from '../../utils/dynamicImport.js';
|
|
49
48
|
export * from '../../utils/stripAnsi.js';
|
|
50
49
|
export * from '../../utils/getTerminWidth.js';
|
|
51
50
|
export * from '../../utils/truncateString.js';
|
|
@@ -48,7 +48,6 @@ export * from '../../utils/path-shim.js';
|
|
|
48
48
|
export * from '../../utils/nodeEnv.js';
|
|
49
49
|
export * from '../../utils/isHtml.js';
|
|
50
50
|
export * from '../../utils/warnIfErrorIsNotObject.js';
|
|
51
|
-
export * from '../../utils/dynamicImport.js';
|
|
52
51
|
export * from '../../utils/stripAnsi.js';
|
|
53
52
|
export * from '../../utils/getTerminWidth.js';
|
|
54
53
|
export * from '../../utils/truncateString.js';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export { projectInfo };
|
|
2
2
|
export type { ProjectTag };
|
|
3
3
|
export { PROJECT_VERSION };
|
|
4
|
-
declare const PROJECT_VERSION: "0.4.152-commit-
|
|
4
|
+
declare const PROJECT_VERSION: "0.4.152-commit-06c1fd5";
|
|
5
5
|
type PackageName = typeof projectInfo.npmPackageName;
|
|
6
6
|
type ProjectVersion = typeof projectInfo.projectVersion;
|
|
7
7
|
type ProjectTag = `[${PackageName}]` | `[${PackageName}@${ProjectVersion}]`;
|
|
8
8
|
declare const projectInfo: {
|
|
9
9
|
projectName: "Vike";
|
|
10
|
-
projectVersion: "0.4.152-commit-
|
|
10
|
+
projectVersion: "0.4.152-commit-06c1fd5";
|
|
11
11
|
npmPackageName: "vike";
|
|
12
12
|
githubRepository: "https://github.com/vikejs/vike";
|
|
13
13
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { projectInfo };
|
|
2
2
|
export { PROJECT_VERSION };
|
|
3
3
|
import { onProjectInfo } from './assertSingleInstance.js';
|
|
4
|
-
const PROJECT_VERSION = '0.4.152-commit-
|
|
4
|
+
const PROJECT_VERSION = '0.4.152-commit-06c1fd5';
|
|
5
5
|
const projectInfo = {
|
|
6
6
|
projectName: 'Vike',
|
|
7
7
|
projectVersion: PROJECT_VERSION,
|
package/package.json
CHANGED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.dynamicImport = void 0;
|
|
4
|
-
/** Only works for npm packages, for files use @brillout/import instead */
|
|
5
|
-
function dynamicImport(mod) {
|
|
6
|
-
return new Function('mod', 'return import(mod)')(mod);
|
|
7
|
-
}
|
|
8
|
-
exports.dynamicImport = dynamicImport;
|