Skip to content

Commit d9ed236

Browse files
committed
[FIX] remove console log and fix error when build
1 parent f90dee3 commit d9ed236

15 files changed

+1250
-7
lines changed

index.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"use strict";
2+
function __export(m) {
3+
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
4+
}
5+
__export(require("./odoorpc.service"));

index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "./odoorpc.service";

npm-debug.log

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
0 info it worked if it ends with ok
2+
1 verbose cli [ '/usr/bin/nodejs',
3+
1 verbose cli '/usr/bin/npm',
4+
1 verbose cli 'search',
5+
1 verbose cli '@angular/typings' ]
6+
2 info using [email protected]
7+
3 info using [email protected]
8+
4 silly mapToRegistry name -/all
9+
5 silly mapToRegistry using default registry
10+
6 silly mapToRegistry registry https://registry.npmjs.org/
11+
7 silly mapToRegistry data Result {
12+
7 silly mapToRegistry raw: '-/all',
13+
7 silly mapToRegistry scope: null,
14+
7 silly mapToRegistry escapedName: null,
15+
7 silly mapToRegistry name: null,
16+
7 silly mapToRegistry rawSpec: '-/all',
17+
7 silly mapToRegistry spec: '-/all',
18+
7 silly mapToRegistry type: 'local' }
19+
8 silly mapToRegistry uri https://registry.npmjs.org/-/all
20+
9 info updateIndex /home/quang/.npm/registry.npmjs.org/-/all/.cache.json
21+
10 verbose correctMkdir /home/quang/.npm correctMkdir not in flight; initializing
22+
11 verbose stack TypeError: Cannot read property '_updated' of undefined
23+
11 verbose stack at /usr/lib/node_modules/npm/lib/cache/update-index.js:61:26
24+
11 verbose stack at /usr/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:210:7
25+
11 verbose stack at FSReqWrap.oncomplete (fs.js:123:15)
26+
12 verbose cwd /home/quang/Working/quang/github/angular2-odoo-jsonrpc
27+
13 error Linux 4.4.0-31-generic
28+
14 error argv "/usr/bin/nodejs" "/usr/bin/npm" "search" "@angular/typings"
29+
15 error node v6.3.0
30+
16 error npm v3.10.3
31+
17 error Cannot read property '_updated' of undefined
32+
18 error If you need help, you may report this error at:
33+
18 error <https://github.com/npm/npm/issues>
34+
19 verbose exit [ 1, true ]

odoorpc.service.js

-3
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ var OdooRPCService = (function () {
6464
OdooRPCService.prototype.handleOdooErrors = function (response) {
6565
response = response.json();
6666
if (!response.error) {
67-
console.log(response.result);
6867
return response.result;
6968
}
7069
var error = response.error;
@@ -106,11 +105,9 @@ var OdooRPCService = (function () {
106105
errorObj.message = error.data.debug.replace(/\n/g, "<br />");
107106
}
108107
}
109-
console.log(errorObj);
110108
return Promise.reject(errorObj);
111109
};
112110
OdooRPCService.prototype.handleHttpErrors = function (error) {
113-
console.error("An error occurred", error);
114111
return Promise.reject(error.message || error);
115112
};
116113
OdooRPCService.prototype.init = function (configs) {

odoorpc.service.ts

-3
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ export class OdooRPCService {
6767
private handleOdooErrors(response: any) {
6868
response = response.json();
6969
if (!response.error) {
70-
console.log(response.result);
7170
return response.result;
7271
}
7372

@@ -107,12 +106,10 @@ export class OdooRPCService {
107106
errorObj.message = error.data.debug.replace(/\n/g, "<br />");
108107
}
109108
}
110-
console.log(errorObj);
111109
return Promise.reject(errorObj);
112110
}
113111

114112
private handleHttpErrors(error: any) {
115-
console.error("An error occurred", error);
116113
return Promise.reject(error.message || error);
117114
}
118115

tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"target": "es5",
55
"noImplicitAny": false,
66
"sourceMap": false,
7-
"experimentalDecorators": false
7+
"experimentalDecorators": true
88
},
99
"exclude": [
1010
"node_modules"

typings.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"dependencies": {},
3+
"devDependencies": {},
4+
"globalDependencies": {
5+
"es6-shim": "github:DefinitelyTyped/DefinitelyTyped/es6-shim/es6-shim.d.ts#4de74cb527395c13ba20b438c3a7a419ad931f1c",
6+
"jasmine": "github:DefinitelyTyped/DefinitelyTyped/jasmine/jasmine.d.ts#dd638012d63e069f2c99d06ef4dcc9616a943ee4",
7+
"zone.js": "github:DefinitelyTyped/DefinitelyTyped/zone.js/zone.js.d.ts#9027703c0bd831319dcdf7f3169f7a468537f448"
8+
}
9+
}

typings/browser.d.ts

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/// <reference path="globals/es6-shim/index.d.ts" />
2+
/// <reference path="globals/jasmine/index.d.ts" />
3+
/// <reference path="globals/zone.js/index.d.ts" />

0 commit comments

Comments
 (0)