jsii 7.1.0-dev.7 → 7.1.0-dev.8
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/lib/compiler.js +26 -0
- package/lib/compiler.js.map +1 -1
- package/lib/jsii-diagnostic.d.ts +1 -0
- package/lib/jsii-diagnostic.js +9 -0
- package/lib/jsii-diagnostic.js.map +1 -1
- package/lib/version.d.ts +2 -2
- package/lib/version.js +2 -2
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
package/lib/compiler.js
CHANGED
|
@@ -322,6 +322,24 @@ function deriveEntry(projectRoot, projectInfo, rootDir, outDir) {
|
|
|
322
322
|
}
|
|
323
323
|
return path.resolve(projectRoot, mainFile);
|
|
324
324
|
}
|
|
325
|
+
/**
|
|
326
|
+
* The diagnostic for an entry point that is not part of the program. When package.json's `types` is outside of tsc's
|
|
327
|
+
* outDir, it can't be re-rooted from there, so report that (with where tsc puts the declarations) instead.
|
|
328
|
+
*/
|
|
329
|
+
function missingEntryDiagnostic(entry, projectInfo, rootDir, outDir) {
|
|
330
|
+
const dts = projectInfo.types ?? 'index.d.ts';
|
|
331
|
+
const mainFile = dts.replace(/\.d\.ts(x?)$/, '.ts$1').replace(/\.js$/, '.ts');
|
|
332
|
+
if (outDir == null || !isOutsideOfDirectory(path.relative(outDir, mainFile))) {
|
|
333
|
+
return jsii_diagnostic_1.JsiiDiagnostic.JSII_0004_COULD_NOT_FIND_ENTRYPOINT.createDetached(entry);
|
|
334
|
+
}
|
|
335
|
+
const fromRootDir = path.relative(rootDir ?? '.', dts);
|
|
336
|
+
const suggestion = isOutsideOfDirectory(fromRootDir) ? undefined : path.join(outDir, fromRootDir);
|
|
337
|
+
return jsii_diagnostic_1.JsiiDiagnostic.JSII_0008_TYPES_OUTSIDE_OUT_DIR.createDetached(dts, outDir, suggestion);
|
|
338
|
+
}
|
|
339
|
+
/** Whether a path that is relative to some directory points outside of that directory. */
|
|
340
|
+
function isOutsideOfDirectory(relativePath) {
|
|
341
|
+
return relativePath === '..' || relativePath.startsWith(`..${path.sep}`) || path.isAbsolute(relativePath);
|
|
342
|
+
}
|
|
325
343
|
/**
|
|
326
344
|
* Run the ts backend for a package: produce and write the `.jsii` assembly.
|
|
327
345
|
*/
|
|
@@ -359,6 +377,14 @@ function buildProject(options) {
|
|
|
359
377
|
if (tsDiagnostics.some((d) => d.category === diagnostic_1.DiagnosticCategory.Error)) {
|
|
360
378
|
return { typeCount: 0, emittedFiles: [], emitSkipped: true, diagnostics: tsDiagnostics };
|
|
361
379
|
}
|
|
380
|
+
if (!project.program.getSourceFile(entry)) {
|
|
381
|
+
return {
|
|
382
|
+
typeCount: 0,
|
|
383
|
+
emittedFiles: [],
|
|
384
|
+
emitSkipped: true,
|
|
385
|
+
diagnostics: [...tsDiagnostics, missingEntryDiagnostic(entry, projectInfo, tscRootDir, tscOutDir)],
|
|
386
|
+
};
|
|
387
|
+
}
|
|
362
388
|
const assembler = new assembler_1.Assembler(host.ts, project, {
|
|
363
389
|
packageJson: projectInfo.packageJson,
|
|
364
390
|
projectInfo,
|
package/lib/compiler.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compiler.js","sources":["../src/compiler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAY,MAAM,wCAAoB;AACtC,MAAY,EAAE,oCAAgB;AAC9B,MAAY,IAAI,sCAAkB;AAElC,qCAA2C;AAC3C,kDAA0B;AAC1B,MAAY,MAAM,mCAAe;AAEjC,2CAAwC;AACxC,oDAA8D;AAC9D,mDAA+C;AAC/C,6CAA8D;AAC9D,uCAAwC;AACxC,uDAAmD;AACnD,MAAY,QAAQ,uCAAmB;AAEvC,yCAAiF;AACjF,kEAAoE;AACpE,0CAA8E;AAC9E,sEAA0E;AAC1E,oDAAuD;AACvD,MAAY,KAAK,oCAAgB;AAEjC,MAAM,GAAG,GAAG,MAAM,CAAC,SAAS,C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CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IACzF,OAAO,EAAE,GAAG,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;AAC1C,CAAC","sourcesContent":["import * as crypto from 'node:crypto';\nimport * as fs from 'node:fs';\nimport * as path from 'node:path';\nimport * as spec from '@jsii/spec';\nimport { writeAssembly } from '@jsii/spec';\nimport chalk from 'chalk';\nimport * as log4js from 'log4js';\n\nimport { Assembler } from './assembler';\nimport { findDependencyDirectory } from './common/find-utils';\nimport { CompilerHost } from './compiler-host';\nimport { Diagnostic, DiagnosticCategory } from './diagnostic';\nimport { emitProject } from './emitter';\nimport { JsiiDiagnostic } from './jsii-diagnostic';\nimport * as literate from './literate';\nimport { ProjectInfo } from './project-info';\nimport { TypeScriptConfig, TypeScriptConfigValidationRuleSet } from './tsconfig';\nimport { BASE_COMPILER_OPTIONS } from './tsconfig/compiler-options';\nimport { parseTsconfigJson, readTypeScriptConfigFile } from './tsconfig/read';\nimport { TypeScriptConfigValidator } from './tsconfig/tsconfig-validator';\nimport { ValidationError } from './tsconfig/validator';\nimport * as utils from './utils';\n\nconst LOG = log4js.getLogger('jsii/compiler');\nexport const DIAGNOSTICS = 'diagnostics';\nexport const JSII_DIAGNOSTICS_CODE = 9999;\n\nexport interface CompilerOptions {\n /** The information about the project to be built */\n projectInfo: ProjectInfo;\n /**\n * Whether the compiler should watch for changes or just compile once.\n *\n * Watch mode is not available on the TypeScript 7 backend; setting this to\n * `true` makes `emit()` fail with an explicit error.\n */\n watch?: boolean;\n /** Whether to detect and generate TypeScript project references */\n projectReferences?: boolean;\n /** Whether to fail when a warning is emitted */\n failOnWarnings?: boolean;\n /** Whether to strip deprecated members from emitted artifacts */\n stripDeprecated?: boolean;\n /** The path to an allowlist of FQNs to strip if stripDeprecated is set */\n stripDeprecatedAllowListFile?: string;\n /**\n * Whether to add warnings for deprecated elements.\n *\n * Not implemented on the TypeScript 7 backend yet; requesting it fails with\n * an explicit error instead of silently producing an assembly without the\n * `.warnings.jsii.js` module.\n */\n addDeprecationWarnings?: boolean;\n /**\n * The name of the tsconfig file to generate.\n * Cannot be used at the same time as `typeScriptConfig`.\n * @default \"tsconfig.json\"\n */\n generateTypeScriptConfig?: string;\n /**\n * The name of the tsconfig file to use.\n * Cannot be used at the same time as `generateTypeScriptConfig`.\n * @default - generate the tsconfig file\n */\n typeScriptConfig?: string;\n /**\n * The ruleset to validate the provided tsconfig file against.\n * Can only be used when `typeScriptConfig` is provided.\n * @default TypeScriptConfigValidationRuleSet.STRICT - if `typeScriptConfig` is provided\n */\n validateTypeScriptConfig?: TypeScriptConfigValidationRuleSet;\n /**\n * Whether to compress the assembly\n * @default false\n */\n compressAssembly?: boolean;\n}\n\nexport interface EmitResult {\n readonly emitSkipped: boolean;\n readonly diagnostics: readonly Diagnostic[];\n /** The files written by the compiler (absolute paths). */\n readonly emittedFiles?: readonly string[];\n}\n\n/**\n * Compiles a jsii project with the TypeScript 7 programmatic API.\n *\n * The compiler owns the `tsconfig.json` handling (generating one from the\n * project's `package.json`, or validating a user-provided one) and delegates the\n * type analysis, assembly generation and emit to `buildProject`, which drives the\n * out-of-process TypeScript 7 compiler.\n */\nexport class Compiler {\n private readonly userProvidedTypeScriptConfig: boolean;\n private readonly tsconfig: TypeScriptConfig;\n private readonly configPath: string;\n private readonly projectRoot: string;\n\n public constructor(private readonly options: CompilerOptions) {\n if (options.generateTypeScriptConfig != null && options.typeScriptConfig != null) {\n throw new utils.JsiiError(\n 'Cannot use `generateTypeScriptConfig` and `typeScriptConfig` together. Provide only one of them.',\n );\n }\n\n this.projectRoot = this.options.projectInfo.projectRoot;\n const configFileName = options.typeScriptConfig ?? options.generateTypeScriptConfig ?? 'tsconfig.json';\n this.configPath = path.join(this.projectRoot, configFileName);\n this.userProvidedTypeScriptConfig = Boolean(options.typeScriptConfig);\n this.tsconfig = this.configureTypeScript();\n }\n\n /** The name of the tsconfig file this compiler builds from (relative to the project root). */\n public get configFileName(): string {\n return path.relative(this.projectRoot, this.configPath);\n }\n\n /**\n * Compiles the configured project once.\n */\n /**\n * Compiles the configured project once.\n *\n * @param files can be specified to override the standard source code location\n * logic (the generated tsconfig then lists exactly these files).\n * Useful for example when testing \"negatives\".\n */\n public emit(...files: string[]): EmitResult {\n if (this.options.watch) {\n throw new utils.JsiiError('--watch is not supported by the TypeScript 7 based compiler', true);\n }\n if (this.options.addDeprecationWarnings) {\n throw new utils.JsiiError('--add-deprecation-warnings is not supported by the TypeScript 7 based compiler yet');\n }\n if (files.length > 0 && this.userProvidedTypeScriptConfig) {\n throw new utils.JsiiError('Explicit source files cannot be combined with a user-provided tsconfig');\n }\n if (!this.userProvidedTypeScriptConfig) {\n this.writeTypeScriptConfig(files);\n }\n\n const result = buildProject({\n projectRoot: this.projectRoot,\n projectInfo: this.options.projectInfo,\n tsconfigFileName: this.configFileName,\n generatedTsconfig: !this.userProvidedTypeScriptConfig,\n stripDeprecated: this.options.stripDeprecated,\n stripDeprecatedAllowListFile: this.options.stripDeprecatedAllowListFile,\n compressAssembly: this.options.compressAssembly,\n });\n\n if (!result.emitSkipped) {\n LOG.info(`assembled ${result.typeCount} types, emitted ${result.emittedFiles.length} files`);\n }\n\n const hasWarnings = result.diagnostics.some((d) => d.category === 0 /* Warning */);\n return {\n emitSkipped: result.emitSkipped || (this.options.failOnWarnings === true && hasWarnings),\n diagnostics: result.diagnostics,\n emittedFiles: result.emittedFiles,\n };\n }\n\n private configureTypeScript(): TypeScriptConfig {\n if (this.userProvidedTypeScriptConfig) {\n const config = readTypeScriptConfigFile(this.configPath);\n\n // emit a warning if validation is disabled\n const rules = this.options.validateTypeScriptConfig ?? TypeScriptConfigValidationRuleSet.NONE;\n if (rules === TypeScriptConfigValidationRuleSet.NONE) {\n utils.logDiagnostic(\n JsiiDiagnostic.JSII_4009_DISABLED_TSCONFIG_VALIDATION.create(undefined, this.configPath),\n this.projectRoot,\n );\n }\n\n // validate the user provided config\n if (rules !== TypeScriptConfigValidationRuleSet.NONE) {\n const configName = path.relative(this.projectRoot, this.configPath);\n try {\n const validator = new TypeScriptConfigValidator(rules);\n validator.validate(config);\n } catch (error: unknown) {\n if (error instanceof ValidationError) {\n utils.logDiagnostic(\n JsiiDiagnostic.JSII_4000_FAILED_TSCONFIG_VALIDATION.create(\n undefined,\n configName,\n rules,\n error.violations,\n ),\n this.projectRoot,\n );\n }\n\n throw new utils.JsiiError(\n `Failed validation of tsconfig \"compilerOptions\" in \"${configName}\" against rule set \"${rules}\"!`,\n );\n }\n }\n\n return config;\n }\n\n // generated config if none is provided by the user\n return this.buildTypeScriptConfig();\n }\n\n /**\n * Builds the TypeScript config object from jsii config.\n *\n * This is the object that will be written to disk unless an existing tsconfig\n * is passed in.\n */\n private buildTypeScriptConfig(): TypeScriptConfig {\n let references: string[] | undefined;\n\n const isComposite =\n this.options.projectReferences !== undefined\n ? this.options.projectReferences\n : this.options.projectInfo.projectReferences !== undefined\n ? this.options.projectInfo.projectReferences\n : false;\n\n if (isComposite) {\n references = this.findProjectReferences();\n }\n\n const pi = this.options.projectInfo;\n\n return {\n compilerOptions: {\n ...pi.tsc,\n ...BASE_COMPILER_OPTIONS,\n // Enable composite mode if project references are enabled\n composite: isComposite,\n // When incremental, configure a tsbuildinfo file\n tsBuildInfoFile: path.join(pi.tsc?.outDir ?? '.', 'tsconfig.tsbuildinfo'),\n },\n include: [pi.tsc?.rootDir != null ? path.join(pi.tsc.rootDir, '**', '*.ts') : path.join('**', '*.ts')],\n exclude: [\n 'node_modules',\n ...(pi.excludeTypescript ?? []),\n ...(pi.tsc?.outDir != null &&\n (pi.tsc?.rootDir == null || path.resolve(pi.tsc.outDir).startsWith(path.resolve(pi.tsc.rootDir) + path.sep))\n ? [path.join(pi.tsc.outDir, '**', '*.ts')]\n : []),\n ],\n // Change the references a little. We write 'originalpath' to the\n // file under the 'path' key, which is the same as what the\n // TypeScript compiler does. Make it relative so that the files are\n // movable. Not strictly required but looks better.\n references: references?.map((p) => ({ path: p })),\n };\n }\n\n /**\n * Creates a `tsconfig.json` file to improve the IDE experience.\n */\n private writeTypeScriptConfig(files: string[] = []): void {\n const commentKey = '_generated_by_jsii_';\n const commentValue = 'Generated by jsii - safe to delete, and ideally should be in .gitignore';\n\n (this.tsconfig as any)[commentKey] = commentValue;\n\n if (fs.existsSync(this.configPath)) {\n const currentConfig = parseTsconfigJson(fs.readFileSync(this.configPath, 'utf8'), this.configPath);\n if (currentConfig && !(commentKey in currentConfig)) {\n throw new utils.JsiiError(\n `A '${this.configPath}' file that was not generated by jsii is in ${this.options.projectInfo.projectRoot}. Aborting instead of overwriting.`,\n );\n }\n }\n\n const config: TypeScriptConfig =\n files.length > 0\n ? {\n ...this.tsconfig,\n files: files.map((f) => path.relative(this.projectRoot, path.resolve(this.projectRoot, f))),\n include: undefined,\n }\n : this.tsconfig;\n LOG.debug(`Creating or updating ${chalk.blue(this.configPath)}`);\n fs.writeFileSync(this.configPath, JSON.stringify(config, null, 2), 'utf8');\n }\n\n /**\n * Find all dependencies that look like TypeScript projects.\n *\n * Enumerate all dependencies, if they have a tsconfig.json file with\n * \"composite: true\" we consider them project references.\n *\n * (Note: TypeScript seems to only correctly find transitive project references\n * if there's an \"index\" tsconfig.json of all projects somewhere up the directory\n * tree)\n */\n private findProjectReferences(): string[] {\n const pkg = this.options.projectInfo.packageJson;\n\n const ret = new Array<string>();\n\n const dependencyNames = new Set<string>();\n for (const dependencyMap of [pkg.dependencies, pkg.devDependencies, pkg.peerDependencies]) {\n if (dependencyMap === undefined) {\n continue;\n }\n for (const name of Object.keys(dependencyMap)) {\n dependencyNames.add(name);\n }\n }\n\n for (const tsconfigFile of Array.from(dependencyNames).map((depName) => this.findMonorepoPeerTsconfig(depName))) {\n if (!tsconfigFile) {\n continue;\n }\n\n const tsconfig = parseTsconfigJson(fs.readFileSync(tsconfigFile, 'utf8'), tsconfigFile);\n\n // Add references to any TypeScript package we find that is 'composite' enabled.\n // Make it relative.\n if (tsconfig.compilerOptions?.composite) {\n ret.push(path.relative(this.options.projectInfo.projectRoot, path.dirname(tsconfigFile)));\n } else {\n // Not a composite package--if this package is in a 'node_modules' directory, that is most\n // likely correct, otherwise it is most likely an error (heuristic).\n if (tsconfigFile.includes('node_modules')) {\n LOG.warn('%s: not a composite TypeScript package, but it probably should be', path.dirname(tsconfigFile));\n }\n }\n }\n\n return ret;\n }\n\n /**\n * Find source files for a dependency that is also a sibling in a monorepo.\n *\n * This method is used to find project references.\n */\n private findMonorepoPeerTsconfig(depName: string): string | undefined {\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n const { builtinModules } = require('node:module');\n if ((builtinModules ?? []).includes(depName)) {\n // Can happen for modules like 'punycode' which are declared as dependency for polyfill purposes\n return undefined;\n }\n\n try {\n const depDir = findDependencyDirectory(depName, this.options.projectInfo.projectRoot);\n\n const dep = path.join(depDir, 'tsconfig.json');\n if (!fs.existsSync(dep)) {\n return undefined;\n }\n\n // Resolve symlinks, to get a correct relative path\n const dependencyRealPath = fs.realpathSync(dep);\n if (dependencyRealPath.split(path.sep).includes('node_modules')) {\n return undefined;\n }\n\n return dependencyRealPath;\n } catch (e: any) {\n // @types modules cannot be required, for example\n if (['MODULE_NOT_FOUND', 'ERR_PACKAGE_PATH_NOT_EXPORTED'].includes(e.code)) {\n return undefined;\n }\n throw e;\n }\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires\nconst sortJson = require('sort-json');\n\nexport interface BuildProjectOptions {\n readonly projectRoot: string;\n readonly projectInfo: ProjectInfo;\n /** The tsconfig file to open, relative to `projectRoot` (default `tsconfig.json`). */\n readonly tsconfigFileName?: string;\n /**\n * Whether the tsconfig was generated by jsii (as opposed to user-provided).\n * A generated config may be amended with an inferred `rootDir`.\n */\n readonly generatedTsconfig?: boolean;\n readonly stripDeprecated?: boolean;\n readonly stripDeprecatedAllowListFile?: string;\n readonly compressAssembly?: boolean;\n}\n\nexport interface BuildProjectResult {\n readonly assembly?: spec.Assembly;\n readonly typeCount: number;\n readonly emittedFiles: string[];\n readonly emitSkipped: boolean;\n readonly diagnostics: readonly Diagnostic[];\n}\n\n/**\n * Derive the entrypoint .ts from the project's declared `types` entry.\n *\n * Mirrors the classic Assembler's `mainFile` computation: start from the\n * declared `types`, turn the `.d.ts`/`.js` into `.ts`, then — if an\n * out-of-source build is configured (tsc `outDir`) — re-root the path from the\n * `outDir` into the `rootDir`. This correctly handles both conventional\n * `src`->`lib` layouts and in-place (`rootDir === outDir`) layouts.\n */\nfunction deriveEntry(projectRoot: string, projectInfo: ProjectInfo, rootDir?: string, outDir?: string): string {\n const dts: string = projectInfo.types ?? 'index.d.ts';\n let mainFile = dts.replace(/\\.d\\.ts(x?)$/, '.ts$1').replace(/\\.js$/, '.ts');\n\n if (outDir != null) {\n // strip the outDir prefix, then prepend rootDir (if any)\n const rel = path.relative(outDir, mainFile);\n mainFile = rootDir != null ? path.join(rootDir, rel) : rel;\n }\n return path.resolve(projectRoot, mainFile);\n}\n\n/**\n * Run the ts backend for a package: produce and write the `.jsii` assembly.\n */\nexport function buildProject(options: BuildProjectOptions): BuildProjectResult {\n const { projectRoot, projectInfo } = options;\n\n let host = CompilerHost.open(options.projectRoot, options.tsconfigFileName);\n let project = host.getProject();\n let tsDiagnostics = collectTsDiagnostics(project.program);\n let tscRootDir = projectInfo.tsc?.rootDir;\n const tscOutDir = projectInfo.tsc?.outDir;\n\n // TypeScript 7 no longer infers `rootDir` from the common directory of the\n // sources when `outDir` is set (TS5011). The classic compiler relied on that\n // inference for the output layout and recorded the inferred directory as\n // `metadata.tscRootDir`; do the same for generated configs: infer it from the\n // program's root files, write it into the tsconfig and open the project again.\n if (options.generatedTsconfig && tscRootDir == null && tsDiagnostics.some((d) => d.code === 5011)) {\n const inferred = inferRootDir(project.rootFileNames, projectRoot);\n if (inferred != null) {\n const tsconfigPath = path.join(projectRoot, options.tsconfigFileName ?? 'tsconfig.json');\n const tsconfig = JSON.parse(fs.readFileSync(tsconfigPath, 'utf8'));\n tsconfig.compilerOptions = { ...tsconfig.compilerOptions, rootDir: inferred };\n fs.writeFileSync(tsconfigPath, JSON.stringify(tsconfig, null, 2), 'utf8');\n host.close();\n host = CompilerHost.open(options.projectRoot, options.tsconfigFileName);\n project = host.getProject();\n tsDiagnostics = collectTsDiagnostics(project.program);\n tscRootDir = inferred;\n }\n }\n\n const entry = deriveEntry(projectRoot, projectInfo, tscRootDir, tscOutDir);\n\n try {\n // Surface TypeScript compilation errors BEFORE assembling, with the same\n // reject-on-error behaviour as the default backend: a program that does not\n // compile must not produce an assembly.\n if (tsDiagnostics.some((d) => d.category === DiagnosticCategory.Error)) {\n return { typeCount: 0, emittedFiles: [], emitSkipped: true, diagnostics: tsDiagnostics };\n }\n\n const assembler = new Assembler(host.ts, project, {\n packageJson: projectInfo.packageJson,\n projectInfo,\n projectRoot,\n entry,\n assemblyName: projectInfo.name,\n defaultStability: projectInfo.stability,\n stripDeprecated: options.stripDeprecated ?? !!(projectInfo.packageJson as any)['cdk-build']?.stripDeprecated,\n stripDeprecatedAllowListFile: options.stripDeprecatedAllowListFile,\n tscRootDir,\n tscOutDir,\n readme: loadReadme(projectRoot),\n });\n\n let assembly: spec.Assembly;\n try {\n assembly = assembler.assemble();\n } catch (e: any) {\n // Same contract as the classic compiler: a failure while assembling is\n // reported as a JSII9997 error diagnostic rather than crashing the build.\n return {\n typeCount: 0,\n emittedFiles: [],\n emitSkipped: true,\n diagnostics: [\n ...tsDiagnostics,\n ...assembler.diagnostics,\n JsiiDiagnostic.JSII_9997_UNKNOWN_ERROR.createDetached(e),\n ],\n };\n }\n const jsiiDiagnostics = assembler.diagnostics;\n if (jsiiDiagnostics.some((d) => d.category === DiagnosticCategory.Error)) {\n return {\n typeCount: 0,\n emittedFiles: [],\n emitSkipped: true,\n diagnostics: [...tsDiagnostics, ...jsiiDiagnostics],\n };\n }\n\n if (process.env.JSII_TS7_TIMING) {\n LOG.info(`ts doc-cache hits (RPCs avoided): ${assembler.docCacheHits}`);\n }\n\n // Write the assembly first (the parity artifact), reusing @jsii/spec's writer\n // so the on-disk format (incl. the compressed file-redirect variant) matches\n // the strada path exactly.\n writeAssembly(projectRoot, fingerprint(assembly), { compress: options.compressAssembly ?? false });\n\n // Then emit JS/d.ts and inject jsii rtti (post-emit pass). An emit failure\n // fails the build (emitSkipped + a synthetic diagnostic); the assembly file\n // is left on disk to aid debugging, but the exit status reflects the error.\n let emittedFiles: string[] = [];\n try {\n ({ emittedFiles } = emitProject(project, {\n projectRoot,\n assembly,\n outDir: tscOutDir,\n rootDir: tscRootDir,\n }));\n } catch (err) {\n LOG.error(`ts backend: emit pipeline failed: ${(err as Error).stack ?? (err as Error).message}`);\n return {\n assembly,\n typeCount: Object.keys(assembly.types ?? {}).length,\n emittedFiles: [],\n emitSkipped: true,\n diagnostics: [syntheticErrorDiagnostic(`ts backend: emit pipeline failed: ${(err as Error).message}`)],\n };\n }\n\n return {\n assembly,\n typeCount: Object.keys(assembly.types ?? {}).length,\n emittedFiles,\n emitSkipped: false,\n diagnostics: [...tsDiagnostics, ...jsiiDiagnostics], // non-error diagnostics (warnings/suggestions) pass through\n };\n } finally {\n if (process.env.JSII_TS7_TIMING) {\n const t = host.getTimingInfo?.();\n if (t?.totals) {\n LOG.info(\n `ts timing: requests=${t.totals.requestCount} roundTripMs=${Math.round(t.totals.roundTripMs)} ` +\n `serverTimeMs=${Math.round(t.totals.serverTimeMs ?? 0)} transportOverheadMs=${Math.round(\n t.totals.transportOverheadMs ?? 0,\n )} ` +\n `sent=${t.totals.bytesSent} recv=${t.totals.bytesReceived}`,\n );\n }\n }\n host.close();\n }\n}\n\n/**\n * Collect the program's pre-emit diagnostics (options, global, syntactic and\n * semantic) from the program and map them to jsii's `Diagnostic` for the\n * standard reporting pipeline.\n */\nfunction collectTsDiagnostics(program: any): Diagnostic[] {\n const call = (name: string): any[] => (typeof program[name] === 'function' ? program[name]() ?? [] : []);\n const raw: any[] = [\n ...call('getProgramDiagnostics'),\n ...call('getGlobalDiagnostics'),\n ...call('getSyntacticDiagnostics'),\n ...call('getSemanticDiagnostics'),\n ];\n const texts = new Map<string, string | undefined>();\n const readSource = (fileName: string): string | undefined => {\n if (!texts.has(fileName)) {\n try {\n texts.set(fileName, fs.readFileSync(fileName, 'utf8'));\n } catch {\n texts.set(fileName, undefined);\n }\n }\n return texts.get(fileName);\n };\n return raw.map((d) => toDiagnostic(d, readSource));\n}\n\n/**\n * Map one TypeScript 7 API diagnostic (`{ fileName, pos, end, code, category, text }`)\n * to jsii's `Diagnostic`. The file text is attached so the formatter renders the\n * same `file:line:col - error TSxxxx:` layout, with source context, that the\n * classic compiler produced. Exported for unit tests.\n */\nexport function toDiagnostic(d: any, readSource: (fileName: string) => string | undefined): Diagnostic {\n const category = Object.values(DiagnosticCategory).includes(d.category)\n ? (d.category as DiagnosticCategory)\n : DiagnosticCategory.Error;\n const fileName: string | undefined = typeof d.fileName === 'string' ? d.fileName : undefined;\n const file = fileName != null ? { fileName, text: readSource(fileName) } : undefined;\n const hasRange = file != null && typeof d.pos === 'number' && typeof d.end === 'number' && d.end >= d.pos;\n return {\n category,\n code: typeof d.code === 'number' ? d.code : 0,\n file,\n start: hasRange ? d.pos : undefined,\n length: hasRange ? d.end - d.pos : undefined,\n messageText: typeof d.text === 'string' ? d.text : d.messageText ?? d.message ?? String(d),\n };\n}\n\n/** An error diagnostic with no source location. */\nfunction syntheticErrorDiagnostic(messageText: string): Diagnostic {\n return {\n category: DiagnosticCategory.Error,\n code: 0,\n file: undefined,\n start: undefined,\n length: undefined,\n messageText,\n };\n}\n\n/**\n * Load and render the package README the same way the default backend does\n * (including literate example inclusion), so `assembly.readme` matches.\n */\nfunction loadReadme(projectRoot: string): spec.ReadMe | undefined {\n const fileName = fs.readdirSync(projectRoot).find((file) => file.toLocaleLowerCase() === 'readme.md');\n if (fileName == null) {\n return undefined;\n }\n const readmePath = path.join(projectRoot, fileName);\n return {\n markdown: literate\n .includeAndRenderExamples(literate.loadFromFile(readmePath), literate.fileSystemLoader(projectRoot), projectRoot)\n .join('\\n'),\n };\n}\n\n/**\n * Port of the classic `inferRootDir`: the longest directory (relative to the\n * project root) shared by all root files of the configuration, or `undefined`\n * when they only share the project root itself.\n */\nfunction inferRootDir(rootFileNames: readonly string[], projectRoot: string): string | undefined {\n const directories = rootFileNames\n .filter((fileName) => !fileName.split(path.sep).includes('node_modules'))\n .map((fileName) => path.relative(projectRoot, path.dirname(fileName)))\n .map(segmentPath);\n if (directories.length === 0) {\n return undefined;\n }\n const maxPrefix = Math.min(...directories.map((segments) => segments.length - 1));\n let commonIndex = -1;\n while (commonIndex < maxPrefix && new Set(directories.map((segments) => segments[commonIndex + 1])).size === 1) {\n commonIndex++;\n }\n if (commonIndex < 0) {\n return undefined;\n }\n return directories[0][commonIndex];\n\n function segmentPath(fileName: string): string[] {\n const result = new Array<string>();\n for (let parent = fileName; parent !== path.dirname(parent); parent = path.dirname(parent)) {\n result.unshift(parent);\n }\n return result;\n }\n}\n\n/** Mirror of strada `_fingerprint`: sort keys, hash, stamp `fingerprint`. */\nfunction fingerprint(assembly: spec.Assembly): spec.Assembly {\n delete (assembly as any).fingerprint;\n const sorted = sortJson(assembly);\n const hash = crypto.createHash('sha256').update(JSON.stringify(sorted)).digest('base64');\n return { ...sorted, fingerprint: hash };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"compiler.js","sources":["../src/compiler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAY,MAAM,wCAAoB;AACtC,MAAY,EAAE,oCAAgB;AAC9B,MAAY,IAAI,sCAAkB;AAElC,qCAA2C;AAC3C,kDAA0B;AAC1B,MAAY,MAAM,mCAAe;AAEjC,2CAAwC;AACxC,oDAA8D;AAC9D,mDAA+C;AAC/C,6CAA8D;AAC9D,uCAAwC;AACxC,uDAAmD;AACnD,MAAY,QAA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C,MAAM,CAAC,CAAC;QACzB,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;AACH,CAAC;AAED,6EAA6E;AAC7E,SAAS,WAAW,CAAC,QAAuB;IAC1C,OAAQ,QAAgB,CAAC,WAAW,CAAC;IACrC,MAAM,MAAM,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAClC,MAAM,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IACzF,OAAO,EAAE,GAAG,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;AAC1C,CAAC","sourcesContent":["import * as crypto from 'node:crypto';\nimport * as fs from 'node:fs';\nimport * as path from 'node:path';\nimport * as spec from '@jsii/spec';\nimport { writeAssembly } from '@jsii/spec';\nimport chalk from 'chalk';\nimport * as log4js from 'log4js';\n\nimport { Assembler } from './assembler';\nimport { findDependencyDirectory } from './common/find-utils';\nimport { CompilerHost } from './compiler-host';\nimport { Diagnostic, DiagnosticCategory } from './diagnostic';\nimport { emitProject } from './emitter';\nimport { JsiiDiagnostic } from './jsii-diagnostic';\nimport * as literate from './literate';\nimport { ProjectInfo } from './project-info';\nimport { TypeScriptConfig, TypeScriptConfigValidationRuleSet } from './tsconfig';\nimport { BASE_COMPILER_OPTIONS } from './tsconfig/compiler-options';\nimport { parseTsconfigJson, readTypeScriptConfigFile } from './tsconfig/read';\nimport { TypeScriptConfigValidator } from './tsconfig/tsconfig-validator';\nimport { ValidationError } from './tsconfig/validator';\nimport * as utils from './utils';\n\nconst LOG = log4js.getLogger('jsii/compiler');\nexport const DIAGNOSTICS = 'diagnostics';\nexport const JSII_DIAGNOSTICS_CODE = 9999;\n\nexport interface CompilerOptions {\n /** The information about the project to be built */\n projectInfo: ProjectInfo;\n /**\n * Whether the compiler should watch for changes or just compile once.\n *\n * Watch mode is not available on the TypeScript 7 backend; setting this to\n * `true` makes `emit()` fail with an explicit error.\n */\n watch?: boolean;\n /** Whether to detect and generate TypeScript project references */\n projectReferences?: boolean;\n /** Whether to fail when a warning is emitted */\n failOnWarnings?: boolean;\n /** Whether to strip deprecated members from emitted artifacts */\n stripDeprecated?: boolean;\n /** The path to an allowlist of FQNs to strip if stripDeprecated is set */\n stripDeprecatedAllowListFile?: string;\n /**\n * Whether to add warnings for deprecated elements.\n *\n * Not implemented on the TypeScript 7 backend yet; requesting it fails with\n * an explicit error instead of silently producing an assembly without the\n * `.warnings.jsii.js` module.\n */\n addDeprecationWarnings?: boolean;\n /**\n * The name of the tsconfig file to generate.\n * Cannot be used at the same time as `typeScriptConfig`.\n * @default \"tsconfig.json\"\n */\n generateTypeScriptConfig?: string;\n /**\n * The name of the tsconfig file to use.\n * Cannot be used at the same time as `generateTypeScriptConfig`.\n * @default - generate the tsconfig file\n */\n typeScriptConfig?: string;\n /**\n * The ruleset to validate the provided tsconfig file against.\n * Can only be used when `typeScriptConfig` is provided.\n * @default TypeScriptConfigValidationRuleSet.STRICT - if `typeScriptConfig` is provided\n */\n validateTypeScriptConfig?: TypeScriptConfigValidationRuleSet;\n /**\n * Whether to compress the assembly\n * @default false\n */\n compressAssembly?: boolean;\n}\n\nexport interface EmitResult {\n readonly emitSkipped: boolean;\n readonly diagnostics: readonly Diagnostic[];\n /** The files written by the compiler (absolute paths). */\n readonly emittedFiles?: readonly string[];\n}\n\n/**\n * Compiles a jsii project with the TypeScript 7 programmatic API.\n *\n * The compiler owns the `tsconfig.json` handling (generating one from the\n * project's `package.json`, or validating a user-provided one) and delegates the\n * type analysis, assembly generation and emit to `buildProject`, which drives the\n * out-of-process TypeScript 7 compiler.\n */\nexport class Compiler {\n private readonly userProvidedTypeScriptConfig: boolean;\n private readonly tsconfig: TypeScriptConfig;\n private readonly configPath: string;\n private readonly projectRoot: string;\n\n public constructor(private readonly options: CompilerOptions) {\n if (options.generateTypeScriptConfig != null && options.typeScriptConfig != null) {\n throw new utils.JsiiError(\n 'Cannot use `generateTypeScriptConfig` and `typeScriptConfig` together. Provide only one of them.',\n );\n }\n\n this.projectRoot = this.options.projectInfo.projectRoot;\n const configFileName = options.typeScriptConfig ?? options.generateTypeScriptConfig ?? 'tsconfig.json';\n this.configPath = path.join(this.projectRoot, configFileName);\n this.userProvidedTypeScriptConfig = Boolean(options.typeScriptConfig);\n this.tsconfig = this.configureTypeScript();\n }\n\n /** The name of the tsconfig file this compiler builds from (relative to the project root). */\n public get configFileName(): string {\n return path.relative(this.projectRoot, this.configPath);\n }\n\n /**\n * Compiles the configured project once.\n */\n /**\n * Compiles the configured project once.\n *\n * @param files can be specified to override the standard source code location\n * logic (the generated tsconfig then lists exactly these files).\n * Useful for example when testing \"negatives\".\n */\n public emit(...files: string[]): EmitResult {\n if (this.options.watch) {\n throw new utils.JsiiError('--watch is not supported by the TypeScript 7 based compiler', true);\n }\n if (this.options.addDeprecationWarnings) {\n throw new utils.JsiiError('--add-deprecation-warnings is not supported by the TypeScript 7 based compiler yet');\n }\n if (files.length > 0 && this.userProvidedTypeScriptConfig) {\n throw new utils.JsiiError('Explicit source files cannot be combined with a user-provided tsconfig');\n }\n if (!this.userProvidedTypeScriptConfig) {\n this.writeTypeScriptConfig(files);\n }\n\n const result = buildProject({\n projectRoot: this.projectRoot,\n projectInfo: this.options.projectInfo,\n tsconfigFileName: this.configFileName,\n generatedTsconfig: !this.userProvidedTypeScriptConfig,\n stripDeprecated: this.options.stripDeprecated,\n stripDeprecatedAllowListFile: this.options.stripDeprecatedAllowListFile,\n compressAssembly: this.options.compressAssembly,\n });\n\n if (!result.emitSkipped) {\n LOG.info(`assembled ${result.typeCount} types, emitted ${result.emittedFiles.length} files`);\n }\n\n const hasWarnings = result.diagnostics.some((d) => d.category === 0 /* Warning */);\n return {\n emitSkipped: result.emitSkipped || (this.options.failOnWarnings === true && hasWarnings),\n diagnostics: result.diagnostics,\n emittedFiles: result.emittedFiles,\n };\n }\n\n private configureTypeScript(): TypeScriptConfig {\n if (this.userProvidedTypeScriptConfig) {\n const config = readTypeScriptConfigFile(this.configPath);\n\n // emit a warning if validation is disabled\n const rules = this.options.validateTypeScriptConfig ?? TypeScriptConfigValidationRuleSet.NONE;\n if (rules === TypeScriptConfigValidationRuleSet.NONE) {\n utils.logDiagnostic(\n JsiiDiagnostic.JSII_4009_DISABLED_TSCONFIG_VALIDATION.create(undefined, this.configPath),\n this.projectRoot,\n );\n }\n\n // validate the user provided config\n if (rules !== TypeScriptConfigValidationRuleSet.NONE) {\n const configName = path.relative(this.projectRoot, this.configPath);\n try {\n const validator = new TypeScriptConfigValidator(rules);\n validator.validate(config);\n } catch (error: unknown) {\n if (error instanceof ValidationError) {\n utils.logDiagnostic(\n JsiiDiagnostic.JSII_4000_FAILED_TSCONFIG_VALIDATION.create(\n undefined,\n configName,\n rules,\n error.violations,\n ),\n this.projectRoot,\n );\n }\n\n throw new utils.JsiiError(\n `Failed validation of tsconfig \"compilerOptions\" in \"${configName}\" against rule set \"${rules}\"!`,\n );\n }\n }\n\n return config;\n }\n\n // generated config if none is provided by the user\n return this.buildTypeScriptConfig();\n }\n\n /**\n * Builds the TypeScript config object from jsii config.\n *\n * This is the object that will be written to disk unless an existing tsconfig\n * is passed in.\n */\n private buildTypeScriptConfig(): TypeScriptConfig {\n let references: string[] | undefined;\n\n const isComposite =\n this.options.projectReferences !== undefined\n ? this.options.projectReferences\n : this.options.projectInfo.projectReferences !== undefined\n ? this.options.projectInfo.projectReferences\n : false;\n\n if (isComposite) {\n references = this.findProjectReferences();\n }\n\n const pi = this.options.projectInfo;\n\n return {\n compilerOptions: {\n ...pi.tsc,\n ...BASE_COMPILER_OPTIONS,\n // Enable composite mode if project references are enabled\n composite: isComposite,\n // When incremental, configure a tsbuildinfo file\n tsBuildInfoFile: path.join(pi.tsc?.outDir ?? '.', 'tsconfig.tsbuildinfo'),\n },\n include: [pi.tsc?.rootDir != null ? path.join(pi.tsc.rootDir, '**', '*.ts') : path.join('**', '*.ts')],\n exclude: [\n 'node_modules',\n ...(pi.excludeTypescript ?? []),\n ...(pi.tsc?.outDir != null &&\n (pi.tsc?.rootDir == null || path.resolve(pi.tsc.outDir).startsWith(path.resolve(pi.tsc.rootDir) + path.sep))\n ? [path.join(pi.tsc.outDir, '**', '*.ts')]\n : []),\n ],\n // Change the references a little. We write 'originalpath' to the\n // file under the 'path' key, which is the same as what the\n // TypeScript compiler does. Make it relative so that the files are\n // movable. Not strictly required but looks better.\n references: references?.map((p) => ({ path: p })),\n };\n }\n\n /**\n * Creates a `tsconfig.json` file to improve the IDE experience.\n */\n private writeTypeScriptConfig(files: string[] = []): void {\n const commentKey = '_generated_by_jsii_';\n const commentValue = 'Generated by jsii - safe to delete, and ideally should be in .gitignore';\n\n (this.tsconfig as any)[commentKey] = commentValue;\n\n if (fs.existsSync(this.configPath)) {\n const currentConfig = parseTsconfigJson(fs.readFileSync(this.configPath, 'utf8'), this.configPath);\n if (currentConfig && !(commentKey in currentConfig)) {\n throw new utils.JsiiError(\n `A '${this.configPath}' file that was not generated by jsii is in ${this.options.projectInfo.projectRoot}. Aborting instead of overwriting.`,\n );\n }\n }\n\n const config: TypeScriptConfig =\n files.length > 0\n ? {\n ...this.tsconfig,\n files: files.map((f) => path.relative(this.projectRoot, path.resolve(this.projectRoot, f))),\n include: undefined,\n }\n : this.tsconfig;\n LOG.debug(`Creating or updating ${chalk.blue(this.configPath)}`);\n fs.writeFileSync(this.configPath, JSON.stringify(config, null, 2), 'utf8');\n }\n\n /**\n * Find all dependencies that look like TypeScript projects.\n *\n * Enumerate all dependencies, if they have a tsconfig.json file with\n * \"composite: true\" we consider them project references.\n *\n * (Note: TypeScript seems to only correctly find transitive project references\n * if there's an \"index\" tsconfig.json of all projects somewhere up the directory\n * tree)\n */\n private findProjectReferences(): string[] {\n const pkg = this.options.projectInfo.packageJson;\n\n const ret = new Array<string>();\n\n const dependencyNames = new Set<string>();\n for (const dependencyMap of [pkg.dependencies, pkg.devDependencies, pkg.peerDependencies]) {\n if (dependencyMap === undefined) {\n continue;\n }\n for (const name of Object.keys(dependencyMap)) {\n dependencyNames.add(name);\n }\n }\n\n for (const tsconfigFile of Array.from(dependencyNames).map((depName) => this.findMonorepoPeerTsconfig(depName))) {\n if (!tsconfigFile) {\n continue;\n }\n\n const tsconfig = parseTsconfigJson(fs.readFileSync(tsconfigFile, 'utf8'), tsconfigFile);\n\n // Add references to any TypeScript package we find that is 'composite' enabled.\n // Make it relative.\n if (tsconfig.compilerOptions?.composite) {\n ret.push(path.relative(this.options.projectInfo.projectRoot, path.dirname(tsconfigFile)));\n } else {\n // Not a composite package--if this package is in a 'node_modules' directory, that is most\n // likely correct, otherwise it is most likely an error (heuristic).\n if (tsconfigFile.includes('node_modules')) {\n LOG.warn('%s: not a composite TypeScript package, but it probably should be', path.dirname(tsconfigFile));\n }\n }\n }\n\n return ret;\n }\n\n /**\n * Find source files for a dependency that is also a sibling in a monorepo.\n *\n * This method is used to find project references.\n */\n private findMonorepoPeerTsconfig(depName: string): string | undefined {\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n const { builtinModules } = require('node:module');\n if ((builtinModules ?? []).includes(depName)) {\n // Can happen for modules like 'punycode' which are declared as dependency for polyfill purposes\n return undefined;\n }\n\n try {\n const depDir = findDependencyDirectory(depName, this.options.projectInfo.projectRoot);\n\n const dep = path.join(depDir, 'tsconfig.json');\n if (!fs.existsSync(dep)) {\n return undefined;\n }\n\n // Resolve symlinks, to get a correct relative path\n const dependencyRealPath = fs.realpathSync(dep);\n if (dependencyRealPath.split(path.sep).includes('node_modules')) {\n return undefined;\n }\n\n return dependencyRealPath;\n } catch (e: any) {\n // @types modules cannot be required, for example\n if (['MODULE_NOT_FOUND', 'ERR_PACKAGE_PATH_NOT_EXPORTED'].includes(e.code)) {\n return undefined;\n }\n throw e;\n }\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires\nconst sortJson = require('sort-json');\n\nexport interface BuildProjectOptions {\n readonly projectRoot: string;\n readonly projectInfo: ProjectInfo;\n /** The tsconfig file to open, relative to `projectRoot` (default `tsconfig.json`). */\n readonly tsconfigFileName?: string;\n /**\n * Whether the tsconfig was generated by jsii (as opposed to user-provided).\n * A generated config may be amended with an inferred `rootDir`.\n */\n readonly generatedTsconfig?: boolean;\n readonly stripDeprecated?: boolean;\n readonly stripDeprecatedAllowListFile?: string;\n readonly compressAssembly?: boolean;\n}\n\nexport interface BuildProjectResult {\n readonly assembly?: spec.Assembly;\n readonly typeCount: number;\n readonly emittedFiles: string[];\n readonly emitSkipped: boolean;\n readonly diagnostics: readonly Diagnostic[];\n}\n\n/**\n * Derive the entrypoint .ts from the project's declared `types` entry.\n *\n * Mirrors the classic Assembler's `mainFile` computation: start from the\n * declared `types`, turn the `.d.ts`/`.js` into `.ts`, then — if an\n * out-of-source build is configured (tsc `outDir`) — re-root the path from the\n * `outDir` into the `rootDir`. This correctly handles both conventional\n * `src`->`lib` layouts and in-place (`rootDir === outDir`) layouts.\n */\nfunction deriveEntry(projectRoot: string, projectInfo: ProjectInfo, rootDir?: string, outDir?: string): string {\n const dts: string = projectInfo.types ?? 'index.d.ts';\n let mainFile = dts.replace(/\\.d\\.ts(x?)$/, '.ts$1').replace(/\\.js$/, '.ts');\n\n if (outDir != null) {\n // strip the outDir prefix, then prepend rootDir (if any)\n const rel = path.relative(outDir, mainFile);\n mainFile = rootDir != null ? path.join(rootDir, rel) : rel;\n }\n return path.resolve(projectRoot, mainFile);\n}\n\n/**\n * The diagnostic for an entry point that is not part of the program. When package.json's `types` is outside of tsc's\n * outDir, it can't be re-rooted from there, so report that (with where tsc puts the declarations) instead.\n */\nfunction missingEntryDiagnostic(entry: string, projectInfo: ProjectInfo, rootDir?: string, outDir?: string) {\n const dts: string = projectInfo.types ?? 'index.d.ts';\n const mainFile = dts.replace(/\\.d\\.ts(x?)$/, '.ts$1').replace(/\\.js$/, '.ts');\n if (outDir == null || !isOutsideOfDirectory(path.relative(outDir, mainFile))) {\n return JsiiDiagnostic.JSII_0004_COULD_NOT_FIND_ENTRYPOINT.createDetached(entry);\n }\n const fromRootDir = path.relative(rootDir ?? '.', dts);\n const suggestion = isOutsideOfDirectory(fromRootDir) ? undefined : path.join(outDir, fromRootDir);\n return JsiiDiagnostic.JSII_0008_TYPES_OUTSIDE_OUT_DIR.createDetached(dts, outDir, suggestion);\n}\n\n/** Whether a path that is relative to some directory points outside of that directory. */\nfunction isOutsideOfDirectory(relativePath: string): boolean {\n return relativePath === '..' || relativePath.startsWith(`..${path.sep}`) || path.isAbsolute(relativePath);\n}\n\n/**\n * Run the ts backend for a package: produce and write the `.jsii` assembly.\n */\nexport function buildProject(options: BuildProjectOptions): BuildProjectResult {\n const { projectRoot, projectInfo } = options;\n\n let host = CompilerHost.open(options.projectRoot, options.tsconfigFileName);\n let project = host.getProject();\n let tsDiagnostics = collectTsDiagnostics(project.program);\n let tscRootDir = projectInfo.tsc?.rootDir;\n const tscOutDir = projectInfo.tsc?.outDir;\n\n // TypeScript 7 no longer infers `rootDir` from the common directory of the\n // sources when `outDir` is set (TS5011). The classic compiler relied on that\n // inference for the output layout and recorded the inferred directory as\n // `metadata.tscRootDir`; do the same for generated configs: infer it from the\n // program's root files, write it into the tsconfig and open the project again.\n if (options.generatedTsconfig && tscRootDir == null && tsDiagnostics.some((d) => d.code === 5011)) {\n const inferred = inferRootDir(project.rootFileNames, projectRoot);\n if (inferred != null) {\n const tsconfigPath = path.join(projectRoot, options.tsconfigFileName ?? 'tsconfig.json');\n const tsconfig = JSON.parse(fs.readFileSync(tsconfigPath, 'utf8'));\n tsconfig.compilerOptions = { ...tsconfig.compilerOptions, rootDir: inferred };\n fs.writeFileSync(tsconfigPath, JSON.stringify(tsconfig, null, 2), 'utf8');\n host.close();\n host = CompilerHost.open(options.projectRoot, options.tsconfigFileName);\n project = host.getProject();\n tsDiagnostics = collectTsDiagnostics(project.program);\n tscRootDir = inferred;\n }\n }\n\n const entry = deriveEntry(projectRoot, projectInfo, tscRootDir, tscOutDir);\n\n try {\n // Surface TypeScript compilation errors BEFORE assembling, with the same\n // reject-on-error behaviour as the default backend: a program that does not\n // compile must not produce an assembly.\n if (tsDiagnostics.some((d) => d.category === DiagnosticCategory.Error)) {\n return { typeCount: 0, emittedFiles: [], emitSkipped: true, diagnostics: tsDiagnostics };\n }\n\n if (!project.program.getSourceFile(entry)) {\n return {\n typeCount: 0,\n emittedFiles: [],\n emitSkipped: true,\n diagnostics: [...tsDiagnostics, missingEntryDiagnostic(entry, projectInfo, tscRootDir, tscOutDir)],\n };\n }\n\n const assembler = new Assembler(host.ts, project, {\n packageJson: projectInfo.packageJson,\n projectInfo,\n projectRoot,\n entry,\n assemblyName: projectInfo.name,\n defaultStability: projectInfo.stability,\n stripDeprecated: options.stripDeprecated ?? !!(projectInfo.packageJson as any)['cdk-build']?.stripDeprecated,\n stripDeprecatedAllowListFile: options.stripDeprecatedAllowListFile,\n tscRootDir,\n tscOutDir,\n readme: loadReadme(projectRoot),\n });\n\n let assembly: spec.Assembly;\n try {\n assembly = assembler.assemble();\n } catch (e: any) {\n // Same contract as the classic compiler: a failure while assembling is\n // reported as a JSII9997 error diagnostic rather than crashing the build.\n return {\n typeCount: 0,\n emittedFiles: [],\n emitSkipped: true,\n diagnostics: [\n ...tsDiagnostics,\n ...assembler.diagnostics,\n JsiiDiagnostic.JSII_9997_UNKNOWN_ERROR.createDetached(e),\n ],\n };\n }\n const jsiiDiagnostics = assembler.diagnostics;\n if (jsiiDiagnostics.some((d) => d.category === DiagnosticCategory.Error)) {\n return {\n typeCount: 0,\n emittedFiles: [],\n emitSkipped: true,\n diagnostics: [...tsDiagnostics, ...jsiiDiagnostics],\n };\n }\n\n if (process.env.JSII_TS7_TIMING) {\n LOG.info(`ts doc-cache hits (RPCs avoided): ${assembler.docCacheHits}`);\n }\n\n // Write the assembly first (the parity artifact), reusing @jsii/spec's writer\n // so the on-disk format (incl. the compressed file-redirect variant) matches\n // the strada path exactly.\n writeAssembly(projectRoot, fingerprint(assembly), { compress: options.compressAssembly ?? false });\n\n // Then emit JS/d.ts and inject jsii rtti (post-emit pass). An emit failure\n // fails the build (emitSkipped + a synthetic diagnostic); the assembly file\n // is left on disk to aid debugging, but the exit status reflects the error.\n let emittedFiles: string[] = [];\n try {\n ({ emittedFiles } = emitProject(project, {\n projectRoot,\n assembly,\n outDir: tscOutDir,\n rootDir: tscRootDir,\n }));\n } catch (err) {\n LOG.error(`ts backend: emit pipeline failed: ${(err as Error).stack ?? (err as Error).message}`);\n return {\n assembly,\n typeCount: Object.keys(assembly.types ?? {}).length,\n emittedFiles: [],\n emitSkipped: true,\n diagnostics: [syntheticErrorDiagnostic(`ts backend: emit pipeline failed: ${(err as Error).message}`)],\n };\n }\n\n return {\n assembly,\n typeCount: Object.keys(assembly.types ?? {}).length,\n emittedFiles,\n emitSkipped: false,\n diagnostics: [...tsDiagnostics, ...jsiiDiagnostics], // non-error diagnostics (warnings/suggestions) pass through\n };\n } finally {\n if (process.env.JSII_TS7_TIMING) {\n const t = host.getTimingInfo?.();\n if (t?.totals) {\n LOG.info(\n `ts timing: requests=${t.totals.requestCount} roundTripMs=${Math.round(t.totals.roundTripMs)} ` +\n `serverTimeMs=${Math.round(t.totals.serverTimeMs ?? 0)} transportOverheadMs=${Math.round(\n t.totals.transportOverheadMs ?? 0,\n )} ` +\n `sent=${t.totals.bytesSent} recv=${t.totals.bytesReceived}`,\n );\n }\n }\n host.close();\n }\n}\n\n/**\n * Collect the program's pre-emit diagnostics (options, global, syntactic and\n * semantic) from the program and map them to jsii's `Diagnostic` for the\n * standard reporting pipeline.\n */\nfunction collectTsDiagnostics(program: any): Diagnostic[] {\n const call = (name: string): any[] => (typeof program[name] === 'function' ? program[name]() ?? [] : []);\n const raw: any[] = [\n ...call('getProgramDiagnostics'),\n ...call('getGlobalDiagnostics'),\n ...call('getSyntacticDiagnostics'),\n ...call('getSemanticDiagnostics'),\n ];\n const texts = new Map<string, string | undefined>();\n const readSource = (fileName: string): string | undefined => {\n if (!texts.has(fileName)) {\n try {\n texts.set(fileName, fs.readFileSync(fileName, 'utf8'));\n } catch {\n texts.set(fileName, undefined);\n }\n }\n return texts.get(fileName);\n };\n return raw.map((d) => toDiagnostic(d, readSource));\n}\n\n/**\n * Map one TypeScript 7 API diagnostic (`{ fileName, pos, end, code, category, text }`)\n * to jsii's `Diagnostic`. The file text is attached so the formatter renders the\n * same `file:line:col - error TSxxxx:` layout, with source context, that the\n * classic compiler produced. Exported for unit tests.\n */\nexport function toDiagnostic(d: any, readSource: (fileName: string) => string | undefined): Diagnostic {\n const category = Object.values(DiagnosticCategory).includes(d.category)\n ? (d.category as DiagnosticCategory)\n : DiagnosticCategory.Error;\n const fileName: string | undefined = typeof d.fileName === 'string' ? d.fileName : undefined;\n const file = fileName != null ? { fileName, text: readSource(fileName) } : undefined;\n const hasRange = file != null && typeof d.pos === 'number' && typeof d.end === 'number' && d.end >= d.pos;\n return {\n category,\n code: typeof d.code === 'number' ? d.code : 0,\n file,\n start: hasRange ? d.pos : undefined,\n length: hasRange ? d.end - d.pos : undefined,\n messageText: typeof d.text === 'string' ? d.text : d.messageText ?? d.message ?? String(d),\n };\n}\n\n/** An error diagnostic with no source location. */\nfunction syntheticErrorDiagnostic(messageText: string): Diagnostic {\n return {\n category: DiagnosticCategory.Error,\n code: 0,\n file: undefined,\n start: undefined,\n length: undefined,\n messageText,\n };\n}\n\n/**\n * Load and render the package README the same way the default backend does\n * (including literate example inclusion), so `assembly.readme` matches.\n */\nfunction loadReadme(projectRoot: string): spec.ReadMe | undefined {\n const fileName = fs.readdirSync(projectRoot).find((file) => file.toLocaleLowerCase() === 'readme.md');\n if (fileName == null) {\n return undefined;\n }\n const readmePath = path.join(projectRoot, fileName);\n return {\n markdown: literate\n .includeAndRenderExamples(literate.loadFromFile(readmePath), literate.fileSystemLoader(projectRoot), projectRoot)\n .join('\\n'),\n };\n}\n\n/**\n * Port of the classic `inferRootDir`: the longest directory (relative to the\n * project root) shared by all root files of the configuration, or `undefined`\n * when they only share the project root itself.\n */\nfunction inferRootDir(rootFileNames: readonly string[], projectRoot: string): string | undefined {\n const directories = rootFileNames\n .filter((fileName) => !fileName.split(path.sep).includes('node_modules'))\n .map((fileName) => path.relative(projectRoot, path.dirname(fileName)))\n .map(segmentPath);\n if (directories.length === 0) {\n return undefined;\n }\n const maxPrefix = Math.min(...directories.map((segments) => segments.length - 1));\n let commonIndex = -1;\n while (commonIndex < maxPrefix && new Set(directories.map((segments) => segments[commonIndex + 1])).size === 1) {\n commonIndex++;\n }\n if (commonIndex < 0) {\n return undefined;\n }\n return directories[0][commonIndex];\n\n function segmentPath(fileName: string): string[] {\n const result = new Array<string>();\n for (let parent = fileName; parent !== path.dirname(parent); parent = path.dirname(parent)) {\n result.unshift(parent);\n }\n return result;\n }\n}\n\n/** Mirror of strada `_fingerprint`: sort keys, hash, stamp `fingerprint`. */\nfunction fingerprint(assembly: spec.Assembly): spec.Assembly {\n delete (assembly as any).fingerprint;\n const sorted = sortJson(assembly);\n const hash = crypto.createHash('sha256').update(JSON.stringify(sorted)).digest('base64');\n return { ...sorted, fingerprint: hash };\n}\n"]}
|
package/lib/jsii-diagnostic.d.ts
CHANGED
|
@@ -97,6 +97,7 @@ export declare class JsiiDiagnostic implements Diagnostic {
|
|
|
97
97
|
static readonly JSII_0005_MISSING_PEER_DEPENDENCY: Code<(assm: string, reference: string) => string>;
|
|
98
98
|
static readonly JSII_0006_MISSING_DEV_DEPENDENCY: Code<(dependencyName: string, peerRange: string, minVersion: string, actual: string) => string>;
|
|
99
99
|
static readonly JSII_0007_MISSING_WARNINGS_EXPORT: Code<() => string>;
|
|
100
|
+
static readonly JSII_0008_TYPES_OUTSIDE_OUT_DIR: Code<(types: string, outDir: string, suggestion?: string) => string>;
|
|
100
101
|
static readonly JSII_1000_NO_CONST_ENUM: Code<() => string>;
|
|
101
102
|
static readonly JSII_1001_TYPE_HAS_NO_SYMBOL: Code<() => string>;
|
|
102
103
|
static readonly JSII_1002_UNSPECIFIED_PROMISE: Code<() => string>;
|
package/lib/jsii-diagnostic.js
CHANGED
|
@@ -255,6 +255,15 @@ class JsiiDiagnostic {
|
|
|
255
255
|
'in the set of exports.',
|
|
256
256
|
name: 'metadata/missing-warnings-export',
|
|
257
257
|
});
|
|
258
|
+
static JSII_0008_TYPES_OUTSIDE_OUT_DIR = Code.error({
|
|
259
|
+
code: 8,
|
|
260
|
+
formatter: (types, outDir, suggestion) => `The "types" entry in package.json (${JSON.stringify(types)}) is outside of the TypeScript outDir ` +
|
|
261
|
+
`(${JSON.stringify(outDir)}), so the entry point cannot be found. ` +
|
|
262
|
+
(suggestion != null
|
|
263
|
+
? `Set it to ${JSON.stringify(suggestion)} and update "main" to match.`
|
|
264
|
+
: `Point "types" and "main" at the compiled files in ${JSON.stringify(outDir)}.`),
|
|
265
|
+
name: 'metadata/types-outside-outdir',
|
|
266
|
+
});
|
|
258
267
|
//////////////////////////////////////////////////////////////////////////////
|
|
259
268
|
// 1000 => 1999 -- TYPESCRIPT LANGUAGE RESTRICTIONS
|
|
260
269
|
static JSII_1000_NO_CONST_ENUM = Code.error({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsii-diagnostic.js","sources":["../src/jsii-diagnostic.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAY,IAAI,uCAAmB;AACnC,+BAA+C;AAC/C,6CAAoF;AAGpF,mCAAmE;AAEnE;;;;;GAKG;AACH;IAqHoB,IAAI;IACJ,IAAI;IArHtB;;OAEG;IACI,MAAM,CAAC,OAAO,CAAuC,EAC1D,IAAI,EACJ,IAAI,EACJ,SAAS,GAKV;QACC,OAAO,IAAI,IAAI,CAAI,IAAI,EAAE,IAAI,EAAE,+BAAkB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IACxE,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,UAAU,CAAuC,EAC7D,IAAI,EACJ,IAAI,EACJ,SAAS,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AoC,OAA+C;IACjF,KAAK,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;QACvD,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC;QACnD,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,MAAM,IAAI,KAAK,CAAC,iCAAiC,IAAI,GAAG,CAAC,CAAC;QAC5D,CAAC;QACD,QAAQ,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC/B,CAAC;AACH,CAAC;AAED,SAAS,cAAc,CAAC,GAAW;IACjC,IAAI,GAAG,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;QACzC,MAAM,EAAE,GAAG,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACpC,IAAI,EAAE,EAAE,CAAC;YACP,OAAO,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QAC7B,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,2BAA2B,GAAG,qDAAqD,CAAC,CAAC;IACvG,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["import * as spec from '@jsii/spec';\nimport { camel, constant, pascal } from 'case';\nimport { Diagnostic, DiagnosticCategory, DiagnosticSourceFile } from './diagnostic';\n\nimport { Violation } from './tsconfig/validator';\nimport { JSII_DIAGNOSTICS_CODE, _formatDiagnostic } from './utils';\n\n/**\n * Descriptors for all valid jsii diagnostic codes.\n *\n * The `category` or non-error codes can be updated, for example to treat\n * warnings as errors, or to suppress certain undesirable warnings.\n */\nexport class Code<T extends DiagnosticMessageFormatter = DiagnosticMessageFormatter> {\n /**\n * @internal\n */\n public static message<T extends DiagnosticMessageFormatter>({\n code,\n name,\n formatter,\n }: {\n code: number;\n formatter: T;\n name: string;\n }) {\n return new Code<T>(code, name, DiagnosticCategory.Message, formatter);\n }\n\n /**\n * @internal\n */\n public static suggestion<T extends DiagnosticMessageFormatter>({\n code,\n name,\n formatter,\n }: {\n code: number;\n formatter: T;\n name: string;\n }) {\n return new Code<T>(code, name, DiagnosticCategory.Suggestion, formatter);\n }\n\n /**\n * @internal\n */\n public static warning<T extends DiagnosticMessageFormatter>({\n code,\n name,\n formatter,\n }: {\n code: number;\n formatter: T;\n name: string;\n }) {\n return new Code<T>(code, name, DiagnosticCategory.Warning, formatter);\n }\n\n /**\n * @internal\n */\n public static error<T extends DiagnosticMessageFormatter>({\n code,\n name,\n formatter,\n }: {\n code: number;\n formatter: T;\n name: string;\n }) {\n return new Code<T>(code, name, DiagnosticCategory.Error, formatter);\n }\n\n /**\n * Get a diagnostic code by code or name.\n *\n * @param codeOrName the looked up diagnostic code or name.\n *\n * @returns the JsiiDiagnosticCode instande, if one exists, or `undefined`\n *\n * @experimental this module is under active development and the error codes\n * and names may change in the future.\n */\n public static lookup(codeOrName: string | number): Code | undefined {\n if (typeof codeOrName === 'number') {\n return this.byCode.get(codeOrName);\n }\n return this.byName.get(codeOrName);\n }\n\n /**\n * Find all codes matching a name or partial name.\n *\n * If the input contains a `/`, it must match a full diagnostic name exactly.\n * Otherwise it matches any diagnostic whose category (before `/`) or specific\n * name (after `/`) equals the input.\n */\n public static lookupByPartialName(name: string): Code[] {\n if (name.includes('/')) {\n const exact = this.byName.get(name);\n return exact ? [exact] : [];\n }\n return [...this.byName.values()].filter((c) => {\n const [category, specific] = c.name.split('/', 2);\n return category === name || specific === name;\n });\n }\n\n private static readonly byCode: Map<number, Code> = new Map();\n private static readonly byName: Map<string, Code> = new Map();\n\n // eslint-disable-next-line @typescript-eslint/explicit-member-accessibility\n readonly #defaultCategory: DiagnosticCategory;\n\n // eslint-disable-next-line @typescript-eslint/explicit-member-accessibility\n #category?: DiagnosticCategory;\n\n // eslint-disable-next-line @typescript-eslint/explicit-member-accessibility\n #formatter: T;\n\n /**\n * Registers a new diagnostic code.\n *\n * @param code the numeric code for the diagnostic\n * @param name the symbolic name for the diagnostic\n * @param defaultCategory the default category this diagnostic ranks in\n * @param formatter a message formatter for easy creation of diagnostics\n */\n private constructor(\n public readonly code: number,\n public readonly name: string,\n defaultCategory: DiagnosticCategory,\n formatter: T,\n ) {\n this.#defaultCategory = defaultCategory;\n this.#formatter = formatter;\n\n if (code in Code.byCode) {\n throw new Error(`Attempted to create two instances of ${this.constructor.name} with code ${code}`);\n }\n if (name in Code.byName) {\n throw new Error(`Attempted to create two instances of ${this.constructor.name} with name ${name}`);\n }\n Code.byCode.set(code, this);\n Code.byName.set(name, this);\n }\n\n /**\n * Determines whether this diagnostic is a compilation error. Diagnostics\n * where this is `true` cannot have their `category` overridden to a lower\n * category.\n */\n public get isError(): boolean {\n return this.#defaultCategory === DiagnosticCategory.Error;\n }\n\n /**\n * The diagnostic category this particular code is filed as.\n */\n public get category(): DiagnosticCategory {\n return this.#category ?? this.#defaultCategory;\n }\n\n /**\n * Update the diagnostic category for this particular code. If `isError` is\n * `true`, attempting to set anything other than `DiagnosticCategory.Error`\n * will result in an error being throw.\n *\n * @param newValue the new diagnostic category to be used.\n */\n public set category(newValue: DiagnosticCategory) {\n if (this.isError && newValue !== DiagnosticCategory.Error) {\n throw new Error(`Illegal attempt to override category of error ${this.code} to ${DiagnosticCategory[newValue]}`);\n }\n this.#category = newValue;\n }\n\n /**\n * Creates a new `JsiiDiagnostic` message without any source code location\n * data.\n *\n * @param args the arguments to the message formatter.\n *\n * @deprecated It is preferred to specify a source code location for problem\n * markers. Prefer the use of `create` while providing a value\n * for the `location` parameter whenever possible.\n */\n public createDetached(...args: Parameters<T>): JsiiDiagnostic {\n return new JsiiDiagnostic(this, this.#formatter(...args));\n }\n\n /**\n * Creates a new `JsiiDiagnostic` message with source code location denoted\n * by the provided `location` node.\n *\n * @param location the source code location attachment of the message.\n * @param args the arguments to the message formatter.\n */\n public create(location: DiagnosticLocation | undefined, ...args: Parameters<T>): JsiiDiagnostic {\n return new JsiiDiagnostic(this, this.#formatter(...args), location);\n }\n}\n\n/**\n * A jsii-specific diagnostic entry.\n */\n/** A source range a diagnostic points at. */\nexport interface DiagnosticLocation {\n readonly file: DiagnosticSourceFile;\n readonly start: number;\n readonly length: number;\n}\n\n/**\n * Whether `fileName` names a TypeScript standard library declaration file,\n * that is `.../typescript/lib/lib.<name>.d.ts`.\n *\n * This is a string check rather than a regular expression. An unanchored\n * pattern with `.+` before a fixed suffix backtracks polynomially on crafted\n * paths.\n */\nfunction isTypeScriptStdLibFile(fileName: string): boolean {\n const normalized = fileName.replace(/\\\\/g, '/');\n const slash = normalized.lastIndexOf('/');\n if (slash < 0) {\n return false;\n }\n const directory = normalized.slice(0, slash);\n const baseName = normalized.slice(slash + 1);\n // \"lib.\" + at least one character + \".d.ts\"\n return (\n directory.endsWith('/typescript/lib') &&\n baseName.startsWith('lib.') &&\n baseName.endsWith('.d.ts') &&\n baseName.length >= 'lib.x.d.ts'.length\n );\n}\n\nexport class JsiiDiagnostic implements Diagnostic {\n //////////////////////////////////////////////////////////////////////////////\n // 0001 => 0999 -- PACKAGE METADATA PROBLEMS\n\n public static readonly JSII_0001_PKG_MISSING_DESCRIPTION = Code.suggestion({\n code: 1,\n formatter: () => 'A \"description\" field should be specified in \"package.json\"',\n name: 'metadata/package-json-missing-description',\n });\n\n public static readonly JSII_0002_PKG_MISSING_HOMEPAGE = Code.suggestion({\n code: 2,\n formatter: () => 'A \"homepage\" field should be specified in \"package.json\"',\n name: 'metadata/package-json-missing-homepage',\n });\n\n public static readonly JSII_0003_MISSING_README = Code.warning({\n code: 3,\n formatter: () => 'There is no \"README.md\" file. It is required in order to generate valid PyPI (Python) packages.',\n name: 'metadata/missing-readme',\n });\n\n public static readonly JSII_0004_COULD_NOT_FIND_ENTRYPOINT = Code.error({\n code: 4,\n formatter: (mainFile: string) => `Could not find \"main\" file: ${mainFile}`,\n name: 'metadata/could-not-find-entrypoint',\n });\n\n public static readonly JSII_0005_MISSING_PEER_DEPENDENCY = Code.warning({\n code: 5,\n formatter: (assm: string, reference: string) =>\n `The type \"${reference}\" is exposed in the public API of this module. ` +\n `Therefore, the module \"${assm}\" must also be defined under \"peerDependencies\". ` +\n 'This will be auto-corrected unless --no-fix-peer-dependencies was specified.',\n name: 'metadata/missing-peer-dependency',\n });\n\n // NOTE: currently not possible to change the severity of this code,\n // as it's being emitted before the overrides have been loaded\n public static readonly JSII_0006_MISSING_DEV_DEPENDENCY = Code.warning({\n code: 6,\n formatter: (dependencyName: string, peerRange: string, minVersion: string, actual: string) =>\n `A \"peerDependency\" on \"${dependencyName}\" at \"${peerRange}\" means you ` +\n `should take a \"devDependency\" on \"${dependencyName}\" at \"${minVersion}\" ` +\n `(found ${JSON.stringify(actual)})`,\n name: 'metadata/missing-dev-dependency',\n });\n\n public static readonly JSII_0007_MISSING_WARNINGS_EXPORT = Code.error({\n code: 7,\n formatter: () =>\n 'If you are compiling with --add-deprecation-warnings and your package.json ' +\n `declares subpath exports, you must include { \"./.warnings.jsii.js\": \"./.warnings.jsii.js\" } ` +\n 'in the set of exports.',\n name: 'metadata/missing-warnings-export',\n });\n\n //////////////////////////////////////////////////////////////////////////////\n // 1000 => 1999 -- TYPESCRIPT LANGUAGE RESTRICTIONS\n\n public static readonly JSII_1000_NO_CONST_ENUM = Code.error({\n code: 1000,\n formatter: () => 'Exported \"const enum\" declarations are not allowed',\n name: 'typescript-restrictions/no-const-enum',\n });\n\n public static readonly JSII_1001_TYPE_HAS_NO_SYMBOL = Code.error({\n code: 1001,\n formatter: () => 'Non-primitive types without a symbol cannot be processed.',\n name: 'typescript-restrictions/type-has-no-symbol',\n });\n\n public static readonly JSII_1002_UNSPECIFIED_PROMISE = Code.error({\n code: 1002,\n formatter: () => 'Un-specified promise type. Specify it using \"Promise<T>\"',\n name: 'typescript-restrictions/unspecified-promise',\n });\n\n public static readonly JSII_1003_UNSUPPORTED_TYPE = Code.error({\n code: 1003,\n formatter: (messageText) => messageText,\n name: 'typescript-restrictions/unsupported-type',\n });\n\n public static readonly JSII_1004_DUPLICATE_ENUM_VALUE = Code.error({\n code: 1004,\n formatter: (enumValue: string, enumMemberNames: string[]) =>\n `Value ${enumValue} is used for multiple enum values: ${enumMemberNames.join(', ')}`,\n name: 'typescript-restrictions/duplicate-enum-value',\n });\n\n public static readonly JSII_1005_SEPARATE_WRITE_TYPE = Code.error({\n code: 1005,\n formatter: () => 'Visible property signatures cannot use a separate write type. Use the same type as the getter.',\n name: 'typescript-restrictions/separate-write-type',\n });\n\n public static readonly JSII_1006_GENERIC_TYPE = Code.error({\n code: 1006,\n formatter: () => 'Generic types are not supported because semantics are not uniform in target languages.',\n name: 'typescript-restriction/generic-type',\n });\n\n public static readonly JSII_1007_NEVER_TYPE = Code.error({\n code: 1007,\n formatter: () => 'The \"never\" type is not allowed because it cannot be represented in target languages.',\n name: 'typescript-restriction/no-never-type',\n });\n\n public static readonly JSII_1008_ONLY_INTERFACE_INTERSECTION = Code.error({\n code: 1008,\n formatter: (type: string) => `Found non-interface type in type intersection: ${type}`,\n name: 'typescript-restriction/only-interface-intersection',\n });\n\n public static readonly JSII_1009_INTERSECTION_ONLY_INPUT = Code.error({\n code: 1009,\n formatter: (location: string) => `Intersection types may only be used as inputs, but ${location} is used as output`,\n name: 'typescript-restriction/intersection-only-input',\n });\n\n public static readonly JSII_1010_INTERSECTION_NOT_IN_CTOR = Code.error({\n code: 1010,\n formatter: () => `Intersection types cannot be used as constructor arguments`,\n name: 'typescript-restriction/intersection-no-ctor',\n });\n\n public static readonly JSII_1011_INTERSECTION_MEMBER_DIFFERENT = Code.error({\n code: 1011,\n formatter: (member: string, type1: string, reason1: string, type2: string, reason2: string) =>\n `Member ${member} is different between types in a type intersection: ${type1} (${reason1}) and ${type2} (${reason2})`,\n name: 'typescript-restriction/intersection-member-different',\n });\n\n public static readonly JSII_1012_ONLY_CONST_ENUM_MEMBERS = Code.error({\n code: 1012,\n formatter: () => 'Only constant enum members are allowed',\n name: 'typescript-restrictions/only-const-enum-members',\n });\n\n public static readonly JSII_1999_UNSUPPORTED = Code.error({\n code: 1999,\n formatter: ({\n what,\n alternative,\n suggestInternal,\n }: {\n what: string;\n alternative?: string;\n suggestInternal?: boolean;\n }) =>\n `${what} are not supported in jsii APIs.${alternative ? ` Consider using ${alternative} instead.` : ''}${\n suggestInternal\n ? ` This declaration must${alternative ? ' otherwise' : ''} be marked \"@internal\" or \"@jsii ignore\".`\n : ''\n }`,\n name: 'typescript-restrictions/unsupported',\n });\n\n //////////////////////////////////////////////////////////////////////////////\n // 2000 => 2999 -- INCORRECT USE OF THE @jsii DIRECTIVE\n public static readonly JSII_2000_MISSING_DIRECTIVE_ARGUMENT = Code.warning({\n code: 2000,\n formatter: () =>\n 'Missing argument to @jsii directive. Refer to the jsii compiler documentation for more information.',\n name: 'jsii-directive/missing-argument',\n });\n\n public static readonly JSII_2100_STRUCT_ON_NON_INTERFACE = Code.warning({\n code: 2100,\n formatter: () => 'The \"@jsii struct\" directive is only applicable to interface declarations.',\n name: 'jsii-directive/struct-on-non-interface',\n });\n\n public static readonly JSII_2999_UNKNOWN_DIRECTIVE = Code.warning({\n code: 2999,\n formatter: (text: string) =>\n `Unknown @jsii directive: ${JSON.stringify(\n text,\n )}. Refer to the jsii compiler documentation for more information.`,\n name: 'jsii-directive/unknown',\n });\n\n //////////////////////////////////////////////////////////////////////////////\n // 3000 => 3999 -- TYPE MODEL COHERENCE\n\n public static readonly JSII_3000_EXPORTED_API_USES_HIDDEN_TYPE = Code.error({\n code: 3000,\n formatter: (badFqn) => `Exported APIs cannot use un-exported type \"${badFqn}\"`,\n name: 'type-model/exported-api-cannot-use-unexported-type',\n });\n\n public static readonly JSII_3001_EXPOSED_INTERNAL_TYPE = Code.error({\n code: 3001,\n formatter: (symbolName: string, isThisType: boolean, typeUse: string) =>\n `Type ${\n isThisType ? `\"this\" (aka: \"${symbolName}\")` : `\"${symbolName}\"`\n } cannot be used as the ${typeUse} because it is private or @internal`,\n name: 'type-model/use-of-internal-type',\n });\n\n public static readonly JSII_3002_USE_OF_UNEXPORTED_FOREIGN_TYPE = Code.error({\n code: 3002,\n formatter: (fqn: string, typeUse: string, pkg: { readonly name: string }) =>\n `Type \"${fqn}\" cannot be used as a ${typeUse} because it is not exported from ${pkg.name}`,\n name: 'type-model/unexported-foreign-type',\n });\n\n public static readonly JSII_3003_SYMBOL_IS_EXPORTED_TWICE = Code.error({\n code: 3003,\n formatter: (ns1: string, ns2: string) => `Symbol is exported under two distinct submodules: ${ns1} and ${ns2}`,\n name: 'type-model/symbol-is-exported-twice',\n });\n\n public static readonly JSII_3004_INVALID_SUPERTYPE = Code.error({\n code: 3004,\n formatter: (clauseType: string, badDeclarationKind: string) =>\n `Illegal ${clauseType} clause for an exported API: ${badDeclarationKind}`,\n name: 'type-model/invalid-supertype',\n });\n\n public static readonly JSII_3005_TYPE_USED_AS_INTERFACE = Code.error({\n code: 3005,\n formatter: (badType: spec.TypeReference) =>\n `Type \"${spec.describeTypeReference(badType)}\" cannot be used as an interface`,\n name: 'type-model/type-used-as-interface',\n });\n\n public static readonly JSII_3006_TYPE_USED_AS_CLASS = Code.error({\n code: 3006,\n formatter: (badType: spec.TypeReference) =>\n `Type \"${spec.describeTypeReference(badType)}\" cannot be used as a class`,\n name: 'type-model/type-used-as-class',\n });\n\n public static readonly JSII_3007_ILLEGAL_STRUCT_EXTENSION = Code.error({\n code: 3007,\n formatter: (offender: spec.Type, struct: spec.InterfaceType) =>\n `Attempt to extend or implement struct \"${struct.fqn}\" from \"${offender.fqn}\"`,\n name: 'type-model/illegal-struct-extension',\n });\n\n public static readonly JSII_3008_STRUCT_PROPS_MUST_BE_READONLY = Code.error({\n code: 3008,\n formatter: (propName: string, struct: spec.InterfaceType) =>\n `The \"${propName}\" property of struct \"${struct.fqn}\" must be \"readonly\". Rename \"${struct.fqn}\" to \"I${struct.name}\" if it is meant to be a behavioral interface.`,\n name: 'type-model/struct-props-must-be-readonly',\n });\n\n public static readonly JSII_3009_OPTIONAL_PARAMETER_BEFORE_REQUIRED = Code.error({\n code: 3009,\n formatter: (param: spec.Parameter, nextParam: spec.Parameter) =>\n `Parameter \"${param.name}\" cannot be optional, as it precedes required parameter \"${nextParam.name}\"`,\n name: 'type-model/optional-parameter-before-required',\n });\n\n public static readonly JSII_3999_INCOHERENT_TYPE_MODEL = Code.error({\n code: 3999,\n formatter: (messageText) => messageText,\n name: 'type-model/incoherent-type-model',\n });\n\n //////////////////////////////////////////////////////////////////////////////\n // 4000 => 4999 -- TYPESCRIPT & JSII CONFIG ERRORS\n\n public static readonly JSII_4000_FAILED_TSCONFIG_VALIDATION = Code.error({\n code: 4000,\n formatter: (config: string, ruleSet: string, violations: Array<Violation>) => {\n return `Typescript compiler options in \"${config}\" are not passing validation against rule set \"${ruleSet}\", found the following rule violations:\\n${violations\n .map((v) => ` - ${v.field}: ${v.message}`)\n .join('\\n')}`;\n },\n name: 'typescript-config/invalid-tsconfig',\n });\n\n public static readonly JSII_4009_DISABLED_TSCONFIG_VALIDATION = Code.warning({\n code: 4009,\n formatter: (config: string) =>\n `Validation of typescript config \"${config}\" is disabled. This is intended for experimental setups only. Compilation might fail or produce incompatible artifacts.`,\n name: 'typescript-config/disabled-tsconfig-validation',\n });\n\n public static readonly JSII_4010_SUBMODULE_NAMESPACE_CONFLICT = Code.warning({\n code: 4010,\n formatter: (language: string, namespace: string, modules: string[]) =>\n `Multiple modules emit to the same ${language} namespace \"${namespace}\": ${modules.join(', ')}`,\n name: 'jsii-config/submodule-conflict',\n });\n\n //////////////////////////////////////////////////////////////////////////////\n // 5000 => 5999 -- LANGUAGE COMPATIBILITY ERRORS\n\n public static readonly JSII_5000_JAVA_GETTERS = Code.error({\n code: 5000,\n formatter: (badName: string, typeName: string) =>\n `Methods and properties cannot have names like \"getXxx\": those conflict with Java property getters. Rename \"${typeName}.${badName}\"`,\n name: 'language-compatibility/potential-java-getter-conflict',\n });\n\n public static readonly JSII_5001_JAVA_SETTERS = Code.error({\n code: 5001,\n formatter: (badName: string, typeName: string) =>\n `Methods and properties cannot have names like \"setXxx\": those conflict with Java property setters. Rename \"${typeName}.${badName}\"`,\n name: 'language-compatibility/potential-java-setter-conflict',\n });\n\n public static readonly JSII_5002_OVERRIDE_CHANGES_VISIBILITY = Code.error({\n code: 5002,\n formatter: (\n newElement: string,\n action: string,\n newValue: 'protected' | 'public',\n oldValue: 'protected' | 'public',\n ) => `\"${newElement}\" changes visibility to ${newValue} when ${action}. Change it to ${oldValue}`,\n name: 'language-compatibility/override-changes-visibility',\n });\n\n public static readonly JSII_5003_OVERRIDE_CHANGES_RETURN_TYPE = Code.error({\n code: 5003,\n formatter: (newElement: string, action: string, newValue: string, oldValue: string) =>\n `\"${newElement}\" changes the return type to \"${newValue}\" when ${action}. Change it to \"${oldValue}\"`,\n name: 'language-compatibility/override-changes-return-type',\n });\n\n public static readonly JSII_5004_OVERRIDE_CHANGES_PROP_TYPE = Code.error({\n code: 5004,\n formatter: (newElement: string, action: string, newType: spec.TypeReference, oldType: spec.TypeReference) =>\n `\"${newElement}\" changes the property type to \"${spec.describeTypeReference(\n newType,\n )}\" when ${action}. Change it to \"${spec.describeTypeReference(oldType)}\"`,\n name: 'language-compatibility/override-changes-property-type',\n });\n\n public static readonly JSII_5005_OVERRIDE_CHANGES_PARAM_COUNT = Code.error({\n code: 5005,\n formatter: (newElement: string, action: string, newCount: number, oldCount: number) =>\n `\"${newElement}\" has ${newCount} parameters when ${action}. It should accept ${oldCount} parameters`,\n name: 'language-compatibility/override-changes-param-count',\n });\n\n public static readonly JSII_5006_OVERRIDE_CHANGES_PARAM_TYPE = Code.error({\n code: 5006,\n formatter: (newElement: string, action: string, newParam: spec.Parameter, oldParam: spec.Parameter) =>\n `\"${newElement}\" changes the type of parameter \"${newParam.name}\" to ${spec.describeTypeReference(\n newParam.type,\n )} when ${action}. Change it to ${spec.describeTypeReference(oldParam.type)}`,\n name: 'language-compatibility/override-changes-param-type',\n });\n\n public static readonly JSII_5007_OVERRIDE_CHANGES_VARIADIC = Code.error({\n code: 5007,\n formatter: (newElement: string, action: string, newVariadic = false, oldVariadic = false) =>\n `\"${newElement}\" turns ${newVariadic ? 'variadic' : 'non variadic'} when ${action}. Make it ${\n oldVariadic ? 'variadic' : 'non-variadic'\n }`,\n name: 'language-compatibility/override-changes-variadic',\n });\n\n public static readonly JSII_5008_OVERRIDE_CHANGES_PARAM_OPTIONAL = Code.error({\n code: 5008,\n formatter: (newElement: string, action: string, newParam: spec.Parameter, oldParam: spec.Parameter) =>\n `\"${newElement}\" turns parameter \"${newParam.name}\" ${\n newParam.optional ? 'optional' : 'required'\n } when ${action}. Make it ${oldParam.optional ? 'optional' : 'required'}`,\n name: 'language-compatibility/override-changes-param-optional',\n });\n\n public static readonly JSII_5009_OVERRIDE_CHANGES_PROP_OPTIONAL = Code.error({\n code: 5009,\n formatter: (newElement: string, action: string, newOptional = false, oldOptional = false) =>\n `\"${newElement}\" turns ${newOptional ? 'optional' : 'required'} when ${action}. Make it ${\n oldOptional ? 'optional' : 'required'\n }`,\n name: 'language-compatibility/override-changes-prop-optional',\n });\n\n public static readonly JSII_5010_OVERRIDE_CHANGES_MUTABILITY = Code.error({\n code: 5010,\n formatter: (newElement: string, action: string, newReadonly = false, oldReadonly = false) =>\n `\"${newElement}\" turns ${newReadonly ? 'readonly' : 'mutable'} when ${action}. Make it ${\n oldReadonly ? 'readonly' : 'mutable'\n }`,\n name: 'language-compatibility/override-changes-mutability',\n });\n\n public static readonly JSII_5011_SUBMODULE_NAME_CONFLICT = Code.error({\n code: 5011,\n formatter: (submoduleName: string, typeName: string, reserved: readonly string[]) =>\n `Submodule \"${submoduleName}\" conflicts with \"${typeName}, as different languages could represent it as: ${reserved\n .map((x) => `\"${x}\"`)\n .join(', ')}\"`,\n name: 'language-compatibility/submodule-name-conflicts',\n });\n\n public static readonly JSII_5012_NAMESPACE_IN_TYPE = Code.error({\n code: 5012,\n formatter: (typeName: string, namespaceName: string) =>\n `All entities nested under a type (e.g: \"${typeName}\") must be concrete types, but \"${namespaceName}\" is a namespace. This structure cannot be supported in all languages (e.g: Java)`,\n name: 'language-compatibility/namespace-in-type',\n });\n\n public static readonly JSII_5013_STATIC_INSTANCE_CONFLICT = Code.error({\n code: 5013,\n formatter: (member: string, type: spec.ClassType) =>\n `Member \"${member}\" of class \"${type.fqn}\" has both a static and an instance delcaration`,\n name: 'language-compatibility/static-instance-conflict',\n });\n\n public static readonly JSII_5014_INHERITED_STATIC_CONFLICT = Code.error({\n code: 5014,\n formatter: (\n member: spec.Method | spec.Property,\n type: spec.ClassType,\n baseMember: spec.Method | spec.Property,\n baseType: spec.ClassType,\n ) =>\n `${member.static ? 'Static' : 'Instance'} member \"${member.name}\" of class \"${type.fqn}\" conflicts with ${\n baseMember.static ? 'static' : 'instance'\n } member in ancestor \"${baseType.fqn}\"`,\n name: 'language-compatibility/inherited-static-conflict',\n });\n\n public static readonly JSII_5015_REDECLARED_INTERFACE_MEMBER = Code.error({\n code: 5015,\n formatter: (memberName: string, iface: spec.InterfaceType) =>\n `Interface \"${iface.fqn}\" re-declares member \"${memberName}\" with a different type or signature. Re-declared members must match the inherited declaration exactly, as C# interfaces cannot narrow inherited members.`,\n name: 'language-compatibility/redeclared-interface-member',\n });\n\n public static readonly JSII_5016_PROHIBITED_MEMBER_NAME = Code.error({\n code: 5016,\n formatter: (badName: string) =>\n `Members cannot be named \"${badName}\" as it conflicts with synthetic declarations in some languages.`,\n name: 'language-compatibility/prohibited-member-name',\n });\n\n public static readonly JSII_5017_POSITIONAL_KEYWORD_CONFLICT = Code.error({\n code: 5017,\n formatter: (badName: string) =>\n `Parameter name \"${badName}\" is also the name of a property in a struct parameter. Rename the positional parameter.`,\n name: 'language-compatibility/positional-keyword-conflict',\n });\n\n public static readonly JSII_5018_RESERVED_WORD = Code.warning({\n code: 5018,\n formatter: (badName: string, languages: readonly string[]) =>\n `\"${badName}\" is a reserved word in ${languages.join(\n ', ',\n )}. Using this name may cause problems when generating language bindings. Consider a different name.`,\n name: 'language-compatibility/reserved-word',\n });\n\n public static readonly JSII_5019_MEMBER_TYPE_NAME_CONFLICT = Code.warning({\n code: 5019,\n formatter: (memberKind: 'method' | 'property', memberName: string, declaringType: spec.Type) =>\n `The ${memberKind} name \"${memberName}\" conflicts with the declaring ${declaringType.kind} \"${declaringType.name}\". This will result in renaming the ${declaringType.kind} to \"_${declaringType.name}\" in C#. Consider renaming \"${memberName}\".`,\n name: 'language-compatibility/member-name-conflicts-with-type-name',\n });\n\n public static readonly JSII_5020_STATIC_MEMBER_CONFLICTS_WITH_NESTED_TYPE = Code.error({\n code: 5020,\n formatter: (\n nestingType: spec.Type,\n staticMember: spec.Property | spec.Method | spec.EnumMember,\n nestedType: spec.Type,\n ) =>\n `The static member \"${nestingType.name}.${staticMember.name}\" has the same PascalCased representation as nested type \"${nestingType.name}.${nestedType.name}\". This would result in invalid code in Go.`,\n name: 'language-compatibility/static-member-name-conflicts-with-nested-type',\n });\n\n public static readonly JSII_5021_ABSTRACT_CLASS_MISSING_PROP_IMPL = Code.error({\n code: 5021,\n formatter: (intf: spec.InterfaceType, cls: spec.ClassType, prop: string) =>\n `A declaration of \"${intf.name}.${prop}\" is missing on class \"${cls.name}\". Declare the property as \"public abstract\" if you want to defer it to subclasses.`,\n name: 'language-compatibility/abstract-class-missing-prop-impl',\n });\n\n //////////////////////////////////////////////////////////////////////////////\n // 6000 => 6999 -- RESERVED\n\n //////////////////////////////////////////////////////////////////////////////\n // 7000 => 7999 -- DOCUMENTATION ERRORS\n\n public static readonly JSII_7000_NON_EXISTENT_PARAMETER = Code.warning({\n code: 7000,\n formatter: (method: spec.Method, param: string) =>\n `Documentation for method \"${method.name}\" refers to non-existent @param \"${param}\"`,\n name: 'documentation/non-existent-parameter',\n });\n\n public static readonly JSII_7001_ILLEGAL_HINT = Code.error({\n code: 7001,\n formatter: (hint: string, ...valid: readonly string[]) =>\n `Illegal use of \"@${hint}\" hint. It is only valid on ${valid.join(', ')}.`,\n name: 'documentation/illegal-hint',\n });\n\n public static readonly JSII_7999_DOCUMENTATION_ERROR = Code.error({\n code: 7999,\n formatter: (messageText) => messageText,\n name: 'documentation/documentation-error',\n });\n\n //////////////////////////////////////////////////////////////////////////////\n // 8000 => 8999 -- JSII STYLE ENFORCEMENT\n\n public static readonly JSII_8000_PASCAL_CASED_TYPE_NAMES = Code.error({\n code: 8000,\n formatter: (badName: string, expectedName: string = pascal(badName)) =>\n `Type names must be PascalCased. Rename \"${badName}\" to \"${expectedName}\"`,\n name: 'code-style/type-names-must-use-pascal-case',\n });\n\n public static readonly JSII_8001_ALL_CAPS_ENUM_MEMBERS = Code.error({\n code: 8001,\n formatter: (badName: string, typeName: string) =>\n `Enum members must be ALL_CAPS. Rename \"${typeName}.${badName}\" to \"${constant(badName)}\"`,\n name: 'code-style/enum-members-must-use-all-caps',\n });\n\n public static readonly JSII_8002_CAMEL_CASED_MEMBERS = Code.error({\n code: 8002,\n formatter: (badName: string, typeName: string) =>\n `Method and property (unless they are static readonly) names must use camelCase. Rename \"${typeName}.${badName}\" to \"${camel(\n badName,\n )}\"`,\n name: 'code-style/member-names-must-use-camel-case',\n });\n\n public static readonly JSII_8003_STATIC_CONST_CASING = Code.error({\n code: 8003,\n formatter: (badName: string, typeName: string) =>\n `Static constant names must use ALL_CAPS, PascalCase, or camelCase. Rename \"${typeName}.${badName}\" to \"${constant(\n badName,\n )}\"`,\n name: 'code-style/static-readonly-property-casing',\n });\n\n public static readonly JSII_8004_SUBMOULE_NAME_CASING = Code.error({\n code: 8004,\n formatter: (badName: string) =>\n `Submodule namespaces must be camelCased or snake_cased. Rename \"${badName}\" to ${camel(badName)}`,\n name: 'code-style/submodule-name-casing',\n });\n\n public static readonly JSII_8005_INTERNAL_UNDERSCORE = Code.error({\n code: 8005,\n formatter: (badName: string) =>\n `Members marked with @internal must have a name starting with \"_\". Rename \"${badName}\" to \"_${badName}\"`,\n name: 'code-style/internal-members-underscore-prefix',\n });\n\n public static readonly JSII_8006_UNDERSCORE_INTERNAL = Code.error({\n code: 8006,\n formatter: (badName: string) =>\n `Members with a name starting with \"_\" (e.g: \"${badName}\") must be marked @internal`,\n name: 'code-style/underscored-members-must-be-internal',\n });\n\n public static readonly JSII_8007_BEHAVIORAL_INTERFACE_NAME = Code.error({\n code: 8007,\n formatter: (badName: string) => `Interface contains behavior. Rename \"${badName}\" to \"I${badName}\"`,\n name: 'code-style/behavioral-interface-name',\n });\n\n //////////////////////////////////////////////////////////////////////////////\n // 9000 => 9999 -- SURPRISING ERRORS & INFORMATIONAL MESSAGES\n\n public static readonly JSII_9000_UNKNOWN_MODULE = Code.error({\n code: 9000,\n formatter: (moduleName) =>\n `Encountered use of module that is not declared in \"dependencies\" or \"peerDependencies\": \"${moduleName}\"`,\n name: 'miscellaneous/unknown-module',\n });\n\n public static readonly JSII_9001_TYPE_NOT_FOUND = Code.error({\n code: 9001,\n formatter: (typeRef: spec.NamedTypeReference) => `Type not found in the corresponding assembly: \"${typeRef.fqn}\"`,\n name: 'miscellaneous/type-not-found',\n });\n\n public static readonly JSII_9002_UNRESOLVEABLE_TYPE = Code.error({\n code: 9002,\n formatter: (reference: string) =>\n `Type \"${reference}\" is part of the public API but not exported (@internal or not exported from the package.json \"main\" file). Either export it or add @internal explicitly if you want this to be a hidden base class.`,\n name: 'miscellaneous/unresolveable-type',\n });\n\n public static readonly JSII_9003_UNRESOLVEABLE_MODULE = Code.error({\n code: 9003,\n formatter: (location: string) => `Unable to resolve module location \"${location}\"`,\n name: 'miscellaneous/unresolveable-module',\n });\n\n public static readonly JSII_9004_UNABLE_TO_COMPUTE_SIGNATURE = Code.error({\n code: 9004,\n formatter: (methodName: string, type: spec.Type) =>\n `Unable to compute signature for method \"${methodName}\" of \"${type.fqn}\"`,\n name: 'miscellaneous/unable-to-compute-signature',\n });\n\n public static readonly JSII_9996_UNNECESSARY_TOKEN = Code.message({\n code: 9996,\n formatter: () => 'Unnecessary token, consider removing it',\n name: 'miscellaneous/unnecessary-token',\n });\n\n public static readonly JSII_9997_UNKNOWN_ERROR = Code.error({\n code: 9997,\n formatter: (error: Error) => `Unknown error: ${error.message} -- ${error.stack}`,\n name: 'miscellaneous/unknown-error',\n });\n\n public static readonly JSII_9998_UNSUPPORTED_NODE = Code.message({\n code: 9998,\n formatter: (kindOrMessage: string) =>\n /^[A-Z]\\w*$/.test(kindOrMessage)\n ? `Unsupported ${kindOrMessage} node. This declaration will not be accessible from other languages.`\n : kindOrMessage,\n name: 'miscellaneous/unsupported-node',\n });\n\n //////////////////////////////////////////////////////////////////////////////\n\n /**\n * Determines whether a `Diagnostic` instance is a `JsiiDiagnostic` or not.\n * @param diag\n */\n public static isJsiiDiagnostic(diag: Diagnostic): diag is JsiiDiagnostic {\n return (diag as unknown as JsiiDiagnostic).domain === JsiiDiagnostic.DOMAIN;\n }\n\n //////////////////////////////////////////////////////////////////////////////\n\n private static readonly JSII_9999_RELATED_INFO = Code.suggestion({\n code: 9999,\n formatter: (messageText) => messageText,\n name: 'miscellaneous/related-info',\n });\n\n //////////////////////////////////////////////////////////////////////////////\n\n /**\n * This symbol unequivocally identifies the `JsiiDiagnostic` domain.\n */\n private static readonly DOMAIN = Symbol('jsii');\n\n private readonly domain = JsiiDiagnostic.DOMAIN;\n\n public readonly category: DiagnosticCategory;\n public readonly code: number = JSII_DIAGNOSTICS_CODE;\n public readonly jsiiCode: number;\n public readonly messageText: string;\n\n public readonly file: DiagnosticSourceFile | undefined;\n public readonly start: number | undefined;\n public readonly length: number | undefined;\n\n public readonly relatedInformation = new Array<JsiiDiagnostic>();\n\n // eslint-disable-next-line @typescript-eslint/explicit-member-accessibility\n #formatted?: string;\n\n /**\n * Creates a new `JsiiDiagnostic` with the provided properties.\n *\n * @internal\n */\n public constructor(code: Code, messageText: string, location?: DiagnosticLocation) {\n this.category = code.category;\n this.jsiiCode = code.code;\n this.messageText = messageText;\n\n if (location != null) {\n this.file = location.file;\n this.start = location.start;\n this.length = location.length;\n }\n }\n\n public addRelatedInformation(location: DiagnosticLocation, message: JsiiDiagnostic['messageText']): this {\n // Don't relate info into the TypeScript standard library\n if (!isTypeScriptStdLibFile(location.file.fileName)) {\n this.relatedInformation.push(JsiiDiagnostic.JSII_9999_RELATED_INFO.create(location, message));\n }\n // Clearing out #formatted, as this would no longer be the correct string.\n this.#formatted = undefined;\n return this;\n }\n\n /**\n * Links the provided `node` with the specified `message` as related to the\n * current diagnostic, unless `node` is undefined.\n *\n * @param node the node where the message should be attached, if any.\n * @param message the message to be attached to the diagnostic entry.\n *\n * @returns `this`\n */\n public addRelatedInformationIf(node: DiagnosticLocation | undefined, message: JsiiDiagnostic['messageText']): this {\n if (node != null) {\n return this.addRelatedInformation(node, message);\n } else {\n return this;\n }\n }\n\n /**\n * Adds related information to this `JsiiDiagnostic` instance if the provided\n * `node` is defined.\n *\n * @param node the node to bind as related information, or `undefined`.\n * @param message the message to attach to the related information.\n *\n * @returns `this`\n */\n public maybeAddRelatedInformation(\n node: DiagnosticLocation | undefined,\n message: JsiiDiagnostic['messageText'],\n ): this {\n if (node == null) {\n return this;\n }\n this.relatedInformation.push(JsiiDiagnostic.JSII_9999_RELATED_INFO.create(node, message));\n // Clearing out #formatted, as this would no longer be the correct string.\n this.#formatted = undefined;\n return this;\n }\n\n /**\n * Formats this diagnostic with color and context if possible, and returns it.\n * The formatted diagnostic is cached, so that it can be re-used. This is\n * useful for diagnostic messages involving trivia -- as the trivia may have\n * been obliterated from the `SourceFile` by the `TsCommentReplacer`, which\n * makes the error messages really confusing.\n */\n public format(projectRoot: string): string {\n if (this.#formatted == null) {\n this.#formatted = _formatDiagnostic(this, projectRoot);\n }\n return this.#formatted;\n }\n}\n\nexport type DiagnosticMessageFormatter = (...args: any[]) => JsiiDiagnostic['messageText'];\n\nexport function configureCategories(records: { [code: string]: DiagnosticCategory }) {\n for (const [code, category] of Object.entries(records)) {\n const diagCode = Code.lookup(diagnosticCode(code));\n if (!diagCode) {\n throw new Error(`Unrecognized diagnostic code '${code}'`);\n }\n diagCode.category = category;\n }\n}\n\nfunction diagnosticCode(str: string): string | number {\n if (str.toLowerCase().startsWith('jsii')) {\n const re = /^JSII(\\d+)$/i.exec(str);\n if (re) {\n return parseInt(re[1], 10);\n }\n throw new Error(`Invalid diagnostic code ${str}. A number must follow code that starts with 'JSII'`);\n }\n return str;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"jsii-diagnostic.js","sources":["../src/jsii-diagnostic.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAY,IAAI,uCAAmB;AACnC,+BAA+C;AAC/C,6CAAoF;AAGpF,mCAAmE;AAEnE;;;;;GAKG;AACH;IAqHoB,IAAI;IACJ,IAAI;IArHtB;;OAEG;IACI,MAAM,CAAC,OAAO,CAAuC,EAC1D,IAAI,EACJ,IAAI,EACJ,SAAS,GAKV;QACC,OAAO,IAAI,IAAI,CAAI,IAAI,EAAE,IAAI,EAAE,+BAAkB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IACxE,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,UAAU,CAAuC,EAC7D,IAAI,EACJ,IAAI,EACJ,SAAS,GAKV;QACC,OAAO,IAAI,IAAI,CAAI,IAAI,EAAE,IAAI,EAAE,+BAAkB,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;IAC3E,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,OAAO,CAAuC,EAC1D,IAAI,EACJ,IAAI,EACJ,SAAS,GAKV;QACC,OAAO,IAAI,IAAI,CAAI,IAAI,EAAE,IAAI,EAAE,+BAAkB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IACxE,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,KAAK,CAAuC,EACxD,IAAI,EACJ,IAAI,EACJ,SAAS,GAKV;QACC,OAAO,IAAI,IAAI,CAAI,IAAI,EAAE,IAAI,EAAE,+BAAkB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;IACtE,CAAC;IAED;;;;;;;;;OASG;IACI,MAAM,CAAC,MAAM,CAAC,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M,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;QACvD,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC;QACnD,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,MAAM,IAAI,KAAK,CAAC,iCAAiC,IAAI,GAAG,CAAC,CAAC;QAC5D,CAAC;QACD,QAAQ,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC/B,CAAC;AACH,CAAC;AAED,SAAS,cAAc,CAAC,GAAW;IACjC,IAAI,GAAG,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;QACzC,MAAM,EAAE,GAAG,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACpC,IAAI,EAAE,EAAE,CAAC;YACP,OAAO,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QAC7B,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,2BAA2B,GAAG,qDAAqD,CAAC,CAAC;IACvG,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["import * as spec from '@jsii/spec';\nimport { camel, constant, pascal } from 'case';\nimport { Diagnostic, DiagnosticCategory, DiagnosticSourceFile } from './diagnostic';\n\nimport { Violation } from './tsconfig/validator';\nimport { JSII_DIAGNOSTICS_CODE, _formatDiagnostic } from './utils';\n\n/**\n * Descriptors for all valid jsii diagnostic codes.\n *\n * The `category` or non-error codes can be updated, for example to treat\n * warnings as errors, or to suppress certain undesirable warnings.\n */\nexport class Code<T extends DiagnosticMessageFormatter = DiagnosticMessageFormatter> {\n /**\n * @internal\n */\n public static message<T extends DiagnosticMessageFormatter>({\n code,\n name,\n formatter,\n }: {\n code: number;\n formatter: T;\n name: string;\n }) {\n return new Code<T>(code, name, DiagnosticCategory.Message, formatter);\n }\n\n /**\n * @internal\n */\n public static suggestion<T extends DiagnosticMessageFormatter>({\n code,\n name,\n formatter,\n }: {\n code: number;\n formatter: T;\n name: string;\n }) {\n return new Code<T>(code, name, DiagnosticCategory.Suggestion, formatter);\n }\n\n /**\n * @internal\n */\n public static warning<T extends DiagnosticMessageFormatter>({\n code,\n name,\n formatter,\n }: {\n code: number;\n formatter: T;\n name: string;\n }) {\n return new Code<T>(code, name, DiagnosticCategory.Warning, formatter);\n }\n\n /**\n * @internal\n */\n public static error<T extends DiagnosticMessageFormatter>({\n code,\n name,\n formatter,\n }: {\n code: number;\n formatter: T;\n name: string;\n }) {\n return new Code<T>(code, name, DiagnosticCategory.Error, formatter);\n }\n\n /**\n * Get a diagnostic code by code or name.\n *\n * @param codeOrName the looked up diagnostic code or name.\n *\n * @returns the JsiiDiagnosticCode instande, if one exists, or `undefined`\n *\n * @experimental this module is under active development and the error codes\n * and names may change in the future.\n */\n public static lookup(codeOrName: string | number): Code | undefined {\n if (typeof codeOrName === 'number') {\n return this.byCode.get(codeOrName);\n }\n return this.byName.get(codeOrName);\n }\n\n /**\n * Find all codes matching a name or partial name.\n *\n * If the input contains a `/`, it must match a full diagnostic name exactly.\n * Otherwise it matches any diagnostic whose category (before `/`) or specific\n * name (after `/`) equals the input.\n */\n public static lookupByPartialName(name: string): Code[] {\n if (name.includes('/')) {\n const exact = this.byName.get(name);\n return exact ? [exact] : [];\n }\n return [...this.byName.values()].filter((c) => {\n const [category, specific] = c.name.split('/', 2);\n return category === name || specific === name;\n });\n }\n\n private static readonly byCode: Map<number, Code> = new Map();\n private static readonly byName: Map<string, Code> = new Map();\n\n // eslint-disable-next-line @typescript-eslint/explicit-member-accessibility\n readonly #defaultCategory: DiagnosticCategory;\n\n // eslint-disable-next-line @typescript-eslint/explicit-member-accessibility\n #category?: DiagnosticCategory;\n\n // eslint-disable-next-line @typescript-eslint/explicit-member-accessibility\n #formatter: T;\n\n /**\n * Registers a new diagnostic code.\n *\n * @param code the numeric code for the diagnostic\n * @param name the symbolic name for the diagnostic\n * @param defaultCategory the default category this diagnostic ranks in\n * @param formatter a message formatter for easy creation of diagnostics\n */\n private constructor(\n public readonly code: number,\n public readonly name: string,\n defaultCategory: DiagnosticCategory,\n formatter: T,\n ) {\n this.#defaultCategory = defaultCategory;\n this.#formatter = formatter;\n\n if (code in Code.byCode) {\n throw new Error(`Attempted to create two instances of ${this.constructor.name} with code ${code}`);\n }\n if (name in Code.byName) {\n throw new Error(`Attempted to create two instances of ${this.constructor.name} with name ${name}`);\n }\n Code.byCode.set(code, this);\n Code.byName.set(name, this);\n }\n\n /**\n * Determines whether this diagnostic is a compilation error. Diagnostics\n * where this is `true` cannot have their `category` overridden to a lower\n * category.\n */\n public get isError(): boolean {\n return this.#defaultCategory === DiagnosticCategory.Error;\n }\n\n /**\n * The diagnostic category this particular code is filed as.\n */\n public get category(): DiagnosticCategory {\n return this.#category ?? this.#defaultCategory;\n }\n\n /**\n * Update the diagnostic category for this particular code. If `isError` is\n * `true`, attempting to set anything other than `DiagnosticCategory.Error`\n * will result in an error being throw.\n *\n * @param newValue the new diagnostic category to be used.\n */\n public set category(newValue: DiagnosticCategory) {\n if (this.isError && newValue !== DiagnosticCategory.Error) {\n throw new Error(`Illegal attempt to override category of error ${this.code} to ${DiagnosticCategory[newValue]}`);\n }\n this.#category = newValue;\n }\n\n /**\n * Creates a new `JsiiDiagnostic` message without any source code location\n * data.\n *\n * @param args the arguments to the message formatter.\n *\n * @deprecated It is preferred to specify a source code location for problem\n * markers. Prefer the use of `create` while providing a value\n * for the `location` parameter whenever possible.\n */\n public createDetached(...args: Parameters<T>): JsiiDiagnostic {\n return new JsiiDiagnostic(this, this.#formatter(...args));\n }\n\n /**\n * Creates a new `JsiiDiagnostic` message with source code location denoted\n * by the provided `location` node.\n *\n * @param location the source code location attachment of the message.\n * @param args the arguments to the message formatter.\n */\n public create(location: DiagnosticLocation | undefined, ...args: Parameters<T>): JsiiDiagnostic {\n return new JsiiDiagnostic(this, this.#formatter(...args), location);\n }\n}\n\n/**\n * A jsii-specific diagnostic entry.\n */\n/** A source range a diagnostic points at. */\nexport interface DiagnosticLocation {\n readonly file: DiagnosticSourceFile;\n readonly start: number;\n readonly length: number;\n}\n\n/**\n * Whether `fileName` names a TypeScript standard library declaration file,\n * that is `.../typescript/lib/lib.<name>.d.ts`.\n *\n * This is a string check rather than a regular expression. An unanchored\n * pattern with `.+` before a fixed suffix backtracks polynomially on crafted\n * paths.\n */\nfunction isTypeScriptStdLibFile(fileName: string): boolean {\n const normalized = fileName.replace(/\\\\/g, '/');\n const slash = normalized.lastIndexOf('/');\n if (slash < 0) {\n return false;\n }\n const directory = normalized.slice(0, slash);\n const baseName = normalized.slice(slash + 1);\n // \"lib.\" + at least one character + \".d.ts\"\n return (\n directory.endsWith('/typescript/lib') &&\n baseName.startsWith('lib.') &&\n baseName.endsWith('.d.ts') &&\n baseName.length >= 'lib.x.d.ts'.length\n );\n}\n\nexport class JsiiDiagnostic implements Diagnostic {\n //////////////////////////////////////////////////////////////////////////////\n // 0001 => 0999 -- PACKAGE METADATA PROBLEMS\n\n public static readonly JSII_0001_PKG_MISSING_DESCRIPTION = Code.suggestion({\n code: 1,\n formatter: () => 'A \"description\" field should be specified in \"package.json\"',\n name: 'metadata/package-json-missing-description',\n });\n\n public static readonly JSII_0002_PKG_MISSING_HOMEPAGE = Code.suggestion({\n code: 2,\n formatter: () => 'A \"homepage\" field should be specified in \"package.json\"',\n name: 'metadata/package-json-missing-homepage',\n });\n\n public static readonly JSII_0003_MISSING_README = Code.warning({\n code: 3,\n formatter: () => 'There is no \"README.md\" file. It is required in order to generate valid PyPI (Python) packages.',\n name: 'metadata/missing-readme',\n });\n\n public static readonly JSII_0004_COULD_NOT_FIND_ENTRYPOINT = Code.error({\n code: 4,\n formatter: (mainFile: string) => `Could not find \"main\" file: ${mainFile}`,\n name: 'metadata/could-not-find-entrypoint',\n });\n\n public static readonly JSII_0005_MISSING_PEER_DEPENDENCY = Code.warning({\n code: 5,\n formatter: (assm: string, reference: string) =>\n `The type \"${reference}\" is exposed in the public API of this module. ` +\n `Therefore, the module \"${assm}\" must also be defined under \"peerDependencies\". ` +\n 'This will be auto-corrected unless --no-fix-peer-dependencies was specified.',\n name: 'metadata/missing-peer-dependency',\n });\n\n // NOTE: currently not possible to change the severity of this code,\n // as it's being emitted before the overrides have been loaded\n public static readonly JSII_0006_MISSING_DEV_DEPENDENCY = Code.warning({\n code: 6,\n formatter: (dependencyName: string, peerRange: string, minVersion: string, actual: string) =>\n `A \"peerDependency\" on \"${dependencyName}\" at \"${peerRange}\" means you ` +\n `should take a \"devDependency\" on \"${dependencyName}\" at \"${minVersion}\" ` +\n `(found ${JSON.stringify(actual)})`,\n name: 'metadata/missing-dev-dependency',\n });\n\n public static readonly JSII_0007_MISSING_WARNINGS_EXPORT = Code.error({\n code: 7,\n formatter: () =>\n 'If you are compiling with --add-deprecation-warnings and your package.json ' +\n `declares subpath exports, you must include { \"./.warnings.jsii.js\": \"./.warnings.jsii.js\" } ` +\n 'in the set of exports.',\n name: 'metadata/missing-warnings-export',\n });\n\n public static readonly JSII_0008_TYPES_OUTSIDE_OUT_DIR = Code.error({\n code: 8,\n formatter: (types: string, outDir: string, suggestion?: string) =>\n `The \"types\" entry in package.json (${JSON.stringify(types)}) is outside of the TypeScript outDir ` +\n `(${JSON.stringify(outDir)}), so the entry point cannot be found. ` +\n (suggestion != null\n ? `Set it to ${JSON.stringify(suggestion)} and update \"main\" to match.`\n : `Point \"types\" and \"main\" at the compiled files in ${JSON.stringify(outDir)}.`),\n name: 'metadata/types-outside-outdir',\n });\n\n //////////////////////////////////////////////////////////////////////////////\n // 1000 => 1999 -- TYPESCRIPT LANGUAGE RESTRICTIONS\n\n public static readonly JSII_1000_NO_CONST_ENUM = Code.error({\n code: 1000,\n formatter: () => 'Exported \"const enum\" declarations are not allowed',\n name: 'typescript-restrictions/no-const-enum',\n });\n\n public static readonly JSII_1001_TYPE_HAS_NO_SYMBOL = Code.error({\n code: 1001,\n formatter: () => 'Non-primitive types without a symbol cannot be processed.',\n name: 'typescript-restrictions/type-has-no-symbol',\n });\n\n public static readonly JSII_1002_UNSPECIFIED_PROMISE = Code.error({\n code: 1002,\n formatter: () => 'Un-specified promise type. Specify it using \"Promise<T>\"',\n name: 'typescript-restrictions/unspecified-promise',\n });\n\n public static readonly JSII_1003_UNSUPPORTED_TYPE = Code.error({\n code: 1003,\n formatter: (messageText) => messageText,\n name: 'typescript-restrictions/unsupported-type',\n });\n\n public static readonly JSII_1004_DUPLICATE_ENUM_VALUE = Code.error({\n code: 1004,\n formatter: (enumValue: string, enumMemberNames: string[]) =>\n `Value ${enumValue} is used for multiple enum values: ${enumMemberNames.join(', ')}`,\n name: 'typescript-restrictions/duplicate-enum-value',\n });\n\n public static readonly JSII_1005_SEPARATE_WRITE_TYPE = Code.error({\n code: 1005,\n formatter: () => 'Visible property signatures cannot use a separate write type. Use the same type as the getter.',\n name: 'typescript-restrictions/separate-write-type',\n });\n\n public static readonly JSII_1006_GENERIC_TYPE = Code.error({\n code: 1006,\n formatter: () => 'Generic types are not supported because semantics are not uniform in target languages.',\n name: 'typescript-restriction/generic-type',\n });\n\n public static readonly JSII_1007_NEVER_TYPE = Code.error({\n code: 1007,\n formatter: () => 'The \"never\" type is not allowed because it cannot be represented in target languages.',\n name: 'typescript-restriction/no-never-type',\n });\n\n public static readonly JSII_1008_ONLY_INTERFACE_INTERSECTION = Code.error({\n code: 1008,\n formatter: (type: string) => `Found non-interface type in type intersection: ${type}`,\n name: 'typescript-restriction/only-interface-intersection',\n });\n\n public static readonly JSII_1009_INTERSECTION_ONLY_INPUT = Code.error({\n code: 1009,\n formatter: (location: string) => `Intersection types may only be used as inputs, but ${location} is used as output`,\n name: 'typescript-restriction/intersection-only-input',\n });\n\n public static readonly JSII_1010_INTERSECTION_NOT_IN_CTOR = Code.error({\n code: 1010,\n formatter: () => `Intersection types cannot be used as constructor arguments`,\n name: 'typescript-restriction/intersection-no-ctor',\n });\n\n public static readonly JSII_1011_INTERSECTION_MEMBER_DIFFERENT = Code.error({\n code: 1011,\n formatter: (member: string, type1: string, reason1: string, type2: string, reason2: string) =>\n `Member ${member} is different between types in a type intersection: ${type1} (${reason1}) and ${type2} (${reason2})`,\n name: 'typescript-restriction/intersection-member-different',\n });\n\n public static readonly JSII_1012_ONLY_CONST_ENUM_MEMBERS = Code.error({\n code: 1012,\n formatter: () => 'Only constant enum members are allowed',\n name: 'typescript-restrictions/only-const-enum-members',\n });\n\n public static readonly JSII_1999_UNSUPPORTED = Code.error({\n code: 1999,\n formatter: ({\n what,\n alternative,\n suggestInternal,\n }: {\n what: string;\n alternative?: string;\n suggestInternal?: boolean;\n }) =>\n `${what} are not supported in jsii APIs.${alternative ? ` Consider using ${alternative} instead.` : ''}${\n suggestInternal\n ? ` This declaration must${alternative ? ' otherwise' : ''} be marked \"@internal\" or \"@jsii ignore\".`\n : ''\n }`,\n name: 'typescript-restrictions/unsupported',\n });\n\n //////////////////////////////////////////////////////////////////////////////\n // 2000 => 2999 -- INCORRECT USE OF THE @jsii DIRECTIVE\n public static readonly JSII_2000_MISSING_DIRECTIVE_ARGUMENT = Code.warning({\n code: 2000,\n formatter: () =>\n 'Missing argument to @jsii directive. Refer to the jsii compiler documentation for more information.',\n name: 'jsii-directive/missing-argument',\n });\n\n public static readonly JSII_2100_STRUCT_ON_NON_INTERFACE = Code.warning({\n code: 2100,\n formatter: () => 'The \"@jsii struct\" directive is only applicable to interface declarations.',\n name: 'jsii-directive/struct-on-non-interface',\n });\n\n public static readonly JSII_2999_UNKNOWN_DIRECTIVE = Code.warning({\n code: 2999,\n formatter: (text: string) =>\n `Unknown @jsii directive: ${JSON.stringify(\n text,\n )}. Refer to the jsii compiler documentation for more information.`,\n name: 'jsii-directive/unknown',\n });\n\n //////////////////////////////////////////////////////////////////////////////\n // 3000 => 3999 -- TYPE MODEL COHERENCE\n\n public static readonly JSII_3000_EXPORTED_API_USES_HIDDEN_TYPE = Code.error({\n code: 3000,\n formatter: (badFqn) => `Exported APIs cannot use un-exported type \"${badFqn}\"`,\n name: 'type-model/exported-api-cannot-use-unexported-type',\n });\n\n public static readonly JSII_3001_EXPOSED_INTERNAL_TYPE = Code.error({\n code: 3001,\n formatter: (symbolName: string, isThisType: boolean, typeUse: string) =>\n `Type ${\n isThisType ? `\"this\" (aka: \"${symbolName}\")` : `\"${symbolName}\"`\n } cannot be used as the ${typeUse} because it is private or @internal`,\n name: 'type-model/use-of-internal-type',\n });\n\n public static readonly JSII_3002_USE_OF_UNEXPORTED_FOREIGN_TYPE = Code.error({\n code: 3002,\n formatter: (fqn: string, typeUse: string, pkg: { readonly name: string }) =>\n `Type \"${fqn}\" cannot be used as a ${typeUse} because it is not exported from ${pkg.name}`,\n name: 'type-model/unexported-foreign-type',\n });\n\n public static readonly JSII_3003_SYMBOL_IS_EXPORTED_TWICE = Code.error({\n code: 3003,\n formatter: (ns1: string, ns2: string) => `Symbol is exported under two distinct submodules: ${ns1} and ${ns2}`,\n name: 'type-model/symbol-is-exported-twice',\n });\n\n public static readonly JSII_3004_INVALID_SUPERTYPE = Code.error({\n code: 3004,\n formatter: (clauseType: string, badDeclarationKind: string) =>\n `Illegal ${clauseType} clause for an exported API: ${badDeclarationKind}`,\n name: 'type-model/invalid-supertype',\n });\n\n public static readonly JSII_3005_TYPE_USED_AS_INTERFACE = Code.error({\n code: 3005,\n formatter: (badType: spec.TypeReference) =>\n `Type \"${spec.describeTypeReference(badType)}\" cannot be used as an interface`,\n name: 'type-model/type-used-as-interface',\n });\n\n public static readonly JSII_3006_TYPE_USED_AS_CLASS = Code.error({\n code: 3006,\n formatter: (badType: spec.TypeReference) =>\n `Type \"${spec.describeTypeReference(badType)}\" cannot be used as a class`,\n name: 'type-model/type-used-as-class',\n });\n\n public static readonly JSII_3007_ILLEGAL_STRUCT_EXTENSION = Code.error({\n code: 3007,\n formatter: (offender: spec.Type, struct: spec.InterfaceType) =>\n `Attempt to extend or implement struct \"${struct.fqn}\" from \"${offender.fqn}\"`,\n name: 'type-model/illegal-struct-extension',\n });\n\n public static readonly JSII_3008_STRUCT_PROPS_MUST_BE_READONLY = Code.error({\n code: 3008,\n formatter: (propName: string, struct: spec.InterfaceType) =>\n `The \"${propName}\" property of struct \"${struct.fqn}\" must be \"readonly\". Rename \"${struct.fqn}\" to \"I${struct.name}\" if it is meant to be a behavioral interface.`,\n name: 'type-model/struct-props-must-be-readonly',\n });\n\n public static readonly JSII_3009_OPTIONAL_PARAMETER_BEFORE_REQUIRED = Code.error({\n code: 3009,\n formatter: (param: spec.Parameter, nextParam: spec.Parameter) =>\n `Parameter \"${param.name}\" cannot be optional, as it precedes required parameter \"${nextParam.name}\"`,\n name: 'type-model/optional-parameter-before-required',\n });\n\n public static readonly JSII_3999_INCOHERENT_TYPE_MODEL = Code.error({\n code: 3999,\n formatter: (messageText) => messageText,\n name: 'type-model/incoherent-type-model',\n });\n\n //////////////////////////////////////////////////////////////////////////////\n // 4000 => 4999 -- TYPESCRIPT & JSII CONFIG ERRORS\n\n public static readonly JSII_4000_FAILED_TSCONFIG_VALIDATION = Code.error({\n code: 4000,\n formatter: (config: string, ruleSet: string, violations: Array<Violation>) => {\n return `Typescript compiler options in \"${config}\" are not passing validation against rule set \"${ruleSet}\", found the following rule violations:\\n${violations\n .map((v) => ` - ${v.field}: ${v.message}`)\n .join('\\n')}`;\n },\n name: 'typescript-config/invalid-tsconfig',\n });\n\n public static readonly JSII_4009_DISABLED_TSCONFIG_VALIDATION = Code.warning({\n code: 4009,\n formatter: (config: string) =>\n `Validation of typescript config \"${config}\" is disabled. This is intended for experimental setups only. Compilation might fail or produce incompatible artifacts.`,\n name: 'typescript-config/disabled-tsconfig-validation',\n });\n\n public static readonly JSII_4010_SUBMODULE_NAMESPACE_CONFLICT = Code.warning({\n code: 4010,\n formatter: (language: string, namespace: string, modules: string[]) =>\n `Multiple modules emit to the same ${language} namespace \"${namespace}\": ${modules.join(', ')}`,\n name: 'jsii-config/submodule-conflict',\n });\n\n //////////////////////////////////////////////////////////////////////////////\n // 5000 => 5999 -- LANGUAGE COMPATIBILITY ERRORS\n\n public static readonly JSII_5000_JAVA_GETTERS = Code.error({\n code: 5000,\n formatter: (badName: string, typeName: string) =>\n `Methods and properties cannot have names like \"getXxx\": those conflict with Java property getters. Rename \"${typeName}.${badName}\"`,\n name: 'language-compatibility/potential-java-getter-conflict',\n });\n\n public static readonly JSII_5001_JAVA_SETTERS = Code.error({\n code: 5001,\n formatter: (badName: string, typeName: string) =>\n `Methods and properties cannot have names like \"setXxx\": those conflict with Java property setters. Rename \"${typeName}.${badName}\"`,\n name: 'language-compatibility/potential-java-setter-conflict',\n });\n\n public static readonly JSII_5002_OVERRIDE_CHANGES_VISIBILITY = Code.error({\n code: 5002,\n formatter: (\n newElement: string,\n action: string,\n newValue: 'protected' | 'public',\n oldValue: 'protected' | 'public',\n ) => `\"${newElement}\" changes visibility to ${newValue} when ${action}. Change it to ${oldValue}`,\n name: 'language-compatibility/override-changes-visibility',\n });\n\n public static readonly JSII_5003_OVERRIDE_CHANGES_RETURN_TYPE = Code.error({\n code: 5003,\n formatter: (newElement: string, action: string, newValue: string, oldValue: string) =>\n `\"${newElement}\" changes the return type to \"${newValue}\" when ${action}. Change it to \"${oldValue}\"`,\n name: 'language-compatibility/override-changes-return-type',\n });\n\n public static readonly JSII_5004_OVERRIDE_CHANGES_PROP_TYPE = Code.error({\n code: 5004,\n formatter: (newElement: string, action: string, newType: spec.TypeReference, oldType: spec.TypeReference) =>\n `\"${newElement}\" changes the property type to \"${spec.describeTypeReference(\n newType,\n )}\" when ${action}. Change it to \"${spec.describeTypeReference(oldType)}\"`,\n name: 'language-compatibility/override-changes-property-type',\n });\n\n public static readonly JSII_5005_OVERRIDE_CHANGES_PARAM_COUNT = Code.error({\n code: 5005,\n formatter: (newElement: string, action: string, newCount: number, oldCount: number) =>\n `\"${newElement}\" has ${newCount} parameters when ${action}. It should accept ${oldCount} parameters`,\n name: 'language-compatibility/override-changes-param-count',\n });\n\n public static readonly JSII_5006_OVERRIDE_CHANGES_PARAM_TYPE = Code.error({\n code: 5006,\n formatter: (newElement: string, action: string, newParam: spec.Parameter, oldParam: spec.Parameter) =>\n `\"${newElement}\" changes the type of parameter \"${newParam.name}\" to ${spec.describeTypeReference(\n newParam.type,\n )} when ${action}. Change it to ${spec.describeTypeReference(oldParam.type)}`,\n name: 'language-compatibility/override-changes-param-type',\n });\n\n public static readonly JSII_5007_OVERRIDE_CHANGES_VARIADIC = Code.error({\n code: 5007,\n formatter: (newElement: string, action: string, newVariadic = false, oldVariadic = false) =>\n `\"${newElement}\" turns ${newVariadic ? 'variadic' : 'non variadic'} when ${action}. Make it ${\n oldVariadic ? 'variadic' : 'non-variadic'\n }`,\n name: 'language-compatibility/override-changes-variadic',\n });\n\n public static readonly JSII_5008_OVERRIDE_CHANGES_PARAM_OPTIONAL = Code.error({\n code: 5008,\n formatter: (newElement: string, action: string, newParam: spec.Parameter, oldParam: spec.Parameter) =>\n `\"${newElement}\" turns parameter \"${newParam.name}\" ${\n newParam.optional ? 'optional' : 'required'\n } when ${action}. Make it ${oldParam.optional ? 'optional' : 'required'}`,\n name: 'language-compatibility/override-changes-param-optional',\n });\n\n public static readonly JSII_5009_OVERRIDE_CHANGES_PROP_OPTIONAL = Code.error({\n code: 5009,\n formatter: (newElement: string, action: string, newOptional = false, oldOptional = false) =>\n `\"${newElement}\" turns ${newOptional ? 'optional' : 'required'} when ${action}. Make it ${\n oldOptional ? 'optional' : 'required'\n }`,\n name: 'language-compatibility/override-changes-prop-optional',\n });\n\n public static readonly JSII_5010_OVERRIDE_CHANGES_MUTABILITY = Code.error({\n code: 5010,\n formatter: (newElement: string, action: string, newReadonly = false, oldReadonly = false) =>\n `\"${newElement}\" turns ${newReadonly ? 'readonly' : 'mutable'} when ${action}. Make it ${\n oldReadonly ? 'readonly' : 'mutable'\n }`,\n name: 'language-compatibility/override-changes-mutability',\n });\n\n public static readonly JSII_5011_SUBMODULE_NAME_CONFLICT = Code.error({\n code: 5011,\n formatter: (submoduleName: string, typeName: string, reserved: readonly string[]) =>\n `Submodule \"${submoduleName}\" conflicts with \"${typeName}, as different languages could represent it as: ${reserved\n .map((x) => `\"${x}\"`)\n .join(', ')}\"`,\n name: 'language-compatibility/submodule-name-conflicts',\n });\n\n public static readonly JSII_5012_NAMESPACE_IN_TYPE = Code.error({\n code: 5012,\n formatter: (typeName: string, namespaceName: string) =>\n `All entities nested under a type (e.g: \"${typeName}\") must be concrete types, but \"${namespaceName}\" is a namespace. This structure cannot be supported in all languages (e.g: Java)`,\n name: 'language-compatibility/namespace-in-type',\n });\n\n public static readonly JSII_5013_STATIC_INSTANCE_CONFLICT = Code.error({\n code: 5013,\n formatter: (member: string, type: spec.ClassType) =>\n `Member \"${member}\" of class \"${type.fqn}\" has both a static and an instance delcaration`,\n name: 'language-compatibility/static-instance-conflict',\n });\n\n public static readonly JSII_5014_INHERITED_STATIC_CONFLICT = Code.error({\n code: 5014,\n formatter: (\n member: spec.Method | spec.Property,\n type: spec.ClassType,\n baseMember: spec.Method | spec.Property,\n baseType: spec.ClassType,\n ) =>\n `${member.static ? 'Static' : 'Instance'} member \"${member.name}\" of class \"${type.fqn}\" conflicts with ${\n baseMember.static ? 'static' : 'instance'\n } member in ancestor \"${baseType.fqn}\"`,\n name: 'language-compatibility/inherited-static-conflict',\n });\n\n public static readonly JSII_5015_REDECLARED_INTERFACE_MEMBER = Code.error({\n code: 5015,\n formatter: (memberName: string, iface: spec.InterfaceType) =>\n `Interface \"${iface.fqn}\" re-declares member \"${memberName}\" with a different type or signature. Re-declared members must match the inherited declaration exactly, as C# interfaces cannot narrow inherited members.`,\n name: 'language-compatibility/redeclared-interface-member',\n });\n\n public static readonly JSII_5016_PROHIBITED_MEMBER_NAME = Code.error({\n code: 5016,\n formatter: (badName: string) =>\n `Members cannot be named \"${badName}\" as it conflicts with synthetic declarations in some languages.`,\n name: 'language-compatibility/prohibited-member-name',\n });\n\n public static readonly JSII_5017_POSITIONAL_KEYWORD_CONFLICT = Code.error({\n code: 5017,\n formatter: (badName: string) =>\n `Parameter name \"${badName}\" is also the name of a property in a struct parameter. Rename the positional parameter.`,\n name: 'language-compatibility/positional-keyword-conflict',\n });\n\n public static readonly JSII_5018_RESERVED_WORD = Code.warning({\n code: 5018,\n formatter: (badName: string, languages: readonly string[]) =>\n `\"${badName}\" is a reserved word in ${languages.join(\n ', ',\n )}. Using this name may cause problems when generating language bindings. Consider a different name.`,\n name: 'language-compatibility/reserved-word',\n });\n\n public static readonly JSII_5019_MEMBER_TYPE_NAME_CONFLICT = Code.warning({\n code: 5019,\n formatter: (memberKind: 'method' | 'property', memberName: string, declaringType: spec.Type) =>\n `The ${memberKind} name \"${memberName}\" conflicts with the declaring ${declaringType.kind} \"${declaringType.name}\". This will result in renaming the ${declaringType.kind} to \"_${declaringType.name}\" in C#. Consider renaming \"${memberName}\".`,\n name: 'language-compatibility/member-name-conflicts-with-type-name',\n });\n\n public static readonly JSII_5020_STATIC_MEMBER_CONFLICTS_WITH_NESTED_TYPE = Code.error({\n code: 5020,\n formatter: (\n nestingType: spec.Type,\n staticMember: spec.Property | spec.Method | spec.EnumMember,\n nestedType: spec.Type,\n ) =>\n `The static member \"${nestingType.name}.${staticMember.name}\" has the same PascalCased representation as nested type \"${nestingType.name}.${nestedType.name}\". This would result in invalid code in Go.`,\n name: 'language-compatibility/static-member-name-conflicts-with-nested-type',\n });\n\n public static readonly JSII_5021_ABSTRACT_CLASS_MISSING_PROP_IMPL = Code.error({\n code: 5021,\n formatter: (intf: spec.InterfaceType, cls: spec.ClassType, prop: string) =>\n `A declaration of \"${intf.name}.${prop}\" is missing on class \"${cls.name}\". Declare the property as \"public abstract\" if you want to defer it to subclasses.`,\n name: 'language-compatibility/abstract-class-missing-prop-impl',\n });\n\n //////////////////////////////////////////////////////////////////////////////\n // 6000 => 6999 -- RESERVED\n\n //////////////////////////////////////////////////////////////////////////////\n // 7000 => 7999 -- DOCUMENTATION ERRORS\n\n public static readonly JSII_7000_NON_EXISTENT_PARAMETER = Code.warning({\n code: 7000,\n formatter: (method: spec.Method, param: string) =>\n `Documentation for method \"${method.name}\" refers to non-existent @param \"${param}\"`,\n name: 'documentation/non-existent-parameter',\n });\n\n public static readonly JSII_7001_ILLEGAL_HINT = Code.error({\n code: 7001,\n formatter: (hint: string, ...valid: readonly string[]) =>\n `Illegal use of \"@${hint}\" hint. It is only valid on ${valid.join(', ')}.`,\n name: 'documentation/illegal-hint',\n });\n\n public static readonly JSII_7999_DOCUMENTATION_ERROR = Code.error({\n code: 7999,\n formatter: (messageText) => messageText,\n name: 'documentation/documentation-error',\n });\n\n //////////////////////////////////////////////////////////////////////////////\n // 8000 => 8999 -- JSII STYLE ENFORCEMENT\n\n public static readonly JSII_8000_PASCAL_CASED_TYPE_NAMES = Code.error({\n code: 8000,\n formatter: (badName: string, expectedName: string = pascal(badName)) =>\n `Type names must be PascalCased. Rename \"${badName}\" to \"${expectedName}\"`,\n name: 'code-style/type-names-must-use-pascal-case',\n });\n\n public static readonly JSII_8001_ALL_CAPS_ENUM_MEMBERS = Code.error({\n code: 8001,\n formatter: (badName: string, typeName: string) =>\n `Enum members must be ALL_CAPS. Rename \"${typeName}.${badName}\" to \"${constant(badName)}\"`,\n name: 'code-style/enum-members-must-use-all-caps',\n });\n\n public static readonly JSII_8002_CAMEL_CASED_MEMBERS = Code.error({\n code: 8002,\n formatter: (badName: string, typeName: string) =>\n `Method and property (unless they are static readonly) names must use camelCase. Rename \"${typeName}.${badName}\" to \"${camel(\n badName,\n )}\"`,\n name: 'code-style/member-names-must-use-camel-case',\n });\n\n public static readonly JSII_8003_STATIC_CONST_CASING = Code.error({\n code: 8003,\n formatter: (badName: string, typeName: string) =>\n `Static constant names must use ALL_CAPS, PascalCase, or camelCase. Rename \"${typeName}.${badName}\" to \"${constant(\n badName,\n )}\"`,\n name: 'code-style/static-readonly-property-casing',\n });\n\n public static readonly JSII_8004_SUBMOULE_NAME_CASING = Code.error({\n code: 8004,\n formatter: (badName: string) =>\n `Submodule namespaces must be camelCased or snake_cased. Rename \"${badName}\" to ${camel(badName)}`,\n name: 'code-style/submodule-name-casing',\n });\n\n public static readonly JSII_8005_INTERNAL_UNDERSCORE = Code.error({\n code: 8005,\n formatter: (badName: string) =>\n `Members marked with @internal must have a name starting with \"_\". Rename \"${badName}\" to \"_${badName}\"`,\n name: 'code-style/internal-members-underscore-prefix',\n });\n\n public static readonly JSII_8006_UNDERSCORE_INTERNAL = Code.error({\n code: 8006,\n formatter: (badName: string) =>\n `Members with a name starting with \"_\" (e.g: \"${badName}\") must be marked @internal`,\n name: 'code-style/underscored-members-must-be-internal',\n });\n\n public static readonly JSII_8007_BEHAVIORAL_INTERFACE_NAME = Code.error({\n code: 8007,\n formatter: (badName: string) => `Interface contains behavior. Rename \"${badName}\" to \"I${badName}\"`,\n name: 'code-style/behavioral-interface-name',\n });\n\n //////////////////////////////////////////////////////////////////////////////\n // 9000 => 9999 -- SURPRISING ERRORS & INFORMATIONAL MESSAGES\n\n public static readonly JSII_9000_UNKNOWN_MODULE = Code.error({\n code: 9000,\n formatter: (moduleName) =>\n `Encountered use of module that is not declared in \"dependencies\" or \"peerDependencies\": \"${moduleName}\"`,\n name: 'miscellaneous/unknown-module',\n });\n\n public static readonly JSII_9001_TYPE_NOT_FOUND = Code.error({\n code: 9001,\n formatter: (typeRef: spec.NamedTypeReference) => `Type not found in the corresponding assembly: \"${typeRef.fqn}\"`,\n name: 'miscellaneous/type-not-found',\n });\n\n public static readonly JSII_9002_UNRESOLVEABLE_TYPE = Code.error({\n code: 9002,\n formatter: (reference: string) =>\n `Type \"${reference}\" is part of the public API but not exported (@internal or not exported from the package.json \"main\" file). Either export it or add @internal explicitly if you want this to be a hidden base class.`,\n name: 'miscellaneous/unresolveable-type',\n });\n\n public static readonly JSII_9003_UNRESOLVEABLE_MODULE = Code.error({\n code: 9003,\n formatter: (location: string) => `Unable to resolve module location \"${location}\"`,\n name: 'miscellaneous/unresolveable-module',\n });\n\n public static readonly JSII_9004_UNABLE_TO_COMPUTE_SIGNATURE = Code.error({\n code: 9004,\n formatter: (methodName: string, type: spec.Type) =>\n `Unable to compute signature for method \"${methodName}\" of \"${type.fqn}\"`,\n name: 'miscellaneous/unable-to-compute-signature',\n });\n\n public static readonly JSII_9996_UNNECESSARY_TOKEN = Code.message({\n code: 9996,\n formatter: () => 'Unnecessary token, consider removing it',\n name: 'miscellaneous/unnecessary-token',\n });\n\n public static readonly JSII_9997_UNKNOWN_ERROR = Code.error({\n code: 9997,\n formatter: (error: Error) => `Unknown error: ${error.message} -- ${error.stack}`,\n name: 'miscellaneous/unknown-error',\n });\n\n public static readonly JSII_9998_UNSUPPORTED_NODE = Code.message({\n code: 9998,\n formatter: (kindOrMessage: string) =>\n /^[A-Z]\\w*$/.test(kindOrMessage)\n ? `Unsupported ${kindOrMessage} node. This declaration will not be accessible from other languages.`\n : kindOrMessage,\n name: 'miscellaneous/unsupported-node',\n });\n\n //////////////////////////////////////////////////////////////////////////////\n\n /**\n * Determines whether a `Diagnostic` instance is a `JsiiDiagnostic` or not.\n * @param diag\n */\n public static isJsiiDiagnostic(diag: Diagnostic): diag is JsiiDiagnostic {\n return (diag as unknown as JsiiDiagnostic).domain === JsiiDiagnostic.DOMAIN;\n }\n\n //////////////////////////////////////////////////////////////////////////////\n\n private static readonly JSII_9999_RELATED_INFO = Code.suggestion({\n code: 9999,\n formatter: (messageText) => messageText,\n name: 'miscellaneous/related-info',\n });\n\n //////////////////////////////////////////////////////////////////////////////\n\n /**\n * This symbol unequivocally identifies the `JsiiDiagnostic` domain.\n */\n private static readonly DOMAIN = Symbol('jsii');\n\n private readonly domain = JsiiDiagnostic.DOMAIN;\n\n public readonly category: DiagnosticCategory;\n public readonly code: number = JSII_DIAGNOSTICS_CODE;\n public readonly jsiiCode: number;\n public readonly messageText: string;\n\n public readonly file: DiagnosticSourceFile | undefined;\n public readonly start: number | undefined;\n public readonly length: number | undefined;\n\n public readonly relatedInformation = new Array<JsiiDiagnostic>();\n\n // eslint-disable-next-line @typescript-eslint/explicit-member-accessibility\n #formatted?: string;\n\n /**\n * Creates a new `JsiiDiagnostic` with the provided properties.\n *\n * @internal\n */\n public constructor(code: Code, messageText: string, location?: DiagnosticLocation) {\n this.category = code.category;\n this.jsiiCode = code.code;\n this.messageText = messageText;\n\n if (location != null) {\n this.file = location.file;\n this.start = location.start;\n this.length = location.length;\n }\n }\n\n public addRelatedInformation(location: DiagnosticLocation, message: JsiiDiagnostic['messageText']): this {\n // Don't relate info into the TypeScript standard library\n if (!isTypeScriptStdLibFile(location.file.fileName)) {\n this.relatedInformation.push(JsiiDiagnostic.JSII_9999_RELATED_INFO.create(location, message));\n }\n // Clearing out #formatted, as this would no longer be the correct string.\n this.#formatted = undefined;\n return this;\n }\n\n /**\n * Links the provided `node` with the specified `message` as related to the\n * current diagnostic, unless `node` is undefined.\n *\n * @param node the node where the message should be attached, if any.\n * @param message the message to be attached to the diagnostic entry.\n *\n * @returns `this`\n */\n public addRelatedInformationIf(node: DiagnosticLocation | undefined, message: JsiiDiagnostic['messageText']): this {\n if (node != null) {\n return this.addRelatedInformation(node, message);\n } else {\n return this;\n }\n }\n\n /**\n * Adds related information to this `JsiiDiagnostic` instance if the provided\n * `node` is defined.\n *\n * @param node the node to bind as related information, or `undefined`.\n * @param message the message to attach to the related information.\n *\n * @returns `this`\n */\n public maybeAddRelatedInformation(\n node: DiagnosticLocation | undefined,\n message: JsiiDiagnostic['messageText'],\n ): this {\n if (node == null) {\n return this;\n }\n this.relatedInformation.push(JsiiDiagnostic.JSII_9999_RELATED_INFO.create(node, message));\n // Clearing out #formatted, as this would no longer be the correct string.\n this.#formatted = undefined;\n return this;\n }\n\n /**\n * Formats this diagnostic with color and context if possible, and returns it.\n * The formatted diagnostic is cached, so that it can be re-used. This is\n * useful for diagnostic messages involving trivia -- as the trivia may have\n * been obliterated from the `SourceFile` by the `TsCommentReplacer`, which\n * makes the error messages really confusing.\n */\n public format(projectRoot: string): string {\n if (this.#formatted == null) {\n this.#formatted = _formatDiagnostic(this, projectRoot);\n }\n return this.#formatted;\n }\n}\n\nexport type DiagnosticMessageFormatter = (...args: any[]) => JsiiDiagnostic['messageText'];\n\nexport function configureCategories(records: { [code: string]: DiagnosticCategory }) {\n for (const [code, category] of Object.entries(records)) {\n const diagCode = Code.lookup(diagnosticCode(code));\n if (!diagCode) {\n throw new Error(`Unrecognized diagnostic code '${code}'`);\n }\n diagCode.category = category;\n }\n}\n\nfunction diagnosticCode(str: string): string | number {\n if (str.toLowerCase().startsWith('jsii')) {\n const re = /^JSII(\\d+)$/i.exec(str);\n if (re) {\n return parseInt(re[1], 10);\n }\n throw new Error(`Invalid diagnostic code ${str}. A number must follow code that starts with 'JSII'`);\n }\n return str;\n}\n"]}
|
package/lib/version.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** The short version number for this JSII compiler (e.g: `X.Y.Z`) */
|
|
2
|
-
export declare const SHORT_VERSION = "7.1.0-dev.
|
|
2
|
+
export declare const SHORT_VERSION = "7.1.0-dev.8";
|
|
3
3
|
/** The qualified version number for this JSII compiler (e.g: `X.Y.Z (build #######)`) */
|
|
4
|
-
export declare const VERSION = "7.1.0-dev.
|
|
4
|
+
export declare const VERSION = "7.1.0-dev.8 (build b90e3ad)";
|
|
5
5
|
/** The release line identifier for this JSII compiler (e.g: `X.Y`) */
|
|
6
6
|
export declare const RELEASE_LINE = "7.1";
|
|
7
7
|
//# sourceMappingURL=version.d.ts.map
|
package/lib/version.js
CHANGED
|
@@ -4,9 +4,9 @@ exports.RELEASE_LINE = exports.VERSION = exports.SHORT_VERSION = void 0;
|
|
|
4
4
|
const _typescript_1 = require("#typescript");
|
|
5
5
|
// GENERATED: This file is generated by build-tools/code-gen.ts -- Do not edit by hand!
|
|
6
6
|
/** The short version number for this JSII compiler (e.g: `X.Y.Z`) */
|
|
7
|
-
exports.SHORT_VERSION = '7.1.0-dev.
|
|
7
|
+
exports.SHORT_VERSION = '7.1.0-dev.8';
|
|
8
8
|
/** The qualified version number for this JSII compiler (e.g: `X.Y.Z (build #######)`) */
|
|
9
|
-
exports.VERSION = '7.1.0-dev.
|
|
9
|
+
exports.VERSION = '7.1.0-dev.8 (build b90e3ad)';
|
|
10
10
|
/** The release line identifier for this JSII compiler (e.g: `X.Y`) */
|
|
11
11
|
exports.RELEASE_LINE = _typescript_1.versionMajorMinor;
|
|
12
12
|
//# sourceMappingURL=version.js.map
|
package/lib/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sources":["../src/version.ts"],"names":[],"mappings":";;;AAAA,6CAAgD;AAEhD,uFAAuF;AAEvF,qEAAqE;AACxD,QAAA,aAAa,GAAG,aAAa,CAAC;AAE3C,yFAAyF;AAC5E,QAAA,OAAO,GAAG,6BAA6B,CAAC;AAErD,sEAAsE;AACzD,QAAA,YAAY,GAAG,+BAAiB,CAAC","sourcesContent":["import { versionMajorMinor } from '#typescript';\n\n// GENERATED: This file is generated by build-tools/code-gen.ts -- Do not edit by hand!\n\n/** The short version number for this JSII compiler (e.g: `X.Y.Z`) */\nexport const SHORT_VERSION = '7.1.0-dev.
|
|
1
|
+
{"version":3,"file":"version.js","sources":["../src/version.ts"],"names":[],"mappings":";;;AAAA,6CAAgD;AAEhD,uFAAuF;AAEvF,qEAAqE;AACxD,QAAA,aAAa,GAAG,aAAa,CAAC;AAE3C,yFAAyF;AAC5E,QAAA,OAAO,GAAG,6BAA6B,CAAC;AAErD,sEAAsE;AACzD,QAAA,YAAY,GAAG,+BAAiB,CAAC","sourcesContent":["import { versionMajorMinor } from '#typescript';\n\n// GENERATED: This file is generated by build-tools/code-gen.ts -- Do not edit by hand!\n\n/** The short version number for this JSII compiler (e.g: `X.Y.Z`) */\nexport const SHORT_VERSION = '7.1.0-dev.8';\n\n/** The qualified version number for this JSII compiler (e.g: `X.Y.Z (build #######)`) */\nexport const VERSION = '7.1.0-dev.8 (build b90e3ad)';\n\n/** The release line identifier for this JSII compiler (e.g: `X.Y`) */\nexport const RELEASE_LINE = versionMajorMinor;\n"]}
|
package/package.json
CHANGED
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"npm": "^12",
|
|
63
63
|
"npm-check-updates": "^20",
|
|
64
64
|
"prettier": "^2.8.8",
|
|
65
|
-
"projen": "^0.105.
|
|
65
|
+
"projen": "^0.105.6",
|
|
66
66
|
"tar": "^7.5.23",
|
|
67
67
|
"tsx": "^4.23.15",
|
|
68
68
|
"typescript": "~6.0"
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"publishConfig": {
|
|
98
98
|
"access": "public"
|
|
99
99
|
},
|
|
100
|
-
"version": "7.1.0-dev.
|
|
100
|
+
"version": "7.1.0-dev.8",
|
|
101
101
|
"packageManager": "yarn@4.18.1",
|
|
102
102
|
"types": "lib/index.d.ts",
|
|
103
103
|
"exports": {
|