tb-apps-sdk
Advanced tools
Comparing version 0.6.0-alpha.0 to 0.6.0-alpha.1
{ | ||
"name": "tb-apps-sdk", | ||
"version": "0.6.0-alpha.0", | ||
"version": "0.6.0-alpha.1", | ||
"description": "A sdk for communications between teambiton web and other envs.", | ||
"main": ".", | ||
"scripts": { | ||
"build": "tsc -p ./tsconfig.json", | ||
"publish": "npm run build && cp README.md package.json ./lib && npm publish ./lib", | ||
"build": "rm -rf ./lib && tsc -p ./tsconfig.json", | ||
"publish_sdk": "npm run build && cp README.md package.json ./lib && npm publish ./lib", | ||
"lint": "tslint -c tslint.json src/*.ts --project ./tsconfig.json \"src/**/*.ts\" \"./test/**/*.ts\" -e \"./test/e2e/*.ts\"" | ||
@@ -10,0 +10,0 @@ }, |
@@ -13,3 +13,3 @@ # tb-apps-sdk | ||
```js | ||
npm run publish | ||
npm run publish_sdk | ||
``` | ||
@@ -16,0 +16,0 @@ |
import { RemoteCall } from '../interface'; | ||
export declare const ProcedureTimeout = "Procedure call time out."; | ||
export declare const CrossOrigin = "Execute code error since cross origin."; | ||
export declare const SourceNotFound = "Target source is not found."; | ||
export declare const IncorrectVersion = "API version doest not matched."; | ||
export declare class AppSDK { | ||
@@ -7,0 +3,0 @@ private onPush; |
@@ -5,6 +5,3 @@ "use strict"; | ||
var interface_1 = require("../interface"); | ||
exports.ProcedureTimeout = 'Procedure call time out.'; | ||
exports.CrossOrigin = 'Execute code error since cross origin.'; | ||
exports.SourceNotFound = 'Target source is not found.'; | ||
exports.IncorrectVersion = 'API version doest not matched.'; | ||
var exception_1 = require("../exception"); | ||
var AppSDK = /** @class */ (function () { | ||
@@ -55,3 +52,3 @@ function AppSDK(onPush, timeout) { | ||
else { | ||
connector.reject(new Error(exports.CrossOrigin)); | ||
connector.reject(new Error(exception_1.CrossOrigin)); | ||
} | ||
@@ -86,3 +83,3 @@ } | ||
if (!this.sameOrigin && isIsolated) { | ||
return Promise.reject(new Error(exports.CrossOrigin)); | ||
return Promise.reject(new Error(exception_1.CrossOrigin)); | ||
} | ||
@@ -93,3 +90,3 @@ var connector_1 = Object.create(null); | ||
delete _this.procedures[data_1.requestId]; | ||
reject(new Error(exports.ProcedureTimeout)); | ||
reject(new Error(exception_1.ProcedureTimeout)); | ||
}, _this.timeout); | ||
@@ -110,3 +107,3 @@ var cancelToken = function () { return window.clearTimeout(timeoutId); }; | ||
} | ||
return Promise.reject(new Error(exports.SourceNotFound)); | ||
return Promise.reject(new Error(exception_1.SourceNotFound)); | ||
}; | ||
@@ -113,0 +110,0 @@ AppSDK.prototype.serialize = function (payload) { |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
23542
26
340
0