AxLoaderGen

Development server and patch generator for the AxLoader library.

Summary
AxLoaderGenDevelopment server and patch generator for the AxLoader library.
Functions
makeArchiveBuilds a archive based on a configuration.
getFilename
diffArchivesCreates a new archive that contains all the files in b that are not in a or have changed since a, and has it’s comment set to metadata the same as that in a except the patchVersion property, which will be the version of a, and the removedFiles property which contains a list of files in a but not in b.
saveArchiveSaves a archive file to disk.
sendArchiveSends the archive file to a response object.
archiveRequestHandlerThe request handler for generating and serving archives.
getAxLoaderInfoReturns the object that goes into the _axloaderInfo file.
getPatchableVersionsReturns a list of the avalible base versions for a given folder.
getBestVersionTakes a list of the avalible filenames and returns an integer version number that represents the highest version.
areBuffersEqualRetruns true of two buffers are equal.
addToIndexAdds an item to the index object.
generateGenerates the base versions and any patches needed.
devServerStarts a server for development.
testserverStarts a server for testing patching.

Functions

makeArchive

function makeArchive(genconf)

Builds a archive based on a configuration.

Parameters

genconf(Obejct) the configuration.

Returns

(QuickArchive) A archive object.

getFilename

function getFilename(folder,
patchversion,
version)

diffArchives

function diffArchives(a,
b)

Creates a new archive that contains all the files in b that are not in a or have changed since a, and has it’s comment set to metadata the same as that in a except the patchVersion property, which will be the version of a, and the removedFiles property which contains a list of files in a but not in b.

Parameters

a(QuickArchive) The old version we want to generate a patch from.
b(QuickArchive) The new version we want to generate a patch to.

Returns

(QuickArchive) The patch.

saveArchive

function saveArchive(genconf,
buffer)

Saves a archive file to disk.

Parameters

genconf(Object) The config for this file.
buffer(Buffer) The buffer to save.

sendArchive

function sendArchive(buffer,
res)

Sends the archive file to a response object.

Parameters

buffer(Buffer) - The buffer to send.
res(Response) - The http response object.

archiveRequestHandler

function archiveRequestHandler(genconf,
req,
res)

The request handler for generating and serving archives.

Parameters

genconf(Object) The config.
req(Request) The http request.
res(Response) The http response.

getAxLoaderInfo

function getAxLoaderInfo(folder)

Returns the object that goes into the _axloaderInfo file.

Parameters

folder(string) The name of the folder.

Returns

(Object) The default config for the folder.

getPatchableVersions

function getPatchableVersions(folder,
index)

Returns a list of the avalible base versions for a given folder.

Parameters

folder(string) The name of the source folder.
indexThe index file.

Returns

(Object) A list of base versions.

getBestVersion

function getBestVersion(versions)

Takes a list of the avalible filenames and returns an integer version number that represents the highest version.  Debug versions have a version number of -1.

Parameters

versions(Object) An object containing the version propeties.

Returns

(number) The best version number.

areBuffersEqual

function areBuffersEqual(a,
b)

Retruns true of two buffers are equal.

addToIndex

function addToIndex(index,
folder,
patchversion,
version,
filename)

Adds an item to the index object.

generate

function generate(c)

Generates the base versions and any patches needed.  This function is slow and synchronous.

devServer

Starts a server for development.

testserver

function testserver(c)

Starts a server for testing patching.

function makeArchive(genconf)
Builds a archive based on a configuration.
function getFilename(folder,
patchversion,
version)
function diffArchives(a,
b)
Creates a new archive that contains all the files in b that are not in a or have changed since a, and has it’s comment set to metadata the same as that in a except the patchVersion property, which will be the version of a, and the removedFiles property which contains a list of files in a but not in b.
function saveArchive(genconf,
buffer)
Saves a archive file to disk.
function sendArchive(buffer,
res)
Sends the archive file to a response object.
function archiveRequestHandler(genconf,
req,
res)
The request handler for generating and serving archives.
function getAxLoaderInfo(folder)
Returns the object that goes into the _axloaderInfo file.
function getPatchableVersions(folder,
index)
Returns a list of the avalible base versions for a given folder.
function getBestVersion(versions)
Takes a list of the avalible filenames and returns an integer version number that represents the highest version.
function areBuffersEqual(a,
b)
Retruns true of two buffers are equal.
function addToIndex(index,
folder,
patchversion,
version,
filename)
Adds an item to the index object.
function generate(c)
Generates the base versions and any patches needed.
function testserver(c)
Starts a server for testing patching.
Close