@ttsc/playground 0.19.3 → 0.20.1
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 +6 -0
- package/lib/src/npm/collectExternalPackageNames.js +436 -73
- package/lib/src/npm/collectExternalPackageNames.js.map +1 -1
- package/lib/src/npm/installPlaygroundDependencies.d.ts +5 -3
- package/lib/src/npm/installPlaygroundDependencies.js +230 -27
- package/lib/src/npm/installPlaygroundDependencies.js.map +1 -1
- package/lib/src/npm/internal/npmRegistry.d.ts +13 -2
- package/lib/src/npm/internal/npmRegistry.js +73 -50
- package/lib/src/npm/internal/npmRegistry.js.map +1 -1
- package/lib/src/npm/packageNameFromSpecifier.js +17 -4
- package/lib/src/npm/packageNameFromSpecifier.js.map +1 -1
- package/lib/src/react/PlaygroundShell.js +68 -61
- package/lib/src/react/PlaygroundShell.js.map +1 -1
- package/lib/src/react/createCompilerClient.d.ts +3 -3
- package/lib/src/react/createCompilerClient.js +32 -54
- package/lib/src/react/createCompilerClient.js.map +1 -1
- package/lib/src/sandbox/createSandboxRequire.js +117 -54
- package/lib/src/sandbox/createSandboxRequire.js.map +1 -1
- package/lib/src/structures/IPlaygroundDependencyInstallOptions.d.ts +13 -1
- package/lib/src/structures/IPlaygroundDependencyInstallResult.d.ts +4 -0
- package/lib/src/structures/IPlaygroundDependencyPackage.d.ts +2 -0
- package/lib/src/structures/IPlaygroundDependencyRequest.d.ts +9 -0
- package/lib/src/structures/IPlaygroundDependencyRequest.js +3 -0
- package/lib/src/structures/IPlaygroundDependencyRequest.js.map +1 -0
- package/lib/src/structures/IPlaygroundInstalledDependency.d.ts +12 -0
- package/lib/src/structures/IPlaygroundInstalledDependency.js +3 -0
- package/lib/src/structures/IPlaygroundInstalledDependency.js.map +1 -0
- package/lib/src/structures/index.d.ts +2 -0
- package/lib/src/structures/index.js +2 -0
- package/lib/src/structures/index.js.map +1 -1
- package/package.json +6 -4
- package/src/npm/collectExternalPackageNames.ts +503 -68
- package/src/npm/installPlaygroundDependencies.ts +288 -29
- package/src/npm/internal/npmRegistry.ts +99 -38
- package/src/npm/packageNameFromSpecifier.ts +16 -3
- package/src/react/PlaygroundShell.tsx +86 -72
- package/src/react/createCompilerClient.ts +37 -51
- package/src/sandbox/createSandboxRequire.ts +140 -49
- package/src/structures/IPlaygroundDependencyInstallOptions.ts +13 -1
- package/src/structures/IPlaygroundDependencyInstallResult.ts +4 -0
- package/src/structures/IPlaygroundDependencyPackage.ts +2 -0
- package/src/structures/IPlaygroundDependencyRequest.ts +9 -0
- package/src/structures/IPlaygroundInstalledDependency.ts +13 -0
- package/src/structures/index.ts +2 -0
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/** Metadata for one successfully installed npm package. */
|
|
2
2
|
export interface IPlaygroundDependencyPackage {
|
|
3
3
|
name: string;
|
|
4
|
+
/** Package name queried from the registry, which differs for npm aliases. */
|
|
5
|
+
registryName: string;
|
|
4
6
|
version: string;
|
|
5
7
|
tarball: string;
|
|
6
8
|
fileCount: number;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** One active npm range that selected a mounted playground dependency. */
|
|
2
|
+
export interface IPlaygroundDependencyRequest {
|
|
3
|
+
/** Declared npm range or tag. */
|
|
4
|
+
range: string;
|
|
5
|
+
/** Package or source entry that declared the range. */
|
|
6
|
+
requester: string;
|
|
7
|
+
/** Whether an unsatisfied request may be omitted. */
|
|
8
|
+
optional: boolean;
|
|
9
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { IPlaygroundDependencyRequest } from "./IPlaygroundDependencyRequest";
|
|
2
|
+
|
|
3
|
+
/** Exact identity and active constraints of one dependency already mounted. */
|
|
4
|
+
export interface IPlaygroundInstalledDependency {
|
|
5
|
+
/** Exposed package name under `node_modules`. */
|
|
6
|
+
name: string;
|
|
7
|
+
/** Package name queried from the registry, which differs for npm aliases. */
|
|
8
|
+
registryName: string;
|
|
9
|
+
/** Exact mounted version. */
|
|
10
|
+
version: string;
|
|
11
|
+
/** Active requests that the mounted version satisfies. */
|
|
12
|
+
requests: IPlaygroundDependencyRequest[];
|
|
13
|
+
}
|
package/src/structures/index.ts
CHANGED
|
@@ -11,7 +11,9 @@ export * from "./IPlaygroundDependencyInstallResult";
|
|
|
11
11
|
export * from "./IPlaygroundDependencyPackage";
|
|
12
12
|
export * from "./IPlaygroundDependencyProgress";
|
|
13
13
|
export * from "./IPlaygroundDependencyProgressPhase";
|
|
14
|
+
export * from "./IPlaygroundDependencyRequest";
|
|
14
15
|
export * from "./IPlaygroundExample";
|
|
16
|
+
export * from "./IPlaygroundInstalledDependency";
|
|
15
17
|
export * from "./IPlaygroundShellProps";
|
|
16
18
|
export * from "./ISourceEditorProps";
|
|
17
19
|
export * from "./ITransformOptions";
|