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

@ccpm/oid

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ccpm/oid - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

36

CMakeLists.txt

@@ -14,4 +14,7 @@ cmake_minimum_required(VERSION 3.6)

include(cmake/exe.cmake)
include(cmake/test.cmake)
if(CCPM_BUILD_TEST)
include(cmake/test.cmake)
endif()
execute_process(COMMAND node index.js

@@ -21,6 +24,2 @@ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}

)
execute_process(COMMAND node index.js lib
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE LIB_LIST_oid
)

@@ -30,10 +29,25 @@ if(DEPS_LIST_oid)

foreach(pkg ${DEPS_LIST_oid})
message("add_subdirectory: ${pkg} ${pkg}")
add_subdirectory(${pkg} ${pkg})
string(REPLACE "," ";" DEP_PATHS ${pkg})
list(GET DEP_PATHS 0 ABSOLUTE_PATH)
list(GET DEP_PATHS 1 RELATIVE_PATH)
get_property(CCPM_SOURCE_LIST GLOBAL PROPERTY "CCPM_SOURCE_LIST")
if(NOT CCPM_SOURCE_LIST)
set_property(GLOBAL PROPERTY "CCPM_SOURCE_LIST" "${ABSOLUTE_PATH}")
message("add_subdirectory: ${ABSOLUTE_PATH} ${RELATIVE_PATH}")
add_subdirectory(${ABSOLUTE_PATH} ${RELATIVE_PATH})
else()
list(FIND CCPM_SOURCE_LIST ${ABSOLUTE_PATH} FIND_INDEX)
if(${FIND_INDEX} MATCHES "-1")
set_property(GLOBAL PROPERTY "CCPM_SOURCE_LIST" "${CCPM_SOURCE_LIST};${ABSOLUTE_PATH}")
message("add_subdirectory: ${ABSOLUTE_PATH} ${RELATIVE_PATH}")
add_subdirectory(${ABSOLUTE_PATH} ${RELATIVE_PATH})
else()
message("found ${ABSOLUTE_PATH}")
endif()
endif()
endforeach()
endif()
if(LIB_LIST_oid)
string(REPLACE "\n" ";" LIB_LIST_oid ${LIB_LIST_oid})
target_link_libraries(oid ${LIB_LIST_oid})
endif()
if(CCPM_BUILD_TEST)
target_link_libraries(${TEST_EXE_NAME} cmocha)
endif()

@@ -1,37 +0,3 @@

const path = require('path')
const fs = require('fs')
const pkg = require(path.join(__dirname, './package.json'))
const paths = []
const libs = []
if (pkg.dependencies) {
for (const key in pkg.dependencies) {
const dir = findProjectRoot(require.resolve(key))
if (fs.existsSync(path.join(dir, 'CMakeLists.txt')) || fs.existsSync(path.join(dir, 'CMakelists.txt'))) {
paths.push(path.relative(__dirname, dir).replace(/\\/g, '/'))
libs.push(path.basename(key))
}
}
}
if (process.argv.slice(2)[0] === 'lib') {
libs.forEach(lib => console.log(lib))
} else {
paths.forEach(p => console.log(p))
}
function findProjectRoot (start) {
let current = start ? path.resolve(start) : process.cwd()
let previous = ''
do {
const target = path.join(current, 'package.json')
if (fs.existsSync(target) && fs.statSync(target).isFile()) {
return current
}
previous = current
current = path.dirname(current)
} while (current !== previous)
return ''
}
const getDepPaths = require('@ccpm/dep-paths').getDepPaths
const paths = getDepPaths(__dirname)
paths.forEach(p => console.log(p))
{
"name": "@ccpm/oid",
"version": "1.0.0",
"version": "1.0.1",
"description": "C implemention for MongoDB ObjectID",

@@ -8,3 +8,5 @@ "main": "index.js",

"license": "MIT",
"keywords": ["objectid"],
"keywords": [
"objectid"
],
"repository": {

@@ -17,3 +19,9 @@ "type": "git",

"access": "public"
},
"devDependencies": {
"@ccpm/cmocha": "^1.0.1"
},
"dependencies": {
"@ccpm/dep-paths": "^1.0.0"
}
}

@@ -7,2 +7,13 @@ # oid-cpp

## Setup
``` bash
$ npm install @ccpm/oid
```
``` cmake
add_subdirectory(...)
target_link_libraries(<TARGET> oid)
```
## C API

@@ -9,0 +20,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

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