@rushstack/heft-typescript-plugin 0.0.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.
Files changed (44) hide show
  1. package/LICENSE +24 -0
  2. package/README.md +12 -0
  3. package/dist/heft-typescript-plugin.d.ts +110 -0
  4. package/dist/tsdoc-metadata.json +11 -0
  5. package/heft-plugin.json +10 -0
  6. package/lib/Performance.d.ts +7 -0
  7. package/lib/Performance.d.ts.map +1 -0
  8. package/lib/Performance.js +5 -0
  9. package/lib/Performance.js.map +1 -0
  10. package/lib/TranspilerWorker.d.ts +2 -0
  11. package/lib/TranspilerWorker.d.ts.map +1 -0
  12. package/lib/TranspilerWorker.js +85 -0
  13. package/lib/TranspilerWorker.js.map +1 -0
  14. package/lib/TypeScriptBuilder.d.ts +96 -0
  15. package/lib/TypeScriptBuilder.d.ts.map +1 -0
  16. package/lib/TypeScriptBuilder.js +790 -0
  17. package/lib/TypeScriptBuilder.js.map +1 -0
  18. package/lib/TypeScriptPlugin.d.ts +100 -0
  19. package/lib/TypeScriptPlugin.d.ts.map +1 -0
  20. package/lib/TypeScriptPlugin.js +219 -0
  21. package/lib/TypeScriptPlugin.js.map +1 -0
  22. package/lib/configureProgramForMultiEmit.d.ts +7 -0
  23. package/lib/configureProgramForMultiEmit.d.ts.map +1 -0
  24. package/lib/configureProgramForMultiEmit.js +99 -0
  25. package/lib/configureProgramForMultiEmit.js.map +1 -0
  26. package/lib/fileSystem/TypeScriptCachedFileSystem.d.ts +36 -0
  27. package/lib/fileSystem/TypeScriptCachedFileSystem.d.ts.map +1 -0
  28. package/lib/fileSystem/TypeScriptCachedFileSystem.js +163 -0
  29. package/lib/fileSystem/TypeScriptCachedFileSystem.js.map +1 -0
  30. package/lib/index.d.ts +8 -0
  31. package/lib/index.d.ts.map +1 -0
  32. package/lib/index.js +10 -0
  33. package/lib/index.js.map +1 -0
  34. package/lib/internalTypings/TypeScriptInternals.d.ts +56 -0
  35. package/lib/internalTypings/TypeScriptInternals.d.ts.map +1 -0
  36. package/lib/internalTypings/TypeScriptInternals.js +5 -0
  37. package/lib/internalTypings/TypeScriptInternals.js.map +1 -0
  38. package/lib/schemas/anything.schema.json +28 -0
  39. package/lib/schemas/typescript.schema.json +101 -0
  40. package/lib/types.d.ts +54 -0
  41. package/lib/types.d.ts.map +1 -0
  42. package/lib/types.js +3 -0
  43. package/lib/types.js.map +1 -0
  44. package/package.json +39 -0
package/lib/types.d.ts ADDED
@@ -0,0 +1,54 @@
1
+ import type * as TTypescript from 'typescript';
2
+ export interface ITypescriptWorkerData {
3
+ /**
4
+ * Path to the version of TypeScript to use.
5
+ */
6
+ typeScriptToolPath: string;
7
+ }
8
+ export interface ITranspilationRequestMessage {
9
+ /**
10
+ * Unique identifier for this request.
11
+ */
12
+ requestId: number;
13
+ /**
14
+ * The tsconfig compiler options to use for the request.
15
+ */
16
+ compilerOptions: TTypescript.CompilerOptions;
17
+ /**
18
+ * The variants to emit.
19
+ */
20
+ moduleKindsToEmit: ICachedEmitModuleKind[];
21
+ /**
22
+ * The set of files to build.
23
+ */
24
+ filesToTranspile: Map<string, string>;
25
+ }
26
+ export interface ITranspilationSuccessMessage {
27
+ requestId: number;
28
+ type: 'success';
29
+ result: TTypescript.EmitResult;
30
+ }
31
+ export interface ITranspilationErrorMessage {
32
+ requestId: number;
33
+ type: 'error';
34
+ result: {
35
+ message: string;
36
+ [key: string]: unknown;
37
+ };
38
+ }
39
+ export type ITranspilationResponseMessage = ITranspilationSuccessMessage | ITranspilationErrorMessage;
40
+ export interface ICachedEmitModuleKind {
41
+ moduleKind: TTypescript.ModuleKind;
42
+ outFolderPath: string;
43
+ /**
44
+ * File extension to use instead of '.js' for emitted ECMAScript files.
45
+ * For example, '.cjs' to indicate commonjs content, or '.mjs' to indicate ECMAScript modules.
46
+ */
47
+ jsExtensionOverride: string | undefined;
48
+ /**
49
+ * Set to true if this is the emit kind that is specified in the tsconfig.json.
50
+ * Declarations are only emitted for the primary module kind.
51
+ */
52
+ isPrimary: boolean;
53
+ }
54
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,WAAW,MAAM,YAAY,CAAC;AAE/C,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,eAAe,EAAE,WAAW,CAAC,eAAe,CAAC;IAC7C;;OAEG;IACH,iBAAiB,EAAE,qBAAqB,EAAE,CAAC;IAC3C;;OAEG;IACH,gBAAgB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACvC;AAED,MAAM,WAAW,4BAA4B;IAC3C,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,EAAE,WAAW,CAAC,UAAU,CAAC;CAChC;AAED,MAAM,WAAW,0BAA0B;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE;QACN,OAAO,EAAE,MAAM,CAAC;QAChB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,CAAC;CACH;AAED,MAAM,MAAM,6BAA6B,GAAG,4BAA4B,GAAG,0BAA0B,CAAC;AAEtG,MAAM,WAAW,qBAAqB;IACpC,UAAU,EAAE,WAAW,CAAC,UAAU,CAAC;IAEnC,aAAa,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,mBAAmB,EAAE,MAAM,GAAG,SAAS,CAAC;IAExC;;;OAGG;IACH,SAAS,EAAE,OAAO,CAAC;CACpB"}
package/lib/types.js ADDED
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nimport type * as TTypescript from 'typescript';\n\nexport interface ITypescriptWorkerData {\n /**\n * Path to the version of TypeScript to use.\n */\n typeScriptToolPath: string;\n}\n\nexport interface ITranspilationRequestMessage {\n /**\n * Unique identifier for this request.\n */\n requestId: number;\n /**\n * The tsconfig compiler options to use for the request.\n */\n compilerOptions: TTypescript.CompilerOptions;\n /**\n * The variants to emit.\n */\n moduleKindsToEmit: ICachedEmitModuleKind[];\n /**\n * The set of files to build.\n */\n filesToTranspile: Map<string, string>;\n}\n\nexport interface ITranspilationSuccessMessage {\n requestId: number;\n type: 'success';\n result: TTypescript.EmitResult;\n}\n\nexport interface ITranspilationErrorMessage {\n requestId: number;\n type: 'error';\n result: {\n message: string;\n [key: string]: unknown;\n };\n}\n\nexport type ITranspilationResponseMessage = ITranspilationSuccessMessage | ITranspilationErrorMessage;\n\nexport interface ICachedEmitModuleKind {\n moduleKind: TTypescript.ModuleKind;\n\n outFolderPath: string;\n\n /**\n * File extension to use instead of '.js' for emitted ECMAScript files.\n * For example, '.cjs' to indicate commonjs content, or '.mjs' to indicate ECMAScript modules.\n */\n jsExtensionOverride: string | undefined;\n\n /**\n * Set to true if this is the emit kind that is specified in the tsconfig.json.\n * Declarations are only emitted for the primary module kind.\n */\n isPrimary: boolean;\n}\n"]}
package/package.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "@rushstack/heft-typescript-plugin",
3
+ "version": "0.0.0",
4
+ "description": "Heft plugin for TypeScript",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/microsoft/rushstack.git",
8
+ "directory": "heft-plugins/heft-typescript-plugin"
9
+ },
10
+ "homepage": "https://rushstack.io/pages/heft/overview/",
11
+ "main": "lib/index.js",
12
+ "types": "dist/heft-typescript-plugin.d.ts",
13
+ "license": "MIT",
14
+ "peerDependencies": {
15
+ "@rushstack/heft": "0.50.0"
16
+ },
17
+ "dependencies": {
18
+ "@types/tapable": "1.0.6",
19
+ "semver": "~7.3.0",
20
+ "tapable": "1.1.3",
21
+ "@rushstack/node-core-library": "3.59.2",
22
+ "@rushstack/heft-config-file": "0.12.3"
23
+ },
24
+ "devDependencies": {
25
+ "@rushstack/heft-legacy": "npm:@rushstack/heft@0.50.6",
26
+ "@rushstack/heft-node-rig": "1.13.0",
27
+ "@types/node": "14.18.36",
28
+ "@types/semver": "7.3.5",
29
+ "typescript": "~5.0.4",
30
+ "@rushstack/eslint-config": "3.3.0",
31
+ "@rushstack/heft": "0.50.7"
32
+ },
33
+ "scripts": {
34
+ "build": "node ./node_modules/@rushstack/heft-legacy/bin/heft --unmanaged build --clean",
35
+ "start": "node ./node_modules/@rushstack/heft-legacy/bin/heft --unmanaged test --clean --watch",
36
+ "_phase:build": "node ./node_modules/@rushstack/heft-legacy/bin/heft --unmanaged build --clean",
37
+ "_phase:test": "node ./node_modules/@rushstack/heft-legacy/bin/heft --unmanaged test --no-build"
38
+ }
39
+ }