Skip to content

Commit

Permalink
🔖 v1.0.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
agea committed Feb 19, 2018
1 parent 85f69f9 commit 071860e
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
1 change: 1 addition & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './src/cmis';
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
var cmis = require('./dist/cmis').cmis;
for (var ex in cmis){
exports[ex] = cmis[ex];
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"title": "CmisJS",
"name": "cmis",
"version": "1.0.0-beta1",
"version": "1.0.0",
"homepage": "http://github.com/agea/CmisJS",
"description": "a CMIS client library written in Typescript for node and the browser",
"author": {
Expand Down
16 changes: 15 additions & 1 deletion src/cmis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ export namespace cmis {
private options: Options = { succinct: true };
public defaultRepository: any;
public repositories: Array<any>;
private charset: string;



Expand Down Expand Up @@ -276,6 +277,10 @@ export namespace cmis {
formData.append(k, '' + body[k]);
}

if (this.charset){
formData.append('_charset_',this.charset);
}

cfg.body = formData;
} else {
let usp = new URLSearchParams();
Expand Down Expand Up @@ -341,7 +346,7 @@ export namespace cmis {
* sets token for authentication
*/
public setToken(token: string): CmisSession {
this.options.token = token;
this.token = token;
return this;
}

Expand All @@ -355,6 +360,15 @@ export namespace cmis {
return this;
}

/**
* IN HTML5, the character set to use for non-file fields can
* be specified in a multipart by using a _charset_ field.
* https://dev.w3.org/html5/spec-preview/attributes-common-to-form-controls.html#attr-fe-name-charset
*/
public setCharset(charset:string):CmisSession {
this.charset = charset;
return this;
}

/**
* sets global error handler
Expand Down

0 comments on commit 071860e

Please sign in to comment.