Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions iis.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
declare interface Callback {
(error: Error, stdout: string, stderr: string): void;
}

declare namespace IIS {
export function setDefaults(): void;

export function createSite(options: { name?: string; protocol?: 'http' | string, host?: string, port?: number; }, cb: Callback): void;

export function deleteSite(name: string, cb: Callback): void;


export function stopSite(name: string, cb: Callback): void;

export function startSite(name: string, cb: Callback): void;

/**
* Create app pool, also set app pool identity of object {name:,identity:} passed
* @param options
* @param cb
*/
export function createAppPool(options: { name: string; identity?: string; } | string, cb: Callback): void;

export function recycleAppPool(name: string, cb: Callback): void;

export function deleteAppPool(name: string, cb: Callback): void;

export function stopAppPool(name: string, cb: Callback): void;

export function mapAppPool(app_name: string, pool_name: string, cb: Callback): void;

export function setAppPoolIdentity(pool_name: string, identity: string, cb: Callback): void;

export function createAppFolder(options: { site?: string; virtual_path: string; physical_path: string; }, cb: Callback): void;

export function deleteAppFolder(options: { site?: string; virtual_path: string; }, cb: Callback): void;

export function unlockSection(section: string, cb: Callback): void;

export function setWindowsAuthentication(appPath: string, enable: boolean, cb: Callback): void;

export function setAnonymousAuthentication(appPath: string, enable: boolean, cb: Callback): void;

export function list(type: string, cb: Callback): void;

export function exists(type: string, name: string, cb?: (exits: boolean) => void): void;

export function setFilePermissions(path: string, account: string, cb: Callback): void;

/**
* Set the physical path web site maps to
* @param site_name
*/
export function setPhysicalPath(site_name: string, path: string, cb: Callback): void;

/**
* Get the physical path web site maps to
* @param site_name
*/
export function getPhysicalPath(site_name: string, cb: Callback): void;
}

export = IIS
12 changes: 12 additions & 0 deletions iis.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,18 @@ var IIS = function() {
cb(err,"App " + (options.site || self.last_site) + '/' + options.virtual_path + " already exists");
}});

},
deleteAppFolder : function(options,cb) {
var self = this;
self.exists('app',(options.site || this.last_site) + '/' + options.virtual_path,function(err,tf) {
if (tf) {
var deleteapp_cmd = ' delete app "' + (options.site || self.last_site) + '/' + options.virtual_path + '"';
exec(self.appcmd + deleteapp_cmd,cb);
}
else {
cb(err,"App " + (options.site || self.last_site) + '/' + options.virtual_path + " does not exist");
}});

},
unlockSection : function(section,cb) {
var unlock_cmd = " unlock config /section:" + section;
Expand Down
42 changes: 21 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
{
"name" : "iis",
"description" : "administer iis 7 on windows",
"name": "iis",
"description": "administer iis 7 on windows",
"author": "Integrify Inc. <info@integrify.com>",
"maintainers": [
"maintainers": [
"pdillon <pdillon@integrify.com>"
],
"version" : "0.2.0",
"repository" : {
"type" : "git",
"url" : "https://github.com/Integrify/node-iis.git"
],
"version": "0.2.0",
"repository": {
"type": "git",
"url": "https://github.com/Integrify/node-iis.git"
},
"main" : "iis.js",
"main": "iis.js",
"typings": "iis.d.ts",
"scripts": {
"test": "node tests/run.js"
},
"keywords" : [
"keywords": [
"iis",
"windows",
"microsoft"
],
"directories" : {
"example" : "example"
"directories": {
"example": "example"
},
"dependencies" : {
"underscore" : "~1",
"xml2js" : "0.1.14"

"dependencies": {
"underscore": "~1",
"xml2js": "0.1.14"
},
"devDependencies" : {
"async" : "0.1.x"
"devDependencies": {
"async": "0.1.x"
},
"engines" : {
"node" : ">=0.8.0"
"engines": {
"node": ">=0.8.0"
}
}
}