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

base-query

Package Overview
Dependencies
Maintainers
3
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

base-query - npm Package Compare versions

Comparing version 0.0.5-alpha.1 to 0.0.5-alpha.2

dist/base-query-0.0.5-alpha.2.js

10

examples/browser/main.js
var key = '/3f995099-d624-4c8e-ab6b-1fd5e3799173/170420-1105-7yb890/8db476b3-7eb7-45a7-a09b-03e965f12685.gz.data3d.buffer'
// get object from base store
BASE.store.get(key).then(function(data3d){
// BASE.store.get(key).then(function(data3d){
//
// console.log('Data3d has '+Object.keys(data3d.materials).length+' materials.')
//
// })
console.log('Data3d has '+Object.keys(data3d.materials).length+' materials.')
BASE.product.get('d23062b7-6ec4-45c0-9cee-c96d835b5f54').then(function(result){
console.log('Data3d has '+Object.keys(result.data3d.materials).length+' materials.')
})

11

lib/core/product/get.js

@@ -1,9 +0,8 @@

import services from '../services.js'
import store from '../store.js'
import callService from '../services/call.js'
import getFromStore from '../store/get.js'
export default function getProduct (id) {
return services.call('Product.read', {
id: 'd23062b7-6ec4-45c0-9cee-c96d835b5f54'
}).then(function(productInfo){
return store.get(productInfo.fileKey).then(function(data3d){
// FIMXE: use proper argument name
return callService('Product.read', { id:id }).then(function(productInfo){
return getFromStore(productInfo.fileKey).then(function(data3d){
productInfo.data3d = data3d

@@ -10,0 +9,0 @@ return productInfo

import runtime from '../runtime.js'
import loadData3d from '../io/load-data3d.js'
import loadData3d from '../data3d/load.js'

@@ -4,0 +4,0 @@ // constants

import './core/polyfills.js'
import './core/bootstrap.js'
import runtime from './core/runtime.js'
import ThreeView from './core/three/view.js'
import decodeBuffer from './core/data3d/decode-buffer.js'
import View from './core/data3d/view.js'
import request from './core/io/request.js'
import uuid from './core/utils/uuid.js'
import loadData3d from './core/io/load-data3d.js'
import fetch from './core/io/fetch.js'
import services from './core/services.js'
import store from './core/store.js'
import product from './core/product.js'
import loadData3d from './core/data3d/load.js'
import request from './core/io/request.js'
import fetch from './core/io/fetch.js'
import uuid from './core/utils/uuid.js'
import callService from './core/services/call.js'
import getFromStore from './core/store/get.js'
import getProduct from './core/product/get.js'
import runtime from './core/runtime.js'

@@ -27,3 +27,3 @@ /**

three: {
View: View
View: ThreeView
},

@@ -34,5 +34,11 @@ data3d: {

},
store: store,
product: product,
services: services,
store: {
get: getFromStore
},
product: {
get: getProduct
},
services: {
call: callService
},
// ui: {},

@@ -39,0 +45,0 @@ // scene: {},

{
"name": "base-query",
"version": "0.0.5-alpha.1",
"version": "0.0.5-alpha.2",
"description": "Parse and edit building data using simple APIs.",

@@ -5,0 +5,0 @@ "homepage": "http://base-query.org/",

@@ -33,3 +33,3 @@ const run = require('./utils/run-cli-cmd.js')

fs.writeFileSync(`dist/${distName}.min.js.map`, ugly.map)
}
},
// gzip uglified files

@@ -36,0 +36,0 @@ `gzip -9 dist/${distName}.min.js dist/${distName}.min.js.map`,

Sorry, the diff of this file is too big to display

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