diff --git a/package.json b/package.json index 8d25faee..a9d3d76f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jupyter-js-services", - "version": "0.0.1", + "version": "0.1.0", "description": "Client APIs for the Jupyter services REST APIs", "main": "lib/index.js", "typings": "lib/index.d.ts", diff --git a/src/contents.ts b/src/contents.ts index 3d125fe9..150cf6cd 100644 --- a/src/contents.ts +++ b/src/contents.ts @@ -38,13 +38,13 @@ interface IContentsOpts { format?: string; /** - * The file contents, or whether to include the file contents. + * The file content, or whether to include the file contents. * * #### Notes - * Can either contain the contents of a file for upload, or a boolean + * Can either contain the content of a file for upload, or a boolean * indicating whether to include contents in the response. */ - content?: string | boolean; + content?: any; /** * The file extension, including a leading `.`. @@ -118,7 +118,7 @@ interface IContentsModel { /** * The file content. */ - content?: string; + content?: any; /** * The format of the file `content`. diff --git a/src/validate.ts b/src/validate.ts index ade96db5..35a906fc 100644 --- a/src/validate.ts +++ b/src/validate.ts @@ -36,14 +36,12 @@ export function validateCommMessage(msg: IKernelMessage): boolean { for (var i = 0; i < COMM_FIELDS.length; i++) { if (!msg.content.hasOwnProperty(COMM_FIELDS[i])) { - console.log('*****invalid', COMM_FIELDS[i]); return false; } } if (msg.header.msg_type === 'comm_open') { if (!msg.content.hasOwnProperty('target_name') || typeof msg.content.target_name !== 'string') { - console.log('***TARGET NAME'); return false; } if (msg.content.hasOwnProperty('target_module') && @@ -53,7 +51,6 @@ function validateCommMessage(msg: IKernelMessage): boolean { } } if (typeof msg.content.comm_id !== 'string') { - console.log("COMM_ID") return false; } return true;