This commit is contained in:
Eugene Zolenko 2018-06-25 11:00:27 -06:00
parent 84f27fcdb8
commit aaecd86fd1
44 changed files with 123 additions and 59 deletions

View File

@ -1,2 +1,3 @@
import * as tsTypes from "typescript";
export declare function checkTsConfig(parsedConfig: tsTypes.ParsedCommandLine): void;
//# sourceMappingURL=check-tsconfig.d.ts.map

1
dist/check-tsconfig.d.ts.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"check-tsconfig.d.ts","sourceRoot":"","sources":["src/check-tsconfig.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,OAAO,MAAM,YAAY,CAAC;AAEtC,sCAA8B,YAAY,EAAE,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAc3E"}

1
dist/context.d.ts vendored
View File

@ -23,3 +23,4 @@ export declare class ConsoleContext implements IContext {
info(message: string | (() => string)): void;
debug(message: string | (() => string)): void;
}
//# sourceMappingURL=context.d.ts.map

1
dist/context.d.ts.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["src/context.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,cAAc;IAE9B,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,MAAM,WAAW,QAAQ;IAExB,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,GAAG,IAAI,CAAC;IAC7C,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,GAAG,IAAI,CAAC;IAC9C,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,GAAG,IAAI,CAAC;IAC7C,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,GAAG,IAAI,CAAC;CAC9C;AAED,oBAAY,cAAc;IAEzB,KAAK,IAAI;IACT,OAAO,IAAA;IACP,IAAI,IAAA;IACJ,KAAK,IAAA;CACL;AAED,mCAA4B,YAAW,QAAQ;IAElC,OAAO,CAAC,SAAS;IAAkB,OAAO,CAAC,MAAM;gBAAzC,SAAS,EAAE,cAAc,EAAU,MAAM,GAAE,MAAW;IAInE,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,GAAG,IAAI;IAO5C,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,GAAG,IAAI;IAO7C,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,GAAG,IAAI;IAO5C,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,GAAG,IAAI;CAMpD"}

View File

@ -5,3 +5,4 @@ export declare class FormatHost implements tsTypes.FormatDiagnosticsHost {
getNewLine(): string;
}
export declare const formatHost: FormatHost;
//# sourceMappingURL=diagnostics-format-host.d.ts.map

1
dist/diagnostics-format-host.d.ts.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"diagnostics-format-host.d.ts","sourceRoot":"","sources":["src/diagnostics-format-host.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,OAAO,MAAM,YAAY,CAAC;AAGtC,+BAAwB,YAAW,OAAO,CAAC,qBAAqB;IAExD,mBAAmB,IAAI,MAAM;IAK7B,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM;IAK9C,UAAU,IAAI,MAAM;CAI3B;AAED,eAAO,MAAM,UAAU,YAAmB,CAAC"}

View File

@ -3,3 +3,4 @@ export declare function getOptionsDefaults(): {
module: string;
};
};
//# sourceMappingURL=get-option-defaults.d.ts.map

1
dist/get-option-defaults.d.ts.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"get-option-defaults.d.ts","sourceRoot":"","sources":["src/get-option-defaults.ts"],"names":[],"mappings":"AAAA;;;;EAQC"}

View File

@ -1,3 +1,4 @@
import * as tsTypes from "typescript";
import { IOptions } from "./ioptions";
export declare function getOptionsOverrides({ useTsconfigDeclarationDir, cacheRoot }: IOptions, tsConfigJson?: any): tsTypes.CompilerOptions;
//# sourceMappingURL=get-options-overrides.d.ts.map

1
dist/get-options-overrides.d.ts.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"get-options-overrides.d.ts","sourceRoot":"","sources":["src/get-options-overrides.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,OAAO,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC,4CAAoC,EAAE,yBAAyB,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,YAAY,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,eAAe,CAoBnI"}

1
dist/host.d.ts vendored
View File

@ -26,3 +26,4 @@ export declare class LanguageServiceHost implements tsTypes.LanguageServiceHost
getDirectories(directoryName: string): string[];
getCustomTransformers(): tsTypes.CustomTransformers | undefined;
}
//# sourceMappingURL=host.d.ts.map

1
dist/host.d.ts.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"host.d.ts","sourceRoot":"","sources":["src/host.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,OAAO,MAAM,YAAY,CAAC;AAItC,OAAO,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAEvD,wCAAiC,YAAW,OAAO,CAAC,mBAAmB;IAO1D,OAAO,CAAC,YAAY;IAA6B,OAAO,CAAC,YAAY;IALjF,OAAO,CAAC,GAAG,CAAiB;IAC5B,OAAO,CAAC,SAAS,CAAuD;IACxE,OAAO,CAAC,QAAQ,CAAsC;IACtD,OAAO,CAAC,OAAO,CAAC,CAA0B;gBAEtB,YAAY,EAAE,OAAO,CAAC,iBAAiB,EAAU,YAAY,EAAE,yBAAyB,EAAE;IAIvG,KAAK;IAML,kBAAkB,CAAC,OAAO,EAAE,OAAO,CAAC,eAAe;IAKnD,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe;IAUpE,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,GAAG,SAAS;IAiBxE,mBAAmB;IAKnB,gBAAgB,CAAC,QAAQ,EAAE,MAAM;IAOjC,kBAAkB;IAKlB,sBAAsB,IAAI,OAAO,CAAC,eAAe;IAKjD,qBAAqB,CAAC,IAAI,EAAE,OAAO,CAAC,eAAe;IAKnD,yBAAyB,IAAI,OAAO;IAKpC,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE;IAKpG,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAK7D,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAKjC,mBAAmB,IAAI,MAAM;IAK7B,eAAe,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO;IAK/C,cAAc,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,EAAE;IAK/C,qBAAqB,IAAI,OAAO,CAAC,kBAAkB,GAAG,SAAS;CAsBtE"}

1
dist/icache.d.ts vendored
View File

@ -7,3 +7,4 @@ export interface ICache<DataType> {
touch(name: string): void;
roll(): void;
}
//# sourceMappingURL=icache.d.ts.map

1
dist/icache.d.ts.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"icache.d.ts","sourceRoot":"","sources":["src/icache.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM,CAAE,QAAQ;IAEhC,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IAE9B,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IAE3B,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAEhC,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI,GAAG,SAAS,CAAC;IAEhD,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,GAAG,IAAI,CAAC;IAE1C,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B,IAAI,IAAI,IAAI,CAAC;CACb"}

1
dist/index.d.ts vendored
View File

@ -12,3 +12,4 @@ export default function typescript(options?: Partial<IOptions>): {
ongenerate(): void;
onwrite({ dest, file }: IRollupOptions): void;
};
//# sourceMappingURL=index.d.ts.map

1
dist/index.d.ts.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAkB,cAAc,EAAkB,MAAM,WAAW,CAAC;AAE3E,OAAO,EAA8B,WAAW,EAAqB,MAAM,WAAW,CAAC;AAKvF,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQpC,MAAM,CAAC,OAAO,qBAAqB,OAAO,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC;;;;;;;;EAgU7D"}

1
dist/ioptions.d.ts vendored
View File

@ -22,3 +22,4 @@ export interface IOptions {
tsconfigDefaults: any;
sourceMapCallback: (id: string, map: string) => void;
}
//# sourceMappingURL=ioptions.d.ts.map

1
dist/ioptions.d.ts.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"ioptions.d.ts","sourceRoot":"","sources":["src/ioptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,OAAO,MAAM,YAAY,CAAC;AAEtC,MAAM,WAAW,kBAAkB;IAElC,MAAM,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IACxD,KAAK,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;CACvD;AAED,oBAAY,yBAAyB,GAAG,CAAC,EAAE,EAAE,OAAO,CAAC,eAAe,KAAK,OAAO,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;AAEzH,MAAM,WAAW,QAAQ;IAExB,OAAO,EAAE,MAAM,GAAC,MAAM,EAAE,CAAC;IACzB,OAAO,EAAE,MAAM,GAAC,MAAM,EAAE,CAAC;IACzB,KAAK,EAAE,OAAO,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,OAAO,CAAC;IACtB,yBAAyB,EAAE,OAAO,CAAC;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yBAAyB,EAAE,OAAO,CAAC;IACnC,UAAU,EAAE,OAAO,QAAQ,CAAC;IAC5B,gBAAgB,EAAE,GAAG,CAAC;IACtB,YAAY,EAAE,yBAAyB,EAAE,CAAC;IAC1C,gBAAgB,EAAE,GAAG,CAAC;IACtB,iBAAiB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CACrD"}

View File

@ -2,3 +2,4 @@ export interface IRollupOptions {
dest?: string;
file?: string;
}
//# sourceMappingURL=irollup-options.d.ts.map

1
dist/irollup-options.d.ts.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"irollup-options.d.ts","sourceRoot":"","sources":["src/irollup-options.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAE9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACd"}

1
dist/nocache.d.ts vendored
View File

@ -8,3 +8,4 @@ export declare class NoCache<DataType> implements ICache<DataType> {
touch(_name: string): void;
roll(): void;
}
//# sourceMappingURL=nocache.d.ts.map

1
dist/nocache.d.ts.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"nocache.d.ts","sourceRoot":"","sources":["src/nocache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,6BAAqB,QAAQ,CAAE,YAAW,MAAM,CAAC,QAAQ,CAAC;IAElD,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAK9B,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAK1B,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO;IAKhC,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI,GAAG,SAAS;IAKhD,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,GAAG,IAAI;IAK3C,KAAK,CAAC,KAAK,EAAE,MAAM;IAKnB,IAAI;CAIX"}

1
dist/normalize.d.ts vendored
View File

@ -1 +1,2 @@
export declare function normalize(fileName: string): string;
//# sourceMappingURL=normalize.d.ts.map

1
dist/normalize.d.ts.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"normalize.d.ts","sourceRoot":"","sources":["src/normalize.ts"],"names":[],"mappings":"AAAA,kCAA0B,QAAQ,EAAE,MAAM,UAGzC"}

View File

@ -2,3 +2,4 @@ import * as tsTypes from "typescript";
import { IContext } from "./context";
import { IOptions } from "./ioptions";
export declare function parseTsConfig(context: IContext, pluginOptions: IOptions): tsTypes.ParsedCommandLine;
//# sourceMappingURL=parse-tsconfig.d.ts.map

1
dist/parse-tsconfig.d.ts.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"parse-tsconfig.d.ts","sourceRoot":"","sources":["src/parse-tsconfig.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,OAAO,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAKrC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAKtC,sCAA8B,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,QAAQ,GAAG,OAAO,CAAC,iBAAiB,CA0CnG"}

1
dist/partial.d.ts vendored
View File

@ -1,3 +1,4 @@
export declare type Partial<T> = {
[P in keyof T]?: T[P];
};
//# sourceMappingURL=partial.d.ts.map

1
dist/partial.d.ts.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"partial.d.ts","sourceRoot":"","sources":["src/partial.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,MAAM,OAAO,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;CAAG,CAAC"}

View File

@ -1,3 +1,4 @@
import { IContext } from "./context";
import { IDiagnostics } from "./tscache";
export declare function printDiagnostics(context: IContext, diagnostics: IDiagnostics[], pretty: boolean): void;
//# sourceMappingURL=print-diagnostics.d.ts.map

1
dist/print-diagnostics.d.ts.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"print-diagnostics.d.ts","sourceRoot":"","sources":["src/print-diagnostics.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAGzC,yCAAiC,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,EAAE,MAAM,EAAE,OAAO,GAAG,IAAI,CAuCtG"}

View File

@ -34,3 +34,4 @@ export declare class RollingCache<DataType> implements ICache<DataType> {
*/
roll(): void;
}
//# sourceMappingURL=rollingcache.d.ts.map

1
dist/rollingcache.d.ts.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"rollingcache.d.ts","sourceRoot":"","sources":["src/rollingcache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAKlC;;;GAGG;AACH,kCAA0B,QAAQ,CAAE,YAAW,MAAM,CAAC,QAAQ,CAAC;IAWlD,OAAO,CAAC,SAAS;IAAU,OAAO,CAAC,aAAa;IAT5D,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,YAAY,CAAS;IAE7B,OAAO,CAAC,MAAM,CAAkB;IAEhC;;;OAGG;gBACiB,SAAS,EAAE,MAAM,EAAU,aAAa,EAAE,OAAO;IAQrE;;OAEG;IACI,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAW7B,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAKjC;;OAEG;IACI,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO;IAWtC;;OAEG;IACI,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI,GAAG,SAAS;IAQ/C,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,GAAG,IAAI;IAWzC,KAAK,CAAC,IAAI,EAAE,MAAM;IAOzB;;OAEG;IACI,IAAI;CASX"}

View File

@ -19725,6 +19725,20 @@ var NoCache = /** @class */ (function () {
return NoCache;
}());
function convertEmitOutput(output) {
var out = {};
output.outputFiles.forEach(function (e) {
if (lodash_6(e.name, ".d.ts"))
out.dts = e;
else if (lodash_6(e.name, ".d.ts.map"))
out.dtsmap = e;
else if (lodash_6(e.name, ".map"))
out.map = e.text;
else
out.code = e.text;
});
return out;
}
function convertDiagnostic(type, data) {
return lodash_7(data, function (diagnostic) {
var entry = {
@ -20164,14 +20178,7 @@ function typescript(options) {
if (lodash_9(_this.error))
_this.error(safe_3("failed to transpile '" + id + "'"));
}
var transpiled = lodash_11(output.outputFiles, function (entry) { return lodash_6(entry.name, ".js") || lodash_6(entry.name, ".jsx"); });
var map = lodash_11(output.outputFiles, function (entry) { return lodash_6(entry.name, ".map"); });
var dts = lodash_11(output.outputFiles, function (entry) { return lodash_6(entry.name, ".d.ts"); });
return {
code: transpiled ? transpiled.text : undefined,
map: map ? map.text : undefined,
dts: dts,
};
return convertEmitOutput(output);
});
if (pluginOptions.check) {
var diagnostics = lodash_10(cache().getSyntacticDiagnostics(id, snapshot, function () {
@ -20186,7 +20193,7 @@ function typescript(options) {
if (result) {
if (result.dts) {
var key_1 = normalize(id);
declarations[key_1] = result.dts;
declarations[key_1] = { type: result.dts, map: result.dtsmap };
context.debug(function () { return safe_5("generated declarations") + " for '" + key_1 + "'"; });
}
var transformResult = { code: result.code, map: { mappings: "" } };
@ -20223,27 +20230,31 @@ function typescript(options) {
return;
context.debug(function () { return "generating missed declarations for '" + key + "'"; });
var output = service.getEmitOutput(key, true);
var dts = lodash_11(output.outputFiles, function (entry) { return lodash_6(entry.name, ".d.ts"); });
if (dts)
declarations[key] = dts;
var out = convertEmitOutput(output);
if (out.dts)
declarations[key] = { type: out.dts, map: out.dtsmap };
});
var bundleFile_1 = file ? file : dest; // rollup 0.48+ has 'file' https://github.com/rollup/rollup/issues/1479
lodash_2(declarations, function (_a, key) {
var name = _a.name, text = _a.text, writeByteOrderMark = _a.writeByteOrderMark;
var writeToPath;
// If for some reason no 'dest' property exists or if 'useTsconfigDeclarationDir' is given in the plugin options,
// use the path provided by Typescript's LanguageService.
if (!bundleFile_1 || pluginOptions.useTsconfigDeclarationDir)
writeToPath = name;
else {
// Otherwise, take the directory name from the path and make sure it is absolute.
var destDirname = path.dirname(bundleFile_1);
var destDirectory = path.isAbsolute(destDirname) ? destDirname : path.join(process.cwd(), destDirname);
writeToPath = path.join(destDirectory, path.relative(process.cwd(), name));
}
context.debug(function () { return safe_5("writing declarations") + " for '" + key + "' to '" + writeToPath + "'"; });
// Write the declaration file to disk.
tsModule.sys.writeFile(writeToPath, text, writeByteOrderMark);
var type = _a.type, map = _a.map;
lodash_2([type, map], function (e) {
if (!e)
return;
var writeToPath;
// If for some reason no 'dest' property exists or if 'useTsconfigDeclarationDir' is given in the plugin options,
// use the path provided by Typescript's LanguageService.
if (!bundleFile_1 || pluginOptions.useTsconfigDeclarationDir)
writeToPath = e.name;
else {
// Otherwise, take the directory name from the path and make sure it is absolute.
var destDirname = path.dirname(bundleFile_1);
var destDirectory = path.isAbsolute(destDirname) ? destDirname : path.join(process.cwd(), destDirname);
writeToPath = path.join(destDirectory, path.relative(process.cwd(), e.name));
}
context.debug(function () { return safe_5("writing declarations") + " for '" + key + "' to '" + writeToPath + "'"; });
// Write the declaration file to disk.
tsModule.sys.writeFile(writeToPath, e.text, e.writeByteOrderMark);
});
});
}
},

File diff suppressed because one or more lines are too long

View File

@ -19721,6 +19721,20 @@ var NoCache = /** @class */ (function () {
return NoCache;
}());
function convertEmitOutput(output) {
var out = {};
output.outputFiles.forEach(function (e) {
if (lodash_6(e.name, ".d.ts"))
out.dts = e;
else if (lodash_6(e.name, ".d.ts.map"))
out.dtsmap = e;
else if (lodash_6(e.name, ".map"))
out.map = e.text;
else
out.code = e.text;
});
return out;
}
function convertDiagnostic(type, data) {
return lodash_7(data, function (diagnostic) {
var entry = {
@ -20160,14 +20174,7 @@ function typescript(options) {
if (lodash_9(_this.error))
_this.error(safe_3("failed to transpile '" + id + "'"));
}
var transpiled = lodash_11(output.outputFiles, function (entry) { return lodash_6(entry.name, ".js") || lodash_6(entry.name, ".jsx"); });
var map = lodash_11(output.outputFiles, function (entry) { return lodash_6(entry.name, ".map"); });
var dts = lodash_11(output.outputFiles, function (entry) { return lodash_6(entry.name, ".d.ts"); });
return {
code: transpiled ? transpiled.text : undefined,
map: map ? map.text : undefined,
dts: dts,
};
return convertEmitOutput(output);
});
if (pluginOptions.check) {
var diagnostics = lodash_10(cache().getSyntacticDiagnostics(id, snapshot, function () {
@ -20182,7 +20189,7 @@ function typescript(options) {
if (result) {
if (result.dts) {
var key_1 = normalize$1(id);
declarations[key_1] = result.dts;
declarations[key_1] = { type: result.dts, map: result.dtsmap };
context.debug(function () { return safe_5("generated declarations") + " for '" + key_1 + "'"; });
}
var transformResult = { code: result.code, map: { mappings: "" } };
@ -20219,27 +20226,31 @@ function typescript(options) {
return;
context.debug(function () { return "generating missed declarations for '" + key + "'"; });
var output = service.getEmitOutput(key, true);
var dts = lodash_11(output.outputFiles, function (entry) { return lodash_6(entry.name, ".d.ts"); });
if (dts)
declarations[key] = dts;
var out = convertEmitOutput(output);
if (out.dts)
declarations[key] = { type: out.dts, map: out.dtsmap };
});
var bundleFile_1 = file ? file : dest; // rollup 0.48+ has 'file' https://github.com/rollup/rollup/issues/1479
lodash_2(declarations, function (_a, key) {
var name = _a.name, text = _a.text, writeByteOrderMark = _a.writeByteOrderMark;
var writeToPath;
// If for some reason no 'dest' property exists or if 'useTsconfigDeclarationDir' is given in the plugin options,
// use the path provided by Typescript's LanguageService.
if (!bundleFile_1 || pluginOptions.useTsconfigDeclarationDir)
writeToPath = name;
else {
// Otherwise, take the directory name from the path and make sure it is absolute.
var destDirname = dirname(bundleFile_1);
var destDirectory = isAbsolute(destDirname) ? destDirname : join(process.cwd(), destDirname);
writeToPath = join(destDirectory, relative(process.cwd(), name));
}
context.debug(function () { return safe_5("writing declarations") + " for '" + key + "' to '" + writeToPath + "'"; });
// Write the declaration file to disk.
tsModule.sys.writeFile(writeToPath, text, writeByteOrderMark);
var type = _a.type, map = _a.map;
lodash_2([type, map], function (e) {
if (!e)
return;
var writeToPath;
// If for some reason no 'dest' property exists or if 'useTsconfigDeclarationDir' is given in the plugin options,
// use the path provided by Typescript's LanguageService.
if (!bundleFile_1 || pluginOptions.useTsconfigDeclarationDir)
writeToPath = e.name;
else {
// Otherwise, take the directory name from the path and make sure it is absolute.
var destDirname = dirname(bundleFile_1);
var destDirectory = isAbsolute(destDirname) ? destDirname : join(process.cwd(), destDirname);
writeToPath = join(destDirectory, relative(process.cwd(), e.name));
}
context.debug(function () { return safe_5("writing declarations") + " for '" + key + "' to '" + writeToPath + "'"; });
// Write the declaration file to disk.
tsModule.sys.writeFile(writeToPath, e.text, e.writeByteOrderMark);
});
});
}
},

File diff suppressed because one or more lines are too long

View File

@ -11,3 +11,4 @@ export declare class RollupContext implements IContext {
info(message: string | (() => string)): void;
debug(message: string | (() => string)): void;
}
//# sourceMappingURL=rollupcontext.d.ts.map

1
dist/rollupcontext.d.ts.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"rollupcontext.d.ts","sourceRoot":"","sources":["src/rollupcontext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAGrE,kCAA2B,YAAW,QAAQ;IAIjC,OAAO,CAAC,SAAS;IAAkB,OAAO,CAAC,IAAI;IAAW,OAAO,CAAC,OAAO;IAAkB,OAAO,CAAC,MAAM;IAFrH,OAAO,CAAC,UAAU,CAAiB;gBAEf,SAAS,EAAE,cAAc,EAAU,IAAI,EAAE,OAAO,EAAU,OAAO,EAAE,cAAc,EAAU,MAAM,GAAE,MAAW;IAK3H,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,GAAG,IAAI;IAa5C,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,GAAG,IAAI;IAkB7C,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,GAAG,IAAI;IAU5C,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,GAAG,IAAI;CASpD"}

9
dist/tscache.d.ts vendored
View File

@ -1,9 +1,10 @@
import { IContext } from "./context";
import * as tsTypes from "typescript";
export interface ICode {
code: string | undefined;
map: string | undefined;
dts?: tsTypes.OutputFile | undefined;
code?: string;
map?: string;
dts?: tsTypes.OutputFile;
dtsmap?: tsTypes.OutputFile;
}
export interface IRollupCode {
code: string | undefined;
@ -19,6 +20,7 @@ export interface IDiagnostics {
code: number;
type: string;
}
export declare function convertEmitOutput(output: tsTypes.EmitOutput): ICode;
export declare function convertDiagnostic(type: string, data: tsTypes.Diagnostic[]): IDiagnostics[];
export declare class TsCache {
private noCache;
@ -50,3 +52,4 @@ export declare class TsCache {
private isDirty;
private makeName;
}
//# sourceMappingURL=tscache.d.ts.map

1
dist/tscache.d.ts.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"tscache.d.ts","sourceRoot":"","sources":["src/tscache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAOrC,OAAO,KAAK,OAAO,MAAM,YAAY,CAAC;AAMtC,MAAM,WAAW,KAAK;IAErB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,OAAO,CAAC,UAAU,CAAA;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC;CAC5B;AAED,MAAM,WAAW,WAAW;IAE3B,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,GAAG,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;CAC1B;AAOD,MAAM,WAAW,YAAY;IAE5B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC,kBAAkB,CAAC;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACb;AAQD,0CAAkC,MAAM,EAAE,OAAO,CAAC,UAAU,GAAG,KAAK,CAiBnE;AAED,0CAAkC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,UAAU,EAAE,GAAG,YAAY,EAAE,CAqB1F;AAED;IAYa,OAAO,CAAC,OAAO;IAAW,OAAO,CAAC,IAAI;IAA8C,OAAO,CAAC,OAAO;IAA2B,OAAO,CAAC,YAAY;IAAgC,OAAO,CAAC,OAAO;IAV7M,OAAO,CAAC,YAAY,CAAO;IAC3B,OAAO,CAAC,cAAc,CAAQ;IAC9B,OAAO,CAAC,YAAY,CAAkB;IACtC,OAAO,CAAC,iBAAiB,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,SAAS,CAA6B;IAC9C,OAAO,CAAC,UAAU,CAAkB;IACpC,OAAO,CAAC,wBAAwB,CAA0B;IAC1D,OAAO,CAAC,yBAAyB,CAA0B;gBAEvC,OAAO,EAAE,OAAO,EAAU,IAAI,EAAE,OAAO,CAAC,mBAAmB,EAAE,KAAK,EAAE,MAAM,EAAU,OAAO,EAAE,OAAO,CAAC,eAAe,EAAU,YAAY,EAAE,GAAG,EAAE,aAAa,EAAE,MAAM,EAAE,EAAU,OAAO,EAAE,QAAQ;IA0BhN,KAAK;IAWL,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;IAQvD,QAAQ,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,GAAG,KAAK,GAAG,IAAI;IAehD,IAAI;IASJ,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,eAAe,EAAE,SAAS,EAAE,MAAM,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS;IA4BjH,uBAAuB,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,eAAe,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC,UAAU,EAAE,GAAG,YAAY,EAAE;IAKzH,sBAAsB,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,eAAe,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC,UAAU,EAAE,GAAG,YAAY,EAAE;IAK/H,OAAO,CAAC,iBAAiB;IAkBzB,OAAO,CAAC,cAAc;IA4BtB,OAAO,CAAC,IAAI;IAkBZ,OAAO,CAAC,WAAW;IAMnB,OAAO,CAAC,OAAO;IA8Bf,OAAO,CAAC,QAAQ;CAKhB"}

1
dist/tslib.d.ts vendored
View File

@ -1,3 +1,4 @@
export declare const TSLIB = "tslib";
export declare let tslibSource: string;
export declare let tslibVersion: string;
//# sourceMappingURL=tslib.d.ts.map

1
dist/tslib.d.ts.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"tslib.d.ts","sourceRoot":"","sources":["src/tslib.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,KAAK,UAAU,CAAC;AAC7B,eAAO,IAAI,WAAW,EAAE,MAAM,CAAC;AAC/B,eAAO,IAAI,YAAY,EAAE,MAAM,CAAC"}

1
dist/tsproxy.d.ts vendored
View File

@ -1,3 +1,4 @@
import * as tsTypes from "typescript";
export declare let tsModule: typeof tsTypes;
export declare function setTypescriptModule(override: typeof tsTypes): void;
//# sourceMappingURL=tsproxy.d.ts.map

1
dist/tsproxy.d.ts.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"tsproxy.d.ts","sourceRoot":"","sources":["src/tsproxy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,YAAY,CAAC;AAEtC,eAAO,IAAI,QAAQ,EAAE,OAAO,OAAO,CAAC;AAEpC,4CAAoC,QAAQ,EAAE,OAAO,OAAO,QAG3D"}