npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

squiz

v0.1.1

Published

### A Node.js module for interacting with the Squiz Matrix CMS. ###

Downloads

3

Readme

node-squiz

A Node.js module for interacting with the Squiz Matrix CMS.

This module will allow core-level Squiz Matrix functions over the Simple Object Access Protocol (SOAP), allowing third-party applications to create, modify and retrieve content within the system. But its not just that, this module provides more tailored functions to suit specific needs which usually are a huge problem to get around. Everything has been designed in easy-to-use way, so you haven't got to be a Node.js expert.

Installation

Node.js

Install the NPM module and save it as a dependence in your package.json:

npm install --save squiz

Now that's done, you'll be able to require this module in a Node script - let's create an app.js file:

var squiz = require("squiz");

Having problems?: Make sure you have Node.js >= v.0.10 installed on your machine, use node -v to find out.

Squiz

You will need to setup a SOAP Server if you haven't already got one to use. To add a SOAP Server, in the Add menu, go to Web Services -> SOAP Server. Once this is added, enable the SOAP Server and make sure it is Live (Also check permission levels).

Once the above is done, get the webpath for the SOAP Server and append ?WSDL to the end like so:

https://hostname/path/to/soap_server?WSDL

Great! The Soap Server now just needs to have some enabled services setup, choose from the below services and follow the instructions:

Make sure everything is enabled, regenerate your WSDL and you are done!

Note: We are in early days and some of the above services may have missing functionality.

Usage

Connection

// Connection to the Squiz soap server
var soap = squiz({
    // Your squiz host
    host  : "hostname",
    // Path to your WDSL file
    wdsl  : "/path/to/soap_server?WSDL",
    // Basic authentication
    auth  : "htpasswd",
    // The asset id of the parent which will hold everything
    parent: 1181394
}); 

You will then need to create a htpasswd file consisting of your username and password, i.e username:password

.createAsset( file, options, [callback] )

Creates an asset

file: String

options: Array

soap.createAsset("my/precious.html", {
  name: "different because im cool"
}, function(assetCreated) {

  console.log(assetCreated);

});

.upload( file, assetId, [callback] )

Uploads a file to a specific asset.

file: String

assetId: Object

soap.upload("my/precious.html", {
   id: 20000
}, function(assetUploaded) {

   console.log(assetUploaded);

});

.batch( files, [callback] )

Inserts a batch of files into Squiz, regardless if the asset is currently present in Squiz or not.

files: Array

// Get these files into squiz!
soap.batch([{
  "name": "myfile.txt"
}], function(response) {

  console.log(response);

});