![Cloudflare Adds Security.txt Setup Wizard](https://cdn.sanity.io/images/cgdhsj6q/production/7cbc49090a3c7e26efac073373c3b5e7d298b9c3-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
visitor-as
Advanced tools
The transformer:
import { ASTTransformVisitor } from '../transformer';
import {
ClassDeclaration,
Program,
FieldDeclaration,
FieldPrototype,
MethodDeclaration
} from '../as';
import { hasDecorator } from '../utils';
class ListVisitor extends ASTTransformVisitor {
visitFieldDeclaration(node: FieldDeclaration): void {
const mem = <FieldPrototype>this.program.getElementByDeclaration(node);
const name = mem.name;
const _type = this.program.resolver.resolveType(mem.typeNode!, mem)!;
this.stdout.write(name + ": " + _type.toString() + "\n");
}
visitMethodDeclaration(node: MethodDeclaration): void { }
visitClassDeclaration(node: ClassDeclaration): void {
if (hasDecorator(node, "list")) {
super.visit(node.members);
}
}
afterInitialize(program: Program): void {
this.visit(program.sources);
}
}
export = ListVisitor;
Example usage:
@list
class Foo {
a: u8;
b: bool;
i: i32;
}
And then compile with --transform
flag:
asc assembly/foo.ts --transform ./dist/examples/list --noEmit
Which prints the following to the console:
a: u8
b: bool
i: i32
FAQs
A generic visitor framework for AssemblyScript
The npm package visitor-as receives a total of 1,333 weekly downloads. As such, visitor-as popularity was classified as popular.
We found that visitor-as demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.