@ttsc/playground 0.14.0-dev.20260529.1 → 0.14.0
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 +4 -4
- package/lib/src/compiler/DEFAULT_PLAYGROUND_COMPILER_OPTIONS.d.ts +4 -4
- package/lib/src/compiler/DEFAULT_PLAYGROUND_COMPILER_OPTIONS.js +4 -4
- package/lib/src/compiler/DEFAULT_TYPIA_PLUGIN_NAME.d.ts +2 -2
- package/lib/src/compiler/DEFAULT_TYPIA_PLUGIN_NAME.js +2 -2
- package/lib/src/compiler/createWorkerCompiler.js +3 -3
- package/lib/src/compiler/createWorkerCompiler.js.map +1 -1
- package/lib/src/compiler/installDependenciesIntoMemFS.d.ts +4 -4
- package/lib/src/compiler/installDependenciesIntoMemFS.js +4 -4
- package/lib/src/compiler/installTypiaSourcePack.d.ts +2 -2
- package/lib/src/compiler/installTypiaSourcePack.js +2 -2
- package/lib/src/compiler/internal/joinUnder.d.ts +4 -1
- package/lib/src/compiler/internal/joinUnder.js +4 -1
- package/lib/src/compiler/internal/joinUnder.js.map +1 -1
- package/lib/src/compiler/internal/parseLintDiagnostics.js +2 -2
- package/lib/src/compiler/internal/safeParseTypiaTransform.d.ts +3 -3
- package/lib/src/compiler/internal/safeParseTypiaTransform.js +3 -3
- package/lib/src/compiler/loadTypiaSourcePack.d.ts +4 -4
- package/lib/src/compiler/loadTypiaSourcePack.js +4 -4
- package/lib/src/compiler/pickEmittedJS.js +1 -6
- package/lib/src/compiler/pickEmittedJS.js.map +1 -1
- package/lib/src/index.d.ts +2 -2
- package/lib/src/index.js +2 -2
- package/lib/src/npm/BUILT_IN_PLAYGROUND_PACKAGES.d.ts +2 -2
- package/lib/src/npm/BUILT_IN_PLAYGROUND_PACKAGES.js +2 -2
- package/lib/src/npm/installPlaygroundDependencies.d.ts +2 -2
- package/lib/src/npm/installPlaygroundDependencies.js +2 -2
- package/lib/src/npm/internal/npmRegistry.js.map +1 -1
- package/lib/src/npm/packageNameFromSpecifier.d.ts +2 -2
- package/lib/src/npm/packageNameFromSpecifier.js +2 -2
- package/lib/src/react/createCompilerClient.d.ts +5 -5
- package/lib/src/react/createCompilerClient.js +5 -5
- package/lib/src/react/createCompilerClient.js.map +1 -1
- package/lib/src/sandbox/createSandboxRequire.d.ts +2 -2
- package/lib/src/sandbox/createSandboxRequire.js +2 -2
- package/lib/src/sandbox/loadTypiaRuntimePack.d.ts +3 -3
- package/lib/src/sandbox/loadTypiaRuntimePack.js +3 -3
- package/lib/src/structures/IBuildTsconfigOptions.d.ts +2 -2
- package/lib/src/structures/ICompilerService.d.ts +3 -2
- package/lib/src/structures/IConsoleMessage.d.ts +3 -3
- package/lib/src/structures/ICreateCompilerClientOptions.d.ts +4 -4
- package/lib/src/structures/ICreateWorkerCompilerOptions.d.ts +6 -6
- package/lib/src/structures/IInstallTypiaSourcePackOptions.d.ts +8 -5
- package/lib/src/structures/IOptionToggle.d.ts +2 -2
- package/lib/src/structures/IPlaygroundDependencyProgressPhase.d.ts +4 -1
- package/lib/src/structures/IPlaygroundExample.d.ts +3 -3
- package/lib/src/structures/IPlaygroundShellProps.d.ts +21 -15
- package/lib/src/structures/ISourceEditorProps.d.ts +4 -4
- package/lib/src/structures/ITypiaPluginConfig.d.ts +6 -6
- package/package.json +4 -4
- package/src/compiler/DEFAULT_PLAYGROUND_COMPILER_OPTIONS.ts +4 -4
- package/src/compiler/DEFAULT_TYPIA_PLUGIN_NAME.ts +2 -2
- package/src/compiler/createWorkerCompiler.ts +1 -2
- package/src/compiler/installDependenciesIntoMemFS.ts +4 -4
- package/src/compiler/installTypiaSourcePack.ts +2 -2
- package/src/compiler/internal/joinUnder.ts +4 -1
- package/src/compiler/internal/parseLintDiagnostics.ts +2 -2
- package/src/compiler/internal/safeParseTypiaTransform.ts +3 -3
- package/src/compiler/loadTypiaSourcePack.ts +4 -4
- package/src/compiler/pickEmittedJS.ts +1 -6
- package/src/index.ts +2 -2
- package/src/npm/BUILT_IN_PLAYGROUND_PACKAGES.ts +2 -2
- package/src/npm/installPlaygroundDependencies.ts +3 -3
- package/src/npm/internal/npmRegistry.ts +5 -1
- package/src/npm/packageNameFromSpecifier.ts +2 -2
- package/src/react/createCompilerClient.ts +9 -8
- package/src/sandbox/createSandboxRequire.ts +2 -2
- package/src/sandbox/loadTypiaRuntimePack.ts +3 -3
- package/src/structures/IBuildTsconfigOptions.ts +2 -2
- package/src/structures/ICompilerService.ts +3 -2
- package/src/structures/IConsoleMessage.ts +3 -3
- package/src/structures/ICreateCompilerClientOptions.ts +4 -4
- package/src/structures/ICreateWorkerCompilerOptions.ts +6 -6
- package/src/structures/IInstallTypiaSourcePackOptions.ts +8 -5
- package/src/structures/IOptionToggle.ts +2 -2
- package/src/structures/IPlaygroundDependencyProgressPhase.ts +4 -1
- package/src/structures/IPlaygroundExample.ts +3 -3
- package/src/structures/IPlaygroundShellProps.ts +21 -15
- package/src/structures/ISourceEditorProps.ts +4 -4
- package/src/structures/ITypiaPluginConfig.ts +6 -6
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Reusable Web Worker + React scaffolding for in-browser [`ttsc`](https://ttsc.dev) playgrounds. Built on top of [`@ttsc/wasm`](https://github.com/samchon/ttsc/tree/master/packages/wasm).
|
|
6
6
|
|
|
7
|
-
The package handles the parts every browser playground needs
|
|
7
|
+
The package handles the parts every browser playground needs, worker boot, MemFS layout, race-guarded compile / lint / bundle calls, on-the-fly npm dependency installer, typia source-pack mounting, console-capturing execute sandbox, and ships a Tailwind-styled React shell that wires them all up. Sites supply the wasm URL, a default script, and (optionally) examples, brand slot, and an execute callback.
|
|
8
8
|
|
|
9
9
|
The ttsc website (`ttsc.dev`) and the typia website (`typia.io`) are the two reference consumers.
|
|
10
10
|
|
|
@@ -17,7 +17,7 @@ npm install @ttsc/playground @ttsc/wasm \
|
|
|
17
17
|
|
|
18
18
|
`@monaco-editor/react`, `monaco-editor`, `react`, `react-dom`, `tgrid`, and `@ttsc/wasm` are **peer dependencies**. `lz-string` is bundled.
|
|
19
19
|
|
|
20
|
-
The React components use Tailwind 4 utility classes
|
|
20
|
+
The React components use Tailwind 4 utility classes. See [Tailwind setup](#tailwind-setup) below.
|
|
21
21
|
|
|
22
22
|
## What you get
|
|
23
23
|
|
|
@@ -125,7 +125,7 @@ The typia pack itself is built by the site (typically with a `pack-typia-sources
|
|
|
125
125
|
|
|
126
126
|
## Runtime npm dependency installer
|
|
127
127
|
|
|
128
|
-
When the user types `import {v4} from "uuid"`, the shell auto-fetches `uuid` (and its transitive deps) from the npm registry, unpacks the tgz in the browser, and mounts the files into the wasm MemFS
|
|
128
|
+
When the user types `import {v4} from "uuid"`, the shell auto-fetches `uuid` (and its transitive deps) from the npm registry, unpacks the tgz in the browser, and mounts the files into the wasm MemFS, no proxy server needed.
|
|
129
129
|
|
|
130
130
|
```ts
|
|
131
131
|
import {
|
|
@@ -168,7 +168,7 @@ export default config;
|
|
|
168
168
|
|
|
169
169
|
Then `import "./global.css"` from the root layout.
|
|
170
170
|
|
|
171
|
-
**`@ttsc/playground` must be a direct dependency** of the consuming package. Tailwind only scans paths the consumer points at
|
|
171
|
+
**`@ttsc/playground` must be a direct dependency** of the consuming package. Tailwind only scans paths the consumer points at. A transitively-installed copy (where @ttsc/playground is a dep of another package) lives under a different node_modules layout and the glob above won't find it without explicit re-targeting.
|
|
172
172
|
|
|
173
173
|
## Booting a custom wasm
|
|
174
174
|
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
* pass these straight to `buildTsconfigJSON`; consumer code that needs a tweak
|
|
4
4
|
* spreads the constant and overrides individual fields.
|
|
5
5
|
*
|
|
6
|
-
* `target` and `module` are TypeScript's numeric enum values (99 = ESNext,
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
6
|
+
* `target` and `module` are TypeScript's numeric enum values (99 = ESNext, 199
|
|
7
|
+
* = NodeNext, …). They are spelled numerically here because the wasm doesn't
|
|
8
|
+
* run the TS configuration parser through a string→enum step before Go reads
|
|
9
|
+
* the JSON; passing the canonical numbers avoids version-drift.
|
|
10
10
|
*/
|
|
11
11
|
export declare const DEFAULT_PLAYGROUND_COMPILER_OPTIONS: {
|
|
12
12
|
readonly target: 99;
|
|
@@ -6,10 +6,10 @@ exports.DEFAULT_PLAYGROUND_COMPILER_OPTIONS = void 0;
|
|
|
6
6
|
* pass these straight to `buildTsconfigJSON`; consumer code that needs a tweak
|
|
7
7
|
* spreads the constant and overrides individual fields.
|
|
8
8
|
*
|
|
9
|
-
* `target` and `module` are TypeScript's numeric enum values (99 = ESNext,
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
9
|
+
* `target` and `module` are TypeScript's numeric enum values (99 = ESNext, 199
|
|
10
|
+
* = NodeNext, …). They are spelled numerically here because the wasm doesn't
|
|
11
|
+
* run the TS configuration parser through a string→enum step before Go reads
|
|
12
|
+
* the JSON; passing the canonical numbers avoids version-drift.
|
|
13
13
|
*/
|
|
14
14
|
exports.DEFAULT_PLAYGROUND_COMPILER_OPTIONS = {
|
|
15
15
|
target: 99,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Default plugin id for the typia transformer. Sites that wire a renamed
|
|
3
|
-
*
|
|
2
|
+
* Default plugin id for the typia transformer. Sites that wire a renamed typia
|
|
3
|
+
* plugin override via the `typiaPlugin.name` option of
|
|
4
4
|
* {@link createWorkerCompiler}.
|
|
5
5
|
*/
|
|
6
6
|
export declare const DEFAULT_TYPIA_PLUGIN_NAME = "typia";
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DEFAULT_TYPIA_PLUGIN_NAME = void 0;
|
|
4
4
|
/**
|
|
5
|
-
* Default plugin id for the typia transformer. Sites that wire a renamed
|
|
6
|
-
*
|
|
5
|
+
* Default plugin id for the typia transformer. Sites that wire a renamed typia
|
|
6
|
+
* plugin override via the `typiaPlugin.name` option of
|
|
7
7
|
* {@link createWorkerCompiler}.
|
|
8
8
|
*/
|
|
9
9
|
exports.DEFAULT_TYPIA_PLUGIN_NAME = "typia";
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createWorkerCompiler = createWorkerCompiler;
|
|
2
4
|
// Worker-side playground compiler factory.
|
|
3
5
|
//
|
|
4
6
|
// This module ships a ready-to-bind `ICompilerService` implementation. The
|
|
@@ -6,15 +8,13 @@
|
|
|
6
8
|
// the site's chosen module shape, registers the typia/lint plugin verbs (or
|
|
7
9
|
// the site-provided overrides), and serializes every MemFS-mutating call onto
|
|
8
10
|
// a single chain so concurrent compiles never corrupt each other.
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.createWorkerCompiler = createWorkerCompiler;
|
|
11
11
|
const wasm_1 = require("@ttsc/wasm");
|
|
12
|
-
const buildTsconfigJSON_1 = require("./buildTsconfigJSON");
|
|
13
12
|
const DEFAULT_ENTRY_FILE_1 = require("./DEFAULT_ENTRY_FILE");
|
|
14
13
|
const DEFAULT_LINT_PLUGIN_NAME_1 = require("./DEFAULT_LINT_PLUGIN_NAME");
|
|
15
14
|
const DEFAULT_TSCONFIG_PATH_1 = require("./DEFAULT_TSCONFIG_PATH");
|
|
16
15
|
const DEFAULT_TYPIA_PLUGIN_NAME_1 = require("./DEFAULT_TYPIA_PLUGIN_NAME");
|
|
17
16
|
const DEFAULT_WORK_DIR_1 = require("./DEFAULT_WORK_DIR");
|
|
17
|
+
const buildTsconfigJSON_1 = require("./buildTsconfigJSON");
|
|
18
18
|
const installDependenciesIntoMemFS_1 = require("./installDependenciesIntoMemFS");
|
|
19
19
|
const joinUnder_1 = require("./internal/joinUnder");
|
|
20
20
|
const parseLintDiagnostics_1 = require("./internal/parseLintDiagnostics");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createWorkerCompiler.js","sourceRoot":"","sources":["../../../src/compiler/createWorkerCompiler.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createWorkerCompiler.js","sourceRoot":"","sources":["../../../src/compiler/createWorkerCompiler.ts"],"names":[],"mappings":";;;AAAA,2CAA2C;AAC3C,EAAE;AACF,2EAA2E;AAC3E,4EAA4E;AAC5E,4EAA4E;AAC5E,8EAA8E;AAC9E,kEAAkE;AAClE,qCAKoB;AAKpB,6DAA0D;AAC1D,yEAAsE;AACtE,mEAAgE;AAChE,2EAAwE;AACxE,yDAAsD;AACtD,2DAAwD;AACxD,iFAA8E;AAC9E,oDAAiD;AACjD,0EAAuE;AACvE,gFAA6E;AAC7E,mDAAgD;AAChD,qDAAkD;AAClD,mDAAgD;AAEhD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,8BACE,OAAqC;IAErC,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,mCAAgB,CAAC;IACpD,MAAM,YAAY,GAAG,OAAO,CAAC,YAAY,IAAI,6CAAqB,CAAC;IACnE,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,uCAAkB,CAAC;IAE1D,MAAM,WAAW,GACf,OAAO,CAAC,WAAW,KAAK,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC;IACrE,MAAM,eAAe,GAAG,WAAW,EAAE,IAAI,IAAI,qDAAyB,CAAC;IACvE,MAAM,oBAAoB,GACxB,WAAW,EAAE,eAAe,IAAI,qBAAqB,CAAC;IAExD,MAAM,UAAU,GACd,OAAO,CAAC,UAAU,KAAK,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC;IACnE,MAAM,cAAc,GAAG,UAAU,EAAE,IAAI,IAAI,mDAAwB,CAAC;IAEpE,0EAA0E;IAC1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E,CAAC,eAAe,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;KAC9D,CAAC;AACJ,CAAC;AAED,SAAS,cAAc,CAAC,OAA2B;IACjD,OAAO,OAAO,EAAE,KAAK,KAAK,KAAK,CAAC;AAClC,CAAC"}
|
|
@@ -4,9 +4,9 @@ import type { ICompilerService } from "../structures/ICompilerService";
|
|
|
4
4
|
* Mount external npm package files into the worker's MemFS under
|
|
5
5
|
* `<workDir>/node_modules/...`.
|
|
6
6
|
*
|
|
7
|
-
* Used by `createWorkerCompiler` to implement the `installDependencies` verb
|
|
8
|
-
*
|
|
9
|
-
* `node_modules/uuid/dist/index.js`; we normalize, sanity-check, and copy
|
|
10
|
-
*
|
|
7
|
+
* Used by `createWorkerCompiler` to implement the `installDependencies` verb of
|
|
8
|
+
* `ICompilerService`. The dependency installer (UI side) feeds keys like
|
|
9
|
+
* `node_modules/uuid/dist/index.js`; we normalize, sanity-check, and copy each
|
|
10
|
+
* entry under the project root.
|
|
11
11
|
*/
|
|
12
12
|
export declare function installDependenciesIntoMemFS(host: IMemFSHost, workDir: string, props: ICompilerService.IInstallDependenciesProps): ICompilerService.IInstallDependenciesResult;
|
|
@@ -6,10 +6,10 @@ const normalizeNodeModulePath_1 = require("./normalizeNodeModulePath");
|
|
|
6
6
|
* Mount external npm package files into the worker's MemFS under
|
|
7
7
|
* `<workDir>/node_modules/...`.
|
|
8
8
|
*
|
|
9
|
-
* Used by `createWorkerCompiler` to implement the `installDependencies` verb
|
|
10
|
-
*
|
|
11
|
-
* `node_modules/uuid/dist/index.js`; we normalize, sanity-check, and copy
|
|
12
|
-
*
|
|
9
|
+
* Used by `createWorkerCompiler` to implement the `installDependencies` verb of
|
|
10
|
+
* `ICompilerService`. The dependency installer (UI side) feeds keys like
|
|
11
|
+
* `node_modules/uuid/dist/index.js`; we normalize, sanity-check, and copy each
|
|
12
|
+
* entry under the project root.
|
|
13
13
|
*/
|
|
14
14
|
function installDependenciesIntoMemFS(host, workDir, props) {
|
|
15
15
|
let fileCount = 0;
|
|
@@ -2,8 +2,8 @@ import type { IMemFSHost } from "@ttsc/wasm";
|
|
|
2
2
|
import type { IInstallTypiaSourcePackOptions } from "../structures/IInstallTypiaSourcePackOptions";
|
|
3
3
|
/**
|
|
4
4
|
* Mounts typia + @typia/* source trees into the in-browser MemFS so the
|
|
5
|
-
* wasm-side compiler can resolve `import typia, { tags } from "typia"`
|
|
6
|
-
*
|
|
5
|
+
* wasm-side compiler can resolve `import typia, { tags } from "typia"` against
|
|
6
|
+
* the same code the published package uses.
|
|
7
7
|
*
|
|
8
8
|
* Idempotent on the same host (re-writing the same paths is a no-op for the
|
|
9
9
|
* MemFS implementation).
|
|
@@ -4,8 +4,8 @@ exports.installTypiaSourcePack = installTypiaSourcePack;
|
|
|
4
4
|
const loadTypiaSourcePack_1 = require("./loadTypiaSourcePack");
|
|
5
5
|
/**
|
|
6
6
|
* Mounts typia + @typia/* source trees into the in-browser MemFS so the
|
|
7
|
-
* wasm-side compiler can resolve `import typia, { tags } from "typia"`
|
|
8
|
-
*
|
|
7
|
+
* wasm-side compiler can resolve `import typia, { tags } from "typia"` against
|
|
8
|
+
* the same code the published package uses.
|
|
9
9
|
*
|
|
10
10
|
* Idempotent on the same host (re-writing the same paths is a no-op for the
|
|
11
11
|
* MemFS implementation).
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.joinUnder = joinUnder;
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* Join a relative path under a base directory, ignoring base when `rel` is
|
|
6
|
+
* absolute.
|
|
7
|
+
*/
|
|
5
8
|
function joinUnder(base, rel) {
|
|
6
9
|
if (rel.startsWith("/"))
|
|
7
10
|
return rel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"joinUnder.js","sourceRoot":"","sources":["../../../../src/compiler/internal/joinUnder.ts"],"names":[],"mappings":";;;AAAA
|
|
1
|
+
{"version":3,"file":"joinUnder.js","sourceRoot":"","sources":["../../../../src/compiler/internal/joinUnder.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,mBAA0B,IAAY,EAAE,GAAW;IACjD,IAAI,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,OAAO,GAAG,CAAC;IACpC,OAAO,GAAG,IAAI,IAAI,GAAG,EAAE,CAAC;AAC1B,CAAC"}
|
|
@@ -40,8 +40,8 @@ function parseLintDiagnostics(stderr, source) {
|
|
|
40
40
|
return out;
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
43
|
-
* Best-effort length of the identifier-like token starting at (`line`,
|
|
44
|
-
* in `source`. Falls back to 1 when no token is found.
|
|
43
|
+
* Best-effort length of the identifier-like token starting at (`line`,
|
|
44
|
+
* `column`) in `source`. Falls back to 1 when no token is found.
|
|
45
45
|
*/
|
|
46
46
|
function lengthOfTokenAt(source, line, column) {
|
|
47
47
|
const lines = source.split(/\r?\n/);
|
|
@@ -4,8 +4,8 @@ export interface ITypiaTransformOutput {
|
|
|
4
4
|
typescript: Record<string, string>;
|
|
5
5
|
}
|
|
6
6
|
/**
|
|
7
|
-
* Parse the typia transform plugin's stdout into the expected shape.
|
|
8
|
-
*
|
|
9
|
-
*
|
|
7
|
+
* Parse the typia transform plugin's stdout into the expected shape. Returns
|
|
8
|
+
* null on any parse / shape mismatch — the caller treats null as "transform
|
|
9
|
+
* produced no usable output".
|
|
10
10
|
*/
|
|
11
11
|
export declare function safeParseTypiaTransform(text: string): ITypiaTransformOutput | null;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.safeParseTypiaTransform = safeParseTypiaTransform;
|
|
4
4
|
/**
|
|
5
|
-
* Parse the typia transform plugin's stdout into the expected shape.
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* Parse the typia transform plugin's stdout into the expected shape. Returns
|
|
6
|
+
* null on any parse / shape mismatch — the caller treats null as "transform
|
|
7
|
+
* produced no usable output".
|
|
8
8
|
*/
|
|
9
9
|
function safeParseTypiaTransform(text) {
|
|
10
10
|
try {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { IInstallTypiaSourcePackOptions } from "../structures/IInstallTypiaSourcePackOptions";
|
|
2
2
|
/**
|
|
3
|
-
* Fetch the typia source pack JSON. Cached per URL across calls. On
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
3
|
+
* Fetch the typia source pack JSON. Cached per URL across calls. On rejection
|
|
4
|
+
* the cache entry is cleared so the next call retries — otherwise a transient
|
|
5
|
+
* fetch failure during the first boot would wedge every later boot through
|
|
6
|
+
* `getBoot`'s typiaPlugin.mount path.
|
|
7
7
|
*/
|
|
8
8
|
export declare function loadTypiaSourcePack(options: IInstallTypiaSourcePackOptions): Promise<Record<string, string>>;
|
|
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.loadTypiaSourcePack = loadTypiaSourcePack;
|
|
4
4
|
const packCache = new Map();
|
|
5
5
|
/**
|
|
6
|
-
* Fetch the typia source pack JSON. Cached per URL across calls. On
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
6
|
+
* Fetch the typia source pack JSON. Cached per URL across calls. On rejection
|
|
7
|
+
* the cache entry is cleared so the next call retries — otherwise a transient
|
|
8
|
+
* fetch failure during the first boot would wedge every later boot through
|
|
9
|
+
* `getBoot`'s typiaPlugin.mount path.
|
|
10
10
|
*/
|
|
11
11
|
function loadTypiaSourcePack(options) {
|
|
12
12
|
const cached = packCache.get(options.url);
|
|
@@ -8,12 +8,7 @@ exports.pickEmittedJS = pickEmittedJS;
|
|
|
8
8
|
*/
|
|
9
9
|
function pickEmittedJS(output, entryFile) {
|
|
10
10
|
const base = entryFile.replace(/\.[cm]?tsx?$/i, ".js");
|
|
11
|
-
const candidates = [
|
|
12
|
-
`dist/${base}`,
|
|
13
|
-
`dist/src/${base}`,
|
|
14
|
-
`src/${base}`,
|
|
15
|
-
base,
|
|
16
|
-
];
|
|
11
|
+
const candidates = [`dist/${base}`, `dist/src/${base}`, `src/${base}`, base];
|
|
17
12
|
for (const key of candidates) {
|
|
18
13
|
if (output[key] !== undefined)
|
|
19
14
|
return output[key];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pickEmittedJS.js","sourceRoot":"","sources":["../../../src/compiler/pickEmittedJS.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,uBACE,MAA8B,EAC9B,SAAiB;IAEjB,MAAM,IAAI,GAAG,SAAS,CAAC,OAAO,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;IACvD,MAAM,UAAU,GAAG
|
|
1
|
+
{"version":3,"file":"pickEmittedJS.js","sourceRoot":"","sources":["../../../src/compiler/pickEmittedJS.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,uBACE,MAA8B,EAC9B,SAAiB;IAEjB,MAAM,IAAI,GAAG,SAAS,CAAC,OAAO,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;IACvD,MAAM,UAAU,GAAG,CAAC,QAAQ,IAAI,EAAE,EAAE,YAAY,IAAI,EAAE,EAAE,OAAO,IAAI,EAAE,EAAE,IAAI,CAAC,CAAC;IAC7E,KAAK,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;QAC7B,IAAI,MAAM,CAAC,GAAG,CAAC,KAAK,SAAS;YAAE,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC;IACpD,CAAC;IACD,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;IACpE,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAAE,CAAC,IAAI,IAAI,CAAC;IACzD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/lib/src/index.d.ts
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* The package is organized by concern: the `compiler/*` modules implement the
|
|
6
6
|
* worker-side `ICompilerService` contract; the `npm/*` modules install
|
|
7
7
|
* on-the-fly npm dependencies into the wasm MemFS; the `sandbox/*` modules
|
|
8
|
-
* drive an in-page `new Function` execute sandbox; the `react/*` modules
|
|
9
|
-
*
|
|
8
|
+
* drive an in-page `new Function` execute sandbox; the `react/*` modules render
|
|
9
|
+
* the shell, editor, and result panes.
|
|
10
10
|
*
|
|
11
11
|
* The package root re-exports everything; sub-path imports are not needed.
|
|
12
12
|
*/
|
package/lib/src/index.js
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* The package is organized by concern: the `compiler/*` modules implement the
|
|
7
7
|
* worker-side `ICompilerService` contract; the `npm/*` modules install
|
|
8
8
|
* on-the-fly npm dependencies into the wasm MemFS; the `sandbox/*` modules
|
|
9
|
-
* drive an in-page `new Function` execute sandbox; the `react/*` modules
|
|
10
|
-
*
|
|
9
|
+
* drive an in-page `new Function` execute sandbox; the `react/*` modules render
|
|
10
|
+
* the shell, editor, and result panes.
|
|
11
11
|
*
|
|
12
12
|
* The package root re-exports everything; sub-path imports are not needed.
|
|
13
13
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Packages the typia source pack already mounts inside the wasm. The npm
|
|
3
|
-
* installer skips these so it doesn't try to fetch typia / @typia/* from
|
|
4
|
-
*
|
|
3
|
+
* installer skips these so it doesn't try to fetch typia / @typia/* from the
|
|
4
|
+
* registry on top of the mounted source tree.
|
|
5
5
|
*/
|
|
6
6
|
export declare const BUILT_IN_PLAYGROUND_PACKAGES: readonly ["typia", "@typia/interface", "@typia/utils", "@standard-schema/spec"];
|
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.BUILT_IN_PLAYGROUND_PACKAGES = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Packages the typia source pack already mounts inside the wasm. The npm
|
|
6
|
-
* installer skips these so it doesn't try to fetch typia / @typia/* from
|
|
7
|
-
*
|
|
6
|
+
* installer skips these so it doesn't try to fetch typia / @typia/* from the
|
|
7
|
+
* registry on top of the mounted source tree.
|
|
8
8
|
*/
|
|
9
9
|
exports.BUILT_IN_PLAYGROUND_PACKAGES = [
|
|
10
10
|
"typia",
|
|
@@ -7,7 +7,7 @@ import type { IPlaygroundDependencyInstallResult } from "../structures/IPlaygrou
|
|
|
7
7
|
*
|
|
8
8
|
* Transitive dependencies are followed via the resolved `package.json`'s
|
|
9
9
|
* `dependencies` and (non-optional) `peerDependencies` fields. The walk is
|
|
10
|
-
* bounded by `maxPackages` to keep a single keystroke from exhausting the
|
|
11
|
-
*
|
|
10
|
+
* bounded by `maxPackages` to keep a single keystroke from exhausting the tab's
|
|
11
|
+
* network/memory budget.
|
|
12
12
|
*/
|
|
13
13
|
export declare function installPlaygroundDependencies(packageNames: Iterable<string>, options?: IPlaygroundDependencyInstallOptions): Promise<IPlaygroundDependencyInstallResult>;
|
|
@@ -11,8 +11,8 @@ const DEFAULT_MAX_PACKAGES = 48;
|
|
|
11
11
|
*
|
|
12
12
|
* Transitive dependencies are followed via the resolved `package.json`'s
|
|
13
13
|
* `dependencies` and (non-optional) `peerDependencies` fields. The walk is
|
|
14
|
-
* bounded by `maxPackages` to keep a single keystroke from exhausting the
|
|
15
|
-
*
|
|
14
|
+
* bounded by `maxPackages` to keep a single keystroke from exhausting the tab's
|
|
15
|
+
* network/memory budget.
|
|
16
16
|
*/
|
|
17
17
|
async function installPlaygroundDependencies(packageNames, options = {}) {
|
|
18
18
|
const fetchImpl = options.fetch ?? globalThis.fetch?.bind(globalThis);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"npmRegistry.js","sourceRoot":"","sources":["../../../../src/npm/internal/npmRegistry.ts"],"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AAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC;IACpE,MAAM,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC;IACpE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QACxD,MAAM,EAAE,GAAG,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/C,MAAM,EAAE,GAAG,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/C,IAAI,EAAE,KAAK,EAAE;YAAE,OAAO,EAAE,GAAG,EAAE,CAAC;IAChC,CAAC;IACD,OAAO,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;AAC5B,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Extract the package name from a module specifier.
|
|
3
3
|
*
|
|
4
|
-
* Returns `null` for relative paths, hash imports, URL specifiers, and
|
|
5
|
-
*
|
|
4
|
+
* Returns `null` for relative paths, hash imports, URL specifiers, and Node
|
|
5
|
+
* built-in modules — the caller doesn't install those from npm.
|
|
6
6
|
*/
|
|
7
7
|
export declare function packageNameFromSpecifier(specifier: string): string | null;
|
|
@@ -36,8 +36,8 @@ const BUILTIN_MODULES = new Set([
|
|
|
36
36
|
/**
|
|
37
37
|
* Extract the package name from a module specifier.
|
|
38
38
|
*
|
|
39
|
-
* Returns `null` for relative paths, hash imports, URL specifiers, and
|
|
40
|
-
*
|
|
39
|
+
* Returns `null` for relative paths, hash imports, URL specifiers, and Node
|
|
40
|
+
* built-in modules — the caller doesn't install those from npm.
|
|
41
41
|
*/
|
|
42
42
|
function packageNameFromSpecifier(specifier) {
|
|
43
43
|
if (specifier.startsWith("#") ||
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { ICompilerService } from "../structures/ICompilerService";
|
|
2
2
|
import type { ICreateCompilerClientOptions } from "../structures/ICreateCompilerClientOptions";
|
|
3
3
|
/**
|
|
4
|
-
* UI-side singleton: connect to the playground worker over tgrid and return
|
|
5
|
-
*
|
|
4
|
+
* UI-side singleton: connect to the playground worker over tgrid and return the
|
|
5
|
+
* typed `ICompilerService` driver.
|
|
6
6
|
*
|
|
7
|
-
* The promise is cached; the first call boots, every subsequent call shares
|
|
8
|
-
*
|
|
9
|
-
*
|
|
7
|
+
* The promise is cached; the first call boots, every subsequent call shares the
|
|
8
|
+
* same connection. If the boot rejects the cache is cleared so the next call
|
|
9
|
+
* retries — otherwise every retry would resolve to the same rejection.
|
|
10
10
|
*/
|
|
11
11
|
export declare function createCompilerClient(options: ICreateCompilerClientOptions): {
|
|
12
12
|
connect(): Promise<ICompilerService>;
|
|
@@ -4,12 +4,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.createCompilerClient = createCompilerClient;
|
|
5
5
|
const tgrid_1 = require("tgrid");
|
|
6
6
|
/**
|
|
7
|
-
* UI-side singleton: connect to the playground worker over tgrid and return
|
|
8
|
-
*
|
|
7
|
+
* UI-side singleton: connect to the playground worker over tgrid and return the
|
|
8
|
+
* typed `ICompilerService` driver.
|
|
9
9
|
*
|
|
10
|
-
* The promise is cached; the first call boots, every subsequent call shares
|
|
11
|
-
*
|
|
12
|
-
*
|
|
10
|
+
* The promise is cached; the first call boots, every subsequent call shares the
|
|
11
|
+
* same connection. If the boot rejects the cache is cleared so the next call
|
|
12
|
+
* retries — otherwise every retry would resolve to the same rejection.
|
|
13
13
|
*/
|
|
14
14
|
function createCompilerClient(options) {
|
|
15
15
|
let connectionPromise = null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createCompilerClient.js","sourceRoot":"","sources":["../../../src/react/createCompilerClient.ts"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;AAEb,iCAAwC;AAKxC;;;;;;;GAOG;AACH,
|
|
1
|
+
{"version":3,"file":"createCompilerClient.js","sourceRoot":"","sources":["../../../src/react/createCompilerClient.ts"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;AAEb,iCAAwC;AAKxC;;;;;;;GAOG;AACH,8BAAqC,OAAqC;IAIxE,IAAI,iBAAiB,GAAqC,IAAI,CAAC;IAC/D,oEAAoE;IACpE,+DAA+D;IAC/D,sEAAsE;IACtE,uEAAuE;IACvE,qDAAqD;IACrD,IAAI,eAAe,GAA6C,IAAI,CAAC;IACrE,IAAI,gBAAgB,GAClB,IAAI,CAAC;IAEP,OAAO;QACL,OAAO;YACL,IAAI,iBAAiB;gBAAE,OAAO,iBAAiB,CAAC;YAChD,MAAM,SAAS,GAAsC,IAAI,uBAAe,CACtE,IAAI,EACJ,IAAI,CACL,CAAC;YACF,MAAM,cAAc,GAAG,SAAS;iBAC7B,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC;iBAC1B,IAAI,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;YACzB,gBAAgB,GAAG,cAAc,CAAC;YAClC,iBAAiB,GAAG,CAAC,KAAK,IAAI,EAAE;gBAC9B,IAAI,CAAC;oBACH,MAAM,cAAc,CAAC;gBACvB,CAAC;gBAAC,OAAO,GAAG,EAAE,CAAC;oBACb,iBAAiB,GAAG,IAAI,CAAC;oBACzB,IAAI,gBAAgB,KAAK,cAAc;wBAAE,gBAAgB,GAAG,IAAI,CAAC;oBACjE,MAAM,GAAG,CAAC;gBACZ,CAAC;gBACD,IAAI,gBAAgB,KAAK,cAAc;oBAAE,gBAAgB,GAAG,IAAI,CAAC;gBACjE,eAAe,GAAG,SAAS,CAAC;gBAC5B,OAAO,SAAS,CAAC,SAAS,EAAiC,CAAC;YAC9D,CAAC,CAAC,EAAE,CAAC;YACL,OAAO,iBAAiB,CAAC;QAC3B,CAAC;QACD,KAAK,CAAC,KAAK;YACT,MAAM,QAAQ,GAAG,gBAAgB,CAAC;YAClC,MAAM,MAAM,GAAG,eAAe,CAAC;YAC/B,iBAAiB,GAAG,IAAI,CAAC;YACzB,gBAAgB,GAAG,IAAI,CAAC;YACxB,eAAe,GAAG,IAAI,CAAC;YACvB,+DAA+D;YAC/D,+DAA+D;YAC/D,8DAA8D;YAC9D,iEAAiE;YACjE,+DAA+D;YAC/D,gCAAgC;YAChC,IAAI,QAAQ,EAAE,CAAC;gBACb,IAAI,CAAC;oBACH,MAAM,CAAC,GAAG,MAAM,QAAQ,CAAC;oBACzB,IAAI,CAAC,KAAK,MAAM;wBAAE,MAAM,CAAC,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;gBACpD,CAAC;gBAAC,MAAM,CAAC;oBACP,yCAAyC;gBAC3C,CAAC;YACH,CAAC;YACD,IAAI,MAAM,EAAE,CAAC;gBACX,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;YACvC,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -4,8 +4,8 @@ interface ISandboxRequireOptions {
|
|
|
4
4
|
}
|
|
5
5
|
/**
|
|
6
6
|
* Build a sandboxed `require` function over a runtime pack. Resolves typia /
|
|
7
|
-
* `@typia/*` / randexp specifiers from the pack; throws on anything else so
|
|
8
|
-
*
|
|
7
|
+
* `@typia/*` / randexp specifiers from the pack; throws on anything else so the
|
|
8
|
+
* caller sees the unsupported dependency.
|
|
9
9
|
*/
|
|
10
10
|
export declare function createSandboxRequire(pack: Record<string, string>, opts: ISandboxRequireOptions): (specifier: string) => unknown;
|
|
11
11
|
export {};
|
|
@@ -20,8 +20,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
20
20
|
exports.createSandboxRequire = createSandboxRequire;
|
|
21
21
|
/**
|
|
22
22
|
* Build a sandboxed `require` function over a runtime pack. Resolves typia /
|
|
23
|
-
* `@typia/*` / randexp specifiers from the pack; throws on anything else so
|
|
24
|
-
*
|
|
23
|
+
* `@typia/*` / randexp specifiers from the pack; throws on anything else so the
|
|
24
|
+
* caller sees the unsupported dependency.
|
|
25
25
|
*/
|
|
26
26
|
function createSandboxRequire(pack, opts) {
|
|
27
27
|
const cache = new Map();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Fetches the prebuilt runtime pack once per URL. Re-entrant on the same
|
|
3
|
-
* in-flight promise. On rejection the cache entry is cleared so the next
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
* in-flight promise. On rejection the cache entry is cleared so the next call
|
|
4
|
+
* retries — otherwise a transient fetch failure (CDN blip, offline at first
|
|
5
|
+
* Execute) would permanently break every later Execute attempt.
|
|
6
6
|
*/
|
|
7
7
|
export declare function loadTypiaRuntimePack(url: string): Promise<Record<string, string>>;
|
|
@@ -11,9 +11,9 @@ exports.loadTypiaRuntimePack = loadTypiaRuntimePack;
|
|
|
11
11
|
const packCache = new Map();
|
|
12
12
|
/**
|
|
13
13
|
* Fetches the prebuilt runtime pack once per URL. Re-entrant on the same
|
|
14
|
-
* in-flight promise. On rejection the cache entry is cleared so the next
|
|
15
|
-
*
|
|
16
|
-
*
|
|
14
|
+
* in-flight promise. On rejection the cache entry is cleared so the next call
|
|
15
|
+
* retries — otherwise a transient fetch failure (CDN blip, offline at first
|
|
16
|
+
* Execute) would permanently break every later Execute attempt.
|
|
17
17
|
*/
|
|
18
18
|
async function loadTypiaRuntimePack(url) {
|
|
19
19
|
const cached = packCache.get(url);
|
|
@@ -10,8 +10,8 @@ export interface IBuildTsconfigOptions {
|
|
|
10
10
|
/** Source root relative to project root. Defaults to `"src"`. */
|
|
11
11
|
rootDir?: string;
|
|
12
12
|
/**
|
|
13
|
-
* Extra entries spliced into `compilerOptions`. Use for plugins, paths,
|
|
14
|
-
*
|
|
13
|
+
* Extra entries spliced into `compilerOptions`. Use for plugins, paths, lib
|
|
14
|
+
* overrides, etc.
|
|
15
15
|
*/
|
|
16
16
|
compilerOptions?: Record<string, unknown>;
|
|
17
17
|
/** Project `include` globs. Defaults to `["src"]`. */
|
|
@@ -10,7 +10,8 @@ import type { ITransformOptions } from "./ITransformOptions";
|
|
|
10
10
|
export interface ICompilerService {
|
|
11
11
|
/**
|
|
12
12
|
* Mount external npm package files into the worker's MemFS under
|
|
13
|
-
* `node_modules/`. Driven by the dependency installer in
|
|
13
|
+
* `node_modules/`. Driven by the dependency installer in
|
|
14
|
+
* `@ttsc/playground/npm`.
|
|
14
15
|
*/
|
|
15
16
|
installDependencies(props: ICompilerService.IInstallDependenciesProps): Promise<ICompilerService.IInstallDependenciesResult>;
|
|
16
17
|
/**
|
|
@@ -38,7 +39,7 @@ export declare namespace ICompilerService {
|
|
|
38
39
|
options?: ITransformOptions;
|
|
39
40
|
}
|
|
40
41
|
export interface IInstallDependenciesProps {
|
|
41
|
-
/**
|
|
42
|
+
/** Node_modules-relative paths to text content. */
|
|
42
43
|
files: Record<string, string>;
|
|
43
44
|
/** Metadata for the packages whose files are in `files`. */
|
|
44
45
|
packages: IInstalledPackage[];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* One captured `console.*` invocation. `value` is the argv (the spread of
|
|
3
|
-
* `console.log(...args)`), so `console.log("user:", user)` shows up as a
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
* `console.log(...args)`), so `console.log("user:", user)` shows up as a single
|
|
4
|
+
* row with both pieces rendered inline, separated by a space — same as a real
|
|
5
|
+
* DevTools console.
|
|
6
6
|
*/
|
|
7
7
|
export interface IConsoleMessage {
|
|
8
8
|
type: "debug" | "dir" | "error" | "info" | "log" | "table" | "warn";
|