xod-arduino
Advanced tools
Comparing version 0.19.2 to 0.19.3-site.0
@@ -43,16 +43,11 @@ 'use strict'; | ||
var createPatchNames = (0, _types.def)('createPatchNames :: PatchPath -> { owner :: String, libName :: String, patchName :: String }', R.compose(R.map(kebabToSnake), R.ifElse(R.startsWith(['@']), function (parts) { | ||
return { | ||
owner: '', | ||
libName: '', | ||
patchName: parts.slice(1).join('/') | ||
}; | ||
}, function (parts) { | ||
return { | ||
owner: parts[0], | ||
libName: parts[1], | ||
patchName: parts.slice(2).join('/') | ||
}; | ||
}), R.split('/'))); | ||
// foo(number,string) -> foo__number__string | ||
var sanitizeTypeSpecification = R.compose(R.replace(/\(|,/g, '__'), R.replace(')', '')); | ||
var createPatchNames = (0, _types.def)('createPatchNames :: PatchPath -> { owner :: String, libName :: String, patchName :: String }', R.compose(R.map(kebabToSnake), R.applySpec({ | ||
owner: R.ifElse(Project.isPathLibrary, Project.getOwnerName, R.always('')), | ||
libName: R.ifElse(Project.isPathLibrary, R.pipe(R.split('/'), R.nth(1)), R.always('')), | ||
patchName: R.pipe(Project.getBaseName, sanitizeTypeSpecification) | ||
}))); | ||
var findPatchByPath = (0, _types.def)('findPatchByPath :: PatchPath -> [TPatch] -> TPatch', function (path, patches) { | ||
@@ -201,3 +196,3 @@ return R.compose(R.find(R.__, patches), R.allPass, R.map(R.apply(R.propEq)), R.toPairs, createPatchNames)(path); | ||
var transformProjectWithImpls = (0, _types.def)('transformProjectWithImpls :: Project -> PatchPath -> TranspilationOptions -> Either Error TProject', function (project, path, opts) { | ||
return R.compose(Project.wrapDeadRefErrorMessage(path), R.chain(function (tProject) { | ||
return R.compose(R.chain(function (tProject) { | ||
var nodeWithTooManyOutputs = R.find(R.pipe(R.prop('outputs'), R.length, R.lt(7)), tProject.patches); | ||
@@ -204,0 +199,0 @@ |
{ | ||
"name": "xod-arduino", | ||
"version": "0.19.2", | ||
"version": "0.19.3-site.0", | ||
"description": "XOD project: Arduino transpiler", | ||
@@ -24,3 +24,3 @@ "scripts": { | ||
"xod-func-tools": "^0.19.2", | ||
"xod-project": "^0.19.2" | ||
"xod-project": "^0.19.3-site.0" | ||
}, | ||
@@ -31,4 +31,4 @@ "devDependencies": { | ||
"dirty-chai": "^1.2.2", | ||
"xod-fs": "^0.19.2" | ||
"xod-fs": "^0.19.3-site.0" | ||
} | ||
} |
@@ -29,2 +29,8 @@ import * as R from 'ramda'; | ||
// foo(number,string) -> foo__number__string | ||
const sanitizeTypeSpecification = R.compose( | ||
R.replace(/\(|,/g, '__'), | ||
R.replace(')', '') | ||
); | ||
const createPatchNames = def( | ||
@@ -34,16 +40,15 @@ 'createPatchNames :: PatchPath -> { owner :: String, libName :: String, patchName :: String }', | ||
R.map(kebabToSnake), | ||
R.ifElse( | ||
R.startsWith(['@']), | ||
parts => ({ | ||
owner: '', | ||
libName: '', | ||
patchName: parts.slice(1).join('/'), | ||
}), | ||
parts => ({ | ||
owner: parts[0], | ||
libName: parts[1], | ||
patchName: parts.slice(2).join('/'), | ||
}) | ||
), | ||
R.split('/') | ||
R.applySpec({ | ||
owner: R.ifElse( | ||
Project.isPathLibrary, | ||
Project.getOwnerName, | ||
R.always('') | ||
), | ||
libName: R.ifElse( | ||
Project.isPathLibrary, | ||
R.pipe(R.split('/'), R.nth(1)), | ||
R.always('') | ||
), | ||
patchName: R.pipe(Project.getBaseName, sanitizeTypeSpecification), | ||
}) | ||
) | ||
@@ -331,3 +336,2 @@ ); | ||
R.compose( | ||
Project.wrapDeadRefErrorMessage(path), | ||
R.chain(tProject => { | ||
@@ -334,0 +338,0 @@ const nodeWithTooManyOutputs = R.find( |
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
622400
1823
Updatedxod-project@^0.19.3-site.0