@nestia/core
Version:
Super-fast validation decorators of NestJS
25 lines • 1.15 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = createTtscPlugin;
const node_module_1 = require("node:module");
const node_path_1 = __importDefault(require("node:path"));
/**
* `@nestia/core` ttsc plugin descriptor.
*
* `@nestia/sdk` is not a standalone plugin: its Go transform is declared here
* as a `contributor` that ttsc statically links into this host binary, and only
* when `@nestia/sdk` is actually resolvable from the project. A project
* depending on `@nestia/core` alone never compiles any SDK transform code.
*/
function createTtscPlugin(context) {
const requireFrom = (0, node_module_1.createRequire)(node_path_1.default.join(context.projectRoot, "package.json"));
const root = node_path_1.default.dirname(requireFrom.resolve("@nestia/core/package.json"));
return {
name: "@nestia/core",
source: node_path_1.default.resolve(root, "native", "cmd", "ttsc-nestia"),
};
}
//# sourceMappingURL=transform.js.map