
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
thisbooleanthisbooleanstringobjectthisthisthisarrayarraybooleanobjectthisAdd a route to be called when the URL changes
Kind: static method of Router
Returns: this - for method chaining
Access: public
| Param | Type | Description |
|---|---|---|
| pattern | regexp | string | A regexp pattern that matches a route against a URL. If passed as a string, beginning and trailing slashes will be stripped before being added to the routes array. |
| callback | function | The callback to execute on a matching route, will be applied with the matched values of the route regexp |
booleanDetermine if the current location is the Application's root
Kind: static property of Router
Access: public
Read only: true
thisAdd a Promise that must resolve before a page (or pages) can load
Kind: static method of Router
Returns: this - for method chaining
Access: public
See: OctanePage
| Param | Type | Description |
|---|---|---|
| page(s) | string | array | The names of pages the condition should be evaluated for |
| deferred | function | A deferred function that will be wrapped in a Promise |
Example
Octane.Router.beforePageLoad('about',function(resove,reject){...});
Remove all routes from the Router
Kind: static method of Router
Access: public
Get the current page of the Application
Kind: static property of Router
Access: public
Read only: true
booleanIs the router locked?
Kind: static property of Router
Access: public
Read only: true
stringLock the Router
Kind: static method of Router
Returns: string - A randomly generated key to unlock the router from THIS lock. Other locks may still be in place.
Access: public
objectGet the mode details of the application
Kind: static property of Router
Returns: object - Returns an object with keys history, hash, and local. Values are booleans
Access: public
Read only: true
thisAdd a callback to the array of callbacks executed when a page has animated offscreen. Callbacks are wrapped in Promises at time of execution.
Kind: static method of Router
Returns: this - for method chaining
Access: public
See: OctanePage
| Param | Type | Description |
|---|---|---|
| page(s) | string | array | The names of pages the callback should execute for |
| callback | function | A callback to execute |
| [argsArray] | array | An array of arguments to be applied to the callback at execution |
| [thisArg] | object | The 'this' value of the callback at execution time, default is the Page object |
thisAdd a callback to the array of callbacks executed when a page has animated onscreen. Callbacks are wrapped in Promises at time of execution.
Kind: static method of Router
Returns: this - for method chaining
Access: public
See: OctanePage
| Param | Type | Description |
|---|---|---|
| page(s) | string | array | The names of pages the callback should execute for |
| callback | function | A callback to execute |
| [argsArray] | array | An array of arguments to be applied to the callback at execution |
| [thisArg] | object | The 'this' value of the callback at execution time, default is the Page object |
Example
// creates new Person with current values of Registrant ViewModel when page 'registrants' is loaded
Octane.Router.onPageLoad('registrants',
addNewPerson,
[octane.get('Registrant.name'),octane.get('Registrant.job')],
Person);
Define a function to call in the event no routes exist on the specified path
Kind: static method of Router
Access: public
thisAdd a predicate condition that must be true for a page(s) to load
Kind: static method of Router
Returns: this - for method chaining
Access: public
See: OctanePage
| Param | Type | Description |
|---|---|---|
| page(s) | string | array | The names of page(s) the condition should be evaluated for |
| predicate | function | A function that should return a truthy or falsy value |
arrayQueued Pages waiting to load during a lock
Kind: static property of Router
Returns: array - the array of queued pages
Access: public
Read only: true
Remove a route from the array of saved routes
Kind: static method of Router
Access: public
| Param | Type | Description |
|---|---|---|
| pattern | regexp | The pattern to remove |
Determine hashing format and page from fragment, then use history.pushState or hashchange to set the route
Kind: static method of Router
Access: public
| Param | Type | Description |
|---|---|---|
| route | string | Root-relative URL fragment to be mapped by Router._executeRoute |
arrayList of routes registered with the Router
Kind: static property of Router
Returns: array - the array of registered routes
Access: public
Read only: true
booleanUnlock the router from a calling of Router.lock.
If the Router is locked, then after X number of failed unlocked attempts in a row,
the Router will lock out and the Application will need to be restarted.
Number of attempts can be set at Octane.initialize via appConfig.maxConsecutiveAllowedRouterUnlockAttemps, or defaults to 10
Kind: static method of Router
Returns: boolean - false if key is invalid or more locks remain, otherwise true and loads pages queued during lock
Throws:
Error thrown when the maximum number of consecutive failed unlocks is attempted. Router becomes permanently locked and Application will need restarted (prevent brute force unlocks)Access: public
| Param | Type | Description |
|---|---|---|
| key | string | The key returned from Router.lock to unlock the lock it placed. Other locks may still be in place. |
objectHelper to parse URL's search string into an object
Kind: static method of Router
Returns: object - an object of search parameters
Access: public
Example
Router.urlSearchObject("http://yoursite.com?pawns=5&kings=1")
=> {kings: 1, pawns: 5}
Update App state on URL change. Turns off polling interval if set. Octane calls this during initilization, unless overridden by appConfig.legacyRouting: true.
Kind: static method of Router
Access: public
Set fallback to use polling in case popstate/hashchange is being finicky. Drops popstate or hashchange event listeners.
Kind: static method of Router
Access: public
FAQs
MVCVM UI-Routing app framework with uni-directional dataflow
We found that octane demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.