ts-transformer-classname
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -23,4 +23,4 @@ "use strict"; | ||
exports.classNameTransformer = void 0; | ||
const Injector_1 = require("plume-ts-di/build/esm/lib/Injector"); | ||
const ts = __importStar(require("typescript")); | ||
const plume_ts_di_1 = require("plume-ts-di"); | ||
/** | ||
@@ -39,3 +39,3 @@ * CustomTransformer that associates constructor arguments with any given class declaration | ||
context.factory.createModifier(ts.SyntaxKind.StaticKeyword), | ||
], context.factory.createComputedPropertyName(context.factory.createIdentifier(`Symbol.for("${Injector_1.CONSTRUCTOR_NAME_SYMBOL_IDENTIFIER}")`)), [], undefined, context.factory.createBlock([ | ||
], context.factory.createComputedPropertyName(context.factory.createIdentifier(`Symbol.for("${plume_ts_di_1.Injector.CONSTRUCTOR_NAME_SYMBOL_IDENTIFIER}")`)), [], undefined, context.factory.createBlock([ | ||
context.factory.createReturnStatement(context.factory.createStringLiteral(node.name ? node.name.getFullText().trim() : 'undefined')), | ||
@@ -56,2 +56,2 @@ ])), | ||
exports.classNameTransformer = classNameTransformer; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2xhc3NOYW1lVHJhbnNmb3JtZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvbGliL2NsYXNzTmFtZVRyYW5zZm9ybWVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSxpRUFBd0Y7QUFDeEYsK0NBQWdDO0FBRWhDOztHQUVHO0FBQ0gsU0FBZ0Isb0JBQW9CO0lBQ2hDLFNBQVMsV0FBVyxDQUFDLE9BQWlDO1FBQ2xELE9BQU8sQ0FBQyxVQUF5QixFQUFpQixFQUFFO1lBQ2hELE1BQU0sT0FBTyxHQUFHLENBQUMsSUFBYSxFQUF1QixFQUFFO2dCQUNuRCxJQUFJLEVBQUUsQ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yxjQUFjLENBQUMsSUFBSSxFQUFFLE9BQU8sRUFBRSxPQUFPLENBQUMsQ0FBQztZQUNyRCxDQUFDLENBQUM7WUFFRixPQUFPLEVBQUUsQ0FBQyxTQUFTLENBQUMsVUFBVSxFQUFFLE9BQU8sQ0FBQyxDQUFDO1FBQzdDLENBQUMsQ0FBQztJQUNOLENBQUM7SUFFRCxPQUFPLFdBQVcsQ0FBQztBQUN2QixDQUFDO0FBaERELG9EQWdEQyJ9 |
@@ -1,3 +0,3 @@ | ||
import { CONSTRUCTOR_NAME_SYMBOL_IDENTIFIER } from 'plume-ts-di/build/esm/lib/Injector'; | ||
import * as ts from 'typescript'; | ||
import { Injector } from 'plume-ts-di'; | ||
/** | ||
@@ -16,3 +16,3 @@ * CustomTransformer that associates constructor arguments with any given class declaration | ||
context.factory.createModifier(ts.SyntaxKind.StaticKeyword), | ||
], context.factory.createComputedPropertyName(context.factory.createIdentifier(`Symbol.for("${CONSTRUCTOR_NAME_SYMBOL_IDENTIFIER}")`)), [], undefined, context.factory.createBlock([ | ||
], context.factory.createComputedPropertyName(context.factory.createIdentifier(`Symbol.for("${Injector.CONSTRUCTOR_NAME_SYMBOL_IDENTIFIER}")`)), [], undefined, context.factory.createBlock([ | ||
context.factory.createReturnStatement(context.factory.createStringLiteral(node.name ? node.name.getFullText().trim() : 'undefined')), | ||
@@ -32,2 +32,2 @@ ])), | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2xhc3NOYW1lVHJhbnNmb3JtZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvbGliL2NsYXNzTmFtZVRyYW5zZm9ybWVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxrQ0FBa0MsRUFBRSxNQUFNLG9DQUFvQyxDQUFDO0FBQ3hGLE9BQU8sS0FBSyxFQUFFLE1BQU0sWUFBWS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BQzdCLE9BQU8sT0FBTyxDQUFDLE9BQU8sQ0FBQyxzQkFBc0IsQ0FDekMsSUFBSSxFQUNKLElBQUksQ0FBQyxVQUFVLEVBQ2YsSUFBSSxDQUFDLFNBQVMsRUFDZCxJQUFJLENBQUMsSUFBSSxFQUNULElBQUksQ0FBQyxjQUFjLEVBQ25CLElBQUksQ0FBQyxlQUFlLEVBQ3BCLG1CQUFtQixDQUN0QixDQUFDO3FCQUNMO2lCQUVKO2dCQUNELE9BQU8sRUFBRSxDQUFDLGNBQWMsQ0FBQyxJQUFJLEVBQUUsT0FBTyxFQUFFLE9BQU8sQ0FBQyxDQUFDO1lBQ3JELENBQUMsQ0FBQztZQUVGLE9BQU8sRUFBRSxDQUFDLFNBQVMsQ0FBQyxVQUFVLEVBQUUsT0FBTyxDQUFDLENBQUM7UUFDN0MsQ0FBQyxDQUFDO0lBQ04sQ0FBQztJQUVELE9BQU8sV0FBVyxDQUFDO0FBQ3ZCLENBQUMifQ== |
{ | ||
"name": "ts-transformer-classname", | ||
"description": "A TypeScript transformer for use with ttypescript that will give you a symbol that returns the name of the class.", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"author": "Benjamin Chardin <bchardin@coreoz.com> (https://coreoz.com)", | ||
@@ -18,3 +18,3 @@ "repository": "https://github.com/Coreoz/ts-transformer-classname", | ||
"dependencies": { | ||
"plume-ts-di": "^1.0.1" | ||
"plume-ts-di": "^1.0.2" | ||
}, | ||
@@ -21,0 +21,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
41022
0
Updatedplume-ts-di@^1.0.2