Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Analyze webtask code

Usage

const Analyzer = require('webtask-analyzer');

const analyzer = new Analyzer({
    clusterUrl: '...',
    containerName: '...',
    token: '...',
});

const results = await analyzer.findDependenciesInCode('module.exports = ...');

API

export interface AnalyzerOptions {
    clusterUrl: string;
    containerName: string;
    token: string;
}

export interface RequireNode {
    type: 'global' | 'require' | 'require_dynamic';
    spec: string;
    start: number;
    end: number;
    resolved?: any;
}

export class Analyzer {
    constructor(options: AnalyzerOptions) {}

    findDependenciesInCode(code: string): Promise<RequireNode[]> {}
}

About

Perform static analysis on webtasks

Resources

Packages

No packages published