Skip to content

proxtractor/proxtractor-core

Repository files navigation

Proxtractor Logo

A progressive Node.js RPA framework for building efficient and scalable web services automation applications.

Description

Proxtractor cloud for running automated web services

The CLI works with schematics, and provides built in support from the schematics collection at @proxtractor/proxtractor-schematics.

Read more here.

Installation

$ npm install -g @proxtractor/core

<!> : take care about project architecture if you want to install as /cli

Pipe example should be

@PrxPipe({
    // required for task xml selector
    selector:"my-pipe",
})
export class MyPipe extends BaseDataPipe<IDataSchemaNode>{

    accumulate(value:IDataSchemaNode):void{

    }

    @Accumulator({name:"email",required:boolean})
    accumulateEmail(value:TextSchemaNode):void{
        //accumulate your nodeValue data fields/items.
        this.value = value;
    }
}

Action example should be

@PrxAction({
    // required for task xml template
    selector:"my-action",
})
export class MyAction /* implement Action lifecycle like OnInit , OnDestroy , OnSuccess , OnDataRecived .... */{
    @Option({name:string,required:boolean})

    constructor(){private driver:MyDriver /* other dependecies*/}

    start(context:ActionContext):ActionObservable<ActionContext>{
        return new ActionObservable((async subscriber=>{
            // this.driver.agent. ...
            await subscriber.next(context);
            subscriber.complete()
        }))
    }
}

NB : - Action can have pipe class as a injected dependency - Action should have driver agent type generic type.

@PrxInjectable({
    // Injectable params coming soon
})
export class ChromiumAgent{
    // configuration values injected from PrxConfigService for environment variables
    @Config({name:string,required:boolean})

    constructor(){}

}

Task example should be

@PrxTask({
    template:"robot.xml"
})
/*
 ** Task lifecylces **
OnInit          : Task initialized lifecycle
OnSuccess       : Task finished with success
OnDataRecived   : Data recived and beeing to pass to pipe .
OnError         : Task finish with error
*/
export MyTask implements OnInit , OnSuccess , OnDataRecived , OnError{

}

Task template should be


<?xml version="1.0" encoding="UTF-8" ?>
<task>
    <metadata>
        <meta type="title">
            <!-- Task title here -->
        </meta>
        <meta type="description">
            <!-- Task description here -->
        </meta>
        <meta type="version">1.0</meta>
    </metadata>
    <input>
        <schema>
        </schema>
    </input>
    <playbook>
        <pipe-selector>
            <!--
                The engine will affect each action return data to each pipe accumulator in key order.
                If you do not give a pipe accumulator key , the engine will use default pipe accumulator.
                If the key is not found , it will use argumented pipe accumulator.
                -->
            <action-selector pipe-option-key="value" for="parent-pipe-accumulator">
            </action-selector>
            <action-selector>
            </action-selector>
        </pipe-selector>
    </playbook>
</task>

Project schemantics ( to be updated in order of starter projects )

src
    pipes
        main.pipe.ts
    tasks
        main.task.ts
        main.task.xml
    modules
        app.module.ts
main.ts
.gitingore
.env
package.json
tsconig.json
readme.md

#Proxtarctor modules design

@PrxModule({
    // deprecated option
    declarations:[],
    imports:[],
    exports:[],
    // providers in this module
    providers:[]
})
export class MyModule {

}

Available features 11/10/2024

  • Decoraoters system and classes metadata.
  • File store adapters.
  • DataSource adapters
  • Common action , datapipes and services .
  • IOC containers in modular architecture.
  • Task builder.
  • Engine task worker.
  • Pre- Parsing & building tasks.
  • testing tools.
  • Tasks and actions lifecycles
  • Data accumlations in data pipes engine task worker.
  • Routing and server.

Testing features from 11/10/2024

  • file store services.
  • Task Option Multi-selection value options .
  • clarify log and error messages.

Missing features from 11/10/2024

  • @Proxtractor/cli
    • create project command. ( prx new ... )
    • build & run project command. ( prx build & prx start ....)
    • generate project components . ( prx generate(g) pipe(p) | action(a) | task(t) .... )
    • add/install project dependencies. ( prx add ... )

About

Proxtractor core lib module

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •