Comparing version 0.1.1 to 0.1.2
@@ -1,2 +0,2 @@ | ||
[@vkid/sdk - v0.1.1](../README.md) / [Modules](../modules.md) / [auth](../modules/auth.md) / Auth | ||
[@vkid/sdk - v0.1.2](../README.md) / [Modules](../modules.md) / [auth](../modules/auth.md) / Auth | ||
@@ -3,0 +3,0 @@ # Class: Auth |
@@ -1,2 +0,2 @@ | ||
[@vkid/sdk - v0.1.1](../README.md) / [Modules](../modules.md) / [core/config](../modules/core_config.md) / Config | ||
[@vkid/sdk - v0.1.2](../README.md) / [Modules](../modules.md) / [core/config](../modules/core_config.md) / Config | ||
@@ -3,0 +3,0 @@ # Class: Config |
@@ -1,2 +0,2 @@ | ||
[@vkid/sdk - v0.1.1](../README.md) / [Modules](../modules.md) / [widgets/oneTap](../modules/widgets_oneTap.md) / OneTap | ||
[@vkid/sdk - v0.1.2](../README.md) / [Modules](../modules.md) / [widgets/oneTap](../modules/widgets_oneTap.md) / OneTap | ||
@@ -3,0 +3,0 @@ # Class: OneTap |
@@ -1,2 +0,2 @@ | ||
[@vkid/sdk - v0.1.1](../README.md) / [Modules](../modules.md) / [auth](../modules/auth.md) / AuthErrorCode | ||
[@vkid/sdk - v0.1.2](../README.md) / [Modules](../modules.md) / [auth](../modules/auth.md) / AuthErrorCode | ||
@@ -3,0 +3,0 @@ # Enumeration: AuthErrorCode |
@@ -1,2 +0,2 @@ | ||
[@vkid/sdk - v0.1.1](../README.md) / [Modules](../modules.md) / [widgets/oneTap](../modules/widgets_oneTap.md) / OneTapPublicEvents | ||
[@vkid/sdk - v0.1.2](../README.md) / [Modules](../modules.md) / [widgets/oneTap](../modules/widgets_oneTap.md) / OneTapPublicEvents | ||
@@ -3,0 +3,0 @@ # Enumeration: OneTapPublicEvents |
@@ -1,2 +0,2 @@ | ||
[@vkid/sdk - v0.1.1](../README.md) / [Modules](../modules.md) / [auth](../modules/auth.md) / AuthError | ||
[@vkid/sdk - v0.1.2](../README.md) / [Modules](../modules.md) / [auth](../modules/auth.md) / AuthError | ||
@@ -3,0 +3,0 @@ # Interface: AuthError |
@@ -1,2 +0,2 @@ | ||
[@vkid/sdk - v0.1.1](../README.md) / [Modules](../modules.md) / [auth](../modules/auth.md) / AuthParams | ||
[@vkid/sdk - v0.1.2](../README.md) / [Modules](../modules.md) / [auth](../modules/auth.md) / AuthParams | ||
@@ -22,3 +22,3 @@ # Interface: AuthParams | ||
• `Optional` **lang**: `Languages` | ||
• `Optional` **lang**: [`Languages`](../enums/types.Languages.md) | ||
@@ -25,0 +25,0 @@ Локализация, в которой будет отображена страница авторизации |
@@ -1,2 +0,2 @@ | ||
[@vkid/sdk - v0.1.1](../README.md) / [Modules](../modules.md) / [auth](../modules/auth.md) / AuthResponse | ||
[@vkid/sdk - v0.1.2](../README.md) / [Modules](../modules.md) / [auth](../modules/auth.md) / AuthResponse | ||
@@ -3,0 +3,0 @@ # Interface: AuthResponse |
@@ -1,2 +0,2 @@ | ||
[@vkid/sdk - v0.1.1](../README.md) / [Modules](../modules.md) / [core/config](../modules/core_config.md) / ConfigData | ||
[@vkid/sdk - v0.1.2](../README.md) / [Modules](../modules.md) / [core/config](../modules/core_config.md) / ConfigData | ||
@@ -3,0 +3,0 @@ # Interface: ConfigData |
@@ -1,2 +0,2 @@ | ||
[@vkid/sdk - v0.1.1](../README.md) / [Modules](../modules.md) / [widgets/oneTap](../modules/widgets_oneTap.md) / OneTapParams | ||
[@vkid/sdk - v0.1.2](../README.md) / [Modules](../modules.md) / [widgets/oneTap](../modules/widgets_oneTap.md) / OneTapParams | ||
@@ -40,3 +40,3 @@ # Interface: OneTapParams | ||
• `Optional` **lang**: `Languages` | ||
• `Optional` **lang**: [`Languages`](../enums/types.Languages.md) | ||
@@ -81,4 +81,4 @@ Локализация | ||
• `Optional` **styles**: `OneTapStyles` | ||
• `Optional` **styles**: [`OneTapStyles`](widgets_oneTap.OneTapStyles.md) | ||
Настройки внешнего вида |
@@ -1,4 +0,4 @@ | ||
[@vkid/sdk - v0.1.1](README.md) / Modules | ||
[@vkid/sdk - v0.1.2](README.md) / Modules | ||
# @vkid/sdk - v0.1.1 | ||
# @vkid/sdk - v0.1.2 | ||
@@ -11,2 +11,4 @@ ## Table of contents | ||
- [core/config](modules/core_config.md) | ||
- [types](modules/types.md) | ||
- [widgets/oauthList](modules/widgets_oauthList.md) | ||
- [widgets/oneTap](modules/widgets_oneTap.md) |
@@ -1,2 +0,2 @@ | ||
[@vkid/sdk - v0.1.1](../README.md) / [Modules](../modules.md) / auth | ||
[@vkid/sdk - v0.1.2](../README.md) / [Modules](../modules.md) / auth | ||
@@ -3,0 +3,0 @@ # Module: auth |
@@ -1,2 +0,2 @@ | ||
[@vkid/sdk - v0.1.1](../README.md) / [Modules](../modules.md) / core/config | ||
[@vkid/sdk - v0.1.2](../README.md) / [Modules](../modules.md) / core/config | ||
@@ -3,0 +3,0 @@ # Module: core/config |
@@ -1,2 +0,2 @@ | ||
[@vkid/sdk - v0.1.1](../README.md) / [Modules](../modules.md) / widgets/oneTap | ||
[@vkid/sdk - v0.1.2](../README.md) / [Modules](../modules.md) / widgets/oneTap | ||
@@ -18,1 +18,2 @@ # Module: widgets/oneTap | ||
- [OneTapParams](../interfaces/widgets_oneTap.OneTapParams.md) | ||
- [OneTapStyles](../interfaces/widgets_oneTap.OneTapStyles.md) |
@@ -54,3 +54,3 @@ @vkid/sdk / [Modules](modules.md) | ||
```html | ||
<script src="https://unpkg.com/@vkid/sdk/dist/index-umd.js"></script> | ||
<script src="https://unpkg.com/@vkid/sdk@latest/dist-sdk/umd/index.js"></script> | ||
``` | ||
@@ -57,0 +57,0 @@ |
@@ -77,2 +77,3 @@ # Code Style | ||
+ Используйте описательные имена классов, отражающие их назначение и роль в системе. | ||
+ Используйте интерфейсы для описания объектов | ||
@@ -79,0 +80,0 @@ ```typescript |
@@ -70,3 +70,3 @@ 'use strict'; | ||
_define_property(this, "login", function(params) { | ||
var _params, _params1; | ||
var _params, _params1, _params2; | ||
_this.dataService = new authDataService.AuthDataService(); | ||
@@ -77,3 +77,4 @@ var queryParams = { | ||
origin: location.protocol + "//" + location.hostname, | ||
response_type: constants.AUTH_RESPONSE_TOKEN | ||
response_type: constants.AUTH_RESPONSE_TOKEN, | ||
action: ((_params2 = params) === null || _params2 === void 0 ? void 0 : _params2.action) ? btoa(JSON.stringify(params.action)) : undefined | ||
}; | ||
@@ -80,0 +81,0 @@ var url$1 = url.getVKIDUrl("auth", queryParams, _this.config.get()); |
'use strict'; | ||
// @ts-ignore-next-line пробрасываем версию из package.json в rollup.config | ||
var VERSION = "0.1.1"; | ||
var VERSION = "0.1.2"; | ||
// @ts-ignore-next-line пробрасываем тип сборки из rollup.config | ||
@@ -6,0 +6,0 @@ var DOMAIN = "vk.com"; |
@@ -39,5 +39,15 @@ 'use strict'; | ||
}; | ||
var isNotEmptyOAuthList = function(param) { | ||
var _param; | ||
return { | ||
result: ((_param = param) === null || _param === void 0 ? void 0 : _param.length) && param.length >= 1, | ||
makeError: function() { | ||
return "OAuth list can't be empty"; | ||
} | ||
}; | ||
}; | ||
exports.isNotEmptyOAuthList = isNotEmptyOAuthList; | ||
exports.isNumber = isNumber; | ||
exports.isRequired = isRequired; | ||
exports.isValidHeight = isValidHeight; |
@@ -10,7 +10,10 @@ 'use strict'; | ||
var events$1 = require('./widgets/oneTap/events.js'); | ||
var oauthList = require('./widgets/oauthList/oauthList.js'); | ||
var types$1 = require('./widgets/oauthList/types.js'); | ||
var events$2 = require('./widgets/oauthList/events.js'); | ||
var globalConfig = new config.Config(); | ||
auth.Auth.__config = globalConfig; | ||
/** Export Auth */ auth.Auth.__config = globalConfig; | ||
var globalAuth = new auth.Auth(); | ||
widget.Widget.__config = globalConfig; | ||
/** Export Core Widget */ widget.Widget.__config = globalConfig; | ||
widget.Widget.__auth = globalAuth; | ||
@@ -31,3 +34,12 @@ | ||
}); | ||
exports.OAuthList = oauthList.OAuthList; | ||
Object.defineProperty(exports, 'OAuthName', { | ||
enumerable: true, | ||
get: function () { return types$1.OAuthName; } | ||
}); | ||
Object.defineProperty(exports, 'OAuthListPublicEvents', { | ||
enumerable: true, | ||
get: function () { return events$2.OAuthListPublicEvents; } | ||
}); | ||
exports.Auth = globalAuth; | ||
exports.Config = globalConfig; |
@@ -55,3 +55,4 @@ import { isDomainAllowed } from '../utils/domain.js'; | ||
origin: location.protocol + '//' + location.hostname, | ||
response_type: AUTH_RESPONSE_TOKEN | ||
response_type: AUTH_RESPONSE_TOKEN, | ||
action: params?.action ? btoa(JSON.stringify(params.action)) : undefined | ||
}; | ||
@@ -58,0 +59,0 @@ const url = getVKIDUrl('auth', queryParams, this.config.get()); |
// @ts-ignore-next-line пробрасываем версию из package.json в rollup.config | ||
const VERSION = "0.1.1"; | ||
const VERSION = "0.1.2"; | ||
// @ts-ignore-next-line пробрасываем тип сборки из rollup.config | ||
@@ -4,0 +4,0 @@ const DOMAIN = 'vk.com'; |
@@ -27,3 +27,9 @@ const isRequired = (param)=>{ | ||
}; | ||
const isNotEmptyOAuthList = (param)=>{ | ||
return { | ||
result: param?.length && param.length >= 1, | ||
makeError: ()=>'OAuth list can\'t be empty' | ||
}; | ||
}; | ||
export { isNumber, isRequired, isValidHeight }; | ||
export { isNotEmptyOAuthList, isNumber, isRequired, isValidHeight }; |
@@ -8,9 +8,12 @@ import { Auth } from './auth/auth.js'; | ||
export { OneTapPublicEvents } from './widgets/oneTap/events.js'; | ||
export { OAuthList } from './widgets/oauthList/oauthList.js'; | ||
export { OAuthName } from './widgets/oauthList/types.js'; | ||
export { OAuthListPublicEvents } from './widgets/oauthList/events.js'; | ||
const globalConfig = new Config(); | ||
Auth.__config = globalConfig; | ||
/** Export Auth */ Auth.__config = globalConfig; | ||
const globalAuth = new Auth(); | ||
Widget.__config = globalConfig; | ||
/** Export Core Widget */ Widget.__config = globalConfig; | ||
Widget.__auth = globalAuth; | ||
export { globalAuth as Auth, globalConfig as Config }; |
@@ -12,2 +12,6 @@ import { Languages } from "../types"; | ||
/** | ||
* @ignore | ||
*/ | ||
action?: AuthAction; | ||
/** | ||
* Дополнительные параметры | ||
@@ -65,1 +69,7 @@ */ | ||
} | ||
type AuthActionNames = 'sdk_oauth'; | ||
interface AuthAction { | ||
name: AuthActionNames; | ||
params: any; | ||
} | ||
export {}; |
export { validator } from './validator'; | ||
export { isRequired, isNumber, isValidAppId, isValidHeight } from './rules'; | ||
export { isRequired, isNumber, isValidAppId, isValidHeight, isNotEmptyOAuthList } from './rules'; |
@@ -6,1 +6,2 @@ import { ValidatorRule } from './types'; | ||
export declare const isValidHeight: ValidatorRule; | ||
export declare const isNotEmptyOAuthList: ValidatorRule; |
import { Auth, AuthParams, AuthError, AuthResponse, AuthErrorCode } from './auth'; | ||
import { Config, ConfigData } from './core/config'; | ||
export { WidgetEvents } from './core/widget/events'; | ||
export { Languages } from './types'; | ||
export { OneTap, OneTapPublicEvents } from './widgets/oneTap'; | ||
export type { OneTapParams } from './widgets/oneTap'; | ||
declare const globalConfig: Config; | ||
@@ -13,1 +10,8 @@ export { globalConfig as Config }; | ||
export type { AuthParams, AuthError, AuthResponse, AuthErrorCode }; | ||
export { WidgetEvents } from './core/widget'; | ||
/** Export OneTap */ | ||
export { OneTap, OneTapPublicEvents } from './widgets/oneTap'; | ||
export type { OneTapParams, OneTapStyles } from './widgets/oneTap'; | ||
/** Export OAuthList */ | ||
export { OAuthList, OAuthListPublicEvents, OAuthName } from './widgets/oauthList'; | ||
export type { OAuthListParams, OAuthListStyles } from './widgets/oauthList'; |
export { OneTap } from './oneTap'; | ||
export { OneTapPublicEvents } from './events'; | ||
export { OneTapParams } from './types'; | ||
export { OneTapParams, OneTapStyles } from './types'; |
{ | ||
"name": "@vkid/sdk", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "VK ID Web SDK", | ||
@@ -5,0 +5,0 @@ "main": "dist-sdk/cjs/index.js", |
@@ -52,3 +52,3 @@ <div align="center"> | ||
```html | ||
<script src="https://unpkg.com/@vkid/sdk/dist/index-umd.js"></script> | ||
<script src="https://unpkg.com/@vkid/sdk@latest/dist-sdk/umd/index.js"></script> | ||
``` | ||
@@ -55,0 +55,0 @@ |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
487195
160
10389
5
2