Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

visitor-as

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

visitor-as - npm Package Compare versions

Comparing version 0.6.0 to 0.7.0-0

7

dist/decorator.d.ts

@@ -6,3 +6,3 @@ /// <reference types="assemblyscript/std/portable" />

interface DecoratorVisitor extends PathTransformVisitor {
name: string;
decoratorMatcher: (node: DecoratorNode) => boolean;
sourceFilter: (s: Source) => bool;

@@ -22,4 +22,5 @@ }

get sourceFilter(): (s: Source) => bool;
abstract get name(): string;
getDecorator(node: DeclarationStatement): DecoratorNode;
get decoratorMatcher(): (node: DecoratorNode) => boolean;
get name(): string;
getDecorator(node: DeclarationStatement): DecoratorNode | null;
}

@@ -26,0 +27,0 @@ export declare abstract class ClassDecorator extends Decorator {

@@ -12,2 +12,3 @@ "use strict";

class TopLevelDecorator extends transformer_1.PathTransformVisitor {
static _visitor;
static registerVisitor(visitor) {

@@ -20,3 +21,3 @@ TopLevelDecorator._visitor = visitor;

visitDecoratorNode(node) {
if (utils_1.decorates(node, this.visitor.name)) {
if (this.visitor.decoratorMatcher(node)) {
this.visitor.currentPath = this.currentParentPath;

@@ -37,6 +38,10 @@ this.visitor.visit(this.currentParent);

get sourceFilter() {
return utils_1.not(utils_1.isLibrary);
return utils_1.not(utils_1.isStdlib);
}
get decoratorMatcher() {
return (node) => utils_1.decorates(node, this.name);
}
get name() { return ""; }
getDecorator(node) {
return utils_1.getDecorator(node, this.name);
return node.decorators && node.decorators.find(this.decoratorMatcher) || null;
}

@@ -54,2 +59,2 @@ }

exports.VariableDecorator = VariableDecorator;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjb3JhdG9yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2RlY29yYXRvci50cyJdLCJuYW1l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cbiJdfQ==
"use strict";
const utils_1 = require("../utils");
const decorator_1 = require("../decorator");

@@ -7,4 +8,4 @@ class CapitalizeVisitor extends decorator_1.VariableDecorator {

}
get name() {
return "capitalize";
get decoratorMatcher() {
return (node) => utils_1.decorates(node, "capitalize");
}

@@ -25,2 +26,2 @@ visitStringLiteralExpression(node) {

module.exports = decorator_1.registerDecorator(new CapitalizeVisitor());
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FwaXRhbGl6ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9leGFtcGxlcy9jYXBpdGFsaXplLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFDQSw0Q0FBb0U7QUFHcEUsTUFBTSxpQkFBa0IsU0FBUSw2QkFBaUI7SUFDL0Msd0JBQXdCLENBQUMsSUFBeUI7UUFDaEQsSUFBSSxDQUFDLEtBQUssQ0FBQyxJQUFJLENBQUMsV0FBVyxDQUFDLENBQUM7SUFDL0IsQ0FBQztJQUVELElBQUksSUFBSTtRQUNOLE9BQU8sWUFBWSxDQUFDO0lBQ3RCLENBQUM7SUFFRCw0QkFBNEIsQ0FBQyxJQUE2QjtRQUN4RCxNQUFNLFFBQVEsR0FBRyxJQUFJLENBQUMsS0FBSyxDQUFDO1FBQzVCLElBQUksQ0FBQyxLQUFLLEdBQUcsSUFBSSxDQUFDLEtBQUssQ0FBQyxXQUFXLEVBQUUsQ0FBQztRQUN0QyxJQUFJLENBQUMsTUFBTSxDQUFDLEtBQUssQ0FBQyxRQUFRLEdBQUcsTUFBTSxHQUFHLElBQUksQ0FBQyxLQUFLLEdBQUcsSUFBSSxDQUFDLENBQUM7SUFDM0QsQ0FBQztJQUVELDhCQUE4QixDQUFDLElBQStCO1FBQzVELElBQUksSUFBSSxDQUFDLEtBQUssQ0FBQyxNQUFNLElBQUksQ0FBQyxJQUFJLElBQUksQ0FBQyxXQUFXLENB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4gXCIgKyBub2RlLnZhbHVlICsgXCJcXG5cIik7XG4gIH1cbiAgXG4gIHZpc2l0VGVtcGxhdGVMaXRlcmFsRXhwcmVzc2lvbihub2RlOiBUZW1wbGF0ZUxpdGVyYWxFeHByZXNzaW9uKTogdm9pZCB7XG4gICAgaWYgKG5vZGUucGFydHMubGVuZ3RoID09IDEgJiYgbm9kZS5leHByZXNzaW9ucy5sZW5ndGggPT0gMCl7XG4gICAgICBjb25zdCBvbGRWYWx1ZSA9IG5vZGUucGFydHNbMF07XG4gICAgICBub2RlLnBhcnRzWzBdID0gbm9kZS5wYXJ0c1swXS50b1VwcGVyQ2FzZSgpO1xuICAgICAgdGhpcy5zdGRvdXQud3JpdGUob2xkVmFsdWUgKyBcIiAtPiBcIiArIG5vZGUucGFydHNbMF0gKyBcIlxcblwiKTtcbiAgICB9XG4gIH1cbn1cblxuZXhwb3J0ID0gcmVnaXN0ZXJEZWNvcmF0b3IobmV3IENhcGl0YWxpemVWaXNpdG9yKCkpO1xuIl19

@@ -19,10 +19,9 @@ "use strict";

afterInitialize(program) {
var _a, _b, _c;
let files = Array.from(program.filesByName.values()).filter((file) => utils_1.isUserEntry(file.source) && !utils_1.isLibrary(file.source));
for (let file of files) {
for (let _export of ((_a = file.exports) === null || _a === void 0 ? void 0 : _a.values()) || []) {
for (let _export of file.exports?.values() || []) {
if (_export != null && utils_1.hasDecorator(_export, "exportAs")) {
let newName = getName(_export);
(_b = file.exports) === null || _b === void 0 ? void 0 : _b.delete(_export.name);
(_c = file.exports) === null || _c === void 0 ? void 0 : _c.set(newName, _export);
file.exports?.delete(_export.name);
file.exports?.set(newName, _export);
}

@@ -34,2 +33,2 @@ }

module.exports = Transformer;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXhwb3J0QXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZXhhbXBsZXMvZXhwb3J0QXMudHMiXSwibmFtZXM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UpID0+IGlzVXNlckVudHJ5KGZpbGUuc291cmNlKSAmJiAhaXNMaWJyYXJ5KGZpbGUuc291cmNlKVxuICAgICk7XG4gICAgZm9yIChsZXQgZmlsZSBvZiBmaWxlcykge1xuICAgICAgZm9yIChsZXQgX2V4cG9ydCBvZiBmaWxlLmV4cG9ydHM/LnZhbHVlcygpIHx8IFtdKSB7XG4gICAgICAgIGlmIChfZXhwb3J0ICE9IG51bGwgJiYgaGFzRGVjb3JhdG9yKF9leHBvcnQsIFwiZXhwb3J0QXNcIikpIHtcbiAgICAgICAgICBsZXQgbmV3TmFtZSA9IGdldE5hbWUoX2V4cG9ydCk7XG4gICAgICAgICAgICBmaWxlLmV4cG9ydHM/LmRlbGV0ZShfZXhwb3J0Lm5hbWUpO1xuICAgICAgICAgICAgZmlsZS5leHBvcnRzPy5zZXQobmV3TmFtZSwgX2V4cG9ydCk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gIH1cbn1cblxuZXhwb3J0ID0gVHJhbnNmb3JtZXI7XG4iXX0=

@@ -36,3 +36,3 @@ "use strict";

afterParse(_) {
let sources = _.sources.filter(utils_1.not(utils_1.isLibrary));
let sources = _.sources.filter(utils_1.not(utils_1.isStdlib));
this.visit(sources);

@@ -42,2 +42,2 @@ }

module.exports = IncludeBytesTransform;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5jbHVkZUJ5dGVzVHJhbnNmb3JtLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2V4YW1wbGVzL2luY2x1ZGVCeXRlc1RyYW5zZm9ybS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsMEJBQW9EO0FBQ3BELGlDQU9rQjtBQUNsQixvQ0FBMEM7QUFDMUMsNkJBQTZCO0FBQzdCLHlCQUF5QjtBQUV6QixNQUFNLHFCQUFzQixTQUFRLG9CQUFnQjtJQUNsRCxtQkFBb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y5maWx0ZXIobm90KGlzU3RkbGliKSk7XG4gICAgdGhpcy52aXNpdChzb3VyY2VzKTtcbiAgfVxufVxuXG5leHBvcnQgPSBJbmNsdWRlQnl0ZXNUcmFuc2Zvcm07XG4iXX0=

@@ -17,3 +17,3 @@ "use strict";

}
const sig = utils_1.getName(node.signature);
const sig = utils_1.toString(node.signature);
this.stdout.write(name + ": " + sig + "\n");

@@ -24,7 +24,5 @@ }

}
get name() {
return "list";
}
get name() { return "list"; }
}
module.exports = decorator_1.registerDecorator(new ListMembers());
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGlzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9leGFtcGxlcy9saXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFLQSw0Q0FBaUU7QUFDakUsb0NBQTZDO0FBRTdDLE1BQU0sV0FBWSxTQUFRLDBCQUFjO0lBQ3RDLHFCQUFxQixDQUFDLElBQXNCO1FBQzFDLElBQUksQ0FBQyxJQUFJLENBQUMsSUFBSTtZQUFFLE9BQU8sQ0FBQyxHQUFHLENBQUMsZUFBTyxDQUFDLElBQUksQ0FBQyxHQUFHLElBQUksQ0FBQyxDQUFDO1FBQ2xELE1BQU0sSUFBSSxHQUFHLGVBQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQztRQUMzQixNQUFNLEtBQUssR0FBRyxlQUFPLENBQUMsSUFBSSxDQUFDLElBQUssQ0FBQyxDQUFDO1FBQ2xDLElBQUksQ0FBQyxNQUFNLENBQUMsS0FBSyxDQUFDLElBQUksR0FBRyxJQUFJLEdBQUcsS0FBSyxHQUFHLElBQUksQ0FBQyxDQUFDO0lBQ2hELENBQUM7SUFFRCxzQkFBc0IsQ0FBQyxJQUF1QjtRQUM1QyxNQUFNLElBQUksR0FBRyxlQUFPLENBQUMsSUFBSSxDQUFDLENBQUM7UUFDM0IsSUFBSSxJQUF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iBcImxpc3RcIjsgfVxuXG59XG5cbmV4cG9ydCA9IHJlZ2lzdGVyRGVjb3JhdG9yKG5ldyBMaXN0TWVtYmVycygpKTtcbiJdfQ==

@@ -6,2 +6,4 @@ "use strict";

class ToStringCallTransform extends __1.ASTTransformVisitor {
currentClass;
fields;
visitFieldDeclaration(node) {

@@ -33,3 +35,3 @@ const name = utils_1.getName(node);

afterParse(_) {
let sources = _.sources.filter(utils_1.not(utils_1.isLibrary));
let sources = _.sources.filter(utils_1.not(utils_1.isStdlib));
this.visit(sources);

@@ -39,2 +41,2 @@ }

module.exports = ToStringCallTransform;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9TdHJpbmcuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZXhhbXBsZXMvdG9TdHJpbmcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLDBCQUF5QztBQUV6QyxrREFBK0M7QUFDL0Msb0NBQXVGO0FBSXZGLE1BQU0scUJBQXNCLFNBQVEsdUJBQW1CO0lBSXJELHFCQUFxQixDQUFDLElBQXNCO1FBQzFDLE1BQU0sSUFBSSxHQUFHLGVBQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQztRQUMzQixJQUFJLEdBQUcsR0FBRyxRQUFRLElBQUksYUFBYSxDQUFDO1FBQ3BDLElBQUksQ0FBQyxNQUFNLENBQUMsSUFBSSxDQUFDLGFBQWEsSUFBSSxRQUFRLEdBQUcsTUFBTSxDQUFDLENBQUM7UUFDckQsS0FBSyxDQUFDLHFCQUFxQixDQUFDLElBQUksQ0FBQyxDQUFDO0lBQ3BDLENBQUM7SUFHRCxxQkFBcUIsQ0FBQyxJQUFzQjtRQUMxQyxJQUFJLENBQUMsSUFBSSxDQUFDLE9BQU8sSUFBSSxJQUFJLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxxQkFBYSxDQUFDLFVBQVUsQ0FBQyxDQ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ydCA9IFRvU3RyaW5nQ2FsbFRyYW5zZm9ybTtcbiJdfQ==

@@ -10,3 +10,3 @@ "use strict";

var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};

@@ -13,0 +13,0 @@ Object.defineProperty(exports, "__esModule", { value: true });

@@ -7,6 +7,3 @@ "use strict";

class PathVisitor extends base_1.BaseVisitor {
constructor() {
super(...arguments);
this.currentPath = [];
}
currentPath = [];
_visit(node) {

@@ -48,2 +45,2 @@ this.currentPath.push(node);

exports.PathVisitor = PathVisitor;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGF0aC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9wYXRoLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUlBLGlDQUFxQztBQUNyQyx3QkFBMEI7QUFFMUIsTUFBYSxXQUFZLFNBQVEsa0JBQVc7SUFBNUM7O1FBQ0UsZ0JBQVcsR0FBVyxFQUFFLENBQUM7SUF5QzNCLENBQUM7SUF2Q0MsTUFBTSxDQUFDLElBQVU7UUFDZixJQUFJLENBQUMsV0FBVyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQztRQUM1QixLQUFLLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxDQUFDO1FBQ25CLElBQUksQ0FBQyxXQUFXLENBQUMsR0FBRyxFQUFFLENBQUM7SUFDekIsQ0FBQztJQUVELElBQUksV0FBVztRQUNiLE9BQU8sSUFBSSxDQUFDLFdBQVcsQ0FBQyxJQUFJLENBQUMsV0FBVyxDQUFDLE1BQU0sR0FBRyxDQUFDLENBQUMsQ0FBQztJQUN2RCxDQUFDO0lBRUQsSUFBSSxhQUFhO1FBQ2YsSUFBSSx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GF0aC5sZW5ndGggPT0gMSkgcmV0dXJuIHRoaXMuY3VycmVudE5vZGU7XG4gICAgcmV0dXJuIHRoaXMuY3VycmVudFBhdGhbdGhpcy5jdXJyZW50UGF0aC5sZW5ndGggLSAyXTtcbiAgfVxuXG4gIGdldCBjdXJyZW50UGFyZW50UGF0aCgpOiBOb2RlW10ge1xuICAgIHJldHVybiB0aGlzLmN1cnJlbnRQYXRoLnNsaWNlKDAsIHRoaXMuY3VycmVudFBhdGgubGVuZ3RoIC0gMSk7XG4gIH1cblxuICBnZXQgY3VycmVudEdyYW5kUGFyZW50UGF0aCgpOiBOb2RlW10ge1xuICAgIHJldHVybiB0aGlzLmN1cnJlbnRQYXRoLmxlbmd0aCA8IDNcbiAgICAgID8gW11cbiAgICAgIDogdGhpcy5jdXJyZW50UGF0aC5zbGljZSgwLCB0aGlzLmN1cnJlbnRQYXRoLmxlbmd0aCAtIDIpO1xuICB9XG5cbiAgY2xvbmVDdXJyZW50Tm9kZSgpOiBOb2RlIHtcbiAgICByZXR1cm4gdXRpbHMuY2xvbmVOb2RlKHRoaXMuY3VycmVudE5vZGUpO1xuICB9XG5cbiAgcmVwbGFjZUN1cnJlbnROb2RlKG5vZGU6IE5vZGUpOiB2b2lkIHtcbiAgICBPYmplY3QuZ2V0T3duUHJvcGVydHlOYW1lcyh0aGlzLmN1cnJlbnRQYXJlbnQpLmZvckVhY2goKG5hbWUpID0+IHtcbiAgICAgIC8vQHRzLWlnbm9yZVxuICAgICAgY29uc3QgcHJvcCA9IHRoaXMuY3VycmVudFBhcmVudFtuYW1lXTtcbiAgICAgIGlmIChwcm9wID09IHRoaXMuY3VycmVudE5vZGUpIHtcbiAgICAgICAgLy9AdHMtaWdub3JlXG4gICAgICAgIHRoaXMuY3VycmVudFBhcmVudFtuYW1lXSA9IG5vZGU7XG4gICAgICB9XG4gICAgfSk7XG4gIH1cbn1cbiJdfQ==

@@ -6,2 +6,3 @@ "use strict";

class RangeTransform extends baseTransform_1.BaseTransformVisitor {
node;
constructor(node) {

@@ -21,2 +22,2 @@ super();

exports.RangeTransform = RangeTransform;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNmb3JtUmFuZ2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvdHJhbnNmb3JtUmFuZ2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQ0EsbURBQXVEO0FBSXZELE1BQWEsY0FBZSxTQUFRLG9DQUFvQjtJQUN0RCxZQUFvQixJQUFVO1FBQUUsS0FBSyxFQUFFLENBQUE7UUFBbkIsU0FBSSxHQUFKLElBQUksQ0FBTTtJQUFTLENBQUM7SUFBQSxDQUFDO0lBRXpDLE1BQU0sQ0FBQyxJQUFVO1FBQ2YsSUFBSSxDQUFDLEtBQUssR0FBRyxJQUFJLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQztRQUM3QixPQUFPLEtBQUssQ0FBQyxNQUFNLENBQUMsSUFBSSxDQUFDLENBQUM7SUFDNUIsQ0FBQztJQUVELE1BQU0sQ0FBQyxLQUFLLENBQUMsSUFBVSxFQUFFLElBQVU7UUFDakMsT0FBTyxDQUFDLElBQUksY0FBYyxDQUFDLElBQUksQ0FBQyxDQUFDLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxDQUFBO0lBRWhELENBQUM7Q0FDRjtBQVpELHdDQVlDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHtOb2RlfSBmcm9tIFwiLi4vYXNcIlxuaW1wb3J0IHsgQmFzZVRyYW5zZm9ybVZpc2l0b3IgfSBmcm9tIFwiLi9iYXNlVHJhbnNmb3JtXCI7XG5cblxuXG5leHBvcnQgY2xhc3MgUmFuZ2VUcmFuc2Zvcm0gZXh0ZW5kcyBCYXNlVHJhbnNmb3JtVmlzaXRvciB7XG4gIGNvbnN0cnVjdG9yKHByaXZhdGUgbm9kZTogTm9kZSl7c3VwZXIoK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NcIlxuaW1wb3J0IHsgQmFzZVRyYW5zZm9ybVZpc2l0b3IgfSBmcm9tIFwiLi9iYXNlVHJhbnNmb3JtXCI7XG5cblxuXG5leHBvcnQgY2xhc3MgUmFuZ2VUcmFuc2Zvcm0gZXh0ZW5kcyBCYXNlVHJhbnNmb3JtVmlzaXRvciB7XG4gIGNvbnN0cnVjdG9yKHByaXZhdGUgbm9kZTogTm9kZSl7c3VwZXIoKX07XG5cbiAgX3Zpc2l0KG5vZGU6IE5vZGUpOiBOb2RlIHtcbiAgICBub2RlLnJhbmdlID0gdGhpcy5ub2RlLnJhbmdlO1xuICAgIHJldHVybiBzdXBlci5fdmlzaXQobm9kZSk7XG4gIH1cblxuICBzdGF0aWMgdmlzaXQobm9kZTogTm9kZSwgZnJvbTogTm9kZSk6IE5vZGUge1xuICAgIHJldHVybiAobmV3IFJhbmdlVHJhbnNmb3JtKGZyb20pKS5fdmlzaXQobm9kZSlcblxuICB9XG59Il19

@@ -1,2 +0,2 @@

import { DecoratorNode, IdentifierExpression, DeclarationStatement, Source, Node, ClassDeclaration, TypeNode, InterfaceDeclaration } from "../as";
import { DecoratorNode, IdentifierExpression, DeclarationStatement, Source, Node, Program, ClassDeclaration, TypeNode, InterfaceDeclaration, FunctionDeclaration, TypeName, DiagnosticCategory, DiagnosticEmitter, Range, util } from "../as";
export declare function decorates(node: DecoratorNode, name: string): boolean;

@@ -15,6 +15,9 @@ export declare function isDecorator(name: string): (node: DecoratorNode) => boolean;

export declare function getName(node: Node & Named | TypeNode): string;
export declare function getTypeName(node: TypeName): string;
export declare function cloneNode<T extends Node>(node: T): T;
export declare function isUserEntry(source: Source): boolean;
export declare function className(_class: ClassDeclaration | InterfaceDeclaration): string;
export declare function isUserEntry(node: Node): boolean;
export declare function isEntry(node: Node): boolean;
export declare function className(_class: ClassDeclaration | InterfaceDeclaration | FunctionDeclaration): string;
export declare function isMethodNamed(name: string): (_: DeclarationStatement) => boolean;
export declare function updateSource(program: Program, newSource: Source): void;
export declare class StringBuilder {

@@ -26,2 +29,24 @@ private sb;

}
/**
*
* @param emitter DiagnosticEmitter
* @returns return true if emitter have ERROR message
*/
export declare function hasErrorMessage(emitter: DiagnosticEmitter): boolean;
/**
*
* @param emitter DiagnosticEmitter
* @returns return true if emitter have WARNING message
*/
export declare function hasWarningMessage(emitter: DiagnosticEmitter): boolean;
/**
*
* @param emitter DiagnosticEmitter
* @returns return true if emitter have `category` message
*/
export declare function hasMessage(emitter: DiagnosticEmitter, category: DiagnosticCategory): boolean;
export declare function isStdlib(s: Source | {
range: Range;
}): boolean;
export declare const indent: typeof util.indent;
export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.StringBuilder = exports.isMethodNamed = exports.className = exports.isUserEntry = exports.cloneNode = exports.getName = exports.toString = exports.not = exports.isLibrary = exports.getDecorator = exports.hasDecorator = exports.isDecorator = exports.decorates = void 0;
exports.indent = exports.isStdlib = exports.hasMessage = exports.hasWarningMessage = exports.hasErrorMessage = exports.StringBuilder = exports.updateSource = exports.isMethodNamed = exports.className = exports.isEntry = exports.isUserEntry = exports.cloneNode = exports.getTypeName = exports.getName = exports.toString = exports.not = exports.isLibrary = exports.getDecorator = exports.hasDecorator = exports.isDecorator = exports.decorates = void 0;
const as_1 = require("../as");

@@ -16,3 +16,2 @@ const astBuilder_1 = require("./astBuilder");

function hasDecorator(node, name) {
var _a;
let decl;

@@ -26,8 +25,7 @@ if (node instanceof as_1.DeclarationStatement) {

// because it could be undefined
return ((_a = decl.decorators) === null || _a === void 0 ? void 0 : _a.some(isDecorator(name))) == true;
return decl.decorators?.some(isDecorator(name)) == true;
}
exports.hasDecorator = hasDecorator;
function getDecorator(node, name) {
var _a;
return (_a = node.decorators) === null || _a === void 0 ? void 0 : _a.find(isDecorator(name));
return node.decorators?.find(isDecorator(name));
}

@@ -49,10 +47,29 @@ exports.getDecorator = getDecorator;

if (node instanceof as_1.TypeNode) {
return node.range.toString();
if (node instanceof as_1.NamedTypeNode) {
let name = getTypeName(node.name);
const typeParameters = node.typeArguments;
if (typeParameters && typeParameters.length > 0) {
name += `<${typeParameters.map(getName).join(", ")}>`;
}
return name;
}
else if (node instanceof as_1.TypeName) {
return toString(node.identifier);
}
return "";
}
if (node instanceof as_1.ClassDeclaration || node instanceof as_1.InterfaceDeclaration) {
if (node instanceof as_1.ClassDeclaration || node instanceof as_1.InterfaceDeclaration || node instanceof as_1.FunctionDeclaration) {
return className(node);
}
return node.name.range.toString();
return toString(node.name);
}
exports.getName = getName;
function getTypeName(node) {
let name = toString(node.identifier);
if (node.next) {
name += getTypeName(node.next);
}
return name;
}
exports.getTypeName = getTypeName;
function cloneNode(node) {

@@ -62,8 +79,12 @@ return cloneDeep(node);

exports.cloneNode = cloneNode;
function isUserEntry(source) {
return source.sourceKind == as_1.SourceKind.USER_ENTRY;
function isUserEntry(node) {
return node.range.source.sourceKind == as_1.SourceKind.USER_ENTRY;
}
exports.isUserEntry = isUserEntry;
function isEntry(node) {
return isUserEntry(node) || node.range.source.sourceKind == as_1.SourceKind.LIBRARY_ENTRY;
}
exports.isEntry = isEntry;
function className(_class) {
let name = _class.name.range.toString();
let name = toString(_class.name);
const typeParameters = _class.typeParameters;

@@ -80,6 +101,14 @@ if (typeParameters) {

exports.isMethodNamed = isMethodNamed;
function updateSource(program, newSource) {
const sources = program.sources;
for (let i = 0, len = sources.length; i < len; i++) {
if (sources[i].internalPath == newSource.internalPath) {
sources[i] = newSource;
break;
}
}
}
exports.updateSource = updateSource;
class StringBuilder {
constructor() {
this.sb = [];
}
sb = [];
push(s) {

@@ -96,2 +125,42 @@ this.sb.push(s);

exports.StringBuilder = StringBuilder;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvdXRpbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsOEJBWWU7QUFDZiw2Q0FBMEM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1cm4gKHN0bXQ6IERlY2xhcmF0aW9uU3RhdGVtZW50KSA9PiBzdG10LmtpbmQgPT0gTm9kZUtpbmQuTUVUSE9EREVDTEFSQVRJT04gJiYgdG9TdHJpbmcoc3RtdC5uYW1lKSA9PT0gbmFtZTtcbn1cblxuZXhwb3J0IGNsYXNzIFN0cmluZ0J1aWxkZXIge1xuICBwcml2YXRlIHNiOiBzdHJpbmdbXSA9IFtdO1xuXG4gIHB1c2goczogc3RyaW5nKTogdm9pZCB7XG4gICAgdGhpcy5zYi5wdXNoKHMpO1xuICB9XG5cbiAgZmluaXNoKHNlcGFyYXRvciA9IFwiXFxuXCIpOiBzdHJpbmcge1xuICAgIGxldCByZXMgPSB0aGlzLnNiLmpvaW4oc2VwYXJhdG9yKTtcbiAgICB0aGlzLnNiID0gW107XG4gICAgcmV0dXJuIHJlcztcbiAgfVxuXG4gIGdldCAgbGFzdCgpOiBzdHJpbmcgeyByZXR1cm4gdGhpcy5zYlt0aGlzLnNiLmxlbmd0aCAtMV19XG59Il19
/**
*
* @param emitter DiagnosticEmitter
* @returns return true if emitter have ERROR message
*/
function hasErrorMessage(emitter) {
return hasMessage(emitter, as_1.DiagnosticCategory.ERROR);
}
exports.hasErrorMessage = hasErrorMessage;
/**
*
* @param emitter DiagnosticEmitter
* @returns return true if emitter have WARNING message
*/
function hasWarningMessage(emitter) {
return hasMessage(emitter, as_1.DiagnosticCategory.WARNING);
}
exports.hasWarningMessage = hasWarningMessage;
/**
*
* @param emitter DiagnosticEmitter
* @returns return true if emitter have `category` message
*/
function hasMessage(emitter, category) {
const diagnostics = emitter.diagnostics ? emitter.diagnostics : [];
for (const msg of diagnostics) {
if (msg.category === category) {
return true;
}
}
return false;
}
exports.hasMessage = hasMessage;
let isStdlibRegex = /\~lib\/(?:array|arraybuffer|atomics|builtins|crypto|console|compat|dataview|date|diagnostics|error|function|iterator|map|math|number|object|process|reference|regexp|set|staticarray|string|symbol|table|typedarray|vector|rt\/?|bindings\/|shared\/typeinfo)|util\/|uri|polyfills|memory/;
function isStdlib(s) {
let source = s instanceof as_1.Source ? s : s.range.source;
return isStdlibRegex.test(source.internalPath);
}
exports.isStdlib = isStdlib;
exports.indent = as_1.util.indent;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvdXRpbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsOEJBbUJlO0FBQ2YsNkNBQTBDO0FBRTFDLE1BQU0sU0FBUyxHQUFtQixPQUFPLENBQUMsa0JBQWtCLENBQUMsQ0FBQztBQUU5RCxTQUFnQixTQUFTLENBQUMsSUFBbUIsRUFBRSxJQUFZO0lBQ3pELE9BQThCLElBQUksQ0FBQyxJQUFLLENBQUMsSUFBSSxLQUFLLElBQUksQ0FBQztBQUN6RCxDQUFDO0FBRkQsOEJBRUM7QUFFRCxTQUFnQixXQUFXLENBQUMsSUFBWTtJQUN0QyxPQUFPLENBQUMsSUFBSSxFQUFFLEVBQUUsQ0FBQyxTQUFTLENBQUMsSUFBSSxFQUFFLElBQUksQ0FBQyxDQUFDO0FBQ3pDLENBQUM7QUFGRCxrQ0FFQztBQUdELFNBQWdCLFlBQVksQ0FDMUIsSUFBZ0UsRUFDaEUsSUFBWTtJQUVaLElBQUksSUFBSSxDQUFDO0lBQ1QsSUFBSSxJQUFJLFlBQVkseUJBQW9CLEVBQUU7UUFDeEMsSUFBSSxHQUFHLElBQUksQ0FBQztLQUNiO1NBQU07UUFDTCxJQUFJLEdBQUcsSUFBSSxDQUFDLFdBQVcsQ0FBQztLQUN6QjtJQUNELGdDQUFnQztJQUNoQyxPQUFPLElBQUksQ0FBQyxVQUFVLEVBQUUsSUFBSSxDQUFDLFdBQVcsQ0FBQyxJQUFJLENBQUMsQ0FBQyxJQUFJLElBQUksQ0FBQztBQUMxRCxDQUFDO0FBWkQsb0NBWUM7QUF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FwvP3xiaW5kaW5nc1xcL3xzaGFyZWRcXC90eXBlaW5mbyl8dXRpbFxcL3x1cml8cG9seWZpbGxzfG1lbW9yeS87XG5cbmV4cG9ydCBmdW5jdGlvbiBpc1N0ZGxpYihzOiBTb3VyY2UgfCB7IHJhbmdlOiBSYW5nZSB9KTogYm9vbGVhbiB7XG4gIGxldCBzb3VyY2UgPSBzIGluc3RhbmNlb2YgU291cmNlID8gcyA6IHMucmFuZ2Uuc291cmNlO1xuICByZXR1cm4gaXNTdGRsaWJSZWdleC50ZXN0KHNvdXJjZS5pbnRlcm5hbFBhdGgpO1xufVxuXG5leHBvcnQgY29uc3QgaW5kZW50ID0gdXRpbC5pbmRlbnQ7Il19
{
"name": "visitor-as",
"version": "0.6.0",
"version": "0.7.0-0",
"description": "A generic visitor framework for AssemblyScript",

@@ -13,18 +13,18 @@ "main": "dist",

"test": "jest && asp",
"build": "rimraf dist/ && tsc"
"build": "rimraf dist/ && tsc -p src"
},
"peerDependencies": {
"assemblyscript": "^0.18.31"
"assemblyscript": "^0.19.5"
},
"devDependencies": {
"@as-pect/cli": "^6.1.1",
"@as-pect/cli": "^6.2.4",
"@types/jest": "^25.1.4",
"@types/node": "^15.3.1",
"assemblyscript": "^0.18.31",
"jest": "^25.1.0",
"assemblyscript": "^0.19.5",
"jest": "^27.0.6",
"prettier": "^2.0.4",
"rimraf": "^3.0.2",
"ts-jest": "^25.2.1",
"ts-node": "^8.6.2",
"typescript": "^3.8.3"
"ts-jest": "^27.0.3",
"ts-node": "^10.0.0",
"typescript": "^4.3.5"
},

@@ -31,0 +31,0 @@ "dependencies": {

@@ -16,9 +16,9 @@ # Visitor utilities for AssemblyScript Compiler transformers

import { ClassDecorator, registerDecorator } from "../decorator";
import { toString } from "../utils";
import { getName } from "../utils";
class ListMembers extends ClassDecorator {
visitFieldDeclaration(node: FieldDeclaration): void {
if (!node.name) console.log(toString(node) + "\n");
const name = toString(node.name);
const _type = toString(node.type!);
if (!node.name) console.log(getName(node) + "\n");
const name = getName(node);
const _type = getName(node.type!);
this.stdout.write(name + ": " + _type + "\n");

@@ -28,7 +28,7 @@ }

visitMethodDeclaration(node: MethodDeclaration): void {
const name = toString(node.name);
const name = getName(node);
if (name == "constructor") {
return;
}
const sig = toString(node.signature);
const sig = getName(node.signature);
this.stdout.write(name + ": " + sig + "\n");

@@ -35,0 +35,0 @@ }

{
"compilerOptions": {
"outDir": "./dist",
"inlineSourceMap": true,
"inlineSources": true,
"target": "ES6",
"target": "esnext",
"module": "commonjs",

@@ -15,8 +14,10 @@ "downlevelIteration": true,

"noEmitOnError": true,
"allowJs": true,
"allowJs": false,
"strictNullChecks": true,
"experimentalDecorators": true,
"declaration": true
"declaration": true,
"strict": true,
"lib": ["esnext","esnext.string"]
},
"include": ["./src/**/*"]
"include": ["src/**/*"]
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc