Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ask-sdk-core

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ask-sdk-core - npm Package Compare versions

Comparing version 2.1.0-beta.4 to 2.1.0

dist/dispatcher/error/handler/CustomSkillErrorHandler.d.ts

31

CHANGELOG.md

@@ -6,9 +6,9 @@ # Change Log

<a name="2.1.0-beta.4"></a>
# [2.1.0-beta.4](https://github.com/alexa/alexa-skills-kit-sdk-for-nodejs/compare/v2.1.0-beta.3...v2.1.0-beta.4) (2018-06-22)
<a name="2.1.0"></a>
# [2.1.0](https://github.com/alexa/alexa-skills-kit-sdk-for-nodejs/compare/v2.0.10...v2.1.0) (2018-10-04)
### Bug Fixes
### Features
* update attributes persistence behavior of ask-sdk-v1adapter ([abb6f40](https://github.com/alexa/alexa-skills-kit-sdk-for-nodejs/commit/abb6f40)), closes [#414](https://github.com/alexa/alexa-skills-kit-sdk-for-nodejs/issues/414)
* SDK structure update ([3f52c59](https://github.com/alexa/alexa-skills-kit-sdk-for-nodejs/commit/3f52c59))

@@ -18,4 +18,4 @@

<a name="2.1.0-beta.3"></a>
# [2.1.0-beta.3](https://github.com/alexa/alexa-skills-kit-sdk-for-nodejs/compare/v2.1.0-beta.1...v2.1.0-beta.3) (2018-06-13)
<a name="2.0.10"></a>
## [2.0.10](https://github.com/alexa/alexa-skills-kit-sdk-for-nodejs/compare/v2.0.9...v2.0.10) (2018-09-25)

@@ -27,2 +27,21 @@

<a name="2.0.9"></a>
## [2.0.9](https://github.com/alexa/alexa-skills-kit-sdk-for-nodejs/compare/v2.0.8...v2.0.9) (2018-09-10)
**Note:** Version bump only for package ask-sdk-core
<a name="2.0.7"></a>
## [2.0.7](https://github.com/alexa/alexa-skills-kit-sdk-for-nodejs/compare/v2.0.6...v2.0.7) (2018-06-22)
### Bug Fixes
* update attributes persistence behavior of ask-sdk-v1adapter ([51432df](https://github.com/alexa/alexa-skills-kit-sdk-for-nodejs/commit/51432df)), closes [#414](https://github.com/alexa/alexa-skills-kit-sdk-for-nodejs/issues/414)
<a name="2.0.5"></a>

@@ -29,0 +48,0 @@ ## [2.0.5](https://github.com/alexa/alexa-skills-kit-sdk-for-nodejs/compare/v2.0.4...v2.0.5) (2018-05-16)

2

dist/attributes/AttributesManager.js

@@ -0,1 +1,2 @@

"use strict";
/*

@@ -13,4 +14,3 @@ * Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.

*/
'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=AttributesManager.js.map

@@ -0,1 +1,2 @@

"use strict";
/*

@@ -13,3 +14,2 @@ * Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.

*/
'use strict';
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

@@ -51,3 +51,3 @@ return new (P || (P = Promise))(function (resolve, reject) {

Object.defineProperty(exports, "__esModule", { value: true });
var AskSdkUtils_1 = require("../util/AskSdkUtils");
var ask_sdk_runtime_1 = require("ask-sdk-runtime");
/**

@@ -61,3 +61,3 @@ * Provider for attributes that can be stored on three levels: request, session and persistence.

if (!options.requestEnvelope) {
throw AskSdkUtils_1.createAskSdkError('AttributesManagerFactory', 'RequestEnvelope cannot be null or undefined!');
throw ask_sdk_runtime_1.createAskSdkError('AttributesManagerFactory', 'RequestEnvelope cannot be null or undefined!');
}

@@ -78,3 +78,3 @@ var thisRequestAttributes = {};

if (!options.requestEnvelope.session) {
throw AskSdkUtils_1.createAskSdkError('AttributesManager', 'Cannot get SessionAttributes from out of session request!');
throw ask_sdk_runtime_1.createAskSdkError('AttributesManager', 'Cannot get SessionAttributes from out of session request!');
}

@@ -89,3 +89,3 @@ return thisSessionAttributes;

if (!options.persistenceAdapter) {
throw AskSdkUtils_1.createAskSdkError('AttributesManager', 'Cannot get PersistentAttributes without PersistenceManager');
throw ask_sdk_runtime_1.createAskSdkError('AttributesManager', 'Cannot get PersistentAttributes without PersistenceManager');
}

@@ -108,3 +108,3 @@ if (!!persistentAttributesSet) return [3 /*break*/, 2];

if (!options.requestEnvelope.session) {
throw AskSdkUtils_1.createAskSdkError('AttributesManager', 'Cannot set SessionAttributes to out of session request!');
throw ask_sdk_runtime_1.createAskSdkError('AttributesManager', 'Cannot set SessionAttributes to out of session request!');
}

@@ -115,3 +115,3 @@ thisSessionAttributes = sessionAttributes;

if (!options.persistenceAdapter) {
throw AskSdkUtils_1.createAskSdkError('AttributesManager', 'Cannot set PersistentAttributes without persistence adapter!');
throw ask_sdk_runtime_1.createAskSdkError('AttributesManager', 'Cannot set PersistentAttributes without persistence adapter!');
}

@@ -127,3 +127,3 @@ thisPersistentAttributes = persistentAttributes;

if (!options.persistenceAdapter) {
throw AskSdkUtils_1.createAskSdkError('AttributesManager', 'Cannot save PersistentAttributes without persistence adapter!');
throw ask_sdk_runtime_1.createAskSdkError('AttributesManager', 'Cannot save PersistentAttributes without persistence adapter!');
}

@@ -130,0 +130,0 @@ if (!persistentAttributesSet) return [3 /*break*/, 2];

@@ -0,1 +1,2 @@

"use strict";
/*

@@ -13,4 +14,3 @@ * Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.

*/
'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=PersistenceAdapter.js.map

@@ -6,3 +6,3 @@ import { RequestEnvelope, services } from 'ask-sdk-model';

/**
* An interface that represents components passed into {@link RequestHandler} and {@link ErrorHandler}.
* An interface that represents components passed into {@link CustomSkillRequestHandler} and {@link CustomSkillErrorHandler}.
*/

@@ -9,0 +9,0 @@ export interface HandlerInput {

export { AttributesManager } from './attributes/AttributesManager';
export { AttributesManagerFactory } from './attributes/AttributesManagerFactory';
export { PersistenceAdapter } from './attributes/persistence/PersistenceAdapter';
export { DefaultRequestDispatcher } from './dispatcher/DefaultRequestDispatcher';
export { DefaultErrorMapper } from './dispatcher/error/DefaultErrorMapper';
export { ErrorHandler } from './dispatcher/error/ErrorHandler';
export { ErrorMapper } from './dispatcher/error/ErrorMapper';
export { DefaultHandlerAdapter } from './dispatcher/request/handler/DefaultHandlerAdapter';
export { DefaultRequestHandlerChain } from './dispatcher/request/handler/DefaultRequestHandlerChain';
export { GenericRequestHandlerChain } from './dispatcher/request/handler/GenericRequestHandlerChain';
export { HandlerAdapter } from './dispatcher/request/handler/HandlerAdapter';
export { CustomSkillErrorHandler as ErrorHandler } from './dispatcher/error/handler/CustomSkillErrorHandler';
export { CustomSkillRequestHandler as RequestHandler } from './dispatcher/request/handler/CustomSkillRequestHandler';
export { HandlerInput } from './dispatcher/request/handler/HandlerInput';
export { RequestHandler } from './dispatcher/request/handler/RequestHandler';
export { RequestHandlerChain } from './dispatcher/request/handler/RequestHandlerChain';
export { RequestInterceptor } from './dispatcher/request/interceptor/RequestInterceptor';
export { ResponseInterceptor } from './dispatcher/request/interceptor/ResponseInterceptor';
export { DefaultRequestMapper } from './dispatcher/request/mapper/DefaultRequestMapper';
export { RequestMapper } from './dispatcher/request/mapper/RequestMapper';
export { RequestDispatcher } from './dispatcher/RequestDispatcher';
export { CustomSkillRequestInterceptor as RequestInterceptor } from './dispatcher/request/interceptor/CustomSkillRequestInterceptor';
export { CustomSkillResponseInterceptor as ResponseInterceptor } from './dispatcher/request/interceptor/CustomSkillResponseInterceptor';
export { ImageHelper } from './response/ImageHelper';

@@ -27,2 +16,3 @@ export { PlainTextContentHelper } from './response/PlainTextContentHelper';

export { DefaultApiClient } from './service/DefaultApiClient';
export { CustomSkill as Skill } from './skill/CustomSkill';
export { BaseSkillBuilder } from './skill/factory/BaseSkillBuilder';

@@ -32,4 +22,4 @@ export { BaseSkillFactory } from './skill/factory/BaseSkillFactory';

export { CustomSkillFactory } from './skill/factory/CustomSkillFactory';
export { Skill } from './skill/Skill';
export { SkillBuilders } from './skill/SkillBuilders';
export { SkillConfiguration } from './skill/SkillConfiguration';
export { CustomSkillConfiguration as SkillConfiguration } from './skill/CustomSkillConfiguration';
export { createAskSdkError, createAskSdkUserAgent, } from 'ask-sdk-runtime';

@@ -0,1 +1,2 @@

"use strict";
/*

@@ -13,18 +14,5 @@ * Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.

*/
'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
var AttributesManagerFactory_1 = require("./attributes/AttributesManagerFactory");
exports.AttributesManagerFactory = AttributesManagerFactory_1.AttributesManagerFactory;
var DefaultRequestDispatcher_1 = require("./dispatcher/DefaultRequestDispatcher");
exports.DefaultRequestDispatcher = DefaultRequestDispatcher_1.DefaultRequestDispatcher;
var DefaultErrorMapper_1 = require("./dispatcher/error/DefaultErrorMapper");
exports.DefaultErrorMapper = DefaultErrorMapper_1.DefaultErrorMapper;
var DefaultHandlerAdapter_1 = require("./dispatcher/request/handler/DefaultHandlerAdapter");
exports.DefaultHandlerAdapter = DefaultHandlerAdapter_1.DefaultHandlerAdapter;
var DefaultRequestHandlerChain_1 = require("./dispatcher/request/handler/DefaultRequestHandlerChain");
exports.DefaultRequestHandlerChain = DefaultRequestHandlerChain_1.DefaultRequestHandlerChain;
var GenericRequestHandlerChain_1 = require("./dispatcher/request/handler/GenericRequestHandlerChain");
exports.GenericRequestHandlerChain = GenericRequestHandlerChain_1.GenericRequestHandlerChain;
var DefaultRequestMapper_1 = require("./dispatcher/request/mapper/DefaultRequestMapper");
exports.DefaultRequestMapper = DefaultRequestMapper_1.DefaultRequestMapper;
var ImageHelper_1 = require("./response/ImageHelper");

@@ -42,2 +30,4 @@ exports.ImageHelper = ImageHelper_1.ImageHelper;

exports.DefaultApiClient = DefaultApiClient_1.DefaultApiClient;
var CustomSkill_1 = require("./skill/CustomSkill");
exports.Skill = CustomSkill_1.CustomSkill;
var BaseSkillFactory_1 = require("./skill/factory/BaseSkillFactory");

@@ -47,6 +37,7 @@ exports.BaseSkillFactory = BaseSkillFactory_1.BaseSkillFactory;

exports.CustomSkillFactory = CustomSkillFactory_1.CustomSkillFactory;
var Skill_1 = require("./skill/Skill");
exports.Skill = Skill_1.Skill;
var SkillBuilders_1 = require("./skill/SkillBuilders");
exports.SkillBuilders = SkillBuilders_1.SkillBuilders;
var ask_sdk_runtime_1 = require("ask-sdk-runtime");
exports.createAskSdkError = ask_sdk_runtime_1.createAskSdkError;
exports.createAskSdkUserAgent = ask_sdk_runtime_1.createAskSdkUserAgent;
//# sourceMappingURL=index.js.map

@@ -0,1 +1,2 @@

"use strict";
/*

@@ -13,3 +14,2 @@ * Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.

*/
'use strict';
Object.defineProperty(exports, "__esModule", { value: true });

@@ -16,0 +16,0 @@ /**

@@ -0,1 +1,2 @@

"use strict";
/*

@@ -13,3 +14,2 @@ * Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.

*/
'use strict';
var __extends = (this && this.__extends) || (function () {

@@ -16,0 +16,0 @@ var extendStatics = Object.setPrototypeOf ||

@@ -1,4 +0,3 @@

import { canfulfill, Directive, Intent, interfaces, Response } from 'ask-sdk-model';
import { Directive, Intent, interfaces, Response } from 'ask-sdk-model';
import AudioItemMetadata = interfaces.audioplayer.AudioItemMetadata;
import CanFulfillIntent = canfulfill.CanFulfillIntent;
/**

@@ -137,8 +136,2 @@ * An interface which helps building a response.

/**
* Adds canFulfillIntent to response.
* @param {canfulfill.CanFulfillIntent} canFulfillIntent
* @return {ResponseBuilder}
*/
withCanFulfillIntent(canFulfillIntent: CanFulfillIntent): this;
/**
* Sets shouldEndSession value to null/false/true

@@ -145,0 +138,0 @@ * @param {boolean} val

@@ -0,1 +1,2 @@

"use strict";
/*

@@ -13,4 +14,3 @@ * Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.

*/
'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=ResponseBuilder.js.map

@@ -0,1 +1,2 @@

"use strict";
/*

@@ -13,3 +14,2 @@ * Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.

*/
'use strict';
Object.defineProperty(exports, "__esModule", { value: true });

@@ -232,6 +232,2 @@ /**

},
withCanFulfillIntent: function (canFulfillIntent) {
response.canFulfillIntent = canFulfillIntent;
return this;
},
withShouldEndSession: function (val) {

@@ -238,0 +234,0 @@ if (!isVideoAppLaunchDirectivePresent()) {

@@ -0,1 +1,2 @@

"use strict";
/*

@@ -13,3 +14,2 @@ * Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.

*/
'use strict';
var __extends = (this && this.__extends) || (function () {

@@ -16,0 +16,0 @@ var extendStatics = Object.setPrototypeOf ||

@@ -0,1 +1,2 @@

"use strict";
/*

@@ -13,3 +14,2 @@ * Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.

*/
'use strict';
Object.defineProperty(exports, "__esModule", { value: true });

@@ -16,0 +16,0 @@ /**

@@ -0,1 +1,2 @@

"use strict";
/*

@@ -13,6 +14,5 @@ * Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.

*/
'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
var ask_sdk_runtime_1 = require("ask-sdk-runtime");
var url = require("url");
var AskSdkUtils_1 = require("../util/AskSdkUtils");
/**

@@ -63,3 +63,3 @@ * Default implementation of {@link services.ApiClient} which uses the native HTTP/HTTPS library of Node.JS.

clientRequest.on('error', function (err) {
reject(AskSdkUtils_1.createAskSdkError(_this.constructor.name, err.message));
reject(ask_sdk_runtime_1.createAskSdkError(_this.constructor.name, err.message));
});

@@ -66,0 +66,0 @@ if (request.body) {

import { Response } from 'ask-sdk-model';
import { ErrorHandler } from '../../dispatcher/error/ErrorHandler';
import { CustomSkillErrorHandler } from '../../dispatcher/error/handler/CustomSkillErrorHandler';
import { CustomSkillRequestHandler } from '../../dispatcher/request/handler/CustomSkillRequestHandler';
import { HandlerInput } from '../../dispatcher/request/handler/HandlerInput';
import { RequestHandler } from '../../dispatcher/request/handler/RequestHandler';
import { RequestInterceptor } from '../../dispatcher/request/interceptor/RequestInterceptor';
import { ResponseInterceptor } from '../../dispatcher/request/interceptor/ResponseInterceptor';
import { Skill } from '../Skill';
import { SkillConfiguration } from '../SkillConfiguration';
import { CustomSkillRequestInterceptor } from '../../dispatcher/request/interceptor/CustomSkillRequestInterceptor';
import { CustomSkillResponseInterceptor } from '../../dispatcher/request/interceptor/CustomSkillResponseInterceptor';
import { CustomSkill } from '../CustomSkill';
import { CustomSkillConfiguration } from '../CustomSkillConfiguration';
import { LambdaHandler } from './BaseSkillFactory';
/**
* An interface containing help functions to build a {@link Skill}.
* An interface containing help functions to build a {@link CustomSkill}.
*/
export interface BaseSkillBuilder {
addRequestHandler(matcher: ((handlerInput: HandlerInput) => Promise<boolean> | boolean) | string, executor: (handlerInput: HandlerInput) => Promise<Response> | Response): this;
addRequestHandlers(...requestHandlers: RequestHandler[]): this;
addRequestInterceptors(...executors: Array<RequestInterceptor | ((handlerInput: HandlerInput) => Promise<void> | void)>): this;
addResponseInterceptors(...executors: Array<ResponseInterceptor | ((handlerInput: HandlerInput, response?: Response) => Promise<void> | void)>): this;
addErrorHandler(matcher: (handlerInput: HandlerInput, error: Error) => Promise<boolean> | boolean, executor: (handlerInput: HandlerInput, error: Error) => Promise<Response> | Response): this;
addErrorHandlers(...errorHandlers: ErrorHandler[]): this;
addRequestHandler(matcher: ((input: HandlerInput) => Promise<boolean> | boolean) | string, executor: (input: HandlerInput) => Promise<Response> | Response): this;
addRequestHandlers(...requestHandlers: CustomSkillRequestHandler[]): this;
addRequestInterceptors(...executors: Array<CustomSkillRequestInterceptor | ((input: HandlerInput) => Promise<void> | void)>): this;
addResponseInterceptors(...executors: Array<CustomSkillResponseInterceptor | ((input: HandlerInput, response?: Response) => Promise<void> | void)>): this;
addErrorHandler(matcher: (input: HandlerInput, error: Error) => Promise<boolean> | boolean, executor: (input: HandlerInput, error: Error) => Promise<Response> | Response): this;
addErrorHandlers(...errorHandlers: CustomSkillErrorHandler[]): this;
withCustomUserAgent(customUserAgent: string): this;
withSkillId(skillId: string): this;
getSkillConfiguration(): SkillConfiguration;
create(): Skill;
getSkillConfiguration(): CustomSkillConfiguration;
create(): CustomSkill;
lambda(): LambdaHandler;
}

@@ -0,1 +1,2 @@

"use strict";
/*

@@ -13,4 +14,3 @@ * Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.

*/
'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=BaseSkillBuilder.js.map

@@ -0,1 +1,2 @@

"use strict";
/*

@@ -13,10 +14,13 @@ * Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.

*/
'use strict';
var __assign = (this && this.__assign) || Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var DefaultErrorMapper_1 = require("../../dispatcher/error/DefaultErrorMapper");
var DefaultHandlerAdapter_1 = require("../../dispatcher/request/handler/DefaultHandlerAdapter");
var DefaultRequestHandlerChain_1 = require("../../dispatcher/request/handler/DefaultRequestHandlerChain");
var DefaultRequestMapper_1 = require("../../dispatcher/request/mapper/DefaultRequestMapper");
var AskSdkUtils_1 = require("../../util/AskSdkUtils");
var Skill_1 = require("../Skill");
var ask_sdk_runtime_1 = require("ask-sdk-runtime");
var CustomSkill_1 = require("../CustomSkill");
var BaseSkillFactory = /** @class */ (function () {

@@ -26,6 +30,3 @@ function BaseSkillFactory() {

BaseSkillFactory.init = function () {
var thisRequestHandlerChains = [];
var thisRequestInterceptors = [];
var thisResponseInterceptors = [];
var thisErrorHandlers = [];
var runtimeConfigurationBuilder = new ask_sdk_runtime_1.RuntimeConfigurationBuilder();
var thisCustomUserAgent;

@@ -35,27 +36,11 @@ var thisSkillId;

addRequestHandler: function (matcher, executor) {
var canHandle;
switch (typeof matcher) {
case 'string': {
canHandle = function (_a) {
var requestEnvelope = _a.requestEnvelope;
return matcher === (requestEnvelope.request.type === 'IntentRequest'
? requestEnvelope.request.intent.name
: requestEnvelope.request.type);
};
break;
var canHandle = typeof matcher === 'string'
? function (_a) {
var requestEnvelope = _a.requestEnvelope;
return matcher === (requestEnvelope.request.type === 'IntentRequest'
? requestEnvelope.request.intent.name
: requestEnvelope.request.type);
}
case 'function': {
canHandle = matcher;
break;
}
default: {
throw AskSdkUtils_1.createAskSdkError('SkillBuilderError', "Matcher must be of type string or function, got: " + typeof matcher + "!");
}
}
thisRequestHandlerChains.push(new DefaultRequestHandlerChain_1.DefaultRequestHandlerChain({
requestHandler: {
canHandle: canHandle,
handle: executor,
},
}));
: matcher;
runtimeConfigurationBuilder.addRequestHandler(canHandle, executor);
return this;

@@ -68,8 +53,3 @@ },

}
for (var _a = 0, requestHandlers_1 = requestHandlers; _a < requestHandlers_1.length; _a++) {
var requestHandler = requestHandlers_1[_a];
thisRequestHandlerChains.push(new DefaultRequestHandlerChain_1.DefaultRequestHandlerChain({
requestHandler: requestHandler,
}));
}
runtimeConfigurationBuilder.addRequestHandlers.apply(runtimeConfigurationBuilder, requestHandlers);
return this;

@@ -82,20 +62,3 @@ },

}
for (var _a = 0, executors_1 = executors; _a < executors_1.length; _a++) {
var executor = executors_1[_a];
switch (typeof executor) {
case 'object': {
thisRequestInterceptors.push(executor);
break;
}
case 'function': {
thisRequestInterceptors.push({
process: executor,
});
break;
}
default: {
throw AskSdkUtils_1.createAskSdkError('SkillBuilderError', "Executor must be of type Object(RequestInterceptor) or function, got: " + typeof executor);
}
}
}
runtimeConfigurationBuilder.addRequestInterceptors.apply(runtimeConfigurationBuilder, executors);
return this;

@@ -108,27 +71,7 @@ },

}
for (var _a = 0, executors_2 = executors; _a < executors_2.length; _a++) {
var executor = executors_2[_a];
switch (typeof executor) {
case 'object': {
thisResponseInterceptors.push(executor);
break;
}
case 'function': {
thisResponseInterceptors.push({
process: executor,
});
break;
}
default: {
throw AskSdkUtils_1.createAskSdkError('SkillBuilderError', "Executor must be of type Object(ResponseInterceptor) or function, got: " + typeof executor);
}
}
}
runtimeConfigurationBuilder.addResponseInterceptors.apply(runtimeConfigurationBuilder, executors);
return this;
},
addErrorHandler: function (matcher, executor) {
thisErrorHandlers.push({
canHandle: matcher,
handle: executor,
});
runtimeConfigurationBuilder.addErrorHandler(matcher, executor);
return this;

@@ -141,3 +84,3 @@ },

}
thisErrorHandlers.push.apply(thisErrorHandlers, errorHandlers);
runtimeConfigurationBuilder.addErrorHandlers.apply(runtimeConfigurationBuilder, errorHandlers);
return this;

@@ -154,25 +97,10 @@ },

getSkillConfiguration: function () {
var requestMapper = new DefaultRequestMapper_1.DefaultRequestMapper({
requestHandlerChains: thisRequestHandlerChains,
});
var errorMapper = thisErrorHandlers.length
? new DefaultErrorMapper_1.DefaultErrorMapper({
errorHandlers: thisErrorHandlers,
})
: undefined;
return {
requestMappers: [requestMapper],
handlerAdapters: [new DefaultHandlerAdapter_1.DefaultHandlerAdapter()],
errorMapper: errorMapper,
requestInterceptors: thisRequestInterceptors,
responseInterceptors: thisResponseInterceptors,
customUserAgent: thisCustomUserAgent,
skillId: thisSkillId,
};
var runtimeConfiguration = runtimeConfigurationBuilder.getRuntimeConfiguration();
return __assign({}, runtimeConfiguration, { customUserAgent: thisCustomUserAgent, skillId: thisSkillId });
},
create: function () {
return new Skill_1.Skill(this.getSkillConfiguration());
return new CustomSkill_1.CustomSkill(this.getSkillConfiguration());
},
lambda: function () {
var skill = new Skill_1.Skill(this.getSkillConfiguration());
var skill = new CustomSkill_1.CustomSkill(this.getSkillConfiguration());
return function (event, context, callback) {

@@ -179,0 +107,0 @@ skill.invoke(event, context)

@@ -0,1 +1,2 @@

"use strict";
/*

@@ -13,4 +14,3 @@ * Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.

*/
'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=CustomSkillBuilder.js.map

@@ -0,1 +1,2 @@

"use strict";
/*

@@ -13,3 +14,2 @@ * Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.

*/
'use strict';
var __assign = (this && this.__assign) || Object.assign || function(t) {

@@ -16,0 +16,0 @@ for (var s, i = 1, n = arguments.length; i < n; i++) {

@@ -0,1 +1,2 @@

"use strict";
/*

@@ -13,3 +14,2 @@ * Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.

*/
'use strict';
Object.defineProperty(exports, "__esModule", { value: true });

@@ -16,0 +16,0 @@ var CustomSkillFactory_1 = require("./factory/CustomSkillFactory");

{
"name": "ask-sdk-core",
"version": "2.1.0-beta.4",
"version": "2.1.0",
"description": "Core package for Alexa Skills Kit SDK",

@@ -26,4 +26,7 @@ "main": "dist/index.js",

],
"dependencies": {
"ask-sdk-runtime": "^2.1.0"
},
"peerDependencies": {
"ask-sdk-model": "^1.4.0-beta.1"
"ask-sdk-model": "^1.0.0"
},

@@ -35,3 +38,3 @@ "devDependencies": {

"@types/sinon": "^4.3.0",
"ask-sdk-model": "^1.4.0-beta.1",
"ask-sdk-model": "^1.0.0",
"chai": "^4.1.2",

@@ -42,7 +45,6 @@ "del": "^3.0.0",

"nock": "^9.2.3",
"nyc": "^11.4.1",
"nyc": "^13.0.1",
"sinon": "^4.5.0",
"ts-node": "^6.0.1",
"tslint": "^5.9.1",
"typedoc": "^0.11.1",
"typescript": "^2.8.1"

@@ -49,0 +51,0 @@ },

@@ -8,10 +8,10 @@ Core SDK package contains basic components and default implementations of ASK SDK v2 for Node.js.

## Installing
To use the Core SDK package (public beta), you need to install two modules: core SDK and model(peer dependency of core SDK) within your NPM project. Run the following commands in the terminal to install them:
To use the Core SDK package, you need to install two modules: core SDK and model(peer dependency of core SDK) within your NPM project. Run the following commands in the terminal to install them:
```
npm install --save ask-sdk-core@beta
npm install --save ask-sdk-core
```
```
npm install --save ask-sdk-model@beta
npm install --save ask-sdk-model
```

@@ -18,0 +18,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc