@superfaceai/parser
Advanced tools
Comparing version 0.0.18 to 0.0.19
@@ -10,2 +10,4 @@ # Changelog | ||
## [0.0.19] - 2021-07-14 | ||
## [0.0.18] - 2021-06-08 | ||
@@ -170,3 +172,4 @@ | ||
[Unreleased]: https://github.com/superfaceai/parser/compare/v0.0.18...HEAD | ||
[Unreleased]: https://github.com/superfaceai/parser/compare/v0.0.19...HEAD | ||
[0.0.19]: https://github.com/superfaceai/parser/compare/v0.0.18...v0.0.19 | ||
[0.0.18]: https://github.com/superfaceai/parser/compare/v0.0.18-beta.0...v0.0.18 | ||
@@ -173,0 +176,0 @@ [0.0.18-beta.0]: https://github.com/superfaceai/parser/compare/v0.0.17...v0.0.18-beta.0 |
@@ -21,2 +21,7 @@ import { LiteralNode, MapASTNode, MapDefinitionNode, OperationDefinitionNode, OutcomeStatementNode, ProfileDocumentNode } from '@superfaceai/ast'; | ||
export declare const mergeVariables: (left: Record<string, LiteralNode>, right: Record<string, LiteralNode>) => Record<string, LiteralNode>; | ||
export declare type UseCaseInfo = { | ||
name: string; | ||
safety?: 'safe' | 'unsafe' | 'idempotent'; | ||
}; | ||
export declare const getProfileUsecases: (profile: ProfileDocumentNode) => UseCaseInfo[]; | ||
export declare const getProfileOutput: (profile: ProfileDocumentNode) => ProfileOutput; | ||
@@ -23,0 +28,0 @@ export declare const validateMap: (profileOutput: ProfileOutput, mapAst: MapASTNode) => ValidationResult; |
@@ -33,3 +33,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getVariableName = exports.getTypescriptIdentifierName = exports.findTypescriptProperty = exports.findTypescriptIdentifier = exports.validateObjectStructure = exports.replaceRedudantCharacters = exports.REDUDANT_EXPRESSION_CHARACTERS_REGEX = exports.getTypescriptIdentifier = exports.validateMap = exports.getProfileOutput = exports.mergeVariables = exports.getOutcomes = exports.compareStructure = exports.formatIssues = exports.composeVersion = void 0; | ||
exports.getVariableName = exports.getTypescriptIdentifierName = exports.findTypescriptProperty = exports.findTypescriptIdentifier = exports.validateObjectStructure = exports.replaceRedudantCharacters = exports.REDUDANT_EXPRESSION_CHARACTERS_REGEX = exports.getTypescriptIdentifier = exports.validateMap = exports.getProfileOutput = exports.getProfileUsecases = exports.mergeVariables = exports.getOutcomes = exports.compareStructure = exports.formatIssues = exports.composeVersion = void 0; | ||
var ast_1 = require("@superfaceai/ast"); | ||
@@ -283,2 +283,8 @@ var ts = __importStar(require("typescript")); | ||
exports.mergeVariables = mergeVariables; | ||
var getProfileUsecases = function (profile) { | ||
return profile.definitions | ||
.filter(ast_1.isUseCaseDefinitionNode) | ||
.map(function (definition) { return ({ name: definition.useCaseName, safety: definition.safety }); }); | ||
}; | ||
exports.getProfileUsecases = getProfileUsecases; | ||
var getProfileOutput = function (profile) { | ||
@@ -285,0 +291,0 @@ var analyzer = new profile_io_analyzer_1.ProfileIOAnalyzer(); |
{ | ||
"name": "@superfaceai/parser", | ||
"version": "0.0.18", | ||
"version": "0.0.19", | ||
"description": "Level 5 autonomous, self-driving API client, https://superface.ai", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/superfaceai/parser.git", |
Sorry, the diff of this file is not supported yet
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
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
547178
8622