jsii-rosetta 5.9.22 → 5.9.23-dev.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.
|
@@ -15,7 +15,6 @@ async function trimCache(options) {
|
|
|
15
15
|
updated.addTranslations(...snippets.map((snip) => original.tryGetSnippet((0, key_1.snippetKey)(snip))).filter(util_1.isDefined));
|
|
16
16
|
// if the original file was compressed, then compress the updated file too
|
|
17
17
|
await updated.save(options.cacheFile, original.compressedSource);
|
|
18
|
-
|
|
19
|
-
logging.info(`${options.cacheFile}: ${updated.count} snippets remaining (${original.count} - ${updated.count} trimmed)`);
|
|
18
|
+
logging.info(`${options.cacheFile}: ${updated.count} snippets remaining (${original.count - updated.count} trimmed)`);
|
|
20
19
|
}
|
|
21
20
|
//# sourceMappingURL=trim-cache.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trim-cache.js","sourceRoot":"","sources":["../../src/commands/trim-cache.ts"],"names":[],"mappings":";;AAkBA,
|
|
1
|
+
{"version":3,"file":"trim-cache.js","sourceRoot":"","sources":["../../src/commands/trim-cache.ts"],"names":[],"mappings":";;AAkBA,8BAaC;AA/BD,mDAA2E;AAC3E,sCAAsC;AACtC,wCAA4C;AAC5C,gDAAoD;AACpD,kCAAoC;AAc7B,KAAK,UAAU,SAAS,CAAC,OAAyB;IACvD,OAAO,CAAC,IAAI,CAAC,WAAW,OAAO,CAAC,iBAAiB,CAAC,MAAM,aAAa,CAAC,CAAC;IACvE,MAAM,UAAU,GAAG,IAAA,2BAAc,EAAC,OAAO,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAC;IAEpE,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,IAAA,kCAAqB,EAAC,UAAU,CAAC,CAAC,CAAC;IAErE,MAAM,QAAQ,GAAG,MAAM,wBAAc,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAClE,MAAM,OAAO,GAAG,IAAI,wBAAc,EAAE,CAAC;IACrC,OAAO,CAAC,eAAe,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAA,gBAAU,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,gBAAS,CAAC,CAAC,CAAC;IAC/G,0EAA0E;IAC1E,MAAM,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,QAAQ,CAAC,gBAAgB,CAAC,CAAC;IAEjE,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,SAAS,KAAK,OAAO,CAAC,KAAK,wBAAwB,QAAQ,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,WAAW,CAAC,CAAC;AACxH,CAAC","sourcesContent":["import { loadAssemblies, allTypeScriptSnippets } from '../jsii/assemblies';\nimport * as logging from '../logging';\nimport { snippetKey } from '../tablets/key';\nimport { LanguageTablet } from '../tablets/tablets';\nimport { isDefined } from '../util';\n\nexport interface TrimCacheOptions {\n /**\n * Locations of assemblies to search for snippets\n */\n readonly assemblyLocations: string[];\n\n /**\n * Cache to trim\n */\n readonly cacheFile: string;\n}\n\nexport async function trimCache(options: TrimCacheOptions): Promise<void> {\n logging.info(`Loading ${options.assemblyLocations.length} assemblies`);\n const assemblies = loadAssemblies(options.assemblyLocations, false);\n\n const snippets = Array.from(await allTypeScriptSnippets(assemblies));\n\n const original = await LanguageTablet.fromFile(options.cacheFile);\n const updated = new LanguageTablet();\n updated.addTranslations(...snippets.map((snip) => original.tryGetSnippet(snippetKey(snip))).filter(isDefined));\n // if the original file was compressed, then compress the updated file too\n await updated.save(options.cacheFile, original.compressedSource);\n\n logging.info(`${options.cacheFile}: ${updated.count} snippets remaining (${original.count - updated.count} trimmed)`);\n}\n"]}
|