New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

krl-parser

Package Overview
Dependencies
Maintainers
2
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

krl-parser - npm Package Versions

1
10

0.12.7

Diff

farskipper
published 0.12.6 •

farskipper
published 0.12.5 •

Changelog

Source

0.12.5 - June 5, 2017

Bug Fixes

  • .put() should create nested maps, even if keys are numeric - see issue #204
farskipper
published 0.12.4 •

Changelog

Source

0.12.4 - June 2, 2017

Bug Fixes

  • fixing race condition with schedule .. at - see issue #203
farskipper
published 0.12.3 •

Changelog

Source

0.12.3 - June 2, 2017

Bug Fixes

  • fixing race condition with schedule .. at - see issue #203
  • better error handling for /sky/cloud/.. - see issue #32
farskipper
published 0.12.2 •

Changelog

Source

0.12.2 - May 31, 2017

New Features

  • infix operators: like, <=>, cmp - see issue #183

Bug Fixes

  • better startup error handling - see issue #112
  • consistent casting of key paths - see issue #152
  • better as("Number") - see issue #173
  • better string concatenation rules - see issues #185 and #155
  • report error when action used in pre block - see issues #187
  • using keys:<key> in global - see issues #132
farskipper
published 0.12.1 •

Changelog

Source

0.12.1 - May 26, 2017

New Features

  • random:uuid() - return a globally unique id (using cuid)

  • random:word() - return a random english word

  • random:integer(lower = 0, upper = 1) - return a random integer between lower and upper

  • random:number(lower = 0, upper = 1) - return a random number (float) between lower and upper

  • if event.eid == "none" or is not given, it will default to a uuid

  • event:send(event, host = null) - now when given a host string, it will send an async http sky/event request to that engine

  • better syntax for choose making the action block syntax consistent.

ActionBlock ->
      (if <expr> then)? <Actions>

Actions ->
      <action> ;
    | every         { <action 0> ; <action 1> ; ... }
    | sample        { <action 0> ; <action 1> ; ... }
    | choose <expr> { <action 0> ; <action 1> ; ... }

Bug Fixes

  • event:attr(name) - see issue #179
farskipper
published 0.12.0 •

Changelog

Source

0.12.0 - May 25, 2017

New Features

  • defaction can return values (expose values to setting(..))
<name> = defaction(<params...>){
     <declaration 0>
     <declaration 1>
     ...

     <action block (i.e. anything you would put in a rule action)>

    returns <expr 0>, <expr 1>, ...
}

NOTE: returns is optional

For example

global {
    foo = defaction(){

        send_directive("foobar")

        returns 1, 2, 3
    }
}
rule bar {
    select when ...

    foo() setting(a, b, c)

    fired {
        //a = 1, b = 2, c = 3
    }
}

Another example

global {
    foo = defaction(){
        every {
            http:get(...) setting(resp)
        }
        return resp["content"].decode()["msg"]
    }
}
rule bar {
    select when ...

    foo() setting(message)
}
  • new action block type: sample This will randomly select an action to run.
rule bar {
    select when ...

    //randomly pick one of these 3 actions to run
    sample {
        send_directive("foo")

        send_directive("bar")

        send_directive("baz")
    }
}
  • action block syntax. The semi-colons are optional.
ActionBlock ->
      <action> ;
    | if <expr> then <action> ;
    | if <expr> then every  { <action 0> ; <action 1> ; ... }
    | if <expr> then sample { <action 0> ; <action 1> ; ... }
    | every  { <action 0> ; <action 1> ; ... }
    | sample { <action 0> ; <action 1> ; ... }
    | choose <expr> { <action 0> ; <action 1> ; ... }

BREAKING CHANGES

  • with is no longer used for named arguments. Both for functions and actions.
//OLD WAY
foo(1, 2) with a = 3 and b = 4

//NEW WAY
foo(1, 2, a = 3, b = 4)
  • with is no longer used on raise/schedule
//OLD WAY
raise domain event "type" with foo = 1 and bar = 2

//NEW WAY
raise domain event "type" attributes {"foo": 1, "bar": 2}
  • send_directive no longer uses with it's now send_directive(name, options = {})
//OLD WAY
send_directive("name") with foo = x and bar = y

//NEW WAY
send_directive("name", {"foo": x, "bar": y})
  • No optional semi-colon after select when ...
//OLD WAY
select when foo bar;

//NEW WAY
select when foo bar

Bug Fixes

  • syntax ambiguities caused by with
farskipper
published 0.11.1 •

farskipper
published 0.11.0 •

Changelog

Source

0.11.0 - May 20, 2017

New Features

  • defaction can do anything a rule action can
<name> = defaction(<params...>){
     <declaration 0>
     <declaration 1>
     ...
     <action block (i.e. anything you would put in a rule action)>
}

For example

chooser = defaction(val){

    baz = "hello"
    qux = "bye"

    choose val {
        asdf =>
            foo(val)
        fdsa =>
            bar(val, "ok", "done")
    }
}
  • default parameters for function and defaction (no more configure using)
foo = function(bar = 2, baz = bar + 3){
    bar + baz
}

//-or- when it gets too long
foo = function(
    bar = 2,
    baz = bar + 3,
    qux = 4,
    quux = blah(qux),
){
   ...
}


//defaction parameters work the same way as functions

BREAKING CHANGES

  • You can no longer use actions as functions
//the following are now actions and cannot be used as a function
engine:newPico
engine:removePico
engine:newChannel
engine:removeChannel
engine:registerRuleset
engine:unregisterRuleset
engine:installRuleset
engine:uninstallRuleset
event:send
schedule:remove

Bug Fixes

  • re-registering rulesets breaks the schedule order
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